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

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

```ts

import { Comment as Comment_2 } from '@eigenpal/docx-editor-core/types/content';
import { ContentControlFilter } from '@eigenpal/docx-editor-core/agent';
import { ContentControlValue } from '@eigenpal/docx-editor-core/agent';
import { createDocumentWithText } from '@eigenpal/docx-editor-core';
import { createEmptyDocument } from '@eigenpal/docx-editor-core';
import { CreateEmptyDocumentOptions } from '@eigenpal/docx-editor-core';
import { CSSProperties } from 'react';
import { Document as Document_2 } from '@eigenpal/docx-editor-core/types/document';
import { DocumentAgent } from '@eigenpal/docx-editor-core/agent';
import { DocxInput } from '@eigenpal/docx-editor-core/utils';
import { EditorHandle } from '@eigenpal/docx-editor-core';
import { EditorState } from 'prosemirror-state';
import { EditorView } from 'prosemirror-view';
import { FontDefinition } from '@eigenpal/docx-editor-core/utils';
import { FontOption } from '@eigenpal/docx-editor-core/utils/fontOptions';
import { HeaderFooter } from '@eigenpal/docx-editor-core/types/document';
import { Layout } from '@eigenpal/docx-editor-core/layout-engine';
import { PMContentControl } from '@eigenpal/docx-editor-core/prosemirror';
import * as prosemirror_state from 'prosemirror-state';
import * as prosemirror_view from 'prosemirror-view';
import * as React_2 from 'react';
import { ReactNode } from 'react';
import { RenderedDomContext } from '@eigenpal/docx-editor-core/plugin-api';
import { SelectionState } from '@eigenpal/docx-editor-core/prosemirror';
import { SidebarItem } from '@eigenpal/docx-editor-core/plugin-api';
import { TFunction } from '@eigenpal/docx-editor-i18n';
import { Theme } from '@eigenpal/docx-editor-core/types/document';
import { Transaction } from 'prosemirror-state';
import { Translations } from '@eigenpal/docx-editor-i18n';

export { createDocumentWithText }

export { createEmptyDocument }

export { CreateEmptyDocumentOptions }

// @public
export const DocxEditor: React_2.ForwardRefExoticComponent<DocxEditorProps & React_2.RefAttributes<DocxEditorRef>>;

// @public
export interface DocxEditorHandle extends EditorHandle {
    scrollToParaId: (paraId: string) => boolean;
    scrollToPosition: (pmPos: number) => void;
    setZoom: (zoom: number) => void;
}

// @public
export interface DocxEditorProps {
    agentPanel?: AgentPanelOptions;
    author?: string;
    className?: string;
    colorMode?: 'light' | 'dark' | 'system';
    comments?: Comment_2[];
    disableFindReplaceShortcuts?: boolean;
    document?: Document_2 | null;
    documentBuffer?: DocxInput | null;
    documentName?: string;
    documentNameEditable?: boolean;
    externalContent?: boolean;
    externalPlugins?: prosemirror_state.Plugin[];
    fontFamilies?: ReadonlyArray<string | FontOption>;
    fonts?: ReadonlyArray<FontDefinition>;
    i18n?: Translations;
    initialZoom?: number;
    loadingIndicator?: ReactNode;
    marginGuideColor?: string;
    mode?: EditorMode;
    onChange?: (document: Document_2) => void;
    onCommentAdd?: (comment: Comment_2) => void;
    onCommentDelete?: (comment: Comment_2) => void;
    onCommentReply?: (reply: Comment_2, parent: Comment_2) => void;
    onCommentResolve?: (comment: Comment_2) => void;
    onCommentsChange?: (comments: Comment_2[]) => void;
    onCopy?: () => void;
    onCut?: () => void;
    onDocumentNameChange?: (name: string) => void;
    onEditorViewReady?: (view: prosemirror_view.EditorView) => void;
    onError?: (error: Error) => void;
    onFontsLoaded?: () => void;
    onModeChange?: (mode: EditorMode) => void;
    onPaste?: () => void;
    onPrint?: () => void;
    onRenderedDomContextReady?: (context: RenderedDomContext) => void;
    onSave?: (buffer: ArrayBuffer) => void;
    onSelectionChange?: (state: SelectionState | null) => void;
    placeholder?: ReactNode;
    pluginOverlays?: ReactNode;
    pluginRenderedDomContext?: RenderedDomContext | null;
    pluginSidebarItems?: ReactSidebarItem[];
    printOptions?: PrintOptions;
    readOnly?: boolean;
    renderLogo?: () => ReactNode;
    renderTitleBarRight?: () => ReactNode;
    rulerUnit?: 'inch' | 'cm';
    showMarginGuides?: boolean;
    showOutline?: boolean;
    showOutlineButton?: boolean;
    showRuler?: boolean;
    showToolbar?: boolean;
    showZoomControl?: boolean;
    style?: CSSProperties;
    theme?: Theme | null;
    toolbarExtra?: ReactNode;
    watermarkPresets?: readonly string[];
}

// @public
export interface DocxEditorRef {
    addComment: (options: {
        paraId: string;
        text: string;
        author: string;
        search?: string;
    }) => number | null;
    applyFormatting: (options: {
        paraId: string;
        search?: string;
        marks: {
            bold?: boolean;
            italic?: boolean;
            underline?: boolean | {
                style?: string;
            };
            strike?: boolean;
            color?: {
                rgb?: string;
                themeColor?: string;
            };
            highlight?: string;
            fontSize?: number;
            fontFamily?: {
                ascii?: string;
                hAnsi?: string;
            };
        };
    }) => boolean;
    findInDocument: (query: string, options?: {
        caseSensitive?: boolean;
        limit?: number;
    }) => Array<{
        paraId: string;
        match: string;
        before: string;
        after: string;
    }>;
    focus: () => void;
    getAgent: () => DocumentAgent | null;
    getComments: () => Comment_2[];
    getContentControls: (filter?: ContentControlFilter) => PMContentControl[];
    getCurrentPage: () => number;
    getDocument: () => Document_2 | null;
    getEditorRef: () => PagedEditorRef | null;
    getPageContent: (pageNumber: number) => {
        pageNumber: number;
        text: string;
        paragraphs: Array<{
            paraId: string;
            text: string;
            styleId?: string;
        }>;
    } | null;
    getSelectionInfo: () => {
        paraId: string | null;
        selectedText: string;
        paragraphText: string;
        before: string;
        after: string;
    } | null;
    getTotalPages: () => number;
    getZoom: () => number;
    highlightRange: (from: number, to: number) => void;
    insertBreak: (options: {
        paraId: string;
        type: 'page' | 'sectionNextPage' | 'sectionContinuous';
    }) => boolean;
    loadDocument: (doc: Document_2) => void;
    loadDocumentBuffer: (buffer: DocxInput) => Promise<void>;
    onContentChange: (listener: (document: Document_2) => void) => () => void;
    onSelectionChange: (listener: (selection: SelectionState | null) => void) => () => void;
    openPrintPreview: () => void;
    print: () => void;
    proposeChange: (options: {
        paraId: string;
        search: string;
        replaceWith: string;
        author: string;
    }) => boolean;
    removeContentControl: (filter: ContentControlFilter, options?: {
        force?: boolean;
        keepContent?: boolean;
    }) => boolean;
    replyToComment: (commentId: number, text: string, author: string) => number | null;
    resolveComment: (commentId: number) => void;
    save: (options?: {
        selective?: boolean;
    }) => Promise<ArrayBuffer | null>;
    scrollToChangeId: (revisionId: number) => boolean;
    scrollToCommentId: (commentId: number) => boolean;
    scrollToContentControl: (filter: ContentControlFilter) => boolean;
    scrollToPage: (pageNumber: number) => void;
    scrollToParaId: (paraId: string) => boolean;
    scrollToPosition: (pmPos: number) => void;
    setContentControlContent: (filter: ContentControlFilter, text: string, options?: {
        force?: boolean;
    }) => boolean;
    setContentControlValue: (filter: ContentControlFilter, value: ContentControlValue, options?: {
        force?: boolean;
    }) => boolean;
    setParagraphStyle: (options: {
        paraId: string;
        styleId: string;
    }) => boolean;
    setZoom: (zoom: number) => void;
}

// @public
export type EditorMode = 'editing' | 'suggesting' | 'viewing';

// @public (undocumented)
export function LocaleProvider(input: LocaleProviderProps): React_2.JSX.Element;

// @public (undocumented)
export interface LocaleProviderProps {
    // (undocumented)
    children: ReactNode;
    // (undocumented)
    i18n?: Translations;
}

// @public
export function renderAsync(input: DocxInput, container: HTMLElement, options?: RenderAsyncOptions): Promise<DocxEditorHandle>;

// @public
export type RenderAsyncOptions = Omit<DocxEditorProps, 'documentBuffer' | 'document'>;

// @public (undocumented)
export function useTranslation(): {
    t: TFunction;
};

// @public
export const VERSION = "0.0.2";

```
