motionary 9.9.0 → 10.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +45 -0
  3. package/bin/create-motionary-plugin.mjs +124 -0
  4. package/dist/chunks/{audio-C1uFaOKQ.js → audio-D95jwlOh.js} +3 -3
  5. package/dist/chunks/{audio-C1uFaOKQ.js.map → audio-D95jwlOh.js.map} +1 -1
  6. package/dist/chunks/{base-DWYNLg6P.js → base-BnRyfuyM.js} +2 -2
  7. package/dist/chunks/{base-DWYNLg6P.js.map → base-BnRyfuyM.js.map} +1 -1
  8. package/dist/chunks/{builtins-DoCY96r9.js → builtins-CqIq1zBv.js} +3 -3
  9. package/dist/chunks/{builtins-DoCY96r9.js.map → builtins-CqIq1zBv.js.map} +1 -1
  10. package/dist/chunks/{core-DoR4w-E4.js → core-DsGoL9EY.js} +2 -2
  11. package/dist/chunks/{core-DoR4w-E4.js.map → core-DsGoL9EY.js.map} +1 -1
  12. package/dist/chunks/{core-BhuojMcL.js → core-XA2yhn1b.js} +2 -2
  13. package/dist/chunks/{core-BhuojMcL.js.map → core-XA2yhn1b.js.map} +1 -1
  14. package/dist/chunks/{fx-XBDr7-dH.js → fx-CtnrFEg9.js} +2 -2
  15. package/dist/chunks/{fx-XBDr7-dH.js.map → fx-CtnrFEg9.js.map} +1 -1
  16. package/dist/chunks/{gpu-DvLHwLxy.js → gpu-CDcXiNA8.js} +2 -2
  17. package/dist/chunks/{gpu-DvLHwLxy.js.map → gpu-CDcXiNA8.js.map} +1 -1
  18. package/dist/chunks/keyframes-CyH_abhI.js +183 -0
  19. package/dist/chunks/keyframes-CyH_abhI.js.map +1 -0
  20. package/dist/chunks/keyframes-cUdsXSXQ.cjs +187 -0
  21. package/dist/chunks/keyframes-cUdsXSXQ.cjs.map +1 -0
  22. package/dist/chunks/{manifest-BDpbuI-9.js → manifest-D58HXVY-.js} +2 -2
  23. package/dist/chunks/{manifest-BDpbuI-9.js.map → manifest-D58HXVY-.js.map} +1 -1
  24. package/dist/chunks/{player-CYGvna09.js → player-48Zy_NBG.js} +4 -4
  25. package/dist/chunks/{player-CYGvna09.js.map → player-48Zy_NBG.js.map} +1 -1
  26. package/dist/chunks/registry-C0xLNq3-.cjs +81 -0
  27. package/dist/chunks/registry-C0xLNq3-.cjs.map +1 -0
  28. package/dist/chunks/{registry-BRM2BRRY.js → registry-gFJRpPES.js} +2 -2
  29. package/dist/chunks/{registry-BRM2BRRY.js.map → registry-gFJRpPES.js.map} +1 -1
  30. package/dist/chunks/registry-jF8VIA_9.js +69 -0
  31. package/dist/chunks/registry-jF8VIA_9.js.map +1 -0
  32. package/dist/chunks/{spring-CAlkc1co.js → spring-CZDNyqWp.js} +2 -2
  33. package/dist/chunks/{spring-CAlkc1co.js.map → spring-CZDNyqWp.js.map} +1 -1
  34. package/dist/chunks/tween-DDObu9iA.js +542 -0
  35. package/dist/chunks/tween-DDObu9iA.js.map +1 -0
  36. package/dist/chunks/tween-JEthWrjo.cjs +554 -0
  37. package/dist/chunks/tween-JEthWrjo.cjs.map +1 -0
  38. package/dist/chunks/{variants-BBfyVPYm.js → variants-GU3yIL4F.js} +2 -2
  39. package/dist/chunks/{variants-BBfyVPYm.js.map → variants-GU3yIL4F.js.map} +1 -1
  40. package/dist/components/a11y.js +2 -2
  41. package/dist/components/angular.js +8 -8
  42. package/dist/components/background.js +2 -2
  43. package/dist/components/bridge.js +1 -1
  44. package/dist/components/cards.js +2 -2
  45. package/dist/components/click.js +3 -3
  46. package/dist/components/core.cjs +219 -0
  47. package/dist/components/core.cjs.map +1 -0
  48. package/dist/components/core.d.cts +81 -0
  49. package/dist/components/core.d.ts +81 -0
  50. package/dist/components/core.js +214 -0
  51. package/dist/components/core.js.map +1 -0
  52. package/dist/components/depth.js +3 -3
  53. package/dist/components/design.js +3 -3
  54. package/dist/components/dsl.js +2 -2
  55. package/dist/components/effects.js +9 -9
  56. package/dist/components/engine.js +2 -2
  57. package/dist/components/feedback.js +1 -1
  58. package/dist/components/fx-3d.js +2 -2
  59. package/dist/components/fx-ai.js +2 -2
  60. package/dist/components/fx-chart.js +2 -2
  61. package/dist/components/fx-cinema.js +2 -2
  62. package/dist/components/fx-cyber.js +2 -2
  63. package/dist/components/fx-festival.js +2 -2
  64. package/dist/components/fx-focus.js +2 -2
  65. package/dist/components/fx-form.js +2 -2
  66. package/dist/components/fx-game.js +2 -2
  67. package/dist/components/fx-genart.js +2 -2
  68. package/dist/components/fx-geo.js +2 -2
  69. package/dist/components/fx-gesture.js +2 -2
  70. package/dist/components/fx-gpu.js +3 -3
  71. package/dist/components/fx-light.js +2 -2
  72. package/dist/components/fx-lottie.js +2 -2
  73. package/dist/components/fx-morph.js +2 -2
  74. package/dist/components/fx-music.js +3 -3
  75. package/dist/components/fx-organic.js +2 -2
  76. package/dist/components/fx-paper.js +2 -2
  77. package/dist/components/fx-perf.js +2 -2
  78. package/dist/components/fx-physics.js +2 -2
  79. package/dist/components/fx-retro.js +2 -2
  80. package/dist/components/fx-safe.js +2 -2
  81. package/dist/components/fx-shop.js +2 -2
  82. package/dist/components/fx-social.js +2 -2
  83. package/dist/components/fx-spatial.js +2 -2
  84. package/dist/components/fx-surface.js +2 -2
  85. package/dist/components/fx-text.js +2 -2
  86. package/dist/components/fx-transitions.js +3 -3
  87. package/dist/components/fx-video.js +2 -2
  88. package/dist/components/fx-weather.js +2 -2
  89. package/dist/components/fx.js +6 -6
  90. package/dist/components/fx2.cjs +1 -10
  91. package/dist/components/fx2.cjs.map +1 -1
  92. package/dist/components/fx2.d.cts +1 -6
  93. package/dist/components/fx2.d.ts +1 -6
  94. package/dist/components/fx2.js +7 -15
  95. package/dist/components/fx2.js.map +1 -1
  96. package/dist/components/gesture.js +4 -4
  97. package/dist/components/interaction.js +1 -1
  98. package/dist/components/layout.js +1 -1
  99. package/dist/components/marketplace.cjs +104 -0
  100. package/dist/components/marketplace.cjs.map +1 -1
  101. package/dist/components/marketplace.d.cts +33 -2
  102. package/dist/components/marketplace.d.ts +33 -2
  103. package/dist/components/marketplace.js +105 -5
  104. package/dist/components/marketplace.js.map +1 -1
  105. package/dist/components/native.js +3 -3
  106. package/dist/components/packs.js +1 -1
  107. package/dist/components/page.js +3 -3
  108. package/dist/components/perf.js +2 -2
  109. package/dist/components/physics.js +3 -3
  110. package/dist/components/plugins.cjs +138 -0
  111. package/dist/components/plugins.cjs.map +1 -0
  112. package/dist/components/plugins.d.cts +120 -0
  113. package/dist/components/plugins.d.ts +120 -0
  114. package/dist/components/plugins.js +105 -0
  115. package/dist/components/plugins.js.map +1 -0
  116. package/dist/components/reveal.js +1 -1
  117. package/dist/components/solid.js +8 -8
  118. package/dist/components/svelte.js +8 -8
  119. package/dist/components/svg.js +1 -1
  120. package/dist/components/text.js +2 -2
  121. package/dist/components/timeline.js +3 -3
  122. package/dist/components/transitions.js +1 -1
  123. package/dist/components/ui.js +4 -4
  124. package/dist/components/vue.js +8 -8
  125. package/dist/components/webgl.js +1 -1
  126. package/dist/components/widgets.cjs +420 -199
  127. package/dist/components/widgets.cjs.map +1 -1
  128. package/dist/components/widgets.d.cts +42 -2
  129. package/dist/components/widgets.d.ts +42 -2
  130. package/dist/components/widgets.js +428 -209
  131. package/dist/components/widgets.js.map +1 -1
  132. package/dist/components.js +10 -10
  133. package/dist/index.js +2 -2
  134. package/dist/llms-full.txt +3018 -0
  135. package/dist/llms.txt +207 -0
  136. package/dist/manifest.json +7562 -0
  137. package/dist/manifest.schema.json +85 -0
  138. package/dist/runtime/format-css.cjs +184 -0
  139. package/dist/runtime/format-css.cjs.map +1 -0
  140. package/dist/runtime/format-css.d.cts +174 -0
  141. package/dist/runtime/format-css.d.ts +174 -0
  142. package/dist/runtime/format-css.iife.js +2 -0
  143. package/dist/runtime/format-css.iife.js.map +1 -0
  144. package/dist/runtime/format-css.js +176 -0
  145. package/dist/runtime/format-css.js.map +1 -0
  146. package/dist/runtime/format-motion.cjs +138 -0
  147. package/dist/runtime/format-motion.cjs.map +1 -0
  148. package/dist/runtime/format-motion.d.cts +208 -0
  149. package/dist/runtime/format-motion.d.ts +208 -0
  150. package/dist/runtime/format-motion.iife.js +2 -0
  151. package/dist/runtime/format-motion.iife.js.map +1 -0
  152. package/dist/runtime/format-motion.js +132 -0
  153. package/dist/runtime/format-motion.js.map +1 -0
  154. package/dist/runtime.cjs +78 -0
  155. package/dist/runtime.cjs.map +1 -0
  156. package/dist/runtime.d.cts +236 -0
  157. package/dist/runtime.d.ts +236 -0
  158. package/dist/runtime.iife.js +2 -0
  159. package/dist/runtime.iife.js.map +1 -0
  160. package/dist/runtime.js +54 -0
  161. package/dist/runtime.js.map +1 -0
  162. package/dist/widgets.umd.js +1 -1
  163. package/dist/widgets.umd.js.map +1 -1
  164. package/docs/ROADMAP.md +85 -14
  165. package/docs/components.md +66 -0
  166. package/docs/core.md +47 -0
  167. package/docs/deprecations.md +1 -1
  168. package/docs/runtime/core.md +55 -0
  169. package/docs/runtime/format-css.md +59 -0
  170. package/docs/runtime/format-motion.md +56 -0
  171. package/docs/upgrading-10.md +1 -1
  172. package/package.json +88 -6
