## API Report File for "@eigenpal/docx-editor-vue"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts

import { AutoSaveStatus } from '@eigenpal/docx-editor-core/managers/types';
import { CellCoordinates } from '@eigenpal/docx-editor-core/managers/types';
import { ClipboardSelection } from '@eigenpal/docx-editor-core';
import { CommandMap } from '@eigenpal/docx-editor-core/prosemirror/extensions/types';
import { Comment as Comment_2 } from '@eigenpal/docx-editor-core/types/content';
import { ComputedRef } from 'vue';
import { createSelectionFromDOM } from '@eigenpal/docx-editor-core';
import { createVisualLineState } from '@eigenpal/docx-editor-core/prosemirror/utils/visualLineNavigation';
import { CSSProperties } from 'vue';
import { Document as Document_2 } from '@eigenpal/docx-editor-core/types/document';
import { EditorState } from 'prosemirror-state';
import { EditorView } from 'prosemirror-view';
import { extractTrackedChanges } from '@eigenpal/docx-editor-core/prosemirror/utils/extractTrackedChanges';
import { FindMatch } from '@eigenpal/docx-editor-core/utils/findReplace';
import { FindOptions } from '@eigenpal/docx-editor-core/utils/findReplace';
import { formatLastSaveTime } from '@eigenpal/docx-editor-core';
import { formatStorageSize } from '@eigenpal/docx-editor-core';
import { getAutoSaveStatusLabel } from '@eigenpal/docx-editor-core';
import { getAutoSaveStorageSize } from '@eigenpal/docx-editor-core';
import { getSelectionRuns } from '@eigenpal/docx-editor-core';
import { HeaderFooter } from '@eigenpal/docx-editor-core/types/document';
import { HighlightRect } from '@eigenpal/docx-editor-core/utils';
import { isAutoSaveSupported } from '@eigenpal/docx-editor-core';
import { Layout } from '@eigenpal/docx-editor-core/layout-engine/types';
import { LayoutSelectionGate } from '@eigenpal/docx-editor-core/prosemirror';
import { MaybeRef } from 'vue';
import { ParsedClipboardContent } from '@eigenpal/docx-editor-core/utils';
import { Plugin as Plugin_2 } from 'prosemirror-state';
import { Ref } from 'vue';
import { runsToClipboardContent } from '@eigenpal/docx-editor-core/utils';
import { SavedDocumentData } from '@eigenpal/docx-editor-core/managers/types';
import { SelectionHighlightConfig } from '@eigenpal/docx-editor-core/utils';
import { ShallowRef } from 'vue';
import { Theme } from '@eigenpal/docx-editor-core';
import { TrackedChangeEntry } from '@eigenpal/docx-editor-core/utils/comments';
import { TrackedChangesResult } from '@eigenpal/docx-editor-core/prosemirror/utils/extractTrackedChanges';

export { AutoSaveStatus }

export { ClipboardSelection }

// @public (undocumented)
export interface CommentSidebarItem {
    // (undocumented)
    anchorKey?: string;
    // (undocumented)
    anchorPos: number;
    // (undocumented)
    change?: TrackedChangeEntry;
    // (undocumented)
    comment?: Comment_2;
    // (undocumented)
    estimatedHeight?: number;
    // (undocumented)
    fixedY?: number;
    // (undocumented)
    id: string;
    // (undocumented)
    isTemporary?: boolean;
    // (undocumented)
    kind: 'add-comment' | 'comment' | 'tracked-change';
    // (undocumented)
    priority?: number;
    // (undocumented)
    replies?: Comment_2[];
}

export { createSelectionFromDOM }

// @public (undocumented)
export interface DragAutoScrollOptions {
    onScrollExtendSelection: (clientX: number, clientY: number) => void;
    // (undocumented)
    pagesContainer: Ref<HTMLElement | null>;
}

export { extractTrackedChanges }

export { FindMatch }

export { FindOptions }

// @public (undocumented)
export interface FindReplaceOptions {
    // (undocumented)
    initialReplaceMode?: boolean;
    // (undocumented)
    onCurrentMatchChange?: (match: FindMatch | null, index: number) => void;
    // (undocumented)
    onMatchesChange?: (matches: FindMatch[]) => void;
}

