motionary 9.9.0 → 10.1.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 +41 -0
- package/README.md +45 -0
- package/bin/create-motionary-plugin.mjs +124 -0
- package/dist/chunks/{audio-C1uFaOKQ.js → audio-D95jwlOh.js} +3 -3
- package/dist/chunks/{audio-C1uFaOKQ.js.map → audio-D95jwlOh.js.map} +1 -1
- package/dist/chunks/{base-DWYNLg6P.js → base-BnRyfuyM.js} +2 -2
- package/dist/chunks/{base-DWYNLg6P.js.map → base-BnRyfuyM.js.map} +1 -1
- package/dist/chunks/{builtins-DoCY96r9.js → builtins-CqIq1zBv.js} +3 -3
- package/dist/chunks/{builtins-DoCY96r9.js.map → builtins-CqIq1zBv.js.map} +1 -1
- package/dist/chunks/{core-DoR4w-E4.js → core-DsGoL9EY.js} +2 -2
- package/dist/chunks/{core-DoR4w-E4.js.map → core-DsGoL9EY.js.map} +1 -1
- package/dist/chunks/{core-BhuojMcL.js → core-XA2yhn1b.js} +2 -2
- package/dist/chunks/{core-BhuojMcL.js.map → core-XA2yhn1b.js.map} +1 -1
- package/dist/chunks/{fx-XBDr7-dH.js → fx-CtnrFEg9.js} +2 -2
- package/dist/chunks/{fx-XBDr7-dH.js.map → fx-CtnrFEg9.js.map} +1 -1
- package/dist/chunks/{gpu-DvLHwLxy.js → gpu-CDcXiNA8.js} +2 -2
- package/dist/chunks/{gpu-DvLHwLxy.js.map → gpu-CDcXiNA8.js.map} +1 -1
- package/dist/chunks/keyframes-CyH_abhI.js +183 -0
- package/dist/chunks/keyframes-CyH_abhI.js.map +1 -0
- package/dist/chunks/keyframes-cUdsXSXQ.cjs +187 -0
- package/dist/chunks/keyframes-cUdsXSXQ.cjs.map +1 -0
- package/dist/chunks/{manifest-BDpbuI-9.js → manifest-D58HXVY-.js} +2 -2
- package/dist/chunks/{manifest-BDpbuI-9.js.map → manifest-D58HXVY-.js.map} +1 -1
- package/dist/chunks/{player-CYGvna09.js → player-48Zy_NBG.js} +4 -4
- package/dist/chunks/{player-CYGvna09.js.map → player-48Zy_NBG.js.map} +1 -1
- package/dist/chunks/registry-C0xLNq3-.cjs +81 -0
- package/dist/chunks/registry-C0xLNq3-.cjs.map +1 -0
- package/dist/chunks/{registry-BRM2BRRY.js → registry-gFJRpPES.js} +2 -2
- package/dist/chunks/{registry-BRM2BRRY.js.map → registry-gFJRpPES.js.map} +1 -1
- package/dist/chunks/registry-jF8VIA_9.js +69 -0
- package/dist/chunks/registry-jF8VIA_9.js.map +1 -0
- package/dist/chunks/{spring-CAlkc1co.js → spring-CZDNyqWp.js} +2 -2
- package/dist/chunks/{spring-CAlkc1co.js.map → spring-CZDNyqWp.js.map} +1 -1
- package/dist/chunks/tween-DDObu9iA.js +542 -0
- package/dist/chunks/tween-DDObu9iA.js.map +1 -0
- package/dist/chunks/tween-JEthWrjo.cjs +554 -0
- package/dist/chunks/tween-JEthWrjo.cjs.map +1 -0
- package/dist/chunks/{variants-BBfyVPYm.js → variants-GU3yIL4F.js} +2 -2
- package/dist/chunks/{variants-BBfyVPYm.js.map → variants-GU3yIL4F.js.map} +1 -1
- package/dist/components/a11y.js +2 -2
- package/dist/components/angular.js +8 -8
- package/dist/components/background.js +2 -2
- package/dist/components/bridge.js +1 -1
- package/dist/components/cards.js +2 -2
- package/dist/components/click.js +3 -3
- package/dist/components/core.cjs +219 -0
- package/dist/components/core.cjs.map +1 -0
- package/dist/components/core.d.cts +81 -0
- package/dist/components/core.d.ts +81 -0
- package/dist/components/core.js +214 -0
- package/dist/components/core.js.map +1 -0
- package/dist/components/depth.js +3 -3
- package/dist/components/design.js +3 -3
- package/dist/components/dsl.js +2 -2
- package/dist/components/effects.js +9 -9
- package/dist/components/engine.js +2 -2
- package/dist/components/feedback.js +1 -1
- package/dist/components/fx-3d.js +2 -2
- package/dist/components/fx-ai.js +2 -2
- package/dist/components/fx-chart.js +2 -2
- package/dist/components/fx-cinema.js +2 -2
- package/dist/components/fx-cyber.js +2 -2
- package/dist/components/fx-festival.js +2 -2
- package/dist/components/fx-focus.js +2 -2
- package/dist/components/fx-form.js +2 -2
- package/dist/components/fx-game.js +2 -2
- package/dist/components/fx-genart.js +2 -2
- package/dist/components/fx-geo.js +2 -2
- package/dist/components/fx-gesture.js +2 -2
- package/dist/components/fx-gpu.js +3 -3
- package/dist/components/fx-light.js +2 -2
- package/dist/components/fx-lottie.js +2 -2
- package/dist/components/fx-morph.js +2 -2
- package/dist/components/fx-music.js +3 -3
- package/dist/components/fx-organic.js +2 -2
- package/dist/components/fx-paper.js +2 -2
- package/dist/components/fx-perf.js +2 -2
- package/dist/components/fx-physics.js +2 -2
- package/dist/components/fx-retro.js +2 -2
- package/dist/components/fx-safe.js +2 -2
- package/dist/components/fx-shop.js +2 -2
- package/dist/components/fx-social.js +2 -2
- package/dist/components/fx-spatial.js +2 -2
- package/dist/components/fx-surface.js +2 -2
- package/dist/components/fx-text.js +2 -2
- package/dist/components/fx-transitions.js +3 -3
- package/dist/components/fx-video.js +2 -2
- package/dist/components/fx-weather.js +2 -2
- package/dist/components/fx.js +6 -6
- package/dist/components/fx2.cjs +1 -10
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +1 -6
- package/dist/components/fx2.d.ts +1 -6
- package/dist/components/fx2.js +7 -15
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/gesture.js +4 -4
- package/dist/components/interaction.js +1 -1
- package/dist/components/layout.js +1 -1
- package/dist/components/marketplace.cjs +104 -0
- package/dist/components/marketplace.cjs.map +1 -1
- package/dist/components/marketplace.d.cts +33 -2
- package/dist/components/marketplace.d.ts +33 -2
- package/dist/components/marketplace.js +105 -5
- package/dist/components/marketplace.js.map +1 -1
- package/dist/components/native.js +3 -3
- package/dist/components/packs.js +1 -1
- package/dist/components/page.js +3 -3
- package/dist/components/perf.js +2 -2
- package/dist/components/physics.js +3 -3
- package/dist/components/plugins.cjs +138 -0
- package/dist/components/plugins.cjs.map +1 -0
- package/dist/components/plugins.d.cts +120 -0
- package/dist/components/plugins.d.ts +120 -0
- package/dist/components/plugins.js +105 -0
- package/dist/components/plugins.js.map +1 -0
- package/dist/components/reveal.js +1 -1
- package/dist/components/solid.js +8 -8
- package/dist/components/svelte.js +8 -8
- package/dist/components/svg.js +1 -1
- package/dist/components/text.js +2 -2
- package/dist/components/timeline.js +3 -3
- package/dist/components/transitions.js +1 -1
- package/dist/components/ui.js +4 -4
- package/dist/components/vue.js +8 -8
- package/dist/components/webgl.js +1 -1
- package/dist/components/widgets.cjs +420 -199
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +42 -2
- package/dist/components/widgets.d.ts +42 -2
- package/dist/components/widgets.js +428 -209
- package/dist/components/widgets.js.map +1 -1
- package/dist/components.js +10 -10
- package/dist/index.js +2 -2
- package/dist/llms-full.txt +3018 -0
- package/dist/llms.txt +207 -0
- package/dist/manifest.json +7562 -0
- package/dist/manifest.schema.json +85 -0
- package/dist/runtime/format-css.cjs +184 -0
- package/dist/runtime/format-css.cjs.map +1 -0
- package/dist/runtime/format-css.d.cts +174 -0
- package/dist/runtime/format-css.d.ts +174 -0
- package/dist/runtime/format-css.iife.js +2 -0
- package/dist/runtime/format-css.iife.js.map +1 -0
- package/dist/runtime/format-css.js +176 -0
- package/dist/runtime/format-css.js.map +1 -0
- package/dist/runtime/format-motion.cjs +138 -0
- package/dist/runtime/format-motion.cjs.map +1 -0
- package/dist/runtime/format-motion.d.cts +208 -0
- package/dist/runtime/format-motion.d.ts +208 -0
- package/dist/runtime/format-motion.iife.js +2 -0
- package/dist/runtime/format-motion.iife.js.map +1 -0
- package/dist/runtime/format-motion.js +132 -0
- package/dist/runtime/format-motion.js.map +1 -0
- package/dist/runtime.cjs +78 -0
- package/dist/runtime.cjs.map +1 -0
- package/dist/runtime.d.cts +236 -0
- package/dist/runtime.d.ts +236 -0
- package/dist/runtime.iife.js +2 -0
- package/dist/runtime.iife.js.map +1 -0
- package/dist/runtime.js +54 -0
- package/dist/runtime.js.map +1 -0
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +85 -14
- package/docs/components.md +66 -0
- package/docs/core.md +47 -0
- package/docs/deprecations.md +1 -1
- package/docs/runtime/core.md +55 -0
- package/docs/runtime/format-css.md +59 -0
- package/docs/runtime/format-motion.md +56 -0
- package/docs/upgrading-10.md +1 -1
- package/package.json +88 -6
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `motionary/core` (10.0) — the zero-dependency core, under 10 KB gzip.
|
|
3
|
+
*
|
|
4
|
+
* Everything else is a plugin: `createMotion().use(retro, cinema)` with the
|
|
5
|
+
* packs from `motionary/plugins` (or your own `{ name, effects }`).
|
|
6
|
+
*
|
|
7
|
+
* - `createMotion({ reducedMotion, rate })` → an instance with `use()`,
|
|
8
|
+
* `play(el, effect, options)`, `bind(el, effect, { trigger })`,
|
|
9
|
+
* `reveal(targets, preset, { stagger, once, threshold })`, `animate()`,
|
|
10
|
+
* `pause()` / `resume()` / `setRate()` for everything it started,
|
|
11
|
+
* `effects()` and `destroy()`.
|
|
12
|
+
* - `PRESETS` — entrance keyframes (fade, fade-up/down/left/right, scale,
|
|
13
|
+
* zoom-in/out, blur-in, flip-up), registered as `enter` effects.
|
|
14
|
+
* - `preferredBackend()` — `webgpu` (default when available) → `webgl2` →
|
|
15
|
+
* `canvas`, the order GPU plugins use.
|
|
16
|
+
*
|
|
17
|
+
* Reduced motion is honoured everywhere (OS setting or `reducedMotion:
|
|
18
|
+
* 'reduce'`): entrances fade, loops / backgrounds / cursors are skipped.
|
|
19
|
+
*/
|
|
20
|
+
const VERSION = '10.0.0';
|
|
21
|
+
const T = (x, y, s = 1) => `translate(${x}px,${y}px) scale(${s})`;
|
|
22
|
+
/** Entrance keyframes (10.0). */
|
|
23
|
+
const PRESETS = {
|
|
24
|
+
fade: [{ opacity: 0 }, { opacity: 1 }],
|
|
25
|
+
'fade-up': [{ opacity: 0, transform: T(0, 24) }, { opacity: 1, transform: 'none' }],
|
|
26
|
+
'fade-down': [{ opacity: 0, transform: T(0, -24) }, { opacity: 1, transform: 'none' }],
|
|
27
|
+
'fade-left': [{ opacity: 0, transform: T(24, 0) }, { opacity: 1, transform: 'none' }],
|
|
28
|
+
'fade-right': [{ opacity: 0, transform: T(-24, 0) }, { opacity: 1, transform: 'none' }],
|
|
29
|
+
scale: [{ opacity: 0, transform: 'scale(.85)' }, { opacity: 1, transform: 'none' }],
|
|
30
|
+
'zoom-in': [{ opacity: 0, transform: 'scale(.6)' }, { opacity: 1, transform: 'none' }],
|
|
31
|
+
'zoom-out': [{ opacity: 0, transform: 'scale(1.2)' }, { opacity: 1, transform: 'none' }],
|
|
32
|
+
'blur-in': [{ opacity: 0, filter: 'blur(10px)' }, { opacity: 1, filter: 'none' }],
|
|
33
|
+
'flip-up': [{ opacity: 0, transform: 'perspective(600px) rotateX(-60deg)' }, { opacity: 1, transform: 'none' }],
|
|
34
|
+
};
|
|
35
|
+
const EASE = 'cubic-bezier(0.22, 1, 0.36, 1)';
|
|
36
|
+
const SKIP = ['loop', 'background', 'cursor'];
|
|
37
|
+
/** GPU backend order used by GPU plugins: WebGPU by default (10.0). */
|
|
38
|
+
function preferredBackend() {
|
|
39
|
+
if (typeof navigator !== 'undefined' && navigator.gpu)
|
|
40
|
+
return 'webgpu';
|
|
41
|
+
try {
|
|
42
|
+
if (typeof document !== 'undefined' && document.createElement('canvas').getContext?.('webgl2'))
|
|
43
|
+
return 'webgl2';
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
/* no GL */
|
|
47
|
+
}
|
|
48
|
+
return 'canvas';
|
|
49
|
+
}
|
|
50
|
+
const list = (t) => typeof t === 'string' ? (typeof document === 'undefined' ? [] : Array.from(document.querySelectorAll(t))) : 'length' in t && !(t instanceof Element) ? Array.from(t) : [t];
|
|
51
|
+
/** Create a Motionary core instance (10.0). */
|
|
52
|
+
function createMotion(config = {}) {
|
|
53
|
+
const reg = new Map();
|
|
54
|
+
const plugins = new Set();
|
|
55
|
+
const live = new Set();
|
|
56
|
+
const offs = new Set();
|
|
57
|
+
let paused = false;
|
|
58
|
+
let rate = config.rate && config.rate > 0 ? config.rate : 1;
|
|
59
|
+
const reduced = () => config.reducedMotion === 'reduce' || (typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches);
|
|
60
|
+
const animate = (el, kf, o) => {
|
|
61
|
+
if (typeof el.animate !== 'function')
|
|
62
|
+
return null;
|
|
63
|
+
const a = el.animate(kf, o);
|
|
64
|
+
if (!a)
|
|
65
|
+
return null;
|
|
66
|
+
live.add(a);
|
|
67
|
+
if (rate !== 1)
|
|
68
|
+
a.playbackRate = rate;
|
|
69
|
+
if (paused)
|
|
70
|
+
a.pause();
|
|
71
|
+
const done = () => live.delete(a);
|
|
72
|
+
a.finished?.then(done, done);
|
|
73
|
+
return a;
|
|
74
|
+
};
|
|
75
|
+
const ctx = (event, cleanups = []) => ({ reduced: reduced(), sensitivity: reduced() ? 'minimal' : 'full', event, animate, onCleanup: (f) => cleanups.push(f) });
|
|
76
|
+
const skip = (d) => reduced() && (d.reduced ?? (SKIP.includes(d.kind) ? 'skip' : 'run')) === 'skip';
|
|
77
|
+
const m = {
|
|
78
|
+
get paused() {
|
|
79
|
+
return paused;
|
|
80
|
+
},
|
|
81
|
+
get rate() {
|
|
82
|
+
return rate;
|
|
83
|
+
},
|
|
84
|
+
use(...ps) {
|
|
85
|
+
for (const p of ps) {
|
|
86
|
+
if (!p || plugins.has(p.name))
|
|
87
|
+
continue;
|
|
88
|
+
plugins.add(p.name);
|
|
89
|
+
for (const e of p.effects || [])
|
|
90
|
+
if (!reg.has(e.name))
|
|
91
|
+
reg.set(e.name, e);
|
|
92
|
+
p.install?.(m);
|
|
93
|
+
}
|
|
94
|
+
return m;
|
|
95
|
+
},
|
|
96
|
+
has: (n) => reg.has(n),
|
|
97
|
+
effects: () => Array.from(reg.keys()).sort(),
|
|
98
|
+
reduced,
|
|
99
|
+
animate,
|
|
100
|
+
async play(el, name, options = {}, event) {
|
|
101
|
+
const d = reg.get(name);
|
|
102
|
+
if (!d)
|
|
103
|
+
throw new Error(`[motionary] unknown effect "${name}" — add its plugin with use()`);
|
|
104
|
+
if (skip(d))
|
|
105
|
+
return;
|
|
106
|
+
const out = d.run(el, { ...(d.defaults || {}), ...options }, ctx(event));
|
|
107
|
+
if (out?.finished?.then)
|
|
108
|
+
await out.finished.catch(() => undefined);
|
|
109
|
+
else if (out?.then)
|
|
110
|
+
await out;
|
|
111
|
+
},
|
|
112
|
+
bind(el, name, options = {}) {
|
|
113
|
+
const { trigger = 'click', once, ...o } = options;
|
|
114
|
+
const d = reg.get(name);
|
|
115
|
+
if (!d)
|
|
116
|
+
throw new Error(`[motionary] unknown effect "${name}"`);
|
|
117
|
+
const stops = [];
|
|
118
|
+
let current = [];
|
|
119
|
+
const fire = (e) => {
|
|
120
|
+
if (skip(d))
|
|
121
|
+
return;
|
|
122
|
+
current.splice(0).forEach((f) => f());
|
|
123
|
+
const out = d.run(el, { ...(d.defaults || {}), ...o }, ctx(e, current));
|
|
124
|
+
if (typeof out === 'function')
|
|
125
|
+
current.push(out);
|
|
126
|
+
};
|
|
127
|
+
const on = (type) => {
|
|
128
|
+
const h = (e) => fire(e);
|
|
129
|
+
el.addEventListener(type, h, { once: !!once });
|
|
130
|
+
stops.push(() => el.removeEventListener(type, h));
|
|
131
|
+
};
|
|
132
|
+
if (trigger === 'click')
|
|
133
|
+
on('click');
|
|
134
|
+
else if (trigger === 'hover')
|
|
135
|
+
(on('pointerenter'), on('focusin'));
|
|
136
|
+
else if (trigger === 'load' || trigger === 'loop')
|
|
137
|
+
fire();
|
|
138
|
+
else if (trigger === 'enter' && typeof IntersectionObserver !== 'undefined') {
|
|
139
|
+
const io = new IntersectionObserver((es) => es.forEach((en) => {
|
|
140
|
+
if (!en.isIntersecting)
|
|
141
|
+
return;
|
|
142
|
+
fire();
|
|
143
|
+
if (once !== false)
|
|
144
|
+
io.disconnect();
|
|
145
|
+
}));
|
|
146
|
+
io.observe(el);
|
|
147
|
+
stops.push(() => io.disconnect());
|
|
148
|
+
}
|
|
149
|
+
const off = () => {
|
|
150
|
+
stops.splice(0).forEach((f) => f());
|
|
151
|
+
current.splice(0).forEach((f) => f());
|
|
152
|
+
offs.delete(off);
|
|
153
|
+
};
|
|
154
|
+
offs.add(off);
|
|
155
|
+
return off;
|
|
156
|
+
},
|
|
157
|
+
reveal(targets, preset = 'fade-up', o = {}) {
|
|
158
|
+
const els = list(targets);
|
|
159
|
+
const kf = PRESETS[preset] || PRESETS.fade;
|
|
160
|
+
const show = (el, i) => {
|
|
161
|
+
el.style.removeProperty('opacity');
|
|
162
|
+
animate(el, reduced() ? PRESETS.fade : kf, { duration: o.duration ?? 600, delay: (o.delay ?? 0) + (o.stagger ?? 0) * i, easing: o.easing || EASE, fill: 'backwards' });
|
|
163
|
+
};
|
|
164
|
+
if (typeof IntersectionObserver === 'undefined') {
|
|
165
|
+
els.forEach(show);
|
|
166
|
+
return () => undefined;
|
|
167
|
+
}
|
|
168
|
+
els.forEach((el) => (el.style.opacity = '0'));
|
|
169
|
+
let batch = 0;
|
|
170
|
+
const io = new IntersectionObserver((es) => {
|
|
171
|
+
batch = 0;
|
|
172
|
+
for (const en of es) {
|
|
173
|
+
if (!en.isIntersecting)
|
|
174
|
+
continue;
|
|
175
|
+
show(en.target, batch++);
|
|
176
|
+
if (o.once !== false)
|
|
177
|
+
io.unobserve(en.target);
|
|
178
|
+
}
|
|
179
|
+
}, { threshold: o.threshold ?? 0.15 });
|
|
180
|
+
els.forEach((el) => io.observe(el));
|
|
181
|
+
const off = () => {
|
|
182
|
+
io.disconnect();
|
|
183
|
+
els.forEach((el) => el.style.removeProperty('opacity'));
|
|
184
|
+
offs.delete(off);
|
|
185
|
+
};
|
|
186
|
+
offs.add(off);
|
|
187
|
+
return off;
|
|
188
|
+
},
|
|
189
|
+
pause() {
|
|
190
|
+
paused = true;
|
|
191
|
+
live.forEach((a) => a.pause());
|
|
192
|
+
},
|
|
193
|
+
resume() {
|
|
194
|
+
paused = false;
|
|
195
|
+
live.forEach((a) => a.play());
|
|
196
|
+
},
|
|
197
|
+
setRate(r) {
|
|
198
|
+
if (!(r > 0))
|
|
199
|
+
return;
|
|
200
|
+
rate = r;
|
|
201
|
+
live.forEach((a) => (a.playbackRate = r));
|
|
202
|
+
},
|
|
203
|
+
destroy() {
|
|
204
|
+
Array.from(offs).forEach((f) => f());
|
|
205
|
+
live.forEach((a) => a.cancel());
|
|
206
|
+
live.clear();
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
m.use({ name: 'core/presets', effects: Object.entries(PRESETS).map(([name, frames]) => ({ name, kind: 'enter', defaults: { duration: 600, delay: 0, easing: EASE }, run: (el, o, c) => c.animate(el, c.reduced ? PRESETS.fade : frames, { duration: o.duration, delay: o.delay, easing: o.easing, fill: 'backwards' }) })) });
|
|
210
|
+
return m;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export { PRESETS, VERSION, createMotion, preferredBackend };
|
|
214
|
+
//# sourceMappingURL=core.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sources":["../../src/components/core/index.ts"],"sourcesContent":["/**\n * `motionary/core` (10.0) — the zero-dependency core, under 10 KB gzip.\n *\n * Everything else is a plugin: `createMotion().use(retro, cinema)` with the\n * packs from `motionary/plugins` (or your own `{ name, effects }`).\n *\n * - `createMotion({ reducedMotion, rate })` → an instance with `use()`,\n * `play(el, effect, options)`, `bind(el, effect, { trigger })`,\n * `reveal(targets, preset, { stagger, once, threshold })`, `animate()`,\n * `pause()` / `resume()` / `setRate()` for everything it started,\n * `effects()` and `destroy()`.\n * - `PRESETS` — entrance keyframes (fade, fade-up/down/left/right, scale,\n * zoom-in/out, blur-in, flip-up), registered as `enter` effects.\n * - `preferredBackend()` — `webgpu` (default when available) → `webgl2` →\n * `canvas`, the order GPU plugins use.\n *\n * Reduced motion is honoured everywhere (OS setting or `reducedMotion:\n * 'reduce'`): entrances fade, loops / backgrounds / cursors are skipped.\n */\nexport const VERSION = '10.0.0';\n\nexport type CoreEffectKind = 'enter' | 'exit' | 'attention' | 'hover' | 'click' | 'loop' | 'background' | 'cursor' | 'text' | 'scroll' | (string & {});\nexport interface CoreEffectContext {\n reduced: boolean;\n sensitivity: 'full' | 'gentle' | 'minimal' | 'static';\n event?: Event;\n animate(el: Element, keyframes: Keyframe[] | PropertyIndexedKeyframes, options?: number | KeyframeAnimationOptions): Animation | null;\n onCleanup(fn: () => void): void;\n}\nexport interface CoreEffect {\n name: string;\n kind: CoreEffectKind;\n description?: string;\n defaults?: Record<string, unknown>;\n reduced?: 'skip' | 'run';\n run(el: HTMLElement, options: any, ctx: CoreEffectContext): unknown;\n}\nexport interface CorePlugin {\n name: string;\n effects?: CoreEffect[];\n install?(m: MotionInstance): void;\n}\nexport type Trigger = 'click' | 'hover' | 'enter' | 'load' | 'loop' | 'manual';\nexport interface RevealOptions {\n stagger?: number;\n delay?: number;\n duration?: number;\n easing?: string;\n once?: boolean;\n threshold?: number;\n}\nexport interface MotionInstance {\n readonly paused: boolean;\n readonly rate: number;\n use(...plugins: CorePlugin[]): MotionInstance;\n has(effect: string): boolean;\n effects(): string[];\n reduced(): boolean;\n animate(el: Element, keyframes: Keyframe[] | PropertyIndexedKeyframes, options?: number | KeyframeAnimationOptions): Animation | null;\n play(el: HTMLElement, effect: string, options?: Record<string, unknown>, event?: Event): Promise<void>;\n bind(el: HTMLElement, effect: string, options?: Record<string, unknown> & { trigger?: Trigger; once?: boolean }): () => void;\n reveal(targets: string | Element | ArrayLike<Element>, preset?: string, options?: RevealOptions): () => void;\n pause(): void;\n resume(): void;\n setRate(rate: number): void;\n destroy(): void;\n}\n\nconst T = (x: number, y: number, s = 1) => `translate(${x}px,${y}px) scale(${s})`;\n/** Entrance keyframes (10.0). */\nexport const PRESETS: Record<string, Keyframe[]> = {\n fade: [{ opacity: 0 }, { opacity: 1 }],\n 'fade-up': [{ opacity: 0, transform: T(0, 24) }, { opacity: 1, transform: 'none' }],\n 'fade-down': [{ opacity: 0, transform: T(0, -24) }, { opacity: 1, transform: 'none' }],\n 'fade-left': [{ opacity: 0, transform: T(24, 0) }, { opacity: 1, transform: 'none' }],\n 'fade-right': [{ opacity: 0, transform: T(-24, 0) }, { opacity: 1, transform: 'none' }],\n scale: [{ opacity: 0, transform: 'scale(.85)' }, { opacity: 1, transform: 'none' }],\n 'zoom-in': [{ opacity: 0, transform: 'scale(.6)' }, { opacity: 1, transform: 'none' }],\n 'zoom-out': [{ opacity: 0, transform: 'scale(1.2)' }, { opacity: 1, transform: 'none' }],\n 'blur-in': [{ opacity: 0, filter: 'blur(10px)' }, { opacity: 1, filter: 'none' }],\n 'flip-up': [{ opacity: 0, transform: 'perspective(600px) rotateX(-60deg)' }, { opacity: 1, transform: 'none' }],\n};\nconst EASE = 'cubic-bezier(0.22, 1, 0.36, 1)';\nconst SKIP: string[] = ['loop', 'background', 'cursor'];\n\n/** GPU backend order used by GPU plugins: WebGPU by default (10.0). */\nexport function preferredBackend(): 'webgpu' | 'webgl2' | 'canvas' {\n if (typeof navigator !== 'undefined' && (navigator as any).gpu) return 'webgpu';\n try {\n if (typeof document !== 'undefined' && document.createElement('canvas').getContext?.('webgl2')) return 'webgl2';\n } catch {\n /* no GL */\n }\n return 'canvas';\n}\n\nconst list = (t: string | Element | ArrayLike<Element>): HTMLElement[] =>\n typeof t === 'string' ? (typeof document === 'undefined' ? [] : Array.from(document.querySelectorAll<HTMLElement>(t))) : 'length' in (t as ArrayLike<Element>) && !(t instanceof Element) ? (Array.from(t as ArrayLike<Element>) as HTMLElement[]) : [t as HTMLElement];\n\n/** Create a Motionary core instance (10.0). */\nexport function createMotion(config: { reducedMotion?: 'user' | 'reduce'; rate?: number } = {}): MotionInstance {\n const reg = new Map<string, CoreEffect>();\n const plugins = new Set<string>();\n const live = new Set<Animation>();\n const offs = new Set<() => void>();\n let paused = false;\n let rate = config.rate && config.rate > 0 ? config.rate : 1;\n const reduced = () => config.reducedMotion === 'reduce' || (typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches);\n const animate: MotionInstance['animate'] = (el, kf, o) => {\n if (typeof (el as any).animate !== 'function') return null;\n const a = el.animate(kf, o);\n if (!a) return null;\n live.add(a);\n if (rate !== 1) a.playbackRate = rate;\n if (paused) a.pause();\n const done = () => live.delete(a);\n a.finished?.then(done, done);\n return a;\n };\n const ctx = (event?: Event, cleanups: (() => void)[] = []): CoreEffectContext => ({ reduced: reduced(), sensitivity: reduced() ? 'minimal' : 'full', event, animate, onCleanup: (f) => cleanups.push(f) });\n const skip = (d: CoreEffect) => reduced() && (d.reduced ?? (SKIP.includes(d.kind) ? 'skip' : 'run')) === 'skip';\n const m: MotionInstance = {\n get paused() {\n return paused;\n },\n get rate() {\n return rate;\n },\n use(...ps) {\n for (const p of ps) {\n if (!p || plugins.has(p.name)) continue;\n plugins.add(p.name);\n for (const e of p.effects || []) if (!reg.has(e.name)) reg.set(e.name, e);\n p.install?.(m);\n }\n return m;\n },\n has: (n) => reg.has(n),\n effects: () => Array.from(reg.keys()).sort(),\n reduced,\n animate,\n async play(el, name, options = {}, event) {\n const d = reg.get(name);\n if (!d) throw new Error(`[motionary] unknown effect \"${name}\" — add its plugin with use()`);\n if (skip(d)) return;\n const out = d.run(el, { ...(d.defaults || {}), ...options }, ctx(event)) as any;\n if (out?.finished?.then) await out.finished.catch(() => undefined);\n else if (out?.then) await out;\n },\n bind(el, name, options = {}) {\n const { trigger = 'click', once, ...o } = options;\n const d = reg.get(name);\n if (!d) throw new Error(`[motionary] unknown effect \"${name}\"`);\n const stops: (() => void)[] = [];\n let current: (() => void)[] = [];\n const fire = (e?: Event) => {\n if (skip(d)) return;\n current.splice(0).forEach((f) => f());\n const out = d.run(el, { ...(d.defaults || {}), ...o }, ctx(e, current));\n if (typeof out === 'function') current.push(out as () => void);\n };\n const on = (type: string) => {\n const h = (e: Event) => fire(e);\n el.addEventListener(type, h, { once: !!once });\n stops.push(() => el.removeEventListener(type, h));\n };\n if (trigger === 'click') on('click');\n else if (trigger === 'hover') (on('pointerenter'), on('focusin'));\n else if (trigger === 'load' || trigger === 'loop') fire();\n else if (trigger === 'enter' && typeof IntersectionObserver !== 'undefined') {\n const io = new IntersectionObserver((es) =>\n es.forEach((en) => {\n if (!en.isIntersecting) return;\n fire();\n if (once !== false) io.disconnect();\n })\n );\n io.observe(el);\n stops.push(() => io.disconnect());\n }\n const off = () => {\n stops.splice(0).forEach((f) => f());\n current.splice(0).forEach((f) => f());\n offs.delete(off);\n };\n offs.add(off);\n return off;\n },\n reveal(targets, preset = 'fade-up', o = {}) {\n const els = list(targets);\n const kf = PRESETS[preset] || PRESETS.fade;\n const show = (el: HTMLElement, i: number) => {\n el.style.removeProperty('opacity');\n animate(el, reduced() ? PRESETS.fade : kf, { duration: o.duration ?? 600, delay: (o.delay ?? 0) + (o.stagger ?? 0) * i, easing: o.easing || EASE, fill: 'backwards' });\n };\n if (typeof IntersectionObserver === 'undefined') {\n els.forEach(show);\n return () => undefined;\n }\n els.forEach((el) => (el.style.opacity = '0'));\n let batch = 0;\n const io = new IntersectionObserver(\n (es) => {\n batch = 0;\n for (const en of es) {\n if (!en.isIntersecting) continue;\n show(en.target as HTMLElement, batch++);\n if (o.once !== false) io.unobserve(en.target);\n }\n },\n { threshold: o.threshold ?? 0.15 }\n );\n els.forEach((el) => io.observe(el));\n const off = () => {\n io.disconnect();\n els.forEach((el) => el.style.removeProperty('opacity'));\n offs.delete(off);\n };\n offs.add(off);\n return off;\n },\n pause() {\n paused = true;\n live.forEach((a) => a.pause());\n },\n resume() {\n paused = false;\n live.forEach((a) => a.play());\n },\n setRate(r) {\n if (!(r > 0)) return;\n rate = r;\n live.forEach((a) => (a.playbackRate = r));\n },\n destroy() {\n Array.from(offs).forEach((f) => f());\n live.forEach((a) => a.cancel());\n live.clear();\n },\n };\n m.use({ name: 'core/presets', effects: Object.entries(PRESETS).map(([name, frames]) => ({ name, kind: 'enter', defaults: { duration: 600, delay: 0, easing: EASE }, run: (el: HTMLElement, o: any, c: CoreEffectContext) => c.animate(el, c.reduced ? PRESETS.fade : frames, { duration: o.duration, delay: o.delay, easing: o.easing, fill: 'backwards' }) })) });\n return m;\n}\n"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;AAkBG;AACI,MAAM,OAAO,GAAG;AAiDvB,MAAM,CAAC,GAAG,CAAC,CAAS,EAAE,CAAS,EAAE,CAAC,GAAG,CAAC,KAAK,aAAa,CAAC,CAAA,GAAA,EAAM,CAAC,CAAA,UAAA,EAAa,CAAC,GAAG;AACjF;AACO,MAAM,OAAO,GAA+B;AACjD,IAAA,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IACtC,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IACnF,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IACtF,WAAW,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;IACrF,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,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AAe,EAAE,CAAM,EAAE,CAAoB,KAAK,CAAC,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,GAAG,OAAO,CAAC,IAAI,GAAG,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AAClW,IAAA,OAAO,CAAC;AACV;;;;"}
|
package/dist/components/depth.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as defineElement, k as clamp, r as raf, l as caf } from '../chunks/base-
|
|
2
|
-
import { c as createSpring } from '../chunks/spring-
|
|
3
|
-
import { g as gesture } from '../chunks/core-
|
|
1
|
+
import { u as defineElement, k as clamp, r as raf, l as caf } from '../chunks/base-BnRyfuyM.js';
|
|
2
|
+
import { c as createSpring } from '../chunks/spring-CZDNyqWp.js';
|
|
3
|
+
import { g as gesture } from '../chunks/core-XA2yhn1b.js';
|
|
4
4
|
|
|
5
5
|
var css = "usa-cube{--usa-cube-size:200px;display:block;width:var(--usa-cube-size);height:var(--usa-cube-size);perspective:var(--usa-cube-perspective,900px);touch-action:pan-y;user-select:none;-webkit-user-select:none;position:relative}usa-cube>[data-face]{position:absolute;inset:0;backface-visibility:hidden;transform:translateZ(calc(var(--usa-cube-size) / -2)) rotateX(var(--usa-cube-rx,0deg)) rotateY(var(--usa-cube-ry,0deg)) var(--usa-face) translateZ(calc(var(--usa-cube-size) / 2));transform-origin:50% 50%}usa-cube>[data-face=\"front\"]{--usa-face:rotateY(0deg)}usa-cube>[data-face=\"right\"]{--usa-face:rotateY(90deg)}usa-cube>[data-face=\"back\"]{--usa-face:rotateY(180deg)}usa-cube>[data-face=\"left\"]{--usa-face:rotateY(-90deg)}usa-cube>[data-face=\"top\"]{--usa-face:rotateX(90deg)}usa-cube>[data-face=\"bottom\"]{--usa-face:rotateX(-90deg)}usa-cube:focus-visible{outline:2px solid currentColor;outline-offset:6px}usa-depth{display:block;position:relative;perspective:1000px}usa-depth>*{transform:var(--usa-depth-rot,none);transform-style:preserve-3d}usa-depth [data-depth]{will-change:transform;transition:transform 0.12s linear}@media (prefers-reduced-motion:reduce){usa-depth [data-depth]{transform:none !important}}";
|
|
6
6
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { serializeMotion, parseMotion } from './dsl.js';
|
|
2
|
-
import { T as TIMELINE_PRESETS } from '../chunks/core-
|
|
3
|
-
import '../chunks/registry-
|
|
4
|
-
import '../chunks/base-
|
|
2
|
+
import { T as TIMELINE_PRESETS } from '../chunks/core-DsGoL9EY.js';
|
|
3
|
+
import '../chunks/registry-gFJRpPES.js';
|
|
4
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
5
5
|
import './tokens.js';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/components/dsl.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { hasEffect, bindEffect, EFFECT_TRIGGERS } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { hasEffect, bindEffect, EFFECT_TRIGGERS } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `motionary/dsl` (= `motionary/components/dsl`, 9.0) — the declarative
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { registerBuiltinEffects } from './fx.js';
|
|
2
2
|
import { P as PALETTE, o as overlay, a as all, b as origin, s as spawn, r as rand, f as fxLayer } from '../chunks/shared-CkKHWrtJ.js';
|
|
3
|
-
import { d as defineStory, a as definePlayer } from '../chunks/player-
|
|
4
|
-
export { A as ANIMATION_FORMAT, S as STORY_TEMPLATES, c as createPlayer, f as formatCount, n as normalizeAnimation, s as storyProgress } from '../chunks/player-
|
|
3
|
+
import { d as defineStory, a as definePlayer } from '../chunks/player-48Zy_NBG.js';
|
|
4
|
+
export { A as ANIMATION_FORMAT, S as STORY_TEMPLATES, c as createPlayer, f as formatCount, n as normalizeAnimation, s as storyProgress } from '../chunks/player-48Zy_NBG.js';
|
|
5
5
|
import { c as canvasBackground, h as hexRgb, G as GENERATIVE_FX } from '../chunks/generative-2LhxG5BJ.js';
|
|
6
6
|
export { n as noise2 } from '../chunks/generative-2LhxG5BJ.js';
|
|
7
|
-
import { A as AUDIO_FX, d as defineAudio } from '../chunks/audio-
|
|
8
|
-
export { b as bindBeat, c as createBeatDetector, a as disableAudio, e as enableAudio, g as getAudio, o as onBeat } from '../chunks/audio-
|
|
9
|
-
import { playEffect, bindEffect, registerEffects } from '../chunks/registry-
|
|
10
|
-
import { u as defineElement,
|
|
7
|
+
import { A as AUDIO_FX, d as defineAudio } from '../chunks/audio-D95jwlOh.js';
|
|
8
|
+
export { b as bindBeat, c as createBeatDetector, a as disableAudio, e as enableAudio, g as getAudio, o as onBeat } from '../chunks/audio-D95jwlOh.js';
|
|
9
|
+
import { playEffect, bindEffect, registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
10
|
+
import { u as defineElement, B as adoptStyles } from '../chunks/base-BnRyfuyM.js';
|
|
11
11
|
import { applyMotionTokens, motionTokensToVars, mergeMotionTokens } from './tokens.js';
|
|
12
|
-
import '../chunks/builtins-
|
|
13
|
-
import '../chunks/core-
|
|
14
|
-
import '../chunks/fx-
|
|
12
|
+
import '../chunks/builtins-CqIq1zBv.js';
|
|
13
|
+
import '../chunks/core-DsGoL9EY.js';
|
|
14
|
+
import '../chunks/fx-CtnrFEg9.js';
|
|
15
15
|
|
|
16
16
|
const CARD_FX = [
|
|
17
17
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { v as onClockChange, x as setClock, y as getClock, p as prefersReducedMotion, e as animateWithMotion } from '../chunks/base-
|
|
2
|
-
export { z as trackAnimation } from '../chunks/base-
|
|
1
|
+
import { v as onClockChange, x as setClock, y as getClock, p as prefersReducedMotion, e as animateWithMotion } from '../chunks/base-BnRyfuyM.js';
|
|
2
|
+
export { z as trackAnimation } from '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `motionary/engine` (= `motionary/components/engine`, 8.0) — the unified
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as defineElement, F as kindOf, D as EASE_OUT, k as clamp, H as FLUENT_DECELERATE, E as EASE_SPRING } from '../chunks/base-
|
|
1
|
+
import { u as defineElement, F as kindOf, D as EASE_OUT, k as clamp, H as FLUENT_DECELERATE, E as EASE_SPRING } from '../chunks/base-BnRyfuyM.js';
|
|
2
2
|
|
|
3
3
|
var css$4 = "usa-spinner{--usa-spinner-size:32px;--usa-spinner-color:currentColor;position:relative;display:inline-block;vertical-align:middle;flex:none;width:var(--usa-spinner-size);height:var(--usa-spinner-size);color:var(--usa-spinner-color)}usa-spinner i{position:absolute;display:block}usa-spinner[paused] *,usa-spinner[paused] *::after{animation-play-state:paused !important}usa-spinner svg{width:100%;height:100%;animation:usa-spin 2s linear infinite;overflow:visible}usa-spinner svg circle{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:0.5 100;stroke-dashoffset:0;animation:usa-ring-arc 1.6s ease-in-out infinite}@keyframes usa-spin{to{transform:rotate(360deg)}}@keyframes usa-ring-arc{0%{stroke-dasharray:0.5 100;stroke-dashoffset:0}50%{stroke-dasharray:62 100;stroke-dashoffset:-20}100%{stroke-dasharray:0.5 100;stroke-dashoffset:-99}}usa-spinner[data-kind=\"windows\"] i{inset:0;opacity:0;animation:usa-orbit 5.5s infinite}usa-spinner[data-kind=\"windows\"] i::after{content:\"\";position:absolute;left:50%;top:0;width:12%;height:12%;margin-left:-6%;border-radius:50%;background:currentColor}usa-spinner[data-kind=\"windows\"] i:nth-child(2){animation-delay:240ms;--n:1}usa-spinner[data-kind=\"windows\"] i:nth-child(3){animation-delay:480ms;--n:2}usa-spinner[data-kind=\"windows\"] i:nth-child(4){animation-delay:720ms;--n:3}usa-spinner[data-kind=\"windows\"] i:nth-child(5){animation-delay:960ms;--n:4}@keyframes usa-orbit{0%{transform:rotate(225deg);opacity:1;animation-timing-function:ease-out}7%{transform:rotate(345deg);animation-timing-function:linear}30%{transform:rotate(455deg);animation-timing-function:ease-in-out}39%{transform:rotate(690deg);animation-timing-function:linear}70%{transform:rotate(815deg);opacity:1;animation-timing-function:ease-out}75%{transform:rotate(945deg);animation-timing-function:ease-out}76%,100%{transform:rotate(945deg);opacity:0}}usa-spinner[data-kind=\"ring\"] i{inset:0;border-radius:50%;border:calc(var(--usa-spinner-size) / 9) solid color-mix(in srgb,currentColor 20%,transparent);border-top-color:currentColor;animation:usa-spin 0.8s linear infinite}usa-spinner[data-kind=\"dots\"]{display:inline-flex;align-items:center;justify-content:space-between;height:calc(var(--usa-spinner-size) / 2.5)}usa-spinner[data-kind=\"dots\"] i{position:static;width:22%;aspect-ratio:1;border-radius:50%;background:currentColor;animation:usa-dot 1.2s ease-in-out infinite}usa-spinner[data-kind=\"dots\"] i:nth-child(2){animation-delay:0.15s}usa-spinner[data-kind=\"dots\"] i:nth-child(3){animation-delay:0.3s}@keyframes usa-dot{0%,60%,100%{transform:translateY(0);opacity:0.35}30%{transform:translateY(-70%);opacity:1}}usa-spinner[data-kind=\"pulse\"] i{inset:0;border-radius:50%;background:currentColor;opacity:0;animation:usa-pulse 1.6s cubic-bezier(0.22,1,0.36,1) infinite}usa-spinner[data-kind=\"pulse\"] i:nth-child(2){animation-delay:0.8s}@keyframes usa-pulse{from{transform:scale(0.1);opacity:0.8}to{transform:scale(1);opacity:0}}usa-spinner[data-kind=\"bars\"]{display:inline-flex;align-items:center;justify-content:space-between}usa-spinner[data-kind=\"bars\"] i{position:static;width:16%;height:100%;border-radius:2px;background:currentColor;transform:scaleY(0.35);animation:usa-bar 1s ease-in-out infinite}usa-spinner[data-kind=\"bars\"] i:nth-child(2){animation-delay:0.12s}usa-spinner[data-kind=\"bars\"] i:nth-child(3){animation-delay:0.24s}usa-spinner[data-kind=\"bars\"] i:nth-child(4){animation-delay:0.36s}@keyframes usa-bar{0%,100%{transform:scaleY(0.35)}40%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){usa-spinner svg,usa-spinner i,usa-spinner i::after{animation:usa-calm 2.4s ease-in-out infinite !important}usa-spinner[data-kind=\"windows\"] i{transform:rotate(calc(var(--n,0) * 72deg))}usa-spinner svg circle{animation:none;stroke-dasharray:30 100}}@keyframes usa-calm{0%,100%{opacity:1}50%{opacity:0.4}}";
|
|
4
4
|
|
package/dist/components/fx-3d.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
2
|
import { a as all } from '../chunks/shared-CkKHWrtJ.js';
|
|
3
3
|
import { trackPointer } from './fx-light.js';
|
|
4
|
-
import '../chunks/base-
|
|
4
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
5
5
|
import '../chunks/generative-2LhxG5BJ.js';
|
|
6
6
|
|
|
7
7
|
const layers = (el) => {
|
package/dist/components/fx-ai.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Split text into words, keeping the whitespace after each (7.8). */
|
|
5
5
|
function splitWords(text) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
2
|
import { a as all } from '../chunks/shared-CkKHWrtJ.js';
|
|
3
|
-
import '../chunks/base-
|
|
3
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
4
4
|
|
|
5
5
|
const fade = (el, ctx) => ctx.animate(el, [{ opacity: 0 }, { opacity: 1 }], { duration: 250 });
|
|
6
6
|
const pick = (el, sel) => Array.from(el.querySelectorAll(sel));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
const CAMERA_MOVES = ['dolly-in', 'dolly-out', 'pan-left', 'pan-right', 'tilt-up', 'tilt-down', 'zoom-in', 'zoom-out', 'orbit'];
|
|
5
5
|
/** Transform of camera `move` at progress `p` (0–1, clamped), `strength` 0–2 (9.1). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
const GLYPHS = '01<>/\\[]{}#$%&*+=ABCDEFXYZ';
|
|
5
5
|
/** The `k`-th frame of decoding `text` over `n` frames: resolved prefix + random glyphs (8.4). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Evenly spread spark directions with a little jitter (8.1). */
|
|
5
5
|
function sparkVectors(n, radius, seed = 1) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
const NS = 'http://www.w3.org/2000/svg';
|
|
5
5
|
function overlay(el, z = 1) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Decaying sideways shake keyframes (7.7). */
|
|
5
5
|
function shakeFrames(distance = 8, steps = 5) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Ballistic keyframe points for a coin thrown at `deg` with `power` (7.5). */
|
|
5
5
|
function throwPath(deg, power = 120, steps = 6, g = 2.2) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
const PALETTES = {
|
|
5
5
|
sunset: ['#ff6b6b', '#feca57', '#ff9ff3', '#5f27cd', '#1dd1a1'],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Length of a polyline through `points` (7.6). */
|
|
5
5
|
function routeLength(points) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Scale factor of a two-finger pinch from start points (a1, a2) to current points (b1, b2) (8.7). */
|
|
5
5
|
function pinchScale(a1, a2, b1, b2) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import '../chunks/registry-
|
|
1
|
+
import '../chunks/registry-gFJRpPES.js';
|
|
2
2
|
import '../chunks/generative-2LhxG5BJ.js';
|
|
3
3
|
import '../chunks/shared-CkKHWrtJ.js';
|
|
4
|
-
export { G as GPU_FX, r as registerGpuPack } from '../chunks/gpu-
|
|
5
|
-
import '../chunks/base-
|
|
4
|
+
export { G as GPU_FX, r as registerGpuPack } from '../chunks/gpu-CDcXiNA8.js';
|
|
5
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
6
6
|
//# sourceMappingURL=fx-gpu.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
2
|
import { c as canvasBackground, h as hexRgb } from '../chunks/generative-2LhxG5BJ.js';
|
|
3
3
|
import { o as overlay } from '../chunks/shared-CkKHWrtJ.js';
|
|
4
|
-
import '../chunks/base-
|
|
4
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
5
5
|
|
|
6
6
|
/** Track the pointer over `el` as 0–1 coordinates (`fn(x, y, inside)`); starts at (`x0`, `y0`). Returns a remover. */
|
|
7
7
|
function trackPointer(el, ctx, fn, x0 = 0.3, y0 = 0.25) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
const arr = (v) => (Array.isArray(v) ? v.map(Number) : [Number(v)]);
|
|
5
5
|
/** Frames (t) → values for one transform property (static props give one key at t = ip) (9.2). */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
2
|
import { a as all } from '../chunks/shared-CkKHWrtJ.js';
|
|
3
|
-
import '../chunks/base-
|
|
3
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
4
4
|
|
|
5
5
|
const NS = 'http://www.w3.org/2000/svg';
|
|
6
6
|
const raf = (f) => (typeof requestAnimationFrame === 'function' ? requestAnimationFrame(f) : 0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
2
|
import { c as canvasBackground } from '../chunks/generative-2LhxG5BJ.js';
|
|
3
|
-
import { g as getAudio } from '../chunks/audio-
|
|
4
|
-
import '../chunks/base-
|
|
3
|
+
import { g as getAudio } from '../chunks/audio-D95jwlOh.js';
|
|
4
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
5
5
|
import '../chunks/shared-CkKHWrtJ.js';
|
|
6
6
|
|
|
7
7
|
/** A smooth, deterministic fake analyser frame at time `t` (s). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** A blob border-radius ("63% 37% 54% 46% / 55% 48% 52% 45%") from a seed (8.3). */
|
|
5
5
|
function blobRadius(seed) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** A deterministic PRNG in [0, 1) from a seed (8.5). */
|
|
5
5
|
function paperRandom(seed) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import { o as onFrame } from '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import { o as onFrame } from '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Run a pure function in a Web Worker; resolves with its (structured-cloneable) result (9.6). */
|
|
5
5
|
function runInWorker(fn, ...args) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
2
|
import { c as canvasBackground } from '../chunks/generative-2LhxG5BJ.js';
|
|
3
|
-
import '../chunks/base-
|
|
3
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
4
4
|
import '../chunks/shared-CkKHWrtJ.js';
|
|
5
5
|
|
|
6
6
|
/** A minimal Verlet world: points, distance sticks, gravity, damping. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Keyframes stepping a CSS blur/contrast "pixel" filter from coarse to sharp (8.2). */
|
|
5
5
|
function pixelSteps(steps = 6) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import { g as configureComponents, x as setClock } from '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import { g as configureComponents, x as setClock } from '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
const MOVE = /^(transform|translate|scale|rotate|offset|offsetPath|offsetDistance|clipPath|top|left|right|bottom|margin.*|perspective)$/;
|
|
5
5
|
/** Keyframes with all movement removed (opacity / colour / shadow kept; blur removed from filters) (9.5). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Quadratic-bezier arc points from a to b, lifted by `lift` px (7.3). */
|
|
5
5
|
function arcPath(ax, ay, bx, by, lift = 120, steps = 8) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Fan-out angles (deg) for `n` floating emoji, centred on straight up (7.4). */
|
|
5
5
|
function fanAngles(n, spread = 60) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** Horizontal background offset (px) of a 360° panorama `width` px wide for a `yaw` in degrees (wraps) (8.8). */
|
|
5
5
|
function yawToOffset(yaw, width) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { registerEffects } from '../chunks/registry-
|
|
2
|
-
import '../chunks/base-
|
|
1
|
+
import { registerEffects } from '../chunks/registry-gFJRpPES.js';
|
|
2
|
+
import '../chunks/base-BnRyfuyM.js';
|
|
3
3
|
|
|
4
4
|
/** The built-in surface themes of the 8.6 theme system. */
|
|
5
5
|
const SURFACE_THEMES = ['light', 'dark', 'neon', 'glass', 'neu'];
|