use-scroll-animate 9.0.0 → 9.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/components/fx-cinema.cjs +100 -0
- package/dist/components/fx-cinema.cjs.map +1 -0
- package/dist/components/fx-cinema.d.cts +70 -0
- package/dist/components/fx-cinema.d.ts +70 -0
- package/dist/components/fx-cinema.js +95 -0
- package/dist/components/fx-cinema.js.map +1 -0
- package/dist/components/fx-lottie.cjs +216 -0
- package/dist/components/fx-lottie.cjs.map +1 -0
- package/dist/components/fx-lottie.d.cts +88 -0
- package/dist/components/fx-lottie.d.ts +88 -0
- package/dist/components/fx-lottie.js +210 -0
- package/dist/components/fx-lottie.js.map +1 -0
- package/dist/components/fx2.cjs +15 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +68 -1
- package/dist/components/fx2.d.ts +68 -1
- package/dist/components/fx2.js +9 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/marketplace.cjs +2 -0
- package/dist/components/marketplace.cjs.map +1 -1
- package/dist/components/marketplace.js +2 -0
- package/dist/components/marketplace.js.map +1 -1
- package/dist/components/widgets.cjs +545 -207
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +106 -2
- package/dist/components/widgets.d.ts +106 -2
- package/dist/components/widgets.js +542 -209
- package/dist/components/widgets.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components.md +38 -0
- package/package.json +41 -1
|
@@ -780,6 +780,73 @@ declare const SPATIAL_FX: EffectDefinition[];
|
|
|
780
780
|
/** Register portal-open, orbit-in, spatial-float and depth-pop (8.8). */
|
|
781
781
|
declare function registerSpatialPack(): void;
|
|
782
782
|
|
|
783
|
+
/**
|
|
784
|
+
* 9.1 — Cinematic pack (`motionary/fx/cinema`, also `motionary/components/fx-cinema`):
|
|
785
|
+
*
|
|
786
|
+
* - `dolly-in` (enter) — a slow camera push: the element starts slightly
|
|
787
|
+
* large and soft and settles sharp, like a dolly shot (`duration`).
|
|
788
|
+
* - `pan-reveal` (enter) — the camera pans across the element while a
|
|
789
|
+
* wipe uncovers it (`from` left|right).
|
|
790
|
+
* - `letterbox` (enter) — cinema bars slide in, hold, then open up to
|
|
791
|
+
* reveal the element (`hold`).
|
|
792
|
+
* - `rack-focus` (attention) — focus pulls from the element's first child
|
|
793
|
+
* to the rest and back, like a focus puller racking between subjects.
|
|
794
|
+
*
|
|
795
|
+
* `cameraFrame(move, p)` gives the transform of a camera move at progress
|
|
796
|
+
* 0–1 (used by `<usa-scene>`). Reduced motion: entrances fade, rack-focus
|
|
797
|
+
* does nothing.
|
|
798
|
+
*/
|
|
799
|
+
|
|
800
|
+
declare const CAMERA_MOVES: readonly ["dolly-in", "dolly-out", "pan-left", "pan-right", "tilt-up", "tilt-down", "zoom-in", "zoom-out", "orbit"];
|
|
801
|
+
/** Transform of camera `move` at progress `p` (0–1, clamped), `strength` 0–2 (9.1). */
|
|
802
|
+
declare function cameraFrame(move: string, p: number, strength?: number): string;
|
|
803
|
+
declare const CINEMA_FX: EffectDefinition[];
|
|
804
|
+
/** Register dolly-in, pan-reveal, letterbox and rack-focus (9.1). */
|
|
805
|
+
declare function registerCinemaPack(): void;
|
|
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
|
+
|
|
783
850
|
/**
|
|
784
851
|
* 5.5 — generative backgrounds on Canvas 2D, registered through
|
|
785
852
|
* `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
|
|
@@ -889,5 +956,5 @@ declare const EFFECT_PACKS: Record<string, EffectDefinition[]>;
|
|
|
889
956
|
/** Register every 6.x effect pack (idempotent). */
|
|
890
957
|
declare function registerEffectPacks(): void;
|
|
891
958
|
|
|
892
|
-
export { AI_FX, CHART_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, crossDocumentTransitions, decodeFrame, fanAngles, fieldFallback, glslToWgsl, loadEffectPack, musicSample, orientationToTilt, packManifest, pageTransition, paperRandom, parseFigure, pinchAngle, pinchScale, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, 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 };
|
|
959
|
+
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, LOTTIE_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, lottieToKeyframes, lottieToSvg, musicSample, orientationToTilt, packManifest, pageTransition, paperRandom, parseFigure, pinchAngle, pinchScale, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCinemaPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerLottiePack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSpatialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack, riveInputs, roughLine, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule, xrSupport, yawToOffset };
|
|
893
960
|
export type { EffectPackManifest, ShaderSpec };
|
package/dist/components/fx2.d.ts
CHANGED
|
@@ -780,6 +780,73 @@ declare const SPATIAL_FX: EffectDefinition[];
|
|
|
780
780
|
/** Register portal-open, orbit-in, spatial-float and depth-pop (8.8). */
|
|
781
781
|
declare function registerSpatialPack(): void;
|
|
782
782
|
|
|
783
|
+
/**
|
|
784
|
+
* 9.1 — Cinematic pack (`motionary/fx/cinema`, also `motionary/components/fx-cinema`):
|
|
785
|
+
*
|
|
786
|
+
* - `dolly-in` (enter) — a slow camera push: the element starts slightly
|
|
787
|
+
* large and soft and settles sharp, like a dolly shot (`duration`).
|
|
788
|
+
* - `pan-reveal` (enter) — the camera pans across the element while a
|
|
789
|
+
* wipe uncovers it (`from` left|right).
|
|
790
|
+
* - `letterbox` (enter) — cinema bars slide in, hold, then open up to
|
|
791
|
+
* reveal the element (`hold`).
|
|
792
|
+
* - `rack-focus` (attention) — focus pulls from the element's first child
|
|
793
|
+
* to the rest and back, like a focus puller racking between subjects.
|
|
794
|
+
*
|
|
795
|
+
* `cameraFrame(move, p)` gives the transform of a camera move at progress
|
|
796
|
+
* 0–1 (used by `<usa-scene>`). Reduced motion: entrances fade, rack-focus
|
|
797
|
+
* does nothing.
|
|
798
|
+
*/
|
|
799
|
+
|
|
800
|
+
declare const CAMERA_MOVES: readonly ["dolly-in", "dolly-out", "pan-left", "pan-right", "tilt-up", "tilt-down", "zoom-in", "zoom-out", "orbit"];
|
|
801
|
+
/** Transform of camera `move` at progress `p` (0–1, clamped), `strength` 0–2 (9.1). */
|
|
802
|
+
declare function cameraFrame(move: string, p: number, strength?: number): string;
|
|
803
|
+
declare const CINEMA_FX: EffectDefinition[];
|
|
804
|
+
/** Register dolly-in, pan-reveal, letterbox and rack-focus (9.1). */
|
|
805
|
+
declare function registerCinemaPack(): void;
|
|
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
|
+
|
|
783
850
|
/**
|
|
784
851
|
* 5.5 — generative backgrounds on Canvas 2D, registered through
|
|
785
852
|
* `registerEffect()` (kind `background`): `flow-field`, `voronoi`,
|
|
@@ -889,5 +956,5 @@ declare const EFFECT_PACKS: Record<string, EffectDefinition[]>;
|
|
|
889
956
|
/** Register every 6.x effect pack (idempotent). */
|
|
890
957
|
declare function registerEffectPacks(): void;
|
|
891
958
|
|
|
892
|
-
export { AI_FX, CHART_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, crossDocumentTransitions, decodeFrame, fanAngles, fieldFallback, glslToWgsl, loadEffectPack, musicSample, orientationToTilt, packManifest, pageTransition, paperRandom, parseFigure, pinchAngle, pinchScale, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, 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 };
|
|
959
|
+
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, LOTTIE_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, lottieToKeyframes, lottieToSvg, musicSample, orientationToTilt, packManifest, pageTransition, paperRandom, parseFigure, pinchAngle, pinchScale, pixelSteps, pointsToPath, register3dPack, registerAiPack, registerChartPack, registerCinemaPack, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerLottiePack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSpatialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack, riveInputs, roughLine, routeLength, samplePath, shaderBackground, shakeFrames, skyAt, sparkVectors, splitChars, splitWords, supportsWebGL2, supportsWebGPU, syntheticSample, throwPath, trackPointer, validateManifest, webgpuBackground, wgslModule, xrSupport, yawToOffset };
|
|
893
960
|
export type { EffectPackManifest, ShaderSpec };
|
package/dist/components/fx2.js
CHANGED
|
@@ -47,6 +47,10 @@ import { GESTURE3_FX, registerGesture3Pack } from './fx-gesture.js';
|
|
|
47
47
|
export { orientationToTilt, pinchAngle, pinchScale } from './fx-gesture.js';
|
|
48
48
|
import { SPATIAL_FX, registerSpatialPack } from './fx-spatial.js';
|
|
49
49
|
export { xrSupport, yawToOffset } from './fx-spatial.js';
|
|
50
|
+
import { CINEMA_FX, registerCinemaPack } from './fx-cinema.js';
|
|
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';
|
|
50
54
|
import '../chunks/registry-CnO7ZVPK.js';
|
|
51
55
|
import '../chunks/base-CLuqlLfG.js';
|
|
52
56
|
import '../chunks/generative-2LhxG5BJ.js';
|
|
@@ -80,6 +84,8 @@ const EFFECT_PACKS = {
|
|
|
80
84
|
surface: SURFACE_FX,
|
|
81
85
|
gesture3: GESTURE3_FX,
|
|
82
86
|
spatial: SPATIAL_FX,
|
|
87
|
+
cinema: CINEMA_FX,
|
|
88
|
+
lottie: LOTTIE_FX,
|
|
83
89
|
};
|
|
84
90
|
/** Register every 6.x effect pack (idempotent). */
|
|
85
91
|
function registerEffectPacks() {
|
|
@@ -108,7 +114,9 @@ function registerEffectPacks() {
|
|
|
108
114
|
registerSurfacePack();
|
|
109
115
|
registerGesture3Pack();
|
|
110
116
|
registerSpatialPack();
|
|
117
|
+
registerCinemaPack();
|
|
118
|
+
registerLottiePack();
|
|
111
119
|
}
|
|
112
120
|
|
|
113
|
-
export { AI_FX, CHART_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, registerCyberPack, registerEffectPacks, registerFestivalPack, registerFocusPack, registerFormPack, registerGamePack, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSpatialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack };
|
|
121
|
+
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, 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, registerGeoPack, registerGesture3Pack, registerGpuPack, registerLightPack, registerLottiePack, registerMorphPack, registerMusicPack, registerOrganicPack, registerPaperPack, registerPhysicsPack, registerRetroPack, registerShopPack, registerSocialPack, registerSpatialPack, registerSurfacePack, registerTextPack, registerTransitionsPack, registerWeatherPack };
|
|
114
122
|
//# 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';\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\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};\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}\n\n\n"],"names":[],"mappings":"
|
|
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';\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\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};\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}\n\n\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2FA;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;;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;AACtB;;;;"}
|
|
@@ -16,6 +16,8 @@ const MARKETPLACE = [
|
|
|
16
16
|
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'),
|
|
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
|
+
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'),
|
|
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.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];\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: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E,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];\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,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,IAAA,CAAC,CAAC,oBAAoB,EAAE,OAAO,EAAE,oDAAoD,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,+CAA+C,EAAE,mBAAmB,EAAE,KAAK,CAAC;AAC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AC,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;;;;;;;;;;;;;"}
|
|
@@ -15,6 +15,8 @@ const MARKETPLACE = [
|
|
|
15
15
|
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'),
|
|
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
|
+
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'),
|
|
18
20
|
];
|
|
19
21
|
/** Ranked search over listings (name / title / tags / effects / description) (9.0). */
|
|
20
22
|
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];\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,IAAA,CAAC,CAAC,oBAAoB,EAAE,OAAO,EAAE,oDAAoD,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,+CAA+C,EAAE,mBAAmB,EAAE,KAAK,CAAC;AAC9M,IAAA,CAAC,CAAC,oBAAoB,EAAE,oBAAoB,EAAE,sDAAsD,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,+CAA+C,EAAE,sBAAsB,EAAE,KAAK,CAAC;AAChO,IAAA,CA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EAAE,QAAQ,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;AACjN;;;;"}
|
|
1
|
+
{"version":3,"file":"marketplace.js","sources":["../../src/components/marketplace/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];\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,IAAA,CAAC,CAAC,oBAAoB,EAAE,OAAO,EAAE,oDAAoD,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,+CAA+C,EAAE,mBAAmB,EAAE,KAAK,CAAC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