@spillway-cms/blocks 0.1.1 → 0.1.3

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.
@@ -0,0 +1,95 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Lottie and 3D model blocks (docs/dev/motion.md, phase 2). Both render on the server as a figure with their poster image, which
4
+ * is all a visitor gets without JavaScript; the page's motion script loads a self-hosted player (`/_motion/lottie.js`,
5
+ * `/_motion/model-viewer.js`) only when the block comes near the screen.
6
+ *
7
+ * - Lottie plays a vector animation (.json) when in view, looped with a pause button or once. Without motion (the brand's level
8
+ * off, or the visitor reduces motion) it shows the poster, or the animation's last frame when there is no poster.
9
+ * - 3D model shows a .glb or .gltf file people can turn and zoom, with an optional AR button on phones. It is not motion: it loads
10
+ * whatever the motion level, and only its auto-rotation stops when the visitor reduces motion.
11
+ */
12
+ import { createElement } from 'react';
13
+ const cx = (...c) => c.filter(Boolean).join(' ');
14
+ const sizeOptions = [
15
+ { label: 'Small', value: 's' },
16
+ { label: 'Medium', value: 'm' },
17
+ { label: 'Large', value: 'l' },
18
+ ];
19
+ /** A Lottie file the player reads: JSON from the media library or another URL. */
20
+ export const isLottieFile = (src) => /\.json(\?.*)?$/i.test((src ?? '').trim());
21
+ /** A model file <model-viewer> reads. */
22
+ export const isModelFile = (src) => /\.(glb|gltf)(\?.*)?$/i.test((src ?? '').trim());
23
+ export const lottieComponent = {
24
+ label: 'Lottie animation',
25
+ fields: {
26
+ src: { type: 'text', label: 'Animation file URL (.json)', placeholder: '/media/....json' },
27
+ poster: { type: 'text', label: 'Poster image URL (shown without motion)', placeholder: '/media/...' },
28
+ alt: { type: 'text', label: 'Alt text (empty when it is decoration)', placeholder: 'Describe what it shows' },
29
+ loop: { type: 'radio', label: 'Play', options: [{ label: 'In a loop, with a pause button', value: true }, { label: 'Once', value: false }] },
30
+ size: { type: 'radio', label: 'Size', options: sizeOptions },
31
+ caption: { type: 'text', label: 'Caption' },
32
+ },
33
+ defaultProps: { src: '', poster: '', alt: '', loop: true, size: 'm', caption: '' },
34
+ render: ({ src, poster, alt, loop, size, caption }) => {
35
+ const file = isLottieFile(src) ? src.trim() : '';
36
+ const label = (alt ?? '').trim();
37
+ return (_jsxs("figure", { className: cx('sw-block', 'sw-lottie', `sw-lottie--${size || 'm'}`), "data-sw-lottie": file || undefined, "data-lottie-loop": loop ? 'true' : 'false', children: [_jsx("div", { className: "sw-lottie__stage", ...(label ? { role: 'img', 'aria-label': label } : { 'aria-hidden': 'true' }), children: poster?.trim() ? _jsx("img", { className: "sw-lottie__poster", src: poster.trim(), alt: "", loading: "lazy" }) : null }), file && loop ? (_jsx("button", { type: "button", className: "sw-lottie-toggle", "data-sw-lottie-toggle": "", "aria-pressed": "false", hidden: true, children: "Pause animation" })) : null, caption?.trim() ? _jsx("figcaption", { className: "sw-lottie__caption", children: caption }) : null] }));
38
+ },
39
+ };
40
+ export const model3dComponent = {
41
+ label: '3D model',
42
+ fields: {
43
+ src: { type: 'text', label: 'Model file URL (.glb or .gltf)', placeholder: '/media/....glb' },
44
+ alt: { type: 'text', label: 'Alt text (required)', placeholder: 'Describe the object' },
45
+ poster: { type: 'text', label: 'Poster image URL (shown while it loads)', placeholder: '/media/...' },
46
+ autoRotate: { type: 'radio', label: 'Turn slowly on its own', options: [{ label: 'Yes', value: true }, { label: 'No', value: false }] },
47
+ ar: { type: 'radio', label: 'View in your space (AR on phones)', options: [{ label: 'Yes', value: true }, { label: 'No', value: false }] },
48
+ height: { type: 'radio', label: 'Height', options: sizeOptions },
49
+ caption: { type: 'text', label: 'Caption' },
50
+ },
51
+ defaultProps: { src: '', alt: '', poster: '', autoRotate: true, ar: false, height: 'm', caption: '' },
52
+ render: ({ src, alt, poster, autoRotate, ar, height, caption }) => {
53
+ const file = isModelFile(src) ? src.trim() : '';
54
+ const label = (alt ?? '').trim();
55
+ const still = poster?.trim() ? _jsx("img", { className: "sw-model__poster", slot: "poster", src: poster.trim(), alt: label }) : null;
56
+ // <model-viewer> is a custom element the self-hosted player defines; until then (and without JavaScript) its poster shows.
57
+ const viewer = file
58
+ ? createElement('model-viewer', {
59
+ className: 'sw-model__viewer',
60
+ src: file,
61
+ alt: label || undefined,
62
+ 'camera-controls': '',
63
+ 'touch-action': 'pan-y',
64
+ 'interaction-prompt': 'auto',
65
+ 'shadow-intensity': '1',
66
+ loading: 'lazy',
67
+ ...(autoRotate ? { 'data-auto-rotate': '' } : {}),
68
+ ...(ar ? { ar: '', 'ar-modes': 'webxr scene-viewer quick-look' } : {}),
69
+ }, still)
70
+ : still;
71
+ return (_jsxs("figure", { className: cx('sw-block', 'sw-model', `sw-model--${height || 'm'}`), "data-sw-model": file ? '' : undefined, children: [viewer, caption?.trim() ? _jsx("figcaption", { className: "sw-model__caption", children: caption }) : null] }));
72
+ },
73
+ };
74
+ export const PLAYERS_CSS = `
75
+ /* Lottie: the poster until the player has drawn the first frame (sw-lottie-ready), then the animation's own SVG. */
76
+ .sw-lottie { margin-inline: auto; text-align: center; }
77
+ .sw-lottie--s { max-width: 240px; }
78
+ .sw-lottie--m { max-width: 480px; }
79
+ .sw-lottie--l { max-width: 720px; }
80
+ .sw-lottie__stage { position: relative; }
81
+ .sw-lottie:not(:has(.sw-lottie__poster)) .sw-lottie__stage { aspect-ratio: var(--sw-lottie-ratio, 1); }
82
+ .sw-lottie__poster { display: block; width: 100%; height: auto; }
83
+ .sw-lottie__stage > svg { position: absolute; inset: 0; }
84
+ .sw-lottie:not(.sw-lottie-ready) .sw-lottie__stage > svg, .sw-lottie-ready .sw-lottie__poster { visibility: hidden; }
85
+ .sw-lottie__caption, .sw-model__caption { margin-top: var(--sw-space-1, 0.5rem); font-size: 0.875rem; color: var(--sw-color-muted); text-align: center; }
86
+ /* 3D model: the viewer fills the figure; its poster shows until the model loads, and without JavaScript. */
87
+ .sw-model { margin-inline: auto; }
88
+ .sw-model__viewer, .sw-model > .sw-model__poster { display: block; width: 100%; height: var(--sw-model-height, 420px); background: var(--sw-color-surface, transparent); border-radius: var(--sw-radius, 8px); }
89
+ .sw-model__poster { object-fit: contain; }
90
+ .sw-model--s { --sw-model-height: 280px; }
91
+ .sw-model--l { --sw-model-height: 600px; }
92
+ @media (max-width: 640px) { .sw-model--l { --sw-model-height: 420px; } }
93
+ model-viewer:not(:defined) > .sw-model__poster { display: block; width: 100%; height: 100%; object-fit: contain; }
94
+ `;
95
+ //# sourceMappingURL=players.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"players.js","sourceRoot":"","sources":["../src/players.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAGtC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAwC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACxF,MAAM,WAAW,GAAG;IAClB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE;IAC9B,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,EAAE;IAC/B,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE;CAC/B,CAAC;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAuB,EAAE,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACpG,yCAAyC;AACzC,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,GAAuB,EAAE,EAAE,CAAC,uBAAuB,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAezG,MAAM,CAAC,MAAM,eAAe,GAAiC;IAC3D,KAAK,EAAE,kBAAkB;IACzB,MAAM,EAAE;QACN,GAAG,EA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AI,EAAC,QAAQ,EAAC,GAAG,EAAE,MAAM,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,KAAK,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;QACzH,2HAA2H;QAC3H,MAAM,MAAM,GAAG,IAAI;YACjB,CAAC,CAAC,aAAa,CACX,cAAc,EACd;gBACE,SAAS,EAAE,kBAAkB;gBAC7B,GAAG,EAAE,IAAI;gBACT,GAAG,EAAE,KAAK,IAAI,SAAS;gBACvB,iBAAiB,EAAE,EAAE;gBACrB,cAAc,EAAE,OAAO;gBACvB,oBAAoB,EAAE,MAAM;gBAC5B,kBAAkB,EAAE,GAAG;gBACvB,OAAO,EAAE,MAAM;gBACf,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjD,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,+BAA+B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aACvE,EACD,KAAK,CACN;YACH,CAAC,CAAC,KAAK,CAAC;QACV,OAAO,CACL,kBAAQ,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,aAAa,MAAM,IAAI,GAAG,EAAE,CAAC,mBAAiB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,aAC9G,MAAM,EACN,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,qBAAY,SAAS,EAAC,mBAAmB,YAAE,OAAO,GAAc,CAAC,CAAC,CAAC,IAAI,IACnF,CACV,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;CAoB1B,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Scrollytelling (docs/dev/motion.md, phase 2): text steps beside a media column that stays in place while the steps scroll past,
3
+ * switching to each step's image as it reaches the middle of the screen. The server renders an ordinary list of steps, each with
4
+ * its image, which is what visitors get without motion, on narrow screens, and in the page builder. When the brand's motion is on
5
+ * and the visitor has not reduced motion, the page's motion script builds the media column from the steps' images (hidden from
6
+ * screen readers, which keep reading each step's own image in order) and marks the step being read.
7
+ */
8
+ import type { ComponentConfig } from '@puckeditor/core';
9
+ export interface StoryStep {
10
+ heading: string;
11
+ /** Plain text; a blank line starts a new paragraph. */
12
+ text: string;
13
+ imageUrl: string;
14
+ alt: string;
15
+ }
16
+ export interface ScrollytellingProps {
17
+ title: string;
18
+ /** Which side the media column sits on, on wide screens. */
19
+ mediaSide: 'left' | 'right';
20
+ steps: StoryStep[];
21
+ }
22
+ export declare const scrollytellingComponent: ComponentConfig<ScrollytellingProps>;
23
+ export declare const STORY_CSS = "\n/* Scrollytelling: an ordinary list of steps until the motion script adds sw-story-on (wide screens only). */\n.sw-story__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sw-space-5, 3rem); }\n.sw-story__figure { margin: 0 0 var(--sw-space-2, 1rem); }\n.sw-story__figure img { display: block; width: 100%; height: auto; border-radius: var(--sw-radius, 8px); }\n.sw-story__heading { margin: 0 0 var(--sw-space-1, 0.5rem); }\n.sw-story__text p { margin: 0 0 var(--sw-space-1, 0.5rem); }\n.sw-story__media { display: none; }\n@media (min-width: 900px) {\n .sw-story-on .sw-story__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sw-space-5, 3rem); align-items: start; }\n .sw-story-on.sw-story--media-right .sw-story__media { order: 2; }\n .sw-story-on .sw-story__media { display: block; position: sticky; top: 15vh; height: 70vh; }\n .sw-story__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--sw-radius, 8px); opacity: 0; transition: opacity var(--sw-motion-duration, 600ms) ease; }\n .sw-story__media img.sw-story-shown { opacity: 1; }\n .sw-story-on .sw-story__steps { gap: 0; }\n .sw-story-on .sw-story__step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.4; transition: opacity 300ms ease; }\n .sw-story-on .sw-story__step.sw-story-active { opacity: 1; }\n .sw-story-on .sw-story__figure { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }\n}\n";
package/dist/story.js ADDED
@@ -0,0 +1,58 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ const cx = (...c) => c.filter(Boolean).join(' ');
3
+ export const scrollytellingComponent = {
4
+ label: 'Scrollytelling',
5
+ fields: {
6
+ title: { type: 'text', label: 'Title', contentEditable: true },
7
+ steps: {
8
+ type: 'array',
9
+ label: 'Steps',
10
+ min: 1,
11
+ max: 12,
12
+ getItemSummary: (item, i) => item.heading || `Step ${(i ?? 0) + 1}`,
13
+ arrayFields: {
14
+ heading: { type: 'text', label: 'Heading' },
15
+ text: { type: 'textarea', label: 'Text' },
16
+ imageUrl: { type: 'text', label: 'Image URL', placeholder: '/media/...' },
17
+ alt: { type: 'text', label: 'Alt text', placeholder: 'Describe the image' },
18
+ },
19
+ defaultItemProps: { heading: 'A step', text: 'What happens at this point, in a sentence or two.', imageUrl: '', alt: '' },
20
+ },
21
+ mediaSide: { type: 'radio', label: 'Images on the', options: [{ label: 'Left', value: 'left' }, { label: 'Right', value: 'right' }] },
22
+ },
23
+ defaultProps: {
24
+ title: '',
25
+ mediaSide: 'left',
26
+ steps: [
27
+ { heading: 'Apply', text: 'Start an application online. It takes about 20 minutes.', imageUrl: '', alt: '' },
28
+ { heading: 'Visit', text: 'Tour the campus and meet the people you would study with.', imageUrl: '', alt: '' },
29
+ { heading: 'Enroll', text: 'Accept your offer and pick your first classes.', imageUrl: '', alt: '' },
30
+ ],
31
+ },
32
+ render: ({ title, mediaSide, steps }) => {
33
+ const list = (steps ?? []).filter((s) => s.heading?.trim() || s.text?.trim() || s.imageUrl?.trim());
34
+ const Step = title ? 'h3' : 'h2';
35
+ return (_jsx("section", { className: cx('sw-block', 'sw-story', mediaSide === 'right' && 'sw-story--media-right'), "data-motion-story": "", children: _jsxs("div", { className: "sw-container", children: [title ? _jsx("h2", { className: "sw-story__title", children: title }) : null, _jsx("div", { className: "sw-story__layout", children: _jsx("ol", { className: "sw-story__steps", children: list.map((s, i) => (_jsxs("li", { className: "sw-story__step", "data-story-step": i, children: [s.imageUrl?.trim() ? (_jsx("figure", { className: "sw-story__figure", children: _jsx("img", { src: s.imageUrl.trim(), alt: s.alt ?? '', loading: "lazy" }) })) : null, s.heading?.trim() ? _jsx(Step, { className: "sw-story__heading", children: s.heading }) : null, s.text?.trim() ? (_jsx("div", { className: "sw-story__text", children: s.text.split(/\n{2,}/).map((p, k) => (_jsx("p", { children: p }, k))) })) : null] }, i))) }) })] }) }));
36
+ },
37
+ };
38
+ export const STORY_CSS = `
39
+ /* Scrollytelling: an ordinary list of steps until the motion script adds sw-story-on (wide screens only). */
40
+ .sw-story__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sw-space-5, 3rem); }
41
+ .sw-story__figure { margin: 0 0 var(--sw-space-2, 1rem); }
42
+ .sw-story__figure img { display: block; width: 100%; height: auto; border-radius: var(--sw-radius, 8px); }
43
+ .sw-story__heading { margin: 0 0 var(--sw-space-1, 0.5rem); }
44
+ .sw-story__text p { margin: 0 0 var(--sw-space-1, 0.5rem); }
45
+ .sw-story__media { display: none; }
46
+ @media (min-width: 900px) {
47
+ .sw-story-on .sw-story__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sw-space-5, 3rem); align-items: start; }
48
+ .sw-story-on.sw-story--media-right .sw-story__media { order: 2; }
49
+ .sw-story-on .sw-story__media { display: block; position: sticky; top: 15vh; height: 70vh; }
50
+ .sw-story__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--sw-radius, 8px); opacity: 0; transition: opacity var(--sw-motion-duration, 600ms) ease; }
51
+ .sw-story__media img.sw-story-shown { opacity: 1; }
52
+ .sw-story-on .sw-story__steps { gap: 0; }
53
+ .sw-story-on .sw-story__step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.4; transition: opacity 300ms ease; }
54
+ .sw-story-on .sw-story__step.sw-story-active { opacity: 1; }
55
+ .sw-story-on .sw-story__figure { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
56
+ }
57
+ `;
58
+ //# sourceMappingURL=story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"story.js","sourceRoot":"","sources":["../src/story.tsx"],"names":[],"mappings":";AASA,MAAM,EAAE,GAAG,CAAC,GAAG,CAAwC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAgBxF,MAAM,CAAC,MAAM,uBAAuB,GAAyC;IAC3E,KAAK,EAAE,gBAAgB;IACvB,MAAM,EAAE;QACN,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE;QAC9D,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO;YACd,GAAG,EAAE,CAAC;YACN,GAAG,EAAE,EAAE;YACP,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE;YACnE,WAAW,EAAE;gBACX,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE;gBAC3C,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE;gBACzC,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE;gBACzE,GAAG,EAAE,EAAE,IAAI,EAAE,M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AAC;IACJ,CAAC;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;CAmBxB,CAAC"}
package/dist/styles.css CHANGED
@@ -1127,6 +1127,21 @@
1127
1127
  .sw-module-block__body caption { padding-bottom: var(--sw-space-1); text-align: left; font-weight: 600; }
1128
1128
  .sw-module-block__body thead th { border-bottom: 2px solid var(--sw-color-border); }
1129
1129
 
1130
+ /* Scenes (docs/dev/motion.md, layer 3): the poster until the frame says it is ready, then the frame over it. */
1131
+ .sw-scene { margin: 0; }
1132
+ .sw-scene__stage { position: relative; height: var(--sw-scene-height, 420px); border-radius: var(--sw-radius, 8px); overflow: hidden; background: var(--sw-color-surface); }
1133
+ .sw-scene--s { --sw-scene-height: 280px; }
1134
+ .sw-scene--l { --sw-scene-height: 600px; }
1135
+ @media (max-width: 640px) { .sw-scene--l { --sw-scene-height: 420px; } }
1136
+ .sw-scene__poster { display: block; width: 100%; height: 100%; object-fit: cover; }
1137
+ .sw-scene__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; transition: opacity 400ms ease; }
1138
+ .sw-scene:not(.sw-scene--interactive) .sw-scene__frame { pointer-events: none; }
1139
+ .sw-scene-ready .sw-scene__frame { opacity: 1; }
1140
+ .sw-scene-ready .sw-scene__poster { visibility: hidden; }
1141
+ .sw-scene-toggle { display: block; margin: var(--sw-space-1, 0.5rem) 0 0 auto; font: inherit; font-size: 0.8125rem; color: inherit; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; opacity: 0.85; }
1142
+ .sw-scene-toggle[hidden] { display: none; }
1143
+ .sw-scene__content { margin-top: var(--sw-space-3, 1.5rem); }
1144
+
1130
1145
  .sw-module-block--placeholder { padding-block: var(--sw-space-2); }
