use-scroll-animate 6.1.1 → 6.2.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.
Files changed (104) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/chunks/{base-Yno7N2eC.js → base-C_3cAoRz.js} +2 -2
  3. package/dist/chunks/{base-Yno7N2eC.js.map → base-C_3cAoRz.js.map} +1 -1
  4. package/dist/chunks/{core-CUGCsMsJ.js → core-VEBw36QK.js} +2 -2
  5. package/dist/chunks/{core-CUGCsMsJ.js.map → core-VEBw36QK.js.map} +1 -1
  6. package/dist/chunks/{core-BIOaYdgN.js → core-ps8uvYuN.js} +2 -2
  7. package/dist/chunks/{core-BIOaYdgN.js.map → core-ps8uvYuN.js.map} +1 -1
  8. package/dist/chunks/{fx-BqDeFywO.js → fx-Bs6IrV4Q.js} +2 -2
  9. package/dist/chunks/{fx-BqDeFywO.js.map → fx-Bs6IrV4Q.js.map} +1 -1
  10. package/dist/chunks/generative-D2YyhaeO.js +336 -0
  11. package/dist/chunks/generative-D2YyhaeO.js.map +1 -0
  12. package/dist/chunks/generative-DzIZq-_g.cjs +348 -0
  13. package/dist/chunks/generative-DzIZq-_g.cjs.map +1 -0
  14. package/dist/chunks/gpu-Bu7qwugO.js +380 -0
  15. package/dist/chunks/gpu-Bu7qwugO.js.map +1 -0
  16. package/dist/chunks/gpu-CenK2l6b.cjs +387 -0
  17. package/dist/chunks/gpu-CenK2l6b.cjs.map +1 -0
  18. package/dist/chunks/registry-CKNLQpwd.js +121 -0
  19. package/dist/chunks/registry-CKNLQpwd.js.map +1 -0
  20. package/dist/chunks/registry-DehBVRDV.cjs +131 -0
  21. package/dist/chunks/registry-DehBVRDV.cjs.map +1 -0
  22. package/dist/chunks/{spring-DfQO5USi.js → spring-CbvHfVtP.js} +2 -2
  23. package/dist/chunks/{spring-DfQO5USi.js.map → spring-CbvHfVtP.js.map} +1 -1
  24. package/dist/chunks/{variants-VNscPeTD.js → variants-DRlKVHvu.js} +2 -2
  25. package/dist/chunks/{variants-VNscPeTD.js.map → variants-DRlKVHvu.js.map} +1 -1
  26. package/dist/components/a11y.js +2 -2
  27. package/dist/components/angular.cjs +1 -0
  28. package/dist/components/angular.cjs.map +1 -1
  29. package/dist/components/angular.js +7 -6
  30. package/dist/components/angular.js.map +1 -1
  31. package/dist/components/background.js +2 -2
  32. package/dist/components/bridge.js +1 -1
  33. package/dist/components/cards.js +2 -2
  34. package/dist/components/click.js +3 -3
  35. package/dist/components/depth.js +3 -3
  36. package/dist/components/effects.cjs +71 -403
  37. package/dist/components/effects.cjs.map +1 -1
  38. package/dist/components/effects.js +8 -339
  39. package/dist/components/effects.js.map +1 -1
  40. package/dist/components/feedback.js +1 -1
  41. package/dist/components/fx-gpu.cjs +12 -0
  42. package/dist/components/fx-gpu.cjs.map +1 -0
  43. package/dist/components/fx-gpu.d.cts +63 -0
  44. package/dist/components/fx-gpu.d.ts +63 -0
  45. package/dist/components/fx-gpu.js +5 -0
  46. package/dist/components/fx-gpu.js.map +1 -0
  47. package/dist/components/fx.cjs +13 -133
  48. package/dist/components/fx.cjs.map +1 -1
  49. package/dist/components/fx.js +6 -125
  50. package/dist/components/fx.js.map +1 -1
  51. package/dist/components/fx2.cjs +25 -0
  52. package/dist/components/fx2.cjs.map +1 -0
  53. package/dist/components/fx2.d.cts +136 -0
  54. package/dist/components/fx2.d.ts +136 -0
  55. package/dist/components/fx2.js +17 -0
  56. package/dist/components/fx2.js.map +1 -0
  57. package/dist/components/gesture.js +4 -4
  58. package/dist/components/interaction.js +1 -1
  59. package/dist/components/layout.js +1 -1
  60. package/dist/components/lite.cjs +5 -9
  61. package/dist/components/lite.cjs.map +1 -1
  62. package/dist/components/lite.js +5 -9
  63. package/dist/components/lite.js.map +1 -1
  64. package/dist/components/packs.js +1 -1
  65. package/dist/components/page.js +3 -3
  66. package/dist/components/perf.js +2 -2
  67. package/dist/components/physics.js +3 -3
  68. package/dist/components/reveal.js +1 -1
  69. package/dist/components/solid.cjs +1 -0
  70. package/dist/components/solid.cjs.map +1 -1
  71. package/dist/components/solid.js +7 -6
  72. package/dist/components/solid.js.map +1 -1
  73. package/dist/components/svelte.cjs +1 -0
  74. package/dist/components/svelte.cjs.map +1 -1
  75. package/dist/components/svelte.js +7 -6
  76. package/dist/components/svelte.js.map +1 -1
  77. package/dist/components/svg.js +1 -1
  78. package/dist/components/text.js +2 -2
  79. package/dist/components/timeline.js +3 -3
  80. package/dist/components/transitions.js +1 -1
  81. package/dist/components/ui.js +4 -4
  82. package/dist/components/vue.cjs +1 -0
  83. package/dist/components/vue.cjs.map +1 -1
  84. package/dist/components/vue.js +7 -6
  85. package/dist/components/vue.js.map +1 -1
  86. package/dist/components/webgl.js +1 -1
  87. package/dist/components/widgets.cjs +591 -0
  88. package/dist/components/widgets.cjs.map +1 -0
  89. package/dist/components/widgets.d.cts +110 -0
  90. package/dist/components/widgets.d.ts +110 -0
  91. package/dist/components/widgets.js +581 -0
  92. package/dist/components/widgets.js.map +1 -0
  93. package/dist/components.cjs +10 -9
  94. package/dist/components.cjs.map +1 -1
  95. package/dist/components.js +10 -9
  96. package/dist/components.js.map +1 -1
  97. package/dist/components.umd.js +2 -2
  98. package/dist/components.umd.js.map +1 -1
  99. package/dist/index.js +2 -2
  100. package/dist/widgets.umd.js +2 -0
  101. package/dist/widgets.umd.js.map +1 -0
  102. package/docs/ROADMAP.md +10 -11
  103. package/docs/components.md +29 -0
  104. package/package.json +31 -1
