use-scroll-animate 6.4.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [6.5.0] - 2026-10-08
11
+
12
+ ### Added
13
+ - **4 new components (6.5)** in `motionary/components/widgets` (also in `dist/widgets.umd.js`; the existing `<usa-timeline>`, `<usa-masonry>` and `<usa-cube>` are unchanged):
14
+ - `<usa-milestones>` — scroll-drawn timeline: the rail fills as you scroll, each milestone pops its dot and slides its card in when reached; `layout="alternate | left"` (one column below 640 px), `data-date` labels; `role="list"`; `usa:reach`.
15
+ - `<usa-masonry-flow>` — masonry grid with FLIP layout animation on resize, insert / remove, `filter()`, `shuffle()`, `sort()`; `min` column width, `gap`; `usa:layout`.
16
+ - `<usa-compare>` — before / after compare slider: drag, click-to-jump (eased), `hover` mode, keyboard (`role="slider"`), `orientation="vertical"`, `labels`, one-time `intro` sweep; `usa:change`.
17
+ - `<usa-cube-gallery>` — slides on adjacent faces of a 3D cube that turns between them; swipe, arrow keys, buttons, `autoplay` (pauses on hover / focus / off screen), `axis="x"`; `usa:change`.
18
+ - **3D scene cards — `motionary/components/fx-3d`** (5 effects, `register3dEffects()`, also in `registerFx2()`): `depth-stack` (layers separate in Z and parallax with the tilt), `product-spin` (drag-to-rotate 360° viewer with inertia + idle turntable), `card-flip-3d` (thick card flip, faces swap `aria-hidden`), `origami` (panel-by-panel unfold), `orbit-camera` (scroll-linked camera orbit, `--usa-orbit` progress variable).
19
+ - Showcase: 7 new gallery cards (shuffle / filter buttons for the masonry) with copyable code; Animation Store “Components 6.x” 21 → 28 entries (248 → 255 items).
20
+
21
+ ### Accessibility
22
+ - Milestones are a list, the compare slider and cube gallery are keyboard operable with ARIA roles. Reduced motion: milestones are shown at once, the cube fades, masonry items jump, 3D tilt / spin / orbit / origami are off and the flip crossfades.
23
+
10
24
  ## [6.4.0] - 2026-10-08
11
25
 
12
26
  ### Added
