import { ComponentShape } from '@ui/lib/types/shapes/componentShape'; class ComponentLibrary { private components: Record = {}; public register(id: string, component: ComponentShape) { this.components[id] = component; } public get(id: string): ComponentShape | undefined { return this.components[id]; } public all(): Record { return this.components; } public init(components: Record): void { this.components = components; } } export const componentsLibrary = new ComponentLibrary();