import type { ComponentType } from 'react'; import type { UIMetaContext } from '@ui-schema/react/UIMeta'; import type { WithOnChange, WithValuePlain } from '@ui-schema/react/UIStore'; import type { UIStoreActions } from '@ui-schema/react/UIStoreActions'; import type { WidgetPayload } from '@ui-schema/ui-schema/Widget'; import type { GroupRendererProps, BindingTypeGeneric } from './Binding.js'; /** * dev note: here `P` must not use NoInfer, or it breaks the WidgetEngine `WidgetEngineOverrideProps` */ export type WidgetType

= ComponentType | ComponentType> | ComponentType>; /** * Base widget props which are expected to exist no matter which data "type" the widget is for * - for only-scalar widgets add `WithScalarValue` * - for any-value-type widgets add `WithValue` and use the HOC `extractValue` * - `C` = custom `UIMetaContext` definition */ export interface WidgetProps extends WidgetPayload, UIMetaContext, WithOnChange, WithValuePlain { noGrid?: GroupRendererProps['noGrid']; isVirtual?: boolean; }