import { PropertyValues } from 'lit';
import { InputSize } from '../../shared/types';
declare const LuksoMarkdownEditor_base: typeof import('lit').LitElement;
/**
 * A split-pane markdown editor with live preview, formatting toolbar, and accessibility checker.
 * All events pass `{ value, event }` in their detail object.
 */
export declare class LuksoMarkdownEditor extends LuksoMarkdownEditor_base {
    value: string;
    name: string;
    label: string;
    description: string;
    error: string;
    isFullWidth: boolean;
    isReadonly: boolean;
    isDisabled: boolean;
    isNonResizable: boolean;
    autofocus: boolean;
    size: InputSize;
    isPreview: boolean;
    rows: number;
    placeholder: string;
    previewBackgroundColor: string;
    previewTextColor: string;
    stripHtmlTags: boolean;
    tools: any;
    private toolsState;
    private defaultTools;
    private savedSelectionForPreview;
    private isHeadingDropdownOpen;
    private isColorDropdownOpen;
    private isListDropdownOpen;
    private isAlignmentDropdownOpen;
    private readonly headingTriggerId;
    private readonly colorTriggerId;
    private readonly listTriggerId;
    private readonly alignmentTriggerId;
    private currentSelection;
    private savedSelection;
    private activeFormats;
    private undoStack;
    private redoStack;
    private isUndoRedoAction;
    private lastSavedValue;
    private undoTimeout;
    private readonly MAX_UNDO_STACK_SIZE;
    private readonly UNDO_SAVE_DELAY;
    private accessibilityViolations;
    private hasAccessibilityViolations;
    private accessibilityCheckTimeout;
    private textareaEl?;
    private handleOutsideClick;
    private styles;
    private toolbarButton;
    /**
     * Hex color palette for the color picker.
     * A curated collection of colors organized by hue families,
     * ranging from light pastels to bold colors.
     */
    private colorSamples;
    private dispatchChange;
    /**
     * Check accessibility violations on the live preview content
     */
    private performAccessibilityCheck;
    /**
     * Schedule accessibility check with debouncing
     */
    private scheduleAccessibilityCheck;
    /**
     * Clean up empty color spans from the value.
     * This removes spans like <span style="color: #xxx"></span> with no content.
     */
    private cleanupEmptyColorSpans;
    /**
     * Unified helper that ensures both active format state and change events are properly
     * emitted after any value mutation. This replaces the scattered updateActiveFormats()
     * and dispatchChange() calls throughout the codebase.
     *
     * @param event - Optional event that triggered the change
     */
    private emitChangeAndRefresh;
    /**
     * Utility to perform an operation with the current textarea selection.
     *
     * @param callback -
     */
    private withSelection;
    /**
     * Expand empty selection to current word boundaries
     *
     * @param start - selection start
     * @param end - selection end
     * @param value - full textarea value
     */
    private expandSelectionToWord;
    /**
     * Apply or toggle heading formatting for the current line(s).
     *
     * @param level - 0 to remove heading, 1-4 for heading levels
     */
    private applyHeading;
    /**
     * Apply or toggle list formatting for the current line(s).
     *
     * @param listType - 'none' to remove list, 'unordered' for bullet list, 'ordered' for numbered list
     */
    private applyList;
    /**
     * Get the current active list type based on activeFormats.
     */
    private getActiveListType;
    /**
     * Get the current alignment icon name based on activeFormats.
     */
    private getAlignmentIcon;
    /**
     * Apply or toggle text alignment for the current line(s).
     *
     * @param alignment - 'left', 'center', or 'right'
     */
    private applyAlignment;
    /**
     * Check if content has nested alignment divs inside formatting markers.
     */
    private hasNestedAlignment;
    /**
     * Get the alignment from nested alignment divs.
     */
    private getNestedAlignment;
    /**
     * Remove nested alignment divs from content.
     */
    private removeNestedAlignment;
    /**
     * Replace nested alignment with a new alignment.
     */
    private replaceNestedAlignment;
    /**
     * Wrap content with alignment div, ensuring proper nesting inside formatting markers.
     * Examples:
     * - **text** becomes **<div style="text-align: center;">text</div>**
     * - *text* becomes *<div style="text-align: center;">text</div>*
     * - # text becomes # <div style="text-align: center;">text</div>
     *
     * @param content - the content to wrap
     * @param alignment - 'left', 'center' or 'right'
     */
    private wrapContentWithAlignment;
    /**
     * Toggle inline formatting by wrapping/unwrapping selection or current word.
     *
     * @param wrapper - the markdown wrapper to toggle, e.g. '**' for bold, '*' for italic
     */
    private toggleWrap;
    /**
     * Toggle preview mode on or off.
     */
    private togglePreview;
    /**
     * Enter preview mode - save current state and remove keyboard listeners from textarea
     */
    private enterPreview;
    /**
     * Exit preview mode - restore state and reattach keyboard listeners
     */
    private exitPreview;
    /**
     * Insert or edit a markdown link [text](url).
     */
    private insertLink;
    /**
     * Handle input event from the internal textarea component.
     * @param event
     */
    private handleTextareaInput;
    /**
     * Update active formatting states based on current selection or cursor position.
     */
    private updateActiveFormats;
    /**
     * Check if a given position is within a markdown link [text](url).
     * @param position - cursor position
     * @param value  - full textarea value
     */
    private isWithinLink;
    /**
     * Check if selection is within the text part [] of a markdown link
     * @param start - selection start position
     * @param end - selection end position
     * @param value - full textarea value
     */
    private isSelectionInLinkText;
    /**
     * Check if selection is within the URL part () of a markdown link
     * @param start - selection start position
     * @param end - selection end position
     * @param value - full textarea value
     */
    private isSelectionInLinkUrl;
    /**
     * Textarea keyup handler.
     * Update active formats when user navigates with keyboard.
     */
    private handleTextareaKeyUp;
    /**
     * Textarea click handler.
     * Update active formats when user clicks to move cursor.
     */
    private handleTextareaClick;
    /**
     * Add keyboard event listeners to the textarea for undo/redo functionality.
     */
    private addKeyboardListeners;
    /**
     * Remove keyboard event listeners from the textarea to prevent memory leaks.
     */
    private removeKeyboardListeners;
    /**
     * Toggle color formatting by wrapping/unwrapping selection or current word.
     *
     * @param color - the hex color code to apply, e.g. '#FF0000' for red
     */
    private toggleColorWrap;
    /**
     * Handle color selection from the dropdown.
     *
     * @param color - the selected hex color code
     */
    private selectColor;
    /**
     * Clear color formatting from the current selection or word.
     */
    private clearColor;
    /**
     * Determine the current active heading level (1-3) based on activeFormats.
     */
    private getActiveHeadingLevel;
    /**
     * Save the initial state to the undo stack.
     */
    private saveInitialUndoState;
    /**
     * Save the current state to the undo stack before making a change.
     */
    private saveUndoStateBeforeChange;
    /**
     * Save the current state to the undo stack if the value has changed.
     */
    private saveUndoState;
    /**
     * Schedule an undo state save after a short delay.
     */
    private scheduleUndoStateSave;
    /**
     * Handle keydown events for undo/redo shortcuts and list continuation.
     */
    private handleKeyDown;
    /**
     * Handle list continuation when Enter is pressed within a list item.
     * Works against the textarea value/selection.
     * Returns true if handled.
     */
    private handleListContinuation;
    /**
     * Handle Tab key to indent a list item (increase nesting level).
     * Returns true if handled.
     */
    private handleListIndent;
    /**
     * Handle Shift+Tab key to outdent a list item (decrease nesting level).
     * Returns true if handled.
     */
    private handleListOutdent;
    /**
     * Renumber ordered list items that come after the given position with the same indentation level.
     *
     * @param value - The text content to process
     * @param fromPosition - Start looking for list items from this position
     * @param targetIndent - Only renumber items with this exact indentation
     * @returns The text with renumbered list items
     */
    private renumberOrderedListItems;
    /**
     * Renumber any ordered lists that come after the given position, starting each new sequence from 1.
     * This is used when removing list formatting breaks the continuity of a list.
     *
     * @param value - The text content to process
     * @param fromPosition - Start looking for list items from this position
     * @returns The text with renumbered list sequences
     */
    private renumberSubsequentOrderedLists;
    /**
     * Handle backspace to remove empty list items.
     * Returns true if handled.
     */
    private handleListBackspace;
    /**
    /**
     * Perform an undo operation, reverting to the previous state.
     */
    private undo;
    /**
     * Perform a redo operation, reapplying a previously undone state.
     */
    private redo;
    connectedCallback(): void;
    firstUpdated(changedProperties: PropertyValues): void;
    updated(changedProperties: PropertyValues): void;
    disconnectedCallback(): void;
    /**
     * Restore focus and selection to the textarea after toolbar interactions.
     */
    private restoreFocusAndSelection;
    private buttonTemplate;
    private toolbarTemplate;
    private accessibilityIndicatorTemplate;
    render(): import('lit-html').TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'lukso-markdown-editor': LuksoMarkdownEditor;
    }
}
export {};
//# sourceMappingURL=index.d.ts.map