/** * @license * Copyright 2024 Nuraly * SPDX-License-Identifier: MIT */ import { LitElement, type PropertyValues } from 'lit'; import { type CodeEditorTheme, type CodeEditorLanguage } from './code-editor.types.js'; declare const NrCodeEditorElement_base: (new (...args: any[]) => import("../../shared/theme-mixin.js").ThemeAware) & typeof LitElement; /** * NuralyUI Code Editor component using CodeJar — a lightweight (~2KB) code editor. * * @example * ```html * console.log(e.detail.value)} * > * ``` * * @fires nr-change - Fired when the code content changes * @fires nr-keydown - Fired on keydown events in the editor * @fires nr-keyup - Fired on keyup events in the editor * @fires nr-focus - Fired when the editor gains focus * @fires nr-blur - Fired when the editor loses focus * @fires nr-ready - Fired when the editor is ready * * @csspart editor-container - The container wrapping the editor */ export declare class NrCodeEditorElement extends NrCodeEditorElement_base { static styles: import("lit").CSSResult; static useShadowDom: boolean; /** CodeJar instance */ private jar?; /** Whether editor is initialized */ private isEditorReady; /** Reference to the editor element */ private editorRef; /** Suppress change events during programmatic updates */ private suppressChange; /** Makes the editor read-only */ readonly: boolean; /** Editor theme (vs, vs-dark, hc-black, hc-light) */ theme: CodeEditorTheme; /** Programming language for syntax highlighting */ language: CodeEditorLanguage; /** The code content */ code: string; /** Show line numbers */ lineNumbers: boolean; /** Font size in pixels */ fontSize: number; /** Enable word wrap */ wordWrap: boolean; /** Tab size in spaces */ tabSize: number; render(): import("lit-html").TemplateResult<1>; /** Returns the current code contents */ getValue(): string; /** Sets the editor value programmatically */ setValue(value: string): void; /** Focus the editor */ focus(): void; firstUpdated(): void; private initializeEditor; private escapeHtml; private updateLineNumbers; private createKeyEventDetail; private emit; private isDarkTheme; protected updated(changedProperties: PropertyValues): void; disconnectedCallback(): void; } declare global { interface HTMLElementTagNameMap { 'nr-code-editor': NrCodeEditorElement; } } export {}; //# sourceMappingURL=code-editor.component.d.ts.map