// @public (undocumented)
export interface FindReplaceState {
    // (undocumented)
    currentIndex: number;
    // (undocumented)
    isOpen: boolean;
    // (undocumented)
    matches: FindMatch[];
    // (undocumented)
    options: FindOptions;
    // (undocumented)
    replaceMode: boolean;
    // (undocumented)
    replaceText: string;
    // (undocumented)
    searchText: string;
}

export { formatLastSaveTime }

export { formatStorageSize }

export { getAutoSaveStatusLabel }

export { getAutoSaveStorageSize }

export { getSelectionRuns }

export { isAutoSaveSupported }

export { runsToClipboardContent }

export { SavedDocumentData }

export { TrackedChangeEntry }

export { TrackedChangesResult }

// @public (undocumented)
export function useAutoSave(document: MaybeRef<Document_2 | null | undefined>, options?: UseAutoSaveOptions): UseAutoSaveReturn;

// @public (undocumented)
export interface UseAutoSaveOptions {
    debounceDelay?: number;
    enabled?: boolean;
    interval?: number;
    maxAge?: number;
    onError?: (error: Error) => void;
    onRecoveryAvailable?: (savedDocument: SavedDocumentData) => void;
    onSave?: (timestamp: Date) => void;
    saveOnChange?: boolean;
    storageKey?: string;
}

// @public (undocumented)
export interface UseAutoSaveReturn {
    // (undocumented)
    acceptRecovery: () => Document_2 | null;
    // (undocumented)
    clearAutoSave: () => void;
    // (undocumented)
    disable: () => void;
    // (undocumented)
    dismissRecovery: () => void;
    // (undocumented)
    enable: () => void;
    // (undocumented)
    getRecoveryData: () => SavedDocumentData | null;
    // (undocumented)
    hasRecoveryData: Ref<boolean>;
    // (undocumented)
    isEnabled: Ref<boolean>;
    // (undocumented)
    lastSaveTime: Ref<Date | null>;
    // (undocumented)
    save: () => Promise<boolean>;
    // (undocumented)
    status: Ref<AutoSaveStatus>;
}

// @public (undocumented)
export function useClipboard(options?: UseClipboardOptions): UseClipboardReturn;

// @public (undocumented)
export interface UseClipboardOptions {
    // (undocumented)
    cleanWordFormatting?: boolean;
    // (undocumented)
    editable?: boolean;
    // (undocumented)
    onCopy?: (selection: ClipboardSelection) => void;
    // (undocumented)
    onCut?: (selection: ClipboardSelection) => void;
    // (undocumented)
    onError?: (error: Error) => void;
    // (undocumented)
    onPaste?: (content: ParsedClipboardContent, asPlainText: boolean) => void;
    // (undocumented)
    theme?: Theme | null;
}

// @public (undocumented)
export interface UseClipboardReturn {
    // (undocumented)
    copy: (selection: ClipboardSelection) => Promise<boolean>;
    // (undocumented)
    cut: (selection: ClipboardSelection) => Promise<boolean>;
    // (undocumented)
    isProcessing: Ref<boolean>;
    // (undocumented)
    lastPastedContent: Ref<ParsedClipboardContent | null>;
    // (undocumented)
    paste: (asPlainText?: boolean) => Promise<ParsedClipboardContent | null>;
}

// @public (undocumented)
export function useCommentSidebarItems(input: UseCommentSidebarItemsOptions): ComputedRef<CommentSidebarItem[]>;

// @public (undocumented)
export interface UseCommentSidebarItemsOptions {
    // (undocumented)
    addCommentYPosition?: Ref<number | null>;
    // (undocumented)
    comments: Ref<Comment_2[]>;
    // (undocumented)
    isAddingComment?: Ref<boolean>;
    // (undocumented)
    showResolved?: Ref<boolean>;
    // (undocumented)
    trackedChanges: Ref<TrackedChangeEntry[]>;
}

// @public (undocumented)
export function useDocxEditor(options: UseDocxEditorOptions): UseDocxEditorReturn;

