use-scroll-animate 9.1.0 → 9.3.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fx-lottie.js","sources":["../../src/components/fx2/lottie.ts"],"sourcesContent":["/**\n * 9.2 — Lottie import (`motionary/fx/lottie`, also `motionary/components/fx-lottie`).\n *\n * `lottieToKeyframes(json)` converts the layer transforms of a Lottie\n * (bodymovin) JSON — position `p`, scale `s`, rotation `r`, opacity `o`\n * (static or keyframed) — into WAAPI keyframes per layer plus the duration\n * (`op − ip` frames at `fr` fps), so a designer's After Effects motion runs\n * on Motionary's clock without lottie-web. `lottieToSvg(json)` renders the\n * simple vector shapes (ellipse `el`, rect `rc`, path `sh`, fill `fl`,\n * stroke `st`) as SVG groups, one per layer. `riveInputs(instance, el, map)`\n * wires Motionary-style triggers (hover / press / click / enter) to the\n * boolean / trigger inputs of a Rive state machine you created with the\n * Rive runtime.\n *\n * Effects: `lottie-play` (attention) plays the keyframes stored on an\n * element by `<usa-lottie>`; `icon-pop` (click) a sticker-like pop with a\n * ring burst for icons. Reduced motion: no motion.\n */\nimport type { EffectContext, EffectDefinition } from '../fx/registry';\nimport { registerEffects } from '../fx/registry';\n\ntype Prop = { a?: number; k: any };\nexport interface LottieLayerMotion {\n name: string;\n index: number;\n keyframes: Keyframe[];\n anchor: [number, number];\n}\nexport interface LottieMotion {\n width: number;\n height: number;\n duration: number;\n layers: LottieLayerMotion[];\n}\n\nconst arr = (v: any): number[] => (Array.isArray(v) ? v.map(Number) : [Number(v)]);\n/** Frames (t) → values for one transform property (static props give one key at t = ip) (9.2). */\nfunction track(p: Prop | undefined, ip: number): { t: number; v: number[] }[] {\n if (!p) return [];\n if (!p.a || !Array.isArray(p.k) || typeof p.k[0] !== 'object') return [{ t: ip, v: arr(p.k) }];\n return (p.k as any[]).filter((k) => k && k.s != null).map((k) => ({ t: Number(k.t), v: arr(k.s) }));\n}\nconst at = (tr: { t: number; v: number[] }[], t: number): number[] | undefined => {\n if (!tr.length) return undefined;\n if (t <= tr[0].t) return tr[0].v;\n for (let i = 1; i < tr.length; i++)\n if (t <= tr[i].t) {\n const a = tr[i - 1];\n const b = tr[i];\n const u = b.t === a.t ? 1 : (t - a.t) / (b.t - a.t);\n return a.v.map((x, j) => x + ((b.v[j] ?? x) - x) * u);\n }\n return tr[tr.length - 1].v;\n};\nconst r2 = (n: number) => Math.round(n * 100) / 100;\n\n/** Lottie JSON → WAAPI keyframes per layer + duration (ms) (9.2). */\nexport function lottieToKeyframes(json: any): LottieMotion {\n const d = typeof json === 'string' ? JSON.parse(json) : json;\n const fr = Number(d?.fr) || 30;\n const ip = Number(d?.ip) || 0;\n const op = Number(d?.op) || ip + fr;\n const span = Math.max(1, op - ip);\n const layers: LottieLayerMotion[] = (Array.isArray(d?.layers) ? d.layers : []).map((L: any, index: number) => {\n const ks = L?.ks || {};\n const tracks = { p: track(ks.p, ip), s: track(ks.s, ip), r: track(ks.r, ip), o: track(ks.o, ip) };\n const anchor = (arr(ks.a?.k ?? [0, 0]).slice(0, 2) as [number, number]) || [0, 0];\n const times = Array.from(new Set([ip, op, ...Object.values(tracks).flat().map((k) => k.t)])).filter((t) => t >= ip && t <= op).sort((a, b) => a - b);\n const keyframes: Keyframe[] = times.map((t) => {\n const p = at(tracks.p, t);\n const s = at(tracks.s, t);\n const r = at(tracks.r, t);\n const o = at(tracks.o, t);\n // Lottie order: move the anchor to the position, rotate + scale around the anchor\n const pp = p || anchor;\n const tf: string[] = [`translate(${r2(pp[0])}px, ${r2(pp[1] ?? 0)}px)`];\n if (r) tf.push(`rotate(${r2(r[0])}deg)`);\n if (s) tf.push(`scale(${r2(s[0] / 100)}, ${r2((s[1] ?? s[0]) / 100)})`);\n tf.push(`translate(${r2(-anchor[0])}px, ${r2(-anchor[1])}px)`);\n const k: Keyframe = { offset: r2((t - ip) / span), transform: tf.join(' ') };\n if (o) k.opacity = r2(o[0] / 100);\n return k;\n });\n return { name: String(L?.nm ?? `layer ${index + 1}`), index, keyframes, anchor };\n });\n return { width: Number(d?.w) || 100, height: Number(d?.h) || 100, duration: Math.round((span / fr) * 1000), layers };\n}\n\nconst hex = (c: any): string => {\n const v = arr(c?.k ?? c).slice(0, 3).map((x) => Math.round(Math.min(1, Math.max(0, x)) * 255));\n return `#${v.map((x) => x.toString(16).padStart(2, '0')).join('')}`;\n};\nfunction shapes(items: any[], fill: string, stroke: string, sw: number): string {\n let f = fill;\n let s = stroke;\n let w = sw;\n for (const it of items) {\n if (it?.ty === 'fl') f = hex(it.c);\n if (it?.ty === 'st') {\n s = hex(it.c);\n w = Number(it.w?.k) || 2;\n }\n }\n const paint = `fill=\"${f}\"${s !== 'none' ? ` stroke=\"${s}\" stroke-width=\"${w}\"` : ''}`;\n return items\n .map((it) => {\n if (it?.ty === 'gr') return `<g>${shapes(it.it || [], f, s, w)}</g>`;\n if (it?.ty === 'el') {\n const [cx, cy] = arr(it.p?.k ?? [0, 0]);\n const [sx, sy] = arr(it.s?.k ?? [10, 10]);\n return `<ellipse cx=\"${cx}\" cy=\"${cy}\" rx=\"${sx / 2}\" ry=\"${(sy ?? sx) / 2}\" ${paint}/>`;\n }\n if (it?.ty === 'rc') {\n const [cx, cy] = arr(it.p?.k ?? [0, 0]);\n const [sx, sy] = arr(it.s?.k ?? [10, 10]);\n return `<rect x=\"${cx - sx / 2}\" y=\"${cy - sy / 2}\" width=\"${sx}\" height=\"${sy}\" rx=\"${Number(it.r?.k) || 0}\" ${paint}/>`;\n }\n if (it?.ty === 'sh') {\n const k = it.ks?.k;\n const v: number[][] = k?.v || [];\n if (!v.length) return '';\n const i: number[][] = k.i || [];\n const o: number[][] = k.o || [];\n let dd = `M${v[0][0]} ${v[0][1]}`;\n for (let n = 1; n < v.length + (k.c ? 1 : 0); n++) {\n const a = v[n - 1];\n const b = v[n % v.length];\n const c1 = [a[0] + (o[n - 1]?.[0] || 0), a[1] + (o[n - 1]?.[1] || 0)];\n const c2 = [b[0] + (i[n % v.length]?.[0] || 0), b[1] + (i[n % v.length]?.[1] || 0)];\n dd += ` C${c1[0]} ${c1[1]} ${c2[0]} ${c2[1]} ${b[0]} ${b[1]}`;\n }\n return `<path d=\"${dd}${k.c ? 'Z' : ''}\" ${paint}/>`;\n }\n return '';\n })\n .join('');\n}\n\n/** Render the simple vector layers of a Lottie JSON as an SVG string (one `<g data-layer>` per layer, top layer last) (9.2). */\nexport function lottieToSvg(json: any): string {\n const d = typeof json === 'string' ? JSON.parse(json) : json;\n const w = Number(d?.w) || 100;\n const h = Number(d?.h) || 100;\n const ls: any[] = Array.isArray(d?.layers) ? d.layers : [];\n const groups = ls\n .map((L, i) => ({ L, i }))\n .reverse()\n .map(({ L, i }) => `<g data-layer=\"${i}\"><g class=\"usa-lt-inner\">${shapes(L?.shapes || [], '#000', 'none', 0)}</g></g>`)\n .join('');\n return `<svg viewBox=\"0 0 ${w} ${h}\" width=\"${w}\" height=\"${h}\" aria-hidden=\"true\">${groups}</svg>`;\n}\n\n/** Wire hover / press / click / enter on `el` to a Rive state machine's inputs: map { hover: 'isHover', click: 'fire' } (9.2). */\nexport function riveInputs(instance: { stateMachineInputs(sm: string): any[] }, stateMachine: string, el: HTMLElement, map: Partial<Record<'hover' | 'press' | 'click' | 'enter', string>>): () => void {\n const inputs = (instance.stateMachineInputs(stateMachine) || []) as { name: string; type?: number; value?: boolean; fire?: () => void }[];\n const get = (n?: string) => inputs.find((i) => i.name === n);\n const set = (n: string | undefined, v: boolean) => {\n const i = get(n);\n if (!i) return;\n // Rive StateMachineInputType: 58 = trigger (fire on true), 59 = boolean\n if (i.type === 58 && typeof i.fire === 'function') {\n if (v) i.fire();\n } else i.value = v;\n };\n const offs: (() => void)[] = [];\n const on = (t: string, fn: (e: Event) => void) => {\n el.addEventListener(t, fn);\n offs.push(() => el.removeEventListener(t, fn));\n };\n if (map.hover) (on('pointerenter', () => set(map.hover, true)), on('pointerleave', () => set(map.hover, false)));\n if (map.press) (on('pointerdown', () => set(map.press, true)), on('pointerup', () => set(map.press, false)));\n if (map.click) on('click', () => set(map.click, true));\n if (map.enter && typeof IntersectionObserver !== 'undefined') {\n const io = new IntersectionObserver((es) => es.forEach((e) => set(map.enter, e.isIntersecting)));\n io.observe(el);\n offs.push(() => io.disconnect());\n }\n return () => offs.splice(0).forEach((f) => f());\n}\n\nexport const LOTTIE_FX: EffectDefinition[] = [\n {\n name: 'lottie-play',\n kind: 'attention',\n description: 'Replays the Lottie keyframes stored on an element by <usa-lottie> (or a `json` option) once.',\n defaults: {},\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\n const host = el.closest('usa-lottie') as (HTMLElement & { play?: () => void }) | null;\n if (host?.play) return void host.play();\n if (!o.json) return;\n const m = lottieToKeyframes(o.json);\n return Promise.all(m.layers.map((l) => ctx.animate(el, l.keyframes, { duration: m.duration })?.finished.catch(() => undefined))).then(() => undefined);\n },\n },\n {\n name: 'icon-pop',\n kind: 'click',\n description: 'A sticker-like pop with a ring burst, for icons (`color`).',\n defaults: { color: '#f43f5e', duration: 500 },\n run: (el: HTMLElement, o: any, ctx: EffectContext) => {\n if (ctx.reduced) return;\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 ring = document.createElement('span');\n ring.setAttribute('aria-hidden', 'true');\n Object.assign(ring.style, { position: 'absolute', inset: '0', borderRadius: '50%', border: `2px solid ${o.color}`, pointerEvents: 'none' });\n el.appendChild(ring);\n ctx.onCleanup(() => ring.remove());\n const a = ctx.animate(el, [{ transform: 'scale(1)' }, { transform: 'scale(.8)', offset: 0.2 }, { transform: 'scale(1.2)', offset: 0.55 }, { transform: 'scale(1)' }], { duration: o.duration, easing: 'cubic-bezier(.3,1.5,.5,1)' });\n const b = ctx.animate(ring, [{ transform: 'scale(.6)', opacity: 1 }, { transform: 'scale(1.8)', opacity: 0 }], { duration: o.duration, easing: 'ease-out' });\n const end = () => ring.remove();\n return Promise.all([a?.finished.catch(() => undefined), b?.finished.catch(() => undefined)]).then(end, end);\n },\n },\n];\n\n/** Register lottie-play and icon-pop (9.2). */\nexport function registerLottiePack(): void {\n registerEffects(LOTTIE_FX);\n}\n"],"names":[],"mappings":";;;AAmCA,MAAM,GAAG,GAAG,CAAC,CAAM,MAAgB,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;AAClF;AACA,SAAS,KAAK,CAAC,CAAmB,EAAE,EAAU,EAAA;AAC5C,IAAA,IAAI,CAAC,CAAC;AAAE,QAAA,OAAO,EAAE;IACjB,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,QAAQ;AAAE,QAAA,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9F,OAAQ,CAAC,CAAC,CAAW,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACrG;AACA,MAAM,EAAE,GAAG,CAAC,EAAgC,EAAE,CAAS,KAA0B;IAC/E,IAAI,CAAC,EAAE,CAAC,MAAM;AAAE,QAAA,OAAO,SAAS;AAChC,IAAA,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAAE,QAAA,OAAO,EAAE,CAAC,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AC,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,2BAA2B,EAAE,CAAC;AACpO,YAAA,MAAM,CAAC,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;YAC5J,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE;AAC/B,YAAA,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC,EAAE,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,CAAC;QAC7G,CAAC;AACF,KAAA;;AAGH;SACgB,kBAAkB,GAAA;IAChC,eAAe,CAAC,SAAS,CAAC;AAC5B;;;;"}
@@ -27,6 +27,8 @@ var components_fxSurface = require('./fx-surface.cjs');
27
27
  var components_fxGesture = require('./fx-gesture.cjs');
28
28
  var components_fxSpatial = require('./fx-spatial.cjs');
29
29
  var components_fxCinema = require('./fx-cinema.cjs');
30
+ var components_fxLottie = require('./fx-lottie.cjs');
31
+ var components_fxGenart = require('./fx-genart.cjs');
30
32
  require('../chunks/registry-BVklOepd.cjs');
31
33
  require('../chunks/base-DoRUZBy-.cjs');
32
34
  require('../chunks/generative-BHIj-NU0.cjs');
@@ -61,6 +63,8 @@ const EFFECT_PACKS = {
61
63
  gesture3: components_fxGesture.GESTURE3_FX,
62
64
  spatial: components_fxSpatial.SPATIAL_FX,
63
65
  cinema: components_fxCinema.CINEMA_FX,
66
+ lottie: components_fxLottie.LOTTIE_FX,
67
+ genart: components_fxGenart.GENART_FX,
64
68
  };
65
69
  /** Register every 6.x effect pack (idempotent). */
66
70
  function registerEffectPacks() {
@@ -90,6 +94,8 @@ function registerEffectPacks() {
90
94
  components_fxGesture.registerGesture3Pack();
91
95
  components_fxSpatial.registerSpatialPack();
92
96
  components_fxCinema.registerCinemaPack();
97
+ components_fxLottie.registerLottiePack();
98
+ components_fxGenart.registerGenArtPack();
93
99
  }
94
100
 
95
101
  exports.EFFECT_PACK_FORMAT = manifest.EFFECT_PACK_FORMAT;
@@ -189,6 +195,16 @@ exports.CAMERA_MOVES = components_fxCinema.CAMERA_MOVES;
189
195
  exports.CINEMA_FX = components_fxCinema.CINEMA_FX;
190
196
  exports.cameraFrame = components_fxCinema.cameraFrame;
191
197
  exports.registerCinemaPack = components_fxCinema.registerCinemaPack;
198
+ exports.LOTTIE_FX = components_fxLottie.LOTTIE_FX;
199
+ exports.lottieToKeyframes = components_fxLottie.lottieToKeyframes;
200
+ exports.lottieToSvg = components_fxLottie.lottieToSvg;
201
+ exports.registerLottiePack = components_fxLottie.registerLottiePack;
202
+ exports.riveInputs = components_fxLottie.riveInputs;
203
+ exports.GENART_FX = components_fxGenart.GENART_FX;
204
+ exports.PALETTES = components_fxGenart.PALETTES;
205
+ exports.meshGradient = components_fxGenart.meshGradient;
206
+ exports.registerGenArtPack = components_fxGenart.registerGenArtPack;
207
+ exports.seededRandom = components_fxGenart.seededRandom;
192
208
  exports.EFFECT_PACKS = EFFECT_PACKS;
193
209
  exports.registerEffectPacks = registerEffectPacks;
194
210
  //# sourceMappingURL=fx2.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"fx2.cjs","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nexport { EFFECT_PACK_FORMAT, packManifest, validateManifest, loadEffectPack } from './manifest';\nexport type { EffectPackManifest } from './manifest';\nimport { GPU_FX, registerGpuPack } from './gpu';\nimport { TEXT3_FX, registerTextPack, splitChars } from './text3';\nimport { LIGHT_FX, registerLightPack, trackPointer } from './light';\nimport { DEPTH3_FX, register3dPack } from './depth3';\nimport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath } from './morph2';\nimport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions } from './transitions2';\nimport { WEATHER_FX, registerWeatherPack, skyAt } from './weather';\nimport { PHYSICS2_FX, registerPhysicsPack, VerletWorld } from './physics2';\nimport { FOCUS_FX, registerFocusPack } from './focus';\nimport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample } from './music';\nimport { CHART_FX, registerChartPack, parseFigure } from './chart';\nimport { SHOP_FX, registerShopPack, arcPath } from './shop';\nimport { SOCIAL_FX, registerSocialPack, fanAngles } from './social';\nimport { GAME_FX, registerGamePack, throwPath } from './game';\nimport { GEO_FX, registerGeoPack, routeLength } from './geo';\nimport { FORM_FX, registerFormPack, shakeFrames } from './form';\nimport { AI_FX, registerAiPack, splitWords } from './ai';\nimport { FESTIVAL_FX, registerFestivalPack, sparkVectors } from './festival';\nimport { RETRO_FX, registerRetroPack, pixelSteps } from './retro2';\nimport { ORGANIC_FX, registerOrganicPack, blobRadius } from './organic';\nimport { CYBER_FX, registerCyberPack, decodeFrame } from './cyber';\nimport { PAPER_FX, registerPaperPack, roughLine, paperRandom } from './paper';\nimport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme } from './themefx';\nimport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt } from './gesture3';\nimport { SPATIAL_FX, registerSpatialPack, yawToOffset, xrSupport } from './spatial';\nimport { CINEMA_FX, registerCinemaPack, cameraFrame, CAMERA_MOVES } from './cinema';\n\nexport { GPU_FX, registerGpuPack, TEXT3_FX, registerTextPack, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport { supportsWebGPU, glslToWgsl, wgslModule, webgpuBackground, WGSL_HEAD } from './webgpu';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightPack, trackPointer };\n\nexport { DEPTH3_FX, register3dPack };\n\nexport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath };\n\nexport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions };\n\nexport { WEATHER_FX, registerWeatherPack, skyAt };\n\nexport { PHYSICS2_FX, registerPhysicsPack, VerletWorld };\n\nexport { FOCUS_FX, registerFocusPack };\n\nexport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample };\n\nexport { CHART_FX, registerChartPack, parseFigure };\n\nexport { SHOP_FX, registerShopPack, arcPath };\n\nexport { SOCIAL_FX, registerSocialPack, fanAngles };\n\nexport { GAME_FX, registerGamePack, throwPath };\n\nexport { GEO_FX, registerGeoPack, routeLength };\n\nexport { FORM_FX, registerFormPack, shakeFrames };\n\nexport { AI_FX, registerAiPack, splitWords };\n\nexport { FESTIVAL_FX, registerFestivalPack, sparkVectors };\n\nexport { RETRO_FX, registerRetroPack, pixelSteps };\n\nexport { ORGANIC_FX, registerOrganicPack, blobRadius };\n\nexport { CYBER_FX, registerCyberPack, decodeFrame };\n\nexport { PAPER_FX, registerPaperPack, roughLine, paperRandom };\n\nexport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme };\n\nexport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt };\n\nexport { SPATIAL_FX, registerSpatialPack, yawToOffset, xrSupport };\n\nexport { CINEMA_FX, registerCinemaPack, cameraFrame, CAMERA_MOVES };\n\n/** The 6.x effect packs by name. */\nexport const EFFECT_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n depth: DEPTH3_FX,\n morph: MORPH2_FX,\n transitions: TRANSITIONS2_FX,\n weather: WEATHER_FX,\n physics: PHYSICS2_FX,\n focus: FOCUS_FX,\n music: MUSIC_FX,\n chart: CHART_FX,\n shop: SHOP_FX,\n social: SOCIAL_FX,\n game: GAME_FX,\n geo: GEO_FX,\n form: FORM_FX,\n ai: AI_FX,\n festival: FESTIVAL_FX,\n retro: RETRO_FX,\n organic: ORGANIC_FX,\n cyber: CYBER_FX,\n paper: PAPER_FX,\n surface: SURFACE_FX,\n gesture3: GESTURE3_FX,\n spatial: SPATIAL_FX,\n cinema: CINEMA_FX,\n};\n\n/** Register every 6.x effect pack (idempotent). */\nexport function registerEffectPacks(): void {\n registerGpuPack();\n registerTextPack();\n registerLightPack();\n register3dPack();\n registerMorphPack();\n registerTransitionsPack();\n registerWeatherPack();\n registerPhysicsPack();\n registerFocusPack();\n registerMusicPack();\n registerChartPack();\n registerShopPack();\n registerSocialPack();\n registerGamePack();\n registerGeoPack();\n registerFormPack();\n registerAiPack();\n registerFestivalPack();\n registerRetroPack();\n registerOrganicPack();\n registerCyberPack();\n registerPaperPack();\n registerSurfacePack();\n registerGesture3Pack();\n registerSpatialPack();\n registerCinemaPack();\n}\n\n\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","registerGpuPack","registerTextPack","registerLightPack","register3dPack","registerMorphPack","registerTransitionsPack","registerWeatherPack","registerPhysicsPack","registerFocusPack","registerMusicPack","registerChartPack","registerShopPack","registerSocialPack","registerGamePack","registerGeoPack","registerFormPack","registerAiPack","registerFestivalPack","registerRetroPack","registerOrganicPack","registerCyberPack","registerPaperPack","registerSurfacePack","registerGesture3Pack","registerSpatialPack","registerCinemaPack"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA;AACO,MAAM,YAAY,GAAuC;AAC9D,IAAA,GAAG,EAAEA,uBAAM;AACX,IAAA,IAAI,EAAEC,0BAAQ;AACd,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,yBAAS;AAChB,IAAA,KAAK,EAAEC,4BAAS;AAChB,IAAA,WAAW,EAAEC,wCAAe;AAC5B,IAAA,OAAO,EAAEC,+BAAU;AACnB,IAAA,OAAO,EAAEC,gCAAW;AACpB,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,IAAI,EAAEC,yBAAO;AACb,IAAA,MAAM,EAAEC,6BAAS;AACjB,IAAA,IAAI,EAAEC,yBAAO;AACb,IAAA,GAAG,EAAEC,uBAAM;AACX,IAAA,IAAI,EAAEC,yBAAO;AACb,IAAA,EAAE,EAAEC,qBAAK;AACT,IAAA,QAAQ,EAAEC,iCAAW;AACrB,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,OAAO,EAAEC,+BAAU;AACnB,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,OAAO,EAAEC,+BAAU;AACnB,IAAA,QAAQ,EAAEC,gCAAW;AACrB,IAAA,OAAO,EAAEC,+BAAU;AACnB,IAAA,MAAM,EAAEC,6BAAS;;AAGnB;SACgB,mBAAmB,GAAA;AACjC,IAAAC,gCAAe,EAAE;AACjB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,8BAAc,EAAE;AAChB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,gDAAuB,EAAE;AACzB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,sCAAkB,EAAE;AACpB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,gCAAe,EAAE;AACjB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,8BAAc,EAAE;AAChB,IAAAC,0CAAoB,EAAE;AACtB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,yCAAoB,EAAE;AACtB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,sCAAkB,EAAE;AACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"fx2.cjs","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nexport { EFFECT_PACK_FORMAT, packManifest, validateManifest, loadEffectPack } from './manifest';\nexport type { EffectPackManifest } from './manifest';\nimport { GPU_FX, registerGpuPack } from './gpu';\nimport { TEXT3_FX, registerTextPack, splitChars } from './text3';\nimport { LIGHT_FX, registerLightPack, trackPointer } from './light';\nimport { DEPTH3_FX, register3dPack } from './depth3';\nimport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath } from './morph2';\nimport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions } from './transitions2';\nimport { WEATHER_FX, registerWeatherPack, skyAt } from './weather';\nimport { PHYSICS2_FX, registerPhysicsPack, VerletWorld } from './physics2';\nimport { FOCUS_FX, registerFocusPack } from './focus';\nimport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample } from './music';\nimport { CHART_FX, registerChartPack, parseFigure } from './chart';\nimport { SHOP_FX, registerShopPack, arcPath } from './shop';\nimport { SOCIAL_FX, registerSocialPack, fanAngles } from './social';\nimport { GAME_FX, registerGamePack, throwPath } from './game';\nimport { GEO_FX, registerGeoPack, routeLength } from './geo';\nimport { FORM_FX, registerFormPack, shakeFrames } from './form';\nimport { AI_FX, registerAiPack, splitWords } from './ai';\nimport { FESTIVAL_FX, registerFestivalPack, sparkVectors } from './festival';\nimport { RETRO_FX, registerRetroPack, pixelSteps } from './retro2';\nimport { ORGANIC_FX, registerOrganicPack, blobRadius } from './organic';\nimport { CYBER_FX, registerCyberPack, decodeFrame } from './cyber';\nimport { PAPER_FX, registerPaperPack, roughLine, paperRandom } from './paper';\nimport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme } from './themefx';\nimport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt } from './gesture3';\nimport { SPATIAL_FX, registerSpatialPack, yawToOffset, xrSupport } from './spatial';\nimport { CINEMA_FX, registerCinemaPack, cameraFrame, CAMERA_MOVES } from './cinema';\nimport { LOTTIE_FX, registerLottiePack, lottieToKeyframes, lottieToSvg, riveInputs } from './lottie';\nimport { GENART_FX, registerGenArtPack, PALETTES, seededRandom, meshGradient } from './genart';\n\nexport { GPU_FX, registerGpuPack, TEXT3_FX, registerTextPack, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport { supportsWebGPU, glslToWgsl, wgslModule, webgpuBackground, WGSL_HEAD } from './webgpu';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightPack, trackPointer };\n\nexport { DEPTH3_FX, register3dPack };\n\nexport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath };\n\nexport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions };\n\nexport { WEATHER_FX, registerWeatherPack, skyAt };\n\nexport { PHYSICS2_FX, registerPhysicsPack, VerletWorld };\n\nexport { FOCUS_FX, registerFocusPack };\n\nexport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample };\n\nexport { CHART_FX, registerChartPack, parseFigure };\n\nexport { SHOP_FX, registerShopPack, arcPath };\n\nexport { SOCIAL_FX, registerSocialPack, fanAngles };\n\nexport { GAME_FX, registerGamePack, throwPath };\n\nexport { GEO_FX, registerGeoPack, routeLength };\n\nexport { FORM_FX, registerFormPack, shakeFrames };\n\nexport { AI_FX, registerAiPack, splitWords };\n\nexport { FESTIVAL_FX, registerFestivalPack, sparkVectors };\n\nexport { RETRO_FX, registerRetroPack, pixelSteps };\n\nexport { ORGANIC_FX, registerOrganicPack, blobRadius };\n\nexport { CYBER_FX, registerCyberPack, decodeFrame };\n\nexport { PAPER_FX, registerPaperPack, roughLine, paperRandom };\n\nexport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme };\n\nexport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt };\n\nexport { SPATIAL_FX, registerSpatialPack, yawToOffset, xrSupport };\n\nexport { CINEMA_FX, registerCinemaPack, cameraFrame, CAMERA_MOVES };\n\nexport { LOTTIE_FX, registerLottiePack, lottieToKeyframes, lottieToSvg, riveInputs };\n\nexport { GENART_FX, registerGenArtPack, PALETTES, seededRandom, meshGradient };\n\n/** The 6.x effect packs by name. */\nexport const EFFECT_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n depth: DEPTH3_FX,\n morph: MORPH2_FX,\n transitions: TRANSITIONS2_FX,\n weather: WEATHER_FX,\n physics: PHYSICS2_FX,\n focus: FOCUS_FX,\n music: MUSIC_FX,\n chart: CHART_FX,\n shop: SHOP_FX,\n social: SOCIAL_FX,\n game: GAME_FX,\n geo: GEO_FX,\n form: FORM_FX,\n ai: AI_FX,\n festival: FESTIVAL_FX,\n retro: RETRO_FX,\n organic: ORGANIC_FX,\n cyber: CYBER_FX,\n paper: PAPER_FX,\n surface: SURFACE_FX,\n gesture3: GESTURE3_FX,\n spatial: SPATIAL_FX,\n cinema: CINEMA_FX,\n lottie: LOTTIE_FX,\n genart: GENART_FX,\n};\n\n/** Register every 6.x effect pack (idempotent). */\nexport function registerEffectPacks(): void {\n registerGpuPack();\n registerTextPack();\n registerLightPack();\n register3dPack();\n registerMorphPack();\n registerTransitionsPack();\n registerWeatherPack();\n registerPhysicsPack();\n registerFocusPack();\n registerMusicPack();\n registerChartPack();\n registerShopPack();\n registerSocialPack();\n registerGamePack();\n registerGeoPack();\n registerFormPack();\n registerAiPack();\n registerFestivalPack();\n registerRetroPack();\n registerOrganicPack();\n registerCyberPack();\n registerPaperPack();\n registerSurfacePack();\n registerGesture3Pack();\n registerSpatialPack();\n registerCinemaPack();\n registerLottiePack();\n registerGenArtPack();\n}\n\n\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","registerGpuPack","registerTextPack","registerLightPack","register3dPack","registerMorphPack","registerTransitionsPack","registerWeatherPack","registerPhysicsPack","registerFocusPack","registerMusicPack","registerChartPack","registerShopPack","registerSocialPack","registerGamePack","registerGeoPack","registerFormPack","registerAiPack","registerFestivalPack","registerRetroPack","registerOrganicPack","registerCyberPack","registerPaperPack","registerSurfacePack","registerGesture3Pack","registerSpatialPack","registerCinemaPack","registerLottiePack","registerGenArtPack"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FA;AACO,MAAM,YAAY,GAAuC;AAC9D,IAAA,GAAG,EAAEA,uBAAM;AACX,IAAA,IAAI,EAAEC,0BAAQ;AACd,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,yBAAS;AAChB,IAAA,KAAK,EAAEC,4BAAS;AAChB,IAAA,WAAW,EAAEC,wCAAe;AAC5B,IAAA,OAAO,EAAEC,+BAAU;AACnB,IAAA,OAAO,EAAEC,gCAAW;AACpB,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,IAAI,EAAEC,yBAAO;AACb,IAAA,MAAM,EAAEC,6BAAS;AACjB,IAAA,IAAI,EAAEC,yBAAO;AACb,IAAA,GAAG,EAAEC,uBAAM;AACX,IAAA,IAAI,EAAEC,yBAAO;AACb,IAAA,EAAE,EAAEC,qBAAK;AACT,IAAA,QAAQ,EAAEC,iCAAW;AACrB,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,OAAO,EAAEC,+BAAU;AACnB,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,KAAK,EAAEC,2BAAQ;AACf,IAAA,OAAO,EAAEC,+BAAU;AACnB,IAAA,QAAQ,EAAEC,gCAAW;AACrB,IAAA,OAAO,EAAEC,+BAAU;AACnB,IAAA,MAAM,EAAEC,6BAAS;AACjB,IAAA,MAAM,EAAEC,6BAAS;AACjB,IAAA,MAAM,EAAEC,6BAAS;;AAGnB;SACgB,mBAAmB,GAAA;AACjC,IAAAC,gCAAe,EAAE;AACjB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,8BAAc,EAAE;AAChB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,gDAAuB,EAAE;AACzB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,sCAAkB,EAAE;AACpB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,gCAAe,EAAE;AACjB,IAAAC,kCAAgB,EAAE;AAClB,IAAAC,8BAAc,EAAE;AAChB,IAAAC,0CAAoB,EAAE;AACtB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,oCAAiB,EAAE;AACnB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,yCAAoB,EAAE;AACtB,IAAAC,wCAAmB,EAAE;AACrB,IAAAC,sCAAkB,EAAE;AACpB,IAAAC,sCAAkB,EAAE;AACpB,IAAAC,sCAAkB,EAAE;AACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -804,6 +804,74 @@ declare const CINEMA_FX: EffectDefinition[];
804
804
  /** Register dolly-in, pan-reveal, letterbox and rack-focus (9.1). */
805
805
  declare function registerCinemaPack(): void;
806
806
 
807
+ /**
808
+ * 9.2 — Lottie import (`motionary/fx/lottie`, also `motionary/components/fx-lottie`).
809
+ *
810
+ * `lottieToKeyframes(json)` converts the layer transforms of a Lottie
811
+ * (bodymovin) JSON — position `p`, scale `s`, rotation `r`, opacity `o`
812
+ * (static or keyframed) — into WAAPI keyframes per layer plus the duration
813
+ * (`op − ip` frames at `fr` fps), so a designer's After Effects motion runs
814
+ * on Motionary's clock without lottie-web. `lottieToSvg(json)` renders the
815
+ * simple vector shapes (ellipse `el`, rect `rc`, path `sh`, fill `fl`,
816
+ * stroke `st`) as SVG groups, one per layer. `riveInputs(instance, el, map)`
817
+ * wires Motionary-style triggers (hover / press / click / enter) to the
818
+ * boolean / trigger inputs of a Rive state machine you created with the
819
+ * Rive runtime.
820
+ *
821
+ * Effects: `lottie-play` (attention) plays the keyframes stored on an
822
+ * element by `<usa-lottie>`; `icon-pop` (click) a sticker-like pop with a
823
+ * ring burst for icons. Reduced motion: no motion.
824
+ */
825
+
826
+ interface LottieLayerMotion {
827
+ name: string;
828
+ index: number;
829
+ keyframes: Keyframe[];
830
+ anchor: [number, number];
831
+ }
832
+ interface LottieMotion {
833
+ width: number;
834
+ height: number;
835
+ duration: number;
836
+ layers: LottieLayerMotion[];
837
+ }
838
+ /** Lottie JSON → WAAPI keyframes per layer + duration (ms) (9.2). */
839
+ declare function lottieToKeyframes(json: any): LottieMotion;
840
+ /** Render the simple vector layers of a Lottie JSON as an SVG string (one `<g data-layer>` per layer, top layer last) (9.2). */
841
+ declare function lottieToSvg(json: any): string;
842
+ /** Wire hover / press / click / enter on `el` to a Rive state machine's inputs: map { hover: 'isHover', click: 'fire' } (9.2). */
843
+ declare function riveInputs(instance: {
844
+ stateMachineInputs(sm: string): any[];
845
+ }, stateMachine: string, el: HTMLElement, map: Partial<Record<'hover' | 'press' | 'click' | 'enter', string>>): () => void;
846
+ declare const LOTTIE_FX: EffectDefinition[];
847
+ /** Register lottie-play and icon-pop (9.2). */
848
+ declare function registerLottiePack(): void;
849
+
850
+ /**
851
+ * 9.3 — Generative art 2.0 pack (`motionary/fx/genart`, also `motionary/components/fx-genart`):
852
+ *
853
+ * - `halftone-in` (enter) — the element prints in through a growing
854
+ * halftone dot screen, like a comic-book plate (`dot`).
855
+ * - `mesh-drift` (loop) — a seeded mesh-gradient background that slowly
856
+ * drifts (`seed`, `palette`).
857
+ * - `kaleido` (loop) — a kaleidoscopic conic overlay that turns slowly
858
+ * (`color`, `segments`).
859
+ * - `grain-flicker` (loop) — animated film grain over the element.
860
+ *
861
+ * `PALETTES`, `seededRandom(seed)`, `meshGradient(seed, palette)` (a CSS
862
+ * background string) are shared with `<usa-bg-generator>` and
863
+ * `<usa-gen-art>`. Reduced motion: halftone-in fades, loops are skipped.
864
+ */
865
+
866
+ declare const PALETTES: Record<string, string[]>;
867
+ /** Deterministic PRNG in [0, 1) (mulberry32) (9.3). */
868
+ declare function seededRandom(seed: number): () => number;
869
+ /** A seeded mesh-gradient CSS background (4 radial blobs over a base colour) (9.3). */
870
+ declare function meshGradient(seed?: number, palette?: string | string[]): string;
871
+ declare const GENART_FX: EffectDefinition[];
872
+ /** Register halftone-in, mesh-drift, kaleido and grain-flicker (9.3). */
873
+ declare function registerGenArtPack(): void;
874
+
807
875
  /**
808
876
  * 5.5 — generative backgrounds on Canvas 2D, registered through
809
877
  * `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
@@ -913,5 +981,5 @@ declare const EFFECT_PACKS: Record<string, EffectDefinition[]>;
913
981
  /** Register every 6.x effect pack (idempotent). */
914
982
  declare function registerEffectPacks(): void;
915
983
 
916
- export { AI_FX, CAMERA_MOVES, CHART_FX, CINEMA_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, EFFECT_PACK_FORMAT, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GEO_FX, GESTURE3_FX, GLSL_HEAD, GPU_FX, LIGHT_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, SPATIAL_FX, SURFACE_FX, SURFACE_THEMES, TEXT3_FX, TRANSITIONS2_FX, VerletWorld, WEATHER_FX, WGSL_HEAD, applySurfaceTheme, arcPath, blobRadius, cameraFrame, crossDocumentTransitions, decodeFrame, fanAngles, fieldFallback, glslToWgsl, loadEffectPack, musicSample, orientationToTilt, packManifest, pageTransition, paperRandom, parseFigure, pinchAngle, pinchScale, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCinemaPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSpatialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack, roughLine, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule, xrSupport, yawToOffset };
984
+ export { AI_FX, CAMERA_MOVES, CHART_FX, CINEMA_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, EFFECT_PACK_FORMAT, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GENART_FX, GEO_FX, GESTURE3_FX, GLSL_HEAD, GPU_FX, LIGHT_FX, LOTTIE_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PALETTES, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, SPATIAL_FX, SURFACE_FX, SURFACE_THEMES, TEXT3_FX, TRANSITIONS2_FX, VerletWorld, WEATHER_FX, WGSL_HEAD, applySurfaceTheme, arcPath, blobRadius, cameraFrame, crossDocumentTransitions, decodeFrame, fanAngles, fieldFallback, glslToWgsl, loadEffectPack, lottieToKeyframes, lottieToSvg, meshGradient, musicSample, orientationToTilt, packManifest, pageTransition, paperRandom, parseFigure, pinchAngle, pinchScale, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCinemaPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGenArtPack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerLottiePack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSpatialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack, riveInputs, roughLine, routeLength, samplePath, seededRandom, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule, xrSupport, yawToOffset };
917
985
  export type { EffectPackManifest, ShaderSpec };
@@ -804,6 +804,74 @@ declare const CINEMA_FX: EffectDefinition[];
804
804
  /** Register dolly-in, pan-reveal, letterbox and rack-focus (9.1). */
805
805
  declare function registerCinemaPack(): void;
806
806
 
807
+ /**
808
+ * 9.2 — Lottie import (`motionary/fx/lottie`, also `motionary/components/fx-lottie`).
809
+ *
810
+ * `lottieToKeyframes(json)` converts the layer transforms of a Lottie
811
+ * (bodymovin) JSON — position `p`, scale `s`, rotation `r`, opacity `o`
812
+ * (static or keyframed) — into WAAPI keyframes per layer plus the duration
813
+ * (`op − ip` frames at `fr` fps), so a designer's After Effects motion runs
814
+ * on Motionary's clock without lottie-web. `lottieToSvg(json)` renders the
815
+ * simple vector shapes (ellipse `el`, rect `rc`, path `sh`, fill `fl`,
816
+ * stroke `st`) as SVG groups, one per layer. `riveInputs(instance, el, map)`
817
+ * wires Motionary-style triggers (hover / press / click / enter) to the
818
+ * boolean / trigger inputs of a Rive state machine you created with the
819
+ * Rive runtime.
820
+ *
821
+ * Effects: `lottie-play` (attention) plays the keyframes stored on an
822
+ * element by `<usa-lottie>`; `icon-pop` (click) a sticker-like pop with a
823
+ * ring burst for icons. Reduced motion: no motion.
824
+ */
825
+
826
+ interface LottieLayerMotion {
827
+ name: string;
828
+ index: number;
829
+ keyframes: Keyframe[];
830
+ anchor: [number, number];
831
+ }
832
+ interface LottieMotion {
833
+ width: number;
834
+ height: number;
835
+ duration: number;
836
+ layers: LottieLayerMotion[];
837
+ }
838
+ /** Lottie JSON → WAAPI keyframes per layer + duration (ms) (9.2). */
839
+ declare function lottieToKeyframes(json: any): LottieMotion;
840
+ /** Render the simple vector layers of a Lottie JSON as an SVG string (one `<g data-layer>` per layer, top layer last) (9.2). */
841
+ declare function lottieToSvg(json: any): string;
842
+ /** Wire hover / press / click / enter on `el` to a Rive state machine's inputs: map { hover: 'isHover', click: 'fire' } (9.2). */
843
+ declare function riveInputs(instance: {
844
+ stateMachineInputs(sm: string): any[];
845
+ }, stateMachine: string, el: HTMLElement, map: Partial<Record<'hover' | 'press' | 'click' | 'enter', string>>): () => void;
846
+ declare const LOTTIE_FX: EffectDefinition[];
847
+ /** Register lottie-play and icon-pop (9.2). */
848
+ declare function registerLottiePack(): void;
849
+
850
+ /**
851
+ * 9.3 — Generative art 2.0 pack (`motionary/fx/genart`, also `motionary/components/fx-genart`):
852
+ *
853
+ * - `halftone-in` (enter) — the element prints in through a growing
854
+ * halftone dot screen, like a comic-book plate (`dot`).
855
+ * - `mesh-drift` (loop) — a seeded mesh-gradient background that slowly
856
+ * drifts (`seed`, `palette`).
857
+ * - `kaleido` (loop) — a kaleidoscopic conic overlay that turns slowly
858
+ * (`color`, `segments`).
859
+ * - `grain-flicker` (loop) — animated film grain over the element.
860
+ *
861
+ * `PALETTES`, `seededRandom(seed)`, `meshGradient(seed, palette)` (a CSS
862
+ * background string) are shared with `<usa-bg-generator>` and
863
+ * `<usa-gen-art>`. Reduced motion: halftone-in fades, loops are skipped.
864
+ */
865
+
866
+ declare const PALETTES: Record<string, string[]>;
867
+ /** Deterministic PRNG in [0, 1) (mulberry32) (9.3). */
868
+ declare function seededRandom(seed: number): () => number;
869
+ /** A seeded mesh-gradient CSS background (4 radial blobs over a base colour) (9.3). */
870
+ declare function meshGradient(seed?: number, palette?: string | string[]): string;
871
+ declare const GENART_FX: EffectDefinition[];
872
+ /** Register halftone-in, mesh-drift, kaleido and grain-flicker (9.3). */
873
+ declare function registerGenArtPack(): void;
874
+
807
875
  /**
808
876
  * 5.5 — generative backgrounds on Canvas 2D, registered through
809
877
  * `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
@@ -913,5 +981,5 @@ declare const EFFECT_PACKS: Record<string, EffectDefinition[]>;
913
981
  /** Register every 6.x effect pack (idempotent). */
914
982
  declare function registerEffectPacks(): void;
915
983
 
916
- export { AI_FX, CAMERA_MOVES, CHART_FX, CINEMA_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, EFFECT_PACK_FORMAT, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GEO_FX, GESTURE3_FX, GLSL_HEAD, GPU_FX, LIGHT_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, SPATIAL_FX, SURFACE_FX, SURFACE_THEMES, TEXT3_FX, TRANSITIONS2_FX, VerletWorld, WEATHER_FX, WGSL_HEAD, applySurfaceTheme, arcPath, blobRadius, cameraFrame, crossDocumentTransitions, decodeFrame, fanAngles, fieldFallback, glslToWgsl, loadEffectPack, musicSample, orientationToTilt, packManifest, pageTransition, paperRandom, parseFigure, pinchAngle, pinchScale, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCinemaPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSpatialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack, roughLine, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule, xrSupport, yawToOffset };
984
+ export { AI_FX, CAMERA_MOVES, CHART_FX, CINEMA_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, EFFECT_PACK_FORMAT, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GENART_FX, GEO_FX, GESTURE3_FX, GLSL_HEAD, GPU_FX, LIGHT_FX, LOTTIE_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PALETTES, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, SPATIAL_FX, SURFACE_FX, SURFACE_THEMES, TEXT3_FX, TRANSITIONS2_FX, VerletWorld, WEATHER_FX, WGSL_HEAD, applySurfaceTheme, arcPath, blobRadius, cameraFrame, crossDocumentTransitions, decodeFrame, fanAngles, fieldFallback, glslToWgsl, loadEffectPack, lottieToKeyframes, lottieToSvg, meshGradient, musicSample, orientationToTilt, packManifest, pageTransition, paperRandom, parseFigure, pinchAngle, pinchScale, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCinemaPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGenArtPack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerLottiePack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSpatialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack, riveInputs, roughLine, routeLength, samplePath, seededRandom, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule, xrSupport, yawToOffset };
917
985
  export type { EffectPackManifest, ShaderSpec };
@@ -49,6 +49,10 @@ import { SPATIAL_FX, registerSpatialPack } from './fx-spatial.js';
49
49
  export { xrSupport, yawToOffset } from './fx-spatial.js';
50
50
  import { CINEMA_FX, registerCinemaPack } from './fx-cinema.js';
51
51
  export { CAMERA_MOVES, cameraFrame } from './fx-cinema.js';
52
+ import { LOTTIE_FX, registerLottiePack } from './fx-lottie.js';
53
+ export { lottieToKeyframes, lottieToSvg, riveInputs } from './fx-lottie.js';
54
+ import { GENART_FX, registerGenArtPack } from './fx-genart.js';
55
+ export { PALETTES, meshGradient, seededRandom } from './fx-genart.js';
52
56
  import '../chunks/registry-CnO7ZVPK.js';
53
57
  import '../chunks/base-CLuqlLfG.js';
54
58
  import '../chunks/generative-2LhxG5BJ.js';
@@ -83,6 +87,8 @@ const EFFECT_PACKS = {
83
87
  gesture3: GESTURE3_FX,
84
88
  spatial: SPATIAL_FX,
85
89
  cinema: CINEMA_FX,
90
+ lottie: LOTTIE_FX,
91
+ genart: GENART_FX,
86
92
  };
87
93
  /** Register every 6.x effect pack (idempotent). */
88
94
  function registerEffectPacks() {
@@ -112,7 +118,9 @@ function registerEffectPacks() {
112
118
  registerGesture3Pack();
113
119
  registerSpatialPack();
114
120
  registerCinemaPack();
121
+ registerLottiePack();
122
+ registerGenArtPack();
115
123
  }
116
124
 
117
- export { AI_FX, CHART_FX, CINEMA_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GEO_FX, GESTURE3_FX, GPU_FX, LIGHT_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, SPATIAL_FX, SURFACE_FX, TEXT3_FX, TRANSITIONS2_FX, WEATHER_FX, register3dPack, registerAiPack, registerChartPack, registerCinemaPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSpatialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack };
125
+ export { AI_FX, CHART_FX, CINEMA_FX, CYBER_FX, DEPTH3_FX, EFFECT_PACKS, FESTIVAL_FX, FOCUS_FX, FORM_FX, GAME_FX, GENART_FX, GEO_FX, GESTURE3_FX, GPU_FX, LIGHT_FX, LOTTIE_FX, MORPH2_FX, MUSIC_FX, ORGANIC_FX, PAPER_FX, PHYSICS2_FX, RETRO_FX, SHOP_FX, SOCIAL_FX, SPATIAL_FX, SURFACE_FX, TEXT3_FX, TRANSITIONS2_FX, WEATHER_FX, register3dPack, registerAiPack, registerChartPack, registerCinemaPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGenArtPack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerLottiePack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSpatialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack };
118
126
  //# sourceMappingURL=fx2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fx2.js","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nexport { EFFECT_PACK_FORMAT, packManifest, validateManifest, loadEffectPack } from './manifest';\nexport type { EffectPackManifest } from './manifest';\nimport { GPU_FX, registerGpuPack } from './gpu';\nimport { TEXT3_FX, registerTextPack, splitChars } from './text3';\nimport { LIGHT_FX, registerLightPack, trackPointer } from './light';\nimport { DEPTH3_FX, register3dPack } from './depth3';\nimport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath } from './morph2';\nimport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions } from './transitions2';\nimport { WEATHER_FX, registerWeatherPack, skyAt } from './weather';\nimport { PHYSICS2_FX, registerPhysicsPack, VerletWorld } from './physics2';\nimport { FOCUS_FX, registerFocusPack } from './focus';\nimport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample } from './music';\nimport { CHART_FX, registerChartPack, parseFigure } from './chart';\nimport { SHOP_FX, registerShopPack, arcPath } from './shop';\nimport { SOCIAL_FX, registerSocialPack, fanAngles } from './social';\nimport { GAME_FX, registerGamePack, throwPath } from './game';\nimport { GEO_FX, registerGeoPack, routeLength } from './geo';\nimport { FORM_FX, registerFormPack, shakeFrames } from './form';\nimport { AI_FX, registerAiPack, splitWords } from './ai';\nimport { FESTIVAL_FX, registerFestivalPack, sparkVectors } from './festival';\nimport { RETRO_FX, registerRetroPack, pixelSteps } from './retro2';\nimport { ORGANIC_FX, registerOrganicPack, blobRadius } from './organic';\nimport { CYBER_FX, registerCyberPack, decodeFrame } from './cyber';\nimport { PAPER_FX, registerPaperPack, roughLine, paperRandom } from './paper';\nimport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme } from './themefx';\nimport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt } from './gesture3';\nimport { SPATIAL_FX, registerSpatialPack, yawToOffset, xrSupport } from './spatial';\nimport { CINEMA_FX, registerCinemaPack, cameraFrame, CAMERA_MOVES } from './cinema';\n\nexport { GPU_FX, registerGpuPack, TEXT3_FX, registerTextPack, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport { supportsWebGPU, glslToWgsl, wgslModule, webgpuBackground, WGSL_HEAD } from './webgpu';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightPack, trackPointer };\n\nexport { DEPTH3_FX, register3dPack };\n\nexport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath };\n\nexport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions };\n\nexport { WEATHER_FX, registerWeatherPack, skyAt };\n\nexport { PHYSICS2_FX, registerPhysicsPack, VerletWorld };\n\nexport { FOCUS_FX, registerFocusPack };\n\nexport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample };\n\nexport { CHART_FX, registerChartPack, parseFigure };\n\nexport { SHOP_FX, registerShopPack, arcPath };\n\nexport { SOCIAL_FX, registerSocialPack, fanAngles };\n\nexport { GAME_FX, registerGamePack, throwPath };\n\nexport { GEO_FX, registerGeoPack, routeLength };\n\nexport { FORM_FX, registerFormPack, shakeFrames };\n\nexport { AI_FX, registerAiPack, splitWords };\n\nexport { FESTIVAL_FX, registerFestivalPack, sparkVectors };\n\nexport { RETRO_FX, registerRetroPack, pixelSteps };\n\nexport { ORGANIC_FX, registerOrganicPack, blobRadius };\n\nexport { CYBER_FX, registerCyberPack, decodeFrame };\n\nexport { PAPER_FX, registerPaperPack, roughLine, paperRandom };\n\nexport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme };\n\nexport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt };\n\nexport { SPATIAL_FX, registerSpatialPack, yawToOffset, xrSupport };\n\nexport { CINEMA_FX, registerCinemaPack, cameraFrame, CAMERA_MOVES };\n\n/** The 6.x effect packs by name. */\nexport const EFFECT_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n depth: DEPTH3_FX,\n morph: MORPH2_FX,\n transitions: TRANSITIONS2_FX,\n weather: WEATHER_FX,\n physics: PHYSICS2_FX,\n focus: FOCUS_FX,\n music: MUSIC_FX,\n chart: CHART_FX,\n shop: SHOP_FX,\n social: SOCIAL_FX,\n game: GAME_FX,\n geo: GEO_FX,\n form: FORM_FX,\n ai: AI_FX,\n festival: FESTIVAL_FX,\n retro: RETRO_FX,\n organic: ORGANIC_FX,\n cyber: CYBER_FX,\n paper: PAPER_FX,\n surface: SURFACE_FX,\n gesture3: GESTURE3_FX,\n spatial: SPATIAL_FX,\n cinema: CINEMA_FX,\n};\n\n/** Register every 6.x effect pack (idempotent). */\nexport function registerEffectPacks(): void {\n registerGpuPack();\n registerTextPack();\n registerLightPack();\n register3dPack();\n registerMorphPack();\n registerTransitionsPack();\n registerWeatherPack();\n registerPhysicsPack();\n registerFocusPack();\n registerMusicPack();\n registerChartPack();\n registerShopPack();\n registerSocialPack();\n registerGamePack();\n registerGeoPack();\n registerFormPack();\n registerAiPack();\n registerFestivalPack();\n registerRetroPack();\n registerOrganicPack();\n registerCyberPack();\n registerPaperPack();\n registerSurfacePack();\n registerGesture3Pack();\n registerSpatialPack();\n registerCinemaPack();\n}\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFA;AACO,MAAM,YAAY,GAAuC;AAC9D,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,WAAW,EAAE,eAAe;AAC5B,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,EAAE,EAAE,KAAK;AACT,IAAA,QAAQ,EAAE,WAAW;AACrB,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,QAAQ,EAAE,WAAW;AACrB,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,MAAM,EAAE,SAAS;;AAGnB;SACgB,mBAAmB,GAAA;AACjC,IAAA,eAAe,EAAE;AACjB,IAAA,gBAAgB,EAAE;AAClB,IAAA,iBAAiB,EAAE;AACnB,IAAA,cAAc,EAAE;AAChB,IAAA,iBAAiB,EAAE;AACnB,IAAA,uBAAuB,EAAE;AACzB,IAAA,mBAAmB,EAAE;AACrB,IAAA,mBAAmB,EAAE;AACrB,IAAA,iBAAiB,EAAE;AACnB,IAAA,iBAAiB,EAAE;AACnB,IAAA,iBAAiB,EAAE;AACnB,IAAA,gBAAgB,EAAE;AAClB,IAAA,kBAAkB,EAAE;AACpB,IAAA,gBAAgB,EAAE;AAClB,IAAA,eAAe,EAAE;AACjB,IAAA,gBAAgB,EAAE;AAClB,IAAA,cAAc,EAAE;AAChB,IAAA,oBAAoB,EAAE;AACtB,IAAA,iBAAiB,EAAE;AACnB,IAAA,mBAAmB,EAAE;AACrB,IAAA,iBAAiB,EAAE;AACnB,IAAA,iBAAiB,EAAE;AACnB,IAAA,mBAAmB,EAAE;AACrB,IAAA,oBAAoB,EAAE;AACtB,IAAA,mBAAmB,EAAE;AACrB,IAAA,kBAAkB,EAAE;AACtB;;;;"}
1
+ {"version":3,"file":"fx2.js","sources":["../../src/components/fx2/index.ts"],"sourcesContent":["/**\n * The 6.x effect packs, one entry each (`motionary/components/fx-gpu`, …) so\n * their size budgets stay separate. This module (`registerFx2()`) registers\n * them all — used by dist/widgets.umd.js and the showcase.\n */\nimport type { EffectDefinition } from '../fx/registry';\nexport { EFFECT_PACK_FORMAT, packManifest, validateManifest, loadEffectPack } from './manifest';\nexport type { EffectPackManifest } from './manifest';\nimport { GPU_FX, registerGpuPack } from './gpu';\nimport { TEXT3_FX, registerTextPack, splitChars } from './text3';\nimport { LIGHT_FX, registerLightPack, trackPointer } from './light';\nimport { DEPTH3_FX, register3dPack } from './depth3';\nimport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath } from './morph2';\nimport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions } from './transitions2';\nimport { WEATHER_FX, registerWeatherPack, skyAt } from './weather';\nimport { PHYSICS2_FX, registerPhysicsPack, VerletWorld } from './physics2';\nimport { FOCUS_FX, registerFocusPack } from './focus';\nimport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample } from './music';\nimport { CHART_FX, registerChartPack, parseFigure } from './chart';\nimport { SHOP_FX, registerShopPack, arcPath } from './shop';\nimport { SOCIAL_FX, registerSocialPack, fanAngles } from './social';\nimport { GAME_FX, registerGamePack, throwPath } from './game';\nimport { GEO_FX, registerGeoPack, routeLength } from './geo';\nimport { FORM_FX, registerFormPack, shakeFrames } from './form';\nimport { AI_FX, registerAiPack, splitWords } from './ai';\nimport { FESTIVAL_FX, registerFestivalPack, sparkVectors } from './festival';\nimport { RETRO_FX, registerRetroPack, pixelSteps } from './retro2';\nimport { ORGANIC_FX, registerOrganicPack, blobRadius } from './organic';\nimport { CYBER_FX, registerCyberPack, decodeFrame } from './cyber';\nimport { PAPER_FX, registerPaperPack, roughLine, paperRandom } from './paper';\nimport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme } from './themefx';\nimport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt } from './gesture3';\nimport { SPATIAL_FX, registerSpatialPack, yawToOffset, xrSupport } from './spatial';\nimport { CINEMA_FX, registerCinemaPack, cameraFrame, CAMERA_MOVES } from './cinema';\nimport { LOTTIE_FX, registerLottiePack, lottieToKeyframes, lottieToSvg, riveInputs } from './lottie';\nimport { GENART_FX, registerGenArtPack, PALETTES, seededRandom, meshGradient } from './genart';\n\nexport { GPU_FX, registerGpuPack, TEXT3_FX, registerTextPack, splitChars };\nexport { shaderBackground, supportsWebGL2, fieldFallback, GLSL_HEAD } from './gl';\nexport { supportsWebGPU, glslToWgsl, wgslModule, webgpuBackground, WGSL_HEAD } from './webgpu';\nexport type { ShaderSpec } from './gl';\n\nexport { LIGHT_FX, registerLightPack, trackPointer };\n\nexport { DEPTH3_FX, register3dPack };\n\nexport { MORPH2_FX, registerMorphPack, samplePath, pointsToPath };\n\nexport { TRANSITIONS2_FX, registerTransitionsPack, pageTransition, crossDocumentTransitions };\n\nexport { WEATHER_FX, registerWeatherPack, skyAt };\n\nexport { PHYSICS2_FX, registerPhysicsPack, VerletWorld };\n\nexport { FOCUS_FX, registerFocusPack };\n\nexport { MUSIC_FX, registerMusicPack, syntheticSample, musicSample };\n\nexport { CHART_FX, registerChartPack, parseFigure };\n\nexport { SHOP_FX, registerShopPack, arcPath };\n\nexport { SOCIAL_FX, registerSocialPack, fanAngles };\n\nexport { GAME_FX, registerGamePack, throwPath };\n\nexport { GEO_FX, registerGeoPack, routeLength };\n\nexport { FORM_FX, registerFormPack, shakeFrames };\n\nexport { AI_FX, registerAiPack, splitWords };\n\nexport { FESTIVAL_FX, registerFestivalPack, sparkVectors };\n\nexport { RETRO_FX, registerRetroPack, pixelSteps };\n\nexport { ORGANIC_FX, registerOrganicPack, blobRadius };\n\nexport { CYBER_FX, registerCyberPack, decodeFrame };\n\nexport { PAPER_FX, registerPaperPack, roughLine, paperRandom };\n\nexport { SURFACE_FX, registerSurfacePack, SURFACE_THEMES, applySurfaceTheme };\n\nexport { GESTURE3_FX, registerGesture3Pack, pinchScale, pinchAngle, orientationToTilt };\n\nexport { SPATIAL_FX, registerSpatialPack, yawToOffset, xrSupport };\n\nexport { CINEMA_FX, registerCinemaPack, cameraFrame, CAMERA_MOVES };\n\nexport { LOTTIE_FX, registerLottiePack, lottieToKeyframes, lottieToSvg, riveInputs };\n\nexport { GENART_FX, registerGenArtPack, PALETTES, seededRandom, meshGradient };\n\n/** The 6.x effect packs by name. */\nexport const EFFECT_PACKS: Record<string, EffectDefinition[]> = {\n gpu: GPU_FX,\n text: TEXT3_FX,\n light: LIGHT_FX,\n depth: DEPTH3_FX,\n morph: MORPH2_FX,\n transitions: TRANSITIONS2_FX,\n weather: WEATHER_FX,\n physics: PHYSICS2_FX,\n focus: FOCUS_FX,\n music: MUSIC_FX,\n chart: CHART_FX,\n shop: SHOP_FX,\n social: SOCIAL_FX,\n game: GAME_FX,\n geo: GEO_FX,\n form: FORM_FX,\n ai: AI_FX,\n festival: FESTIVAL_FX,\n retro: RETRO_FX,\n organic: ORGANIC_FX,\n cyber: CYBER_FX,\n paper: PAPER_FX,\n surface: SURFACE_FX,\n gesture3: GESTURE3_FX,\n spatial: SPATIAL_FX,\n cinema: CINEMA_FX,\n lottie: LOTTIE_FX,\n genart: GENART_FX,\n};\n\n/** Register every 6.x effect pack (idempotent). */\nexport function registerEffectPacks(): void {\n registerGpuPack();\n registerTextPack();\n registerLightPack();\n register3dPack();\n registerMorphPack();\n registerTransitionsPack();\n registerWeatherPack();\n registerPhysicsPack();\n registerFocusPack();\n registerMusicPack();\n registerChartPack();\n registerShopPack();\n registerSocialPack();\n registerGamePack();\n registerGeoPack();\n registerFormPack();\n registerAiPack();\n registerFestivalPack();\n registerRetroPack();\n registerOrganicPack();\n registerCyberPack();\n registerPaperPack();\n registerSurfacePack();\n registerGesture3Pack();\n registerSpatialPack();\n registerCinemaPack();\n registerLottiePack();\n registerGenArtPack();\n}\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8FA;AACO,MAAM,YAAY,GAAuC;AAC9D,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,WAAW,EAAE,eAAe;AAC5B,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,OAAO,EAAE,WAAW;AACpB,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,GAAG,EAAE,MAAM;AACX,IAAA,IAAI,EAAE,OAAO;AACb,IAAA,EAAE,EAAE,KAAK;AACT,IAAA,QAAQ,EAAE,WAAW;AACrB,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,KAAK,EAAE,QAAQ;AACf,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,QAAQ,EAAE,WAAW;AACrB,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,MAAM,EAAE,SAAS;;AAGnB;SACgB,mBAAmB,GAAA;AACjC,IAAA,eAAe,EAAE;AACjB,IAAA,gBAAgB,EAAE;AAClB,IAAA,iBAAiB,EAAE;AACnB,IAAA,cAAc,EAAE;AAChB,IAAA,iBAAiB,EAAE;AACnB,IAAA,uBAAuB,EAAE;AACzB,IAAA,mBAAmB,EAAE;AACrB,IAAA,mBAAmB,EAAE;AACrB,IAAA,iBAAiB,EAAE;AACnB,IAAA,iBAAiB,EAAE;AACnB,IAAA,iBAAiB,EAAE;AACnB,IAAA,gBAAgB,EAAE;AAClB,IAAA,kBAAkB,EAAE;AACpB,IAAA,gBAAgB,EAAE;AAClB,IAAA,eAAe,EAAE;AACjB,IAAA,gBAAgB,EAAE;AAClB,IAAA,cAAc,EAAE;AAChB,IAAA,oBAAoB,EAAE;AACtB,IAAA,iBAAiB,EAAE;AACnB,IAAA,mBAAmB,EAAE;AACrB,IAAA,iBAAiB,EAAE;AACnB,IAAA,iBAAiB,EAAE;AACnB,IAAA,mBAAmB,EAAE;AACrB,IAAA,oBAAoB,EAAE;AACtB,IAAA,mBAAmB,EAAE;AACrB,IAAA,kBAAkB,EAAE;AACpB,IAAA,kBAAkB,EAAE;AACpB,IAAA,kBAAkB,EAAE;AACtB;;;;"}
@@ -17,6 +17,8 @@ const MARKETPLACE = [
17
17
  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'),
18
18
  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'),
19
19
  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'),
20
+ 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'),
21
+ 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'),
20
22
  ];
21
23
  /** Ranked search over listings (name / title / tags / effects / description) (9.0). */
22
24
  function searchPlugins(query, list = MARKETPLACE) {
@@ -1 +1 @@
1
- {"version":3,"file":"marketplace.cjs","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];\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":["loadEffectPack"],"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,uBAAuB,EAAE,UAAU,EAAE,wDAAwD,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,oDAAoD,EAAE,8BAA8B,E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AAO,KAAK;AACd;AAEA;AACO,eAAe,gBAAgB,CAAC,GAAW,EAAE,UAAwB,KAAK,EAAA;AAC/E,IAAA,MAAM,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;AAC5B,IAAA,MAAM,CAAC,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
+ {"version":3,"file":"marketplace.cjs","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];\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":["loadEffectPack"],"mappings":";;;;;;AAqBO,MAAM,kBAAkB,GAAG;AAclC,MAAM,CAAC,GAAG,CAAC,IAAY,EAAE,KAAa,EAAE,WAAmB,EAAE,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AAC,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;;;;;;;;;;;;;"}
@@ -16,6 +16,8 @@ const MARKETPLACE = [
16
16
  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'),
17
17
  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'),
18
18
  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'),
19
+ 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'),
20
+ 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'),
19
21
  ];
20
22
  /** Ranked search over listings (name / title / tags / effects / description) (9.0). */
21
23
  function searchPlugins(query, list = MARKETPLACE) {
@@ -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];\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,CAA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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/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];\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,uBAAuB,EAAE,UAAU,EAAE,wDAAwD,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,oDAAoD,EAAE,8BAA8B,EAAE,KAAK,CAAC;AAC9O,IAAA,CAAC,CAAC,oBAAoB,EAAE,OAAO,EAAE,gCAAgC,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,4CAA4C,EAAE,qBAAqB,EAAE,KAAK,CAAC;AACzL,IAAA,CAAC,CAAC,sBAAsB,EAAE,SAAS,EAAE,iDAAiD,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,oCAAoC,EAAE,oBAAoB,EAAE,KAAK,CAAC;AACzM,I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