@gem-sdk/components 19.0.0-staging.18 → 19.0.0-staging.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");require("@gem-sdk/core"),require("next/link");var l=require("../../../../../video/components/Video.js"),u=require("../../common/classes.js"),s=r.memo(s=>{let{url:t,aspectRatio:o}=s,i=r.useMemo(()=>t.includes("youtu.be")?"youtube":t.includes("vimeo")?"vimeo":"html5",[t]);return e.jsx("div",{className:`gp-w-full gp-h-full ${u.FEATURE_MEDIA_CENTER_CLASSES}`,children:e.jsx(l.default,{setting:{type:i,html5Url:t,youtubeUrl:t,vimeoUrl:t,preload:!0,controls:!0,aspectRatio:o},className:"gp-w-full"})})});exports.default=s;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react");require("@gem-sdk/core"),require("next/link");var s=require("../../../../../video/components/Video.js"),l=require("../../common/classes.js"),t=r.memo(t=>{let{url:u,aspectRatio:o,thumbnail:i}=t,c=r.useMemo(()=>u.includes("youtu.be")?"youtube":u.includes("vimeo")?"vimeo":"html5",[u]);return e.jsx("div",{className:`gp-w-full gp-h-full ${l.FEATURE_MEDIA_CENTER_CLASSES}`,children:e.jsx(s.default,{setting:{type:c,html5Url:u,youtubeUrl:u,vimeoUrl:u,preload:!0,controls:!0,aspectRatio:o,poster:i?{src:i}:void 0},className:"gp-w-full"})})});exports.default=t;
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),r=require("react"),o=require("../../../../../image/components/NextImage.js"),s=require("./MediaIcon.js"),a=require("../../common/productFeaturedImage.js"),i=require("./ProductFeatureVideo.js");const c={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var n=r.memo(({image:n,imageShowWhenHover:l,setting:u,aspectRatio:h})=>{var d;let f=t.useProduct(),p=t.useCurrentDevice(),g=t.useShopStore(e=>e.storefrontUrl),{isEditMode:m,isPreviewSharePageMode:y}=t.useRenderMode(),v=r.useMemo(()=>"none"!==t.getResponsiveValueByScreen(u.ftClickOpenLightBox,p),[p,u.ftClickOpenLightBox]),x=r.useMemo(()=>!m&&["VIDEO","EXTERNAL_VIDEO"].includes(n?.contentType||"")&&!v,[m,n?.contentType,v]),j=r.useMemo(()=>n?{...n,src:x?n.src:a.isFeatureMedia(n?.contentType)?n?.previewImage:n.src}:c,[n,x]),E=r.useMemo(()=>{if(y)return"javascript:void(0)";if(!g)return"#";let e=new URL(g);return f?`${e.protocol}//${e.host}/products/${f.handle}`:"#"},[g,f,y]),M=r.useMemo(()=>u?.hoverEffect!=="none"&&!a.isFeatureMedia(j?.contentType),[j?.contentType,u?.hoverEffect]),T=r.useMemo(()=>u?.hoverEffect=="zoom"&&u?.zoomType=="glasses"&&!a.isFeatureMedia(j?.contentType),[j?.contentType,u?.hoverEffect,u?.zoomType]),b=r.useCallback(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),w=r.useMemo(()=>l?"other"!==u.hoverEffect?b(j):b(l):c.src,[l,j,u.hoverEffect,b]);return e.jsx(e.Fragment,{children:(d=e.jsx(e.Fragment,{children:x?e.jsx(i.default,{type:j?.contentType,url:j.src??"",aspectRatio:h}):e.jsxs(e.Fragment,{children:[e.jsx(o.default,{draggable:"false",src:j.src,width:j?.width,height:j?.height,alt:j?.alt,setting:{aspectRatio:h,layout:u?.ftLayout},priority:u?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e.jsx(s.default,{contentType:j?.contentType??""}),M&&e.jsx(o.default,{draggable:"false",src:w,width:u?.hoverEffect==="other"?l?.width:j.width,height:u?.hoverEffect==="other"?l?.height:j.height,alt:u?.hoverEffect==="other"?l?.alt:j.alt,setting:{layout:u.ftLayout,aspectRatio:h},style:{width:"100%",height:"100%"},className:t.cls("hover-image featured-image-only !gp-max-w-none",a.getZoomImageClass()),priority:u?.preload}),T&&e.jsx("div",{className:t.cls(a.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${j?.src}")`})}})]})}),"product-link"===t.getResponsiveValueByScreen(u.ftClickOpenLightBox,p)?e.jsx("a",{title:f?.title,href:E,className:"gp-w-full",children:d}):d)})});exports.default=n;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),r=require("react"),o=require("../../../../../image/components/NextImage.js"),s=require("./MediaIcon.js"),a=require("../../common/productFeaturedImage.js"),i=require("./ProductFeatureVideo.js");const c={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var n=r.memo(({image:n,imageShowWhenHover:l,setting:u,aspectRatio:h})=>{var d;let f=t.useProduct(),p=t.useCurrentDevice(),g=t.useShopStore(e=>e.storefrontUrl),{isEditMode:m,isPreviewSharePageMode:y}=t.useRenderMode(),v=r.useMemo(()=>"none"!==t.getResponsiveValueByScreen(u.ftClickOpenLightBox,p),[p,u.ftClickOpenLightBox]),x=r.useMemo(()=>!m&&["VIDEO","EXTERNAL_VIDEO"].includes(n?.contentType||"")&&!v,[m,n?.contentType,v]),j=r.useMemo(()=>n?{...n,src:x?n.src:a.isFeatureMedia(n?.contentType)?n?.previewImage:n.src}:c,[n,x]),E=r.useMemo(()=>{if(y)return"javascript:void(0)";if(!g)return"#";let e=new URL(g);return f?`${e.protocol}//${e.host}/products/${f.handle}`:"#"},[g,f,y]),b=r.useMemo(()=>u?.hoverEffect!=="none"&&!a.isFeatureMedia(j?.contentType),[j?.contentType,u?.hoverEffect]),M=r.useMemo(()=>u?.hoverEffect=="zoom"&&u?.zoomType=="glasses"&&!a.isFeatureMedia(j?.contentType),[j?.contentType,u?.hoverEffect,u?.zoomType]),T=r.useCallback(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),w=r.useMemo(()=>l?"other"!==u.hoverEffect?T(j):T(l):c.src,[l,j,u.hoverEffect,T]);return e.jsx(e.Fragment,{children:(d=e.jsx(e.Fragment,{children:x?e.jsx(i.default,{type:j?.contentType,url:j.src??"",thumbnail:j?.previewImage,aspectRatio:h}):e.jsxs(e.Fragment,{children:[e.jsx(o.default,{draggable:"false",src:j.src,width:j?.width,height:j?.height,alt:j?.alt,setting:{aspectRatio:h,layout:u?.ftLayout},priority:u?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e.jsx(s.default,{contentType:j?.contentType??""}),b&&e.jsx(o.default,{draggable:"false",src:w,width:u?.hoverEffect==="other"?l?.width:j.width,height:u?.hoverEffect==="other"?l?.height:j.height,alt:u?.hoverEffect==="other"?l?.alt:j.alt,setting:{layout:u.ftLayout,aspectRatio:h},style:{width:"100%",height:"100%"},className:t.cls("hover-image featured-image-only !gp-max-w-none",a.getZoomImageClass()),priority:u?.preload}),M&&e.jsx("div",{className:t.cls(a.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${j?.src}")`})}})]})}),"product-link"===t.getResponsiveValueByScreen(u.ftClickOpenLightBox,p)?e.jsx("a",{title:f?.title,href:E,className:"gp-w-full",children:d}):d)})});exports.default=n;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("react"),s=require("../../common/common.js"),a=require("../../../../../image/components/NextImage.js"),r=require("../lightbox/ButtonOpenLightBox.js"),i=require("./MediaIcon.js"),l=require("../../common/productFeaturedImage.js"),c=require("../../common/hoverAction.js"),d=require("../../composables/getProductImagesClassName.js"),n=require("../../composables/getProductImagesStyles.js"),u=require("../../hooks/useProductGalleryGrid.js"),m=o.memo(o=>{let{builderPropUID:m,productImages:g,onHandleClick:y,activeIndexFromFeatureImage:h,children:p,isHiddenInteraction:v,...j}=o,{isDisplay:x,shapeByLayout:f,imageActiveIndex:q,enableOpenLightBox:M,isEnableBorderActive:I,filteredProductImages:w}=u.useProductGalleryGrid(o),T=t.useCurrentDevice(),{galleryGridWrapperClasses:b,galleryItemClasses:N}=d.getProductImagesClassName(j),{galleryGridStyles:P,galleryGridItemStyles:C}=n.getProductImagesStyles(j);return e.jsx(e.Fragment,{children:x&&e.jsxs("div",{"data-slot":"children","data-id":m,className:b,style:P,"gp-data-hidden":`${v}`,children:[w?.map((o,d)=>{let n=d===q,u=l.isFeatureMedia(o.contentType)?o.previewImage:o.src;return e.jsxs("div",{"aria-hidden":!0,className:N(`gp-gallery-image-item gem-slider-item-${m}
2
- ${n&&I?"gem-slider-item-active":""}`),onClick:()=>y(o?.id||"",M),style:C,onMouseMove:e=>c.handleMouseMove(e,{hoverEffect:j.galleryHoverEffect,zoom:j.galleryZoom,zoomType:j.galleryZoomType}),onMouseOut:e=>c.handleMouseOut(e),"data-border":n&&j?.borderActive?"active":"deactive",children:[e.jsx(a.default,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s.getAspectRatio(f),layout:j?.layout},style:{width:"100%",height:"100%"}},o?.id),e.jsx(i.default,{contentType:o?.contentType||""}),j?.galleryHoverEffect!=="none"&&!l.isFeatureMedia(o?.contentType)&&e.jsx(a.default,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{layout:j.layout,aspectRatio:s.getAspectRatio(f)},className:t.cls("hover-image !gp-max-w-none",l.getZoomImageClass())}),j?.galleryHoverEffect=="zoom"&&j?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(t.getResponsiveValueByScreen(j.position,T)||"")&&!l.isFeatureMedia(o?.contentType)&&e.jsx("div",{className:t.cls(l.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${o?.src}")`})}}),t.getResponsiveValueByScreen(j?.clickOpenLightBox,T)&&e.jsx(r.default,{})]},o?.id)}),p]})})});exports.default=m;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("react"),s=require("../../common/common.js"),r=require("../../../../../image/components/NextImage.js"),a=require("../lightbox/ButtonOpenLightBox.js"),i=require("./MediaIcon.js"),l=require("./ProductFeatureVideo.js"),c=require("../../common/productFeaturedImage.js"),n=require("../../common/hoverAction.js"),u=require("../../composables/getProductImagesClassName.js"),d=require("../../composables/getProductImagesStyles.js"),m=require("../../hooks/useProductGalleryGrid.js"),g=o.memo(o=>{let{builderPropUID:g,productImages:p,onHandleClick:y,activeIndexFromFeatureImage:h,children:v,isHiddenInteraction:j,...x}=o,{isDisplay:f,shapeByLayout:q,imageActiveIndex:I,enableOpenLightBox:M,isEnableBorderActive:R,filteredProductImages:T}=m.useProductGalleryGrid(o),w=t.useCurrentDevice(),{isEditMode:b}=t.useRenderMode(),E=["one-col","two-col"].includes(t.getResponsiveValueByScreen(x.position,w)||""),{galleryGridWrapperClasses:N,galleryItemClasses:P}=u.getProductImagesClassName(x),{galleryGridStyles:F,galleryGridItemStyles:O}=d.getProductImagesStyles(x);return e.jsx(e.Fragment,{children:f&&e.jsxs("div",{"data-slot":"children","data-id":g,className:N,style:F,"gp-data-hidden":`${j}`,children:[T?.map((o,u)=>{let d=u===I,m=c.isFeatureMedia(o.contentType)?o.previewImage:o.src,p=!b&&E&&!M&&["VIDEO","EXTERNAL_VIDEO"].includes(o?.contentType||"");return e.jsxs("div",{"aria-hidden":!0,className:P(`gp-gallery-image-item gem-slider-item-${g}
2
+ ${d&&R?"gem-slider-item-active":""}`),onClick:()=>y(o?.id||"",M),style:O,onMouseMove:e=>n.handleMouseMove(e,{hoverEffect:x.galleryHoverEffect,zoom:x.galleryZoom,zoomType:x.galleryZoomType}),onMouseOut:e=>n.handleMouseOut(e),"data-border":d&&x?.borderActive?"active":"deactive",children:[p?e.jsx(l.default,{type:o?.contentType,url:o?.src??"",thumbnail:o?.previewImage,aspectRatio:s.getAspectRatio(q)}):e.jsxs(e.Fragment,{children:[e.jsx(r.default,{src:m,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s.getAspectRatio(q),layout:x?.layout},style:{width:"100%",height:"100%"}},o?.id),e.jsx(i.default,{contentType:o?.contentType||""})]}),x?.galleryHoverEffect!=="none"&&!c.isFeatureMedia(o?.contentType)&&e.jsx(r.default,{src:m,width:o?.width,height:o?.height,alt:o?.alt,setting:{layout:x.layout,aspectRatio:s.getAspectRatio(q)},className:t.cls("hover-image !gp-max-w-none",c.getZoomImageClass())}),x?.galleryHoverEffect=="zoom"&&x?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(t.getResponsiveValueByScreen(x.position,w)||"")&&!c.isFeatureMedia(o?.contentType)&&e.jsx("div",{className:t.cls(c.getZoomLenClass(),"room-len"),style:{...t.makeStyle({bgi:`url("${o?.src}")`})}}),t.getResponsiveValueByScreen(x?.clickOpenLightBox,w)&&e.jsx(a.default,{})]},o?.id)}),v]})})});exports.default=g;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("@gem-sdk/system"),a=require("../../../../../image/components/Modal3d.liquid.js"),t=require("../../../../../image/components/NextImage.liquid.js"),s=require("../../../../../image/components/Video.liquid.js"),o=require("../../../../../video/components/HTML5Embed.liquid.js"),d=require("../../../../helpers/function.js"),r=require("../../common/common.js"),l=require("../../common/productFeaturedImage.js"),m=require("../../common/productGallery.js"),p=require("../../composables/getProductImagesClassName.js"),g=require("../../composables/getProductImagesStyles.js");exports.default=({builderPropUID:u,wrapperStyle:c,children:n,enableLazyLoadImage:y,...h})=>{let{galleryItemClasses:f,galleryGridWrapperClasses:v}=p.getProductImagesClassName(h),{galleryGridStyles:C,galleryGridItemStyles:L}=g.getProductImagesStyles(h),w=m.getShapeByLayout({shape:h.shape,shapeForBottom:h.shapeForBottom,shapeFor1Col:h.shapeFor1Col,shapeFor2Col:h.shapeFor2Col,shapeForFtOnly:h.shapeForFtOnly,shapeForInsideBottom:h.shapeForInsideBottom,shapeForInside:h.shapeForInside},h.position),q=(i=!1)=>{let a={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(t=>{let s=e.getResponsiveValueByScreen(h?.position,t)||"",o="one-col"===s||"two-col"===s;a[t]=(i?!o:o)?"block":"none"}),e.makeStyleResponsive("d",a)},_=()=>q(),b=()=>q(!0),I=(a,s)=>e.template`
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),i=require("@gem-sdk/system"),a=require("../../../../../image/components/Modal3d.liquid.js"),t=require("../../../../../image/components/NextImage.liquid.js"),s=require("../../../../../image/components/Video.liquid.js"),d=require("../../../../../video/components/HTML5Embed.liquid.js"),o=require("../../../../helpers/function.js"),r=require("../../common/common.js"),l=require("../../common/productFeaturedImage.js"),m=require("../../common/productGallery.js"),p=require("../../composables/getProductImagesClassName.js"),g=require("../../composables/getProductImagesStyles.js");exports.default=({builderPropUID:u,wrapperStyle:c,children:n,enableLazyLoadImage:y,...h})=>{let{galleryItemClasses:f,galleryGridWrapperClasses:v}=p.getProductImagesClassName(h),{galleryGridStyles:C,galleryGridItemStyles:L}=g.getProductImagesStyles(h),w=m.getShapeByLayout({shape:h.shape,shapeForBottom:h.shapeForBottom,shapeFor1Col:h.shapeFor1Col,shapeFor2Col:h.shapeFor2Col,shapeForFtOnly:h.shapeForFtOnly,shapeForInsideBottom:h.shapeForInsideBottom,shapeForInside:h.shapeForInside},h.position),q=(i=!1)=>{let a={desktop:"none",tablet:"none",mobile:"none"};return["desktop","mobile","tablet"].forEach(t=>{let s=e.getResponsiveValueByScreen(h?.position,t)||"",d="one-col"===s||"two-col"===s;a[t]=(i?!d:d)?"block":"none"}),e.makeStyleResponsive("d",a)},_=()=>q(),b=()=>q(!0),I=(a,s)=>e.template`
2
2
  ${t.default({srcIsLiquidCode:!0,src:`${r.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",alt:"{{media.alt | escape}}",baseSrc:"{{media.preview_image | image_url}}",setting:a,style:s,className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:y})}
3
3
  ${i.If(h?.galleryHoverEffect!=="none",`<div class="${e.cls("zoom-element !gp-max-w-none gp-w-full gp-h-full",l.getZoomImageClass())}">
4
4
  ${t.default({srcIsLiquidCode:!0,src:`${r.getSrcImage("media.preview_image")}`,width:"{{media.width}}",height:"{{media.height}}",baseSrc:"{{media.preview_image | image_url}}",alt:"{{media.alt | escape}}",setting:a,style:s,className:"!gp-rounded-none gp-w-full gp-h-full",customLazyload:!1,enableLazyLoadImage:y})}
@@ -6,7 +6,7 @@
6
6
  ${i.If(h?.galleryHoverEffect=="zoom"&&h?.galleryZoomType=="glasses",`<div class="${e.cls("zoom-lens-element",l.getZoomLenClass())}" style="opacity: 0; background-image: url('{{media.preview_image | product_img_url: '1024x1024'}}')">
7
7
  </div>
8
8
  `," ")}
9
- `,$=()=>a.default({src:i.LiquidIf("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:r.getAspectRatio(w)}),x=()=>s.default({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),S=()=>o.default({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,style:{width:"100%","max-height":"100%"}}),F=()=>e.template`
9
+ `,$=()=>a.default({src:i.LiquidIf("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:r.getAspectRatio(w)}),x=()=>s.default({src:"{{mediaSourceVideo}}",alt:"{{media.alt | escape}}",autoplay:!1,allowfullscreen:!0,controls:!0,style:{width:"100%",height:"100%"}}),S=()=>d.default({src:"{{mediaSourceVideo}}",title:"{{media.alt | escape}}",autoplay:!1,controls:!0,thumbnail:"{{media.preview_image.src | product_img_url: '1024x1024'}}",poster:{altText:"{{media.alt | escape}}"},style:{width:"100%","max-height":"100%"}}),F=()=>e.template`
10
10
  ${i.LiquidIf("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"/>
@@ -22,7 +22,7 @@
22
22
  ${I({aspectRatio:r.getAspectRatio(w),layout:h?.layout,qualityType:h?.qualityType,qualityPercent:h?.qualityPercent},{width:"100%",height:"100%"})}
23
23
 
24
24
  <div class="gp-absolute gp-inset-0 gp-flex gp-cursor-pointer gp-items-center gp-justify-center gp-bg-black/50 gp-opacity-0 gp-transition-opacity gp-duration-100 group-hover:gp-opacity-100"
25
- style="${d.getStyleOfObject(m.getZoomDisplay(h?.clickOpenLightBox))}" >
25
+ style="${o.getStyleOfObject(m.getZoomDisplay(h?.clickOpenLightBox))}" >
26
26
  <svg
27
27
  height="100%"
28
28
  width="100%"
@@ -54,18 +54,18 @@
54
54
  grid-index="{{forloop.index}}"
55
55
  data-outline="none"
56
56
  class="${f(`gem-slider-item-${u}-{{product.id}} gp-gallery-image-item ${a??""} data-[outline=deactive]:after:!gp-border-transparent`)}"
57
- style="${d.getStyleOfObject(L)}"
57
+ style="${o.getStyleOfObject(L)}"
58
58
  >
59
59
  ${i.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video' or media.media_type == 'model'","{% assign isMedia = true %}")}
60
60
 
61
61
  ${i.LiquidIf("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
62
62
 
63
- <div class="gp-w-full" style="${i.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${i.LiquidIf("isVideo == true",d.getStyleOfObject({...b()}))}">
63
+ <div class="gp-w-full" style="${i.LiquidIf("media == null or media.media_type == 'image'","display: block !important;")} ${i.LiquidIf("isVideo == true",o.getStyleOfObject({...b()}))}">
64
64
  ${i.LiquidIf("media != null",F(),V())}
65
65
  </div>
66
66
 
67
67
  <div class="${i.LiquidIf("isMedia","gp-flex gp-justify-center gp-items-center")}"
68
- style="${i.LiquidIf("isMedia",d.getStyleOfObject({...e.makeStyleResponsive("aspect",r.getAspectRatio(w))}))} ${d.getStyleOfObject({..._()})}"
68
+ style="${i.LiquidIf("isMedia",o.getStyleOfObject({...e.makeStyleResponsive("aspect",r.getAspectRatio(w))}))} ${o.getStyleOfObject({..._()})}"
69
69
  >
70
70
  {% case media.media_type %}
71
71
  {% when 'external_video' %}
@@ -84,7 +84,7 @@
84
84
  ${t.default({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:r.getAspectRatio(w),layout:h?.layout,qualityType:h?.qualityType,qualityPercent:h?.qualityPercent},className:"!gp-rounded-none",customLazyload:!1,enableLazyLoadImage:y})}`;return i.Liquid(`
85
85
  <div type="grid-gallery"
86
86
  class="${v}"
87
- style="${d.getStyleOfObject(C)}}"
87
+ style="${o.getStyleOfObject(C)}}"
88
88
  >
89
89
  ${i.LiquidFor("media in product.media",`${i.LiquidIf("media.media_type == 'image'",i.LiquidFor("image in product.images",i.LiquidIf("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
90
90
  ${i.LiquidIf("media.id == product.featured_media.id ",j(h?.borderActive?.border!=="none"?"active":""),j())}`)}
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("../../../../../carousel-v3/components/root/Carousel.js"),i=require("../../../../../carousel-v3/components/item/CarouselItem.js"),s=require("../../../../../image/components/NextImage.js");require("../../../../../modal/components/confirm.js");var l=require("../../../../../modal/components/Modal.js"),d=require("react"),r=require("../../common/productFeaturedImage.js"),n=require("../child/ProductFeatureVideo.js"),a=require("../child/MediaIcon.js");exports.default=({builderPropUID:u,productImages:p,open:c,imageRatio:m,onHandleClose:g})=>{let h=t.useFeaturedImageGlobal(),b=d.useMemo(()=>{let e=p?.findIndex(e=>e.id===h?.id);return e&&e>0?e:0},[p,h]),j={desktop:p&&p.length>1,mobile:p&&p?.length>1,tablet:p&&p?.length>1},f=t.useEditorMode(),x=e=>"edit"!==f&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e.jsx(l.default,{setting:{open:c},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{g(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e.jsx(o.default,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:b,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:j,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:b},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:b,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:u},fullHeight:!0,children:p?.map(o=>e.jsx(i.default,{className:`gem-slider-item gem-slider-item-${u} gp-flex gp-items-center gp-justify-center gp-px-4`,children:x(o)?e.jsx(n.default,{type:o?.contentType,url:o.src??"",aspectRatio:m}):e.jsxs(e.Fragment,{children:[e.jsx(s.default,{src:r.isFeatureMedia(o?.contentType)?o?.previewImage:o?.src,width:o?.width,height:o?.height,alt:o?.alt,"content-type":o?.contentType,setting:{aspectRatio:m},className:t.cls("gp-h-full gp-w-full gp-object-contain")},o?.id),e.jsx(a.default,{contentType:o?.contentType??""})]})},o?.id))})})};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("@gem-sdk/core"),o=require("../../../../../carousel-v3/components/root/Carousel.js"),i=require("../../../../../carousel-v3/components/item/CarouselItem.js"),l=require("../../../../../image/components/NextImage.js");require("../../../../../modal/components/confirm.js");var s=require("../../../../../modal/components/Modal.js"),d=require("react"),r=require("../../common/productFeaturedImage.js"),n=require("../child/ProductFeatureVideo.js"),a=require("../child/MediaIcon.js");exports.default=({builderPropUID:u,productImages:p,open:c,imageRatio:m,onHandleClose:g})=>{let h=t.useFeaturedImageGlobal(),b=d.useMemo(()=>{let e=p?.findIndex(e=>e.id===h?.id);return e&&e>0?e:0},[p,h]),j={desktop:p&&p.length>1,mobile:p&&p?.length>1,tablet:p&&p?.length>1},f=t.useEditorMode(),x=e=>"edit"!==f&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e.jsx(s.default,{setting:{open:c},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{g(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e.jsx(o.default,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:b,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:j,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:b},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:b,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:u},fullHeight:!0,children:p?.map(o=>e.jsx(i.default,{className:`gem-slider-item gem-slider-item-${u} gp-flex gp-items-center gp-justify-center gp-px-4`,children:x(o)?e.jsx(n.default,{type:o?.contentType,url:o.src??"",thumbnail:o?.previewImage,aspectRatio:m}):e.jsxs(e.Fragment,{children:[e.jsx(l.default,{src:r.isFeatureMedia(o?.contentType)?o?.previewImage:o?.src,width:o?.width,height:o?.height,alt:o?.alt,"content-type":o?.contentType,setting:{aspectRatio:m},className:t.cls("gp-h-full gp-w-full gp-object-contain")},o?.id),e.jsx(a.default,{contentType:o?.contentType??""})]})},o?.id))})})};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{memo as o,useMemo as r}from"react";import"@gem-sdk/core";import"next/link";import t from"../../../../../video/components/Video.js";import{FEATURE_MEDIA_CENTER_CLASSES as l}from"../../common/classes.js";var m=o(o=>{let{url:m,aspectRatio:i}=o,s=r(()=>m.includes("youtu.be")?"youtube":m.includes("vimeo")?"vimeo":"html5",[m]);return e("div",{className:`gp-w-full gp-h-full ${l}`,children:e(t,{setting:{type:s,html5Url:m,youtubeUrl:m,vimeoUrl:m,preload:!0,controls:!0,aspectRatio:i},className:"gp-w-full"})})});export{m as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{memo as o,useMemo as r}from"react";import"@gem-sdk/core";import"next/link";import t from"../../../../../video/components/Video.js";import{FEATURE_MEDIA_CENTER_CLASSES as l}from"../../common/classes.js";var m=o(o=>{let{url:m,aspectRatio:i,thumbnail:s}=o,u=r(()=>m.includes("youtu.be")?"youtube":m.includes("vimeo")?"vimeo":"html5",[m]);return e("div",{className:`gp-w-full gp-h-full ${l}`,children:e(t,{setting:{type:u,html5Url:m,youtubeUrl:m,vimeoUrl:m,preload:!0,controls:!0,aspectRatio:i,poster:s?{src:s}:void 0},className:"gp-w-full"})})});export{m as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{useProduct as r,useCurrentDevice as i,useShopStore as a,useRenderMode as c,getResponsiveValueByScreen as n,cls as s,makeStyle as h}from"@gem-sdk/core";import{memo as l,useMemo as f,useCallback as p}from"react";import m from"../../../../../image/components/NextImage.js";import g from"./MediaIcon.js";import{isFeatureMedia as d,getZoomImageClass as y,getZoomLenClass as u}from"../../common/productFeaturedImage.js";import v from"./ProductFeatureVideo.js";let E={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var T=l(({image:l,imageShowWhenHover:T,setting:w,aspectRatio:b})=>{var I;let x=r(),L=i(),j=a(e=>e.storefrontUrl),{isEditMode:N,isPreviewSharePageMode:O}=c(),k=f(()=>"none"!==n(w.ftClickOpenLightBox,L),[L,w.ftClickOpenLightBox]),R=f(()=>!N&&["VIDEO","EXTERNAL_VIDEO"].includes(l?.contentType||"")&&!k,[N,l?.contentType,k]),$=f(()=>l?{...l,src:R?l.src:d(l?.contentType)?l?.previewImage:l.src}:E,[l,R]),z=f(()=>{if(O)return"javascript:void(0)";if(!j)return"#";let e=new URL(j);return x?`${e.protocol}//${e.host}/products/${x.handle}`:"#"},[j,x,O]),A=f(()=>w?.hoverEffect!=="none"&&!d($?.contentType),[$?.contentType,w?.hoverEffect]),B=f(()=>w?.hoverEffect=="zoom"&&w?.zoomType=="glasses"&&!d($?.contentType),[$?.contentType,w?.hoverEffect,w?.zoomType]),C=p(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),F=f(()=>T?"other"!==w.hoverEffect?C($):C(T):E.src,[T,$,w.hoverEffect,C]);return e(t,{children:(I=e(t,{children:R?e(v,{type:$?.contentType,url:$.src??"",aspectRatio:b}):o(t,{children:[e(m,{draggable:"false",src:$.src,width:$?.width,height:$?.height,alt:$?.alt,setting:{aspectRatio:b,layout:w?.ftLayout},priority:w?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e(g,{contentType:$?.contentType??""}),A&&e(m,{draggable:"false",src:F,width:w?.hoverEffect==="other"?T?.width:$.width,height:w?.hoverEffect==="other"?T?.height:$.height,alt:w?.hoverEffect==="other"?T?.alt:$.alt,setting:{layout:w.ftLayout,aspectRatio:b},style:{width:"100%",height:"100%"},className:s("hover-image featured-image-only !gp-max-w-none",y()),priority:w?.preload}),B&&e("div",{className:s(u(),"room-len"),style:{...h({bgi:`url("${$?.src}")`})}})]})}),"product-link"===n(w.ftClickOpenLightBox,L)?e("a",{title:x?.title,href:z,className:"gp-w-full",children:I}):I)})});export{T as default};
2
+ import{jsx as e,Fragment as t,jsxs as o}from"react/jsx-runtime";import{useProduct as r,useCurrentDevice as i,useShopStore as a,useRenderMode as c,getResponsiveValueByScreen as n,cls as s,makeStyle as h}from"@gem-sdk/core";import{memo as l,useMemo as f,useCallback as p}from"react";import m from"../../../../../image/components/NextImage.js";import g from"./MediaIcon.js";import{isFeatureMedia as d,getZoomImageClass as y,getZoomLenClass as u}from"../../common/productFeaturedImage.js";import v from"./ProductFeatureVideo.js";let E={src:"https://cdn.shopify.com/s/assets/no-image-2048-5e88c1b20e087fb7bbe9a3771824e743c244f437e4f8ba93bbf7b11b53f7824c_large.gif",id:"noImageError",width:480,height:480,alt:"no image",contentType:"IMAGE"};var T=l(({image:l,imageShowWhenHover:T,setting:w,aspectRatio:b})=>{var I;let x=r(),L=i(),j=a(e=>e.storefrontUrl),{isEditMode:N,isPreviewSharePageMode:O}=c(),k=f(()=>"none"!==n(w.ftClickOpenLightBox,L),[L,w.ftClickOpenLightBox]),R=f(()=>!N&&["VIDEO","EXTERNAL_VIDEO"].includes(l?.contentType||"")&&!k,[N,l?.contentType,k]),$=f(()=>l?{...l,src:R?l.src:d(l?.contentType)?l?.previewImage:l.src}:E,[l,R]),z=f(()=>{if(O)return"javascript:void(0)";if(!j)return"#";let e=new URL(j);return x?`${e.protocol}//${e.host}/products/${x.handle}`:"#"},[j,x,O]),A=f(()=>w?.hoverEffect!=="none"&&!d($?.contentType),[$?.contentType,w?.hoverEffect]),B=f(()=>w?.hoverEffect=="zoom"&&w?.zoomType=="glasses"&&!d($?.contentType),[$?.contentType,w?.hoverEffect,w?.zoomType]),C=p(e=>"IMAGE"!==e.contentType?e.previewImage:e.src,[]),F=f(()=>T?"other"!==w.hoverEffect?C($):C(T):E.src,[T,$,w.hoverEffect,C]);return e(t,{children:(I=e(t,{children:R?e(v,{type:$?.contentType,url:$.src??"",thumbnail:$?.previewImage,aspectRatio:b}):o(t,{children:[e(m,{draggable:"false",src:$.src,width:$?.width,height:$?.height,alt:$?.alt,setting:{aspectRatio:b,layout:w?.ftLayout},priority:w?.preload,className:"featured-image-only",style:{width:"100%",height:"100%",cursor:"pointer"}}),e(g,{contentType:$?.contentType??""}),A&&e(m,{draggable:"false",src:F,width:w?.hoverEffect==="other"?T?.width:$.width,height:w?.hoverEffect==="other"?T?.height:$.height,alt:w?.hoverEffect==="other"?T?.alt:$.alt,setting:{layout:w.ftLayout,aspectRatio:b},style:{width:"100%",height:"100%"},className:s("hover-image featured-image-only !gp-max-w-none",y()),priority:w?.preload}),B&&e("div",{className:s(u(),"room-len"),style:{...h({bgi:`url("${$?.src}")`})}})]})}),"product-link"===n(w.ftClickOpenLightBox,L)?e("a",{title:x?.title,href:z,className:"gp-w-full",children:I}):I)})});export{T as default};
@@ -1,2 +1,2 @@
1
- import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useCurrentDevice as r,cls as i,getResponsiveValueByScreen as a,makeStyle as m}from"@gem-sdk/core";import{memo as l}from"react";import{getAspectRatio as s}from"../../common/common.js";import c from"../../../../../image/components/NextImage.js";import n from"../lightbox/ButtonOpenLightBox.js";import d from"./MediaIcon.js";import{isFeatureMedia as g,getZoomImageClass as p,getZoomLenClass as h}from"../../common/productFeaturedImage.js";import{handleMouseOut as y,handleMouseMove as f}from"../../common/hoverAction.js";import{getProductImagesClassName as u}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as v}from"../../composables/getProductImagesStyles.js";import{useProductGalleryGrid as j}from"../../hooks/useProductGalleryGrid.js";var w=l(l=>{let{builderPropUID:w,productImages:T,onHandleClick:x,activeIndexFromFeatureImage:b,children:I,isHiddenInteraction:N,...k}=l,{isDisplay:E,shapeByLayout:G,imageActiveIndex:M,enableOpenLightBox:P,isEnableBorderActive:$,filteredProductImages:z}=j(l),B=r(),{galleryGridWrapperClasses:H,galleryItemClasses:O}=u(k),{galleryGridStyles:Z,galleryGridItemStyles:A}=v(k);return e(o,{children:E&&t("div",{"data-slot":"children","data-id":w,className:H,style:Z,"gp-data-hidden":`${N}`,children:[z?.map((o,r)=>{let l=r===M,u=g(o.contentType)?o.previewImage:o.src;return t("div",{"aria-hidden":!0,className:O(`gp-gallery-image-item gem-slider-item-${w}
2
- ${l&&$?"gem-slider-item-active":""}`),onClick:()=>x(o?.id||"",P),style:A,onMouseMove:e=>f(e,{hoverEffect:k.galleryHoverEffect,zoom:k.galleryZoom,zoomType:k.galleryZoomType}),onMouseOut:e=>y(e),"data-border":l&&k?.borderActive?"active":"deactive",children:[e(c,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{aspectRatio:s(G),layout:k?.layout},style:{width:"100%",height:"100%"}},o?.id),e(d,{contentType:o?.contentType||""}),k?.galleryHoverEffect!=="none"&&!g(o?.contentType)&&e(c,{src:u,width:o?.width,height:o?.height,alt:o?.alt,setting:{layout:k.layout,aspectRatio:s(G)},className:i("hover-image !gp-max-w-none",p())}),k?.galleryHoverEffect=="zoom"&&k?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(a(k.position,B)||"")&&!g(o?.contentType)&&e("div",{className:i(h(),"room-len"),style:{...m({bgi:`url("${o?.src}")`})}}),a(k?.clickOpenLightBox,B)&&e(n,{})]},o?.id)}),I]})})});export{w as default};
1
+ import{jsx as e,Fragment as o,jsxs as t}from"react/jsx-runtime";import{useCurrentDevice as r,useRenderMode as i,getResponsiveValueByScreen as a,cls as m,makeStyle as l}from"@gem-sdk/core";import{memo as c}from"react";import{getAspectRatio as s}from"../../common/common.js";import n from"../../../../../image/components/NextImage.js";import d from"../lightbox/ButtonOpenLightBox.js";import p from"./MediaIcon.js";import g from"./ProductFeatureVideo.js";import{isFeatureMedia as h,getZoomImageClass as y,getZoomLenClass as u}from"../../common/productFeaturedImage.js";import{handleMouseOut as f,handleMouseMove as v}from"../../common/hoverAction.js";import{getProductImagesClassName as j}from"../../composables/getProductImagesClassName.js";import{getProductImagesStyles as T}from"../../composables/getProductImagesStyles.js";import{useProductGalleryGrid as w}from"../../hooks/useProductGalleryGrid.js";var I=c(c=>{let{builderPropUID:I,productImages:E,onHandleClick:b,activeIndexFromFeatureImage:x,children:N,isHiddenInteraction:O,...P}=c,{isDisplay:k,shapeByLayout:G,imageActiveIndex:M,enableOpenLightBox:R,isEnableBorderActive:$,filteredProductImages:z}=w(c),A=r(),{isEditMode:B}=i(),H=["one-col","two-col"].includes(a(P.position,A)||""),{galleryGridWrapperClasses:L,galleryItemClasses:V}=j(P),{galleryGridStyles:Z,galleryGridItemStyles:C}=T(P);return e(o,{children:k&&t("div",{"data-slot":"children","data-id":I,className:L,style:Z,"gp-data-hidden":`${O}`,children:[z?.map((r,i)=>{let c=i===M,j=h(r.contentType)?r.previewImage:r.src,T=!B&&H&&!R&&["VIDEO","EXTERNAL_VIDEO"].includes(r?.contentType||"");return t("div",{"aria-hidden":!0,className:V(`gp-gallery-image-item gem-slider-item-${I}
2
+ ${c&&$?"gem-slider-item-active":""}`),onClick:()=>b(r?.id||"",R),style:C,onMouseMove:e=>v(e,{hoverEffect:P.galleryHoverEffect,zoom:P.galleryZoom,zoomType:P.galleryZoomType}),onMouseOut:e=>f(e),"data-border":c&&P?.borderActive?"active":"deactive",children:[T?e(g,{type:r?.contentType,url:r?.src??"",thumbnail:r?.previewImage,aspectRatio:s(G)}):t(o,{children:[e(n,{src:j,width:r?.width,height:r?.height,alt:r?.alt,setting:{aspectRatio:s(G),layout:P?.layout},style:{width:"100%",height:"100%"}},r?.id),e(p,{contentType:r?.contentType||""})]}),P?.galleryHoverEffect!=="none"&&!h(r?.contentType)&&e(n,{src:j,width:r?.width,height:r?.height,alt:r?.alt,setting:{layout:P.layout,aspectRatio:s(G)},className:m("hover-image !gp-max-w-none",y())}),P?.galleryHoverEffect=="zoom"&&P?.galleryZoomType=="glasses"&&["one-col","two-col"].includes(a(P.position,A)||"")&&!h(r?.contentType)&&e("div",{className:m(u(),"room-len"),style:{...l({bgi:`url("${r?.src}")`})}}),a(P?.clickOpenLightBox,A)&&e(d,{})]},r?.id)}),N]})})});export{I as default};
@@ -6,7 +6,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
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,thumbnail:"{{media.preview_image.src | product_img_url: '1024x1024'}}",poster:{altText:"{{media.alt | escape}}"},style:{width:"100%","max-height":"100%"}}),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"/>
@@ -39,7 +39,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
39
39
  />
40
40
  </svg>
41
41
  </div>
42
- `,N=i=>`
42
+ `,T=i=>`
43
43
  ${d("media.media_type == 'video'","{% assign mediaSourceUrl = media.sources.last.url %}")}
44
44
  ${d("media.media_type == 'external_video'","{% assign mediaSourceUrl = media | external_video_url %}{% assign mediaSource = media | json %}")}
45
45
  ${d("media.media_type == 'image'","{% assign mediaSourceUrl = media.src %}")}
@@ -61,7 +61,7 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
61
61
  ${d("media.media_type == 'external_video' or media.media_type == 'video'","{% assign isVideo = true %}")}
62
62
 
63
63
  <div class="gp-w-full" style="${d("media == null or media.media_type == 'image'","display: block !important;")} ${d("isVideo == true",g({...S()}))}">
64
- ${d("media != null",P(),T())}
64
+ ${d("media != null",P(),N())}
65
65
  </div>
66
66
 
67
67
  <div class="${d("isMedia","gp-flex gp-justify-center gp-items-center")}"
@@ -80,14 +80,14 @@ import{makeStyleResponsive as e,template as i,getResponsiveValueByScreen as a,cl
80
80
  </div>
81
81
  {% assign isVideo= false %}
82
82
  {% assign isMedia= false %}
83
- </div>`,T=()=>i`
83
+ </div>`,N=()=>i`
84
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,enableLazyLoadImage:x})}`;return o(`
85
85
  <div type="grid-gallery"
86
86
  class="${V}"
87
87
  style="${g(q)}}"
88
88
  >
89
89
  ${s("media in product.media",`${d("media.media_type == 'image'",s("image in product.images",d("image.src == media.src","{% assign imageID = image.id %}{% break %}")),"{% assign imageID = '' %}")}
90
- ${d("media.id == product.featured_media.id ",N(L?.borderActive?.border!=="none"?"active":""),N())}`)}
90
+ ${d("media.id == product.featured_media.id ",T(L?.borderActive?.border!=="none"?"active":""),T())}`)}
91
91
  ${d("product.media.size > 0",b)}
92
- ${d("product.media.size < 1",N())}
92
+ ${d("product.media.size < 1",T())}
93
93
  </div>`)};export{_ as default};
@@ -1,2 +1,2 @@
1
1
  'use client';
2
- import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useFeaturedImageGlobal as i,useEditorMode as l,cls as s}from"@gem-sdk/core";import d from"../../../../../carousel-v3/components/root/Carousel.js";import n from"../../../../../carousel-v3/components/item/CarouselItem.js";import r from"../../../../../image/components/NextImage.js";import"../../../../../modal/components/confirm.js";import p from"../../../../../modal/components/Modal.js";import{useMemo as m}from"react";import{isFeatureMedia as a}from"../../common/productFeaturedImage.js";import c from"../child/ProductFeatureVideo.js";import g from"../child/MediaIcon.js";let h=({builderPropUID:h,productImages:u,open:b,imageRatio:f,onHandleClose:k})=>{let y=i(),E=m(()=>{let e=u?.findIndex(e=>e.id===y?.id);return e&&e>0?e:0},[u,y]),I={desktop:u&&u.length>1,mobile:u&&u?.length>1,tablet:u&&u?.length>1},j=l(),C=e=>"edit"!==j&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(p,{setting:{open:b},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{k(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e(d,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:E,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:I,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:E},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:E,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:h},fullHeight:!0,children:u?.map(i=>e(n,{className:`gem-slider-item gem-slider-item-${h} gp-flex gp-items-center gp-justify-center gp-px-4`,children:C(i)?e(c,{type:i?.contentType,url:i.src??"",aspectRatio:f}):t(o,{children:[e(r,{src:a(i?.contentType)?i?.previewImage:i?.src,width:i?.width,height:i?.height,alt:i?.alt,"content-type":i?.contentType,setting:{aspectRatio:f},className:s("gp-h-full gp-w-full gp-object-contain")},i?.id),e(g,{contentType:i?.contentType??""})]})},i?.id))})})};export{h as default};
2
+ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{useFeaturedImageGlobal as i,useEditorMode as l,cls as s}from"@gem-sdk/core";import d from"../../../../../carousel-v3/components/root/Carousel.js";import n from"../../../../../carousel-v3/components/item/CarouselItem.js";import r from"../../../../../image/components/NextImage.js";import"../../../../../modal/components/confirm.js";import p from"../../../../../modal/components/Modal.js";import{useMemo as m}from"react";import{isFeatureMedia as a}from"../../common/productFeaturedImage.js";import c from"../child/ProductFeatureVideo.js";import g from"../child/MediaIcon.js";let h=({builderPropUID:h,productImages:u,open:b,imageRatio:f,onHandleClose:k})=>{let y=i(),E=m(()=>{let e=u?.findIndex(e=>e.id===y?.id);return e&&e>0?e:0},[u,y]),I={desktop:u&&u.length>1,mobile:u&&u?.length>1,tablet:u&&u?.length>1},j=l(),v=e=>"edit"!==j&&["VIDEO","EXTERNAL_VIDEO"].includes(e?.contentType||"");return e(p,{setting:{open:b},styles:{width:"80%"},closeOnClickOutside:!0,onClose:()=>{k(),console.log("onHandleClose")},disableIframeClickEvent:!0,contentClass:"mobile:!gp-w-[100%] gp-px-2 gp-pb-10",children:e(d,{setting:{loop:{desktop:!1,mobile:!1,tablet:!1},slidesToShow:{desktop:1,tablet:1,mobile:1},defaultCurrentSlider:E,dot:{desktop:!0,mobile:!0,tablet:!0},dotStyle:{desktop:"outside",mobile:"outside",tablet:"outside"},dotColor:{desktop:"#E2E2E2",mobile:"#E2E2E2",tablet:"#E2E2E2"},dotActiveColor:{desktop:"#121212",mobile:"#121212",tablet:"#121212"},dotSize:{desktop:12},dotGapToCarousel:{desktop:12},navigationEnable:I,navigationStyle:{desktop:"outside"},arrowIconSize:{desktop:24},initialSlide:E},styles:{sizeSetting:{desktop:{height:"80vh"},tablet:{height:"80vh"},mobile:{height:"60vh"}},playSpeed:0},moveToIdx:E,hiddenDotWhenOnlyOne:!0,isHiddenArrowWhenDisabled:!0,isDisableResetSlide:!0,builderProps:{uid:h},fullHeight:!0,children:u?.map(i=>e(n,{className:`gem-slider-item gem-slider-item-${h} gp-flex gp-items-center gp-justify-center gp-px-4`,children:v(i)?e(c,{type:i?.contentType,url:i.src??"",thumbnail:i?.previewImage,aspectRatio:f}):t(o,{children:[e(r,{src:a(i?.contentType)?i?.previewImage:i?.src,width:i?.width,height:i?.height,alt:i?.alt,"content-type":i?.contentType,setting:{aspectRatio:f},className:s("gp-h-full gp-w-full gp-object-contain")},i?.id),e(g,{contentType:i?.contentType??""})]})},i?.id))})})};export{h as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gem-sdk/components",
3
- "version": "19.0.0-staging.18",
3
+ "version": "19.0.0-staging.19",
4
4
  "license": "MIT",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",