UNPKG

everything-dev

Version:

A consolidated product package for building Module Federation apps with oRPC APIs.

32 lines • 1.7 kB
import { ClientRuntimeConfig } from "../types.mjs"; import { HeadLink, HeadScript } from "./types.mjs"; //#region src/ui/head.d.ts interface RemoteScriptsOptions { runtimeConfig?: Partial<ClientRuntimeConfig>; containerName?: string; hydratePath?: string; integrity?: string; cspNonce?: string; } declare function getThemeInitScript(): HeadScript; declare function getHydrateScript(runtimeConfig: Partial<ClientRuntimeConfig> | undefined, containerName?: string, hydratePath?: string, cspNonce?: string): HeadScript; declare function getRemoteScripts(options: RemoteScriptsOptions): HeadScript[]; /** * Preload hints for the composed plugin-UI remotes (`ui.compose`). Without * them each remote entry is discovered only after the core remoteEntry * executes and hydrate registers remotes — serializing * document → remoteEntry → manifest → remoteEntry. Attributes must match * how the MF runtime loads these resources (plain no-cors `<script>` for * entries, cors `fetch()` for manifests) or the browser refetches. * * Server-only: the client render (hydration re-render of head content, or * the client-shell fallback) runs after the hydrate compose has already * fetched the manifests and entries — re-injecting the hints then produces * preloads nothing will ever consume ("preloaded but not used" console * warnings on every load). */ declare function getRemotePreloadLinks(runtimeConfig: Partial<ClientRuntimeConfig> | undefined): HeadLink[]; declare function getBaseStyles(): string; //#endregion export { RemoteScriptsOptions, getBaseStyles, getHydrateScript, getRemotePreloadLinks, getRemoteScripts, getThemeInitScript }; //# sourceMappingURL=head.d.mts.map