import { TemplateResult, CSSResultArray } from 'lit'; import NileElement from '../../internal/nile-element'; import '../../nile-input/index'; import '../../nile-button/index'; /** * Floating image insert/edit panel, matching nile-rich-text-editor's image * dialog: URL + alt + caption (nile-input) and an Insert action. When * `upload-from-computer` is set it also offers an "or / Upload from computer" * button (with max-size validation), matching the RTE's `uploadfromcomputer` * flag. An edit mode pre-fills the fields and adds Remove. * * The host positions it and listens for: * - `wysiwyg-image-apply` detail: { src, alt, caption } (insert / edit) * - `wysiwyg-image-file` detail: { file, alt, caption } (upload) * - `wysiwyg-image-remove` (delete active image) * - `wysiwyg-image-cancel` (Escape) */ export declare class NileWysiwygImagePanel extends NileElement { open: boolean; /** True when editing an already-inserted image (shows Remove, "Save"). */ editing: boolean; /** Shows the "Upload from computer" button below the URL field. */ uploadFromComputer: boolean; /** Maximum allowed upload size in bytes (default 2 MB). */ maxFileSize: number; private srcValue; private altValue; private captionValue; private uploadedFileName; private errorMessage; /** File staged by "Upload from computer", applied on Insert. */ private stagedFile; static get styles(): CSSResultArray; focusInput(): void; /** Clears every field and returns to insert (non-editing) mode. */ reset(): void; /** Pre-fills the panel for editing an existing image. */ prefill(data: { src?: string; alt?: string; caption?: string; }): void; private onSrc; private onAlt; private onCaption; private triggerFilePicker; private onFileChange; private handleSubmit; private handleKeydown; render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'nile-wysiwyg-image-panel': NileWysiwygImagePanel; } }