@aparte/n8n-chat 0.0.0-stage → 0.2.0
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/LICENSE +21 -0
- package/README.md +333 -2
- package/dist/cards.d.ts +3 -0
- package/dist/cdn/chunks/chunk-7JR7KL6J.js +2 -0
- package/dist/cdn/chunks/chunk-7JR7KL6J.js.map +7 -0
- package/dist/cdn/chunks/chunk-CZ5742JA.js +2 -0
- package/dist/cdn/chunks/chunk-CZ5742JA.js.map +7 -0
- package/dist/cdn/chunks/chunk-IPWLCOPM.js +2 -0
- package/dist/cdn/chunks/chunk-IPWLCOPM.js.map +7 -0
- package/dist/cdn/chunks/chunk-IWAJFJNA.js +353 -0
- package/dist/cdn/chunks/chunk-IWAJFJNA.js.map +7 -0
- package/dist/cdn/chunks/chunk-OJFRNS5M.js +2 -0
- package/dist/cdn/chunks/chunk-OJFRNS5M.js.map +7 -0
- package/dist/cdn/chunks/chunk-VTTH7HGO.js +206 -0
- package/dist/cdn/chunks/chunk-VTTH7HGO.js.map +7 -0
- package/dist/cdn/chunks/chunk-XAWE4EAK.js +2 -0
- package/dist/cdn/chunks/chunk-XAWE4EAK.js.map +7 -0
- package/dist/cdn/chunks/de-JS3CQEVR.js +2 -0
- package/dist/cdn/chunks/de-JS3CQEVR.js.map +7 -0
- package/dist/cdn/chunks/es-OHKGLFEF.js +2 -0
- package/dist/cdn/chunks/es-OHKGLFEF.js.map +7 -0
- package/dist/cdn/chunks/fr-6S44XMU5.js +2 -0
- package/dist/cdn/chunks/fr-6S44XMU5.js.map +7 -0
- package/dist/cdn/chunks/highlight-FGIKUPIF.js +153 -0
- package/dist/cdn/chunks/highlight-FGIKUPIF.js.map +7 -0
- package/dist/cdn/chunks/it-K4WYXXDJ.js +2 -0
- package/dist/cdn/chunks/it-K4WYXXDJ.js.map +7 -0
- package/dist/cdn/chunks/items-S4LF2DJA.js +467 -0
- package/dist/cdn/chunks/items-S4LF2DJA.js.map +7 -0
- package/dist/cdn/chunks/ja-BN7TZW62.js +2 -0
- package/dist/cdn/chunks/ja-BN7TZW62.js.map +7 -0
- package/dist/cdn/chunks/ko-ARHO7UI3.js +2 -0
- package/dist/cdn/chunks/ko-ARHO7UI3.js.map +7 -0
- package/dist/cdn/chunks/link-C46K5O7X.js +493 -0
- package/dist/cdn/chunks/link-C46K5O7X.js.map +7 -0
- package/dist/cdn/chunks/media-QI5BPERX.js +797 -0
- package/dist/cdn/chunks/media-QI5BPERX.js.map +7 -0
- package/dist/cdn/chunks/order-YISYH73K.js +839 -0
- package/dist/cdn/chunks/order-YISYH73K.js.map +7 -0
- package/dist/cdn/chunks/place-UFCH3NQE.js +689 -0
- package/dist/cdn/chunks/place-UFCH3NQE.js.map +7 -0
- package/dist/cdn/chunks/plan-KQWF73QI.js +542 -0
- package/dist/cdn/chunks/plan-KQWF73QI.js.map +7 -0
- package/dist/cdn/chunks/product-7UBLOMZ7.js +660 -0
- package/dist/cdn/chunks/product-7UBLOMZ7.js.map +7 -0
- package/dist/cdn/chunks/pt-BR-R7ZRM3GG.js +2 -0
- package/dist/cdn/chunks/pt-BR-R7ZRM3GG.js.map +7 -0
- package/dist/cdn/chunks/ru-FJNIMGMU.js +2 -0
- package/dist/cdn/chunks/ru-FJNIMGMU.js.map +7 -0
- package/dist/cdn/chunks/score-O2KEAYDS.js +882 -0
- package/dist/cdn/chunks/score-O2KEAYDS.js.map +7 -0
- package/dist/cdn/chunks/stats-GSXFRGYZ.js +491 -0
- package/dist/cdn/chunks/stats-GSXFRGYZ.js.map +7 -0
- package/dist/cdn/chunks/stock-53NVFLC3.js +707 -0
- package/dist/cdn/chunks/stock-53NVFLC3.js.map +7 -0
- package/dist/cdn/chunks/weather-VI2RCU4X.js +615 -0
- package/dist/cdn/chunks/weather-VI2RCU4X.js.map +7 -0
- package/dist/cdn/chunks/zh-CN-DUCWBXJP.js +2 -0
- package/dist/cdn/chunks/zh-CN-DUCWBXJP.js.map +7 -0
- package/dist/cdn/n8n-chat.js +103 -0
- package/dist/cdn/n8n-chat.js.map +7 -0
- package/dist/create-chat.d.ts +198 -0
- package/dist/highlight-DDyMJYBk.js +29 -0
- package/dist/highlight-DDyMJYBk.js.map +1 -0
- package/dist/highlight.d.ts +2 -0
- package/dist/icons.d.ts +7 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +618 -0
- package/dist/index.js.map +1 -0
- package/dist/strings.d.ts +40 -0
- package/dist/style.css +378 -0
- package/dist/theme.css +376 -0
- package/package.json +82 -5
|
@@ -0,0 +1,797 @@
|
|
|
1
|
+
import{a as B}from"./chunk-OJFRNS5M.js";import{a as r,b as v,c as q,d as G,e as U,f as g,i as u,j as C,n as X,p as b,u as N}from"./chunk-IWAJFJNA.js";import"./chunk-VTTH7HGO.js";import"./chunk-XAWE4EAK.js";var w=e=>`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">${e}</svg>`,da=w('<rect x="3.5" y="4.5" width="17" height="15" rx="2.5"/><circle cx="9" cy="9.5" r="1.6"/><path d="m4 17.5 4.6-4.6a1.4 1.4 0 0 1 2 0l3.4 3.4 1.6-1.6a1.4 1.4 0 0 1 2 0l2.9 2.9"/>'),la=w('<rect x="3.5" y="5" width="17" height="14" rx="2.5"/><path d="M7.5 5v14M16.5 5v14M3.5 9.5h4M3.5 14.5h4M16.5 9.5h4M16.5 14.5h4"/>'),pa=w('<path d="M9.5 17.5V6l10-2v11.5"/><circle cx="7" cy="17.5" r="2.5"/><circle cx="17" cy="15.5" r="2.5"/>'),Z=w('<rect x="7" y="3.5" width="13.5" height="11.5" rx="2.2"/><path d="M17 18.5a2 2 0 0 1-2 2H5.5a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2"/><path d="m7.5 13 3-3 2.5 2.5 1.5-1.5 3.5 3.5"/>'),aa='<svg viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8.5 5.6v12.8a1 1 0 0 0 1.5.86l10.2-6.4a1 1 0 0 0 0-1.72L10 4.74a1 1 0 0 0-1.5.86z"/></svg>',ca=w('<path d="M14.5 4.5h5v5M9.5 19.5h-5v-5M19.5 4.5l-6 6M4.5 19.5l6-6"/>'),ea=w('<path d="M13.5 4.5h6v6M19.5 4.5l-8 8"/><path d="M17.5 13.5v4a2 2 0 0 1-2 2h-9a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h4"/>'),ma=w('<path d="M4.5 8h3l1.6-2.3h5.8L16.5 8h3a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1h-15a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1z"/><circle cx="12" cy="13" r="3.3"/>');function na(e){return e==="video"?la:e==="audio"?pa:da}var ua=`/* =========================================
|
|
2
|
+
The media card \u2014 @aparte/plugin-cards/media
|
|
3
|
+
=========================================
|
|
4
|
+
Three variants of one card, chosen by \`data-variant\` on its root:
|
|
5
|
+
single one medium, large: an image at its own shape within a height (a button that
|
|
6
|
+
opens the lightbox), a video in the browser's player, a sound under a header
|
|
7
|
+
with its cover and a waveform, a YouTube page as a poster that links out.
|
|
8
|
+
One medium is drawn this way whatever the variant.
|
|
9
|
+
gallery a mosaic: two to six tiles, the first larger from three, "+n" on the last
|
|
10
|
+
when there are more. Several media in \`single\` are drawn this way too.
|
|
11
|
+
strip square thumbnails that scroll sideways.
|
|
12
|
+
Every tile opens the lightbox: a native <dialog> wearing core's \`.aparte-dialog\`, its
|
|
13
|
+
picture on a dark stage.
|
|
14
|
+
Every colour is a core token or a \`--aparte-media-*\` one here. The stage is black in
|
|
15
|
+
either theme \u2014 what a photo is looked at on \u2014 and so is the scrim over a picture: they
|
|
16
|
+
sit on images, not on the page's ground.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
.aparte-media-card {
|
|
20
|
+
/* The tallest a picture is drawn on the card. */
|
|
21
|
+
--aparte-media-max-block: 22rem;
|
|
22
|
+
/* The seams of the mosaic. */
|
|
23
|
+
--aparte-media-gap: 2px;
|
|
24
|
+
/* The tint of a placeholder, a cover without a picture, the waveform. */
|
|
25
|
+
--aparte-media-tint: var(--aparte-primary);
|
|
26
|
+
--aparte-media-stage: #0b0b0d;
|
|
27
|
+
--aparte-media-on-stage: #ffffff;
|
|
28
|
+
--aparte-media-scrim: rgb(0 0 0 / 0.55);
|
|
29
|
+
--aparte-media-lightbox-block: min(72dvh, 44rem);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.aparte-media-card:has(> .aparte-media--single) { --aparte-rich-card-max-inline-size: 24rem; }
|
|
33
|
+
.aparte-media-card:has(> .aparte-media--strip) { --aparte-rich-card-max-inline-size: 30rem; }
|
|
34
|
+
|
|
35
|
+
.aparte-media {
|
|
36
|
+
min-inline-size: 0;
|
|
37
|
+
margin: 0;
|
|
38
|
+
color: var(--aparte-text);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* \u2500\u2500 What stands behind a picture \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
42
|
+
|
|
43
|
+
.aparte-media__placeholder {
|
|
44
|
+
position: absolute;
|
|
45
|
+
inset: 0;
|
|
46
|
+
z-index: 0;
|
|
47
|
+
display: grid;
|
|
48
|
+
place-items: center;
|
|
49
|
+
background:
|
|
50
|
+
radial-gradient(circle at 30% 20%, color-mix(in oklab, var(--aparte-media-tint) 14%, transparent), transparent 60%),
|
|
51
|
+
color-mix(in oklab, var(--aparte-media-tint) 8%, var(--aparte-surface-2));
|
|
52
|
+
color: color-mix(in oklab, var(--aparte-media-tint) 55%, var(--aparte-text-muted));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.aparte-media__placeholder-glyph { --aparte-rich-card-glyph-size: 1.75rem; opacity: 0.85; }
|
|
56
|
+
|
|
57
|
+
.aparte-media__img {
|
|
58
|
+
position: relative;
|
|
59
|
+
z-index: 1;
|
|
60
|
+
display: block;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* \u2500\u2500 One image, at its own shape \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
64
|
+
|
|
65
|
+
.aparte-media--single {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex-direction: column;
|
|
68
|
+
padding: var(--aparte-space-4) var(--aparte-space-4) var(--aparte-space-5);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.aparte-media__frame {
|
|
72
|
+
position: relative;
|
|
73
|
+
display: block;
|
|
74
|
+
inline-size: 100%;
|
|
75
|
+
margin: 0;
|
|
76
|
+
padding: 0;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
isolation: isolate;
|
|
79
|
+
border: 0;
|
|
80
|
+
border-radius: var(--aparte-radius-lg);
|
|
81
|
+
background: var(--aparte-surface-2);
|
|
82
|
+
color: inherit;
|
|
83
|
+
font: inherit;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Nothing known of its shape: the picture sets the frame's size, within the card and the height. */
|
|
87
|
+
.aparte-media__frame[data-kind="image"] {
|
|
88
|
+
align-self: center;
|
|
89
|
+
inline-size: fit-content;
|
|
90
|
+
max-inline-size: 100%;
|
|
91
|
+
cursor: zoom-in;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.aparte-media__frame[data-kind="image"] > .aparte-media__img {
|
|
95
|
+
inline-size: auto;
|
|
96
|
+
block-size: auto;
|
|
97
|
+
max-inline-size: 100%;
|
|
98
|
+
max-block-size: var(--aparte-media-max-block);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Its shape known: the frame is drawn at it from the start \u2014 as wide as the card allows,
|
|
102
|
+
narrower when the height would pass the limit \u2014 and the picture fills it. */
|
|
103
|
+
.aparte-media__frame[data-kind="image"][data-sized] {
|
|
104
|
+
inline-size: min(100%, calc(var(--aparte-media-max-block) * var(--aparte-media-ratio-n)));
|
|
105
|
+
aspect-ratio: var(--aparte-media-ratio);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.aparte-media__frame[data-kind="image"][data-sized] > .aparte-media__img {
|
|
109
|
+
inline-size: 100%;
|
|
110
|
+
block-size: 100%;
|
|
111
|
+
max-block-size: none;
|
|
112
|
+
object-fit: cover;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Loading with no shape known, or failed: a box of a reasonable size around the placeholder. */
|
|
116
|
+
.aparte-media__frame[data-kind="image"]:not([data-sized]):is([data-loading], [data-broken]) {
|
|
117
|
+
inline-size: 100%;
|
|
118
|
+
min-block-size: 10rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.aparte-media__frame[data-kind="image"] > .aparte-media__img {
|
|
122
|
+
transition: transform var(--aparte-duration-slower, 0.3s) ease, filter var(--aparte-duration-slower, 0.3s) ease;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.aparte-media__frame[data-kind="image"]:hover > .aparte-media__img { transform: scale(1.025); }
|
|
126
|
+
|
|
127
|
+
.aparte-media__frame:focus-visible {
|
|
128
|
+
outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
|
|
129
|
+
outline-offset: var(--aparte-focus-outline-offset);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* "See it larger": a frosted disc in the corner, shown on hover and focus. */
|
|
133
|
+
.aparte-media__zoom {
|
|
134
|
+
--aparte-rich-card-glyph-size: 2rem;
|
|
135
|
+
position: absolute;
|
|
136
|
+
inset-block-start: var(--aparte-space-4);
|
|
137
|
+
inset-inline-end: var(--aparte-space-4);
|
|
138
|
+
z-index: 2;
|
|
139
|
+
padding: 0.4rem;
|
|
140
|
+
border-radius: var(--aparte-radius-full);
|
|
141
|
+
background: var(--aparte-media-scrim);
|
|
142
|
+
color: var(--aparte-media-on-stage);
|
|
143
|
+
backdrop-filter: blur(6px);
|
|
144
|
+
opacity: 0;
|
|
145
|
+
transition: opacity var(--aparte-duration-base, 0.15s) ease;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.aparte-media__frame:hover > .aparte-media__zoom,
|
|
149
|
+
.aparte-media__frame:focus-visible > .aparte-media__zoom { opacity: 1; }
|
|
150
|
+
|
|
151
|
+
.aparte-media__frame[data-broken] > .aparte-media__zoom { display: none; }
|
|
152
|
+
|
|
153
|
+
/* \u2500\u2500 A video \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
154
|
+
|
|
155
|
+
.aparte-media__frame--video,
|
|
156
|
+
.aparte-media__external,
|
|
157
|
+
.aparte-media__lb-video {
|
|
158
|
+
aspect-ratio: var(--aparte-media-ratio, 16 / 9);
|
|
159
|
+
max-block-size: var(--aparte-media-max-block);
|
|
160
|
+
background: var(--aparte-media-stage);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.aparte-media__video {
|
|
164
|
+
display: block;
|
|
165
|
+
inline-size: 100%;
|
|
166
|
+
block-size: 100%;
|
|
167
|
+
object-fit: contain;
|
|
168
|
+
background: var(--aparte-media-stage);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* A page that plays it elsewhere: its poster, a disc with the triangle, the site, the length. */
|
|
172
|
+
.aparte-media__external {
|
|
173
|
+
color: var(--aparte-media-on-stage);
|
|
174
|
+
text-decoration: none;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.aparte-media__external > .aparte-media__img {
|
|
178
|
+
position: absolute;
|
|
179
|
+
inset: 0;
|
|
180
|
+
inline-size: 100%;
|
|
181
|
+
block-size: 100%;
|
|
182
|
+
object-fit: cover;
|
|
183
|
+
transition: transform var(--aparte-duration-slower, 0.3s) ease;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.aparte-media__external:hover > .aparte-media__img { transform: scale(1.03); }
|
|
187
|
+
|
|
188
|
+
.aparte-media__external:focus-visible {
|
|
189
|
+
outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
|
|
190
|
+
outline-offset: var(--aparte-focus-outline-offset);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.aparte-media__play {
|
|
194
|
+
position: absolute;
|
|
195
|
+
inset-block-start: 50%;
|
|
196
|
+
inset-inline-start: 50%;
|
|
197
|
+
z-index: 2;
|
|
198
|
+
display: grid;
|
|
199
|
+
place-items: center;
|
|
200
|
+
inline-size: 3.5rem;
|
|
201
|
+
block-size: 3.5rem;
|
|
202
|
+
border-radius: var(--aparte-radius-full);
|
|
203
|
+
background: var(--aparte-media-scrim);
|
|
204
|
+
color: var(--aparte-media-on-stage);
|
|
205
|
+
box-shadow: 0 0 0 1px rgb(255 255 255 / 0.25) inset, 0 6px 20px -6px rgb(0 0 0 / 0.6);
|
|
206
|
+
backdrop-filter: blur(6px);
|
|
207
|
+
translate: -50% -50%;
|
|
208
|
+
transition: background-color var(--aparte-duration-base, 0.15s) ease, scale var(--aparte-duration-base, 0.15s) ease;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* \`translate\` is physical: in a right-to-left page the start edge is the right one. */
|
|
212
|
+
.aparte-media__play:dir(rtl) { translate: 50% -50%; }
|
|
213
|
+
|
|
214
|
+
.aparte-media__play-glyph { --aparte-rich-card-glyph-size: 1.5rem; margin-inline-start: 0.15rem; }
|
|
215
|
+
.aparte-media__play:dir(rtl) .aparte-media__play-glyph { margin-inline: 0 0.15rem; transform: scaleX(-1); }
|
|
216
|
+
|
|
217
|
+
.aparte-media__play--sm { inline-size: 2.5rem; block-size: 2.5rem; }
|
|
218
|
+
.aparte-media__play--sm .aparte-media__play-glyph { --aparte-rich-card-glyph-size: 1.1rem; }
|
|
219
|
+
|
|
220
|
+
.aparte-media__external:hover .aparte-media__play,
|
|
221
|
+
.aparte-media__tile:hover .aparte-media__play {
|
|
222
|
+
background: var(--aparte-primary);
|
|
223
|
+
scale: 1.08;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.aparte-media__site,
|
|
227
|
+
.aparte-media__duration {
|
|
228
|
+
position: absolute;
|
|
229
|
+
inset-block-end: var(--aparte-space-4);
|
|
230
|
+
z-index: 2;
|
|
231
|
+
display: inline-flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
gap: var(--aparte-space-2);
|
|
234
|
+
padding: var(--aparte-space-1) var(--aparte-space-3);
|
|
235
|
+
border-radius: var(--aparte-radius-sm);
|
|
236
|
+
background: var(--aparte-media-scrim);
|
|
237
|
+
color: var(--aparte-media-on-stage);
|
|
238
|
+
font-size: var(--aparte-font-size-xs);
|
|
239
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
240
|
+
line-height: 1.3;
|
|
241
|
+
white-space: nowrap;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.aparte-media__site { inset-inline-start: var(--aparte-space-4); }
|
|
245
|
+
.aparte-media__duration { inset-inline-end: var(--aparte-space-4); }
|
|
246
|
+
.aparte-media__site-glyph { --aparte-rich-card-glyph-size: 0.8rem; }
|
|
247
|
+
|
|
248
|
+
/* \u2500\u2500 A sound \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
249
|
+
|
|
250
|
+
.aparte-media__audio {
|
|
251
|
+
display: grid;
|
|
252
|
+
gap: var(--aparte-space-4);
|
|
253
|
+
padding: var(--aparte-space-3) var(--aparte-space-2) 0;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.aparte-media__audio-head {
|
|
257
|
+
display: flex;
|
|
258
|
+
align-items: center;
|
|
259
|
+
gap: var(--aparte-space-5);
|
|
260
|
+
min-inline-size: 0;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.aparte-media__cover {
|
|
264
|
+
position: relative;
|
|
265
|
+
flex: none;
|
|
266
|
+
inline-size: 3.5rem;
|
|
267
|
+
block-size: 3.5rem;
|
|
268
|
+
overflow: hidden;
|
|
269
|
+
border-radius: var(--aparte-radius-lg);
|
|
270
|
+
box-shadow: 0 4px 14px -8px color-mix(in oklab, var(--aparte-media-tint) 70%, black);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.aparte-media__cover > .aparte-media__img {
|
|
274
|
+
position: absolute;
|
|
275
|
+
inset: 0;
|
|
276
|
+
inline-size: 100%;
|
|
277
|
+
block-size: 100%;
|
|
278
|
+
object-fit: cover;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.aparte-media__cover > .aparte-media__placeholder {
|
|
282
|
+
background: linear-gradient(135deg, color-mix(in oklab, var(--aparte-media-tint) 30%, var(--aparte-surface-1)), color-mix(in oklab, var(--aparte-media-tint) 10%, var(--aparte-surface-2)));
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.aparte-media__audio-text {
|
|
286
|
+
display: flex;
|
|
287
|
+
flex: 1;
|
|
288
|
+
flex-direction: column;
|
|
289
|
+
gap: var(--aparte-space-1);
|
|
290
|
+
min-inline-size: 0;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.aparte-media__audio-title,
|
|
294
|
+
.aparte-media__audio-credit {
|
|
295
|
+
overflow: hidden;
|
|
296
|
+
text-overflow: ellipsis;
|
|
297
|
+
white-space: nowrap;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.aparte-media__audio-title {
|
|
301
|
+
font-size: var(--aparte-font-size-base);
|
|
302
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.aparte-media__audio-credit,
|
|
306
|
+
.aparte-media__audio-length {
|
|
307
|
+
color: var(--aparte-text-muted);
|
|
308
|
+
font-size: var(--aparte-font-size-sm);
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.aparte-media__audio-length { flex: none; }
|
|
312
|
+
|
|
313
|
+
/* A waveform that is only decoration: bars cut by a mask, their tops following a fixed
|
|
314
|
+
envelope cut by a polygon. It shows no real level, so it says nothing to a reader. */
|
|
315
|
+
.aparte-media__wave {
|
|
316
|
+
display: block;
|
|
317
|
+
block-size: 2.25rem;
|
|
318
|
+
background: linear-gradient(90deg,
|
|
319
|
+
var(--aparte-media-tint) 0%,
|
|
320
|
+
color-mix(in oklab, var(--aparte-media-tint) 70%, transparent) 50%,
|
|
321
|
+
color-mix(in oklab, var(--aparte-media-tint) 28%, transparent) 50%,
|
|
322
|
+
color-mix(in oklab, var(--aparte-media-tint) 28%, transparent) 100%);
|
|
323
|
+
background-size: 200% 100%;
|
|
324
|
+
background-position: 100% 0;
|
|
325
|
+
-webkit-mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 6px);
|
|
326
|
+
mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 6px);
|
|
327
|
+
clip-path: polygon(
|
|
328
|
+
0% 35%, 5% 22.5%, 10% 30%, 15% 10%, 20% 20%, 25% 2.5%, 30% 15%, 35% 27.5%, 40% 7.5%, 45% 25%, 50% 12.5%,
|
|
329
|
+
55% 32.5%, 60% 5%, 65% 20%, 70% 30%, 75% 15%, 80% 25%, 85% 10%, 90% 27.5%, 95% 35%, 100% 37.5%,
|
|
330
|
+
100% 62.5%, 95% 65%, 90% 72.5%, 85% 90%, 80% 75%, 75% 85%, 70% 70%, 65% 80%, 60% 95%, 55% 67.5%,
|
|
331
|
+
50% 87.5%, 45% 75%, 40% 92.5%, 35% 72.5%, 30% 85%, 25% 97.5%, 20% 80%, 15% 90%, 10% 70%, 5% 77.5%, 0% 65%);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
/* While it plays, the colour sweeps across the bars. */
|
|
335
|
+
.aparte-media__audio[data-playing] .aparte-media__wave {
|
|
336
|
+
animation: aparte-media-wave 2.4s linear infinite;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
@keyframes aparte-media-wave {
|
|
340
|
+
from { background-position: 100% 0; }
|
|
341
|
+
to { background-position: 0% 0; }
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.aparte-media__player {
|
|
345
|
+
display: block;
|
|
346
|
+
inline-size: 100%;
|
|
347
|
+
block-size: 2.5rem;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/* \u2500\u2500 Under a medium \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
351
|
+
|
|
352
|
+
.aparte-media__figcaption {
|
|
353
|
+
display: flex;
|
|
354
|
+
flex-direction: column;
|
|
355
|
+
gap: var(--aparte-space-1);
|
|
356
|
+
min-inline-size: 0;
|
|
357
|
+
padding: var(--aparte-space-4) var(--aparte-space-2) 0;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.aparte-media__title {
|
|
361
|
+
font-size: var(--aparte-font-size-base);
|
|
362
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
363
|
+
letter-spacing: -0.005em;
|
|
364
|
+
line-height: 1.3;
|
|
365
|
+
overflow-wrap: anywhere;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.aparte-media__caption {
|
|
369
|
+
display: -webkit-box;
|
|
370
|
+
margin: 0;
|
|
371
|
+
overflow: hidden;
|
|
372
|
+
color: var(--aparte-text-muted);
|
|
373
|
+
font-size: var(--aparte-font-size-md);
|
|
374
|
+
line-height: 1.45;
|
|
375
|
+
overflow-wrap: anywhere;
|
|
376
|
+
-webkit-box-orient: vertical;
|
|
377
|
+
-webkit-line-clamp: 4;
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.aparte-media__meta {
|
|
381
|
+
display: flex;
|
|
382
|
+
flex-wrap: wrap;
|
|
383
|
+
align-items: center;
|
|
384
|
+
gap: var(--aparte-space-2) var(--aparte-space-5);
|
|
385
|
+
margin-block-start: var(--aparte-space-2);
|
|
386
|
+
color: var(--aparte-text-muted);
|
|
387
|
+
font-size: var(--aparte-font-size-sm);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.aparte-media__credit {
|
|
391
|
+
display: inline-flex;
|
|
392
|
+
align-items: center;
|
|
393
|
+
gap: var(--aparte-space-2);
|
|
394
|
+
min-inline-size: 0;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.aparte-media__source {
|
|
398
|
+
display: inline-flex;
|
|
399
|
+
align-items: center;
|
|
400
|
+
gap: var(--aparte-space-1);
|
|
401
|
+
border-radius: var(--aparte-radius-xs);
|
|
402
|
+
color: var(--aparte-primary-ink, var(--aparte-text));
|
|
403
|
+
font-weight: var(--aparte-font-weight-medium);
|
|
404
|
+
text-decoration: none;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.aparte-media__source:hover {
|
|
408
|
+
text-decoration: underline;
|
|
409
|
+
text-decoration-thickness: 1px;
|
|
410
|
+
text-underline-offset: 0.18em;
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
.aparte-media__source:focus-visible {
|
|
414
|
+
outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
|
|
415
|
+
outline-offset: var(--aparte-focus-outline-offset);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
.aparte-media__line-glyph { --aparte-rich-card-glyph-size: 0.95rem; }
|
|
419
|
+
.aparte-media__source .aparte-media__line-glyph { --aparte-rich-card-glyph-size: 0.8rem; }
|
|
420
|
+
|
|
421
|
+
/* \u2500\u2500 Tiles: the mosaic's and the strip's \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
422
|
+
|
|
423
|
+
.aparte-media__tile {
|
|
424
|
+
position: relative;
|
|
425
|
+
display: block;
|
|
426
|
+
inline-size: 100%;
|
|
427
|
+
block-size: 100%;
|
|
428
|
+
margin: 0;
|
|
429
|
+
padding: 0;
|
|
430
|
+
overflow: hidden;
|
|
431
|
+
border: 0;
|
|
432
|
+
background: var(--aparte-surface-2);
|
|
433
|
+
color: inherit;
|
|
434
|
+
font: inherit;
|
|
435
|
+
cursor: zoom-in;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
.aparte-media__tile > .aparte-media__img {
|
|
439
|
+
position: absolute;
|
|
440
|
+
inset: 0;
|
|
441
|
+
inline-size: 100%;
|
|
442
|
+
block-size: 100%;
|
|
443
|
+
object-fit: cover;
|
|
444
|
+
transition: transform var(--aparte-duration-slower, 0.3s) ease, filter var(--aparte-duration-slower, 0.3s) ease;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.aparte-media__tile:hover > .aparte-media__img {
|
|
448
|
+
transform: scale(1.05);
|
|
449
|
+
filter: brightness(1.05);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/* The focus ring is drawn inside the tile, over the picture: tiles touch each other and the
|
|
453
|
+
card's edge, so a ring outside would be cut. Two rings, so it reads on any picture. */
|
|
454
|
+
.aparte-media__tile::after {
|
|
455
|
+
content: "";
|
|
456
|
+
position: absolute;
|
|
457
|
+
inset: 0;
|
|
458
|
+
z-index: 4;
|
|
459
|
+
border-radius: inherit;
|
|
460
|
+
pointer-events: none;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.aparte-media__tile:focus-visible { outline: none; }
|
|
464
|
+
|
|
465
|
+
.aparte-media__tile:focus-visible::after {
|
|
466
|
+
box-shadow:
|
|
467
|
+
inset 0 0 0 var(--aparte-focus-outline-width) var(--aparte-border-focus),
|
|
468
|
+
inset 0 0 0 calc(var(--aparte-focus-outline-width) * 2) var(--aparte-surface-1);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.aparte-media__tile[data-kind="audio"] { cursor: pointer; }
|
|
472
|
+
|
|
473
|
+
.aparte-media__tile-title {
|
|
474
|
+
position: absolute;
|
|
475
|
+
inset-inline: var(--aparte-space-3);
|
|
476
|
+
inset-block-end: var(--aparte-space-3);
|
|
477
|
+
z-index: 2;
|
|
478
|
+
overflow: hidden;
|
|
479
|
+
color: var(--aparte-text);
|
|
480
|
+
font-size: var(--aparte-font-size-xs);
|
|
481
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
482
|
+
text-overflow: ellipsis;
|
|
483
|
+
white-space: nowrap;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
.aparte-media__tile .aparte-media__duration {
|
|
487
|
+
inset-block-end: var(--aparte-space-3);
|
|
488
|
+
inset-inline-end: var(--aparte-space-3);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/* "+3": how many more the lightbox holds, over the last tile. */
|
|
492
|
+
.aparte-media__more {
|
|
493
|
+
position: absolute;
|
|
494
|
+
inset: 0;
|
|
495
|
+
z-index: 3;
|
|
496
|
+
display: grid;
|
|
497
|
+
place-items: center;
|
|
498
|
+
background: var(--aparte-media-scrim);
|
|
499
|
+
color: var(--aparte-media-on-stage);
|
|
500
|
+
font-size: var(--aparte-font-size-2xl);
|
|
501
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
502
|
+
letter-spacing: -0.01em;
|
|
503
|
+
backdrop-filter: blur(1.5px);
|
|
504
|
+
transition: background-color var(--aparte-duration-base, 0.15s) ease;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.aparte-media__tile:hover > .aparte-media__more { background: rgb(0 0 0 / 0.42); }
|
|
508
|
+
|
|
509
|
+
/* \u2500\u2500 Gallery: the mosaic \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
510
|
+
|
|
511
|
+
.aparte-media--gallery {
|
|
512
|
+
display: flex;
|
|
513
|
+
flex-direction: column;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/* A six-column grid laid out per count, so every count fills its box with no hole:
|
|
517
|
+
2 two squares
|
|
518
|
+
3 a large square, two small ones stacked beside it
|
|
519
|
+
4 a wide one over three
|
|
520
|
+
5 two over three
|
|
521
|
+
6 a large square, two beside it, three under it */
|
|
522
|
+
.aparte-media__grid {
|
|
523
|
+
display: grid;
|
|
524
|
+
grid-template-columns: repeat(6, minmax(0, 1fr));
|
|
525
|
+
gap: var(--aparte-media-gap);
|
|
526
|
+
margin: 0;
|
|
527
|
+
padding: 0;
|
|
528
|
+
list-style: none;
|
|
529
|
+
aspect-ratio: 3 / 2;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.aparte-media__grid > * {
|
|
533
|
+
display: flex;
|
|
534
|
+
grid-column: span 2;
|
|
535
|
+
min-inline-size: 0;
|
|
536
|
+
min-block-size: 0;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.aparte-media__grid > * > .aparte-media__tile { flex: 1; }
|
|
540
|
+
|
|
541
|
+
.aparte-media__grid[data-count="2"] { grid-template-rows: minmax(0, 1fr); aspect-ratio: 2 / 1; }
|
|
542
|
+
.aparte-media__grid[data-count="2"] > * { grid-column: span 3; }
|
|
543
|
+
|
|
544
|
+
.aparte-media__grid[data-count="3"] { grid-template-rows: repeat(2, minmax(0, 1fr)); }
|
|
545
|
+
.aparte-media__grid[data-count="3"] > :first-child { grid-column: span 4; grid-row: span 2; }
|
|
546
|
+
|
|
547
|
+
.aparte-media__grid[data-count="4"] { grid-template-rows: minmax(0, 2fr) minmax(0, 1fr); aspect-ratio: 4 / 3; }
|
|
548
|
+
.aparte-media__grid[data-count="4"] > :first-child { grid-column: span 6; }
|
|
549
|
+
|
|
550
|
+
.aparte-media__grid[data-count="5"] { grid-template-rows: repeat(2, minmax(0, 1fr)); }
|
|
551
|
+
.aparte-media__grid[data-count="5"] > :nth-child(-n + 2) { grid-column: span 3; }
|
|
552
|
+
|
|
553
|
+
.aparte-media__grid[data-count="6"] { grid-template-rows: repeat(3, minmax(0, 1fr)); aspect-ratio: 1; }
|
|
554
|
+
.aparte-media__grid[data-count="6"] > :first-child { grid-column: span 4; grid-row: span 2; }
|
|
555
|
+
|
|
556
|
+
/* The collection's line: under the mosaic, over the strip. */
|
|
557
|
+
.aparte-media__heading {
|
|
558
|
+
display: flex;
|
|
559
|
+
align-items: center;
|
|
560
|
+
gap: var(--aparte-space-3);
|
|
561
|
+
min-inline-size: 0;
|
|
562
|
+
color: var(--aparte-text-muted);
|
|
563
|
+
font-size: var(--aparte-font-size-md);
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
.aparte-media--gallery > .aparte-media__heading { padding: var(--aparte-space-4) var(--aparte-space-6) var(--aparte-space-5); }
|
|
567
|
+
|
|
568
|
+
.aparte-media__heading-title {
|
|
569
|
+
overflow: hidden;
|
|
570
|
+
color: var(--aparte-text);
|
|
571
|
+
font-weight: var(--aparte-font-weight-semibold);
|
|
572
|
+
text-overflow: ellipsis;
|
|
573
|
+
white-space: nowrap;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.aparte-media__heading-title + .aparte-media__count::before {
|
|
577
|
+
content: "\xB7";
|
|
578
|
+
margin-inline-end: var(--aparte-space-3);
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
.aparte-media__count { flex: none; }
|
|
582
|
+
|
|
583
|
+
/* \u2500\u2500 Strip: square thumbnails in the kit's carousel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
584
|
+
|
|
585
|
+
.aparte-media--strip {
|
|
586
|
+
display: grid;
|
|
587
|
+
gap: var(--aparte-space-5);
|
|
588
|
+
padding: var(--aparte-space-5) var(--aparte-space-6) var(--aparte-space-6);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
.aparte-media--strip .aparte-rich-card__carousel {
|
|
592
|
+
--aparte-rich-card-slide-size: 7rem;
|
|
593
|
+
--aparte-rich-card-slide-gap: var(--aparte-space-4);
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.aparte-media__thumb {
|
|
597
|
+
display: flex;
|
|
598
|
+
flex-direction: column;
|
|
599
|
+
gap: var(--aparte-space-2);
|
|
600
|
+
min-inline-size: 0;
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
.aparte-media__thumb > .aparte-media__tile {
|
|
604
|
+
block-size: auto;
|
|
605
|
+
aspect-ratio: 1;
|
|
606
|
+
border-radius: var(--aparte-radius-lg);
|
|
607
|
+
box-shadow: 0 0 0 var(--aparte-border-width) color-mix(in oklab, var(--aparte-text) 8%, transparent);
|
|
608
|
+
transition: translate var(--aparte-duration-base, 0.15s) ease, box-shadow var(--aparte-duration-base, 0.15s) ease;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.aparte-media__thumb > .aparte-media__tile:hover {
|
|
612
|
+
translate: 0 -2px;
|
|
613
|
+
box-shadow: 0 10px 20px -14px rgb(0 0 0 / 0.55);
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
.aparte-media__thumb-title {
|
|
617
|
+
overflow: hidden;
|
|
618
|
+
color: var(--aparte-text-muted);
|
|
619
|
+
font-size: var(--aparte-font-size-sm);
|
|
620
|
+
text-overflow: ellipsis;
|
|
621
|
+
white-space: nowrap;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
/* \u2500\u2500 The lightbox \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
625
|
+
|
|
626
|
+
/* Two classes: it must win over the recipe's \`--lg\` whatever order the sheets land in. */
|
|
627
|
+
.aparte-dialog.aparte-media__lightbox { --aparte-dialog-width: 56rem; }
|
|
628
|
+
|
|
629
|
+
.aparte-media__lb-head { padding-block-end: var(--aparte-space-4); }
|
|
630
|
+
|
|
631
|
+
.aparte-media__lb-heading {
|
|
632
|
+
display: flex;
|
|
633
|
+
flex: 1;
|
|
634
|
+
align-items: baseline;
|
|
635
|
+
gap: var(--aparte-space-4);
|
|
636
|
+
min-inline-size: 0;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
.aparte-media__lb-title {
|
|
640
|
+
flex: 0 1 auto;
|
|
641
|
+
overflow: hidden;
|
|
642
|
+
text-overflow: ellipsis;
|
|
643
|
+
white-space: nowrap;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
.aparte-media__lb-counter {
|
|
647
|
+
flex: none;
|
|
648
|
+
color: var(--aparte-text-muted);
|
|
649
|
+
font-size: var(--aparte-font-size-sm);
|
|
650
|
+
font-variant-numeric: tabular-nums;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/* The stage: the picture on black, as large as the window lets it be. */
|
|
654
|
+
.aparte-media__lb-body {
|
|
655
|
+
position: relative;
|
|
656
|
+
display: grid;
|
|
657
|
+
min-block-size: 12rem;
|
|
658
|
+
background: var(--aparte-media-stage);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
.aparte-media__lb-stage {
|
|
662
|
+
display: grid;
|
|
663
|
+
place-items: center;
|
|
664
|
+
min-inline-size: 0;
|
|
665
|
+
max-block-size: var(--aparte-media-lightbox-block);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.aparte-media__lb-picture {
|
|
669
|
+
position: relative;
|
|
670
|
+
display: grid;
|
|
671
|
+
place-items: center;
|
|
672
|
+
inline-size: 100%;
|
|
673
|
+
min-block-size: 12rem;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
.aparte-media__lb-picture > .aparte-media__placeholder {
|
|
677
|
+
background: none;
|
|
678
|
+
color: rgb(255 255 255 / 0.4);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
.aparte-media__lb-picture:not([data-loading], [data-broken]) > .aparte-media__placeholder { display: none; }
|
|
682
|
+
|
|
683
|
+
.aparte-media__lb-img {
|
|
684
|
+
position: relative;
|
|
685
|
+
z-index: 1;
|
|
686
|
+
display: block;
|
|
687
|
+
inline-size: auto;
|
|
688
|
+
block-size: auto;
|
|
689
|
+
max-inline-size: 100%;
|
|
690
|
+
max-block-size: var(--aparte-media-lightbox-block);
|
|
691
|
+
object-fit: contain;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
.aparte-media__lb-video {
|
|
695
|
+
inline-size: 100%;
|
|
696
|
+
max-block-size: var(--aparte-media-lightbox-block);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.aparte-media__lb-stage > .aparte-media__external {
|
|
700
|
+
inline-size: 100%;
|
|
701
|
+
max-block-size: var(--aparte-media-lightbox-block);
|
|
702
|
+
border-radius: 0;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
.aparte-media__lb-stage > .aparte-media__audio {
|
|
706
|
+
inline-size: min(100% - var(--aparte-space-8) * 2, 28rem);
|
|
707
|
+
margin: var(--aparte-space-8);
|
|
708
|
+
padding: var(--aparte-space-6);
|
|
709
|
+
border-radius: var(--aparte-radius-xl);
|
|
710
|
+
background: var(--aparte-surface-1);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
.aparte-media__lb-nav {
|
|
714
|
+
position: absolute;
|
|
715
|
+
inset-block-start: 50%;
|
|
716
|
+
z-index: 2;
|
|
717
|
+
translate: 0 -50%;
|
|
718
|
+
box-shadow: 0 2px 12px -2px rgb(0 0 0 / 0.45);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.aparte-media__lb-nav--prev { inset-inline-start: var(--aparte-space-5); }
|
|
722
|
+
.aparte-media__lb-nav--next { inset-inline-end: var(--aparte-space-5); }
|
|
723
|
+
.aparte-media__lb-nav:dir(rtl) { transform: scaleX(-1); }
|
|
724
|
+
|
|
725
|
+
/* At either end the button stays where it is, and stays focusable \u2014 a disabled button
|
|
726
|
+
would drop the keyboard's focus out of the dialog \u2014 but says it leads nowhere. */
|
|
727
|
+
.aparte-media__lb-nav[aria-disabled="true"] {
|
|
728
|
+
opacity: 0.35;
|
|
729
|
+
cursor: default;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
.aparte-media__lb-caption {
|
|
733
|
+
display: flex;
|
|
734
|
+
flex-direction: column;
|
|
735
|
+
gap: var(--aparte-space-1);
|
|
736
|
+
padding: var(--aparte-space-5) var(--aparte-space-6) var(--aparte-space-6);
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
.aparte-media__lb-caption[hidden] { display: none; }
|
|
740
|
+
|
|
741
|
+
.aparte-media__lb-caption > .aparte-media__caption { -webkit-line-clamp: 6; }
|
|
742
|
+
|
|
743
|
+
/* \u2500\u2500 Loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
744
|
+
|
|
745
|
+
.aparte-media-card[data-state="loading"] .aparte-media__sk-frame {
|
|
746
|
+
block-size: auto;
|
|
747
|
+
aspect-ratio: 4 / 3;
|
|
748
|
+
border-radius: var(--aparte-radius-lg);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
.aparte-media-card[data-state="loading"] .aparte-media__sk-cell {
|
|
752
|
+
block-size: auto;
|
|
753
|
+
border-radius: 0;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
.aparte-media-card[data-state="loading"] .aparte-media__sk-line { inline-size: 60%; }
|
|
757
|
+
.aparte-media-card[data-state="loading"] .aparte-media__sk-line--short { inline-size: 35%; }
|
|
758
|
+
|
|
759
|
+
.aparte-media__sk-row {
|
|
760
|
+
display: flex;
|
|
761
|
+
gap: var(--aparte-space-4);
|
|
762
|
+
overflow: hidden;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
.aparte-media-card[data-state="loading"] .aparte-media__sk-thumb {
|
|
766
|
+
flex: none;
|
|
767
|
+
inline-size: 7rem;
|
|
768
|
+
block-size: 7rem;
|
|
769
|
+
border-radius: var(--aparte-radius-lg);
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
/* \u2500\u2500 Small screens, and stillness \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
|
|
773
|
+
|
|
774
|
+
@media (max-width: 380px) {
|
|
775
|
+
.aparte-media-card { --aparte-media-max-block: 18rem; }
|
|
776
|
+
.aparte-media--single { padding: var(--aparte-space-3) var(--aparte-space-3) var(--aparte-space-4); }
|
|
777
|
+
.aparte-media--strip { padding: var(--aparte-space-4) var(--aparte-space-5) var(--aparte-space-5); }
|
|
778
|
+
.aparte-media--strip .aparte-rich-card__carousel { --aparte-rich-card-slide-size: 6rem; }
|
|
779
|
+
.aparte-media__play { inline-size: 3rem; block-size: 3rem; }
|
|
780
|
+
.aparte-media__lb-nav--prev { inset-inline-start: var(--aparte-space-3); }
|
|
781
|
+
.aparte-media__lb-nav--next { inset-inline-end: var(--aparte-space-3); }
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
@media (prefers-reduced-motion: reduce) {
|
|
785
|
+
.aparte-media__frame:hover > .aparte-media__img,
|
|
786
|
+
.aparte-media__tile:hover > .aparte-media__img,
|
|
787
|
+
.aparte-media__external:hover > .aparte-media__img { transform: none; }
|
|
788
|
+
.aparte-media__thumb > .aparte-media__tile:hover { translate: none; }
|
|
789
|
+
.aparte-media__external:hover .aparte-media__play,
|
|
790
|
+
.aparte-media__tile:hover .aparte-media__play { scale: none; }
|
|
791
|
+
.aparte-media__audio[data-playing] .aparte-media__wave { animation: none; }
|
|
792
|
+
}
|
|
793
|
+
`,k={cardsMediaTitle:{en:"Media",fr:"M\xE9dias",de:"Medien",es:"Multimedia",it:"Contenuti multimediali",ja:"\u30E1\u30C7\u30A3\u30A2",ko:"\uBBF8\uB514\uC5B4",pt:"M\xEDdia",ru:"\u041C\u0435\u0434\u0438\u0430",zh:"\u5A92\u4F53"},cardsMediaPhotoCount:{en:"{n} photos",fr:"{n} photos",de:"{n} Fotos",es:"{n} fotos",it:"{n} foto",ja:"\u5199\u771F{n}\u679A",ko:"\uC0AC\uC9C4 {n}\uC7A5",pt:"{n} fotos",ru:"\u0424\u043E\u0442\u043E: {n}",zh:"{n} \u5F20\u7167\u7247"},cardsMediaVideoCount:{en:"{n} videos",fr:"{n} vid\xE9os",de:"{n} Videos",es:"{n} v\xEDdeos",it:"{n} video",ja:"\u52D5\u753B{n}\u672C",ko:"\uB3D9\uC601\uC0C1 {n}\uAC1C",pt:"{n} v\xEDdeos",ru:"\u0412\u0438\u0434\u0435\u043E: {n}",zh:"{n} \u4E2A\u89C6\u9891"},cardsMediaCount:{en:"{n} items",fr:"{n} \xE9l\xE9ments",de:"{n} Elemente",es:"{n} elementos",it:"{n} elementi",ja:"\u30E1\u30C7\u30A3\u30A2{n}\u4EF6",ko:"\uBBF8\uB514\uC5B4 {n}\uAC1C",pt:"{n} itens",ru:"\u0424\u0430\u0439\u043B\u043E\u0432: {n}",zh:"{n} \u4E2A\u5A92\u4F53"},cardsMediaImage:{en:"Image",fr:"Image",de:"Bild",es:"Imagen",it:"Immagine",ja:"\u753B\u50CF",ko:"\uC774\uBBF8\uC9C0",pt:"Imagem",ru:"\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435",zh:"\u56FE\u7247"},cardsMediaVideo:{en:"Video",fr:"Vid\xE9o",de:"Video",es:"V\xEDdeo",it:"Video",ja:"\u52D5\u753B",ko:"\uB3D9\uC601\uC0C1",pt:"V\xEDdeo",ru:"\u0412\u0438\u0434\u0435\u043E",zh:"\u89C6\u9891"},cardsMediaAudio:{en:"Audio",fr:"Audio",de:"Audio",es:"Audio",it:"Audio",ja:"\u97F3\u58F0",ko:"\uC624\uB514\uC624",pt:"\xC1udio",ru:"\u0410\u0443\u0434\u0438\u043E",zh:"\u97F3\u9891"},cardsMediaMore:{en:"{n} more",fr:"{n} de plus",de:"{n} weitere",es:"{n} m\xE1s",it:"altri {n}",ja:"\u307B\u304B{n}\u4EF6",ko:"{n}\uAC1C \uB354",pt:"mais {n}",ru:"\u0435\u0449\u0451 {n}",zh:"\u53E6\u5916 {n} \u4E2A"},cardsMediaView:{en:"View larger",fr:"Agrandir",de:"Vergr\xF6\xDFern",es:"Ampliar",it:"Ingrandisci",ja:"\u62E1\u5927\u8868\u793A",ko:"\uD06C\uAC8C \uBCF4\uAE30",pt:"Ampliar",ru:"\u0423\u0432\u0435\u043B\u0438\u0447\u0438\u0442\u044C",zh:"\u653E\u5927\u67E5\u770B"},cardsMediaClose:{en:"Close",fr:"Fermer",de:"Schlie\xDFen",es:"Cerrar",it:"Chiudi",ja:"\u9589\u3058\u308B",ko:"\uB2EB\uAE30",pt:"Fechar",ru:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",zh:"\u5173\u95ED"},cardsMediaWatchOn:{en:"Watch on {site}",fr:"Regarder sur {site}",de:"Auf {site} ansehen",es:"Ver en {site}",it:"Guarda su {site}",ja:"{site}\u3067\u898B\u308B",ko:"{site}\uC5D0\uC11C \uBCF4\uAE30",pt:"Assistir no {site}",ru:"\u0421\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043D\u0430 {site}",zh:"\u5728 {site} \u4E0A\u89C2\u770B"}},H={image:"cardsMediaImage",video:"cardsMediaVideo",audio:"cardsMediaAudio"},_a=24,ha=6,ga=/\.(jpe?g|png|gif|webp|avif|svg|bmp|ico|heic|heif|jxl)$/i,fa=/\.(mp4|m4v|webm|mov|ogv|mkv|m3u8|mpd)$/i,va=/\.(mp3|m4a|aac|wav|ogg|oga|opus|flac|weba)$/i;function ba(e){let a=new URL(e).hostname.replace(/^(www|m)\./,"");if(a==="youtu.be"||/(^|\.)youtube(-nocookie)?\.com$/.test(a))return"YouTube";if(/(^|\.)vimeo\.com$/.test(a))return"Vimeo"}function K(e){let a=g(e)?.toLowerCase();if(a){if(/^image\/|^(image|photo|picture|img|gif|illustration|drawing)s?$/.test(a))return"image";if(/^video\/|^application\/(x-mpegurl|vnd\.apple\.mpegurl|dash\+xml)$|^(video|movie|clip|film)s?$/.test(a))return"video";if(/^audio\/|^(audio|sound|music|song|track|podcast|voice|recording)s?$/.test(a))return"audio"}}function ka(e){if(e.mimeType&&/^application\/(x-mpegurl|vnd\.apple\.mpegurl|dash\+xml)$/i.test(e.mimeType))return e.mimeType;let a=new URL(e.src).pathname;if(/\.m3u8$/i.test(a))return"application/vnd.apple.mpegurl";if(/\.mpd$/i.test(a))return"application/dash+xml"}function ya(e){let a=ka(e);return!a||document.createElement("video").canPlayType(a)!==""}function wa(e){let a=new URL(e).pathname;if(ga.test(a))return"image";if(fa.test(a))return"video";if(va.test(a))return"audio"}function xa(e){let a=U(e);if(a!==void 0)return a>=0?a:void 0;let n=g(e);if(!n)return;let t=/^(?:(\d+):)?(\d{1,2}):(\d{2})(?:\.\d+)?$/.exec(n);if(t){let[o,s,d]=[Number(t[1]??0),Number(t[2]),Number(t[3])];return d>59||t[1]!==void 0&&s>59?void 0:o*3600+s*60+d}let i=/^PT(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?$/i.exec(n);if(i&&(i[1]||i[2]||i[3]))return Number(i[1]??0)*3600+Number(i[2]??0)*60+Number(i[3]??0)}function D(e){if(e&&typeof e=="object"){let a=e;return g(a.name??a.title??a.text??a.username)}return g(e)}function za(e){let a=Array.isArray(e)?e[0]:e;if(!a||typeof a!="object")return a;let n=a;for(let t of["url","src","href","uri","link","regular","large2x","large","medium","original","full","small"])if(typeof n[t]=="string")return n[t]}function V(e){let a=g(za(e));if(!(!a||!(/^https?:\/\//i.test(a)||a.startsWith("/")))){if(a.startsWith("/")&&!a.startsWith("//")){let n=q(a);return n&&/^https?:/i.test(n)?n:void 0}return G(a.startsWith("//")?`https:${a}`:a)??void 0}}var W=e=>{let a=U(e);return a!==void 0&&a>0?a:void 0};function Ma(e){let a=typeof e=="string"?{src:e}:e;if(!a||typeof a!="object"||Array.isArray(a))return null;let n=a,t=n.urls&&typeof n.urls=="object"?n.urls:{},i=Array.isArray(n.video_files)?n.video_files.find(p=>V(p?.link)):void 0,o=[["src",n.src],["videoFile",i?.link],["image",n.image],["imageUrl",n.imageUrl??n.image_url],["urls",t.regular??t.full??t.small??t.raw],["contentUrl",n.contentUrl??n.fileUrl??n.file_url],["url",n.url],["link",n.link],["href",n.href],["thumbnail",n.thumbnail]],s,d="";for(let[p,m]of o){let f=V(m);if(f){s=f,d=p;break}}if(!s)return null;let c=[n.page,n.pageUrl,n.page_url,n.links?.html,d==="url"?void 0:n.url,d==="link"?void 0:n.link,n.sourceUrl,n.source_url].map(V).find(p=>p&&p!==s),_=[n.poster,n.thumb,n.preview,n.previewUrl,n.preview_url,t.small,d==="thumbnail"?void 0:n.thumbnail,i?n.image:void 0,n.cover,n.artwork].map(V).find(p=>p&&p!==s),h=g(n.mimeType??n.mime_type??n.mime??n.contentType??n.content_type??n.encodingFormat??i?.file_type),x=ba(s),E=x?"video":K(n.kind??n.mediaType??n.media_type??n.type)??K(h)??(i?"video":void 0)??wa(s)??"image",z=D(n.credit??n.author??n.photographer??n.artist??n.creator??n.user??n.source??n.attribution??n.channelTitle??n.channel),M=W(n.width??n.w),j=W(n.height??n.h),L=W(n.duration_ms??n.durationMs),l=L!==void 0?L/1e3:xa(n.duration??n.length??n.durationSeconds??n.duration_seconds);return{kind:E,src:s,...x?{site:x}:{},poster:_,title:D(n.title??n.name),caption:D(n.caption??n.description??n.revised_prompt??n.revisedPrompt??n.summary),credit:z&&!/^https?:\/\//i.test(z)?z:void 0,alt:g(n.alt??n.altText??n.alt_text??n.alt_description??n.revised_prompt),...M&&j?{width:M,height:j}:{},duration:l,mimeType:h?.includes("/")?h:void 0,url:c}}function Aa(e){let a=typeof e=="string"?[e]:e;if(!a||typeof a!="object")return null;let n,t;if(Array.isArray(a))t=a;else{let o=a,s=["items","media","images","photos","videos","results","data","files"].map(d=>o[d]).find(Array.isArray);s?(t=s,n=g(o.title)):t=[a]}let i=t.map(Ma).filter(o=>o!==null).slice(0,_a);return i.length?{...n?{title:n}:{},items:i}:null}function ta(e,a){let n=Math.round(a),t=Math.floor(n/3600),i=Math.floor(n%3600/60),o=n%60,s=c=>b(e,c,{useGrouping:!1}),d=c=>b(e,c,{minimumIntegerDigits:2,useGrouping:!1});return t?`${s(t)}:${d(i)}:${d(o)}`:`${s(i)}:${d(o)}`}function $a(e,a){let n=Math.round(a),i=[[Math.floor(n/3600),"hour"],[Math.floor(n%3600/60),"minute"],[n%60,"second"]].filter(([o])=>o>0).map(([o,s])=>N(e,o,s));return i.length?i.join(" "):N(e,0,"second")}function Ta(e){let a=Math.round(e);return`PT${Math.floor(a/3600)}H${Math.floor(a%3600/60)}M${a%60}S`}var I=(e,a)=>u(e,H[a],k[H[a]]);function y(e,a,n){let t=a.title??a.alt??a.caption;return t||(n===void 0?I(e,a.kind):`${I(e,a.kind)} ${b(e,n+1)}`)}var ia=(e,a,n)=>a.alt??y(e,a,n);function O(e,a){let n=b(e,a.length);return a.every(t=>t.kind==="image")?u(e,"cardsMediaPhotoCount",k.cardsMediaPhotoCount,{n}):a.every(t=>t.kind==="video")?u(e,"cardsMediaVideoCount",k.cardsMediaVideoCount,{n}):u(e,"cardsMediaCount",k.cardsMediaCount,{n})}function $(e){return r("span",{class:"aparte-media__placeholder",attrs:{"aria-hidden":"true"}},v(na(e),"aparte-rich-card__glyph aparte-media__placeholder-glyph"))}function T(e,a,n,t,i="aparte-media__img"){let o=r("img",{class:i,attrs:{src:n,loading:"lazy",decoding:"async"}});return t?e.bind(o,t,"alt"):o.setAttribute("alt",""),o.addEventListener("load",()=>a.removeAttribute("data-loading"),{once:!0}),o.addEventListener("error",()=>{o.remove(),a.removeAttribute("data-loading"),a.setAttribute("data-broken","")},{once:!0}),o}function P(e,a){!a.width||!a.height||(e.style.setProperty("--aparte-media-ratio",`${a.width} / ${a.height}`),e.style.setProperty("--aparte-media-ratio-n",String(a.width/a.height)),e.setAttribute("data-sized",""))}function R(e,a,n,t=!1){let i=r("time",{class:n,attrs:{datetime:Ta(a),"aria-hidden":t?"true":void 0}});return e.bind(i,()=>ta(e.config,a)),i}var ra=e=>new URL(e).hostname.replace(/^www\./,"");function Ea(e,a,n){let t=r("button",{class:"aparte-media__frame",attrs:{type:"button","aria-haspopup":"dialog","data-kind":"image","data-loading":""}});return P(t,a),t.append($("image"),T(e,t,a.src,()=>ia(e.config,a)),v(ca,"aparte-rich-card__glyph aparte-media__zoom")),e.bind(t,()=>u(e.config,"cardsMediaView",k.cardsMediaView),"title"),t.addEventListener("click",()=>n(t)),t}function ja(e,a,n="aparte-media__frame aparte-media__frame--video"){let t=r("div",{class:n,attrs:{"data-kind":"video"}});P(t,a);let i=r("video",{class:"aparte-media__video",attrs:{controls:!0,preload:"metadata",playsinline:!0,src:a.src,poster:a.poster}});return e.bind(i,()=>y(e.config,a),"aria-label"),t.append(i),t}function La(e,a){let n=a.site?a.src:a.url??a.src,t=a.site??ra(n),i=r("a",{class:"aparte-media__frame aparte-media__external",attrs:{href:n,target:"_blank",rel:"noopener noreferrer","data-kind":"video"}});return P(i,a),i.append($("video")),a.poster&&i.append(T(e,i,a.poster,null)),i.append(r("span",{class:"aparte-media__play",attrs:{"aria-hidden":"true"}},v(aa,"aparte-rich-card__glyph aparte-media__play-glyph")),r("span",{class:"aparte-media__site",attrs:{"aria-hidden":"true"}},v(ea,"aparte-rich-card__glyph aparte-media__site-glyph"),t)),a.duration!==void 0&&i.append(R(e,a.duration,"aparte-media__duration",!0)),e.bind(i,()=>`${y(e.config,a)} \u2014 ${u(e.config,"cardsMediaWatchOn",k.cardsMediaWatchOn,{site:t})}`,"aria-label"),i}function Ca(e,a){let n=r("span",{class:"aparte-media__cover",attrs:{"data-kind":"audio"}},$("audio"));a.poster&&n.append(T(e,n,a.poster,null));let t=r("div",{class:"aparte-media__audio-title"});e.bind(t,()=>a.title??I(e.config,"audio"));let i=r("div",{class:"aparte-media__audio-text"},t,a.credit?r("div",{class:"aparte-media__audio-credit",text:a.credit}):null),o=r("div",{class:"aparte-media__audio-head"},n,i,a.duration!==void 0?R(e,a.duration,"aparte-media__audio-length"):null),s=r("audio",{class:"aparte-media__player",attrs:{controls:!0,preload:"metadata",src:a.src}});e.bind(s,()=>y(e.config,a),"aria-label");let d=r("div",{class:"aparte-media__audio",attrs:{"data-kind":"audio"}},o,r("span",{class:"aparte-media__wave",attrs:{"aria-hidden":"true"}}),s);s.addEventListener("play",()=>d.setAttribute("data-playing",""));for(let c of["pause","ended","emptied"])s.addEventListener(c,()=>d.removeAttribute("data-playing"));return d}function oa(e,a,n="figcaption"){let t=a&&e.title?r("div",{class:"aparte-media__title",text:e.title}):null,i=e.caption&&e.caption!==e.title?r("p",{class:"aparte-media__caption",text:e.caption}):null,o=e.credit&&e.kind!=="audio"?r("span",{class:"aparte-media__credit"},v(e.kind==="image"?ma:na(e.kind),"aparte-rich-card__glyph aparte-media__line-glyph"),r("span",{text:e.credit})):null,s=e.url?r("a",{class:"aparte-media__source",attrs:{href:e.url,target:"_blank",rel:"noopener noreferrer"}},r("span",{text:ra(e.url)}),v(ea,"aparte-rich-card__glyph aparte-media__line-glyph")):null,d=o||s?r("div",{class:"aparte-media__meta"},o,s):null;return!t&&!i&&!d?null:r(n,{class:"aparte-media__figcaption"},t,i,d)}function sa(e,a,n,t){if(a.kind==="audio")return Ca(e,a);if(a.site||a.kind==="video"&&!ya(a))return La(e,a);if(a.kind==="video")return ja(e,a,n?void 0:"aparte-media__lb-video");if(n)return Ea(e,a,n);let i=r("div",{class:"aparte-media__lb-picture",attrs:{"data-loading":""}},$("image")),o=T(e,i,a.src,()=>ia(e.config,a,t),"aparte-media__lb-img");return o.removeAttribute("loading"),i.append(o),i}function Y(e,a,n,t,i){let o=r("button",{class:"aparte-media__tile",attrs:{type:"button","aria-haspopup":"dialog","data-kind":a.kind}});o.append($(a.kind));let s=a.kind==="image"?a.poster??a.src:a.poster;if(s&&o.append(T(e,o,s,null,"aparte-media__img")),a.kind==="video"&&o.append(r("span",{class:"aparte-media__play aparte-media__play--sm",attrs:{"aria-hidden":"true"}},v(aa,"aparte-rich-card__glyph aparte-media__play-glyph"))),a.kind==="audio"&&a.title&&o.append(r("span",{class:"aparte-media__tile-title",attrs:{"aria-hidden":"true"},text:a.title})),a.duration!==void 0&&a.kind!=="image"&&o.append(R(e,a.duration,"aparte-media__duration",!0)),t>0){let d=r("span",{class:"aparte-media__more",attrs:{"aria-hidden":"true"}});e.bind(d,()=>`+${b(e.config,t)}`),o.append(d)}return e.bind(o,()=>{let d=[y(e.config,a,n)];return a.kind!=="image"&&(a.title??a.alt??a.caption)&&d.push(I(e.config,a.kind)),a.duration!==void 0&&a.kind!=="image"&&d.push($a(e.config,a.duration)),t>0&&d.push(u(e.config,"cardsMediaMore",k.cardsMediaMore,{n:b(e.config,t)})),d.join(", ")},"aria-label"),o.addEventListener("click",()=>i(n,o)),o}function J(e,a){let n=r("span",{class:"aparte-media__count"});return e.bind(n,()=>O(e.config,a.items)),r("div",{class:"aparte-media__heading"},v(Z,"aparte-rich-card__glyph aparte-media__line-glyph"),a.title?r("span",{class:"aparte-media__heading-title",text:a.title}):null,n)}var Va=0;function Q(e,a,n,t){return e.bind(a,n,t),()=>t?a.setAttribute(t,n()):a.textContent=n()}function Ia(e,a,n){let t=null,i=0,o=null,s,d,c=[],_=[],h=a.length>1;function x(){t&&(typeof t.close=="function"?t.close():(t.removeAttribute("open"),t.dispatchEvent(new Event("close"))))}function E(l){i=Math.max(0,Math.min(a.length-1,l));let p=a[i];s.setAttribute("data-kind",p.kind),s.replaceChildren(sa(e,p,null,h?i:void 0)),d.replaceChildren(...oa(p,!1,"div")?.childNodes??[]),d.hidden=!d.childNodes.length;for(let m of c)m();for(let[m,f]of _)m.setAttribute("aria-disabled",String(f<0?i===0:i===a.length-1))}function z(l){l>=0&&l<a.length&&l!==i&&E(l)}function M(l){let p=r("button",{class:`aparte-btn aparte-btn--icon aparte-btn--circle aparte-btn--surface aparte-media__lb-nav aparte-media__lb-nav--${l<0?"prev":"next"}`,attrs:{type:"button"}});return p.innerHTML=e.config.getIcon(l<0?"prevBranch":"nextBranch"),e.bind(p,()=>u(e.config,l<0?"cardsPrevious":"cardsNext",l<0?C.cardsPrevious:C.cardsNext),"aria-label"),p.addEventListener("click",()=>z(i+l)),_.push([p,l]),p}function j(l){if(l.target?.closest?.("video, audio"))return;let p=typeof getComputedStyle=="function"&&getComputedStyle(t).direction==="rtl",m;if(l.key==="ArrowRight"||l.key==="ArrowLeft")m=i+(l.key==="ArrowRight"?1:-1)*(p?-1:1);else if(l.key==="Home")m=0;else if(l.key==="End")m=a.length-1;else if(l.key==="Escape"&&typeof t.showModal!="function"){l.preventDefault(),x();return}m!==void 0&&(l.preventDefault(),z(m))}function L(){let l=`aparte-media-lightbox-${++Va}`,p=r("h2",{class:"aparte-dialog__title aparte-media__lb-title",attrs:{id:l}});c.push(Q(e,p,()=>y(e.config,a[i],h?i:void 0)));let m=r("div",{class:"aparte-media__lb-heading"},p);if(h){let A=r("span",{class:"aparte-media__lb-counter"});c.push(Q(e,A,()=>u(e.config,"cardsSlide",C.cardsSlide,{n:b(e.config,i+1),total:b(e.config,a.length)}))),m.append(A)}let f=r("button",{class:"aparte-btn aparte-btn--icon aparte-btn--sm aparte-btn--ghost aparte-dialog__close aparte-media__lb-close",attrs:{type:"button"}});f.innerHTML=e.config.getIcon("close"),e.bind(f,()=>u(e.config,"cardsMediaClose",k.cardsMediaClose),"aria-label"),f.addEventListener("click",x),s=r("div",{class:"aparte-media__lb-stage"}),d=r("div",{class:"aparte-media__lb-caption"});let F=r("div",{class:"aparte-media__lb-body"},s);h&&F.append(M(-1),M(1));let S=r("dialog",{class:"aparte-dialog aparte-dialog--lg aparte-media__lightbox",attrs:{"aria-labelledby":l}},r("div",{class:"aparte-dialog__header aparte-media__lb-head"},m,f),F,d);return S.addEventListener("keydown",j),S.addEventListener("close",()=>{for(let A of s.querySelectorAll("video, audio"))A.paused||A.pause();o?.focus()}),S}return(l,p)=>{t||(t=L(),n().append(t)),o=p,E(l),typeof t.showModal=="function"?t.open||t.showModal():t.setAttribute("open","")}}function Oa(e,a){let[n]=e.items,t,i=Ia(a,e.items,()=>t);if(e.items.length===1)return t=r("figure",{class:"aparte-media aparte-media--single",attrs:{"data-kind":n.kind}},sa(a,n,c=>i(0,c)),oa(n,n.kind!=="audio")),[t];if(a.variant==="strip"){let c=e.items.map((_,h)=>r("div",{class:"aparte-media__thumb"},Y(a,_,h,0,i),_.title?r("span",{class:"aparte-media__thumb-title",attrs:{"aria-hidden":"true"},text:_.title}):null));return t=r("div",{class:"aparte-media aparte-media--strip"},J(a,e),B(a,c,{label:()=>e.title??O(a.config,e.items)})),[t]}let o=e.items.slice(0,ha),s=e.items.length-o.length,d=r("ul",{class:"aparte-media__grid",attrs:{"data-count":o.length}},...o.map((c,_)=>r("li",{class:"aparte-media__cell"},Y(a,c,_,_===o.length-1?s:0,i))));return a.bind(d,()=>e.title??O(a.config,e.items),"aria-label"),t=r("div",{class:"aparte-media aparte-media--gallery"},d,J(a,e)),[t]}function Sa(e,a){let n=(i,o="rect")=>r("span",{class:`aparte-skeleton aparte-skeleton--${o} ${i}`,attrs:{"aria-hidden":"true"}}),t=e?.title??e?.items?.[0]?.title;return a.variant==="gallery"?[r("div",{class:"aparte-media aparte-media--gallery"},r("div",{class:"aparte-media__grid",attrs:{"data-count":4}},...Array.from({length:4},()=>n("aparte-media__sk-cell"))),r("div",{class:"aparte-media__heading"},t?r("span",{class:"aparte-media__heading-title",text:t}):n("aparte-media__sk-line","text")))]:a.variant==="strip"?[r("div",{class:"aparte-media aparte-media--strip"},r("div",{class:"aparte-media__heading"},t?r("span",{class:"aparte-media__heading-title",text:t}):n("aparte-media__sk-line","text")),r("div",{class:"aparte-media__sk-row"},...Array.from({length:4},()=>n("aparte-media__sk-thumb"))))]:[r("div",{class:"aparte-media aparte-media--single"},n("aparte-media__sk-frame"),r("div",{class:"aparte-media__figcaption"},t?r("div",{class:"aparte-media__title",text:t}):n("aparte-media__sk-line","text"),n("aparte-media__sk-line aparte-media__sk-line--short","text")))]}function Ua(e,a){let n=e?.items??[];return n.length===1?y(a.config,n[0]):n.length>1?e.title??O(a.config,n):e?.title??u(a.config,"cardsMediaTitle",k.cardsMediaTitle)}function Na(e,a){let n=e.items.map((t,i)=>{let o=y(a.config,t,e.items.length>1?i:void 0),s=t.credit?` \u2014 ${t.credit}`:"",d=t.duration!==void 0?` (${ta(a.config,t.duration)})`:"";return`${o}${s}${d}: ${t.src}`});return e.title?`${e.title}:
|
|
794
|
+
${n.join(`
|
|
795
|
+
`)}`:n.join(`
|
|
796
|
+
`)}function Da(e){let a=g(e.prompt??e.query??e.q??e.search??e.title);return a?{title:a}:null}var Wa=X({name:"media",variants:["single","gallery","strip"],styles:ua,icon:Z,normalize:Aa,render:Oa,skeleton:Sa,label:Ua,fallback:Na,partial:Da});function Fa(e={}){return Wa.setup(e)}export{ta as formatDuration,Wa as mediaCard,xa as readDuration,Aa as readMedia,Fa as setupMediaCard};
|
|
797
|
+
//# sourceMappingURL=media-QI5BPERX.js.map
|