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

    What a module or plugin passes to CapabilityRegistry.register().

    Extends ICapabilitySchema with an optional loader for dynamic import. The loader is called once by ensureLoaded() — subsequent calls are no-ops.

    The loader is for plugins — a capability whose runtime lives in a separate bundle fetched on first use. In-core capabilities never declare one: they are embarked at build time by their installer appearing in a preset manifest, and left out by omitting it. (The old in-core loader: () => import('../lazy/<cap>.js') example was removed in S5 with src/lazy/ — those chunks were re-export shells over code that was eager anyway.)

    GeoLeaf.plugins.registerCapability({
    id: 'table',
    label: 'Table',
    gate: { configPath: 'modules.table.enabled' },
    configSchema: {
    pageSize: { type: 'number', description: 'Rows per page', default: 25 },
    },
    loader: () => import('@geoleaf-plugins/table').then(() => void 0),
    });
    interface ICapabilityDeclaration {
        id: string;
        label?: string;
        description?: string;
        gate?: ICapabilityConfigGate;
        configSchema?: Record<string, ICapabilityFieldSchema>;
        dependencies?: readonly string[];
        loader?: () => Promise<void>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    id: string

    Unique capability identifier (kebab-case).

    label?: string

    Human-readable label (used by studio UI).

    description?: string

    Short description (shown in studio tooltip).

    Config gate — how the capability is enabled/disabled by profile config.

    configSchema?: Record<string, ICapabilityFieldSchema>

    JSON Schema description of the config block consumed by this capability. Keys match the fields under the capability's config path. Used by studio/form-builder to generate config forms.

    dependencies?: readonly string[]

    IDs of other capabilities that must be enabled for this one to work.

    loader?: () => Promise<void>

    Optional dynamic loader invoked on the first ensureLoaded() call. Should import the capability's runtime bundle and register its handlers. Called at most once — the registry tracks loaded state.