@@ -0,0 +1,236 @@
1
+ 'use strict';
2
+
3
+ var registry = require('../chunks/registry-DehBVRDV.cjs');
4
+ var shared = require('../chunks/shared-jkgRH-Hx.cjs');
5
+ var components_fxLight = require('./fx-light.cjs');
6
+ require('../chunks/base-BaQV-2ha.cjs');
7
+ require('../chunks/generative-BHIj-NU0.cjs');
8
+
9
+ const layers = (el) => {
10
+ const marked = Array.from(el.querySelectorAll('[data-depth]'));
11
+ return marked.length ? marked : Array.from(el.children);
12
+ };
13
+ const raf = (f) => (typeof requestAnimationFrame === 'function' ? requestAnimationFrame(f) : 0);
14
+ const caf = (h) => {
15
+ if (h && typeof cancelAnimationFrame === 'function')
16
+ cancelAnimationFrame(h);
17
+ };
18
+ const DEPTH3_FX = [
19
+ {
20
+ name: 'depth-stack',
21
+ kind: 'card',
22
+ reduced: 'run',
23
+ description: 'The children (or `[data-depth]` layers) separate in Z and parallax as the card tilts toward the pointer (persistent; `tilt` deg, `depth` px between layers).',
24
+ defaults: { tilt: 14, depth: 28 },
25
+ run: (el, o, ctx) => {
26
+ const prev = [el.style.transform, el.style.transformStyle, el.style.transition];
27
+ el.style.transformStyle = 'preserve-3d';
28
+ el.style.transition = 'transform .25s ease-out';
29
+ const ls = layers(el);
30
+ const saved = ls.map((l) => [l.style.transform, l.style.transition]);
31
+ ls.forEach((l) => (l.style.transition = 'transform .3s ease-out'));
32
+ const stop = components_fxLight.trackPointer(el, ctx, (x, y, inside) => {
33
+ const rx = (0.5 - y) * 2 * o.tilt;
34
+ const ry = (x - 0.5) * 2 * o.tilt;
35
+ el.style.transform = ctx.reduced ? '' : inside ? `perspective(800px) rotateX(${rx.toFixed(2)}deg) rotateY(${ry.toFixed(2)}deg)` : 'perspective(800px) rotateX(6deg) rotateY(-8deg)';
36
+ ls.forEach((l, i) => {
37
+ const d = ctx.reduced ? 0 : Number(l.dataset.depth || i + 1) * o.depth * (inside ? 1 : 0.5);
38
+ l.style.transform = `translateZ(${d.toFixed(1)}px)`;
39
+ });
40
+ }, 0.5, 0.5);
41
+ return () => {
42
+ stop();
43
+ [el.style.transform, el.style.transformStyle, el.style.transition] = prev;
44
+ ls.forEach((l, i) => ([l.style.transform, l.style.transition] = saved[i]));
45
+ };
46
+ },
47
+ },
48
+ {
49
+ name: 'product-spin',
50
+ kind: 'card',
51
+ description: 'A 360° product viewer: drag to turn the element in 3D with inertia; idles with a slow turntable spin (persistent; `idle` deg/s, `friction`, `tilt`).',
52
+ defaults: { idle: 18, friction: 0.94, tilt: -8 },
53
+ run: (el, o, ctx) => {
54
+ const prev = [el.style.transform, el.style.touchAction, el.style.cursor];
55
+ el.style.touchAction = 'pan-y';
56
+ el.style.cursor = 'grab';
57
+ let a = 0;
58
+ let v = 0;
59
+ let drag = false;
60
+ let lx = 0;
61
+ let h = 0;
62
+ let last = performance.now();
63
+ const paint = () => (el.style.transform = `perspective(900px) rotateX(${o.tilt}deg) rotateY(${a.toFixed(2)}deg)`);
64
+ paint();
65
+ const tick = (now) => {
66
+ const dt = Math.min(64, now - last) / 1000;
67
+ last = now;
68
+ if (!drag) {
69
+ v *= o.friction;
70
+ a += v * dt + (Math.abs(v) < 4 ? o.idle * dt : 0);
71
+ }
72
+ paint();
73
+ h = raf(tick);
74
+ };
75
+ h = raf(tick);
76
+ const down = (e) => {
77
+ drag = true;
78
+ lx = e.clientX;
79
+ v = 0;
80
+ el.style.cursor = 'grabbing';
81
+ el.setPointerCapture?.(e.pointerId);
82
+ };
83
+ const move = (e) => {
84
+ if (!drag)
85
+ return;
86
+ const dx = e.clientX - lx;
87
+ lx = e.clientX;
88
+ a += dx * 0.6;
89
+ v = dx * 36;
90
+ };
91
+ const up = () => {
92
+ drag = false;
93
+ el.style.cursor = 'grab';
94
+ };
95
+ el.addEventListener('pointerdown', down);
96
+ el.addEventListener('pointermove', move);
97
+ el.addEventListener('pointerup', up);
98
+ el.addEventListener('pointercancel', up);
99
+ return () => {
100
+ caf(h);
101
+ el.removeEventListener('pointerdown', down);
102
+ el.removeEventListener('pointermove', move);
103
+ el.removeEventListener('pointerup', up);
104
+ el.removeEventListener('pointercancel', up);
105
+ [el.style.transform, el.style.touchAction, el.style.cursor] = prev;
106
+ };
107
+ },
108
+ },
109
+ {
110
+ name: 'card-flip-3d',
111
+ kind: 'click',
112
+ description: 'A thick card flips to its back face (second child) and back, showing its edge (`duration`, `axis` y | x). The faces swap `aria-hidden`.',
113
+ defaults: { duration: 800, axis: 'y', thickness: 6 },
114
+ run: (el, o, ctx) => {
115
+ const [front, back] = Array.from(el.children);
116
+ if (!front || !back)
117
+ return null;
118
+ const R = o.axis === 'x' ? 'rotateX' : 'rotateY';
119
+ if (!el.dataset.usaFlip) {
120
+ el.dataset.usaFlip = 'front';
121
+ el.style.display = 'grid';
122
+ el.style.transformStyle = 'preserve-3d';
123
+ for (const f of [front, back]) {
124
+ f.style.gridArea = '1 / 1';
125
+ f.style.backfaceVisibility = 'hidden';
126
+ }
127
+ back.setAttribute('aria-hidden', 'true');
128
+ back.style.transform = `${R}(180deg)`;
129
+ }
130
+ const toBack = el.dataset.usaFlip === 'front';
131
+ el.dataset.usaFlip = toBack ? 'back' : 'front';
132
+ front.setAttribute('aria-hidden', String(toBack));
133
+ back.setAttribute('aria-hidden', String(!toBack));
134
+ const from = toBack ? 0 : 180;
135
+ const to = toBack ? 180 : 0;
136
+ el.style.transform = `perspective(1000px) ${R}(${to}deg)`;
137
+ if (ctx.reduced)
138
+ return ctx.animate(toBack ? back : front, [{ opacity: 0 }, { opacity: 1 }], { duration: 200 });
139
+ return ctx.animate(el, [
140
+ { transform: `perspective(1000px) ${R}(${from}deg) scale(1)` },
141
+ { transform: `perspective(1000px) ${R}(${(from + to) / 2}deg) scale(1.08) translateZ(${o.thickness * 4}px)`, offset: 0.5 },
142
+ { transform: `perspective(1000px) ${R}(${to}deg) scale(1)` },
143
+ ], { duration: o.duration, easing: 'cubic-bezier(.45,.05,.25,1)' });
144
+ },
145
+ },
146
+ {
147
+ name: 'origami',
148
+ kind: 'enter',
149
+ description: 'The element unfolds panel by panel like folded paper (`panels`, `duration` per fold). Uses clipped copies during the fold.',
150
+ defaults: { panels: 4, duration: 420 },
151
+ reduced: 'skip',
152
+ run: (el, o, ctx) => {
153
+ if (el.dataset.usaOrigami)
154
+ return null;
155
+ el.dataset.usaOrigami = '1';
156
+ const n = Math.max(2, Math.min(8, Math.round(o.panels)));
157
+ if (getComputedStyle(el).position === 'static')
158
+ el.style.position = 'relative';
159
+ const prevVis = el.style.visibility;
160
+ const wrap = document.createElement('div');
161
+ wrap.setAttribute('aria-hidden', 'true');
162
+ wrap.style.cssText = 'position:absolute;inset:0;pointer-events:none;perspective:900px;visibility:visible';
163
+ const anims = [];
164
+ for (let i = 0; i < n; i++) {
165
+ const slice = el.cloneNode(true);
166
+ slice.removeAttribute('id');
167
+ slice.querySelectorAll('[id]').forEach((x) => x.removeAttribute('id'));
168
+ const top = (i / n) * 100;
169
+ const bottom = 100 - ((i + 1) / n) * 100;
170
+ slice.style.cssText += `;position:absolute;inset:0;margin:0;width:100%;height:100%;box-sizing:border-box;clip-path:inset(${top}% 0 ${bottom}% 0);transform-origin:50% ${top}%;visibility:visible`;
171
+ wrap.appendChild(slice);
172
+ const dir = i % 2 ? 1 : -1;
173
+ anims.push(ctx.animate(slice, [
174
+ { transform: `rotateX(${dir * 92}deg)`, filter: 'brightness(.55)', opacity: 0 },
175
+ { opacity: 1, offset: 0.15 },
176
+ { transform: 'rotateX(0)', filter: 'brightness(1)', opacity: 1 },
177
+ ], { duration: o.duration, delay: i * o.duration * 0.55, easing: 'cubic-bezier(.3,.7,.3,1)', fill: 'backwards' }));
178
+ }
179
+ el.style.visibility = 'hidden';
180
+ el.appendChild(wrap);
181
+ const done = () => {
182
+ wrap.remove();
183
+ el.style.visibility = prevVis;
184
+ delete el.dataset.usaOrigami;
185
+ };
186
+ return shared.all(anims).then(done, done);
187
+ },
188
+ },
189
+ {
190
+ name: 'orbit-camera',
191
+ kind: 'scroll',
192
+ description: 'While the element scrolls through the viewport the camera orbits its 3D children (persistent; `range` deg of orbit, `tilt`, `depth` px between layers).',
193
+ defaults: { range: 70, tilt: 10, depth: 60 },
194
+ run: (el, o, ctx) => {
195
+ const prev = [el.style.transform, el.style.transformStyle];
196
+ const ls = layers(el);
197
+ el.style.transformStyle = 'preserve-3d';
198
+ if (!ctx.reduced)
199
+ ls.forEach((l, i) => (l.style.transform = `translateZ(${((i - (ls.length - 1) / 2) * o.depth).toFixed(0)}px)`));
200
+ let h = 0;
201
+ const paint = () => {
202
+ h = 0;
203
+ const r = el.getBoundingClientRect();
204
+ const vh = window.innerHeight || 800;
205
+ const p = Math.min(1, Math.max(0, (vh - r.top) / (vh + r.height)));
206
+ el.style.setProperty('--usa-orbit', p.toFixed(3));
207
+ if (!ctx.reduced)
208
+ el.style.transform = `perspective(1000px) rotateX(${o.tilt}deg) rotateY(${((p - 0.5) * o.range).toFixed(2)}deg)`;
209
+ };
210
+ paint();
211
+ const on = () => {
212
+ if (!h)
213
+ h = raf(paint);
214
+ };
215
+ if (!ctx.reduced) {
216
+ window.addEventListener('scroll', on, { passive: true });
217
+ window.addEventListener('resize', on);
218
+ }
219
+ return () => {
220
+ caf(h);
221
+ window.removeEventListener('scroll', on);
222
+ window.removeEventListener('resize', on);
223
+ [el.style.transform, el.style.transformStyle] = prev;
224
+ ls.forEach((l) => (l.style.transform = ''));
225
+ };
226
+ },
227
+ },
228
+ ];
229
+ /** Register the 6.5 3D pack (idempotent). */
230
+ function register3dEffects() {
231
+ registry.registerEffects(DEPTH3_FX);
232
+ }
233
+
234
+ exports.DEPTH3_FX = DEPTH3_FX;
235
+ exports.register3dEffects = register3dEffects;
236
+ //# sourceMappingURL=fx-3d.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fx-3d.cjs","sources":["../../src/components/fx2/depth3.ts"],"sourcesContent":["/**\n * 6.5 — 3D scene cards (`motionary/components/fx-3d`), registered through\n * `registerEffect()`:\n *\n * - `depth-stack` (card, persistent) — the children (or `[data-depth]`\n * layers) separate in Z and parallax against each other as the card tilts\n * toward the pointer.\n * - `product-spin` (card, persistent) — a 360° product viewer: drag to turn\n * the element in 3D with inertia, idles with a slow turntable spin.\n * - `card-flip-3d` (click) — a thick card flips to its back face (second\n * child) with an edge that shows its depth.\n * - `origami` (enter) — the element unfolds panel by panel like folded paper.\n * - `orbit-camera` (scroll, persistent) — while the element scrolls through\n * the viewport the camera orbits its 3D children.\n *\n * Reduced motion: no tilt, spin, orbit or fold; the flip swaps faces with a\n * crossfade.\n */\nimport type { EffectContext, EffectDefinition } from '../fx/registry';\nimport { registerEffects } from '../fx/registry';\nimport { all } from '../effects/shared';\nimport { trackPointer } from './light';\n\nconst layers = (el: HTMLElement): HTMLElement[] => {\n const marked = Array.from(el.querySelectorAll<HTMLElement>('[data-depth]'));\n return marked.length ? marked : (Array.from(el.children) as HTMLElement[]);\n};\n\nconst raf = (f: FrameRequestCallback): number => (typeof requestAnimationFrame === 'function' ? requestAnimationFrame(f) : 0);\nconst caf = (h: number): void => {\n if (h && typeof cancelAnimationFrame === 'function') cancelAnimationFrame(h);\n};\n\nexport const DEPTH3_FX: EffectDefinition[] = [\n {\n name: 'depth-stack',\n kind: 'card',\n reduced: 'run',\n description: 'The children (or `[data-depth]` layers) separate in Z and parallax as the card tilts toward the pointer (persistent; `tilt` deg, `depth` px between layers).',\n defaults: { tilt: 14, depth: 28 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const prev = [el.style.transform, el.style.transformStyle, el.style.transition];\n el.style.transformStyle = 'preserve-3d';\n el.style.transition = 'transform .25s ease-out';\n const ls = layers(el);\n const saved = ls.map((l) => [l.style.transform, l.style.transition] as const);\n ls.forEach((l) => (l.style.transition = 'transform .3s ease-out'));\n const stop = trackPointer(el, ctx, (x, y, inside) => {\n const rx = (0.5 - y) * 2 * o.tilt;\n const ry = (x - 0.5) * 2 * o.tilt;\n el.style.transform = ctx.reduced ? '' : inside ? `perspective(800px) rotateX(${rx.toFixed(2)}deg) rotateY(${ry.toFixed(2)}deg)` : 'perspective(800px) rotateX(6deg) rotateY(-8deg)';\n ls.forEach((l, i) => {\n const d = ctx.reduced ? 0 : Number(l.dataset.depth || i + 1) * o.depth * (inside ? 1 : 0.5);\n l.style.transform = `translateZ(${d.toFixed(1)}px)`;\n });\n }, 0.5, 0.5);\n return () => {\n stop();\n [el.style.transform, el.style.transformStyle, el.style.transition] = prev;\n ls.forEach((l, i) => ([l.style.transform, l.style.transition] = saved[i]));\n };\n },\n },\n {\n name: 'product-spin',\n kind: 'card',\n description: 'A 360° product viewer: drag to turn the element in 3D with inertia; idles with a slow turntable spin (persistent; `idle` deg/s, `friction`, `tilt`).',\n defaults: { idle: 18, friction: 0.94, tilt: -8 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const prev = [el.style.transform, el.style.touchAction, el.style.cursor];\n el.style.touchAction = 'pan-y';\n el.style.cursor = 'grab';\n let a = 0;\n let v = 0;\n let drag = false;\n let lx = 0;\n let h = 0;\n let last = performance.now();\n const paint = () => (el.style.transform = `perspective(900px) rotateX(${o.tilt}deg) rotateY(${a.toFixed(2)}deg)`);\n paint();\n const tick = (now: number) => {\n const dt = Math.min(64, now - last) / 1000;\n last = now;\n if (!drag) {\n v *= o.friction;\n a += v * dt + (Math.abs(v) < 4 ? o.idle * dt : 0);\n }\n paint();\n h = raf(tick);\n };\n h = raf(tick);\n const down = (e: PointerEvent) => {\n drag = true;\n lx = e.clientX;\n v = 0;\n el.style.cursor = 'grabbing';\n el.setPointerCapture?.(e.pointerId);\n };\n const move = (e: PointerEvent) => {\n if (!drag) return;\n const dx = e.clientX - lx;\n lx = e.clientX;\n a += dx * 0.6;\n v = dx * 36;\n };\n const up = () => {\n drag = false;\n el.style.cursor = 'grab';\n };\n el.addEventListener('pointerdown', down);\n el.addEventListener('pointermove', move);\n el.addEventListener('pointerup', up);\n el.addEventListener('pointercancel', up);\n return () => {\n caf(h);\n el.removeEventListener('pointerdown', down);\n el.removeEventListener('pointermove', move);\n el.removeEventListener('pointerup', up);\n el.removeEventListener('pointercancel', up);\n [el.style.transform, el.style.touchAction, el.style.cursor] = prev;\n };\n },\n },\n {\n name: 'card-flip-3d',\n kind: 'click',\n description: 'A thick card flips to its back face (second child) and back, showing its edge (`duration`, `axis` y | x). The faces swap `aria-hidden`.',\n defaults: { duration: 800, axis: 'y', thickness: 6 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const [front, back] = Array.from(el.children) as HTMLElement[];\n if (!front || !back) return null;\n const R = o.axis === 'x' ? 'rotateX' : 'rotateY';\n if (!el.dataset.usaFlip) {\n el.dataset.usaFlip = 'front';\n el.style.display = 'grid';\n el.style.transformStyle = 'preserve-3d';\n for (const f of [front, back]) {\n f.style.gridArea = '1 / 1';\n f.style.backfaceVisibility = 'hidden';\n }\n back.setAttribute('aria-hidden', 'true');\n back.style.transform = `${R}(180deg)`;\n }\n const toBack = el.dataset.usaFlip === 'front';\n el.dataset.usaFlip = toBack ? 'back' : 'front';\n front.setAttribute('aria-hidden', String(toBack));\n back.setAttribute('aria-hidden', String(!toBack));\n const from = toBack ? 0 : 180;\n const to = toBack ? 180 : 0;\n el.style.transform = `perspective(1000px) ${R}(${to}deg)`;\n if (ctx.reduced) return ctx.animate(toBack ? back : front, [{ opacity: 0 }, { opacity: 1 }], { duration: 200 });\n return ctx.animate(el, [\n { transform: `perspective(1000px) ${R}(${from}deg) scale(1)` },\n { transform: `perspective(1000px) ${R}(${(from + to) / 2}deg) scale(1.08) translateZ(${o.thickness * 4}px)`, offset: 0.5 },\n { transform: `perspective(1000px) ${R}(${to}deg) scale(1)` },\n ], { duration: o.duration, easing: 'cubic-bezier(.45,.05,.25,1)' });\n },\n },\n {\n name: 'origami',\n kind: 'enter',\n description: 'The element unfolds panel by panel like folded paper (`panels`, `duration` per fold). Uses clipped copies during the fold.',\n defaults: { panels: 4, duration: 420 },\n reduced: 'skip',\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (el.dataset.usaOrigami) return null;\n el.dataset.usaOrigami = '1';\n const n = Math.max(2, Math.min(8, Math.round(o.panels)));\n if (getComputedStyle(el).position === 'static') el.style.position = 'relative';\n const prevVis = el.style.visibility;\n const wrap = document.createElement('div');\n wrap.setAttribute('aria-hidden', 'true');\n wrap.style.cssText = 'position:absolute;inset:0;pointer-events:none;perspective:900px;visibility:visible';\n const anims: (Animation | null)[] = [];\n for (let i = 0; i < n; i++) {\n const slice = el.cloneNode(true) as HTMLElement;\n slice.removeAttribute('id');\n slice.querySelectorAll('[id]').forEach((x) => x.removeAttribute('id'));\n const top = (i / n) * 100;\n const bottom = 100 - ((i + 1) / n) * 100;\n slice.style.cssText += `;position:absolute;inset:0;margin:0;width:100%;height:100%;box-sizing:border-box;clip-path:inset(${top}% 0 ${bottom}% 0);transform-origin:50% ${top}%;visibility:visible`;\n wrap.appendChild(slice);\n const dir = i % 2 ? 1 : -1;\n anims.push(ctx.animate(slice, [\n { transform: `rotateX(${dir * 92}deg)`, filter: 'brightness(.55)', opacity: 0 },\n { opacity: 1, offset: 0.15 },\n { transform: 'rotateX(0)', filter: 'brightness(1)', opacity: 1 },\n ], { duration: o.duration, delay: i * o.duration * 0.55, easing: 'cubic-bezier(.3,.7,.3,1)', fill: 'backwards' }));\n }\n el.style.visibility = 'hidden';\n el.appendChild(wrap);\n const done = () => {\n wrap.remove();\n el.style.visibility = prevVis;\n delete el.dataset.usaOrigami;\n };\n return all(anims).then(done, done);\n },\n },\n {\n name: 'orbit-camera',\n kind: 'scroll',\n description: 'While the element scrolls through the viewport the camera orbits its 3D children (persistent; `range` deg of orbit, `tilt`, `depth` px between layers).',\n defaults: { range: 70, tilt: 10, depth: 60 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const prev = [el.style.transform, el.style.transformStyle];\n const ls = layers(el);\n el.style.transformStyle = 'preserve-3d';\n if (!ctx.reduced) ls.forEach((l, i) => (l.style.transform = `translateZ(${((i - (ls.length - 1) / 2) * o.depth).toFixed(0)}px)`));\n let h = 0;\n const paint = () => {\n h = 0;\n const r = el.getBoundingClientRect();\n const vh = window.innerHeight || 800;\n const p = Math.min(1, Math.max(0, (vh - r.top) / (vh + r.height)));\n el.style.setProperty('--usa-orbit', p.toFixed(3));\n if (!ctx.reduced) el.style.transform = `perspective(1000px) rotateX(${o.tilt}deg) rotateY(${((p - 0.5) * o.range).toFixed(2)}deg)`;\n };\n paint();\n const on = () => {\n if (!h) h = raf(paint);\n };\n if (!ctx.reduced) {\n window.addEventListener('scroll', on, { passive: true });\n window.addEventListener('resize', on);\n }\n return () => {\n caf(h);\n window.removeEventListener('scroll', on);\n window.removeEventListener('resize', on);\n [el.style.transform, el.style.transformStyle] = prev;\n ls.forEach((l) => (l.style.transform = ''));\n };\n },\n },\n];\n\n/** Register the 6.5 3D pack (idempotent). */\nexport function register3dEffects(): void {\n registerEffects(DEPTH3_FX);\n}\n"],"names":["trackPointer","all","registerEffects"],"mappings":";;;;;;;;AAuBA,MAAM,MAAM,GAAG,CAAC,EAAe,KAAmB;AAChD,IAAA,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAc,cAAc,CAAC,CAAC;AAC3E,IAAA,OAAO,MAAM,CAAC,MAAM,GAAG,MAAM,GAAI,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAmB;AAC5E,CAAC;AAED,MAAM,GAAG,GAAG,CAAC,CAAuB,MAAc,OAAO,qBAAqB,KAAK,UAAU,GAAG,qBAAqB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAC7H,MAAM,GAAG,GAAG,CAAC,CAAS,KAAU;AAC9B,IAAA,IAAI,CAAC,IAAI,OAAO,oBAAoB,KAAK,UAAU;QAAE,oBAAoB,CAAC,CAAC,CAAC;AAC9E,CAAC;AAEM,MAAM,SAAS,GAAuB;AAC3C,IAAA;AACE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EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC;AAC7C,YAAA,CAAC;QACH,CAAC;AACF,KAAA;;AAGH;SACgB,iBAAiB,GAAA;IAC/BC,wBAAe,CAAC,SAAS,CAAC;AAC5B;;;;;"}
@@ -0,0 +1,67 @@
1
+ type MotionSensitivity = 'full' | 'gentle' | 'minimal' | 'static';
2
+ type Cleanup = () => void;
3
+
4
+ /**
5
+ * 5.0 — unified plugin-style effect registration. Every effect (built-in or
6
+ * yours) is a plain object registered once and played the same way:
7
+ * `playEffect(el, name)`, `bindEffect(el, name, { trigger })` or
8
+ * `<usa-fx effect="name" trigger="click">`. Effects get a context that
9
+ * already applies reduced motion, motion sensitivity, intensity and the
10
+ * animation budget.
11
+ */
12
+
13
+ declare const EFFECT_KINDS: readonly ["enter", "exit", "attention", "click", "hover", "card", "loop", "page", "background", "text", "cursor", "scroll"];
14
+ type EffectKind = (typeof EFFECT_KINDS)[number];
15
+ interface EffectContext {
16
+ /** Reduced motion applies (OS setting, `minimal` / `static` sensitivity). */
17
+ readonly reduced: boolean;
18
+ readonly sensitivity: MotionSensitivity;
19
+ /** The triggering event (pointer position for click effects), if any. */
20
+ readonly event?: Event;
21
+ /** `el.animate()` with the library's motion rules (may return `null`). */
22
+ animate(el: Element, keyframes: Keyframe[], options: KeyframeAnimationOptions): Animation | null;
23
+ /** Register teardown for long-running effects (loops, listeners). */
24
+ onCleanup(fn: Cleanup): void;
25
+ }
26
+ interface EffectDefinition<O extends Record<string, unknown> = Record<string, any>> {
27
+ /** Unique, kebab-case. */
28
+ name: string;
29
+ kind: EffectKind;
30
+ /** One line for docs and the gallery. */
31
+ description?: string;
32
+ /** Option defaults (merged under the caller's options). */
33
+ defaults?: Partial<O>;
34
+ /**
35
+ * Under reduced motion: `'skip'` (do nothing — default for loop, background
36
+ * and cursor effects) or `'run'` (run with `ctx.reduced === true`, the
37
+ * effect degrades itself — default for everything else).
38
+ */
39
+ reduced?: 'skip' | 'run';
40
+ /** Play the effect. Return an Animation / Promise to be awaited, or a cleanup. */
41
+ run(el: HTMLElement, options: O, ctx: EffectContext): void | Cleanup | Animation | null | Promise<unknown>;
42
+ }
43
+
44
+ /**
45
+ * 6.5 — 3D scene cards (`motionary/components/fx-3d`), registered through
46
+ * `registerEffect()`:
47
+ *
48
+ * - `depth-stack` (card, persistent) — the children (or `[data-depth]`
49
+ * layers) separate in Z and parallax against each other as the card tilts
50
+ * toward the pointer.
51
+ * - `product-spin` (card, persistent) — a 360° product viewer: drag to turn
52
+ * the element in 3D with inertia, idles with a slow turntable spin.
53
+ * - `card-flip-3d` (click) — a thick card flips to its back face (second
54
+ * child) with an edge that shows its depth.
55
+ * - `origami` (enter) — the element unfolds panel by panel like folded paper.
56
+ * - `orbit-camera` (scroll, persistent) — while the element scrolls through
57
+ * the viewport the camera orbits its 3D children.
58
+ *
59
+ * Reduced motion: no tilt, spin, orbit or fold; the flip swaps faces with a
60
+ * crossfade.
61
+ */
62
+
63
+ declare const DEPTH3_FX: EffectDefinition[];
64
+ /** Register the 6.5 3D pack (idempotent). */
65
+ declare function register3dEffects(): void;
66
+
67
+ export { DEPTH3_FX, register3dEffects };
@@ -0,0 +1,67 @@
1
+ type MotionSensitivity = 'full' | 'gentle' | 'minimal' | 'static';
2
+ type Cleanup = () => void;
3
+
4
+ /**
5
+ * 5.0 — unified plugin-style effect registration. Every effect (built-in or
6
+ * yours) is a plain object registered once and played the same way:
7
+ * `playEffect(el, name)`, `bindEffect(el, name, { trigger })` or
8
+ * `<usa-fx effect="name" trigger="click">`. Effects get a context that
9
+ * already applies reduced motion, motion sensitivity, intensity and the
10
+ * animation budget.
11
+ */
12
+
13
+ declare const EFFECT_KINDS: readonly ["enter", "exit", "attention", "click", "hover", "card", "loop", "page", "background", "text", "cursor", "scroll"];
14
+ type EffectKind = (typeof EFFECT_KINDS)[number];
15
+ interface EffectContext {
16
+ /** Reduced motion applies (OS setting, `minimal` / `static` sensitivity). */
17
+ readonly reduced: boolean;
18
+ readonly sensitivity: MotionSensitivity;
19
+ /** The triggering event (pointer position for click effects), if any. */
20
+ readonly event?: Event;
21
+ /** `el.animate()` with the library's motion rules (may return `null`). */
22
+ animate(el: Element, keyframes: Keyframe[], options: KeyframeAnimationOptions): Animation | null;
23
+ /** Register teardown for long-running effects (loops, listeners). */
24
+ onCleanup(fn: Cleanup): void;
25
+ }
26
+ interface EffectDefinition<O extends Record<string, unknown> = Record<string, any>> {
27
+ /** Unique, kebab-case. */
28
+ name: string;
29
+ kind: EffectKind;
30
+ /** One line for docs and the gallery. */
31
+ description?: string;
32
+ /** Option defaults (merged under the caller's options). */
33
+ defaults?: Partial<O>;
34
+ /**
35
+ * Under reduced motion: `'skip'` (do nothing — default for loop, background
36
+ * and cursor effects) or `'run'` (run with `ctx.reduced === true`, the
37
+ * effect degrades itself — default for everything else).
38
+ */
39
+ reduced?: 'skip' | 'run';
40
+ /** Play the effect. Return an Animation / Promise to be awaited, or a cleanup. */
41
+ run(el: HTMLElement, options: O, ctx: EffectContext): void | Cleanup | Animation | null | Promise<unknown>;
42
+ }
43
+
44
+ /**
45
+ * 6.5 — 3D scene cards (`motionary/components/fx-3d`), registered through
46
+ * `registerEffect()`:
47
+ *
48
+ * - `depth-stack` (card, persistent) — the children (or `[data-depth]`
49
+ * layers) separate in Z and parallax against each other as the card tilts
50
+ * toward the pointer.
51
+ * - `product-spin` (card, persistent) — a 360° product viewer: drag to turn
52
+ * the element in 3D with inertia, idles with a slow turntable spin.
53
+ * - `card-flip-3d` (click) — a thick card flips to its back face (second
54
+ * child) with an edge that shows its depth.
55
+ * - `origami` (enter) — the element unfolds panel by panel like folded paper.
56
+ * - `orbit-camera` (scroll, persistent) — while the element scrolls through
57
+ * the viewport the camera orbits its 3D children.
58
+ *
59
+ * Reduced motion: no tilt, spin, orbit or fold; the flip swaps faces with a
60
+ * crossfade.
61
+ */
62
+
63
+ declare const DEPTH3_FX: EffectDefinition[];
64
+ /** Register the 6.5 3D pack (idempotent). */
65
+ declare function register3dEffects(): void;
66
+
67
+ export { DEPTH3_FX, register3dEffects };