import type { Editor } from '@tiptap/core'; import { type WorkDocumentEmphasisMark } from '../work-document-emphasis'; import { type DocumentFontDialogScriptFontPatch, type DocumentFontFamilySource } from './document-font-dialog-script-font-model'; import { type DocumentFontDialogOpenTypeDraft, type DocumentFontDialogOpenTypePatch, type DocumentFontDialogOpenTypeSource, type DocumentFontDialogOpenTypeTouched } from './document-font-dialog-opentype-model'; import { type DocumentFontDialogRunBorderDraft, type DocumentFontDialogRunBorderPatch, type DocumentFontDialogRunBorderSource } from './document-font-dialog-run-border-model'; import { type DocumentFontDialogRunShadingDraft, type DocumentFontDialogRunShadingPatch, type DocumentFontDialogRunShadingSource } from './document-font-dialog-run-shading-model'; export type { DocumentFontFamilySource } from './document-font-dialog-script-font-model'; export type DocumentCharacterSpacingMode = 'condensed' | 'expanded' | 'mixed' | 'normal'; export type DocumentCharacterPositionMode = 'lowered' | 'mixed' | 'normal' | 'raised'; export type DocumentCharacterScaleMode = 'mixed' | 'value'; export type DocumentEmphasisMarkMode = 'inherit' | 'mixed' | WorkDocumentEmphasisMark; export interface DocumentFontDialogSource extends DocumentFontDialogOpenTypeSource { characterScale: { mixed: boolean; value: number | null; }; characterPosition: { mixed: boolean; value: number | null; }; characterSpacing: { mixed: boolean; value: number | null; }; kerningThreshold: { mixed: boolean; value: number | null; }; emphasisMark: { mixed: boolean; value: WorkDocumentEmphasisMark | null; }; hiddenText: { mixed: boolean; value: boolean | null; }; legacyTextOutline: { mixed: boolean; value: boolean | null; }; legacyTextShadow: { mixed: boolean; value: boolean | null; }; legacyTextEmboss: { mixed: boolean; value: boolean | null; }; legacyTextImprint: { mixed: boolean; value: boolean | null; }; runBorder: DocumentFontDialogRunBorderSource; runShading: DocumentFontDialogRunShadingSource; latinFont: DocumentFontFamilySource; eastAsiaFont: DocumentFontFamilySource; complexScriptFont: DocumentFontFamilySource; fontFamily: string | null; fontSize: string | null; previewText: string; selectedCharacters: number; } export interface DocumentFontDialogDraft extends DocumentFontDialogRunBorderDraft, DocumentFontDialogRunShadingDraft, DocumentFontDialogOpenTypeDraft { characterScaleMode: DocumentCharacterScaleMode; characterScalePercent: string; characterPositionMode: DocumentCharacterPositionMode; characterPositionPoints: string; characterSpacingMode: DocumentCharacterSpacingMode; characterSpacingPoints: string; kerningEnabled: boolean; kerningThresholdPoints: string; emphasisMark: DocumentEmphasisMarkMode; hiddenText: boolean; legacyTextOutline: boolean; legacyTextShadow: boolean; legacyTextEmboss: boolean; legacyTextImprint: boolean; latinFont: string; eastAsiaFont: string; complexScriptFont: string; } export interface DocumentFontDialogPatch extends DocumentFontDialogScriptFontPatch, DocumentFontDialogRunBorderPatch, DocumentFontDialogRunShadingPatch, DocumentFontDialogOpenTypePatch { characterScalePercent?: number; characterPositionHalfPoints?: number; characterSpacingTwips?: number; kerningThresholdHalfPoints?: number | null; emphasisMark?: WorkDocumentEmphasisMark | null; hiddenText?: boolean; legacyTextOutline?: boolean; legacyTextShadow?: boolean; legacyTextEmboss?: boolean; legacyTextImprint?: boolean; } export interface DocumentFontDialogTouched extends DocumentFontDialogOpenTypeTouched { characterPosition: boolean; characterScale: boolean; characterSpacing: boolean; complexScriptFont: boolean; eastAsiaFont: boolean; emphasisMark: boolean; hiddenText: boolean; legacyTextOutline: boolean; legacyTextShadow: boolean; legacyTextEmboss: boolean; legacyTextImprint: boolean; runBorder: boolean; runShading: boolean; kerning: boolean; latinFont: boolean; } export declare function documentFontDialogSource(editor: Editor): DocumentFontDialogSource; export declare function createDocumentFontDialogDraft(source: DocumentFontDialogSource): DocumentFontDialogDraft; export declare function documentFontDialogDraftError(draft: DocumentFontDialogDraft): string | null; export declare function documentFontDialogPatch(source: DocumentFontDialogSource, draft: DocumentFontDialogDraft, touched: DocumentFontDialogTouched): DocumentFontDialogPatch; export declare function applyDocumentFontDialogPatch(editor: Editor, selection: { from: number; to: number; }, patch: DocumentFontDialogPatch): boolean;