use-scroll-animate 8.2.0 → 8.4.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 +28 -0
- package/dist/components/fx-cyber.cjs +140 -0
- package/dist/components/fx-cyber.cjs.map +1 -0
- package/dist/components/fx-cyber.d.cts +66 -0
- package/dist/components/fx-cyber.d.ts +66 -0
- package/dist/components/fx-cyber.js +136 -0
- package/dist/components/fx-cyber.js.map +1 -0
- package/dist/components/fx-organic.cjs +115 -0
- package/dist/components/fx-organic.cjs.map +1 -0
- package/dist/components/fx-organic.d.cts +66 -0
- package/dist/components/fx-organic.d.ts +66 -0
- package/dist/components/fx-organic.js +111 -0
- package/dist/components/fx-organic.js.map +1 -0
- package/dist/components/fx2.cjs +12 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +45 -1
- package/dist/components/fx2.d.ts +45 -1
- package/dist/components/fx2.js +9 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/widgets.cjs +437 -162
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +67 -2
- package/dist/components/widgets.d.ts +67 -2
- package/dist/components/widgets.js +433 -163
- package/dist/components/widgets.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components.md +43 -0
- package/package.json +41 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [8.4.0] - 2026-10-09
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **2 new components (8.4)** in `motionary/components/widgets` (also in `dist/widgets.umd.js`):
|
|
14
|
+
- `<usa-hud-panel>` — sci-fi HUD panel: angled corners, a glowing frame that draws itself in on first view, header with blinking status light (`title`, `status`, `color`), `<p data-value="72">` rows become animated bar readouts; `boot()` replays the intro, `usa:boot`.
|
|
15
|
+
- `<usa-radar>` — radar scope: a conic beam sweeps round (`speed` s per turn, `rings`) and targets (`targets="Name:bearing,distance; …"`) light up as the beam passes; `targets` / `setTargets()`, `usa:ping` { name }; `parseTargets()`.
|
|
16
|
+
- **Cyber pack — `motionary/fx/cyber`** (= `motionary/components/fx-cyber`, `registerCyberPack()`, also in `registerEffectPacks()`): `hud-frame` (enter), `scanline-sweep` (attention), `hologram` (loop), `data-decode` (enter). `decodeFrame()`.
|
|
17
|
+
- Showcase: 4 new gallery cards with copyable code, live demos and live Store thumbnails.
|
|
18
|
+
|
|
19
|
+
### Accessibility
|
|
20
|
+
- HUD panel is a labelled `region` (its `title`); the frame and bars are `aria-hidden`, the percentage is real text. Radar is an `img` whose label lists every target with its bearing; the sweep only runs on screen. `data-decode` keeps the real text as `aria-label` while it scrambles. Reduced motion: the panel shows at once, the radar is a still scope with all targets lit, `hud-frame` / `data-decode` just show, `scanline-sweep` does nothing, `hologram` is skipped.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
- the 8.4 hologram gallery card id `fx-holo` collided with the 5.x "Holographic card" card (catalog ids must be unique — caught by the showcase catalog test) → renamed `fx-hologram`; a duplicate-id check now runs at staging.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [8.3.0] - 2026-10-09
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
- **2 new components (8.3)** in `motionary/components/widgets` (also in `dist/widgets.umd.js`):
|
|
30
|
+
- `<usa-organic-card>` — card with a soft, living blob outline: breathes slowly while on screen, morphs on hover (`morph(seed)`), `tint` leaf · ocean · petal · sand, `seed` for the starting shape.
|
|
31
|
+
- `<usa-liquid-nav>` — navigation bar with a liquid-drop indicator that stretches towards the next item and settles with a wobble (gooey SVG filter); children are links / buttons, `aria-current="page"`, `value`, arrow keys, `label`; `usa:change` { index, item }.
|
|
32
|
+
- **Organic pack — `motionary/fx/organic`** (= `motionary/components/fx-organic`, `registerOrganicPack()`, also in `registerEffectPacks()`): `vine-grow` (enter), `bloom` (enter), `water-drop` (attention), `breathe` (loop). `blobRadius()`.
|
|
33
|
+
- Showcase: 4 new gallery cards with copyable code, live demos and live Store thumbnails; Animation Store 343 → 347 items.
|
|
34
|
+
|
|
35
|
+
### Accessibility
|
|
36
|
+
- Liquid nav is a labelled `navigation` that keeps `aria-current="page"` on the active item and moves focus with ← / →; the drop is `aria-hidden`. Organic card keeps your content and shows a focus ring when something inside is focused. Reduced motion: static blob, the drop jumps, `vine-grow` shows the vine, `bloom` fades in, `water-drop` does nothing, `breathe` is skipped.
|
|
37
|
+
|
|
10
38
|
## [8.2.0] - 2026-10-08
|
|
11
39
|
|
|
12
40
|
### Added
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var registry = require('../chunks/registry-BVklOepd.cjs');
|
|
4
|
+
require('../chunks/base-DoRUZBy-.cjs');
|
|
5
|
+
|
|
6
|
+
const GLYPHS = '01<>/\\[]{}#$%&*+=ABCDEFXYZ';
|
|
7
|
+
/** The `k`-th frame of decoding `text` over `n` frames: resolved prefix + random glyphs (8.4). */
|
|
8
|
+
function decodeFrame(text, k, n, rnd = Math.random) {
|
|
9
|
+
const done = Math.floor((Math.min(n, Math.max(0, k)) / n) * text.length);
|
|
10
|
+
let out = text.slice(0, done);
|
|
11
|
+
for (let i = done; i < text.length; i++)
|
|
12
|
+
out += /\s/.test(text[i]) ? text[i] : GLYPHS[Math.floor(rnd() * GLYPHS.length)];
|
|
13
|
+
return out;
|
|
14
|
+
}
|
|
15
|
+
const overlay = (el, ctx) => {
|
|
16
|
+
if (getComputedStyle(el).position === 'static') {
|
|
17
|
+
const prev = el.style.position;
|
|
18
|
+
el.style.position = 'relative';
|
|
19
|
+
ctx.onCleanup(() => (el.style.position = prev));
|
|
20
|
+
}
|
|
21
|
+
const o = document.createElement('span');
|
|
22
|
+
o.setAttribute('aria-hidden', 'true');
|
|
23
|
+
Object.assign(o.style, { position: 'absolute', inset: '0', pointerEvents: 'none', overflow: 'hidden', borderRadius: 'inherit' });
|
|
24
|
+
el.appendChild(o);
|
|
25
|
+
ctx.onCleanup(() => o.remove());
|
|
26
|
+
return o;
|
|
27
|
+
};
|
|
28
|
+
const bar = (o, color, h = '2px') => {
|
|
29
|
+
const b = document.createElement('span');
|
|
30
|
+
Object.assign(b.style, { position: 'absolute', left: '0', right: '0', top: '0', height: h, background: color, boxShadow: `0 0 10px 2px ${color}` });
|
|
31
|
+
o.appendChild(b);
|
|
32
|
+
return b;
|
|
33
|
+
};
|
|
34
|
+
const CYBER_FX = [
|
|
35
|
+
{
|
|
36
|
+
name: 'hud-frame',
|
|
37
|
+
kind: 'enter',
|
|
38
|
+
description: 'Corner brackets draw in around the element and a scan bar sweeps across it, like a HUD locking on (`color`).',
|
|
39
|
+
defaults: { color: '#22d3ee', duration: 900 },
|
|
40
|
+
run: (el, o, ctx) => {
|
|
41
|
+
if (ctx.reduced)
|
|
42
|
+
return;
|
|
43
|
+
const ov = overlay(el, ctx);
|
|
44
|
+
ov.style.overflow = 'visible';
|
|
45
|
+
const runs = [];
|
|
46
|
+
['0 0', '100% 0', '0 100%', '100% 100%'].forEach((pos, i) => {
|
|
47
|
+
const c = document.createElement('span');
|
|
48
|
+
const [x, y] = pos.split(' ');
|
|
49
|
+
Object.assign(c.style, { position: 'absolute', width: '14px', height: '14px', left: x === '0' ? '-4px' : 'calc(100% - 10px)', top: y === '0' ? '-4px' : 'calc(100% - 10px)', borderColor: o.color, borderStyle: 'solid', borderWidth: `${y === '0' ? 2 : 0}px ${x !== '0' ? 2 : 0}px ${y !== '0' ? 2 : 0}px ${x === '0' ? 2 : 0}px` });
|
|
50
|
+
ov.appendChild(c);
|
|
51
|
+
const dx = x === '0' ? -14 : 14;
|
|
52
|
+
const dy = y === '0' ? -14 : 14;
|
|
53
|
+
runs.push(ctx.animate(c, [{ transform: `translate(${dx}px,${dy}px)`, opacity: 0 }, { transform: 'none', opacity: 1, offset: 0.5 }, { transform: 'none', opacity: 1, offset: 0.85 }, { transform: 'none', opacity: 0 }], { duration: o.duration + 500, delay: i * 60, easing: 'ease-out', fill: 'backwards' })?.finished.catch(() => undefined));
|
|
54
|
+
});
|
|
55
|
+
const b = bar(ov, o.color);
|
|
56
|
+
runs.push(ctx.animate(b, [{ transform: 'translateY(0)', opacity: 0 }, { opacity: 1, offset: 0.1 }, { transform: `translateY(${el.clientHeight || 80}px)`, opacity: 0 }], { duration: o.duration, delay: 250, easing: 'ease-in-out', fill: 'backwards' })?.finished.catch(() => undefined));
|
|
57
|
+
runs.push(ctx.animate(el, [{ opacity: 0, filter: 'brightness(2) saturate(0)' }, { opacity: 1, filter: 'none' }], { duration: o.duration, easing: 'steps(6, end)', fill: 'backwards' })?.finished.catch(() => undefined));
|
|
58
|
+
return Promise.all(runs).then(() => ov.remove());
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'scanline-sweep',
|
|
63
|
+
kind: 'attention',
|
|
64
|
+
description: 'A bright horizontal scanline runs down the element (`color`, `passes`).',
|
|
65
|
+
defaults: { color: 'rgba(34,211,238,.9)', passes: 1, duration: 800 },
|
|
66
|
+
run: (el, o, ctx) => {
|
|
67
|
+
if (ctx.reduced)
|
|
68
|
+
return;
|
|
69
|
+
const ov = overlay(el, ctx);
|
|
70
|
+
const b = bar(ov, o.color, '3px');
|
|
71
|
+
const a = ctx.animate(b, [{ transform: 'translateY(-4px)' }, { transform: `translateY(${(el.clientHeight || 80) + 4}px)` }], { duration: o.duration, iterations: Math.max(1, Math.min(5, Number(o.passes) || 1)), easing: 'linear' });
|
|
72
|
+
const end = () => ov.remove();
|
|
73
|
+
return a ? a.finished.then(end, end) : (end(), undefined);
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: 'hologram',
|
|
78
|
+
kind: 'loop',
|
|
79
|
+
description: 'A flickering, translucent hologram look with drifting scan bands until the cleanup runs (`color`).',
|
|
80
|
+
defaults: { color: '#22d3ee', duration: 2400 },
|
|
81
|
+
run: (el, o, ctx) => {
|
|
82
|
+
const ov = overlay(el, ctx);
|
|
83
|
+
ov.style.background = `repeating-linear-gradient(0deg, transparent 0 3px, ${o.color}33 3px 4px)`;
|
|
84
|
+
ov.style.mixBlendMode = 'screen';
|
|
85
|
+
const prev = el.style.filter;
|
|
86
|
+
el.style.filter = `drop-shadow(0 0 6px ${o.color}) saturate(1.4)`;
|
|
87
|
+
const a = ctx.animate(el, [{ opacity: 0.85 }, { opacity: 0.6, offset: 0.08 }, { opacity: 0.9, offset: 0.12 }, { opacity: 0.8, offset: 0.5 }, { opacity: 0.55, offset: 0.52 }, { opacity: 0.85 }], { duration: o.duration, iterations: Infinity });
|
|
88
|
+
const b = ctx.animate(ov, [{ backgroundPosition: '0 0' }, { backgroundPosition: '0 40px' }], { duration: 1600, iterations: Infinity, easing: 'linear' });
|
|
89
|
+
return () => {
|
|
90
|
+
a?.cancel();
|
|
91
|
+
b?.cancel();
|
|
92
|
+
ov.remove();
|
|
93
|
+
el.style.filter = prev;
|
|
94
|
+
};
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'data-decode',
|
|
99
|
+
kind: 'enter',
|
|
100
|
+
description: 'The text resolves from random glyphs to the real characters, left to right (`speed` ms per frame).',
|
|
101
|
+
defaults: { speed: 40, frames: 16 },
|
|
102
|
+
run: (el, o, ctx) => {
|
|
103
|
+
if (ctx.reduced)
|
|
104
|
+
return;
|
|
105
|
+
const text = el.textContent || '';
|
|
106
|
+
if (!text.trim() || el.children.length)
|
|
107
|
+
return;
|
|
108
|
+
const n = Math.max(4, Math.min(60, Number(o.frames) || 16));
|
|
109
|
+
el.setAttribute('aria-label', text);
|
|
110
|
+
let k = 0;
|
|
111
|
+
let timer = 0;
|
|
112
|
+
const restore = () => {
|
|
113
|
+
clearTimeout(timer);
|
|
114
|
+
el.textContent = text;
|
|
115
|
+
el.removeAttribute('aria-label');
|
|
116
|
+
};
|
|
117
|
+
ctx.onCleanup(restore);
|
|
118
|
+
return new Promise((resolve) => {
|
|
119
|
+
const step = () => {
|
|
120
|
+
if (k > n) {
|
|
121
|
+
restore();
|
|
122
|
+
return resolve();
|
|
123
|
+
}
|
|
124
|
+
el.textContent = decodeFrame(text, k++, n);
|
|
125
|
+
timer = setTimeout(step, Math.max(10, Number(o.speed) || 40));
|
|
126
|
+
};
|
|
127
|
+
step();
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
];
|
|
132
|
+
/** Register hud-frame, scanline-sweep, hologram and data-decode (8.4). */
|
|
133
|
+
function registerCyberPack() {
|
|
134
|
+
registry.registerEffects(CYBER_FX);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
exports.CYBER_FX = CYBER_FX;
|
|
138
|
+
exports.decodeFrame = decodeFrame;
|
|
139
|
+
exports.registerCyberPack = registerCyberPack;
|
|
140
|
+
//# sourceMappingURL=fx-cyber.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fx-cyber.cjs","sources":["../../src/components/fx2/cyber.ts"],"sourcesContent":["/**\n * 8.4 — Cyber / sci-fi pack (`motionary/fx/cyber`, also `motionary/components/fx-cyber`):\n *\n * - `hud-frame` (enter) — corner brackets draw in around the element and a\n * scan bar sweeps across it, like a HUD locking on (`color`).\n * - `scanline-sweep` (attention) — a bright horizontal scanline runs down\n * the element (`color`, `passes`).\n * - `hologram` (loop) — a flickering, translucent cyan hologram look with\n * drifting scan bands; the cleanup restores the element (`color`).\n * - `data-decode` (enter) — the text resolves from random glyphs to the real\n * characters, left to right (`speed`).\n *\n * Reduced motion: hud-frame / data-decode just show, scanline-sweep does\n * nothing, hologram is skipped. Overlays are `aria-hidden` and removed.\n */\nimport type { EffectContext, EffectDefinition } from '../fx/registry';\nimport { registerEffects } from '../fx/registry';\n\nconst GLYPHS = '01<>/\\\\[]{}#$%&*+=ABCDEFXYZ';\n/** The `k`-th frame of decoding `text` over `n` frames: resolved prefix + random glyphs (8.4). */\nexport function decodeFrame(text: string, k: number, n: number, rnd: () => number = Math.random): string {\n const done = Math.floor((Math.min(n, Math.max(0, k)) / n) * text.length);\n let out = text.slice(0, done);\n for (let i = done; i < text.length; i++) out += /\\s/.test(text[i]) ? text[i] : GLYPHS[Math.floor(rnd() * GLYPHS.length)];\n return out;\n}\n\nconst overlay = (el: HTMLElement, ctx: EffectContext) => {\n if (getComputedStyle(el).position === 'static') {\n const prev = el.style.position;\n el.style.position = 'relative';\n ctx.onCleanup(() => (el.style.position = prev));\n }\n const o = document.createElement('span');\n o.setAttribute('aria-hidden', 'true');\n Object.assign(o.style, { position: 'absolute', inset: '0', pointerEvents: 'none', overflow: 'hidden', borderRadius: 'inherit' });\n el.appendChild(o);\n ctx.onCleanup(() => o.remove());\n return o;\n};\nconst bar = (o: HTMLElement, color: string, h = '2px') => {\n const b = document.createElement('span');\n Object.assign(b.style, { position: 'absolute', left: '0', right: '0', top: '0', height: h, background: color, boxShadow: `0 0 10px 2px ${color}` });\n o.appendChild(b);\n return b;\n};\n\nexport const CYBER_FX: EffectDefinition[] = [\n {\n name: 'hud-frame',\n kind: 'enter',\n description: 'Corner brackets draw in around the element and a scan bar sweeps across it, like a HUD locking on (`color`).',\n defaults: { color: '#22d3ee', duration: 900 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const ov = overlay(el, ctx);\n ov.style.overflow = 'visible';\n const runs: (Promise<unknown> | undefined)[] = [];\n ['0 0', '100% 0', '0 100%', '100% 100%'].forEach((pos, i) => {\n const c = document.createElement('span');\n const [x, y] = pos.split(' ');\n Object.assign(c.style, { position: 'absolute', width: '14px', height: '14px', left: x === '0' ? '-4px' : 'calc(100% - 10px)', top: y === '0' ? '-4px' : 'calc(100% - 10px)', borderColor: o.color, borderStyle: 'solid', borderWidth: `${y === '0' ? 2 : 0}px ${x !== '0' ? 2 : 0}px ${y !== '0' ? 2 : 0}px ${x === '0' ? 2 : 0}px` });\n ov.appendChild(c);\n const dx = x === '0' ? -14 : 14;\n const dy = y === '0' ? -14 : 14;\n runs.push(ctx.animate(c, [{ transform: `translate(${dx}px,${dy}px)`, opacity: 0 }, { transform: 'none', opacity: 1, offset: 0.5 }, { transform: 'none', opacity: 1, offset: 0.85 }, { transform: 'none', opacity: 0 }], { duration: o.duration + 500, delay: i * 60, easing: 'ease-out', fill: 'backwards' })?.finished.catch(() => undefined));\n });\n const b = bar(ov, o.color);\n runs.push(ctx.animate(b, [{ transform: 'translateY(0)', opacity: 0 }, { opacity: 1, offset: 0.1 }, { transform: `translateY(${el.clientHeight || 80}px)`, opacity: 0 }], { duration: o.duration, delay: 250, easing: 'ease-in-out', fill: 'backwards' })?.finished.catch(() => undefined));\n runs.push(ctx.animate(el, [{ opacity: 0, filter: 'brightness(2) saturate(0)' }, { opacity: 1, filter: 'none' }], { duration: o.duration, easing: 'steps(6, end)', fill: 'backwards' })?.finished.catch(() => undefined));\n return Promise.all(runs).then(() => ov.remove());\n },\n },\n {\n name: 'scanline-sweep',\n kind: 'attention',\n description: 'A bright horizontal scanline runs down the element (`color`, `passes`).',\n defaults: { color: 'rgba(34,211,238,.9)', passes: 1, duration: 800 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const ov = overlay(el, ctx);\n const b = bar(ov, o.color, '3px');\n const a = ctx.animate(b, [{ transform: 'translateY(-4px)' }, { transform: `translateY(${(el.clientHeight || 80) + 4}px)` }], { duration: o.duration, iterations: Math.max(1, Math.min(5, Number(o.passes) || 1)), easing: 'linear' });\n const end = () => ov.remove();\n return a ? a.finished.then(end, end) : (end(), undefined);\n },\n },\n {\n name: 'hologram',\n kind: 'loop',\n description: 'A flickering, translucent hologram look with drifting scan bands until the cleanup runs (`color`).',\n defaults: { color: '#22d3ee', duration: 2400 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const ov = overlay(el, ctx);\n ov.style.background = `repeating-linear-gradient(0deg, transparent 0 3px, ${o.color}33 3px 4px)`;\n ov.style.mixBlendMode = 'screen';\n const prev = el.style.filter;\n el.style.filter = `drop-shadow(0 0 6px ${o.color}) saturate(1.4)`;\n const a = ctx.animate(el, [{ opacity: 0.85 }, { opacity: 0.6, offset: 0.08 }, { opacity: 0.9, offset: 0.12 }, { opacity: 0.8, offset: 0.5 }, { opacity: 0.55, offset: 0.52 }, { opacity: 0.85 }], { duration: o.duration, iterations: Infinity });\n const b = ctx.animate(ov, [{ backgroundPosition: '0 0' }, { backgroundPosition: '0 40px' }], { duration: 1600, iterations: Infinity, easing: 'linear' });\n return () => {\n a?.cancel();\n b?.cancel();\n ov.remove();\n el.style.filter = prev;\n };\n },\n },\n {\n name: 'data-decode',\n kind: 'enter',\n description: 'The text resolves from random glyphs to the real characters, left to right (`speed` ms per frame).',\n defaults: { speed: 40, frames: 16 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const text = el.textContent || '';\n if (!text.trim() || el.children.length) return;\n const n = Math.max(4, Math.min(60, Number(o.frames) || 16));\n el.setAttribute('aria-label', text);\n let k = 0;\n let timer = 0 as unknown as ReturnType<typeof setTimeout>;\n const restore = () => {\n clearTimeout(timer);\n el.textContent = text;\n el.removeAttribute('aria-label');\n };\n ctx.onCleanup(restore);\n return new Promise<void>((resolve) => {\n const step = () => {\n if (k > n) {\n restore();\n return resolve();\n }\n el.textContent = decodeFrame(text, k++, n);\n timer = setTimeout(step, Math.max(10, Number(o.speed) || 40));\n };\n step();\n });\n },\n },\n];\n\n/** Register hud-frame, scanline-sweep, hologram and data-decode (8.4). */\nexport function registerCyberPack(): void {\n registerEffects(CYBER_FX);\n}\n"],"names":["registerEffects"],"mappings":";;;;;AAkBA,MAAM,MAAM,GAAG,6BAA6B;AAC5C;AACM,SAAU,WAAW,CAAC,IAAY,EAAE,CAAS,EAAE,CAAS,EAAE,G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AAC;AAClC,YAAA,CAAC;AACD,YAAA,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC;AACtB,YAAA,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,KAAI;gBACnC,MAAM,IAAI,GAAG,MAAK;AAChB,oBAAA,IAAI,CAAC,GAAG,CAAC,EAAE;AACT,wBAAA,OAAO,EAAE;wBACT,OAAO,OAAO,EAAE;oBAClB;AACA,oBAAA,EAAE,CAAC,WAAW,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC1C,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AAC/D,gBAAA,CAAC;AACD,gBAAA,IAAI,EAAE;AACR,YAAA,CAAC,CAAC;QACJ,CAAC;AACF,KAAA;;AAGH;SACgB,iBAAiB,GAAA;IAC/BA,wBAAe,CAAC,QAAQ,CAAC;AAC3B;;;;;;"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
type MotionSensitivity = 'full' | 'gentle' | 'minimal' | 'static';
|
|
2
|
+
type Cleanup = () => void;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 5.0 — unified plugin-style effect registration. Every effect (built-in or
|
|
6
|
+
* yours) is a plain object registered once and played the same way:
|
|
7
|
+
* `playEffect(el, name)`, `bindEffect(el, name, { trigger })` or
|
|
8
|
+
* `<usa-fx effect="name" trigger="click">`. Effects get a context that
|
|
9
|
+
* already applies reduced motion, motion sensitivity, intensity and the
|
|
10
|
+
* animation budget.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare const EFFECT_KINDS: readonly ["enter", "exit", "attention", "click", "hover", "card", "loop", "page", "background", "text", "cursor", "scroll"];
|
|
14
|
+
type EffectKind = (typeof EFFECT_KINDS)[number];
|
|
15
|
+
interface EffectContext {
|
|
16
|
+
/** Reduced motion applies (OS setting, `minimal` / `static` sensitivity). */
|
|
17
|
+
readonly reduced: boolean;
|
|
18
|
+
readonly sensitivity: MotionSensitivity;
|
|
19
|
+
/** The triggering event (pointer position for click effects), if any. */
|
|
20
|
+
readonly event?: Event;
|
|
21
|
+
/** `el.animate()` with the library's motion rules (may return `null`). */
|
|
22
|
+
animate(el: Element, keyframes: Keyframe[], options: KeyframeAnimationOptions): Animation | null;
|
|
23
|
+
/** Register teardown for long-running effects (loops, listeners). */
|
|
24
|
+
onCleanup(fn: Cleanup): void;
|
|
25
|
+
}
|
|
26
|
+
interface EffectDefinition<O extends Record<string, unknown> = Record<string, any>> {
|
|
27
|
+
/** Unique, kebab-case. */
|
|
28
|
+
name: string;
|
|
29
|
+
kind: EffectKind;
|
|
30
|
+
/** One line for docs and the gallery. */
|
|
31
|
+
description?: string;
|
|
32
|
+
/** Option defaults (merged under the caller's options). */
|
|
33
|
+
defaults?: Partial<O>;
|
|
34
|
+
/**
|
|
35
|
+
* Under reduced motion: `'skip'` (do nothing — default for loop, background
|
|
36
|
+
* and cursor effects) or `'run'` (run with `ctx.reduced === true`, the
|
|
37
|
+
* effect degrades itself — default for everything else).
|
|
38
|
+
*/
|
|
39
|
+
reduced?: 'skip' | 'run';
|
|
40
|
+
/** Play the effect. Return an Animation / Promise to be awaited, or a cleanup. */
|
|
41
|
+
run(el: HTMLElement, options: O, ctx: EffectContext): void | Cleanup | Animation | null | Promise<unknown>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 8.4 — Cyber / sci-fi pack (`motionary/fx/cyber`, also `motionary/components/fx-cyber`):
|
|
46
|
+
*
|
|
47
|
+
* - `hud-frame` (enter) — corner brackets draw in around the element and a
|
|
48
|
+
* scan bar sweeps across it, like a HUD locking on (`color`).
|
|
49
|
+
* - `scanline-sweep` (attention) — a bright horizontal scanline runs down
|
|
50
|
+
* the element (`color`, `passes`).
|
|
51
|
+
* - `hologram` (loop) — a flickering, translucent cyan hologram look with
|
|
52
|
+
* drifting scan bands; the cleanup restores the element (`color`).
|
|
53
|
+
* - `data-decode` (enter) — the text resolves from random glyphs to the real
|
|
54
|
+
* characters, left to right (`speed`).
|
|
55
|
+
*
|
|
56
|
+
* Reduced motion: hud-frame / data-decode just show, scanline-sweep does
|
|
57
|
+
* nothing, hologram is skipped. Overlays are `aria-hidden` and removed.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/** The `k`-th frame of decoding `text` over `n` frames: resolved prefix + random glyphs (8.4). */
|
|
61
|
+
declare function decodeFrame(text: string, k: number, n: number, rnd?: () => number): string;
|
|
62
|
+
declare const CYBER_FX: EffectDefinition[];
|
|
63
|
+
/** Register hud-frame, scanline-sweep, hologram and data-decode (8.4). */
|
|
64
|
+
declare function registerCyberPack(): void;
|
|
65
|
+
|
|
66
|
+
export { CYBER_FX, decodeFrame, registerCyberPack };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
type MotionSensitivity = 'full' | 'gentle' | 'minimal' | 'static';
|
|
2
|
+
type Cleanup = () => void;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 5.0 — unified plugin-style effect registration. Every effect (built-in or
|
|
6
|
+
* yours) is a plain object registered once and played the same way:
|
|
7
|
+
* `playEffect(el, name)`, `bindEffect(el, name, { trigger })` or
|
|
8
|
+
* `<usa-fx effect="name" trigger="click">`. Effects get a context that
|
|
9
|
+
* already applies reduced motion, motion sensitivity, intensity and the
|
|
10
|
+
* animation budget.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare const EFFECT_KINDS: readonly ["enter", "exit", "attention", "click", "hover", "card", "loop", "page", "background", "text", "cursor", "scroll"];
|
|
14
|
+
type EffectKind = (typeof EFFECT_KINDS)[number];
|
|
15
|
+
interface EffectContext {
|
|
16
|
+
/** Reduced motion applies (OS setting, `minimal` / `static` sensitivity). */
|
|
17
|
+
readonly reduced: boolean;
|
|
18
|
+
readonly sensitivity: MotionSensitivity;
|
|
19
|
+
/** The triggering event (pointer position for click effects), if any. */
|
|
20
|
+
readonly event?: Event;
|
|
21
|
+
/** `el.animate()` with the library's motion rules (may return `null`). */
|
|
22
|
+
animate(el: Element, keyframes: Keyframe[], options: KeyframeAnimationOptions): Animation | null;
|
|
23
|
+
/** Register teardown for long-running effects (loops, listeners). */
|
|
24
|
+
onCleanup(fn: Cleanup): void;
|
|
25
|
+
}
|
|
26
|
+
interface EffectDefinition<O extends Record<string, unknown> = Record<string, any>> {
|
|
27
|
+
/** Unique, kebab-case. */
|
|
28
|
+
name: string;
|
|
29
|
+
kind: EffectKind;
|
|
30
|
+
/** One line for docs and the gallery. */
|
|
31
|
+
description?: string;
|
|
32
|
+
/** Option defaults (merged under the caller's options). */
|
|
33
|
+
defaults?: Partial<O>;
|
|
34
|
+
/**
|
|
35
|
+
* Under reduced motion: `'skip'` (do nothing — default for loop, background
|
|
36
|
+
* and cursor effects) or `'run'` (run with `ctx.reduced === true`, the
|
|
37
|
+
* effect degrades itself — default for everything else).
|
|
38
|
+
*/
|
|
39
|
+
reduced?: 'skip' | 'run';
|
|
40
|
+
/** Play the effect. Return an Animation / Promise to be awaited, or a cleanup. */
|
|
41
|
+
run(el: HTMLElement, options: O, ctx: EffectContext): void | Cleanup | Animation | null | Promise<unknown>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 8.4 — Cyber / sci-fi pack (`motionary/fx/cyber`, also `motionary/components/fx-cyber`):
|
|
46
|
+
*
|
|
47
|
+
* - `hud-frame` (enter) — corner brackets draw in around the element and a
|
|
48
|
+
* scan bar sweeps across it, like a HUD locking on (`color`).
|
|
49
|
+
* - `scanline-sweep` (attention) — a bright horizontal scanline runs down
|
|
50
|
+
* the element (`color`, `passes`).
|
|
51
|
+
* - `hologram` (loop) — a flickering, translucent cyan hologram look with
|
|
52
|
+
* drifting scan bands; the cleanup restores the element (`color`).
|
|
53
|
+
* - `data-decode` (enter) — the text resolves from random glyphs to the real
|
|
54
|
+
* characters, left to right (`speed`).
|
|
55
|
+
*
|
|
56
|
+
* Reduced motion: hud-frame / data-decode just show, scanline-sweep does
|
|
57
|
+
* nothing, hologram is skipped. Overlays are `aria-hidden` and removed.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
/** The `k`-th frame of decoding `text` over `n` frames: resolved prefix + random glyphs (8.4). */
|
|
61
|
+
declare function decodeFrame(text: string, k: number, n: number, rnd?: () => number): string;
|
|
62
|
+
declare const CYBER_FX: EffectDefinition[];
|
|
63
|
+
/** Register hud-frame, scanline-sweep, hologram and data-decode (8.4). */
|
|
64
|
+
declare function registerCyberPack(): void;
|
|
65
|
+
|
|
66
|
+
export { CYBER_FX, decodeFrame, registerCyberPack };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { registerEffects } from '../chunks/registry-CnO7ZVPK.js';
|
|
2
|
+
import '../chunks/base-CLuqlLfG.js';
|
|
3
|
+
|
|
4
|
+
const GLYPHS = '01<>/\\[]{}#$%&*+=ABCDEFXYZ';
|
|
5
|
+
/** The `k`-th frame of decoding `text` over `n` frames: resolved prefix + random glyphs (8.4). */
|
|
6
|
+
function decodeFrame(text, k, n, rnd = Math.random) {
|
|
7
|
+
const done = Math.floor((Math.min(n, Math.max(0, k)) / n) * text.length);
|
|
8
|
+
let out = text.slice(0, done);
|
|
9
|
+
for (let i = done; i < text.length; i++)
|
|
10
|
+
out += /\s/.test(text[i]) ? text[i] : GLYPHS[Math.floor(rnd() * GLYPHS.length)];
|
|
11
|
+
return out;
|
|
12
|
+
}
|
|
13
|
+
const overlay = (el, ctx) => {
|
|
14
|
+
if (getComputedStyle(el).position === 'static') {
|
|
15
|
+
const prev = el.style.position;
|
|
16
|
+
el.style.position = 'relative';
|
|
17
|
+
ctx.onCleanup(() => (el.style.position = prev));
|
|
18
|
+
}
|
|
19
|
+
const o = document.createElement('span');
|
|
20
|
+
o.setAttribute('aria-hidden', 'true');
|
|
21
|
+
Object.assign(o.style, { position: 'absolute', inset: '0', pointerEvents: 'none', overflow: 'hidden', borderRadius: 'inherit' });
|
|
22
|
+
el.appendChild(o);
|
|
23
|
+
ctx.onCleanup(() => o.remove());
|
|
24
|
+
return o;
|
|
25
|
+
};
|
|
26
|
+
const bar = (o, color, h = '2px') => {
|
|
27
|
+
const b = document.createElement('span');
|
|
28
|
+
Object.assign(b.style, { position: 'absolute', left: '0', right: '0', top: '0', height: h, background: color, boxShadow: `0 0 10px 2px ${color}` });
|
|
29
|
+
o.appendChild(b);
|
|
30
|
+
return b;
|
|
31
|
+
};
|
|
32
|
+
const CYBER_FX = [
|
|
33
|
+
{
|
|
34
|
+
name: 'hud-frame',
|
|
35
|
+
kind: 'enter',
|
|
36
|
+
description: 'Corner brackets draw in around the element and a scan bar sweeps across it, like a HUD locking on (`color`).',
|
|
37
|
+
defaults: { color: '#22d3ee', duration: 900 },
|
|
38
|
+
run: (el, o, ctx) => {
|
|
39
|
+
if (ctx.reduced)
|
|
40
|
+
return;
|
|
41
|
+
const ov = overlay(el, ctx);
|
|
42
|
+
ov.style.overflow = 'visible';
|
|
43
|
+
const runs = [];
|
|
44
|
+
['0 0', '100% 0', '0 100%', '100% 100%'].forEach((pos, i) => {
|
|
45
|
+
const c = document.createElement('span');
|
|
46
|
+
const [x, y] = pos.split(' ');
|
|
47
|
+
Object.assign(c.style, { position: 'absolute', width: '14px', height: '14px', left: x === '0' ? '-4px' : 'calc(100% - 10px)', top: y === '0' ? '-4px' : 'calc(100% - 10px)', borderColor: o.color, borderStyle: 'solid', borderWidth: `${y === '0' ? 2 : 0}px ${x !== '0' ? 2 : 0}px ${y !== '0' ? 2 : 0}px ${x === '0' ? 2 : 0}px` });
|
|
48
|
+
ov.appendChild(c);
|
|
49
|
+
const dx = x === '0' ? -14 : 14;
|
|
50
|
+
const dy = y === '0' ? -14 : 14;
|
|
51
|
+
runs.push(ctx.animate(c, [{ transform: `translate(${dx}px,${dy}px)`, opacity: 0 }, { transform: 'none', opacity: 1, offset: 0.5 }, { transform: 'none', opacity: 1, offset: 0.85 }, { transform: 'none', opacity: 0 }], { duration: o.duration + 500, delay: i * 60, easing: 'ease-out', fill: 'backwards' })?.finished.catch(() => undefined));
|
|
52
|
+
});
|
|
53
|
+
const b = bar(ov, o.color);
|
|
54
|
+
runs.push(ctx.animate(b, [{ transform: 'translateY(0)', opacity: 0 }, { opacity: 1, offset: 0.1 }, { transform: `translateY(${el.clientHeight || 80}px)`, opacity: 0 }], { duration: o.duration, delay: 250, easing: 'ease-in-out', fill: 'backwards' })?.finished.catch(() => undefined));
|
|
55
|
+
runs.push(ctx.animate(el, [{ opacity: 0, filter: 'brightness(2) saturate(0)' }, { opacity: 1, filter: 'none' }], { duration: o.duration, easing: 'steps(6, end)', fill: 'backwards' })?.finished.catch(() => undefined));
|
|
56
|
+
return Promise.all(runs).then(() => ov.remove());
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'scanline-sweep',
|
|
61
|
+
kind: 'attention',
|
|
62
|
+
description: 'A bright horizontal scanline runs down the element (`color`, `passes`).',
|
|
63
|
+
defaults: { color: 'rgba(34,211,238,.9)', passes: 1, duration: 800 },
|
|
64
|
+
run: (el, o, ctx) => {
|
|
65
|
+
if (ctx.reduced)
|
|
66
|
+
return;
|
|
67
|
+
const ov = overlay(el, ctx);
|
|
68
|
+
const b = bar(ov, o.color, '3px');
|
|
69
|
+
const a = ctx.animate(b, [{ transform: 'translateY(-4px)' }, { transform: `translateY(${(el.clientHeight || 80) + 4}px)` }], { duration: o.duration, iterations: Math.max(1, Math.min(5, Number(o.passes) || 1)), easing: 'linear' });
|
|
70
|
+
const end = () => ov.remove();
|
|
71
|
+
return a ? a.finished.then(end, end) : (end(), undefined);
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'hologram',
|
|
76
|
+
kind: 'loop',
|
|
77
|
+
description: 'A flickering, translucent hologram look with drifting scan bands until the cleanup runs (`color`).',
|
|
78
|
+
defaults: { color: '#22d3ee', duration: 2400 },
|
|
79
|
+
run: (el, o, ctx) => {
|
|
80
|
+
const ov = overlay(el, ctx);
|
|
81
|
+
ov.style.background = `repeating-linear-gradient(0deg, transparent 0 3px, ${o.color}33 3px 4px)`;
|
|
82
|
+
ov.style.mixBlendMode = 'screen';
|
|
83
|
+
const prev = el.style.filter;
|
|
84
|
+
el.style.filter = `drop-shadow(0 0 6px ${o.color}) saturate(1.4)`;
|
|
85
|
+
const a = ctx.animate(el, [{ opacity: 0.85 }, { opacity: 0.6, offset: 0.08 }, { opacity: 0.9, offset: 0.12 }, { opacity: 0.8, offset: 0.5 }, { opacity: 0.55, offset: 0.52 }, { opacity: 0.85 }], { duration: o.duration, iterations: Infinity });
|
|
86
|
+
const b = ctx.animate(ov, [{ backgroundPosition: '0 0' }, { backgroundPosition: '0 40px' }], { duration: 1600, iterations: Infinity, easing: 'linear' });
|
|
87
|
+
return () => {
|
|
88
|
+
a?.cancel();
|
|
89
|
+
b?.cancel();
|
|
90
|
+
ov.remove();
|
|
91
|
+
el.style.filter = prev;
|
|
92
|
+
};
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: 'data-decode',
|
|
97
|
+
kind: 'enter',
|
|
98
|
+
description: 'The text resolves from random glyphs to the real characters, left to right (`speed` ms per frame).',
|
|
99
|
+
defaults: { speed: 40, frames: 16 },
|
|
100
|
+
run: (el, o, ctx) => {
|
|
101
|
+
if (ctx.reduced)
|
|
102
|
+
return;
|
|
103
|
+
const text = el.textContent || '';
|
|
104
|
+
if (!text.trim() || el.children.length)
|
|
105
|
+
return;
|
|
106
|
+
const n = Math.max(4, Math.min(60, Number(o.frames) || 16));
|
|
107
|
+
el.setAttribute('aria-label', text);
|
|
108
|
+
let k = 0;
|
|
109
|
+
let timer = 0;
|
|
110
|
+
const restore = () => {
|
|
111
|
+
clearTimeout(timer);
|
|
112
|
+
el.textContent = text;
|
|
113
|
+
el.removeAttribute('aria-label');
|
|
114
|
+
};
|
|
115
|
+
ctx.onCleanup(restore);
|
|
116
|
+
return new Promise((resolve) => {
|
|
117
|
+
const step = () => {
|
|
118
|
+
if (k > n) {
|
|
119
|
+
restore();
|
|
120
|
+
return resolve();
|
|
121
|
+
}
|
|
122
|
+
el.textContent = decodeFrame(text, k++, n);
|
|
123
|
+
timer = setTimeout(step, Math.max(10, Number(o.speed) || 40));
|
|
124
|
+
};
|
|
125
|
+
step();
|
|
126
|
+
});
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
];
|
|
130
|
+
/** Register hud-frame, scanline-sweep, hologram and data-decode (8.4). */
|
|
131
|
+
function registerCyberPack() {
|
|
132
|
+
registerEffects(CYBER_FX);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export { CYBER_FX, decodeFrame, registerCyberPack };
|
|
136
|
+
//# sourceMappingURL=fx-cyber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fx-cyber.js","sources":["../../src/components/fx2/cyber.ts"],"sourcesContent":["/**\n * 8.4 — Cyber / sci-fi pack (`motionary/fx/cyber`, also `motionary/components/fx-cyber`):\n *\n * - `hud-frame` (enter) — corner brackets draw in around the element and a\n * scan bar sweeps across it, like a HUD locking on (`color`).\n * - `scanline-sweep` (attention) — a bright horizontal scanline runs down\n * the element (`color`, `passes`).\n * - `hologram` (loop) — a flickering, translucent cyan hologram look with\n * drifting scan bands; the cleanup restores the element (`color`).\n * - `data-decode` (enter) — the text resolves from random glyphs to the real\n * characters, left to right (`speed`).\n *\n * Reduced motion: hud-frame / data-decode just show, scanline-sweep does\n * nothing, hologram is skipped. Overlays are `aria-hidden` and removed.\n */\nimport type { EffectContext, EffectDefinition } from '../fx/registry';\nimport { registerEffects } from '../fx/registry';\n\nconst GLYPHS = '01<>/\\\\[]{}#$%&*+=ABCDEFXYZ';\n/** The `k`-th frame of decoding `text` over `n` frames: resolved prefix + random glyphs (8.4). */\nexport function decodeFrame(text: string, k: number, n: number, rnd: () => number = Math.random): string {\n const done = Math.floor((Math.min(n, Math.max(0, k)) / n) * text.length);\n let out = text.slice(0, done);\n for (let i = done; i < text.length; i++) out += /\\s/.test(text[i]) ? text[i] : GLYPHS[Math.floor(rnd() * GLYPHS.length)];\n return out;\n}\n\nconst overlay = (el: HTMLElement, ctx: EffectContext) => {\n if (getComputedStyle(el).position === 'static') {\n const prev = el.style.position;\n el.style.position = 'relative';\n ctx.onCleanup(() => (el.style.position = prev));\n }\n const o = document.createElement('span');\n o.setAttribute('aria-hidden', 'true');\n Object.assign(o.style, { position: 'absolute', inset: '0', pointerEvents: 'none', overflow: 'hidden', borderRadius: 'inherit' });\n el.appendChild(o);\n ctx.onCleanup(() => o.remove());\n return o;\n};\nconst bar = (o: HTMLElement, color: string, h = '2px') => {\n const b = document.createElement('span');\n Object.assign(b.style, { position: 'absolute', left: '0', right: '0', top: '0', height: h, background: color, boxShadow: `0 0 10px 2px ${color}` });\n o.appendChild(b);\n return b;\n};\n\nexport const CYBER_FX: EffectDefinition[] = [\n {\n name: 'hud-frame',\n kind: 'enter',\n description: 'Corner brackets draw in around the element and a scan bar sweeps across it, like a HUD locking on (`color`).',\n defaults: { color: '#22d3ee', duration: 900 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const ov = overlay(el, ctx);\n ov.style.overflow = 'visible';\n const runs: (Promise<unknown> | undefined)[] = [];\n ['0 0', '100% 0', '0 100%', '100% 100%'].forEach((pos, i) => {\n const c = document.createElement('span');\n const [x, y] = pos.split(' ');\n Object.assign(c.style, { position: 'absolute', width: '14px', height: '14px', left: x === '0' ? '-4px' : 'calc(100% - 10px)', top: y === '0' ? '-4px' : 'calc(100% - 10px)', borderColor: o.color, borderStyle: 'solid', borderWidth: `${y === '0' ? 2 : 0}px ${x !== '0' ? 2 : 0}px ${y !== '0' ? 2 : 0}px ${x === '0' ? 2 : 0}px` });\n ov.appendChild(c);\n const dx = x === '0' ? -14 : 14;\n const dy = y === '0' ? -14 : 14;\n runs.push(ctx.animate(c, [{ transform: `translate(${dx}px,${dy}px)`, opacity: 0 }, { transform: 'none', opacity: 1, offset: 0.5 }, { transform: 'none', opacity: 1, offset: 0.85 }, { transform: 'none', opacity: 0 }], { duration: o.duration + 500, delay: i * 60, easing: 'ease-out', fill: 'backwards' })?.finished.catch(() => undefined));\n });\n const b = bar(ov, o.color);\n runs.push(ctx.animate(b, [{ transform: 'translateY(0)', opacity: 0 }, { opacity: 1, offset: 0.1 }, { transform: `translateY(${el.clientHeight || 80}px)`, opacity: 0 }], { duration: o.duration, delay: 250, easing: 'ease-in-out', fill: 'backwards' })?.finished.catch(() => undefined));\n runs.push(ctx.animate(el, [{ opacity: 0, filter: 'brightness(2) saturate(0)' }, { opacity: 1, filter: 'none' }], { duration: o.duration, easing: 'steps(6, end)', fill: 'backwards' })?.finished.catch(() => undefined));\n return Promise.all(runs).then(() => ov.remove());\n },\n },\n {\n name: 'scanline-sweep',\n kind: 'attention',\n description: 'A bright horizontal scanline runs down the element (`color`, `passes`).',\n defaults: { color: 'rgba(34,211,238,.9)', passes: 1, duration: 800 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const ov = overlay(el, ctx);\n const b = bar(ov, o.color, '3px');\n const a = ctx.animate(b, [{ transform: 'translateY(-4px)' }, { transform: `translateY(${(el.clientHeight || 80) + 4}px)` }], { duration: o.duration, iterations: Math.max(1, Math.min(5, Number(o.passes) || 1)), easing: 'linear' });\n const end = () => ov.remove();\n return a ? a.finished.then(end, end) : (end(), undefined);\n },\n },\n {\n name: 'hologram',\n kind: 'loop',\n description: 'A flickering, translucent hologram look with drifting scan bands until the cleanup runs (`color`).',\n defaults: { color: '#22d3ee', duration: 2400 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n const ov = overlay(el, ctx);\n ov.style.background = `repeating-linear-gradient(0deg, transparent 0 3px, ${o.color}33 3px 4px)`;\n ov.style.mixBlendMode = 'screen';\n const prev = el.style.filter;\n el.style.filter = `drop-shadow(0 0 6px ${o.color}) saturate(1.4)`;\n const a = ctx.animate(el, [{ opacity: 0.85 }, { opacity: 0.6, offset: 0.08 }, { opacity: 0.9, offset: 0.12 }, { opacity: 0.8, offset: 0.5 }, { opacity: 0.55, offset: 0.52 }, { opacity: 0.85 }], { duration: o.duration, iterations: Infinity });\n const b = ctx.animate(ov, [{ backgroundPosition: '0 0' }, { backgroundPosition: '0 40px' }], { duration: 1600, iterations: Infinity, easing: 'linear' });\n return () => {\n a?.cancel();\n b?.cancel();\n ov.remove();\n el.style.filter = prev;\n };\n },\n },\n {\n name: 'data-decode',\n kind: 'enter',\n description: 'The text resolves from random glyphs to the real characters, left to right (`speed` ms per frame).',\n defaults: { speed: 40, frames: 16 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const text = el.textContent || '';\n if (!text.trim() || el.children.length) return;\n const n = Math.max(4, Math.min(60, Number(o.frames) || 16));\n el.setAttribute('aria-label', text);\n let k = 0;\n let timer = 0 as unknown as ReturnType<typeof setTimeout>;\n const restore = () => {\n clearTimeout(timer);\n el.textContent = text;\n el.removeAttribute('aria-label');\n };\n ctx.onCleanup(restore);\n return new Promise<void>((resolve) => {\n const step = () => {\n if (k > n) {\n restore();\n return resolve();\n }\n el.textContent = decodeFrame(text, k++, n);\n timer = setTimeout(step, Math.max(10, Number(o.speed) || 40));\n };\n step();\n });\n },\n },\n];\n\n/** Register hud-frame, scanline-sweep, hologram and data-decode (8.4). */\nexport function registerCyberPack(): void {\n registerEffects(CYBER_FX);\n}\n"],"names":[],"mappings":";;;AAkBA,MAAM,MAAM,GAAG,6BAA6B;AAC5C;AACM,SAAU,WAAW,CAAC,IAAY,EAAE,CAAS,EAAE,CAAS,EAAE,GAAA,GAAoB,IAAI,CAAC,MAAM,EAAA;AAC7F,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,C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I,GAAG,MAAK;AAChB,oBAAA,IAAI,CAAC,GAAG,CAAC,EAAE;AACT,wBAAA,OAAO,EAAE;wBACT,OAAO,OAAO,EAAE;oBAClB;AACA,oBAAA,EAAE,CAAC,WAAW,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC1C,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AAC/D,gBAAA,CAAC;AACD,gBAAA,IAAI,EAAE;AACR,YAAA,CAAC,CAAC;QACJ,CAAC;AACF,KAAA;;AAGH;SACgB,iBAAiB,GAAA;IAC/B,eAAe,CAAC,QAAQ,CAAC;AAC3B;;;;"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var registry = require('../chunks/registry-BVklOepd.cjs');
|
|
4
|
+
require('../chunks/base-DoRUZBy-.cjs');
|
|
5
|
+
|
|
6
|
+
/** A blob border-radius ("63% 37% 54% 46% / 55% 48% 52% 45%") from a seed (8.3). */
|
|
7
|
+
function blobRadius(seed) {
|
|
8
|
+
let s = Math.abs(Math.round(seed * 1000)) % 233280 || 7;
|
|
9
|
+
const r = () => 30 + ((s = (s * 9301 + 49297) % 233280) / 233280) * 40;
|
|
10
|
+
const a = [r(), r(), r(), r()].map(Math.round);
|
|
11
|
+
const b = [r(), r(), r(), r()].map(Math.round);
|
|
12
|
+
return `${a[0]}% ${100 - a[0]}% ${a[2]}% ${100 - a[2]}% / ${b[0]}% ${b[1]}% ${100 - b[1]}% ${100 - b[0]}%`;
|
|
13
|
+
}
|
|
14
|
+
const fade = (el, ctx) => ctx.animate(el, [{ opacity: 0 }, { opacity: 1 }], { duration: 250 })?.finished.catch(() => undefined);
|
|
15
|
+
const ORGANIC_FX = [
|
|
16
|
+
{
|
|
17
|
+
name: 'vine-grow',
|
|
18
|
+
kind: 'enter',
|
|
19
|
+
description: 'SVG paths grow along their length like a vine; `[data-leaf]` / circles pop in along the way (`duration`).',
|
|
20
|
+
defaults: { duration: 1600 },
|
|
21
|
+
run: (el, o, ctx) => {
|
|
22
|
+
if (ctx.reduced)
|
|
23
|
+
return;
|
|
24
|
+
const paths = Array.from(el.querySelectorAll('path, polyline, line'));
|
|
25
|
+
const leaves = Array.from(el.querySelectorAll('[data-leaf], circle, ellipse'));
|
|
26
|
+
const runs = paths.map((p) => {
|
|
27
|
+
let len = 300;
|
|
28
|
+
try {
|
|
29
|
+
len = p.getTotalLength?.() || 300;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
/* not rendered */
|
|
33
|
+
}
|
|
34
|
+
const prev = p.style.strokeDasharray;
|
|
35
|
+
p.style.strokeDasharray = `${len}`;
|
|
36
|
+
ctx.onCleanup(() => (p.style.strokeDasharray = prev));
|
|
37
|
+
return ctx.animate(p, [{ strokeDashoffset: `${len}` }, { strokeDashoffset: '0' }], { duration: o.duration, easing: 'cubic-bezier(.4,.1,.3,1)', fill: 'backwards' })?.finished.catch(() => undefined);
|
|
38
|
+
});
|
|
39
|
+
leaves.forEach((l, i) => {
|
|
40
|
+
l.style.transformBox = 'fill-box';
|
|
41
|
+
l.style.transformOrigin = 'center';
|
|
42
|
+
runs.push(ctx.animate(l, [{ transform: 'scale(0) rotate(-40deg)', opacity: 0 }, { transform: 'scale(1.2) rotate(8deg)', opacity: 1, offset: 0.7 }, { transform: 'none', opacity: 1 }], { duration: 500, delay: (o.duration * (i + 1)) / (leaves.length + 1), easing: 'ease-out', fill: 'backwards' })?.finished.catch(() => undefined));
|
|
43
|
+
});
|
|
44
|
+
return Promise.all(runs).then(() => undefined);
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'bloom',
|
|
49
|
+
kind: 'enter',
|
|
50
|
+
description: "The element's children unfold from the centre like petals, or the element blooms open (`stagger`).",
|
|
51
|
+
defaults: { stagger: 70, duration: 700 },
|
|
52
|
+
run: (el, o, ctx) => {
|
|
53
|
+
const kids = Array.from(el.children);
|
|
54
|
+
const items = kids.length > 1 ? kids : [el];
|
|
55
|
+
return Promise.all(items.map((k, i) => {
|
|
56
|
+
if (ctx.reduced)
|
|
57
|
+
return fade(k, ctx);
|
|
58
|
+
const rot = (i % 2 ? 1 : -1) * (25 + i * 6);
|
|
59
|
+
return ctx.animate(k, [{ transform: `scale(0) rotate(${rot}deg)`, opacity: 0 }, { transform: 'scale(1.1) rotate(-3deg)', opacity: 1, offset: 0.65 }, { transform: 'none', opacity: 1 }], { duration: o.duration, delay: i * o.stagger, easing: 'cubic-bezier(.3,1.3,.5,1)', fill: 'backwards' })?.finished.catch(() => undefined);
|
|
60
|
+
})).then(() => undefined);
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'water-drop',
|
|
65
|
+
kind: 'attention',
|
|
66
|
+
description: 'The element dips like a drop hit water and concentric ripples spread out (`rings`, `color`).',
|
|
67
|
+
defaults: { rings: 3, color: 'rgba(14,165,233,.55)', duration: 1200 },
|
|
68
|
+
run: (el, o, ctx) => {
|
|
69
|
+
if (ctx.reduced)
|
|
70
|
+
return;
|
|
71
|
+
if (getComputedStyle(el).position === 'static') {
|
|
72
|
+
const prev = el.style.position;
|
|
73
|
+
el.style.position = 'relative';
|
|
74
|
+
ctx.onCleanup(() => (el.style.position = prev));
|
|
75
|
+
}
|
|
76
|
+
const runs = [ctx.animate(el, [{ transform: 'none' }, { transform: 'scale(.94, .9) translateY(3px)', offset: 0.2 }, { transform: 'scale(1.03, 1.05)', offset: 0.45 }, { transform: 'none' }], { duration: 700, easing: 'ease-out' })?.finished.catch(() => undefined)];
|
|
77
|
+
const n = Math.max(1, Math.min(5, Number(o.rings) || 3));
|
|
78
|
+
for (let i = 0; i < n; i++) {
|
|
79
|
+
const r = document.createElement('span');
|
|
80
|
+
r.setAttribute('aria-hidden', 'true');
|
|
81
|
+
Object.assign(r.style, { position: 'absolute', left: '50%', top: '50%', width: '100%', aspectRatio: '2 / 1', borderRadius: '50%', border: `2px solid ${o.color}`, translate: '-50% -50%', pointerEvents: 'none' });
|
|
82
|
+
el.appendChild(r);
|
|
83
|
+
const end = () => r.remove();
|
|
84
|
+
ctx.onCleanup(end);
|
|
85
|
+
const a = ctx.animate(r, [{ transform: 'scale(.2)', opacity: 1 }, { transform: 'scale(1.9)', opacity: 0 }], { duration: o.duration, delay: 120 + i * 220, easing: 'ease-out', fill: 'backwards' });
|
|
86
|
+
runs.push(a ? a.finished.then(end, end) : (end(), undefined));
|
|
87
|
+
}
|
|
88
|
+
return Promise.all(runs).then(() => undefined);
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: 'breathe',
|
|
93
|
+
kind: 'loop',
|
|
94
|
+
description: 'A slow organic morph of shape and scale, like a living blob, until the cleanup runs (`duration`).',
|
|
95
|
+
defaults: { duration: 6000 },
|
|
96
|
+
run: (el, o, ctx) => {
|
|
97
|
+
const prev = el.style.borderRadius;
|
|
98
|
+
const frames = [0, 1, 2, 3, 0].map((i, k) => ({ borderRadius: blobRadius(i + 1), transform: `scale(${k % 2 ? 1.04 : 1}) rotate(${k % 2 ? 4 : -2}deg)`, offset: k / 4 }));
|
|
99
|
+
const a = ctx.animate(el, frames, { duration: o.duration, iterations: Infinity, easing: 'ease-in-out' });
|
|
100
|
+
return () => {
|
|
101
|
+
a?.cancel();
|
|
102
|
+
el.style.borderRadius = prev;
|
|
103
|
+
};
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
/** Register vine-grow, bloom, water-drop and breathe (8.3). */
|
|
108
|
+
function registerOrganicPack() {
|
|
109
|
+
registry.registerEffects(ORGANIC_FX);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
exports.ORGANIC_FX = ORGANIC_FX;
|
|
113
|
+
exports.blobRadius = blobRadius;
|
|
114
|
+
exports.registerOrganicPack = registerOrganicPack;
|
|
115
|
+
//# sourceMappingURL=fx-organic.cjs.map
|