import type { HTMLAttributes } from 'svelte/elements';
import type { Extension } from '@codemirror/state';
import type { Language } from './codemirror';
interface Props extends HTMLAttributes {
/** Accessible label of the editor element. */
label: string;
/** Initial content of the editor. Will re-render if the value changes and does not match the current document. */
value: string;
/** Set editor to read-only mode. */
readonly?: boolean;
/** Enable line wrapping. Defaults to true for JSON/JSON5, false for other languages. */
lineWrapping?: boolean;
/** Programming language for syntax highlighting and editing. */
language?: Language;
/**
* Enable diff mode, comparing the current contents to `diffOriginal`.
*
* If `undefined` or omitted, the editor will not use diff mode.
*/
diffOriginal?: string;
/** Debounce change events. */
debouncePeriodMS?: number;
/** Error message element ID. */
errorMessageID?: string;
/** Whether the value is invalid. */
isInvalid?: boolean;
/** Extra CodeMirror extensions (e.g., LSP client). */
extraExtensions?: Extension[];
/** Only trigger onChange on blur instead of on every change. */
fireOnBlurOnly?: boolean;
/** Notify of changes. */
onChange?: (contents: string) => unknown;
}
declare const CodeEditor: import("svelte").Component;
type CodeEditor = ReturnType;
export default CodeEditor;