import { Ref } from 'vue';
import { RichTextFeature } from '@bluepic/types';
export declare function getSelection(element: HTMLElement): {
    start: number;
    length: number;
};
export declare function useSelection(element: Ref<HTMLElement | undefined>): Ref<{
    start: number;
    length: number;
} | null, {
    start: number;
    length: number;
} | {
    start: number;
    length: number;
} | null>;
export declare function resolveSubtreeParagraphs(element: HTMLElement, baseFormat: RichTextFeature['format'], proxyNewLinesWithEmptyText?: boolean): RichTextFeature[][];
export declare function sliceRichText(fragments: RichTextFeature[], start: number, end: number): RichTextFeature[];
export declare function sliceRichTextParagraphsNewAlgorithm(paragraphs: RichTextFeature[][], start: number, end: number): RichTextFeature[][];
export type ContentEditableInputOptions = {
    maxLength?: number;
    maxLengthPerLine?: number;
    maxLines?: number;
};
export default function useContentEditable(element: Ref<HTMLElement | undefined>, paragraphsRef: Ref<RichTextFeature[][]>, options: ContentEditableInputOptions, preventLinebreaks: Ref<boolean>): {
    selection: Ref<{
        start: number;
        length: number;
    } | null, {
        start: number;
        length: number;
    } | {
        start: number;
        length: number;
    } | null>;
    paragraphs: Ref<{
        text: string;
        format: {
            [k: string]: unknown;
        };
    }[][], RichTextFeature[][] | {
        text: string;
        format: {
            [k: string]: unknown;
        };
    }[][]>;
    visibleParagraphs: Ref<{
        text: string;
        format: {
            [k: string]: unknown;
        };
    }[][], RichTextFeature[][] | {
        text: string;
        format: {
            [k: string]: unknown;
        };
    }[][]>;
    manipulationState: Ref<string, string>;
    handleInputEvent: (event: Event) => void;
    applyFormat: (selectionStart: number, selectionLength: number, format: RichTextFeature["format"], select?: boolean) => void;
    resolveFeatures: (startIndex: number, length: number) => RichTextFeature[][];
};
export declare function getContentEditableSelection(element: HTMLElement, log?: boolean): {
    start: number;
    length: number;
} | null;
export declare function selectContentEditable(element: HTMLElement, startIndex: number, length: number): void;
