quirk-ui 0.1.42 → 0.1.44
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/index7.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._content_1atux_1{width:100%;padding-top:var(--spacing-xl);padding-bottom:var(--spacing-xl)}._container_1atux_7{display:flex;align-items:center;justify-content:space-between;flex-direction:column;width:100%;max-width:var(--container-max-width, var(--layout-width));margin:0 auto;padding-left:var(--spacing-md);padding-right:var(--spacing-md)}._container_1atux_7 h1,._container_1atux_7 h2,._container_1atux_7 h3,._container_1atux_7 h4,._container_1atux_7 h5,._container_1atux_7 h6{width:100%;margin-block:0}@media (max-width: 767px){._container_1atux_7{gap:var(--spacing-xl)}}._eyebrow_1atux_34{font-weight:var(--font-weight-bold)}._metrics_1atux_38{display:flex;align-items:flex-start;flex-wrap:wrap;gap:var(--spacing-md);padding:var(--spacing-md)}@media (max-width: 767px){._metrics_1atux_38{flex-direction:column}}._metric_1atux_38{flex:1}._metricValue_1atux_54{font-size:2.5rem;font-weight:var(--font-weight-bold);position:relative;z-index:1;color:var(--color-text-primary)}._metricValue_1atux_54:after{content:"";display:block;background-color:var(--color-primary-10);width:35px;height:35px;position:absolute;top:-3px;left:-.5rem;z-index:-1;border-radius:var(--radius-md)}._disclaimer_1atux_75{color:var(--color-text-primary);font-size:var(--font-size-sm)}._layoutHImageRight_1atux_80{flex-direction:row;gap:var(--gap, 5rem)}._layoutHImageRight_1atux_80 ._heading_1atux_84{gap:var(--spacing-md);flex:.65}._layoutHImageRight_1atux_80 ._media_1atux_89{flex:.5}@media (max-width: 768px){._layoutHImageRight_1atux_80{flex-direction:column-reverse;gap:var(--spacing-lg)}}._noImage_1atux_99{flex-direction:column}._layoutHImageLeft_1atux_103{flex-direction:row-reverse;gap:var(--gap, 5rem)}._layoutHImageLeft_1atux_103 ._heading_1atux_84{gap:var(--spacing-md);flex:.65}._layoutHImageLeft_1atux_103 ._media_1atux_89{flex:.5}@media (max-width: 768px){._layoutHImageLeft_1atux_103{flex-direction:column-reverse;gap:var(--spacing-lg)}}._layoutVImageTop_1atux_122{flex-direction:column-reverse;gap:var(--gap, var(--spacing-lg))}._layoutVImageTop_1atux_122 ._heading_1atux_84{gap:var(--spacing-md)}@media (max-width: 768px){._layoutVImageTop_1atux_122{gap:var(--spacing-lg)}}._layoutVImageBottom_1atux_135{flex-direction:column;gap:var(--gap, var(--spacing-lg))}._layoutVImageBottom_1atux_135 ._heading_1atux_84{gap:var(--spacing-md)}@media (max-width: 768px){._layoutVImageBottom_1atux_135{gap:var(--spacing-lg)}}._heading_1atux_84{display:flex;flex-direction:column;width:100%;gap:var(--spacing-md)}._heading_1atux_84:not(:has(._text_1atux_154 .portableTextContainer)){gap:var(--spacing-lg)}._title_1atux_159{text-wrap:pretty}._text_1atux_154{flex:1;display:flex;justify-content:center;flex-direction:column;gap:var(--spacing-lg)}@media (max-width: 767px){._text_1atux_154{flex:1;width:100%;align-items:flex-start}}._cta_1atux_178{width:100%}@media (max-width: 767px){._cta_1atux_178{justify-content:flex-start}}._headingHorizontal_1atux_186{flex-direction:row;justify-content:space-between;gap:5rem}@media (max-width: 767px){._headingHorizontal_1atux_186{gap:var(--spacing-md)}}._headingHorizontal_1atux_186 ._titleWrapper_1atux_195,._headingHorizontal_1atux_186 .portableTextContainer{flex:1}._headingHorizontal_1atux_186 ._title_1atux_159{margin-bottom:0}._headingHorizontal_1atux_186 p._title_1atux_159{margin-top:1rem}@media (max-width: 768px){._headingHorizontal_1atux_186{flex-direction:column}}._headingVertical_1atux_216{flex-direction:column;justify-content:flex-start}._media_1atux_89{display:flex;align-items:center;justify-content:center;flex:1;width:100%;margin:0 auto;line-height:0}._media_1atux_89 img{width:100%;height:auto}._videoWrapper_1atux_237{position:relative;width:100%;padding-bottom:56.25%;height:0;overflow:hidden;border-radius:var(--radius-md);flex:1}._videoWrapper_1atux_237 iframe,._videoWrapper_1atux_237 video{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover}._default_1atux_257{display:block}._default_1atux_257 img{border-radius:var(--radius-md)}._maxWidth_1atux_265{margin:0 auto}._maxWidth_1atux_265 img{max-width:var(--max-width, var(--layout-width));border-radius:var(--radius-md);height:auto}._fullBleed_1atux_275{width:100%;max-width:unset;border-radius:var(--radius-md);overflow:hidden}.blog ._container_1atux_7{max-width:var(--blog-width)}.centered ._heading_1atux_84{gap:var(--spacing-md);align-items:center;justify-content:center}.centered ._text_1atux_154{align-items:center}.centered ._cta_1atux_178{justify-content:center}.backgroundPrimary ._text_1atux_154 p,.backgroundPrimary ._text_1atux_154 p a,.backgroundPrimary ._metricValue_1atux_54{color:#fff}.backgroundPrimary ._metricValue_1atux_54:after{background-color:var(--color-secondary-100)}.backgroundPrimary ._cta_1atux_178 ._secondary_1atux_316{background-color:#fff}.split-35-65 ._heading_1atux_84{flex:.35}._layoutSplitText_1atux_329{flex-direction:row;align-items:flex-start;gap:var(--gap, 5rem)}@media (max-width: 768px){._layoutSplitText_1atux_329{flex-direction:column;gap:var(--spacing-lg)}}._layoutSplitText_1atux_329 ._heading_1atux_84{flex:.5}._additionalContent_1atux_344{flex:.5;display:flex;flex-direction:column;gap:var(--spacing-md)}@media (max-width: 768px){._additionalContent_1atux_344{flex:1;width:100%}}.imageRadius-sm ._media_1atux_89 img{border-radius:var(--radius-sm)}.imageRadius-md ._media_1atux_89 img{border-radius:var(--radius-md)}.imageRadius-lg ._media_1atux_89 img{border-radius:var(--radius-lg)}.imageRadius-full ._media_1atux_89 img{border-radius:var(--radius-full)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index7.css');const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index7.css');const a=require("react/jsx-runtime"),k=require("../../hooks/useStyleClasses.cjs"),H=require("../../../core/context/ThemeContext.cjs"),W=require("../../hooks/useMediaQuery.cjs"),p=require("../../utils/mediaUtils.cjs"),z="_content_1atux_1",$="_container_1atux_7",L="_eyebrow_1atux_34",B="_metrics_1atux_38",C="_metric_1atux_38",q="_metricValue_1atux_54",M="_disclaimer_1atux_75",U="_layoutHImageRight_1atux_80",D="_heading_1atux_84",E="_media_1atux_89",Q="_noImage_1atux_99",Y="_layoutHImageLeft_1atux_103",F="_layoutVImageTop_1atux_122",G="_layoutVImageBottom_1atux_135",P="_text_1atux_154",J="_title_1atux_159",K="_cta_1atux_178",X="_headingHorizontal_1atux_186",Z="_titleWrapper_1atux_195",O="_headingVertical_1atux_216",A="_videoWrapper_1atux_237",T="_layoutSplitText_1atux_329",R="_additionalContent_1atux_344",t={content:z,container:$,eyebrow:L,metrics:B,metric:C,metricValue:q,disclaimer:M,layoutHImageRight:U,heading:D,media:E,noImage:Q,layoutHImageLeft:Y,layoutVImageTop:F,layoutVImageBottom:G,text:P,title:J,cta:K,headingHorizontal:X,titleWrapper:Z,headingVertical:O,videoWrapper:A,layoutSplitText:T,additionalContent:R},tt={"no-image":t.noImage,"split-text":t.layoutSplitText,"horizontal-image-right":t.layoutHImageRight,"horizontal-image-left":t.layoutHImageLeft,"vertical-image-top":t.layoutVImageTop,"vertical-image-bottom":t.layoutVImageBottom},st={horizontal:t.headingHorizontal,vertical:t.headingVertical};function at(s,i,l){const e=s.includes("vimeo.com"),c=s.includes("youtube.com")||s.includes("youtu.be");return e||c?a.jsx("div",{style:{maxWidth:l??"unset",flex:.65},children:a.jsx("div",{className:t.videoWrapper,children:a.jsx("iframe",{src:e?`${s}?autoplay=0&muted=0&loop=0`:`${s}?autoplay=0&mute=0&loop=0`,allow:"autoplay; fullscreen",allowFullScreen:!0})})}):a.jsx("div",{style:{maxWidth:l??"unset",width:"100%",flex:.65},children:a.jsx("div",{className:t.videoWrapper,children:a.jsx("video",{src:s,controls:!0,poster:i})})})}function et({metrics:s,renderRichText:i}){return a.jsx("div",{className:t.metrics,children:s.map(l=>a.jsxs("div",{className:t.metric,children:[a.jsx("div",{className:t.metricValue,children:l.metricValue}),l.metricDescription&&(i==null?void 0:i({blocks:l.metricDescription}))]},l._key))})}function ot({layout:s,heading:i,additionalContent:l,image:e,video:c,metrics:m,callToAction:n,disclaimer:x,styleOptions:u,id:V,renderImage:d,renderRichText:o,renderCallToAction:r}){var N;const{mode:g}=H.useTheme(),b=k.useStyleClasses(u),j=W.useMediaQuery("(max-width: 768px)")??!1,_=p.resolveImageUrl(e,g),h=p.resolveAltText(e,g),y=p.resolveImageStyle(e,j),w=tt[(s==null?void 0:s.orientation)??"horizontal-image-right"],S=st[i.headingLayout??"horizontal"],f={"--container-max-width":(u==null?void 0:u.maxWidth)??"unset","--gap":s==null?void 0:s.gap,"--max-width":(e==null?void 0:e.sizing)==="inset"?e==null?void 0:e.maxWidth:"unset"},I=(s==null?void 0:s.orientation)==="split-text",v=!I&&(s==null?void 0:s.orientation)!=="no-image";return a.jsx("section",{id:V,className:`${b} ${t.content}`,children:a.jsxs("article",{className:`${t.container} ${w}`,style:f,children:[a.jsxs("div",{className:`${t.heading} ${S}`,children:[a.jsxs("div",{className:t.titleWrapper,children:[i.eyebrow&&(o==null?void 0:o({blocks:i.eyebrow,className:t.eyebrow})),i.title&&(o==null?void 0:o({blocks:i.title,className:t.title}))]}),i.description||(N=n==null?void 0:n.items)!=null&&N.length?a.jsxs("div",{className:t.text,children:[i.description&&(o==null?void 0:o({blocks:i.description})),m&&m.length>0&&a.jsx(et,{metrics:m,renderRichText:o}),n&&(r==null?void 0:r({items:n.items,alignment:n.alignment,className:t.cta})),x&&(o==null?void 0:o({blocks:x,className:t.disclaimer}))]}):null]}),I&&l&&a.jsx("div",{className:t.additionalContent,children:o==null?void 0:o({blocks:l})}),v&&c?at(c,_,e==null?void 0:e.maxWidth):v&&e&&_?a.jsx("div",{className:t.media,children:d?d({src:_,alt:h,width:600,height:400,priority:!0,style:y}):a.jsx("img",{src:_,alt:h,width:600,height:400,style:{width:"100%",height:"auto",...y}})}):null]})})}exports.ContentBlock=ot;
|
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as i, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import { useStyleClasses as W } from "../../hooks/useStyleClasses.mjs";
|
|
3
3
|
import { useTheme as k } from "../../../core/context/ThemeContext.mjs";
|
|
4
4
|
import { useMediaQuery as z } from "../../hooks/useMediaQuery.mjs";
|
|
5
5
|
import { resolveImageUrl as L, resolveAltText as $, resolveImageStyle as B } from "../../utils/mediaUtils.mjs";
|
|
6
|
-
import '../../../index7.css';const C = "
|
|
6
|
+
import '../../../index7.css';const C = "_content_1atux_1", M = "_container_1atux_7", D = "_eyebrow_1atux_34", U = "_metrics_1atux_38", j = "_metric_1atux_38", E = "_metricValue_1atux_54", Y = "_disclaimer_1atux_75", F = "_layoutHImageRight_1atux_80", G = "_heading_1atux_84", Q = "_media_1atux_89", q = "_noImage_1atux_99", J = "_layoutHImageLeft_1atux_103", K = "_layoutVImageTop_1atux_122", P = "_layoutVImageBottom_1atux_135", X = "_text_1atux_154", Z = "_title_1atux_159", O = "_cta_1atux_178", A = "_headingHorizontal_1atux_186", R = "_titleWrapper_1atux_195", T = "_headingVertical_1atux_216", tt = "_videoWrapper_1atux_237", at = "_layoutSplitText_1atux_329", ot = "_additionalContent_1atux_344", t = {
|
|
7
7
|
content: C,
|
|
8
8
|
container: M,
|
|
9
9
|
eyebrow: D,
|
|
10
10
|
metrics: U,
|
|
11
|
-
metric:
|
|
12
|
-
metricValue:
|
|
13
|
-
disclaimer:
|
|
14
|
-
layoutHImageRight:
|
|
15
|
-
heading:
|
|
16
|
-
media:
|
|
17
|
-
noImage:
|
|
18
|
-
layoutHImageLeft:
|
|
19
|
-
layoutVImageTop:
|
|
20
|
-
layoutVImageBottom:
|
|
21
|
-
text:
|
|
22
|
-
title:
|
|
23
|
-
cta:
|
|
11
|
+
metric: j,
|
|
12
|
+
metricValue: E,
|
|
13
|
+
disclaimer: Y,
|
|
14
|
+
layoutHImageRight: F,
|
|
15
|
+
heading: G,
|
|
16
|
+
media: Q,
|
|
17
|
+
noImage: q,
|
|
18
|
+
layoutHImageLeft: J,
|
|
19
|
+
layoutVImageTop: K,
|
|
20
|
+
layoutVImageBottom: P,
|
|
21
|
+
text: X,
|
|
22
|
+
title: Z,
|
|
23
|
+
cta: O,
|
|
24
24
|
headingHorizontal: A,
|
|
25
25
|
titleWrapper: R,
|
|
26
26
|
headingVertical: T,
|
|
27
27
|
videoWrapper: tt,
|
|
28
|
-
layoutSplitText:
|
|
28
|
+
layoutSplitText: at,
|
|
29
29
|
additionalContent: ot
|
|
30
|
-
},
|
|
30
|
+
}, st = {
|
|
31
31
|
"no-image": t.noImage,
|
|
32
32
|
"split-text": t.layoutSplitText,
|
|
33
33
|
"horizontal-image-right": t.layoutHImageRight,
|
|
34
34
|
"horizontal-image-left": t.layoutHImageLeft,
|
|
35
35
|
"vertical-image-top": t.layoutVImageTop,
|
|
36
36
|
"vertical-image-bottom": t.layoutVImageBottom
|
|
37
|
-
},
|
|
37
|
+
}, et = {
|
|
38
38
|
horizontal: t.headingHorizontal,
|
|
39
39
|
vertical: t.headingVertical
|
|
40
40
|
};
|
|
41
|
-
function
|
|
42
|
-
const o =
|
|
43
|
-
return o || m ? /* @__PURE__ */
|
|
41
|
+
function it(a, e, l) {
|
|
42
|
+
const o = a.includes("vimeo.com"), m = a.includes("youtube.com") || a.includes("youtu.be");
|
|
43
|
+
return o || m ? /* @__PURE__ */ i("div", { style: { maxWidth: l ?? "unset", flex: 0.65 }, children: /* @__PURE__ */ i("div", { className: t.videoWrapper, children: /* @__PURE__ */ i(
|
|
44
44
|
"iframe",
|
|
45
45
|
{
|
|
46
|
-
src: o ? `${
|
|
46
|
+
src: o ? `${a}?autoplay=0&muted=0&loop=0` : `${a}?autoplay=0&mute=0&loop=0`,
|
|
47
47
|
allow: "autoplay; fullscreen",
|
|
48
48
|
allowFullScreen: !0
|
|
49
49
|
}
|
|
50
|
-
) }) }) : /* @__PURE__ */
|
|
50
|
+
) }) }) : /* @__PURE__ */ i("div", { style: { maxWidth: l ?? "unset", width: "100%", flex: 0.65 }, children: /* @__PURE__ */ i("div", { className: t.videoWrapper, children: /* @__PURE__ */ i("video", { src: a, controls: !0, poster: e }) }) });
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
metrics:
|
|
54
|
-
renderRichText:
|
|
52
|
+
function lt({
|
|
53
|
+
metrics: a,
|
|
54
|
+
renderRichText: e
|
|
55
55
|
}) {
|
|
56
|
-
return /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
59
|
-
] },
|
|
56
|
+
return /* @__PURE__ */ i("div", { className: t.metrics, children: a.map((l) => /* @__PURE__ */ c("div", { className: t.metric, children: [
|
|
57
|
+
/* @__PURE__ */ i("div", { className: t.metricValue, children: l.metricValue }),
|
|
58
|
+
l.metricDescription && (e == null ? void 0 : e({ blocks: l.metricDescription }))
|
|
59
|
+
] }, l._key)) });
|
|
60
60
|
}
|
|
61
|
-
function
|
|
62
|
-
layout:
|
|
63
|
-
heading:
|
|
64
|
-
additionalContent:
|
|
61
|
+
function rt({
|
|
62
|
+
layout: a,
|
|
63
|
+
heading: e,
|
|
64
|
+
additionalContent: l,
|
|
65
65
|
image: o,
|
|
66
66
|
video: m,
|
|
67
|
-
metrics:
|
|
68
|
-
callToAction:
|
|
67
|
+
metrics: r,
|
|
68
|
+
callToAction: n,
|
|
69
69
|
disclaimer: g,
|
|
70
70
|
styleOptions: _,
|
|
71
71
|
id: V,
|
|
72
72
|
renderImage: d,
|
|
73
|
-
renderRichText:
|
|
74
|
-
renderCallToAction:
|
|
73
|
+
renderRichText: s,
|
|
74
|
+
renderCallToAction: p
|
|
75
75
|
}) {
|
|
76
76
|
var N;
|
|
77
|
-
const { mode:
|
|
77
|
+
const { mode: I } = k(), f = W(_), b = z("(max-width: 768px)") ?? !1, u = L(o, I), h = $(o, I), v = B(o, b), w = st[(a == null ? void 0 : a.orientation) ?? "horizontal-image-right"], H = et[e.headingLayout ?? "horizontal"], S = {
|
|
78
78
|
"--container-max-width": (_ == null ? void 0 : _.maxWidth) ?? "unset",
|
|
79
|
-
"--gap":
|
|
79
|
+
"--gap": a == null ? void 0 : a.gap,
|
|
80
80
|
"--max-width": (o == null ? void 0 : o.sizing) === "inset" ? o == null ? void 0 : o.maxWidth : "unset"
|
|
81
|
-
},
|
|
82
|
-
return /* @__PURE__ */
|
|
81
|
+
}, y = (a == null ? void 0 : a.orientation) === "split-text", x = !y && (a == null ? void 0 : a.orientation) !== "no-image";
|
|
82
|
+
return /* @__PURE__ */ i("section", { id: V, className: `${f} ${t.content}`, children: /* @__PURE__ */ c(
|
|
83
83
|
"article",
|
|
84
84
|
{
|
|
85
85
|
className: `${t.container} ${w}`,
|
|
86
86
|
style: S,
|
|
87
87
|
children: [
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
91
|
-
blocks:
|
|
88
|
+
/* @__PURE__ */ c("div", { className: `${t.heading} ${H}`, children: [
|
|
89
|
+
/* @__PURE__ */ c("div", { className: t.titleWrapper, children: [
|
|
90
|
+
e.eyebrow && (s == null ? void 0 : s({
|
|
91
|
+
blocks: e.eyebrow,
|
|
92
92
|
className: t.eyebrow
|
|
93
93
|
})),
|
|
94
|
-
|
|
95
|
-
blocks:
|
|
94
|
+
e.title && (s == null ? void 0 : s({
|
|
95
|
+
blocks: e.title,
|
|
96
96
|
className: t.title
|
|
97
97
|
}))
|
|
98
98
|
] }),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
e.description || (N = n == null ? void 0 : n.items) != null && N.length ? /* @__PURE__ */ c("div", { className: t.text, children: [
|
|
100
|
+
e.description && (s == null ? void 0 : s({ blocks: e.description })),
|
|
101
|
+
r && r.length > 0 && /* @__PURE__ */ i(
|
|
102
|
+
lt,
|
|
103
103
|
{
|
|
104
|
-
metrics:
|
|
105
|
-
renderRichText:
|
|
104
|
+
metrics: r,
|
|
105
|
+
renderRichText: s
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
|
-
|
|
109
|
-
items:
|
|
110
|
-
alignment:
|
|
108
|
+
n && (p == null ? void 0 : p({
|
|
109
|
+
items: n.items,
|
|
110
|
+
alignment: n.alignment,
|
|
111
111
|
className: t.cta
|
|
112
112
|
})),
|
|
113
|
-
g && (
|
|
113
|
+
g && (s == null ? void 0 : s({
|
|
114
114
|
blocks: g,
|
|
115
115
|
className: t.disclaimer
|
|
116
116
|
}))
|
|
117
117
|
] }) : null
|
|
118
118
|
] }),
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
src:
|
|
122
|
-
alt:
|
|
119
|
+
y && l && /* @__PURE__ */ i("div", { className: t.additionalContent, children: s == null ? void 0 : s({ blocks: l }) }),
|
|
120
|
+
x && m ? it(m, u, o == null ? void 0 : o.maxWidth) : x && o && u ? /* @__PURE__ */ i("div", { className: t.media, children: d ? d({
|
|
121
|
+
src: u,
|
|
122
|
+
alt: h,
|
|
123
123
|
width: 600,
|
|
124
124
|
height: 400,
|
|
125
125
|
priority: !0,
|
|
126
|
-
style:
|
|
127
|
-
}) : /* @__PURE__ */
|
|
126
|
+
style: v
|
|
127
|
+
}) : /* @__PURE__ */ i(
|
|
128
128
|
"img",
|
|
129
129
|
{
|
|
130
|
-
src:
|
|
131
|
-
alt:
|
|
130
|
+
src: u,
|
|
131
|
+
alt: h,
|
|
132
132
|
width: 600,
|
|
133
133
|
height: 400,
|
|
134
|
-
style: { width: "100%", height: "auto", ...
|
|
134
|
+
style: { width: "100%", height: "auto", ...v }
|
|
135
135
|
}
|
|
136
136
|
) }) : null
|
|
137
137
|
]
|
|
@@ -139,5 +139,5 @@ function pt({
|
|
|
139
139
|
) });
|
|
140
140
|
}
|
|
141
141
|
export {
|
|
142
|
-
|
|
142
|
+
rt as ContentBlock
|
|
143
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function d(t,e,o="medium"){var n;if(!(t!=null&&t.imageUrls))return;const{imageUrls:r}=t;return e==="dark"?((n=r.dark)==null?void 0:n[o])??r.default[o]:r.default[o]}function c(t,e){var o;if(t!=null&&t.imageUrls)return e==="dark"?((o=t.imageUrls.dark)==null?void 0:o.small)??t.imageUrls.default.small:t.imageUrls.default.small}function a(t,e,o="Image"){var n,u,l,i;if(!t)return o;const r=e==="dark"?"darkImage":"defaultImage";return((u=(n=t[r])==null?void 0:n.asset)==null?void 0:u.altText)??((i=(l=t[r])==null?void 0:l.asset)==null?void 0:i.description)??o}function f(t,e){if(!t)return{};if(t.layout==="cover")return{objectFit:"cover",...t.position&&{objectPosition:e?"top":t.position}};if(t.layout==="contain"){const o=t.sizing==="half"?e?"100%":"50%":t.sizing==="inset"?e?"100%":"75%":"100%",r=t.aspectRatio?t.aspectRatio.replace(":","/"):void 0;return{
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function d(t,e,o="medium"){var n;if(!(t!=null&&t.imageUrls))return;const{imageUrls:r}=t;return e==="dark"?((n=r.dark)==null?void 0:n[o])??r.default[o]:r.default[o]}function c(t,e){var o;if(t!=null&&t.imageUrls)return e==="dark"?((o=t.imageUrls.dark)==null?void 0:o.small)??t.imageUrls.default.small:t.imageUrls.default.small}function a(t,e,o="Image"){var n,u,l,i;if(!t)return o;const r=e==="dark"?"darkImage":"defaultImage";return((u=(n=t[r])==null?void 0:n.asset)==null?void 0:u.altText)??((i=(l=t[r])==null?void 0:l.asset)==null?void 0:i.description)??o}function f(t,e){if(!t)return{};if(t.layout==="cover")return{objectFit:"cover",...t.position&&{objectPosition:e?"top":t.position}};if(t.layout==="contain"){const o=t.sizing==="half"?e?"100%":"50%":t.sizing==="inset"?e?"100%":"75%":"100%",r=t.aspectRatio?t.aspectRatio.replace(":","/"):void 0;return{width:o,...t.sizing==="inset"&&{maxWidth:t.maxWidth??"unset"},...r&&{aspectRatio:r},objectFit:r?"cover":"contain"}}return{objectFit:"none"}}function s(t){const e=t.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);return(e==null?void 0:e[1])??""}function v(t){return t?t.includes("vimeo.com")?"vimeo":t.includes("youtube.com")||t.includes("youtu.be")?"youtube":"native":null}function b(t,e){if(e==="vimeo")return`${t}?autoplay=1&muted=1&loop=1&background=1`;const o=s(t);return`${t}?autoplay=1&mute=1&loop=1&playlist=${o}`}exports.buildEmbedSrc=b;exports.detectVideoProvider=v;exports.getYouTubeVideoId=s;exports.resolveAltText=a;exports.resolveImageStyle=f;exports.resolveImageUrl=d;exports.resolveSmallImageUrl=c;
|
|
@@ -27,10 +27,12 @@ function f(t, o) {
|
|
|
27
27
|
if (t.layout === "contain") {
|
|
28
28
|
const e = t.sizing === "half" ? o ? "100%" : "50%" : t.sizing === "inset" ? o ? "100%" : "75%" : "100%", n = t.aspectRatio ? t.aspectRatio.replace(":", "/") : void 0;
|
|
29
29
|
return {
|
|
30
|
-
objectFit: "contain",
|
|
31
30
|
width: e,
|
|
32
31
|
...t.sizing === "inset" && { maxWidth: t.maxWidth ?? "unset" },
|
|
33
|
-
...n && {
|
|
32
|
+
...n && {
|
|
33
|
+
aspectRatio: n
|
|
34
|
+
},
|
|
35
|
+
objectFit: n ? "cover" : "contain"
|
|
34
36
|
};
|
|
35
37
|
}
|
|
36
38
|
return { objectFit: "none" };
|
|
@@ -39,18 +41,18 @@ function s(t) {
|
|
|
39
41
|
const o = t.match(/(?:youtube\.com\/.*v=|youtu\.be\/)([^&?/]+)/);
|
|
40
42
|
return (o == null ? void 0 : o[1]) ?? "";
|
|
41
43
|
}
|
|
42
|
-
function
|
|
44
|
+
function v(t) {
|
|
43
45
|
return t ? t.includes("vimeo.com") ? "vimeo" : t.includes("youtube.com") || t.includes("youtu.be") ? "youtube" : "native" : null;
|
|
44
46
|
}
|
|
45
|
-
function
|
|
47
|
+
function p(t, o) {
|
|
46
48
|
if (o === "vimeo")
|
|
47
49
|
return `${t}?autoplay=1&muted=1&loop=1&background=1`;
|
|
48
50
|
const e = s(t);
|
|
49
51
|
return `${t}?autoplay=1&mute=1&loop=1&playlist=${e}`;
|
|
50
52
|
}
|
|
51
53
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
p as buildEmbedSrc,
|
|
55
|
+
v as detectVideoProvider,
|
|
54
56
|
s as getYouTubeVideoId,
|
|
55
57
|
a as resolveAltText,
|
|
56
58
|
f as resolveImageStyle,
|