@copilotkit/a2ui-renderer
Version:
A2UI Renderer for CopilotKit - render A2UI surfaces in React applications
19 lines (18 loc) • 907 B
text/typescript
import { Catalog, ComponentApi } from "@a2ui/web_core/v0_9";
//#region src/react-renderer/filter-catalog.d.ts
/**
* Rebuild a Catalog keeping only components whose `name` passes `predicate`.
*
* Pure: does not mutate the source catalog. The returned catalog preserves the
* original `id`, all `functions`, and the `themeSchema`; only the component set
* is narrowed. Used by react-core to enforce per-component enable/disable on
* BOTH the advertisement path (context) and the render path.
*
* @typeParam T - The component implementation type carried by the catalog.
* @param catalog - The source catalog.
* @param predicate - Returns true to KEEP a component with the given name.
*/
declare function filterCatalog<T extends ComponentApi>(catalog: Catalog<T>, predicate: (name: string) => boolean): Catalog<T>;
//#endregion
export { filterCatalog };
//# sourceMappingURL=filter-catalog.d.cts.map