/** * Consumer-controlled section renderer registry (ADR 0001). * * Resolution precedence when `` renders a section: * 1. a renderer passed via the `renderers` prop (per-render override) * 2. a globally registered renderer (`registerSectionRenderer`) * 3. the built-in default renderer * 4. the fallback (renders nothing; warns once in development) * * The global registry is a module-level map intended to be populated ONCE at * application start (an import side-effect), mirroring how cms-core's runtime * config is set once per process. For per-request or test-scoped overrides, * prefer the `renderers` prop, which never mutates global state. */ import { DEFAULT_SECTION_RENDERERS } from './components/defaults.js'; import type { SectionRenderer, SectionRendererMap } from './types.js'; /** * Register (or replace) the renderer for a section type, application-wide. * Call at module top-level during app startup. Returns nothing. */ export declare function registerSectionRenderer(type: string, renderer: SectionRenderer): void; /** Register many renderers at once. */ export declare function registerSectionRenderers(map: SectionRendererMap): void; /** Remove a global override (falls back to the built-in default, if any). */ export declare function unregisterSectionRenderer(type: string): void; /** Clear ALL global overrides. Primarily for tests. */ export declare function resetSectionRenderers(): void; /** * Resolve the renderer for a section type, honoring (in order) an explicit * per-render map, the global overrides, then the built-in defaults. Returns * `undefined` for unknown types so the caller can apply its fallback. */ export declare function getSectionRenderer(type: string, perRender?: SectionRendererMap): SectionRenderer | undefined; /** * The section-type ids that currently have a renderer (defaults + overrides). * Used by the registry-drift guard to compare against the cms-core registry. */ export declare function registeredSectionTypes(): string[]; export { DEFAULT_SECTION_RENDERERS }; //# sourceMappingURL=registry.d.ts.map