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

    Variable ThemeLoaderConst

    ThemeLoader: {
        loadThemesConfig(profileId: string): Promise<ValidatedThemesConfig>;
        clearCache(profileId?: string): void;
    } = ...

    Type Declaration

    • loadThemesConfig: function
      • Loads the theme configuration of a profile.

        When the active profile already carries a themes object — which is what the modular profile loader produces — this method resolves from it and emits no HTTP request at all. An integrator who declares themes inline in the profile therefore never needs to intercept window.fetch to serve themes.json, and never needs the loader's path convention to match their asset layout.

        ⚠️ This guarantee is promoted to a contract and must not be reverted silently. Until then it was only an implementation comment, so it was revocable by any refactor — and the host-side workaround it replaces (patching window.fetch) is precisely the kind of coupling this project exists to remove. A change that reintroduces a request on this path is a BREAKING change.

        The three branches, in order:

        1. cache hit → resolved value, no work;
        2. load already in flight → the same promise, never a second request;
        3. Config.getActiveProfile().themes present and matching profileId → no fetch;
        4. otherwise only — themes.json is fetched over HTTP.

        Parameters

        • profileId: string

          ID of the profile whose themes are wanted.

        Returns Promise<ValidatedThemesConfig>

        The validated theme configuration.

        GeoLeaf.Config.clearThemesCache to drop what branch 1 returns.

    • clearCache: function