import { TextInputWorker } from "../TextInputWorker";
import { AppEventContext } from "../../../app";
import { TextProps } from "../../../graphics";
import { EditTextInfo } from "../../../input/EditTextInfo";
import { TextSelectionInfo } from "../../../input/selection/TextSelectionInfo";
import { TextCursorPosition } from "../../../renderText/editInfo/TextCursorPosition";
export declare abstract class AbsTextFontWorker {
    protected inputWorker: TextInputWorker;
    protected abstract richStyle(prop: any): Record<string, string>;
    protected abstract textProp(prop: any): Partial<TextProps>;
    changeFontProp(prop: any, context: AppEventContext): void;
    changeFontPropByIds(prop: any, idList: string[], context: AppEventContext): void;
    protected changeFontPropForIds(prop: any, context: AppEventContext, ids: string[]): void;
    protected changeFontPropForWhole(prop: any, context: AppEventContext): void;
    protected changeFontPropBySelection(prop: any, editInfo: EditTextInfo, selection: TextSelectionInfo, context: AppEventContext): void;
    /**
     * 全文选中时，修改节点默认 textProps，并去除 richText 中对应的样式字段
     */
    protected changeFontPropForWholeSelection(prop: any, editInfo: EditTextInfo, selection: TextSelectionInfo, context: AppEventContext): void;
    /**
     * 判断是否全文选中。只有在编辑状态且选区起始位置和文本头尾位置一致时，才认为是全文选中。
     */
    protected isWholeTextSelection(editInfo: EditTextInfo, selection: TextSelectionInfo): boolean;
    /**
     *  将光标位置规范化为 start 在前，end 在后，方便后续统一处理。
     * @param start 光标位置
     * @param end 光标位置
     * @returns 规范化后的光标位置对象
     */
    protected normalizeSelection(start: TextCursorPosition, end: TextCursorPosition): {
        start: TextCursorPosition;
        end: TextCursorPosition;
    };
    /**
     * 从 richText 中去掉指定的样式字段
     * @param richText 富文本
     * @param attrNames 需要去掉的样式字段列表，如 fontSize、fontFamily 等
     * @returns 去掉默认样式字段后的 richText
     */
    protected stripRichStyleAttrs(richText: string, attrNames: string[]): string;
}
//# sourceMappingURL=AbsTextFontWorker.d.ts.map