edith002/src/common/registry/index.ts

37 lines
1002 B
TypeScript

/**
* Component Registry
*
* Centralized registry for all component definitions.
*
* Usage:
* 1. Import the registry to access component definitions:
* import { ComponentRegistry } from './registry';
*
* 2. Import with definitions auto-registration (do this once in app entry):
* import './registry/definitions';
*
* 3. Get a component definition:
* const buttonDef = ComponentRegistry.get('button');
*
* 4. Get all components for component library:
* const allComponents = ComponentRegistry.getAll();
*
* 5. Get defaults when creating components:
* const styles = ComponentRegistry.getDefaultStyles('button');
* const props = ComponentRegistry.getDefaultProps('button');
*/
export { ComponentRegistry } from './ComponentRegistry';
export type {
ComponentDefinition,
ComponentRenderProps,
EditorRenderProps,
PropertySchema,
StyleSchema,
PropertyEditorProps,
StyleEditorProps,
RuntimeValues,
ComponentEventType,
EventSchema,
} from './types';