@gem-sdk/core 1.14.0-dev.816 → 1.14.0-dev.823

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var makeStyle=require("../helpers/make-style.js");require("react"),require("react/jsx-runtime"),require("zustand"),require("swr"),require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("vanilla-lazyload"),require("../hooks/useCartUI.js"),require("react-transition-group"),require("@gem-sdk/core");var constant=require("./constant.js"),render=require("../helpers/render.js"),convert=require("../helpers/convert.js"),composeAdvanceStyle=require("../helpers/compose-advance-style.js");const componentsRenderWithParentId=["CarouselItem"],componentTexts=["Text","Heading"],componentIconList=["IconListV2","IconList"],componentUsingAdvanced=["IconList"],Render=({uid:e,builder:t,components:r,parentId:n,extraFiles:s={},pageContext:i,...d})=>{let a=t[e],l=r[a?.tag];if(!l)return console.log("Miss component: ",a),{liquid:"",extraFiles:s};if(!a||a?.type==="section")return{liquid:"",extraFiles:s};{let s={extraFiles:{}},o=composeAdvanceStyle.composeAdvanceStyle(a.advanced,a.tag),c="";c=constant.disableWrap.includes(a.tag)?render.RenderIf(a?.childrens?.length,()=>l({builderProps:{uid:e,builderData:a},styles:a.styles,setting:a.settings,style:o,advanced:a.advanced,parentId:componentsRenderWithParentId.includes(a.tag)?n:null,pageContext:i,...d,rawChildren:a.childrens.map(e=>({...t[e],uid:e,builder:t,components:r,customProps:s,pageContext:i})),children:constant.customRenderChildren.includes(a.tag)?"":WrapRenderChildren({uid:e,customProps:s},a.childrens.map(e=>RenderChildren({uid:e,builder:t,components:r,customProps:s,parentTag:a.tag,pageContext:i})))}),()=>l({builderProps:{uid:e,builderData:a},styles:a.styles,setting:a.settings,advanced:a.advanced,style:o,isText:!!componentTexts.includes(a.tag)||null,parentId:componentsRenderWithParentId.includes(a.tag)?n:null,pageContext:i,...d})):render.template`<div style="${componentIconList.includes(a.tag)?"":o}" class="${a.uid} ${a?.childrens?.length||"IconListItemHoz"!==a.tag?"":"hidden"}">
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var makeStyle=require("../helpers/make-style.js");require("react"),require("react/jsx-runtime"),require("zustand"),require("swr"),require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("vanilla-lazyload"),require("../hooks/useCartUI.js"),require("react-transition-group"),require("@gem-sdk/core");var constant=require("./constant.js"),composeAdvanceStyle=require("../helpers/compose-advance-style.js"),convert=require("../helpers/convert.js"),render=require("../helpers/render.js");const componentsRenderWithParentId=["CarouselItem"],componentTexts=["Text","Heading"],componentIconList=["IconListV2","IconList"],componentUsingAdvanced=["IconList"],Render=({uid:e,builder:t,components:r,parentId:n,extraFiles:s={},pageContext:i,...d})=>{let a=t[e],l=r[a?.tag];if(!l)return console.log("Miss component: ",a),{liquid:"",extraFiles:s};if(!a||a?.type==="section")return{liquid:"",extraFiles:s};{let s={extraFiles:{}},o=composeAdvanceStyle.composeAdvanceStyle(a.advanced,a.tag),c="";c=constant.disableWrap.includes(a.tag)?render.RenderIf(a?.childrens?.length,()=>l({builderProps:{uid:e,builderData:a},styles:a.styles,setting:a.settings,style:o,advanced:a.advanced,parentId:componentsRenderWithParentId.includes(a.tag)?n:null,pageContext:i,...d,rawChildren:a.childrens.map(e=>({...t[e],uid:e,builder:t,components:r,customProps:s,pageContext:i})),children:constant.customRenderChildren.includes(a.tag)?"":WrapRenderChildren({uid:e,customProps:s},a.childrens.map(e=>RenderChildren({uid:e,builder:t,components:r,customProps:s,parentTag:a.tag,pageContext:i})))}),()=>l({builderProps:{uid:e,builderData:a},styles:a.styles,setting:a.settings,advanced:a.advanced,style:o,isText:!!componentTexts.includes(a.tag)||null,parentId:componentsRenderWithParentId.includes(a.tag)?n:null,pageContext:i,...d})):render.template`<div style="${componentIconList.includes(a.tag)?"":o}" class="${a.uid} ${a?.childrens?.length||"IconListItemHoz"!==a.tag?"":"hidden"}">
2
2
  ${render.RenderIf(a?.childrens?.length,()=>l({builderProps:{uid:e,builderData:a},styles:a.styles,setting:a.settings,advanced:{...componentUsingAdvanced.includes(a.tag)?a?.advanced:{},cssClass:a?.advanced?.cssClass},pageContext:i,...d,rawChildren:a.childrens.map(e=>({...t[e],uid:e,builder:t,components:r,customProps:s,pageContext:i})),children:constant.customRenderChildren.includes(a.tag)?"":WrapRenderChildren({uid:e,customProps:s},a.childrens.map(e=>RenderChildren({uid:e,builder:t,components:r,customProps:s,parentTag:a.tag,pageContext:i})))}),()=>l({builderProps:{uid:e,builderData:a},styles:a.styles,setting:a.settings,advanced:{cssClass:a?.advanced?.cssClass},pageContext:i,isText:!!componentTexts.includes(a.tag)||null,style:componentIconList.includes(a.tag)?o:null,...d}))}
3
3
  </div>`;let{cssCode:p,jsCode:u}=RenderCustomCode(a);return p&&(c+=p),u&&(c+=u),{liquid:c=appendAnimation(a,c),extraFiles:s.extraFiles}}},RenderCustomCode=e=>{let{css:t,javascript:r,rootClassName:n}=e.advanced?.editorData||{},s=t?.replaceAll(n,e.uid),i=r?.replaceAll(n,e.uid),d=render.RenderIf(!!t,render.template`
4
4
  <style
@@ -1 +1 @@
1
- "use strict";const RenderIf=(e,t,s)=>e?"string"==typeof t?t:t():("string"==typeof s?s:s?.())??"",isObject=e=>!("object"!=typeof e||Array.isArray(e))&&null!==e,props=(e,...t)=>{let s=t[0],r=[];for(let e in s)if(Object.hasOwnProperty.call(s,e)){let t=s[e];["symbol","object","function"].includes(typeof t)||(t?r.push(`${e}="${t}"`):r.push(`${e}`))}return r.join(" ")},styles=(e,...t)=>{let s=t[0],r=[];for(let e in s)if(Object.hasOwnProperty.call(s,e)){let t=s[e];void 0!==t&&!1!==t&&r.push(`${e}:${t}`)}return r.join(";")},dataStringify=e=>JSON.stringify(e).replace(/\\"/g,'"'),template=(e,...t)=>{let s="";return e.forEach((e,r)=>{s+=e,void 0!==t[r]&&(isObject(t[r])?/style=["|']/.test(e)?s+=styles`${t[r]}`:s+=props`${t[r]}`:s+=t[r])}),s},composeMemo=(e,t)=>e();exports.RenderIf=RenderIf,exports.composeMemo=composeMemo,exports.dataStringify=dataStringify,exports.props=props,exports.styles=styles,exports.template=template;
1
+ "use strict";const RenderIf=(e,t,o)=>e?"string"==typeof t?t:t():("string"==typeof o?o:o?.())??"",isObject=e=>!("object"!=typeof e||Array.isArray(e))&&null!==e,props=(e,...t)=>{let o=t[0],r=[];for(let e in o)if(Object.hasOwnProperty.call(o,e)){let t=o[e];["symbol","object","function"].includes(typeof t)||(t?r.push(`${e}="${t}"`):r.push(`${e}`))}return r.join(" ")},styles=(e,...t)=>{let o=t[0],r=[];for(let e in o)if(Object.hasOwnProperty.call(o,e)){let t=o[e];void 0!==t&&!1!==t&&r.push(`${e}:${t}`)}return r.join(";")},dataStringify=e=>JSON.stringify(e).replace(/\\"/g,'"'),template=(e,...t)=>{let o="";return e.forEach((e,r)=>{o+=e,void 0!==t[r]&&(isObject(t[r])?/style=["|']/.test(e)?o+=styles`${t[r]}`:o+=props`${t[r]}`:o+=t[r])}),o},composeMemo=(e,t)=>e(),removeUndefinedValuesFromObject=e=>(Object.keys(e).forEach(t=>e?.[t]===void 0&&delete e[t]),e);exports.RenderIf=RenderIf,exports.composeMemo=composeMemo,exports.dataStringify=dataStringify,exports.props=props,exports.removeUndefinedValuesFromObject=removeUndefinedValuesFromObject,exports.styles=styles,exports.template=template;
@@ -1 +1 @@
1
- "use strict";var react=require("react"),useAnimationConfig=require("./useAnimationConfig.js");const SPACING_ACTIVE_ATTRIBUTE="data-spacing",TOOLBAR_ACTIVE_ATTRIBUTE="data-toolbar-active",OUTLINE_ACTIVE_ATTRIBUTE="data-outline-active",TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE="data-toolbar-add-active",useAnimationTarget=t=>{let{isEnabledAnimation:e}=useAnimationConfig.useAnimationConfig(t),r=t.tag,a=t.uid,o=react.useRef(null),u=react.useRef([]),T=t=>{if(u.current)for(let e of u.current)t?(e.toolbar?.setAttribute(TOOLBAR_ACTIVE_ATTRIBUTE,"true"),e.outline?.setAttribute(OUTLINE_ACTIVE_ATTRIBUTE,"true"),e.spacing?.setAttribute(SPACING_ACTIVE_ATTRIBUTE,"true"),e.addSectionTop?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true"),e.addSectionBottom?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true")):(e.toolbar?.removeAttribute(TOOLBAR_ACTIVE_ATTRIBUTE),e.outline?.removeAttribute(OUTLINE_ACTIVE_ATTRIBUTE),e.spacing?.removeAttribute(SPACING_ACTIVE_ATTRIBUTE),e.addSectionTop?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE),e.addSectionBottom?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE))},i=t=>{let e=t.querySelector("[data-toolbar-add-top]"),r=t.querySelector("[data-toolbar-add-bottom]"),a=Array.from(t.children),o=a.find(t=>null!==t.getAttribute("data-toolbar")),u=a.find(t=>null!==t.getAttribute("data-outline"));return{sectionToolbar:o,sectionOutline:u,sectionAddTop:e,sectionAddBottom:r}},n=react.useCallback(t=>t.reduce((t,e)=>{let a=null,o=null,u=e,T=e.querySelector("[data-toolbar][data-toolbar-active]"),n=e.querySelector("[data-outline][data-outline-active]"),A=Array.from(u.children),c=A.find(t=>null!==t.getAttribute("data-spacing"));switch(r){case"Button":case"SubmitButton":case"ProductButton":case"DynamicCheckout":u=e.querySelector(".gp-button-base");break;case"ProductProperties":u=e.querySelector("input");break;case"Icon":u=e.firstElementChild;break;case"ProductTag":u=e?.children[0]?.children[0];break;case"Section":{u=e;let{sectionOutline:t,sectionToolbar:r,sectionAddTop:A,sectionAddBottom:c}=i(u);n=t,T=r,a=A,o=c;break}default:u=e}let l={target:u,toolbar:T,outline:n,spacing:c,addSectionTop:a,addSectionBottom:o};return t.push(l),t},[]),[r]),A=react.useCallback(()=>{if(!e)return;o.current||(o.current=document.querySelectorAll(`[data-uid="${a}"]`));let t=Array.from(o.current);if(!t.length)return;let r=n(t);u.current=r},[a,n,e]);return{targetObjects:u,setToolbarActive:T,initListOfTargets:A}};exports.useAnimationTarget=useAnimationTarget;
1
+ "use strict";var react=require("react"),useAnimationConfig=require("./useAnimationConfig.js");const SPACING_ACTIVE_ATTRIBUTE="data-spacing-margin-bottom-active",TOOLBAR_ACTIVE_ATTRIBUTE="data-toolbar-active",OUTLINE_ACTIVE_ATTRIBUTE="data-outline-active",TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE="data-toolbar-add-active",useAnimationTarget=t=>{let{isEnabledAnimation:e}=useAnimationConfig.useAnimationConfig(t),r=t.tag,a=t.uid,o=react.useRef(null),u=react.useRef([]),T=t=>{if(u.current)for(let e of u.current)t?(e.toolbar?.setAttribute(TOOLBAR_ACTIVE_ATTRIBUTE,"true"),e.outline?.setAttribute(OUTLINE_ACTIVE_ATTRIBUTE,"true"),e.spacing?.setAttribute(SPACING_ACTIVE_ATTRIBUTE,"true"),e.addSectionTop?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true"),e.addSectionBottom?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true")):(e.toolbar?.removeAttribute(TOOLBAR_ACTIVE_ATTRIBUTE),e.outline?.removeAttribute(OUTLINE_ACTIVE_ATTRIBUTE),e.spacing?.removeAttribute(SPACING_ACTIVE_ATTRIBUTE),e.addSectionTop?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE),e.addSectionBottom?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE))},i=t=>{let e=t.querySelector("[data-toolbar-add-top]"),r=t.querySelector("[data-toolbar-add-bottom]"),a=Array.from(t.children),o=a.find(t=>null!==t.getAttribute("data-toolbar")),u=a.find(t=>null!==t.getAttribute("data-outline"));return{sectionToolbar:o,sectionOutline:u,sectionAddTop:e,sectionAddBottom:r}},n=react.useCallback(t=>t.reduce((t,e)=>{let a=null,o=null,u=e,T=e.querySelector("[data-toolbar][data-toolbar-active]"),n=e.querySelector("[data-outline][data-outline-active]"),A=Array.from(u.children),c=A.find(t=>{let e=t.getAttribute("data-spacing");return null!==e&&t.querySelector("[data-spacing-margin-bottom")});switch(r){case"Button":case"SubmitButton":case"ProductButton":case"DynamicCheckout":u=e.querySelector(".gp-button-base");break;case"ProductProperties":u=e.querySelector("input");break;case"Icon":u=e.firstElementChild;break;case"ProductTag":u=e?.children[0]?.children[0];break;case"Section":{u=e;let{sectionOutline:t,sectionToolbar:r,sectionAddTop:A,sectionAddBottom:c}=i(u);n=t,T=r,a=A,o=c;break}default:u=e}let l={target:u,toolbar:T,outline:n,spacing:c,addSectionTop:a,addSectionBottom:o};return t.push(l),t},[]),[r]),A=react.useCallback(()=>{if(!e)return;o.current||(o.current=document.querySelectorAll(`[data-uid="${a}"]`));let t=Array.from(o.current);if(!t.length)return;let r=n(t);u.current=r},[a,n,e]);return{targetObjects:u,setToolbarActive:T,initListOfTargets:A}};exports.useAnimationTarget=useAnimationTarget;
@@ -1 +1 @@
1
- "use strict";require("react"),require("react/jsx-runtime"),require("zustand"),require("swr"),require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("vanilla-lazyload"),require("./useCartUI.js"),require("react-transition-group"),require("@gem-sdk/core");var animations=require("../helpers/animations.js");require("../helpers/convert.js");const useAnimations=()=>{let{zoom:e,shake:r,fade:i,slide:s}=animations.animations();return{zoom:e,shake:r,fade:i,slide:s}};exports.useAnimations=useAnimations;
1
+ "use strict";var animations=require("../helpers/animations.js");require("react"),require("react/jsx-runtime"),require("zustand"),require("swr"),require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("vanilla-lazyload"),require("./useCartUI.js"),require("react-transition-group"),require("@gem-sdk/core"),require("../helpers/convert.js");const useAnimations=()=>{let{zoom:e,shake:r,fade:i,slide:s}=animations.animations();return{zoom:e,shake:r,fade:i,slide:s}};exports.useAnimations=useAnimations;
@@ -1 +1 @@
1
- "use strict";var react=require("react"),ProductContext=require("../contexts/ProductContext.js"),flattenConnection=require("../helpers/flatten-connection.js");require("react/jsx-runtime"),require("zustand"),require("swr");var PageContext=require("../contexts/PageContext.js");require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("vanilla-lazyload"),require("./useCartUI.js");var variant=require("../helpers/variant.js");require("react-transition-group"),require("@gem-sdk/core");var product=require("../helpers/product.js");require("../helpers/convert.js");const useUniqProductID=()=>ProductContext.useProductStore(e=>e.uiqueId),useProduct=()=>ProductContext.useProductStore(e=>e.product),useFeaturedImageGlobal=()=>ProductContext.useProductStore(e=>e.featuredImageGlobal),useProductProperties=()=>ProductContext.useProductStore(e=>e.properties),useIsSyncProduct=()=>ProductContext.useProductStore(e=>e.isSyncProduct),useQuantity=()=>{let e=ProductContext.useProductStore(e=>e.quantity),t=ProductContext.useProductStore(e=>e.updatePrice),r=ProductContext.useProductStore(e=>e.decrementQuantity),u=ProductContext.useProductStore(e=>e.incrementQuantity),o=ProductContext.useProductStore(e=>e.setQuantity),n=ProductContext.useProductStore(e=>e.setHasUpdatePriceFollowQuantity),s=ProductContext.useProductStore(e=>e.isSyncProduct),c=ProductContext.useProductStore(e=>e.product),a=c?.id,i=react.useCallback(()=>{o(1)},[o]);return react.useEffect(()=>{if(s){let t=new CustomEvent("set-product-quantity",{bubbles:!0,cancelable:!0,composed:!0,detail:{quantity:e,productId:a}});window.dispatchEvent(t)}},[e,s,a]),react.useMemo(()=>({quantity:e,hasUpdatePrice:t,increment:u,decrement:r,reset:i,setQuantity:o,setUpdatePrice:n}),[r,u,e,i,o,n,t])},useSelectedOption=()=>{let e=ProductContext.useProductStore(e=>e.setSelectedOption),t=ProductContext.useProductStore(e=>e.selectedOptions),r=ProductContext.useProductStore(e=>e.forceSelectedOption),u=ProductContext.useProductStore(e=>e.isSyncProduct),o=react.useCallback((t,r,o,n)=>{if(!n&&u){let e=new CustomEvent("set-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{optionId:t,optionValue:r,productId:o}});window.dispatchEvent(e)}e(t,r)},[e,u]),n=react.useCallback((e,t,o)=>{if(!o&&u){let r=new CustomEvent("force-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{selectedOption:e,productId:t}});window.dispatchEvent(r)}r(e)},[r,u]);return react.useMemo(()=>({selectedOptions:t,setSelectedOption:o,forceSelectedOption:n}),[t,o,n])},useVariants=()=>{let e=ProductContext.useProductStore(e=>e.product?.variants);return flattenConnection.flattenConnection(e)},useVariant=e=>{let t=useVariants();return react.useMemo(()=>t?.find(t=>t?.id===e),[e,t])},useCurrentVariant=()=>{let{selectedOptions:e}=useSelectedOption(),t=useVariants();return react.useMemo(()=>product.getSelectedVariant(t,e),[e,t])},useCurrentVariantInStock=()=>{let e=useCurrentVariant(),t=useVariants();return variant.checkInStock(e,t)},useVariantOutStock=(e,t,r)=>{let{selectedOptions:u}=useSelectedOption(),o=useVariants(),n=r.optionNumber-1;if(r.position<n)return o.some(r=>{if(r){let{selectedOptions:u}=r,o=u?.some(r=>r?.name===e&&r.value===t),n=variant.checkInStock(r);return o&&n}});let s=product.getSelectedVariant(o,{...u,[e]:t});return variant.checkInStock(s)},useCheckAvailableVariantInStock=(e,t)=>{let r=useVariants();return!!r&&r.some(r=>{if(r){let{selectedOptions:u}=r,o=u?.some(r=>r?.name===e&&r.value===t),n=variant.checkInStock(r);return o&&n}return!1})},useProductOfferDiscount=()=>{let e=PageContext.usePageStore(e=>e.productOffers),t=useProduct(),r=useCurrentVariant(),u=e?.find(e=>e?.node?.objectBaseID===t?.baseID)?.node;if(!u||!u.isEnabled)return 0;let o=u?.value;if(u&&"PERCENTAGE"===u.valueType&&o){let e=r?.price||0;o=o*e/100}return o||0};exports.useCheckAvailableVariantInStock=useCheckAvailableVariantInStock,exports.useCurrentVariant=useCurrentVariant,exports.useCurrentVariantInStock=useCurrentVariantInStock,exports.useFeaturedImageGlobal=useFeaturedImageGlobal,exports.useIsSyncProduct=useIsSyncProduct,exports.useProduct=useProduct,exports.useProductOfferDiscount=useProductOfferDiscount,exports.useProductProperties=useProductProperties,exports.useQuantity=useQuantity,exports.useSelectedOption=useSelectedOption,exports.useUniqProductID=useUniqProductID,exports.useVariant=useVariant,exports.useVariantOutStock=useVariantOutStock,exports.useVariants=useVariants;
1
+ "use strict";var react=require("react"),ProductContext=require("../contexts/ProductContext.js");require("react/jsx-runtime"),require("zustand"),require("swr");var PageContext=require("../contexts/PageContext.js");require("@gem-sdk/adapter-shopify"),require("swr/mutation"),require("vanilla-lazyload"),require("./useCartUI.js");var variant=require("../helpers/variant.js");require("react-transition-group"),require("@gem-sdk/core");var flattenConnection=require("../helpers/flatten-connection.js");require("../helpers/convert.js");var product=require("../helpers/product.js");const useUniqProductID=()=>ProductContext.useProductStore(e=>e.uiqueId),useProduct=()=>ProductContext.useProductStore(e=>e.product),useFeaturedImageGlobal=()=>ProductContext.useProductStore(e=>e.featuredImageGlobal),useProductProperties=()=>ProductContext.useProductStore(e=>e.properties),useIsSyncProduct=()=>ProductContext.useProductStore(e=>e.isSyncProduct),useQuantity=()=>{let e=ProductContext.useProductStore(e=>e.quantity),t=ProductContext.useProductStore(e=>e.updatePrice),r=ProductContext.useProductStore(e=>e.decrementQuantity),u=ProductContext.useProductStore(e=>e.incrementQuantity),o=ProductContext.useProductStore(e=>e.setQuantity),n=ProductContext.useProductStore(e=>e.setHasUpdatePriceFollowQuantity),s=ProductContext.useProductStore(e=>e.isSyncProduct),a=ProductContext.useProductStore(e=>e.product),c=a?.id,i=react.useCallback(()=>{o(1)},[o]);return react.useEffect(()=>{if(s){let t=new CustomEvent("set-product-quantity",{bubbles:!0,cancelable:!0,composed:!0,detail:{quantity:e,productId:c}});window.dispatchEvent(t)}},[e,s,c]),react.useMemo(()=>({quantity:e,hasUpdatePrice:t,increment:u,decrement:r,reset:i,setQuantity:o,setUpdatePrice:n}),[r,u,e,i,o,n,t])},useSelectedOption=()=>{let e=ProductContext.useProductStore(e=>e.setSelectedOption),t=ProductContext.useProductStore(e=>e.selectedOptions),r=ProductContext.useProductStore(e=>e.forceSelectedOption),u=ProductContext.useProductStore(e=>e.isSyncProduct),o=react.useCallback((t,r,o,n)=>{if(!n&&u){let e=new CustomEvent("set-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{optionId:t,optionValue:r,productId:o}});window.dispatchEvent(e)}e(t,r)},[e,u]),n=react.useCallback((e,t,o)=>{if(!o&&u){let r=new CustomEvent("force-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{selectedOption:e,productId:t}});window.dispatchEvent(r)}r(e)},[r,u]);return react.useMemo(()=>({selectedOptions:t,setSelectedOption:o,forceSelectedOption:n}),[t,o,n])},useVariants=()=>{let e=ProductContext.useProductStore(e=>e.product?.variants);return flattenConnection.flattenConnection(e)},useVariant=e=>{let t=useVariants();return react.useMemo(()=>t?.find(t=>t?.id===e),[e,t])},useCurrentVariant=()=>{let{selectedOptions:e}=useSelectedOption(),t=useVariants();return react.useMemo(()=>product.getSelectedVariant(t,e),[e,t])},useCurrentVariantInStock=()=>{let e=useCurrentVariant(),t=useVariants();return variant.checkInStock(e,t)},useVariantOutStock=(e,t,r)=>{let{selectedOptions:u}=useSelectedOption(),o=useVariants(),n=r.optionNumber-1;if(r.position<n)return o.some(r=>{if(r){let{selectedOptions:u}=r,o=u?.some(r=>r?.name===e&&r.value===t),n=variant.checkInStock(r);return o&&n}});let s=product.getSelectedVariant(o,{...u,[e]:t});return variant.checkInStock(s)},useCheckAvailableVariantInStock=(e,t)=>{let r=useVariants();return!!r&&r.some(r=>{if(r){let{selectedOptions:u}=r,o=u?.some(r=>r?.name===e&&r.value===t),n=variant.checkInStock(r);return o&&n}return!1})},useProductOfferDiscount=()=>{let e=PageContext.usePageStore(e=>e.productOffers),t=useProduct(),r=useCurrentVariant(),u=e?.find(e=>e?.node?.objectBaseID===t?.baseID)?.node;if(!u||!u.isEnabled)return 0;let o=u?.value;if(u&&"PERCENTAGE"===u.valueType&&o){let e=r?.price||0;o=o*e/100}return o||0};exports.useCheckAvailableVariantInStock=useCheckAvailableVariantInStock,exports.useCurrentVariant=useCurrentVariant,exports.useCurrentVariantInStock=useCurrentVariantInStock,exports.useFeaturedImageGlobal=useFeaturedImageGlobal,exports.useIsSyncProduct=useIsSyncProduct,exports.useProduct=useProduct,exports.useProductOfferDiscount=useProductOfferDiscount,exports.useProductProperties=useProductProperties,exports.useQuantity=useQuantity,exports.useSelectedOption=useSelectedOption,exports.useUniqProductID=useUniqProductID,exports.useVariant=useVariant,exports.useVariantOutStock=useVariantOutStock,exports.useVariants=useVariants;
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var AddOn=require("./components/AddOn.js"),Render=require("./components/Render.js"),RenderPreview=require("./components/RenderPreview.js"),Render_liquid=require("./components/Render.liquid.js"),AddonContext=require("./contexts/AddonContext.js"),BuilderComponent=require("./contexts/BuilderComponent.js"),BuilderContext=require("./contexts/BuilderContext.js"),BuilderPreviewContext=require("./contexts/BuilderPreviewContext.js"),CartLineContext=require("./contexts/CartLineContext.js"),ProductListContext=require("./contexts/ProductListContext.js"),ProductContext=require("./contexts/ProductContext.js"),SectionContext=require("./contexts/SectionContext.js"),ShopContext=require("./contexts/ShopContext.js"),PageContext=require("./contexts/PageContext.js"),CollectionContext=require("./contexts/CollectionContext.js"),ModalContext=require("./contexts/ModalContext.js"),pageViewUp_generated=require("./graphql/mutations/page-view-up.generated.js"),collectionDetailFilter_generated=require("./graphql/queries/collection-detail-filter.generated.js"),collection_generated=require("./graphql/queries/collection.generated.js"),collections_generated=require("./graphql/queries/collections.generated.js"),publishedThemePages_generated=require("./graphql/queries/published-theme-pages.generated.js"),products_generated=require("./graphql/queries/products.generated.js"),storeProperty_generated=require("./graphql/queries/store-property.generated.js"),previewPage_generated=require("./graphql/queries/preview-page.generated.js"),LibraryTemplate_generated=require("./graphql-app-api/queries/LibraryTemplate.generated.js"),ThemePage_generated=require("./graphql-app-api/queries/ThemePage.generated.js"),SaleFunnelDiscounts_generated=require("./graphql-app-api/queries/SaleFunnelDiscounts.generated.js"),borders=require("./helpers/borders.js"),carousel=require("./helpers/carousel.js"),cls=require("./helpers/cls.js"),flattenConnection=require("./helpers/flatten-connection.js"),getResonsiveValue=require("./helpers/get-resonsive-value.js"),getShortname=require("./helpers/get-shortname.js"),GlobalEvent=require("./helpers/GlobalEvent.js"),isBrowser=require("./helpers/is-browser.js"),isSafari=require("./helpers/is-safari.js"),isEmptyChildren=require("./helpers/is-empty-children.js"),filterToolbarPreview=require("./helpers/filter-toolbar-preview.js"),animations=require("./helpers/animations.js"),makeStyle=require("./helpers/make-style.js"),normalizeBuilderData=require("./helpers/normalize-builder-data.js"),prefetchQueries=require("./helpers/prefetch-queries.js"),spacing=require("./helpers/spacing.js"),loadScript=require("./helpers/load-script.js"),email=require("./helpers/email.js"),cssVariable=require("./helpers/css-variable.js"),layout=require("./helpers/layout.js"),isDefined=require("./helpers/is-defined.js"),colors=require("./helpers/colors.js"),typography=require("./helpers/typography.js"),radius=require("./helpers/radius.js"),product=require("./helpers/product.js"),fpixel=require("./helpers/tracking/fpixel.js"),gtag=require("./helpers/tracking/gtag.js"),tiktokpixel=require("./helpers/tracking/tiktokpixel.js"),render=require("./helpers/render.js"),convert=require("./helpers/convert.js"),size=require("./helpers/size.js"),shadow=require("./helpers/shadow.js"),background=require("./helpers/background.js"),query=require("./helpers/query.js"),composeAdvanceStyle=require("./helpers/compose-advance-style.js"),iconList=require("./helpers/icon-list.js"),covertEntitiesHtml=require("./helpers/covert-entities-html.js"),useAddToCart=require("./hooks/cart/use-add-to-cart.js"),useCartData=require("./hooks/cart/use-cart-data.js"),useCartDiscountCodesUpdate=require("./hooks/cart/use-cart-discount-codes-update.js"),useCartNoteUpdate=require("./hooks/cart/use-cart-note-update.js"),useCreateCart=require("./hooks/cart/use-create-cart.js"),useRemoveCartItem=require("./hooks/cart/use-remove-cart-item.js"),useUpdateCartItem=require("./hooks/cart/use-update-cart-item.js"),shop=require("./hooks/shop.js"),useCollectionQuery=require("./hooks/shop/use-collection-query.js"),useCollectionsQuery=require("./hooks/shop/use-collections-query.js"),useProductQuery=require("./hooks/shop/use-product-query.js"),useProductsQuery=require("./hooks/shop/use-products-query.js"),useCurrentDevice=require("./hooks/use-current-device.js"),useFormatMoney=require("./hooks/useFormatMoney.js"),useLazyVideo=require("./hooks/use-lazy-video.js"),useCartId=require("./hooks/useCartId.js"),useCartLine=require("./hooks/useCartLine.js"),useCartUI=require("./hooks/useCartUI.js"),useCollection=require("./hooks/useCollection.js"),react=require("react"),useIsomorphicLayoutEffect=require("./hooks/useIsomorphicLayoutEffect.js"),useLoadScript=require("./hooks/useLoadScript.js"),useMoney=require("./hooks/useMoney.js"),usePrevious=require("./hooks/usePrevious.js"),useProduct=require("./hooks/useProduct.js"),useProductList=require("./hooks/useProductList.js"),useSuspenseFetch=require("./hooks/useSuspenseFetch.js"),useSwatchesOptions=require("./hooks/useSwatchesOptions.js"),useInitialSwatchesOptions=require("./hooks/useInitialSwatchesOptions.js"),shop$1=require("./types/shop.js"),appAPI=require("./types/appAPI.js"),globalStyle=require("./types/global-style.js"),animations$1=require("./types/animations.js"),getCollection=require("./helpers/queries/get-collection.js"),getProduct=require("./helpers/queries/get-product.js"),getProductBySlug=require("./helpers/queries/get-product-by-slug.js");exports.AddOn=AddOn.default,exports.Render=Render.default,exports.RenderPreview=RenderPreview.default,exports.RenderChildren=Render_liquid.RenderChildren,exports.RenderLiquid=Render_liquid.default,exports.WrapRenderChildren=Render_liquid.WrapRenderChildren,exports.AddonProvider=AddonContext.AddonProvider,exports.useAddon=AddonContext.useAddon,exports.useAddons=AddonContext.useAddons,exports.BuilderComponentProvider=BuilderComponent.BuilderComponentProvider,exports.useBuilderComponent=BuilderComponent.useBuilderComponent,exports.BuilderProvider=BuilderContext.BuilderProvider,exports.useBuilderStore=BuilderContext.useBuilderStore,exports.BuilderPreviewProvider=BuilderPreviewContext.BuilderPreviewProvider,exports.useBuilderPreviewStore=BuilderPreviewContext.useBuilderPreviewStore,exports.CartLineProvider=CartLineContext.CartLineProvider,exports.useCartLineStore=CartLineContext.useCartLineStore,exports.ProductListProvider=ProductListContext.ProductListProvider,exports.useProductListStore=ProductListContext.useProductListStore,exports.ProductProvider=ProductContext.ProductProvider,exports.useProductStore=ProductContext.useProductStore,exports.SectionProvider=SectionContext.SectionProvider,exports.useSection=SectionContext.useSection,exports.useSectionStore=SectionContext.useSectionStore,exports.ShopProvider=ShopContext.ShopProvider,exports.useShopStore=ShopContext.useShopStore,exports.PageProvider=PageContext.PageProvider,exports.usePageStore=PageContext.usePageStore,exports.CollectionProvider=CollectionContext.CollectionProvider,exports.useCollectionStore=CollectionContext.useCollectionStore,exports.ModalProvider=ModalContext.ModalProvider,exports.useModalStore=ModalContext.useModalStore,exports.PageViewUpDocument=pageViewUp_generated.PageViewUpDocument,exports.CollectionDetailFilterDocument=collectionDetailFilter_generated.CollectionDetailFilterDocument,exports.CollectionDocument=collection_generated.CollectionDocument,exports.CollectionsDocument=collections_generated.CollectionsDocument,exports.PublishedThemePagesDocument=publishedThemePages_generated.PublishedThemePagesDocument,exports.ProductsDocument=products_generated.ProductsDocument,exports.StorePropertyDocument=storeProperty_generated.StorePropertyDocument,exports.PreviewPageDocument=previewPage_generated.PreviewPageDocument,exports.LibraryTemplateDocument=LibraryTemplate_generated.LibraryTemplateDocument,exports.ThemePageDocument=ThemePage_generated.ThemePageDocument,exports.SaleFunnelDiscountsDocument=SaleFunnelDiscounts_generated.SaleFunnelDiscountsDocument,exports.composeBorderCss=borders.composeBorderCss,exports.getBorderStyle=borders.getBorderStyle,exports.handleConvertBorderColor=borders.handleConvertBorderColor,exports.handleConvertBorderStyle=borders.handleConvertBorderStyle,exports.handleConvertBorderWidth=borders.handleConvertBorderWidth,exports.handleConvertClassColor=borders.handleConvertClassColor,exports.handleConvertClassColorDynamicBtn=borders.handleConvertClassColorDynamicBtn,exports.getCarouselContainerHeight=carousel.getCarouselContainerHeight,exports.makeContainerWidthOrHeight=carousel.makeContainerWidthOrHeight,exports.makeDotGapToCarouselStyle=carousel.makeDotGapToCarouselStyle,exports.cls=cls.cls,exports.flattenConnection=flattenConnection.flattenConnection,exports.getResponsiveStateValue=getResonsiveValue.getResponsiveStateValue,exports.getResponsiveValue=getResonsiveValue.getResponsiveValue,exports.getResponsiveValueByScreen=getResonsiveValue.getResponsiveValueByScreen,exports.isColumnDirectionExist=getResonsiveValue.isColumnDirectionExist,exports.getShortName=getShortname.getShortName,exports.globalEvent=GlobalEvent.default,exports.isBrowser=isBrowser.default,exports.isSafari=isSafari.default,exports.isEmptyChildren=isEmptyChildren.isEmptyChildren,exports.filterToolbarPreview=filterToolbarPreview.filterToolbarPreview,exports.animations=animations.animations,exports.makeAspectRatio=makeStyle.makeAspectRatio,exports.makeGlobalSizeHeightResponsive=makeStyle.makeGlobalSizeHeightResponsive,exports.makeGlobalSizeWidthResponsive=makeStyle.makeGlobalSizeWidthResponsive,exports.makeHeight=makeStyle.makeHeight,exports.makeLineClamp=makeStyle.makeLineClamp,exports.makeStyle=makeStyle.makeStyle,exports.makeStyleKey=makeStyle.makeStyleKey,exports.makeStyleResponsive=makeStyle.makeStyleResponsive,exports.makeStyleResponsiveByScreen=makeStyle.makeStyleResponsiveByScreen,exports.makeStyleResponsiveState=makeStyle.makeStyleResponsiveState,exports.makeStyleState=makeStyle.makeStyleState,exports.makeWidth=makeStyle.makeWidth,exports.removeNullUndefined=makeStyle.removeNullUndefined,exports.normalizeBuilderData=normalizeBuilderData.normalizeBuilderData,exports.prefetchQueries=prefetchQueries.prefetchQueries,exports.composeSpacing=spacing.composeSpacing,exports.getSpacingVariable=spacing.getSpacingVariable,exports.loadScript=loadScript.loadScript,exports.validateEmail=email.validateEmail,exports.genVariable=cssVariable.genVariable,exports.composeGridLayout=layout.composeGridLayout,exports.convertOldLayout=layout.convertOldLayout,exports.gridToArrayRegex=layout.gridToArrayRegex,exports.optionLayoutStyle=layout.optionLayoutStyle,exports.isDefined=isDefined.isDefined,exports.composeTextColorCss=colors.composeTextColorCss,exports.getGlobalColorCSSProp=colors.getGlobalColorCSSProp,exports.getGlobalColorClass=colors.getGlobalColorClass,exports.getGlobalColorResponsiveClass=colors.getGlobalColorResponsiveClass,exports.getGlobalColorResponsiveStyle=colors.getGlobalColorResponsiveStyle,exports.getGlobalColorStateClass=colors.getGlobalColorStateClass,exports.getGlobalColorStateClassDynamicBtn=colors.getGlobalColorStateClassDynamicBtn,exports.getGlobalColorStateResponsiveClass=colors.getGlobalColorStateResponsiveClass,exports.getGlobalColorStateResponsiveClassDynamicBtn=colors.getGlobalColorStateResponsiveClassDynamicBtn,exports.getGlobalColorStateResponsiveStyle=colors.getGlobalColorStateResponsiveStyle,exports.getGlobalColorStateStyle=colors.getGlobalColorStateStyle,exports.getGlobalColorStyle=colors.getGlobalColorStyle,exports.getSingleColorVariable=colors.getSingleColorVariable,exports.isColor=colors.isColor,exports.composeFallbackTypographyStyle=typography.composeFallbackTypographyStyle,exports.composeTypography=typography.composeTypography,exports.composeTypographyAttr=typography.composeTypographyAttr,exports.composeTypographyClassName=typography.composeTypographyClassName,exports.composeTypographyCss=typography.composeTypographyCss,exports.composeTypographyStyle=typography.composeTypographyStyle,exports.composeTypographyV2=typography.composeTypographyV2,exports.composeTypographyV2Css=typography.composeTypographyV2Css,exports.genTypoClass=typography.genTypoClass,exports.composeCornerCss=radius.composeCornerCss,exports.composeRadius=radius.composeRadius,exports.composeRadiusResponsive=radius.composeRadiusResponsive,exports.getCornerCSSFromGlobal=radius.getCornerCSSFromGlobal,exports.getCustomRadius=radius.getCustomRadius,exports.getRadiusCSSFromGlobal=radius.getRadiusCSSFromGlobal,exports.getRadiusStyleActiveState=radius.getRadiusStyleActiveState,exports.checkAvailableVariantInStock=product.checkAvailableVariantInStock,exports.getSelectedVariant=product.getSelectedVariant,exports.parseSelectedOption=product.parseSelectedOption,exports.fpixel=fpixel,exports.gtag=gtag,exports.tiktokpixel=tiktokpixel,exports.RenderIf=render.RenderIf,exports.composeMemo=render.composeMemo,exports.dataStringify=render.dataStringify,exports.props=render.props,exports.styles=render.styles,exports.template=render.template,exports.baseAssetURL=convert.baseAssetURL,exports.isLocalEnv=convert.isLocalEnv,exports.composeSize=size.composeSize,exports.composeSizeCss=size.composeSizeCss,exports.genSizeClass=size.genSizeClass,exports.getAspectRatioGlobalSize=size.getAspectRatioGlobalSize,exports.getGlobalSizeGap=size.getGlobalSizeGap,exports.getHeightByShapeGlobalSize=size.getHeightByShapeGlobalSize,exports.getPaddingGlobalSize=size.getPaddingGlobalSize,exports.getWidthByShapeGlobalSize=size.getWidthByShapeGlobalSize,exports.getWidthHeightGlobalSize=size.getWidthHeightGlobalSize,exports.makeGlobalSize=size.makeGlobalSize,exports.makeStyleWithDefault=size.makeStyleWithDefault,exports.composeShadowCss=shadow.composeShadowCss,exports.getStyleShadow=shadow.getStyleShadow,exports.getStyleShadowState=shadow.getStyleShadowState,exports.parseValueWithUnit=shadow.parseValueWithUnit,exports.GRADIENT_BGR_KEY=background.GRADIENT_BGR_KEY,exports.composeBackgroundCss=background.composeBackgroundCss,exports.getBgImageByDevice=background.getBgImageByDevice,exports.getGradientBgrStyleByDevice=background.getGradientBgrStyleByDevice,exports.getGradientBgrStyleForButton=background.getGradientBgrStyleForButton,exports.getStyleBackgroundByDevice=background.getStyleBackgroundByDevice,exports.makeFixedBgAttachment=background.makeFixedBgAttachment,exports.generateCollectionQueryKey=query.generateCollectionQueryKey,exports.generateProductQueryKey=query.generateProductQueryKey,exports.generateProductsQueryKey=query.generateProductsQueryKey,exports.composeAdvanceStyle=composeAdvanceStyle.composeAdvanceStyle,exports.composeAdvanceStyleForPostPurchase=composeAdvanceStyle.composeAdvanceStyleForPostPurchase,exports.filterAttrInStyle=composeAdvanceStyle.filterAttrInStyle,exports.filterCornerInStyle=composeAdvanceStyle.filterCornerInStyle,exports.removeAttrInStyle=composeAdvanceStyle.removeAttrInStyle,exports.removePaddingYInStyle=composeAdvanceStyle.removePaddingYInStyle,exports.splitStyle=composeAdvanceStyle.splitStyle,exports.composePositionLineHeight=iconList.composePositionLineHeight,exports.composePostionIconList=iconList.composePostionIconList,exports.convertHTML=covertEntitiesHtml.convertHTML,exports.useAddToCart=useAddToCart.useAddToCart,exports.useCartData=useCartData.useCartData,exports.useCartDiscountCodesUpdate=useCartDiscountCodesUpdate.useCartDiscountCodesUpdate,exports.useCartNoteUpdate=useCartNoteUpdate.useCartNoteUpdate,exports.useCreateCart=useCreateCart.useCreateCart,exports.useRemoveCartItem=useRemoveCartItem.useRemoveCartItem,exports.useUpdateCartItem=useUpdateCartItem.useUpdateCartItem,exports.useCheckoutUrl=shop.useCheckoutUrl,exports.useConnectedShopify=shop.useConnectedShopify,exports.useCurrency=shop.useCurrency,exports.useEditorMode=shop.useEditorMode,exports.useIsSampleProduct=shop.useIsSampleProduct,exports.useIsStorefrontProduct=shop.useIsStorefrontProduct,exports.useLocale=shop.useLocale,exports.useMatchMutate=shop.useMatchMutate,exports.useMobileOnly=shop.useMobileOnly,exports.useMoneyFormat=shop.useMoneyFormat,exports.usePageType=shop.usePageType,exports.usePluginEnable=shop.usePluginEnable,exports.useStoreFront=shop.useStoreFront,exports.useSwatches=shop.useSwatches,exports.useCollectionQuery=useCollectionQuery.useCollectionQuery,exports.useCollectionsQuery=useCollectionsQuery.useCollectionsQuery,exports.useProductQuery=useProductQuery.useProductQuery,exports.useProductsQuery=useProductsQuery.useProductsQuery,exports.useProductsQueryAll=useProductsQuery.useProductsQueryAll,exports.useCurrentDevice=useCurrentDevice.useCurrentDevice,exports.shopifyPriceRounding=useFormatMoney.shopifyPriceRounding,exports.useFormatMoney=useFormatMoney.useFormatMoney,exports.useLazyVideo=useLazyVideo.useLazyVideo,exports.useCartId=useCartId.default,exports.useCartLine=useCartLine.default,exports.useCartUI=useCartUI.default,exports.useCollection=useCollection.useCollection,Object.defineProperty(exports,"useId",{enumerable:!0,get:function(){return react.useId}}),exports.useIsomorphicLayoutEffect=useIsomorphicLayoutEffect.default,exports.useLoadScript=useLoadScript.default,exports.useMoney=useMoney.default,exports.usePrevious=usePrevious.usePrevious,exports.useCheckAvailableVariantInStock=useProduct.useCheckAvailableVariantInStock,exports.useCurrentVariant=useProduct.useCurrentVariant,exports.useCurrentVariantInStock=useProduct.useCurrentVariantInStock,exports.useFeaturedImageGlobal=useProduct.useFeaturedImageGlobal,exports.useIsSyncProduct=useProduct.useIsSyncProduct,exports.useProduct=useProduct.useProduct,exports.useProductOfferDiscount=useProduct.useProductOfferDiscount,exports.useProductProperties=useProduct.useProductProperties,exports.useQuantity=useProduct.useQuantity,exports.useSelectedOption=useProduct.useSelectedOption,exports.useUniqProductID=useProduct.useUniqProductID,exports.useVariant=useProduct.useVariant,exports.useVariantOutStock=useProduct.useVariantOutStock,exports.useVariants=useProduct.useVariants,exports.useProductList=useProductList.useProductList,exports.useProductListProducts=useProductList.useProductListProducts,exports.useProductListSettings=useProductList.useProductListSettings,exports.useProductListStyles=useProductList.useProductListStyles,exports.useSuspenseFetch=useSuspenseFetch.default,exports.useSwatchesOptions=useSwatchesOptions.default,exports.useInitialSwatchesOptions=useInitialSwatchesOptions.default,exports.ShopType=shop$1,exports.AppAPIType=appAPI,exports.OptionNormalStyle=globalStyle.OptionNormalStyle,exports.OptionSpecialStyle=globalStyle.OptionSpecialStyle,Object.defineProperty(exports,"AnimationDirectionType",{enumerable:!0,get:function(){return animations$1.AnimationDirectionType}}),Object.defineProperty(exports,"AnimationEasingType",{enumerable:!0,get:function(){return animations$1.AnimationEasingType}}),Object.defineProperty(exports,"AnimationSetting",{enumerable:!0,get:function(){return animations$1.AnimationSetting}}),Object.defineProperty(exports,"AnimationTriggerType",{enumerable:!0,get:function(){return animations$1.AnimationTriggerType}}),Object.defineProperty(exports,"AnimationType",{enumerable:!0,get:function(){return animations$1.AnimationType}}),Object.defineProperty(exports,"AnimationZoomDirectionType",{enumerable:!0,get:function(){return animations$1.AnimationZoomDirectionType}}),exports.calculateFirstProduct=getCollection.calculateFirstProduct,exports.getCollection=getCollection.getCollection,exports.fetchMedias=getProduct.fetchMedias,exports.fetchVariants=getProduct.fetchVariants,exports.getProduct=getProduct.getProduct,exports.getProductBySlug=getProductBySlug.getProductBySlug;
1
+ "use strict";var AddOn=require("./components/AddOn.js"),Render=require("./components/Render.js"),RenderPreview=require("./components/RenderPreview.js"),Render_liquid=require("./components/Render.liquid.js"),AddonContext=require("./contexts/AddonContext.js"),BuilderComponent=require("./contexts/BuilderComponent.js"),BuilderContext=require("./contexts/BuilderContext.js"),BuilderPreviewContext=require("./contexts/BuilderPreviewContext.js"),CartLineContext=require("./contexts/CartLineContext.js"),ProductListContext=require("./contexts/ProductListContext.js"),ProductContext=require("./contexts/ProductContext.js"),SectionContext=require("./contexts/SectionContext.js"),ShopContext=require("./contexts/ShopContext.js"),PageContext=require("./contexts/PageContext.js"),CollectionContext=require("./contexts/CollectionContext.js"),ModalContext=require("./contexts/ModalContext.js"),pageViewUp_generated=require("./graphql/mutations/page-view-up.generated.js"),collectionDetailFilter_generated=require("./graphql/queries/collection-detail-filter.generated.js"),collection_generated=require("./graphql/queries/collection.generated.js"),collections_generated=require("./graphql/queries/collections.generated.js"),publishedThemePages_generated=require("./graphql/queries/published-theme-pages.generated.js"),products_generated=require("./graphql/queries/products.generated.js"),storeProperty_generated=require("./graphql/queries/store-property.generated.js"),previewPage_generated=require("./graphql/queries/preview-page.generated.js"),LibraryTemplate_generated=require("./graphql-app-api/queries/LibraryTemplate.generated.js"),ThemePage_generated=require("./graphql-app-api/queries/ThemePage.generated.js"),SaleFunnelDiscounts_generated=require("./graphql-app-api/queries/SaleFunnelDiscounts.generated.js"),borders=require("./helpers/borders.js"),carousel=require("./helpers/carousel.js"),cls=require("./helpers/cls.js"),animations=require("./helpers/animations.js"),filterToolbarPreview=require("./helpers/filter-toolbar-preview.js"),flattenConnection=require("./helpers/flatten-connection.js"),getResonsiveValue=require("./helpers/get-resonsive-value.js"),getShortname=require("./helpers/get-shortname.js"),GlobalEvent=require("./helpers/GlobalEvent.js"),isBrowser=require("./helpers/is-browser.js"),isEmptyChildren=require("./helpers/is-empty-children.js"),isSafari=require("./helpers/is-safari.js"),normalizeBuilderData=require("./helpers/normalize-builder-data.js"),prefetchQueries=require("./helpers/prefetch-queries.js"),background=require("./helpers/background.js"),colors=require("./helpers/colors.js"),composeAdvanceStyle=require("./helpers/compose-advance-style.js"),convert=require("./helpers/convert.js"),covertEntitiesHtml=require("./helpers/covert-entities-html.js"),iconList=require("./helpers/icon-list.js"),isDefined=require("./helpers/is-defined.js"),layout=require("./helpers/layout.js"),makeStyle=require("./helpers/make-style.js"),product=require("./helpers/product.js"),query=require("./helpers/query.js"),radius=require("./helpers/radius.js"),render=require("./helpers/render.js"),shadow=require("./helpers/shadow.js"),size=require("./helpers/size.js"),typography=require("./helpers/typography.js"),email=require("./helpers/email.js"),loadScript=require("./helpers/load-script.js"),spacing=require("./helpers/spacing.js"),cssVariable=require("./helpers/css-variable.js"),fpixel=require("./helpers/tracking/fpixel.js"),gtag=require("./helpers/tracking/gtag.js"),tiktokpixel=require("./helpers/tracking/tiktokpixel.js"),useAddToCart=require("./hooks/cart/use-add-to-cart.js"),useCartData=require("./hooks/cart/use-cart-data.js"),useCartDiscountCodesUpdate=require("./hooks/cart/use-cart-discount-codes-update.js"),useCartNoteUpdate=require("./hooks/cart/use-cart-note-update.js"),useCreateCart=require("./hooks/cart/use-create-cart.js"),useRemoveCartItem=require("./hooks/cart/use-remove-cart-item.js"),useUpdateCartItem=require("./hooks/cart/use-update-cart-item.js"),shop=require("./hooks/shop.js"),useCollectionQuery=require("./hooks/shop/use-collection-query.js"),useCollectionsQuery=require("./hooks/shop/use-collections-query.js"),useProductQuery=require("./hooks/shop/use-product-query.js"),useProductsQuery=require("./hooks/shop/use-products-query.js"),useCurrentDevice=require("./hooks/use-current-device.js"),useFormatMoney=require("./hooks/useFormatMoney.js"),useLazyVideo=require("./hooks/use-lazy-video.js"),useCartId=require("./hooks/useCartId.js"),useCartLine=require("./hooks/useCartLine.js"),useCartUI=require("./hooks/useCartUI.js"),useCollection=require("./hooks/useCollection.js"),react=require("react"),useIsomorphicLayoutEffect=require("./hooks/useIsomorphicLayoutEffect.js"),useLoadScript=require("./hooks/useLoadScript.js"),useMoney=require("./hooks/useMoney.js"),usePrevious=require("./hooks/usePrevious.js"),useProduct=require("./hooks/useProduct.js"),useProductList=require("./hooks/useProductList.js"),useSuspenseFetch=require("./hooks/useSuspenseFetch.js"),useSwatchesOptions=require("./hooks/useSwatchesOptions.js"),useInitialSwatchesOptions=require("./hooks/useInitialSwatchesOptions.js"),shop$1=require("./types/shop.js"),appAPI=require("./types/appAPI.js"),globalStyle=require("./types/global-style.js"),animations$1=require("./types/animations.js"),getCollection=require("./helpers/queries/get-collection.js"),getProduct=require("./helpers/queries/get-product.js"),getProductBySlug=require("./helpers/queries/get-product-by-slug.js");exports.AddOn=AddOn.default,exports.Render=Render.default,exports.RenderPreview=RenderPreview.default,exports.RenderChildren=Render_liquid.RenderChildren,exports.RenderLiquid=Render_liquid.default,exports.WrapRenderChildren=Render_liquid.WrapRenderChildren,exports.AddonProvider=AddonContext.AddonProvider,exports.useAddon=AddonContext.useAddon,exports.useAddons=AddonContext.useAddons,exports.BuilderComponentProvider=BuilderComponent.BuilderComponentProvider,exports.useBuilderComponent=BuilderComponent.useBuilderComponent,exports.BuilderProvider=BuilderContext.BuilderProvider,exports.useBuilderStore=BuilderContext.useBuilderStore,exports.BuilderPreviewProvider=BuilderPreviewContext.BuilderPreviewProvider,exports.useBuilderPreviewStore=BuilderPreviewContext.useBuilderPreviewStore,exports.CartLineProvider=CartLineContext.CartLineProvider,exports.useCartLineStore=CartLineContext.useCartLineStore,exports.ProductListProvider=ProductListContext.ProductListProvider,exports.useProductListStore=ProductListContext.useProductListStore,exports.ProductProvider=ProductContext.ProductProvider,exports.useProductStore=ProductContext.useProductStore,exports.SectionProvider=SectionContext.SectionProvider,exports.useSection=SectionContext.useSection,exports.useSectionStore=SectionContext.useSectionStore,exports.ShopProvider=ShopContext.ShopProvider,exports.useShopStore=ShopContext.useShopStore,exports.PageProvider=PageContext.PageProvider,exports.usePageStore=PageContext.usePageStore,exports.CollectionProvider=CollectionContext.CollectionProvider,exports.useCollectionStore=CollectionContext.useCollectionStore,exports.ModalProvider=ModalContext.ModalProvider,exports.useModalStore=ModalContext.useModalStore,exports.PageViewUpDocument=pageViewUp_generated.PageViewUpDocument,exports.CollectionDetailFilterDocument=collectionDetailFilter_generated.CollectionDetailFilterDocument,exports.CollectionDocument=collection_generated.CollectionDocument,exports.CollectionsDocument=collections_generated.CollectionsDocument,exports.PublishedThemePagesDocument=publishedThemePages_generated.PublishedThemePagesDocument,exports.ProductsDocument=products_generated.ProductsDocument,exports.StorePropertyDocument=storeProperty_generated.StorePropertyDocument,exports.PreviewPageDocument=previewPage_generated.PreviewPageDocument,exports.LibraryTemplateDocument=LibraryTemplate_generated.LibraryTemplateDocument,exports.ThemePageDocument=ThemePage_generated.ThemePageDocument,exports.SaleFunnelDiscountsDocument=SaleFunnelDiscounts_generated.SaleFunnelDiscountsDocument,exports.composeBorderCss=borders.composeBorderCss,exports.getBorderStyle=borders.getBorderStyle,exports.handleConvertBorderColor=borders.handleConvertBorderColor,exports.handleConvertBorderStyle=borders.handleConvertBorderStyle,exports.handleConvertBorderWidth=borders.handleConvertBorderWidth,exports.handleConvertClassColor=borders.handleConvertClassColor,exports.handleConvertClassColorDynamicBtn=borders.handleConvertClassColorDynamicBtn,exports.getCarouselContainerHeight=carousel.getCarouselContainerHeight,exports.makeContainerWidthOrHeight=carousel.makeContainerWidthOrHeight,exports.makeDotGapToCarouselStyle=carousel.makeDotGapToCarouselStyle,exports.cls=cls.cls,exports.animations=animations.animations,exports.filterToolbarPreview=filterToolbarPreview.filterToolbarPreview,exports.flattenConnection=flattenConnection.flattenConnection,exports.getResponsiveStateValue=getResonsiveValue.getResponsiveStateValue,exports.getResponsiveValue=getResonsiveValue.getResponsiveValue,exports.getResponsiveValueByScreen=getResonsiveValue.getResponsiveValueByScreen,exports.isColumnDirectionExist=getResonsiveValue.isColumnDirectionExist,exports.getShortName=getShortname.getShortName,exports.globalEvent=GlobalEvent.default,exports.isBrowser=isBrowser.default,exports.isEmptyChildren=isEmptyChildren.isEmptyChildren,exports.isSafari=isSafari.default,exports.normalizeBuilderData=normalizeBuilderData.normalizeBuilderData,exports.prefetchQueries=prefetchQueries.prefetchQueries,exports.GRADIENT_BGR_KEY=background.GRADIENT_BGR_KEY,exports.composeBackgroundCss=background.composeBackgroundCss,exports.getBgImageByDevice=background.getBgImageByDevice,exports.getGradientBgrStyleByDevice=background.getGradientBgrStyleByDevice,exports.getGradientBgrStyleForButton=background.getGradientBgrStyleForButton,exports.getStyleBackgroundByDevice=background.getStyleBackgroundByDevice,exports.makeFixedBgAttachment=background.makeFixedBgAttachment,exports.composeTextColorCss=colors.composeTextColorCss,exports.getGlobalColorCSSProp=colors.getGlobalColorCSSProp,exports.getGlobalColorClass=colors.getGlobalColorClass,exports.getGlobalColorResponsiveClass=colors.getGlobalColorResponsiveClass,exports.getGlobalColorResponsiveStyle=colors.getGlobalColorResponsiveStyle,exports.getGlobalColorStateClass=colors.getGlobalColorStateClass,exports.getGlobalColorStateClassDynamicBtn=colors.getGlobalColorStateClassDynamicBtn,exports.getGlobalColorStateResponsiveClass=colors.getGlobalColorStateResponsiveClass,exports.getGlobalColorStateResponsiveClassDynamicBtn=colors.getGlobalColorStateResponsiveClassDynamicBtn,exports.getGlobalColorStateResponsiveStyle=colors.getGlobalColorStateResponsiveStyle,exports.getGlobalColorStateStyle=colors.getGlobalColorStateStyle,exports.getGlobalColorStyle=colors.getGlobalColorStyle,exports.getSingleColorVariable=colors.getSingleColorVariable,exports.isColor=colors.isColor,exports.composeAdvanceStyle=composeAdvanceStyle.composeAdvanceStyle,exports.composeAdvanceStyleForPostPurchase=composeAdvanceStyle.composeAdvanceStyleForPostPurchase,exports.filterAttrInStyle=composeAdvanceStyle.filterAttrInStyle,exports.filterCornerInStyle=composeAdvanceStyle.filterCornerInStyle,exports.removeAttrInStyle=composeAdvanceStyle.removeAttrInStyle,exports.removePaddingYInStyle=composeAdvanceStyle.removePaddingYInStyle,exports.splitStyle=composeAdvanceStyle.splitStyle,exports.baseAssetURL=convert.baseAssetURL,exports.isLocalEnv=convert.isLocalEnv,exports.convertHTML=covertEntitiesHtml.convertHTML,exports.composePositionLineHeight=iconList.composePositionLineHeight,exports.composePostionIconList=iconList.composePostionIconList,exports.isDefined=isDefined.isDefined,exports.composeGridLayout=layout.composeGridLayout,exports.convertOldLayout=layout.convertOldLayout,exports.gridToArrayRegex=layout.gridToArrayRegex,exports.optionLayoutStyle=layout.optionLayoutStyle,exports.makeAspectRatio=makeStyle.makeAspectRatio,exports.makeGlobalSizeHeightResponsive=makeStyle.makeGlobalSizeHeightResponsive,exports.makeGlobalSizeWidthResponsive=makeStyle.makeGlobalSizeWidthResponsive,exports.makeHeight=makeStyle.makeHeight,exports.makeLineClamp=makeStyle.makeLineClamp,exports.makeStyle=makeStyle.makeStyle,exports.makeStyleKey=makeStyle.makeStyleKey,exports.makeStyleResponsive=makeStyle.makeStyleResponsive,exports.makeStyleResponsiveByScreen=makeStyle.makeStyleResponsiveByScreen,exports.makeStyleResponsiveState=makeStyle.makeStyleResponsiveState,exports.makeStyleState=makeStyle.makeStyleState,exports.makeWidth=makeStyle.makeWidth,exports.removeNullUndefined=makeStyle.removeNullUndefined,exports.checkAvailableVariantInStock=product.checkAvailableVariantInStock,exports.getSelectedVariant=product.getSelectedVariant,exports.parseSelectedOption=product.parseSelectedOption,exports.generateCollectionQueryKey=query.generateCollectionQueryKey,exports.generateProductQueryKey=query.generateProductQueryKey,exports.generateProductsQueryKey=query.generateProductsQueryKey,exports.composeCornerCss=radius.composeCornerCss,exports.composeRadius=radius.composeRadius,exports.composeRadiusResponsive=radius.composeRadiusResponsive,exports.getCornerCSSFromGlobal=radius.getCornerCSSFromGlobal,exports.getCustomRadius=radius.getCustomRadius,exports.getRadiusCSSFromGlobal=radius.getRadiusCSSFromGlobal,exports.getRadiusStyleActiveState=radius.getRadiusStyleActiveState,exports.RenderIf=render.RenderIf,exports.composeMemo=render.composeMemo,exports.dataStringify=render.dataStringify,exports.props=render.props,exports.removeUndefinedValuesFromObject=render.removeUndefinedValuesFromObject,exports.styles=render.styles,exports.template=render.template,exports.composeShadowCss=shadow.composeShadowCss,exports.getStyleShadow=shadow.getStyleShadow,exports.getStyleShadowState=shadow.getStyleShadowState,exports.parseValueWithUnit=shadow.parseValueWithUnit,exports.composeSize=size.composeSize,exports.composeSizeCss=size.composeSizeCss,exports.genSizeClass=size.genSizeClass,exports.getAspectRatioGlobalSize=size.getAspectRatioGlobalSize,exports.getGlobalSizeGap=size.getGlobalSizeGap,exports.getHeightByShapeGlobalSize=size.getHeightByShapeGlobalSize,exports.getPaddingGlobalSize=size.getPaddingGlobalSize,exports.getWidthByShapeGlobalSize=size.getWidthByShapeGlobalSize,exports.getWidthHeightGlobalSize=size.getWidthHeightGlobalSize,exports.makeGlobalSize=size.makeGlobalSize,exports.makeStyleWithDefault=size.makeStyleWithDefault,exports.composeFallbackTypographyStyle=typography.composeFallbackTypographyStyle,exports.composeTypography=typography.composeTypography,exports.composeTypographyAttr=typography.composeTypographyAttr,exports.composeTypographyClassName=typography.composeTypographyClassName,exports.composeTypographyCss=typography.composeTypographyCss,exports.composeTypographyStyle=typography.composeTypographyStyle,exports.composeTypographyV2=typography.composeTypographyV2,exports.composeTypographyV2Css=typography.composeTypographyV2Css,exports.genTypoClass=typography.genTypoClass,exports.validateEmail=email.validateEmail,exports.loadScript=loadScript.loadScript,exports.composeSpacing=spacing.composeSpacing,exports.getSpacingVariable=spacing.getSpacingVariable,exports.genVariable=cssVariable.genVariable,exports.fpixel=fpixel,exports.gtag=gtag,exports.tiktokpixel=tiktokpixel,exports.useAddToCart=useAddToCart.useAddToCart,exports.useCartData=useCartData.useCartData,exports.useCartDiscountCodesUpdate=useCartDiscountCodesUpdate.useCartDiscountCodesUpdate,exports.useCartNoteUpdate=useCartNoteUpdate.useCartNoteUpdate,exports.useCreateCart=useCreateCart.useCreateCart,exports.useRemoveCartItem=useRemoveCartItem.useRemoveCartItem,exports.useUpdateCartItem=useUpdateCartItem.useUpdateCartItem,exports.useCheckoutUrl=shop.useCheckoutUrl,exports.useConnectedShopify=shop.useConnectedShopify,exports.useCurrency=shop.useCurrency,exports.useEditorMode=shop.useEditorMode,exports.useIsSampleProduct=shop.useIsSampleProduct,exports.useIsStorefrontProduct=shop.useIsStorefrontProduct,exports.useLocale=shop.useLocale,exports.useMatchMutate=shop.useMatchMutate,exports.useMobileOnly=shop.useMobileOnly,exports.useMoneyFormat=shop.useMoneyFormat,exports.usePageType=shop.usePageType,exports.usePluginEnable=shop.usePluginEnable,exports.useStoreFront=shop.useStoreFront,exports.useSwatches=shop.useSwatches,exports.useCollectionQuery=useCollectionQuery.useCollectionQuery,exports.useCollectionsQuery=useCollectionsQuery.useCollectionsQuery,exports.useProductQuery=useProductQuery.useProductQuery,exports.useProductsQuery=useProductsQuery.useProductsQuery,exports.useProductsQueryAll=useProductsQuery.useProductsQueryAll,exports.useCurrentDevice=useCurrentDevice.useCurrentDevice,exports.shopifyPriceRounding=useFormatMoney.shopifyPriceRounding,exports.useFormatMoney=useFormatMoney.useFormatMoney,exports.useLazyVideo=useLazyVideo.useLazyVideo,exports.useCartId=useCartId.default,exports.useCartLine=useCartLine.default,exports.useCartUI=useCartUI.default,exports.useCollection=useCollection.useCollection,Object.defineProperty(exports,"useId",{enumerable:!0,get:function(){return react.useId}}),exports.useIsomorphicLayoutEffect=useIsomorphicLayoutEffect.default,exports.useLoadScript=useLoadScript.default,exports.useMoney=useMoney.default,exports.usePrevious=usePrevious.usePrevious,exports.useCheckAvailableVariantInStock=useProduct.useCheckAvailableVariantInStock,exports.useCurrentVariant=useProduct.useCurrentVariant,exports.useCurrentVariantInStock=useProduct.useCurrentVariantInStock,exports.useFeaturedImageGlobal=useProduct.useFeaturedImageGlobal,exports.useIsSyncProduct=useProduct.useIsSyncProduct,exports.useProduct=useProduct.useProduct,exports.useProductOfferDiscount=useProduct.useProductOfferDiscount,exports.useProductProperties=useProduct.useProductProperties,exports.useQuantity=useProduct.useQuantity,exports.useSelectedOption=useProduct.useSelectedOption,exports.useUniqProductID=useProduct.useUniqProductID,exports.useVariant=useProduct.useVariant,exports.useVariantOutStock=useProduct.useVariantOutStock,exports.useVariants=useProduct.useVariants,exports.useProductList=useProductList.useProductList,exports.useProductListProducts=useProductList.useProductListProducts,exports.useProductListSettings=useProductList.useProductListSettings,exports.useProductListStyles=useProductList.useProductListStyles,exports.useSuspenseFetch=useSuspenseFetch.default,exports.useSwatchesOptions=useSwatchesOptions.default,exports.useInitialSwatchesOptions=useInitialSwatchesOptions.default,exports.ShopType=shop$1,exports.AppAPIType=appAPI,exports.OptionNormalStyle=globalStyle.OptionNormalStyle,exports.OptionSpecialStyle=globalStyle.OptionSpecialStyle,Object.defineProperty(exports,"AnimationDirectionType",{enumerable:!0,get:function(){return animations$1.AnimationDirectionType}}),Object.defineProperty(exports,"AnimationEasingType",{enumerable:!0,get:function(){return animations$1.AnimationEasingType}}),Object.defineProperty(exports,"AnimationSetting",{enumerable:!0,get:function(){return animations$1.AnimationSetting}}),Object.defineProperty(exports,"AnimationTriggerType",{enumerable:!0,get:function(){return animations$1.AnimationTriggerType}}),Object.defineProperty(exports,"AnimationType",{enumerable:!0,get:function(){return animations$1.AnimationType}}),Object.defineProperty(exports,"AnimationZoomDirectionType",{enumerable:!0,get:function(){return animations$1.AnimationZoomDirectionType}}),exports.calculateFirstProduct=getCollection.calculateFirstProduct,exports.getCollection=getCollection.getCollection,exports.fetchMedias=getProduct.fetchMedias,exports.fetchVariants=getProduct.fetchVariants,exports.getProduct=getProduct.getProduct,exports.getProductBySlug=getProductBySlug.getProductBySlug;
@@ -1,19 +1,19 @@
1
- import{makeStyleResponsive as e}from"../helpers/make-style.js";import"react";import"react/jsx-runtime";import"zustand";import"swr";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"react-transition-group";import"@gem-sdk/core";import{disableWrap as t,customRenderChildren as n}from"./constant.js";import{RenderIf as r,template as i}from"../helpers/render.js";import{baseAssetURL as s,isLocalEnv as d}from"../helpers/convert.js";import{composeAdvanceStyle as a}from"../helpers/compose-advance-style.js";let componentsRenderWithParentId=["CarouselItem"],componentTexts=["Text","Heading"],componentIconList=["IconListV2","IconList"],componentUsingAdvanced=["IconList"],Render=({uid:e,builder:s,components:d,parentId:l,extraFiles:o={},pageContext:p,...c})=>{let u=s[e],m=d[u?.tag];if(!m)return console.log("Miss component: ",u),{liquid:"",extraFiles:o};if(!u||u?.type==="section")return{liquid:"",extraFiles:o};{let o={extraFiles:{}},g=a(u.advanced,u.tag),h="";h=t.includes(u.tag)?r(u?.childrens?.length,()=>m({builderProps:{uid:e,builderData:u},styles:u.styles,setting:u.settings,style:g,advanced:u.advanced,parentId:componentsRenderWithParentId.includes(u.tag)?l:null,pageContext:p,...c,rawChildren:u.childrens.map(e=>({...s[e],uid:e,builder:s,components:d,customProps:o,pageContext:p})),children:n.includes(u.tag)?"":WrapRenderChildren({uid:e,customProps:o},u.childrens.map(e=>RenderChildren({uid:e,builder:s,components:d,customProps:o,parentTag:u.tag,pageContext:p})))}),()=>m({builderProps:{uid:e,builderData:u},styles:u.styles,setting:u.settings,advanced:u.advanced,style:g,isText:!!componentTexts.includes(u.tag)||null,parentId:componentsRenderWithParentId.includes(u.tag)?l:null,pageContext:p,...c})):i`<div style="${componentIconList.includes(u.tag)?"":g}" class="${u.uid} ${u?.childrens?.length||"IconListItemHoz"!==u.tag?"":"hidden"}">
2
- ${r(u?.childrens?.length,()=>m({builderProps:{uid:e,builderData:u},styles:u.styles,setting:u.settings,advanced:{...componentUsingAdvanced.includes(u.tag)?u?.advanced:{},cssClass:u?.advanced?.cssClass},pageContext:p,...c,rawChildren:u.childrens.map(e=>({...s[e],uid:e,builder:s,components:d,customProps:o,pageContext:p})),children:n.includes(u.tag)?"":WrapRenderChildren({uid:e,customProps:o},u.childrens.map(e=>RenderChildren({uid:e,builder:s,components:d,customProps:o,parentTag:u.tag,pageContext:p})))}),()=>m({builderProps:{uid:e,builderData:u},styles:u.styles,setting:u.settings,advanced:{cssClass:u?.advanced?.cssClass},pageContext:p,isText:!!componentTexts.includes(u.tag)||null,style:componentIconList.includes(u.tag)?g:null,...c}))}
3
- </div>`;let{cssCode:f,jsCode:v}=RenderCustomCode(u);return f&&(h+=f),v&&(h+=v),{liquid:h=appendAnimation(u,h),extraFiles:o.extraFiles}}},RenderCustomCode=e=>{let{css:t,javascript:n,rootClassName:s}=e.advanced?.editorData||{},d=t?.replaceAll(s,e.uid),a=n?.replaceAll(s,e.uid),l=r(!!t,i`
1
+ import{makeStyleResponsive as e}from"../helpers/make-style.js";import"react";import"react/jsx-runtime";import"zustand";import"swr";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"../hooks/useCartUI.js";import"react-transition-group";import"@gem-sdk/core";import{disableWrap as t,customRenderChildren as n}from"./constant.js";import{composeAdvanceStyle as r}from"../helpers/compose-advance-style.js";import{baseAssetURL as i,isLocalEnv as s}from"../helpers/convert.js";import{RenderIf as d,template as a}from"../helpers/render.js";let componentsRenderWithParentId=["CarouselItem"],componentTexts=["Text","Heading"],componentIconList=["IconListV2","IconList"],componentUsingAdvanced=["IconList"],Render=({uid:e,builder:i,components:s,parentId:l,extraFiles:o={},pageContext:p,...c})=>{let u=i[e],m=s[u?.tag];if(!m)return console.log("Miss component: ",u),{liquid:"",extraFiles:o};if(!u||u?.type==="section")return{liquid:"",extraFiles:o};{let o={extraFiles:{}},g=r(u.advanced,u.tag),h="";h=t.includes(u.tag)?d(u?.childrens?.length,()=>m({builderProps:{uid:e,builderData:u},styles:u.styles,setting:u.settings,style:g,advanced:u.advanced,parentId:componentsRenderWithParentId.includes(u.tag)?l:null,pageContext:p,...c,rawChildren:u.childrens.map(e=>({...i[e],uid:e,builder:i,components:s,customProps:o,pageContext:p})),children:n.includes(u.tag)?"":WrapRenderChildren({uid:e,customProps:o},u.childrens.map(e=>RenderChildren({uid:e,builder:i,components:s,customProps:o,parentTag:u.tag,pageContext:p})))}),()=>m({builderProps:{uid:e,builderData:u},styles:u.styles,setting:u.settings,advanced:u.advanced,style:g,isText:!!componentTexts.includes(u.tag)||null,parentId:componentsRenderWithParentId.includes(u.tag)?l:null,pageContext:p,...c})):a`<div style="${componentIconList.includes(u.tag)?"":g}" class="${u.uid} ${u?.childrens?.length||"IconListItemHoz"!==u.tag?"":"hidden"}">
2
+ ${d(u?.childrens?.length,()=>m({builderProps:{uid:e,builderData:u},styles:u.styles,setting:u.settings,advanced:{...componentUsingAdvanced.includes(u.tag)?u?.advanced:{},cssClass:u?.advanced?.cssClass},pageContext:p,...c,rawChildren:u.childrens.map(e=>({...i[e],uid:e,builder:i,components:s,customProps:o,pageContext:p})),children:n.includes(u.tag)?"":WrapRenderChildren({uid:e,customProps:o},u.childrens.map(e=>RenderChildren({uid:e,builder:i,components:s,customProps:o,parentTag:u.tag,pageContext:p})))}),()=>m({builderProps:{uid:e,builderData:u},styles:u.styles,setting:u.settings,advanced:{cssClass:u?.advanced?.cssClass},pageContext:p,isText:!!componentTexts.includes(u.tag)||null,style:componentIconList.includes(u.tag)?g:null,...c}))}
3
+ </div>`;let{cssCode:f,jsCode:v}=RenderCustomCode(u);return f&&(h+=f),v&&(h+=v),{liquid:h=appendAnimation(u,h),extraFiles:o.extraFiles}}},RenderCustomCode=e=>{let{css:t,javascript:n,rootClassName:r}=e.advanced?.editorData||{},i=t?.replaceAll(r,e.uid),s=n?.replaceAll(r,e.uid),l=d(!!t,a`
4
4
  <style
5
5
  id="${`custom-css-${e?.uid}`}"
6
- >${d}</style>
7
- `),o=r(!!n,i`
6
+ >${i}</style>
7
+ `),o=d(!!n,a`
8
8
  <script
9
9
  id="${`custom-js-${e?.uid}`}"
10
10
  >
11
11
  try {
12
- ${a}
12
+ ${s}
13
13
  } catch(err){}
14
14
  </script>
15
- `);return{cssCode:l,jsCode:o}},appendAnimation=(t,n)=>{let{advanced:a,tag:l}=t,{animation:o,op:p}=a??{},c=(e,t)=>e?.triggerConfig?.[t]?.animation??"none",u=e=>{if("desktop"===e);else if("tablet"===e)return o?.tablet??o?.desktop;else if("mobile"===e)return o?.mobile??o?.tablet??o?.desktop;return o?.desktop},m=c(u("desktop"),"appear"),g=c(u("desktop"),"hover"),h=c(u("tablet"),"appear"),f=c(u("mobile"),"appear"),v=o?.desktop?.enabled&&("none"!==m||"none"!==g)||o?.tablet?.enabled&&"none"!==h||o?.mobile?.enabled&&"none"!==f;if(!v)return n;let b=e=>+!(u(e)?.enabled&&!["shake","none"].includes(c(u(e),"appear"))),y={desktop:b("desktop"),tablet:b("tablet"),mobile:b("mobile")},C={all:"Section"===l?"":"inherit",position:"static",transform:"unset"};return i`
16
- ${r(d,'<script src="{{ \'gp-animation.js\' | asset_url }}" defer="defer"></script>',`<script src="${s}/assets-v2/gp-animation.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
15
+ `);return{cssCode:l,jsCode:o}},appendAnimation=(t,n)=>{let{advanced:r,tag:l}=t,{animation:o,op:p}=r??{},c=(e,t)=>e?.triggerConfig?.[t]?.animation??"none",u=e=>{if("desktop"===e);else if("tablet"===e)return o?.tablet??o?.desktop;else if("mobile"===e)return o?.mobile??o?.tablet??o?.desktop;return o?.desktop},m=c(u("desktop"),"appear"),g=c(u("desktop"),"hover"),h=c(u("tablet"),"appear"),f=c(u("mobile"),"appear"),v=o?.desktop?.enabled&&("none"!==m||"none"!==g)||o?.tablet?.enabled&&"none"!==h||o?.mobile?.enabled&&"none"!==f;if(!v)return n;let b=e=>+!(u(e)?.enabled&&!["shake","none"].includes(c(u(e),"appear"))),y={desktop:b("desktop"),tablet:b("tablet"),mobile:b("mobile")},C={all:"Section"===l?"":"inherit",position:"static",transform:"unset"};return a`
16
+ ${d(s,'<script src="{{ \'gp-animation.js\' | asset_url }}" defer="defer"></script>',`<script src="${i}/assets-v2/gp-animation.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
17
17
  <gp-animation
18
18
  gp-data='${JSON.stringify({config:o,tag:l,opacity:p})}'
19
19
  style="${{...C}}"
@@ -1 +1 @@
1
- let RenderIf=(e,t,r)=>e?"string"==typeof t?t:t():("string"==typeof r?r:r?.())??"",isObject=e=>!("object"!=typeof e||Array.isArray(e))&&null!==e,props=(e,...t)=>{let r=t[0],o=[];for(let e in r)if(Object.hasOwnProperty.call(r,e)){let t=r[e];["symbol","object","function"].includes(typeof t)||(t?o.push(`${e}="${t}"`):o.push(`${e}`))}return o.join(" ")},styles=(e,...t)=>{let r=t[0],o=[];for(let e in r)if(Object.hasOwnProperty.call(r,e)){let t=r[e];void 0!==t&&!1!==t&&o.push(`${e}:${t}`)}return o.join(";")},dataStringify=e=>JSON.stringify(e).replace(/\\"/g,'"'),template=(e,...t)=>{let r="";return e.forEach((e,o)=>{r+=e,void 0!==t[o]&&(isObject(t[o])?/style=["|']/.test(e)?r+=styles`${t[o]}`:r+=props`${t[o]}`:r+=t[o])}),r},composeMemo=(e,t)=>e();export{RenderIf,composeMemo,dataStringify,props,styles,template};
1
+ let RenderIf=(e,t,r)=>e?"string"==typeof t?t:t():("string"==typeof r?r:r?.())??"",isObject=e=>!("object"!=typeof e||Array.isArray(e))&&null!==e,props=(e,...t)=>{let r=t[0],o=[];for(let e in r)if(Object.hasOwnProperty.call(r,e)){let t=r[e];["symbol","object","function"].includes(typeof t)||(t?o.push(`${e}="${t}"`):o.push(`${e}`))}return o.join(" ")},styles=(e,...t)=>{let r=t[0],o=[];for(let e in r)if(Object.hasOwnProperty.call(r,e)){let t=r[e];void 0!==t&&!1!==t&&o.push(`${e}:${t}`)}return o.join(";")},dataStringify=e=>JSON.stringify(e).replace(/\\"/g,'"'),template=(e,...t)=>{let r="";return e.forEach((e,o)=>{r+=e,void 0!==t[o]&&(isObject(t[o])?/style=["|']/.test(e)?r+=styles`${t[o]}`:r+=props`${t[o]}`:r+=t[o])}),r},composeMemo=(e,t)=>e(),removeUndefinedValuesFromObject=e=>(Object.keys(e).forEach(t=>e?.[t]===void 0&&delete e[t]),e);export{RenderIf,composeMemo,dataStringify,props,removeUndefinedValuesFromObject,styles,template};
@@ -1 +1 @@
1
- import{useRef as t,useCallback as e}from"react";import{useAnimationConfig as r}from"./useAnimationConfig.js";let SPACING_ACTIVE_ATTRIBUTE="data-spacing",TOOLBAR_ACTIVE_ATTRIBUTE="data-toolbar-active",OUTLINE_ACTIVE_ATTRIBUTE="data-outline-active",TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE="data-toolbar-add-active",useAnimationTarget=a=>{let{isEnabledAnimation:T}=r(a),o=a.tag,u=a.uid,A=t(null),i=t([]),n=t=>{if(i.current)for(let e of i.current)t?(e.toolbar?.setAttribute(TOOLBAR_ACTIVE_ATTRIBUTE,"true"),e.outline?.setAttribute(OUTLINE_ACTIVE_ATTRIBUTE,"true"),e.spacing?.setAttribute(SPACING_ACTIVE_ATTRIBUTE,"true"),e.addSectionTop?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true"),e.addSectionBottom?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true")):(e.toolbar?.removeAttribute(TOOLBAR_ACTIVE_ATTRIBUTE),e.outline?.removeAttribute(OUTLINE_ACTIVE_ATTRIBUTE),e.spacing?.removeAttribute(SPACING_ACTIVE_ATTRIBUTE),e.addSectionTop?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE),e.addSectionBottom?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE))},l=t=>{let e=t.querySelector("[data-toolbar-add-top]"),r=t.querySelector("[data-toolbar-add-bottom]"),a=Array.from(t.children),T=a.find(t=>null!==t.getAttribute("data-toolbar")),o=a.find(t=>null!==t.getAttribute("data-outline"));return{sectionToolbar:T,sectionOutline:o,sectionAddTop:e,sectionAddBottom:r}},c=e(t=>t.reduce((t,e)=>{let r=null,a=null,T=e,u=e.querySelector("[data-toolbar][data-toolbar-active]"),A=e.querySelector("[data-outline][data-outline-active]"),i=Array.from(T.children),n=i.find(t=>null!==t.getAttribute("data-spacing"));switch(o){case"Button":case"SubmitButton":case"ProductButton":case"DynamicCheckout":T=e.querySelector(".gp-button-base");break;case"ProductProperties":T=e.querySelector("input");break;case"Icon":T=e.firstElementChild;break;case"ProductTag":T=e?.children[0]?.children[0];break;case"Section":{T=e;let{sectionOutline:t,sectionToolbar:o,sectionAddTop:i,sectionAddBottom:n}=l(T);A=t,u=o,r=i,a=n;break}default:T=e}let c={target:T,toolbar:u,outline:A,spacing:n,addSectionTop:r,addSectionBottom:a};return t.push(c),t},[]),[o]),d=e(()=>{if(!T)return;A.current||(A.current=document.querySelectorAll(`[data-uid="${u}"]`));let t=Array.from(A.current);if(!t.length)return;let e=c(t);i.current=e},[u,c,T]);return{targetObjects:i,setToolbarActive:n,initListOfTargets:d}};export{useAnimationTarget};
1
+ import{useRef as t,useCallback as e}from"react";import{useAnimationConfig as r}from"./useAnimationConfig.js";let SPACING_ACTIVE_ATTRIBUTE="data-spacing-margin-bottom-active",TOOLBAR_ACTIVE_ATTRIBUTE="data-toolbar-active",OUTLINE_ACTIVE_ATTRIBUTE="data-outline-active",TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE="data-toolbar-add-active",useAnimationTarget=a=>{let{isEnabledAnimation:o}=r(a),T=a.tag,u=a.uid,i=t(null),A=t([]),n=t=>{if(A.current)for(let e of A.current)t?(e.toolbar?.setAttribute(TOOLBAR_ACTIVE_ATTRIBUTE,"true"),e.outline?.setAttribute(OUTLINE_ACTIVE_ATTRIBUTE,"true"),e.spacing?.setAttribute(SPACING_ACTIVE_ATTRIBUTE,"true"),e.addSectionTop?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true"),e.addSectionBottom?.setAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE,"true")):(e.toolbar?.removeAttribute(TOOLBAR_ACTIVE_ATTRIBUTE),e.outline?.removeAttribute(OUTLINE_ACTIVE_ATTRIBUTE),e.spacing?.removeAttribute(SPACING_ACTIVE_ATTRIBUTE),e.addSectionTop?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE),e.addSectionBottom?.removeAttribute(TOOLBAR_ADD_SECTION_ACTIVE_ATTRIBUTE))},l=t=>{let e=t.querySelector("[data-toolbar-add-top]"),r=t.querySelector("[data-toolbar-add-bottom]"),a=Array.from(t.children),o=a.find(t=>null!==t.getAttribute("data-toolbar")),T=a.find(t=>null!==t.getAttribute("data-outline"));return{sectionToolbar:o,sectionOutline:T,sectionAddTop:e,sectionAddBottom:r}},c=e(t=>t.reduce((t,e)=>{let r=null,a=null,o=e,u=e.querySelector("[data-toolbar][data-toolbar-active]"),i=e.querySelector("[data-outline][data-outline-active]"),A=Array.from(o.children),n=A.find(t=>{let e=t.getAttribute("data-spacing");return null!==e&&t.querySelector("[data-spacing-margin-bottom")});switch(T){case"Button":case"SubmitButton":case"ProductButton":case"DynamicCheckout":o=e.querySelector(".gp-button-base");break;case"ProductProperties":o=e.querySelector("input");break;case"Icon":o=e.firstElementChild;break;case"ProductTag":o=e?.children[0]?.children[0];break;case"Section":{o=e;let{sectionOutline:t,sectionToolbar:T,sectionAddTop:A,sectionAddBottom:n}=l(o);i=t,u=T,r=A,a=n;break}default:o=e}let c={target:o,toolbar:u,outline:i,spacing:n,addSectionTop:r,addSectionBottom:a};return t.push(c),t},[]),[T]),d=e(()=>{if(!o)return;i.current||(i.current=document.querySelectorAll(`[data-uid="${u}"]`));let t=Array.from(i.current);if(!t.length)return;let e=c(t);A.current=e},[u,c,o]);return{targetObjects:A,setToolbarActive:n,initListOfTargets:d}};export{useAnimationTarget};
@@ -1 +1 @@
1
- import"react";import"react/jsx-runtime";import"zustand";import"swr";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"./useCartUI.js";import"react-transition-group";import"@gem-sdk/core";import{animations as t}from"../helpers/animations.js";import"../helpers/convert.js";let useAnimations=()=>{let{zoom:r,shake:i,fade:o,slide:e}=t();return{zoom:r,shake:i,fade:o,slide:e}};export{useAnimations};
1
+ import{animations as t}from"../helpers/animations.js";import"react";import"react/jsx-runtime";import"zustand";import"swr";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"./useCartUI.js";import"react-transition-group";import"@gem-sdk/core";import"../helpers/convert.js";let useAnimations=()=>{let{zoom:r,shake:i,fade:o,slide:e}=t();return{zoom:r,shake:i,fade:o,slide:e}};export{useAnimations};
@@ -1 +1 @@
1
- import{useCallback as e,useEffect as t,useMemo as r}from"react";import{useProductStore as n}from"../contexts/ProductContext.js";import{flattenConnection as u}from"../helpers/flatten-connection.js";import"react/jsx-runtime";import"zustand";import"swr";import{usePageStore as o}from"../contexts/PageContext.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"./useCartUI.js";import{checkInStock as s}from"../helpers/variant.js";import"react-transition-group";import"@gem-sdk/core";import{getSelectedVariant as i}from"../helpers/product.js";import"../helpers/convert.js";let useUniqProductID=()=>n(e=>e.uiqueId),useProduct=()=>n(e=>e.product),useFeaturedImageGlobal=()=>n(e=>e.featuredImageGlobal),useProductProperties=()=>n(e=>e.properties),useIsSyncProduct=()=>n(e=>e.isSyncProduct),useQuantity=()=>{let u=n(e=>e.quantity),o=n(e=>e.updatePrice),s=n(e=>e.decrementQuantity),i=n(e=>e.incrementQuantity),a=n(e=>e.setQuantity),c=n(e=>e.setHasUpdatePriceFollowQuantity),l=n(e=>e.isSyncProduct),d=n(e=>e.product),p=d?.id,m=e(()=>{a(1)},[a]);return t(()=>{if(l){let e=new CustomEvent("set-product-quantity",{bubbles:!0,cancelable:!0,composed:!0,detail:{quantity:u,productId:p}});window.dispatchEvent(e)}},[u,l,p]),r(()=>({quantity:u,hasUpdatePrice:o,increment:i,decrement:s,reset:m,setQuantity:a,setUpdatePrice:c}),[s,i,u,m,a,c,o])},useSelectedOption=()=>{let t=n(e=>e.setSelectedOption),u=n(e=>e.selectedOptions),o=n(e=>e.forceSelectedOption),s=n(e=>e.isSyncProduct),i=e((e,r,n,u)=>{if(!u&&s){let t=new CustomEvent("set-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{optionId:e,optionValue:r,productId:n}});window.dispatchEvent(t)}t(e,r)},[t,s]),a=e((e,t,r)=>{if(!r&&s){let r=new CustomEvent("force-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{selectedOption:e,productId:t}});window.dispatchEvent(r)}o(e)},[o,s]);return r(()=>({selectedOptions:u,setSelectedOption:i,forceSelectedOption:a}),[u,i,a])},useVariants=()=>{let e=n(e=>e.product?.variants);return u(e)},useVariant=e=>{let t=useVariants();return r(()=>t?.find(t=>t?.id===e),[e,t])},useCurrentVariant=()=>{let{selectedOptions:e}=useSelectedOption(),t=useVariants();return r(()=>i(t,e),[e,t])},useCurrentVariantInStock=()=>{let e=useCurrentVariant(),t=useVariants();return s(e,t)},useVariantOutStock=(e,t,r)=>{let{selectedOptions:n}=useSelectedOption(),u=useVariants(),o=r.optionNumber-1;if(r.position<o)return u.some(r=>{if(r){let{selectedOptions:n}=r,u=n?.some(r=>r?.name===e&&r.value===t),o=s(r);return u&&o}});let a=i(u,{...n,[e]:t});return s(a)},useCheckAvailableVariantInStock=(e,t)=>{let r=useVariants();return!!r&&r.some(r=>{if(r){let{selectedOptions:n}=r,u=n?.some(r=>r?.name===e&&r.value===t),o=s(r);return u&&o}return!1})},useProductOfferDiscount=()=>{let e=o(e=>e.productOffers),t=useProduct(),r=useCurrentVariant(),n=e?.find(e=>e?.node?.objectBaseID===t?.baseID)?.node;if(!n||!n.isEnabled)return 0;let u=n?.value;if(n&&"PERCENTAGE"===n.valueType&&u){let e=r?.price||0;u=u*e/100}return u||0};export{useCheckAvailableVariantInStock,useCurrentVariant,useCurrentVariantInStock,useFeaturedImageGlobal,useIsSyncProduct,useProduct,useProductOfferDiscount,useProductProperties,useQuantity,useSelectedOption,useUniqProductID,useVariant,useVariantOutStock,useVariants};
1
+ import{useCallback as e,useEffect as t,useMemo as r}from"react";import{useProductStore as n}from"../contexts/ProductContext.js";import"react/jsx-runtime";import"zustand";import"swr";import{usePageStore as u}from"../contexts/PageContext.js";import"@gem-sdk/adapter-shopify";import"swr/mutation";import"vanilla-lazyload";import"./useCartUI.js";import{checkInStock as o}from"../helpers/variant.js";import"react-transition-group";import"@gem-sdk/core";import{flattenConnection as s}from"../helpers/flatten-connection.js";import"../helpers/convert.js";import{getSelectedVariant as i}from"../helpers/product.js";let useUniqProductID=()=>n(e=>e.uiqueId),useProduct=()=>n(e=>e.product),useFeaturedImageGlobal=()=>n(e=>e.featuredImageGlobal),useProductProperties=()=>n(e=>e.properties),useIsSyncProduct=()=>n(e=>e.isSyncProduct),useQuantity=()=>{let u=n(e=>e.quantity),o=n(e=>e.updatePrice),s=n(e=>e.decrementQuantity),i=n(e=>e.incrementQuantity),a=n(e=>e.setQuantity),c=n(e=>e.setHasUpdatePriceFollowQuantity),l=n(e=>e.isSyncProduct),d=n(e=>e.product),p=d?.id,m=e(()=>{a(1)},[a]);return t(()=>{if(l){let e=new CustomEvent("set-product-quantity",{bubbles:!0,cancelable:!0,composed:!0,detail:{quantity:u,productId:p}});window.dispatchEvent(e)}},[u,l,p]),r(()=>({quantity:u,hasUpdatePrice:o,increment:i,decrement:s,reset:m,setQuantity:a,setUpdatePrice:c}),[s,i,u,m,a,c,o])},useSelectedOption=()=>{let t=n(e=>e.setSelectedOption),u=n(e=>e.selectedOptions),o=n(e=>e.forceSelectedOption),s=n(e=>e.isSyncProduct),i=e((e,r,n,u)=>{if(!u&&s){let t=new CustomEvent("set-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{optionId:e,optionValue:r,productId:n}});window.dispatchEvent(t)}t(e,r)},[t,s]),a=e((e,t,r)=>{if(!r&&s){let r=new CustomEvent("force-selected-option",{bubbles:!0,cancelable:!0,composed:!0,detail:{selectedOption:e,productId:t}});window.dispatchEvent(r)}o(e)},[o,s]);return r(()=>({selectedOptions:u,setSelectedOption:i,forceSelectedOption:a}),[u,i,a])},useVariants=()=>{let e=n(e=>e.product?.variants);return s(e)},useVariant=e=>{let t=useVariants();return r(()=>t?.find(t=>t?.id===e),[e,t])},useCurrentVariant=()=>{let{selectedOptions:e}=useSelectedOption(),t=useVariants();return r(()=>i(t,e),[e,t])},useCurrentVariantInStock=()=>{let e=useCurrentVariant(),t=useVariants();return o(e,t)},useVariantOutStock=(e,t,r)=>{let{selectedOptions:n}=useSelectedOption(),u=useVariants(),s=r.optionNumber-1;if(r.position<s)return u.some(r=>{if(r){let{selectedOptions:n}=r,u=n?.some(r=>r?.name===e&&r.value===t),s=o(r);return u&&s}});let a=i(u,{...n,[e]:t});return o(a)},useCheckAvailableVariantInStock=(e,t)=>{let r=useVariants();return!!r&&r.some(r=>{if(r){let{selectedOptions:n}=r,u=n?.some(r=>r?.name===e&&r.value===t),s=o(r);return u&&s}return!1})},useProductOfferDiscount=()=>{let e=u(e=>e.productOffers),t=useProduct(),r=useCurrentVariant(),n=e?.find(e=>e?.node?.objectBaseID===t?.baseID)?.node;if(!n||!n.isEnabled)return 0;let o=n?.value;if(n&&"PERCENTAGE"===n.valueType&&o){let e=r?.price||0;o=o*e/100}return o||0};export{useCheckAvailableVariantInStock,useCurrentVariant,useCurrentVariantInStock,useFeaturedImageGlobal,useIsSyncProduct,useProduct,useProductOfferDiscount,useProductProperties,useQuantity,useSelectedOption,useUniqProductID,useVariant,useVariantOutStock,useVariants};
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- export{default as AddOn}from"./components/AddOn.js";export{default as Render}from"./components/Render.js";export{default as RenderPreview}from"./components/RenderPreview.js";export{RenderChildren,default as RenderLiquid,WrapRenderChildren}from"./components/Render.liquid.js";export{AddonProvider,useAddon,useAddons}from"./contexts/AddonContext.js";export{BuilderComponentProvider,useBuilderComponent}from"./contexts/BuilderComponent.js";export{BuilderProvider,useBuilderStore}from"./contexts/BuilderContext.js";export{BuilderPreviewProvider,useBuilderPreviewStore}from"./contexts/BuilderPreviewContext.js";export{CartLineProvider,useCartLineStore}from"./contexts/CartLineContext.js";export{ProductListProvider,useProductListStore}from"./contexts/ProductListContext.js";export{ProductProvider,useProductStore}from"./contexts/ProductContext.js";export{SectionProvider,useSection,useSectionStore}from"./contexts/SectionContext.js";export{ShopProvider,useShopStore}from"./contexts/ShopContext.js";export{PageProvider,usePageStore}from"./contexts/PageContext.js";export{CollectionProvider,useCollectionStore}from"./contexts/CollectionContext.js";export{ModalProvider,useModalStore}from"./contexts/ModalContext.js";export{PageViewUpDocument}from"./graphql/mutations/page-view-up.generated.js";export{CollectionDetailFilterDocument}from"./graphql/queries/collection-detail-filter.generated.js";export{CollectionDocument}from"./graphql/queries/collection.generated.js";export{CollectionsDocument}from"./graphql/queries/collections.generated.js";export{PublishedThemePagesDocument}from"./graphql/queries/published-theme-pages.generated.js";export{ProductsDocument}from"./graphql/queries/products.generated.js";export{StorePropertyDocument}from"./graphql/queries/store-property.generated.js";export{PreviewPageDocument}from"./graphql/queries/preview-page.generated.js";export{LibraryTemplateDocument}from"./graphql-app-api/queries/LibraryTemplate.generated.js";export{ThemePageDocument}from"./graphql-app-api/queries/ThemePage.generated.js";export{SaleFunnelDiscountsDocument}from"./graphql-app-api/queries/SaleFunnelDiscounts.generated.js";export{composeBorderCss,getBorderStyle,handleConvertBorderColor,handleConvertBorderStyle,handleConvertBorderWidth,handleConvertClassColor,handleConvertClassColorDynamicBtn}from"./helpers/borders.js";export{getCarouselContainerHeight,makeContainerWidthOrHeight,makeDotGapToCarouselStyle}from"./helpers/carousel.js";export{cls}from"./helpers/cls.js";export{flattenConnection}from"./helpers/flatten-connection.js";export{getResponsiveStateValue,getResponsiveValue,getResponsiveValueByScreen,isColumnDirectionExist}from"./helpers/get-resonsive-value.js";export{getShortName}from"./helpers/get-shortname.js";export{default as globalEvent}from"./helpers/GlobalEvent.js";export{default as isBrowser}from"./helpers/is-browser.js";export{default as isSafari}from"./helpers/is-safari.js";export{isEmptyChildren}from"./helpers/is-empty-children.js";export{filterToolbarPreview}from"./helpers/filter-toolbar-preview.js";export{animations}from"./helpers/animations.js";export{makeAspectRatio,makeGlobalSizeHeightResponsive,makeGlobalSizeWidthResponsive,makeHeight,makeLineClamp,makeStyle,makeStyleKey,makeStyleResponsive,makeStyleResponsiveByScreen,makeStyleResponsiveState,makeStyleState,makeWidth,removeNullUndefined}from"./helpers/make-style.js";export{normalizeBuilderData}from"./helpers/normalize-builder-data.js";export{prefetchQueries}from"./helpers/prefetch-queries.js";export{composeSpacing,getSpacingVariable}from"./helpers/spacing.js";export{loadScript}from"./helpers/load-script.js";export{validateEmail}from"./helpers/email.js";export{genVariable}from"./helpers/css-variable.js";export{composeGridLayout,convertOldLayout,gridToArrayRegex,optionLayoutStyle}from"./helpers/layout.js";export{isDefined}from"./helpers/is-defined.js";export{composeTextColorCss,getGlobalColorCSSProp,getGlobalColorClass,getGlobalColorResponsiveClass,getGlobalColorResponsiveStyle,getGlobalColorStateClass,getGlobalColorStateClassDynamicBtn,getGlobalColorStateResponsiveClass,getGlobalColorStateResponsiveClassDynamicBtn,getGlobalColorStateResponsiveStyle,getGlobalColorStateStyle,getGlobalColorStyle,getSingleColorVariable,isColor}from"./helpers/colors.js";export{composeFallbackTypographyStyle,composeTypography,composeTypographyAttr,composeTypographyClassName,composeTypographyCss,composeTypographyStyle,composeTypographyV2,composeTypographyV2Css,genTypoClass}from"./helpers/typography.js";export{composeCornerCss,composeRadius,composeRadiusResponsive,getCornerCSSFromGlobal,getCustomRadius,getRadiusCSSFromGlobal,getRadiusStyleActiveState}from"./helpers/radius.js";export{checkAvailableVariantInStock,getSelectedVariant,parseSelectedOption}from"./helpers/product.js";import*as e from"./helpers/tracking/fpixel.js";import*as o from"./helpers/tracking/gtag.js";import*as t from"./helpers/tracking/tiktokpixel.js";export{RenderIf,composeMemo,dataStringify,props,styles,template}from"./helpers/render.js";export{baseAssetURL,isLocalEnv}from"./helpers/convert.js";export{composeSize,composeSizeCss,genSizeClass,getAspectRatioGlobalSize,getGlobalSizeGap,getHeightByShapeGlobalSize,getPaddingGlobalSize,getWidthByShapeGlobalSize,getWidthHeightGlobalSize,makeGlobalSize,makeStyleWithDefault}from"./helpers/size.js";export{composeShadowCss,getStyleShadow,getStyleShadowState,parseValueWithUnit}from"./helpers/shadow.js";export{GRADIENT_BGR_KEY,composeBackgroundCss,getBgImageByDevice,getGradientBgrStyleByDevice,getGradientBgrStyleForButton,getStyleBackgroundByDevice,makeFixedBgAttachment}from"./helpers/background.js";export{generateCollectionQueryKey,generateProductQueryKey,generateProductsQueryKey}from"./helpers/query.js";export{composeAdvanceStyle,composeAdvanceStyleForPostPurchase,filterAttrInStyle,filterCornerInStyle,removeAttrInStyle,removePaddingYInStyle,splitStyle}from"./helpers/compose-advance-style.js";export{composePositionLineHeight,composePostionIconList}from"./helpers/icon-list.js";export{convertHTML}from"./helpers/covert-entities-html.js";export{useAddToCart}from"./hooks/cart/use-add-to-cart.js";export{useCartData}from"./hooks/cart/use-cart-data.js";export{useCartDiscountCodesUpdate}from"./hooks/cart/use-cart-discount-codes-update.js";export{useCartNoteUpdate}from"./hooks/cart/use-cart-note-update.js";export{useCreateCart}from"./hooks/cart/use-create-cart.js";export{useRemoveCartItem}from"./hooks/cart/use-remove-cart-item.js";export{useUpdateCartItem}from"./hooks/cart/use-update-cart-item.js";export{useCheckoutUrl,useConnectedShopify,useCurrency,useEditorMode,useIsSampleProduct,useIsStorefrontProduct,useLocale,useMatchMutate,useMobileOnly,useMoneyFormat,usePageType,usePluginEnable,useStoreFront,useSwatches}from"./hooks/shop.js";export{useCollectionQuery}from"./hooks/shop/use-collection-query.js";export{useCollectionsQuery}from"./hooks/shop/use-collections-query.js";export{useProductQuery}from"./hooks/shop/use-product-query.js";export{useProductsQuery,useProductsQueryAll}from"./hooks/shop/use-products-query.js";export{useCurrentDevice}from"./hooks/use-current-device.js";export{shopifyPriceRounding,useFormatMoney}from"./hooks/useFormatMoney.js";export{useLazyVideo}from"./hooks/use-lazy-video.js";export{default as useCartId}from"./hooks/useCartId.js";export{default as useCartLine}from"./hooks/useCartLine.js";export{default as useCartUI}from"./hooks/useCartUI.js";export{useCollection}from"./hooks/useCollection.js";export{useId}from"react";export{default as useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect.js";export{default as useLoadScript}from"./hooks/useLoadScript.js";export{default as useMoney}from"./hooks/useMoney.js";export{usePrevious}from"./hooks/usePrevious.js";export{useCheckAvailableVariantInStock,useCurrentVariant,useCurrentVariantInStock,useFeaturedImageGlobal,useIsSyncProduct,useProduct,useProductOfferDiscount,useProductProperties,useQuantity,useSelectedOption,useUniqProductID,useVariant,useVariantOutStock,useVariants}from"./hooks/useProduct.js";export{useProductList,useProductListProducts,useProductListSettings,useProductListStyles}from"./hooks/useProductList.js";export{default as useSuspenseFetch}from"./hooks/useSuspenseFetch.js";export{default as useSwatchesOptions}from"./hooks/useSwatchesOptions.js";export{default as useInitialSwatchesOptions}from"./hooks/useInitialSwatchesOptions.js";import*as r from"./types/shop.js";import*as s from"./types/appAPI.js";export{OptionNormalStyle,OptionSpecialStyle}from"./types/global-style.js";export{AnimationDirectionType,AnimationEasingType,AnimationSetting,AnimationTriggerType,AnimationType,AnimationZoomDirectionType}from"./types/animations.js";export{calculateFirstProduct,getCollection}from"./helpers/queries/get-collection.js";export{fetchMedias,fetchVariants,getProduct}from"./helpers/queries/get-product.js";export{getProductBySlug}from"./helpers/queries/get-product-by-slug.js";export{e as fpixel,o as gtag,t as tiktokpixel,r as ShopType,s as AppAPIType};
1
+ export{default as AddOn}from"./components/AddOn.js";export{default as Render}from"./components/Render.js";export{default as RenderPreview}from"./components/RenderPreview.js";export{RenderChildren,default as RenderLiquid,WrapRenderChildren}from"./components/Render.liquid.js";export{AddonProvider,useAddon,useAddons}from"./contexts/AddonContext.js";export{BuilderComponentProvider,useBuilderComponent}from"./contexts/BuilderComponent.js";export{BuilderProvider,useBuilderStore}from"./contexts/BuilderContext.js";export{BuilderPreviewProvider,useBuilderPreviewStore}from"./contexts/BuilderPreviewContext.js";export{CartLineProvider,useCartLineStore}from"./contexts/CartLineContext.js";export{ProductListProvider,useProductListStore}from"./contexts/ProductListContext.js";export{ProductProvider,useProductStore}from"./contexts/ProductContext.js";export{SectionProvider,useSection,useSectionStore}from"./contexts/SectionContext.js";export{ShopProvider,useShopStore}from"./contexts/ShopContext.js";export{PageProvider,usePageStore}from"./contexts/PageContext.js";export{CollectionProvider,useCollectionStore}from"./contexts/CollectionContext.js";export{ModalProvider,useModalStore}from"./contexts/ModalContext.js";export{PageViewUpDocument}from"./graphql/mutations/page-view-up.generated.js";export{CollectionDetailFilterDocument}from"./graphql/queries/collection-detail-filter.generated.js";export{CollectionDocument}from"./graphql/queries/collection.generated.js";export{CollectionsDocument}from"./graphql/queries/collections.generated.js";export{PublishedThemePagesDocument}from"./graphql/queries/published-theme-pages.generated.js";export{ProductsDocument}from"./graphql/queries/products.generated.js";export{StorePropertyDocument}from"./graphql/queries/store-property.generated.js";export{PreviewPageDocument}from"./graphql/queries/preview-page.generated.js";export{LibraryTemplateDocument}from"./graphql-app-api/queries/LibraryTemplate.generated.js";export{ThemePageDocument}from"./graphql-app-api/queries/ThemePage.generated.js";export{SaleFunnelDiscountsDocument}from"./graphql-app-api/queries/SaleFunnelDiscounts.generated.js";export{composeBorderCss,getBorderStyle,handleConvertBorderColor,handleConvertBorderStyle,handleConvertBorderWidth,handleConvertClassColor,handleConvertClassColorDynamicBtn}from"./helpers/borders.js";export{getCarouselContainerHeight,makeContainerWidthOrHeight,makeDotGapToCarouselStyle}from"./helpers/carousel.js";export{cls}from"./helpers/cls.js";export{animations}from"./helpers/animations.js";export{filterToolbarPreview}from"./helpers/filter-toolbar-preview.js";export{flattenConnection}from"./helpers/flatten-connection.js";export{getResponsiveStateValue,getResponsiveValue,getResponsiveValueByScreen,isColumnDirectionExist}from"./helpers/get-resonsive-value.js";export{getShortName}from"./helpers/get-shortname.js";export{default as globalEvent}from"./helpers/GlobalEvent.js";export{default as isBrowser}from"./helpers/is-browser.js";export{isEmptyChildren}from"./helpers/is-empty-children.js";export{default as isSafari}from"./helpers/is-safari.js";export{normalizeBuilderData}from"./helpers/normalize-builder-data.js";export{prefetchQueries}from"./helpers/prefetch-queries.js";export{GRADIENT_BGR_KEY,composeBackgroundCss,getBgImageByDevice,getGradientBgrStyleByDevice,getGradientBgrStyleForButton,getStyleBackgroundByDevice,makeFixedBgAttachment}from"./helpers/background.js";export{composeTextColorCss,getGlobalColorCSSProp,getGlobalColorClass,getGlobalColorResponsiveClass,getGlobalColorResponsiveStyle,getGlobalColorStateClass,getGlobalColorStateClassDynamicBtn,getGlobalColorStateResponsiveClass,getGlobalColorStateResponsiveClassDynamicBtn,getGlobalColorStateResponsiveStyle,getGlobalColorStateStyle,getGlobalColorStyle,getSingleColorVariable,isColor}from"./helpers/colors.js";export{composeAdvanceStyle,composeAdvanceStyleForPostPurchase,filterAttrInStyle,filterCornerInStyle,removeAttrInStyle,removePaddingYInStyle,splitStyle}from"./helpers/compose-advance-style.js";export{baseAssetURL,isLocalEnv}from"./helpers/convert.js";export{convertHTML}from"./helpers/covert-entities-html.js";export{composePositionLineHeight,composePostionIconList}from"./helpers/icon-list.js";export{isDefined}from"./helpers/is-defined.js";export{composeGridLayout,convertOldLayout,gridToArrayRegex,optionLayoutStyle}from"./helpers/layout.js";export{makeAspectRatio,makeGlobalSizeHeightResponsive,makeGlobalSizeWidthResponsive,makeHeight,makeLineClamp,makeStyle,makeStyleKey,makeStyleResponsive,makeStyleResponsiveByScreen,makeStyleResponsiveState,makeStyleState,makeWidth,removeNullUndefined}from"./helpers/make-style.js";export{checkAvailableVariantInStock,getSelectedVariant,parseSelectedOption}from"./helpers/product.js";export{generateCollectionQueryKey,generateProductQueryKey,generateProductsQueryKey}from"./helpers/query.js";export{composeCornerCss,composeRadius,composeRadiusResponsive,getCornerCSSFromGlobal,getCustomRadius,getRadiusCSSFromGlobal,getRadiusStyleActiveState}from"./helpers/radius.js";export{RenderIf,composeMemo,dataStringify,props,removeUndefinedValuesFromObject,styles,template}from"./helpers/render.js";export{composeShadowCss,getStyleShadow,getStyleShadowState,parseValueWithUnit}from"./helpers/shadow.js";export{composeSize,composeSizeCss,genSizeClass,getAspectRatioGlobalSize,getGlobalSizeGap,getHeightByShapeGlobalSize,getPaddingGlobalSize,getWidthByShapeGlobalSize,getWidthHeightGlobalSize,makeGlobalSize,makeStyleWithDefault}from"./helpers/size.js";export{composeFallbackTypographyStyle,composeTypography,composeTypographyAttr,composeTypographyClassName,composeTypographyCss,composeTypographyStyle,composeTypographyV2,composeTypographyV2Css,genTypoClass}from"./helpers/typography.js";export{validateEmail}from"./helpers/email.js";export{loadScript}from"./helpers/load-script.js";export{composeSpacing,getSpacingVariable}from"./helpers/spacing.js";export{genVariable}from"./helpers/css-variable.js";import*as e from"./helpers/tracking/fpixel.js";import*as o from"./helpers/tracking/gtag.js";import*as t from"./helpers/tracking/tiktokpixel.js";export{useAddToCart}from"./hooks/cart/use-add-to-cart.js";export{useCartData}from"./hooks/cart/use-cart-data.js";export{useCartDiscountCodesUpdate}from"./hooks/cart/use-cart-discount-codes-update.js";export{useCartNoteUpdate}from"./hooks/cart/use-cart-note-update.js";export{useCreateCart}from"./hooks/cart/use-create-cart.js";export{useRemoveCartItem}from"./hooks/cart/use-remove-cart-item.js";export{useUpdateCartItem}from"./hooks/cart/use-update-cart-item.js";export{useCheckoutUrl,useConnectedShopify,useCurrency,useEditorMode,useIsSampleProduct,useIsStorefrontProduct,useLocale,useMatchMutate,useMobileOnly,useMoneyFormat,usePageType,usePluginEnable,useStoreFront,useSwatches}from"./hooks/shop.js";export{useCollectionQuery}from"./hooks/shop/use-collection-query.js";export{useCollectionsQuery}from"./hooks/shop/use-collections-query.js";export{useProductQuery}from"./hooks/shop/use-product-query.js";export{useProductsQuery,useProductsQueryAll}from"./hooks/shop/use-products-query.js";export{useCurrentDevice}from"./hooks/use-current-device.js";export{shopifyPriceRounding,useFormatMoney}from"./hooks/useFormatMoney.js";export{useLazyVideo}from"./hooks/use-lazy-video.js";export{default as useCartId}from"./hooks/useCartId.js";export{default as useCartLine}from"./hooks/useCartLine.js";export{default as useCartUI}from"./hooks/useCartUI.js";export{useCollection}from"./hooks/useCollection.js";export{useId}from"react";export{default as useIsomorphicLayoutEffect}from"./hooks/useIsomorphicLayoutEffect.js";export{default as useLoadScript}from"./hooks/useLoadScript.js";export{default as useMoney}from"./hooks/useMoney.js";export{usePrevious}from"./hooks/usePrevious.js";export{useCheckAvailableVariantInStock,useCurrentVariant,useCurrentVariantInStock,useFeaturedImageGlobal,useIsSyncProduct,useProduct,useProductOfferDiscount,useProductProperties,useQuantity,useSelectedOption,useUniqProductID,useVariant,useVariantOutStock,useVariants}from"./hooks/useProduct.js";export{useProductList,useProductListProducts,useProductListSettings,useProductListStyles}from"./hooks/useProductList.js";export{default as useSuspenseFetch}from"./hooks/useSuspenseFetch.js";export{default as useSwatchesOptions}from"./hooks/useSwatchesOptions.js";export{default as useInitialSwatchesOptions}from"./hooks/useInitialSwatchesOptions.js";import*as r from"./types/shop.js";import*as s from"./types/appAPI.js";export{OptionNormalStyle,OptionSpecialStyle}from"./types/global-style.js";export{AnimationDirectionType,AnimationEasingType,AnimationSetting,AnimationTriggerType,AnimationType,AnimationZoomDirectionType}from"./types/animations.js";export{calculateFirstProduct,getCollection}from"./helpers/queries/get-collection.js";export{fetchMedias,fetchVariants,getProduct}from"./helpers/queries/get-product.js";export{getProductBySlug}from"./helpers/queries/get-product-by-slug.js";export{e as fpixel,o as gtag,t as tiktokpixel,r as ShopType,s as AppAPIType};
@@ -7377,6 +7377,10 @@ type VariantSwatchesPresetControlType<T> = SharedControlType<T> & {
7377
7377
  id?: string;
7378
7378
  type: 'variant:presets';
7379
7379
  };
7380
+ type VariantSwatchesOnlyDefaultVariantControlType<T> = SharedControlType<T> & {
7381
+ id?: string;
7382
+ type: 'variant:default';
7383
+ };
7380
7384
 
7381
7385
  type LayoutControlType<T> = SharedControlType<T> & {
7382
7386
  type: 'layout';
@@ -7691,7 +7695,7 @@ type PostPurchaseTextareaControlType<T> = SharedControlType<T> & {
7691
7695
  }[];
7692
7696
  };
7693
7697
 
7694
- type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | BackgroundColorPickerType<T> | ProductInputCurrencyUnitControlType<T> | TypographyPostPurchaseControlType<T> | ProductOffersControlType<T> | DiscountAndShippingFee<T> | SneakPeakControlType<T> | PostPurchaseTextareaControlType<T>;
7698
+ type ControlProp<T> = AngleControlType<T> | CheckboxControlType<T> | ColorPickerControlType<T> | GroupControlType<T> | IconControlType<T> | InputFixContentControlType<T> | InputNumberControlType<T> | InputUnitControlType<T> | InputUnitSpacingControlType<T> | InputUnitWidthControlType<T> | InputControlType<T> | MarginControlType<T> | PaddingControlType<T> | PositionControlType<T> | RadioGroupControlType | RangeControlType<T> | SegmentControlType<T> | SelectControlType<T> | TextareaControlType<T> | ToggleControlType<T> | ImageControlType<T> | ChildrensControlType | GridControlType<T> | FlexControlType<T> | TextEditorControlType<T> | ProductControlType<T> | TypographyControlType<T> | TypographyV2ControlType<T> | MenuControlType<T> | BehaviorStateControlType<T> | PickLinkControlType<T> | BoxShadowControlType<T> | TextShadowControlType<T> | BorderControlType<T> | BorderRadiusControlType<T> | RadiusPresetControlType<T> | SizeControlType<T> | ChildItemType<T> | PickMultiProductControlType<T> | CollectionControlType<T> | BackgroundControlType<T> | VisibilityControlType<T> | SelectVariantControlType | CountdownEvergreenType | Timezone<T> | CustomContentControlType<T> | DateTimePickerControlType | CountdownDailyType | KlaviyoCodes | YotpoLoyaltyCodes | InputWidthControlType<T> | LayoutSegmentControlType<T> | InputSpacing<T> | UniqueIdControlType<T> | PositionSquareControlType<T> | CustomCodeEditor | LayoutControlType<T> | LayoutBannerControlType<T> | SwatchesLinkControlType<T> | VariantSwatchesPresetControlType<T> | VariantSwatchesOnlyDefaultVariantControlType<T> | ProductListControlType<T> | CollectionBannerControlType<T> | Ratio<T> | StickyDisplayControlType<T> | SyncProductPropertiesControlType<T> | StepsGuide<T> | ImageShape<T> | GridArrange<T> | SizeSetting$1<T> | ChildIconType<T> | DropdownInput<T> | Dropdown<T> | AliPickSectionControlType<T> | ParallaxScrollingType<T> | PlayPauseControlType<T> | LayoutCustomSegmentControlType<T> | SneakPeakRange<T> | SneakPeakTypeControlType<T> | BackgroundColorPickerType<T> | ProductInputCurrencyUnitControlType<T> | TypographyPostPurchaseControlType<T> | ProductOffersControlType<T> | DiscountAndShippingFee<T> | SneakPeakControlType<T> | PostPurchaseTextareaControlType<T>;
7695
7699
  type ControlTriggerAction = {
7696
7700
  controlId: string;
7697
7701
  newValue?: any;
@@ -26783,6 +26787,15 @@ type ClassValue = ClassDictionary | string | null | undefined;
26783
26787
  type ClassDictionary = Record<string, boolean | undefined | null>;
26784
26788
  declare function cls(...classes: ClassValue[]): string;
26785
26789
 
26790
+ declare const animations: () => {
26791
+ zoom: (target: Element, options: AnimationSettingType) => Animation;
26792
+ shake: (target: Element, options: AnimationSettingType) => Animation;
26793
+ fade: (target: Element, options: AnimationSettingType) => Animation;
26794
+ slide: (target: Element, options: AnimationSettingType) => Animation;
26795
+ };
26796
+
26797
+ declare const filterToolbarPreview: (children: React.ReactNode, keep?: boolean) => React.ReactNode;
26798
+
26786
26799
  /**
26787
26800
  * The `flattenConnection` utility transforms a connection object from the Storefront API (for example, [Product-related connections](api/storefront/reference/products/product#connections)) into a flat array of nodes.
26788
26801
  */
@@ -26803,43 +26816,9 @@ declare const globalEvent: {
26803
26816
 
26804
26817
  declare function isBrowser(): boolean;
26805
26818
 
26806
- declare function isSafari(): boolean;
26807
-
26808
26819
  declare const isEmptyChildren: (children: React.ReactNode) => boolean;
26809
26820
 
26810
- declare const filterToolbarPreview: (children: React.ReactNode, keep?: boolean) => React.ReactNode;
26811
-
26812
- declare const animations: () => {
26813
- zoom: (target: Element, options: AnimationSettingType) => Animation;
26814
- shake: (target: Element, options: AnimationSettingType) => Animation;
26815
- fade: (target: Element, options: AnimationSettingType) => Animation;
26816
- slide: (target: Element, options: AnimationSettingType) => Animation;
26817
- };
26818
-
26819
- type ResponsiveKey<T extends ShortHandProperty> = `--${T}` | `--${T}-tablet` | `--${T}-mobile`;
26820
- declare const removeNullUndefined: <T extends Record<string, any>>(obj: T) => T;
26821
- declare const makeStyleKey: <T extends ShortHandProperty>(name: T) => string[];
26822
- declare const makeStyle: <T extends ShortHandProperty, K>(style: Record<T, K>) => {
26823
- [k: string]: Record<`--${T}`, K>;
26824
- };
26825
- declare const makeStyleState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<StateType, K>> | undefined) => {};
26826
- declare const makeStyleResponsiveState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, Partial<Record<StateType, K>>>> | undefined) => {};
26827
- declare const makeStyleResponsive: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
26828
- declare const makeStyleResponsiveByScreen: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
26829
- declare const makeWidth: (widthValue?: ObjectDevices<string | number>, fullWidthValue?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
26830
- declare const makeGlobalSizeWidthResponsive: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
26831
- '--w': string | undefined;
26832
- '--w-tablet': string | undefined;
26833
- '--w-mobile': string | undefined;
26834
- };
26835
- declare const makeGlobalSizeHeightResponsive: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
26836
- '--h': string | undefined;
26837
- '--h-tablet': string | undefined;
26838
- '--h-mobile': string | undefined;
26839
- };
26840
- declare const makeHeight: (heighValue?: ObjectDevices<string | number>, autoHeight?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
26841
- declare const makeAspectRatio: (aspectRatio?: ObjectDevices<string>, aspectWidth?: ObjectDevices<string | number>, aspectHeight?: ObjectDevices<string | number>) => ObjectDevices<string>;
26842
- declare const makeLineClamp: (lineClampValue?: ObjectDevices<number>, hasLineClampValue?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
26821
+ declare function isSafari(): boolean;
26843
26822
 
26844
26823
  declare function normalizeBuilderData(data: BuilderEntityNested): {
26845
26824
  [x: string]: BuilderEntity;
@@ -26856,24 +26835,26 @@ declare const prefetchQueries: (input: BuilderState, options?: {
26856
26835
  isStorefront?: boolean;
26857
26836
  }) => Result[];
26858
26837
 
26859
- declare function getSpacingVariable(key?: SpacingType): string;
26860
- declare const composeSpacing: (spacingValue?: ObjectDevices<SpacingType>) => React.CSSProperties;
26861
-
26862
- declare function loadScript(src: string, options?: {
26863
- module?: boolean;
26864
- in?: 'head' | 'body';
26865
- }): Promise<boolean>;
26866
-
26867
- declare const validateEmail: (email: string) => boolean;
26868
-
26869
- declare const genVariable: (variableName: string) => string;
26870
-
26871
- declare const gridToArrayRegex: RegExp;
26872
- declare const optionLayoutStyle: (column?: ObjectDevices<string | number>) => React.CSSProperties;
26873
- declare const composeGridLayout: (layout?: ObjectDevices<ObjectLayoutValue>) => React.CSSProperties;
26874
- declare const convertOldLayout: (layout?: ObjectDevices<string>) => ObjectDevices<ObjectLayoutValue>;
26875
-
26876
- declare function isDefined<T>(argument: T | undefined): argument is T;
26838
+ type Devices = 'desktop' | 'tablet' | 'mobile';
26839
+ type Options = {
26840
+ liquid?: boolean;
26841
+ ignoreBgAttachment?: boolean;
26842
+ ignoreBackgroundImage?: boolean;
26843
+ };
26844
+ declare const getStyleBackgroundByDevice: (background?: ObjectDevices<Background>, options?: Options) => {};
26845
+ declare const getBgImageByDevice: (background: ObjectDevices<Background>, device: Devices, options?: Options) => string | undefined;
26846
+ declare const composeBackgroundCss: (backgroundColor?: ColorValueType) => string;
26847
+ declare const makeFixedBgAttachment: (background?: ObjectDevices<Background>) => {
26848
+ wrapper: {
26849
+ [x: string]: string;
26850
+ };
26851
+ content: {
26852
+ [x: string]: string | undefined;
26853
+ };
26854
+ } | undefined;
26855
+ declare const GRADIENT_BGR_KEY = "linear-gradient";
26856
+ declare const getGradientBgrStyleForButton: (backgroundStyle: Partial<Record<StateType, ColorValueType>> | undefined) => {} | undefined;
26857
+ declare const getGradientBgrStyleByDevice: (backgroundStyle: Partial<Record<Devices, Background>> | undefined) => {} | undefined;
26877
26858
 
26878
26859
  type ColorType = 'bg' | 'text' | 'border' | 'decoration';
26879
26860
  type ColorProp = 'bgc' | 'bc' | 'c' | 'bg';
@@ -26892,16 +26873,11 @@ declare function isColor(color: string): boolean;
26892
26873
  declare const getGlobalColorStyle: (data?: ColorValueType) => React.CSSProperties;
26893
26874
  declare const composeTextColorCss: (color?: ColorValueType) => string;
26894
26875
 
26895
- type TypographyClass = `gp-g-${TypographyType}`;
26896
- declare const genTypoClass: (name: TypographyType) => TypographyClass;
26897
- declare const composeTypographyCss: (typography: TypographySetting | undefined) => string;
26898
- declare const composeTypographyV2Css: (typography: TypographySettingV2 | undefined, isImportant?: boolean) => string;
26899
- declare const composeTypography: (typography?: ObjectDevices<TypographyProps>) => React.CSSProperties;
26900
- declare const composeTypographyV2: (value?: TypographyV2Props, attrs?: TypographyV2Attrs) => React.CSSProperties;
26901
- declare const composeTypographyAttr: (attrs?: TypographyV2Attrs) => React.CSSProperties;
26902
- declare const composeTypographyClassName: (typo?: TypographySettingV2, typography?: TypographySetting) => "" | "gp-g-heading-1" | "gp-g-heading-2" | "gp-g-heading-3" | "gp-g-subheading-1" | "gp-g-subheading-2" | "gp-g-subheading-3" | "gp-g-paragraph-1" | "gp-g-paragraph-2" | "gp-g-paragraph-3" | undefined;
26903
- declare const composeFallbackTypographyStyle: (tag: string) => "var(--g-font-heading, heading)" | "var(--g-font-body, body)";
26904
- declare const composeTypographyStyle: (typo?: TypographySettingV2, typography?: TypographySetting, disableAttr?: boolean) => {
26876
+ type AdvanceValue = Primitive | ObjectDevices<Primitive>;
26877
+ declare const composeAdvanceStyleForPostPurchase: (data?: Record<string, AdvanceValue>, tag?: string) => React.CSSProperties;
26878
+ declare function composeAdvanceStyle(data?: Record<string, AdvanceValue>, tag?: string, pageType?: PublishedThemePageType$1): React.CSSProperties;
26879
+ declare const splitStyle: (keys: ShortHandProperty[], style?: React.CSSProperties) => React.CSSProperties[];
26880
+ declare const filterAttrInStyle: (style?: React.CSSProperties, filterKeys?: string[]) => {
26905
26881
  [x: string]: any;
26906
26882
  '--ai'?: csstype.Property.AlignItems | undefined;
26907
26883
  '--hvr-ai'?: csstype.Property.AlignItems | undefined;
@@ -28396,184 +28372,7 @@ declare const composeTypographyStyle: (typo?: TypographySettingV2, typography?:
28396
28372
  textAnchor?: csstype.Property.TextAnchor | undefined;
28397
28373
  vectorEffect?: csstype.Property.VectorEffect | undefined;
28398
28374
  };
28399
-
28400
- declare const getCornerCSSFromGlobal: (corner?: CornerRadius) => React.CSSProperties;
28401
- declare const getRadiusCSSFromGlobal: (state: StateType, key?: RoundedSize, device?: NameDevices$1) => React.CSSProperties;
28402
- declare const getCustomRadius: (state: StateType, radius?: CornerRadius, device?: NameDevices$1) => React.CSSProperties;
28403
- declare const composeRadius: (value?: StateProp<CornerRadius> | ResponsiveStateProp<CornerRadius>) => React.CSSProperties;
28404
- declare const composeRadiusResponsive: (radiusValue?: ObjectDevices<CornerRadius>) => React.CSSProperties;
28405
- declare const getRadiusStyleActiveState: (radiusValue?: StateProp<CornerRadius>) => React.CSSProperties;
28406
- declare const composeCornerCss: (value?: CornerRadius | undefined, important?: boolean) => string | undefined;
28407
-
28408
- declare function getSelectedVariant(variants?: Maybe$1<VariantSelectFragment>[], choices?: Record<string, string>, variantId?: string | null): Maybe$1<VariantSelectFragment>;
28409
- declare function parseSelectedOption(options: SelectedOption$1[]): SelectedOption$1 | undefined;
28410
- declare function checkAvailableVariantInStock(variants: Maybe$1<VariantSelectFragment>[] | undefined, optionId: string, optionValue: string): boolean;
28411
-
28412
- declare const pageview$1: () => void;
28413
- declare const event: (name: string, options?: {}) => void;
28414
- declare const addToCart$2: (product: ProductInputAnalytic) => void;
28415
-
28416
- declare const fpixel_event: typeof event;
28417
- declare namespace fpixel {
28418
- export {
28419
- addToCart$2 as addToCart,
28420
- fpixel_event as event,
28421
- pageview$1 as pageview,
28422
- };
28423
- }
28424
-
28425
- declare const pageview: (url: string, trackingId?: string | null) => void;
28426
- /** Addition to cart events
28427
- * https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
28428
- */
28429
- declare const addToCart$1: (product: ProductInputAnalytic) => void;
28430
- /** Product clicked event
28431
- * https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#product-click
28432
- */
28433
- declare const productClick: (product: ProductInputAnalytic) => void;
28434
- /** Product viewed event
28435
- * https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#measuring-actvities
28436
- */
28437
- declare const productDetail: (product: ProductInputAnalytic) => void;
28438
- /** Removal from cart events
28439
- * https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
28440
- */
28441
- declare const removeFromCart: (product: ProductInputAnalytic, price: number) => void;
28442
-
28443
- declare const gtag_pageview: typeof pageview;
28444
- declare const gtag_productClick: typeof productClick;
28445
- declare const gtag_productDetail: typeof productDetail;
28446
- declare const gtag_removeFromCart: typeof removeFromCart;
28447
- declare namespace gtag {
28448
- export {
28449
- addToCart$1 as addToCart,
28450
- gtag_pageview as pageview,
28451
- gtag_productClick as productClick,
28452
- gtag_productDetail as productDetail,
28453
- gtag_removeFromCart as removeFromCart,
28454
- };
28455
- }
28456
-
28457
- declare const addToCart: (product: ProductInputAnalytic) => void;
28458
-
28459
- declare const tiktokpixel_addToCart: typeof addToCart;
28460
- declare namespace tiktokpixel {
28461
- export {
28462
- tiktokpixel_addToCart as addToCart,
28463
- };
28464
- }
28465
-
28466
- type CallbackCondition = () => string;
28467
- declare const RenderIf: (c: boolean | null | undefined, t: string | CallbackCondition, f?: string | CallbackCondition) => string;
28468
- declare const props: (strings: any, ...keys: any[]) => string;
28469
- declare const styles: (strings: any, ...keys: any[]) => string;
28470
- declare const dataStringify: (obj: object) => string;
28471
- declare const template: (strings: any, ...keys: any[]) => string;
28472
- declare const composeMemo: <T>(fn: () => T, _?: any[]) => T;
28473
-
28474
- declare const isLocalEnv: boolean;
28475
- declare const baseAssetURL: string;
28476
-
28477
- declare const composeSize: (size?: ObjectDevices<SizeProps>) => React.CSSProperties;
28478
- declare function genSizeClass(name: string): string;
28479
- declare const composeSizeCss: (spacing?: SizeSetting) => string | undefined;
28480
- declare const makeGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
28481
- width: Record<ResponsiveKey<"w">, string | number>;
28482
- height: Record<ResponsiveKey<"h">, string | number>;
28483
- padding: React.CSSProperties;
28484
- gap: {
28485
- '--gg': string | undefined;
28486
- '--gg-tablet': string | undefined;
28487
- '--gg-mobile': string | undefined;
28488
- };
28489
- };
28490
- declare const getGlobalSizeGap: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
28491
- '--gg': string | undefined;
28492
- '--gg-tablet': string | undefined;
28493
- '--gg-mobile': string | undefined;
28494
- };
28495
- declare const makeStyleWithDefault: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, K>> | undefined, defaultVal?: Partial<Record<NameDevices$1, K>> | undefined) => Record<ResponsiveKey<T>, K>;
28496
- declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string | number>>;
28497
- declare const getHeightByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string>>;
28498
- declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean) => Partial<Record<NameDevices$1, string>>;
28499
- declare const getAspectRatioGlobalSize: (shape?: ObjectDevices<SizeSettingGlobal>) => ObjectDevices<string>;
28500
- declare const getPaddingGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => React.CSSProperties;
28501
-
28502
- declare const parseValueWithUnit: (valueWithUnit: string) => any;
28503
- declare const getStyleShadow: (shadowStyle: ShadowStyle, isActiveState?: boolean) => {
28504
- [x: string]: string;
28505
- };
28506
- declare const getStyleShadowState: (shadow?: StateProp<ShadowProps>, styleAppliedFor?: ShadowStyleApplied, isEnableShadow?: StateProp<boolean>) => React.CSSProperties;
28507
- declare const composeShadowCss: ({ hasBoxShadow, boxShadowValue, important, }: {
28508
- hasBoxShadow?: boolean | undefined;
28509
- boxShadowValue?: ShadowProps | undefined;
28510
- important?: boolean | undefined;
28511
- }) => string | undefined;
28512
-
28513
- type Devices = 'desktop' | 'tablet' | 'mobile';
28514
- type Options = {
28515
- liquid?: boolean;
28516
- ignoreBgAttachment?: boolean;
28517
- ignoreBackgroundImage?: boolean;
28518
- };
28519
- declare const getStyleBackgroundByDevice: (background?: ObjectDevices<Background>, options?: Options) => {};
28520
- declare const getBgImageByDevice: (background: ObjectDevices<Background>, device: Devices, options?: Options) => string | undefined;
28521
- declare const composeBackgroundCss: (backgroundColor?: ColorValueType) => string;
28522
- declare const makeFixedBgAttachment: (background?: ObjectDevices<Background>) => {
28523
- wrapper: {
28524
- [x: string]: string;
28525
- };
28526
- content: {
28527
- [x: string]: string | undefined;
28528
- };
28529
- } | undefined;
28530
- declare const GRADIENT_BGR_KEY = "linear-gradient";
28531
- declare const getGradientBgrStyleForButton: (backgroundStyle: Partial<Record<StateType, ColorValueType>> | undefined) => {} | undefined;
28532
- declare const getGradientBgrStyleByDevice: (backgroundStyle: Partial<Record<Devices, Background>> | undefined) => {} | undefined;
28533
-
28534
- type OrderByType = 'TITLE_ASC' | 'TITLE_DESC' | 'CREATED_AT_ASC' | 'none' | 'CREATED_AT_DESC';
28535
- type FetchCollectionArgs = {
28536
- id?: string;
28537
- numberOfProducts?: number;
28538
- orderBy?: OrderByType;
28539
- isSample?: boolean;
28540
- isStorefront?: boolean;
28541
- };
28542
- declare const getCollection: (fetcher: FetchFunc, arg: FetchCollectionArgs) => Promise<CollectionDetailFilterQueryResponse>;
28543
- declare const calculateFirstProduct: (numberOfProducts: number, currentPage: number, productsPerPage: number) => number;
28544
-
28545
- type FetchProductParams = {
28546
- id?: string;
28547
- isSample?: boolean;
28548
- isStorefront?: boolean;
28549
- };
28550
- declare const getProduct: (fetcher: FetchFunc, { id, isSample, isStorefront }: FetchProductParams) => Promise<ProductSelectFragment>;
28551
- type RequiredCursorEdge<T> = {
28552
- cursor: string;
28553
- node?: T;
28554
- };
28555
- declare const fetchVariants: (fetcher: FetchFunc, { id, isSample, isStorefront }: FetchProductParams) => Promise<RequiredCursorEdge<VariantSelectFragment>[]>;
28556
- declare const fetchMedias: (fetcher: FetchFunc, { id, isSample, isStorefront }: FetchProductParams) => Promise<(Pick<MediaEdge$1, "cursor"> & {
28557
- node?: Maybe$1<Pick<Media$1, "id" | "width" | "height" | "src" | "alt" | "contentType" | "previewImage">>;
28558
- })[]>;
28559
-
28560
- type FetchProductsParams = {
28561
- ids: string[];
28562
- isSample?: boolean;
28563
- isStorefront?: boolean;
28564
- defaultSelectedProductCount?: number;
28565
- allStatus?: boolean;
28566
- };
28567
-
28568
- declare const generateProductQueryKey: (args: FetchProductParams) => ['query/product', FetchProductParams];
28569
- declare const generateCollectionQueryKey: (args: FetchCollectionArgs) => ['query/collection', FetchCollectionArgs];
28570
- declare const generateProductsQueryKey: (args: FetchProductsParams) => ['query/products', FetchProductsParams];
28571
-
28572
- type AdvanceValue = Primitive | ObjectDevices<Primitive>;
28573
- declare const composeAdvanceStyleForPostPurchase: (data?: Record<string, AdvanceValue>, tag?: string) => React.CSSProperties;
28574
- declare function composeAdvanceStyle(data?: Record<string, AdvanceValue>, tag?: string, pageType?: PublishedThemePageType$1): React.CSSProperties;
28575
- declare const splitStyle: (keys: ShortHandProperty[], style?: React.CSSProperties) => React.CSSProperties[];
28576
- declare const filterAttrInStyle: (style?: React.CSSProperties, filterKeys?: string[]) => {
28375
+ declare const removeAttrInStyle: (style?: React.CSSProperties, filterKeys?: string[]) => {
28577
28376
  [x: string]: any;
28578
28377
  '--ai'?: csstype.Property.AlignItems | undefined;
28579
28378
  '--hvr-ai'?: csstype.Property.AlignItems | undefined;
@@ -30068,7 +29867,7 @@ declare const filterAttrInStyle: (style?: React.CSSProperties, filterKeys?: stri
30068
29867
  textAnchor?: csstype.Property.TextAnchor | undefined;
30069
29868
  vectorEffect?: csstype.Property.VectorEffect | undefined;
30070
29869
  };
30071
- declare const removeAttrInStyle: (style?: React.CSSProperties, filterKeys?: string[]) => {
29870
+ declare const filterCornerInStyle: (style?: React.CSSProperties) => {
30072
29871
  [x: string]: any;
30073
29872
  '--ai'?: csstype.Property.AlignItems | undefined;
30074
29873
  '--hvr-ai'?: csstype.Property.AlignItems | undefined;
@@ -31563,7 +31362,7 @@ declare const removeAttrInStyle: (style?: React.CSSProperties, filterKeys?: stri
31563
31362
  textAnchor?: csstype.Property.TextAnchor | undefined;
31564
31363
  vectorEffect?: csstype.Property.VectorEffect | undefined;
31565
31364
  };
31566
- declare const filterCornerInStyle: (style?: React.CSSProperties) => {
31365
+ declare const removePaddingYInStyle: (style?: React.CSSProperties) => {
31567
31366
  [x: string]: any;
31568
31367
  '--ai'?: csstype.Property.AlignItems | undefined;
31569
31368
  '--hvr-ai'?: csstype.Property.AlignItems | undefined;
@@ -33058,7 +32857,164 @@ declare const filterCornerInStyle: (style?: React.CSSProperties) => {
33058
32857
  textAnchor?: csstype.Property.TextAnchor | undefined;
33059
32858
  vectorEffect?: csstype.Property.VectorEffect | undefined;
33060
32859
  };
33061
- declare const removePaddingYInStyle: (style?: React.CSSProperties) => {
32860
+
32861
+ declare const isLocalEnv: boolean;
32862
+ declare const baseAssetURL: string;
32863
+
32864
+ declare const convertHTML: (str: string) => string;
32865
+
32866
+ type NameDevices = 'desktop' | 'tablet' | 'mobile';
32867
+
32868
+ type PostionType = {
32869
+ wrapper?: Record<string, string | number>;
32870
+ content?: Record<string, string | number>;
32871
+ };
32872
+ declare const composePostionIconList: (lineHeight: string, position?: ObjectDevices<'center' | 'baseline'>, iconWidth?: ObjectDevices<number>) => PostionType;
32873
+ declare const composePositionLineHeight: ({ compose, lineHeight, device, position, iconWidth, }: {
32874
+ compose: PostionType;
32875
+ lineHeight: string;
32876
+ device: NameDevices;
32877
+ position?: Partial<Record<NameDevices$1, "center" | "baseline">> | undefined;
32878
+ iconWidth?: Partial<Record<NameDevices$1, number>> | undefined;
32879
+ }) => void;
32880
+
32881
+ declare function isDefined<T>(argument: T | undefined): argument is T;
32882
+
32883
+ declare const gridToArrayRegex: RegExp;
32884
+ declare const optionLayoutStyle: (column?: ObjectDevices<string | number>) => React.CSSProperties;
32885
+ declare const composeGridLayout: (layout?: ObjectDevices<ObjectLayoutValue>) => React.CSSProperties;
32886
+ declare const convertOldLayout: (layout?: ObjectDevices<string>) => ObjectDevices<ObjectLayoutValue>;
32887
+
32888
+ type ResponsiveKey<T extends ShortHandProperty> = `--${T}` | `--${T}-tablet` | `--${T}-mobile`;
32889
+ declare const removeNullUndefined: <T extends Record<string, any>>(obj: T) => T;
32890
+ declare const makeStyleKey: <T extends ShortHandProperty>(name: T) => string[];
32891
+ declare const makeStyle: <T extends ShortHandProperty, K>(style: Record<T, K>) => {
32892
+ [k: string]: Record<`--${T}`, K>;
32893
+ };
32894
+ declare const makeStyleState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<StateType, K>> | undefined) => {};
32895
+ declare const makeStyleResponsiveState: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, Partial<Record<StateType, K>>>> | undefined) => {};
32896
+ declare const makeStyleResponsive: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
32897
+ declare const makeStyleResponsiveByScreen: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, K>> | undefined, unit?: string) => Record<ResponsiveKey<T>, K>;
32898
+ declare const makeWidth: (widthValue?: ObjectDevices<string | number>, fullWidthValue?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
32899
+ declare const makeGlobalSizeWidthResponsive: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
32900
+ '--w': string | undefined;
32901
+ '--w-tablet': string | undefined;
32902
+ '--w-mobile': string | undefined;
32903
+ };
32904
+ declare const makeGlobalSizeHeightResponsive: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
32905
+ '--h': string | undefined;
32906
+ '--h-tablet': string | undefined;
32907
+ '--h-mobile': string | undefined;
32908
+ };
32909
+ declare const makeHeight: (heighValue?: ObjectDevices<string | number>, autoHeight?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
32910
+ declare const makeAspectRatio: (aspectRatio?: ObjectDevices<string>, aspectWidth?: ObjectDevices<string | number>, aspectHeight?: ObjectDevices<string | number>) => ObjectDevices<string>;
32911
+ declare const makeLineClamp: (lineClampValue?: ObjectDevices<number>, hasLineClampValue?: ObjectDevices<boolean>) => ObjectDevices<string | number | undefined>;
32912
+
32913
+ declare function getSelectedVariant(variants?: Maybe$1<VariantSelectFragment>[], choices?: Record<string, string>, variantId?: string | null): Maybe$1<VariantSelectFragment>;
32914
+ declare function parseSelectedOption(options: SelectedOption$1[]): SelectedOption$1 | undefined;
32915
+ declare function checkAvailableVariantInStock(variants: Maybe$1<VariantSelectFragment>[] | undefined, optionId: string, optionValue: string): boolean;
32916
+
32917
+ type OrderByType = 'TITLE_ASC' | 'TITLE_DESC' | 'CREATED_AT_ASC' | 'none' | 'CREATED_AT_DESC';
32918
+ type FetchCollectionArgs = {
32919
+ id?: string;
32920
+ numberOfProducts?: number;
32921
+ orderBy?: OrderByType;
32922
+ isSample?: boolean;
32923
+ isStorefront?: boolean;
32924
+ };
32925
+ declare const getCollection: (fetcher: FetchFunc, arg: FetchCollectionArgs) => Promise<CollectionDetailFilterQueryResponse>;
32926
+ declare const calculateFirstProduct: (numberOfProducts: number, currentPage: number, productsPerPage: number) => number;
32927
+
32928
+ type FetchProductParams = {
32929
+ id?: string;
32930
+ isSample?: boolean;
32931
+ isStorefront?: boolean;
32932
+ };
32933
+ declare const getProduct: (fetcher: FetchFunc, { id, isSample, isStorefront }: FetchProductParams) => Promise<ProductSelectFragment>;
32934
+ type RequiredCursorEdge<T> = {
32935
+ cursor: string;
32936
+ node?: T;
32937
+ };
32938
+ declare const fetchVariants: (fetcher: FetchFunc, { id, isSample, isStorefront }: FetchProductParams) => Promise<RequiredCursorEdge<VariantSelectFragment>[]>;
32939
+ declare const fetchMedias: (fetcher: FetchFunc, { id, isSample, isStorefront }: FetchProductParams) => Promise<(Pick<MediaEdge$1, "cursor"> & {
32940
+ node?: Maybe$1<Pick<Media$1, "id" | "width" | "height" | "src" | "alt" | "contentType" | "previewImage">>;
32941
+ })[]>;
32942
+
32943
+ type FetchProductsParams = {
32944
+ ids: string[];
32945
+ isSample?: boolean;
32946
+ isStorefront?: boolean;
32947
+ defaultSelectedProductCount?: number;
32948
+ allStatus?: boolean;
32949
+ };
32950
+
32951
+ declare const generateProductQueryKey: (args: FetchProductParams) => ['query/product', FetchProductParams];
32952
+ declare const generateCollectionQueryKey: (args: FetchCollectionArgs) => ['query/collection', FetchCollectionArgs];
32953
+ declare const generateProductsQueryKey: (args: FetchProductsParams) => ['query/products', FetchProductsParams];
32954
+
32955
+ declare const getCornerCSSFromGlobal: (corner?: CornerRadius) => React.CSSProperties;
32956
+ declare const getRadiusCSSFromGlobal: (state: StateType, key?: RoundedSize, device?: NameDevices$1) => React.CSSProperties;
32957
+ declare const getCustomRadius: (state: StateType, radius?: CornerRadius, device?: NameDevices$1) => React.CSSProperties;
32958
+ declare const composeRadius: (value?: StateProp<CornerRadius> | ResponsiveStateProp<CornerRadius>) => React.CSSProperties;
32959
+ declare const composeRadiusResponsive: (radiusValue?: ObjectDevices<CornerRadius>) => React.CSSProperties;
32960
+ declare const getRadiusStyleActiveState: (radiusValue?: StateProp<CornerRadius>) => React.CSSProperties;
32961
+ declare const composeCornerCss: (value?: CornerRadius | undefined, important?: boolean) => string | undefined;
32962
+
32963
+ type CallbackCondition = () => string;
32964
+ declare const RenderIf: (c: boolean | null | undefined, t: string | CallbackCondition, f?: string | CallbackCondition) => string;
32965
+ declare const props: (strings: any, ...keys: any[]) => string;
32966
+ declare const styles: (strings: any, ...keys: any[]) => string;
32967
+ declare const dataStringify: (obj: object) => string;
32968
+ declare const template: (strings: any, ...keys: any[]) => string;
32969
+ declare const composeMemo: <T>(fn: () => T, _?: any[]) => T;
32970
+ declare const removeUndefinedValuesFromObject: (obj: Record<string, string>) => Record<string, string>;
32971
+
32972
+ declare const parseValueWithUnit: (valueWithUnit: string) => any;
32973
+ declare const getStyleShadow: (shadowStyle: ShadowStyle, isActiveState?: boolean) => {
32974
+ [x: string]: string;
32975
+ };
32976
+ declare const getStyleShadowState: (shadow?: StateProp<ShadowProps>, styleAppliedFor?: ShadowStyleApplied, isEnableShadow?: StateProp<boolean>) => React.CSSProperties;
32977
+ declare const composeShadowCss: ({ hasBoxShadow, boxShadowValue, important, }: {
32978
+ hasBoxShadow?: boolean | undefined;
32979
+ boxShadowValue?: ShadowProps | undefined;
32980
+ important?: boolean | undefined;
32981
+ }) => string | undefined;
32982
+
32983
+ declare const composeSize: (size?: ObjectDevices<SizeProps>) => React.CSSProperties;
32984
+ declare function genSizeClass(name: string): string;
32985
+ declare const composeSizeCss: (spacing?: SizeSetting) => string | undefined;
32986
+ declare const makeGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
32987
+ width: Record<ResponsiveKey<"w">, string | number>;
32988
+ height: Record<ResponsiveKey<"h">, string | number>;
32989
+ padding: React.CSSProperties;
32990
+ gap: {
32991
+ '--gg': string | undefined;
32992
+ '--gg-tablet': string | undefined;
32993
+ '--gg-mobile': string | undefined;
32994
+ };
32995
+ };
32996
+ declare const getGlobalSizeGap: (globalSize?: ObjectDevices<SizeSettingGlobal>) => {
32997
+ '--gg': string | undefined;
32998
+ '--gg-tablet': string | undefined;
32999
+ '--gg-mobile': string | undefined;
33000
+ };
33001
+ declare const makeStyleWithDefault: <T extends ShortHandProperty, K>(name: T, value?: Partial<Record<NameDevices$1, K>> | undefined, defaultVal?: Partial<Record<NameDevices$1, K>> | undefined) => Record<ResponsiveKey<T>, K>;
33002
+ declare const getWidthHeightGlobalSize: (type: 'width' | 'height', globalSize?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string | number>>;
33003
+ declare const getHeightByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>) => Partial<Record<NameDevices$1, string>>;
33004
+ declare const getWidthByShapeGlobalSize: (shapeByLayout?: ObjectDevices<SizeSettingGlobal>, defaultAuto?: boolean) => Partial<Record<NameDevices$1, string>>;
33005
+ declare const getAspectRatioGlobalSize: (shape?: ObjectDevices<SizeSettingGlobal>) => ObjectDevices<string>;
33006
+ declare const getPaddingGlobalSize: (globalSize?: ObjectDevices<SizeSettingGlobal>) => React.CSSProperties;
33007
+
33008
+ type TypographyClass = `gp-g-${TypographyType}`;
33009
+ declare const genTypoClass: (name: TypographyType) => TypographyClass;
33010
+ declare const composeTypographyCss: (typography: TypographySetting | undefined) => string;
33011
+ declare const composeTypographyV2Css: (typography: TypographySettingV2 | undefined, isImportant?: boolean) => string;
33012
+ declare const composeTypography: (typography?: ObjectDevices<TypographyProps>) => React.CSSProperties;
33013
+ declare const composeTypographyV2: (value?: TypographyV2Props, attrs?: TypographyV2Attrs) => React.CSSProperties;
33014
+ declare const composeTypographyAttr: (attrs?: TypographyV2Attrs) => React.CSSProperties;
33015
+ declare const composeTypographyClassName: (typo?: TypographySettingV2, typography?: TypographySetting) => "" | "gp-g-heading-1" | "gp-g-heading-2" | "gp-g-heading-3" | "gp-g-subheading-1" | "gp-g-subheading-2" | "gp-g-subheading-3" | "gp-g-paragraph-1" | "gp-g-paragraph-2" | "gp-g-paragraph-3" | undefined;
33016
+ declare const composeFallbackTypographyStyle: (tag: string) => "var(--g-font-heading, heading)" | "var(--g-font-body, body)";
33017
+ declare const composeTypographyStyle: (typo?: TypographySettingV2, typography?: TypographySetting, disableAttr?: boolean) => {
33062
33018
  [x: string]: any;
33063
33019
  '--ai'?: csstype.Property.AlignItems | undefined;
33064
33020
  '--hvr-ai'?: csstype.Property.AlignItems | undefined;
@@ -34554,22 +34510,71 @@ declare const removePaddingYInStyle: (style?: React.CSSProperties) => {
34554
34510
  vectorEffect?: csstype.Property.VectorEffect | undefined;
34555
34511
  };
34556
34512
 
34557
- type NameDevices = 'desktop' | 'tablet' | 'mobile';
34513
+ declare const validateEmail: (email: string) => boolean;
34558
34514
 
34559
- type PostionType = {
34560
- wrapper?: Record<string, string | number>;
34561
- content?: Record<string, string | number>;
34562
- };
34563
- declare const composePostionIconList: (lineHeight: string, position?: ObjectDevices<'center' | 'baseline'>, iconWidth?: ObjectDevices<number>) => PostionType;
34564
- declare const composePositionLineHeight: ({ compose, lineHeight, device, position, iconWidth, }: {
34565
- compose: PostionType;
34566
- lineHeight: string;
34567
- device: NameDevices;
34568
- position?: Partial<Record<NameDevices$1, "center" | "baseline">> | undefined;
34569
- iconWidth?: Partial<Record<NameDevices$1, number>> | undefined;
34570
- }) => void;
34515
+ declare function loadScript(src: string, options?: {
34516
+ module?: boolean;
34517
+ in?: 'head' | 'body';
34518
+ }): Promise<boolean>;
34571
34519
 
34572
- declare const convertHTML: (str: string) => string;
34520
+ declare function getSpacingVariable(key?: SpacingType): string;
34521
+ declare const composeSpacing: (spacingValue?: ObjectDevices<SpacingType>) => React.CSSProperties;
34522
+
34523
+ declare const genVariable: (variableName: string) => string;
34524
+
34525
+ declare const pageview$1: () => void;
34526
+ declare const event: (name: string, options?: {}) => void;
34527
+ declare const addToCart$2: (product: ProductInputAnalytic) => void;
34528
+
34529
+ declare const fpixel_event: typeof event;
34530
+ declare namespace fpixel {
34531
+ export {
34532
+ addToCart$2 as addToCart,
34533
+ fpixel_event as event,
34534
+ pageview$1 as pageview,
34535
+ };
34536
+ }
34537
+
34538
+ declare const pageview: (url: string, trackingId?: string | null) => void;
34539
+ /** Addition to cart events
34540
+ * https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
34541
+ */
34542
+ declare const addToCart$1: (product: ProductInputAnalytic) => void;
34543
+ /** Product clicked event
34544
+ * https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#product-click
34545
+ */
34546
+ declare const productClick: (product: ProductInputAnalytic) => void;
34547
+ /** Product viewed event
34548
+ * https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#measuring-actvities
34549
+ */
34550
+ declare const productDetail: (product: ProductInputAnalytic) => void;
34551
+ /** Removal from cart events
34552
+ * https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#add-remove-cart
34553
+ */
34554
+ declare const removeFromCart: (product: ProductInputAnalytic, price: number) => void;
34555
+
34556
+ declare const gtag_pageview: typeof pageview;
34557
+ declare const gtag_productClick: typeof productClick;
34558
+ declare const gtag_productDetail: typeof productDetail;
34559
+ declare const gtag_removeFromCart: typeof removeFromCart;
34560
+ declare namespace gtag {
34561
+ export {
34562
+ addToCart$1 as addToCart,
34563
+ gtag_pageview as pageview,
34564
+ gtag_productClick as productClick,
34565
+ gtag_productDetail as productDetail,
34566
+ gtag_removeFromCart as removeFromCart,
34567
+ };
34568
+ }
34569
+
34570
+ declare const addToCart: (product: ProductInputAnalytic) => void;
34571
+
34572
+ declare const tiktokpixel_addToCart: typeof addToCart;
34573
+ declare namespace tiktokpixel {
34574
+ export {
34575
+ tiktokpixel_addToCart as addToCart,
34576
+ };
34577
+ }
34573
34578
 
34574
34579
  type Func$6 = ReturnType<typeof addToCartOperation>;
34575
34580
  type Response$6 = Awaited<ReturnType<Func$6>>;
@@ -34816,4 +34821,4 @@ type PublishedThemePageSelectFragment = Pick<PublishedThemePage$1, 'id' | 'name'
34816
34821
 
34817
34822
  declare const getProductBySlug: (fetcher: FetchFunc, slug?: string) => Promise<ProductSelectFragment>;
34818
34823
 
34819
- export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, Background, BaseProps, BasePropsWrap, BlockEntity, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSectionStatus$1 as ThemeSectionStatus, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBgImageByDevice, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
34824
+ export { AddOn, AddonProvider, AddonProviderProps, AdvancedType, AliReviewsWidgetType, AlignItemProp, AlignProp, AnimationBaseSetting, AnimationConfig, AnimationDirectionType, AnimationEasingType, AnimationFadeSettingType, AnimationSetting, AnimationSettingType, AnimationShakeSettingType, AnimationSlideSettingType, AnimationTrigger, AnimationTriggerType, AnimationType, AnimationZoomDirectionType, AnimationZoomSettingType, appAPI as AppAPIType, Background, BaseProps, BasePropsWrap, BlockEntity, BoldSubscriptionsWidgetType, Border, BorderStyle, BuilderComponentProvider, BuilderComponentProviderProps, BuilderEntity, BuilderEntityNested, BuilderPreviewProvider, BuilderPreviewProviderProps, BuilderProvider, BuilderProviderProps, BuilderState, Builtin, CartLineProvider, CartLineProviderProps, CollectionDetailFilterDocument, CollectionDetailFilterQueryResponse, CollectionDetailFilterQueryVariables, CollectionDocument, CollectionProvider, CollectionProviderProps, CollectionQueryResponse, CollectionQueryVariables, CollectionSelectFragment, CollectionsDocument, CollectionsQueryResponse, CollectionsQueryVariables, ColorKey, ColorType$1 as ColorType, ColorValueType, Component, ComponentPreset, ComponentSetting, ContainerProp, ControlProp, ControlTriggerAction, ControlUI, CornerRadius, CornerRadiusType, CustomComponentConfig, DeepPartial, DynamicCollection, DynamicProduct, ExtractState, FeraReviewsV3WidgetType, FeraReviewsWidgetType, FetchCollectionArgs, FetchFunc, FetchProductParams, FlexDirectionProp, FontName, GRADIENT_BGR_KEY, GlobalStyleConfig, GlobalStyleResponsiveConfig, GlobalSwatchesData, GraphQLConnection, GroupPropType, GrowaveWidgetType, HSLAColorType, HSLColorType, HexColorType, ImageShape$1 as ImageShape, InitComponentType, InstantJudgeMeReviewsWidgetType, InstantKlaviyoWidgetType, InstantLooxReviewsWidgetType, JudgeMeReviewsWidgetType, KlaviyoWidgetType, LaiProductReviewsAdvancedWidgetType, LaiProductReviewsWidgetType, LibraryTemplateDocument, LibraryTemplateQueryResponse, LibraryTemplateQueryVariables, LooxReviewsWidgetType, ModalProvider, ModalProviderProps, NameDevices$1 as NameDevices, NestedKeys, ObjectDeviceGlobalType, ObjectDevices, ObjectLayoutValue, OmnisendWidgetType, OpinewDesignWidgetType, OpinewWidgetType, OptionNormalStyle, OptionSpecialStyle, Options, PageContext, PageProvider, PageProviderProps, PageType, PageViewUpDocument, PageViewUpMutationResponse, PageViewUpMutationVariables, PickyStoryWidgetType, PostPurchaseTypo, PreviewPageDocument, PreviewPageQueryResponse, PreviewPageQueryVariables, Primitive, ProductInputAnalytic, ProductListProvider, ProductListProviderProps, ProductOffer, ProductProvider, ProductProviderProps, ProductReviewsWidgetType, ProductSelectFragment, ProductsDocument, ProductsQueryResponse, ProductsQueryVariables, PublishedThemePageSelectFragment, PublishedThemePagesDocument, PublishedThemePagesQueryResponse, PublishedThemePagesQueryVariables, RGBAColorType, RGBColorType, Ratio$1 as Ratio, RenderMemo as Render, RenderChildren, RenderIf, Render as RenderLiquid, RenderMode, RenderPreviewMemo as RenderPreview, RequiredCursorEdge, ResponsiveKey, ResponsiveStateProp, RivyoWidgetType, RoundedSize, RyviuWidgetType, SaleFunnelDiscount$1 as SaleFunnelDiscount, SaleFunnelDiscountEdge$1 as SaleFunnelDiscountEdge, SaleFunnelDiscountObjectType$1 as SaleFunnelDiscountObjectType, SaleFunnelDiscountType$1 as SaleFunnelDiscountType, SaleFunnelDiscountValueType$1 as SaleFunnelDiscountValueType, SaleFunnelDiscountsDocument, SaleFunnelDiscountsQueryResponse, SaleFunnelDiscountsQueryVariables, Scalars$1 as Scalars, ScaleByDirection, SectionData, SectionEntity, SectionProvider, SectionProviderProps, SettingByAnimationType, SettingByAnimationValues, ShadowProps, ShadowStyle, ShadowStyleApplied, ShadowType, ShopProvider, ShopProviderProps, shop as ShopType, SizeProps, SizeSetting, SizeSettingGlobal, SizeType, SpacingType, StampedWidgetType, StateProp, StateSelector, StateType, StoreConfig, StorePropertyDocument, StorePropertyQueryResponse, StorePropertyQueryVariables, SwatchesOptionType, SwatchesOptionValue, ThemePageDocument, ThemePageQueryResponse, ThemePageQueryVariables, ThemeSectionStatus$1 as ThemeSectionStatus, TransformProp, TriggerConfig, TrustooWidgetType, TypographyProps, TypographySetting, TypographySettingV2, TypographyType, TypographyV2Attrs, TypographyV2Props, UltimateSalesBoostWidgetType, VariantSelectFragment, VitalsWidgetType, WiserWidgetType, WrapRenderChildren, YotpoReviewsWidgetType, animations, baseAssetURL, calculateFirstProduct, checkAvailableVariantInStock, cls, composeAdvanceStyle, composeAdvanceStyleForPostPurchase, composeBackgroundCss, composeBorderCss, composeCornerCss, composeFallbackTypographyStyle, composeGridLayout, composeMemo, composePositionLineHeight, composePostionIconList, composeRadius, composeRadiusResponsive, composeShadowCss, composeSize, composeSizeCss, composeSpacing, composeTextColorCss, composeTypography, composeTypographyAttr, composeTypographyClassName, composeTypographyCss, composeTypographyStyle, composeTypographyV2, composeTypographyV2Css, convertHTML, convertOldLayout, dataStringify, fetchMedias, fetchVariants, filterAttrInStyle, filterCornerInStyle, filterToolbarPreview, flattenConnection, fpixel, genSizeClass, genTypoClass, genVariable, generateCollectionQueryKey, generateProductQueryKey, generateProductsQueryKey, getAspectRatioGlobalSize, getBgImageByDevice, getBorderStyle, getCarouselContainerHeight, getCollection, getCornerCSSFromGlobal, getCustomRadius, getGlobalColorCSSProp, getGlobalColorClass, getGlobalColorResponsiveClass, getGlobalColorResponsiveStyle, getGlobalColorStateClass, getGlobalColorStateClassDynamicBtn, getGlobalColorStateResponsiveClass, getGlobalColorStateResponsiveClassDynamicBtn, getGlobalColorStateResponsiveStyle, getGlobalColorStateStyle, getGlobalColorStyle, getGlobalSizeGap, getGradientBgrStyleByDevice, getGradientBgrStyleForButton, getHeightByShapeGlobalSize, getPaddingGlobalSize, getProduct, getProductBySlug, getRadiusCSSFromGlobal, getRadiusStyleActiveState, getResponsiveStateValue, getResponsiveValue, getResponsiveValueByScreen, getSelectedVariant, getShortName, getSingleColorVariable, getSpacingVariable, getStyleBackgroundByDevice, getStyleShadow, getStyleShadowState, getWidthByShapeGlobalSize, getWidthHeightGlobalSize, globalEvent, gridToArrayRegex, gtag, handleConvertBorderColor, handleConvertBorderStyle, handleConvertBorderWidth, handleConvertClassColor, handleConvertClassColorDynamicBtn, isBrowser, isColor, isColumnDirectionExist, isDefined, isEmptyChildren, isLocalEnv, isSafari, loadScript, makeAspectRatio, makeContainerWidthOrHeight, makeDotGapToCarouselStyle, makeFixedBgAttachment, makeGlobalSize, makeGlobalSizeHeightResponsive, makeGlobalSizeWidthResponsive, makeHeight, makeLineClamp, makeStyle, makeStyleKey, makeStyleResponsive, makeStyleResponsiveByScreen, makeStyleResponsiveState, makeStyleState, makeStyleWithDefault, makeWidth, normalizeBuilderData, optionLayoutStyle, parseSelectedOption, parseValueWithUnit, prefetchQueries, props, removeAttrInStyle, removeNullUndefined, removePaddingYInStyle, removeUndefinedValuesFromObject, shopifyPriceRounding, splitStyle, styles, template, tiktokpixel, useAddToCart, useAddon, useAddons, useBuilderComponent, useBuilderPreviewStore, useBuilderStore, useCartData, useCartDiscountCodesUpdate, useCartId, useCartLine, useCartLineStore, useCartNoteUpdate, useCartUI, useCheckAvailableVariantInStock, useCheckoutUrl, useCollection, useCollectionQuery, useCollectionStore, useCollectionsQuery, useConnectedShopify, useCreateCart, useCurrency, useCurrentDevice, useCurrentVariant, useCurrentVariantInStock, useEditorMode, useFeaturedImageGlobal, useFormatMoney, useInitialSwatchesOptions, useIsSampleProduct, useIsStorefrontProduct, useIsSyncProduct, useIsomorphicLayoutEffect, useLazyVideo, useLoadScript, useLocale, useMatchMutate, useMobileOnly, useModalStore, useMoney, useMoneyFormat, usePageStore, usePageType, usePluginEnable, usePrevious, useProduct, useProductList, useProductListProducts, useProductListSettings, useProductListStore, useProductListStyles, useProductOfferDiscount, useProductProperties, useProductQuery, useProductStore, useProductsQuery, useProductsQueryAll, useQuantity, useRemoveCartItem, useSection, useSectionStore, useSelectedOption, useShopStore, useStoreFront, useSuspenseFetch, useSwatches, useSwatchesOptions, useUniqProductID, useUpdateCartItem, useVariant, useVariantOutStock, useVariants, validateEmail };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/core",
3
- "version": "1.14.0-dev.816",
3
+ "version": "1.14.0-dev.823",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",