@rsc-labs/nocto-plugin-system
Version:
Pluggable registry system for Nocto plugins
21 lines (20 loc) • 631 B
TypeScript
export interface RbacSlotRegistry {
register(contribution: SlotContribution): void;
get(pluginId: string, slot: string): SlotContribution[];
getAll(): SlotContribution[];
}
type SlotContribution = {
pluginId: string;
slot: string;
component: React.ComponentType<any>;
staticProps?: Record<string, any>;
injectedPluginId: string;
};
declare class SlotRegistryClass {
private slots;
register(contribution: SlotContribution): void;
get(pluginId: string, slot: string): SlotContribution[];
getAll(): SlotContribution[];
}
export declare const SlotRegistry: SlotRegistryClass;
export {};