use-scroll-animate 8.4.0 → 8.6.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-paper.cjs +108 -0
- package/dist/components/fx-paper.cjs.map +1 -0
- package/dist/components/fx-paper.d.cts +68 -0
- package/dist/components/fx-paper.d.ts +68 -0
- package/dist/components/fx-paper.js +103 -0
- package/dist/components/fx-paper.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 +14 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +50 -1
- package/dist/components/fx2.d.ts +50 -1
- package/dist/components/fx2.js +9 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/widgets.cjs +509 -173
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +65 -2
- package/dist/components/widgets.d.ts +65 -2
- package/dist/components/widgets.js +506 -174
- 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 +43 -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,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,CAAC,OAAO;gBAAE;YACjB,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,UAAU,E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MAAM,EAAE,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,SAAS,CAAC,CAAC;AAC9F,YAAA,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,SAAS,CAAC;QAChD,CAAC;AACF,KAAA;AACD,IAAA;AACE,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,IAAI,EAAE,WAAW;AACjB,QAAA,WAAW,EAAE,iFAAiF;AAC9F,QAAA,QAAQ,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;QAC3B,GAAG,EAAE,CAAC,EAAe,EAAE,CAAM,EAAE,GAAkB,KAAI;YACnD,IAAI,GAAG,CAAC,OAAO;gBAAE;YACjB,MAAM,EAAE,GAAG,wEAAwE;YACnF,MAAM,IAAI,GAAG,kFAAkF;AAC/F,YAAA,OAAO,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC;QAChP,CAAC;AACF,KAAA;;AAGH;SACgB,mBAAmB,GAAA;IACjC,eAAe,CAAC,UAAU,CAAC;AAC7B;;;;"}
|
package/dist/components/fx2.cjs
CHANGED
|
@@ -22,6 +22,8 @@ var components_fxFestival = require('./fx-festival.cjs');
|
|
|
22
22
|
var components_fxRetro = require('./fx-retro.cjs');
|
|
23
23
|
var components_fxOrganic = require('./fx-organic.cjs');
|
|
24
24
|
var components_fxCyber = require('./fx-cyber.cjs');
|
|
25
|
+
var components_fxPaper = require('./fx-paper.cjs');
|
|
26
|
+
var components_fxSurface = require('./fx-surface.cjs');
|
|
25
27
|
require('../chunks/registry-BVklOepd.cjs');
|
|
26
28
|
require('../chunks/base-DoRUZBy-.cjs');
|
|
27
29
|
require('../chunks/generative-BHIj-NU0.cjs');
|
|
@@ -51,6 +53,8 @@ const EFFECT_PACKS = {
|
|
|
51
53
|
retro: components_fxRetro.RETRO_FX,
|
|
52
54
|
organic: components_fxOrganic.ORGANIC_FX,
|
|
53
55
|
cyber: components_fxCyber.CYBER_FX,
|
|
56
|
+
paper: components_fxPaper.PAPER_FX,
|
|
57
|
+
surface: components_fxSurface.SURFACE_FX,
|
|
54
58
|
};
|
|
55
59
|
/** Register every 6.x effect pack (idempotent). */
|
|
56
60
|
function registerEffectPacks() {
|
|
@@ -75,6 +79,8 @@ function registerEffectPacks() {
|
|
|
75
79
|
components_fxRetro.registerRetroPack();
|
|
76
80
|
components_fxOrganic.registerOrganicPack();
|
|
77
81
|
components_fxCyber.registerCyberPack();
|
|
82
|
+
components_fxPaper.registerPaperPack();
|
|
83
|
+
components_fxSurface.registerSurfacePack();
|
|
78
84
|
}
|
|
79
85
|
|
|
80
86
|
exports.EFFECT_PACK_FORMAT = components_marketplace.EFFECT_PACK_FORMAT;
|
|
@@ -153,6 +159,14 @@ exports.registerOrganicPack = components_fxOrganic.registerOrganicPack;
|
|
|
153
159
|
exports.CYBER_FX = components_fxCyber.CYBER_FX;
|
|
154
160
|
exports.decodeFrame = components_fxCyber.decodeFrame;
|
|
155
161
|
exports.registerCyberPack = components_fxCyber.registerCyberPack;
|
|
162
|
+
exports.PAPER_FX = components_fxPaper.PAPER_FX;
|
|
163
|
+
exports.paperRandom = components_fxPaper.paperRandom;
|
|
164
|
+
exports.registerPaperPack = components_fxPaper.registerPaperPack;
|
|
165
|
+
exports.roughLine = components_fxPaper.roughLine;
|
|
166
|
+
exports.SURFACE_FX = components_fxSurface.SURFACE_FX;
|
|
167
|
+
exports.SURFACE_THEMES = components_fxSurface.SURFACE_THEMES;
|
|
168
|
+
exports.applySurfaceTheme = components_fxSurface.applySurfaceTheme;
|
|
169
|
+
exports.registerSurfacePack = components_fxSurface.registerSurfacePack;
|
|
156
170
|
exports.EFFECT_PACKS = EFFECT_PACKS;
|
|
157
171
|
exports.registerEffectPacks = registerEffectPacks;
|
|
158
172
|
//# 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';\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\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};\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}\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","registerGpuPack","registerTextPack","registerLightPack","register3dPack","registerMorphPack","registerTransitionsPack","registerWeatherPack","registerPhysicsPack","registerFocusPack","registerMusicPack","registerChartPack","registerShopPack","registerSocialPack","registerGamePack","registerGeoPack","registerFormPack","registerAiPack","registerFestivalPack","registerRetroPack","registerOrganicPack","registerCyberPack"],"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';\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\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};\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}\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","registerGpuPack","registerTextPack","registerLightPack","register3dPack","registerMorphPack","registerTransitionsPack","registerWeatherPack","registerPhysicsPack","registerFocusPack","registerMusicPack","registerChartPack","registerShopPack","registerSocialPack","registerGamePack","registerGeoPack","registerFormPack","registerAiPack","registerFestivalPack","registerRetroPack","registerOrganicPack","registerCyberPack","registerPaperPack","registerSurfacePack"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA;AACO,MAAM,YAAY,GAAuC;AAC9D,IAAA,GAAG,EAAEA,uBAAM;AACX,IAAA,IAAI,EAAEC,0BAAQ;AACd,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,yBAAS;AAChB,IAAA,KAAK,EAAEC,4BAAS;AAChB,IAAA,WAAW,EAAEC,wCAAe;AAC5B,IAAA,OAAO,EAAEC,+BAAU;AACnB,IAAA,OAAO,EAAEC,gCAAW;AACpB,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,IAAI,EAAEC,yBAAO;AACb,IAAA,MAAM,EAAEC,6BAAS;AACjB,IAAA,IAAI,EAAEC,yBAAO;AACb,IAAA,GAAG,EAAEC,uBAAM;AACX,IAAA,IAAI,EAAEC,yBAAO;AACb,IAAA,EAAE,EAAEC,qBAAK;AACT,IAAA,QAAQ,EAAEC,iCAAW;AACrB,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,OAAO,EAAEC,+BAAU;AACnB,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,OAAO,EAAEC,+BAAU;;AAGrB;SACgB,mBAAmB,GAAA;AACjC,IAAAC,gCAAe,EAAE;AACjB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,8BAAc,EAAE;AAChB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,gDAAuB,EAAE;AACzB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,sCAAkB,EAAE;AACpB,IAAAC,kCAAgB,EAAE;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;AACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -676,6 +676,55 @@ declare const CYBER_FX: EffectDefinition[];
|
|
|
676
676
|
/** Register hud-frame, scanline-sweep, hologram and data-decode (8.4). */
|
|
677
677
|
declare function registerCyberPack(): void;
|
|
678
678
|
|
|
679
|
+
/**
|
|
680
|
+
* 8.5 — Paper & hand-drawn pack (`motionary/fx/paper`, also `motionary/components/fx-paper`):
|
|
681
|
+
*
|
|
682
|
+
* - `paper-unfold` (enter) — the element unfolds like a folded sheet of paper,
|
|
683
|
+
* top flap first, with a soft crease shadow (`folds`).
|
|
684
|
+
* - `pencil-sketch` (enter) — SVG strokes inside are sketched in with a
|
|
685
|
+
* slightly wobbly pencil, one after another (`duration`, `stagger`).
|
|
686
|
+
* - `watercolor` (enter) — the element bleeds in like wet watercolour:
|
|
687
|
+
* blurred, saturated, spreading from the middle, then dries (`duration`).
|
|
688
|
+
* - `crumple` (attention) — the element scrunches like crumpled paper and
|
|
689
|
+
* springs back flat.
|
|
690
|
+
*
|
|
691
|
+
* Reduced motion: paper-unfold / watercolor fade in, pencil-sketch shows the
|
|
692
|
+
* drawing, crumple does nothing.
|
|
693
|
+
*/
|
|
694
|
+
|
|
695
|
+
/** A deterministic PRNG in [0, 1) from a seed (8.5). */
|
|
696
|
+
declare function paperRandom(seed: number): () => number;
|
|
697
|
+
/** A hand-drawn SVG path from (x1,y1) to (x2,y2): a slightly bowed, wobbly line (8.5). */
|
|
698
|
+
declare function roughLine(x1: number, y1: number, x2: number, y2: number, seed?: number, amp?: number): string;
|
|
699
|
+
declare const PAPER_FX: EffectDefinition[];
|
|
700
|
+
/** Register paper-unfold, pencil-sketch, watercolor and crumple (8.5). */
|
|
701
|
+
declare function registerPaperPack(): void;
|
|
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
|
+
|
|
679
728
|
/**
|
|
680
729
|
* 5.5 — generative backgrounds on Canvas 2D, registered through
|
|
681
730
|
* `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
|
|
@@ -785,5 +834,5 @@ declare const EFFECT_PACKS: Record<string, EffectDefinition[]>;
|
|
|
785
834
|
/** Register every 6.x effect pack (idempotent). */
|
|
786
835
|
declare function registerEffectPacks(): void;
|
|
787
836
|
|
|
788
|
-
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, 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, parseFigure, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerTextPack, registerTransitionsPack, registerWeatherPack, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule };
|
|
837
|
+
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, SURFACE_FX, SURFACE_THEMES, TEXT3_FX, TRANSITIONS2_FX, VerletWorld, WEATHER_FX, WGSL_HEAD, applySurfaceTheme, 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, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack, roughLine, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule };
|
|
789
838
|
export type { EffectPackManifest, ShaderSpec };
|
package/dist/components/fx2.d.ts
CHANGED
|
@@ -676,6 +676,55 @@ declare const CYBER_FX: EffectDefinition[];
|
|
|
676
676
|
/** Register hud-frame, scanline-sweep, hologram and data-decode (8.4). */
|
|
677
677
|
declare function registerCyberPack(): void;
|
|
678
678
|
|
|
679
|
+
/**
|
|
680
|
+
* 8.5 — Paper & hand-drawn pack (`motionary/fx/paper`, also `motionary/components/fx-paper`):
|
|
681
|
+
*
|
|
682
|
+
* - `paper-unfold` (enter) — the element unfolds like a folded sheet of paper,
|
|
683
|
+
* top flap first, with a soft crease shadow (`folds`).
|
|
684
|
+
* - `pencil-sketch` (enter) — SVG strokes inside are sketched in with a
|
|
685
|
+
* slightly wobbly pencil, one after another (`duration`, `stagger`).
|
|
686
|
+
* - `watercolor` (enter) — the element bleeds in like wet watercolour:
|
|
687
|
+
* blurred, saturated, spreading from the middle, then dries (`duration`).
|
|
688
|
+
* - `crumple` (attention) — the element scrunches like crumpled paper and
|
|
689
|
+
* springs back flat.
|
|
690
|
+
*
|
|
691
|
+
* Reduced motion: paper-unfold / watercolor fade in, pencil-sketch shows the
|
|
692
|
+
* drawing, crumple does nothing.
|
|
693
|
+
*/
|
|
694
|
+
|
|
695
|
+
/** A deterministic PRNG in [0, 1) from a seed (8.5). */
|
|
696
|
+
declare function paperRandom(seed: number): () => number;
|
|
697
|
+
/** A hand-drawn SVG path from (x1,y1) to (x2,y2): a slightly bowed, wobbly line (8.5). */
|
|
698
|
+
declare function roughLine(x1: number, y1: number, x2: number, y2: number, seed?: number, amp?: number): string;
|
|
699
|
+
declare const PAPER_FX: EffectDefinition[];
|
|
700
|
+
/** Register paper-unfold, pencil-sketch, watercolor and crumple (8.5). */
|
|
701
|
+
declare function registerPaperPack(): void;
|
|
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
|
+
|
|
679
728
|
/**
|
|
680
729
|
* 5.5 — generative backgrounds on Canvas 2D, registered through
|
|
681
730
|
* `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
|
|
@@ -785,5 +834,5 @@ declare const EFFECT_PACKS: Record<string, EffectDefinition[]>;
|
|
|
785
834
|
/** Register every 6.x effect pack (idempotent). */
|
|
786
835
|
declare function registerEffectPacks(): void;
|
|
787
836
|
|
|
788
|
-
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, 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, parseFigure, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerTextPack, registerTransitionsPack, registerWeatherPack, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule };
|
|
837
|
+
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, SURFACE_FX, SURFACE_THEMES, TEXT3_FX, TRANSITIONS2_FX, VerletWorld, WEATHER_FX, WGSL_HEAD, applySurfaceTheme, 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, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack, roughLine, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule };
|
|
789
838
|
export type { EffectPackManifest, ShaderSpec };
|
package/dist/components/fx2.js
CHANGED
|
@@ -39,6 +39,10 @@ import { ORGANIC_FX, registerOrganicPack } from './fx-organic.js';
|
|
|
39
39
|
export { blobRadius } from './fx-organic.js';
|
|
40
40
|
import { CYBER_FX, registerCyberPack } from './fx-cyber.js';
|
|
41
41
|
export { decodeFrame } from './fx-cyber.js';
|
|
42
|
+
import { PAPER_FX, registerPaperPack } from './fx-paper.js';
|
|
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';
|
|
42
46
|
import '../chunks/registry-CnO7ZVPK.js';
|
|
43
47
|
import '../chunks/base-CLuqlLfG.js';
|
|
44
48
|
import '../chunks/generative-2LhxG5BJ.js';
|
|
@@ -68,6 +72,8 @@ const EFFECT_PACKS = {
|
|
|
68
72
|
retro: RETRO_FX,
|
|
69
73
|
organic: ORGANIC_FX,
|
|
70
74
|
cyber: CYBER_FX,
|
|
75
|
+
paper: PAPER_FX,
|
|
76
|
+
surface: SURFACE_FX,
|
|
71
77
|
};
|
|
72
78
|
/** Register every 6.x effect pack (idempotent). */
|
|
73
79
|
function registerEffectPacks() {
|
|
@@ -92,7 +98,9 @@ function registerEffectPacks() {
|
|
|
92
98
|
registerRetroPack();
|
|
93
99
|
registerOrganicPack();
|
|
94
100
|
registerCyberPack();
|
|
101
|
+
registerPaperPack();
|
|
102
|
+
registerSurfacePack();
|
|
95
103
|
}
|
|
96
104
|
|
|
97
|
-
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, 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, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerTextPack, registerTransitionsPack, registerWeatherPack };
|
|
105
|
+
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, SURFACE_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, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack };
|
|
98
106
|
//# 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';\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\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};\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}\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';\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\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};\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}\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+EA;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,QAAQ;AACf,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,EAAE,EAAE,KAAK;AACT,IAAA,QAAQ,EAAE,WAAW;AACrB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