@gem-sdk/components 23.1.2 → 24.0.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/article/components/ArticleImage.js +1 -1
- package/dist/cjs/article/components/ArticleImage.liquid.js +6 -6
- package/dist/cjs/article/components/ArticleList.js +1 -1
- package/dist/cjs/article/index.js +1 -1
- package/dist/cjs/article/settings/configs/article-image/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-image/ui-v2.js +1 -1
- package/dist/cjs/button/common/helpers.js +2 -2
- package/dist/cjs/cart/components/CartList.js +1 -1
- package/dist/cjs/cart/index.js +1 -1
- package/dist/cjs/collection/index.js +1 -1
- package/dist/cjs/common/components/Loading.js +1 -1
- package/dist/cjs/common/const.js +1 -1
- package/dist/cjs/common/helpers.js +1 -0
- package/dist/cjs/common/hooks/useElementWidth.js +1 -0
- package/dist/cjs/common/hooks/useLoadingProgress.js +1 -0
- package/dist/cjs/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/grid/components/section/Section.js +1 -1
- package/dist/cjs/grid/index.js +1 -1
- package/dist/cjs/header/components/kind/basic/index.js +1 -1
- package/dist/cjs/header/components/kind/modern/index.js +1 -1
- package/dist/cjs/header/index.js +1 -1
- package/dist/cjs/hero-banner/common/styles.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +5 -5
- package/dist/cjs/hero-banner/index.js +1 -1
- package/dist/cjs/image/common/adaptiveSources.js +1 -0
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/common/classes.js +1 -1
- package/dist/cjs/image/common/helpers.js +2 -2
- package/dist/cjs/image/common/liquidSrcset.js +1 -0
- package/dist/cjs/image/common/listContext.js +1 -0
- package/dist/cjs/image/common/listImageContext.js +1 -0
- package/dist/cjs/image/common/sizes.js +1 -0
- package/dist/cjs/image/common/srcset.js +1 -0
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +10 -12
- package/dist/cjs/image/components/Image.js +1 -1
- package/dist/cjs/image/components/Image.liquid.js +10 -10
- package/dist/cjs/image/components/NextImage.js +1 -1
- package/dist/cjs/image/components/NextImage.liquid.js +4 -5
- package/dist/cjs/image/constants.js +1 -1
- package/dist/cjs/image/index.js +1 -1
- package/dist/cjs/image/settings/configs/settings.js +1 -1
- package/dist/cjs/image/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/image-comparison/common/attrs.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.js +1 -1
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +14 -14
- package/dist/cjs/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/cjs/image-comparison/index.js +1 -1
- package/dist/cjs/image-comparison/settings/configs/settings.js +1 -1
- package/dist/cjs/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/post-purchase/callout-banner/index.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/cjs/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/cjs/post-purchase/product/components/product-offer/helpers/getOfferErrorText.js +1 -0
- package/dist/cjs/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
- package/dist/cjs/post-purchase/product/hooks/useHandleQuantity.js +1 -1
- package/dist/cjs/post-purchase/product/index.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/cjs/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscount.js +1 -1
- package/dist/cjs/product/components/product-bundle/ProductBundleDiscountWarning.js +2 -0
- package/dist/cjs/product/components/product-bundle/common/classes.js +1 -1
- package/dist/cjs/product/components/product-bundle/hooks/useProductBundleDataState.js +3 -3
- package/dist/cjs/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/cjs/product/components/product-discount-tag/common/helpers.js +1 -0
- package/dist/cjs/product/components/product-images/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +41 -41
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +23 -23
- package/dist/cjs/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
- package/dist/cjs/product/components/product-images-v3/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +40 -40
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +40 -40
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +12 -12
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +12 -12
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +23 -23
- package/dist/cjs/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/cjs/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -1
- package/dist/cjs/product/components/product-list/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListCarouselLayout.liquid.js +9 -7
- package/dist/cjs/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list/ProductListGridLayout.liquid.js +16 -14
- package/dist/cjs/product/components/product-list/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-list/common/imagePriority.js +17 -0
- package/dist/cjs/product/components/product-list/common/imagePriorityHints.js +1 -0
- package/dist/cjs/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +11 -9
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list-v3/ProductListGridLayout.liquid.js +16 -14
- package/dist/cjs/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/cjs/product/components/product-wrap/Product.js +1 -1
- package/dist/cjs/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/cjs/product/helpers/product-bundle.js +1 -1
- package/dist/cjs/product/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
- package/dist/cjs/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/cjs/stock-counter/common/attrs.js +1 -1
- package/dist/cjs/stock-counter/common/helpers.js +23 -23
- package/dist/cjs/stock-counter/hooks/useStockCounter.js +1 -1
- package/dist/cjs/third-party/components/KlarnaMessaging.liquid.js +29 -4
- package/dist/cjs/video/common/attrs.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +11 -11
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +11 -11
- package/dist/cjs/video/components/Video.liquid.js +1 -1
- package/dist/esm/article/components/ArticleImage.js +1 -1
- package/dist/esm/article/components/ArticleImage.liquid.js +7 -7
- package/dist/esm/article/components/ArticleList.js +1 -1
- package/dist/esm/article/index.js +1 -1
- package/dist/esm/article/settings/configs/article-image/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-image/ui-v2.js +1 -1
- package/dist/esm/button/common/helpers.js +2 -2
- package/dist/esm/cart/components/CartList.js +1 -1
- package/dist/esm/cart/index.js +1 -1
- package/dist/esm/collection/index.js +1 -1
- package/dist/esm/common/components/Loading.js +1 -1
- package/dist/esm/common/const.js +1 -1
- package/dist/esm/common/helpers.js +1 -0
- package/dist/esm/common/hooks/useElementWidth.js +1 -0
- package/dist/esm/common/hooks/useLoadingProgress.js +1 -0
- package/dist/esm/grid/components/row/Row.liquid.js +10 -10
- package/dist/esm/grid/components/section/Section.js +1 -1
- package/dist/esm/grid/index.js +1 -1
- package/dist/esm/header/components/kind/basic/index.js +1 -1
- package/dist/esm/header/components/kind/modern/index.js +1 -1
- package/dist/esm/header/index.js +1 -1
- package/dist/esm/hero-banner/common/styles.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/hero-banner/index.js +1 -1
- package/dist/esm/image/common/adaptiveSources.js +1 -0
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/common/classes.js +1 -1
- package/dist/esm/image/common/helpers.js +2 -2
- package/dist/esm/image/common/liquidSrcset.js +1 -0
- package/dist/esm/image/common/listContext.js +1 -0
- package/dist/esm/image/common/listImageContext.js +1 -0
- package/dist/esm/image/common/sizes.js +1 -0
- package/dist/esm/image/common/srcset.js +1 -0
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -13
- package/dist/esm/image/components/Image.js +1 -1
- package/dist/esm/image/components/Image.liquid.js +3 -3
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +5 -6
- package/dist/esm/image/constants.js +1 -1
- package/dist/esm/image/index.js +1 -1
- package/dist/esm/image/settings/configs/settings.js +1 -1
- package/dist/esm/image/settings/configs/ui-v2.js +1 -1
- package/dist/esm/image-comparison/common/attrs.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +17 -17
- package/dist/esm/image-comparison/components/ImageComparison.liquid.js +3 -3
- package/dist/esm/image-comparison/index.js +1 -1
- package/dist/esm/image-comparison/settings/configs/settings.js +1 -1
- package/dist/esm/image-comparison/settings/configs/ui-v2.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/post-purchase/callout-banner/index.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductPrice.js +1 -1
- package/dist/esm/post-purchase/product/components/ProductQuantity.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/components/ProductOffer.js +1 -1
- package/dist/esm/post-purchase/product/components/product-offer/helpers/getOfferErrorText.js +1 -0
- package/dist/esm/post-purchase/product/components/product-offer/hooks/useProductOfferData.js +1 -1
- package/dist/esm/post-purchase/product/hooks/useHandleQuantity.js +1 -1
- package/dist/esm/post-purchase/product/index.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/esm/post-purchase/product/settings/product-quantity/configs/ui-v2.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/common/styles.js +1 -1
- package/dist/esm/product/components/product-bundle/ProductBundleDiscount.js +1 -1
- package/dist/esm/product/components/product-bundle/ProductBundleDiscountWarning.js +2 -0
- package/dist/esm/product/components/product-bundle/common/classes.js +1 -1
- package/dist/esm/product/components/product-bundle/hooks/useProductBundleDataState.js +3 -3
- package/dist/esm/product/components/product-discount-tag/ProductDiscountTag.js +1 -1
- package/dist/esm/product/components/product-discount-tag/common/helpers.js +1 -0
- package/dist/esm/product/components/product-images/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/child/ProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +35 -35
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +13 -13
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +29 -29
- package/dist/esm/product/components/product-images-v2/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +3 -3
- package/dist/esm/product/components/product-images-v3/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductFeaturedImageOnly.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/child/ProductGalleryGrid.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGalleryEmbla.liquid.js +24 -24
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.js +1 -1
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarouselEmbla.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +30 -30
- package/dist/esm/product/components/product-images-v3/components/lightbox/ProductImagesLightBox.js +1 -1
- package/dist/esm/product/components/product-images-v3/composables/getProductImagesStyles.js +1 -1
- package/dist/esm/product/components/product-list/ProductList.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.js +1 -1
- package/dist/esm/product/components/product-list/ProductListCarouselLayout.liquid.js +11 -9
- package/dist/esm/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/esm/product/components/product-list/ProductListGridLayout.liquid.js +18 -16
- package/dist/esm/product/components/product-list/common/helpers.js +1 -1
- package/dist/esm/product/components/product-list/common/imagePriority.js +17 -0
- package/dist/esm/product/components/product-list/common/imagePriorityHints.js +1 -0
- package/dist/esm/product/components/product-list-v3/ProductList.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListCarouselLayout.liquid.js +12 -10
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.js +1 -1
- package/dist/esm/product/components/product-list-v3/ProductListGridLayout.liquid.js +18 -16
- package/dist/esm/product/components/product-price/hooks/useGpPrice.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.js +1 -1
- package/dist/esm/product/components/product-wrap/hook/useProductSetting.js +1 -1
- package/dist/esm/product/helpers/product-bundle.js +1 -1
- package/dist/esm/product/index.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/setting-v2/index.js +1 -1
- package/dist/esm/product/settings/product-image-v2/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/setting-v2/index.js +1 -1
- package/dist/esm/product/settings/product-image-v3/configs/ui-v2.js +1 -1
- package/dist/esm/stock-counter/common/attrs.js +1 -1
- package/dist/esm/stock-counter/common/helpers.js +21 -21
- package/dist/esm/stock-counter/components/StockCounter.liquid.js +1 -1
- package/dist/esm/stock-counter/hooks/useStockCounter.js +1 -1
- package/dist/esm/third-party/components/KlarnaMessaging.liquid.js +30 -5
- package/dist/esm/video/common/attrs.js +1 -1
- package/dist/esm/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +8 -8
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +11 -11
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +9 -9
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +26 -8
- package/package.json +11 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as i,splitStyle as l,composeAdvanceStyle as
|
|
2
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as i,splitStyle as l,composeAdvanceStyle as r,useBlogsQuery as a,useArticlesQuery as o,flattenConnection as d,filterToolbarPreview as n,ArticleListProvider as s,ArticleProvider as c,isEmptyChildren as m,cls as g,makeStyleResponsive as p,getResponsiveValueByScreen as h,getGradientBgrStyleByDevice as u,getStyleBackgroundByDevice as b,makeStyleWithDefault as f,makeWidth as D}from"@gem-sdk/core";import w from"../../grid/components/ChildrenDroppable.js";import{getElementLabel as T,isQueryLoading as A}from"../../common/helpers.js";import"../../common/const.js";import{useState as y}from"react";import v from"../../common/components/Loading.js";import S from"./ArticleNotFound.js";let O=O=>{let k=i(),{styles:I,setting:E,className:L,children:P,builderProps:j,advanced:G,builderAttrs:_,style:x}=O??{},{articleSetting:C,numberOfArticle:M}=E??{},{articleIds:N,articlePickType:z}=C??{},{border:B,rounded:F,hasBoxShadow:R,boxShadow:U}=G??{},[$]=l(["pos","top","left","bottom","right","z","d"],x),H=r({border:B,rounded:F,hasBoxShadow:R,boxShadow:U,"spacing-setting":G?.["spacing-setting"]}),Q={first:N?.length||50,where:{baseIDIn:[...C?.articleIds??[]]},orderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"}},V={first:1,where:{baseID:C?.blogId},orderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"},articlesOrderBy:{direction:"DESC",field:"PLATFORM_UPDATED_AT"}},[q,J]=y(!0),K="manually"===z,W="latest"===z,X=a(W?V:null,{revalidateOnMount:!0}),Y=o(K?Q:null,{revalidateOnMount:!0}),Z=X.data?.blogs?.edges?.[0]?.node,ee=K?Y:X,et=ee.error,ei=ee.isValidating,el=A({hasQuery:K||W,data:ee.data,error:ee.error,isLoading:ee.isLoading}),er=X?.data?.blogs?.edges?.[0]?.node,ea="latest"===z?d(er?.articles):d(Y?.data?.articles),eo=(e,t)=>({...e??{},blog:{title:t?.title??"",handle:t?.handle??""}}),ed="latest"===z?ea?.filter((e,t)=>t<+(M||4)).map(e=>eo(e,er)):"manually"===z&&C?.articleIds?.length?N?.map(e=>{let t=ea?.find(t=>t?.baseID===e);return eo(t,t?.blogs?.edges?.[0]?.node)}).filter(Boolean):ea.filter((e,t)=>t<(C?.numOfSelectedArticles||4)).map(e=>eo(e,e?.blogs?.edges?.[0]?.node));return ed?.length||el||"edit"!=k?e("div",{..._,className:j?.builderData?.uid,style:$,children:[ei||el?t(v,{label:T({builderData:j?.builderData})}):et?e("div",{children:["Error: ",et?.message]}):ed?.length?t(s,{styles:{horizontalGutter:I?.horizontalGutter,verticalGutter:I?.verticalGutter,spacing:I?.spacing,width:I?.width,height:I?.height},settings:{slidesToShow:E?.slideToShow??{desktop:4,tablet:3,mobile:1}},articles:ed,children:t("div",{"data-id":j?.uid,className:"gp-relative",children:t("div",{style:{...H,...f("w",D(I?.width),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...p("rg",I?.horizontalGutter),...p("cg",I?.verticalGutter),...b(E?.background),...u(E?.background),...p("gtc",{desktop:`repeat(${h(E?.slideToShow,"desktop")}, minmax(0, 1fr))`,tablet:E?.slideToShow?.tablet&&`repeat(${h(E?.slideToShow,"tablet")}, minmax(0, 1fr))`,mobile:E?.slideToShow?.mobile&&`repeat(${h(E?.slideToShow,"mobile")}, minmax(0, 1fr))`})},className:g(L,"gp-m-auto gp-grid gp-w-full"),children:ed.map(e=>t(c,{article:e,readOnly:!0,children:t("div",{"data-component-type":"component","data-component-tag":"Article","data-component-label":"Article","data-component-no-setting":!0,"data-article-id":e?.baseID?.replace("gid://shopify/OnlineStoreArticle/",""),children:m(P)?t(w,{}):P})},e?.id))})})}):t("div",{children:"Articles not found"}),n(P,!0)]}):q?e("div",{..._,className:j?.builderData?.uid,children:[t(S,{blogHandle:Z?.handle,onClose:()=>J(!1),articlePickType:z??"manually",children:P}),n(P,!0)]}):null};export{O as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"@gem-sdk/core";import"@gem-sdk/system";import"next/link";import"react";import"html-react-parser";import"../common/const.js";import"../image/components/AdaptiveImage.js";import"
|
|
1
|
+
import"react/jsx-runtime";import"@gem-sdk/core";import"@gem-sdk/system";import"next/link";import"react";import"html-react-parser";import"../common/const.js";import"../image/components/AdaptiveImage.js";import"../image/common/listImageContext.js";import"../image/common/listContext.js";import t from"./settings/ArticlePagination.js";import i from"./settings/ArticleReadMore.js";import e from"./settings/ArticleCategory.js";import r from"./settings/ArticleExcerpt.js";import o from"./settings/ArticleContent.js";import m from"./settings/ArticleAuthor.js";import s from"./settings/ArticleTitle.js";import c from"./settings/ArticleImage.js";import n from"./settings/ArticleList.js";import l from"./settings/ArticleDate.js";import g from"./settings/ArticleTag.js";let p={ArticleList:n,ArticleTitle:s,ArticleExcerpt:r,ArticleContent:o,ArticleImage:c,ArticlePagination:t,ArticleAuthor:m,ArticleTag:g,ArticleCategory:e,ArticleDate:l,ArticleReadMore:i};export{p as articleListSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=[{id:"setting",controls:[{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: This is a very long value for text area field"},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt"}]},{id:"optimize",type:"group",label:"Optimize",hiddenWithGemPages:!0,controls:[{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"high"}},options:[{title:"Finest",value:"finest"},{title:"High",value:"high"},{title:"Medium",value:"medium"},{title:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"qualityPercent",type:"input:slider",label:"",units:["%"],min:
|
|
1
|
+
let e=[{id:"setting",controls:[{id:"seo",type:"group",label:"SEO",controls:[{id:"alt",label:"Alt Text",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: This is a very long value for text area field"},{id:"title",label:"Image title",info:"Show title when hover to image",type:"textarea",minHeight:56,autoHeight:!0,placeholder:"E.g: White t-shirt"}]},{id:"optimize",type:"group",label:"Optimize",hiddenWithGemPages:!0,controls:[{id:"qualityType",type:"select",label:"Quality",devices:{desktop:{default:"high"}},options:[{title:"Finest",value:"finest"},{title:"High",value:"high"},{title:"Medium",value:"medium"},{title:"Custom",value:"custom",tooltip:"You can choose it for advanced page loading optimization."}]},{id:"qualityPercent",type:"input:slider",label:"",units:["%"],min:20,max:400,step:20,useOnlyUnitInit:!0,devices:{desktop:{default:100}}},{id:"priority",type:"toggle",label:"Preload",default:!1}]},{id:"enableLink",type:"toggle",label:"Link",default:!0},{id:"linkArticle",label:"After click",type:"select",options:[{label:"Go to article",value:"go-to-article"},{label:"Scroll to",value:"scroll-to"}],default:"go-to-article",info:"Ability to click on article title to go to article detail page."},{id:"customURL",label:"Custom URL",type:"pick-link",default:{target:"_self",type:"scroll-to"},isHiddenOpenLinkSelect:!0,hide:!0},{id:"openNewTab",type:"option:value",label:"Open new tab",default:!1,options:[{label:"Yes",value:!0},{label:"No",value:!1}]}]},{id:"style",controls:[{id:"shape",type:"size-setting",label:"",devices:{desktop:{default:{shape:"square",width:"100%"}}},settingConfig:{width:{displayOptions:["full"]}},hiddenSettings:["padding","gap"]},{id:"objectFit",type:"option:illustration",enableTooltip:!0,label:"Image scale",options:[{label:"Fill image",value:"cover",type:"image",svgName:"gp-image-cover"},{label:"Fit image",value:"contain",type:"image",svgName:"gp-image-contain"}],devices:{desktop:{default:"cover"}}},{id:"align",label:"Align",type:"option:value",options:[{label:"Left",value:"left",type:"align",tooltip:"Align left",iconName:"gp-align-left"},{label:"Center",value:"center",type:"align",tooltip:"Align center",iconName:"gp-align-center"},{label:"Right",value:"right",type:"align",tooltip:"Align right",iconName:"gp-align-right"}],devices:{desktop:{default:"center"}}},{id:"opacity",label:"Overlay Opacity",type:"input",default:{normal:0},state:{normal:!0,hover:!0}},{id:"opacityColor",label:"Overlay Color",type:"colorpicker",default:{normal:"#242424"},state:{normal:!0,hover:!0}},{id:"wrapperBorder",type:"border",label:"Border",compoDefaultValue:{border:"solid",width:"1px 1px 1px 1px",position:"all",borderWidth:"1px",color:"#A01414",isCustom:!0}},{id:"borderRadius",type:"radius-preset",label:"Corner",default:{radiusType:"none"},compoDefaultValue:{bblr:"20px",btrr:"20px",bbrr:"20px",btlr:"20px",radiusType:"rounded"}},{id:"shadow",type:"shadow-v2",label:"Button Shadow",compoDefaultValue:{type:"shadow-1",distance:"4px",blur:"4px",spread:"0px",color:"rgba(18, 18, 18, 0.2)",angle:45,enable:!0}}]}];export{e as ArticleImageSettings};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=[{label:"Image",hiddenOnMobile:!0,conditionDisplay:"shape.shape !== 'original'",controls:[{label:"Image scale",setting:{id:"objectFit"}}]},{label:"Size",hiddenOnMobile:!0,controls:[{setting:{id:"shape"},layout:"vertical"}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",controlConfig:{id:"border",type:"border-v2",linkWithSetting:{name:"wrapperBorder"}}},{label:"Corner",controlConfig:{id:"corner",type:"corner-v2",linkWithSetting:{name:"borderRadius"}}},{label:"Shadow",setting:{id:"shadow"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadow.enable === true",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadow.enable === false",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{hiddenOnMobile:!0,controls:[{label:"Link",setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"control",conditionDisplay:"enableLink == true",setting:{id:"linkArticle"},label:"After click"},{label:"Open new tab",setting:{id:"openNewTab"},conditionDisplay:"enableLink === true && linkArticle === 'go-to-article'"},{type:"control",conditionDisplay:"linkArticle === 'scroll-to' && enableLink == true",layout:"vertical",setting:{id:"customURL"}}]},{label:"SEO",hiddenOnMobile:!0,controls:[{type:"combo",label:"Alt text",iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:"Content",setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:"Image title",iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:"Content",setting:{id:"title"},layout:"vertical"}]}]},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',hiddenOnMobile:!0,controls:[{label:"Preload",setting:{id:"priority"}},{label:"Quality",
|
|
1
|
+
let e=[{label:"Image",hiddenOnMobile:!0,conditionDisplay:"shape.shape !== 'original'",controls:[{label:"Image scale",setting:{id:"objectFit"}}]},{label:"Size",hiddenOnMobile:!0,controls:[{setting:{id:"shape"},layout:"vertical"}]},{label:"Shape",hiddenOnMobile:!0,controls:[{label:"Border",controlConfig:{id:"border",type:"border-v2",linkWithSetting:{name:"wrapperBorder"}}},{label:"Corner",controlConfig:{id:"corner",type:"corner-v2",linkWithSetting:{name:"borderRadius"}}},{label:"Shadow",setting:{id:"shadow"},options:{updateFields:[{field:"enable",settingId:"hasActiveShadow"}]},controlChangeTrigger:{settings:[{condition:"shadow.enable === true",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!0}},{condition:"shadow.enable === false",source:["shadow","hasActiveShadow"],action:{controlId:"hasActiveShadow",groupType:"style",controlType:"style",newValue:!1}}],options:{noRecordHistory:!0}}}]},{hiddenOnMobile:!0,controls:[{label:"Link",setting:{id:"enableLink"},options:{labelVariant:"primary",toggleStyle:"switch"}},{type:"control",conditionDisplay:"enableLink == true",setting:{id:"linkArticle"},label:"After click"},{label:"Open new tab",setting:{id:"openNewTab"},conditionDisplay:"enableLink === true && linkArticle === 'go-to-article'"},{type:"control",conditionDisplay:"linkArticle === 'scroll-to' && enableLink == true",layout:"vertical",setting:{id:"customURL"}}]},{label:"SEO",hiddenOnMobile:!0,controls:[{type:"combo",label:"Alt text",iconName:"polaris-text-block",getValueFromSettingID:"alt",compoDefaultValue:"Describes the appearance of the image",isHideClear:!0,controls:[{label:"Content",setting:{id:"alt"},layout:"vertical"}]},{type:"combo",label:"Image title",iconName:"polaris-text-block",getValueFromSettingID:"title",compoDefaultValue:"Title",isHideClear:!0,controls:[{label:"Content",setting:{id:"title"},layout:"vertical"}]}]},{label:"Optimize LCP",conditionDisplay:'pageType !== "STATIC"',hiddenOnMobile:!0,controls:[{label:"Preload",setting:{id:"priority"}},{label:"Quality",setting:{id:"qualityType"}},{layout:"horizontal",label:"Quality",conditionDisplay:'qualityType == "custom"',setting:{id:"qualityPercent"}}]},{hiddenOnMobile:!0,controls:[{label:"Align",setting:{id:"align"},conditionEnable:"shape.width !== '100%'",options:{labelVariant:"primary",fullWidth:!0,disableMessage:"This option is disabled because the width is set to 100%"}}]}];export{e as SettingUIV2};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{normalizeMailto as t,isShopifyDomain as e,checkIsScrollToTop as l,checkIsOpenPopup as r,isLinkedToSalesPage as i,getDynamicSourceLocales as a,createSettingId as o}from"../../helpers.js";import{Button as n}from"../settings/configs/translate.js";import{splitStyle as s,convertHTML as
|
|
1
|
+
import{normalizeMailto as t,isShopifyDomain as e,checkIsScrollToTop as l,checkIsOpenPopup as r,isLinkedToSalesPage as i,getDynamicSourceLocales as a,createSettingId as o}from"../../helpers.js";import{Button as n}from"../settings/configs/translate.js";import{splitStyle as s,convertHTML as p}from"@gem-sdk/core";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";import{getCustomCssStyles as c}from"./styles.js";import d from"../../link/components/Link.js";let u=(t,e)=>{if(!e)return t;let l={...t};return["hover","focus"].forEach(t=>{delete l?.backgroundColorV2?.[t]}),l},h=({label:t,translateSetting:e,styles:l,pageContext:r,isUseTranslatedValue:i,builderProps:s,isLiquid:g=!1,isForceValue:c})=>{let d=!i||c?t:a({val:t,pageContext:r,settingId:o({id:e??n?.label?.id}),uid:s?.uidTranslate??s?.uid,isCapitalize:l?.typo?.attrs?.transform==="capitalize"});return g?d?.toString()??"":p(t)},f=(t,e)=>!!t&&e,m=(t,e)=>!!t||!e,b=({mode:t,options:e,isLiquid:l=!1})=>l?!e?.isCannotEditing:"edit"===t&&!e?.isCannotEditing,k=t=>!!t?.link?.startsWith("#")&&("_self"===t.target||"scroll-to"===t.type),C=t=>s(["pos","top","left","bottom","right","z"],t),I=t=>t?"loading":"idle",w=(t,e,l)=>t??(e||l)??"",y=({label:t,isLiquid:e=!1})=>{let l=(t?.toString()??"").replace(/<br\s*\/?>|<\/(?:p|div)>/gi," ").replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();return e?l.replaceAll("'","'").replaceAll('"',"'"):l},v=({setting:a,htmlType:o,defaultTag:n,enableBtnLink:s,isLiquid:p=!1,pageType:c})=>{let u=["product.url"],h=["#","mailto:","tel:"],f=a?.link??"",m="/"===f,b=a?.link!==void 0&&""!==a.link,k=new RegExp(/^https?:\/\//i),C=b&&k.test(f);b&&f.toLowerCase().startsWith("mailto:")&&f.includes("+")&&(f=t(f));let I=i(a?.type),w=!!s&&(C||e(b,f)||(()=>{if(u.find(t=>f.includes(t)))return!0;let t=h.find(t=>f.startsWith(t));return!(!t||l(a)||"STATIC"===c&&r(a))})()||m||I),y=f;p&&(e(b,f)||m)&&(y=a?.isTranslate?"$locationOrigin"+f:"{{ request.origin }}{{ routes.root_url | split: '/' | join: '/' }}"+f);let v={href:y,target:a?.target,...a?.noFollow&&{rel:"nofollow"}},L=w?v:b?{...v,type:o}:{type:o};return I&&(L={href:g,target:"_self"}),{HTMLTag:w?p?"a":d:n,urlData:L,shouldRenderLink:w}},L=t=>{let{style:e,dataId:l,pageContext:r,styles:i={},setting:a={},builderProps:o,builderAttrs:n,isUseTranslatedValue:s=!0}=t,{label:p,iconSvg:g,btnLink:d,loading:v,options:L,disabled:S,iconVisible:E,shouldClearSpace:T}=a,[x,A]=C(e),D=u(i,S),j=c({styles:i,uid:o?.uid,builderAttrs:n,enableHoverEffect:a.enableHoverEffect??!0}),z=I(v),H=w(o?.uidInteraction,l,o?.uid),_=t=>{let{isLiquid:e,translateSetting:l,isForceValue:i,pageContext:a}=t??{};return h({pageContext:a??r??{},label:p,translateSetting:l,isForceValue:i,builderProps:o,styles:D,isLiquid:e,...e&&{isUseTranslatedValue:s}})},G=f(g,E),O=k(d);return{customCss:j,wrapStyle:x,restStyle:A,dataState:z,dataIdAttr:H,isShowIcon:G,isScrollToElement:O,getArialLabel:t=>{let{isLiquid:e}=t??{};return y({label:p,isLiquid:e})},getLabelToDisplay:_,checkIsShowLabel:t=>{let{isLiquid:e,translateSetting:l,isForceValue:i,pageContext:a}=t??{},o=_({isLiquid:e,translateSetting:l,isForceValue:i,pageContext:a??r??{}});return m(o,T)},checkIsEditableLabel:t=>{let{isLiquid:e,mode:l}=t??{};return b({options:L,isLiquid:e,...!e&&l&&{mode:l}})}}},S=`
|
|
2
2
|
<svg
|
|
3
3
|
class="gp-invisible gp-absolute gp-h-5 gp-w-5 group-data-[state=loading]:gp-animate-spin group-data-[state=loading]:gp-visible"
|
|
4
4
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -19,4 +19,4 @@ import{normalizeMailto as t,isShopifyDomain as e,checkIsScrollToTop as l,checkIs
|
|
|
19
19
|
d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
20
20
|
></path>
|
|
21
21
|
</svg>
|
|
22
|
-
`;export{
|
|
22
|
+
`;export{S as LOADING_INDICATOR,k as checkIsScrollToElement,f as checkIsShowIcon,u as getCleanedStyles,L as getData,w as getDataId,I as getDataState,v as getInsertLinkData,C as getSplitStyles,b as handleCheckIsEditableLabel,m as handleCheckIsShowLabel,y as handleGetArialLabel,h as handleGetLabelToDisplay};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as
|
|
2
|
+
import{jsx as t,jsxs as r}from"react/jsx-runtime";import{useCartData as e,CartLineProvider as o,isEmptyChildren as i}from"@gem-sdk/core";import m from"../../grid/components/ChildrenDroppable.js";import"../../common/const.js";import"react";import"next/link";import"react-youtube";import"@gem-sdk/system";import"../../image/common/listImageContext.js";import"../../image/common/listContext.js";import"next/head";import n from"../../grid/components/col/Col.js";let s=({builderProps:s,advanced:d,setting:l,styles:p,children:a,...c})=>{let{data:g,error:h}=e();return t("div",{"data-id":s?.uid,...c,children:h?r("div",{children:["Error: ",h.message]}):g?t(n,{styles:p,children:g.lineItems.map(r=>r?t(o,{line:r,children:i(a)?t(m,{}):a},r.id):null)}):t("div",{children:"Cart Empty"})})};export{s as default};
|
package/dist/esm/cart/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{default as ShopPayButton}from"./components/shop-pay-button/ShopPayButton.js";import t from"./settings/CartLineAttribute.js";import
|
|
1
|
+
export{default as ShopPayButton}from"./components/shop-pay-button/ShopPayButton.js";import t from"./settings/CartLineAttribute.js";import o from"./settings/CartLineVariant.js";import"react/jsx-runtime";import"@gem-sdk/core";import"react";import"@gem-sdk/system";import"next/link";import r from"./settings/CartTotalPrice.js";import i from"./settings/ShopPayButton.js";import s from"./settings/DiscountInput.js";import e from"./settings/CartTotalItem.js";import m from"./settings/CartOrderNote.js";import n from"./settings/CartLinePrice.js";import a from"./settings/CartLineImage.js";import p from"./settings/CartDiscount.js";import C from"./settings/CartCheckout.js";import"../image/components/AdaptiveImage.js";import"../image/common/listImageContext.js";import"../image/common/listContext.js";import g from"./settings/CouponList.js";import c from"./settings/CartList.js";import"../common/const.js";import"react-youtube";import"next/head";import u from"./settings/Cart.js";let j={Cart:u,CartList:c,CartLinePrice:n,CartLineVariant:o,CartLineImage:a,CartTotalPrice:r,CartTotalItem:e,CartCheckout:C,DiscountInput:s,CartDiscount:p,CartOrderNote:m,CartLineAttribute:t,CouponList:g,ShopPayButton:i};export{j as cartSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import o from"./settings/collection-description/CollectionDescription.js";import"react/jsx-runtime";import"@gem-sdk/core";import"next/link";import"react";import"@gem-sdk/system";import t from"./settings/collection-paginator/CollectionPaginator.js";import"html-react-parser";import i from"./settings/collection-toolbar/CollectionToolbar.js";import e from"./settings/collection-banner/CollectionBanner.js";import l from"./settings/collection-title/CollectionTitle.js";import"react-youtube";import"
|
|
1
|
+
import o from"./settings/collection-description/CollectionDescription.js";import"react/jsx-runtime";import"@gem-sdk/core";import"next/link";import"react";import"@gem-sdk/system";import t from"./settings/collection-paginator/CollectionPaginator.js";import"html-react-parser";import i from"./settings/collection-toolbar/CollectionToolbar.js";import e from"./settings/collection-banner/CollectionBanner.js";import l from"./settings/collection-title/CollectionTitle.js";import"react-youtube";import"../image/common/listImageContext.js";import"../image/common/listContext.js";import"next/head";let n={CollectionTitle:l,CollectionBanner:e,CollectionDescription:o,CollectionToolbar:i,CollectionPaginator:t};export{n as collectionSetting};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{
|
|
2
|
+
import{jsx as e,jsxs as i}from"react/jsx-runtime";import{useLoadingProgress as l}from"../hooks/useLoadingProgress.js";import{getLoadingErrorText as g,getLoadingText as p}from"../helpers.js";import{useElementWidth as r}from"../hooks/useElementWidth.js";import{LOADING_MIN_WIDTH as o}from"../const.js";let t="gp-loading-placeholder gp-border-loading-frame gp-flex gp-w-full gp-flex-col gp-gap-4 gp-overflow-hidden gp-border-[0.5px] gp-border-solid gp-bg-white",d="gp-text-loading-label !gp-font-g-ui !gp-text-xs !gp-font-medium !gp-leading-5 gp-px-4 gp-text-center",a=({label:a,error:n,retry:s})=>{let m=l(),{ref:c,width:h}=r(),f=(({minWidth:e})=>void 0===h||h>e)({minWidth:o.SHOW_TEXT}),u=(({minWidth:e})=>void 0===h||h>e)({minWidth:o.SHOW_LABEL});return n?e("div",{ref:c,className:t,children:i("div",{className:`${d} gp-py-4`,children:[g({label:a,hasRoomForLabel:u}),!!s&&e("button",{type:"button",onClick:s,className:"gp-ml-1 gp-underline",children:"Retry"})]})}):i("div",{ref:c,className:t,children:[e("div",{className:"gp-h-0.5 gp-w-full gp-bg-loading-track",children:e("div",{className:"gp-bg-loading-bar gp-h-full gp-transition-[width] gp-duration-100 gp-ease-linear",style:{width:`${m}%`}})}),f&&e("div",{className:`${d} gp-pb-4`,children:p({label:a,percent:m,hasRoomForLabel:u})})]})};export{a as default};
|
package/dist/esm/common/const.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e;let t={STICKY:999,DIALOG:100001,CART_DRAWER:100002,CART_DRAWER_CONFIRM_MODAL:100003};!function(e){e.Collection="Collection",e.PickProduct="PickProduct",e.DynamicCollection="DynamicCollection",e.RelatedProduct="RelatedProduct"}(e||(e={}));let c={TICK_MS:100,MILESTONES:[{atMs:0,percent:0},{atMs:500,percent:30},{atMs:1e3,percent:50},{atMs:3e3,percent:75},{atMs:5e3,percent:83},{atMs:1e4,percent:90},{atMs:2e4,percent:96}],MAX_PERCENT:99,TAIL_MS:6e4},_={SHOW_LABEL:154,SHOW_TEXT:55};export{t as ELEMENT_Z_INDEX,_ as LOADING_MIN_WIDTH,c as LOADING_PROGRESS,e as PRODUCT_LIST_PRODUCT_SOURCE};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=({builderData:e})=>e?.customLabel??e?.label,o=({label:e,percent:o,hasRoomForLabel:a})=>a?e?`Loading ${e}...${o}%`:`Loading ${o}%`:`${o}%`,a=({label:e,hasRoomForLabel:o})=>e&&o?`${e} failed to load.`:"Failed to load.",d=({hasQuery:e,data:o,error:a,isLoading:d})=>d||e&&void 0===o&&void 0===a;export{e as getElementLabel,a as getLoadingErrorText,o as getLoadingText,d as isQueryLoading};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useIsomorphicLayoutEffect as e}from"@gem-sdk/core";import{useRef as t,useState as r}from"react";let n=()=>{let n=t(null),[i,o]=r();return e(()=>{let e=n.current;if(!e||(o(e.getBoundingClientRect().width),"undefined"==typeof ResizeObserver))return;let t=new ResizeObserver(e=>{let t=e[0];t&&o(t.contentRect.width)});return t.observe(e),()=>t.disconnect()},[]),{ref:n,width:i}};export{n as useElementWidth};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e;import{useState as t,useEffect as r}from"react";import{LOADING_PROGRESS as a}from"../const.js";let{MILESTONES:l,MAX_PERCENT:o,TAIL_MS:n,TICK_MS:s}=a,u=l[l.length-1],f=({value:e,fromValue:t,toValue:r,fromResult:a,toResult:l})=>r===t?l:a+(l-a)*((e-t)/(r-t)),M=({elapsedMs:e})=>{if(e>=u.atMs){let t=f({value:e,fromValue:u.atMs,toValue:u.atMs+n,fromResult:u.percent,toResult:o});return Math.floor(Math.min(t,o))}let t=l.findIndex(t=>e<t.atMs),r=l[t-1]??l[0],a=l[t];return Math.floor(f({value:e,fromValue:r.atMs,toValue:a.atMs,fromResult:r.percent,toResult:a.percent}))},i=new Map,m=()=>{let e=Date.now();i.forEach((t,r)=>r(e-t))},c=t=>(i.set(t,Date.now()),e=e??setInterval(m,s),()=>{i.delete(t),!i.size&&e&&(clearInterval(e),e=void 0)}),p=()=>{let[e,a]=t(0);return r(()=>{let e=()=>{};return e=c(t=>{let r=M({elapsedMs:t});a(r),r>=o&&e()}),()=>e()},[]),e};export{M as getLoadingPercent,p as useLoadingProgress};
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import{template as e,WrapRenderChildren as o,RenderChildren as s,RenderIf as r,hasTranslatedLiquid as t,isLocalEnv as i,baseAssetURL as a}from"@gem-sdk/core";import{getData as l,checkHasBackgroundVideo as p,isRenderHtmlVideo as m,isRenderYoutubeVideo as d}from"./common/helpers.js";import{getBackgroundTranslated as n,getSettingPreloadData as c}from"../../../helpers.js";import
|
|
1
|
+
import{template as e,WrapRenderChildren as o,RenderChildren as s,RenderIf as r,hasTranslatedLiquid as t,isLocalEnv as i,baseAssetURL as a}from"@gem-sdk/core";import{getData as l,checkHasBackgroundVideo as p,isRenderHtmlVideo as m,isRenderYoutubeVideo as d}from"./common/helpers.js";import{getBackgroundTranslated as n,getSettingPreloadData as c}from"../../../helpers.js";import u from"../../../video/components/LiteYouTubeEmbed.liquid.js";import{Row as f}from"../../settings/configs/row/translate.js";import{getResponsiveSetting as g}from"../../../hero-banner/common/helpers.js";import $ from"../../../video/components/HTML5Embed.liquid.js";import{getYoutubeVideoId as y}from"../../../video/common/helpers.js";import{createClass as j,If as k}from"@gem-sdk/system";import{getRowStyle as v}from"./common/styles.js";import{getClass as b}from"./common/classes.js";import{getAttr as w}from"./common/attrs.js";let h=h=>{let{styles:C,setting:E,rawChildren:S,builderProps:q}=h,{isSection:L}=E??{},{background:P}=C??{},T=L?"section":"div",V=n({background:P,uid:q?.uid,enableTranslate:!!f?.background?.id,pageContext:h.pageContext??{}}),{stateData:x}=l(h,V),{rowStyle:z,backgroundBoxStyle:A,embedVideoStyle:N,sectionStyle:R}=v({rowProps:h,type:"Liquid",translatedBackground:V}),{rowAttr:_}=w(h),{rowClass:G,backgroundBoxClass:I,backgroundBoxInnerClass:M,sectionClass:O,wrapperYoutubeClasses:B,iframeYoutubeClasses:H}=b(h),U=j({[G]:!0}),Y=()=>{if(!p(P))return;let e=g(P||{});if(m(P))return $({uid:q?.uid,muted:!0,loop:e.desktop?.loop,controls:!1,autoplay:!0,src:"",title:"Video",className:"gp-relative",style:N});if(d(P)){let o=e?.desktop?.video??"",s=y(o)||"",r=t(o),i=`&loop=false&playlist=${s}&showinfo=0&rel=0&fs=0&enablejsapi=1`;return u({uid:q?.uid,id:s,autoplay:!0,title:"Video",translatedVideoUrl:r?o:"",controls:!1,params:i,adNetwork:!1,noCookie:!0,muted:!0,lazy:e?.desktop?.lazyLoad??!0,style:N,wrapperClass:B,iframeClass:H})}},D=e`
|
|
2
2
|
<gp-row
|
|
3
3
|
${{..._}}
|
|
4
4
|
class="${U}"
|
|
5
5
|
style="${z()}"
|
|
6
6
|
>
|
|
7
|
-
<script gp-data type="application/json">${
|
|
7
|
+
<script gp-data type="application/json">${x}</script>
|
|
8
8
|
${k(!!Y(),e`
|
|
9
9
|
<div class="${I}" style="${A}">
|
|
10
10
|
<div class="${M}">${Y()}</div>
|
|
11
11
|
</div>
|
|
12
12
|
`)}
|
|
13
13
|
|
|
14
|
-
${o({uid:
|
|
14
|
+
${o({uid:q?.uid||"",customProps:S?.[0].customProps},S?.map(e=>{if(e)return s({...e,order:E?.order,layout:E?.layout,justifyContent:E?.verticalAlign})}))}
|
|
15
15
|
|
|
16
|
-
${(()=>{if(p(
|
|
16
|
+
${(()=>{if(p(P))return e`
|
|
17
17
|
${r(i,`<script ${c('class="gps-link" delay',"src")}="{{ 'gp-row-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${c('class="gps-link" delay',"src")}="${a}/assets-v2/gp-row-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
18
18
|
`})()}
|
|
19
19
|
</gp-row>
|
|
20
20
|
`;return e`
|
|
21
|
-
${r(!!C?.preloadBgImage,`${r(!!
|
|
21
|
+
${r(!!C?.preloadBgImage,`${r(!!P?.desktop?.image?.src,`<link rel="preload" href="${P?.desktop?.image?.src}" as="image" />`)}${r(!!P?.tablet?.image?.src,`<link rel="preload" href="${P?.tablet?.image?.src}" as="image" />`)}${r(!!P?.mobile?.image?.src,`<link rel="preload" href="${P?.mobile?.image?.src}" as="image" />`)}`)}
|
|
22
22
|
|
|
23
|
-
${r(!!
|
|
23
|
+
${r(!!L,"{% assign locationOrigin = request.origin | append: routes.root_url | split: '/' | join: '/' %}")}
|
|
24
24
|
|
|
25
|
-
${k(
|
|
26
|
-
<${
|
|
27
|
-
class="${O} ${
|
|
25
|
+
${k(L,e`
|
|
26
|
+
<${T}
|
|
27
|
+
class="${O} ${L?c("gps-lazy"):""}"
|
|
28
28
|
style="${R}"
|
|
29
29
|
>
|
|
30
30
|
${D}
|
|
31
|
-
</${
|
|
31
|
+
</${T}>
|
|
32
32
|
`,e`${D}`)}
|
|
33
33
|
`};export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as o}from"react/jsx-runtime";import"../../../common/const.js";import"@gem-sdk/core";import{useMemo as
|
|
2
|
+
import{jsx as o}from"react/jsx-runtime";import{getElementLabel as t}from"../../../common/helpers.js";import"../../../common/const.js";import"@gem-sdk/core";import{useMemo as e}from"react";import r from"../../../common/components/Loading.js";import m from"../row/Row.js";let i=i=>{let{builderProps:n}=i,a=e(()=>n?.builderData?.name==="SectionLoading",[n]);return a?o(r,{label:t({builderData:n?.builderData})}):o(m,{...i,setting:{...i.setting,as:"section",isSection:!0}})};export{i as default};
|
package/dist/esm/grid/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"../common/const.js";import"@gem-sdk/core";import"react";import"next/link";import"react-youtube";import"@gem-sdk/system";import"
|
|
1
|
+
import"react/jsx-runtime";import"../common/const.js";import"@gem-sdk/core";import"react";import"next/link";import"react-youtube";import"@gem-sdk/system";import"../image/common/listImageContext.js";import"../image/common/listContext.js";import"next/head";import t from"./settings/Section.js";import o from"./settings/Root.js";import m from"./settings/Row.js";import i from"./settings/Col.js";let e={Root:o,Section:t,Row:m,Col:i};export{e as gridSetting};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{cls as i,makeStyleResponsive as
|
|
2
|
+
import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{cls as i,makeStyleResponsive as l}from"@gem-sdk/core";import"../../../../cart/components/shop-pay-button/ShopPayButton.js";import"react";import"@gem-sdk/system";import"next/link";import r from"../../../../image/components/Image.js";import s from"../../../../cart/components/CheckoutNow.js";import"../../../../common/const.js";import"react-youtube";import"../../../../image/common/listImageContext.js";import"../../../../image/common/listContext.js";import"next/head";import p from"../../../../cart/components/Cart.js";import m from"next/dynamic";let a=m(()=>import("./MobileMenu.js")),n=m(()=>import("./DesktopMenu.js")),c=({btnBgColor:m,btnBorder:c,btnRounded:g,btnSpacing:d,btnTextColor:b,btnTypography:h,btnType:f,btnWidth:u,openMode:y,buyNow:x,breakpoint:j,...k})=>{let v=!!k.menu?.ROOT.childrens?.length;return e("div",{className:"gp-relative gp-z-50 gp-flex gp-items-center gp-px-4 gp-justify-between",style:l("h",k.height),children:[v?e(t,{children:[o(a,{...k,className:i({"gp-flex":"desktop"===j,"gp-hidden tablet:gp-flex":"tablet"===j,"gp-hidden mobile:gp-flex":"mobile"===j})}),o(n,{...k,className:i({"!gp-hidden":"desktop"===j,"tablet:!gp-hidden":"tablet"===j,"mobile:!gp-hidden":"mobile"===j})})]}):null,!!k.logo&&o("div",{className:i({"gp-justify-center":"desktop"===j&&v,"tablet:gp-justify-center":"tablet"===j&&v,"mobile:gp-justify-center":"mobile"===j&&v,"gp-flex gp-items-center":"desktop"===j,"tablet:gp-flex tablet:gp-items-center":"tablet"===j,"mobile:gp-flex mobile:gp-items-center":"mobile"===j,"gp-order-first":"desktop"!==j,"mobile:gp-order-[0]":!0,"tablet:gp-order-[0]":"tablet"===j}),children:o(r,{style:l("maxh",k.height),setting:{srcSet:k.logo,alt:"Logo",quality:100,isAdaptive:!0},styles:{customAspectRadio:k.customAspectRadio,aspectRatio:k.logoAspectRatio,width:k.logoWidth,objectFit:k.layout,opacity:{normal:0,hover:0}}})}),e("div",{className:"gp-flex gp-items-center gp-gap-4",children:[x&&o(s,{className:"mobile:gp-hidden",setting:{label:"Buy Now",openMode:y},styles:{backgroundColor:m,borderBtn:c,roundedBtn:g,btnSpacing:d,textColor:b,typography:h,type:f,width:u}}),o(p,{setting:{iconOnly:!0,svgIcon:k.cartIcon,enableHoverEffect:k.cardEnableHoverEffect??!0},styles:{iconColor:k.cartIconColor}})]})]})};export{c as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as
|
|
2
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{makeStyleResponsive as o}from"@gem-sdk/core";import"../../../../cart/components/shop-pay-button/ShopPayButton.js";import"react";import"@gem-sdk/system";import"next/link";import"../../../../image/components/AdaptiveImage.js";import"../../../../image/common/listImageContext.js";import"../../../../image/common/listContext.js";import"../../../../common/const.js";import"react-youtube";import"next/head";import m from"../../../../cart/components/Cart.js";let r=r=>t("div",{className:"gp-relative gp-flex gp-items-center gp-px-4",style:o("h",r.height),children:["Coming Soon",e("div",{className:"gp-ml-auto gp-flex gp-items-center gp-pr-4",children:e(m,{setting:{iconOnly:!0,enableHoverEffect:r.cardEnableHoverEffect??!0}})})]});export{r as default};
|
package/dist/esm/header/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"react/jsx-runtime";import"@gem-sdk/core";import"next/link";import"react";import"react-transition-group";import"../cart/components/shop-pay-button/ShopPayButton.js";import"@gem-sdk/system";import"../image/components/AdaptiveImage.js";import"
|
|
1
|
+
import"react/jsx-runtime";import"@gem-sdk/core";import"next/link";import"react";import"react-transition-group";import"../cart/components/shop-pay-button/ShopPayButton.js";import"@gem-sdk/system";import"../image/components/AdaptiveImage.js";import"../image/common/listImageContext.js";import"../image/common/listContext.js";import"../common/const.js";import"react-youtube";import"next/head";export{default as BasicHeader}from"./components/kind/basic/index.js";import t from"./settings/Header.js";export{default as Header}from"./components/Header.js";let e={Header:t};export{e as headerSetting};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,getHeightByShapeGlobalSize as t,makeStyleWithDefault as r,getWidthByShapeGlobalSize as o,getStyleShadow as l,getStyleBgColor as n,getRadiusStyleActiveState as a,makeStyle as i,getSingleColorVariable as
|
|
1
|
+
import{makeStyleResponsive as e,getHeightByShapeGlobalSize as t,makeStyleWithDefault as r,getWidthByShapeGlobalSize as o,getStyleShadow as l,getStyleBgColor as n,getRadiusStyleActiveState as a,makeStyle as i,getSingleColorVariable as b,makeStyleState as c,getGlobalColorStateStyle as d,getResponsiveStylePadding as g,getStyleBackgroundByDevice as p,DEVICES as u,getValueByDevice as s,getResponsiveValueByScreen as m}from"@gem-sdk/core";import{getVisibilityStyle as h,getStyleAspectRatioHeroBannerCustom as f,getOpacityHover as w,getDisplayStyleByFitContent as v,getAttachmentDevice as y,formatHoverScale as S,getStyleHeroBannerBg as k,getClipPath as j,opacityEnabledData as $,getResponsiveSetting as O}from"./helpers.js";function A(e){return Object.fromEntries(Object.entries(e||{}).filter(([,e])=>void 0!==e||""===e))}let B=(l,n,a)=>{let{sizeSetting:i}=l??{},b={...a,...h(a),...r("w",o(i,!0),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"}),...e("h",t(i))};return A(b)},E=r=>{let{sizeSetting:o,background:c,borderBg:d,cornerBg:g,shadowBg:p,hasActiveShadow:u}=r??{},s={...e("h",t(o)),...f(c,o),...i({bs:d?.border??d?.border,bw:d?.width??d?.width,bc:b(d?.color)}),...a({...g,active:{...g||{},radiusType:"custom"}}),...c?{...n(c)}:{},...l({value:p,styleAppliedFor:"box-shadow",isEnableShadow:u})};return A(s)},x=e=>{let{overlayColor:t,overlayOpacity:r,hoverEffect:o}=e??{},{disableOpacity:l}=$(e),n="number"!=typeof r?.normal||isNaN(r?.normal)?"string"==typeof r?.normal?`${parseInt(r?.normal)}%`:"0%":`${r?.normal}%`,a=c("op",{normal:n,hover:w(e)}),i=d("bgc",{...t,hover:t?.hover||t?.normal});l&&(delete i?.["--bgc"],delete a?.["--op"]),o||(delete i?.["--hvr-bgc"],delete a?.["--hvr-op"]);let b={...i,...a,"--top":"0","--left":"0"};return A(b)},I=e=>{let{contentPadding:t}=e??{},r={...g(t)};return A(r)},N=({background:e,device:t})=>{let r=Number(m(e,t)?.image?.width);return r>0?`${r}px`:void 0},C=({sizeSetting:e,background:t})=>{let r=o(e,!0);return Object.fromEntries(u.flatMap(e=>{let o=r[e];return void 0===o?[]:"auto"!==o?[[e,o]]:[[e,N({background:t,device:e})??"100%"]]}))},F=o=>{let{sizeSetting:l,background:n}=o??{},a={...v(l,n),...e("h",t(l)),...r("w",C({sizeSetting:l,background:n}),{desktop:"--g-ct-w",tablet:"--g-ct-w",mobile:"--g-ct-w"})};return A(a)},z=(t,r,o)=>{let{hoverEffectScale:l,background:n,hoverEffectDuration:a}=t??{},i=`${parseFloat(`${a}`)??.5}s`,b={...k(O(n||{}),r),...p(n,{ignoreBgAttachment:!0,ignoreBackgroundImage:!0}),"--duration":i,"--scale":S(l),...e("pos",y(n)),transform:o,transition:`transform ${i} cubic-bezier(0,0,0,1)`};return A(b)},H=e=>{let{borderBg:t,cornerBg:r}=e??{},o={"clip-path":j(t?.width,r)};return A(o)},M=e=>{if(e)return{desktop:s(e,"desktop"),tablet:s(e,"tablet"),mobile:s(e,"mobile")}},R=e=>{if(!e)return;let t={};return u.forEach(r=>{let o=m(e,r),l=o?.videoAlign;t[r]=l||"top"}),Object.keys(t).length>0?t:void 0},T=(t,r,o)=>{let l=M(r),n=R(o),a={...e("aspect",t),...l?e("objf",l):{},...n?e("objp",n):{}};return A(a)},V=(t,r)=>{let o=M(r),l={...e("aspect",t),...o?e("objf",o):{},"pointer-events":"none"};return A(l)};export{F as getAdaptiveStyle,z as getBackgroundStyle,H as getContainBackgroundStyle,E as getContainerStyle,T as getHtml5VideoStyle,x as getOverlayStyle,I as getRowStyle,B as getStyle,V as getYoutubeIframeStyle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsx as e,jsxs as o}from"react/jsx-runtime";import t from"../../image/components/AdaptiveImage.js";import s from"../../video/components/HTML5Embed.js";import{createStyle as
|
|
2
|
+
import{jsx as e,jsxs as o}from"react/jsx-runtime";import t from"../../image/components/AdaptiveImage.js";import{PRIORITY_LOAD_ATTRS as s}from"../../image/constants.js";import i from"../../video/components/HTML5Embed.js";import{createStyle as r,createClass as m}from"@gem-sdk/system";import"../../common/const.js";import{useEditorMode as l,filterToolbarPreview as a,getAspectRatioGlobalSize as d}from"@gem-sdk/core";import{useMemo as n}from"react";import p from"../../grid/components/row/Row.js";import{getContainerStyle as c,getOverlayStyle as f,getRowStyle as u,getAdaptiveStyle as y,getBackgroundStyle as v,getContainBackgroundStyle as h,getYoutubeIframeStyle as g,getHtml5VideoStyle as j}from"../common/styles.js";import{getContainerClasses as b,getOverlayClasses as N,getRowClasses as T,getAdaptivePictureClasses as H,getAdaptiveClasses as k,getBackgroundClasses as w,getContainBackgroundClasses as B,getHtml5VideoClasses as C,getWrapperYoutubeClasses as V,getIframeYoutubeClasses as z}from"../common/classes.js";import{getBackgroundImageHeroBanner as I,showVideoType as M,scrollToContentBanner as Y,getWidth as E,horizontalAlign as L,fallbackImg as x,getBgImage as A}from"../common/helpers.js";import{getYoutubeVideoId as R,youtubeVideoRegex as $}from"../../video/common/helpers.js";import O from"../../video/components/LiteYouTubeEmbed.js";import{getYoutubeContentClasses as S}from"../../video/common/classes.js";import W from"../hooks/useHeroBannerItem.js";let q=q=>{l();let{setting:D,styles:F,children:G,elementRef:J,transform:K,dataVideo:P,bgRef:Q,isShowVideoHtml5:U,layoutResponsive:X,heroBannerWrapperRef:Z}=q,{layout:_,verticalAlign:ee,enableParallax:eo,alt:et,title:es,preload:ei}=D??{},{background:er,overlayColor:em,verticalGutter:el,sizeSetting:ea,contentWidth:ed,hoverEffect:en,contentPosition1Col:ep,contentPosition2Col:ec,videoObjectFit:ef}=F??{},eu=r({...c(F)}),ey=m({...b(D,F)}),ev=r({...f(F)}),eh=m({...N(F)}),eg=r({...u(F)}),ej=m({...T(F,D)}),eb=r({...y(F)}),eN=m({...H()}),eT=m({...k()}),eH=m({...w(en,!1)}),ek=r({...I(er,!1,!0),...v(F,eo,K)}),ew=m({...B()}),eB=r({...h(F)}),eC=m({...C(!U)}),{youtubeIframeWrapperRef:eV,resolvedAspectRatio:ez,youtubeAspectRatio:eI}=W({videoType:P?.videoType,sizeSetting:ea,background:er,videoObjectFit:ef,heroBannerWrapperRef:Z,isYoutubeVideoMigrated:D?.isYoutubeVideoMigrated}),eM=r({...g(eI,ef)}),eY=r({...j(ez,ef,er)}),eE=m({...V(D?.isYoutubeVideoMigrated)}),eL=m({...z()}),ex=m({...S()}),eA=n(()=>{if(!M(er))return;if(P?.videoType==="html5"&&!P.videoHtml5||P?.videoType==="youtube"&&!P.video)return null;if(P?.type==="video"&&P?.videoType==="html5"&&P?.videoHtml5)return e(i,{muted:!0,loop:P?.loop,controls:!1,autoplay:!0,src:P?.videoHtml5||"",title:"Video",style:eY,className:eC});let o=P?.video??"",t=R(o),s=P?.loop?1:0,r=`&loop=${s}&playlist=${t}&showinfo=0&rel=0&fs=0&enablejsapi=1`;if(P?.type==="video"&&P?.videoType==="youtube"&&t&&$.test(o))return e("div",{className:ex,ref:eV,children:e(O,{id:t,isHeroBanner:!0,autoplay:!0,title:"Video",controls:!1,params:r,adNetwork:!1,noCookie:!0,muted:!0,lazy:P?.lazyLoad??!0,style:eM,wrapperClass:eE,iframeClass:eL})})},[P,er,eC,eL,eE,eM,eY,eV]);return o("div",{className:ey,style:eu,children:[o("div",{ref:J,className:ew,style:eB,children:[e("div",{ref:Q,className:eH,style:ek,children:eA}),!!em&&e("div",{"aria-label":"Overlay",className:eh,style:ev})]}),e(p,{className:ej,style:eg,setting:{layout:_,horizontalAlign:L(_,ep,ec),verticalAlign:ee},styles:{verticalGutter:el,width:E(ed),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},hiddenEmptyCol:X?.cols?.length===1,onBlur:e=>Y(e),children:a(G)}),e(t,{pictureClass:eN,srcSet:A(er),className:eT,aspectRatio:d(ea),style:eb,alt:et,title:es,fallbackImg:x,...ei&&s,sizeTarget:"HeroBanner"})]})};export{q as default};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{template as e,getAspectRatioGlobalSize as t,DEVICES as o,getResponsiveValueByScreen as s,hasTranslatedLiquid as i}from"@gem-sdk/core";import
|
|
2
|
-
<div class="${
|
|
1
|
+
import{template as e,getAspectRatioGlobalSize as t,DEVICES as o,getResponsiveValueByScreen as s,hasTranslatedLiquid as i}from"@gem-sdk/core";import r from"../../image/components/AdaptiveImage.liquid.js";import l from"../../video/components/HTML5Embed.liquid.js";import{createStyle as a,createClass as m,If as d}from"@gem-sdk/system";import n from"../../grid/components/row/Row.liquid.js";import{getContainerStyle as p,getOverlayStyle as u,getRowStyle as c,getAdaptiveStyle as f,getBackgroundStyle as g,getContainBackgroundStyle as v,getYoutubeIframeStyle as y,getHtml5VideoStyle as j}from"../common/styles.js";import{getContainerClasses as $,getOverlayClasses as b,getRowClasses as h,getAdaptivePictureClasses as T,getAdaptiveClasses as C,getBackgroundClasses as I,getContainBackgroundClasses as w,getHtml5VideoClasses as k,getWrapperYoutubeClasses as x,getIframeYoutubeClasses as z,getLazyBackgroundClasses as H}from"../common/classes.js";import{getAspectRatio as N,getYoutubeAspectRatio as q,getBackgroundImageHeroBanner as L,getWidth as S,horizontalAlign as B,getEnableBgImageByDevice as A,getBgImage as V,showVideoType as E,getResponsiveSetting as R,fallbackImg as D}from"../common/helpers.js";import{getYoutubeVideoId as M,youtubeVideoRegex as O}from"../../video/common/helpers.js";import U from"../../video/components/LiteYouTubeEmbed.liquid.js";import{isRenderHtmlVideo as W}from"../../grid/components/row/common/helpers.js";import Y from"../../image/components/NextImage.liquid.js";import{PRIORITY_LOAD_ATTRS as F}from"../../image/constants.js";import{getImageSrc as G}from"../../image/common/helpers.js";import{getSeoTranslated as J}from"../../helpers.js";let K=K=>{let{translatedBackground:P,setting:Q,styles:X,children:Z,builderProps:_,rawChildren:ee,pageContext:et}=K,{layout:eo,verticalAlign:es,enableParallax:ei,alt:er,title:el,preload:ea,isYoutubeVideoMigrated:em}=Q??{},{background:ed,overlayColor:en,verticalGutter:ep,sizeSetting:eu,contentWidth:ec,hoverEffect:ef,contentPosition1Col:eg,contentPosition2Col:ev,videoObjectFit:ey}=X??{},ej=!ea&&(et?.enableLazyLoadImage??!0),e$=N(eu,ed),eb=q(ed,ey,e$),eh=R(P||{}),eT=eh.desktop,eC=a({...p(X)}),eI=m({...$(Q,X)}),ew=a({...u(X)}),ek=m({...b(X)}),ex=a({...c(X)}),ez=m({...h(X,Q)}),eH=a({...f(X)}),eN=m({...T()}),eq=m({...C()}),eL=m({...I(ef,ej)}),eS=a({...L(P,ej,!1),...g(X,ei,"")}),eB=m({...w()}),eA=a({...v(X)}),eV=m({...k(!1)}),eE=a({...y(eb,ey)}),eR=m({...x(em)}),eD=a({...j(e$,ey,ed)}),eM=m({...z()}),eO=e=>m({...H(e)});return e`
|
|
2
|
+
<div class="${eI}" style="${eC}">
|
|
3
3
|
<div
|
|
4
|
-
class="${
|
|
5
|
-
style="${
|
|
4
|
+
class="${eB}"
|
|
5
|
+
style="${eA}"
|
|
6
6
|
>
|
|
7
|
-
<div class="${
|
|
8
|
-
${(()=>{if(!
|
|
9
|
-
${(()=>{if(!
|
|
7
|
+
<div class="${eL}" style="${eS}">
|
|
8
|
+
${(()=>{if(!ea)return o.map(e=>d(A(e,P),Y({src:G(s(V(P),e),e),resolvedSrc:s(V(ed),e)?.src,sizeTarget:"HeroBanner",alt:J({valueTranslate:er,uid:_?.uid,settingId:"alt",pageContext:et??{}}),title:J({valueTranslate:el,uid:_?.uid,settingId:"title",pageContext:et??{}}),className:eO(e),isDisableAspectStyle:!0}))).join("")})()}
|
|
9
|
+
${(()=>{if(!E(ed))return;if(W(ed))return l({uid:_?.uid,muted:!0,loop:eT?.loop,controls:!1,autoplay:!0,src:eT?.videoHtml5||"",title:"Video",style:eD,className:eV});let e=eT?.video??"",t=M(e),o=`&loop=false&playlist=${t}&showinfo=0&rel=0&fs=0&enablejsapi=1`,s=i(e);if(eT?.type==="video"&&eT?.videoType==="youtube"&&t&&O.test(e)||s)return U({uid:_?.uid,id:t??"",translatedVideoUrl:s?e:"",isHeroBanner:!0,autoplay:!0,title:"Video",controls:!1,params:o,adNetwork:!1,noCookie:!0,muted:!0,lazy:eT?.lazyLoad??!0,style:eE,wrapperClass:eR,iframeClass:eM})})()}
|
|
10
10
|
</div>
|
|
11
|
-
${d(!!en,e`<div aria-label="Overlay" class="${ek}" style="${
|
|
11
|
+
${d(!!en,e`<div aria-label="Overlay" class="${ek}" style="${ew}"> </div>`)}
|
|
12
12
|
</div>
|
|
13
|
-
${n({className:
|
|
14
|
-
${
|
|
13
|
+
${n({className:ez,style:ex,setting:{layout:eo,horizontalAlign:B(eo,eg,ev),verticalAlign:es},styles:{verticalGutter:ep,width:S(ec),fullWidth:{desktop:!1,tablet:!1,mobile:!1}},children:Z,rawChildren:ee})}
|
|
14
|
+
${r({pictureClass:eN,srcSet:V(P),className:eq,...ea&&F,aspectRatio:t(eu),style:eH,alt:J({valueTranslate:er,uid:_?.uid,settingId:"alt",pageContext:et??{}}),title:J({valueTranslate:el,uid:_?.uid,settingId:"title",pageContext:et??{}}),pageContext:et,fallbackImg:D,resolvedSrcSet:V(ed),sizeTarget:"HeroBanner"})}
|
|
15
15
|
</div>
|
|
16
16
|
`};export{K as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./settings/HeroBanner.js";import"react/jsx-runtime";import"@gem-sdk/core";import"@gem-sdk/system";import"next/link";import"react";import"./common/animation-manager.js";import"../image/components/AdaptiveImage.js";import"
|
|
1
|
+
import t from"./settings/HeroBanner.js";import"react/jsx-runtime";import"@gem-sdk/core";import"@gem-sdk/system";import"next/link";import"react";import"./common/animation-manager.js";import"../image/components/AdaptiveImage.js";import"../image/common/listImageContext.js";import"../image/common/listContext.js";import"../common/const.js";import"react-youtube";import"next/head";let m={HeroBanner:t};export{m as bannerSetting};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{FALLBACK_IMAGE as e,getImageSrc as t}from"./helpers.js";import{getImageSrcset as r}from"./srcset.js";import{getImageSizes as s}from"./sizes.js";let i={mobile:"(max-width: 767px)",tablet:"(max-width: 1024px)"},m=["mobile","tablet"],o=({srcSet:o,resolvedSrcSet:l,fallbackImg:p,sizeTarget:c,qualityType:a,qualityPercent:d,isLiquid:f})=>{let x=e=>(f?t(e):e?.src)||"",b=({src:e,device:t})=>r({src:e,resolvedSrc:l?.[t]?.src,sizeTarget:c,qualityType:a,qualityPercent:d}),u=s(),A=x(o?.desktop)||p||e,g=b({src:A,device:"desktop"}),h=m.flatMap(e=>{let t=x(o?.[e]);if(!t)return[];let r=b({src:t,device:e});return[{media:i[e],srcset:r??t,...r&&{sizes:u}}]});return{img:{src:A,srcset:g,...g&&{sizes:u}},sources:h}};export{i as ADAPTIVE_SOURCE_MEDIA,o as getAdaptiveImageSources};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getListAwareLoadingReactAttrs as t,getListAwareReactSizes as e,getListAwareSizes as r,getListAwareLoadingAttrs as i}from"./listContext.js";import{getAspectRatio as s,NEXT_IMAGE_CONFIG as a,getNewBackupFileKey as o,getImageSrc as l}from"./helpers.js";import{HREF_TO_SALES_PAGE as g}from"../../constant.js";import{createAttr as n}from"@gem-sdk/system";import{getImageSrcset as p}from"./srcset.js";import{getImageSizes as u}from"./sizes.js";let y=(t,e)=>({...t,...e&&{"data-id":e}}),c=({urlData:t,imageLink:e,title:r,isLiquid:i=!1})=>{let s=i?{...t,...e?.noFollow&&{rel:"nofollow"},title:r}:{setting:t,title:r};return e?.type!=="go-to-sales-page"?e?.link?s:{}:i?{href:g,target:"_self"}:{setting:{href:g,target:"_self"}}},m=({pageContext:t})=>({...t&&{pageContext:t}}),A="eager",T=t=>t?{loading:A,fetchpriority:"high"}:{loading:"lazy"},f=t=>t.fetchpriority?t:{...t,fetchpriority:"low"},d=t=>f(T(t)),L=({priority:t,isNotLazyload:e})=>t||!e?T(t):{loading:A},F=({styles:t,setting:e,sizeTarget:r,resolvedSrcSet:i})=>{let{alt:a,srcSet:o,priority:l,title:g,qualityType:n,qualityPercent:p}=e??{},u=s({styles:t,setting:e});return{pictureClass:"gp-contents",...a&&{alt:a},...g&&{title:g},...o&&{srcSet:o},...i&&{resolvedSrcSet:i},...l&&{priority:l},...r&&{sizeTarget:r},...n&&{qualityType:n},...p&&{qualityPercent:p},...t?.objectFit&&{layout:t.objectFit},aspectRatio:u}},q=({styles:t,setting:e})=>{let{objectFit:r}=t??{},{vw:i,alt:a,title:o,quality:l,priority:g,isNotLazyload:n,qualityType:p,qualityPercent:u}=e??{},y=s({styles:t,setting:e});return{...e?.image,...i&&{vw:i},...a&&{alt:a},...o&&{title:o},...l&&{quality:l},...g&&{priority:g},isNotLazyload:n,setting:{aspectRatio:y,layout:r,qualityType:p,qualityPercent:u}}},D=t=>{let{id:e,src:s=a.DEFAULT_SRC,alt:g=a.DEFAULT_ALT,title:y,sizes:c,srcset:m,storage:A,baseSrc:T,priority:d,customAttrs:F,width:q=a.DEFAULT_WIDTH,height:D=a.DEFAULT_HEIGHT,setting:E,sizeTarget:_,resolvedSrc:I,isNotLazyload:h,backupFileKey:U,backupFilePath:j,srcIsLiquidCode:b}=t,H=(()=>{if(b)return{src:s,...m&&{srcset:m}};let t=U?o(U,s):"",e=l({src:s,backupFileKey:t,backupFilePath:j,storage:A}),r=p({src:e,resolvedSrc:I,sizeTarget:_,qualityType:E?.qualityType,qualityPercent:E?.qualityPercent});return{src:e,...r&&{srcset:r}}})(),x=b?r():u(),C=c||(H.srcset?x:void 0);return n({...F,...e&&{id:e},...g&&{alt:g},...y&&{title:y},width:q,height:D,draggable:"false",...H,...C&&{sizes:C},...T&&{"base-src":T},...b?i(d):f(L({priority:d,isNotLazyload:h}))})},E=({props:r,listHints:i})=>{let{id:s,src:o=a.DEFAULT_SRC,alt:l=a.DEFAULT_ALT,title:g,sizes:n,width:u=a.DEFAULT_WIDTH,height:y=a.DEFAULT_HEIGHT,priority:c,setting:m,sizeTarget:A,listAware:T,isNotLazyload:f}=r,d=p({src:o,sizeTarget:A,qualityType:m?.qualityType,qualityPercent:m?.qualityPercent}),F=T&&d?e(i):void 0,q=n||F;return{...s&&{id:s},...l&&{alt:l},...g&&{title:g},width:u,height:y,draggable:"false",src:o,...d&&{srcSet:d},...q&&{sizes:q},...T?t({priority:c,listHints:i}):L({priority:c,isNotLazyload:f})}};export{F as getAdaptiveImageAttrs,y as getContainerAttrs,m as getImageLiquidAttrs,c as getLinkWrapperAttrs,d as getLiquidLoadingAttrs,T as getLoadingAttrs,q as getNextImageAttrs,D as getNextImageLiquidAttrs,E as getNextImageReactAttrs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{handleConvertClassColor as e,getFlexGrowClassByShapeGlobalSize as
|
|
1
|
+
import{handleConvertClassColor as e,getFlexGrowClassByShapeGlobalSize as g}from"@gem-sdk/core";let l=(e,l,t)=>{let s=g(t);return{"gp-group/image gp-relative":!0,[`force-publish-${new Date().getTime()}`]:!0,...s,...e&&{[e]:!0},...l&&{[l]:!0}}},t=()=>({"gp-h-full gp-w-full gp-flex pointer-events-auto":!0}),s=(g,l)=>{let t=e(l?.borderImg);return{...g&&{[g]:!0},...t&&{[t]:!0},"gp-inline-block gp-w-full gp-max-w-full":!0}},r=({className:e})=>({...e&&{[e]:!0}}),a=({className:e})=>({...e&&{[e]:!0}});export{a as getAdaptiveImageClasses,l as getContainerClasses,s as getImageClasses,r as getNextImageClasses,t as getWrapperClasses};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,
|
|
1
|
+
import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,makeStyleResponsive as i,DEVICES as r,hasTranslatedLiquid as l,getResponsiveValueByScreen as a,cloneDeep as s}from"@gem-sdk/core";import{REGEX_IS_NON_RESIZABLE_IMAGE_BY_QUERY as o,REGEX_IS_NON_RESIZABLE_IMAGE as n}from"./const.js";import{getDynamicSourceLocales as g,createSettingId as c}from"../../helpers.js";import{Image as d}from"../settings/configs/translate.js";let u=t=>{let i={...t},r=!0;return i&&Object.keys(i??{}).forEach(e=>{if("bblr"===e||"bbrr"===e||"btlr"===e||"btrr"===e){let t=i[e]??{};"0px"!==t&&(r=!1)}}),r?e(i):{}},f=({styles:e,setting:i})=>{let{srcSet:r,image:l}=i??{},{customAspectRadio:a,shape:s}=e??{},o={desktop:m({device:"desktop",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.desktop:l,custom:a}),tablet:m({device:"tablet",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.tablet:l,custom:a}),mobile:m({device:"mobile",aspect:e?.aspectRatio,auto:i?.isAdaptive?r?.mobile:l,custom:a})};return s?t(s):o},m=({device:e,aspect:t,custom:i,auto:r})=>{let l=t?.[e];return"auto"===l?r?.height?`${r.width}/${r.height}`:void 0:"custom"===l?i?.[e]?.height?`${i?.[e]?.width}/${i?.[e]?.height}`:void 0:l},p=({layout:e,isDisableObjectFit:t})=>t?{}:i("objf",e),h=({isDisableAspectStyle:e,aspectRatio:t,objectFits:i,width:l,height:a})=>{if(e)return{};let s={};return r.forEach(e=>{let r=`--objf${"desktop"!==e?`-${e}`:""}`,o=i?.[r]||i?.["--objf"];if(t?.[e]==="auto"&&"contain"===o){s[e]="auto";return}s[e]=t?.[e]!=="auto"&&t?.[e]?t[e]:`${l}/${a}`}),s},b=(e,t)=>`<svg width="${e}" height="${t}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
2
2
|
<defs>
|
|
3
3
|
<linearGradient id="g-${e}-${t}">
|
|
4
4
|
<stop stop-color="rgba(51, 51, 51, 0)" offset="20%" />
|
|
@@ -9,4 +9,4 @@ import{getCornerCSSFromGlobal as e,getAspectRatioGlobalSize as t,hasTranslatedLi
|
|
|
9
9
|
<rect width="${e}" height="${t}" fill="rgba(51, 51, 51, 0)" />
|
|
10
10
|
<rect id="r" width="${e}" height="${t}" fill="url(#g-${e}-${t})" />
|
|
11
11
|
<animate xlink:href="#r" attributeName="x" from="-${e}" to="${e}" dur="1s" repeatCount="indefinite" />
|
|
12
|
-
</svg>`,w=e=>"undefined"==typeof window?Buffer.from(e).toString("base64"):window.btoa(e),$=(e,t)=>`data:image/svg+xml;base64,${w(
|
|
12
|
+
</svg>`,w=e=>"undefined"==typeof window?Buffer.from(e).toString("base64"):window.btoa(e),$=(e,t)=>`data:image/svg+xml;base64,${w(b(e,t))}`,S="https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",A={DEFAULT_ALT:"Alt image",DEFAULT_SRC:"https://cdn.shopify.com/s/files/1/2005/9307/files/placeholder-1.png?v=1751355990",DEFAULT_WIDTH:2237,DEFAULT_HEIGHT:1678},x=({setting:e,uid:t,pageContext:i})=>{if(!e||!d)return{};let r=s(e);for(let e in r.srcSet){let l=r.srcSet[e];if(l&&l.src){let r=g({val:l.src,uid:t,settingId:d?.srcSet?.id?`${d.srcSet.id}_${e}_src`:"",pageContext:i??{}});l.src=String(r)}}let l=g({val:r.alt,uid:t,settingId:c({id:d?.alt?.id}),pageContext:i??{}});r.alt=String(l);let a=g({val:r.title,uid:t,settingId:c({id:d?.title?.id}),pageContext:i??{}});return r.title=String(a),r},y=e=>n.test(e),v=e=>o.test(e),E=(e,t,i)=>{if(e?.metafieldDefinitionKey)return k(e?.metafieldDefinitionKey);let r=e?.backupFilePath??e?.src??"";if(i)r=e?.src||"";else{let t=e?.src??"";if(l(t))return t;if(e?.backupFileKey){let t=F(e.backupFileKey,e?.src??"");"THEME"!==e.storage&&e.storage?"FILE_CONTENT"===e.storage&&(r=`{{ "${I(t)}" | file_url }}`):r=`{{ "${t}" | asset_url }}`}}if(t&&r?.includes("cdn.shopify")&&!v(r))switch(t){case"tablet":r=r?.includes("?")?`${r}&width=1024`:`${r}?width=1024`;break;case"mobile":r=r?.includes("?")?`${r}&width=768`:`${r}?width=768`}return r},k=e=>`{{${e} | file_url}}`,I=e=>e.replace(/\.jpeg|\.jfif/g,".jpg"),F=(e,t)=>{let i=t?.match(/\/files\/([^\/]+\.(jpg|jpeg|gif|png|webp|svg))/)?.[1];return i&&i!=e?i:e};function _(e,t){let i=j({str:e,reg:/_(pico|icon|thumb|small|compact|medium|large|grande|original|1024x1024|2048x2048|master)+\./g,newString:"."});if(y(i))return i;let r=j({str:i,reg:/\.jpg|\.png|\.jpeg/g,newString:t,isAdd:!0});return r}let j=e=>{let t=e.str,i=e.str.match(e.reg)?.length;if(i){let r,l=1;for(;null!==(r=e.reg.exec(e.str));){if(l===i){let i=e.reg.lastIndex,l=i-r[0].length;e.isAdd&&(e.newString="_"+e.newString+r),t=t.slice(0,l)+e.newString+t.slice(i,t.length)}l++}}return t},W=(e,t)=>{let i=q(),r=t?.[i]||"auto";if("auto"===r||r.includes("%"))return e;let l=Number(r.replace("px",""));return l>e?e:Number(r.replace("px",""))},C=e=>{let{itemWidthParam:t,imageWidthSetting:i,qualityType:r,qualityPercent:l}=e,s=q(),o=W(t,i),n=a(r,s,"finest"),g=a(l,s,100);switch(n){case"finest":default:return"auto";case"high":return Math.round(1.5*o)||1;case"medium":return Math.round(o)||1;case"custom":return Math.round(o*(Number(g)/100))||1}},R=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return r.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},T=e=>{let t={desktop:"100%",tablet:"100%",mobile:"100%"};return r.forEach(i=>{let r=a(e,i)?.width||"100%";t[i]=r}),t},D=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-gallery-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},L=e=>{let t=document.querySelectorAll(`.gem-slider-item-${e}.gp-ft-image-item`),i=0;return t.forEach(e=>{e.offsetWidth>i&&(i=e.offsetWidth)}),i},N=e=>{let{shapeByLayout:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-gallery-image-item`),s=T(t),o=D(l);a.forEach(e=>{K({item:e,settingWidth:s,width:o,qualityType:i,qualityPercent:r})})},B=e=>{let{ftShape:t,qualityType:i,qualityPercent:r,builderPropUID:l}=e,a=document.querySelectorAll(`.gem-slider-item-${l}.gp-ft-image-item`),s=R(t),o=L(l);a.forEach(e=>{K({item:e,settingWidth:s,width:o,qualityType:i,qualityPercent:r})})},K=e=>{let{item:t,settingWidth:i,width:r,qualityType:l,qualityPercent:a}=e,s=q(),o=t.querySelector("img");if(o){let e=C({itemWidthParam:r,imageWidthSetting:i,qualityType:l,qualityPercent:a}),t=o.getAttribute("base-src");if(!t)return;let n=G(e,t),g=M(t,n,s);o.setAttribute("srcset",g)}},G=(e,t)=>"auto"===e?t:_(t,`${e}x`),M=(e,t,i)=>`${"mobile"===i&&e!==t?t:_(e,"768x")} 767w, ${"tablet"===i&&e!==t?t:_(e,"1024x")} 1023w, ${"desktop"===i&&e!==t?t:_(e,"1920x")} 1440w`,q=()=>window.innerWidth<768?"mobile":window.innerWidth>=768&&window.innerWidth<1025?"tablet":"desktop";export{S as FALLBACK_IMAGE,A as NEXT_IMAGE_CONFIG,m as composeAspectRatio,$ as createBlurDataURL,f as getAspectRatio,h as getAspectRatioNextImage,q as getCurrentDevice,E as getImageSrc,C as getImageWidthFollowByQuality,F as getNewBackupFileKey,p as getResponsiveObjectFit,x as getSettingTranslatedImageAndSeo,B as handleSetSrcForFeatureProductImage,N as handleSetSrcForProductImageList,y as isCannotResizeImage,v as isCannotResizeImageByQuery,u as overwriteDefaultRadius,I as replaceBackupFileKeyFileContent,_ as resizeImage,b as shimmer,w as toBase64};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getSrcsetCandidates as e,isEveryCandidateOriginal as t,ORIGINAL_QUALITY as r}from"./srcset.js";let i=5760,a=({liquidSrc:e,width:t,descriptor:a})=>t===r?`{{ ${e} | image_url }} ${a}w`:`{{ ${e} | image_url: width: ${Math.min(t,i)} }} ${a}w`,m=({liquidSrc:r,fallbackSrc:i="",...m})=>{let u=(e,t="")=>`{% if ${r} != blank %}${e}${t&&`{% else %}${t}`}{% endif %}`,$=u(`{{ ${r} | image_url }}`,i),l=e(m);if(t(l))return{src:$};let g=l.map(e=>a({liquidSrc:r,...e})).join(", ");return{src:$,srcset:u(g)}},u=({liquidSrc:r,sizeTarget:i="ProductFeatureImage",qualityType:m,qualityPercent:u})=>{let $=e({sizeTarget:i,qualityType:m,qualityPercent:u});if(!t($))return $.map(e=>a({liquidSrc:r,...e})).join(", ")};export{i as SHOPIFY_IMAGE_URL_MAX_WIDTH,m as getLiquidImageObjectSources,u as getLiquidImageSrcset};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{LIST_IMAGE_LIQUID_VARS as e}from"@gem-sdk/core";import{getImageSizes as i}from"./sizes.js";let t={EAGER:"eager",LAZY:"lazy"},r={HIGH:"high",AUTO:"auto",LOW:"low"},o=i(),A=i=>i?{loading:`{% if ${e.LOADING} == '${t.LAZY}' %}${t.LAZY}{% else %}${t.EAGER}{% endif %}`,fetchpriority:`{% if ${e.FETCH_PRIORITY} == '${r.AUTO}' %}${r.AUTO}{% else %}${r.HIGH}{% endif %}`}:{loading:t.LAZY,fetchpriority:r.LOW},a=()=>`{{ ${e.SIZES} | default: '${o}' }}`,s=({priority:e,listHints:i})=>e?{loading:i?.loading??t.EAGER,fetchpriority:i?.fetchpriority??r.HIGH}:{loading:t.LAZY},g=e=>e?.sizes??"100vw";export{A as getListAwareLoadingAttrs,s as getListAwareLoadingReactAttrs,g as getListAwareReactSizes,a as getListAwareSizes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createContext as t}from"react";let e=t(void 0);export{e as ListImageContext};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let e=100,t=e=>`${Number(e.toFixed(2))}vw`,x=({slotVw:x=e}={})=>`(max-width: 1024px) ${t(x/2)}, ${t(x)}`;export{x as getImageSizes};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hasTranslatedLiquid as e,DEVICES as t,getResponsiveValueByScreen as r}from"@gem-sdk/core";import{isCannotResizeImageByQuery as i}from"./helpers.js";let l={mobile:768,tablet:1024,desktop:1440},a={Image:{desktop:1024,tablet:1024,mobile:480},HeroBanner:{desktop:1920,tablet:1280,mobile:768},ImageComparison:{desktop:1024,tablet:768,mobile:576},ProductFeatureImage:{desktop:1024,tablet:1024,mobile:576},GalleryList:{desktop:256,tablet:256,mobile:128},ArticleImage:{desktop:1024,tablet:768,mobile:480}},o="high",s={high:100,medium:70},n=["GalleryList"],d="original",m=/\s*%\s*$/,p=e=>{if("number"==typeof e)return e;let t=Number.parseFloat(String(e??"").replace(m,""));return Number.isFinite(t)?t:100},u=/^\{\{\s*([\s\S]*?)\s*\}\}$/,c=/\{\{|\{%/,b=e=>!!e&&e.includes("cdn.shopify")&&!i(e),f=({qualityType:e,qualityPercent:i})=>{if(!e&&!i)return;let l={};for(let a of t){let t=r(e,a,o)??o;if("finest"===t){l[a]=d;continue}let n="custom"===t?p(r(i,a,100)):s[t]??100;l[a]=(n>0?n:100)/100}return l},g=(e,t)=>{let r=e.match(u);return r?`{{ ${r[1]} | append: '?width=${t}' | replace: '?', '&' | replace_first: '&', '?' }}`:`${e}${e.includes("?")?"&":"?"}width=${t}`},h=({sizeTarget:e="Image",qualityType:i,qualityPercent:o})=>{let s=f({qualityType:i,qualityPercent:o}),m=a[e]??a.Image,p=!n.includes(e),u=e=>{let t=r(s,e,1)??1;return t===d?p?d:m[e]:Math.round(m[e]*t)};return t.map(e=>({device:e,width:u(e),descriptor:l[e]})).sort((e,t)=>e.descriptor-t.descriptor)},I=e=>e.every(e=>e.width===d),S=({src:t,resolvedSrc:r,sizeTarget:i,qualityType:l,qualityPercent:a})=>{if(!t)return;let o=u.test(t);if(!o&&c.test(t))return;let s=o?e(t)?r:void 0:t;if(!b(s))return;let n=h({sizeTarget:i,qualityType:l,qualityPercent:a});if(!I(n))return n.map(({width:e,descriptor:r})=>{let i=e===d?t:g(t,e);return`${i} ${r}w`}).join(", ")};export{d as ORIGINAL_QUALITY,l as SRCSET_DEVICE_DESCRIPTORS,a as SRCSET_TARGET_WIDTHS,g as appendWidthParam,b as canResizeByShopifyCdn,S as getImageSrcset,f as getQualityMultiplier,h as getSrcsetCandidates,I as isEveryCandidateOriginal};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{
|
|
2
|
+
import{jsxs as s,jsx as e}from"react/jsx-runtime";import{createStyleReact as t,createStyle as r,createClass as m}from"@gem-sdk/system";import{getAdaptivePictureStyles as o,getAdaptiveImageStyles as a}from"../common/styles.js";import{getAdaptiveImageSources as c}from"../common/adaptiveSources.js";import{getAdaptiveImageClasses as i}from"../common/classes.js";import{getLoadingAttrs as l}from"../common/attrs.js";let p=p=>{let{alt:d,style:f,srcSet:u,layout:n,priority:g,className:j,aspectRatio:y,borderRadius:v,pictureClass:x,fallbackImg:S,sizeTarget:h,qualityType:k,qualityPercent:N,resolvedSrcSet:b,pageContext:q,...w}=p,{img:A,sources:C}=c({srcSet:u,resolvedSrcSet:b,fallbackImg:S,sizeTarget:h,qualityType:k,qualityPercent:N,isLiquid:!1}),I=t({...o()}),L=r({...a({layout:n,aspectRatio:y,borderRadius:v}),...f}),P=m({...i({className:j})});return s("picture",{style:I,className:x,children:[C.map(({media:s,srcset:t})=>e("source",{media:s,srcSet:t},s)),e("img",{...w,src:A.src,...A.srcset&&{srcSet:A.srcset},...l(g),alt:d,width:"100%",style:L,className:P,draggable:"false"})]})};p.defaultProps={layout:{desktop:"cover"}};export{p as default};
|