import { ComponentMetadata, ComponentRegistration } from '../types'; import { ComponentType } from 'react'; /** * Central in-memory registry of PieUI components keyed by their name. Every * call to {@link registerPieComponent} writes into this `Map`, and the * dynamic UI renderer reads from it at render time to resolve a `card` name * to a concrete React component. */ export declare const registry: Map>; /** * Registers a PieUI component so it can be rendered by name from a dynamic * UI configuration. * * The registration must provide at least a `name` and either a `component` * or a `loader` (for code-split modules). When only `loader` is given, the * helper wraps it in {@link trackLazy} automatically and the resulting * `React.lazy` component is what gets stored. * * @param registration Shape describing the component, its metadata, and how * to load it. * @returns The concrete (possibly lazy) component that was stored. * @throws Error When `name` is missing or neither `component` nor `loader` * was supplied. */ export declare function registerPieComponent(registration: ComponentRegistration): ComponentType | undefined; /** * Convenience wrapper that calls {@link registerPieComponent} for each item * in the provided array. Useful when a package exports a catalogue of cards * that should all be registered at once. */ export declare const registerMultipleComponents: (components: ComponentRegistration[]) => void; /** * Removes a previously registered component from the registry. Subsequent * renders of that name will fall back to the default "unknown component" * behaviour of the dynamic renderer. */ export declare const unregisterComponent: (name: string) => void; /** * Returns `true` when a component with the given name has been registered. */ export declare const hasComponent: (name: string) => boolean; /** * Returns the `metadata` object supplied at registration time, or * `undefined` when the component was not registered or had no metadata. */ export declare const getComponentMeta: (name: string) => ComponentMetadata | undefined; /** * Returns the full {@link ComponentRegistration} entry for the given name, * including any `fallback` node and the normalized component reference. */ export declare const getRegistryEntry: (name: string) => ComponentRegistration | undefined; /** * Returns the list of names of every currently-registered PieUI component. * Handy for debugging and for the `pieui postbuild` CLI manifest generator. */ export declare const getAllRegisteredComponents: () => string[]; /** * Returns the number of components currently in the registry. */ export declare const getRegistrySize: () => number; //# sourceMappingURL=registry.d.ts.map