// @public (undocumented)
export interface UseDocxEditorOptions {
    author?: MaybeRef<string>;
    editorMode?: MaybeRef<'editing' | 'suggesting' | 'viewing'>;
    externalPlugins?: Plugin_2[];
    hiddenContainer: Ref<HTMLElement | null>;
    onChange?: (doc: Document_2) => void;
    onError?: (error: Error) => void;
    onSelectionUpdate?: () => void;
    pageGap?: number;
    pagesContainer: Ref<HTMLElement | null>;
    readOnly?: MaybeRef<boolean>;
    syncCoordinator?: LayoutSelectionGate;
}

// @public (undocumented)
export interface UseDocxEditorReturn {
    destroy: () => void;
    editorState: ShallowRef<EditorState | null>;
    editorView: ShallowRef<EditorView | null>;
    focus: () => void;
    getCommands: () => CommandMap;
    getDocument: () => Document_2 | null;
    getHfPmView: (hf: HeaderFooter) => EditorView | null;
    isReady: Ref<boolean>;
    layout: ShallowRef<Layout | null>;
    loadBuffer: (buffer: ArrayBuffer | Uint8Array | Blob | File) => Promise<void>;
    loadDocument: (doc: Document_2) => void;
    parseError: Ref<string | null>;
    reLayout: () => void;
    save: () => Promise<Blob | null>;
    setDocument: (doc: Document_2) => void;
    setHfTransactionListener: (cb: ((rId: string, view: EditorView, docChanged: boolean) => void) | null) => void;
    syncHfPMs: () => void;
}

// @public (undocumented)
export function useDragAutoScroll(input: DragAutoScrollOptions): UseDragAutoScrollReturn;

// @public (undocumented)
export interface UseDragAutoScrollReturn {
    // (undocumented)
    stopAutoScroll: () => void;
    // (undocumented)
    updateMousePosition: (clientX: number, clientY: number) => void;
}

// @public (undocumented)
export function useFindReplace(hookOptions?: FindReplaceOptions): UseFindReplaceReturn;

// @public (undocumented)
export interface UseFindReplaceReturn {
    // (undocumented)
    close: () => void;
    // (undocumented)
    currentMatch: ComputedRef<FindMatch | null>;
    // (undocumented)
    goToMatch: (index: number) => void;
    // (undocumented)
    goToNextMatch: () => number;
    // (undocumented)
    goToPreviousMatch: () => number;
    // (undocumented)
    hasMatches: ComputedRef<boolean>;
    // (undocumented)
    openFind: (selectedText?: string) => void;
    // (undocumented)
    openReplace: (selectedText?: string) => void;
    // (undocumented)
    setMatches: (matches: FindMatch[], currentIndex?: number) => void;
    // (undocumented)
    setOptions: (opts: Partial<FindOptions>) => void;
    // (undocumented)
    setReplaceText: (text: string) => void;
    // (undocumented)
    setSearchText: (text: string) => void;
    // (undocumented)
    state: FindReplaceState;
    // (undocumented)
    toggle: () => void;
}

// @public (undocumented)
export function useFixedDropdown(input: UseFixedDropdownOptions): UseFixedDropdownReturn;

// @public (undocumented)
export interface UseFixedDropdownOptions {
    align?: 'left' | 'right';
    // (undocumented)
    isOpen: Ref<boolean>;
    // (undocumented)
    onClose: () => void;
}

// @public (undocumented)
export interface UseFixedDropdownReturn {
    // (undocumented)
    containerRef: Ref<HTMLElement | null>;
    // (undocumented)
    dropdownRef: Ref<HTMLElement | null>;
    // (undocumented)
    dropdownStyle: Ref<CSSProperties>;
    // (undocumented)
    handleMouseDown: (e: MouseEvent) => void;
}

// @public (undocumented)
export function useHistory(view: Ref<EditorView | null>, stateTick: Ref<number>): UseHistoryReturn;

// @public (undocumented)
export interface UseHistoryReturn {
    // (undocumented)
    canRedo: ComputedRef<boolean>;
    // (undocumented)
    canUndo: ComputedRef<boolean>;
    // (undocumented)
    redo: () => boolean;
    // (undocumented)
    undo: () => boolean;
}

