@spillway-cms/blocks 0.1.23 → 0.1.25
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/THIRD_PARTY_NOTICES.md +49 -0
- package/dist/breadcrumbs.d.ts +27 -0
- package/dist/breadcrumbs.js +44 -0
- package/dist/breadcrumbs.js.map +1 -0
- package/dist/collection.d.ts +32 -1
- package/dist/collection.js +40 -5
- package/dist/collection.js.map +1 -1
- package/dist/config.d.ts +64 -4
- package/dist/config.js +124 -24
- package/dist/config.js.map +1 -1
- package/dist/countdown.d.ts +34 -0
- package/dist/countdown.js +81 -0
- package/dist/countdown.js.map +1 -0
- package/dist/css.js +43 -0
- package/dist/css.js.map +1 -1
- package/dist/documents.d.ts +52 -0
- package/dist/documents.js +146 -0
- package/dist/documents.js.map +1 -0
- package/dist/examples.js +141 -1
- package/dist/examples.js.map +1 -1
- package/dist/form.d.ts +11 -3
- package/dist/form.js +27 -11
- package/dist/form.js.map +1 -1
- package/dist/glossary.d.ts +56 -0
- package/dist/glossary.js +117 -0
- package/dist/glossary.js.map +1 -0
- package/dist/hours.d.ts +44 -0
- package/dist/hours.js +163 -0
- package/dist/hours.js.map +1 -0
- package/dist/icons-data.d.ts +18 -0
- package/dist/icons-data.js +117 -0
- package/dist/icons-data.js.map +1 -0
- package/dist/icons.d.ts +31 -0
- package/dist/icons.js +49 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +27 -3
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/language-switcher.d.ts +38 -0
- package/dist/language-switcher.js +60 -0
- package/dist/language-switcher.js.map +1 -0
- package/dist/listing-script.d.ts +13 -0
- package/dist/listing-script.js +44 -0
- package/dist/listing-script.js.map +1 -0
- package/dist/location-map.d.ts +60 -0
- package/dist/location-map.js +215 -0
- package/dist/location-map.js.map +1 -0
- package/dist/marketing.d.ts +3 -0
- package/dist/marketing.js +5 -2
- package/dist/marketing.js.map +1 -1
- package/dist/meta.js +75 -15
- package/dist/meta.js.map +1 -1
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js +3 -2
- package/dist/motion.js.map +1 -1
- package/dist/progress.d.ts +46 -0
- package/dist/progress.js +106 -0
- package/dist/progress.js.map +1 -0
- package/dist/registry-package.js +1 -1
- package/dist/registry-package.js.map +1 -1
- package/dist/registry-types.d.ts +5 -0
- package/dist/registry-types.js.map +1 -1
- package/dist/styles.css +376 -2
- package/dist/styles.js +95 -0
- package/dist/styles.js.map +1 -1
- package/dist/toc.d.ts +32 -0
- package/dist/toc.js +79 -0
- package/dist/toc.js.map +1 -0
- package/dist/utility-script.d.ts +20 -0
- package/dist/utility-script.js +90 -0
- package/dist/utility-script.js.map +1 -0
- package/dist/utility-shared.d.ts +18 -0
- package/dist/utility-shared.js +32 -0
- package/dist/utility-shared.js.map +1 -0
- package/dist/video.d.ts +36 -1
- package/dist/video.js +157 -4
- package/dist/video.js.map +1 -1
- package/dist/widgets.d.ts +95 -0
- package/dist/widgets.js +449 -0
- package/dist/widgets.js.map +1 -0
- package/package.json +4 -3
package/dist/video.d.ts
CHANGED
|
@@ -25,6 +25,29 @@ export interface ResolvedVideo {
|
|
|
25
25
|
/** When it was added to the media library (ISO 8601). */
|
|
26
26
|
uploadDate?: string;
|
|
27
27
|
}
|
|
28
|
+
/** A YouTube or Vimeo video the block plays through a facade. */
|
|
29
|
+
export interface RemoteVideo {
|
|
30
|
+
provider: 'youtube' | 'vimeo';
|
|
31
|
+
/** The video's id: 11 characters on YouTube, digits on Vimeo. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** An unlisted Vimeo video's hash (`vimeo.com/<id>/<hash>`). */
|
|
34
|
+
hash?: string;
|
|
35
|
+
/** Where it starts, in seconds. */
|
|
36
|
+
start?: number;
|
|
37
|
+
/** "YouTube" or "Vimeo". */
|
|
38
|
+
host: string;
|
|
39
|
+
/** The video's page on its site (the facade's link without script). */
|
|
40
|
+
watchUrl: string;
|
|
41
|
+
/** The privacy-friendly player, starting to play. */
|
|
42
|
+
embedUrl: string;
|
|
43
|
+
/** Where the server keeps its thumbnail (on this site). */
|
|
44
|
+
thumbPath: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A YouTube (`youtube.com/watch?v=`, `youtu.be/`, `/shorts/`, `/embed/`, `/live/`, youtube-nocookie.com) or Vimeo (`vimeo.com/<id>`,
|
|
48
|
+
* `vimeo.com/<id>/<hash>`, `vimeo.com/channels/<name>/<id>`, `player.vimeo.com/video/<id>?h=`) address, or null for anything else.
|
|
49
|
+
*/
|
|
50
|
+
export declare function remoteVideoOf(src: unknown): RemoteVideo | null;
|
|
28
51
|
export interface VideoProps {
|
|
29
52
|
src: string;
|
|
30
53
|
poster: string;
|
|
@@ -43,6 +66,16 @@ export interface VideoProps {
|
|
|
43
66
|
* block with this off; rendered on its own, the block prints it itself. Off leaves the video out of structured data.
|
|
44
67
|
*/
|
|
45
68
|
structuredData: boolean;
|
|
69
|
+
/** A YouTube or Vimeo video: plays in place (default) or in a lightbox. A file always plays in place. */
|
|
70
|
+
display?: 'inline' | 'lightbox';
|
|
71
|
+
/** Set by the server for a YouTube or Vimeo video: its cached thumbnail, or null when there is none (yet). Never stored. */
|
|
72
|
+
thumbnail?: {
|
|
73
|
+
url: string;
|
|
74
|
+
width: number | null;
|
|
75
|
+
height: number | null;
|
|
76
|
+
} | null;
|
|
77
|
+
/** Set by the server: the site asks for consent (the consent banner), so the facade says where the video comes from. Never stored. */
|
|
78
|
+
consent?: boolean;
|
|
46
79
|
/** Set by the server; never stored. */
|
|
47
80
|
videoMedia?: ResolvedVideo | null;
|
|
48
81
|
posterMedia?: {
|
|
@@ -75,6 +108,8 @@ export declare function captionTracks(tracks: VideoTrack[] | undefined, urls?: (
|
|
|
75
108
|
* `siteOrigin` when it is known.
|
|
76
109
|
*/
|
|
77
110
|
export declare function videoObject(props: Partial<VideoProps>): Record<string, unknown> | null;
|
|
111
|
+
/** The id of a hosted video's lightbox: unique per block on a page. */
|
|
112
|
+
export declare function videoLightboxId(blockId: unknown): string;
|
|
78
113
|
export declare const videoComponent: ComponentConfig<VideoProps>;
|
|
79
|
-
export declare const VIDEO_CSS = "\n/* ---------- Video ---------- */\n.sw-video__figure { margin: 0; }\n.sw-video__player { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000000; border-radius: var(--sw-radius, 8px); }\n.sw-video__player:focus-visible { outline: 2px solid var(--sw-color-primary); outline-offset: 2px; }\n.sw-video__placeholder { background: repeating-linear-gradient(45deg, var(--sw-color-surface) 0 12px, var(--sw-color-border) 12px 14px); background-size: cover; background-position: center; }\n.sw-video__description { margin-top: var(--sw-space-1); font-size: 0.9rem; color: var(--sw-color-muted); }\n.sw-video__transcript { margin-top: var(--sw-space-2); border-top: 1px solid var(--sw-color-border); border-bottom: 1px solid var(--sw-color-border); }\n.sw-video__transcript-summary { padding: var(--sw-space-1) 0; cursor: pointer; font-weight: 600; }\n.sw-video__transcript-summary:focus-visible { outline: 2px solid var(--sw-color-primary); outline-offset: 2px; }\n.sw-video__transcript-text { padding-bottom: var(--sw-space-2); }\n";
|
|
114
|
+
export declare const VIDEO_CSS = "\n/* ---------- Video ---------- */\n.sw-video__figure { margin: 0; }\n.sw-video__player { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #000000; border-radius: var(--sw-radius, 8px); }\n.sw-video__player:focus-visible { outline: 2px solid var(--sw-color-primary); outline-offset: 2px; }\n.sw-video__placeholder { background: repeating-linear-gradient(45deg, var(--sw-color-surface) 0 12px, var(--sw-color-border) 12px 14px); background-size: cover; background-position: center; }\n.sw-video__description { margin-top: var(--sw-space-1); font-size: 0.9rem; color: var(--sw-color-muted); }\n.sw-video__transcript { margin-top: var(--sw-space-2); border-top: 1px solid var(--sw-color-border); border-bottom: 1px solid var(--sw-color-border); }\n.sw-video__transcript-summary { padding: var(--sw-space-1) 0; cursor: pointer; font-weight: 600; }\n.sw-video__transcript-summary:focus-visible { outline: 2px solid var(--sw-color-primary); outline-offset: 2px; }\n.sw-video__transcript-text { padding-bottom: var(--sw-space-2); }\n/* A YouTube or Vimeo video: the facade until the visitor presses play, then the player in its place. */\n.sw-video__remote { position: relative; }\n.sw-video__facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--sw-radius, 8px); overflow: hidden; background: #000000; color: #ffffff; cursor: pointer; text-decoration: none; }\n.sw-video__facade:focus-visible { outline: 3px solid var(--sw-color-primary); outline-offset: 3px; }\n.sw-video__poster { display: block; width: 100%; height: 100%; object-fit: cover; }\n.sw-video__poster--none { display: grid; place-items: end start; padding: 1rem 1.25rem; box-sizing: border-box; background: linear-gradient(135deg, var(--sw-color-neutral-900, #111827), #000000); color: #ffffff; font-weight: 600; text-align: start; }\n.sw-video__play { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 4.25rem; height: 4.25rem; border-radius: 999px; background: rgba(0, 0, 0, 0.72); color: #ffffff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); transition: transform 150ms ease, background-color 150ms ease; }\n.sw-video__facade:hover .sw-video__play, .sw-video__facade:focus-visible .sw-video__play { background: var(--sw-color-primary, #1d4ed8); transform: scale(1.06); }\n.sw-video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--sw-radius, 8px); background: #000000; }\n.sw-video__consent { margin: var(--sw-space-1, 0.5rem) 0 0; font-size: 0.875rem; color: var(--sw-color-muted); }\n.sw-video__consent[hidden] { display: none; }\n.sw-video-lightbox__stage { width: min(100%, calc((100vh - 120px) * 16 / 9)); aspect-ratio: 16 / 9; display: grid; place-items: center; }\n.sw-video-lightbox__stage .sw-video__frame { width: 100%; height: 100%; border-radius: 0; }\n.sw-video-lightbox__watch { color: #ffffff; }\n";
|
|
80
115
|
export {};
|
package/dist/video.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { mediaUrl } from '@spillway-cms/shared';
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { EMBED_IFRAME_SANDBOX, mediaUrl } from '@spillway-cms/shared';
|
|
3
3
|
import { isPlainText, keyboardScrollable, paragraphsToHtml, sanitizeTextHtml } from './sanitize.js';
|
|
4
4
|
const cx = (...c) => c.filter(Boolean).join(' ');
|
|
5
5
|
/** A path on this site or an http(s) URL: never another scheme (javascript:, data:). */
|
|
@@ -11,6 +11,80 @@ export const isCaptionsFile = (src) => safeUrl((src ?? '').trim()) && /\.vtt(\?.
|
|
|
11
11
|
/** A language tag for `srclang` (en, es, fr-CA, zh-Hant). */
|
|
12
12
|
const LANG_RE = /^[a-z]{2,3}(-[a-z0-9]{2,8})*$/i;
|
|
13
13
|
const RASTER = new Set(['image/jpeg', 'image/png', 'image/webp', 'image/avif']);
|
|
14
|
+
const YT_ID = /^[A-Za-z0-9_-]{11}$/;
|
|
15
|
+
/** `1h2m3s`, `90s`, `90` → seconds. */
|
|
16
|
+
function seconds(v) {
|
|
17
|
+
if (!v)
|
|
18
|
+
return undefined;
|
|
19
|
+
const m = /^(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s?)?$/.exec(v.trim());
|
|
20
|
+
if (!m || !m[0])
|
|
21
|
+
return undefined;
|
|
22
|
+
const n = Number(m[1] ?? 0) * 3600 + Number(m[2] ?? 0) * 60 + Number(m[3] ?? 0);
|
|
23
|
+
return n > 0 && n < 86_400 ? n : undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A YouTube (`youtube.com/watch?v=`, `youtu.be/`, `/shorts/`, `/embed/`, `/live/`, youtube-nocookie.com) or Vimeo (`vimeo.com/<id>`,
|
|
27
|
+
* `vimeo.com/<id>/<hash>`, `vimeo.com/channels/<name>/<id>`, `player.vimeo.com/video/<id>?h=`) address, or null for anything else.
|
|
28
|
+
*/
|
|
29
|
+
export function remoteVideoOf(src) {
|
|
30
|
+
if (typeof src !== 'string' || !src.trim() || src.length > 500)
|
|
31
|
+
return null;
|
|
32
|
+
let url;
|
|
33
|
+
try {
|
|
34
|
+
url = new URL(src.trim());
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
if (url.protocol !== 'https:' && url.protocol !== 'http:')
|
|
40
|
+
return null;
|
|
41
|
+
const host = url.hostname.toLowerCase().replace(/^(www\.|m\.)/, '');
|
|
42
|
+
const parts = url.pathname.split('/').filter(Boolean);
|
|
43
|
+
let id = '';
|
|
44
|
+
if (host === 'youtu.be')
|
|
45
|
+
id = parts[0] ?? '';
|
|
46
|
+
else if (host === 'youtube.com' || host === 'youtube-nocookie.com' || host === 'music.youtube.com') {
|
|
47
|
+
if (parts[0] === 'watch')
|
|
48
|
+
id = url.searchParams.get('v') ?? '';
|
|
49
|
+
else if (['embed', 'shorts', 'live', 'v'].includes(parts[0] ?? ''))
|
|
50
|
+
id = parts[1] ?? '';
|
|
51
|
+
}
|
|
52
|
+
if (id) {
|
|
53
|
+
if (!YT_ID.test(id))
|
|
54
|
+
return null;
|
|
55
|
+
const start = seconds(url.searchParams.get('t') ?? url.searchParams.get('start'));
|
|
56
|
+
return {
|
|
57
|
+
provider: 'youtube',
|
|
58
|
+
id,
|
|
59
|
+
...(start ? { start } : {}),
|
|
60
|
+
host: 'YouTube',
|
|
61
|
+
watchUrl: `https://www.youtube.com/watch?v=${id}${start ? `&t=${start}s` : ''}`,
|
|
62
|
+
embedUrl: `https://www.youtube-nocookie.com/embed/${id}?autoplay=1&rel=0${start ? `&start=${start}` : ''}`,
|
|
63
|
+
thumbPath: `/_video-thumbs/youtube/${id}.jpg`,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
if (host === 'vimeo.com' || host === 'player.vimeo.com') {
|
|
67
|
+
const nums = parts.findIndex((p) => /^\d{1,12}$/.test(p));
|
|
68
|
+
if (nums < 0 || (host === 'player.vimeo.com' && parts[0] !== 'video'))
|
|
69
|
+
return null;
|
|
70
|
+
const vid = parts[nums];
|
|
71
|
+
const after = parts[nums + 1];
|
|
72
|
+
const hash = url.searchParams.get('h') ?? (after && /^[a-f0-9]{6,20}$/i.test(after) ? after : '');
|
|
73
|
+
const start = seconds((url.hash.match(/t=([0-9hms]+)/) ?? [])[1] ?? null);
|
|
74
|
+
const h = hash && /^[a-f0-9]{6,20}$/i.test(hash) ? hash.toLowerCase() : '';
|
|
75
|
+
return {
|
|
76
|
+
provider: 'vimeo',
|
|
77
|
+
id: vid,
|
|
78
|
+
...(h ? { hash: h } : {}),
|
|
79
|
+
...(start ? { start } : {}),
|
|
80
|
+
host: 'Vimeo',
|
|
81
|
+
watchUrl: `https://vimeo.com/${vid}${h ? `/${h}` : ''}`,
|
|
82
|
+
embedUrl: `https://player.vimeo.com/video/${vid}?autoplay=1&dnt=1${h ? `&h=${h}` : ''}${start ? `#t=${start}s` : ''}`,
|
|
83
|
+
thumbPath: `/_video-thumbs/vimeo/${vid}.jpg`,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
14
88
|
const yesNo = [
|
|
15
89
|
{ label: 'Yes', value: true },
|
|
16
90
|
{ label: 'No', value: false },
|
|
@@ -52,6 +126,28 @@ export function captionTracks(tracks, urls) {
|
|
|
52
126
|
* `siteOrigin` when it is known.
|
|
53
127
|
*/
|
|
54
128
|
export function videoObject(props) {
|
|
129
|
+
const remote = remoteVideoOf(props.src);
|
|
130
|
+
if (remote) {
|
|
131
|
+
const name = typeof props.title === 'string' ? props.title.trim() : '';
|
|
132
|
+
if (props.structuredData === false || !name)
|
|
133
|
+
return null;
|
|
134
|
+
const origin = typeof props.siteOrigin === 'string' ? props.siteOrigin.replace(/\/+$/, '') : '';
|
|
135
|
+
const abs = (u) => (origin && u.startsWith('/') && !u.startsWith('//') ? `${origin}${u}` : u);
|
|
136
|
+
const posterOwn = props.posterMedia?.url || (typeof props.poster === 'string' && safeUrl(props.poster.trim()) ? props.poster.trim() : '');
|
|
137
|
+
const thumb = posterOwn || props.thumbnail?.url || '';
|
|
138
|
+
const desc = typeof props.description === 'string' ? props.description.trim() : '';
|
|
139
|
+
const transcript = typeof props.transcript === 'string' ? plain(props.transcript) : '';
|
|
140
|
+
return compact({
|
|
141
|
+
'@context': 'https://schema.org',
|
|
142
|
+
'@type': 'VideoObject',
|
|
143
|
+
name,
|
|
144
|
+
description: desc || name,
|
|
145
|
+
thumbnailUrl: thumb ? abs(thumb) : undefined,
|
|
146
|
+
embedUrl: remote.embedUrl.replace('autoplay=1&', ''),
|
|
147
|
+
url: remote.watchUrl,
|
|
148
|
+
transcript: transcript ? transcript.slice(0, 10_000) : undefined,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
55
151
|
const stored = typeof props.src === 'string' ? props.src.trim() : '';
|
|
56
152
|
const media = props.videoMedia ?? null;
|
|
57
153
|
const file = isVideoFile(stored) ? (media?.url ?? stored) : '';
|
|
@@ -86,10 +182,42 @@ function transcriptBody(transcript) {
|
|
|
86
182
|
return _jsx("div", { className: "sw-prose sw-video__transcript-text", dangerouslySetInnerHTML: { __html: html } });
|
|
87
183
|
}
|
|
88
184
|
const hasTranscript = (t) => (typeof t === 'string' ? plain(t) !== '' : t !== null && t !== undefined);
|
|
185
|
+
const PlayIcon = () => (_jsx("svg", { className: "sw-video__play-icon", viewBox: "0 0 24 24", width: "28", height: "28", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "M8 5.5v13l11-6.5z", fill: "currentColor" }) }));
|
|
186
|
+
const CloseIcon = () => (_jsx("svg", { viewBox: "0 0 24 24", width: "22", height: "22", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: "M6 6l12 12M18 6L6 18", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }));
|
|
187
|
+
/** The id of a hosted video's lightbox: unique per block on a page. */
|
|
188
|
+
export function videoLightboxId(blockId) {
|
|
189
|
+
const base = typeof blockId === 'string' ? blockId.replace(/[^A-Za-z0-9_-]/g, '').slice(-32) : '';
|
|
190
|
+
return `sw-vlb-${base || 'video'}`;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* A YouTube or Vimeo video: the facade (poster and play control), the consent note when the site asks for consent, and in
|
|
194
|
+
* lightbox mode the popover the player opens in. `data-sw-video` carries what the widgets script needs: the player's address
|
|
195
|
+
* and the frame's title.
|
|
196
|
+
*/
|
|
197
|
+
function RemoteVideoBlock(props) {
|
|
198
|
+
const { remote, width } = props;
|
|
199
|
+
const name = typeof props.title === 'string' ? props.title.trim() : '';
|
|
200
|
+
const desc = typeof props.description === 'string' ? props.description.trim() : '';
|
|
201
|
+
const posterStored = typeof props.poster === 'string' && safeUrl(props.poster.trim()) ? props.poster.trim() : '';
|
|
202
|
+
const pm = props.posterMedia ?? null;
|
|
203
|
+
const own = pm ? (RASTER.has(pm.mime) && (pm.width ?? 0) > 1200 ? mediaUrl(pm, { w: 1200 }) : pm.url) : posterStored;
|
|
204
|
+
const thumb = own ? { url: own, width: pm?.width ?? null, height: pm?.height ?? null } : (props.thumbnail ?? null);
|
|
205
|
+
const lightbox = props.display === 'lightbox' && !props.puck?.isEditing;
|
|
206
|
+
const label = name ? `Play video: ${name}` : `Play the ${remote.host} video`;
|
|
207
|
+
const frameTitle = name || `${remote.host} video`;
|
|
208
|
+
const boxId = videoLightboxId(props.id);
|
|
209
|
+
const idBase = String(props.id ?? 'video').replace(/[^A-Za-z0-9_-]+/g, '-');
|
|
210
|
+
const descId = `${idBase}-description`;
|
|
211
|
+
const ld = videoObject(props);
|
|
212
|
+
const face = (_jsxs(_Fragment, { children: [thumb ? _jsx("img", { className: "sw-video__poster", src: thumb.url, alt: "", loading: "lazy", decoding: "async", width: thumb.width ?? undefined, height: thumb.height ?? undefined }) : _jsx("span", { className: "sw-video__poster sw-video__poster--none", "aria-hidden": "true", children: name }), _jsx("span", { className: "sw-video__play", "aria-hidden": "true", children: _jsx(PlayIcon, {}) })] }));
|
|
213
|
+
return (_jsxs("section", { className: cx('sw-block', 'sw-video', 'sw-video--remote', `sw-video--${width === 'wide' ? 'wide' : 'normal'}`), children: [_jsxs("div", { className: cx('sw-container', width === 'wide' && 'sw-container--wide'), children: [_jsxs("figure", { className: "sw-video__figure", children: [_jsxs("div", { className: "sw-video__remote", "data-sw-video": remote.embedUrl, "data-sw-video-title": frameTitle, "data-sw-video-sandbox": EMBED_IFRAME_SANDBOX, "data-sw-video-mode": lightbox ? 'lightbox' : 'inline', children: [lightbox ? (_jsx("button", { type: "button", className: "sw-video__facade", popoverTarget: boxId, "aria-label": label, "aria-describedby": desc ? descId : undefined, children: face })) : (
|
|
214
|
+
// Without the widgets script this is a link to the video on its site; with it, pressing it plays the video here.
|
|
215
|
+
_jsx("a", { className: "sw-video__facade", href: remote.watchUrl, "aria-label": label, "aria-describedby": desc ? descId : undefined, "data-sw-video-facade": "", children: face })), props.consent ? (_jsx("p", { className: "sw-video__consent", "data-sw-video-consent": "", children: `This video is hosted by ${remote.host}, which may set cookies. Pressing play loads it from ${remote.host}.` })) : null] }), desc ? (_jsx("figcaption", { id: descId, className: "sw-video__description", children: desc })) : null] }), hasTranscript(props.transcript) ? (_jsxs("details", { className: "sw-video__transcript", children: [_jsxs("summary", { className: "sw-video__transcript-summary", children: ["Transcript", name ? _jsx("span", { className: "sw-visually-hidden", children: `: ${name}` }) : null] }), transcriptBody(props.transcript)] })) : null] }), lightbox ? (_jsxs("div", { id: boxId, className: "sw-lightbox sw-video-lightbox", popover: "auto", role: "dialog", "aria-label": frameTitle, "data-sw-video-box": "", children: [_jsx("div", { className: "sw-video-lightbox__stage", "data-sw-video-stage": "", children: _jsx("a", { className: "sw-video-lightbox__watch", href: remote.watchUrl, children: `Watch ${name ? `“${name}”` : 'the video'} on ${remote.host}` }) }), _jsx("button", { type: "button", className: "sw-lightbox__btn sw-lightbox__close", popoverTarget: boxId, popoverTargetAction: "hide", "aria-label": "Close", autoFocus: true, children: _jsx(CloseIcon, {}) })] })) : null, ld ? _jsx("script", { type: "application/ld+json", dangerouslySetInnerHTML: { __html: escapeJson(JSON.stringify(ld)) } }) : null] }));
|
|
216
|
+
}
|
|
89
217
|
export const videoComponent = {
|
|
90
218
|
label: 'Video',
|
|
91
219
|
fields: {
|
|
92
|
-
src: { type: 'text', label: 'Video file URL (.mp4 or .webm)', placeholder: '/media/....mp4' },
|
|
220
|
+
src: { type: 'text', label: 'Video file URL (.mp4 or .webm) or a YouTube or Vimeo address', placeholder: '/media/....mp4' },
|
|
93
221
|
poster: { type: 'text', label: 'Poster image URL (shown before it plays)', placeholder: '/media/...' },
|
|
94
222
|
title: { type: 'text', label: 'Title (names the player for screen readers and search engines)' },
|
|
95
223
|
description: { type: 'textarea', label: 'Description (shown under the video)' },
|
|
@@ -127,9 +255,20 @@ export const videoComponent = {
|
|
|
127
255
|
],
|
|
128
256
|
},
|
|
129
257
|
structuredData: { type: 'radio', label: 'Show in video search results', options: yesNo },
|
|
258
|
+
display: {
|
|
259
|
+
type: 'radio',
|
|
260
|
+
label: 'YouTube and Vimeo: play',
|
|
261
|
+
options: [
|
|
262
|
+
{ label: 'In place', value: 'inline' },
|
|
263
|
+
{ label: 'In a lightbox', value: 'lightbox' },
|
|
264
|
+
],
|
|
265
|
+
},
|
|
130
266
|
},
|
|
131
|
-
defaultProps: { src: '', poster: '', title: '', description: '', tracks: [], transcript: '', preload: 'none', loop: false, muted: false, autoplay: false, width: 'normal', structuredData: true },
|
|
267
|
+
defaultProps: { src: '', poster: '', title: '', description: '', tracks: [], transcript: '', preload: 'none', loop: false, muted: false, autoplay: false, width: 'normal', structuredData: true, display: 'inline' },
|
|
132
268
|
render: (props) => {
|
|
269
|
+
const remote = remoteVideoOf(props.src);
|
|
270
|
+
if (remote)
|
|
271
|
+
return _jsx(RemoteVideoBlock, { ...props, remote: remote });
|
|
133
272
|
const { src, poster, title, description, tracks, transcript, preload, loop, muted, autoplay, width } = props;
|
|
134
273
|
const media = props.videoMedia ?? null;
|
|
135
274
|
const stored = typeof src === 'string' ? src.trim() : '';
|
|
@@ -161,5 +300,19 @@ export const VIDEO_CSS = `
|
|
|
161
300
|
.sw-video__transcript-summary { padding: var(--sw-space-1) 0; cursor: pointer; font-weight: 600; }
|
|
162
301
|
.sw-video__transcript-summary:focus-visible { outline: 2px solid var(--sw-color-primary); outline-offset: 2px; }
|
|
163
302
|
.sw-video__transcript-text { padding-bottom: var(--sw-space-2); }
|
|
303
|
+
/* A YouTube or Vimeo video: the facade until the visitor presses play, then the player in its place. */
|
|
304
|
+
.sw-video__remote { position: relative; }
|
|
305
|
+
.sw-video__facade { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: var(--sw-radius, 8px); overflow: hidden; background: #000000; color: #ffffff; cursor: pointer; text-decoration: none; }
|
|
306
|
+
.sw-video__facade:focus-visible { outline: 3px solid var(--sw-color-primary); outline-offset: 3px; }
|
|
307
|
+
.sw-video__poster { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
308
|
+
.sw-video__poster--none { display: grid; place-items: end start; padding: 1rem 1.25rem; box-sizing: border-box; background: linear-gradient(135deg, var(--sw-color-neutral-900, #111827), #000000); color: #ffffff; font-weight: 600; text-align: start; }
|
|
309
|
+
.sw-video__play { position: absolute; inset: 0; margin: auto; display: grid; place-items: center; width: 4.25rem; height: 4.25rem; border-radius: 999px; background: rgba(0, 0, 0, 0.72); color: #ffffff; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); transition: transform 150ms ease, background-color 150ms ease; }
|
|
310
|
+
.sw-video__facade:hover .sw-video__play, .sw-video__facade:focus-visible .sw-video__play { background: var(--sw-color-primary, #1d4ed8); transform: scale(1.06); }
|
|
311
|
+
.sw-video__frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--sw-radius, 8px); background: #000000; }
|
|
312
|
+
.sw-video__consent { margin: var(--sw-space-1, 0.5rem) 0 0; font-size: 0.875rem; color: var(--sw-color-muted); }
|
|
313
|
+
.sw-video__consent[hidden] { display: none; }
|
|
314
|
+
.sw-video-lightbox__stage { width: min(100%, calc((100vh - 120px) * 16 / 9)); aspect-ratio: 16 / 9; display: grid; place-items: center; }
|
|
315
|
+
.sw-video-lightbox__stage .sw-video__frame { width: 100%; height: 100%; border-radius: 0; }
|
|
316
|
+
.sw-video-lightbox__watch { color: #ffffff; }
|
|
164
317
|
`;
|
|
165
318
|
//# sourceMappingURL=video.js.map
|
package/dist/video.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.js","sourceRoot":"","sources":["../src/video.tsx"],"names":[],"mappings":";AAoBA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEpG,MAAM,EAAE,GAAG,CAAC,GAAG,CAAwC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAExF,wFAAwF;AACxF,MAAM,OAAO,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,0BAA0B,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACtE,2FAA2F;AAC3F,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAuB,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACxI,yEAAyE;AACzE,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAuB,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC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c,CAAC,UAAU,CAAC,IACnB,CACX,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,EAAE,CAAC,CAAC,CAAC,iBAAQ,IAAI,EAAC,qBAAqB,EAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,GAAI,CAAC,CAAC,CAAC,IAAI,IAC/G,CACX,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;CAyBxB,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Carousel, Accordion and Tabs (docs/dev/blocks-carousel-accordion-tabs.md): blocks whose slides, items and tabs are slots, so
|
|
3
|
+
* each holds any blocks. All three render complete HTML on the server that works with no script: the Carousel is a row that
|
|
4
|
+
* scrolls sideways with scroll snapping, the Accordion shows every item open under its heading, Tabs shows a list of links to
|
|
5
|
+
* the panels and every panel under its heading. WIDGETS_SCRIPT, which the page carries once when it has one of them, adds the
|
|
6
|
+
* controls, collapses, selects and wires up ARIA following the WAI-ARIA Authoring Practices. In the page builder they render the
|
|
7
|
+
* no-script layout with every slot open, so editors can drop blocks into each one. Server-safe: no hooks, no browser APIs.
|
|
8
|
+
*/
|
|
9
|
+
import type { ComponentConfig, Config, Slot } from '@puckeditor/core';
|
|
10
|
+
/** "Visiting campus" → "visiting-campus": a link name for an id and a URL hash. */
|
|
11
|
+
export declare function slugify(text: string): string;
|
|
12
|
+
type HeadingLevel = 'h2' | 'h3' | 'h4';
|
|
13
|
+
export interface AccordionItem {
|
|
14
|
+
title: string;
|
|
15
|
+
/** The item's link name (its id, for `#name` links); empty uses the title. */
|
|
16
|
+
anchor?: string;
|
|
17
|
+
content: Slot;
|
|
18
|
+
}
|
|
19
|
+
export interface AccordionProps {
|
|
20
|
+
title: string;
|
|
21
|
+
items: AccordionItem[];
|
|
22
|
+
/** The heading level of the item titles. */
|
|
23
|
+
headingLevel: HeadingLevel;
|
|
24
|
+
/** One item open at a time, or several. */
|
|
25
|
+
open: 'single' | 'multiple';
|
|
26
|
+
openFirst: boolean;
|
|
27
|
+
/** Mark as FAQ: the titles and their content's text join the page's one FAQPage structured data (a Spillway server adds it). */
|
|
28
|
+
faq: boolean;
|
|
29
|
+
width: 'narrow' | 'normal';
|
|
30
|
+
/** The block style's key (Brand → Styles); empty means the site's default Accordion style. */
|
|
31
|
+
style?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function accordionComponent(getConfig: () => Config): ComponentConfig<AccordionProps>;
|
|
34
|
+
export interface TabsTab {
|
|
35
|
+
label: string;
|
|
36
|
+
/** The tab's link name (its panel's id, for `#name` links); empty uses the label. */
|
|
37
|
+
anchor?: string;
|
|
38
|
+
content: Slot;
|
|
39
|
+
}
|
|
40
|
+
export interface TabsProps {
|
|
41
|
+
title: string;
|
|
42
|
+
tabs: TabsTab[];
|
|
43
|
+
orientation: 'horizontal' | 'vertical';
|
|
44
|
+
/** The level of the panel headings people see without the script (and in the page builder). */
|
|
45
|
+
headingLevel: HeadingLevel;
|
|
46
|
+
/** The block style's key (Brand → Styles); empty means the site's default Tabs style. */
|
|
47
|
+
style?: string;
|
|
48
|
+
}
|
|
49
|
+
export declare function tabsComponent(getConfig: () => Config): ComponentConfig<TabsProps>;
|
|
50
|
+
export interface CarouselSlide {
|
|
51
|
+
/** The slide's name: the picker's label and the page builder's summary. */
|
|
52
|
+
label: string;
|
|
53
|
+
/** A small picture for the testimonial variant's switcher (a media library image or a URL). */
|
|
54
|
+
thumbnail?: string;
|
|
55
|
+
content: Slot;
|
|
56
|
+
}
|
|
57
|
+
export type CarouselVariant = 'hero' | 'cards' | 'testimonial' | 'stats';
|
|
58
|
+
export interface CarouselProps {
|
|
59
|
+
/** The carousel's name: an H2 above the slides when `showTitle`, else only its accessible name. */
|
|
60
|
+
title: string;
|
|
61
|
+
showTitle: boolean;
|
|
62
|
+
variant: CarouselVariant;
|
|
63
|
+
slides: CarouselSlide[];
|
|
64
|
+
/** Hero: as tall as the content, or the full screen. */
|
|
65
|
+
height: 'auto' | 'screen';
|
|
66
|
+
/** Cards and stats: slides visible on wide screens. */
|
|
67
|
+
perView: 2 | 3 | 4;
|
|
68
|
+
/** Off by default; never plays when the brand's motion is off or the visitor reduces motion. */
|
|
69
|
+
autoplay: boolean;
|
|
70
|
+
/** Seconds per slide while autoplay runs. */
|
|
71
|
+
interval: 5 | 7 | 10;
|
|
72
|
+
/** Next on the last slide goes back to the first, Previous on the first to the last. */
|
|
73
|
+
loop: boolean;
|
|
74
|
+
/** The block style's key (Brand → Styles); empty means the site's default Carousel style. */
|
|
75
|
+
style?: string;
|
|
76
|
+
}
|
|
77
|
+
export declare function carouselComponent(getConfig: () => Config): ComponentConfig<CarouselProps>;
|
|
78
|
+
export declare const WIDGETS_CSS = "\n/* ---------- Carousel, Accordion, Tabs ---------- */\n/* Blocks inside a slide, an item or a tab share its box: no second gutter, one gap between them. */\n.sw-slot-body > .sw-block { padding-block: 0; }\n.sw-slot-body > .sw-block + .sw-block { padding-top: var(--sw-space-2); }\n.sw-slot-body .sw-container { max-width: none; padding-inline: 0; }\n\n/* Accordion: without the script every item is open under its heading; with it the heading holds a button. */\n.sw-accordion__title { margin: 0 0 var(--sw-space-3); }\n.sw-accordion__list { display: grid; gap: var(--sw-accordion-gap, 0); border-top: var(--sw-accordion-rule, 1px solid var(--sw-color-border)); }\n.sw-accordion__item { border-bottom: 1px solid var(--sw-color-border); scroll-margin-top: var(--sw-space-3); }\n.sw-page .sw-accordion__heading { margin: 0; font-size: 1.125rem; line-height: 1.35; letter-spacing: 0; }\n.sw-accordion__heading > .sw-accordion__label { display: block; padding: var(--sw-space-2) 0 var(--sw-space-1); }\n.sw-accordion__trigger { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: var(--sw-space-2); min-height: 3rem; padding: var(--sw-space-2) 0; margin: 0; font: inherit; font-weight: 700; color: inherit; text-align: start; background: none; border: 0; border-radius: 2px; cursor: pointer; }\n.sw-accordion__trigger:hover .sw-accordion__label { text-decoration: underline; text-underline-offset: 0.15em; }\n.sw-accordion__icon { position: relative; flex: none; width: 1rem; height: 1rem; color: var(--sw-color-primary, #1d4ed8); }\n.sw-accordion__icon::before, .sw-accordion__icon::after { content: ''; position: absolute; left: 0; top: calc(50% - 1px); width: 100%; height: 2px; border-radius: 1px; background: currentColor; transition: transform 160ms ease; }\n.sw-accordion__icon::after { transform: rotate(90deg); }\n.sw-accordion__trigger[aria-expanded=\"true\"] .sw-accordion__icon::after { transform: rotate(0deg); }\n.sw-accordion__panel { padding: 0 0 var(--sw-space-2); }\n.sw-accordion__panel[hidden] { display: none; }\n.sw-accordion__panel[hidden=\"until-found\"] { display: block; content-visibility: hidden; padding: 0; }\n\n/* Tabs: without the script, a list of links to the panels and every panel under its heading. */\n.sw-tabs__title { margin: 0 0 var(--sw-space-3); }\n.sw-tabs__layout { display: grid; gap: var(--sw-space-3); }\n.sw-tabs__list { position: relative; display: flex; gap: var(--sw-space-1); margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: thin; border-bottom: var(--sw-tabs-rule, 1px solid var(--sw-color-border)); }\n.sw-tabs__item { flex: none; display: flex; }\n.sw-page .sw-tabs__tab { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0.5rem 1rem; color: var(--sw-color-muted); font-weight: 600; text-decoration: none; white-space: nowrap; border-radius: var(--sw-radius, 8px) var(--sw-radius, 8px) 0 0; }\n.sw-page .sw-tabs__tab:hover { color: var(--sw-color-text); text-decoration: none; }\n.sw-page .sw-tabs__tab[aria-selected=\"true\"] { color: var(--sw-color-text); box-shadow: inset 0 -3px 0 var(--sw-color-primary, #1d4ed8); }\n/* Inside the ring: the list scrolls, so a ring outside the tab would be cut off. */\n.sw-page .sw-tabs__tab:focus-visible { outline: 2px solid var(--sw-color-primary, #1d4ed8); outline-offset: -4px; }\n.sw-tabs__panel { scroll-margin-top: var(--sw-space-3); }\n.sw-tabs__panel + .sw-tabs__panel { margin-top: var(--sw-space-4); }\n.sw-page .sw-tabs__heading { margin: 0 0 var(--sw-space-2); }\n.sw-tabs--on .sw-tabs__panel + .sw-tabs__panel { margin-top: 0; }\n.sw-tabs--on .sw-tabs__heading { display: none; }\n.sw-tabs__panel[hidden] { display: none; }\n.sw-tabs--on .sw-tabs__panel:focus-visible { outline: none; box-shadow: var(--sw-focus-ring); border-radius: 2px; }\n@media (min-width: 760px) {\n .sw-tabs--vertical .sw-tabs__layout { grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr); align-items: start; }\n .sw-tabs--vertical .sw-tabs__list { flex-direction: column; overflow: visible; border-bottom: 0; border-inline-end: var(--sw-tabs-rule, 1px solid var(--sw-color-border)); }\n .sw-page .sw-tabs--vertical .sw-tabs__tab { width: 100%; white-space: normal; border-radius: var(--sw-radius, 8px) 0 0 var(--sw-radius, 8px); }\n .sw-page .sw-tabs--vertical .sw-tabs__tab[aria-selected=\"true\"] { box-shadow: inset -3px 0 0 var(--sw-color-primary, #1d4ed8); }\n}\n\n/* Carousel: without the script a row that scrolls sideways with snapping; with it, controls and one row position at a time. */\n.sw-carousel { --sw-carousel-gap: var(--sw-space-3, 1.5rem); --sw-carousel-n: 1; --sw-carousel-peek: 0px; position: relative; }\n.sw-carousel__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sw-space-2); margin-bottom: var(--sw-space-3); }\n.sw-carousel__head--empty, .sw-carousel--hero .sw-carousel__head:not(:has(.sw-carousel__title)) { margin-bottom: 0; }\n.sw-carousel__title { margin: 0; }\n.sw-carousel__frame { position: relative; }\n.sw-carousel__track { position: relative; display: flex; gap: var(--sw-carousel-gap); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; padding: 6px 6px var(--sw-space-1); margin-inline: -6px; scroll-padding-inline: 6px; }\n.sw-carousel--hero .sw-carousel__track { padding: 0; margin-inline: 0; scroll-padding-inline: 0; }\n.sw-carousel__track:focus-visible { outline: none; box-shadow: var(--sw-focus-ring); border-radius: 2px; }\n.sw-carousel__slide { flex: 0 0 calc((100% - (var(--sw-carousel-n) - 1) * var(--sw-carousel-gap) - var(--sw-carousel-peek)) / var(--sw-carousel-n)); min-width: 0; scroll-snap-align: start; }\n.sw-carousel--cards { --sw-carousel-peek: 15%; }\n@media (min-width: 640px) { .sw-carousel--per-2, .sw-carousel--per-3, .sw-carousel--per-4 { --sw-carousel-n: 2; } .sw-carousel--cards { --sw-carousel-peek: 3rem; } }\n@media (min-width: 900px) { .sw-carousel--per-3, .sw-carousel--per-4 { --sw-carousel-n: 3; } }\n@media (min-width: 1100px) { .sw-carousel--per-4 { --sw-carousel-n: 4; } }\n.sw-carousel--hero { --sw-carousel-gap: 0px; }\n.sw-block.sw-carousel--hero { padding-block: 0; }\n.sw-carousel--hero + .sw-block { padding-top: var(--sw-block-pad, 1.5rem); }\n.sw-carousel--hero .sw-carousel__body { display: flex; flex-direction: column; height: 100%; }\n.sw-carousel--hero .sw-carousel__body > * { flex: 1 0 auto; }\n.sw-carousel--full .sw-carousel__slide { min-height: 100svh; }\n.sw-carousel--testimonial .sw-carousel__slide { text-align: center; }\n.sw-carousel--testimonial .sw-carousel__body { max-width: 46rem; margin-inline: auto; font-size: 1.125rem; }\n.sw-carousel--stats .sw-carousel__slide { text-align: center; }\n.sw-page .sw-carousel--stats .sw-carousel__body > .sw-block:first-child :is(h2, h3, h4) { font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem); color: var(--sw-color-primary, #1d4ed8); font-variant-numeric: tabular-nums; }\n.sw-carousel__slide-frame { height: 100%; }\n/* With the script: no scroll bar (the controls move the row), the controls and the picker appear. */\n.sw-carousel--on .sw-carousel__track { scrollbar-width: none; }\n.sw-carousel--on:not(.sw-carousel--hero) .sw-carousel__track { padding-bottom: 6px; }\n.sw-carousel--on .sw-carousel__track::-webkit-scrollbar { display: none; }\n.sw-carousel__controls { display: flex; align-items: center; gap: var(--sw-space-1); margin-inline-start: auto; }\n.sw-carousel__controls[hidden], .sw-carousel__picker[hidden], .sw-carousel__button[hidden] { display: none; }\n.sw-carousel__button { display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; min-width: 2.75rem; min-height: 2.75rem; padding: 0 0.75rem; font: inherit; font-size: 0.875rem; font-weight: 600; line-height: 1; color: var(--sw-carousel-ink, var(--sw-color-primary-contrast, #ffffff)); background: var(--sw-carousel-fill, var(--sw-color-primary, #1d4ed8)); border: 2px solid var(--sw-carousel-edge, var(--sw-color-primary, #1d4ed8)); border-radius: 999px; cursor: pointer; }\n.sw-carousel__prev, .sw-carousel__next { padding: 0; }\n.sw-carousel__button[aria-disabled=\"true\"] { opacity: 0.45; cursor: default; }\n.sw-carousel__foot { display: flex; justify-content: center; margin-top: var(--sw-space-2); }\n.sw-carousel__picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem; }\n.sw-carousel__pick { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; padding: 0; background: none; border: 0; border-radius: 999px; cursor: pointer; color: var(--sw-color-primary, #1d4ed8); }\n.sw-carousel__pick::before { content: ''; width: 0.7rem; height: 0.7rem; border-radius: 999px; border: 2px solid currentColor; background: transparent; }\n.sw-carousel__pick[aria-current=\"true\"]::before { background: currentColor; }\n.sw-carousel__picker--thumbs { gap: var(--sw-space-1); }\n.sw-carousel__picker--thumbs .sw-carousel__pick { width: 3.25rem; height: 3.25rem; border: 2px solid transparent; }\n.sw-carousel__picker--thumbs .sw-carousel__pick::before { content: none; }\n.sw-carousel__picker--thumbs .sw-carousel__pick[aria-current=\"true\"] { border-color: currentColor; }\n.sw-carousel__thumb { width: 2.75rem; height: 2.75rem; border-radius: 999px; object-fit: cover; }\n.sw-carousel__initial { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 999px; background: var(--sw-color-surface); color: var(--sw-color-text); font-weight: 700; }\n/* Hero: the controls and the picker sit over the slide. */\n.sw-carousel--hero .sw-carousel__head { position: absolute; inset-inline: 0; bottom: var(--sw-space-3); z-index: 2; margin: 0; pointer-events: none; }\n.sw-carousel--hero .sw-carousel__head > * { pointer-events: auto; }\n.sw-carousel--hero .sw-carousel__head:has(.sw-carousel__title) { position: static; margin-block: var(--sw-block-pad, 1.5rem) var(--sw-space-3); pointer-events: auto; }\n.sw-carousel--hero .sw-carousel__foot { position: absolute; inset-inline: 0; bottom: var(--sw-space-3); z-index: 1; justify-content: flex-start; margin: 0; pointer-events: none; }\n.sw-carousel--hero .sw-carousel__picker { pointer-events: auto; padding: 0.15rem 0.35rem; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: #ffffff; }\n.sw-carousel--hero .sw-carousel__pick { color: #ffffff; }\n.sw-carousel--hero .sw-carousel__pick:focus-visible { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #111827; }\n/* The page builder: slides one under the other, each named. */\n.sw-carousel--editing .sw-carousel__edit-slide + .sw-carousel__edit-slide { margin-top: var(--sw-space-3); }\n.sw-page .sw-carousel__edit-label { margin: 0 auto var(--sw-space-1); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.02em; color: var(--sw-color-muted); }\n@media (prefers-reduced-motion: no-preference) {\n html:not(.sw-reduce-motion) .sw-carousel__track { scroll-behavior: smooth; }\n}\n";
|
|
79
|
+
/** Blocks that need WIDGETS_SCRIPT: the page renderer adds it once when the layout has one of them. */
|
|
80
|
+
export declare const WIDGET_BLOCKS: readonly ["Carousel", "Accordion", "Tabs"];
|
|
81
|
+
/** Whether a block needs WIDGETS_SCRIPT: a Carousel, Accordion or Tabs, or a Video playing a YouTube or Vimeo video (its facade). */
|
|
82
|
+
export declare function needsWidgetsScript(type: string, props: Record<string, unknown> | undefined): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* The page script that enhances every Carousel, Accordion and Tabs block on the page (inline with the page's nonce, once per
|
|
85
|
+
* page). It runs once per document, picks up blocks added later (a Personalize island) and follows the visitor's Reduce motion
|
|
86
|
+
* choice (`sw-reduce-motion` on the root, or the stored choice, or the device's setting): autoplay never runs under it and slide
|
|
87
|
+
* changes jump instead of scrolling smoothly. Autoplay also needs the brand's motion on (`data-sw-motion` on the root).
|
|
88
|
+
*
|
|
89
|
+
* It also plays YouTube and Vimeo videos (the Video block's facade, `data-sw-video`): pressing the facade puts the player in a
|
|
90
|
+
* sandboxed frame in its place, or in the lightbox when it opens (and takes it out when it closes, which stops the video). Nothing
|
|
91
|
+
* is requested from YouTube or Vimeo before that. The consent note goes away once the visitor has allowed marketing and embedded
|
|
92
|
+
* content (the consent banner's cookie, never with Global Privacy Control).
|
|
93
|
+
*/
|
|
94
|
+
export declare const WIDGETS_SCRIPT = "(function(){var d=document,h=d.documentElement;if(h.hasAttribute('data-sw-widgets'))return;h.setAttribute('data-sw-widgets','');\nvar K='sw-reduce-motion',mq=window.matchMedia?matchMedia('(prefers-reduced-motion: reduce)'):null,found=!!(d.body&&'onbeforematch' in d.body),watchers=[];\nfunction stored(){try{return localStorage.getItem(K)}catch(e){return null}}\nfunction reduced(){if(h.classList.contains('sw-reduce-motion'))return true;if(h.classList.contains('sw-motion-allowed'))return false;var s=stored();return s===null?!!(mq&&mq.matches):s==='1'}\nfunction own(root,sel,attr){return [].slice.call(root.querySelectorAll(sel)).filter(function(el){return el.closest('['+attr+']')===root})}\nfunction keyboardFocus(el){try{return el.matches(':focus-visible')}catch(e){return true}}\nfunction setItem(it,open){it._swb.setAttribute('aria-expanded',open?'true':'false');it.classList.toggle('sw-accordion__item--open',open);if(open)it._swp.removeAttribute('hidden');else if(found)it._swp.setAttribute('hidden','until-found');else it._swp.hidden=true}\nfunction accordion(root){if(root._sw)return;root._sw=1;var single=root.getAttribute('data-sw-accordion')==='single',items=own(root,'.sw-accordion__item','data-sw-accordion'),btns=[];\nfunction only(it){if(single)items.forEach(function(o){if(o!==it&&o._swb)setItem(o,false)})}\nitems.forEach(function(it){var hd=it.querySelector('.sw-accordion__heading'),pn=it.querySelector('.sw-accordion__panel');if(!hd||!pn||hd.closest('.sw-accordion__item')!==it)return;\nvar b=d.createElement('button');b.type='button';b.className='sw-accordion__trigger';b.id=pn.id+'-button';b.setAttribute('aria-controls',pn.id);while(hd.firstChild)b.appendChild(hd.firstChild);\nvar ic=d.createElement('span');ic.className='sw-accordion__icon';ic.setAttribute('aria-hidden','true');b.appendChild(ic);hd.appendChild(b);pn.setAttribute('aria-labelledby',b.id);\nit._swb=b;it._swp=pn;btns.push(b);it._swOpen=function(){only(it);setItem(it,true)};\nb.addEventListener('click',function(){var open=b.getAttribute('aria-expanded')!=='true';if(open)only(it);setItem(it,open)});\npn.addEventListener('beforematch',function(){only(it);setItem(it,true)})});\nvar first=true;items.forEach(function(it){if(!it._swb)return;var open=it.hasAttribute('data-open')&&(!single||first);if(open)first=false;setItem(it,open)});\nroot.addEventListener('keydown',function(e){var i=btns.indexOf(e.target);if(i<0)return;var k=e.key,n=k==='ArrowDown'?i+1:k==='ArrowUp'?i-1:k==='Home'?0:k==='End'?btns.length-1:null;if(n===null)return;e.preventDefault();btns[(n+btns.length)%btns.length].focus()});\nroot.classList.add('sw-accordion--on')}\nfunction tabs(root){if(root._sw)return;root._sw=1;var list=own(root,'.sw-tabs__list','data-sw-tabs')[0],ts=own(root,'.sw-tabs__tab','data-sw-tabs'),ps=own(root,'.sw-tabs__panel','data-sw-tabs');if(!list||!ts.length||ts.length!==ps.length)return;\nvar vertical=root.getAttribute('data-sw-tabs')==='vertical',cur=-1;list.setAttribute('role','tablist');if(vertical)list.setAttribute('aria-orientation','vertical');\n[].slice.call(list.children).forEach(function(li){li.setAttribute('role','presentation')});\nfunction reveal(t){if(list.scrollWidth<=list.clientWidth+1)return;var a=t.offsetLeft,b=a+t.offsetWidth;if(a<list.scrollLeft)list.scrollLeft=Math.max(0,a-8);else if(b>list.scrollLeft+list.clientWidth)list.scrollLeft=b-list.clientWidth+8}\nfunction select(i,url){cur=i;ts.forEach(function(t,k){var on=k===i;t.setAttribute('aria-selected',on?'true':'false');t.tabIndex=on?0:-1;ps[k].hidden=!on});reveal(ts[i]);if(url&&history.replaceState)try{history.replaceState(history.state,'','#'+ps[i].id)}catch(e){}}\nts.forEach(function(t,i){var p=ps[i];t.setAttribute('role','tab');t.setAttribute('aria-controls',p.id);p.setAttribute('role','tabpanel');p.setAttribute('aria-labelledby',t.id);p.tabIndex=0;p._swSelect=function(){select(i,false)};\nt.addEventListener('click',function(e){e.preventDefault();select(i,true)})});\nlist.addEventListener('keydown',function(e){var i=ts.indexOf(e.target);if(i<0)return;var k=e.key,n=null;if(k==='ArrowRight'||(vertical&&k==='ArrowDown'))n=i+1;else if(k==='ArrowLeft'||(vertical&&k==='ArrowUp'))n=i-1;else if(k==='Home')n=0;else if(k==='End')n=ts.length-1;\nif(n===null)return;e.preventDefault();n=(n+ts.length)%ts.length;select(n,true);ts[n].focus()});\nselect(0,false);root.classList.add('sw-tabs--on')}\nfunction carousel(root){if(root._sw)return;root._sw=1;var A='data-sw-carousel',track=own(root,'.sw-carousel__track',A)[0];if(!track)return;\nvar slides=own(root,'.sw-carousel__slide',A),n=slides.length;if(n<2)return;\nvar prev=own(root,'[data-sw-carousel-prev]',A)[0],next=own(root,'[data-sw-carousel-next]',A)[0],pause=own(root,'[data-sw-carousel-pause]',A)[0],picks=own(root,'[data-sw-carousel-pick]',A);\nvar loop=root.hasAttribute('data-loop'),auto=+root.getAttribute('data-autoplay')||0,cur=0,timer=0,stopped=false,hover=false,seen=true,st=0,rtl=getComputedStyle(track).direction==='rtl';\nown(root,'[data-sw-carousel-controls],[data-sw-carousel-picker]',A).forEach(function(c){c.hidden=false});root.classList.add('sw-carousel--on');\nfunction pos(i){return Math.abs(slides[i].offsetLeft-slides[0].offsetLeft)}\nfunction max(){return Math.max(0,track.scrollWidth-track.clientWidth)}\nfunction at(){return Math.abs(track.scrollLeft)}\nfunction nearest(){var x=at(),m=max(),best=0,bd=1/0;for(var i=0;i<n;i++){var dd=Math.abs(Math.min(pos(i),m)-x);if(dd<bd-1){bd=dd;best=i}}return best}\nfunction shown(i){var x=at(),p=pos(i);return p>=x-2&&p+slides[i].offsetWidth<=x+track.clientWidth+2}\nfunction sync(){cur=nearest();var lost=false;slides.forEach(function(s,i){var v=shown(i)||i===cur;if(!v&&s.contains(d.activeElement))lost=true;if(v){s.removeAttribute('inert');s.removeAttribute('aria-hidden')}else{s.setAttribute('inert','');s.setAttribute('aria-hidden','true')}});\nif(lost)track.focus({preventScroll:true});\npicks.forEach(function(b,i){if(i===cur)b.setAttribute('aria-current','true');else b.removeAttribute('aria-current');b.tabIndex=i===cur?0:-1});\nif(prev)prev.setAttribute('aria-disabled',!loop&&at()<=2?'true':'false');if(next)next.setAttribute('aria-disabled',!loop&&at()>=max()-2?'true':'false')}\nfunction go(i){i=loop?(i+n)%n:Math.max(0,Math.min(n-1,i));var left=Math.min(pos(i),max());if(Math.abs(left-at())<1){sync();return}track.scrollTo({left:rtl?-left:left,behavior:reduced()?'auto':'smooth'})}\nfunction step(dir){if(dir>0){if(at()>=max()-2){if(loop)go(0);return}go(cur+1)}else{if(at()<=2){if(loop)go(n-1);return}go(cur-1)}}\nfunction allowed(){return auto>0&&h.hasAttribute('data-sw-motion')&&!reduced()}\nfunction schedule(){clearTimeout(timer);timer=0;var on=allowed();if(pause){pause.hidden=!on;pause.textContent=stopped?'Play slides':'Pause slides'}track.setAttribute('aria-live',on&&!stopped?'off':'polite');\nif(on&&!stopped&&!hover&&seen&&!d.hidden)timer=setTimeout(function(){timer=0;if(at()>=max()-2)go(0);else step(1);schedule()},auto*1000)}\nfunction keyStep(e){var k=e.key;if(k==='ArrowRight')return rtl?-1:1;if(k==='ArrowLeft')return rtl?1:-1;if(k==='Home')return 'first';if(k==='End')return 'last';return 0}\ntrack.addEventListener('scroll',function(){clearTimeout(st);st=setTimeout(sync,90)},{passive:true});\ntrack.addEventListener('keydown',function(e){if(e.target!==track)return;var s=keyStep(e);if(!s)return;e.preventDefault();if(s==='first')go(0);else if(s==='last')go(n-1);else step(s)});\npicks.forEach(function(b,i){b.addEventListener('click',function(){go(i);schedule()});b.addEventListener('keydown',function(e){var s=keyStep(e);if(!s)return;e.preventDefault();var j=s==='first'?0:s==='last'?picks.length-1:(i+s+picks.length)%picks.length;go(j);picks[j].tabIndex=0;picks[j].focus()})});\nif(prev)prev.addEventListener('click',function(){if(prev.getAttribute('aria-disabled')!=='true')step(-1);schedule()});\nif(next)next.addEventListener('click',function(){if(next.getAttribute('aria-disabled')!=='true')step(1);schedule()});\nif(pause)pause.addEventListener('click',function(){stopped=!stopped;schedule()});\nroot.addEventListener('focusin',function(e){if(!stopped&&allowed()&&keyboardFocus(e.target)){stopped=true;schedule()}});\nroot.addEventListener('pointerdown',function(e){if(e.pointerType==='touch'&&allowed()&&!stopped){stopped=true;schedule()}});\nroot.addEventListener('mouseenter',function(){hover=true;schedule()});root.addEventListener('mouseleave',function(){hover=false;schedule()});\nif('IntersectionObserver' in window)new IntersectionObserver(function(es){seen=es[es.length-1].isIntersecting;schedule()}).observe(root);\nd.addEventListener('visibilitychange',schedule);window.addEventListener('resize',function(){clearTimeout(st);st=setTimeout(sync,120)});\nwatchers.push(schedule);root._swGo=go;sync();schedule()}\nfunction consented(){if(navigator.globalPrivacyControl===true)return false;return /(?:^|; )sw_consent=(?:1|a[01]m1)(?:;|$)/.test(d.cookie)}\nfunction notes(box,hide){[].forEach.call(box.querySelectorAll('[data-sw-video-consent]'),function(n){n.hidden=hide})}\nfunction frameFor(box){var f=d.createElement('iframe');f.className='sw-video__frame';f.src=box.getAttribute('data-sw-video');f.title=box.getAttribute('data-sw-video-title')||'Video';f.setAttribute('allow','autoplay; encrypted-media; picture-in-picture; fullscreen');var sb=box.getAttribute('data-sw-video-sandbox');if(sb)f.setAttribute('sandbox',sb);f.setAttribute('referrerpolicy','strict-origin-when-cross-origin');return f}\nfunction video(box){if(box._sw)return;box._sw=1;if(!/^https:\\/\\/(www\\.youtube-nocookie\\.com|player\\.vimeo\\.com)\\//.test(box.getAttribute('data-sw-video')||''))return;if(consented())notes(box,true);\nvar a=box.querySelector('[data-sw-video-facade]');if(a){a.setAttribute('role','button');\na.addEventListener('click',function(e){if(e.button||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey)return;e.preventDefault();var f=frameFor(box);a.parentNode.replaceChild(f,a);notes(box,true);try{f.focus()}catch(x){}});\na.addEventListener('keydown',function(e){if(e.key===' '){e.preventDefault();a.click()}})}\nvar b=box.querySelector('[popovertarget]'),pop=b&&d.getElementById(b.getAttribute('popovertarget'));if(!pop||pop._sw)return;pop._sw=1;\npop.addEventListener('toggle',function(e){var st=pop.querySelector('[data-sw-video-stage]');if(!st)return;var open=e.newState?e.newState==='open':pop.matches(':popover-open');\nif(open){if(st.querySelector('iframe'))return;st._kids=[].slice.call(st.childNodes);st._kids.forEach(function(k){st.removeChild(k)});st.appendChild(frameFor(box));notes(box,true)}\nelse{var f=st.querySelector('iframe');if(f)st.removeChild(f);(st._kids||[]).forEach(function(k){st.appendChild(k)})}})}\nfunction init(scope){if(scope.matches){if(scope.matches('[data-sw-accordion]'))accordion(scope);if(scope.matches('[data-sw-tabs]'))tabs(scope);if(scope.matches('[data-sw-carousel]'))carousel(scope);if(scope.matches('[data-sw-video]'))video(scope)}\n[].slice.call(scope.querySelectorAll('[data-sw-accordion]')).forEach(accordion);[].slice.call(scope.querySelectorAll('[data-sw-tabs]')).forEach(tabs);[].slice.call(scope.querySelectorAll('[data-sw-carousel]')).forEach(carousel);[].slice.call(scope.querySelectorAll('[data-sw-video]')).forEach(video)}\nfunction toHash(scroll){var id;try{id=decodeURIComponent(location.hash.slice(1))}catch(e){return}if(!id)return;var t=d.getElementById(id);if(!t)return;var el=t,hit=false,box=t;\nwhile(el){if(el._swOpen){el._swOpen();hit=true}if(el._swSelect){el._swSelect();hit=true;if(el===t)box=el.closest('[data-sw-tabs]')||t}el=el.parentElement}\nif(hit&&scroll)box.scrollIntoView({block:'start'});if(hit){var f=t._swb||(box!==t&&box.querySelector('[role=tab][aria-selected=true]'));if(f)try{f.focus({preventScroll:true})}catch(e){}}}\ninit(d);toHash(true);window.addEventListener('hashchange',function(){toHash(true)});\nfunction motionChanged(){watchers.forEach(function(w){w()})}\nif(mq){if(mq.addEventListener)mq.addEventListener('change',motionChanged);else if(mq.addListener)mq.addListener(motionChanged)}\nwindow.addEventListener('storage',function(e){if(e.key===K)motionChanged()});\nif('MutationObserver' in window){new MutationObserver(motionChanged).observe(h,{attributes:true,attributeFilter:['class','data-sw-motion']});\nnew MutationObserver(function(ms){ms.forEach(function(m){[].forEach.call(m.addedNodes,function(nd){if(nd.nodeType===1&&nd.querySelector)init(nd)})})}).observe(d.body,{childList:true,subtree:true})}\n})();";
|
|
95
|
+
export {};
|