@@ -104,6 +104,37 @@ declare function loadEffectPack(src: string | {
104
104
  override?: boolean;
105
105
  }): Promise<string[]>;
106
106
 
107
+ /**
108
+ * 10.1: plugin signature (integrity) checks and version compatibility.
109
+ *
110
+ * - `pluginIntegrity(code)` → `'sha256-<base64>'` (Subresource-Integrity style).
111
+ * - `verifyPlugin(code, integrity)` → `true` when the code matches (sha256 / sha384 / sha512).
112
+ * - `satisfies(version, range)` — semver ranges: `*`, `x`, `1.2.3`, `=`, `>`, `>=`, `<`, `<=`,
113
+ * `^`, `~`, `1.x`, hyphen ranges `1.0.0 - 2.0.0`, AND (space) and OR (`||`).
114
+ * - `checkCompat(manifest, version)` — reads `engines.motionary` (or `motionary`) from a plugin manifest.
115
+ */
116
+ type Algo = 'sha256' | 'sha384' | 'sha512';
117
+ /** SRI-style integrity string of plugin code. Needs Web Crypto (browsers, Node ≥ 18, workers). */
118
+ declare function pluginIntegrity(code: string | ArrayBuffer | Uint8Array, algo?: Algo): Promise<string>;
119
+ /** Does the code match the integrity string (any of several, space-separated)? */
120
+ declare function verifyPlugin(code: string | ArrayBuffer | Uint8Array, integrity: string): Promise<boolean>;
121
+ /** Does `version` satisfy the semver `range`? */
122
+ declare function satisfies(version: string, range: string): boolean;
123
+ interface CompatResult {
124
+ ok: boolean;
125
+ range: string;
126
+ version: string;
127
+ message: string;
128
+ }
129
+ /** Check a plugin manifest's `engines.motionary` (or `motionary`) range against the running version. */
130
+ declare function checkCompat(manifest: {
131
+ engines?: {
132
+ motionary?: string;
133
+ };
134
+ motionary?: string;
135
+ name?: string;
136
+ }, version: string): CompatResult;
137
+
107
138
  declare const MARKETPLACE_FORMAT = "motionary/marketplace";
