@gem-sdk/components 18.5.0 → 18.5.2
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/grid/components/row/Row.liquid.js +12 -12
- package/dist/cjs/hero-banner/common/classes.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +10 -10
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +9 -9
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.js +1 -1
- package/dist/cjs/image/components/AdaptiveImage.liquid.js +8 -8
- 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 +2 -2
- package/dist/cjs/image-comparison/components/CompareImage.liquid.js +10 -10
- package/dist/cjs/product/components/product-description/ProductDescription.js +1 -1
- package/dist/cjs/product/components/product-description/ProductDescription.liquid.js +2 -3
- package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +15 -15
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v3/ProductImagesV3.liquid.js +15 -15
- package/dist/cjs/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/cjs/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +2 -2
- package/dist/cjs/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/cjs/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +13 -13
- 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/grid/components/row/Row.liquid.js +11 -11
- package/dist/esm/hero-banner/common/classes.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +10 -10
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.js +1 -1
- package/dist/esm/image/components/AdaptiveImage.liquid.js +11 -11
- package/dist/esm/image/components/Image.liquid.js +10 -10
- package/dist/esm/image/components/NextImage.js +1 -1
- package/dist/esm/image/components/NextImage.liquid.js +1 -1
- package/dist/esm/image-comparison/components/CompareImage.liquid.js +12 -12
- package/dist/esm/product/components/product-description/ProductDescription.js +1 -1
- package/dist/esm/product/components/product-description/ProductDescription.liquid.js +3 -4
- package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +15 -15
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v2/components/gallery-carousel/GalleryCarousel.liquid.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/ProductImagesV3.liquid.js +15 -15
- package/dist/esm/product/components/product-images-v3/components/feature-gallery/FeatureImageWithGallery.liquid.js +5 -5
- package/dist/esm/product/components/product-images-v3/components/gallery-carousel/GalleryCarousel.liquid.js +2 -2
- package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js +5 -5
- package/dist/esm/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +12 -12
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +14 -14
- package/dist/esm/video/components/LiteYouTubeEmbed.js +1 -1
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +11 -11
- package/dist/esm/video/components/Video.liquid.js +1 -1
- package/dist/types/index.d.ts +0 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";import{getAspectRatio as t,getPaddingBottomByShapeSetting as r,getSrcImage as s}from"../../common/common.js";import{checkRenderFeaturedCarousel as d,getZoomImageClass as o,getZoomLenClass as u,getVideoHeight as m}from"../../common/productFeaturedImage.js";import l from"../../../../../video/components/HTML5Embed.liquid.js";import p from"../../../../../image/components/Modal3d.liquid.js";import g from"../../../../../image/components/NextImage.liquid.js";import n from"../../../../../image/components/Video.liquid.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getProductImagesStyles as f}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as h}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as y}from"../../composables/getProductImagesAttr.js";import{If as M,LiquidIf as _,LiquidFor as w,Liquid as v,createStyle as b}from"@gem-sdk/system";import $ from"../../../../../carousel-v3/components/root/Carousel.liquid.js";import I from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";let x=({builderPropUID:x,children:q,
|
|
1
|
+
import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";import{getAspectRatio as t,getPaddingBottomByShapeSetting as r,getSrcImage as s}from"../../common/common.js";import{checkRenderFeaturedCarousel as d,getZoomImageClass as o,getZoomLenClass as u,getVideoHeight as m}from"../../common/productFeaturedImage.js";import l from"../../../../../video/components/HTML5Embed.liquid.js";import p from"../../../../../image/components/Modal3d.liquid.js";import g from"../../../../../image/components/NextImage.liquid.js";import n from"../../../../../image/components/Video.liquid.js";import{getStyleOfObject as c}from"../../../../helpers/function.js";import{getProductImagesStyles as f}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as h}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as y}from"../../composables/getProductImagesAttr.js";import{If as M,LiquidIf as _,LiquidFor as w,Liquid as v,createStyle as b}from"@gem-sdk/system";import $ from"../../../../../carousel-v3/components/root/Carousel.liquid.js";import I from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";let x=({builderPropUID:x,children:q,pageContext:S,...z})=>{let{featuredImageCarouselClasses:j,galleryItemClasses:L,featuredCarouselItemClasses:P}=h({...z,builderProps:{uid:x}}),{featuredImageCarouselStyle:R,featureImageStyle:T,featureImageCarouselOnlyOneImageStyle:W,featureImageOnlyOneImageStyle:C,featureImageCarouselItemStyle:N}=f(z),{featuredImageCarouselSettingAttrs:k}=y(z),E=t(z.ftShape),O=M("other"==z.hoverEffect,_("product.media.size > 1","group-hover:gp-opacity-0")),A=()=>`
|
|
2
2
|
{% case featureMedia.media_type %}
|
|
3
3
|
{% when 'image' %}
|
|
4
4
|
${F()}
|
|
@@ -13,7 +13,7 @@ import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";impor
|
|
|
13
13
|
{% else %}
|
|
14
14
|
${G()}
|
|
15
15
|
{% endcase %}
|
|
16
|
-
`,D=()=>p({src:_("featureMedia.sources.first.url contains '.glb'","{{ featureMedia.sources.first.url }}","{{featureMedia.sources.last.url}}"),alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:E}),V=()=>n({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:E}),H=()=>{let a=b({...m({ftLayout:z?.ftLayout,ftShape:z?.ftShape}),...e("objf",z?.ftLayout)}),i=b({...m({ftLayout:z?.ftLayout,ftShape:z?.ftShape})});return l({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,wrapperStyles:i,poster:{altText:"{{featureMedia.alt | escape}}"},style:{width:"100%","max-height":"100%",...a},className:"gp-invisible"})},F=()=>i`
|
|
16
|
+
`,D=()=>p({src:_("featureMedia.sources.first.url contains '.glb'","{{ featureMedia.sources.first.url }}","{{featureMedia.sources.last.url}}"),alt:"{{featureMedia.preview_image.alt}}",poster:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%"},aspectRatio:E}),V=()=>n({src:"{{mediaSourceVideo}}",alt:"{{featureMedia.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"},aspectRatio:E}),H=()=>{let a=b({...m({ftLayout:z?.ftLayout,ftShape:z?.ftShape}),...e("objf",z?.ftLayout)}),i=b({...m({ftLayout:z?.ftLayout,ftShape:z?.ftShape})});return l({src:"{{mediaSourceVideo}}",title:"{{featureMedia.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{featureMedia.preview_image.src | product_img_url: '1024x1024'}}",isCheckLoaded:!0,wrapperStyles:i,poster:{altText:"{{featureMedia.alt | escape}}"},style:{width:"100%","max-height":"100%",...a},className:"gp-invisible",pageContext:S})},F=()=>i`
|
|
17
17
|
${B(a("gp-w-full gp-transition-opacity",O,"{{shouldHidden}}"))}
|
|
18
18
|
${M(z?.hoverEffect!=="none",`<div class="${a("zoom-element !gp-max-w-none",o())}">
|
|
19
19
|
${B("image-zoom",!0)}
|
|
@@ -29,8 +29,8 @@ import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";impor
|
|
|
29
29
|
{% assign otherImage = product.media[other_image_index] %}
|
|
30
30
|
${_("otherImage.media_type != 'image'","{% assign src = otherImage.preview_image.src %}","{% assign src = otherImage.src %}")}
|
|
31
31
|
`)}
|
|
32
|
-
${g({srcIsLiquidCode:!0,src:_("src != null",s("src"),"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:_("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${s("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:z?.ftLayout,aspectRatio:E,qualityType:z?.qualityType,qualityPercent:z?.qualityPercent},priority:z?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e??""}`,
|
|
33
|
-
${g({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:z?.ftLayout,aspectRatio:E,qualityType:z?.qualityType,qualityPercent:z?.qualityPercent},priority:z?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none",
|
|
32
|
+
${g({srcIsLiquidCode:!0,src:_("src != null",s("src"),"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif"),id:_("featureMedia != null","{{featureMedia.id}}"),width:"{{featureMedia.width}}",height:"{{featureMedia.height}}",alt:"{{featureMedia.alt | escape}}",srcset:`${s("src")}`,baseSrc:"{{src | image_url}}",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:z?.ftLayout,aspectRatio:E,qualityType:z?.qualityType,qualityPercent:z?.qualityPercent},priority:z?.preload,className:`gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none ${e??""}`,pageContext:S})}`,G=()=>i`
|
|
33
|
+
${g({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{layout:z?.ftLayout,aspectRatio:E,qualityType:z?.qualityType,qualityPercent:z?.qualityPercent},priority:z?.preload,className:"gp-w-full gp-h-full gp-absolute gp-top-0 gp-left-0 featured-image-only gp-cursor-pointer !gp-rounded-none",pageContext:S})}`,J=r(z.ftShape),K=d(z),Q="gp-featured-image-wrapper",U=_("product.media.size > 0",`{% assign largestRatio = 0 %}
|
|
34
34
|
${w("featureMedia in product.media",`
|
|
35
35
|
${_("featureMedia.media_type == 'video' and featureMedia.preview_image",`{% assign height = featureMedia.preview_image.height | times: 1.0 %}
|
|
36
36
|
{% assign width = featureMedia.preview_image.width | times: 1.0 %}`,`{% assign height = featureMedia.height | times: 1.0 %}
|
|
@@ -55,7 +55,7 @@ import{makeStyleResponsive as e,cls as a,template as i}from"@gem-sdk/core";impor
|
|
|
55
55
|
${A()}
|
|
56
56
|
</div>
|
|
57
57
|
`})}`)}
|
|
58
|
-
`,g({src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:"480",height:"480",alt:"no image",priority:z?.preload,setting:{layout:z?.ftLayout,aspectRatio:E,qualityType:z?.qualityType,qualityPercent:z?.qualityPercent},style:{height:"100%"},className:"gp-w-full featured-image-only !gp-rounded-none",customLazyload:!0,
|
|
58
|
+
`,g({src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:"480",height:"480",alt:"no image",priority:z?.preload,setting:{layout:z?.ftLayout,aspectRatio:E,qualityType:z?.qualityType,qualityPercent:z?.qualityPercent},style:{height:"100%"},className:"gp-w-full featured-image-only !gp-rounded-none",customLazyload:!0,pageContext:S}));return v(`
|
|
59
59
|
{% capture featureImageOnlyOne %}
|
|
60
60
|
${v(`
|
|
61
61
|
{% assign featureMedia = variant.featured_media %}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import i from"../../../../../image/components/NextImage.liquid.js";import{getAspectRatio as o,getDisplayStyle as r,getSrcImage as s}from"../../common/common.js";import{getShapeByLayout as a,getMinHeightByPosition as p,getZoomDisplay as l,checkDisplayGalleryByWidth as d,getCarouselVerticalConfigByPosition as m}from"../../common/productGallery.js";import{getStyleOfObject as g}from"../../../../helpers/function.js";import{getProductImagesStyles as n}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as c}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as u}from"../../composables/getProductImagesAttr.js";import{LiquidIf as C,LiquidFor as h}from"@gem-sdk/system";import y from"../../../../../carousel-v3/components/root/Carousel.liquid.js";import v from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";let b=({builderPropUID:b,children:f,
|
|
1
|
+
import{template as e,getResponsiveValueByScreen as t}from"@gem-sdk/core";import i from"../../../../../image/components/NextImage.liquid.js";import{getAspectRatio as o,getDisplayStyle as r,getSrcImage as s}from"../../common/common.js";import{getShapeByLayout as a,getMinHeightByPosition as p,getZoomDisplay as l,checkDisplayGalleryByWidth as d,getCarouselVerticalConfigByPosition as m}from"../../common/productGallery.js";import{getStyleOfObject as g}from"../../../../helpers/function.js";import{getProductImagesStyles as n}from"../../composables/getProductImagesStyles.js";import{getProductImagesClassName as c}from"../../composables/getProductImagesClassName.js";import{getProductImagesAttr as u}from"../../composables/getProductImagesAttr.js";import{LiquidIf as C,LiquidFor as h}from"@gem-sdk/system";import y from"../../../../../carousel-v3/components/root/Carousel.liquid.js";import v from"../../../../../carousel-v3/components/item/CarouselItem.liquid.js";let b=({builderPropUID:b,children:f,pageContext:w,...L})=>{let{featuredImageGalleryClasses:F,galleryItemClasses:x}=c(L),{galleryCarouselSettingAttrs:$}=u(L),{galleryCarouselStyle:I,galleryCarouselItemStyle:_}=n(L),k=a({shape:L.shape,shapeForBottom:L.shapeForBottom,shapeFor1Col:L.shapeFor1Col,shapeFor2Col:L.shapeFor2Col,shapeForFtOnly:L.shapeForFtOnly,shapeForInsideBottom:L.shapeForInsideBottom,shapeForInside:L.shapeForInside},L.position),j=(t,o)=>e`${i({srcIsLiquidCode:!0,src:`${s("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",setting:t,baseSrc:"{{media.preview_image | image_url}}",style:o,className:"!gp-rounded-none gp-w-full gp-h-full gp-top-0 gp-left-0 gp-cursor-pointer",pageContext:w})}`,V=e=>`
|
|
2
2
|
${C("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
|
|
3
3
|
${C("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}")}
|
|
4
4
|
${C("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
|
|
5
5
|
${v({id:"{{imageID}}",contentType:"productImage",className:`${x(`gp-gallery-image-item ${e??""}`)}`,parentId:`${b}-{{product.id}}`,builderAttrs:{"data-outline":e?"active":"deactive"},style:_,children:`
|
|
6
6
|
<div class="gp-w-full gp-relative gp-h-full"
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
>
|
|
9
9
|
${j({aspectRatio:o(k),layout:L?.layout,qualityPercent:L?.qualityPercent,qualityType:L?.qualityType},{width:"100%",height:"100%",cursor:"pointer"})}
|
|
10
10
|
|
package/dist/esm/product/components/product-images-v3/components/gallery-grid/GalleryGrid.liquid.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as d,If as r}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import n from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as g}from"../../../../helpers/function.js";import{getAspectRatio as c,getSrcImage as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let _=({builderPropUID:_,wrapperStyle:$,children:b,
|
|
2
|
-
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,
|
|
1
|
+
import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cls as t}from"@gem-sdk/core";import{Liquid as o,LiquidFor as s,LiquidIf as d,If as r}from"@gem-sdk/system";import l from"../../../../../image/components/Modal3d.liquid.js";import m from"../../../../../image/components/NextImage.liquid.js";import p from"../../../../../image/components/Video.liquid.js";import n from"../../../../../video/components/HTML5Embed.liquid.js";import{getStyleOfObject as g}from"../../../../helpers/function.js";import{getAspectRatio as c,getSrcImage as u}from"../../common/common.js";import{getZoomImageClass as h,getZoomLenClass as y}from"../../common/productFeaturedImage.js";import{getShapeByLayout as C,getZoomDisplay as v}from"../../common/productGallery.js";import{getProductImagesClassName as f}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as w}from"../../composables/getProductImagesStyles.js";let _=({builderPropUID:_,wrapperStyle:$,children:b,pageContext:x,...L})=>{let{galleryItemClasses:F,galleryGridWrapperClasses:V}=f(L),{galleryGridStyles:q,galleryGridItemStyles:I}=w(L),M=C({shape:L.shape,shapeForBottom:L.shapeForBottom,shapeFor1Col:L.shapeFor1Col,shapeFor2Col:L.shapeFor2Col,shapeForFtOnly:L.shapeForFtOnly,shapeForInsideBottom:L.shapeForInsideBottom,shapeForInside:L.shapeForInside},L.position),j=(i=!1)=>{let t={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(e=>{let o=a(L?.position,e)||"",s="one-col"===o||"two-col"===o;t[e]=(i?!s:s)?"block":"none"}),e("d",t)},k=()=>j(),S=()=>j(!0),Z=(e,a)=>i`
|
|
2
|
+
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:e,style:a,className:"!gp-rounded-none",customLazyload:!1,pageContext:x})}
|
|
3
3
|
${r(L?.galleryHoverEffect!=="none",`<div class="${t("zoom-element !gp-max-w-none gp-w-full gp-h-full",h())}">
|
|
4
|
-
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,
|
|
4
|
+
${m({srcIsLiquidCode:!0,src:`${u("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:e,style:a,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,pageContext:x})}
|
|
5
5
|
</div>`," ")}
|
|
6
6
|
${r(L?.galleryHoverEffect=="zoom"&&L?.galleryZoomType=="glasses",`<div class="${t("zoom-lens-element",y())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
|
|
7
7
|
</div>
|
|
8
8
|
`," ")}
|
|
9
|
-
`,z=()=>l({src:d("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:c(M)}),B=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>n({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),P=()=>i`
|
|
9
|
+
`,z=()=>l({src:d("media.sources.first.url contains '.glb'","{{ media.sources.first.url }}","{{media.sources.last.url}}"),alt:"{{media.preview_image.alt}}",poster:"{{media.preview_image.src | product_img_url: '1024x1024'}}",cameraControls:!0,arStatus:"not-presenting",style:{width:"100%",height:"100%"},aspectRatio:c(M)}),B=()=>p({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),H=()=>n({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"},pageContext:x}),P=()=>i`
|
|
10
10
|
${d("media.media_type == 'video' or media.media_type == 'external_video'",`<div class="gp-absolute gp-pb-1 gp-pr-1 gp-right-0 gp-bottom-0" >
|
|
11
11
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
12
12
|
<rect opacity="0.9" width="24" height="24" rx="3" fill="#212121"/>
|
|
@@ -81,7 +81,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
|
|
|
81
81
|
{% assign isVideo= false %}
|
|
82
82
|
{% assign isMedia= false %}
|
|
83
83
|
</div>`,T=()=>i`
|
|
84
|
-
${m({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{aspectRatio:c(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,
|
|
84
|
+
${m({srcIsLiquidCode:!0,src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",alt:"No Image",sizes:"(max-width: 768px) 50vw, 100vw",setting:{aspectRatio:c(M),layout:L?.layout,qualityType:L?.qualityType,qualityPercent:L?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,pageContext:x})}`;return o(`
|
|
85
85
|
<div type="grid-gallery"
|
|
86
86
|
class="${V}"
|
|
87
87
|
style="${g(q)}}"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{useEditorMode as s}from"@gem-sdk/core";import r from"../../image/components/NextImage.js";import l from"../hooks/useLiteHtml5Embed.js";import{createAttr as m,createClass as i,createStyle as a}from"@gem-sdk/system";import{getWrapThumbnailClasses as c,getButtonThumbnailClasses as n,getImageThumbnailClasses as p,getVideoYoutubeClasses as d}from"../common/classes.js";import{getPreloadImageStyle as y}from"../common/styles.js";import{getHtml5Attr as f}from"../common/attrs.js";let u=u=>{let g=s(),
|
|
2
|
+
import{jsxs as e,Fragment as t,jsx as o}from"react/jsx-runtime";import{useEditorMode as s}from"@gem-sdk/core";import r from"../../image/components/NextImage.js";import l from"../hooks/useLiteHtml5Embed.js";import{createAttr as m,createClass as i,createStyle as a}from"@gem-sdk/system";import{getWrapThumbnailClasses as c,getButtonThumbnailClasses as n,getImageThumbnailClasses as p,getVideoYoutubeClasses as d}from"../common/classes.js";import{getPreloadImageStyle as y}from"../common/styles.js";import{getHtml5Attr as f}from"../common/attrs.js";let u=u=>{let g=s(),h="edit"!==g,{thumbnail:b,muted:x,autoplay:j,loop:v,controls:N,src:C,style:k,title:w,className:L,lazy:T,poster:E,pageContext:H}=u,{playVideoAndTurnOffThumbnail:I,videoRef:M,showThumbnail:P}=l(j,x,C),V=!h&&j&&x&&!!b,A=!T&&u.isVideoComponent&&h,B=!b||!P,D=C||void 0,S=m({...f({title:w,autoplay:j,preloadThumbnail:V,offLazyLoad:A,src:C,thumbnail:b})}),Z=i({...c(B)}),q=a({...y()}),z=i({...n()}),F=i({...p()}),G=i({...d(L,A)});return e(t,{children:[V?o(r,{src:b,alt:w,priority:!0,style:q}):"",o("video",{ref:M,...S,style:k,className:G,controls:N,loop:v,muted:x,autoPlay:j,playsInline:!0,src:D}),!B&&e("div",{role:"presentation",style:k,className:Z,onClick:I,children:[o(r,{id:"video-thumbnail",src:b??"",alt:E?.altText,title:E?.imageTitle,priority:E?.preload&&h,className:F,isDisableAspectStyle:!0,pageContext:H}),o("button",{type:"button",className:z,"aria-label":"Play",children:o("svg",{className:"gp-w-5 gp-text-white",viewBox:"0 0 24 24",children:o("path",{fill:"currentColor",d:"M5 5.274c0-1.707 1.826-2.792 3.325-1.977l12.362 6.726c1.566.853 1.566 3.101 0 3.953L8.325 20.702C6.826 21.518 5 20.432 5 18.726V5.274Z"})})})]})]})};export{u as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{RenderIf as e,isLocalEnv as t,baseAssetURL as o,template as i}from"@gem-sdk/core";import r from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as s}from"../../helpers.js";import{createAttr as a,createClass as d,createStyle as l,If as n}from"@gem-sdk/system";import{getWrapThumbnailClasses as m,getButtonThumbnailClasses as c,getImageThumbnailClasses as u,getVideoYoutubeClasses as p}from"../common/classes.js";import{getPreloadImageStyle as v}from"../common/styles.js";import{getHtml5Attr as y}from"../common/attrs.js";let f=f=>{let
|
|
1
|
+
import{RenderIf as e,isLocalEnv as t,baseAssetURL as o,template as i}from"@gem-sdk/core";import r from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as s}from"../../helpers.js";import{createAttr as a,createClass as d,createStyle as l,If as n}from"@gem-sdk/system";import{getWrapThumbnailClasses as m,getButtonThumbnailClasses as c,getImageThumbnailClasses as u,getVideoYoutubeClasses as p}from"../common/classes.js";import{getPreloadImageStyle as v}from"../common/styles.js";import{getHtml5Attr as y}from"../common/attrs.js";let f=f=>{let $=`gp-video-${f.uid}`,{thumbnail:g,muted:h,autoplay:L,loop:b,controls:E,src:A,style:P,title:w,className:T,lazy:j,poster:k,wrapperStyles:S,pageContext:V}=f,x=L&&h&&!!g,C=!j&&f.isVideoComponent,M=!g||L&&h,I=C?A:void 0,N=a({...y({videoId:$,title:w,autoplay:L,preloadThumbnail:x,offLazyLoad:C,src:A,thumbnail:g})}),B=d({...m(M)}),D=l({...v()}),G=d({...c()}),O=d({...u()}),_=d({...p(T,C)});return i`
|
|
2
2
|
<gp-lite-html5-embed is-check-loaded="${f.isCheckLoaded??!1}" style="${S}">
|
|
3
|
-
${
|
|
4
|
-
${n(
|
|
3
|
+
${x?i`${r({src:g,alt:w,priority:k?.preload,pageContext:V,style:D})}
|
|
4
|
+
${n(L,`<script>
|
|
5
5
|
document.addEventListener("DOMContentLoaded", (event) => {
|
|
6
6
|
const eventList = ["keydown", "mousemove", "wheel", "touchmove", "touchstart", "touchend"];
|
|
7
7
|
const autoLoadTimeout = setTimeout(runAutoPlayVideo, 0);
|
|
@@ -16,7 +16,7 @@ import{RenderIf as e,isLocalEnv as t,baseAssetURL as o,template as i}from"@gem-s
|
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
18
|
function runAutoPlayVideo() {
|
|
19
|
-
var video = document.getElementById('${
|
|
19
|
+
var video = document.getElementById('${$}');
|
|
20
20
|
if (!video) return;
|
|
21
21
|
video.setAttribute('autoplay','true');
|
|
22
22
|
video.setAttribute('playsinline','true');
|
|
@@ -36,24 +36,24 @@ import{RenderIf as e,isLocalEnv as t,baseAssetURL as o,template as i}from"@gem-s
|
|
|
36
36
|
</script>`)}
|
|
37
37
|
`:""}
|
|
38
38
|
<video
|
|
39
|
-
${{...
|
|
39
|
+
${{...N}}
|
|
40
40
|
style="${P}"
|
|
41
|
-
class="${
|
|
41
|
+
class="${_}"
|
|
42
42
|
${E?"controls":void 0}
|
|
43
43
|
${b?"loop":void 0}
|
|
44
|
-
${
|
|
45
|
-
${
|
|
44
|
+
${h?"muted":void 0}
|
|
45
|
+
${L?"autoplay":void 0}
|
|
46
46
|
playsinline
|
|
47
47
|
${I?`src="${I}"`:""}
|
|
48
48
|
></video>
|
|
49
|
-
${n(!
|
|
49
|
+
${n(!M,i`
|
|
50
50
|
<div
|
|
51
51
|
role="presentation"
|
|
52
52
|
style="${P}"
|
|
53
|
-
class="${
|
|
53
|
+
class="${B}"
|
|
54
54
|
>
|
|
55
|
-
${r({id:"video-thumbnail",src
|
|
56
|
-
<button type="button" class="${
|
|
55
|
+
${r({id:"video-thumbnail",src:g??"",alt:k?.altText,title:k?.imageTitle,className:O,isDisableAspectStyle:!0,priority:k?.preload,pageContext:V})}
|
|
56
|
+
<button type="button" class="${G}" aria-label="Play">
|
|
57
57
|
<svg class="gp-w-5 gp-text-white" viewBox="0 0 24 24">
|
|
58
58
|
<path
|
|
59
59
|
fill="currentColor"
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as l}from"../../helpers.js";import{createStateOrContext as r,createStyle as a,createClass as m,If as o}from"@gem-sdk/system";import{getArticleVimeoClasses as p,getImageVimeoClasses as c,getButtonVimeoClasses as d,getIframeVimeoClasses as
|
|
2
|
-
<gp-lite-vimeo-embed gp-data='${JSON.stringify(
|
|
1
|
+
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as i}from"@gem-sdk/core";import{getSettingPreloadData as l}from"../../helpers.js";import{createStateOrContext as r,createStyle as a,createClass as m,If as o}from"@gem-sdk/system";import{getArticleVimeoClasses as p,getImageVimeoClasses as c,getButtonVimeoClasses as d,getIframeVimeoClasses as f}from"../common/classes.js";import{getIframeVimeoStyle as g,getArticleVimeoStyle as n}from"../common/styles.js";import{getVimeoParams as y}from"../common/helpers.js";import $ from"../../image/components/NextImage.liquid.js";let h=h=>{let{title:u,id:b,lazy:v,aspectRatio:S,autoplay:j,muted:w,thumbnailLink:x,poster:E,translatedVideoUrl:k,pageContext:N}=h,{iframeSrc:A}=y(h),I=!v,T=h.thumbnail,V=r({id:b,thumbnail:x,lazy:v,iframeSrc:A,title:u,autoplay:j,muted:w,style:h?.vimeoStyleIframe||"",translatedVideoUrl:k}),C=a({...g(S)}),G=a({...n(S,"")}),L=m({...p(T,S)}),M=m({...c(I)}),O=m({...d(I)}),P=m({...f()});return e`
|
|
2
|
+
<gp-lite-vimeo-embed gp-data='${JSON.stringify(V)}'>
|
|
3
3
|
<article
|
|
4
4
|
aria-hidden
|
|
5
|
-
class="${
|
|
6
|
-
data-title="${
|
|
7
|
-
style="${
|
|
5
|
+
class="${L}"
|
|
6
|
+
data-title="${u}"
|
|
7
|
+
style="${G}"
|
|
8
8
|
>
|
|
9
|
-
${$({src:
|
|
10
|
-
${o(!
|
|
11
|
-
<button type="button" class="${
|
|
9
|
+
${$({src:T,alt:E?.altText,title:E?.imageTitle,className:M,isDisableAspectStyle:!0,pageContext:N,priority:E?.preload,height:E?.height,width:E?.width})}
|
|
10
|
+
${o(!I,e`
|
|
11
|
+
<button type="button" class="${O}" aria-label="Play">
|
|
12
12
|
<svg class="gp-w-5 gp-text-white" viewBox="0 0 24 24">
|
|
13
13
|
<path
|
|
14
14
|
fill="currentColor"
|
|
@@ -16,17 +16,17 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as i}from"@gem-s
|
|
|
16
16
|
/>
|
|
17
17
|
</svg>
|
|
18
18
|
</button>`)}
|
|
19
|
-
${o(
|
|
19
|
+
${o(I,e`
|
|
20
20
|
<iframe
|
|
21
|
-
style="${
|
|
22
|
-
title="${
|
|
21
|
+
style="${C}"
|
|
22
|
+
title="${u}"
|
|
23
23
|
frameborder="0"
|
|
24
24
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
25
25
|
allowfullscreen
|
|
26
|
-
src="${
|
|
27
|
-
class="${
|
|
26
|
+
src="${A}"
|
|
27
|
+
class="${P}"
|
|
28
28
|
></iframe>`)}
|
|
29
29
|
</article>
|
|
30
30
|
</gp-lite-vimeo-embed>
|
|
31
31
|
${t(s,`<script ${l('class="gps-link" delay',"src")}="{{ 'gp-lite-vimeo-embed-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${l('class="gps-link" delay',"src")}="${i}/assets-v2/gp-lite-vimeo-embed-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
32
|
-
`};export{
|
|
32
|
+
`};export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as r}from"@gem-sdk/core";import a from"react-youtube";import{getYoutubeParams as o,isSettingLoop as i,covertStrParamsToObj as l}from"../common/helpers.js";import s from"../../image/components/NextImage.js";import{createClass as m,createStyle as n}from"@gem-sdk/system";import{getButtonYoutubeClasses as c,getImageYoutubeClasses as
|
|
2
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useEditorMode as r}from"@gem-sdk/core";import a from"react-youtube";import{getYoutubeParams as o,isSettingLoop as i,covertStrParamsToObj as l}from"../common/helpers.js";import s from"../../image/components/NextImage.js";import{createClass as m,createStyle as n}from"@gem-sdk/system";import{getButtonYoutubeClasses as c,getImageYoutubeClasses as u,getArticleYoutubeClasses as d,getIframeYoutubeClasses as p,getYoutubeContentClasses as f}from"../common/classes.js";import{getIframeYoutubeStyle as y,getArticleYoutubeStyle as h}from"../common/styles.js";import g from"../hooks/useLiteYoutubeEmbed.js";let b=b=>{let C=r(),v="edit"!==C,{style:w,poster:N,iframeClass:j,wrapperClass:x,title:k,pageContext:B}=b,{preload:S}=N||{},{videoId:E,paramsImp:T,posterUrl:V,iframeSrc:H}=o(b),{iframe:I,intervalPlay:M,warmConnections:D,isVideoStarted:L,videoDuration:P,addIframe:Y}=g(b,T,E),z=m({...c(I)}),A=m({...u()}),F=m({...d(S&&v||!1,x)}),O=m({...p(j)}),R=n({...y(w)}),q=n({...h(w,V)}),G=m({...f()});return e("article",{"aria-hidden":!0,className:F,"data-title":k,style:q,onPointerOver:D,onClick:Y,children:[t(s,{src:V,alt:N?.altText,title:N?.imageTitle,priority:v&&S,pageContext:B,className:A,isDisableAspectStyle:!0}),t("button",{type:"button","aria-label":"Play",className:z,children:e("svg",{height:"100%",version:"1.1",viewBox:"0 0 68 48",width:"100%",children:[t("path",{d:"M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z",fill:"#f00"}),t("path",{d:"M 45,24 27,14 27,34",fill:"#fff"})]})}),I&&(()=>{if(b.isHeroBanner&&i(T))return t(a,{videoId:E,title:k,iframeClassName:O,style:R,className:G,opts:{host:"https://www.youtube-nocookie.com",playerVars:{autoplay:1,state:1,controls:0,mute:1,...l(T)}},onReady:e=>{if(e.target.playVideo(),P.current=Math.floor(e.target.getDuration()),b.isHeroBanner){let t=e.target.getIframe();if(t){let e=t.closest("div.hero-banner-container");if(e){let r=new CustomEvent("youtube-iframe-ready",{detail:{iframe:t},bubbles:!0,cancelable:!0});e.dispatchEvent(r)}}}},onStateChange:e=>{let t=e.target;L.current||(t.playVideo(),L.current=!0,M(e)),0===e.data&&(P.current=t.getCurrentTime(),t.playVideo(),M(e))}});let e=t("iframe",{className:O,style:R,title:k,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:H});return b.isHeroBanner?t("div",{className:G,children:e}):e})()]})};export{b as default};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import{RenderIf as e,isLocalEnv as t,baseAssetURL as s,template as
|
|
2
|
-
<gp-lite-youtube-embed gp-data='${JSON.stringify(
|
|
1
|
+
import{RenderIf as e,isLocalEnv as t,baseAssetURL as s,template as r}from"@gem-sdk/core";import a from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as l}from"../../helpers.js";import{createStateOrContext as i,createClass as o,createStyle as p,If as m}from"@gem-sdk/system";import{getButtonYoutubeClasses as d,getImageYoutubeClasses as c,getArticleYoutubeClasses as u,getIframeYoutubeClasses as n,getYoutubeContentClasses as f}from"../common/classes.js";import{getIframeYoutubeStyle as y,getArticleYoutubeStyle as $}from"../common/styles.js";import{getYoutubeParams as g}from"../common/helpers.js";let b=b=>{let{style:h,iframeClass:v,wrapperClass:S,title:j,poster:w,translatedVideoUrl:z,autoplay:C,pageContext:E}=b,N=`gp-video-${b.uid}`,{posterUrl:k,iframeSrc:x}=g(b),B=!!b.thumbnail,T=w?.preload,A=i({lazy:b.lazy,hasThumbnail:B,style:h,title:j,iframeSrc:x,translatedVideoUrl:z,autoplay:C,isHeroBanner:b.isHeroBanner}),H=!b.lazy&&(!B||!!b.autoplay),M=o({...d(H)}),G=o({...c()}),I=o({...u(T||!1,S)}),L=o({...n(v)}),O=p({...y(h)}),P=p({...$(h,k)}),_=o({...f()});return r`
|
|
2
|
+
<gp-lite-youtube-embed gp-data='${JSON.stringify(A)}'>
|
|
3
3
|
<article
|
|
4
4
|
aria-hidden
|
|
5
5
|
class="${I}"
|
|
6
6
|
data-title="${j}"
|
|
7
|
-
style="${
|
|
7
|
+
style="${P}"
|
|
8
8
|
>
|
|
9
|
-
${
|
|
10
|
-
<button type="button" aria-label="Play" class="${
|
|
9
|
+
${a({id:N,src:k,alt:w?.altText,title:w?.imageTitle,priority:w?.preload,pageContext:E,className:G,isDisableAspectStyle:!0,isNotLazyload:w?.preload})}
|
|
10
|
+
<button type="button" aria-label="Play" class="${M}">
|
|
11
11
|
<svg height="100%" version="1.1" viewBox="0 0 68 48" width="100%">
|
|
12
12
|
<path
|
|
13
13
|
d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z"
|
|
@@ -16,19 +16,19 @@ import{RenderIf as e,isLocalEnv as t,baseAssetURL as s,template as a}from"@gem-s
|
|
|
16
16
|
<path d="M 45,24 27,14 27,34" fill="#fff"></path>
|
|
17
17
|
</svg>
|
|
18
18
|
</button>
|
|
19
|
-
${m(
|
|
19
|
+
${m(H,(()=>{let e=r`
|
|
20
20
|
<iframe
|
|
21
21
|
id="player-wrapper-${b.uid}"
|
|
22
|
-
class="${
|
|
23
|
-
style="${
|
|
22
|
+
class="${L}"
|
|
23
|
+
style="${O}"
|
|
24
24
|
title="${j}"
|
|
25
25
|
frameborder="0"
|
|
26
26
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
27
27
|
allowfullscreen
|
|
28
|
-
src="${
|
|
28
|
+
src="${x}"
|
|
29
29
|
></iframe>
|
|
30
|
-
`;return b.isHeroBanner?
|
|
31
|
-
<div class="${
|
|
30
|
+
`;return b.isHeroBanner?r`
|
|
31
|
+
<div class="${_}">${e}</div>
|
|
32
32
|
`:e})())}
|
|
33
33
|
</article>
|
|
34
34
|
</gp-lite-youtube-embed>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{template as t,hasTranslatedLiquid as e}from"@gem-sdk/core";import{getSettingTranslatedVideoAndThumbnail as o,getAspectRatioSettings as i,getVimeoVideoId as s,vimeoVideoRegex as l,getYoutubeVideoId as m,youtubeVideoRegex as a,parseTimeVideo as r,fallbackImageVideoUrl as d}from"../common/helpers.js";import{createAttr as u,createStyle as n,createClass as c}from"@gem-sdk/system";import{getAttr as p}from"../common/attrs.js";import{getStyle as f,getYoutubeStyle as y,getVimeoStyle as b,getHtml5Style as j,getFallBackImageStyle as h}from"../common/styles.js";import{getFallbackImageClasses as k,getClasses as V}from"../common/classes.js";import $ from"./HTML5Embed.liquid.js";import v from"./LiteVimeoEmbed.liquid.js";import g from"./LiteYouTubeEmbed.liquid.js";import L from"../../image/components/NextImage.liquid.js";import{getImageSrc as N}from"../../image/common/helpers.js";let q=({className:q,setting:C,style:x,builderAttrs:z,builderProps:E,advanced:F,pageContext:I})=>{let R=o({setting:C,uid:E?.uid,pageContext:I??{}}),{youtubeUrl:w="",vimeoUrl:T="",html5Url:U,autoplay:H=!1,loopVideo:M=!1,controls:O=!1,mute:P,poster:S,startTime:Y,endTime:A,lazy:B,type:D}=R??{},{youtubeUrlTranslated:G,vimeoUrlTranslated:J}=R,K=N(S),{cssClass:Q}=F??{},W=i(R?.ratioOptions,R?.aspectRatio),X=u({...p({uid:E?.uid||""})}),Z=n({...f(R,x)}),_=n({...y(W)}),tt=n({...b(W)}),te=n({...j(W)}),to=n({...h(C?.aspectRatio)}),ti=c({...k()}),ts=c({...V({className:q,builderProps:E,isInstantLP:!1,advancedCssClass:Q})});return t`
|
|
2
2
|
<div
|
|
3
3
|
${{...z}} ${{...X}} class="${ts}" style="${Z}">
|
|
4
|
-
${(()=>{switch(D){case"youtube":{let t=m(w),o=e(G);if((!a.test(w)||!t)&&!o)return L({src:d,alt:"Fallback video",className:ti,style:to});let i="";return M&&(i+=`&loop=1&playlist=${t}`),Y&&(i+=`&start=${r(Y)}`),A&&(i+=`&end=${r(A)}`),g({uid:E?.uid,id:t??"",translatedVideoUrl:o?G:"",autoplay:H,title:"Video",controls:O,params:i,adNetwork:!1,noCookie:!0,muted:!P,thumbnail:K,lazy:B??!0,poster:S,style:_})}case"vimeo":{let t=s(T),o=e(J);if((!l.test(T)||!t)&&!o)return L({src:d,alt:"Fallback video",className:ti,style:to});return v({muted:!P,loop:M,controls:O,thumbnail:K,thumbnailLink:S?.src,autoplay:H,lazy:B??!0,id:t??"",translatedVideoUrl:o?J:"",title:"Video",aspectRatio:W,poster:S,vimeoStyleIframe:tt})}case"html5":if(!U)return L({src:d,alt:"Fallback video",className:ti,style:to});return $({uid:E?.uid,muted:!P,loop:M,controls:O,autoplay:H,src:U,thumbnail:K,title:"Video",poster:S,lazy:B??!0,isVideoComponent:!0,style:te})}})()}
|
|
4
|
+
${(()=>{switch(D){case"youtube":{let t=m(w),o=e(G);if((!a.test(w)||!t)&&!o)return L({src:d,alt:"Fallback video",className:ti,style:to});let i="";return M&&(i+=`&loop=1&playlist=${t}`),Y&&(i+=`&start=${r(Y)}`),A&&(i+=`&end=${r(A)}`),g({uid:E?.uid,id:t??"",translatedVideoUrl:o?G:"",autoplay:H,title:"Video",controls:O,params:i,adNetwork:!1,noCookie:!0,muted:!P,thumbnail:K,lazy:B??!0,poster:S,style:_,pageContext:I})}case"vimeo":{let t=s(T),o=e(J);if((!l.test(T)||!t)&&!o)return L({src:d,alt:"Fallback video",className:ti,style:to});return v({muted:!P,loop:M,controls:O,thumbnail:K,thumbnailLink:S?.src,autoplay:H,lazy:B??!0,id:t??"",translatedVideoUrl:o?J:"",title:"Video",aspectRatio:W,poster:S,vimeoStyleIframe:tt,pageContext:I})}case"html5":if(!U)return L({src:d,alt:"Fallback video",className:ti,style:to});return $({uid:E?.uid,muted:!P,loop:M,controls:O,autoplay:H,src:U,thumbnail:K,title:"Video",poster:S,lazy:B??!0,isVideoComponent:!0,style:te,pageContext:I})}})()}
|
|
5
5
|
</div>
|
|
6
6
|
`};export{q as default};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -223,7 +223,6 @@ type ImageProps = BasePropsWrap<ImageSettingProps$1, ImageStyleProps$1> & {
|
|
|
223
223
|
advanced?: any;
|
|
224
224
|
};
|
|
225
225
|
type ImageLiquidProps = ImageProps & {
|
|
226
|
-
enableLazyLoadImage?: boolean;
|
|
227
226
|
pageContext?: PageContext;
|
|
228
227
|
};
|
|
229
228
|
|
|
@@ -698,7 +697,6 @@ type HeroBannerProps = BasePropsWrap<HeroBannerSettingProps, HeroBannerStyleProp
|
|
|
698
697
|
rawChildren?: any[];
|
|
699
698
|
advanced?: any;
|
|
700
699
|
pageContext?: PageContext;
|
|
701
|
-
enableLazyLoadImage?: boolean;
|
|
702
700
|
};
|
|
703
701
|
type DataVideoType = {
|
|
704
702
|
data: Background;
|
|
@@ -6862,7 +6860,6 @@ type PropTypes$1 = ProductImagesProps$1 & React.ComponentPropsWithoutRef<'div'>
|
|
|
6862
6860
|
children?: any;
|
|
6863
6861
|
} & {
|
|
6864
6862
|
pageContext?: PageContext;
|
|
6865
|
-
enableLazyLoadImage?: boolean;
|
|
6866
6863
|
};
|
|
6867
6864
|
declare const ProductImages$1: (props: PropTypes$1) => string;
|
|
6868
6865
|
|
|
@@ -6871,7 +6868,6 @@ type PropTypes = ProductImagesProps$2 & React.ComponentPropsWithoutRef<'div'> &
|
|
|
6871
6868
|
children?: any;
|
|
6872
6869
|
} & {
|
|
6873
6870
|
pageContext?: PageContext;
|
|
6874
|
-
enableLazyLoadImage?: boolean;
|
|
6875
6871
|
};
|
|
6876
6872
|
declare const ProductImages: (props: PropTypes) => string;
|
|
6877
6873
|
|