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

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

```ts

import { Command } from 'prosemirror-state';
import { EditorState } from 'prosemirror-state';
import { Mark } from 'prosemirror-model';
import { MarkType } from 'prosemirror-model';
import { Node as Node_2 } from 'prosemirror-model';
import { Plugin as Plugin_2 } from 'prosemirror-state';
import { PluginKey } from 'prosemirror-state';
import * as prosemirror_model from 'prosemirror-model';
import { TextSelection } from 'prosemirror-state';
import { Transaction } from 'prosemirror-state';

// @public (undocumented)
export function addColumnLeft(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function addColumnRight(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public
export function addRepeatingSectionItemTr(state: EditorState, itemPos: number): Transaction;

// @public (undocumented)
export function addRowAbove(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function addRowBelow(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function addTabStop(position: number, alignment?: TabStopAlignment, leader?: TabLeader): Command;

// @public (undocumented)
export const alignCenter: Command;

// @public (undocumented)
export const alignJustify: Command;

// @public (undocumented)
export const alignLeft: Command;

// @public (undocumented)
export const alignRight: Command;

// @public (undocumented)
export function applyStyle(styleId: string, resolvedAttrs?: ResolvedStyleAttrs): Command;

// @public (undocumented)
export function applyTableStyle(styleData: {
    styleId: string;
    tableBorders?: Record<string, unknown>;
    conditionals?: Record<string, unknown>;
    look?: Record<string, boolean>;
}): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function autoFitContents(): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public
export type BorderPreset = 'all' | 'outside' | 'inside' | 'none';

// @public (undocumented)
export const clearFontFamily: Command;

// @public (undocumented)
export const clearFontSize: Command;

// @public
export const clearFormatting: Command;

// @public (undocumented)
export const clearHighlight: Command;

// @public (undocumented)
export const clearStyle: Command;

// @public (undocumented)
export const clearTextColor: Command;

// @public
export function createDocumentStylesPlugin(styles: StyleDefinitions | StyleResolver | null | undefined): Plugin_2;

// @public
export function createEmptyDoc(): Node_2;

// @public
export function createSelectionTrackerPlugin(onSelectionChange?: SelectionChangeCallback): Plugin_2;

// @public
export function createStyleResolver(styleDefinitions: StyleDefinitions | undefined): StyleResolver;

// @public (undocumented)
export function decreaseIndent(amount?: number): Command;

// @public (undocumented)
export const decreaseListLevel: Command;

// @public (undocumented)
export function deleteColumn(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function deleteRow(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function deleteTable(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function distributeColumns(): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public
export const documentStylesKey: PluginKey<StyleResolver | null>;

// @public
export function ensureParaIdsInState(state: EditorState): EditorState;

// @public
export function extractSelectionContext(state: EditorState): SelectionContext;

// @public
export function extractSelectionState(state: EditorState): SelectionState | null;

// @public
export function findContentControlPos(doc: Node_2, filter: ContentControlFilter): number | null;

// @public
export function findContentControlsInPM(doc: Node_2, filter?: ContentControlFilter): PMContentControl[];

// @public
export function findHyperlinkRangeAt(state: EditorState, fallbackHref?: string): {
    mark: Mark;
    start: number;
    end: number;
} | null;

// @public
export function findParagraphByParaId(doc: Node_2, paraId: string): {
    node: Node_2;
    from: number;
    to: number;
} | null;

// @public
export function findStartPosForParaId(doc: Node_2, paraId: string): number | null;

// @public
export interface FontFamilyAttrs {
    // (undocumented)
    ascii?: string;
    // (undocumented)
    asciiTheme?: string;
    // (undocumented)
    cs?: string;
    // (undocumented)
    csTheme?: string;
    // (undocumented)
    eastAsia?: string;
    // (undocumented)
    eastAsiaTheme?: string;
    // (undocumented)
    hAnsi?: string;
    // (undocumented)
    hAnsiTheme?: string;
}

// @public
export interface FontSizeAttrs {
    // (undocumented)
    size: number;
}

// @public
export function footnoteToProseDoc(content: BlockContent[], options?: ToProseDocOptions & {
    theme?: Theme | null;
}): Node_2;

// @public
export function fromProseDoc(pmDoc: Node_2, baseDocument?: Document_2): Document_2;

// @public (undocumented)
export const generateTOC: Command;

// @public
export function getDocumentStyleResolver(state: EditorState): StyleResolver | null;

// @public (undocumented)
export function getHyperlinkAttrs(state: EditorState): {
    href: string;
    tooltip?: string;
} | null;

// @public (undocumented)
export function getListInfo(state: EditorState): {
    numId: number;
    ilvl: number;
} | null;

// @public
export function getMarkAttr(state: EditorState, markType: MarkType, attr: string): unknown | null;

// @public (undocumented)
export function getParagraphAlignment(state: EditorState): ParagraphAlignment | null;

// @public (undocumented)
export function getParagraphBidi(state: EditorState): boolean;

// @public (undocumented)
export function getSelectedText(state: EditorState): string;

// @public
export function getSelectionContext(state: EditorState): SelectionContext | null;

// @public (undocumented)
export function getStyleId(state: EditorState): string | null;

// @public (undocumented)
export function getTableContext(state: EditorState): TableContextInfo;

// @public
export function headerFooterToProseDoc(content: BlockContent[], options?: ToProseDocOptions & {
    theme?: Theme | null;
}): Node_2;

// @public
export interface HyperlinkAttrs {
    // (undocumented)
    href: string;
    // (undocumented)
    rId?: string;
    // (undocumented)
    tooltip?: string;
}

// @public
export interface ImageAttrs {
    allowOverlap?: boolean;
    // (undocumented)
    alt?: string;
    borderColor?: string;
    borderStyle?: string;
    borderWidth?: number;
    // (undocumented)
    cropBottom?: number;
    // (undocumented)
    cropLeft?: number;
    // (undocumented)
    cropRight?: number;
    cropTop?: number;
    cssFloat?: 'left' | 'right' | 'none';
    displayMode?: 'inline' | 'float' | 'block';
    distBottom?: number;
    distLeft?: number;
    distRight?: number;
    distTop?: number;
    // (undocumented)
    effectExtentBottom?: number;
    // (undocumented)
    effectExtentLeft?: number;
    // (undocumented)
    effectExtentRight?: number;
    effectExtentTop?: number;
    height?: number;
    hlinkHref?: string;
    layoutInCell?: boolean;
    opacity?: number;
    position?: ImagePositionAttrs;
    // (undocumented)
    rId?: string;
    // (undocumented)
    src: string;
    // (undocumented)
    title?: string;
    transform?: string;
    width?: number;
    wrapText?: string;
    wrapType?: WrapType;
}

// @public (undocumented)
export function increaseIndent(amount?: number): Command;

// @public (undocumented)
export const increaseListLevel: Command;

// @public (undocumented)
export function insertHyperlink(text: string, href: string, tooltip?: string): Command;

// @public
export const insertPageBreak: Command;

// @public (undocumented)
export function insertTable(rows: number, cols: number): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function isHyperlinkActive(state: EditorState): boolean;

// @public (undocumented)
export function isInList(state: EditorState): boolean;

// @public (undocumented)
export function isInTable(state: EditorState): boolean;

// @public
export function isMarkActive(state: EditorState, markType: MarkType, attrs?: Record<string, unknown>): boolean;

// @public
export class LayoutSelectionGate {
    getDebugInfo(): {
        stateSeq: number;
        renderSeq: number;
        layoutUpdating: boolean;
        hasPendingRender: boolean;
        isSafe: boolean;
    };
    getRenderSeq(): number;
    getStateSeq(): number;
    incrementStateSeq(): number;
    isSafeToRender(): boolean;
    onLayoutComplete(seq: number): void;
    onLayoutStart(): void;
    onRender(callback: RenderCallback): () => void;
    requestRender(): void;
    reset(): void;
    setStateSeq(seq: number): void;
}

// @public (undocumented)
export function mergeCells(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public
export interface ParagraphAttrs {
    // (undocumented)
    alignment?: ParagraphAlignment;
    // (undocumented)
    bidi?: boolean;
    // (undocumented)
    bookmarks?: Array<{
        id: number;
        name: string;
    }>;
    // (undocumented)
    borders?: {
        top?: BorderSpec;
        bottom?: BorderSpec;
        left?: BorderSpec;
        right?: BorderSpec;
        between?: BorderSpec;
        bar?: BorderSpec;
    };
    contextualSpacing?: boolean;
    // (undocumented)
    defaultTextFormatting?: TextFormatting;
    // (undocumented)
    hangingIndent?: boolean;
    // (undocumented)
    indentFirstLine?: number;
    // (undocumented)
    indentLeft?: number;
    // (undocumented)
    indentRight?: number;
    // (undocumented)
    keepLines?: boolean;
    // (undocumented)
    keepNext?: boolean;
    // (undocumented)
    lineSpacing?: number;
    // (undocumented)
    lineSpacingRule?: LineSpacingRule;
    listAbstractNumId?: number;
    listIsBullet?: boolean;
    listLevelNumFmts?: NumberFormat[];
    listMarker?: string;
    listMarkerFontFamily?: string;
    listMarkerFontSize?: number;
    listMarkerHidden?: boolean;
    listMarkerSuffix?: 'tab' | 'space' | 'nothing';
    listNumFmt?: NumberFormat;
    listStartOverride?: number;
    // (undocumented)
    numPr?: {
        numId?: number;
        ilvl?: number;
    };
    numPrFromStyle?: {
        numId?: number;
        ilvl?: number;
    };
    _originalFormatting?: ParagraphFormatting;
    // (undocumented)
    outlineLevel?: number;
    // (undocumented)
    pageBreakBefore?: boolean;
    // (undocumented)
    paraId?: string;
    pPrChange?: ParagraphPropertyChange[] | null;
    pPrDel?: RevisionInfo | null;
    pPrIns?: RevisionInfo | null;
    renderedPageBreakBefore?: boolean;
    // (undocumented)
    sectionBreakType?: 'nextPage' | 'continuous' | 'oddPage' | 'evenPage';
    _sectionProperties?: SectionProperties;
    // (undocumented)
    shading?: ShadingProperties;
    // (undocumented)
    spaceAfter?: number;
    // (undocumented)
    spaceBefore?: number;
    spacingExplicit?: SpacingExplicit;
    // (undocumented)
    styleId?: string;
    // (undocumented)
    tabs?: TabStop[];
    // (undocumented)
    textId?: string;
}

// @public
export interface PMContentControl {
    // (undocumented)
    alias?: string;
    checked?: boolean;
    dataBinding?: SdtDataBinding;
    dateFormat?: string;
    dateValue?: string;
    depth: number;
    // (undocumented)
    id?: number;
    listItems?: {
        displayText: string;
        value: string;
    }[];
    // (undocumented)
    lock?: SdtProperties['lock'];
    pos: number;
    // (undocumented)
    sdtType: SdtType;
    showingPlaceholder?: boolean;
    // (undocumented)
    tag?: string;
    text: string;
}

// @public
export function removeContentControlTr(state: EditorState, filter: ContentControlFilter, options?: {
    force?: boolean;
    keepContent?: boolean;
}): Transaction;

// @public (undocumented)
export const removeHyperlink: Command;

// @public (undocumented)
export const removeList: Command;

// @public
export function removeRepeatingSectionItemTr(state: EditorState, itemPos: number): Transaction;

// @public (undocumented)
export function removeTableBorders(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function removeTabStop(position: number): Command;

// @public
export interface ResolvedParagraphStyle {
    paragraphFormatting?: ParagraphFormatting;
    runFormatting?: TextFormatting;
}

// @public (undocumented)
export const schema: prosemirror_model.Schema<any, any>;

// @public (undocumented)
export function selectColumn(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public
export type SelectionChangeCallback = (context: SelectionContext) => void;

// @public
export interface SelectionContext {
    activeCommentIds: number[];
    endParagraphIndex: number;
    hasSelection: boolean;
    inDeletion: boolean;
    inInsertion: boolean;
    inList: boolean;
    isMultiParagraph: boolean;
    listLevel?: number;
    listType?: 'bullet' | 'numbered';
    paragraphFormatting: ParagraphFormatting;
    startParagraphIndex: number;
    textFormatting: TextFormatting;
}

// @public
export interface SelectionState {
    endParagraphIndex: number;
    hasSelection: boolean;
    isMultiParagraph: boolean;
    paragraphFormatting: ParagraphFormatting;
    startParagraphIndex: number;
    styleId: string | null;
    textFormatting: TextFormatting;
}

// @public
export const selectionTrackerKey: PluginKey<SelectionContext>;

// @public (undocumented)
export function selectRow(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public (undocumented)
export function selectTable(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public
export function setAlignment(alignment: ParagraphAlignment): Command;

// @public (undocumented)
export function setAllTableBorders(state: EditorState, dispatch?: (tr: Transaction) => void, borderSpec?: {
    style: string;
    size: number;
    color: {
        rgb: string;
    };
}): boolean;

// @public (undocumented)
export function setCellBorder(side: 'top' | 'bottom' | 'left' | 'right' | 'all', spec: {
    style: string;
    size?: number;
    color?: {
        rgb: string;
    };
} | null, clearOthers?: boolean): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setCellFillColor(color: string | null): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setCellMargins(margins: {
    top?: number;
    bottom?: number;
    left?: number;
    right?: number;
}): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setCellTextDirection(direction: string | null): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setCellVerticalAlign(align: 'top' | 'center' | 'bottom'): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public
export function setContentControlContentTr(state: EditorState, filter: ContentControlFilter, text: string, options?: {
    force?: boolean;
}): Transaction;

// @public
export function setContentControlValueAtPosTr(state: EditorState, pos: number, value: ContentControlValue, options?: {
    force?: boolean;
}): Transaction;

// @public
export function setContentControlValueTr(state: EditorState, filter: ContentControlFilter, value: ContentControlValue, options?: {
    force?: boolean;
}): Transaction;

// @public (undocumented)
export function setFontFamily(fontName: string): Command;

// @public (undocumented)
export function setFontSize(size: number): Command;

// @public (undocumented)
export function setHighlight(color: string): Command;

// @public (undocumented)
export function setHyperlink(href: string, tooltip?: string): Command;

// @public (undocumented)
export function setIndentFirstLine(twips: number, hanging?: boolean): Command;

// @public (undocumented)
export function setIndentLeft(twips: number): Command;

// @public (undocumented)
export function setIndentRight(twips: number): Command;

// @public (undocumented)
export function setInsideTableBorders(state: EditorState, dispatch?: (tr: Transaction) => void, borderSpec?: {
    style: string;
    size: number;
    color: {
        rgb: string;
    };
}): boolean;

// @public (undocumented)
export function setLineSpacing(value: number, rule?: LineSpacingRule): Command;

// @public (undocumented)
export const setLtr: Command;

// @public (undocumented)
export function setOutsideTableBorders(state: EditorState, dispatch?: (tr: Transaction) => void, borderSpec?: {
    style: string;
    size: number;
    color: {
        rgb: string;
    };
}): boolean;

// @public (undocumented)
export function setRowHeight(height: number | null, rule?: 'auto' | 'atLeast' | 'exact'): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export const setRtl: Command;

// @public (undocumented)
export function setTableBorderColor(color: string): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setTableBorders(preset: BorderPreset, borderSpec?: {
    style: string;
    size: number;
    color: {
        rgb: string;
    };
}): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setTableBorderWidth(size: number): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setTableProperties(props: {
    width?: number | null;
    widthType?: string | null;
    justification?: 'left' | 'center' | 'right' | null;
}): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export function setTextColor(attrs: TextColorAttrs): Command;

// @public (undocumented)
export function splitCell(state: EditorState, dispatch?: (tr: Transaction) => void): boolean;

// @public
export class StyleResolver {
    constructor(styleDefinitions: StyleDefinitions | undefined);
    getDefaultCharacterStyle(): Style | undefined;
    getDefaultParagraphStyle(): Style | undefined;
    getDefaultTableStyle(): Style | undefined;
    getDocDefaults(): DocDefaults | undefined;
    getNextStyleId(styleId: string | undefined | null): string | null;
    getParagraphStyles(): Style[];
    getRunStyleOwnProperties(styleId: string | undefined | null): TextFormatting | undefined;
    getStyle(styleId: string): Style | undefined;
    getTableStyles(): Style[];
    hasParagraphStyle(styleId: string): boolean;
    hasStyle(styleId: string): boolean;
    resolveParagraphStyle(styleId: string | undefined | null): ResolvedParagraphStyle;
    resolveRunStyle(styleId: string | undefined | null): TextFormatting | undefined;
}

// @public
export interface TableContextInfo {
    // (undocumented)
    canSplitCell?: boolean;
    cellBackgroundColor?: string;
    cellBorderColor?: ColorValue;
    // (undocumented)
    columnCount?: number;
    // (undocumented)
    columnIndex?: number;
    // (undocumented)
    hasMultiCellSelection?: boolean;
    // (undocumented)
    isInTable: boolean;
    // (undocumented)
    rowCount?: number;
    // (undocumented)
    rowIndex?: number;
    // (undocumented)
    table?: Node_2;
    // (undocumented)
    tablePos?: number;
}

// @public
export interface TextColorAttrs {
    // (undocumented)
    rgb?: string;
    // (undocumented)
    themeColor?: ThemeColorSlot;
    // (undocumented)
    themeShade?: string;
    // (undocumented)
    themeTint?: string;
}

export { TextSelection }

// @public (undocumented)
export const toggleBold: Command;

// @public (undocumented)
export const toggleBulletList: Command;

// @public (undocumented)
export function toggleHeaderRow(): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export const toggleItalic: Command;

// @public (undocumented)
export function toggleNoWrap(): (state: EditorState, dispatch?: (tr: Transaction) => void) => boolean;

// @public (undocumented)
export const toggleNumberedList: Command;

// @public (undocumented)
export const toggleStrike: Command;

// @public (undocumented)
export const toggleSubscript: Command;

// @public (undocumented)
export const toggleSuperscript: Command;

// @public (undocumented)
export const toggleUnderline: Command;

// @public
export function toProseDoc(document: Document_2, options?: ToProseDocOptions): Node_2;

// @public
export interface ToProseDocOptions {
    defaultTabStopTwips?: number | null;
    styles?: StyleDefinitions;
}

// @public
export interface UnderlineAttrs {
    // (undocumented)
    color?: TextColorAttrs;
    // (undocumented)
    style?: UnderlineStyle;
}

// @public
export function updateDocumentContent(originalDocument: Document_2, pmDoc: Node_2): Document_2;

```
