import { LitElement } from 'lit'; import '../dropdown/ws-dropdown.js'; export type WsCodeLanguageOption = { value: string; label: string; }; /** * Workshop code surface for read-only snippets and lightweight editing. * * Add `editable` to turn the highlighted code surface into a native textarea * editor while preserving Workshop syntax colors underneath it. * * @fires input - Dispatched while editable code changes. * @fires change - Dispatched when editable code is committed by the browser. * @fires ws-code-copy - Dispatched when the current code is copied. * @fires ws-code-language-change - Dispatched when the editable syntax language changes. * @csspart header - Header containing the language and actions. * @csspart language - Programming language label in read-only mode. * @csspart language-picker - Programming language dropdown in editable mode. * @csspart code - Read-only highlighted code surface. * @csspart editor - Editable textarea. * @csspart line-numbers - Editable line-number gutter. * @csspart copy-button - Copy action. */ export declare class WsCodeBlock extends LitElement { static styles: import("lit").CSSResult; /** Programming language label and syntax-highlighting hint. */ language: string; /** Languages offered by the editable syntax dropdown. */ languageOptions: readonly WsCodeLanguageOption[]; /** Code shown or edited by the component. */ code: string; /** Shows a copy-to-clipboard action. */ copy: boolean; /** Turns the code surface into an editable code field. */ editable: boolean; /** Prevents editing while preserving selection and copy behavior. */ readOnly: boolean; /** Disables editing and keyboard interaction. */ disabled: boolean; /** Shows line numbers in editable mode. */ lineNumbers: boolean; /** Number of spaces inserted by Tab in editable mode. */ tabSize: number; /** Visible editor height hint, expressed as textarea rows. */ rows: number; /** Placeholder shown when the editable block is empty. */ placeholder: string; /** Accessible name for the editable textarea. */ accessibleLabel: string; private copied; private slottedCode; private codeNodes; private editorElement?; private highlightLayer?; private lineNumbersElement?; private editingStarted; private tabNavigationArmed; private get displayCode(); private get effectiveTabSize(); private get lineCount(); private get availableLanguageOptions(); private copyCode; render(): import("lit-html").TemplateResult<1>; private renderLanguagePicker; private renderEditor; private handleLanguageChange; private handleEditorInput; private handleEditorChange; private handleEditorBlur; private handleEditorKeydown; private applyEditorValue; private syncEditorScroll; private renderHighlightedCode; private tokenize; private tokenizeMarkup; private tokenizeScript; private syncSlottedCode; } declare global { interface HTMLElementTagNameMap { 'ws-code-block': WsCodeBlock; } } //# sourceMappingURL=ws-code-block.d.ts.map