import * as React from 'react'; import type { ActionFieldDef } from './types'; export interface FieldWidgetProps { /** The served field definition (key, label, type, widget, options…). */ field: ActionFieldDef; /** Current value of the field. */ value: any; /** Report a new value for the field. */ onChange: (value: any) => void; /** The field is not editable right now (readonly / locked). */ disabled?: boolean; /** Validation message for the field, when there is one. */ error?: string; /** * Record the widget can read sibling fields from. In `DynamicForm` these are the * LIVE form values (they update as the user types, also in create mode); in the * record dialog (`EditField`) it is the loaded/edited record. */ record?: Record; } export type FieldWidgetComponent = React.ComponentType; /** * Registers the component that renders fields declaring `widget: `. * Returns a disposer; a later registration for the same name replaces the * earlier one, and the earlier disposer then leaves the newer one alone. */ export declare function registerFieldWidget(name: string, component: FieldWidgetComponent): () => void; /** The component registered for `name`, or undefined (never throws). */ export declare function getFieldWidget(name?: string | null): FieldWidgetComponent | undefined; /** Registered widget names, for diagnostics. */ export declare function listFieldWidgets(): string[]; export declare function clearFieldWidgets(): void; /** Re-renders the caller whenever a widget is (un)registered. */ export declare function useFieldWidgetRegistryVersion(): number; //# sourceMappingURL=field-widget-registry.d.ts.map