import type { WithChildren } from '../../core/types/with-children.js'; import type { MessageTarget } from '../../forms/validation/message-routing.js'; import type { ValidationState } from '../../forms/validation/types.js'; import { type SharedBaseCodeEditorProps } from '../base-code-editor/BaseCodeEditor.js'; import type { DQLEditorValidityInfo } from './dql-editor-types.js'; /** * Props common to both `onValidityChange` payload shapes. * @public */ export interface DQLEditorBaseProps extends SharedBaseCodeEditorProps, WithChildren { /** * Callback fired when DQL validation starts. * This can be used for setting a status that validation is in progress. * @deprecated Will be removed when `ValidationState` becomes the default. Use `onValidityChange` and check for `status: 'pending'` instead. */ onValidationStart?: () => void; /** * Callback fired when DQL validation ends. * This can be used for resetting a status that validation is in progress and to get the validation result. * @deprecated Will be removed when `ValidationState` becomes the default. Use `onValidityChange` and check for `status: 'done'` instead. */ onValidationEnd?: (validityInfo: DQLEditorValidityInfo[]) => void; /** * When `true`, shows a severity marker in a gutter column next to each line with a * validation problem. Has no effect while the query has no current validation problems. * @defaultValue false */ showLintGutter?: boolean; /** * Renders floating pill buttons at the top and/or bottom edge of the editor * when one or more `error`-severity validation problems are scrolled out of the visible area. * * Has no effect while the query has no error-severity validation problems. * @defaultValue false */ showOffScreenDiagnosticIndicators?: boolean; /** * The `name` attribute used for form submission. */ name?: string; /** * Associates the editor with a specific `