@gem-sdk/components 3.0.0 → 3.0.1-staging.1135
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/accordion/common/helpers.js +1 -1
- package/dist/cjs/accordion/components/AccordionItem.liquid.js +7 -7
- package/dist/cjs/accordion/hooks/useAccordionItem.js +1 -1
- package/dist/cjs/article/components/ArticleContent.js +1 -1
- package/dist/cjs/article/components/ArticleImage.js +1 -1
- package/dist/cjs/article/components/ArticleImage.liquid.js +4 -4
- package/dist/cjs/article/components/ArticleList.js +1 -1
- package/dist/cjs/article/settings/configs/article-author/presets.js +1 -1
- package/dist/cjs/article/settings/configs/article-author/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-category/presets.js +1 -1
- package/dist/cjs/article/settings/configs/article-category/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-content/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-date/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-excerpt/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-list/presets.js +1 -1
- package/dist/cjs/article/settings/configs/article-read-more/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-tag/settings.js +1 -1
- package/dist/cjs/article/settings/configs/article-title/presets.js +1 -1
- package/dist/cjs/article/settings/configs/article-title/settings.js +1 -1
- package/dist/cjs/breadcrumb/settings/configs/settings.js +1 -1
- package/dist/cjs/button/common/styles.js +1 -1
- package/dist/cjs/button/settings/configs/settings.js +1 -1
- package/dist/cjs/carousel/components/dot/common/styles.js +1 -1
- package/dist/cjs/collection/settings/collection-title/configs/settings.js +1 -1
- package/dist/cjs/countdown-timer/settings/configs/setting.js +1 -1
- package/dist/cjs/coupon/settings/configs/settings.js +1 -1
- package/dist/cjs/dialog/common/classes.js +1 -1
- package/dist/cjs/dialog/components/Dialog.js +1 -1
- package/dist/cjs/dialog/components/Dialog.liquid.js +1 -1
- package/dist/cjs/form/components/textarea/TextArea.liquid.js +2 -2
- package/dist/cjs/form/components/textfield/common/classes.js +1 -1
- package/dist/cjs/form/settings/form-checkbox/configs/settings.js +1 -1
- package/dist/cjs/form/settings/submit-button/configs/settings.js +1 -1
- package/dist/cjs/grid/components/row/common/classes.js +1 -1
- package/dist/cjs/grid/components/row/common/helpers.js +1 -1
- package/dist/cjs/grid/components/row/common/styles.js +1 -1
- package/dist/cjs/header/settings/configs/settings.js +1 -1
- package/dist/cjs/heading/settings/configs/settings.js +1 -1
- package/dist/cjs/hero-banner/common/classes.js +1 -1
- package/dist/cjs/hero-banner/common/helpers.js +1 -1
- package/dist/cjs/hero-banner/common/styles.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBanner.liquid.js +9 -9
- package/dist/cjs/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/cjs/hero-banner/components/HeroBannerItem.liquid.js +9 -9
- package/dist/cjs/hero-banner/settings/configs/settings.js +1 -1
- package/dist/cjs/icon/settings/configs/settings.js +1 -1
- package/dist/cjs/icon-list-v2/common/helpers.js +1 -1
- package/dist/cjs/icon-list-v2/common/styles.js +1 -1
- package/dist/cjs/icon-list-v2/components/IconList.js +1 -1
- package/dist/cjs/icon-list-v2/hooks/useIconLineHeight.js +1 -1
- package/dist/cjs/icon-list-v2/settings/configs/settings.js +1 -1
- package/dist/cjs/image/common/attrs.js +1 -1
- package/dist/cjs/image/constants.js +1 -0
- package/dist/cjs/image-comparison/settings/configs/settings.js +1 -1
- package/dist/cjs/product/components/dynamic-checkout/common/styles.js +4 -4
- package/dist/cjs/product/components/file-upload/settings/configs/settings.js +1 -1
- package/dist/cjs/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/cjs/product/components/product-badge/common/styles.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/cjs/product/components/product-badge/utils/renderBadgeLiquid.js +1 -1
- package/dist/cjs/product/components/product-button/PriceLayout.js +1 -1
- package/dist/cjs/product/components/product-button/PriceLayout.liquid.js +1 -1
- package/dist/cjs/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/cjs/product/components/product-images-v2/ProductImagesV2.liquid.js +18 -18
- package/dist/cjs/product/components/product-images-v2/common/common.js +1 -1
- package/dist/cjs/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +9 -9
- package/dist/cjs/product/components/product-list/ProductList.liquid.js +30 -22
- package/dist/cjs/product/components/product-list/ProductListCarouselItem.liquid.js +5 -5
- package/dist/cjs/product/components/product-list/ProductListGridItem.liquid.js +7 -7
- package/dist/cjs/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/cjs/product/components/product-list/common/helpers.js +1 -1
- package/dist/cjs/product/components/product-list/common/styles.js +1 -1
- package/dist/cjs/product/components/product-quantity/common/classes.js +1 -1
- package/dist/cjs/product/components/product-wrap/Product.liquid.js +8 -8
- package/dist/cjs/product/settings/dynamic-checkout/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product/configs/product-presets/product-1-col.js +2 -2
- package/dist/cjs/product/settings/product/configs/product-presets/product-2-col.js +2 -2
- package/dist/cjs/product/settings/product/configs/product-presets/product-default.js +2 -2
- package/dist/cjs/product/settings/product-badge/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-button/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-description/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-list/configs/presets.js +2 -2
- package/dist/cjs/product/settings/product-list/configs/settings-v2.js +1 -1
- package/dist/cjs/product/settings/product-price/configs/presets.js +1 -1
- package/dist/cjs/product/settings/product-price/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-price/configs/ui-v2.js +1 -1
- package/dist/cjs/product/settings/product-properties/configs/settings-v2.js +1 -1
- package/dist/cjs/product/settings/product-quantity/configs/presets.js +1 -1
- package/dist/cjs/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-sku/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-title/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-variant/configs/presets.js +1 -1
- package/dist/cjs/product/settings/product-variant/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-variant/swatches-style-config/dropdown.js +1 -1
- package/dist/cjs/product/settings/product-vendor/configs/settings.js +1 -1
- package/dist/cjs/product/settings/product-view-more/configs/settings.js +1 -1
- package/dist/cjs/stock-counter/settings/configs/settings-v2.js +1 -1
- package/dist/cjs/tab/settings/configs/settings.js +1 -1
- package/dist/cjs/text/settings/configs/settings.js +1 -1
- package/dist/cjs/third-party-slot/common/helpers.js +1 -1
- package/dist/cjs/video/common/helpers.js +1 -1
- package/dist/cjs/video/common/styles.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +8 -8
- package/dist/cjs/video/components/LiteVimeoEmbed.js +1 -1
- package/dist/cjs/video/components/LiteVimeoEmbed.liquid.js +6 -6
- package/dist/cjs/video/components/LiteYouTubeEmbed.liquid.js +5 -5
- package/dist/cjs/video/hooks/useLiteVimeoEmbed.js +1 -1
- package/dist/esm/accordion/common/helpers.js +1 -1
- package/dist/esm/accordion/components/AccordionItem.liquid.js +3 -3
- package/dist/esm/accordion/hooks/useAccordionItem.js +1 -1
- package/dist/esm/article/components/ArticleContent.js +1 -1
- package/dist/esm/article/components/ArticleImage.js +1 -1
- package/dist/esm/article/components/ArticleImage.liquid.js +4 -4
- package/dist/esm/article/components/ArticleList.js +1 -1
- package/dist/esm/article/settings/configs/article-author/presets.js +1 -1
- package/dist/esm/article/settings/configs/article-author/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-category/presets.js +1 -1
- package/dist/esm/article/settings/configs/article-category/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-content/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-date/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-excerpt/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-list/presets.js +1 -1
- package/dist/esm/article/settings/configs/article-read-more/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-tag/settings.js +1 -1
- package/dist/esm/article/settings/configs/article-title/presets.js +1 -1
- package/dist/esm/article/settings/configs/article-title/settings.js +1 -1
- package/dist/esm/breadcrumb/settings/configs/settings.js +1 -1
- package/dist/esm/button/common/styles.js +1 -1
- package/dist/esm/button/settings/configs/settings.js +1 -1
- package/dist/esm/carousel/components/dot/common/styles.js +1 -1
- package/dist/esm/collection/settings/collection-title/configs/settings.js +1 -1
- package/dist/esm/countdown-timer/settings/configs/setting.js +1 -1
- package/dist/esm/coupon/settings/configs/settings.js +1 -1
- package/dist/esm/dialog/common/classes.js +1 -1
- package/dist/esm/dialog/components/Dialog.js +1 -1
- package/dist/esm/dialog/components/Dialog.liquid.js +1 -1
- package/dist/esm/form/components/textarea/TextArea.liquid.js +2 -2
- package/dist/esm/form/components/textfield/common/classes.js +1 -1
- package/dist/esm/form/settings/form-checkbox/configs/settings.js +1 -1
- package/dist/esm/form/settings/submit-button/configs/settings.js +1 -1
- package/dist/esm/grid/components/row/common/classes.js +1 -1
- package/dist/esm/grid/components/row/common/helpers.js +1 -1
- package/dist/esm/grid/components/row/common/styles.js +1 -1
- package/dist/esm/header/settings/configs/settings.js +1 -1
- package/dist/esm/heading/settings/configs/settings.js +1 -1
- package/dist/esm/hero-banner/common/classes.js +1 -1
- package/dist/esm/hero-banner/common/helpers.js +1 -1
- package/dist/esm/hero-banner/common/styles.js +1 -1
- package/dist/esm/hero-banner/components/HeroBanner.liquid.js +9 -9
- package/dist/esm/hero-banner/components/HeroBannerItem.js +1 -1
- package/dist/esm/hero-banner/components/HeroBannerItem.liquid.js +10 -10
- package/dist/esm/hero-banner/settings/configs/settings.js +1 -1
- package/dist/esm/icon/settings/configs/settings.js +1 -1
- package/dist/esm/icon-list-v2/common/helpers.js +1 -1
- package/dist/esm/icon-list-v2/common/styles.js +1 -1
- package/dist/esm/icon-list-v2/components/IconList.js +1 -1
- package/dist/esm/icon-list-v2/hooks/useIconLineHeight.js +1 -1
- package/dist/esm/icon-list-v2/settings/configs/settings.js +1 -1
- package/dist/esm/image/common/attrs.js +1 -1
- package/dist/esm/image/constants.js +1 -0
- package/dist/esm/image-comparison/settings/configs/settings.js +1 -1
- package/dist/esm/product/components/dynamic-checkout/common/styles.js +10 -10
- package/dist/esm/product/components/file-upload/settings/configs/settings.js +1 -1
- package/dist/esm/product/components/product-badge/ProductBadge.js +1 -1
- package/dist/esm/product/components/product-badge/common/styles.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeILP.js +1 -1
- package/dist/esm/product/components/product-badge/utils/renderBadgeLiquid.js +1 -1
- package/dist/esm/product/components/product-button/PriceLayout.js +1 -1
- package/dist/esm/product/components/product-button/PriceLayout.liquid.js +4 -4
- package/dist/esm/product/components/product-description/hooks/useGpDescription.js +1 -1
- package/dist/esm/product/components/product-images-v2/ProductImagesV2.liquid.js +17 -17
- package/dist/esm/product/components/product-images-v2/common/common.js +1 -1
- package/dist/esm/product/components/product-images-v2/components/feature-gallery/FeatureImageWithGallery.liquid.js +11 -11
- package/dist/esm/product/components/product-list/ProductList.liquid.js +32 -24
- package/dist/esm/product/components/product-list/ProductListCarouselItem.liquid.js +3 -3
- package/dist/esm/product/components/product-list/ProductListGridItem.liquid.js +9 -9
- package/dist/esm/product/components/product-list/ProductListGridLayout.js +1 -1
- package/dist/esm/product/components/product-list/common/helpers.js +1 -1
- package/dist/esm/product/components/product-list/common/styles.js +1 -1
- package/dist/esm/product/components/product-quantity/common/classes.js +1 -1
- package/dist/esm/product/components/product-wrap/Product.liquid.js +10 -10
- package/dist/esm/product/settings/dynamic-checkout/configs/settings.js +1 -1
- package/dist/esm/product/settings/product/configs/product-presets/product-1-col.js +2 -2
- package/dist/esm/product/settings/product/configs/product-presets/product-2-col.js +2 -2
- package/dist/esm/product/settings/product/configs/product-presets/product-default.js +2 -2
- package/dist/esm/product/settings/product-badge/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-button/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-description/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-list/configs/presets.js +2 -2
- package/dist/esm/product/settings/product-list/configs/settings-v2.js +1 -1
- package/dist/esm/product/settings/product-price/configs/presets.js +1 -1
- package/dist/esm/product/settings/product-price/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-price/configs/ui-v2.js +1 -1
- package/dist/esm/product/settings/product-properties/configs/settings-v2.js +1 -1
- package/dist/esm/product/settings/product-quantity/configs/presets.js +1 -1
- package/dist/esm/product/settings/product-quantity/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-sku/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-title/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-variant/configs/presets.js +1 -1
- package/dist/esm/product/settings/product-variant/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-variant/swatches-style-config/dropdown.js +1 -1
- package/dist/esm/product/settings/product-vendor/configs/settings.js +1 -1
- package/dist/esm/product/settings/product-view-more/configs/settings.js +1 -1
- package/dist/esm/stock-counter/settings/configs/settings-v2.js +1 -1
- package/dist/esm/tab/settings/configs/settings.js +1 -1
- package/dist/esm/text/settings/configs/settings.js +1 -1
- package/dist/esm/third-party-slot/common/helpers.js +1 -1
- package/dist/esm/video/common/helpers.js +1 -1
- package/dist/esm/video/common/styles.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +15 -15
- package/dist/esm/video/components/LiteVimeoEmbed.js +1 -1
- package/dist/esm/video/components/LiteVimeoEmbed.liquid.js +5 -5
- package/dist/esm/video/components/LiteYouTubeEmbed.liquid.js +8 -8
- package/dist/esm/video/hooks/useLiteVimeoEmbed.js +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{template as e,RenderIf as t,isLocalEnv as o,baseAssetURL as s}from"@gem-sdk/core";import i from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as r}from"../../helpers.js";import{createAttr as l,createClass as a,createStyle as
|
|
2
|
-
${
|
|
1
|
+
import{template as e,RenderIf as t,isLocalEnv as o,baseAssetURL as s}from"@gem-sdk/core";import i from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as r}from"../../helpers.js";import{createAttr as l,createClass as a,createStyle as d,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 HTML5Embed=$=>{let g=`gp-video-${$.uid}`,{thumbnail:f,muted:h,autoplay:L,loop:b,controls:E,src:A,style:w,title:T,className:P,lazy:j,poster:k}=$,I=L&&h&&!!f,S=!j&&$.isVideoComponent,V=A.endsWith(".mp4"),x=!f||L&&h,C=S?A:void 0,M=l({...y({videoId:g,title:T,autoplay:L,preloadThumbnail:I,offLazyLoad:S,src:A,thumbnail:f})}),B=a({...m(x)}),N=d({...v()}),z=a({...c()}),D=a({...u()}),G=a({...p(P,S)}),H=()=>I?e`${i({src:f,alt:T,priority:k?.preload,enableLazyLoadImage:!0,style:N})}
|
|
2
|
+
${n(L,`<script>
|
|
3
3
|
document.addEventListener("DOMContentLoaded", (event) => {
|
|
4
4
|
const eventList = ["keydown", "mousemove", "wheel", "touchmove", "touchstart", "touchend"];
|
|
5
5
|
const autoLoadTimeout = setTimeout(runAutoPlayVideo, 0);
|
|
@@ -14,9 +14,9 @@ import{template as e,RenderIf as t,isLocalEnv as o,baseAssetURL as s}from"@gem-s
|
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
function runAutoPlayVideo() {
|
|
17
|
-
document.getElementById('${
|
|
18
|
-
document.getElementById('${
|
|
19
|
-
document.getElementById('${
|
|
17
|
+
document.getElementById('${g}').setAttribute('autoplay','true');
|
|
18
|
+
document.getElementById('${g}').setAttribute('playsinline','true');
|
|
19
|
+
document.getElementById('${g}').play();
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
</script>`)}
|
|
@@ -24,9 +24,9 @@ import{template as e,RenderIf as t,isLocalEnv as o,baseAssetURL as s}from"@gem-s
|
|
|
24
24
|
<div
|
|
25
25
|
role="presentation"
|
|
26
26
|
style="${w}"
|
|
27
|
-
class="${
|
|
27
|
+
class="${B}"
|
|
28
28
|
>
|
|
29
|
-
${i({id:"video-thumbnail",src:f??"",alt:
|
|
29
|
+
${i({id:"video-thumbnail",src:f??"",alt:k?.altText,title:k?.imageTitle,className:D,isDisableAspectStyle:!0,priority:k?.preload,enableLazyLoadImage:!0})}
|
|
30
30
|
<button type="button" class="${z}" aria-label="Play">
|
|
31
31
|
<svg class="gp-w-5 gp-text-white" viewBox="0 0 24 24">
|
|
32
32
|
<path
|
|
@@ -37,22 +37,22 @@ import{template as e,RenderIf as t,isLocalEnv as o,baseAssetURL as s}from"@gem-s
|
|
|
37
37
|
</button>
|
|
38
38
|
</div>
|
|
39
39
|
`;return e`
|
|
40
|
-
<gp-lite-html5-embed>
|
|
40
|
+
<gp-lite-html5-embed is-check-loaded="${$.isCheckLoaded??!1}">
|
|
41
41
|
${H()}
|
|
42
42
|
<video
|
|
43
|
-
${{...
|
|
43
|
+
${{...M}}
|
|
44
44
|
style="${w}"
|
|
45
45
|
class="${G}"
|
|
46
46
|
${E?"controls":void 0}
|
|
47
|
-
${
|
|
48
|
-
${
|
|
49
|
-
${
|
|
47
|
+
${b?"loop":void 0}
|
|
48
|
+
${h?"muted":void 0}
|
|
49
|
+
${L?"autoplay":void 0}
|
|
50
50
|
playsinline
|
|
51
|
-
src="${
|
|
51
|
+
src="${C}"
|
|
52
52
|
>
|
|
53
|
-
${
|
|
53
|
+
${n(V,`<source data-src="${A}" src="${C}" type="video/mp4"></source>`)}
|
|
54
54
|
</video>
|
|
55
|
-
${
|
|
55
|
+
${n(!x,O())}
|
|
56
56
|
</gp-lite-html5-embed>
|
|
57
57
|
${t(o,`<script ${r('class="gps-link" delay',"src")}="{{ 'gp-lite-html5-embed-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${r('class="gps-link" delay',"src")}="${s}/assets-v2/gp-lite-html5-embed-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
58
58
|
`};export{HTML5Embed as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useLiteVimeoEmbed as l}from"../hooks/useLiteVimeoEmbed.js";import{createStyle as m,createClass as o}from"@gem-sdk/system";import{getArticleVimeoClasses as r,getImageVimeoClasses as i,getButtonVimeoClasses as a,getIframeVimeoClasses as s}from"../common/classes.js";import{getIframeVimeoStyle as c,getArticleVimeoStyle as n}from"../common/styles.js";import{getVimeoParams as p}from"../common/helpers.js";import d from"../../image/components/NextImage.js";let LiteVimeoEmbed=u=>{let{title:f,lazy:y,aspectRatio:h,poster:b}=u,{iframeSrc:g,videoId:j}=p(u),{addIframe:x,thumbnail:N,iframe:w
|
|
2
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useLiteVimeoEmbed as l}from"../hooks/useLiteVimeoEmbed.js";import{createStyle as m,createClass as o}from"@gem-sdk/system";import{getArticleVimeoClasses as r,getImageVimeoClasses as i,getButtonVimeoClasses as a,getIframeVimeoClasses as s}from"../common/classes.js";import{getIframeVimeoStyle as c,getArticleVimeoStyle as n}from"../common/styles.js";import{getVimeoParams as p}from"../common/helpers.js";import d from"../../image/components/NextImage.js";let LiteVimeoEmbed=u=>{let{title:f,lazy:y,aspectRatio:h,poster:b}=u,{iframeSrc:g,videoId:j}=p(u),{addIframe:x,thumbnail:N,iframe:w}=l(y,j),k=u.thumbnail||N,C=m({...c(h)}),L=m({...n(h,k)}),V=o({...r(k,h)}),E=o({...i(w)}),v=o({...a(w)}),B=o({...s()});return e("article",{"aria-hidden":!0,className:V,"data-title":f,style:L,onClick:x,children:[t(d,{src:k,alt:b?.altText,title:b?.imageTitle,className:E,isDisableAspectStyle:!0,onClick:x}),t("button",{type:"button",className:v,"aria-label":"Play",children:t("svg",{className:"gp-w-5 gp-text-white",viewBox:"0 0 24 24",children:t("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"})})}),w&&t("iframe",{style:C,title:f,frameBorder:"0",allow:"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0,src:g,className:B})]})};export{LiteVimeoEmbed as default};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as
|
|
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 g}from"../common/classes.js";import{getIframeVimeoStyle as f,getArticleVimeoStyle as n}from"../common/styles.js";import{getVimeoParams as y}from"../common/helpers.js";import $ from"../../image/components/NextImage.liquid.js";let LiteVimeoEmbed=b=>{let{title:h,id:u,lazy:v,aspectRatio:S,autoplay:j,muted:w,thumbnailLink:E,poster:x}=b,{iframeSrc:L}=y(b),k=!v,I=b.thumbnail,N=r({id:u,thumbnail:E,lazy:v,iframeSrc:L,title:h,autoplay:j,muted:w,style:b?.vimeoStyleIframe||""}),V=a({...f(S)}),A=a({...n(S,"")}),T=m({...p(I,S)}),C=m({...c(k)}),G=m({...d(k)}),M=m({...g()});return e`
|
|
2
2
|
<gp-lite-vimeo-embed gp-data='${JSON.stringify(N)}'>
|
|
3
3
|
<article
|
|
4
4
|
aria-hidden
|
|
5
5
|
class="${T}"
|
|
6
|
-
data-title="${
|
|
6
|
+
data-title="${h}"
|
|
7
7
|
style="${A}"
|
|
8
8
|
>
|
|
9
|
-
${$({src:I,alt:x?.altText,title:x?.imageTitle,className:C,isDisableAspectStyle:!0,enableLazyLoadImage:!0,priority:x?.preload})}
|
|
9
|
+
${$({src:I,alt:x?.altText,title:x?.imageTitle,className:C,isDisableAspectStyle:!0,enableLazyLoadImage:!0,priority:x?.preload,height:x?.height,width:x?.width})}
|
|
10
10
|
${o(!k,e`
|
|
11
11
|
<button type="button" class="${G}" aria-label="Play">
|
|
12
12
|
<svg class="gp-w-5 gp-text-white" viewBox="0 0 24 24">
|
|
@@ -19,7 +19,7 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as l}from"@gem-s
|
|
|
19
19
|
${o(k,e`
|
|
20
20
|
<iframe
|
|
21
21
|
style="${V}"
|
|
22
|
-
title="${
|
|
22
|
+
title="${h}"
|
|
23
23
|
frameborder="0"
|
|
24
24
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
25
25
|
allowfullscreen
|
|
@@ -28,5 +28,5 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as l}from"@gem-s
|
|
|
28
28
|
></iframe>`)}
|
|
29
29
|
</article>
|
|
30
30
|
</gp-lite-vimeo-embed>
|
|
31
|
-
${t(s,`<script ${
|
|
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
32
|
`};export{LiteVimeoEmbed as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as
|
|
1
|
+
import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as a}from"@gem-sdk/core";import l from"../../image/components/NextImage.liquid.js";import{getSettingPreloadData as r}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 f}from"../common/classes.js";import{getIframeYoutubeStyle as y,getArticleYoutubeStyle as b}from"../common/styles.js";import{getYoutubeParams as g}from"../common/helpers.js";let LiteYouTubeEmbed=n=>{let{style:$,iframeClass:h,wrapperClass:v,title:S,poster:j}=n,z=`gp-video-${n.uid}`,{posterUrl:E,iframeSrc:w}=g(n),C=j?.preload,L=i({lazy:n.lazy,style:$,title:S,iframeSrc:w}),N=!n.lazy,T=o({...d(N)}),k=o({...c()}),x=o({...u(C||!1,v)}),A=o({...f(h)}),I=p({...y($)}),M=p({...b($,E)}),G=()=>e`
|
|
2
2
|
<iframe
|
|
3
3
|
id="player-wrapper-${n.uid}"
|
|
4
4
|
class="${A}"
|
|
@@ -7,18 +7,18 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as l}from"@gem-s
|
|
|
7
7
|
frameborder="0"
|
|
8
8
|
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
|
|
9
9
|
allowfullscreen
|
|
10
|
-
src="${
|
|
10
|
+
src="${w}"
|
|
11
11
|
></iframe>
|
|
12
12
|
`;return e`
|
|
13
|
-
<gp-lite-youtube-embed gp-data='${JSON.stringify(
|
|
13
|
+
<gp-lite-youtube-embed gp-data='${JSON.stringify(L)}'>
|
|
14
14
|
<article
|
|
15
15
|
aria-hidden
|
|
16
|
-
class="${
|
|
16
|
+
class="${x}"
|
|
17
17
|
data-title="${S}"
|
|
18
18
|
style="${M}"
|
|
19
19
|
>
|
|
20
|
-
${
|
|
21
|
-
<button type="button" aria-label="Play" class="${
|
|
20
|
+
${l({id:z,src:E,alt:j?.altText,title:j?.imageTitle,priority:j?.preload,enableLazyLoadImage:!0,className:k,isDisableAspectStyle:!0,isNotLazyload:j?.preload})}
|
|
21
|
+
<button type="button" aria-label="Play" class="${T}">
|
|
22
22
|
<svg height="100%" version="1.1" viewBox="0 0 68 48" width="100%">
|
|
23
23
|
<path
|
|
24
24
|
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"
|
|
@@ -27,8 +27,8 @@ import{template as e,RenderIf as t,isLocalEnv as s,baseAssetURL as l}from"@gem-s
|
|
|
27
27
|
<path d="M 45,24 27,14 27,34" fill="#fff"></path>
|
|
28
28
|
</svg>
|
|
29
29
|
</button>
|
|
30
|
-
${
|
|
30
|
+
${m(N,G())}
|
|
31
31
|
</article>
|
|
32
32
|
</gp-lite-youtube-embed>
|
|
33
|
-
${t(s,`<script ${
|
|
33
|
+
${t(s,`<script ${r('class="gps-link" delay',"src")}="{{ 'gp-lite-youtube-embed-v7-5.js' | asset_url }}" defer="defer"></script>`,`<script ${r('class="gps-link" delay',"src")}="${a}/assets-v2/gp-lite-youtube-embed-v7-5.js?v={{ shop.metafields.GEMPAGES.ASSETS_VERSION }}" defer="defer"></script>`)}
|
|
34
34
|
`};export{LiteYouTubeEmbed as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{useState as e,useEffect as t}from"react";let useLiteVimeoEmbed=(i,
|
|
1
|
+
import{useState as e,useEffect as t}from"react";let useLiteVimeoEmbed=(i,m)=>{let[o,r]=e(),[s,a]=e(!i);t(()=>{fetch(`https://vimeo.com/api/v2/video/${m}.json`).then(e=>e.json()).then(([e])=>{r(e?.thumbnail_large)})},[m]);let l=()=>{s||a(!0)};return{addIframe:l,thumbnail:o,iframe:s}};export{useLiteVimeoEmbed as default,useLiteVimeoEmbed};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -3622,6 +3622,7 @@ type OriginalSettingProps$2 = {
|
|
|
3622
3622
|
productSrc?: ProductSource;
|
|
3623
3623
|
productIds?: string[];
|
|
3624
3624
|
collectionId?: string;
|
|
3625
|
+
collectionHandle?: string;
|
|
3625
3626
|
productHandles?: string[];
|
|
3626
3627
|
numOfSelectedProducts?: number;
|
|
3627
3628
|
relatedTag?: RelatedCondition[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/components",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1-staging.1135",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"scan-all-text": "rollup -c ./scripts/rollup.config.settings.mjs && node ./scripts/scan-all-text && node ./scripts/scan-all-text"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@gem-sdk/core": "
|
|
29
|
-
"@gem-sdk/styles": "
|
|
30
|
-
"@gem-sdk/system": "
|
|
28
|
+
"@gem-sdk/core": "2.0.0-staging.1120",
|
|
29
|
+
"@gem-sdk/styles": "2.0.0-staging.1077",
|
|
30
|
+
"@gem-sdk/system": "2.0.0-staging.1077",
|
|
31
31
|
"tsup": "^8.5.0",
|
|
32
32
|
"@types/react-transition-group": "^4.4.12",
|
|
33
33
|
"xlsx": "^0.18.5"
|