@cntrl-site/components 1.0.107-alpha.4 → 1.0.107

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/sources.js CHANGED
@@ -1,1076 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./ArchivePopupComponent-BWLaTjap.js"),e=`import { Fragment, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent } from 'react';
2
- import { createPortal } from 'react-dom';
3
- import cn from 'classnames';
4
- import { CommonComponentProps } from '../props';
5
- import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
6
- import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
7
- import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
8
- import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
9
-
10
- type ArchivePopupMedia = {
11
- assetId: string;
12
- name?: string;
13
- type?: 'image' | 'video';
14
- objectFit?: 'cover' | 'contain';
15
- };
16
-
17
- /** Columns count the group column too; a single column is that column alone, each row showing its own text. */
18
- export const ARCHIVE_POPUP_MIN_COLUMNS = 1;
19
- /** A new popup shows the group and its title. */
20
- export const ARCHIVE_POPUP_DEFAULT_COLUMNS = 2;
21
- export const ARCHIVE_POPUP_MAX_COLUMNS = 5;
22
- /** The fields of the columns after the title, in order; \`columns\` decides how many of them a row shows. */
23
- export const ARCHIVE_POPUP_EXTRA_TITLE_KEYS = ['title2', 'title3', 'title4'] as const;
24
- /** Every column but the last has a width of its own, like Programme's; the last takes what is left of the row. */
25
- export const ARCHIVE_POPUP_COLUMN_WIDTH_KEYS = ['column1Width', 'column2Width', 'column3Width', 'column4Width'] as const;
26
-
27
- type ArchivePopupColumnWidthKey = typeof ARCHIVE_POPUP_COLUMN_WIDTH_KEYS[number];
28
-
29
- /**
30
- * Where B's panel sits on the screen, as \`left\`/\`top\` of the screen and of the panel alike, so 0% is flush with
31
- * one edge and 100% with the other. Named like Mercury's title position; center comes first because the editor
32
- * puts the first value into a popup saved before there was a position, and those were centred.
33
- */
34
- const PANEL_POSITION_OFFSETS = {
35
- center: { x: '50%', y: '50%' },
36
- 'left-top': { x: '0%', y: '0%' },
37
- 'top-center': { x: '50%', y: '0%' },
38
- 'top-right': { x: '100%', y: '0%' },
39
- 'left-center': { x: '0%', y: '50%' },
40
- 'right-center': { x: '100%', y: '50%' },
41
- 'left-bottom': { x: '0%', y: '100%' },
42
- 'bottom-center': { x: '50%', y: '100%' },
43
- 'right-bottom': { x: '100%', y: '100%' },
44
- } as const;
45
-
46
- export type ArchivePopupPanelPosition = keyof typeof PANEL_POSITION_OFFSETS;
47
-
48
- export const ARCHIVE_POPUP_PANEL_POSITIONS = Object.keys(PANEL_POSITION_OFFSETS) as ArchivePopupPanelPosition[];
49
-
50
- /** Each column of a row has a text style of its own, the group column's being \`column1\`. */
51
- export const ARCHIVE_POPUP_COLUMN_STYLE_PREFIXES = ['column1', 'column2', 'column3', 'column4', 'column5'] as const;
52
-
53
- type ArchivePopupColumnStylePrefix = typeof ARCHIVE_POPUP_COLUMN_STYLE_PREFIXES[number];
54
-
55
- type ArchivePopupTitle = any[] | string;
56
-
57
- export type ArchivePopupContentItem = {
58
- group?: string;
59
- /** Rich text, so parts of a title can be linked; a plain string is still shown as is. */
60
- title?: ArchivePopupTitle;
61
- title2?: ArchivePopupTitle;
62
- title3?: ArchivePopupTitle;
63
- title4?: ArchivePopupTitle;
64
- /** The row's hover images, shown in turn while it is hovered; a row saved before there could be several holds just one. */
65
- image?: ArchivePopupMedia | ArchivePopupMedia[];
66
- };
67
-
68
- type FontSettings = { fontWeight: number; fontStyle: string };
69
-
70
- type Padding = { top: number; right: number; bottom: number; left: number };
71
-
72
- /** A text style as settings hold it, each field under the name of what it styles, e.g. \`triggerFontSize\`. */
73
- type TextStyleFields = {
74
- FontFamily?: string;
75
- FontSettings?: FontSettings;
76
- FontSize?: number;
77
- LineHeight?: number;
78
- LetterSpacing?: number;
79
- WordSpacing?: number;
80
- TextAlign?: TextStyles['textAlign'];
81
- TextAppearance?: TextStyles['textAppearance'];
82
- };
83
-
84
- type PrefixedTextStyle<Prefix extends string> = {
85
- [Key in keyof TextStyleFields as \`\${Prefix}\${Key}\`]?: TextStyleFields[Key];
86
- };
87
-
88
- type ArchivePopupSettings = PrefixedTextStyle<'trigger'>
89
- & PrefixedTextStyle<ArchivePopupColumnStylePrefix>
90
- // One style every column shared before each had its own; a column with no style of its own still shows it.
91
- & PrefixedTextStyle<'list'>
92
- & {
93
- /** \`a\` is always open, in place on the page; \`b\` opens from a label. */
94
- type?: 'a' | 'b';
95
- triggerLabel?: string;
96
- closeLabel?: string;
97
- /** Every column of a row, the group column included. */
98
- columns?: number;
99
- columnGap?: number;
100
- column1Width?: number;
101
- column2Width?: number;
102
- column3Width?: number;
103
- column4Width?: number;
104
- /** How long each of a hovered row's images shows before the next, in ms. */
105
- hoverInterval?: number;
106
- /** B only: A's panel stays where it is placed on the page. */
107
- panelPosition?: string;
108
- panelWidth?: number;
109
- panelPadding?: Padding;
110
- panelRadius?: number;
111
- groupGap?: number;
112
- triggerColor?: string;
113
- triggerHoverColor?: string;
114
- closeColor?: string;
115
- closeHoverColor?: string;
116
- panelColor?: string;
117
- textColor?: string;
118
- textHoverColor?: string;
119
- overlayColor?: string;
120
- };
121
-
122
- type ArchivePopupProps = {
123
- settings: ArchivePopupSettings;
124
- content?: ArchivePopupContentItem[];
125
- isEditor?: boolean;
126
- isEditMode?: boolean;
127
- isPreviewMode?: boolean;
128
- activeEvent?: string;
129
- portalId?: string;
130
- } & CommonComponentProps;
131
-
132
- export type ArchivePopupRow = {
133
- item: ArchivePopupContentItem;
134
- index: number;
135
- };
136
-
137
- export type ArchivePopupGroup = {
138
- label: string;
139
- rows: ArchivePopupRow[];
140
- };
141
-
142
- type ColorKeys =
143
- | 'triggerColor'
144
- | 'triggerHoverColor'
145
- | 'closeColor'
146
- | 'closeHoverColor'
147
- | 'panelColor'
148
- | 'textColor'
149
- | 'textHoverColor'
150
- | 'overlayColor';
151
-
152
- const COLOR_VAR_MAP: Record<ColorKeys, string> = {
153
- triggerColor: 'trigger-color',
154
- triggerHoverColor: 'trigger-hover-color',
155
- closeColor: 'close-color',
156
- closeHoverColor: 'close-hover-color',
157
- panelColor: 'panel-color',
158
- textColor: 'text-color',
159
- textHoverColor: 'text-hover-color',
160
- overlayColor: 'overlay-color',
161
- };
162
-
163
- const STATE_KEYS = ['hover', 'open'] as const;
164
-
165
- const OVERLAY_ANIM_MS = 300;
166
- // The least a padding handle is drawn at, so a zero padding can still be grabbed.
167
- const PADDING_HANDLE_SIZE = 0.004;
168
- const COLUMN_RESIZE_HANDLE_WIDTH = 0.004;
169
- // The least a column is dragged down to, in pixels of the layout.
170
- const MIN_COLUMN_WIDTH_PX = 20;
171
- const DEFAULT_COLUMN_GAP = 0.0139;
172
- const DEFAULT_PANEL_WIDTH = 0.3194;
173
- const DEFAULT_PANEL_PADDING: Padding = { top: 0.00972, right: 0.00972, bottom: 0.00972, left: 0.00972 };
174
- const IMAGE_FADE_MS = 300;
175
- const DEFAULT_HOVER_INTERVAL_MS = 1000;
176
-
177
- const LIGHTBOX_CSS_VARS = [
178
- '--cntrl-article-width',
179
- '--cntrl-article-top',
180
- '--cntrl-article-left',
181
- '--cntrl-viewport-height',
182
- ] as const;
183
-
184
- // A row with an empty group continues the group above it, so the label only has to be typed once.
185
- type ColumnLayoutSettings = Pick<ArchivePopupSettings, 'columns' | 'columnGap' | 'panelWidth' | 'panelPadding'>
186
- & Partial<Record<ArchivePopupColumnWidthKey, number>>;
187
-
188
- function getColumnCount(columns: number | undefined): number {
189
- return Math.min(Math.max(Math.round(columns ?? ARCHIVE_POPUP_DEFAULT_COLUMNS), ARCHIVE_POPUP_MIN_COLUMNS), ARCHIVE_POPUP_MAX_COLUMNS);
190
- }
191
-
192
- /** The width a row's columns share: the panel's, less its padding and the gaps between them. */
193
- function getColumnsSpace(settings: ColumnLayoutSettings): number {
194
- const { panelWidth = DEFAULT_PANEL_WIDTH, panelPadding = DEFAULT_PANEL_PADDING, columnGap = DEFAULT_COLUMN_GAP } = settings;
195
- const gaps = (getColumnCount(settings.columns) - 1) * columnGap;
196
- return Math.max(0, panelWidth - panelPadding.left - panelPadding.right - gaps);
197
- }
198
-
199
- export function getArchivePopupEqualColumnWidths(settings: ColumnLayoutSettings): Partial<Record<ArchivePopupColumnWidthKey, number>> {
200
- const count = getColumnCount(settings.columns);
201
- const width = getColumnsSpace(settings) / count;
202
- return Object.fromEntries(ARCHIVE_POPUP_COLUMN_WIDTH_KEYS.slice(0, count - 1).map((key) => [key, width]));
203
- }
204
-
205
- /**
206
- * Every column's width, the last taking what the others leave. A column with no width of its own gets an equal share,
207
- * and widths that no longer fit, after the panel narrows or a column is added, shrink together until they do.
208
- */
209
- export function resolveArchivePopupColumnWidths(settings: ColumnLayoutSettings): number[] {
210
- const count = getColumnCount(settings.columns);
211
- const space = getColumnsSpace(settings);
212
- const sized = ARCHIVE_POPUP_COLUMN_WIDTH_KEYS.slice(0, count - 1).map((key) => {
213
- const width = settings[key];
214
- return typeof width === 'number' ? Math.max(0, width) : space / count;
215
- });
216
- const sizedTotal = sized.reduce((sum, width) => sum + width, 0);
217
- const scale = sizedTotal > space ? space / sizedTotal : 1;
218
- const fitted = sized.map((width) => width * scale);
219
- return [...fitted, Math.max(0, space - sizedTotal * scale)];
220
- }
221
-
222
- /** Like Programme, a new column count starts the columns over at equal widths. */
223
- export function applyArchivePopupColumnCountChange(
224
- nextSettings: Record<string, any>,
225
- prevSettings: Record<string, any>,
226
- ): Record<string, any> {
227
- if (typeof nextSettings.columns !== 'number' || nextSettings.columns === prevSettings.columns) {
228
- return nextSettings;
229
- }
230
- return { ...nextSettings, ...getArchivePopupEqualColumnWidths({ ...prevSettings, ...nextSettings }) };
231
- }
232
-
233
- // The columns stay in proportion when the panel is drawn narrower than its width, on a small screen.
234
- function getGridTemplateColumns(widths: number[]): string {
235
- const total = widths.reduce((sum, width) => sum + width, 0);
236
- return widths.map((width) => \`minmax(0, \${total > 0 ? (width / total) * 100 : 1}fr)\`).join(' ');
237
- }
238
-
239
- export function groupArchiveRows(items: ArchivePopupContentItem[]): ArchivePopupGroup[] {
240
- const groups: ArchivePopupGroup[] = [];
241
- items.forEach((item, index) => {
242
- const label = item.group?.trim() ?? '';
243
- const current = groups[groups.length - 1];
244
- if (!current || (label !== '' && label !== current.label)) {
245
- groups.push({ label, rows: [{ item, index }] });
246
- return;
247
- }
248
- current.rows.push({ item, index });
249
- });
250
- return groups;
251
- }
252
-
253
- export function getArchivePopupRowMedia(item: ArchivePopupContentItem | undefined): ArchivePopupMedia[] {
254
- const { image } = item ?? {};
255
- return (Array.isArray(image) ? image : image ? [image] : []).filter((media) => Boolean(media?.assetId));
256
- }
257
-
258
- function isVideoMedia(media: ArchivePopupMedia): boolean {
259
- if (media.type === 'video') return true;
260
- if (media.type === 'image') return false;
261
- return /\\.(mp4|webm|ogg|mov)(\\?|$)/i.test(media.name ?? '') || /\\.(mp4|webm|ogg|mov)(\\?|$)/i.test(media.assetId);
262
- }
263
-
264
- function findLayoutContainer(element: HTMLElement | null): HTMLElement | null {
265
- let el = element;
266
- while (el) {
267
- if (getComputedStyle(el).getPropertyValue('--cntrl-article-width').trim()) {
268
- return el;
269
- }
270
- el = el.parentElement;
271
- }
272
- return element;
273
- }
274
-
275
- function getLightboxLayoutStyle(container: HTMLElement | null): CSSProperties {
276
- const style: Record<string, string> = {};
277
- const layoutContainer = findLayoutContainer(container);
278
- if (!layoutContainer) return style;
279
- const computed = getComputedStyle(layoutContainer);
280
- for (const varName of LIGHTBOX_CSS_VARS) {
281
- const value = computed.getPropertyValue(varName).trim();
282
- if (value) {
283
- style[varName] = value;
284
- }
285
- }
286
- return style;
287
- }
288
-
289
- function resolveTextStyle(settings: ArchivePopupSettings, prefix: string, fallbackPrefix?: string): TextStyles {
290
- const values = settings as Record<string, unknown>;
291
- const read = <Key extends keyof TextStyleFields>(key: Key) => (
292
- values[\`\${prefix}\${key}\`] ?? (fallbackPrefix ? values[\`\${fallbackPrefix}\${key}\`] : undefined)
293
- ) as TextStyleFields[Key];
294
- const fontSettings = read('FontSettings');
295
- return {
296
- fontSettings: {
297
- fontFamily: read('FontFamily'),
298
- fontWeight: fontSettings?.fontWeight ?? 400,
299
- fontStyle: fontSettings?.fontStyle ?? 'normal',
300
- },
301
- fontSize: read('FontSize') ?? 0.01,
302
- lineHeight: read('LineHeight'),
303
- letterSpacing: read('LetterSpacing') ?? 0,
304
- wordSpacing: read('WordSpacing') ?? 0,
305
- textAlign: read('TextAlign'),
306
- textAppearance: read('TextAppearance'),
307
- color: '#000000',
308
- };
309
- }
310
-
311
- function getCSS(P: string): string {
312
- return \`
313
- .\${P}-trigger,
314
- .\${P}-close {
315
- display: inline-block;
316
- margin: 0;
317
- padding: 0;
318
- border: 0;
319
- background: none;
320
- cursor: pointer;
321
- white-space: nowrap;
322
- transition: color 150ms ease;
323
- -webkit-appearance: none;
324
- appearance: none;
325
- -webkit-tap-highlight-color: transparent;
326
- }
327
- .\${P}-trigger {
328
- color: var(--\${P}-trigger-color);
329
- transition: color 150ms ease, opacity \${OVERLAY_ANIM_MS}ms ease;
330
- }
331
- .\${P}-trigger-hidden {
332
- opacity: 0;
333
- }
334
- .\${P}-close {
335
- color: var(--\${P}-close-color);
336
- }
337
- .\${P}-trigger:focus,
338
- .\${P}-close:focus {
339
- outline: none;
340
- }
341
- .\${P}-trigger:focus-visible,
342
- .\${P}-close:focus-visible {
343
- outline: 1px solid currentColor;
344
- outline-offset: 2px;
345
- }
346
- .\${P}-interactive .\${P}-trigger:hover,
347
- .\${P}-state-hover .\${P}-trigger {
348
- color: var(--\${P}-trigger-hover-color, var(--\${P}-trigger-color));
349
- }
350
- .\${P}-close:hover {
351
- color: var(--\${P}-close-hover-color, var(--\${P}-close-color));
352
- }
353
- .\${P}-editor .\${P}-trigger {
354
- cursor: default;
355
- }
356
- .\${P}-overlay {
357
- position: fixed;
358
- inset: 0;
359
- z-index: 9997;
360
- overflow: hidden;
361
- overscroll-behavior: none;
362
- opacity: 0;
363
- pointer-events: none;
364
- transition: opacity \${OVERLAY_ANIM_MS}ms ease;
365
- }
366
- .\${P}-inline-layer {
367
- position: fixed;
368
- inset: 0;
369
- z-index: 9997;
370
- overflow: hidden;
371
- pointer-events: none;
372
- }
373
- .\${P}-overlay-editor {
374
- inset: auto;
375
- top: var(--cntrl-article-top, 0);
376
- left: var(--cntrl-article-left, 0);
377
- width: var(--cntrl-article-width, 100vw) !important;
378
- height: var(--cntrl-viewport-height, 100vh) !important;
379
- }
380
- .\${P}-overlay-edit-mode {
381
- z-index: 1;
382
- }
383
- .\${P}-overlay-active {
384
- opacity: 1;
385
- pointer-events: auto;
386
- }
387
- .\${P}-backdrop {
388
- position: absolute;
389
- inset: 0;
390
- background-color: var(--\${P}-overlay-color);
391
- }
392
- .\${P}-media-layer {
393
- position: absolute;
394
- inset: 0;
395
- pointer-events: none;
396
- }
397
- .\${P}-media {
398
- position: absolute;
399
- inset: 0;
400
- width: 100%;
401
- height: 100%;
402
- object-fit: cover;
403
- opacity: 0;
404
- transition: opacity \${IMAGE_FADE_MS}ms cubic-bezier(0, 0, 0.58, 1);
405
- }
406
- .\${P}-media-contain {
407
- object-fit: contain;
408
- }
409
- .\${P}-media-visible {
410
- opacity: 1;
411
- }
412
- .\${P}-close {
413
- position: absolute;
414
- z-index: 2;
415
- }
416
- .\${P}-panel {
417
- position: absolute;
418
- top: var(--\${P}-panel-y);
419
- left: var(--\${P}-panel-x);
420
- z-index: 1;
421
- box-sizing: border-box;
422
- max-width: 100%;
423
- max-height: 100%;
424
- overflow-y: auto;
425
- transform: translate(calc(-1 * var(--\${P}-panel-x)), calc(-1 * var(--\${P}-panel-y) + 12px));
426
- background-color: var(--\${P}-panel-color);
427
- color: var(--\${P}-text-color);
428
- overscroll-behavior: contain;
429
- transition: transform \${OVERLAY_ANIM_MS}ms cubic-bezier(0, 0, 0.58, 1);
430
- }
431
- .\${P}-overlay-active .\${P}-panel {
432
- transform: translate(calc(-1 * var(--\${P}-panel-x)), calc(-1 * var(--\${P}-panel-y)));
433
- }
434
- .\${P}-panel-settled {
435
- transition: none;
436
- }
437
- .\${P}-panel-inline {
438
- position: relative;
439
- top: auto;
440
- left: auto;
441
- max-height: none;
442
- transform: none;
443
- transition: none;
444
- }
445
- .\${P}-media-layer-instant .\${P}-media {
446
- transition: none;
447
- }
448
- .\${P}-panel-copy {
449
- position: absolute;
450
- pointer-events: none;
451
- }
452
- .\${P}-panel-copy .\${P}-row-active .\${P}-title {
453
- color: var(--\${P}-text-hover-color, var(--\${P}-text-color));
454
- }
455
- @media (prefers-reduced-motion: reduce) {
456
- .\${P}-panel {
457
- transition: none;
458
- }
459
- }
460
- .\${P}-group ~ .\${P}-group {
461
- margin-top: var(--\${P}-group-gap);
462
- }
463
- .\${P}-group {
464
- display: grid;
465
- grid-template-columns: var(--\${P}-grid-columns);
466
- column-gap: var(--\${P}-column-gap);
467
- }
468
- .\${P}-row {
469
- grid-column: 2 / -1;
470
- display: grid;
471
- grid-template-columns: subgrid;
472
- align-items: baseline;
473
- }
474
- .\${P}-group-unlabeled .\${P}-row {
475
- grid-column: 1 / -1;
476
- }
477
- .\${P}-group-label {
478
- grid-column: 1;
479
- align-self: start;
480
- min-width: 0;
481
- overflow-wrap: anywhere;
482
- }
483
- .\${P}-title {
484
- min-width: 0;
485
- overflow-wrap: anywhere;
486
- transition: color 150ms cubic-bezier(0, 0, 0.58, 1);
487
- }
488
- .\${P}-control-anchor {
489
- position: absolute;
490
- pointer-events: none;
491
- z-index: 2;
492
- }
493
- .\${P}-title a {
494
- text-decoration: inherit;
495
- }
496
- .\${P}-interactive .\${P}-row:hover .\${P}-title,
497
- .\${P}-row:focus-within .\${P}-title,
498
- .\${P}-state-hover .\${P}-row:first-of-type .\${P}-title {
499
- color: var(--\${P}-text-hover-color, var(--\${P}-text-color));
500
- }
501
- \`;
502
- }
503
-
504
- function ArchivePopupMediaItem({
505
- P,
506
- media,
507
- isVisible,
508
- }: {
509
- P: string;
510
- media: ArchivePopupMedia;
511
- isVisible: boolean;
512
- }) {
513
- const videoRef = useRef<HTMLVideoElement>(null);
514
- const [isLoaded, setIsLoaded] = useState(false);
515
- const isVideo = isVideoMedia(media);
516
- const className = cn(
517
- \`\${P}-media\`,
518
- media.objectFit === 'contain' && \`\${P}-media-contain\`,
519
- isVisible && isLoaded && \`\${P}-media-visible\`,
520
- );
521
-
522
- useEffect(() => {
523
- const video = videoRef.current;
524
- if (!isVideo || !video) return;
525
- if (isVisible) {
526
- video.play()?.catch(() => {});
527
- } else {
528
- video.pause();
529
- }
530
- }, [isVideo, isVisible]);
531
-
532
- if (isVideo) {
533
- return (
534
- <video
535
- ref={videoRef}
536
- className={className}
537
- src={media.assetId}
538
- muted
539
- loop
540
- playsInline
541
- preload="auto"
542
- onLoadedData={() => setIsLoaded(true)}
543
- />
544
- );
545
- }
546
-
547
- return (
548
- <img
549
- className={className}
550
- src={media.assetId}
551
- alt=""
552
- decoding="async"
553
- onLoad={() => setIsLoaded(true)}
554
- />
555
- );
556
- }
557
-
558
- // A line in each gap, at the right edge of the column it sizes, as Programme's are.
559
- function renderColumnWidthControls(
560
- P: string,
561
- widths: number[],
562
- paddingLeft: number,
563
- columnGap: number,
564
- scaled: (value: number) => string,
565
- ) {
566
- const lastWidth = widths[widths.length - 1];
567
- let columnLeft = paddingLeft;
568
- return widths.slice(0, -1).map((width, index) => {
569
- const gapCenter = columnLeft + width + columnGap / 2;
570
- columnLeft += width + columnGap;
571
- return (
572
- <div
573
- key={ARCHIVE_POPUP_COLUMN_WIDTH_KEYS[index]}
574
- data-controls={ARCHIVE_POPUP_COLUMN_WIDTH_KEYS[index]}
575
- data-controls-axis="x"
576
- data-controls-variant="column-width"
577
- data-controls-min={String(MIN_COLUMN_WIDTH_PX)}
578
- // a column grows into the last one, which the editor keeps from going under its own least
579
- data-controls-max-fraction={String(width + lastWidth)}
580
- className={\`\${P}-control-anchor\`}
581
- style={{ top: 0, left: scaled(gapCenter - COLUMN_RESIZE_HANDLE_WIDTH / 2), width: scaled(COLUMN_RESIZE_HANDLE_WIDTH), height: '100%' }}
582
- />
583
- );
584
- });
585
- }
586
-
587
- function renderPanelPaddingControls(
588
- P: string,
589
- panelWidth: number,
590
- padding: Padding,
591
- scaled: (value: number) => string,
592
- ) {
593
- const handleSize = (value: number) => scaled(Math.max(value, PADDING_HANDLE_SIZE));
594
- return (
595
- <>
596
- <div
597
- data-controls="panelPadding.top"
598
- data-controls-axis="y"
599
- data-controls-variant="row-padding"
600
- data-controls-min="0"
601
- className={\`\${P}-control-anchor\`}
602
- style={{ top: 0, left: 0, width: '100%', height: handleSize(padding.top) }}
603
- />
604
- <div
605
- data-controls="panelPadding.bottom"
606
- data-controls-axis="y"
607
- data-controls-variant="row-padding"
608
- data-controls-reverse=""
609
- data-controls-min="0"
610
- className={\`\${P}-control-anchor\`}
611
- style={{ bottom: 0, left: 0, width: '100%', height: handleSize(padding.bottom) }}
612
- />
613
- <div
614
- data-controls="panelPadding.left"
615
- data-controls-axis="x"
616
- data-controls-variant="column-padding"
617
- data-controls-min="0"
618
- data-controls-max-fraction={String(Math.max(0, panelWidth - padding.right))}
619
- className={\`\${P}-control-anchor\`}
620
- style={{ top: 0, left: 0, width: handleSize(padding.left), height: '100%' }}
621
- />
622
- <div
623
- data-controls="panelPadding.right"
624
- data-controls-axis="x"
625
- data-controls-variant="column-padding"
626
- data-controls-reverse=""
627
- data-controls-min="0"
628
- data-controls-max-fraction={String(Math.max(0, panelWidth - padding.left))}
629
- className={\`\${P}-control-anchor\`}
630
- style={{ top: 0, right: 0, width: handleSize(padding.right), height: '100%' }}
631
- />
632
- </>
633
- );
634
- }
635
-
636
- export function ArchivePopup({
637
- settings,
638
- content,
639
- isEditor,
640
- isEditMode,
641
- isPreviewMode,
642
- activeEvent,
643
- portalId,
644
- currentState,
645
- unavailableStates,
646
- }: ArchivePopupProps) {
647
- const { prefix: P } = useScopedStyles();
648
- const {
649
- type = 'b',
650
- triggerLabel = 'Archive',
651
- closeLabel = 'Close',
652
- columns = ARCHIVE_POPUP_DEFAULT_COLUMNS,
653
- columnGap = DEFAULT_COLUMN_GAP,
654
- hoverInterval = DEFAULT_HOVER_INTERVAL_MS,
655
- panelPosition,
656
- panelWidth = DEFAULT_PANEL_WIDTH,
657
- panelPadding = DEFAULT_PANEL_PADDING,
658
- panelRadius = 0,
659
- groupGap = 0.0139,
660
- triggerColor = '#000000',
661
- triggerHoverColor = '#666666',
662
- closeColor = '#000000',
663
- closeHoverColor = '#666666',
664
- panelColor = '#FFFFFF',
665
- textColor = '#333132',
666
- textHoverColor = '#BBBBBB',
667
- overlayColor = '#FFFFFFE6',
668
- } = settings;
669
- const items = content ?? [];
670
- const wrapperRef = useRef<HTMLDivElement>(null);
671
- const triggerRef = useRef<HTMLButtonElement>(null);
672
- const overlayRef = useRef<HTMLDivElement>(null);
673
- const closeRef = useRef<HTMLButtonElement>(null);
674
- const panelRef = useRef<HTMLDivElement>(null);
675
- const inlineLayerRef = useRef<HTMLDivElement>(null);
676
- const [isOpenUser, setIsOpen] = useState(false);
677
- const [isOverlayMounted, setIsOverlayMounted] = useState(false);
678
- const [isOverlayActive, setIsOverlayActive] = useState(false);
679
- const [isOverlaySettled, setIsOverlaySettled] = useState(false);
680
- const [activeIndex, setActiveIndex] = useState<number | null>(null);
681
- // Which of the hovered row's images shows, counted afresh on every hover.
682
- const [activeMediaIndex, setActiveMediaIndex] = useState(0);
683
- const [mountedMedia, setMountedMedia] = useState<Set<number>>(() => new Set());
684
- const [closePosition, setClosePosition] = useState<{ top: number; left: number } | null>(null);
685
- const [layoutStyle, setLayoutStyle] = useState<CSSProperties>({});
686
- const [copyRect, setCopyRect] = useState<{ top: number; left: number; width: number } | null>(null);
687
- const [isMediaCut, setIsMediaCut] = useState(false);
688
-
689
- const isEditorCanvas = Boolean(isEditor && !isPreviewMode);
690
- const isInteractive = !isEditor || Boolean(isPreviewMode);
691
- // A has no popup to open: its panel is always shown in place of the label.
692
- const isInline = type === 'a';
693
- const isOpenPinned = isEditorCanvas && currentState === 'open' && !unavailableStates?.includes('open');
694
- // Escape from preview lands in edit mode: a popup opened there stays open, with its controls.
695
- const isOpen = !isInline && (isOpenPinned || ((isInteractive || Boolean(isEditMode)) && isOpenUser));
696
- const scaled = (value: number) => scalingValue(value, isEditor ?? false);
697
- const scopedCss = useMemo(() => getCSS(P), [P]);
698
- const panelOffset = PANEL_POSITION_OFFSETS[panelPosition as ArchivePopupPanelPosition] ?? PANEL_POSITION_OFFSETS.center;
699
- const columnCount = getColumnCount(columns);
700
- const columnWidths = resolveArchivePopupColumnWidths(settings);
701
- // the group takes the first column, the titles the rest
702
- const titleKeys = ['title', ...ARCHIVE_POPUP_EXTRA_TITLE_KEYS].slice(0, columnCount - 1) as Array<'title' | typeof ARCHIVE_POPUP_EXTRA_TITLE_KEYS[number]>;
703
- // With the first column alone there is nothing for a group to span, so every row shows its own first column, as one list.
704
- const hasGroupColumn = columnCount > 1;
705
- const groups = useMemo<ArchivePopupGroup[]>(() => (
706
- hasGroupColumn
707
- ? groupArchiveRows(content ?? [])
708
- : [{ label: '', rows: (content ?? []).map((item, index) => ({ item, index })) }]
709
- ), [content, hasGroupColumn]);
710
-
711
- useLightboxScrollLock(isOpen && !isEditorCanvas);
712
-
713
- useEffect(() => {
714
- if (isEditorCanvas && !isEditMode) setIsOpen(false);
715
- }, [isEditorCanvas, isEditMode]);
716
-
717
- useEffect(() => {
718
- if (isOpen) {
719
- setLayoutStyle(getLightboxLayoutStyle(wrapperRef.current));
720
- setIsOverlayMounted(true);
721
- return;
722
- }
723
- setIsOverlayActive(false);
724
- setActiveIndex(null);
725
- const timer = window.setTimeout(() => setIsOverlayMounted(false), OVERLAY_ANIM_MS);
726
- return () => window.clearTimeout(timer);
727
- }, [isOpen]);
728
-
729
- // Activate only after the mounted overlay's hidden styles are applied, or the appear has nothing to transition from.
730
- useEffect(() => {
731
- if (!isOpen || !isOverlayMounted) return;
732
- overlayRef.current?.getBoundingClientRect();
733
- const frame = requestAnimationFrame(() => setIsOverlayActive(true));
734
- return () => cancelAnimationFrame(frame);
735
- }, [isOpen, isOverlayMounted]);
736
-
737
- // Canvas controls measure their anchors once, so they wait for the panel to finish sliding in.
738
- useEffect(() => {
739
- if (!isOverlayActive) {
740
- setIsOverlaySettled(false);
741
- return;
742
- }
743
- const timer = window.setTimeout(() => setIsOverlaySettled(true), OVERLAY_ANIM_MS);
744
- return () => window.clearTimeout(timer);
745
- }, [isOverlayActive]);
746
-
747
- // The close button sits exactly where the trigger is, so the label swaps in place.
748
- const updateClosePosition = useCallback(() => {
749
- const trigger = triggerRef.current;
750
- const overlay = overlayRef.current;
751
- if (!trigger || !overlay) return;
752
- const triggerRect = trigger.getBoundingClientRect();
753
- const overlayRect = overlay.getBoundingClientRect();
754
- setClosePosition({ top: triggerRect.top - overlayRect.top, left: triggerRect.left - overlayRect.left });
755
- }, []);
756
-
757
- useLayoutEffect(() => {
758
- if (!isOverlayMounted) return;
759
- updateClosePosition();
760
- window.addEventListener('resize', updateClosePosition);
761
- return () => window.removeEventListener('resize', updateClosePosition);
762
- }, [isOverlayMounted, updateClosePosition]);
763
-
764
- useEffect(() => {
765
- if (!isOpen || !isInteractive) return;
766
- closeRef.current?.focus({ preventScroll: true });
767
- const onKeyDown = (event: KeyboardEvent) => {
768
- if (event.key === 'Escape') setIsOpen(false);
769
- };
770
- document.addEventListener('keydown', onKeyDown);
771
- return () => document.removeEventListener('keydown', onKeyDown);
772
- }, [isOpen, isInteractive]);
773
-
774
- // A's media fills the screen above the page, so a copy of the panel is laid exactly over the real one to stay readable.
775
- useLayoutEffect(() => {
776
- if (!isInline || activeIndex === null) return;
777
- const panelEl = panelRef.current;
778
- const layer = inlineLayerRef.current;
779
- if (!panelEl || !layer) return;
780
- const panelRect = panelEl.getBoundingClientRect();
781
- const layerRect = layer.getBoundingClientRect();
782
- setCopyRect({ top: panelRect.top - layerRect.top, left: panelRect.left - layerRect.left, width: panelRect.width });
783
- }, [isInline, activeIndex]);
784
-
785
- // The copy stays over the list while the media fades out, so the list never shows through a fading image.
786
- useEffect(() => {
787
- if (activeIndex !== null) return;
788
- const timer = window.setTimeout(() => setCopyRect(null), IMAGE_FADE_MS);
789
- return () => window.clearTimeout(timer);
790
- }, [activeIndex]);
791
-
792
- // The copy is only true to the panel until the page moves, so scrolling cuts the media at once rather than locking it,
793
- // fading out included: a copy left over the list would stay put while the list scrolls away under it.
794
- const isCopyShown = copyRect !== null;
795
- useEffect(() => {
796
- if (!isInline || !isCopyShown) return;
797
- const cut = () => {
798
- setIsMediaCut(true);
799
- setActiveIndex(null);
800
- setCopyRect(null);
801
- };
802
- document.addEventListener('scroll', cut, { capture: true, passive: true });
803
- window.addEventListener('resize', cut);
804
- return () => {
805
- document.removeEventListener('scroll', cut, { capture: true });
806
- window.removeEventListener('resize', cut);
807
- };
808
- }, [isInline, isCopyShown]);
809
-
810
- const close = () => {
811
- if (!isInteractive) return;
812
- setIsOpen(false);
813
- triggerRef.current?.focus({ preventScroll: true });
814
- };
815
-
816
- // Every row's images are fetched once the list can be hovered, so a row's first hover shows its image at once
817
- // rather than after it loads; videos are left to load on hover.
818
- const isListShown = isInteractive && (isInline || isOpen);
819
- useEffect(() => {
820
- if (!isListShown) return;
821
- (content ?? []).forEach((item) => getArchivePopupRowMedia(item).forEach((media) => {
822
- if (!isVideoMedia(media)) new Image().src = media.assetId;
823
- }));
824
- }, [isListShown, content]);
825
-
826
- // A hovered row with several images shows them in turn, round and round, for as long as it stays hovered.
827
- const activeRowMediaCount = activeIndex === null ? 0 : getArchivePopupRowMedia(items[activeIndex]).length;
828
- useEffect(() => {
829
- if (activeRowMediaCount < 2) return;
830
- const timer = window.setInterval(() => {
831
- setActiveMediaIndex((current) => (current + 1) % activeRowMediaCount);
832
- }, Math.max(100, hoverInterval));
833
- return () => window.clearInterval(timer);
834
- }, [activeIndex, activeRowMediaCount, hoverInterval]);
835
-
836
- const showRowMedia = (index: number) => {
837
- if (!isInteractive || getArchivePopupRowMedia(items[index]).length === 0) {
838
- setActiveIndex(null);
839
- return;
840
- }
841
- // A row's images all load on its first hover, so the next is ready by the time it shows.
842
- setMountedMedia((prev) => (prev.has(index) ? prev : new Set(prev).add(index)));
843
- if (isInline && activeIndex === null) setLayoutStyle(getLightboxLayoutStyle(wrapperRef.current));
844
- if (activeIndex !== index) setActiveMediaIndex(0);
845
- setIsMediaCut(false);
846
- setActiveIndex(index);
847
- };
848
-
849
- const hideRowMedia = (index: number) => {
850
- setActiveIndex((current) => (current === index ? null : current));
851
- };
852
-
853
- // Title links only navigate on a live page or in preview, not on the editor canvas.
854
- const onPanelClickCapture = (event: MouseEvent<HTMLDivElement>) => {
855
- if (!isInteractive && (event.target as HTMLElement).closest('a')) {
856
- event.preventDefault();
857
- }
858
- };
859
-
860
- const triggerTypographyCss = omitTextColors(textStylesToCss(resolveTextStyle(settings, 'trigger'), isEditor));
861
- const columnTypographyCss = ARCHIVE_POPUP_COLUMN_STYLE_PREFIXES.slice(0, columnCount).map((prefix) => (
862
- omitTextColors(textStylesToCss(resolveTextStyle(settings, prefix, 'list'), isEditor))
863
- ));
864
- // Half the difference of the two line heights sets the label's first line on the first title's, exactly
865
- // while both columns share a font size.
866
- const labelLineHeight = columnTypographyCss[0].lineHeight;
867
- const titleLineHeight = columnTypographyCss[1]?.lineHeight;
868
- const groupLabelOffset = labelLineHeight !== undefined && titleLineHeight !== undefined
869
- ? \`calc((\${titleLineHeight} - \${labelLineHeight}) / 2)\`
870
- : undefined;
871
-
872
- const colorVars = buildColorVars(P, {
873
- triggerColor,
874
- triggerHoverColor,
875
- closeColor,
876
- closeHoverColor,
877
- panelColor,
878
- textColor,
879
- textHoverColor,
880
- overlayColor,
881
- }, COLOR_VAR_MAP, STATE_KEYS);
882
- const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
883
- const interactiveClass = isInteractive ? \`\${P}-interactive\` : '';
884
-
885
- const mediaLayer = (
886
- <div className={cn(\`\${P}-media-layer\`, isMediaCut && \`\${P}-media-layer-instant\`)} aria-hidden="true">
887
- {[...mountedMedia].flatMap((index) => getArchivePopupRowMedia(items[index]).map((media, mediaIndex) => (
888
- <ArchivePopupMediaItem
889
- key={\`\${index}-\${mediaIndex}-\${media.assetId}\`}
890
- P={P}
891
- media={media}
892
- isVisible={activeIndex === index && activeMediaIndex === mediaIndex}
893
- />
894
- )))}
895
- </div>
896
- );
897
- // Inline there is no slide-in to wait for, so the canvas controls can measure straight away.
898
- const showPanelControls = Boolean(isEditMode) && (isInline || isOverlaySettled);
899
-
900
- const renderPanel = (isCopy: boolean) => (
901
- <div
902
- ref={isCopy ? undefined : panelRef}
903
- className={cn(
904
- \`\${P}-panel\`,
905
- // Only the open and close slide; once open, a new position or size moves the panel straight there.
906
- isOverlayActive && isOverlaySettled && \`\${P}-panel-settled\`,
907
- isInline && \`\${P}-panel-inline\`,
908
- isCopy && \`\${P}-panel-copy\`,
909
- )}
910
- style={{
911
- width: scaled(panelWidth),
912
- paddingTop: scaled(panelPadding.top),
913
- paddingRight: scaled(panelPadding.right),
914
- paddingBottom: scaled(panelPadding.bottom),
915
- paddingLeft: scaled(panelPadding.left),
916
- borderRadius: scaled(panelRadius),
917
- [\`--\${P}-group-gap\`]: scaled(groupGap),
918
- [\`--\${P}-panel-x\`]: panelOffset.x,
919
- [\`--\${P}-panel-y\`]: panelOffset.y,
920
- [\`--\${P}-grid-columns\`]: getGridTemplateColumns(columnWidths),
921
- [\`--\${P}-column-gap\`]: scaled(columnGap),
922
- ...(isCopy && copyRect ? { top: copyRect.top, left: copyRect.left, width: copyRect.width } : {}),
923
- } as CSSProperties}
924
- data-lightbox-scrollable={isInline ? undefined : ''}
925
- aria-hidden={isCopy || undefined}
926
- onMouseLeave={isCopy ? undefined : () => setActiveIndex(null)}
927
- onClickCapture={isCopy ? undefined : onPanelClickCapture}
928
- >
929
- {!isCopy && showPanelControls && renderPanelPaddingControls(P, panelWidth, panelPadding, scaled)}
930
- {!isCopy && showPanelControls && renderColumnWidthControls(P, columnWidths, panelPadding.left, columnGap, scaled)}
931
- {groups.map((group, groupIndex) => (
932
- <Fragment key={groupIndex}>
933
- {!isCopy && showPanelControls && groupIndex > 0 && (
934
- // Left at its static top, the anchor sits right where the gap above this group starts.
935
- <div
936
- data-controls="groupGap"
937
- data-controls-paired=""
938
- data-controls-axis="y"
939
- data-controls-reverse=""
940
- data-controls-min="0"
941
- className={\`\${P}-control-anchor\`}
942
- style={{ left: 0, width: '100%', height: scaled(Math.max(groupGap, PADDING_HANDLE_SIZE)) }}
943
- />
944
- )}
945
- {/* The label spans its group's rows, so its line height spaces only its own lines, never the rows beside it;
946
- a label longer than its rows grows the last track, below them. */}
947
- <div
948
- className={cn(\`\${P}-group\`, !hasGroupColumn && \`\${P}-group-unlabeled\`)}
949
- style={{ gridTemplateRows: \`repeat(\${group.rows.length}, auto) 1fr\` }}
950
- >
951
- {hasGroupColumn && (
952
- <span
953
- className={\`\${P}-group-label\`}
954
- style={{ ...columnTypographyCss[0], gridRow: \`1 / span \${group.rows.length + 1}\`, marginTop: groupLabelOffset }}
955
- >
956
- {group.label}
957
- </span>
958
- )}
959
- {group.rows.map(({ item, index }) => (
960
- <div
961
- key={index}
962
- className={cn(\`\${P}-row\`, isCopy && index === activeIndex && \`\${P}-row-active\`)}
963
- {...(isCopy ? {} : {
964
- onMouseEnter: () => showRowMedia(index),
965
- onMouseLeave: () => hideRowMedia(index),
966
- onFocus: () => showRowMedia(index),
967
- onBlur: () => hideRowMedia(index),
968
- })}
969
- >
970
- {!hasGroupColumn && (
971
- <div className={\`\${P}-title\`} style={columnTypographyCss[0]}>{item.group}</div>
972
- )}
973
- {titleKeys.map((key, titleIndex) => {
974
- const title = item[key];
975
- return (
976
- <div key={key} className={\`\${P}-title\`} style={columnTypographyCss[titleIndex + 1]}>
977
- {Array.isArray(title) ? <RichTextRenderer content={title} /> : title}
978
- </div>
979
- );
980
- })}
981
- </div>
982
- ))}
983
- </div>
984
- </Fragment>
985
- ))}
986
- </div>
987
- );
988
-
989
- const overlay = isOverlayMounted ? (
990
- <div
991
- ref={overlayRef}
992
- className={cn(
993
- \`\${P}-overlay\`,
994
- isEditor && \`\${P}-overlay-editor\`,
995
- isEditMode && \`\${P}-overlay-edit-mode\`,
996
- isOverlayActive && \`\${P}-overlay-active\`,
997
- interactiveClass,
998
- stateClass,
999
- )}
1000
- style={{ ...colorVars, ...layoutStyle }}
1001
- role="dialog"
1002
- aria-modal="true"
1003
- aria-label={triggerLabel}
1004
- data-selection="none"
1005
- >
1006
- <div className={\`\${P}-backdrop\`} aria-hidden="true" onClick={close} />
1007
- {mediaLayer}
1008
- <button
1009
- ref={closeRef}
1010
- type="button"
1011
- className={\`\${P}-close\`}
1012
- style={{
1013
- ...triggerTypographyCss,
1014
- top: closePosition?.top ?? 0,
1015
- left: closePosition?.left ?? 0,
1016
- visibility: closePosition ? 'visible' : 'hidden',
1017
- }}
1018
- onClick={close}
1019
- >
1020
- {closeLabel}
1021
- </button>
1022
- {renderPanel(false)}
1023
- </div>
1024
- ) : null;
1025
-
1026
- const inlineLayer = isInline && mountedMedia.size > 0 ? (
1027
- <div
1028
- ref={inlineLayerRef}
1029
- className={cn(\`\${P}-inline-layer\`, isEditor && \`\${P}-overlay-editor\`, interactiveClass, stateClass)}
1030
- style={{ ...colorVars, ...layoutStyle }}
1031
- aria-hidden="true"
1032
- data-selection="none"
1033
- >
1034
- {mediaLayer}
1035
- {copyRect && renderPanel(true)}
1036
- </div>
1037
- ) : null;
1038
- const portalContent = overlay ?? inlineLayer;
1039
-
1040
- return (
1041
- <>
1042
- <style dangerouslySetInnerHTML={{ __html: scopedCss }} />
1043
- <div
1044
- ref={wrapperRef}
1045
- className={cn(isEditorCanvas && \`\${P}-editor\`, interactiveClass, stateClass)}
1046
- style={colorVars}
1047
- >
1048
- {isInline ? renderPanel(false) : (
1049
- // The overlay lets the page show through, so the label fades out with it rather than sit under the close.
1050
- // Only faded, it keeps the component's size and can still take focus back on close.
1051
- <button
1052
- ref={triggerRef}
1053
- type="button"
1054
- className={cn(\`\${P}-trigger\`, isOverlayActive && \`\${P}-trigger-hidden\`)}
1055
- style={triggerTypographyCss}
1056
- aria-haspopup="dialog"
1057
- aria-expanded={isOpen}
1058
- onClick={() => {
1059
- if (isInteractive) setIsOpen(true);
1060
- }}
1061
- >
1062
- {triggerLabel}
1063
- </button>
1064
- )}
1065
- </div>
1066
- {portalContent && typeof document !== 'undefined' && createPortal(
1067
- portalContent,
1068
- (portalId ? document.getElementById(portalId) : null) ?? document.body,
1069
- )}
1070
- </>
1071
- );
1072
- }
1073
- `,t=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./PretextComponent-DWOy-dqD.js"),e=`import { Fragment, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type MouseEvent, type PointerEvent, type ReactNode } from 'react';
1074
2
  import { CommonComponentProps } from '../props';
1075
3
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
1076
4
  import { useLightboxScrollLock } from '../utils/useLightboxScrollLock';
@@ -1129,6 +57,7 @@ type BurgerPosition =
1129
57
  type BurgerSettings = {
1130
58
  link?: BurgerLink[];
1131
59
  logo?: BurgerLogo | null;
60
+ logoLink?: string;
1132
61
  logoMaxWidth?: number;
1133
62
  logoMaxHeight?: number;
1134
63
  logoPosition?: BurgerLogoPosition;
@@ -1222,7 +151,7 @@ function resolveCurrentState(value?: string | null): BurgerVisualState | undefin
1222
151
  return undefined;
1223
152
  }
1224
153
 
1225
- type BurgerShowIn = 'always' | 'open only' | 'open and compact' | 'default and open' | 'default and compact';
154
+ type BurgerShowIn = 'always' | 'open only' | 'default only' | 'open and compact' | 'default and open' | 'default and compact';
1226
155
 
1227
156
  function resolveLogoPosition(value?: string): BurgerLogoPosition {
1228
157
  if (value === 'center' || value === 'right') return value;
@@ -1260,6 +189,7 @@ function pickShowIn(value?: BurgerShowInValue, layoutId?: string): string | unde
1260
189
  function resolveShowIn(value?: BurgerShowInValue, layoutId?: string): BurgerShowIn {
1261
190
  const showIn = (pickShowIn(value, layoutId) ?? 'always').trim().toLowerCase().replace(/[_-]+/g, ' ');
1262
191
  if (showIn === 'open only' || showIn === 'openonly') return 'open only';
192
+ if (showIn === 'default only' || showIn === 'defaultonly') return 'default only';
1263
193
  if (showIn === 'open and compact' || showIn === 'openandcompact') return 'open and compact';
1264
194
  if (showIn === 'default and open' || showIn === 'defaultandopen') return 'default and open';
1265
195
  if (showIn === 'default and compact' || showIn === 'defaultandcompact') return 'default and compact';
@@ -1270,6 +200,8 @@ function isVisibleInClosedNav(item: BurgerLink, navigationState: BurgerNavigatio
1270
200
  switch (resolveShowIn(item.showIn, layoutId)) {
1271
201
  case 'open only':
1272
202
  return false;
203
+ case 'default only':
204
+ return navigationState === 'default';
1273
205
  case 'open and compact':
1274
206
  return navigationState === 'compact';
1275
207
  case 'default and compact':
@@ -1283,6 +215,7 @@ function isVisibleInClosedNav(item: BurgerLink, navigationState: BurgerNavigatio
1283
215
 
1284
216
  function isVisibleInOpenNav(item: BurgerLink, layoutId?: string): boolean {
1285
217
  switch (resolveShowIn(item.showIn, layoutId)) {
218
+ case 'default only':
1286
219
  case 'default and compact':
1287
220
  return false;
1288
221
  default:
@@ -1290,6 +223,12 @@ function isVisibleInOpenNav(item: BurgerLink, layoutId?: string): boolean {
1290
223
  }
1291
224
  }
1292
225
 
226
+ /** The open menu is unavailable when every link is shown in the default state only. */
227
+ export function isBurgerOpenMenuAvailable(links: unknown, layoutId?: string): boolean {
228
+ if (!Array.isArray(links) || links.length === 0) return true;
229
+ return (links as BurgerLink[]).some((item) => resolveShowIn(item?.showIn, layoutId) !== 'default only');
230
+ }
231
+
1293
232
  type BurgerPageRef = {
1294
233
  id: string;
1295
234
  slug: string;
@@ -1345,6 +284,13 @@ function getBurgerDest(item: BurgerLink): {
1345
284
  return { type: 'page', value: item.page ?? '', target, anchor: item.anchor };
1346
285
  }
1347
286
 
287
+ function normalizeLogoHref(value: string): string {
288
+ if (/^[a-z][a-z\\d+\\-.]*:/i.test(value) || value.startsWith('/') || value.startsWith('#')) {
289
+ return value;
290
+ }
291
+ return \`https://\${value}\`;
292
+ }
293
+
1348
294
  function resolveBurgerLink(item: BurgerLink, pages?: BurgerPageRef[]): {
1349
295
  label: string;
1350
296
  href: string;
@@ -2373,6 +1319,14 @@ function getCSS(P: string): string {
2373
1319
  right: 0;
2374
1320
  transform: none;
2375
1321
  }
1322
+ .\${P}-nav-logo-link {
1323
+ display: flex;
1324
+ align-items: center;
1325
+ height: 100%;
1326
+ color: inherit;
1327
+ text-decoration: none;
1328
+ cursor: pointer;
1329
+ }
2376
1330
  .\${P}-nav-logo-inner {
2377
1331
  position: relative;
2378
1332
  flex-shrink: 0;
@@ -2969,8 +1923,9 @@ export function Burger({
2969
1923
  const pinnedState = resolveCurrentState(currentStateProp);
2970
1924
  const unavailableStateSet = useMemo(() => new Set(unavailableStates), [unavailableStates]);
2971
1925
  const isStateUnavailable = (state?: string | null) => Boolean(state && unavailableStateSet.has(state));
1926
+ const isOpenMenuAvailable = isBurgerOpenMenuAvailable(settingsProp.link, layoutId);
2972
1927
  const isOpenPinned = Boolean(isEditor && !isPreviewMode && pinnedState === 'open' && !isStateUnavailable('open'));
2973
- const isOpen = isOpenPinned || (!(isEditor && !isPreviewMode) && isOpenUser);
1928
+ const isOpen = isOpenMenuAvailable && (isOpenPinned || (!(isEditor && !isPreviewMode) && isOpenUser));
2974
1929
  const isEditorCanvas = Boolean(isEditor && !isPreviewMode);
2975
1930
  const shouldLockScroll = isOpen && !isEditorCanvas;
2976
1931
  useLightboxScrollLock(shouldLockScroll);
@@ -3003,6 +1958,7 @@ export function Burger({
3003
1958
 
3004
1959
  const {
3005
1960
  logo,
1961
+ logoLink = '',
3006
1962
  logoMaxHeight = 120 / 1440,
3007
1963
  logoPosition = 'left',
3008
1964
  panelHeight = 60 / 1440,
@@ -3096,7 +2052,7 @@ export function Burger({
3096
2052
  const closedNavPaddingRight = isCompactNav ? compactNavPaddingRight : navPaddingRight;
3097
2053
 
3098
2054
  const resolvedNavTextWidth = closedNavTextWidth ?? textWidth;
3099
- const showBurgerButton = isOpen || (isCompactNav ? compactShowIcon : showIcon) !== 'off';
2055
+ const showBurgerButton = isOpen || (isOpenMenuAvailable && (isCompactNav ? compactShowIcon : showIcon) !== 'off');
3100
2056
 
3101
2057
  const colorVars = buildColorVars(P, {
3102
2058
  iconColor,
@@ -3283,6 +2239,9 @@ export function Burger({
3283
2239
  const tintLogo = Boolean(logoMaskUrl);
3284
2240
  const logoHeight = scaled(Math.min(closedLogoMaxHeight, closedPanelHeight));
3285
2241
  const isLogoOnRight = Boolean(showLogo && logoSrc && closedLogoPosition === 'right');
2242
+ const logoLinkItem: BurgerLink | null = logoLink.trim()
2243
+ ? { link: { type: 'url', value: normalizeLogoHref(logoLink.trim()), target: 'self' } }
2244
+ : null;
3286
2245
  const toggleSide = isLogoOnRight ? 'left' : 'right';
3287
2246
 
3288
2247
  const items = Array.isArray(linkItems) ? linkItems : [];
@@ -3633,6 +2592,23 @@ export function Burger({
3633
2592
  );
3634
2593
  };
3635
2594
 
2595
+ const logoNode = (
2596
+ <div
2597
+ className={\`\${P}-nav-logo-inner\${tintLogo ? \` \${P}-nav-logo-tinted\` : ''}\`}
2598
+ style={{
2599
+ height: logoHeight,
2600
+ ...(tintLogo && logoMaskUrl ? { [\`--\${P}-logo-image\`]: cssMaskImageUrl(logoMaskUrl) } : {}),
2601
+ } as CSSProperties}
2602
+ >
2603
+ <img
2604
+ src={tintLogo && logoMaskUrl ? logoMaskUrl : logoSrc}
2605
+ alt=""
2606
+ className={\`\${P}-nav-logo-img\`}
2607
+ />
2608
+ {tintLogo ? <span className={\`\${P}-nav-logo-tint\`} aria-hidden="true" /> : null}
2609
+ </div>
2610
+ );
2611
+
3636
2612
  const navBarStyle: CSSProperties = {
3637
2613
  ...colorVars,
3638
2614
  height: scalingValue(closedPanelHeight, isEditor),
@@ -3667,20 +2643,16 @@ export function Burger({
3667
2643
  {showLogo && logoSrc ? (
3668
2644
  <div className={\`\${P}-nav-logo \${P}-nav-logo-\${closedLogoPosition}\`}>
3669
2645
  {closedLogoPosition === 'left' ? renderNavEdgePadding('left') : null}
3670
- <div
3671
- className={\`\${P}-nav-logo-inner\${tintLogo ? \` \${P}-nav-logo-tinted\` : ''}\`}
3672
- style={{
3673
- height: logoHeight,
3674
- ...(tintLogo && logoMaskUrl ? { [\`--\${P}-logo-image\`]: cssMaskImageUrl(logoMaskUrl) } : {}),
3675
- } as CSSProperties}
3676
- >
3677
- <img
3678
- src={tintLogo && logoMaskUrl ? logoMaskUrl : logoSrc}
3679
- alt=""
3680
- className={\`\${P}-nav-logo-img\`}
3681
- />
3682
- {tintLogo ? <span className={\`\${P}-nav-logo-tint\`} aria-hidden="true" /> : null}
3683
- </div>
2646
+ {logoLinkItem ? (
2647
+ <a
2648
+ href={logoLinkItem.link?.value}
2649
+ className={\`\${P}-nav-logo-link\`}
2650
+ aria-label="Home"
2651
+ onClick={(event) => onNavLinkClick(event, logoLinkItem)}
2652
+ >
2653
+ {logoNode}
2654
+ </a>
2655
+ ) : logoNode}
3684
2656
  {closedLogoPosition === 'right' ? renderNavEdgePadding('right') : null}
3685
2657
  </div>
3686
2658
  ) : null}
@@ -3711,7 +2683,7 @@ export function Burger({
3711
2683
  </div>
3712
2684
  );
3713
2685
  }
3714
- `,i=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2686
+ `,t=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
3715
2687
  import { CommonComponentProps } from '../props';
3716
2688
  import { LinkWrapper, useScopedStyles, type ContentLink } from '../utils/index';
3717
2689
 
@@ -4240,7 +3212,7 @@ export function ClickGallerie({ settings, content = [], isEditor }: ClickGalleri
4240
3212
  </>
4241
3213
  );
4242
3214
  }
4243
- `,o=`import { useCallback, useEffect, useMemo, useState } from 'react';
3215
+ `,i=`import { useCallback, useEffect, useMemo, useState } from 'react';
4244
3216
  import cn from 'classnames';
4245
3217
  import { CommonComponentProps } from '../props';
4246
3218
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils/index';
@@ -4988,7 +3960,7 @@ export function FAQ({ settings, content, isEditor, isPreviewMode, isEditMode, ac
4988
3960
  </>
4989
3961
  );
4990
3962
  }
4991
- `,r=`import React, { useMemo, useState } from 'react';
3963
+ `,o=`import React, { useMemo, useState } from 'react';
4992
3964
  import { CommonComponentProps } from '../props';
4993
3965
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
4994
3966
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -5626,7 +4598,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
5626
4598
  };
5627
4599
 
5628
4600
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
5629
- `,a=`import { Splide, SplideSlide } from '@splidejs/react-splide';
4601
+ `,r=`import { Splide, SplideSlide } from '@splidejs/react-splide';
5630
4602
  import '@splidejs/react-splide/css/core';
5631
4603
  import { CommonComponentProps } from '../props';
5632
4604
  import { EmbedMediaFrame, getEmbedAspect, getEmbedPlayback, isEmbedMedia } from '../utils/index';
@@ -7941,7 +6913,7 @@ const COLOR_VAR_MAP: Record<ColorKeys, string> = {
7941
6913
  };
7942
6914
 
7943
6915
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
7944
- `,s=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
6916
+ `,a=`import { useEffect, useMemo, useRef, type CSSProperties } from 'react';
7945
6917
  import { CommonComponentProps } from '../props';
7946
6918
  import { scalingValue } from '../utils/scalingValue';
7947
6919
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -8514,7 +7486,7 @@ export function Helix({
8514
7486
  </>
8515
7487
  );
8516
7488
  }
8517
- `,l=`import { CommonComponentProps } from '../props';
7489
+ `,s=`import { CommonComponentProps } from '../props';
8518
7490
  import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia, scalingValue, useLazyVideos, useScopedStyles } from '../utils/index';
8519
7491
  import { LazyVideo } from '../helpers/LazyVideo/LazyVideo';
8520
7492
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
@@ -8525,6 +7497,7 @@ import {
8525
7497
  type HiveLightboxTitleSettings,
8526
7498
  } from './HiveLightboxTitles';
8527
7499
  import { getDisplayedImageRect } from '../utils/getImageRect';
7500
+ import { textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
8528
7501
 
8529
7502
  function sv(px: number): string {
8530
7503
  return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
@@ -8851,6 +7824,13 @@ function getCSS(P: string): string {
8851
7824
  pointer-events: auto;
8852
7825
  flex-shrink: 0;
8853
7826
  }
7827
+ .\${P}-item-text {
7828
+ flex-shrink: 0;
7829
+ margin: 0;
7830
+ white-space: normal;
7831
+ overflow-wrap: anywhere;
7832
+ word-break: break-word;
7833
+ }
8854
7834
  \`;
8855
7835
  }
8856
7836
 
@@ -8863,8 +7843,20 @@ type GridLayoutConfig = {
8863
7843
  };
8864
7844
 
8865
7845
  type HiveSettings = {
7846
+ type?: 'a' | 'b';
8866
7847
  gridLayout: GridLayoutConfig;
8867
7848
  verticalGap: number;
7849
+ textBoxWidth?: number;
7850
+ textMarginTop?: number;
7851
+ entryTitleColor?: string;
7852
+ entryTitleFontFamily?: string;
7853
+ entryTitleFontSettings?: { fontWeight: number; fontStyle: string };
7854
+ entryTitleFontSize?: number;
7855
+ entryTitleLineHeight?: number;
7856
+ entryTitleLetterSpacing?: number;
7857
+ entryTitleWordSpacing?: number;
7858
+ entryTitleTextAlign?: TextStyles['textAlign'];
7859
+ entryTitleTextAppearance?: TextStyles['textAppearance'];
8868
7860
  align?: 'top' | 'center' | 'bottom';
8869
7861
  imageDisplay: {
8870
7862
  display: 'fit' | 'cover';
@@ -10655,7 +9647,16 @@ export function Hive({
10655
9647
  portalId,
10656
9648
  }: HiveProps) {
10657
9649
  const { prefix: P } = useScopedStyles();
10658
- const { gridLayout, verticalGap, align = 'top', imageDisplay } = settings;
9650
+ const {
9651
+ type = 'a',
9652
+ gridLayout,
9653
+ verticalGap,
9654
+ textBoxWidth = 100,
9655
+ textMarginTop = 0,
9656
+ align = 'top',
9657
+ imageDisplay,
9658
+ } = settings;
9659
+ const showEntryText = type === 'b';
10659
9660
 
10660
9661
  const isCover = imageDisplay?.display === 'cover';
10661
9662
  const ratioValue = imageDisplay?.ratioValue ?? '1:1';
@@ -10671,6 +9672,27 @@ export function Hive({
10671
9672
  const horizontalGapScaled = scalingValue(gridLayout.horizontalGap ?? 0, isEditor);
10672
9673
  const imageWrapperWidth = entryWidthScaled;
10673
9674
  const controlWidthStyle = entryWidthScaled;
9675
+ const textBoxWidthStyle = \`calc(\${entryWidthScaled} * (\${textBoxWidth} / 100))\`;
9676
+ const textControlWidthStyle = scalingValue(size * textBoxWidth / 100, isEditor);
9677
+ // like Neptune, a text box wider than the entry widens the whole cell so the image stays centered
9678
+ const itemInnerWidth = showEntryText && textBoxWidth > 100 ? textBoxWidthStyle : entryWidthScaled;
9679
+ const entryTextStyle = useMemo(
9680
+ () => textStylesToCss({
9681
+ fontSettings: {
9682
+ fontFamily: settings.entryTitleFontFamily ?? 'Arial',
9683
+ fontWeight: settings.entryTitleFontSettings?.fontWeight ?? 400,
9684
+ fontStyle: settings.entryTitleFontSettings?.fontStyle ?? 'normal',
9685
+ },
9686
+ fontSize: settings.entryTitleFontSize ?? 0.0098,
9687
+ lineHeight: settings.entryTitleLineHeight,
9688
+ letterSpacing: settings.entryTitleLetterSpacing ?? 0,
9689
+ wordSpacing: settings.entryTitleWordSpacing ?? 0,
9690
+ textAlign: settings.entryTitleTextAlign ?? 'left',
9691
+ textAppearance: settings.entryTitleTextAppearance,
9692
+ color: settings.entryTitleColor ?? '#000000',
9693
+ }, isEditor),
9694
+ [settings, isEditor],
9695
+ );
10674
9696
 
10675
9697
  const imageWrapperStyle: React.CSSProperties = {
10676
9698
  width: imageWrapperWidth,
@@ -10855,7 +9877,7 @@ export function Hive({
10855
9877
  isLastRow ? \`\${P}-item-inner-last-row\` : '',
10856
9878
  ].filter(Boolean).join(' ')}
10857
9879
  style={{
10858
- width: entryWidthScaled,
9880
+ width: itemInnerWidth,
10859
9881
  ...(gridColumn ? { gridColumn } : {}),
10860
9882
  }}
10861
9883
  >
@@ -10866,7 +9888,20 @@ export function Hive({
10866
9888
  {imageContent}
10867
9889
  </a>
10868
9890
  <div className={\`\${P}-item-subtitle-row\`}>
10869
- <div style={{ height: 0, width: controlWidthStyle }} />
9891
+ {showEntryText && item.title1?.trim() ? (
9892
+ <>
9893
+ <div
9894
+ data-controls={isEditMode ? 'textMarginTop' : undefined}
9895
+ className={isEditMode ? \`\${P}-control\` : undefined}
9896
+ style={{ height: scalingValue(textMarginTop, isEditor), width: textControlWidthStyle }}
9897
+ />
9898
+ <p className={\`\${P}-item-text\`} style={{ ...entryTextStyle, width: textBoxWidthStyle }}>
9899
+ {item.title1}
9900
+ </p>
9901
+ </>
9902
+ ) : (
9903
+ <div style={{ height: 0, width: controlWidthStyle }} />
9904
+ )}
10870
9905
  </div>
10871
9906
  </div>
10872
9907
  </div>
@@ -10903,7 +9938,7 @@ export function Hive({
10903
9938
  </>
10904
9939
  );
10905
9940
  }
10906
- `,c=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
9941
+ `,l=`import { useCallback, useEffect, useMemo, useRef, useState, type MouseEvent } from 'react';
10907
9942
  import { createPortal } from 'react-dom';
10908
9943
  import { CommonComponentProps } from '../props';
10909
9944
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -11668,7 +10703,7 @@ export type LightboxJournalSettings = {
11668
10703
  closeIconColor: string;
11669
10704
  closeIconHoverColor: string;
11670
10705
  };
11671
- `,d=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
10706
+ `,c=`import { useEffect, useRef, useState, type MouseEvent } from 'react';
11672
10707
  import { createPortal } from 'react-dom';
11673
10708
  import { CommonComponentProps } from '../props';
11674
10709
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -12214,7 +11249,7 @@ export const LightboxStrip = ({ settings, content, isEditor, isEditMode, isPrevi
12214
11249
  </>
12215
11250
  );
12216
11251
  };
12217
- `,u=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
11252
+ `,d=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
12218
11253
  import { createPortal } from 'react-dom';
12219
11254
  import { CommonComponentProps } from '../props';
12220
11255
  import { buildColorVars, EmbedMediaFrame, isEmbedMedia, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
@@ -15319,7 +14354,7 @@ export function List({ settings, content, isEditor, isPreviewMode, isEditMode, a
15319
14354
  </>
15320
14355
  );
15321
14356
  }
15322
- `,g=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
14357
+ `,u=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, type CSSProperties } from 'react';
15323
14358
  import cn from 'classnames';
15324
14359
  import { CommonComponentProps } from '../props';
15325
14360
  import { EmbedMediaFrame, getEmbedAspect, isEmbedMedia, LinkWrapper, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
@@ -16177,7 +15212,7 @@ type MarqueeProps = {
16177
15212
  isPreviewMode?: boolean;
16178
15213
  isEditMode?: boolean;
16179
15214
  } & CommonComponentProps;
16180
- `,m=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
15215
+ `,g=`import { useLayoutEffect, useMemo, useRef, useState, type CSSProperties, type PointerEvent as ReactPointerEvent } from 'react';
16181
15216
  import cn from 'classnames';
16182
15217
  import { CommonComponentProps } from '../props';
16183
15218
  import { LinkWrapper, scalingValue, useScopedStyles, type ContentLink } from '../utils/index';
@@ -17120,7 +16155,7 @@ type MarqueeTextProps = {
17120
16155
  isPreviewMode?: boolean;
17121
16156
  isEditMode?: boolean;
17122
16157
  } & CommonComponentProps;
17123
- `,p=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
16158
+ `,m=`import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
17124
16159
  import { createPortal } from 'react-dom';
17125
16160
  import type React from 'react';
17126
16161
  import { CommonComponentProps } from '../props';
@@ -19602,7 +18637,7 @@ export function Mercury({
19602
18637
  </>
19603
18638
  );
19604
18639
  }
19605
- `,h=`import React, { useMemo, useState } from 'react';
18640
+ `,p=`import React, { useMemo, useState } from 'react';
19606
18641
  import { CommonComponentProps } from '../props';
19607
18642
  import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
19608
18643
  import { omitTextColors, textStylesToCss, type TextStyles } from '../utils/textStylesToCss';
@@ -20181,7 +19216,7 @@ const COLOR_VAR_MAP: Record<OnelinerColorKeys, string> = {
20181
19216
  };
20182
19217
 
20183
19218
  const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
20184
- `,f=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
19219
+ `,h=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
20185
19220
  import type React from 'react';
20186
19221
  import { CommonComponentProps } from '../props';
20187
19222
  import { scalingValue, useScopedStyles } from '../utils/index';
@@ -21020,7 +20055,7 @@ export function Pretext({ settings, content, isEditor, isPreviewMode, isEditMode
21020
20055
  </>
21021
20056
  );
21022
20057
  }
21023
- `,v=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
20058
+ `,f=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
21024
20059
  import cn from 'classnames';
21025
20060
  import { CommonComponentProps } from '../props';
21026
20061
  import { useScopedStyles } from '../utils/useScopedStyles';
@@ -21648,7 +20683,7 @@ export function Scale({ settings, content, isEditor, isPreviewMode }: ScaleProps
21648
20683
  </>
21649
20684
  );
21650
20685
  }
21651
- `,P=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
20686
+ `,v=`import { useMemo, type CSSProperties, type MouseEvent, type ReactNode } from 'react';
21652
20687
  import { SvgImage } from '../helpers/SvgImage/SvgImage';
21653
20688
  import { CommonComponentProps } from '../props';
21654
20689
  import { buildColorVars, scalingValue, useScopedStyles } from '../utils';
@@ -22280,7 +21315,7 @@ export function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent, h
22280
21315
  </>
22281
21316
  );
22282
21317
  }
22283
- `,x=`import React, { useCallback, useEffect, useRef, useState } from 'react';
21318
+ `,P=`import React, { useCallback, useEffect, useRef, useState } from 'react';
22284
21319
  import cn from 'classnames';
22285
21320
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
22286
21321
  import { scalingValue } from '../utils/scalingValue';
@@ -23462,7 +22497,7 @@ function ArrowIcon({ color, className }: { color: string, className: string }) {
23462
22497
  </svg>
23463
22498
  );
23464
22499
  }
23465
- `,b=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
22500
+ `,x=`import { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';
23466
22501
  import cn from 'classnames';
23467
22502
  import { CommonComponentProps } from '../props';
23468
22503
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -24093,7 +23128,7 @@ type TestimonialsSettings = {
24093
23128
  logoHeight: number;
24094
23129
  captionMarginTop: number;
24095
23130
  };
24096
- `,y=`import cn from 'classnames';
23131
+ `,b=`import cn from 'classnames';
24097
23132
  import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
24098
23133
  import { CommonComponentProps } from '../props';
24099
23134
  import { RichTextRenderer } from '../helpers/RichTextRenderer/RichTextRenderer';
@@ -24589,7 +23624,7 @@ type TestimonialsSettings = {
24589
23624
  icon?: string | null;
24590
23625
  };
24591
23626
  };
24592
- `,S=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
23627
+ `,y=`import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
24593
23628
  import type React from 'react';
24594
23629
  import { createPortal } from 'react-dom';
24595
23630
  import { CommonComponentProps } from '../props';
@@ -25122,4 +24157,4 @@ export function Waterfall({
25122
24157
  </>
25123
24158
  );
25124
24159
  }
25125
- `,w={[n.ArchivePopupComponent.id]:e,[n.BurgerComponent.id]:t,[n.ClickGallerieComponent.id]:i,[n.FAQComponent.id]:o,[n.FormComponent.id]:r,[n.GridComponent.id]:a,[n.HelixComponent.id]:s,[n.HiveComponent.id]:l,[n.LightboxJournalComponent.id]:c,[n.LightboxStripComponent.id]:d,[n.ListComponent.id]:u,[n.MarqueeComponent.id]:g,[n.MarqueeTextComponent.id]:m,[n.MercuryComponent.id]:p,[n.OnelinerFormComponent.id]:h,[n.PretextComponent.id]:f,[n.ScaleComponent.id]:v,[n.SimpleButtonComponent.id]:P,[n.Slider20Component.id]:x,[n.TestimonialGridComponent.id]:b,[n.TestimonialSingleComponent.id]:y,[n.WaterfallComponent.id]:S};exports.componentSources=w;
24160
+ `,S={[n.BurgerComponent.id]:e,[n.ClickGallerieComponent.id]:t,[n.FAQComponent.id]:i,[n.FormComponent.id]:o,[n.GridComponent.id]:r,[n.HelixComponent.id]:a,[n.HiveComponent.id]:s,[n.LightboxJournalComponent.id]:l,[n.LightboxStripComponent.id]:c,[n.ListComponent.id]:d,[n.MarqueeComponent.id]:u,[n.MarqueeTextComponent.id]:g,[n.MercuryComponent.id]:m,[n.OnelinerFormComponent.id]:p,[n.PretextComponent.id]:h,[n.ScaleComponent.id]:f,[n.SimpleButtonComponent.id]:v,[n.Slider20Component.id]:P,[n.TestimonialGridComponent.id]:x,[n.TestimonialSingleComponent.id]:b,[n.WaterfallComponent.id]:y};exports.componentSources=S;