@@ -0,0 +1,348 @@
1
+ 'use strict';
2
+
3
+ let layer = null;
4
+ /** A fixed, pointer-transparent, aria-hidden layer for transient particles. */
5
+ function fxLayer() {
6
+ if (layer?.isConnected)
7
+ return layer;
8
+ layer = document.createElement('div');
9
+ layer.setAttribute('aria-hidden', 'true');
10
+ layer.setAttribute('data-usa-fx-layer', '');
11
+ layer.style.cssText = 'position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:2147483000;contain:strict';
12
+ document.body.appendChild(layer);
13
+ return layer;
14
+ }
15
+ /** Client point of the triggering pointer event, or the element's center. */
16
+ function origin(el, ctx) {
17
+ const e = ctx.event;
18
+ const r = el.getBoundingClientRect();
19
+ return e && typeof e.clientX === 'number' && (e.clientX || e.clientY) ? { x: e.clientX, y: e.clientY } : { x: r.left + r.width / 2, y: r.top + r.height / 2 };
20
+ }
21
+ /** Spawn an absolutely positioned node in the fx layer at (x, y); removed when its animation ends. */
22
+ function spawn(x, y, css, ctx, frames, opts, text = '') {
23
+ const n = document.createElement('span');
24
+ n.style.cssText = `position:absolute;left:${x}px;top:${y}px;${css}`;
25
+ if (text)
26
+ n.textContent = text;
27
+ fxLayer().appendChild(n);
28
+ const a = ctx.animate(n, frames, { fill: 'forwards', ...opts });
29
+ const rm = () => n.remove();
30
+ if (a)
31
+ a.finished.then(rm, rm);
32
+ else
33
+ rm();
34
+ return a;
35
+ }
36
+ /** An overlay child covering `el` (makes `el` a positioning context). Returns it and a remover. */
37
+ function overlay(el, css) {
38
+ const o = document.createElement('span');
39
+ o.setAttribute('aria-hidden', 'true');
40
+ o.style.cssText = `position:absolute;inset:0;pointer-events:none;border-radius:inherit;${css}`;
41
+ if (getComputedStyle(el).position === 'static')
42
+ el.style.position = 'relative';
43
+ el.appendChild(o);
44
+ return [o, () => o.remove()];
45
+ }
46
+ const PALETTE = ['#7c5cff', '#ff5c8a', '#22d3ee', '#facc15', '#34d399'];
47
+ const rand = (a, b) => a + Math.random() * (b - a);
48
+ /** Wait for all animations (ignoring nulls). */
49
+ const all = (anims) => Promise.all(anims.filter(Boolean).map((a) => a.finished.catch(() => undefined)));
50
+
51
+ /** Deterministic smooth pseudo-noise in [-1, 1] (sum of sines — cheap, no tables). */
52
+ function noise2(x, y, t = 0) {
53
+ return (Math.sin(x * 1.7 + t) * Math.cos(y * 1.3 - t * 0.7) + Math.sin((x + y) * 0.9 + t * 0.5) * 0.5 + Math.cos(x * 0.6 - y * 1.1 - t * 0.3) * 0.5) / 2;
54
+ }
55
+ /** Hex `#rrggbb` → [r, g, b]. */
56
+ function hexRgb(hex) {
57
+ const m = /^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(hex.trim());
58
+ return m ? [parseInt(m[1], 16), parseInt(m[2], 16), parseInt(m[3], 16)] : [124, 92, 255];
59
+ }
60
+ /**
61
+ * Mount a generative canvas behind `el` and run `spec` on it. Returns the
62
+ * cleanup. Exposed for custom generative effects.
63
+ */
64
+ function canvasBackground(el, fx, spec, o) {
65
+ const canvas = document.createElement('canvas');
66
+ canvas.setAttribute('aria-hidden', 'true');
67
+ canvas.setAttribute('data-usa-fx-canvas', '');
68
+ canvas.style.cssText = 'position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;border-radius:inherit';
69
+ const restore = [];
70
+ const set = (k, v) => {
71
+ restore.push([k, el.style[k]]);
72
+ el.style[k] = v;
73
+ };
74
+ if (getComputedStyle(el).position === 'static')
75
+ set('position', 'relative');
76
+ set('isolation', 'isolate');
77
+ el.prepend(canvas);
78
+ const ctx = canvas.getContext('2d');
79
+ let raf = 0;
80
+ let visible = true;
81
+ let quality = Math.min(1, Math.max(0.35, Number(o.quality) || 1));
82
+ let w = 0;
83
+ let h = 0;
84
+ let state = null;
85
+ const t0 = performance.now();
86
+ let last = t0;
87
+ let slow = 0;
88
+ let fast = 0;
89
+ const resize = () => {
90
+ const r = el.getBoundingClientRect();
91
+ w = Math.max(1, Math.round(r.width));
92
+ h = Math.max(1, Math.round(r.height));
93
+ const dpr = Math.min(2, (typeof devicePixelRatio === 'number' ? devicePixelRatio : 1) || 1) * quality;
94
+ canvas.width = Math.max(1, Math.round(w * dpr));
95
+ canvas.height = Math.max(1, Math.round(h * dpr));
96
+ if (ctx)
97
+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
98
+ state = spec.init ? spec.init(w, h, o) : {};
99
+ };
100
+ const frame = (now) => {
101
+ raf = 0;
102
+ if (!ctx)
103
+ return;
104
+ const dt = now - last;
105
+ last = now;
106
+ // adaptive quality: sustained slow frames lower the render scale, fast ones raise it
107
+ if (dt > 28)
108
+ slow++;
109
+ else if (dt < 18)
110
+ fast++;
111
+ if (slow > 20 && quality > 0.35) {
112
+ quality = Math.max(0.35, quality - 0.15);
113
+ slow = fast = 0;
114
+ resize();
115
+ }
116
+ else if (fast > 240 && quality < 1) {
117
+ quality = Math.min(1, quality + 0.15);
118
+ slow = fast = 0;
119
+ resize();
120
+ }
121
+ spec.draw({ ctx, w, h, t: (now - t0) / 1000, quality, state, o });
122
+ if (visible && !document.hidden)
123
+ raf = requestAnimationFrame(frame);
124
+ };
125
+ const start = () => {
126
+ if (!raf && ctx && !fx.reduced) {
127
+ last = performance.now();
128
+ raf = requestAnimationFrame(frame);
129
+ }
130
+ };
131
+ resize();
132
+ if (ctx)
133
+ spec.draw({ ctx, w, h, t: 0, quality, state, o }); // first / static frame
134
+ const io = typeof IntersectionObserver === 'function' ? new IntersectionObserver((es) => {
135
+ visible = es.some((e) => e.isIntersecting);
136
+ if (visible)
137
+ start();
138
+ }) : null;
139
+ io?.observe(el);
140
+ const ro = typeof ResizeObserver === 'function' ? new ResizeObserver(() => {
141
+ resize();
142
+ if (ctx && fx.reduced)
143
+ spec.draw({ ctx, w, h, t: 0, quality, state, o });
144
+ }) : null;
145
+ ro?.observe(el);
146
+ const vis = () => !document.hidden && visible && start();
147
+ document.addEventListener('visibilitychange', vis);
148
+ start();
149
+ return () => {
150
+ cancelAnimationFrame(raf);
151
+ raf = 0;
152
+ io?.disconnect();
153
+ ro?.disconnect();
154
+ document.removeEventListener('visibilitychange', vis);
155
+ canvas.remove();
156
+ for (const [k, v] of restore)
157
+ el.style[k] = v;
158
+ };
159
+ }
160
+ const gen = (name, description, defaults, spec) => ({
161
+ name,
162
+ kind: 'background',
163
+ description,
164
+ reduced: 'run',
165
+ defaults: { colors: PALETTE, background: '#0b0d12', speed: 1, quality: 1, ...defaults },
166
+ run: (el, o, ctx) => canvasBackground(el, ctx, spec, o),
167
+ });
168
+ /** Low-resolution scalar field → ImageData, drawn scaled up (used by voronoi / metaballs / contours). */
169
+ function field(f, cell, px) {
170
+ const step = Math.max(2, Math.round(cell / f.quality));
171
+ const cw = Math.max(1, Math.ceil(f.w / step));
172
+ const ch = Math.max(1, Math.ceil(f.h / step));
173
+ const st = f.state;
174
+ if (!st.buf || st.buf.width !== cw || st.buf.height !== ch) {
175
+ st.buf = document.createElement('canvas');
176
+ st.buf.width = cw;
177
+ st.buf.height = ch;
178
+ st.bctx = st.buf.getContext('2d');
179
+ st.img = st.bctx?.createImageData(cw, ch);
180
+ }
181
+ if (!st.bctx || !st.img)
182
+ return;
183
+ const d = st.img.data;
184
+ for (let y = 0; y < ch; y++)
185
+ for (let x = 0; x < cw; x++)
186
+ px(x * step, y * step, d, (y * cw + x) * 4);
187
+ st.bctx.putImageData(st.img, 0, 0);
188
+ f.ctx.imageSmoothingEnabled = true;
189
+ f.ctx.drawImage(st.buf, 0, 0, f.w, f.h);
190
+ }
191
+ const GENERATIVE_FX = [
192
+ gen('flow-field', 'Particles drift along a slowly changing flow field, leaving silky trails.', { count: 600, fade: 0.06 }, {
193
+ init: (w, h, o) => ({ p: Array.from({ length: o.count }, () => [Math.random() * w, Math.random() * h]) }),
194
+ draw: ({ ctx, w, h, t, state, o, quality }) => {
195
+ ctx.fillStyle = o.background;
196
+ ctx.globalAlpha = t === 0 ? 1 : o.fade;
197
+ ctx.fillRect(0, 0, w, h);
198
+ ctx.globalAlpha = 0.8;
199
+ const n = Math.round(state.p.length * quality);
200
+ const steps = t === 0 ? 40 : 1;
201
+ for (let i = 0; i < n; i++) {
202
+ const q = state.p[i];
203
+ ctx.fillStyle = o.colors[i % o.colors.length];
204
+ for (let s = 0; s < steps; s++) {
205
+ const a = noise2(q[0] * 0.004, q[1] * 0.004, t * 0.15 * o.speed) * Math.PI * 2;
206
+ q[0] += Math.cos(a) * 1.2 * o.speed;
207
+ q[1] += Math.sin(a) * 1.2 * o.speed;
208
+ if (q[0] < 0 || q[0] > w || q[1] < 0 || q[1] > h)
209
+ (q[0] = Math.random() * w), (q[1] = Math.random() * h);
210
+ ctx.fillRect(q[0], q[1], 1.4, 1.4);
211
+ }
212
+ }
213
+ ctx.globalAlpha = 1;
214
+ },
215
+ }),
216
+ gen('voronoi', 'Drifting Voronoi cells in the palette, with darker borders.', { seeds: 14, cell: 6 }, {
217
+ init: (w, h, o) => ({ s: Array.from({ length: o.seeds }, (_, i) => ({ x: Math.random() * w, y: Math.random() * h, vx: Math.random() - 0.5, vy: Math.random() - 0.5, c: hexRgb(o.colors[i % o.colors.length]) })) }),
218
+ draw: (f) => {
219
+ const { w, h, state, o } = f;
220
+ for (const s of state.s) {
221
+ s.x += s.vx * o.speed;
222
+ s.y += s.vy * o.speed;
223
+ if (s.x < 0 || s.x > w)
224
+ s.vx *= -1;
225
+ if (s.y < 0 || s.y > h)
226
+ s.vy *= -1;
227
+ }
228
+ field(f, o.cell, (x, y, d, i) => {
229
+ let b = Infinity;
230
+ let b2 = Infinity;
231
+ let c = state.s[0].c;
232
+ for (const s of state.s) {
233
+ const dd = (s.x - x) ** 2 + (s.y - y) ** 2;
234
+ if (dd < b)
235
+ (b2 = b), (b = dd), (c = s.c);
236
+ else if (dd < b2)
237
+ b2 = dd;
238
+ }
239
+ const edge = Math.sqrt(b2) - Math.sqrt(b) < 6 ? 0.55 : 1;
240
+ d[i] = c[0] * edge;
241
+ d[i + 1] = c[1] * edge;
242
+ d[i + 2] = c[2] * edge;
243
+ d[i + 3] = 255;
244
+ });
245
+ },
246
+ }),
247
+ gen('mesh-gradient', 'Soft blobs of colour orbit and blend into a living mesh gradient.', { blobs: 4, blur: 0.65 }, {
248
+ draw: ({ ctx, w, h, t, o }) => {
249
+ ctx.fillStyle = o.background;
250
+ ctx.fillRect(0, 0, w, h);
251
+ const r = Math.max(w, h) * o.blur;
252
+ for (let i = 0; i < o.blobs; i++) {
253
+ const a = t * 0.25 * o.speed + (i * Math.PI * 2) / o.blobs;
254
+ const x = w / 2 + Math.cos(a * (1 + i * 0.13)) * w * 0.32;
255
+ const y = h / 2 + Math.sin(a * (0.8 + i * 0.11)) * h * 0.32;
256
+ const [cr, cg, cb] = hexRgb(o.colors[i % o.colors.length]);
257
+ const g = ctx.createRadialGradient(x, y, 0, x, y, r);
258
+ g.addColorStop(0, `rgba(${cr},${cg},${cb},0.7)`);
259
+ g.addColorStop(1, `rgba(${cr},${cg},${cb},0)`);
260
+ ctx.fillStyle = g;
261
+ ctx.fillRect(0, 0, w, h);
262
+ }
263
+ },
264
+ }),
265
+ gen('starfield', 'Stars stream toward the viewer (warp speed with `speed: 4`).', { stars: 400, color: '#ffffff' }, {
266
+ init: (_w, _h, o) => ({ s: Array.from({ length: o.stars }, () => [Math.random() * 2 - 1, Math.random() * 2 - 1, Math.random()]) }),
267
+ draw: ({ ctx, w, h, t, state, o, quality }) => {
268
+ ctx.fillStyle = o.background;
269
+ ctx.fillRect(0, 0, w, h);
270
+ ctx.fillStyle = o.color;
271
+ const n = Math.round(state.s.length * quality);
272
+ for (let i = 0; i < n; i++) {
273
+ const s = state.s[i];
274
+ if (t > 0)
275
+ s[2] -= 0.004 * o.speed;
276
+ if (s[2] <= 0.01)
277
+ (s[0] = Math.random() * 2 - 1), (s[1] = Math.random() * 2 - 1), (s[2] = 1);
278
+ const x = w / 2 + (s[0] / s[2]) * w * 0.5;
279
+ const y = h / 2 + (s[1] / s[2]) * h * 0.5;
280
+ if (x < 0 || x > w || y < 0 || y > h)
281
+ continue;
282
+ const size = (1 - s[2]) * 2.6;
283
+ ctx.globalAlpha = Math.min(1, (1 - s[2]) * 1.6);
284
+ ctx.fillRect(x, y, size, size);
285
+ }
286
+ ctx.globalAlpha = 1;
287
+ },
288
+ }),
289
+ gen('metaballs', 'Gooey blobs that merge and split (low-resolution field, scaled up).', { balls: 6, cell: 5, threshold: 1 }, {
290
+ init: (w, h, o) => ({ b: Array.from({ length: o.balls }, () => ({ x: Math.random() * w, y: Math.random() * h, vx: (Math.random() - 0.5) * 1.6, vy: (Math.random() - 0.5) * 1.6, r: Math.min(w, h) * (0.08 + Math.random() * 0.08) })) }),
291
+ draw: (f) => {
292
+ const { w, h, state, o } = f;
293
+ for (const b of state.b) {
294
+ b.x += b.vx * o.speed;
295
+ b.y += b.vy * o.speed;
296
+ if (b.x < 0 || b.x > w)
297
+ b.vx *= -1;
298
+ if (b.y < 0 || b.y > h)
299
+ b.vy *= -1;
300
+ }
301
+ const [ar, ag, ab] = hexRgb(o.colors[0]);
302
+ const [br, bg, bb] = hexRgb(o.colors[1] || o.colors[0]);
303
+ const [kr, kg, kb] = hexRgb(o.background);
304
+ field(f, o.cell, (x, y, d, i) => {
305
+ let v = 0;
306
+ for (const b of state.b)
307
+ v += (b.r * b.r) / ((b.x - x) ** 2 + (b.y - y) ** 2 + 1);
308
+ const inside = v >= o.threshold;
309
+ const k = Math.min(1, (v - o.threshold) * 0.8);
310
+ d[i] = inside ? ar + (br - ar) * k : kr;
311
+ d[i + 1] = inside ? ag + (bg - ag) * k : kg;
312
+ d[i + 2] = inside ? ab + (bb - ab) * k : kb;
313
+ d[i + 3] = 255;
314
+ });
315
+ },
316
+ }),
317
+ gen('contours', 'Topographic contour lines over a slowly shifting height field.', { levels: 9, cell: 4, color: '#7c5cff' }, {
318
+ draw: (f) => {
319
+ const { t, o } = f;
320
+ const [lr, lg, lb] = hexRgb(o.color);
321
+ const [kr, kg, kb] = hexRgb(o.background);
322
+ const z = (x, y) => (noise2(x * 0.006, y * 0.006, t * 0.2 * o.speed) + 1) / 2;
323
+ const step = Math.max(2, Math.round(o.cell / f.quality));
324
+ field(f, o.cell, (x, y, d, i) => {
325
+ const a = Math.floor(z(x, y) * o.levels);
326
+ const line = a !== Math.floor(z(x + step, y) * o.levels) || a !== Math.floor(z(x, y + step) * o.levels);
327
+ const shade = 0.12 + (a / o.levels) * 0.18;
328
+ d[i] = line ? lr : kr + (lr - kr) * shade;
329
+ d[i + 1] = line ? lg : kg + (lg - kg) * shade;
330
+ d[i + 2] = line ? lb : kb + (lb - kb) * shade;
331
+ d[i + 3] = 255;
332
+ });
333
+ },
334
+ }),
335
+ ];
336
+
337
+ exports.GENERATIVE_FX = GENERATIVE_FX;
338
+ exports.PALETTE = PALETTE;
339
+ exports.all = all;
340
+ exports.canvasBackground = canvasBackground;
341
+ exports.fxLayer = fxLayer;
342
+ exports.hexRgb = hexRgb;
343
+ exports.noise2 = noise2;
344
+ exports.origin = origin;
345
+ exports.overlay = overlay;
346
+ exports.rand = rand;
347
+ exports.spawn = spawn;
348
+ //# sourceMappingURL=generative-DzIZq-_g.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generative-DzIZq-_g.cjs","sources":["../../src/components/effects/shared.ts","../../src/components/effects/generative.ts"],"sourcesContent":["/** Helpers shared by the 5.x effect packs. */\nimport type { EffectContext } from '../fx/registry';\n\nlet layer: HTMLElement | null = null;\n/** A fixed, pointer-transparent, aria-hidden layer for transient particles. */\nexport function fxLayer(): HTMLElement {\n if (layer?.isConnected) return layer;\n layer = document.createElement('div');\n layer.setAttribute('aria-hidden', 'true');\n layer.setAttribute('data-usa-fx-layer', '');\n layer.style.cssText = 'position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:2147483000;contain:strict';\n document.body.appendChild(layer);\n return layer;\n}\n\n/** Client point of the triggering pointer event, or the element's center. */\nexport function origin(el: Element, ctx: EffectContext): { x: number; y: number } {\n const e = ctx.event as PointerEvent | MouseEvent | undefined;\n const r = el.getBoundingClientRect();\n return e && typeof e.clientX === 'number' && (e.clientX || e.clientY) ? { x: e.clientX, y: e.clientY } : { x: r.left + r.width / 2, y: r.top + r.height / 2 };\n}\n\n/** Spawn an absolutely positioned node in the fx layer at (x, y); removed when its animation ends. */\nexport function spawn(x: number, y: number, css: string, ctx: EffectContext, frames: Keyframe[], opts: KeyframeAnimationOptions, text = ''): Animation | null {\n const n = document.createElement('span');\n n.style.cssText = `position:absolute;left:${x}px;top:${y}px;${css}`;\n if (text) n.textContent = text;\n fxLayer().appendChild(n);\n const a = ctx.animate(n, frames, { fill: 'forwards', ...opts });\n const rm = () => n.remove();\n if (a) a.finished.then(rm, rm);\n else rm();\n return a;\n}\n\n/** An overlay child covering `el` (makes `el` a positioning context). Returns it and a remover. */\nexport function overlay(el: HTMLElement, css: string): [HTMLElement, () => void] {\n const o = document.createElement('span');\n o.setAttribute('aria-hidden', 'true');\n o.style.cssText = `position:absolute;inset:0;pointer-events:none;border-radius:inherit;${css}`;\n if (getComputedStyle(el).position === 'static') el.style.position = 'relative';\n el.appendChild(o);\n return [o, () => o.remove()];\n}\n\nexport const PALETTE = ['#7c5cff', '#ff5c8a', '#22d3ee', '#facc15', '#34d399'];\nexport const rand = (a: number, b: number): number => a + Math.random() * (b - a);\n\n/** Wait for all animations (ignoring nulls). */\nexport const all = (anims: (Animation | null)[]): Promise<unknown> => Promise.all(anims.filter(Boolean).map((a) => a!.finished.catch(() => undefined)));\n","/**\n * 5.5 — generative backgrounds on Canvas 2D, registered through\n * `registerEffect()` (kind `background`): `flow-field`, `voronoi`,\n * `mesh-gradient`, `starfield`, `metaballs`, `contours`.\n *\n * Shared runner (`canvasBackground()`): a canvas behind the element's content\n * (`aria-hidden`, pointer-transparent), rendering only while visible\n * (IntersectionObserver) and the tab is shown, with adaptive quality — the\n * render scale drops when frames get slow and recovers when they are fast.\n * Reduced motion: one static frame, no loop.\n */\nimport type { EffectContext, EffectDefinition } from '../fx/registry';\nimport { PALETTE } from './shared';\n\nexport interface GenFrame {\n ctx: CanvasRenderingContext2D;\n /** CSS-pixel size of the canvas. */\n w: number;\n h: number;\n /** Seconds since start (0 for the static reduced-motion frame). */\n t: number;\n /** Render scale 0.35–1 (adaptive quality). */\n quality: number;\n /** Per-effect state, created by `init`. */\n state: any;\n /** Merged options. */\n o: any;\n}\n\nexport interface GenerativeSpec {\n init?: (w: number, h: number, o: any) => any;\n draw: (f: GenFrame) => void;\n}\n\n/** Deterministic smooth pseudo-noise in [-1, 1] (sum of sines — cheap, no tables). */\nexport function noise2(x: number, y: number, t = 0): number {\n return (Math.sin(x * 1.7 + t) * Math.cos(y * 1.3 - t * 0.7) + Math.sin((x + y) * 0.9 + t * 0.5) * 0.5 + Math.cos(x * 0.6 - y * 1.1 - t * 0.3) * 0.5) / 2;\n}\n\n/** Hex `#rrggbb` → [r, g, b]. */\nexport function hexRgb(hex: string): [number, number, number] {\n const m = /^#?([\\da-f]{2})([\\da-f]{2})([\\da-f]{2})$/i.exec(hex.trim());\n return m ? [parseInt(m[1], 16), parseInt(m[2], 16), parseInt(m[3], 16)] : [124, 92, 255];\n}\n\n/**\n * Mount a generative canvas behind `el` and run `spec` on it. Returns the\n * cleanup. Exposed for custom generative effects.\n */\nexport function canvasBackground(el: HTMLElement, fx: EffectContext, spec: GenerativeSpec, o: any): () => void {\n const canvas = document.createElement('canvas');\n canvas.setAttribute('aria-hidden', 'true');\n canvas.setAttribute('data-usa-fx-canvas', '');\n canvas.style.cssText = 'position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;border-radius:inherit';\n const restore: [string, string][] = [];\n const set = (k: 'position' | 'isolation', v: string) => {\n restore.push([k, el.style[k]]);\n el.style[k] = v;\n };\n if (getComputedStyle(el).position === 'static') set('position', 'relative');\n set('isolation', 'isolate');\n el.prepend(canvas);\n const ctx = canvas.getContext('2d');\n let raf = 0;\n let visible = true;\n let quality = Math.min(1, Math.max(0.35, Number(o.quality) || 1));\n let w = 0;\n let h = 0;\n let state: any = null;\n const t0 = performance.now();\n let last = t0;\n let slow = 0;\n let fast = 0;\n const resize = () => {\n const r = el.getBoundingClientRect();\n w = Math.max(1, Math.round(r.width));\n h = Math.max(1, Math.round(r.height));\n const dpr = Math.min(2, (typeof devicePixelRatio === 'number' ? devicePixelRatio : 1) || 1) * quality;\n canvas.width = Math.max(1, Math.round(w * dpr));\n canvas.height = Math.max(1, Math.round(h * dpr));\n if (ctx) ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n state = spec.init ? spec.init(w, h, o) : {};\n };\n const frame = (now: number) => {\n raf = 0;\n if (!ctx) return;\n const dt = now - last;\n last = now;\n // adaptive quality: sustained slow frames lower the render scale, fast ones raise it\n if (dt > 28) slow++;\n else if (dt < 18) fast++;\n if (slow > 20 && quality > 0.35) {\n quality = Math.max(0.35, quality - 0.15);\n slow = fast = 0;\n resize();\n } else if (fast > 240 && quality < 1) {\n quality = Math.min(1, quality + 0.15);\n slow = fast = 0;\n resize();\n }\n spec.draw({ ctx, w, h, t: (now - t0) / 1000, quality, state, o });\n if (visible && !document.hidden) raf = requestAnimationFrame(frame);\n };\n const start = () => {\n if (!raf && ctx && !fx.reduced) {\n last = performance.now();\n raf = requestAnimationFrame(frame);\n }\n };\n resize();\n if (ctx) spec.draw({ ctx, w, h, t: 0, quality, state, o }); // first / static frame\n const io = typeof IntersectionObserver === 'function' ? new IntersectionObserver((es) => {\n visible = es.some((e) => e.isIntersecting);\n if (visible) start();\n }) : null;\n io?.observe(el);\n const ro = typeof ResizeObserver === 'function' ? new ResizeObserver(() => {\n resize();\n if (ctx && fx.reduced) spec.draw({ ctx, w, h, t: 0, quality, state, o });\n }) : null;\n ro?.observe(el);\n const vis = () => !document.hidden && visible && start();\n document.addEventListener('visibilitychange', vis);\n start();\n return () => {\n cancelAnimationFrame(raf);\n raf = 0;\n io?.disconnect();\n ro?.disconnect();\n document.removeEventListener('visibilitychange', vis);\n canvas.remove();\n for (const [k, v] of restore) el.style[k as 'position'] = v;\n };\n}\n\nconst gen = (name: string, description: string, defaults: Record<string, unknown>, spec: GenerativeSpec): EffectDefinition => ({\n name,\n kind: 'background',\n description,\n reduced: 'run',\n defaults: { colors: PALETTE, background: '#0b0d12', speed: 1, quality: 1, ...defaults },\n run: (el, o: any, ctx) => canvasBackground(el, ctx, spec, o),\n});\n\n/** Low-resolution scalar field → ImageData, drawn scaled up (used by voronoi / metaballs / contours). */\nfunction field(f: GenFrame, cell: number, px: (x: number, y: number, out: Uint8ClampedArray, i: number) => void): void {\n const step = Math.max(2, Math.round(cell / f.quality));\n const cw = Math.max(1, Math.ceil(f.w / step));\n const ch = Math.max(1, Math.ceil(f.h / step));\n const st = f.state;\n if (!st.buf || st.buf.width !== cw || st.buf.height !== ch) {\n st.buf = document.createElement('canvas');\n st.buf.width = cw;\n st.buf.height = ch;\n st.bctx = st.buf.getContext('2d');\n st.img = st.bctx?.createImageData(cw, ch);\n }\n if (!st.bctx || !st.img) return;\n const d = st.img.data as Uint8ClampedArray;\n for (let y = 0; y < ch; y++) for (let x = 0; x < cw; x++) px(x * step, y * step, d, (y * cw + x) * 4);\n st.bctx.putImageData(st.img, 0, 0);\n f.ctx.imageSmoothingEnabled = true;\n f.ctx.drawImage(st.buf, 0, 0, f.w, f.h);\n}\n\nexport const GENERATIVE_FX: EffectDefinition[] = [\n gen('flow-field', 'Particles drift along a slowly changing flow field, leaving silky trails.', { count: 600, fade: 0.06 }, {\n init: (w, h, o) => ({ p: Array.from({ length: o.count }, () => [Math.random() * w, Math.random() * h]) }),\n draw: ({ ctx, w, h, t, state, o, quality }) => {\n ctx.fillStyle = o.background;\n ctx.globalAlpha = t === 0 ? 1 : o.fade;\n ctx.fillRect(0, 0, w, h);\n ctx.globalAlpha = 0.8;\n const n = Math.round(state.p.length * quality);\n const steps = t === 0 ? 40 : 1;\n for (let i = 0; i < n; i++) {\n const q = state.p[i];\n ctx.fillStyle = o.colors[i % o.colors.length];\n for (let s = 0; s < steps; s++) {\n const a = noise2(q[0] * 0.004, q[1] * 0.004, t * 0.15 * o.speed) * Math.PI * 2;\n q[0] += Math.cos(a) * 1.2 * o.speed;\n q[1] += Math.sin(a) * 1.2 * o.speed;\n if (q[0] < 0 || q[0] > w || q[1] < 0 || q[1] > h) (q[0] = Math.random() * w), (q[1] = Math.random() * h);\n ctx.fillRect(q[0], q[1], 1.4, 1.4);\n }\n }\n ctx.globalAlpha = 1;\n },\n }),\n gen('voronoi', 'Drifting Voronoi cells in the palette, with darker borders.', { seeds: 14, cell: 6 }, {\n init: (w, h, o) => ({ s: Array.from({ length: o.seeds }, (_, i) => ({ x: Math.random() * w, y: Math.random() * h, vx: Math.random() - 0.5, vy: Math.random() - 0.5, c: hexRgb(o.colors[i % o.colors.length]) })) }),\n draw: (f) => {\n const { w, h, state, o } = f;\n for (const s of state.s) {\n s.x += s.vx * o.speed;\n s.y += s.vy * o.speed;\n if (s.x < 0 || s.x > w) s.vx *= -1;\n if (s.y < 0 || s.y > h) s.vy *= -1;\n }\n field(f, o.cell, (x, y, d, i) => {\n let b = Infinity;\n let b2 = Infinity;\n let c = state.s[0].c;\n for (const s of state.s) {\n const dd = (s.x - x) ** 2 + (s.y - y) ** 2;\n if (dd < b) (b2 = b), (b = dd), (c = s.c);\n else if (dd < b2) b2 = dd;\n }\n const edge = Math.sqrt(b2) - Math.sqrt(b) < 6 ? 0.55 : 1;\n d[i] = c[0] * edge;\n d[i + 1] = c[1] * edge;\n d[i + 2] = c[2] * edge;\n d[i + 3] = 255;\n });\n },\n }),\n gen('mesh-gradient', 'Soft blobs of colour orbit and blend into a living mesh gradient.', { blobs: 4, blur: 0.65 }, {\n draw: ({ ctx, w, h, t, o }) => {\n ctx.fillStyle = o.background;\n ctx.fillRect(0, 0, w, h);\n const r = Math.max(w, h) * o.blur;\n for (let i = 0; i < o.blobs; i++) {\n const a = t * 0.25 * o.speed + (i * Math.PI * 2) / o.blobs;\n const x = w / 2 + Math.cos(a * (1 + i * 0.13)) * w * 0.32;\n const y = h / 2 + Math.sin(a * (0.8 + i * 0.11)) * h * 0.32;\n const [cr, cg, cb] = hexRgb(o.colors[i % o.colors.length]);\n const g = ctx.createRadialGradient(x, y, 0, x, y, r);\n g.addColorStop(0, `rgba(${cr},${cg},${cb},0.7)`);\n g.addColorStop(1, `rgba(${cr},${cg},${cb},0)`);\n ctx.fillStyle = g;\n ctx.fillRect(0, 0, w, h);\n }\n },\n }),\n gen('starfield', 'Stars stream toward the viewer (warp speed with `speed: 4`).', { stars: 400, color: '#ffffff' }, {\n init: (_w, _h, o) => ({ s: Array.from({ length: o.stars }, () => [Math.random() * 2 - 1, Math.random() * 2 - 1, Math.random()]) }),\n draw: ({ ctx, w, h, t, state, o, quality }) => {\n ctx.fillStyle = o.background;\n ctx.fillRect(0, 0, w, h);\n ctx.fillStyle = o.color;\n const n = Math.round(state.s.length * quality);\n for (let i = 0; i < n; i++) {\n const s = state.s[i];\n if (t > 0) s[2] -= 0.004 * o.speed;\n if (s[2] <= 0.01) (s[0] = Math.random() * 2 - 1), (s[1] = Math.random() * 2 - 1), (s[2] = 1);\n const x = w / 2 + (s[0] / s[2]) * w * 0.5;\n const y = h / 2 + (s[1] / s[2]) * h * 0.5;\n if (x < 0 || x > w || y < 0 || y > h) continue;\n const size = (1 - s[2]) * 2.6;\n ctx.globalAlpha = Math.min(1, (1 - s[2]) * 1.6);\n ctx.fillRect(x, y, size, size);\n }\n ctx.globalAlpha = 1;\n },\n }),\n gen('metaballs', 'Gooey blobs that merge and split (low-resolution field, scaled up).', { balls: 6, cell: 5, threshold: 1 }, {\n init: (w, h, o) => ({ b: Array.from({ length: o.balls }, () => ({ x: Math.random() * w, y: Math.random() * h, vx: (Math.random() - 0.5) * 1.6, vy: (Math.random() - 0.5) * 1.6, r: Math.min(w, h) * (0.08 + Math.random() * 0.08) })) }),\n draw: (f) => {\n const { w, h, state, o } = f;\n for (const b of state.b) {\n b.x += b.vx * o.speed;\n b.y += b.vy * o.speed;\n if (b.x < 0 || b.x > w) b.vx *= -1;\n if (b.y < 0 || b.y > h) b.vy *= -1;\n }\n const [ar, ag, ab] = hexRgb(o.colors[0]);\n const [br, bg, bb] = hexRgb(o.colors[1] || o.colors[0]);\n const [kr, kg, kb] = hexRgb(o.background);\n field(f, o.cell, (x, y, d, i) => {\n let v = 0;\n for (const b of state.b) v += (b.r * b.r) / ((b.x - x) ** 2 + (b.y - y) ** 2 + 1);\n const inside = v >= o.threshold;\n const k = Math.min(1, (v - o.threshold) * 0.8);\n d[i] = inside ? ar + (br - ar) * k : kr;\n d[i + 1] = inside ? ag + (bg - ag) * k : kg;\n d[i + 2] = inside ? ab + (bb - ab) * k : kb;\n d[i + 3] = 255;\n });\n },\n }),\n gen('contours', 'Topographic contour lines over a slowly shifting height field.', { levels: 9, cell: 4, color: '#7c5cff' }, {\n draw: (f) => {\n const { t, o } = f;\n const [lr, lg, lb] = hexRgb(o.color);\n const [kr, kg, kb] = hexRgb(o.background);\n const z = (x: number, y: number) => (noise2(x * 0.006, y * 0.006, t * 0.2 * o.speed) + 1) / 2;\n const step = Math.max(2, Math.round(o.cell / f.quality));\n field(f, o.cell, (x, y, d, i) => {\n const a = Math.floor(z(x, y) * o.levels);\n const line = a !== Math.floor(z(x + step, y) * o.levels) || a !== Math.floor(z(x, y + step) * o.levels);\n const shade = 0.12 + (a / o.levels) * 0.18;\n d[i] = line ? lr : kr + (lr - kr) * shade;\n d[i + 1] = line ? lg : kg + (lg - kg) * shade;\n d[i + 2] = line ? lb : kb + (lb - kb) * shade;\n d[i + 3] = 255;\n });\n },\n }),\n];\n"],"names":[],"mappings":";;AAGA,IAAI,KAAK,GAAuB,IAAI;AACpC;SACgB,OAAO,GAAA;IACrB,IAAI,KAAK,EAAE,WAAW;AAAE,QAAA,OAAO,KAAK;AACpC,IAAA,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC;AACrC,IAAA,KAAK,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC;AACzC,IAAA,KAAK,CAAC,YAAY,CAAC,mBAAmB,EAAE,EAAE,CAAC;AAC3C,IAAA,KAAK,CAAC,KAAK,CAAC,OAAO,GAAG,8FAA8F;AACpH,IAAA,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AAChC,IAAA,OAAO,KAAK;AACd;AAEA;AACM,SAAU,MAAM,CAAC,EAAW,EAAE,GAAkB,EAAA;AACpD,IAAA,MAAM,CAAC,GAAG,GAAG,CAAC,KAA8C;AAC5D,IAAA,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,EAAE;AACpC,IAA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