motionary 6.7.0 → 6.9.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 (148) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/bin/usa-codemod-7.mjs +91 -0
  3. package/dist/chunks/{base-DchG4q_S.js → base-D5MHqeDd.js} +2 -2
  4. package/dist/chunks/{base-DchG4q_S.js.map → base-D5MHqeDd.js.map} +1 -1
  5. package/dist/chunks/{core-DVyTlo9Q.js → core-DyJu5r5a.js} +2 -2
  6. package/dist/chunks/{core-DVyTlo9Q.js.map → core-DyJu5r5a.js.map} +1 -1
  7. package/dist/chunks/{core-D2vF8kZb.js → core-ZGo4hOEk.js} +2 -2
  8. package/dist/chunks/{core-D2vF8kZb.js.map → core-ZGo4hOEk.js.map} +1 -1
  9. package/dist/chunks/{fx-DUMVKSvg.js → fx-DlGRMJ-Z.js} +2 -2
  10. package/dist/chunks/{fx-DUMVKSvg.js.map → fx-DlGRMJ-Z.js.map} +1 -1
  11. package/dist/chunks/{gpu-BBRLgEzM.cjs → gpu-C2D4T9Q-.cjs} +9 -2
  12. package/dist/chunks/gpu-C2D4T9Q-.cjs.map +1 -0
  13. package/dist/chunks/{gpu-CsP2ZB3x.js → gpu-DPhMkJq6.js} +10 -4
  14. package/dist/chunks/gpu-DPhMkJq6.js.map +1 -0
  15. package/dist/chunks/player-DH3TIz-t.js +516 -0
  16. package/dist/chunks/player-DH3TIz-t.js.map +1 -0
  17. package/dist/chunks/player-PS6_FzNw.cjs +525 -0
  18. package/dist/chunks/player-PS6_FzNw.cjs.map +1 -0
  19. package/dist/chunks/{registry-D23neB4M.js → registry-CTLWeg-J.js} +2 -2
  20. package/dist/chunks/{registry-D23neB4M.js.map → registry-CTLWeg-J.js.map} +1 -1
  21. package/dist/chunks/{spring-BhoT09Qb.js → spring-B-9MZOrW.js} +2 -2
  22. package/dist/chunks/{spring-BhoT09Qb.js.map → spring-B-9MZOrW.js.map} +1 -1
  23. package/dist/chunks/{variants-C_hv_s23.js → variants-CoZn3k_5.js} +2 -2
  24. package/dist/chunks/{variants-C_hv_s23.js.map → variants-CoZn3k_5.js.map} +1 -1
  25. package/dist/components/a11y.js +2 -2
  26. package/dist/components/angular.js +7 -7
  27. package/dist/components/background.js +2 -2
  28. package/dist/components/bridge.js +1 -1
  29. package/dist/components/cards.js +2 -2
  30. package/dist/components/click.js +3 -3
  31. package/dist/components/depth.js +3 -3
  32. package/dist/components/effects.cjs +13 -522
  33. package/dist/components/effects.cjs.map +1 -1
  34. package/dist/components/effects.js +7 -515
  35. package/dist/components/effects.js.map +1 -1
  36. package/dist/components/feedback.js +1 -1
  37. package/dist/components/fx-3d.cjs +8 -2
  38. package/dist/components/fx-3d.cjs.map +1 -1
  39. package/dist/components/fx-3d.d.cts +3 -1
  40. package/dist/components/fx-3d.d.ts +3 -1
  41. package/dist/components/fx-3d.js +9 -4
  42. package/dist/components/fx-3d.js.map +1 -1
  43. package/dist/components/fx-focus.cjs +125 -0
  44. package/dist/components/fx-focus.cjs.map +1 -0
  45. package/dist/components/fx-focus.d.cts +65 -0
  46. package/dist/components/fx-focus.d.ts +65 -0
  47. package/dist/components/fx-focus.js +122 -0
  48. package/dist/components/fx-focus.js.map +1 -0
  49. package/dist/components/fx-gpu.cjs +3 -2
  50. package/dist/components/fx-gpu.cjs.map +1 -1
  51. package/dist/components/fx-gpu.d.cts +3 -1
  52. package/dist/components/fx-gpu.d.ts +3 -1
  53. package/dist/components/fx-gpu.js +3 -3
  54. package/dist/components/fx-light.cjs +8 -2
  55. package/dist/components/fx-light.cjs.map +1 -1
  56. package/dist/components/fx-light.d.cts +3 -1
  57. package/dist/components/fx-light.d.ts +3 -1
  58. package/dist/components/fx-light.js +9 -4
  59. package/dist/components/fx-light.js.map +1 -1
  60. package/dist/components/fx-morph.cjs +8 -2
  61. package/dist/components/fx-morph.cjs.map +1 -1
  62. package/dist/components/fx-morph.d.cts +3 -1
  63. package/dist/components/fx-morph.d.ts +3 -1
  64. package/dist/components/fx-morph.js +9 -4
  65. package/dist/components/fx-morph.js.map +1 -1
  66. package/dist/components/fx-physics.cjs +350 -0
  67. package/dist/components/fx-physics.cjs.map +1 -0
  68. package/dist/components/fx-physics.d.cts +94 -0
  69. package/dist/components/fx-physics.d.ts +94 -0
  70. package/dist/components/fx-physics.js +345 -0
  71. package/dist/components/fx-physics.js.map +1 -0
  72. package/dist/components/fx-text.cjs +8 -2
  73. package/dist/components/fx-text.cjs.map +1 -1
  74. package/dist/components/fx-text.d.cts +3 -1
  75. package/dist/components/fx-text.d.ts +3 -1
  76. package/dist/components/fx-text.js +9 -4
  77. package/dist/components/fx-text.js.map +1 -1
  78. package/dist/components/fx-transitions.cjs +8 -2
  79. package/dist/components/fx-transitions.cjs.map +1 -1
  80. package/dist/components/fx-transitions.d.cts +3 -1
  81. package/dist/components/fx-transitions.d.ts +3 -1
  82. package/dist/components/fx-transitions.js +10 -5
  83. package/dist/components/fx-transitions.js.map +1 -1
  84. package/dist/components/fx-weather.cjs +271 -0
  85. package/dist/components/fx-weather.cjs.map +1 -0
  86. package/dist/components/fx-weather.d.cts +72 -0
  87. package/dist/components/fx-weather.d.ts +72 -0
  88. package/dist/components/fx-weather.js +266 -0
  89. package/dist/components/fx-weather.js.map +1 -0
  90. package/dist/components/fx.js +5 -5
  91. package/dist/components/fx2.cjs +49 -10
  92. package/dist/components/fx2.cjs.map +1 -1
  93. package/dist/components/fx2.d.cts +181 -4
  94. package/dist/components/fx2.d.ts +181 -4
  95. package/dist/components/fx2.js +42 -22
  96. package/dist/components/fx2.js.map +1 -1
  97. package/dist/components/gesture.js +4 -4
  98. package/dist/components/interaction.cjs +1 -0
  99. package/dist/components/interaction.cjs.map +1 -1
  100. package/dist/components/interaction.js +2 -1
  101. package/dist/components/interaction.js.map +1 -1
  102. package/dist/components/layout.js +1 -1
  103. package/dist/components/lite.cjs +2 -0
  104. package/dist/components/lite.cjs.map +1 -1
  105. package/dist/components/lite.js +2 -0
  106. package/dist/components/lite.js.map +1 -1
  107. package/dist/components/marketplace.cjs +82 -0
  108. package/dist/components/marketplace.cjs.map +1 -0
  109. package/dist/components/marketplace.d.cts +108 -0
  110. package/dist/components/marketplace.d.ts +108 -0
  111. package/dist/components/marketplace.js +77 -0
  112. package/dist/components/marketplace.js.map +1 -0
  113. package/dist/components/packs.js +1 -1
  114. package/dist/components/page.js +3 -3
  115. package/dist/components/perf.js +2 -2
  116. package/dist/components/physics.js +3 -3
  117. package/dist/components/reveal.js +1 -1
  118. package/dist/components/solid.js +7 -7
  119. package/dist/components/svelte.js +7 -7
  120. package/dist/components/svg.js +1 -1
  121. package/dist/components/text.js +2 -2
  122. package/dist/components/timeline.js +3 -3
  123. package/dist/components/transitions.js +1 -1
  124. package/dist/components/ui.cjs +1 -0
  125. package/dist/components/ui.cjs.map +1 -1
  126. package/dist/components/ui.js +5 -4
  127. package/dist/components/ui.js.map +1 -1
  128. package/dist/components/vue.js +7 -7
  129. package/dist/components/webgl.js +1 -1
  130. package/dist/components/widgets.cjs +1189 -45
  131. package/dist/components/widgets.cjs.map +1 -1
  132. package/dist/components/widgets.d.cts +177 -2
  133. package/dist/components/widgets.d.ts +177 -2
  134. package/dist/components/widgets.js +1179 -48
  135. package/dist/components/widgets.js.map +1 -1
  136. package/dist/components.js +9 -9
  137. package/dist/components.umd.js +2 -2
  138. package/dist/components.umd.js.map +1 -1
  139. package/dist/index.js +2 -2
  140. package/dist/widgets.umd.js +1 -1
  141. package/dist/widgets.umd.js.map +1 -1
  142. package/docs/ROADMAP.md +2 -2
  143. package/docs/components.md +55 -0
  144. package/docs/deprecations.md +4 -0
  145. package/docs/upgrading-7.md +33 -0
  146. package/package.json +43 -2
  147. package/dist/chunks/gpu-BBRLgEzM.cjs.map +0 -1
  148. package/dist/chunks/gpu-CsP2ZB3x.js.map +0 -1
