import { LitElement, TemplateResult } from 'lit'; import { Monaco } from '../..'; import { BaseMonacoEditor } from './editor.js'; import type * as monaco from '../..'; export type SuggestedLanguages = 'css' | 'go' | 'html' | 'javascript' | 'json' | 'markdown' | 'plaintext' | 'python' | 'shell' | 'sql' | 'typescript' | 'yaml'; type JSONSchema = monaco.json.JSONSchema; type LineNumberFormatter = (lineNumber: number) => string; type LineNumbersType = 'on' | 'off' | 'relative' | 'interval' | LineNumberFormatter; type WordWrapOptions = 'off' | 'on' | 'wordWrapColumn' | 'bounded'; declare const BaseMonacoInput_base: import('@nvidia-elements/forms/mixins').FormControlMixinReturn; /** * Base class for Monaco input wrapper custom elements. * @cssprop --background * @cssprop --border * @cssprop --border-radius * @cssprop --min-height * @cssprop --padding * @event canceled - Dispatched when the editor cancels initialization. * @event ready - Dispatched when the editor finishes initialization and becomes ready. * @event input - Dispatched when the element's value changes as a result of a user action. * @event change - Dispatched when the user modifies and commits the element's value. * @event reset - Dispatched when the control state is reset to its initial value. * @event invalid - Dispatched when the control is invalid. * @event syntax-validation-changed - Dispatched when syntax validation state changes. */ export declare abstract class BaseMonacoInput, TEditor extends monaco.editor.IEditor> extends BaseMonacoInput_base { #private; static styles: import('lit').CSSResult[]; /** * Defines the programming language for syntax highlighting and validation. */ get language(): SuggestedLanguages | string; set language(value: SuggestedLanguages | string); /** * Determines whether the input prevents editing. */ get disabled(): boolean; set disabled(value: boolean); /** * Determines whether the editor supports code folding. */ get folding(): boolean; set folding(value: boolean); /** * Determines whether to insert spaces instead of tabs when pressing the tab key. */ get insertSpaces(): boolean; set insertSpaces(value: boolean); /** * Controls the display of line numbers in the editor. */ get lineNumbers(): LineNumbersType; set lineNumbers(value: LineNumbersType); /** * Determines whether to show the minimap (code overview) on the right side of the editor. */ get minimap(): boolean; set minimap(value: boolean); /** * Determines whether the editor is in read-only mode. */ get readOnly(): boolean; set readOnly(value: boolean); /** * Determines whether the input requires a value. */ get required(): boolean; set required(value: boolean); /** * JSON schema for validation when the language equals 'json'. * https://json-schema.org/ */ get schema(): JSONSchema | undefined; set schema(value: JSONSchema | undefined); /** * Determines the number of spaces to use for indentation. */ get tabSize(): number; set tabSize(value: number); /** * The current value/content of the editor. */ get value(): string; set value(value: string); /** * Controls how the editor wraps text. */ get wordWrap(): WordWrapOptions; set wordWrap(value: WordWrapOptions); /** * Determines whether to disable validation of the input. */ get noValidate(): boolean; set noValidate(value: boolean); connectedCallback(): Promise; disconnectedCallback(): void; focus(): void; abstract render(): TemplateResult; updateEditorOptions(options: monaco.editor.IEditorOptions & monaco.editor.IGlobalEditorOptions): void; protected abstract get _editor(): T; protected abstract _createEditor(monaco: Monaco): monaco.editor.IStandaloneCodeEditor; protected _updateEditorOptions(options: Partial): void; } export {};