/** * Creates a Feelers editor in the supplied container. * * @param config Configuration options for the Feelers editor. * * @returns editor An instance of the FeelersEditor class. */ export function FeelersEditor( { container, tooltipContainer, hostLanguage, hostLanguageParser, onChange, onKeyDown, onLint, contentAttributes, readOnly, value, enableGutters, singleLine, lineWrap, darkMode }: { container?: Element | undefined; tooltipContainer?: string | Element | undefined; hostLanguage?: string | undefined; hostLanguageParser?: import("@lezer/common").Parser | undefined; onChange?: Function | undefined; onKeyDown?: ((event: KeyboardEvent, view: import("@codemirror/view").EditorView) => boolean | void) | undefined; onLint?: ((diagnostics: Diagnostic[]) => void) | undefined; contentAttributes?: Record | undefined; readOnly?: boolean | undefined; value?: string | undefined; enableGutters?: boolean | undefined; singleLine?: boolean | undefined; lineWrap?: boolean | undefined; darkMode?: boolean | undefined; } ): Object; export class FeelersEditor { /** * Creates a Feelers editor in the supplied container. * * @param config Configuration options for the Feelers editor. * * @returns editor An instance of the FeelersEditor class. */ constructor( { container, tooltipContainer, hostLanguage, hostLanguageParser, onChange, onKeyDown, onLint, contentAttributes, readOnly, value, enableGutters, singleLine, lineWrap, darkMode }: { container?: Element | undefined; tooltipContainer?: string | Element | undefined; hostLanguage?: string | undefined; hostLanguageParser?: import("@lezer/common").Parser | undefined; onChange?: Function | undefined; onKeyDown?: ((event: KeyboardEvent, view: import("@codemirror/view").EditorView) => boolean | void) | undefined; onLint?: ((diagnostics: Diagnostic[]) => void) | undefined; contentAttributes?: Record | undefined; readOnly?: boolean | undefined; value?: string | undefined; enableGutters?: boolean | undefined; singleLine?: boolean | undefined; lineWrap?: boolean | undefined; darkMode?: boolean | undefined; } ); /** * Replaces the content of the Editor * * @param value */ setValue(value: string): void; /** * Sets the focus in the editor. * * @param position */ focus(position?: number): void; /** * Returns the current selection ranges. If no text is selected, a single * range with the start and end index at the cursor position will be returned. * * @returns selection */ getSelection(): import("@codemirror/state").EditorSelection; /** * @param eventName * @param callback */ on(eventName: string, callback: Function): void; /** * @param eventName * @param callback */ off(eventName: string, callback?: Function): void; } type Diagnostic = import("@codemirror/lint").Diagnostic; type Emitter> = import("mitt").Emitter; export type EventMap = { "lint": { diagnostics: Diagnostic[]; }; }; import { EditorView } from '@codemirror/view';