/** * InnerEditor - Slate editor wrapper: setup, content sync, keyboard, focus/blur, * mouse, fake highlight, font stepping, and edit mode transitions. */ import * as React from 'react'; import { Descendant, Editor } from 'slate'; import type { RichTextStateResult } from './hooks/useRichTextState'; export interface InnerEditorProps { initialValue: Descendant[]; richTextContent: string; isEditMode: boolean; isTextEditing: boolean; containerRef: React.RefObject; defaultTextStyle: { color?: string; backgroundColor?: string; fontSize?: string; fontFamily?: string; lineHeight?: string; bold?: boolean; italic?: boolean; underline?: boolean; strikethrough?: boolean; }; onContentChange: (html: string, immediate?: boolean) => void; onFocusGained?: (editable: HTMLDivElement | null, editor: Editor | null) => void; onFocusLost?: () => void; /** Consolidated text-editing lifecycle from useRichTextState. */ richTextState?: Partial; onEditorReady?: (editor: Editor) => void; updateActiveStylesRef?: React.MutableRefObject<(() => void) | null>; clearFakeHighlightRef?: React.MutableRefObject<(() => void) | null>; /** Set by useContentSave; checked to detect round-trips and skip tree resets. */ recentSavesRef?: React.MutableRefObject>; /** When true, forces the next external content sync even if the editor has focus. */ forceNextSyncRef?: React.MutableRefObject; /** Post-processing applied after a forced tree reset (e.g. re-apply token marks). */ transformTreeRef?: React.MutableRefObject<((tree: import('slate').Descendant[]) => import('slate').Descendant[]) | null>; /** Whether a new initialValue reference should re-sync otherwise unchanged content. */ syncInitialValueChanges?: boolean; /** Called after editor changes to auto-resolve newly typed or pasted $token$ patterns. */ autoResolveTokensRef?: React.MutableRefObject<((includeValueChanges?: boolean) => void) | null>; /** Marks the start of a paste so token resolution can wait for the paste burst to settle. */ onPasteStart?: () => void; /** Callback for screenreader announcements on format changes. */ onAnnouncement?: (message: string) => void; /** Token name -> resolved value, used to resolve $token$ in link URLs. */ nameToValue?: Map; /** Cancel pending typing batch (no save). On Cmd+Z, avoids an intermediate * save consuming forceNextSyncRef before the dashboard undo prop arrives. */ onCancelPendingChanges?: () => void; /** When bound (dashboard), open links through the framework's link.open * event so its URL protection applies. Unset for the standalone viz. */ onLinkOpen?: (url: string) => void; } export declare const InnerEditor: React.FC; //# sourceMappingURL=InnerEditor.d.ts.map