108
139
  interface PluginListing {
109
140
  name: string;
@@ -135,5 +166,5 @@ declare function installPlugin(p: PluginListing | string, opts?: {
135
166
  /** Read a marketplace index (`{ format: "motionary/marketplace", version: 1, plugins }`) (9.0). */
136
167
  declare function fetchMarketplace(url: string, fetcher?: typeof fetch): Promise<PluginListing[]>;
137
168
 
138
- export { EFFECT_PACK_FORMAT, MARKETPLACE, MARKETPLACE_FORMAT, fetchMarketplace, installPlugin, installedPlugins, loadEffectPack, packManifest, searchPlugins, validateManifest };
139
- export type { EffectPackManifest, PluginListing };
169
+ export { EFFECT_PACK_FORMAT, MARKETPLACE, MARKETPLACE_FORMAT, checkCompat, fetchMarketplace, installPlugin, installedPlugins, loadEffectPack, packManifest, pluginIntegrity, satisfies, searchPlugins, validateManifest, verifyPlugin };
170
+ export type { CompatResult, EffectPackManifest, PluginListing };
@@ -1,7 +1,107 @@
1
- import { l as loadEffectPack } from '../chunks/manifest-BDpbuI-9.js';
2
- export { E as EFFECT_PACK_FORMAT, p as packManifest, v as validateManifest } from '../chunks/manifest-BDpbuI-9.js';
3
- import '../chunks/registry-BRM2BRRY.js';
4
- import '../chunks/base-DWYNLg6P.js';
1
+ import { l as loadEffectPack } from '../chunks/manifest-D58HXVY-.js';
2
+ export { E as EFFECT_PACK_FORMAT, p as packManifest, v as validateManifest } from '../chunks/manifest-D58HXVY-.js';
3
+ import '../chunks/registry-gFJRpPES.js';
4
+ import '../chunks/base-BnRyfuyM.js';
5
+
6
+ /**
7
+ * 10.1: plugin signature (integrity) checks and version compatibility.
8
+ *
9
+ * - `pluginIntegrity(code)` → `'sha256-<base64>'` (Subresource-Integrity style).
10
+ * - `verifyPlugin(code, integrity)` → `true` when the code matches (sha256 / sha384 / sha512).
11
+ * - `satisfies(version, range)` — semver ranges: `*`, `x`, `1.2.3`, `=`, `>`, `>=`, `<`, `<=`,
12
+ * `^`, `~`, `1.x`, hyphen ranges `1.0.0 - 2.0.0`, AND (space) and OR (`||`).
13
+ * - `checkCompat(manifest, version)` — reads `engines.motionary` (or `motionary`) from a plugin manifest.
14
+ */
15
+ const ALGO = { sha256: 'SHA-256', sha384: 'SHA-384', sha512: 'SHA-512' };
16
+ function b64(buf) {
17
+ const bytes = new Uint8Array(buf);
18
+ let s = '';
19
+ for (const b of bytes)
20
+ s += String.fromCharCode(b);
21
+ return typeof btoa === 'function' ? btoa(s) : globalThis.Buffer.from(bytes).toString('base64');
22
+ }
23
+ /** SRI-style integrity string of plugin code. Needs Web Crypto (browsers, Node ≥ 18, workers). */
24
+ async function pluginIntegrity(code, algo = 'sha256') {
25
+ const subtle = globalThis.crypto?.subtle;
26
+ if (!subtle)
27
+ throw new Error('[motionary] pluginIntegrity(): Web Crypto (crypto.subtle) is not available here');
28
+ const data = typeof code === 'string' ? new TextEncoder().encode(code) : code instanceof Uint8Array ? code : new Uint8Array(code);
29
+ return `${algo}-${b64(await subtle.digest(ALGO[algo], data))}`;
30
+ }
31
+ /** Does the code match the integrity string (any of several, space-separated)? */
32
+ async function verifyPlugin(code, integrity) {
33
+ for (const want of integrity.trim().split(/\s+/)) {
34
+ const algo = want.split('-')[0];
35
+ if (!ALGO[algo])
36
+ continue;
37
+ if ((await pluginIntegrity(code, algo)) === want)
38
+ return true;
39
+ }
40
+ return false;
41
+ }
42
+ const parse = (v) => {
43
+ const m = /^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:[-+].*)?$/.exec(v.trim());
44
+ return m ? [+m[1], +(m[2] || 0), +(m[3] || 0)] : null;
45
+ };
46
+ const cmp = (a, b) => a[0] - b[0] || a[1] - b[1] || a[2] - b[2];
47
+ function partial(v) {
48
+ const m = /^v?(\d+|[x*])(?:\.(\d+|[x*]))?(?:\.(\d+|[x*]))?$/i.exec(v.trim());
49
+ if (!m)
50
+ return null;
51
+ const segs = [m[1], m[2], m[3]];
52
+ let parts = 0;
53
+ for (const s of segs) {
54
+ if (s === undefined || /[x*]/i.test(s))
55
+ break;
56
+ parts++;
57
+ }
58
+ return { v: [+(parts > 0 ? segs[0] : 0), +(parts > 1 ? segs[1] : 0), +(parts > 2 ? segs[2] : 0)], parts };
59
+ }
60
+ function test(ver, comp) {
61
+ const m = /^(\^|~|>=|<=|>|<|=)?\s*(.+)$/.exec(comp.trim());
62
+ if (!m)
63
+ return false;
64
+ const op = m[1] || '';
65
+ const p = partial(m[2]);
66
+ if (!p)
67
+ return false;
68
+ const { v, parts } = p;
69
+ const upper = (n) => (n === 0 ? [Infinity, 0, 0] : n === 1 ? [v[0] + 1, 0, 0] : n === 2 ? [v[0], v[1] + 1, 0] : [v[0], v[1], v[2] + 1]);
70
+ switch (op) {
71
+ case '^': {
72
+ const hi = v[0] > 0 || parts < 2 ? [v[0] + 1, 0, 0] : v[1] > 0 || parts < 3 ? [0, v[1] + 1, 0] : [0, 0, v[2] + 1];
73
+ return cmp(ver, v) >= 0 && cmp(ver, hi) < 0;
74
+ }
75
+ case '~': return cmp(ver, v) >= 0 && cmp(ver, upper(Math.min(parts, 2) || 1)) < 0;
76
+ case '>=': return cmp(ver, v) >= 0;
77
+ case '>': return parts < 3 ? cmp(ver, upper(parts)) >= 0 : cmp(ver, v) > 0;
78
+ case '<=': return parts < 3 ? cmp(ver, upper(parts)) < 0 : cmp(ver, v) <= 0;
79
+ case '<': return cmp(ver, v) < 0;
80
+ default: return parts === 3 ? cmp(ver, v) === 0 : cmp(ver, v) >= 0 && cmp(ver, upper(parts)) < 0;
81
+ }
82
+ }
83
+ /** Does `version` satisfy the semver `range`? */
84
+ function satisfies(version, range) {
85
+ const ver = parse(version);
86
+ if (!ver)
87
+ return false;
88
+ return range.split('||').some((alt) => {
89
+ const a = alt.trim();
90
+ if (!a || a === '*' || a.toLowerCase() === 'x')
91
+ return true;
92
+ const hy = /^(\S+)\s+-\s+(\S+)$/.exec(a);
93
+ if (hy)
94
+ return test(ver, '>=' + hy[1]) && test(ver, '<=' + hy[2]);
95
+ return a.replace(/(\^|~|>=|<=|>|<|=)\s+/g, '$1').split(/\s+/).every((c) => test(ver, c));
96
+ });
97
+ }
98
+ /** Check a plugin manifest's `engines.motionary` (or `motionary`) range against the running version. */
99
+ function checkCompat(manifest, version) {
100
+ const range = manifest.engines?.motionary || manifest.motionary || '*';
101
+ const ok = satisfies(version, range);
102
+ const who = manifest.name ? `"${manifest.name}"` : 'This plugin';
103
+ return { ok, range, version, message: ok ? `${who} supports Motionary ${version} (${range}).` : `${who} needs Motionary ${range}; this page runs ${version}.` };
104
+ }
5
105
 
6
106
  const MARKETPLACE_FORMAT = 'motionary/marketplace';
7
107
  const L = (name, title, description, entry, register, effects, tags, since) => ({ name, title, description, entry, register, effects: effects.split(' '), tags: tags.split(' '), since, author: 'Motionary', official: true });
@@ -84,5 +184,5 @@ async function fetchMarketplace(url, fetcher = fetch) {
84
184
  return j.plugins.filter((p) => p && typeof p.name === 'string' && typeof p.entry === 'string').map((p) => ({ title: p.name, description: '', register: '', effects: [], tags: [], since: '', ...p }));
85
185
  }
86
186
 
87
- export { MARKETPLACE, MARKETPLACE_FORMAT, fetchMarketplace, installPlugin, installedPlugins, loadEffectPack, searchPlugins };
187
+ export { MARKETPLACE, MARKETPLACE_FORMAT, checkCompat, fetchMarketplace, installPlugin, installedPlugins, loadEffectPack, pluginIntegrity, satisfies, searchPlugins, verifyPlugin };
88
188
  //# sourceMappingURL=marketplace.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"marketplace.js","sources":["../../src/components/marketplace/index.ts"],"sourcesContent":["/**\n * `motionary/marketplace` (= `motionary/components/marketplace`, 9.0 GA) —\n * the plugin marketplace. Builds on the 6.9 effect-pack manifest\n * (`packManifest`, `validateManifest`, `loadEffectPack`) with:\n *\n * - **`MARKETPLACE`** — the first-party catalogue: every Motionary effect\n * pack as a marketplace listing (name, entry, effects, tags, since).\n * - **`searchPlugins(query, list?)`** — ranked search over names,\n * descriptions, tags and effect names.\n * - **`installPlugin(listing | url, { load })`** — imports a pack (your\n * `load` can map entries to bundler imports), validates it and registers\n * its effects; remembered by `installedPlugins()`.\n * - **`fetchMarketplace(url)`** — read a third-party index\n * (`{ \"format\": \"motionary/marketplace\", \"version\": 1, \"plugins\": [...] }`).\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { loadEffectPack } from '../fx2/manifest';\n\nexport { EFFECT_PACK_FORMAT, packManifest, validateManifest, loadEffectPack } from '../fx2/manifest';\nexport type { EffectPackManifest } from '../fx2/manifest';\n\nexport const MARKETPLACE_FORMAT = 'motionary/marketplace';\nexport interface PluginListing {\n name: string;\n title: string;\n description: string;\n entry: string;\n register: string;\n effects: string[];\n tags: string[];\n since: string;\n author?: string;\n official?: boolean;\n}\n\nconst L = (name: string, title: string, description: string, entry: string, register: string, effects: string, tags: string, since: string): PluginListing => ({ name, title, description, entry, register, effects: effects.split(' '), tags: tags.split(' '), since, author: 'Motionary', official: true });\n\n/** The first-party catalogue (9.0). */\nexport const MARKETPLACE: PluginListing[] = [\n L('motionary/fx/festival', 'Festival', 'Fireworks, lanterns, Christmas snow and spooky floats.', 'motionary/fx/festival', 'registerFestivalPack', 'firework-burst lantern-rise xmas-snow spooky-float', 'holiday celebration seasonal', '8.1'),\n L('motionary/fx/retro', 'Retro', 'Pixel, CRT, VHS and Y2K looks.', 'motionary/fx/retro', 'registerRetroPack', 'pixelate-in crt-power vhs-glitch y2k-shine', 'pixel 8-bit vintage', '8.2'),\n L('motionary/fx/organic', 'Organic', 'Vines, blooms, water drops and breathing blobs.', 'motionary/fx/organic', 'registerOrganicPack', 'vine-grow bloom water-drop breathe', 'nature blob liquid', '8.3'),\n L('motionary/fx/cyber', 'Cyber', 'HUD lock-on, scanlines, holograms and data decode.', 'motionary/fx/cyber', 'registerCyberPack', 'hud-frame scanline-sweep hologram data-decode', 'sci-fi hud glitch', '8.4'),\n L('motionary/fx/paper', 'Paper & hand-drawn', 'Paper unfold, pencil sketch, watercolor and crumple.', 'motionary/fx/paper', 'registerPaperPack', 'paper-unfold pencil-sketch watercolor crumple', 'sketch paper drawing', '8.5'),\n L('motionary/fx/surface', 'Surface themes', 'Neon ignite and pulse, glass frost, neumorphic press.', 'motionary/fx/surface', 'registerSurfacePack', 'neon-ignite neon-pulse glass-frost neu-press', 'neon glassmorphism neumorphism theme', '8.6'),\n L('motionary/fx/gesture', 'Gestures 3.0', 'Swipe and pinch hints, tilt wobble, depth-in.', 'motionary/fx/gesture', 'registerGesture3Pack', 'swipe-hint pinch-hint tilt-wobble depth-in', 'touch onboarding 3d', '8.7'),\n L('motionary/fx/spatial', 'XR / spatial', 'Portal open, orbit-in, spatial float and depth pop.', 'motionary/fx/spatial', 'registerSpatialPack', 'portal-open orbit-in spatial-float depth-pop', 'xr vr visionos 3d', '8.8'),\n L('motionary/fx/cinema', 'Cinematic', 'Dolly-in, pan reveal, letterbox and rack focus.', 'motionary/fx/cinema', 'registerCinemaPack', 'dolly-in pan-reveal letterbox rack-focus', 'film camera story', '9.1'),\n L('motionary/fx/lottie', 'Lottie & Rive', 'Lottie import (keyframes + SVG), Rive state-machine inputs, icon pop.', 'motionary/fx/lottie', 'registerLottiePack', 'lottie-play icon-pop', 'lottie rive after-effects icons', '9.2'),\n L('motionary/fx/genart', 'Generative art 2.0', 'Halftone print-in, drifting mesh gradients, kaleidoscope and film grain.', 'motionary/fx/genart', 'registerGenArtPack', 'halftone-in mesh-drift kaleido grain-flicker', 'generative gradient grain art', '9.3'),\n L('motionary/fx/video', 'Video motion', 'Scroll-driven video and frame sequences, film burn, jump cut.', 'motionary/fx/video', 'registerVideoPack', 'film-burn jump-cut', 'video scroll film', '9.4'),\n L('motionary/fx/safe', 'Accessible motion 2.0', 'Motion that never moves: safe fade, focus glow, colour pulse, underline sweep.', 'motionary/fx/safe', 'registerSafePack', 'safe-fade focus-glow color-pulse underline-sweep', 'a11y accessibility vestibular reduced-motion', '9.5'),\n L('motionary/fx/perf', 'Performance 3.0', 'Idle-time reveals and compositor-only hover lifts; OffscreenCanvas / Worker helpers.', 'motionary/fx/perf', 'registerPerf3Pack', 'idle-reveal gpu-lift', 'performance worker offscreen', '9.6'),\n];\n\n/** Ranked search over listings (name / title / tags / effects / description) (9.0). */\nexport function searchPlugins(query: string, list: PluginListing[] = MARKETPLACE): PluginListing[] {\n const q = query.toLowerCase().trim().split(/\\s+/).filter(Boolean);\n if (!q.length) return list.slice();\n const score = (p: PluginListing) =>\n q.reduce((s, w) => {\n let n = 0;\n if (p.title.toLowerCase().includes(w)) n += 5;\n if (p.tags.some((t) => t.includes(w))) n += 4;\n if (p.effects.some((e) => e.includes(w))) n += 3;\n if (p.name.toLowerCase().includes(w)) n += 2;\n if (p.description.toLowerCase().includes(w)) n += 1;\n return n ? s + n : -1e9;\n }, 0);\n return list\n .map((p) => [p, score(p)] as const)\n .filter(([, s]) => s > 0)\n .sort((a, b) => b[1] - a[1])\n .map(([p]) => p);\n}\n\nconst installed = new Map<string, string[]>();\n/** Names of installed plugins → their registered effects (9.0). */\nexport function installedPlugins(): Record<string, string[]> {\n return Object.fromEntries(installed);\n}\n\n/**\n * Install a plugin: `load(entry)` imports the module (default: dynamic `import()`), then its\n * `register*` function runs (first-party listing) or its `effects` are validated and registered\n * through `loadEffectPack` (third-party pack). Returns the registered effect names (9.0).\n */\nexport async function installPlugin(p: PluginListing | string, opts: { load?: (entry: string) => Promise<any>; override?: boolean } = {}): Promise<string[]> {\n const listing = typeof p === 'string' ? null : p;\n const entry = listing ? listing.entry : (p as string);\n const key = listing ? listing.name : entry;\n if (installed.has(key)) return installed.get(key) as string[];\n const load = opts.load || ((u: string) => import(/* @vite-ignore */ u));\n const mod = await load(entry);\n let names: string[];\n if (listing && typeof mod?.[listing.register] === 'function') {\n mod[listing.register]();\n names = listing.effects.slice();\n } else names = await loadEffectPack(mod as { effects?: EffectDefinition[]; default?: EffectDefinition[] }, { override: opts.override, manifest: mod?.manifest });\n installed.set(key, names);\n return names;\n}\n\n/** Read a marketplace index (`{ format: \"motionary/marketplace\", version: 1, plugins }`) (9.0). */\nexport async function fetchMarketplace(url: string, fetcher: typeof fetch = fetch): Promise<PluginListing[]> {\n const r = await fetcher(url);\n const j = await r.json();\n if (j?.format !== MARKETPLACE_FORMAT || j?.version !== 1 || !Array.isArray(j.plugins)) throw new Error(`[motionary] ${url} is not a ${MARKETPLACE_FORMAT} v1 index`);\n return j.plugins.filter((p: any) => p && typeof p.name === 'string' && typeof p.entry === 'string').map((p: any) => ({ title: p.name, description: '', register: '', effects: [], tags: [], since: '', ...p }));\n}\n"],"names":[],"mappings":";;;;;AAqBO,MAAM,kBAAkB,GAAG;AAclC,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,WAAmB,EAAE,KAAa,EAAE,QAAgB,EAAE,OAAe,EAAE,IAAY,EAAE,KAAa,MAAqB,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAE7S;AACO,MAAM,WAAW,GAAoB;AAC1C,IAAA,CAAC,CAAC,uB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AAO,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAM,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AACjN;;;;"}
1
+ {"version":3,"file":"marketplace.js","sources":["../../src/components/marketplace/sign.ts","../../src/components/marketplace/index.ts"],"sourcesContent":["/**\n * 10.1: plugin signature (integrity) checks and version compatibility.\n *\n * - `pluginIntegrity(code)` → `'sha256-<base64>'` (Subresource-Integrity style).\n * - `verifyPlugin(code, integrity)` → `true` when the code matches (sha256 / sha384 / sha512).\n * - `satisfies(version, range)` — semver ranges: `*`, `x`, `1.2.3`, `=`, `>`, `>=`, `<`, `<=`,\n * `^`, `~`, `1.x`, hyphen ranges `1.0.0 - 2.0.0`, AND (space) and OR (`||`).\n * - `checkCompat(manifest, version)` — reads `engines.motionary` (or `motionary`) from a plugin manifest.\n */\n\ntype Algo = 'sha256' | 'sha384' | 'sha512';\nconst ALGO: Record<Algo, string> = { sha256: 'SHA-256', sha384: 'SHA-384', sha512: 'SHA-512' };\n\nfunction b64(buf: ArrayBuffer): string {\n const bytes = new Uint8Array(buf);\n let s = '';\n for (const b of bytes) s += String.fromCharCode(b);\n return typeof btoa === 'function' ? btoa(s) : (globalThis as any).Buffer.from(bytes).toString('base64');\n}\n\n/** SRI-style integrity string of plugin code. Needs Web Crypto (browsers, Node ≥ 18, workers). */\nexport async function pluginIntegrity(code: string | ArrayBuffer | Uint8Array, algo: Algo = 'sha256'): Promise<string> {\n const subtle = (globalThis as any).crypto?.subtle;\n if (!subtle) throw new Error('[motionary] pluginIntegrity(): Web Crypto (crypto.subtle) is not available here');\n const data = typeof code === 'string' ? new TextEncoder().encode(code) : code instanceof Uint8Array ? code : new Uint8Array(code);\n return `${algo}-${b64(await subtle.digest(ALGO[algo], data))}`;\n}\n\n/** Does the code match the integrity string (any of several, space-separated)? */\nexport async function verifyPlugin(code: string | ArrayBuffer | Uint8Array, integrity: string): Promise<boolean> {\n for (const want of integrity.trim().split(/\\s+/)) {\n const algo = want.split('-')[0] as Algo;\n if (!ALGO[algo]) continue;\n if ((await pluginIntegrity(code, algo)) === want) return true;\n }\n return false;\n}\n\ntype V3 = [number, number, number];\nconst parse = (v: string): V3 | null => {\n const m = /^v?(\\d+)(?:\\.(\\d+))?(?:\\.(\\d+))?(?:[-+].*)?$/.exec(v.trim());\n return m ? [+m[1], +(m[2] || 0), +(m[3] || 0)] : null;\n};\nconst cmp = (a: V3, b: V3) => a[0] - b[0] || a[1] - b[1] || a[2] - b[2];\n\nfunction partial(v: string): { v: V3; parts: number } | null {\n const m = /^v?(\\d+|[x*])(?:\\.(\\d+|[x*]))?(?:\\.(\\d+|[x*]))?$/i.exec(v.trim());\n if (!m) return null;\n const segs = [m[1], m[2], m[3]];\n let parts = 0;\n for (const s of segs) { if (s === undefined || /[x*]/i.test(s)) break; parts++; }\n return { v: [+(parts > 0 ? segs[0] : 0), +(parts > 1 ? segs[1]! : 0), +(parts > 2 ? segs[2]! : 0)], parts };\n}\n\nfunction test(ver: V3, comp: string): boolean {\n const m = /^(\\^|~|>=|<=|>|<|=)?\\s*(.+)$/.exec(comp.trim());\n if (!m) return false;\n const op = m[1] || '';\n const p = partial(m[2]);\n if (!p) return false;\n const { v, parts } = p;\n const upper = (n: number): V3 => (n === 0 ? [Infinity, 0, 0] : n === 1 ? [v[0] + 1, 0, 0] : n === 2 ? [v[0], v[1] + 1, 0] : [v[0], v[1], v[2] + 1]);\n switch (op) {\n case '^': {\n const hi: V3 = v[0] > 0 || parts < 2 ? [v[0] + 1, 0, 0] : v[1] > 0 || parts < 3 ? [0, v[1] + 1, 0] : [0, 0, v[2] + 1];\n return cmp(ver, v) >= 0 && cmp(ver, hi) < 0;\n }\n case '~': return cmp(ver, v) >= 0 && cmp(ver, upper(Math.min(parts, 2) || 1)) < 0;\n case '>=': return cmp(ver, v) >= 0;\n case '>': return parts < 3 ? cmp(ver, upper(parts)) >= 0 : cmp(ver, v) > 0;\n case '<=': return parts < 3 ? cmp(ver, upper(parts)) < 0 : cmp(ver, v) <= 0;\n case '<': return cmp(ver, v) < 0;\n default: return parts === 3 ? cmp(ver, v) === 0 : cmp(ver, v) >= 0 && cmp(ver, upper(parts)) < 0;\n }\n}\n\n/** Does `version` satisfy the semver `range`? */\nexport function satisfies(version: string, range: string): boolean {\n const ver = parse(version);\n if (!ver) return false;\n return range.split('||').some((alt) => {\n const a = alt.trim();\n if (!a || a === '*' || a.toLowerCase() === 'x') return true;\n const hy = /^(\\S+)\\s+-\\s+(\\S+)$/.exec(a);\n if (hy) return test(ver, '>=' + hy[1]) && test(ver, '<=' + hy[2]);\n return a.replace(/(\\^|~|>=|<=|>|<|=)\\s+/g, '$1').split(/\\s+/).every((c) => test(ver, c));\n });\n}\n\nexport interface CompatResult {\n ok: boolean;\n range: string;\n version: string;\n message: string;\n}\n\n/** Check a plugin manifest's `engines.motionary` (or `motionary`) range against the running version. */\nexport function checkCompat(manifest: { engines?: { motionary?: string }; motionary?: string; name?: string }, version: string): CompatResult {\n const range = manifest.engines?.motionary || manifest.motionary || '*';\n const ok = satisfies(version, range);\n const who = manifest.name ? `\"${manifest.name}\"` : 'This plugin';\n return { ok, range, version, message: ok ? `${who} supports Motionary ${version} (${range}).` : `${who} needs Motionary ${range}; this page runs ${version}.` };\n}\n","/**\n * `motionary/marketplace` (= `motionary/components/marketplace`, 9.0 GA) —\n * the plugin marketplace. Builds on the 6.9 effect-pack manifest\n * (`packManifest`, `validateManifest`, `loadEffectPack`) with:\n *\n * - **`MARKETPLACE`** — the first-party catalogue: every Motionary effect\n * pack as a marketplace listing (name, entry, effects, tags, since).\n * - **`searchPlugins(query, list?)`** — ranked search over names,\n * descriptions, tags and effect names.\n * - **`installPlugin(listing | url, { load })`** — imports a pack (your\n * `load` can map entries to bundler imports), validates it and registers\n * its effects; remembered by `installedPlugins()`.\n * - **`fetchMarketplace(url)`** — read a third-party index\n * (`{ \"format\": \"motionary/marketplace\", \"version\": 1, \"plugins\": [...] }`).\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { loadEffectPack } from '../fx2/manifest';\n\nexport { EFFECT_PACK_FORMAT, packManifest, validateManifest, loadEffectPack } from '../fx2/manifest';\nexport type { EffectPackManifest } from '../fx2/manifest';\nexport { pluginIntegrity, verifyPlugin, satisfies, checkCompat } from './sign';\nexport type { CompatResult } from './sign';\n\nexport const MARKETPLACE_FORMAT = 'motionary/marketplace';\nexport interface PluginListing {\n name: string;\n title: string;\n description: string;\n entry: string;\n register: string;\n effects: string[];\n tags: string[];\n since: string;\n author?: string;\n official?: boolean;\n}\n\nconst L = (name: string, title: string, description: string, entry: string, register: string, effects: string, tags: string, since: string): PluginListing => ({ name, title, description, entry, register, effects: effects.split(' '), tags: tags.split(' '), since, author: 'Motionary', official: true });\n\n/** The first-party catalogue (9.0). */\nexport const MARKETPLACE: PluginListing[] = [\n L('motionary/fx/festival', 'Festival', 'Fireworks, lanterns, Christmas snow and spooky floats.', 'motionary/fx/festival', 'registerFestivalPack', 'firework-burst lantern-rise xmas-snow spooky-float', 'holiday celebration seasonal', '8.1'),\n L('motionary/fx/retro', 'Retro', 'Pixel, CRT, VHS and Y2K looks.', 'motionary/fx/retro', 'registerRetroPack', 'pixelate-in crt-power vhs-glitch y2k-shine', 'pixel 8-bit vintage', '8.2'),\n L('motionary/fx/organic', 'Organic', 'Vines, blooms, water drops and breathing blobs.', 'motionary/fx/organic', 'registerOrganicPack', 'vine-grow bloom water-drop breathe', 'nature blob liquid', '8.3'),\n L('motionary/fx/cyber', 'Cyber', 'HUD lock-on, scanlines, holograms and data decode.', 'motionary/fx/cyber', 'registerCyberPack', 'hud-frame scanline-sweep hologram data-decode', 'sci-fi hud glitch', '8.4'),\n L('motionary/fx/paper', 'Paper & hand-drawn', 'Paper unfold, pencil sketch, watercolor and crumple.', 'motionary/fx/paper', 'registerPaperPack', 'paper-unfold pencil-sketch watercolor crumple', 'sketch paper drawing', '8.5'),\n L('motionary/fx/surface', 'Surface themes', 'Neon ignite and pulse, glass frost, neumorphic press.', 'motionary/fx/surface', 'registerSurfacePack', 'neon-ignite neon-pulse glass-frost neu-press', 'neon glassmorphism neumorphism theme', '8.6'),\n L('motionary/fx/gesture', 'Gestures 3.0', 'Swipe and pinch hints, tilt wobble, depth-in.', 'motionary/fx/gesture', 'registerGesture3Pack', 'swipe-hint pinch-hint tilt-wobble depth-in', 'touch onboarding 3d', '8.7'),\n L('motionary/fx/spatial', 'XR / spatial', 'Portal open, orbit-in, spatial float and depth pop.', 'motionary/fx/spatial', 'registerSpatialPack', 'portal-open orbit-in spatial-float depth-pop', 'xr vr visionos 3d', '8.8'),\n L('motionary/fx/cinema', 'Cinematic', 'Dolly-in, pan reveal, letterbox and rack focus.', 'motionary/fx/cinema', 'registerCinemaPack', 'dolly-in pan-reveal letterbox rack-focus', 'film camera story', '9.1'),\n L('motionary/fx/lottie', 'Lottie & Rive', 'Lottie import (keyframes + SVG), Rive state-machine inputs, icon pop.', 'motionary/fx/lottie', 'registerLottiePack', 'lottie-play icon-pop', 'lottie rive after-effects icons', '9.2'),\n L('motionary/fx/genart', 'Generative art 2.0', 'Halftone print-in, drifting mesh gradients, kaleidoscope and film grain.', 'motionary/fx/genart', 'registerGenArtPack', 'halftone-in mesh-drift kaleido grain-flicker', 'generative gradient grain art', '9.3'),\n L('motionary/fx/video', 'Video motion', 'Scroll-driven video and frame sequences, film burn, jump cut.', 'motionary/fx/video', 'registerVideoPack', 'film-burn jump-cut', 'video scroll film', '9.4'),\n L('motionary/fx/safe', 'Accessible motion 2.0', 'Motion that never moves: safe fade, focus glow, colour pulse, underline sweep.', 'motionary/fx/safe', 'registerSafePack', 'safe-fade focus-glow color-pulse underline-sweep', 'a11y accessibility vestibular reduced-motion', '9.5'),\n L('motionary/fx/perf', 'Performance 3.0', 'Idle-time reveals and compositor-only hover lifts; OffscreenCanvas / Worker helpers.', 'motionary/fx/perf', 'registerPerf3Pack', 'idle-reveal gpu-lift', 'performance worker offscreen', '9.6'),\n];\n\n/** Ranked search over listings (name / title / tags / effects / description) (9.0). */\nexport function searchPlugins(query: string, list: PluginListing[] = MARKETPLACE): PluginListing[] {\n const q = query.toLowerCase().trim().split(/\\s+/).filter(Boolean);\n if (!q.length) return list.slice();\n const score = (p: PluginListing) =>\n q.reduce((s, w) => {\n let n = 0;\n if (p.title.toLowerCase().includes(w)) n += 5;\n if (p.tags.some((t) => t.includes(w))) n += 4;\n if (p.effects.some((e) => e.includes(w))) n += 3;\n if (p.name.toLowerCase().includes(w)) n += 2;\n if (p.description.toLowerCase().includes(w)) n += 1;\n return n ? s + n : -1e9;\n }, 0);\n return list\n .map((p) => [p, score(p)] as const)\n .filter(([, s]) => s > 0)\n .sort((a, b) => b[1] - a[1])\n .map(([p]) => p);\n}\n\nconst installed = new Map<string, string[]>();\n/** Names of installed plugins → their registered effects (9.0). */\nexport function installedPlugins(): Record<string, string[]> {\n return Object.fromEntries(installed);\n}\n\n/**\n * Install a plugin: `load(entry)` imports the module (default: dynamic `import()`), then its\n * `register*` function runs (first-party listing) or its `effects` are validated and registered\n * through `loadEffectPack` (third-party pack). Returns the registered effect names (9.0).\n */\nexport async function installPlugin(p: PluginListing | string, opts: { load?: (entry: string) => Promise<any>; override?: boolean } = {}): Promise<string[]> {\n const listing = typeof p === 'string' ? null : p;\n const entry = listing ? listing.entry : (p as string);\n const key = listing ? listing.name : entry;\n if (installed.has(key)) return installed.get(key) as string[];\n const load = opts.load || ((u: string) => import(/* @vite-ignore */ u));\n const mod = await load(entry);\n let names: string[];\n if (listing && typeof mod?.[listing.register] === 'function') {\n mod[listing.register]();\n names = listing.effects.slice();\n } else names = await loadEffectPack(mod as { effects?: EffectDefinition[]; default?: EffectDefinition[] }, { override: opts.override, manifest: mod?.manifest });\n installed.set(key, names);\n return names;\n}\n\n/** Read a marketplace index (`{ format: \"motionary/marketplace\", version: 1, plugins }`) (9.0). */\nexport async function fetchMarketplace(url: string, fetcher: typeof fetch = fetch): Promise<PluginListing[]> {\n const r = await fetcher(url);\n const j = await r.json();\n if (j?.format !== MARKETPLACE_FORMAT || j?.version !== 1 || !Array.isArray(j.plugins)) throw new Error(`[motionary] ${url} is not a ${MARKETPLACE_FORMAT} v1 index`);\n return j.plugins.filter((p: any) => p && typeof p.name === 'string' && typeof p.entry === 'string').map((p: any) => ({ title: p.name, description: '', register: '', effects: [], tags: [], since: '', ...p }));\n}\n"],"names":[],"mappings":";;;;;AAAA;;;;;;;;AAQG;AAGH,MAAM,IAAI,GAAyB,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;AAE9F,SAAS,GAAG,CAAC,GAAgB,EAAA;AAC3B,IAAA,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,GAAG,CAAC;IACjC,IAAI,CAAC,GAAG,EAAE;IACV,KAAK,MAAM,CAAC,IAAI,KAAK;AAAE,QAAA,CAAC,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;IAClD,OAAO,OAAO,IAAI,KAAK,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,GAAI,UAAkB,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;AACzG;AAEA;AACO,eAAe,eAAe,CAAC,IAAuC,EAAE,OAAa,QAAQ,EAAA;AAClG,IAAA,MAAM,MAAM,GAAI,UAAkB,CAAC,MAAM,EAAE,MAAM;AACjD,IAAA,IAAI,CAAC,MAAM;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,iFAAiF,CAAC;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,GAAG,MAAM,CAAC,CAAC,IAAI,EAAE;IACxB,IAAI,CAAC,EAAE,MAAM,KAAK,kBAAkB,IAAI,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,CAAA,YAAA,EAAe,GAAG,CAAA,UAAA,EAAa,kBAAkB,CAAA,SAAA,CAAW,CAAC;AACpK,IAAA,OAAO,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAM,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAM,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AACjN;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { parseMotion } from './dsl.js';
2
2
  import { easingPoints } from './design.js';
3
3
  import { MOTION_TOKENS } from './tokens.js';
4
- import '../chunks/registry-BRM2BRRY.js';
5
- import '../chunks/base-DWYNLg6P.js';
6
- import '../chunks/core-DoR4w-E4.js';
4
+ import '../chunks/registry-gFJRpPES.js';
5
+ import '../chunks/base-BnRyfuyM.js';
6
+ import '../chunks/core-DsGoL9EY.js';
7
7
 
8
8
  /**
9
9
  * `motionary/native` (= `motionary/components/native`, 9.8) — native 2.0:
@@ -1,4 +1,4 @@
1
- import { p as prefersReducedMotion, q as now, m as motionScale, r as raf, D as EASE_OUT, k as clamp, E as EASE_SPRING, u as defineElement } from '../chunks/base-DWYNLg6P.js';
1
+ import { p as prefersReducedMotion, q as now, m as motionScale, r as raf, D as EASE_OUT, k as clamp, E as EASE_SPRING, u as defineElement } from '../chunks/base-BnRyfuyM.js';
2
2
 
3
3
  const anim = (el, frames, o) => {
4
4
  if (typeof el.animate !== 'function')
@@ -1,6 +1,6 @@
1
- import { u as defineElement, l as caf, r as raf, p as prefersReducedMotion, q as now, i as getMotionSensitivity, h as getMotionIntensity, g as configureComponents, C as adoptStyles } from '../chunks/base-DWYNLg6P.js';
2
- export { M as MOTION_SCALE } from '../chunks/base-DWYNLg6P.js';
3
- import { e as springSamples } from '../chunks/spring-CAlkc1co.js';
1
+ import { u as defineElement, l as caf, r as raf, p as prefersReducedMotion, q as now, i as getMotionSensitivity, h as getMotionIntensity, g as configureComponents, B as adoptStyles } from '../chunks/base-BnRyfuyM.js';
2
+ export { M as MOTION_SCALE } from '../chunks/base-BnRyfuyM.js';
3
+ import { e as springSamples } from '../chunks/spring-CZDNyqWp.js';
4
4
 
5
5
  var css$8 = "usa-cursor{--usa-cursor-color:var(--usa-accent,#7c5cff);--usa-cursor-size:28px;position:fixed;inset:0;pointer-events:none;z-index:2147483600;opacity:0;transition:opacity 0.2s ease;contain:strict}usa-cursor[data-active]{opacity:1}usa-cursor .usa-cursor-ring{position:absolute;left:0;top:0;width:var(--usa-cursor-size);height:var(--usa-cursor-size);margin:calc(var(--usa-cursor-size) / -2) 0 0 calc(var(--usa-cursor-size) / -2);border:1.5px solid var(--usa-cursor-color);border-radius:999px;box-sizing:border-box;transition:width 0.25s cubic-bezier(0.34,1.56,0.64,1),height 0.25s cubic-bezier(0.34,1.56,0.64,1),margin 0.25s ease,border-radius 0.25s ease,background-color 0.2s ease;will-change:transform}usa-cursor[data-hover] .usa-cursor-ring:first-child{width:calc(var(--usa-cursor-size) * 1.6);height:calc(var(--usa-cursor-size) * 1.6);margin:calc(var(--usa-cursor-size) * -0.8) 0 0 calc(var(--usa-cursor-size) * -0.8);background:color-mix(in srgb,var(--usa-cursor-color) 15%,transparent)}usa-cursor[data-snapped] .usa-cursor-ring{border-radius:12px;background:color-mix(in srgb,var(--usa-cursor-color) 12%,transparent);translate:-50% -50%;margin:0}usa-cursor[data-down] .usa-cursor-ring:first-child{scale:0.8}usa-cursor .usa-cursor-dot{position:absolute;left:-3px;top:-3px;width:6px;height:6px;border-radius:50%;background:var(--usa-cursor-color)}usa-cursor[data-snapped] .usa-cursor-dot{opacity:0}usa-cursor .usa-cursor-glow{position:absolute;left:-200px;top:-200px;width:400px;height:400px;border-radius:50%;background:radial-gradient(circle,color-mix(in srgb,var(--usa-cursor-color) 35%,transparent),transparent 65%);mix-blend-mode:screen}.usa-cursor-none,.usa-cursor-none *{cursor:none !important}@media (pointer:coarse),(prefers-reduced-motion:reduce){usa-cursor{display:none}.usa-cursor-none,.usa-cursor-none *{cursor:auto !important}}";
6
6
 
@@ -1,5 +1,5 @@
1
- import { o as onFrame, t as setStyleLoader, f as animationBudget, h as getMotionIntensity, g as configureComponents, j as setAnimationBudget, b as activeAnimations } from '../chunks/base-DWYNLg6P.js';
2
- export { s as schedulerStats } from '../chunks/base-DWYNLg6P.js';
1
+ import { o as onFrame, t as setStyleLoader, f as animationBudget, h as getMotionIntensity, g as configureComponents, j as setAnimationBudget, b as activeAnimations } from '../chunks/base-BnRyfuyM.js';
2
+ export { s as schedulerStats } from '../chunks/base-BnRyfuyM.js';
3
3
  import { C as COMPONENT_CATEGORIES } from '../chunks/index-tags-B-JBecYg.js';
4
4
 
5
5
  /**
@@ -1,6 +1,6 @@
1
- import { u as defineElement, k as clamp } from '../chunks/base-DWYNLg6P.js';
2
- import { d as springEasing, c as createSpring, s as snapTo, a as rubberBand, p as projectInertia } from '../chunks/spring-CAlkc1co.js';
3
- export { S as SPRING_PRESETS, l as linearEasing, r as resolveSpring, b as spring, e as springSamples, f as stepSpring, g as supportsLinearEasing } from '../chunks/spring-CAlkc1co.js';
1
+ import { u as defineElement, k as clamp } from '../chunks/base-BnRyfuyM.js';
2
+ import { d as springEasing, c as createSpring, s as snapTo, a as rubberBand, p as projectInertia } from '../chunks/spring-CZDNyqWp.js';
3
+ export { S as SPRING_PRESETS, l as linearEasing, r as resolveSpring, b as spring, e as springSamples, f as stepSpring, g as supportsLinearEasing } from '../chunks/spring-CZDNyqWp.js';
4
4
 
5
5
  var css$2 = "usa-spring{display:inline-block;transform-origin:50% 70%}usa-spring[block]{display:block}usa-spring[effect=\"drop\"]{transform-origin:50% 100%}usa-spring[data-state=\"hidden\"]{opacity:0}usa-spring[trigger=\"click\"],usa-spring[trigger=\"hover\"]{cursor:pointer;-webkit-tap-highlight-color:transparent}";
6
6
 
@@ -0,0 +1,138 @@
1
+ 'use strict';
2
+
3
+ var components_fxGpu = require('../chunks/gpu-cUixt7kT.cjs');
4
+ var components_fxText = require('./fx-text.cjs');
5
+ var components_fxLight = require('./fx-light.cjs');
6
+ var components_fx3d = require('./fx-3d.cjs');
7
+ var components_fxMorph = require('./fx-morph.cjs');
8
+ var components_fxTransitions = require('./fx-transitions.cjs');
9
+ var components_fxWeather = require('./fx-weather.cjs');
10
+ var components_fxPhysics = require('./fx-physics.cjs');
11
+ var components_fxFocus = require('./fx-focus.cjs');
12
+ var components_fxMusic = require('./fx-music.cjs');
13
+ var components_fxChart = require('./fx-chart.cjs');
14
+ var components_fxShop = require('./fx-shop.cjs');
15
+ var components_fxSocial = require('./fx-social.cjs');
16
+ var components_fxGame = require('./fx-game.cjs');
17
+ var components_fxGeo = require('./fx-geo.cjs');
18
+ var components_fxForm = require('./fx-form.cjs');
19
+ var components_fxAi = require('./fx-ai.cjs');
20
+ var components_fxFestival = require('./fx-festival.cjs');
21
+ var components_fxRetro = require('./fx-retro.cjs');
22
+ var components_fxOrganic = require('./fx-organic.cjs');
23
+ var components_fxCyber = require('./fx-cyber.cjs');
24
+ var components_fxPaper = require('./fx-paper.cjs');
25
+ var components_fxSurface = require('./fx-surface.cjs');
26
+ var components_fxGesture = require('./fx-gesture.cjs');
27
+ var components_fxSpatial = require('./fx-spatial.cjs');
28
+ var components_fxCinema = require('./fx-cinema.cjs');
29
+ var components_fxLottie = require('./fx-lottie.cjs');
30
+ var components_fxGenart = require('./fx-genart.cjs');
31
+ var components_fxVideo = require('./fx-video.cjs');
32
+ var components_fxSafe = require('./fx-safe.cjs');
33
+ var components_fxPerf = require('./fx-perf.cjs');
34
+ require('../chunks/registry-xQZnSqqV.cjs');
35
+ require('../chunks/base-DBheNxJu.cjs');
36
+ require('../chunks/generative-BHIj-NU0.cjs');
37
+ require('../chunks/shared-jkgRH-Hx.cjs');
38
+ require('../chunks/audio-BpU-A1m1.cjs');
39
+
40
+ const P = (name, effects) => ({ name, effects });
41
+ /** The `gpu` pack. */
42
+ const gpu = P('gpu', components_fxGpu.GPU_FX);
43
+ /** The `text` pack. */
44
+ const text = P('text', components_fxText.TEXT3_FX);
45
+ /** The `light` pack. */
46
+ const light = P('light', components_fxLight.LIGHT_FX);
47
+ /** The `depth` pack. */
48
+ const depth = P('depth', components_fx3d.DEPTH3_FX);
49
+ /** The `morph` pack. */
50
+ const morph = P('morph', components_fxMorph.MORPH2_FX);
51
+ /** The `transitions` pack. */
52
+ const transitions = P('transitions', components_fxTransitions.TRANSITIONS2_FX);
53
+ /** The `weather` pack. */
54
+ const weather = P('weather', components_fxWeather.WEATHER_FX);
55
+ /** The `physics` pack. */
56
+ const physics = P('physics', components_fxPhysics.PHYSICS2_FX);
57
+ /** The `focus` pack. */
58
+ const focus = P('focus', components_fxFocus.FOCUS_FX);
59
+ /** The `music` pack. */
60
+ const music = P('music', components_fxMusic.MUSIC_FX);
61
+ /** The `chart` pack. */
62
+ const chart = P('chart', components_fxChart.CHART_FX);
63
+ /** The `shop` pack. */
64
+ const shop = P('shop', components_fxShop.SHOP_FX);
65
+ /** The `social` pack. */
66
+ const social = P('social', components_fxSocial.SOCIAL_FX);
67
+ /** The `game` pack. */
68
+ const game = P('game', components_fxGame.GAME_FX);
69
+ /** The `geo` pack. */
70
+ const geo = P('geo', components_fxGeo.GEO_FX);
71
+ /** The `form` pack. */
72
+ const form = P('form', components_fxForm.FORM_FX);
73
+ /** The `ai` pack. */
74
+ const ai = P('ai', components_fxAi.AI_FX);
75
+ /** The `festival` pack. */
76
+ const festival = P('festival', components_fxFestival.FESTIVAL_FX);
77
+ /** The `retro` pack. */
78
+ const retro = P('retro', components_fxRetro.RETRO_FX);
79
+ /** The `organic` pack. */
80
+ const organic = P('organic', components_fxOrganic.ORGANIC_FX);
81
+ /** The `cyber` pack. */
82
+ const cyber = P('cyber', components_fxCyber.CYBER_FX);
83
+ /** The `paper` pack. */
84
+ const paper = P('paper', components_fxPaper.PAPER_FX);
85
+ /** The `surface` pack. */
86
+ const surface = P('surface', components_fxSurface.SURFACE_FX);
87
+ /** The `gesture3` pack. */
88
+ const gesture3 = P('gesture3', components_fxGesture.GESTURE3_FX);
89
+ /** The `spatial` pack. */
90
+ const spatial = P('spatial', components_fxSpatial.SPATIAL_FX);
91
+ /** The `cinema` pack. */
92
+ const cinema = P('cinema', components_fxCinema.CINEMA_FX);
93
+ /** The `lottie` pack. */
94
+ const lottie = P('lottie', components_fxLottie.LOTTIE_FX);
95
+ /** The `genart` pack. */
96
+ const genart = P('genart', components_fxGenart.GENART_FX);
97
+ /** The `video` pack. */
98
+ const video = P('video', components_fxVideo.VIDEO_FX);
99
+ /** The `safe` pack. */
100
+ const safe = P('safe', components_fxSafe.SAFE_FX);
101
+ /** The `perf3` pack. */
102
+ const perf3 = P('perf3', components_fxPerf.PERF3_FX);
103
+ /** Every built-in plugin. */
104
+ const ALL_PLUGINS = [gpu, text, light, depth, morph, transitions, weather, physics, focus, music, chart, shop, social, game, geo, form, ai, festival, retro, organic, cyber, paper, surface, gesture3, spatial, cinema, lottie, genart, video, safe, perf3];
105
+
106
+ exports.ALL_PLUGINS = ALL_PLUGINS;
107
+ exports.ai = ai;
108
+ exports.chart = chart;
109
+ exports.cinema = cinema;
110
+ exports.cyber = cyber;
111
+ exports.depth = depth;
112
+ exports.festival = festival;
113
+ exports.focus = focus;
114
+ exports.form = form;
115
+ exports.game = game;
116
+ exports.genart = genart;
117
+ exports.geo = geo;
118
+ exports.gesture3 = gesture3;
119
+ exports.gpu = gpu;
120
+ exports.light = light;
121
+ exports.lottie = lottie;
122
+ exports.morph = morph;
123
+ exports.music = music;
124
+ exports.organic = organic;
125
+ exports.paper = paper;
126
+ exports.perf3 = perf3;
127
+ exports.physics = physics;
128
+ exports.retro = retro;
129
+ exports.safe = safe;
130
+ exports.shop = shop;
131
+ exports.social = social;
132
+ exports.spatial = spatial;
133
+ exports.surface = surface;
134
+ exports.text = text;
135
+ exports.transitions = transitions;
136
+ exports.video = video;
137
+ exports.weather = weather;
138
+ //# sourceMappingURL=plugins.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plugins.cjs","sources":["../../src/components/plugins/index.ts"],"sourcesContent":["/**\n * `motionary/plugins` (10.0) — every built-in effect pack as a plugin for\n * `createMotion().use(…)` (`motionary/core`) or `usePlugins(…)` (`motionary/fx2`).\n * Import only the ones you use; each pulls in just its own pack.\n */\nimport type { EffectDefinition } from '../fx/registry';\nimport { GPU_FX } from '../fx2/gpu';\nimport { TEXT3_FX } from '../fx2/text3';\nimport { LIGHT_FX } from '../fx2/light';\nimport { DEPTH3_FX } from '../fx2/depth3';\nimport { MORPH2_FX } from '../fx2/morph2';\nimport { TRANSITIONS2_FX } from '../fx2/transitions2';\nimport { WEATHER_FX } from '../fx2/weather';\nimport { PHYSICS2_FX } from '../fx2/physics2';\nimport { FOCUS_FX } from '../fx2/focus';\nimport { MUSIC_FX } from '../fx2/music';\nimport { CHART_FX } from '../fx2/chart';\nimport { SHOP_FX } from '../fx2/shop';\nimport { SOCIAL_FX } from '../fx2/social';\nimport { GAME_FX } from '../fx2/game';\nimport { GEO_FX } from '../fx2/geo';\nimport { FORM_FX } from '../fx2/form';\nimport { AI_FX } from '../fx2/ai';\nimport { FESTIVAL_FX } from '../fx2/festival';\nimport { RETRO_FX } from '../fx2/retro2';\nimport { ORGANIC_FX } from '../fx2/organic';\nimport { CYBER_FX } from '../fx2/cyber';\nimport { PAPER_FX } from '../fx2/paper';\nimport { SURFACE_FX } from '../fx2/themefx';\nimport { GESTURE3_FX } from '../fx2/gesture3';\nimport { SPATIAL_FX } from '../fx2/spatial';\nimport { CINEMA_FX } from '../fx2/cinema';\nimport { LOTTIE_FX } from '../fx2/lottie';\nimport { GENART_FX } from '../fx2/genart';\nimport { VIDEO_FX } from '../fx2/video';\nimport { SAFE_FX } from '../fx2/safemotion';\nimport { PERF3_FX } from '../fx2/perf3';\n\nexport interface EffectPlugin {\n name: string;\n effects: EffectDefinition[];\n}\nconst P = (name: string, effects: EffectDefinition[]): EffectPlugin => ({ name, effects });\n\n/** The `gpu` pack. */\nexport const gpu = P('gpu', GPU_FX);\n/** The `text` pack. */\nexport const text = P('text', TEXT3_FX);\n/** The `light` pack. */\nexport const light = P('light', LIGHT_FX);\n/** The `depth` pack. */\nexport const depth = P('depth', DEPTH3_FX);\n/** The `morph` pack. */\nexport const morph = P('morph', MORPH2_FX);\n/** The `transitions` pack. */\nexport const transitions = P('transitions', TRANSITIONS2_FX);\n/** The `weather` pack. */\nexport const weather = P('weather', WEATHER_FX);\n/** The `physics` pack. */\nexport const physics = P('physics', PHYSICS2_FX);\n/** The `focus` pack. */\nexport const focus = P('focus', FOCUS_FX);\n/** The `music` pack. */\nexport const music = P('music', MUSIC_FX);\n/** The `chart` pack. */\nexport const chart = P('chart', CHART_FX);\n/** The `shop` pack. */\nexport const shop = P('shop', SHOP_FX);\n/** The `social` pack. */\nexport const social = P('social', SOCIAL_FX);\n/** The `game` pack. */\nexport const game = P('game', GAME_FX);\n/** The `geo` pack. */\nexport const geo = P('geo', GEO_FX);\n/** The `form` pack. */\nexport const form = P('form', FORM_FX);\n/** The `ai` pack. */\nexport const ai = P('ai', AI_FX);\n/** The `festival` pack. */\nexport const festival = P('festival', FESTIVAL_FX);\n/** The `retro` pack. */\nexport const retro = P('retro', RETRO_FX);\n/** The `organic` pack. */\nexport const organic = P('organic', ORGANIC_FX);\n/** The `cyber` pack. */\nexport const cyber = P('cyber', CYBER_FX);\n/** The `paper` pack. */\nexport const paper = P('paper', PAPER_FX);\n/** The `surface` pack. */\nexport const surface = P('surface', SURFACE_FX);\n/** The `gesture3` pack. */\nexport const gesture3 = P('gesture3', GESTURE3_FX);\n/** The `spatial` pack. */\nexport const spatial = P('spatial', SPATIAL_FX);\n/** The `cinema` pack. */\nexport const cinema = P('cinema', CINEMA_FX);\n/** The `lottie` pack. */\nexport const lottie = P('lottie', LOTTIE_FX);\n/** The `genart` pack. */\nexport const genart = P('genart', GENART_FX);\n/** The `video` pack. */\nexport const video = P('video', VIDEO_FX);\n/** The `safe` pack. */\nexport const safe = P('safe', SAFE_FX);\n/** The `perf3` pack. */\nexport const perf3 = P('perf3', PERF3_FX);\n\n/** Every built-in plugin. */\nexport const ALL_PLUGINS: EffectPlugin[] = [gpu, text, light, depth, morph, transitions, weather, physics, focus, music, chart, shop, social, game, geo, form, ai, festival, retro, organic, cyber, paper, surface, gesture3, spatial, cinema, lottie, genart, video, safe, perf3];\n"],"names":["GPU_FX","TEXT3_FX","LIGHT_FX","DEPTH3_FX","MORPH2_FX","TRANSITIONS2_FX","WEATHER_FX","PHYSICS2_FX","FOCUS_FX","MUSIC_FX","CHART_FX","SHOP_FX","SOCIAL_FX","GAME_FX","GEO_FX","FORM_FX","AI_FX","FESTIVAL_FX","RETRO_FX","ORGANIC_FX","CYBER_FX","PAPER_FX","SURFACE_FX","GESTURE3_FX","SPATIAL_FX","CINEMA_FX","LOTTIE_FX","GENART_FX","VIDEO_FX","SAFE_FX","PERF3_FX"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,OAA2B,MAAoB,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAE1F;AACO,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,EAAEA,uBAAM;AAClC;AACO,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,EAAEC,0BAAQ;AACtC;AAC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AQ;AACxC;AACO,MAAM,OAAO,GAAG,CAAC,CAAC,SAAS,EAAEC,+BAAU;AAC9C;AACO,MAAM,QAAQ,GAAG,CAAC,CAAC,UAAU,EAAEC,gCAAW;AACjD;AACO,MAAM,OAAO,GAAG,CAAC,CAAC,SAAS,EAAEC,+BAAU;AAC9C;AACO,MAAM,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAEC,6BAAS;AAC3C;AACO,MAAM,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAEC,6BAAS;AAC3C;AACO,MAAM,MAAM,GAAG,CAAC,CAAC,QAAQ,EAAEC,6BAAS;AAC3C;AACO,MAAM,KAAK,GAAG,CAAC,CAAC,OAAO,EAAEC,2BAAQ;AACxC;AACO,MAAM,IAAI,GAAG,CAAC,CAAC,MAAM,EAAEC,yBAAO;AACrC;AACO,MAAM,KAAK,GAAG,CAAC,CAAC,OAAO,EAAEC,0BAAQ;AAExC;AACO,MAAM,WAAW,GAAmB,CAAC,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,120 @@
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
+ * `motionary/plugins` (10.0) — every built-in effect pack as a plugin for
46
+ * `createMotion().use(…)` (`motionary/core`) or `usePlugins(…)` (`motionary/fx2`).
47
+ * Import only the ones you use; each pulls in just its own pack.
48
+ */
49
+
50
+ interface EffectPlugin {
51
+ name: string;
52
+ effects: EffectDefinition[];
53
+ }
54
+ /** The `gpu` pack. */
55
+ declare const gpu: EffectPlugin;
56
+ /** The `text` pack. */
57
+ declare const text: EffectPlugin;
58
+ /** The `light` pack. */
59
+ declare const light: EffectPlugin;
60
+ /** The `depth` pack. */
61
+ declare const depth: EffectPlugin;
62
+ /** The `morph` pack. */
63
+ declare const morph: EffectPlugin;
64
+ /** The `transitions` pack. */
65
+ declare const transitions: EffectPlugin;
66
+ /** The `weather` pack. */
67
+ declare const weather: EffectPlugin;
68
+ /** The `physics` pack. */
69
+ declare const physics: EffectPlugin;
70
+ /** The `focus` pack. */
71
+ declare const focus: EffectPlugin;
72
+ /** The `music` pack. */
73
+ declare const music: EffectPlugin;
74
+ /** The `chart` pack. */
75
+ declare const chart: EffectPlugin;
76
+ /** The `shop` pack. */
77
+ declare const shop: EffectPlugin;
78
+ /** The `social` pack. */
79
+ declare const social: EffectPlugin;
80
+ /** The `game` pack. */
81
+ declare const game: EffectPlugin;
82
+ /** The `geo` pack. */
83
+ declare const geo: EffectPlugin;
84
+ /** The `form` pack. */
85
+ declare const form: EffectPlugin;
86
+ /** The `ai` pack. */
87
+ declare const ai: EffectPlugin;
88
+ /** The `festival` pack. */
89
+ declare const festival: EffectPlugin;
90
+ /** The `retro` pack. */
91
+ declare const retro: EffectPlugin;
92
+ /** The `organic` pack. */
93
+ declare const organic: EffectPlugin;
94
+ /** The `cyber` pack. */
95
+ declare const cyber: EffectPlugin;
96
+ /** The `paper` pack. */
97
+ declare const paper: EffectPlugin;
98
+ /** The `surface` pack. */
99
+ declare const surface: EffectPlugin;
100
+ /** The `gesture3` pack. */
101
+ declare const gesture3: EffectPlugin;
102
+ /** The `spatial` pack. */
103
+ declare const spatial: EffectPlugin;
104
+ /** The `cinema` pack. */
105
+ declare const cinema: EffectPlugin;
106
+ /** The `lottie` pack. */
107
+ declare const lottie: EffectPlugin;
108
+ /** The `genart` pack. */
109
+ declare const genart: EffectPlugin;
110
+ /** The `video` pack. */
111
+ declare const video: EffectPlugin;
112
+ /** The `safe` pack. */
113
+ declare const safe: EffectPlugin;
114
+ /** The `perf3` pack. */
115
+ declare const perf3: EffectPlugin;
116
+ /** Every built-in plugin. */
117
+ declare const ALL_PLUGINS: EffectPlugin[];
118
+
119
+ export { ALL_PLUGINS, ai, chart, cinema, cyber, depth, festival, focus, form, game, genart, geo, gesture3, gpu, light, lottie, morph, music, organic, paper, perf3, physics, retro, safe, shop, social, spatial, surface, text, transitions, video, weather };
120
+ export type { EffectPlugin };