import { type CompletionSource } from "@codemirror/autocomplete"; import { type HighlightStyle } from "@codemirror/language"; import { type Extension } from "@codemirror/state"; import { type EditorView } from "@codemirror/view"; import { type ExternalChangeSelection } from "./hooks/useCodemirrorChange.js"; /** * A CodeMirror editor with no frame and no token palette of its own. The consumer styles the * `.cm-editor` box through `className` and provides the `highlightStyle`. * Use {@link DefaultSyntaxHighlightingInput} for the standard input look. * * @internal */ export interface ISyntaxHighlightingInputProps { value: string; highlightStyle: HighlightStyle; label?: string; disabled?: boolean; className?: string; placeholder?: string; beforeExtensions?: Extension[]; extensions?: Extension[]; onChange: (value: string) => void; onFocus?: (event: FocusEvent, view: EditorView) => void; onBlur?: (event: FocusEvent, view: EditorView) => void; onApi?: (view: EditorView | null) => void; onCursor?: (from: number, to: number) => void; onKeyDown?: (event: KeyboardEvent, view: EditorView) => boolean; autocompletion?: { whenTyping?: boolean; whenTypingDelay?: number; aboveCursor?: boolean; }; onCompletion?: CompletionSource; /** * Where the selection goes when the controlled `value` is replaced from outside: clamped in * place (default), or at the end of the new document. */ externalChangeSelection?: ExternalChangeSelection; } /** * @internal */ export declare function SyntaxHighlightingInput({ value, highlightStyle, label, placeholder, autocompletion, onApi, onChange, onCursor, onKeyDown, onCompletion, onFocus, onBlur, className, beforeExtensions, extensions, disabled, externalChangeSelection, }: ISyntaxHighlightingInputProps): import("react/jsx-runtime").JSX.Element; /** * @internal */ export type IDefaultSyntaxHighlightingInputProps = Omit & Partial>; /** * {@link SyntaxHighlightingInput} with the standard input frame, a fixed height and the default * light token palette. * * @internal */ export declare function DefaultSyntaxHighlightingInput({ className, highlightStyle, ...props }: IDefaultSyntaxHighlightingInputProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=SyntaxHighlightingInput.d.ts.map