GeoLeaf Core API - v3.0.0
    Preparing search index...

    Variable PluginRegistryConst

    PluginRegistry: {
        register(name: string, metadata?: PluginMetadata): void;
        registerLazy(name: string, resolver: LazyResolver): void;
        registerCapability(decl: ICapabilityDeclaration): void;
        registerLayerLoader(pluginId: string, loader: PluginLayerLoader): void;
        getLayerLoader(pluginId: string): PluginLayerLoader | undefined;
        isLazyAvailable(name: string): boolean;
        registerLazyForAction(
            action: string,
            pluginName: string,
            ui?: PluginLazyUI,
        ): void;
        isLazyAction(action: string): boolean;
        ensureLoadedForAction(action: string): Promise<void>;
        getLazyUISlots(): LazyUISlotEntry[];
        isLoaded(name: string): boolean;
        canActivate(name: string): boolean;
        load(name: string): Promise<void>;
        getLoadedPlugins(): string[];
        getAvailableModules(): string[];
        getInfo(name: string): PluginEntry | null;
        reportPlugins(): void;
        _registry: Map<string, PluginEntry>;
        _lazyResolvers: Map<string, LazyResolver>;
        _lazyUISlots: Map<string, LazyUISlotEntry>;
        _layerLoaders: Map<string, PluginLayerLoader>;
    } = ...

    Registry of mounted plugins, keyed by name.

    The plugin counterpart of CapabilityRegistry. Registration is what puts a plugin's namespace on the global, so a plugin absent from here is absent from GeoLeaf.* — which is the usual explanation for an integrator's call landing on undefined.

    Type Declaration

    • register: function
      • Registers a plugin as loaded. Called automatically by globals.js and plugin files.

        Parameters

        • name: string

          Plugin identifier (e.g. 'storage', 'addpoi', 'labels')

        • Optionalmetadata: PluginMetadata = {}

          Optional metadata { version, requires, optional }

        Returns void

    • registerLazy: function
    • registerCapability: function
      • Registers a capability declaration so it can be queried via GeoLeaf.Introspection.getCapabilitySchema() / getAllCapabilities().

        Idempotent — registering the same id twice is a no-op. The declaration's optional loader is called at most once, on demand, via CapabilityRegistry.ensureLoaded().

        Parameters

        Returns void

        GeoLeaf.plugins.registerCapability({
        id: 'labels',
        label: 'Labels',
        gate: { configPath: 'modules.table.enabled' },
        configSchema: {
        pageSize: { type: 'number', description: 'Rows per page', default: 25 },
        },
        loader: () => import('@geoleaf-plugins/table').then(() => void 0),
        });
    • registerLayerLoader: function
      • Registers a layer loader for a plugin-backed declarative layer. Called by a plugin (e.g. flatgeobuf) so the core profile loader can render layers declared with "plugin": "<id>" in a profile config — without the core referencing any plugin by name.

        Parameters

        • pluginId: string

          Plugin identifier matching the layer config plugin field.

        • loader: PluginLayerLoader

          Async loader (def) => Promise.

        Returns void

    • getLayerLoader: function
    • isLazyAvailable: function
      • Returns true if the plugin is registered lazy but not yet loaded. Used by toolbar guards to show buttons before the bundle downloads.

        Parameters

        • name: string

        Returns boolean

    • registerLazyForAction: function
      • Associates a toolbar action with a lazy plugin and its UI descriptor. Call before GeoLeaf.boot() (e.g. from init.js) for each lazy plugin.

        Parameters

        • action: string

          toolbar action id (e.g. "print")

        • pluginName: string

          plugin registry name (e.g. "print")

        • Optionalui: PluginLazyUI

          optional UI descriptor { mobileIcon?, desktopTabButton? }

        Returns void

    • isLazyAction: function
      • Returns true if the action is backed by a lazy plugin that is not yet loaded. Used by the toolbar interceptor before dispatching actions.

        Parameters

        • action: string

        Returns boolean

    • ensureLoadedForAction: function
      • Loads the plugin backing the given action if it is lazy and not yet loaded. No-op if the plugin is already loaded or the action is not lazy.

        Parameters

        • action: string

        Returns Promise<void>

    • getLazyUISlots: function
    • isLoaded: function
    • canActivate: function
      • Checks if a plugin can be activated (its requires dependencies are loaded).

        Parameters

        • name: string

        Returns boolean

    • load: function
    • getLoadedPlugins: function
    • getAvailableModules: function
    • getInfo: function
    • reportPlugins: function
      • Prints a console report of loaded plugins (non-core). Silent if none.

        There is ONE report, and that is deliberate. Two reports existed until 04/07/2026, splitting the registry on a manifest field backed by two hard-coded name sets that OVERRODE the declared value — and disagreed with it in both directions, so storage and editor each appeared in BOTH reports and every boot double-counted them. A single report has no name set to keep in sync, and therefore no way to drift. Do not partition it again.

        Returns void

    • _registry: Map<string, PluginEntry>

      name → registered plugin entry.

    • _lazyResolvers: Map<string, LazyResolver>

      name → lazy resolver.

    • _lazyUISlots: Map<string, LazyUISlotEntry>

      Lazy plugin UI descriptors — keyed by action name.

    • _layerLoaders: Map<string, PluginLayerLoader>

      Layer loaders registered by plugins to render declarative plugin: layers.