/** * Represents a group of component schemas for a single component type */ export interface DialSchemaGroup { component: string; schemas: any[]; groups?: any[]; } /** * Global registry of all component schemas indexed by component name * * @example * ```tsx * import { SCHEMAS } from '@vuer-ai/vuer'; * * const buttonSchema = SCHEMAS['Button']; * console.log(buttonSchema.component); // 'Button' * console.log(buttonSchema.schemas); // [...] * ``` * * ## Extending Schemas * * Contrib modules register schemas via CONTRIB_SCHEMA_LIST global, * which are merged automatically by ContribLoader. * * **Note**: The schema object is mutable and can be extended at runtime. */ export declare const SCHEMAS: Record; /** * Merge contrib schemas from CONTRIB_SCHEMA_LIST into SCHEMAS. * Called by ContribLoader after a module loads. */ export declare function mergeContribSchemas(): void; /** * React hook to access Vuer component schemas * * Returns a memoized reference to the global SCHEMAS object. * This hook is useful when you need schemas in a React component context * and want to benefit from React's optimization patterns. * * @returns Record of component schemas indexed by component name * * @example * ```tsx * import { useVuerSchema } from '@vuer-ai/vuer'; * * function ComponentInspector({ componentName }: { componentName: string }) { * const schemas = useVuerSchema(); * const schema = schemas[componentName]; * * if (!schema) { * return
No schema found for {componentName}
; * } * * return ( *
*

{schema.component}

*
{JSON.stringify(schema.schemas, null, 2)}
*
* ); * } * ``` * * @example With filtering * ```tsx * function SchemaList() { * const schemas = useVuerSchema(); * const componentNames = useMemo( * () => Object.keys(schemas).sort(), * [schemas] * ); * * return ( * * ); * } * ``` */ export declare function useVuerSchema(): Record; /** * React hook to get metadata for a specific component * * Returns the schema group for a given component name, or null if not found. * The result is memoized based on the component name to prevent unnecessary re-renders. * * @param component - The name of the component to get metadata for * @returns The component's schema group, or null if not found or component is undefined * * @example * ```tsx * import { useComponentMetadata } from '@vuer-ai/vuer'; * * function ComponentDetails({ name }: { name: string }) { * const metadata = useComponentMetadata(name); * * if (!metadata) { * return
No metadata available for {name}
; * } * * return ( *
*

{metadata.component}

*
Schemas: {metadata.schemas.length}
*
* ); * } * ``` */ export declare function useComponentMetadata(component?: string): DialSchemaGroup | null;