use-scroll-animate 8.5.0 → 8.7.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 +33 -0
- package/dist/components/fx-gesture.cjs +111 -0
- package/dist/components/fx-gesture.cjs.map +1 -0
- package/dist/components/fx-gesture.d.cts +75 -0
- package/dist/components/fx-gesture.d.ts +75 -0
- package/dist/components/fx-gesture.js +105 -0
- package/dist/components/fx-gesture.js.map +1 -0
- package/dist/components/fx-surface.cjs +89 -0
- package/dist/components/fx-surface.cjs.map +1 -0
- package/dist/components/fx-surface.d.cts +70 -0
- package/dist/components/fx-surface.d.ts +70 -0
- package/dist/components/fx-surface.js +84 -0
- package/dist/components/fx-surface.js.map +1 -0
- package/dist/components/fx2.cjs +15 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +57 -1
- package/dist/components/fx2.d.ts +57 -1
- package/dist/components/fx2.js +9 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/widgets.cjs +531 -148
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +72 -2
- package/dist/components/widgets.d.ts +72 -2
- package/dist/components/widgets.js +528 -149
- package/dist/components/widgets.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components.md +40 -0
- package/package.json +41 -1
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
* 8.6 — Surface theme pack (`motionary/fx/surface`, also `motionary/components/fx-surface`):
|
|
46
|
+
*
|
|
47
|
+
* - `neon-ignite` (enter) — the element powers on like a neon tube: a few
|
|
48
|
+
* stuttering flickers, then a steady glow (`color`).
|
|
49
|
+
* - `neon-pulse` (loop) — a slow breathing neon glow; the cleanup stops it
|
|
50
|
+
* (`color`).
|
|
51
|
+
* - `glass-frost` (enter) — frosted glass condenses: blur and transparency
|
|
52
|
+
* settle into a crisp glass panel, with a shine passing over it.
|
|
53
|
+
* - `neu-press` (attention) — a soft neumorphic press: the raised shadow
|
|
54
|
+
* flips to an inset one and pops back.
|
|
55
|
+
*
|
|
56
|
+
* Reduced motion: neon-ignite / glass-frost just show, neon-pulse is
|
|
57
|
+
* skipped, neu-press does nothing.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/** The built-in surface themes of the 8.6 theme system. */
|
|
61
|
+
declare const SURFACE_THEMES: readonly ["light", "dark", "neon", "glass", "neu"];
|
|
62
|
+
type SurfaceTheme = (typeof SURFACE_THEMES)[number];
|
|
63
|
+
/** Set `data-usa-surface` on `target` (default `<html>`) and return the theme actually applied (unknown → `light`) (8.6). */
|
|
64
|
+
declare function applySurfaceTheme(name: string, target?: Element | null): SurfaceTheme;
|
|
65
|
+
declare const SURFACE_FX: EffectDefinition[];
|
|
66
|
+
/** Register neon-ignite, neon-pulse, glass-frost and neu-press (8.6). */
|
|
67
|
+
declare function registerSurfacePack(): void;
|
|
68
|
+
|
|
69
|
+
export { SURFACE_FX, SURFACE_THEMES, applySurfaceTheme, registerSurfacePack };
|
|
70
|
+
export type { SurfaceTheme };
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
* 8.6 — Surface theme pack (`motionary/fx/surface`, also `motionary/components/fx-surface`):
|
|
46
|
+
*
|
|
47
|
+
* - `neon-ignite` (enter) — the element powers on like a neon tube: a few
|
|
48
|
+
* stuttering flickers, then a steady glow (`color`).
|
|
49
|
+
* - `neon-pulse` (loop) — a slow breathing neon glow; the cleanup stops it
|
|
50
|
+
* (`color`).
|
|
51
|
+
* - `glass-frost` (enter) — frosted glass condenses: blur and transparency
|
|
52
|
+
* settle into a crisp glass panel, with a shine passing over it.
|
|
53
|
+
* - `neu-press` (attention) — a soft neumorphic press: the raised shadow
|
|
54
|
+
* flips to an inset one and pops back.
|
|
55
|
+
*
|
|
56
|
+
* Reduced motion: neon-ignite / glass-frost just show, neon-pulse is
|
|
57
|
+
* skipped, neu-press does nothing.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/** The built-in surface themes of the 8.6 theme system. */
|
|
61
|
+
declare const SURFACE_THEMES: readonly ["light", "dark", "neon", "glass", "neu"];
|
|
62
|
+
type SurfaceTheme = (typeof SURFACE_THEMES)[number];
|
|
63
|
+
/** Set `data-usa-surface` on `target` (default `<html>`) and return the theme actually applied (unknown → `light`) (8.6). */
|
|
64
|
+
declare function applySurfaceTheme(name: string, target?: Element | null): SurfaceTheme;
|
|
65
|
+
declare const SURFACE_FX: EffectDefinition[];
|
|
66
|
+
/** Register neon-ignite, neon-pulse, glass-frost and neu-press (8.6). */
|
|
67
|
+
declare function registerSurfacePack(): void;
|
|
68
|
+
|
|
69
|
+
export { SURFACE_FX, SURFACE_THEMES, applySurfaceTheme, registerSurfacePack };
|
|
70
|
+
export type { SurfaceTheme };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { registerEffects } from '../chunks/registry-CnO7ZVPK.js';
|
|
2
|
+
import '../chunks/base-CLuqlLfG.js';
|
|
3
|
+
|
|
4
|
+
/** The built-in surface themes of the 8.6 theme system. */
|
|
5
|
+
const SURFACE_THEMES = ['light', 'dark', 'neon', 'glass', 'neu'];
|
|
6
|
+
/** Set `data-usa-surface` on `target` (default `<html>`) and return the theme actually applied (unknown → `light`) (8.6). */
|
|
7
|
+
function applySurfaceTheme(name, target = typeof document !== 'undefined' ? document.documentElement : null) {
|
|
8
|
+
const t = (SURFACE_THEMES.includes(name) ? name : 'light');
|
|
9
|
+
target?.setAttribute('data-usa-surface', t);
|
|
10
|
+
return t;
|
|
11
|
+
}
|
|
12
|
+
const glow = (c, k) => `0 0 ${4 * k}px ${c}, 0 0 ${12 * k}px ${c}`;
|
|
13
|
+
const SURFACE_FX = [
|
|
14
|
+
{
|
|
15
|
+
name: 'neon-ignite',
|
|
16
|
+
kind: 'enter',
|
|
17
|
+
description: 'The element powers on like a neon tube — stuttering flickers, then a steady glow (`color`).',
|
|
18
|
+
defaults: { color: '#f0abfc', duration: 1100 },
|
|
19
|
+
run: (el, o, ctx) => {
|
|
20
|
+
if (ctx.reduced)
|
|
21
|
+
return;
|
|
22
|
+
const on = { opacity: 1, textShadow: glow(o.color, 1), filter: 'brightness(1.15)' };
|
|
23
|
+
const off = { opacity: 0.15, textShadow: 'none', filter: 'brightness(.6)' };
|
|
24
|
+
return ctx.animate(el, [{ ...off, offset: 0 }, { ...on, offset: 0.1 }, { ...off, offset: 0.14 }, { ...on, offset: 0.3 }, { ...off, offset: 0.34 }, { ...off, offset: 0.5 }, { ...on, offset: 0.56 }, { ...on, textShadow: glow(o.color, 1.6), offset: 0.8 }, { opacity: 1, textShadow: glow(o.color, 1), filter: 'none', offset: 1 }], { duration: o.duration, fill: 'backwards' })?.finished.catch(() => undefined);
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'neon-pulse',
|
|
29
|
+
kind: 'loop',
|
|
30
|
+
description: 'A slow breathing neon glow until the cleanup runs (`color`).',
|
|
31
|
+
defaults: { color: '#22d3ee', duration: 2200 },
|
|
32
|
+
run: (el, o, ctx) => {
|
|
33
|
+
if (ctx.reduced)
|
|
34
|
+
return;
|
|
35
|
+
const a = ctx.animate(el, [{ boxShadow: glow(o.color, 0.6) }, { boxShadow: glow(o.color, 1.6) }, { boxShadow: glow(o.color, 0.6) }], { duration: o.duration, iterations: Infinity, easing: 'ease-in-out' });
|
|
36
|
+
return () => a?.cancel();
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'glass-frost',
|
|
41
|
+
kind: 'enter',
|
|
42
|
+
description: 'Frosted glass condenses: blur and transparency settle into a crisp glass panel, with a shine passing over it.',
|
|
43
|
+
defaults: { duration: 1000 },
|
|
44
|
+
run: (el, o, ctx) => {
|
|
45
|
+
if (ctx.reduced)
|
|
46
|
+
return;
|
|
47
|
+
const runs = [];
|
|
48
|
+
runs.push(ctx.animate(el, [{ opacity: 0, filter: 'blur(12px)', transform: 'scale(.96)' }, { opacity: 1, filter: 'blur(0)', transform: 'none' }], { duration: o.duration, easing: 'cubic-bezier(.2,.8,.2,1)', fill: 'backwards' })?.finished.catch(() => undefined));
|
|
49
|
+
if (getComputedStyle(el).position === 'static') {
|
|
50
|
+
const prev = el.style.position;
|
|
51
|
+
el.style.position = 'relative';
|
|
52
|
+
ctx.onCleanup(() => (el.style.position = prev));
|
|
53
|
+
}
|
|
54
|
+
const s = document.createElement('span');
|
|
55
|
+
s.setAttribute('aria-hidden', 'true');
|
|
56
|
+
Object.assign(s.style, { position: 'absolute', inset: '0', pointerEvents: 'none', borderRadius: 'inherit', background: 'linear-gradient(110deg,transparent 30%,rgba(255,255,255,.55) 50%,transparent 70%)', backgroundSize: '250% 100%' });
|
|
57
|
+
el.appendChild(s);
|
|
58
|
+
ctx.onCleanup(() => s.remove());
|
|
59
|
+
const sh = ctx.animate(s, [{ backgroundPosition: '120% 0' }, { backgroundPosition: '-60% 0' }], { duration: o.duration * 0.9, delay: o.duration * 0.4, easing: 'ease-in-out', fill: 'backwards' });
|
|
60
|
+
runs.push(sh ? sh.finished.then(() => s.remove(), () => s.remove()) : (s.remove(), undefined));
|
|
61
|
+
return Promise.all(runs).then(() => undefined);
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: 'neu-press',
|
|
66
|
+
kind: 'attention',
|
|
67
|
+
description: 'A soft neumorphic press: the raised shadow flips to an inset one and pops back.',
|
|
68
|
+
defaults: { duration: 450 },
|
|
69
|
+
run: (el, o, ctx) => {
|
|
70
|
+
if (ctx.reduced)
|
|
71
|
+
return;
|
|
72
|
+
const up = '6px 6px 12px rgba(163,177,198,.7), -6px -6px 12px rgba(255,255,255,.9)';
|
|
73
|
+
const down = 'inset 4px 4px 8px rgba(163,177,198,.8), inset -4px -4px 8px rgba(255,255,255,.9)';
|
|
74
|
+
return ctx.animate(el, [{ boxShadow: up, transform: 'none' }, { boxShadow: down, transform: 'scale(.97)', offset: 0.4 }, { boxShadow: up, transform: 'none' }], { duration: o.duration, easing: 'ease-out' })?.finished.catch(() => undefined);
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
/** Register neon-ignite, neon-pulse, glass-frost and neu-press (8.6). */
|
|
79
|
+
function registerSurfacePack() {
|
|
80
|
+
registerEffects(SURFACE_FX);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { SURFACE_FX, SURFACE_THEMES, applySurfaceTheme, registerSurfacePack };
|
|
84
|
+
//# sourceMappingURL=fx-surface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fx-surface.js","sources":["../../src/components/fx2/themefx.ts"],"sourcesContent":["/**\n * 8.6 — Surface theme pack (`motionary/fx/surface`, also `motionary/components/fx-surface`):\n *\n * - `neon-ignite` (enter) — the element powers on like a neon tube: a few\n * stuttering flickers, then a steady glow (`color`).\n * - `neon-pulse` (loop) — a slow breathing neon glow; the cleanup stops it\n * (`color`).\n * - `glass-frost` (enter) — frosted glass condenses: blur and transparency\n * settle into a crisp glass panel, with a shine passing over it.\n * - `neu-press` (attention) — a soft neumorphic press: the raised shadow\n * flips to an inset one and pops back.\n *\n * Reduced motion: neon-ignite / glass-frost just show, neon-pulse is\n * skipped, neu-press does nothing.\n */\nimport type { EffectContext, EffectDefinition } from '../fx/registry';\nimport { registerEffects } from '../fx/registry';\n\n/** The built-in surface themes of the 8.6 theme system. */\nexport const SURFACE_THEMES = ['light', 'dark', 'neon', 'glass', 'neu'] as const;\nexport type SurfaceTheme = (typeof SURFACE_THEMES)[number];\n\n/** Set `data-usa-surface` on `target` (default `<html>`) and return the theme actually applied (unknown → `light`) (8.6). */\nexport function applySurfaceTheme(name: string, target: Element | null = typeof document !== 'undefined' ? document.documentElement : null): SurfaceTheme {\n const t = ((SURFACE_THEMES as readonly string[]).includes(name) ? name : 'light') as SurfaceTheme;\n target?.setAttribute('data-usa-surface', t);\n return t;\n}\n\nconst glow = (c: string, k: number) => `0 0 ${4 * k}px ${c}, 0 0 ${12 * k}px ${c}`;\n\nexport const SURFACE_FX: EffectDefinition[] = [\n {\n name: 'neon-ignite',\n kind: 'enter',\n description: 'The element powers on like a neon tube — stuttering flickers, then a steady glow (`color`).',\n defaults: { color: '#f0abfc', duration: 1100 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const on = { opacity: 1, textShadow: glow(o.color, 1), filter: 'brightness(1.15)' };\n const off = { opacity: 0.15, textShadow: 'none', filter: 'brightness(.6)' };\n return ctx.animate(el, [{ ...off, offset: 0 }, { ...on, offset: 0.1 }, { ...off, offset: 0.14 }, { ...on, offset: 0.3 }, { ...off, offset: 0.34 }, { ...off, offset: 0.5 }, { ...on, offset: 0.56 }, { ...on, textShadow: glow(o.color, 1.6), offset: 0.8 }, { opacity: 1, textShadow: glow(o.color, 1), filter: 'none', offset: 1 }], { duration: o.duration, fill: 'backwards' })?.finished.catch(() => undefined);\n },\n },\n {\n name: 'neon-pulse',\n kind: 'loop',\n description: 'A slow breathing neon glow until the cleanup runs (`color`).',\n defaults: { color: '#22d3ee', duration: 2200 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const a = ctx.animate(el, [{ boxShadow: glow(o.color, 0.6) }, { boxShadow: glow(o.color, 1.6) }, { boxShadow: glow(o.color, 0.6) }], { duration: o.duration, iterations: Infinity, easing: 'ease-in-out' });\n return () => a?.cancel();\n },\n },\n {\n name: 'glass-frost',\n kind: 'enter',\n description: 'Frosted glass condenses: blur and transparency settle into a crisp glass panel, with a shine passing over it.',\n defaults: { duration: 1000 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const runs: (Promise<unknown> | undefined)[] = [];\n runs.push(ctx.animate(el, [{ opacity: 0, filter: 'blur(12px)', transform: 'scale(.96)' }, { opacity: 1, filter: 'blur(0)', transform: 'none' }], { duration: o.duration, easing: 'cubic-bezier(.2,.8,.2,1)', fill: 'backwards' })?.finished.catch(() => undefined));\n if (getComputedStyle(el).position === 'static') {\n const prev = el.style.position;\n el.style.position = 'relative';\n ctx.onCleanup(() => (el.style.position = prev));\n }\n const s = document.createElement('span');\n s.setAttribute('aria-hidden', 'true');\n Object.assign(s.style, { position: 'absolute', inset: '0', pointerEvents: 'none', borderRadius: 'inherit', background: 'linear-gradient(110deg,transparent 30%,rgba(255,255,255,.55) 50%,transparent 70%)', backgroundSize: '250% 100%' });\n el.appendChild(s);\n ctx.onCleanup(() => s.remove());\n const sh = ctx.animate(s, [{ backgroundPosition: '120% 0' }, { backgroundPosition: '-60% 0' }], { duration: o.duration * 0.9, delay: o.duration * 0.4, easing: 'ease-in-out', fill: 'backwards' });\n runs.push(sh ? sh.finished.then(() => s.remove(), () => s.remove()) : (s.remove(), undefined));\n return Promise.all(runs).then(() => undefined);\n },\n },\n {\n name: 'neu-press',\n kind: 'attention',\n description: 'A soft neumorphic press: the raised shadow flips to an inset one and pops back.',\n defaults: { duration: 450 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const up = '6px 6px 12px rgba(163,177,198,.7), -6px -6px 12px rgba(255,255,255,.9)';\n const down = 'inset 4px 4px 8px rgba(163,177,198,.8), inset -4px -4px 8px rgba(255,255,255,.9)';\n return ctx.animate(el, [{ boxShadow: up, transform: 'none' }, { boxShadow: down, transform: 'scale(.97)', offset: 0.4 }, { boxShadow: up, transform: 'none' }], { duration: o.duration, easing: 'ease-out' })?.finished.catch(() => undefined);\n },\n },\n];\n\n/** Register neon-ignite, neon-pulse, glass-frost and neu-press (8.6). */\nexport function registerSurfacePack(): void {\n registerEffects(SURFACE_FX);\n}\n"],"names":[],"mappings":";;;AAkBA;AACO,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK;AAGtE;SACgB,iBAAiB,CAAC,IAAY,EAAE,MAAA,GAAyB,OAAO,QAAQ,KAAK,WAAW,GAAG,QAAQ,CAAC,eAAe,GAAG,IAAI,EAAA;AACxI,IAAA,MAAM,CAAC,IAAK,cAAoC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,IAAI,GAAG,OAAO,CAAiB;AACjG,IAAA,MAAM,EAAE,YAAY,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAC3C,IAAA,OAAO,CAAC;AACV;AAEA,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,CAAS,KAAK,CAAA,IAAA,EAAO,CAAC,GAAG,CAAC,CAAA,GAAA,EAAM,CAAC,CAAA,MAAA,EAAS,EAAE,GAAG,CAAC,CAAA,GAAA,EAAM,CAAC,CAAA,CAAE;AAE3E,MAAM,UAAU,GAAuB;AAC5C,IAAA;AACE,QAAA,IAAI,EAAE,aAAa;AACnB,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,WAAW,EAAE,6FAA6F;QAC1G,QAAQ,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC9C,GAAG,EAAE,CAAC,EAAe,EAAE,CAAM,EAAE,GAAkB,KAAI;YACnD,IAAI,GAAG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ic.cjs');
|
|
24
24
|
var components_fxCyber = require('./fx-cyber.cjs');
|
|
25
25
|
var components_fxPaper = require('./fx-paper.cjs');
|
|
26
|
+
var components_fxSurface = require('./fx-surface.cjs');
|
|
27
|
+
var components_fxGesture = require('./fx-gesture.cjs');
|
|
26
28
|
require('../chunks/registry-BVklOepd.cjs');
|
|
27
29
|
require('../chunks/base-DoRUZBy-.cjs');
|
|
28
30
|
require('../chunks/generative-BHIj-NU0.cjs');
|
|
@@ -53,6 +55,8 @@ const EFFECT_PACKS = {
|
|
|
53
55
|
organic: components_fxOrganic.ORGANIC_FX,
|
|
54
56
|
cyber: components_fxCyber.CYBER_FX,
|
|
55
57
|
paper: components_fxPaper.PAPER_FX,
|
|
58
|
+
surface: components_fxSurface.SURFACE_FX,
|
|
59
|
+
gesture3: components_fxGesture.GESTURE3_FX,
|
|
56
60
|
};
|
|
57
61
|
/** Register every 6.x effect pack (idempotent). */
|
|
58
62
|
function registerEffectPacks() {
|
|
@@ -78,6 +82,8 @@ function registerEffectPacks() {
|
|
|
78
82
|
components_fxOrganic.registerOrganicPack();
|
|
79
83
|
components_fxCyber.registerCyberPack();
|
|
80
84
|
components_fxPaper.registerPaperPack();
|
|
85
|
+
components_fxSurface.registerSurfacePack();
|
|
86
|
+
components_fxGesture.registerGesture3Pack();
|
|
81
87
|
}
|
|
82
88
|
|
|
83
89
|
exports.EFFECT_PACK_FORMAT = components_marketplace.EFFECT_PACK_FORMAT;
|
|
@@ -160,6 +166,15 @@ exports.PAPER_FX = components_fxPaper.PAPER_FX;
|
|
|
160
166
|
exports.paperRandom = components_fxPaper.paperRandom;
|
|
161
167
|
exports.registerPaperPack = components_fxPaper.registerPaperPack;
|
|
162
168
|
exports.roughLine = components_fxPaper.roughLine;
|
|
169
|
+
exports.SURFACE_FX = components_fxSurface.SURFACE_FX;
|
|
170
|
+
exports.SURFACE_THEMES = components_fxSurface.SURFACE_THEMES;
|
|
171
|
+
exports.applySurfaceTheme = components_fxSurface.applySurfaceTheme;
|
|
172
|
+
exports.registerSurfacePack = components_fxSurface.registerSurfacePack;
|
|
173
|
+
exports.GESTURE3_FX = components_fxGesture.GESTURE3_FX;
|
|
174
|
+
exports.orientationToTilt = components_fxGesture.orientationToTilt;
|
|
175
|
+
exports.pinchAngle = components_fxGesture.pinchAngle;
|
|
176
|
+
exports.pinchScale = components_fxGesture.pinchScale;
|
|
177
|
+
exports.registerGesture3Pack = components_fxGesture.registerGesture3Pack;
|
|
163
178
|
exports.EFFECT_PACKS = EFFECT_PACKS;
|
|
164
179
|
exports.registerEffectPacks = registerEffectPacks;
|
|
165
180
|
//# sourceMappingURL=fx2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fx2.cjs","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nexport { EFFECT_PACK_FORMAT, packManifest, validateManifest, loadEffectPack } from './manifest';\nexport type { EffectPackManifest } from './manifest';\nimport { GPU_FX, registerGpuPack } from './gpu';\nimport { TEXT3_FX, registerTextPack, splitChars } from './text3';\nimport { LIGHT_FX, registerLightPack, trackPointer } from './light';\nimport { DEPTH3_FX, register3dPack } from './depth3';\nimport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath } from './morph2';\nimport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions } from './transitions2';\nimport { WEATHER_FX, registerWeatherPack, skyAt } from './weather';\nimport { PHYSICS2_FX, registerPhysicsPack, VerletWorld } from './physics2';\nimport { FOCUS_FX, registerFocusPack } from './focus';\nimport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample } from './music';\nimport { CHART_FX, registerChartPack, parseFigure } from './chart';\nimport { SHOP_FX, registerShopPack, arcPath } from './shop';\nimport { SOCIAL_FX, registerSocialPack, fanAngles } from './social';\nimport { GAME_FX, registerGamePack, throwPath } from './game';\nimport { GEO_FX, registerGeoPack, routeLength } from './geo';\nimport { FORM_FX, registerFormPack, shakeFrames } from './form';\nimport { AI_FX, registerAiPack, splitWords } from './ai';\nimport { FESTIVAL_FX, registerFestivalPack, sparkVectors } from './festival';\nimport { RETRO_FX, registerRetroPack, pixelSteps } from './retro2';\nimport { ORGANIC_FX, registerOrganicPack, blobRadius } from './organic';\nimport { CYBER_FX, registerCyberPack, decodeFrame } from './cyber';\nimport { PAPER_FX, registerPaperPack, roughLine, paperRandom } from './paper';\n\nexport { GPU_FX, registerGpuPack, TEXT3_FX, registerTextPack, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport { supportsWebGPU, glslToWgsl, wgslModule, webgpuBackground, WGSL_HEAD } from './webgpu';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightPack, trackPointer };\n\nexport { DEPTH3_FX, register3dPack };\n\nexport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath };\n\nexport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions };\n\nexport { WEATHER_FX, registerWeatherPack, skyAt };\n\nexport { PHYSICS2_FX, registerPhysicsPack, VerletWorld };\n\nexport { FOCUS_FX, registerFocusPack };\n\nexport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample };\n\nexport { CHART_FX, registerChartPack, parseFigure };\n\nexport { SHOP_FX, registerShopPack, arcPath };\n\nexport { SOCIAL_FX, registerSocialPack, fanAngles };\n\nexport { GAME_FX, registerGamePack, throwPath };\n\nexport { GEO_FX, registerGeoPack, routeLength };\n\nexport { FORM_FX, registerFormPack, shakeFrames };\n\nexport { AI_FX, registerAiPack, splitWords };\n\nexport { FESTIVAL_FX, registerFestivalPack, sparkVectors };\n\nexport { RETRO_FX, registerRetroPack, pixelSteps };\n\nexport { ORGANIC_FX, registerOrganicPack, blobRadius };\n\nexport { CYBER_FX, registerCyberPack, decodeFrame };\n\nexport { PAPER_FX, registerPaperPack, roughLine, paperRandom };\n\n/** The 6.x effect packs by name. */\nexport const EFFECT_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n depth: DEPTH3_FX,\n morph: MORPH2_FX,\n transitions: TRANSITIONS2_FX,\n weather: WEATHER_FX,\n physics: PHYSICS2_FX,\n focus: FOCUS_FX,\n music: MUSIC_FX,\n chart: CHART_FX,\n shop: SHOP_FX,\n social: SOCIAL_FX,\n game: GAME_FX,\n geo: GEO_FX,\n form: FORM_FX,\n ai: AI_FX,\n festival: FESTIVAL_FX,\n retro: RETRO_FX,\n organic: ORGANIC_FX,\n cyber: CYBER_FX,\n paper: PAPER_FX,\n};\n\n/** Register every 6.x effect pack (idempotent). */\nexport function registerEffectPacks(): void {\n registerGpuPack();\n registerTextPack();\n registerLightPack();\n register3dPack();\n registerMorphPack();\n registerTransitionsPack();\n registerWeatherPack();\n registerPhysicsPack();\n registerFocusPack();\n registerMusicPack();\n registerChartPack();\n registerShopPack();\n registerSocialPack();\n registerGamePack();\n registerGeoPack();\n registerFormPack();\n registerAiPack();\n registerFestivalPack();\n registerRetroPack();\n registerOrganicPack();\n registerCyberPack();\n registerPaperPack();\n}\n\n\n"],"names":["GPU_FX","TEXT3_FX","LIGHT_FX","DEPTH3_FX","MORPH2_FX","TRANSITIONS2_FX","WEATHER_FX","PHYSICS2_FX","FOCUS_FX","MUSIC_FX","CHART_FX","SHOP_FX","SOCIAL_FX","GAME_FX","GEO_FX","FORM_FX","AI_FX","FESTIVAL_FX","RETRO_FX","ORGANIC_FX","CYBER_FX","PAPER_FX","registerGpuPack","registerTextPack","registerLightPack","register3dPack","registerMorphPack","registerTransitionsPack","registerWeatherPack","registerPhysicsPack","registerFocusPack","registerMusicPack","registerChartPack","registerShopPack","registerSocialPack","registerGamePack","registerGeoPack","registerFormPack","registerAiPack","registerFestivalPack","registerRetroPack","registerOrganicPack","registerCyberPack","registerPaperPack"],"mappings":"
|
|
1
|
+
{"version":3,"file":"fx2.cjs","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nexport { EFFECT_PACK_FORMAT, packManifest, validateManifest, loadEffectPack } from './manifest';\nexport type { EffectPackManifest } from './manifest';\nimport { GPU_FX, registerGpuPack } from './gpu';\nimport { TEXT3_FX, registerTextPack, splitChars } from './text3';\nimport { LIGHT_FX, registerLightPack, trackPointer } from './light';\nimport { DEPTH3_FX, register3dPack } from './depth3';\nimport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath } from './morph2';\nimport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions } from './transitions2';\nimport { WEATHER_FX, registerWeatherPack, skyAt } from './weather';\nimport { PHYSICS2_FX, registerPhysicsPack, VerletWorld } from './physics2';\nimport { FOCUS_FX, registerFocusPack } from './focus';\nimport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample } from './music';\nimport { CHART_FX, registerChartPack, parseFigure } from './chart';\nimport { SHOP_FX, registerShopPack, arcPath } from './shop';\nimport { SOCIAL_FX, registerSocialPack, fanAngles } from './social';\nimport { GAME_FX, registerGamePack, throwPath } from './game';\nimport { GEO_FX, registerGeoPack, routeLength } from './geo';\nimport { FORM_FX, registerFormPack, shakeFrames } from './form';\nimport { AI_FX, registerAiPack, splitWords } from './ai';\nimport { FESTIVAL_FX, registerFestivalPack, sparkVectors } from './festival';\nimport { RETRO_FX, registerRetroPack, pixelSteps } from './retro2';\nimport { ORGANIC_FX, registerOrganicPack, blobRadius } from './organic';\nimport { CYBER_FX, registerCyberPack, decodeFrame } from './cyber';\nimport { PAPER_FX, registerPaperPack, roughLine, paperRandom } from './paper';\nimport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme } from './themefx';\nimport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt } from './gesture3';\n\nexport { GPU_FX, registerGpuPack, TEXT3_FX, registerTextPack, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport { supportsWebGPU, glslToWgsl, wgslModule, webgpuBackground, WGSL_HEAD } from './webgpu';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightPack, trackPointer };\n\nexport { DEPTH3_FX, register3dPack };\n\nexport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath };\n\nexport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions };\n\nexport { WEATHER_FX, registerWeatherPack, skyAt };\n\nexport { PHYSICS2_FX, registerPhysicsPack, VerletWorld };\n\nexport { FOCUS_FX, registerFocusPack };\n\nexport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample };\n\nexport { CHART_FX, registerChartPack, parseFigure };\n\nexport { SHOP_FX, registerShopPack, arcPath };\n\nexport { SOCIAL_FX, registerSocialPack, fanAngles };\n\nexport { GAME_FX, registerGamePack, throwPath };\n\nexport { GEO_FX, registerGeoPack, routeLength };\n\nexport { FORM_FX, registerFormPack, shakeFrames };\n\nexport { AI_FX, registerAiPack, splitWords };\n\nexport { FESTIVAL_FX, registerFestivalPack, sparkVectors };\n\nexport { RETRO_FX, registerRetroPack, pixelSteps };\n\nexport { ORGANIC_FX, registerOrganicPack, blobRadius };\n\nexport { CYBER_FX, registerCyberPack, decodeFrame };\n\nexport { PAPER_FX, registerPaperPack, roughLine, paperRandom };\n\nexport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme };\n\nexport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt };\n\n/** The 6.x effect packs by name. */\nexport const EFFECT_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n depth: DEPTH3_FX,\n morph: MORPH2_FX,\n transitions: TRANSITIONS2_FX,\n weather: WEATHER_FX,\n physics: PHYSICS2_FX,\n focus: FOCUS_FX,\n music: MUSIC_FX,\n chart: CHART_FX,\n shop: SHOP_FX,\n social: SOCIAL_FX,\n game: GAME_FX,\n geo: GEO_FX,\n form: FORM_FX,\n ai: AI_FX,\n festival: FESTIVAL_FX,\n retro: RETRO_FX,\n organic: ORGANIC_FX,\n cyber: CYBER_FX,\n paper: PAPER_FX,\n surface: SURFACE_FX,\n gesture3: GESTURE3_FX,\n};\n\n/** Register every 6.x effect pack (idempotent). */\nexport function registerEffectPacks(): void {\n registerGpuPack();\n registerTextPack();\n registerLightPack();\n register3dPack();\n registerMorphPack();\n registerTransitionsPack();\n registerWeatherPack();\n registerPhysicsPack();\n registerFocusPack();\n registerMusicPack();\n registerChartPack();\n registerShopPack();\n registerSocialPack();\n registerGamePack();\n registerGeoPack();\n registerFormPack();\n registerAiPack();\n registerFestivalPack();\n registerRetroPack();\n registerOrganicPack();\n registerCyberPack();\n registerPaperPack();\n registerSurfacePack();\n registerGesture3Pack();\n}\n\n\n"],"names":["GPU_FX","TEXT3_FX","LIGHT_FX","DEPTH3_FX","MORPH2_FX","TRANSITIONS2_FX","WEATHER_FX","PHYSICS2_FX","FOCUS_FX","MUSIC_FX","CHART_FX","SHOP_FX","SOCIAL_FX","GAME_FX","GEO_FX","FORM_FX","AI_FX","FESTIVAL_FX","RETRO_FX","ORGANIC_FX","CYBER_FX","PAPER_FX","SURFACE_FX","GESTURE3_FX","registerGpuPack","registerTextPack","registerLightPack","register3dPack","registerMorphPack","registerTransitionsPack","registerWeatherPack","registerPhysicsPack","registerFocusPack","registerMusicPack","registerChartPack","registerShopPack","registerSocialPack","registerGamePack","registerGeoPack","registerFormPack","registerAiPack","registerFestivalPack","registerRetroPack","registerOrganicPack","registerCyberPack","registerPaperPack","registerSurfacePack","registerGesture3Pack"],"mappings":";;;;;;;;;;;;;;;;;;;;;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AAE;AAClB,IAAAC,gCAAe,EAAE;AACjB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,8BAAc,EAAE;AAChB,IAAAC,0CAAoB,EAAE;AACtB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,yCAAoB,EAAE;AACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -700,6 +700,62 @@ declare const PAPER_FX: EffectDefinition[];
|
|
|
700
700
|
/** Register paper-unfold, pencil-sketch, watercolor and crumple (8.5). */
|
|
701
701
|
declare function registerPaperPack(): void;
|
|
702
702
|
|
|
703
|
+
/**
|
|
704
|
+
* 8.6 — Surface theme pack (`motionary/fx/surface`, also `motionary/components/fx-surface`):
|
|
705
|
+
*
|
|
706
|
+
* - `neon-ignite` (enter) — the element powers on like a neon tube: a few
|
|
707
|
+
* stuttering flickers, then a steady glow (`color`).
|
|
708
|
+
* - `neon-pulse` (loop) — a slow breathing neon glow; the cleanup stops it
|
|
709
|
+
* (`color`).
|
|
710
|
+
* - `glass-frost` (enter) — frosted glass condenses: blur and transparency
|
|
711
|
+
* settle into a crisp glass panel, with a shine passing over it.
|
|
712
|
+
* - `neu-press` (attention) — a soft neumorphic press: the raised shadow
|
|
713
|
+
* flips to an inset one and pops back.
|
|
714
|
+
*
|
|
715
|
+
* Reduced motion: neon-ignite / glass-frost just show, neon-pulse is
|
|
716
|
+
* skipped, neu-press does nothing.
|
|
717
|
+
*/
|
|
718
|
+
|
|
719
|
+
/** The built-in surface themes of the 8.6 theme system. */
|
|
720
|
+
declare const SURFACE_THEMES: readonly ["light", "dark", "neon", "glass", "neu"];
|
|
721
|
+
type SurfaceTheme = (typeof SURFACE_THEMES)[number];
|
|
722
|
+
/** Set `data-usa-surface` on `target` (default `<html>`) and return the theme actually applied (unknown → `light`) (8.6). */
|
|
723
|
+
declare function applySurfaceTheme(name: string, target?: Element | null): SurfaceTheme;
|
|
724
|
+
declare const SURFACE_FX: EffectDefinition[];
|
|
725
|
+
/** Register neon-ignite, neon-pulse, glass-frost and neu-press (8.6). */
|
|
726
|
+
declare function registerSurfacePack(): void;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* 8.7 — Gestures 3.0 pack (`motionary/fx/gesture`, also `motionary/components/fx-gesture`):
|
|
730
|
+
*
|
|
731
|
+
* - `swipe-hint` (attention) — a ghost fingertip swipes across the element
|
|
732
|
+
* and the element nudges along, teaching "swipe me" (`direction` left|right).
|
|
733
|
+
* - `pinch-hint` (attention) — two ghost fingertips pinch out and the
|
|
734
|
+
* element zooms with them, teaching "pinch to zoom".
|
|
735
|
+
* - `tilt-wobble` (attention) — a 3D wobble as if the phone was tilted.
|
|
736
|
+
* - `depth-in` (enter) — children fly in from different depths (by
|
|
737
|
+
* `data-depth`, default their order), like parallax layers settling.
|
|
738
|
+
*
|
|
739
|
+
* Reduced motion: depth-in just shows, the hints and wobble do nothing.
|
|
740
|
+
*/
|
|
741
|
+
|
|
742
|
+
type Pt = {
|
|
743
|
+
x: number;
|
|
744
|
+
y: number;
|
|
745
|
+
};
|
|
746
|
+
/** Scale factor of a two-finger pinch from start points (a1, a2) to current points (b1, b2) (8.7). */
|
|
747
|
+
declare function pinchScale(a1: Pt, a2: Pt, b1: Pt, b2: Pt): number;
|
|
748
|
+
/** Rotation in degrees of a two-finger twist from (a1, a2) to (b1, b2) (8.7). */
|
|
749
|
+
declare function pinchAngle(a1: Pt, a2: Pt, b1: Pt, b2: Pt): number;
|
|
750
|
+
/** Device orientation (beta front/back, gamma left/right, in degrees) → card tilt { rx, ry } clamped to ±max (8.7). */
|
|
751
|
+
declare function orientationToTilt(beta: number, gamma: number, max?: number, rest?: number): {
|
|
752
|
+
rx: number;
|
|
753
|
+
ry: number;
|
|
754
|
+
};
|
|
755
|
+
declare const GESTURE3_FX: EffectDefinition[];
|
|
756
|
+
/** Register swipe-hint, pinch-hint, tilt-wobble and depth-in (8.7). */
|
|
757
|
+
declare function registerGesture3Pack(): void;
|
|
758
|
+
|
|
703
759
|
/**
|
|
704
760
|
* 5.5 — generative backgrounds on Canvas 2D, registered through
|
|
705
761
|
* `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
|
|
@@ -809,5 +865,5 @@ declare const EFFECT_PACKS: Record<string, EffectDefinition[]>;
|
|
|
809
865
|
/** Register every 6.x effect pack (idempotent). */
|
|
810
866
|
declare function registerEffectPacks(): void;
|
|
811
867
|
|
|
812
|
-
export { AI_FX, CHART_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, EFFECT_PACK_FORMAT, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GEO_FX, GLSL_HEAD, GPU_FX, LIGHT_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, TEXT3_FX, TRANSITIONS2_FX, VerletWorld, WEATHER_FX, WGSL_HEAD, arcPath, blobRadius, crossDocumentTransitions, decodeFrame, fanAngles, fieldFallback, glslToWgsl, loadEffectPack, musicSample, packManifest, pageTransition, paperRandom, parseFigure, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerTextPack, registerTransitionsPack, registerWeatherPack, roughLine, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule };
|
|
868
|
+
export { AI_FX, CHART_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, EFFECT_PACK_FORMAT, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GEO_FX, GESTURE3_FX, GLSL_HEAD, GPU_FX, LIGHT_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, SURFACE_FX, SURFACE_THEMES, TEXT3_FX, TRANSITIONS2_FX, VerletWorld, WEATHER_FX, WGSL_HEAD, applySurfaceTheme, arcPath, blobRadius, crossDocumentTransitions, decodeFrame, fanAngles, fieldFallback, glslToWgsl, loadEffectPack, musicSample, orientationToTilt, packManifest, pageTransition, paperRandom, parseFigure, pinchAngle, pinchScale, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack, roughLine, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule };
|
|
813
869
|
export type { EffectPackManifest, ShaderSpec };
|
package/dist/components/fx2.d.ts
CHANGED
|
@@ -700,6 +700,62 @@ declare const PAPER_FX: EffectDefinition[];
|
|
|
700
700
|
/** Register paper-unfold, pencil-sketch, watercolor and crumple (8.5). */
|
|
701
701
|
declare function registerPaperPack(): void;
|
|
702
702
|
|
|
703
|
+
/**
|
|
704
|
+
* 8.6 — Surface theme pack (`motionary/fx/surface`, also `motionary/components/fx-surface`):
|
|
705
|
+
*
|
|
706
|
+
* - `neon-ignite` (enter) — the element powers on like a neon tube: a few
|
|
707
|
+
* stuttering flickers, then a steady glow (`color`).
|
|
708
|
+
* - `neon-pulse` (loop) — a slow breathing neon glow; the cleanup stops it
|
|
709
|
+
* (`color`).
|
|
710
|
+
* - `glass-frost` (enter) — frosted glass condenses: blur and transparency
|
|
711
|
+
* settle into a crisp glass panel, with a shine passing over it.
|
|
712
|
+
* - `neu-press` (attention) — a soft neumorphic press: the raised shadow
|
|
713
|
+
* flips to an inset one and pops back.
|
|
714
|
+
*
|
|
715
|
+
* Reduced motion: neon-ignite / glass-frost just show, neon-pulse is
|
|
716
|
+
* skipped, neu-press does nothing.
|
|
717
|
+
*/
|
|
718
|
+
|
|
719
|
+
/** The built-in surface themes of the 8.6 theme system. */
|
|
720
|
+
declare const SURFACE_THEMES: readonly ["light", "dark", "neon", "glass", "neu"];
|
|
721
|
+
type SurfaceTheme = (typeof SURFACE_THEMES)[number];
|
|
722
|
+
/** Set `data-usa-surface` on `target` (default `<html>`) and return the theme actually applied (unknown → `light`) (8.6). */
|
|
723
|
+
declare function applySurfaceTheme(name: string, target?: Element | null): SurfaceTheme;
|
|
724
|
+
declare const SURFACE_FX: EffectDefinition[];
|
|
725
|
+
/** Register neon-ignite, neon-pulse, glass-frost and neu-press (8.6). */
|
|
726
|
+
declare function registerSurfacePack(): void;
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* 8.7 — Gestures 3.0 pack (`motionary/fx/gesture`, also `motionary/components/fx-gesture`):
|
|
730
|
+
*
|
|
731
|
+
* - `swipe-hint` (attention) — a ghost fingertip swipes across the element
|
|
732
|
+
* and the element nudges along, teaching "swipe me" (`direction` left|right).
|
|
733
|
+
* - `pinch-hint` (attention) — two ghost fingertips pinch out and the
|
|
734
|
+
* element zooms with them, teaching "pinch to zoom".
|
|
735
|
+
* - `tilt-wobble` (attention) — a 3D wobble as if the phone was tilted.
|
|
736
|
+
* - `depth-in` (enter) — children fly in from different depths (by
|
|
737
|
+
* `data-depth`, default their order), like parallax layers settling.
|
|
738
|
+
*
|
|
739
|
+
* Reduced motion: depth-in just shows, the hints and wobble do nothing.
|
|
740
|
+
*/
|
|
741
|
+
|
|
742
|
+
type Pt = {
|
|
743
|
+
x: number;
|
|
744
|
+
y: number;
|
|
745
|
+
};
|
|
746
|
+
/** Scale factor of a two-finger pinch from start points (a1, a2) to current points (b1, b2) (8.7). */
|
|
747
|
+
declare function pinchScale(a1: Pt, a2: Pt, b1: Pt, b2: Pt): number;
|
|
748
|
+
/** Rotation in degrees of a two-finger twist from (a1, a2) to (b1, b2) (8.7). */
|
|
749
|
+
declare function pinchAngle(a1: Pt, a2: Pt, b1: Pt, b2: Pt): number;
|
|
750
|
+
/** Device orientation (beta front/back, gamma left/right, in degrees) → card tilt { rx, ry } clamped to ±max (8.7). */
|
|
751
|
+
declare function orientationToTilt(beta: number, gamma: number, max?: number, rest?: number): {
|
|
752
|
+
rx: number;
|
|
753
|
+
ry: number;
|
|
754
|
+
};
|
|
755
|
+
declare const GESTURE3_FX: EffectDefinition[];
|
|
756
|
+
/** Register swipe-hint, pinch-hint, tilt-wobble and depth-in (8.7). */
|
|
757
|
+
declare function registerGesture3Pack(): void;
|
|
758
|
+
|
|
703
759
|
/**
|
|
704
760
|
* 5.5 — generative backgrounds on Canvas 2D, registered through
|
|
705
761
|
* `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
|
|
@@ -809,5 +865,5 @@ declare const EFFECT_PACKS: Record<string, EffectDefinition[]>;
|
|
|
809
865
|
/** Register every 6.x effect pack (idempotent). */
|
|
810
866
|
declare function registerEffectPacks(): void;
|
|
811
867
|
|
|
812
|
-
export { AI_FX, CHART_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, EFFECT_PACK_FORMAT, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GEO_FX, GLSL_HEAD, GPU_FX, LIGHT_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, TEXT3_FX, TRANSITIONS2_FX, VerletWorld, WEATHER_FX, WGSL_HEAD, arcPath, blobRadius, crossDocumentTransitions, decodeFrame, fanAngles, fieldFallback, glslToWgsl, loadEffectPack, musicSample, packManifest, pageTransition, paperRandom, parseFigure, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerTextPack, registerTransitionsPack, registerWeatherPack, roughLine, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule };
|
|
868
|
+
export { AI_FX, CHART_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, EFFECT_PACK_FORMAT, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GEO_FX, GESTURE3_FX, GLSL_HEAD, GPU_FX, LIGHT_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, SURFACE_FX, SURFACE_THEMES, TEXT3_FX, TRANSITIONS2_FX, VerletWorld, WEATHER_FX, WGSL_HEAD, applySurfaceTheme, arcPath, blobRadius, crossDocumentTransitions, decodeFrame, fanAngles, fieldFallback, glslToWgsl, loadEffectPack, musicSample, orientationToTilt, packManifest, pageTransition, paperRandom, parseFigure, pinchAngle, pinchScale, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack, roughLine, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule };
|
|
813
869
|
export type { EffectPackManifest, ShaderSpec };
|
package/dist/components/fx2.js
CHANGED
|
@@ -41,6 +41,10 @@ import { CYBER_FX, registerCyberPack } from './fx-cyber.js';
|
|
|
41
41
|
export { decodeFrame } from './fx-cyber.js';
|
|
42
42
|
import { PAPER_FX, registerPaperPack } from './fx-paper.js';
|
|
43
43
|
export { paperRandom, roughLine } from './fx-paper.js';
|
|
44
|
+
import { SURFACE_FX, registerSurfacePack } from './fx-surface.js';
|
|
45
|
+
export { SURFACE_THEMES, applySurfaceTheme } from './fx-surface.js';
|
|
46
|
+
import { GESTURE3_FX, registerGesture3Pack } from './fx-gesture.js';
|
|
47
|
+
export { orientationToTilt, pinchAngle, pinchScale } from './fx-gesture.js';
|
|
44
48
|
import '../chunks/registry-CnO7ZVPK.js';
|
|
45
49
|
import '../chunks/base-CLuqlLfG.js';
|
|
46
50
|
import '../chunks/generative-2LhxG5BJ.js';
|
|
@@ -71,6 +75,8 @@ const EFFECT_PACKS = {
|
|
|
71
75
|
organic: ORGANIC_FX,
|
|
72
76
|
cyber: CYBER_FX,
|
|
73
77
|
paper: PAPER_FX,
|
|
78
|
+
surface: SURFACE_FX,
|
|
79
|
+
gesture3: GESTURE3_FX,
|
|
74
80
|
};
|
|
75
81
|
/** Register every 6.x effect pack (idempotent). */
|
|
76
82
|
function registerEffectPacks() {
|
|
@@ -96,7 +102,9 @@ function registerEffectPacks() {
|
|
|
96
102
|
registerOrganicPack();
|
|
97
103
|
registerCyberPack();
|
|
98
104
|
registerPaperPack();
|
|
105
|
+
registerSurfacePack();
|
|
106
|
+
registerGesture3Pack();
|
|
99
107
|
}
|
|
100
108
|
|
|
101
|
-
export { AI_FX, CHART_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GEO_FX, GPU_FX, LIGHT_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, TEXT3_FX, TRANSITIONS2_FX, WEATHER_FX, register3dPack, registerAiPack, registerChartPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerTextPack, registerTransitionsPack, registerWeatherPack };
|
|
109
|
+
export { AI_FX, CHART_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GEO_FX, GESTURE3_FX, GPU_FX, LIGHT_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, SURFACE_FX, TEXT3_FX, TRANSITIONS2_FX, WEATHER_FX, register3dPack, registerAiPack, registerChartPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack };
|
|
102
110
|
//# sourceMappingURL=fx2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fx2.js","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nexport { EFFECT_PACK_FORMAT, packManifest, validateManifest, loadEffectPack } from './manifest';\nexport type { EffectPackManifest } from './manifest';\nimport { GPU_FX, registerGpuPack } from './gpu';\nimport { TEXT3_FX, registerTextPack, splitChars } from './text3';\nimport { LIGHT_FX, registerLightPack, trackPointer } from './light';\nimport { DEPTH3_FX, register3dPack } from './depth3';\nimport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath } from './morph2';\nimport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions } from './transitions2';\nimport { WEATHER_FX, registerWeatherPack, skyAt } from './weather';\nimport { PHYSICS2_FX, registerPhysicsPack, VerletWorld } from './physics2';\nimport { FOCUS_FX, registerFocusPack } from './focus';\nimport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample } from './music';\nimport { CHART_FX, registerChartPack, parseFigure } from './chart';\nimport { SHOP_FX, registerShopPack, arcPath } from './shop';\nimport { SOCIAL_FX, registerSocialPack, fanAngles } from './social';\nimport { GAME_FX, registerGamePack, throwPath } from './game';\nimport { GEO_FX, registerGeoPack, routeLength } from './geo';\nimport { FORM_FX, registerFormPack, shakeFrames } from './form';\nimport { AI_FX, registerAiPack, splitWords } from './ai';\nimport { FESTIVAL_FX, registerFestivalPack, sparkVectors } from './festival';\nimport { RETRO_FX, registerRetroPack, pixelSteps } from './retro2';\nimport { ORGANIC_FX, registerOrganicPack, blobRadius } from './organic';\nimport { CYBER_FX, registerCyberPack, decodeFrame } from './cyber';\nimport { PAPER_FX, registerPaperPack, roughLine, paperRandom } from './paper';\n\nexport { GPU_FX, registerGpuPack, TEXT3_FX, registerTextPack, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport { supportsWebGPU, glslToWgsl, wgslModule, webgpuBackground, WGSL_HEAD } from './webgpu';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightPack, trackPointer };\n\nexport { DEPTH3_FX, register3dPack };\n\nexport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath };\n\nexport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions };\n\nexport { WEATHER_FX, registerWeatherPack, skyAt };\n\nexport { PHYSICS2_FX, registerPhysicsPack, VerletWorld };\n\nexport { FOCUS_FX, registerFocusPack };\n\nexport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample };\n\nexport { CHART_FX, registerChartPack, parseFigure };\n\nexport { SHOP_FX, registerShopPack, arcPath };\n\nexport { SOCIAL_FX, registerSocialPack, fanAngles };\n\nexport { GAME_FX, registerGamePack, throwPath };\n\nexport { GEO_FX, registerGeoPack, routeLength };\n\nexport { FORM_FX, registerFormPack, shakeFrames };\n\nexport { AI_FX, registerAiPack, splitWords };\n\nexport { FESTIVAL_FX, registerFestivalPack, sparkVectors };\n\nexport { RETRO_FX, registerRetroPack, pixelSteps };\n\nexport { ORGANIC_FX, registerOrganicPack, blobRadius };\n\nexport { CYBER_FX, registerCyberPack, decodeFrame };\n\nexport { PAPER_FX, registerPaperPack, roughLine, paperRandom };\n\n/** The 6.x effect packs by name. */\nexport const EFFECT_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n depth: DEPTH3_FX,\n morph: MORPH2_FX,\n transitions: TRANSITIONS2_FX,\n weather: WEATHER_FX,\n physics: PHYSICS2_FX,\n focus: FOCUS_FX,\n music: MUSIC_FX,\n chart: CHART_FX,\n shop: SHOP_FX,\n social: SOCIAL_FX,\n game: GAME_FX,\n geo: GEO_FX,\n form: FORM_FX,\n ai: AI_FX,\n festival: FESTIVAL_FX,\n retro: RETRO_FX,\n organic: ORGANIC_FX,\n cyber: CYBER_FX,\n paper: PAPER_FX,\n};\n\n/** Register every 6.x effect pack (idempotent). */\nexport function registerEffectPacks(): void {\n registerGpuPack();\n registerTextPack();\n registerLightPack();\n register3dPack();\n registerMorphPack();\n registerTransitionsPack();\n registerWeatherPack();\n registerPhysicsPack();\n registerFocusPack();\n registerMusicPack();\n registerChartPack();\n registerShopPack();\n registerSocialPack();\n registerGamePack();\n registerGeoPack();\n registerFormPack();\n registerAiPack();\n registerFestivalPack();\n registerRetroPack();\n registerOrganicPack();\n registerCyberPack();\n registerPaperPack();\n}\n\n\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fx2.js","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nexport { EFFECT_PACK_FORMAT, packManifest, validateManifest, loadEffectPack } from './manifest';\nexport type { EffectPackManifest } from './manifest';\nimport { GPU_FX, registerGpuPack } from './gpu';\nimport { TEXT3_FX, registerTextPack, splitChars } from './text3';\nimport { LIGHT_FX, registerLightPack, trackPointer } from './light';\nimport { DEPTH3_FX, register3dPack } from './depth3';\nimport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath } from './morph2';\nimport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions } from './transitions2';\nimport { WEATHER_FX, registerWeatherPack, skyAt } from './weather';\nimport { PHYSICS2_FX, registerPhysicsPack, VerletWorld } from './physics2';\nimport { FOCUS_FX, registerFocusPack } from './focus';\nimport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample } from './music';\nimport { CHART_FX, registerChartPack, parseFigure } from './chart';\nimport { SHOP_FX, registerShopPack, arcPath } from './shop';\nimport { SOCIAL_FX, registerSocialPack, fanAngles } from './social';\nimport { GAME_FX, registerGamePack, throwPath } from './game';\nimport { GEO_FX, registerGeoPack, routeLength } from './geo';\nimport { FORM_FX, registerFormPack, shakeFrames } from './form';\nimport { AI_FX, registerAiPack, splitWords } from './ai';\nimport { FESTIVAL_FX, registerFestivalPack, sparkVectors } from './festival';\nimport { RETRO_FX, registerRetroPack, pixelSteps } from './retro2';\nimport { ORGANIC_FX, registerOrganicPack, blobRadius } from './organic';\nimport { CYBER_FX, registerCyberPack, decodeFrame } from './cyber';\nimport { PAPER_FX, registerPaperPack, roughLine, paperRandom } from './paper';\nimport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme } from './themefx';\nimport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt } from './gesture3';\n\nexport { GPU_FX, registerGpuPack, TEXT3_FX, registerTextPack, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport { supportsWebGPU, glslToWgsl, wgslModule, webgpuBackground, WGSL_HEAD } from './webgpu';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightPack, trackPointer };\n\nexport { DEPTH3_FX, register3dPack };\n\nexport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath };\n\nexport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions };\n\nexport { WEATHER_FX, registerWeatherPack, skyAt };\n\nexport { PHYSICS2_FX, registerPhysicsPack, VerletWorld };\n\nexport { FOCUS_FX, registerFocusPack };\n\nexport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample };\n\nexport { CHART_FX, registerChartPack, parseFigure };\n\nexport { SHOP_FX, registerShopPack, arcPath };\n\nexport { SOCIAL_FX, registerSocialPack, fanAngles };\n\nexport { GAME_FX, registerGamePack, throwPath };\n\nexport { GEO_FX, registerGeoPack, routeLength };\n\nexport { FORM_FX, registerFormPack, shakeFrames };\n\nexport { AI_FX, registerAiPack, splitWords };\n\nexport { FESTIVAL_FX, registerFestivalPack, sparkVectors };\n\nexport { RETRO_FX, registerRetroPack, pixelSteps };\n\nexport { ORGANIC_FX, registerOrganicPack, blobRadius };\n\nexport { CYBER_FX, registerCyberPack, decodeFrame };\n\nexport { PAPER_FX, registerPaperPack, roughLine, paperRandom };\n\nexport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme };\n\nexport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt };\n\n/** The 6.x effect packs by name. */\nexport const EFFECT_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n depth: DEPTH3_FX,\n morph: MORPH2_FX,\n transitions: TRANSITIONS2_FX,\n weather: WEATHER_FX,\n physics: PHYSICS2_FX,\n focus: FOCUS_FX,\n music: MUSIC_FX,\n chart: CHART_FX,\n shop: SHOP_FX,\n social: SOCIAL_FX,\n game: GAME_FX,\n geo: GEO_FX,\n form: FORM_FX,\n ai: AI_FX,\n festival: FESTIVAL_FX,\n retro: RETRO_FX,\n organic: ORGANIC_FX,\n cyber: CYBER_FX,\n paper: PAPER_FX,\n surface: SURFACE_FX,\n gesture3: GESTURE3_FX,\n};\n\n/** Register every 6.x effect pack (idempotent). */\nexport function registerEffectPacks(): void {\n registerGpuPack();\n registerTextPack();\n registerLightPack();\n register3dPack();\n registerMorphPack();\n registerTransitionsPack();\n registerWeatherPack();\n registerPhysicsPack();\n registerFocusPack();\n registerMusicPack();\n registerChartPack();\n registerShopPack();\n registerSocialPack();\n registerGamePack();\n registerGeoPack();\n registerFormPack();\n registerAiPack();\n registerFestivalPack();\n registerRetroPack();\n registerOrganicPack();\n registerCyberPack();\n registerPaperPack();\n registerSurfacePack();\n registerGesture3Pack();\n}\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA;AACO,MAAM,YAAY,GAAuC;AAC9D,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,WAAW,EAAE,eAAe;AAC5B,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,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