// @public (undocumented)
export function useSelectionHighlight(options: UseSelectionHighlightOptions): UseSelectionHighlightReturn;

// @public (undocumented)
export interface UseSelectionHighlightOptions {
    // (undocumented)
    config?: SelectionHighlightConfig;
    // (undocumented)
    containerRef: Ref<HTMLElement | null>;
    // (undocumented)
    debounceMs?: number;
    // (undocumented)
    enabled?: boolean;
    // (undocumented)
    onSelectionChange?: (hasSelection: boolean, text: string) => void;
    // (undocumented)
    useOverlay?: boolean;
}

// @public (undocumented)
export interface UseSelectionHighlightReturn {
    // (undocumented)
    getOverlayStyle: (rect: HighlightRect) => CSSProperties;
    // (undocumented)
    hasSelection: ComputedRef<boolean>;
    // (undocumented)
    highlightRects: ComputedRef<HighlightRect[]>;
    // (undocumented)
    isSelectionInContainer: ComputedRef<boolean>;
    // (undocumented)
    refresh: () => void;
    // (undocumented)
    selectedText: ComputedRef<string>;
}

// @public (undocumented)
export function useTableResize(): UseTableResizeReturn;

// @public (undocumented)
export interface UseTableResizeReturn {
    // (undocumented)
    install: () => () => void;
    // (undocumented)
    isResizing: () => boolean;
    // (undocumented)
    tryStartResize: (e: MouseEvent, view: EditorView) => boolean;
}

// @public (undocumented)
export function useTableSelection(): UseTableSelectionReturn;

// @public (undocumented)
export interface UseTableSelectionReturn {
    // (undocumented)
    clearSelection: () => void;
    // (undocumented)
    handleCellClick: (tableIndex: number, rowIndex: number, columnIndex: number) => void;
    // (undocumented)
    handleClickTarget: (target: EventTarget | null, container?: HTMLElement | null) => void;
    // (undocumented)
    isCellSelected: (tableIndex: number, rowIndex: number, columnIndex: number) => boolean;
    // (undocumented)
    selectedCell: Ref<CellCoordinates | null>;
}

// @public
export function useTrackedChanges(view: Ref<EditorView | null>, stateTick: Ref<number>): ComputedRef<TrackedChangesResult>;

// @public (undocumented)
export function useVisualLineNavigation(pagesContainer: Ref<HTMLElement | null>): UseVisualLineNavigationReturn;

// @public (undocumented)
export interface UseVisualLineNavigationReturn {
    // (undocumented)
    findLineElementAtPosition: (pmPos: number) => HTMLElement | null;
    // (undocumented)
    findPositionOnLineAtClientX: (line: HTMLElement, clientX: number) => number | null;
    // (undocumented)
    getCaretClientX: (pmPos: number) => number | null;
    // (undocumented)
    handlePMKeyDown: (view: EditorView, event: KeyboardEvent) => boolean;
    // (undocumented)
    state: ReturnType<typeof createVisualLineState>;
}

// @public (undocumented)
function useZoom(initialZoom?: number): UseZoomReturn;
export { useZoom as useWheelZoom }
export { useZoom }

// @public (undocumented)
export interface UseZoomReturn {
    // (undocumented)
    handleKeyDown: (e: KeyboardEvent) => void;
    // (undocumented)
    handleWheel: (e: WheelEvent) => void;
    // (undocumented)
    installShortcuts: () => void;
    // (undocumented)
    isMaxZoom: ComputedRef<boolean>;
    // (undocumented)
    isMinZoom: ComputedRef<boolean>;
    // (undocumented)
    resetZoom: () => void;
    // (undocumented)
    setZoom: (level: number) => void;
    // (undocumented)
    zoom: Ref<number>;
    // (undocumented)
    ZOOM_PRESETS: number[];
    // (undocumented)
    zoomIn: () => void;
    // (undocumented)
    zoomOut: () => void;
    // (undocumented)
    zoomPercent: ComputedRef<number>;
}

```