@@ -0,0 +1,271 @@
1
+ 'use strict';
2
+
3
+ var base = require('../chunks/base-BaQV-2ha.cjs');
4
+ var registry = require('../chunks/registry-DehBVRDV.cjs');
5
+ var generative = require('../chunks/generative-BHIj-NU0.cjs');
6
+ var shared = require('../chunks/shared-jkgRH-Hx.cjs');
7
+
8
+ const bg = (name, description, defaults, spec) => ({
9
+ name,
10
+ kind: 'background',
11
+ description,
12
+ reduced: 'run',
13
+ defaults: { speed: 1, quality: 1, ...defaults },
14
+ run: (el, o, ctx) => {
15
+ const stop = generative.canvasBackground(el, ctx, spec, o);
16
+ ctx.onCleanup(stop);
17
+ return stop;
18
+ },
19
+ });
20
+ const step = (state, t) => {
21
+ const dt = state.last ? Math.min(0.05, t - state.last) : 0;
22
+ state.last = t;
23
+ return dt;
24
+ };
25
+ /** Mix two `[r,g,b]` colours. */
26
+ const mix = (a, b, k) => `rgb(${a.map((v, i) => Math.round(v + (b[i] - v) * k)).join(',')})`;
27
+ /** Sky colours (top, bottom) for an hour 0–24. */
28
+ function skyAt(hour) {
29
+ const keys = [
30
+ [0, [8, 10, 30], [22, 26, 60]],
31
+ [5, [30, 27, 75], [250, 140, 110]],
32
+ [7, [90, 160, 230], [255, 210, 160]],
33
+ [12, [40, 130, 230], [170, 215, 255]],
34
+ [17, [70, 120, 200], [255, 190, 130]],
35
+ [19, [60, 40, 110], [250, 110, 90]],
36
+ [21, [12, 14, 40], [40, 36, 90]],
37
+ [24, [8, 10, 30], [22, 26, 60]],
38
+ ];
39
+ const h = ((hour % 24) + 24) % 24;
40
+ let i = 0;
41
+ while (i < keys.length - 2 && keys[i + 1][0] <= h)
42
+ i++;
43
+ const [h0, t0, b0] = keys[i];
44
+ const [h1, t1, b1] = keys[i + 1];
45
+ const k = (h - h0) / (h1 - h0 || 1);
46
+ return [mix(t0, t1, k), mix(b0, b1, k)];
47
+ }
48
+ const WEATHER_FX = [
49
+ bg('rain-glass', 'Droplets on a window pane grow and run down, leaving trails (Canvas 2D).', { count: 70, tint: 'rgba(200,225,255,.55)' }, {
50
+ init: (w, h, o) => ({ d: Array.from({ length: o.count }, () => ({ x: Math.random() * w, y: Math.random() * h, r: shared.rand(1, 3.2), v: 0, trail: [] })) }),
51
+ draw: ({ ctx, w, h, t, state, o }) => {
52
+ const dt = step(state, t) * o.speed;
53
+ ctx.clearRect(0, 0, w, h);
54
+ ctx.fillStyle = 'rgba(30,50,80,.12)';
55
+ ctx.fillRect(0, 0, w, h);
56
+ for (const d of state.d) {
57
+ if (d.r > 2.6 && Math.random() < dt * 0.6)
58
+ d.v = shared.rand(40, 110);
59
+ if (d.v) {
60
+ d.y += d.v * dt;
61
+ d.x += Math.sin(d.y * 0.05) * 0.3;
62
+ d.trail.push([d.x, d.y]);
63
+ if (d.trail.length > 18)
64
+ d.trail.shift();
65
+ if (d.y > h + 6)
66
+ Object.assign(d, { y: -4, x: Math.random() * w, r: shared.rand(1, 2.4), v: 0, trail: [] });
67
+ }
68
+ else
69
+ d.r = Math.min(3.4, d.r + dt * 0.25);
70
+ if (d.trail.length > 1) {
71
+ ctx.strokeStyle = 'rgba(220,235,255,.25)';
72
+ ctx.lineWidth = d.r * 0.7;
73
+ ctx.beginPath();
74
+ d.trail.forEach(([x, y], i) => (i ? ctx.lineTo(x, y) : ctx.moveTo(x, y)));
75
+ ctx.stroke();
76
+ }
77
+ const g = ctx.createRadialGradient(d.x - d.r * 0.3, d.y - d.r * 0.4, 0, d.x, d.y, d.r * 1.4);
78
+ g.addColorStop(0, 'rgba(255,255,255,.9)');
79
+ g.addColorStop(1, o.tint);
80
+ ctx.fillStyle = g;
81
+ ctx.beginPath();
82
+ ctx.ellipse(d.x, d.y, d.r, d.r * 1.15, 0, 0, Math.PI * 2);
83
+ ctx.fill();
84
+ }
85
+ },
86
+ }),
87
+ bg('snowfall', 'Snowflakes drift down and pile up along the bottom edge (Canvas 2D).', { count: 90, pile: 18, color: '#ffffff' }, {
88
+ init: (w, h, o) => ({ f: Array.from({ length: o.count }, () => ({ x: Math.random() * w, y: Math.random() * h, r: shared.rand(1, 3.4), ph: shared.rand(0, 6.3) })), pile: new Float32Array(Math.max(2, Math.ceil(w / 6))) }),
89
+ draw: ({ ctx, w, h, t, state, o, quality }) => {
90
+ const dt = step(state, t) * o.speed;
91
+ ctx.clearRect(0, 0, w, h);
92
+ ctx.fillStyle = o.color;
93
+ const n = Math.max(8, Math.round(state.f.length * quality));
94
+ for (let i = 0; i < n; i++) {
95
+ const f = state.f[i];
96
+ f.y += (14 + f.r * 9) * dt;
97
+ f.x += Math.sin(t * 0.8 + f.ph) * 12 * dt;
98
+ const col = Math.min(state.pile.length - 1, Math.max(0, Math.floor(f.x / 6)));
99
+ if (f.y > h - state.pile[col]) {
100
+ state.pile[col] = Math.min(o.pile, state.pile[col] + f.r * 0.12);
101
+ f.y = -5;
102
+ f.x = Math.random() * w;
103
+ }
104
+ ctx.globalAlpha = 0.55 + f.r / 8;
105
+ ctx.beginPath();
106
+ ctx.arc(f.x, f.y, f.r, 0, Math.PI * 2);
107
+ ctx.fill();
108
+ }
109
+ ctx.globalAlpha = 0.95;
110
+ ctx.beginPath();
111
+ ctx.moveTo(0, h);
112
+ for (let c = 0; c < state.pile.length; c++)
113
+ ctx.lineTo(c * 6 + 3, h - state.pile[c] - Math.sin(c * 0.7) * Math.min(2, state.pile[c] * 0.2));
114
+ ctx.lineTo(w, h);
115
+ ctx.fill();
116
+ ctx.globalAlpha = 1;
117
+ },
118
+ }),
119
+ bg('lightning', 'A safe storm: branching bolts at most once per `interval` (≥ 2.5 s), sky glow capped at 22 %, no flash under reduced motion (Canvas 2D).', { interval: 4, glow: 0.22, color: '#c7d2fe' }, {
120
+ init: () => ({ next: 1.2, bolt: null, age: 0 }),
121
+ draw: ({ ctx, w, h, t, state, o }) => {
122
+ const dt = step(state, t);
123
+ ctx.clearRect(0, 0, w, h);
124
+ const sky = ctx.createLinearGradient(0, 0, 0, h);
125
+ sky.addColorStop(0, '#0b1020');
126
+ sky.addColorStop(1, '#1e293b');
127
+ ctx.fillStyle = sky;
128
+ ctx.fillRect(0, 0, w, h);
129
+ if (t === 0)
130
+ return;
131
+ const every = Math.max(2.5, Number(o.interval) || 4);
132
+ if (t > state.next) {
133
+ state.next = t + every + Math.random() * every * 0.5;
134
+ const segs = [];
135
+ const branch = (x, y, len, depth) => {
136
+ let cx = x;
137
+ let cy = y;
138
+ const path = [[cx, cy]];
139
+ while (cy < y + len && cy < h) {
140
+ cx += shared.rand(-14, 14);
141
+ cy += shared.rand(8, 18);
142
+ path.push([cx, cy]);
143
+ if (depth < 2 && Math.random() < 0.12)
144
+ branch(cx, cy, len * 0.4, depth + 1);
145
+ }
146
+ segs.push(path);
147
+ };
148
+ branch(shared.rand(w * 0.2, w * 0.8), 0, h * 0.85, 0);
149
+ state.bolt = segs;
150
+ state.age = 0;
151
+ }
152
+ if (state.bolt) {
153
+ state.age += dt;
154
+ const a = Math.max(0, 1 - state.age / 0.45);
155
+ ctx.fillStyle = `rgba(200,210,255,${(Math.min(0.22, Number(o.glow) || 0.22) * a).toFixed(3)})`;
156
+ ctx.fillRect(0, 0, w, h);
157
+ ctx.strokeStyle = o.color;
158
+ ctx.shadowColor = o.color;
159
+ ctx.shadowBlur = 12;
160
+ ctx.globalAlpha = a;
161
+ state.bolt.forEach((p, i) => {
162
+ ctx.lineWidth = i === state.bolt.length - 1 ? 2.4 : 1;
163
+ ctx.beginPath();
164
+ p.forEach(([x, y], j) => (j ? ctx.lineTo(x, y) : ctx.moveTo(x, y)));
165
+ ctx.stroke();
166
+ });
167
+ ctx.globalAlpha = 1;
168
+ ctx.shadowBlur = 0;
169
+ if (a <= 0)
170
+ state.bolt = null;
171
+ }
172
+ },
173
+ }),
174
+ bg('fog', 'Soft layered fog banks drifting at different speeds (Canvas 2D).', { banks: 9, color: '226,232,240', density: 0.35 }, {
175
+ init: (w, h, o) => ({ b: Array.from({ length: o.banks }, (_, i) => ({ x: Math.random() * w, y: h * (0.35 + (i / o.banks) * 0.65), r: shared.rand(0.35, 0.7) * Math.max(w, h), v: shared.rand(6, 22) * (i % 2 ? 1 : -1) })) }),
176
+ draw: ({ ctx, w, h, t, state, o }) => {
177
+ const dt = step(state, t) * o.speed;
178
+ ctx.clearRect(0, 0, w, h);
179
+ for (const b of state.b) {
180
+ b.x += b.v * dt;
181
+ if (b.x > w + b.r)
182
+ b.x = -b.r;
183
+ if (b.x < -b.r)
184
+ b.x = w + b.r;
185
+ const g = ctx.createRadialGradient(b.x, b.y, 0, b.x, b.y, b.r);
186
+ g.addColorStop(0, `rgba(${o.color},${o.density})`);
187
+ g.addColorStop(1, `rgba(${o.color},0)`);
188
+ ctx.fillStyle = g;
189
+ ctx.fillRect(0, 0, w, h);
190
+ }
191
+ },
192
+ }),
193
+ bg('aurora-veil', 'Curtains of northern lights waving over a starry night sky (Canvas 2D).', { colors: ['#22d3ee', '#a3e635', '#c084fc'], stars: 60 }, {
194
+ init: (w, h, o) => ({ s: Array.from({ length: o.stars }, () => [Math.random() * w, Math.random() * h * 0.7, Math.random()]) }),
195
+ draw: ({ ctx, w, h, t, state, o }) => {
196
+ const sky = ctx.createLinearGradient(0, 0, 0, h);
197
+ sky.addColorStop(0, '#020617');
198
+ sky.addColorStop(1, '#0f172a');
199
+ ctx.fillStyle = sky;
200
+ ctx.fillRect(0, 0, w, h);
201
+ for (const [x, y, k] of state.s) {
202
+ ctx.fillStyle = `rgba(255,255,255,${(0.3 + 0.5 * Math.abs(Math.sin(t * 1.5 + k * 9))).toFixed(2)})`;
203
+ ctx.fillRect(x, y, 1.4, 1.4);
204
+ }
205
+ ctx.globalCompositeOperation = 'lighter';
206
+ o.colors.forEach((c, i) => {
207
+ const base = h * (0.25 + i * 0.12);
208
+ for (let x = 0; x < w; x += 4) {
209
+ const y = base + Math.sin(x * 0.012 + t * (0.5 + i * 0.2) + i) * h * 0.08 + Math.sin(x * 0.03 - t * 0.7) * h * 0.03;
210
+ const len = h * (0.22 + 0.12 * Math.sin(x * 0.02 + t + i));
211
+ const g = ctx.createLinearGradient(0, y - len, 0, y);
212
+ g.addColorStop(0, 'rgba(0,0,0,0)');
213
+ g.addColorStop(1, c);
214
+ ctx.globalAlpha = 0.16;
215
+ ctx.fillStyle = g;
216
+ ctx.fillRect(x, y - len, 4, len);
217
+ }
218
+ });
219
+ ctx.globalAlpha = 1;
220
+ ctx.globalCompositeOperation = 'source-over';
221
+ },
222
+ }),
223
+ bg('day-cycle', 'The sky moves through dawn, day, dusk and night with the sun and moon on an arc (`cycle` seconds or a fixed `hour`) (Canvas 2D).', { cycle: 24, hour: null }, {
224
+ draw: ({ ctx, w, h, t, o }) => {
225
+ const hour = typeof o.hour === 'number' ? o.hour : (8 + (t / Math.max(4, Number(o.cycle) || 24)) * 24) % 24;
226
+ const [top, bot] = skyAt(hour);
227
+ const g = ctx.createLinearGradient(0, 0, 0, h);
228
+ g.addColorStop(0, top);
229
+ g.addColorStop(1, bot);
230
+ ctx.fillStyle = g;
231
+ ctx.fillRect(0, 0, w, h);
232
+ const body = (k, color, r) => {
233
+ if (k < 0 || k > 1)
234
+ return;
235
+ const x = w * k;
236
+ const y = h * 0.9 - Math.sin(k * Math.PI) * h * 0.75;
237
+ ctx.fillStyle = color;
238
+ ctx.shadowColor = color;
239
+ ctx.shadowBlur = 24;
240
+ ctx.beginPath();
241
+ ctx.arc(x, y, r, 0, Math.PI * 2);
242
+ ctx.fill();
243
+ ctx.shadowBlur = 0;
244
+ };
245
+ body((hour - 6) / 12, '#fde047', Math.min(w, h) * 0.07);
246
+ body(((hour + 6) % 24) / 12, '#e2e8f0', Math.min(w, h) * 0.05);
247
+ ctx.fillStyle = 'rgba(15,23,42,.55)';
248
+ ctx.beginPath();
249
+ ctx.moveTo(0, h);
250
+ for (let x = 0; x <= w; x += 8)
251
+ ctx.lineTo(x, h * 0.88 - Math.sin(x * 0.015) * h * 0.05 - Math.sin(x * 0.041) * h * 0.02);
252
+ ctx.lineTo(w, h);
253
+ ctx.fill();
254
+ },
255
+ }),
256
+ ];
257
+ /** Register the 6.8 weather & ambience pack (idempotent). */
258
+ function registerWeatherPack() {
259
+ registry.registerEffects(WEATHER_FX);
260
+ }
261
+ /** @deprecated since 6.9 — use `registerWeatherPack()` (removed in 7.0; `npx usa-codemod-7`). */
262
+ function registerWeatherEffects() {
263
+ base.deprecate('registerWeatherEffects', 'registerWeatherEffects() is deprecated since 6.9 and removed in 7.0 — use registerWeatherPack() (npx usa-codemod-7).');
264
+ registerWeatherPack();
265
+ }
266
+
267
+ exports.WEATHER_FX = WEATHER_FX;
268
+ exports.registerWeatherEffects = registerWeatherEffects;
269
+ exports.registerWeatherPack = registerWeatherPack;
270
+ exports.skyAt = skyAt;
271
+ //# sourceMappingURL=fx-weather.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fx-weather.cjs","sources":["../../src/components/fx2/weather.ts"],"sourcesContent":["/**\n * 6.8 — Weather & ambience (`motionary/components/fx-weather`), registered\n * through `registerEffect()` (kind `background`, Canvas 2D):\n *\n * - `rain-glass` — droplets sit on a window pane, grow, and run down leaving\n * trails.\n * - `snowfall` — flakes drift down and pile up along the bottom edge.\n * - `lightning` — a safe storm: branching bolts at most once per `interval`\n * (≥ 2.5 s, far below the WCAG 2.3.1 limit of 3 flashes / s), the sky glow\n * is capped at 22 % brightness and there is no flash at all under reduced\n * motion.\n * - `fog` — soft layered fog banks drifting at different speeds.\n * - `aurora-veil` — curtains of northern lights waving over a night sky.\n * - `day-cycle` — the sky moves through dawn, day, dusk and night with the sun\n * and moon on an arc (`cycle` seconds, or a fixed `hour` 0–24).\n *\n * Every effect renders only while visible, adapts its quality and draws one\n * static frame under reduced motion.\n */\nimport type { EffectContext, EffectDefinition } from '../fx/registry';\nimport { deprecate } from '../base';\nimport { registerEffects } from '../fx/registry';\nimport { canvasBackground, type GenerativeSpec } from '../effects/generative';\nimport { rand } from '../effects/shared';\n\nconst bg = (name: string, description: string, defaults: Record<string, unknown>, spec: GenerativeSpec): EffectDefinition => ({\n name,\n kind: 'background',\n description,\n reduced: 'run',\n defaults: { speed: 1, quality: 1, ...defaults },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const stop = canvasBackground(el, ctx, spec, o);\n ctx.onCleanup(stop);\n return stop;\n },\n});\n\nconst step = (state: any, t: number): number => {\n const dt = state.last ? Math.min(0.05, t - state.last) : 0;\n state.last = t;\n return dt;\n};\n\n/** Mix two `[r,g,b]` colours. */\nconst mix = (a: number[], b: number[], k: number): string => `rgb(${a.map((v, i) => Math.round(v + (b[i] - v) * k)).join(',')})`;\n\n/** Sky colours (top, bottom) for an hour 0–24. */\nexport function skyAt(hour: number): [string, string] {\n const keys: [number, number[], number[]][] = [\n [0, [8, 10, 30], [22, 26, 60]],\n [5, [30, 27, 75], [250, 140, 110]],\n [7, [90, 160, 230], [255, 210, 160]],\n [12, [40, 130, 230], [170, 215, 255]],\n [17, [70, 120, 200], [255, 190, 130]],\n [19, [60, 40, 110], [250, 110, 90]],\n [21, [12, 14, 40], [40, 36, 90]],\n [24, [8, 10, 30], [22, 26, 60]],\n ];\n const h = ((hour % 24) + 24) % 24;\n let i = 0;\n while (i < keys.length - 2 && keys[i + 1][0] <= h) i++;\n const [h0, t0, b0] = keys[i];\n const [h1, t1, b1] = keys[i + 1];\n const k = (h - h0) / (h1 - h0 || 1);\n return [mix(t0, t1, k), mix(b0, b1, k)];\n}\n\nexport const WEATHER_FX: EffectDefinition[] = [\n bg('rain-glass', 'Droplets on a window pane grow and run down, leaving trails (Canvas 2D).', { count: 70, tint: 'rgba(200,225,255,.55)' }, {\n init: (w, h, o) => ({ d: Array.from({ length: o.count }, () => ({ x: Math.random() * w, y: Math.random() * h, r: rand(1, 3.2), v: 0, trail: [] as number[][] })) }),\n draw: ({ ctx, w, h, t, state, o }) => {\n const dt = step(state, t) * o.speed;\n ctx.clearRect(0, 0, w, h);\n ctx.fillStyle = 'rgba(30,50,80,.12)';\n ctx.fillRect(0, 0, w, h);\n for (const d of state.d) {\n if (d.r > 2.6 && Math.random() < dt * 0.6) d.v = rand(40, 110);\n if (d.v) {\n d.y += d.v * dt;\n d.x += Math.sin(d.y * 0.05) * 0.3;\n d.trail.push([d.x, d.y]);\n if (d.trail.length > 18) d.trail.shift();\n if (d.y > h + 6) Object.assign(d, { y: -4, x: Math.random() * w, r: rand(1, 2.4), v: 0, trail: [] });\n } else d.r = Math.min(3.4, d.r + dt * 0.25);\n if (d.trail.length > 1) {\n ctx.strokeStyle = 'rgba(220,235,255,.25)';\n ctx.lineWidth = d.r * 0.7;\n ctx.beginPath();\n d.trail.forEach(([x, y]: number[], i: number) => (i ? ctx.lineTo(x, y) : ctx.moveTo(x, y)));\n ctx.stroke();\n }\n const g = ctx.createRadialGradient(d.x - d.r * 0.3, d.y - d.r * 0.4, 0, d.x, d.y, d.r * 1.4);\n g.addColorStop(0, 'rgba(255,255,255,.9)');\n g.addColorStop(1, o.tint);\n ctx.fillStyle = g;\n ctx.beginPath();\n ctx.ellipse(d.x, d.y, d.r, d.r * 1.15, 0, 0, Math.PI * 2);\n ctx.fill();\n }\n },\n }),\n bg('snowfall', 'Snowflakes drift down and pile up along the bottom edge (Canvas 2D).', { count: 90, pile: 18, color: '#ffffff' }, {\n init: (w, h, o) => ({ f: Array.from({ length: o.count }, () => ({ x: Math.random() * w, y: Math.random() * h, r: rand(1, 3.4), ph: rand(0, 6.3) })), pile: new Float32Array(Math.max(2, Math.ceil(w / 6))) }),\n draw: ({ ctx, w, h, t, state, o, quality }) => {\n const dt = step(state, t) * o.speed;\n ctx.clearRect(0, 0, w, h);\n ctx.fillStyle = o.color;\n const n = Math.max(8, Math.round(state.f.length * quality));\n for (let i = 0; i < n; i++) {\n const f = state.f[i];\n f.y += (14 + f.r * 9) * dt;\n f.x += Math.sin(t * 0.8 + f.ph) * 12 * dt;\n const col = Math.min(state.pile.length - 1, Math.max(0, Math.floor(f.x / 6)));\n if (f.y > h - state.pile[col]) {\n state.pile[col] = Math.min(o.pile, state.pile[col] + f.r * 0.12);\n f.y = -5;\n f.x = Math.random() * w;\n }\n ctx.globalAlpha = 0.55 + f.r / 8;\n ctx.beginPath();\n ctx.arc(f.x, f.y, f.r, 0, Math.PI * 2);\n ctx.fill();\n }\n ctx.globalAlpha = 0.95;\n ctx.beginPath();\n ctx.moveTo(0, h);\n for (let c = 0; c < state.pile.length; c++) ctx.lineTo(c * 6 + 3, h - state.pile[c] - Math.sin(c * 0.7) * Math.min(2, state.pile[c] * 0.2));\n ctx.lineTo(w, h);\n ctx.fill();\n ctx.globalAlpha = 1;\n },\n }),\n bg('lightning', 'A safe storm: branching bolts at most once per `interval` (≥ 2.5 s), sky glow capped at 22 %, no flash under reduced motion (Canvas 2D).', { interval: 4, glow: 0.22, color: '#c7d2fe' }, {\n init: () => ({ next: 1.2, bolt: null as number[][][] | null, age: 0 }),\n draw: ({ ctx, w, h, t, state, o }) => {\n const dt = step(state, t);\n ctx.clearRect(0, 0, w, h);\n const sky = ctx.createLinearGradient(0, 0, 0, h);\n sky.addColorStop(0, '#0b1020');\n sky.addColorStop(1, '#1e293b');\n ctx.fillStyle = sky;\n ctx.fillRect(0, 0, w, h);\n if (t === 0) return;\n const every = Math.max(2.5, Number(o.interval) || 4);\n if (t > state.next) {\n state.next = t + every + Math.random() * every * 0.5;\n const segs: number[][][] = [];\n const branch = (x: number, y: number, len: number, depth: number) => {\n let cx = x;\n let cy = y;\n const path: number[][] = [[cx, cy]];\n while (cy < y + len && cy < h) {\n cx += rand(-14, 14);\n cy += rand(8, 18);\n path.push([cx, cy]);\n if (depth < 2 && Math.random() < 0.12) branch(cx, cy, len * 0.4, depth + 1);\n }\n segs.push(path);\n };\n branch(rand(w * 0.2, w * 0.8), 0, h * 0.85, 0);\n state.bolt = segs;\n state.age = 0;\n }\n if (state.bolt) {\n state.age += dt;\n const a = Math.max(0, 1 - state.age / 0.45);\n ctx.fillStyle = `rgba(200,210,255,${(Math.min(0.22, Number(o.glow) || 0.22) * a).toFixed(3)})`;\n ctx.fillRect(0, 0, w, h);\n ctx.strokeStyle = o.color;\n ctx.shadowColor = o.color;\n ctx.shadowBlur = 12;\n ctx.globalAlpha = a;\n state.bolt.forEach((p: number[][], i: number) => {\n ctx.lineWidth = i === state.bolt.length - 1 ? 2.4 : 1;\n ctx.beginPath();\n p.forEach(([x, y], j) => (j ? ctx.lineTo(x, y) : ctx.moveTo(x, y)));\n ctx.stroke();\n });\n ctx.globalAlpha = 1;\n ctx.shadowBlur = 0;\n if (a <= 0) state.bolt = null;\n }\n },\n }),\n bg('fog', 'Soft layered fog banks drifting at different speeds (Canvas 2D).', { banks: 9, color: '226,232,240', density: 0.35 }, {\n init: (w, h, o) => ({ b: Array.from({ length: o.banks }, (_, i) => ({ x: Math.random() * w, y: h * (0.35 + (i / o.banks) * 0.65), r: rand(0.35, 0.7) * Math.max(w, h), v: rand(6, 22) * (i % 2 ? 1 : -1) })) }),\n draw: ({ ctx, w, h, t, state, o }) => {\n const dt = step(state, t) * o.speed;\n ctx.clearRect(0, 0, w, h);\n for (const b of state.b) {\n b.x += b.v * dt;\n if (b.x > w + b.r) b.x = -b.r;\n if (b.x < -b.r) b.x = w + b.r;\n const g = ctx.createRadialGradient(b.x, b.y, 0, b.x, b.y, b.r);\n g.addColorStop(0, `rgba(${o.color},${o.density})`);\n g.addColorStop(1, `rgba(${o.color},0)`);\n ctx.fillStyle = g;\n ctx.fillRect(0, 0, w, h);\n }\n },\n }),\n bg('aurora-veil', 'Curtains of northern lights waving over a starry night sky (Canvas 2D).', { colors: ['#22d3ee', '#a3e635', '#c084fc'], stars: 60 }, {\n init: (w, h, o) => ({ s: Array.from({ length: o.stars }, () => [Math.random() * w, Math.random() * h * 0.7, Math.random()]) }),\n draw: ({ ctx, w, h, t, state, o }) => {\n const sky = ctx.createLinearGradient(0, 0, 0, h);\n sky.addColorStop(0, '#020617');\n sky.addColorStop(1, '#0f172a');\n ctx.fillStyle = sky;\n ctx.fillRect(0, 0, w, h);\n for (const [x, y, k] of state.s) {\n ctx.fillStyle = `rgba(255,255,255,${(0.3 + 0.5 * Math.abs(Math.sin(t * 1.5 + k * 9))).toFixed(2)})`;\n ctx.fillRect(x, y, 1.4, 1.4);\n }\n ctx.globalCompositeOperation = 'lighter';\n (o.colors as string[]).forEach((c, i) => {\n const base = h * (0.25 + i * 0.12);\n for (let x = 0; x < w; x += 4) {\n const y = base + Math.sin(x * 0.012 + t * (0.5 + i * 0.2) + i) * h * 0.08 + Math.sin(x * 0.03 - t * 0.7) * h * 0.03;\n const len = h * (0.22 + 0.12 * Math.sin(x * 0.02 + t + i));\n const g = ctx.createLinearGradient(0, y - len, 0, y);\n g.addColorStop(0, 'rgba(0,0,0,0)');\n g.addColorStop(1, c);\n ctx.globalAlpha = 0.16;\n ctx.fillStyle = g;\n ctx.fillRect(x, y - len, 4, len);\n }\n });\n ctx.globalAlpha = 1;\n ctx.globalCompositeOperation = 'source-over';\n },\n }),\n bg('day-cycle', 'The sky moves through dawn, day, dusk and night with the sun and moon on an arc (`cycle` seconds or a fixed `hour`) (Canvas 2D).', { cycle: 24, hour: null }, {\n draw: ({ ctx, w, h, t, o }) => {\n const hour = typeof o.hour === 'number' ? o.hour : (8 + (t / Math.max(4, Number(o.cycle) || 24)) * 24) % 24;\n const [top, bot] = skyAt(hour);\n const g = ctx.createLinearGradient(0, 0, 0, h);\n g.addColorStop(0, top);\n g.addColorStop(1, bot);\n ctx.fillStyle = g;\n ctx.fillRect(0, 0, w, h);\n const body = (k: number, color: string, r: number) => {\n if (k < 0 || k > 1) return;\n const x = w * k;\n const y = h * 0.9 - Math.sin(k * Math.PI) * h * 0.75;\n ctx.fillStyle = color;\n ctx.shadowColor = color;\n ctx.shadowBlur = 24;\n ctx.beginPath();\n ctx.arc(x, y, r, 0, Math.PI * 2);\n ctx.fill();\n ctx.shadowBlur = 0;\n };\n body((hour - 6) / 12, '#fde047', Math.min(w, h) * 0.07);\n body(((hour + 6) % 24) / 12, '#e2e8f0', Math.min(w, h) * 0.05);\n ctx.fillStyle = 'rgba(15,23,42,.55)';\n ctx.beginPath();\n ctx.moveTo(0, h);\n for (let x = 0; x <= w; x += 8) ctx.lineTo(x, h * 0.88 - Math.sin(x * 0.015) * h * 0.05 - Math.sin(x * 0.041) * h * 0.02);\n ctx.lineTo(w, h);\n ctx.fill();\n },\n }),\n];\n\n/** Register the 6.8 weather & ambience pack (idempotent). */\nexport function registerWeatherPack(): void {\n registerEffects(WEATHER_FX);\n}\n\n/** @deprecated since 6.9 — use `registerWeatherPack()` (removed in 7.0; `npx usa-codemod-7`). */\nexport function registerWeatherEffects(): void {\n deprecate('registerWeatherEffects', 'registerWeatherEffects() is deprecated since 6.9 and removed in 7.0 — use registerWeatherPack() (npx usa-codemod-7).');\n registerWeatherPack();\n}\n"],"names":["canvasBackground","rand","registerEffects","deprecate"],"mappings":";;;;;;;AAyBA,MAAM,EAAE,GAAG,CAAC,IAAY,EAAE,WAAmB,EAAE,QAAiC,EAAE,IAAoB,MAAwB;IAC5H,IAAI;AACJ,IAAA,IAAI,EAAE,YAAY;IAClB,WAAW;AACX,IAAA,OAAO,EAAE,KAAK;AACd,IAAA,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,QAAQ,EAAE;IAC/C,GAAG,EAAE,CAAC,EAAe,EAAE,CAAM,EAAE,GAAkB,KAAI;AACnD,QAAA,MAAM,IAAI,GAAGA,2BAAgB,CAAC,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AAC/C,QAAA,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC;AACnB,QAAA,OAAO,IAAI;IACb,CAAC;AACF,CAAA,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,KAAU,EAAE,CAAS,KAAY;IAC7C,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;AAC1D,IAAA,KAAK,CAAC,IAAI,GAAG,CAAC;AACd,IAAA,OAAO,EAAE;AACX,CAAC;AAED;AACA,MAAM,GAAG,GAAG,CAAC,CAAW,EAAE,CAAW,EAAE,CAAS,KAAa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C,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC;AAAE,gBAAA,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AACzH,YAAA,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;YAChB,GAAG,CAAC,IAAI,EAAE;QACZ,CAAC;KACF,CAAC;;AAGJ;SACgB,mBAAmB,GAAA;IACjCC,wBAAe,CAAC,UAAU,CAAC;AAC7B;AAEA;SACgB,sBAAsB,GAAA;AACpC,IAAAC,cAAS,CAAC,wBAAwB,EAAE,sHAAsH,CAAC;AAC3J,IAAA,mBAAmB,EAAE;AACvB;;;;;;;"}
@@ -0,0 +1,72 @@
1
+ type MotionSensitivity = 'full' | 'gentle' | 'minimal' | 'static';
2
+ type Cleanup = () => void;
3
+
4
+ /**
5
+ * 5.0 — unified plugin-style effect registration. Every effect (built-in or
6
+ * yours) is a plain object registered once and played the same way:
7
+ * `playEffect(el, name)`, `bindEffect(el, name, { trigger })` or
8
+ * `<usa-fx effect="name" trigger="click">`. Effects get a context that
9
+ * already applies reduced motion, motion sensitivity, intensity and the
10
+ * animation budget.
11
+ */
12
+
13
+ declare const EFFECT_KINDS: readonly ["enter", "exit", "attention", "click", "hover", "card", "loop", "page", "background", "text", "cursor", "scroll"];
14
+ type EffectKind = (typeof EFFECT_KINDS)[number];
15
+ interface EffectContext {
16
+ /** Reduced motion applies (OS setting, `minimal` / `static` sensitivity). */
17
+ readonly reduced: boolean;
18
+ readonly sensitivity: MotionSensitivity;
19
+ /** The triggering event (pointer position for click effects), if any. */
20
+ readonly event?: Event;
21
+ /** `el.animate()` with the library's motion rules (may return `null`). */
22
+ animate(el: Element, keyframes: Keyframe[], options: KeyframeAnimationOptions): Animation | null;
23
+ /** Register teardown for long-running effects (loops, listeners). */
24
+ onCleanup(fn: Cleanup): void;
25
+ }
26
+ interface EffectDefinition<O extends Record<string, unknown> = Record<string, any>> {
27
+ /** Unique, kebab-case. */
28
+ name: string;
29
+ kind: EffectKind;
30
+ /** One line for docs and the gallery. */
31
+ description?: string;
32
+ /** Option defaults (merged under the caller's options). */
33
+ defaults?: Partial<O>;
34
+ /**
35
+ * Under reduced motion: `'skip'` (do nothing — default for loop, background
36
+ * and cursor effects) or `'run'` (run with `ctx.reduced === true`, the
37
+ * effect degrades itself — default for everything else).
38
+ */
39
+ reduced?: 'skip' | 'run';
40
+ /** Play the effect. Return an Animation / Promise to be awaited, or a cleanup. */
41
+ run(el: HTMLElement, options: O, ctx: EffectContext): void | Cleanup | Animation | null | Promise<unknown>;
42
+ }
43
+
44
+ /**
45
+ * 6.8 — Weather & ambience (`motionary/components/fx-weather`), registered
46
+ * through `registerEffect()` (kind `background`, Canvas 2D):
47
+ *
48
+ * - `rain-glass` — droplets sit on a window pane, grow, and run down leaving
49
+ * trails.
50
+ * - `snowfall` — flakes drift down and pile up along the bottom edge.
51
+ * - `lightning` — a safe storm: branching bolts at most once per `interval`
52
+ * (≥ 2.5 s, far below the WCAG 2.3.1 limit of 3 flashes / s), the sky glow
53
+ * is capped at 22 % brightness and there is no flash at all under reduced
54
+ * motion.
55
+ * - `fog` — soft layered fog banks drifting at different speeds.
56
+ * - `aurora-veil` — curtains of northern lights waving over a night sky.
57
+ * - `day-cycle` — the sky moves through dawn, day, dusk and night with the sun
58
+ * and moon on an arc (`cycle` seconds, or a fixed `hour` 0–24).
59
+ *
60
+ * Every effect renders only while visible, adapts its quality and draws one
61
+ * static frame under reduced motion.
62
+ */
63
+
64
+ /** Sky colours (top, bottom) for an hour 0–24. */
65
+ declare function skyAt(hour: number): [string, string];
66
+ declare const WEATHER_FX: EffectDefinition[];
67
+ /** Register the 6.8 weather & ambience pack (idempotent). */
68
+ declare function registerWeatherPack(): void;
69
+ /** @deprecated since 6.9 — use `registerWeatherPack()` (removed in 7.0; `npx usa-codemod-7`). */
70
+ declare function registerWeatherEffects(): void;
71
+
72
+ export { WEATHER_FX, registerWeatherEffects, registerWeatherPack, skyAt };
@@ -0,0 +1,72 @@
1
+ type MotionSensitivity = 'full' | 'gentle' | 'minimal' | 'static';
2
+ type Cleanup = () => void;
3
+
4
+ /**
5
+ * 5.0 — unified plugin-style effect registration. Every effect (built-in or
6
+ * yours) is a plain object registered once and played the same way:
7
+ * `playEffect(el, name)`, `bindEffect(el, name, { trigger })` or
8
+ * `<usa-fx effect="name" trigger="click">`. Effects get a context that
9
+ * already applies reduced motion, motion sensitivity, intensity and the
10
+ * animation budget.
11
+ */
12
+
13
+ declare const EFFECT_KINDS: readonly ["enter", "exit", "attention", "click", "hover", "card", "loop", "page", "background", "text", "cursor", "scroll"];
14
+ type EffectKind = (typeof EFFECT_KINDS)[number];
15
+ interface EffectContext {
16
+ /** Reduced motion applies (OS setting, `minimal` / `static` sensitivity). */
17
+ readonly reduced: boolean;
18
+ readonly sensitivity: MotionSensitivity;
19
+ /** The triggering event (pointer position for click effects), if any. */
20
+ readonly event?: Event;
21
+ /** `el.animate()` with the library's motion rules (may return `null`). */
22
+ animate(el: Element, keyframes: Keyframe[], options: KeyframeAnimationOptions): Animation | null;
23
+ /** Register teardown for long-running effects (loops, listeners). */
24
+ onCleanup(fn: Cleanup): void;
25
+ }
26
+ interface EffectDefinition<O extends Record<string, unknown> = Record<string, any>> {
27
+ /** Unique, kebab-case. */
28
+ name: string;
29
+ kind: EffectKind;
30
+ /** One line for docs and the gallery. */
31
+ description?: string;
32
+ /** Option defaults (merged under the caller's options). */
33
+ defaults?: Partial<O>;
34
+ /**
35
+ * Under reduced motion: `'skip'` (do nothing — default for loop, background
36
+ * and cursor effects) or `'run'` (run with `ctx.reduced === true`, the
37
+ * effect degrades itself — default for everything else).
38
+ */
39
+ reduced?: 'skip' | 'run';
40
+ /** Play the effect. Return an Animation / Promise to be awaited, or a cleanup. */
41
+ run(el: HTMLElement, options: O, ctx: EffectContext): void | Cleanup | Animation | null | Promise<unknown>;
42
+ }
43
+
44
+ /**
45
+ * 6.8 — Weather & ambience (`motionary/components/fx-weather`), registered
46
+ * through `registerEffect()` (kind `background`, Canvas 2D):
47
+ *
48
+ * - `rain-glass` — droplets sit on a window pane, grow, and run down leaving
49
+ * trails.
50
+ * - `snowfall` — flakes drift down and pile up along the bottom edge.
51
+ * - `lightning` — a safe storm: branching bolts at most once per `interval`
52
+ * (≥ 2.5 s, far below the WCAG 2.3.1 limit of 3 flashes / s), the sky glow
53
+ * is capped at 22 % brightness and there is no flash at all under reduced
54
+ * motion.
55
+ * - `fog` — soft layered fog banks drifting at different speeds.
56
+ * - `aurora-veil` — curtains of northern lights waving over a night sky.
57
+ * - `day-cycle` — the sky moves through dawn, day, dusk and night with the sun
58
+ * and moon on an arc (`cycle` seconds, or a fixed `hour` 0–24).
59
+ *
60
+ * Every effect renders only while visible, adapts its quality and draws one
61
+ * static frame under reduced motion.
62
+ */
63
+
64
+ /** Sky colours (top, bottom) for an hour 0–24. */
65
+ declare function skyAt(hour: number): [string, string];
66
+ declare const WEATHER_FX: EffectDefinition[];
67
+ /** Register the 6.8 weather & ambience pack (idempotent). */
68
+ declare function registerWeatherPack(): void;
69
+ /** @deprecated since 6.9 — use `registerWeatherPack()` (removed in 7.0; `npx usa-codemod-7`). */
70
+ declare function registerWeatherEffects(): void;
71
+
72
+ export { WEATHER_FX, registerWeatherEffects, registerWeatherPack, skyAt };