@cntrl-site/components 1.0.115 → 1.0.116
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/Chronicles-BNvvaFYY.mjs +744 -0
- package/dist/Chronicles-Dj1gvNjE.js +196 -0
- package/dist/{ChroniclesComponent-D-yEbs9w.mjs → ChroniclesComponent-0ZWBPdbh.mjs} +542 -491
- package/dist/ChroniclesComponent-D4_6w8f7.js +1 -0
- package/dist/Components/Chronicles/Chronicles.d.ts +7 -1
- package/dist/Components/Chronicles/ChroniclesComponent.d.ts +26 -2
- package/dist/Components/LightboxJournal/LightboxJournal.d.ts +1 -0
- package/dist/Components/LightboxStrip/LightboxStrip.d.ts +1 -0
- package/dist/LightboxJournal-Bmw2zm4t.js +549 -0
- package/dist/{LightboxJournal-D59ex6wH.mjs → LightboxJournal-gePVKQJ4.mjs} +429 -403
- package/dist/{LightboxStrip-YspzBP8N.mjs → LightboxStrip-BPQiQhd3.mjs} +461 -435
- package/dist/LightboxStrip-CTxRwLYk.js +412 -0
- package/dist/{components-D4ZrIo2M.js → components-B8MjlzLL.js} +1 -1
- package/dist/{components-Ds6rhj3U.mjs → components-BQjon_-7.mjs} +1 -1
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +3 -3
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +36 -32
- package/dist/sources.js +124 -25
- package/dist/sources.mjs +131 -32
- package/dist/types/SchemaV1.d.ts +3 -0
- package/package.json +1 -1
- package/dist/Chronicles-Cy2h3jlZ.mjs +0 -724
- package/dist/Chronicles-D0ojQzOP.js +0 -196
- package/dist/ChroniclesComponent-Os_r2IYg.js +0 -1
- package/dist/LightboxJournal-DAEZOPDi.js +0 -523
- package/dist/LightboxStrip-BDjI1jyH.js +0 -386
|
@@ -1,724 +0,0 @@
|
|
|
1
|
-
import { jsx as p, jsxs as E, Fragment as Tt } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo as ae, useRef as R, useState as f, useEffect as h, useCallback as _t, useLayoutEffect as se, Fragment as kt } from "react";
|
|
3
|
-
import { createPortal as zt } from "react-dom";
|
|
4
|
-
import x from "classnames";
|
|
5
|
-
import { s as At } from "./scalingValue-C9JH5L6O.mjs";
|
|
6
|
-
import { b as Ht } from "./buildColorVars-CLyWQm5K.mjs";
|
|
7
|
-
import { u as Ft } from "./useScopedStyles-DhBG3557.mjs";
|
|
8
|
-
import { b as Wt } from "./buildValidUrl-BbtqqeHr.mjs";
|
|
9
|
-
import { o as Xe, t as Ye } from "./textStylesToCss-05Mn6I_2.mjs";
|
|
10
|
-
import { u as Vt } from "./useLightboxScrollLock-VQ07s7EJ.mjs";
|
|
11
|
-
const Bt = ["title2", "title3", "title4"], q = ["column1Width", "column2Width", "column3Width", "column4Width"], Dt = ["column1", "column2", "column3", "column4", "column5"], jt = ["title", ...Bt], Qe = {
|
|
12
|
-
center: { x: "50%", y: "50%" },
|
|
13
|
-
"left-top": { x: "0%", y: "0%" },
|
|
14
|
-
"top-center": { x: "50%", y: "0%" },
|
|
15
|
-
"top-right": { x: "100%", y: "0%" },
|
|
16
|
-
"left-center": { x: "0%", y: "50%" },
|
|
17
|
-
"right-center": { x: "100%", y: "50%" },
|
|
18
|
-
"left-bottom": { x: "0%", y: "100%" },
|
|
19
|
-
"bottom-center": { x: "50%", y: "100%" },
|
|
20
|
-
"right-bottom": { x: "100%", y: "100%" }
|
|
21
|
-
}, po = Object.keys(Qe), V = 300, ue = 300, Z = 4e-3, Gt = 20, qe = /\.(mp4|webm|ogg|mov)(\?|$)/i, Pe = [
|
|
22
|
-
"--cntrl-article-width",
|
|
23
|
-
"--cntrl-article-top",
|
|
24
|
-
"--cntrl-article-left",
|
|
25
|
-
"--cntrl-viewport-height"
|
|
26
|
-
], Kt = {
|
|
27
|
-
triggerColor: "trigger-color",
|
|
28
|
-
triggerHoverColor: "trigger-hover-color",
|
|
29
|
-
closeColor: "close-color",
|
|
30
|
-
closeHoverColor: "close-hover-color",
|
|
31
|
-
panelColor: "panel-color",
|
|
32
|
-
textColor: "text-color",
|
|
33
|
-
textHoverColor: "text-hover-color",
|
|
34
|
-
overlayColor: "overlay-color"
|
|
35
|
-
}, Ut = [
|
|
36
|
-
{ side: "top", axis: "y", variant: "row-padding" },
|
|
37
|
-
{ side: "bottom", axis: "y", variant: "row-padding", reverse: !0 },
|
|
38
|
-
{ side: "left", axis: "x", variant: "column-padding", opposite: "right" },
|
|
39
|
-
{ side: "right", axis: "x", variant: "column-padding", opposite: "left", reverse: !0 }
|
|
40
|
-
];
|
|
41
|
-
function et({ columns: e, columnGap: o, panelWidth: n, panelPadding: i }) {
|
|
42
|
-
return Math.max(0, n - i.left - i.right - (e - 1) * o);
|
|
43
|
-
}
|
|
44
|
-
function Xt(e) {
|
|
45
|
-
const o = et(e) / e.columns;
|
|
46
|
-
return Object.fromEntries(q.slice(0, e.columns - 1).map((n) => [n, o]));
|
|
47
|
-
}
|
|
48
|
-
function mo(e, o) {
|
|
49
|
-
return typeof e.columns != "number" || e.columns === o.columns ? e : { ...e, ...Xt({ ...o, ...e }) };
|
|
50
|
-
}
|
|
51
|
-
function Yt(e) {
|
|
52
|
-
const o = et(e), n = q.slice(0, e.columns - 1).map((c) => {
|
|
53
|
-
const d = e[c];
|
|
54
|
-
return typeof d == "number" ? Math.max(0, d) : o / e.columns;
|
|
55
|
-
}), i = n.reduce((c, d) => c + d, 0), a = i > o ? o / i : 1;
|
|
56
|
-
return [...n.map((c) => c * a), Math.max(0, o - i * a)];
|
|
57
|
-
}
|
|
58
|
-
function qt(e) {
|
|
59
|
-
const o = e.reduce((n, i) => n + i, 0);
|
|
60
|
-
return e.map((n) => `minmax(0, ${o > 0 ? n / o * 100 : 1}fr)`).join(" ");
|
|
61
|
-
}
|
|
62
|
-
function Zt(e) {
|
|
63
|
-
const o = [];
|
|
64
|
-
return e.forEach((n, i) => {
|
|
65
|
-
var d;
|
|
66
|
-
const a = ((d = n.group) == null ? void 0 : d.trim()) ?? "", c = o[o.length - 1];
|
|
67
|
-
if (!c || a !== "" && a !== c.label) {
|
|
68
|
-
o.push({ label: a, rows: [{ item: n, index: i }] });
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
c.rows.push({ item: n, index: i });
|
|
72
|
-
}), o;
|
|
73
|
-
}
|
|
74
|
-
function W(e) {
|
|
75
|
-
return ((e == null ? void 0 : e.image) ?? []).filter((o) => !!(o != null && o.assetId));
|
|
76
|
-
}
|
|
77
|
-
function Ze(e, o, n) {
|
|
78
|
-
return `${e}-${o}-${n}`;
|
|
79
|
-
}
|
|
80
|
-
function tt({ type: e, name: o, assetId: n }) {
|
|
81
|
-
return e ? e === "video" : qe.test(o ?? "") || qe.test(n);
|
|
82
|
-
}
|
|
83
|
-
function ot(e) {
|
|
84
|
-
const o = e ? getComputedStyle(e).getPropertyValue("--cntrl-article-width").trim() : "";
|
|
85
|
-
if (!o) return e;
|
|
86
|
-
let n = e;
|
|
87
|
-
for (let i = n.parentElement; i && getComputedStyle(i).getPropertyValue("--cntrl-article-width").trim() === o; i = i.parentElement)
|
|
88
|
-
n = i;
|
|
89
|
-
return n;
|
|
90
|
-
}
|
|
91
|
-
function ce(e) {
|
|
92
|
-
const o = ot(e);
|
|
93
|
-
if (!o) return {};
|
|
94
|
-
const n = getComputedStyle(o);
|
|
95
|
-
return Object.fromEntries(
|
|
96
|
-
Pe.map((i) => [i, n.getPropertyValue(i).trim()]).filter(([, i]) => i)
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
function Je(e, o) {
|
|
100
|
-
const n = (i) => e[`${o}${i}`];
|
|
101
|
-
return {
|
|
102
|
-
fontSettings: { fontFamily: n("FontFamily"), ...n("FontSettings") },
|
|
103
|
-
fontSize: n("FontSize"),
|
|
104
|
-
lineHeight: n("LineHeight"),
|
|
105
|
-
letterSpacing: n("LetterSpacing"),
|
|
106
|
-
wordSpacing: n("WordSpacing"),
|
|
107
|
-
textAlign: n("TextAlign"),
|
|
108
|
-
textAppearance: n("TextAppearance"),
|
|
109
|
-
color: "#000000"
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
function Jt(e) {
|
|
113
|
-
return `
|
|
114
|
-
.${e}-trigger,
|
|
115
|
-
.${e}-close {
|
|
116
|
-
display: inline-block;
|
|
117
|
-
margin: 0;
|
|
118
|
-
padding: 0;
|
|
119
|
-
border: 0;
|
|
120
|
-
background: none;
|
|
121
|
-
cursor: pointer;
|
|
122
|
-
white-space: nowrap;
|
|
123
|
-
transition: color 150ms ease;
|
|
124
|
-
-webkit-appearance: none;
|
|
125
|
-
appearance: none;
|
|
126
|
-
-webkit-tap-highlight-color: transparent;
|
|
127
|
-
}
|
|
128
|
-
.${e}-trigger {
|
|
129
|
-
color: var(--${e}-trigger-color);
|
|
130
|
-
transition: color 150ms ease, opacity ${V}ms ease;
|
|
131
|
-
}
|
|
132
|
-
.${e}-trigger-hidden {
|
|
133
|
-
opacity: 0;
|
|
134
|
-
}
|
|
135
|
-
.${e}-close {
|
|
136
|
-
position: absolute;
|
|
137
|
-
z-index: 2;
|
|
138
|
-
color: var(--${e}-close-color);
|
|
139
|
-
}
|
|
140
|
-
.${e}-trigger:focus,
|
|
141
|
-
.${e}-close:focus {
|
|
142
|
-
outline: none;
|
|
143
|
-
}
|
|
144
|
-
.${e}-trigger:focus-visible,
|
|
145
|
-
.${e}-close:focus-visible {
|
|
146
|
-
outline: 1px solid currentColor;
|
|
147
|
-
outline-offset: 2px;
|
|
148
|
-
}
|
|
149
|
-
.${e}-interactive .${e}-trigger:hover {
|
|
150
|
-
color: var(--${e}-trigger-hover-color, var(--${e}-trigger-color));
|
|
151
|
-
}
|
|
152
|
-
.${e}-close:hover {
|
|
153
|
-
color: var(--${e}-close-hover-color, var(--${e}-close-color));
|
|
154
|
-
}
|
|
155
|
-
.${e}-editor .${e}-trigger {
|
|
156
|
-
cursor: default;
|
|
157
|
-
}
|
|
158
|
-
.${e}-overlay {
|
|
159
|
-
position: fixed;
|
|
160
|
-
inset: 0;
|
|
161
|
-
z-index: 9997;
|
|
162
|
-
overflow: hidden;
|
|
163
|
-
overscroll-behavior: none;
|
|
164
|
-
opacity: 0;
|
|
165
|
-
pointer-events: none;
|
|
166
|
-
transition: opacity ${V}ms ease;
|
|
167
|
-
}
|
|
168
|
-
.${e}-inline-layer {
|
|
169
|
-
position: fixed;
|
|
170
|
-
inset: 0;
|
|
171
|
-
z-index: 9997;
|
|
172
|
-
overflow: hidden;
|
|
173
|
-
pointer-events: none;
|
|
174
|
-
}
|
|
175
|
-
.${e}-overlay-editor {
|
|
176
|
-
inset: auto;
|
|
177
|
-
top: var(--cntrl-article-top, 0);
|
|
178
|
-
left: var(--cntrl-article-left, 0);
|
|
179
|
-
width: var(--cntrl-article-width, 100vw) !important;
|
|
180
|
-
height: var(--cntrl-viewport-height, 100vh) !important;
|
|
181
|
-
}
|
|
182
|
-
.${e}-overlay-edit-mode {
|
|
183
|
-
z-index: 1;
|
|
184
|
-
}
|
|
185
|
-
.${e}-overlay-active {
|
|
186
|
-
opacity: 1;
|
|
187
|
-
pointer-events: auto;
|
|
188
|
-
}
|
|
189
|
-
.${e}-backdrop {
|
|
190
|
-
position: absolute;
|
|
191
|
-
inset: 0;
|
|
192
|
-
background-color: var(--${e}-overlay-color);
|
|
193
|
-
}
|
|
194
|
-
.${e}-media-layer {
|
|
195
|
-
position: absolute;
|
|
196
|
-
inset: 0;
|
|
197
|
-
pointer-events: none;
|
|
198
|
-
}
|
|
199
|
-
.${e}-media {
|
|
200
|
-
position: absolute;
|
|
201
|
-
inset: 0;
|
|
202
|
-
width: 100%;
|
|
203
|
-
height: 100%;
|
|
204
|
-
object-fit: cover;
|
|
205
|
-
opacity: 0;
|
|
206
|
-
}
|
|
207
|
-
.${e}-media-contain {
|
|
208
|
-
object-fit: contain;
|
|
209
|
-
}
|
|
210
|
-
.${e}-media-visible,
|
|
211
|
-
.${e}-media-fading {
|
|
212
|
-
transition: opacity ${ue}ms cubic-bezier(0, 0, 0.58, 1);
|
|
213
|
-
}
|
|
214
|
-
.${e}-media-visible {
|
|
215
|
-
z-index: 1;
|
|
216
|
-
opacity: 1;
|
|
217
|
-
}
|
|
218
|
-
.${e}-media-covered {
|
|
219
|
-
opacity: 1;
|
|
220
|
-
}
|
|
221
|
-
.${e}-media-fading {
|
|
222
|
-
opacity: 0;
|
|
223
|
-
}
|
|
224
|
-
.${e}-media-layer-instant .${e}-media {
|
|
225
|
-
transition: none;
|
|
226
|
-
}
|
|
227
|
-
.${e}-panel {
|
|
228
|
-
position: absolute;
|
|
229
|
-
top: var(--${e}-panel-y);
|
|
230
|
-
left: var(--${e}-panel-x);
|
|
231
|
-
z-index: 1;
|
|
232
|
-
box-sizing: border-box;
|
|
233
|
-
max-width: 100%;
|
|
234
|
-
max-height: 100%;
|
|
235
|
-
overflow-y: auto;
|
|
236
|
-
transform: translate(calc(-1 * var(--${e}-panel-x)), calc(-1 * var(--${e}-panel-y) + 12px));
|
|
237
|
-
background-color: var(--${e}-panel-color);
|
|
238
|
-
color: var(--${e}-text-color);
|
|
239
|
-
overscroll-behavior: contain;
|
|
240
|
-
transition: transform ${V}ms cubic-bezier(0, 0, 0.58, 1);
|
|
241
|
-
}
|
|
242
|
-
.${e}-overlay-active .${e}-panel {
|
|
243
|
-
transform: translate(calc(-1 * var(--${e}-panel-x)), calc(-1 * var(--${e}-panel-y)));
|
|
244
|
-
}
|
|
245
|
-
.${e}-panel-settled {
|
|
246
|
-
transition: none;
|
|
247
|
-
}
|
|
248
|
-
.${e}-panel-inline {
|
|
249
|
-
position: relative;
|
|
250
|
-
top: auto;
|
|
251
|
-
left: auto;
|
|
252
|
-
max-height: none;
|
|
253
|
-
transform: none;
|
|
254
|
-
transition: none;
|
|
255
|
-
}
|
|
256
|
-
.${e}-panel-copy {
|
|
257
|
-
position: absolute;
|
|
258
|
-
pointer-events: none;
|
|
259
|
-
}
|
|
260
|
-
@media (prefers-reduced-motion: reduce) {
|
|
261
|
-
.${e}-panel {
|
|
262
|
-
transition: none;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
.${e}-group {
|
|
266
|
-
display: grid;
|
|
267
|
-
grid-template-columns: var(--${e}-grid-columns);
|
|
268
|
-
column-gap: var(--${e}-column-gap);
|
|
269
|
-
}
|
|
270
|
-
.${e}-group ~ .${e}-group {
|
|
271
|
-
margin-top: var(--${e}-group-gap);
|
|
272
|
-
}
|
|
273
|
-
.${e}-group-label {
|
|
274
|
-
grid-column: 1;
|
|
275
|
-
align-self: start;
|
|
276
|
-
min-width: 0;
|
|
277
|
-
overflow-wrap: anywhere;
|
|
278
|
-
}
|
|
279
|
-
.${e}-row {
|
|
280
|
-
grid-column: 2 / -1;
|
|
281
|
-
display: grid;
|
|
282
|
-
grid-template-columns: subgrid;
|
|
283
|
-
align-items: baseline;
|
|
284
|
-
}
|
|
285
|
-
a.${e}-row {
|
|
286
|
-
color: inherit;
|
|
287
|
-
text-decoration: none;
|
|
288
|
-
}
|
|
289
|
-
.${e}-group-unlabeled .${e}-row {
|
|
290
|
-
grid-column: 1 / -1;
|
|
291
|
-
}
|
|
292
|
-
.${e}-title {
|
|
293
|
-
min-width: 0;
|
|
294
|
-
overflow-wrap: anywhere;
|
|
295
|
-
white-space: pre-line;
|
|
296
|
-
transition: color 150ms cubic-bezier(0, 0, 0.58, 1);
|
|
297
|
-
}
|
|
298
|
-
.${e}-interactive .${e}-row:hover .${e}-title,
|
|
299
|
-
.${e}-row:focus-visible .${e}-title,
|
|
300
|
-
.${e}-panel-copy .${e}-row-active .${e}-title {
|
|
301
|
-
color: var(--${e}-text-hover-color, var(--${e}-text-color));
|
|
302
|
-
}
|
|
303
|
-
.${e}-control-anchor {
|
|
304
|
-
position: absolute;
|
|
305
|
-
pointer-events: none;
|
|
306
|
-
z-index: 2;
|
|
307
|
-
}
|
|
308
|
-
`;
|
|
309
|
-
}
|
|
310
|
-
function Qt({ P: e, media: o, isVisible: n, isLoaded: i, isCovered: a, isFading: c, onLoad: d }) {
|
|
311
|
-
const y = R(null), r = tt(o), O = x(
|
|
312
|
-
`${e}-media`,
|
|
313
|
-
o.objectFit === "contain" && `${e}-media-contain`,
|
|
314
|
-
n && i && `${e}-media-visible`,
|
|
315
|
-
a && `${e}-media-covered`,
|
|
316
|
-
c && `${e}-media-fading`
|
|
317
|
-
);
|
|
318
|
-
return h(() => {
|
|
319
|
-
var B;
|
|
320
|
-
const N = y.current;
|
|
321
|
-
N && (n ? (B = N.play()) == null || B.catch(() => {
|
|
322
|
-
}) : N.pause());
|
|
323
|
-
}, [n]), r ? /* @__PURE__ */ p(
|
|
324
|
-
"video",
|
|
325
|
-
{
|
|
326
|
-
ref: y,
|
|
327
|
-
className: O,
|
|
328
|
-
src: o.assetId,
|
|
329
|
-
muted: !0,
|
|
330
|
-
loop: !0,
|
|
331
|
-
playsInline: !0,
|
|
332
|
-
preload: "auto",
|
|
333
|
-
onLoadedData: d
|
|
334
|
-
}
|
|
335
|
-
) : /* @__PURE__ */ p("img", { className: O, src: o.assetId, alt: "", decoding: "async", onLoad: d });
|
|
336
|
-
}
|
|
337
|
-
function Pt(e, o, n, i, a) {
|
|
338
|
-
const c = o[o.length - 1];
|
|
339
|
-
let d = n;
|
|
340
|
-
return o.slice(0, -1).map((y, r) => {
|
|
341
|
-
const O = d + y + i / 2;
|
|
342
|
-
return d += y + i, /* @__PURE__ */ p(
|
|
343
|
-
"div",
|
|
344
|
-
{
|
|
345
|
-
"data-controls": q[r],
|
|
346
|
-
"data-controls-axis": "x",
|
|
347
|
-
"data-controls-variant": "column-width",
|
|
348
|
-
"data-controls-min": String(Gt),
|
|
349
|
-
"data-controls-max-fraction": String(y + c),
|
|
350
|
-
className: `${e}-control-anchor`,
|
|
351
|
-
style: { top: 0, left: a(O - Z / 2), width: a(Z), height: "100%" }
|
|
352
|
-
},
|
|
353
|
-
q[r]
|
|
354
|
-
);
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
|
-
function eo(e, o, n, i) {
|
|
358
|
-
return Ut.map((a) => {
|
|
359
|
-
const c = i(Math.max(n[a.side], Z)), d = a.axis === "x";
|
|
360
|
-
return /* @__PURE__ */ p(
|
|
361
|
-
"div",
|
|
362
|
-
{
|
|
363
|
-
"data-controls": `panelPadding.${a.side}`,
|
|
364
|
-
"data-controls-axis": a.axis,
|
|
365
|
-
"data-controls-variant": a.variant,
|
|
366
|
-
"data-controls-reverse": "reverse" in a ? "" : void 0,
|
|
367
|
-
"data-controls-min": "0",
|
|
368
|
-
"data-controls-max-fraction": "opposite" in a ? String(Math.max(0, o - n[a.opposite])) : void 0,
|
|
369
|
-
className: `${e}-control-anchor`,
|
|
370
|
-
style: {
|
|
371
|
-
[a.side]: 0,
|
|
372
|
-
...d ? { top: 0, width: c, height: "100%" } : { left: 0, width: "100%", height: c }
|
|
373
|
-
}
|
|
374
|
-
},
|
|
375
|
-
a.side
|
|
376
|
-
);
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
function vo({
|
|
380
|
-
settings: e,
|
|
381
|
-
content: o,
|
|
382
|
-
isEditor: n,
|
|
383
|
-
isEditMode: i,
|
|
384
|
-
isPreviewMode: a,
|
|
385
|
-
portalId: c,
|
|
386
|
-
currentState: d,
|
|
387
|
-
unavailableStates: y
|
|
388
|
-
}) {
|
|
389
|
-
var je;
|
|
390
|
-
const { prefix: r } = Ft(), {
|
|
391
|
-
type: O,
|
|
392
|
-
triggerLabel: N,
|
|
393
|
-
closeLabel: B,
|
|
394
|
-
columns: J,
|
|
395
|
-
columnGap: de,
|
|
396
|
-
hoverInterval: pe,
|
|
397
|
-
panelPosition: nt,
|
|
398
|
-
panelWidth: me,
|
|
399
|
-
panelPadding: T,
|
|
400
|
-
panelRadius: rt,
|
|
401
|
-
groupGap: ve,
|
|
402
|
-
triggerColor: it,
|
|
403
|
-
triggerHoverColor: lt,
|
|
404
|
-
closeColor: at,
|
|
405
|
-
closeHoverColor: st,
|
|
406
|
-
panelColor: ct,
|
|
407
|
-
textColor: ut,
|
|
408
|
-
textHoverColor: dt,
|
|
409
|
-
overlayColor: pt
|
|
410
|
-
} = e, S = ae(() => o ?? [], [o]), D = R(null), j = R(null), Q = R(null), fe = R(null), ge = R(null), he = R(null), $e = R(null), [mt, G] = f(!1), [_, ye] = f(!1), [A, we] = f(!1), [be, Ce] = f(!1), [g, k] = f(null), [xe, Se] = f(0), [P, vt] = f(() => /* @__PURE__ */ new Set()), [Le, ft] = f(() => /* @__PURE__ */ new Set()), [K, Ie] = f(null), [gt, ht] = f(null), [M, $t] = f(null), [ee, te] = f({}), [oe, ne] = f(null), [yt, Re] = f(!1), z = n && !a, w = !z, m = O === "a", wt = z && d === "open" && !(y != null && y.includes("open")), b = !m && (wt || (w || i) && mt), Me = w && (m || b), $ = (t) => At(t, n ?? !1), bt = ae(() => Jt(r), [r]), Ee = Qe[nt], Oe = Yt(e), Ct = jt.slice(0, J - 1), H = J > 1, xt = ae(() => H ? Zt(S) : [{ label: "", rows: S.map((t, l) => ({ item: t, index: l })) }], [S, H]), U = g === null ? [] : W(S[g]), Ne = U[xe], L = g !== null && Ne ? Ze(g, xe, Ne.assetId) : null, Te = L !== null && Le.has(L);
|
|
411
|
-
Vt(b && !z), h(() => {
|
|
412
|
-
z && !i && G(!1);
|
|
413
|
-
}, [z, i]), h(() => {
|
|
414
|
-
if (b) {
|
|
415
|
-
te(ce(D.current)), ye(!0);
|
|
416
|
-
return;
|
|
417
|
-
}
|
|
418
|
-
we(!1), k(null);
|
|
419
|
-
const t = window.setTimeout(() => ye(!1), V);
|
|
420
|
-
return () => window.clearTimeout(t);
|
|
421
|
-
}, [b]), h(() => {
|
|
422
|
-
var l;
|
|
423
|
-
if (!b || !_) return;
|
|
424
|
-
(l = Q.current) == null || l.getBoundingClientRect();
|
|
425
|
-
const t = requestAnimationFrame(() => we(!0));
|
|
426
|
-
return () => cancelAnimationFrame(t);
|
|
427
|
-
}, [b, _]), h(() => {
|
|
428
|
-
if (!A) {
|
|
429
|
-
Ce(!1);
|
|
430
|
-
return;
|
|
431
|
-
}
|
|
432
|
-
const t = window.setTimeout(() => Ce(!0), V);
|
|
433
|
-
return () => window.clearTimeout(t);
|
|
434
|
-
}, [A]);
|
|
435
|
-
const X = _t(() => {
|
|
436
|
-
const t = j.current, l = Q.current;
|
|
437
|
-
if (!t || !l) return;
|
|
438
|
-
const u = t.getBoundingClientRect(), s = l.getBoundingClientRect();
|
|
439
|
-
$t({ top: u.top - s.top, left: u.left - s.left });
|
|
440
|
-
}, []), _e = _ || m && P.size > 0;
|
|
441
|
-
h(() => {
|
|
442
|
-
const t = D.current;
|
|
443
|
-
if (!_e || !t || typeof ResizeObserver > "u") return;
|
|
444
|
-
const l = () => te((C) => {
|
|
445
|
-
const I = ce(t);
|
|
446
|
-
return Pe.every((Y) => C[Y] === I[Y]) ? C : I;
|
|
447
|
-
}), u = new ResizeObserver(l);
|
|
448
|
-
u.observe(t);
|
|
449
|
-
const s = new MutationObserver(l), v = ot(t);
|
|
450
|
-
return v && v !== t && (u.observe(v), s.observe(v, { attributes: !0, attributeFilter: ["style"] })), () => {
|
|
451
|
-
u.disconnect(), s.disconnect();
|
|
452
|
-
};
|
|
453
|
-
}, [_e]), se(() => {
|
|
454
|
-
if (_)
|
|
455
|
-
return X(), window.addEventListener("resize", X), () => window.removeEventListener("resize", X);
|
|
456
|
-
}, [_, ee, X]), h(() => {
|
|
457
|
-
var l;
|
|
458
|
-
if (!b || !w) return;
|
|
459
|
-
(l = fe.current) == null || l.focus({ preventScroll: !0 });
|
|
460
|
-
const t = (u) => {
|
|
461
|
-
var s;
|
|
462
|
-
u.key === "Escape" && (G(!1), (s = j.current) == null || s.focus({ preventScroll: !0 }));
|
|
463
|
-
};
|
|
464
|
-
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
465
|
-
}, [b, w]), se(() => {
|
|
466
|
-
if (!m || g === null) return;
|
|
467
|
-
const t = ge.current, l = he.current;
|
|
468
|
-
if (!t || !l) return;
|
|
469
|
-
const u = t.getBoundingClientRect(), s = l.getBoundingClientRect();
|
|
470
|
-
ne({ top: u.top - s.top, left: u.left - s.left, width: u.width });
|
|
471
|
-
}, [m, g]), h(() => {
|
|
472
|
-
if (g !== null) return;
|
|
473
|
-
const t = window.setTimeout(() => ne(null), ue);
|
|
474
|
-
return () => window.clearTimeout(t);
|
|
475
|
-
}, [g]);
|
|
476
|
-
const ke = oe !== null;
|
|
477
|
-
h(() => {
|
|
478
|
-
if (!m || !ke) return;
|
|
479
|
-
const t = () => {
|
|
480
|
-
Re(!0), k(null), ne(null);
|
|
481
|
-
};
|
|
482
|
-
return document.addEventListener("scroll", t, { capture: !0, passive: !0 }), window.addEventListener("resize", t), () => {
|
|
483
|
-
document.removeEventListener("scroll", t, { capture: !0 }), window.removeEventListener("resize", t);
|
|
484
|
-
};
|
|
485
|
-
}, [m, ke]), h(() => {
|
|
486
|
-
Me && S.forEach((t) => W(t).forEach((l) => {
|
|
487
|
-
tt(l) || (new Image().src = l.assetId);
|
|
488
|
-
}));
|
|
489
|
-
}, [Me, S]), h(() => {
|
|
490
|
-
if (U.length < 2) return;
|
|
491
|
-
const t = window.setInterval(() => {
|
|
492
|
-
Se((l) => (l + 1) % U.length);
|
|
493
|
-
}, pe);
|
|
494
|
-
return () => window.clearInterval(t);
|
|
495
|
-
}, [g, U.length, pe]), se(() => {
|
|
496
|
-
const t = $e.current;
|
|
497
|
-
$e.current = L, L !== null && (ht(L), Ie(t));
|
|
498
|
-
}, [L]), h(() => {
|
|
499
|
-
if (!Te || K === null) return;
|
|
500
|
-
const t = window.setTimeout(() => Ie(null), ue);
|
|
501
|
-
return () => window.clearTimeout(t);
|
|
502
|
-
}, [Te, K]);
|
|
503
|
-
const ze = () => {
|
|
504
|
-
var t;
|
|
505
|
-
w && (G(!1), (t = j.current) == null || t.focus({ preventScroll: !0 }));
|
|
506
|
-
}, Ae = (t) => {
|
|
507
|
-
if (!w || W(S[t]).length === 0) {
|
|
508
|
-
k(null);
|
|
509
|
-
return;
|
|
510
|
-
}
|
|
511
|
-
vt((l) => l.has(t) ? l : new Set(l).add(t)), m && g === null && te(ce(D.current)), g !== t && Se(0), Re(!1), k(t);
|
|
512
|
-
}, He = (t) => {
|
|
513
|
-
k((l) => l === t ? null : l);
|
|
514
|
-
}, St = (t) => {
|
|
515
|
-
!w && t.target.closest("a") && t.preventDefault();
|
|
516
|
-
}, Fe = Xe(Ye(Je(e, "trigger"), n)), F = Dt.slice(0, J).map((t) => Xe(Ye(Je(e, t), n))), We = F[0].lineHeight, Ve = (je = F[1]) == null ? void 0 : je.lineHeight, Lt = We !== void 0 && Ve !== void 0 ? `calc((${Ve} - ${We}) / 2)` : void 0, re = Ht(r, {
|
|
517
|
-
triggerColor: it,
|
|
518
|
-
triggerHoverColor: lt,
|
|
519
|
-
closeColor: at,
|
|
520
|
-
closeHoverColor: st,
|
|
521
|
-
panelColor: ct,
|
|
522
|
-
textColor: ut,
|
|
523
|
-
textHoverColor: dt,
|
|
524
|
-
overlayColor: pt
|
|
525
|
-
}, Kt, []), ie = w ? `${r}-interactive` : "", It = !!i && (m || be), Be = /* @__PURE__ */ p("div", { className: x(`${r}-media-layer`, yt && `${r}-media-layer-instant`), "aria-hidden": "true", children: [...P].flatMap((t) => W(S[t]).map((l, u) => {
|
|
526
|
-
const s = Ze(t, u, l.assetId);
|
|
527
|
-
return /* @__PURE__ */ p(
|
|
528
|
-
Qt,
|
|
529
|
-
{
|
|
530
|
-
P: r,
|
|
531
|
-
media: l,
|
|
532
|
-
isVisible: s === L,
|
|
533
|
-
isLoaded: Le.has(s),
|
|
534
|
-
isCovered: s === K,
|
|
535
|
-
isFading: L === null && (s === gt || s === K),
|
|
536
|
-
onLoad: () => ft((v) => v.has(s) ? v : new Set(v).add(s))
|
|
537
|
-
},
|
|
538
|
-
s
|
|
539
|
-
);
|
|
540
|
-
})) }), le = (t) => {
|
|
541
|
-
const l = !t && It;
|
|
542
|
-
return /* @__PURE__ */ E(
|
|
543
|
-
"div",
|
|
544
|
-
{
|
|
545
|
-
ref: t ? void 0 : ge,
|
|
546
|
-
className: x(
|
|
547
|
-
`${r}-panel`,
|
|
548
|
-
A && be && `${r}-panel-settled`,
|
|
549
|
-
m && `${r}-panel-inline`,
|
|
550
|
-
t && `${r}-panel-copy`
|
|
551
|
-
),
|
|
552
|
-
style: {
|
|
553
|
-
width: $(me),
|
|
554
|
-
paddingTop: $(T.top),
|
|
555
|
-
paddingRight: $(T.right),
|
|
556
|
-
paddingBottom: $(T.bottom),
|
|
557
|
-
paddingLeft: $(T.left),
|
|
558
|
-
borderRadius: $(rt),
|
|
559
|
-
[`--${r}-group-gap`]: $(ve),
|
|
560
|
-
[`--${r}-panel-x`]: Ee.x,
|
|
561
|
-
[`--${r}-panel-y`]: Ee.y,
|
|
562
|
-
[`--${r}-grid-columns`]: qt(Oe),
|
|
563
|
-
[`--${r}-column-gap`]: $(de),
|
|
564
|
-
...t && oe
|
|
565
|
-
},
|
|
566
|
-
"data-lightbox-scrollable": m ? void 0 : "",
|
|
567
|
-
"aria-hidden": t || void 0,
|
|
568
|
-
onMouseLeave: t ? void 0 : () => k(null),
|
|
569
|
-
onClickCapture: t ? void 0 : St,
|
|
570
|
-
children: [
|
|
571
|
-
l && eo(r, me, T, $),
|
|
572
|
-
l && Pt(r, Oe, T.left, de, $),
|
|
573
|
-
xt.map((u, s) => /* @__PURE__ */ E(kt, { children: [
|
|
574
|
-
l && s > 0 && /* @__PURE__ */ p(
|
|
575
|
-
"div",
|
|
576
|
-
{
|
|
577
|
-
"data-controls": "groupGap",
|
|
578
|
-
"data-controls-paired": "",
|
|
579
|
-
"data-controls-axis": "y",
|
|
580
|
-
"data-controls-reverse": "",
|
|
581
|
-
"data-controls-min": "0",
|
|
582
|
-
className: `${r}-control-anchor`,
|
|
583
|
-
style: { left: 0, width: "100%", height: $(Math.max(ve, Z)) }
|
|
584
|
-
}
|
|
585
|
-
),
|
|
586
|
-
/* @__PURE__ */ E(
|
|
587
|
-
"div",
|
|
588
|
-
{
|
|
589
|
-
className: x(`${r}-group`, !H && `${r}-group-unlabeled`),
|
|
590
|
-
style: { gridTemplateRows: `repeat(${u.rows.length}, auto) 1fr` },
|
|
591
|
-
children: [
|
|
592
|
-
H && /* @__PURE__ */ p(
|
|
593
|
-
"span",
|
|
594
|
-
{
|
|
595
|
-
className: `${r}-group-label`,
|
|
596
|
-
style: { ...F[0], gridRow: `1 / span ${u.rows.length + 1}`, marginTop: Lt },
|
|
597
|
-
children: u.label
|
|
598
|
-
}
|
|
599
|
-
),
|
|
600
|
-
u.rows.map(({ item: v, index: C }) => {
|
|
601
|
-
var Ke;
|
|
602
|
-
const I = !t && ((Ke = v.link) != null && Ke.value) ? v.link : void 0, Ge = I ? "a" : "div", Y = I ? {
|
|
603
|
-
href: Wt(I.value),
|
|
604
|
-
...I.target === "blank" && { target: "_blank", rel: "noreferrer" }
|
|
605
|
-
} : {}, Et = !I && w && W(v).length > 0, Ot = t ? {} : {
|
|
606
|
-
tabIndex: Et ? 0 : void 0,
|
|
607
|
-
onMouseEnter: () => Ae(C),
|
|
608
|
-
onMouseLeave: () => He(C),
|
|
609
|
-
onFocus: () => Ae(C),
|
|
610
|
-
onBlur: () => He(C)
|
|
611
|
-
};
|
|
612
|
-
return /* @__PURE__ */ E(
|
|
613
|
-
Ge,
|
|
614
|
-
{
|
|
615
|
-
className: x(`${r}-row`, t && C === g && `${r}-row-active`),
|
|
616
|
-
...Y,
|
|
617
|
-
...Ot,
|
|
618
|
-
children: [
|
|
619
|
-
!H && /* @__PURE__ */ p("div", { className: `${r}-title`, style: F[0], children: v.group }),
|
|
620
|
-
Ct.map((Ue, Nt) => /* @__PURE__ */ p("div", { className: `${r}-title`, style: F[Nt + 1], children: v[Ue] }, Ue))
|
|
621
|
-
]
|
|
622
|
-
},
|
|
623
|
-
C
|
|
624
|
-
);
|
|
625
|
-
})
|
|
626
|
-
]
|
|
627
|
-
}
|
|
628
|
-
)
|
|
629
|
-
] }, s))
|
|
630
|
-
]
|
|
631
|
-
}
|
|
632
|
-
);
|
|
633
|
-
}, Rt = _ && !m ? /* @__PURE__ */ E(
|
|
634
|
-
"div",
|
|
635
|
-
{
|
|
636
|
-
ref: Q,
|
|
637
|
-
className: x(
|
|
638
|
-
`${r}-overlay`,
|
|
639
|
-
n && `${r}-overlay-editor`,
|
|
640
|
-
i && `${r}-overlay-edit-mode`,
|
|
641
|
-
A && `${r}-overlay-active`,
|
|
642
|
-
ie
|
|
643
|
-
),
|
|
644
|
-
style: { ...re, ...ee },
|
|
645
|
-
role: "dialog",
|
|
646
|
-
"aria-modal": "true",
|
|
647
|
-
"aria-label": N,
|
|
648
|
-
"data-selection": "none",
|
|
649
|
-
children: [
|
|
650
|
-
/* @__PURE__ */ p("div", { className: `${r}-backdrop`, "aria-hidden": "true", onClick: ze }),
|
|
651
|
-
Be,
|
|
652
|
-
/* @__PURE__ */ p(
|
|
653
|
-
"button",
|
|
654
|
-
{
|
|
655
|
-
ref: fe,
|
|
656
|
-
type: "button",
|
|
657
|
-
className: `${r}-close`,
|
|
658
|
-
style: {
|
|
659
|
-
...Fe,
|
|
660
|
-
top: (M == null ? void 0 : M.top) ?? 0,
|
|
661
|
-
left: (M == null ? void 0 : M.left) ?? 0,
|
|
662
|
-
visibility: M ? "visible" : "hidden"
|
|
663
|
-
},
|
|
664
|
-
onClick: ze,
|
|
665
|
-
children: B
|
|
666
|
-
}
|
|
667
|
-
),
|
|
668
|
-
le(!1)
|
|
669
|
-
]
|
|
670
|
-
}
|
|
671
|
-
) : null, Mt = m && P.size > 0 ? /* @__PURE__ */ E(
|
|
672
|
-
"div",
|
|
673
|
-
{
|
|
674
|
-
ref: he,
|
|
675
|
-
className: x(`${r}-inline-layer`, n && `${r}-overlay-editor`, ie),
|
|
676
|
-
style: { ...re, ...ee },
|
|
677
|
-
"aria-hidden": "true",
|
|
678
|
-
"data-selection": "none",
|
|
679
|
-
children: [
|
|
680
|
-
Be,
|
|
681
|
-
oe && le(!0)
|
|
682
|
-
]
|
|
683
|
-
}
|
|
684
|
-
) : null, De = Rt ?? Mt;
|
|
685
|
-
return /* @__PURE__ */ E(Tt, { children: [
|
|
686
|
-
/* @__PURE__ */ p("style", { dangerouslySetInnerHTML: { __html: bt } }),
|
|
687
|
-
/* @__PURE__ */ p(
|
|
688
|
-
"div",
|
|
689
|
-
{
|
|
690
|
-
ref: D,
|
|
691
|
-
className: x(z && `${r}-editor`, ie),
|
|
692
|
-
style: re,
|
|
693
|
-
children: m ? le(!1) : /* @__PURE__ */ p(
|
|
694
|
-
"button",
|
|
695
|
-
{
|
|
696
|
-
ref: j,
|
|
697
|
-
type: "button",
|
|
698
|
-
className: x(`${r}-trigger`, A && `${r}-trigger-hidden`),
|
|
699
|
-
style: Fe,
|
|
700
|
-
"aria-haspopup": "dialog",
|
|
701
|
-
"aria-expanded": b,
|
|
702
|
-
onClick: () => {
|
|
703
|
-
w && G(!0);
|
|
704
|
-
},
|
|
705
|
-
children: N
|
|
706
|
-
}
|
|
707
|
-
)
|
|
708
|
-
}
|
|
709
|
-
),
|
|
710
|
-
De && typeof document < "u" && zt(
|
|
711
|
-
De,
|
|
712
|
-
(c ? document.getElementById(c) : null) ?? document.body
|
|
713
|
-
)
|
|
714
|
-
] });
|
|
715
|
-
}
|
|
716
|
-
export {
|
|
717
|
-
Dt as CHRONICLES_COLUMN_STYLE_PREFIXES,
|
|
718
|
-
q as CHRONICLES_COLUMN_WIDTH_KEYS,
|
|
719
|
-
Bt as CHRONICLES_EXTRA_TITLE_KEYS,
|
|
720
|
-
po as CHRONICLES_PANEL_POSITIONS,
|
|
721
|
-
vo as Chronicles,
|
|
722
|
-
mo as applyChroniclesColumnCountChange,
|
|
723
|
-
Xt as getChroniclesEqualColumnWidths
|
|
724
|
-
};
|