import type Quill from 'quill'; import type { Range } from 'quill'; import { TextFormat, TextFormatAttrs, ApplyTextFormatOptions } from './text-format.js'; type QuillFormat = Record; type QuillMixed = Record; export interface ActiveTextEditor { instance: any; store: any; element: any; currentFormat: QuillFormat; mixedFormats: QuillMixed; lastSelection: { index: number; length: number; } | null; } export declare function getActiveTextEditor(): ActiveTextEditor | null; export declare function setActiveTextEditor(info: { instance: any; store: any; element: any; }): void; export declare function updateActiveTextFormat(currentFormat: QuillFormat, mixedFormats: QuillMixed, range?: { index: number; length: number; } | null): void; export declare function clearActiveTextEditor(instance?: any): void; export interface TextDefaults { fontSize: number; fontFamily: string; fill: string; fontWeight: string; fontStyle: string; textDecoration: string; textTransform?: string; } export declare const ALL_QUILL_MIXED_KEYS: string[]; export declare function quillToTextFormat(fmt: QuillFormat, mixed: QuillMixed, defaults: TextDefaults): TextFormat; export declare function attrsToQuillOps(attrs: TextFormatAttrs, opts?: ApplyTextFormatOptions, elementTransform?: string): Array<[string, any]>; export type TextFormatState = { format: TextFormat; applyTextFormat: (attrs: TextFormatAttrs, opts?: ApplyTextFormatOptions) => void; enabled: boolean; }; export declare function activeFor(store: any): ActiveTextEditor | null; export declare function restoreEditorSelection(quill: Quill, range: Range): void; export declare function resolveSelectionScope(quill: any, fallbackSelection: { index: number; length: number; } | null): { scope: 'full' | 'partial' | 'collapsed'; sel: { index: number; length: number; }; isEmpty: boolean; }; export declare function applyToLiveEditor(quill: any, attrs: TextFormatAttrs, fallbackSelection?: { index: number; length: number; } | null, opts?: ApplyTextFormatOptions, elementTransform?: string): void; export declare function getTextFormatState(store: any): TextFormatState; export declare function observeTextFormatState(store: any, cb: (state: TextFormatState) => void): () => void; export declare function useTextFormat(store: any): TextFormatState; export {};