1131
1146
  .sw-module-block__placeholder {
1132
1147
  padding: var(--sw-space-3);
@@ -1240,6 +1255,107 @@
1240
1255
  .sw-logos--gray .sw-logos__img { filter: grayscale(1); opacity: 0.75; transition: filter 0.2s, opacity 0.2s; }
1241
1256
  .sw-logos--gray a:hover .sw-logos__img, .sw-logos--gray a:focus-visible .sw-logos__img { filter: none; opacity: 1; }
1242
1257
 
1258
+
1259
+ /* Scrollytelling: an ordinary list of steps until the motion script adds sw-story-on (wide screens only). */
1260
+ .sw-story__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sw-space-5, 3rem); }
1261
+ .sw-story__figure { margin: 0 0 var(--sw-space-2, 1rem); }
1262
+ .sw-story__figure img { display: block; width: 100%; height: auto; border-radius: var(--sw-radius, 8px); }
1263
+ .sw-story__heading { margin: 0 0 var(--sw-space-1, 0.5rem); }
1264
+ .sw-story__text p { margin: 0 0 var(--sw-space-1, 0.5rem); }
1265
+ .sw-story__media { display: none; }
1266
+ @media (min-width: 900px) {
1267
+ .sw-story-on .sw-story__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sw-space-5, 3rem); align-items: start; }
1268
+ .sw-story-on.sw-story--media-right .sw-story__media { order: 2; }
1269
+ .sw-story-on .sw-story__media { display: block; position: sticky; top: 15vh; height: 70vh; }
1270
+ .sw-story__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--sw-radius, 8px); opacity: 0; transition: opacity var(--sw-motion-duration, 600ms) ease; }
1271
+ .sw-story__media img.sw-story-shown { opacity: 1; }
1272
+ .sw-story-on .sw-story__steps { gap: 0; }
1273
+ .sw-story-on .sw-story__step { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; opacity: 0.4; transition: opacity 300ms ease; }
1274
+ .sw-story-on .sw-story__step.sw-story-active { opacity: 1; }
1275
+ .sw-story-on .sw-story__figure { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
1276
+ }
1277
+
1278
+
1279
+ /* Lottie: the poster until the player has drawn the first frame (sw-lottie-ready), then the animation's own SVG. */
1280
+ .sw-lottie { margin-inline: auto; text-align: center; }
1281
+ .sw-lottie--s { max-width: 240px; }
1282
+ .sw-lottie--m { max-width: 480px; }
1283
+ .sw-lottie--l { max-width: 720px; }
1284
+ .sw-lottie__stage { position: relative; }
1285
+ .sw-lottie:not(:has(.sw-lottie__poster)) .sw-lottie__stage { aspect-ratio: var(--sw-lottie-ratio, 1); }
1286
+ .sw-lottie__poster { display: block; width: 100%; height: auto; }
1287
+ .sw-lottie__stage > svg { position: absolute; inset: 0; }
1288
+ .sw-lottie:not(.sw-lottie-ready) .sw-lottie__stage > svg, .sw-lottie-ready .sw-lottie__poster { visibility: hidden; }
1289
+ .sw-lottie__caption, .sw-model__caption { margin-top: var(--sw-space-1, 0.5rem); font-size: 0.875rem; color: var(--sw-color-muted); text-align: center; }
1290
+ /* 3D model: the viewer fills the figure; its poster shows until the model loads, and without JavaScript. */
1291
+ .sw-model { margin-inline: auto; }
1292
+ .sw-model__viewer, .sw-model > .sw-model__poster { display: block; width: 100%; height: var(--sw-model-height, 420px); background: var(--sw-color-surface, transparent); border-radius: var(--sw-radius, 8px); }
1293
+ .sw-model__poster { object-fit: contain; }
1294
+ .sw-model--s { --sw-model-height: 280px; }
1295
+ .sw-model--l { --sw-model-height: 600px; }
1296
+ @media (max-width: 640px) { .sw-model--l { --sw-model-height: 420px; } }
1297
+ model-viewer:not(:defined) > .sw-model__poster { display: block; width: 100%; height: 100%; object-fit: contain; }
1298
+
1299
+
1300
+ /* Motion: entrances (armed by the page's motion script), stagger and hover. */
1301
+ [data-motion] { --sw-motion-from: none; --sw-motion-wait: 0ms; }
1302
+ [data-motion="rise"] { --sw-motion-from: translateY(var(--sw-motion-distance, 24px)); }
1303
+ [data-motion="scale"] { --sw-motion-from: scale(0.94); }
1304
+ [data-motion="slide-left"] { --sw-motion-from: translateX(calc(-1 * var(--sw-motion-distance, 24px))); }
1305
+ [data-motion="slide-right"] { --sw-motion-from: translateX(var(--sw-motion-distance, 24px)); }
1306
+ [data-sw-motion="subtle"] :is([data-motion="scale"], [data-motion="slide-left"], [data-motion="slide-right"]) { --sw-motion-from: translateY(calc(var(--sw-motion-distance, 24px) / 2)); }
1307
+ [data-sw-motion="subtle"] [data-motion="rise"] { --sw-motion-from: translateY(calc(var(--sw-motion-distance, 24px) / 2)); }
1308
+ [data-motion-delay="short"] { --sw-motion-wait: 150ms; }
1309
+ [data-motion-delay="medium"] { --sw-motion-wait: 300ms; }
1310
+ /* The transition runs only as a block arrives (sw-in), so hiding the blocks below the fold is instant. */
1311
+ .sw-motion-ready [data-motion].sw-in:not([data-motion-stagger]),
1312
+ .sw-motion-ready [data-motion].sw-in[data-motion-stagger] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > * {
1313
+ transition: opacity var(--sw-motion-duration, 600ms) var(--sw-motion-easing, cubic-bezier(0.2, 0.7, 0.2, 1)), transform var(--sw-motion-duration, 600ms) var(--sw-motion-easing, cubic-bezier(0.2, 0.7, 0.2, 1));
1314
+ transition-delay: calc(var(--sw-motion-wait) + var(--sw-motion-index, 0) * 80ms);
1315
+ }
1316
+ .sw-motion-ready [data-motion]:not([data-motion-stagger]):not(.sw-in),
1317
+ .sw-motion-ready [data-motion][data-motion-stagger]:not(.sw-in) :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > * { opacity: 0; transform: var(--sw-motion-from); }
1318
+ [data-motion-hover] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *, [data-motion-hover].sw-image, [data-motion-hover] img { transition: transform 200ms ease, box-shadow 200ms ease; }
1319
+ [data-sw-motion] [data-motion-hover="lift"] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *:hover, [data-sw-motion] [data-motion-hover="lift"].sw-image:hover { transform: translateY(-4px); box-shadow: var(--sw-shadow, 0 8px 24px rgba(0, 0, 0, 0.12)); }
1320
+ [data-motion-hover="zoom"] :is(:is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *, .sw-image) { overflow: hidden; }
1321
+ [data-sw-motion] [data-motion-hover="zoom"] :is(:is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *, .sw-image):hover img, [data-sw-motion] [data-motion-hover="zoom"].sw-image:hover img { transform: scale(1.05); }
1322
+ [data-sw-motion="expressive"] [data-motion-hover="tilt"] :is(.sw-cards__grid, .sw-collection__list, .sw-gallery__grid, .sw-faq__list, .sw-logos__list, .sw-stats__grid, .sw-testimonials__grid, .sw-buttons) > *:hover { transform: perspective(800px) rotateX(2deg) rotateY(-3deg) translateY(-2px); }
1323
+ /* On scroll: the page script writes --sw-scroll (0 as the block enters at the bottom, 1 as it leaves at the top); unset, every
1324
+ effect sits at rest. Parallax moves a Hero's background slower than the page (half as far at the subtle level). */
1325
+ [data-motion-scroll="parallax"] { --sw-parallax: 16%; }
1326
+ [data-sw-motion="subtle"] [data-motion-scroll="parallax"] { --sw-parallax: 8%; }
1327
+ [data-sw-motion] [data-motion-scroll="parallax"].sw-hero--image { overflow: hidden; }
1328
+ [data-sw-motion] [data-motion-scroll="parallax"] .sw-hero__bg { transform: translateY(calc((var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax))) scale(1.18); will-change: transform; }
1329
+ [data-sw-motion] [data-motion-scroll="parallax"].sw-hero--image:not(:has(.sw-hero__bg)) { background-position: center calc(50% + (var(--sw-scroll, 0.5) - 0.5) * var(--sw-parallax) * 4); }
1330
+ [data-sw-motion] [data-motion-scroll="fade-out"] { opacity: clamp(0, calc((1 - var(--sw-scroll, 0)) / 0.35), 1); }
1331
+ [data-sw-motion] [data-motion-scroll="pin"] { position: sticky; top: 0; z-index: 0; }
1332
+ [data-sw-motion] [data-motion-scroll="pin"] ~ * { position: relative; z-index: 1; }
1333
+ .sw-visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
1334
+ .sw-hero { position: relative; }
1335
+ .sw-video-toggle { position: absolute; right: var(--sw-space-3, 1rem); bottom: var(--sw-space-3, 1rem); z-index: 1; font: inherit; font-size: 0.8125rem; color: #ffffff; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 999px; padding: 0.3rem 0.85rem; cursor: pointer; }
1336
+ .sw-video-toggle:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
1337
+ /* Marquee (Logo strip, Testimonials): the page script adds sw-marquee-on and copies the items (the copies are hidden from
1338
+ assistive technology) so the row loops; items carry their spacing as a margin so moving by half is seamless. */
1339
+ [data-motion-marquee]:not(.sw-marquee-on) [data-sw-marquee-clone] { display: none; }
1340
+ .sw-marquee-on .sw-container { overflow: hidden; }
1341
+ .sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid) { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 0; width: max-content; animation: sw-marquee var(--sw-marquee-duration, 40s) linear infinite; }
1342
+ .sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid) > * { flex: none; margin-inline-end: var(--sw-marquee-gap, var(--sw-space-4, 2rem)); }
1343
+ .sw-testimonials.sw-marquee-on .sw-testimonials__grid > * { width: min(22rem, 80vw); --sw-marquee-gap: var(--sw-space-3, 1.5rem); }
1344
+ .sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid):hover, .sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid):focus-within, .sw-marquee-paused :is(.sw-logos__list, .sw-testimonials__grid) { animation-play-state: paused; }
1345
+ @keyframes sw-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
1346
+ .sw-lottie-toggle { display: block; margin: var(--sw-space-1, 0.5rem) auto 0; font: inherit; font-size: 0.8125rem; color: inherit; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; opacity: 0.85; }
1347
+ .sw-lottie-toggle[hidden] { display: none; }
1348
+ .sw-marquee-toggle { display: block; margin: 0 auto var(--sw-space-3, 1rem); font: inherit; font-size: 0.8125rem; color: inherit; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; opacity: 0.85; }
1349
+ .sw-marquee-toggle[hidden] { display: none; }
1350
+ .sw-motion-switch { font: inherit; font-size: 0.8125rem; color: inherit; background: none; border: 1px solid currentColor; border-radius: 999px; padding: 0.2rem 0.75rem; cursor: pointer; opacity: 0.85; }
1351
+ .sw-motion-switch[aria-pressed="true"] { background: var(--sw-color-text); color: var(--sw-color-bg); opacity: 1; }
1352
+ .sw-reduce-motion *, .sw-reduce-motion *::before, .sw-reduce-motion *::after { transition: none !important; animation: none !important; }
1353
+ .sw-reduce-motion [data-motion], .sw-reduce-motion [data-motion] *, .sw-reduce-motion [data-motion-scroll], .sw-reduce-motion [data-motion-scroll] * { opacity: 1 !important; transform: none !important; }
1354
+ @media (prefers-reduced-motion: reduce) {
1355
+ html:not(.sw-motion-allowed) :is([data-motion], [data-motion-scroll]), html:not(.sw-motion-allowed) :is([data-motion], [data-motion-scroll]) * { opacity: 1 !important; transform: none !important; transition: none !important; }
1356
+ html:not(.sw-motion-allowed) .sw-marquee-on :is(.sw-logos__list, .sw-testimonials__grid) { animation: none !important; }
1357
+ }
1358
+
1243
1359
  @media (prefers-reduced-motion: reduce) {
1244
1360
  .sw-page * { transition: none !important; }
1245
1361
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spillway-cms/blocks",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Core block library for Spillway CMS: Puck components that render on the server and in the editor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -30,7 +30,7 @@
30
30
  "@puckeditor/core": "^0.24.0"
31
31
  },
32
32
  "dependencies": {
33
- "@spillway-cms/shared": "0.1.1"
33
+ "@spillway-cms/shared": "0.1.3"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@puckeditor/core": "^0.24.0",