import type { EditorView } from '@codemirror/view'; import { type RefObject } from 'react'; /** * Inputs of the ARIA attributes of the editor. * @internal */ type EditorAriaOptions = Readonly<{ /** * Consumer `aria-label`. Defaults to "Code Editor", ignored with `labelledBy`. */ label?: string; /** * Consumer `aria-labelledby`. */ labelledBy?: string; /** * Consumer `aria-details`. */ details?: string; /** * Consumer `aria-describedby`. */ describedBy?: string; /** * Ids of the form field's hint and error messages. */ formFieldMessagesDescribedBy?: string; /** * Id of the form control's hint. */ formControlDescribedBy?: string; /** * Id of the diagnostics summary, if there are diagnostics. */ diagnosticsSummaryId?: string; /** * Whether a form error or an error diagnostic is present. */ isInvalid: boolean; /** * The id of the editor's form control, used to find the description texts. */ editorId: string; /** * Whether the editor is read-only, described as text instead of how to edit. */ readOnly: boolean; /** * Whether the editor is required, described as text. */ required: boolean; }>; /** * ARIA attributes of the edit button. * @internal */ export type EditButtonAriaProps = Readonly<{ 'aria-label'?: string; 'aria-labelledby'?: string; 'aria-describedby'?: string; }>; /** * Sets the ARIA attributes of the editor's content (`.cm-content`) and returns * the ones of the edit button. * @param viewRef - Ref to the editor view. * @param options - The consumer props and state the attributes derive from. * @returns The ARIA attributes of the edit button. * @internal */ export declare function useEditorAria(viewRef: RefObject, options: EditorAriaOptions): EditButtonAriaProps; export {}; //# sourceMappingURL=useEditorAria.d.ts.map