Registers a module descriptor with the registry.
Registration is only allowed before init() has been called.
Throws a GeoLeafError if:
id is already registered.init() has already been called on this registry instance.The module to register.
Resolves the dependency graph and initialises all registered modules in topological order.
Throws a GeoLeafError if a circular dependency is detected.
The error message includes the full cycle path (e.g. "A → B → A").
Returns a Promise that resolves when all modules have completed init().
If any module's init() rejects, the returned Promise rejects with
that error (subsequent modules are not initialised).
Engine-agnostic map adapter.
Read-only configuration access.
Retrieves a registered module by its id, cast to type T.
Throws a GeoLeafError when no module with the given id is registered.
Use has() first when presence is uncertain.
The module's id string.
Returns true if a module with the given id is registered.
The module's id string.
Returns true if init() has already been called on this registry.
Use this guard before calling register() in contexts where the registry
may have already been initialised (e.g. double-boot scenarios).
Returns all registered modules in insertion order.
The returned array is read-only — use register() to add modules.
Collects and returns the ui slot of every module that declares one.
Used by the UI orchestrator to build the mobile toolbar and the filter panel tabs without coupling the UI layer to specific module classes.
Returns an empty array when no module declares a UI slot.
Destroys all registered modules in reverse initialisation order.
Each module's destroy() is called exactly once. Errors in individual
destroy() calls are logged but do not interrupt the teardown sequence —
all modules are destroyed regardless of individual failures.
Returns the schema of a registered module, or null if no module
with the given id is registered.
The returned object is a lightweight metadata view — it does not expose
internal module state. IModuleSchema will be enriched in S2.1 when
capability schemas (config, capabilities, metadata) are defined.
Module id (e.g. 'poi', 'route', 'search').
Returns a read-only snapshot of all registered modules in insertion order.
Includes both built-in modules (registered before init()) and lazily
registered plugin modules (registered after init()).
Orchestrates the GeoLeaf module lifecycle.
The registry is the single entry point for module management:
init()is called.init(), the registry performs a topological sort of all registered modules and calls eachmodule.init()in the resolved order.destroy(), modules are torn down in reverse initialisation order.The registry is exposed on the
GeoLeafnamespace after Sprint 3 to allow third-party modules to self-register:Example