Add some experimental module interfaces

...with somewhat placeholder names as they're the best I can think of right now:

 * 'Extras': To add new bits of UI to places (specifically the space panel)
 * 'Builtins': For modules to render components that are part of Element Web
 * 'Navigation': For modules to add paths to the URL router
This commit is contained in:
David Baker
2025-09-24 10:58:41 +01:00
parent ac81502c0a
commit 2cd86f7c3d
5 changed files with 51 additions and 0 deletions
@@ -15,6 +15,8 @@ import { NavigationApi } from "./navigation.ts";
import { DialogApiExtension } from "./dialog.ts";
import { AccountAuthApiExtension } from "./auth.ts";
import { ProfileApiExtension } from "./profile.ts";
import { ExtrasApi } from "./extras.ts";
import { BuiltinsApi } from "./builtins.ts";
/**
* Module interface for modules to implement.
@@ -103,12 +105,16 @@ export interface Api
*/
readonly customComponents: CustomComponentsApi;
readonly builtins: BuiltinsApi;
/**
* API to navigate the application.
* @public
*/
readonly navigation: NavigationApi;
readonly extras: ExtrasApi;
/**
* Create a ReactDOM root for rendering React components.
* Exposed to allow modules to avoid needing to bundle their own ReactDOM.