## 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 { Node as Node_2 } from 'prosemirror-model';

// @public
export function applySdtFocus(container: HTMLElement, focusedIds: Set<string>): void;

// @public
export type BlockLookup = Map<string, BlockLookupEntry>;

// @public
export interface BlockLookupEntry {
    // (undocumented)
    block: FlowBlock;
    // (undocumented)
    measure: Measure;
    // (undocumented)
    version?: string;
}

// @public
export function buildBlockLookup(blocks: FlowBlock[], measures: Measure[]): BlockLookup;

// @public
export function captureInlinePositionEmu(imageEl: HTMLElement, zoom?: number): {
    horizontalEmu: number;
    verticalEmu: number;
} | undefined;

// @public
export function createPainter(options?: PainterOptions): LayoutPainter;

// @public
export function deriveLayoutChoice(wrapType: WrapType, cssFloat?: ImageAttrs['cssFloat'] | null): ImageLayoutTarget | null;

// @public
export function enclosingSdtGroupIds(doc: Node_2, from: number, to: number): Set<string>;

// @public
export function findImageElement(target: EventTarget | null): HTMLElement | null;

// @public
export interface FootnoteRenderItem {
    content?: FootnoteContent;
    displayNumber: string;
    text: string;
}

// @public
export const FRAGMENT_CLASS_NAMES: {
    fragment: string;
    paragraph: string;
    table: string;
    image: string;
    line: string;
    run: string;
};

// @public
export interface HeaderFooterContent {
    blocks: FlowBlock[];
    flowHeight?: number;
    height: number;
    measures: Measure[];
    visualBottom?: number;
    visualTop?: number;
}

// @public
export function hitTestImage(target: EventTarget | null): ImageHitTestResult | null;

// @public
export const IMAGE_CLASS_NAMES: {
    image: string;
    imageAnchored: string;
};

// @public
export const IMAGE_LAYOUT_OPTIONS: readonly ImageLayoutOptionDef[];

// @public (undocumented)
export interface ImageHitTestResult {
    imageEl: HTMLElement;
    pos: number;
}

// @public
export type ImageLayoutIconHint = 'inline' | 'squareLeft' | 'squareRight' | 'behind' | 'inFront';

// @public (undocumented)
export interface ImageLayoutOptionDef {
    choice: ImageLayoutTarget;
    i18nDescKey: string;
    i18nLabelKey: string;
    iconHint: ImageLayoutIconHint;
}

// @public
export function isFloatingImageRun(run: ImageRun): boolean;

// @public
export function isImageLayoutOptionEnabled(_option: ImageLayoutOptionDef, _currentWrapType: WrapType): boolean;

// @public
export function isTextWrappingFloatingImageRun(run: ImageRun): boolean;

// @public
export const LAYOUT_IMAGE_CLASSES: {
    readonly runImage: "layout-run-image";
    readonly blockImage: "layout-block-image";
    readonly pageFloatingImage: "layout-page-floating-image";
    readonly cellFloatingImage: "layout-cell-floating-image";
    readonly pageContent: "layout-page-content";
    readonly paragraph: "layout-paragraph";
};

// @public
export class LayoutPainter {
    constructor(options?: PainterOptions);
    getPageCount(): number;
    getPageElement(index: number): HTMLElement | null;
    mount(container: HTMLElement): void;
    paint(layout: Layout): void;
    // (undocumented)
    resolvedCommentIds: Set<number>;
    scrollToPage(pageNumber: number): void;
    setBlockLookup(lookup: BlockLookup): void;
    unmount(): void;
}

// @public
export interface PageGeometry {
    // (undocumented)
    contentHeight: number;
    // (undocumented)
    contentWidth: number;
    // (undocumented)
    marginLeft: number;
    // (undocumented)
    marginTop: number;
    // (undocumented)
    pageHeight: number;
    // (undocumented)
    pageWidth: number;
}

// @public (undocumented)
export function pageGeometryFromPage(page: Pick<Page, 'size' | 'margins'>): PageGeometry;

// @public
export interface PainterOptions {
    containerBackground?: string;
    document?: Document;
    pageBackground?: string;
    pageGap?: number;
    showShadow?: boolean;
}

// @public
export function renderAllPagesNow(container: HTMLElement): number;

// @public
export interface RenderContext {
    contentWidth?: number;
    insideTableCell?: boolean;
    pageNumber: number;
    positioning?: 'absolute' | 'flow';
    resolvedCommentIds?: Set<number>;
    section: 'body' | 'header' | 'footer';
    totalPages: number;
}

// @public
export function renderFragment(fragment: Fragment, context: RenderContext, options?: RenderFragmentOptions): HTMLElement;

// @public
export function renderImageFragment(fragment: ImageFragment, block: ImageBlock, _measure: ImageMeasure, _context: RenderContext, options?: RenderImageFragmentOptions): HTMLElement;

// @public
export function renderLine(block: ParagraphBlock, line: MeasuredLine, alignment: 'left' | 'center' | 'right' | 'justify' | undefined, doc: Document, options?: RenderLineOptions): HTMLElement;

// @public
export function renderPage(page: Page, context: RenderContext, options?: RenderPageOptions): HTMLElement;

// @public
export interface RenderPageOptions {
    backgroundColor?: string;
    blockLookup?: BlockLookup;
    document?: Document;
    firstPageFooterContent?: HeaderFooterContent;
    firstPageHeaderContent?: HeaderFooterContent;
    footerContent?: HeaderFooterContent;
    footerDistance?: number;
    footnoteArea?: FootnoteRenderItem[];
    headerContent?: HeaderFooterContent;
    headerDistance?: number;
    pageBorders?: {
        top?: BorderSpec;
        bottom?: BorderSpec;
        left?: BorderSpec;
        right?: BorderSpec;
        display?: 'allPages' | 'firstPage' | 'notFirstPage';
        offsetFrom?: 'page' | 'text';
        zOrder?: 'front' | 'back';
    };
    pageClassName?: string;
    resolvedCommentIds?: Set<number>;
    showBorders?: boolean;
    showShadow?: boolean;
    theme?: Theme | null;
    titlePg?: boolean;
    watermark?: Watermark;
}

// @public
export function renderPages(pages: Page[], container: HTMLElement, options?: RenderPageOptions & {
    pageGap?: number;
    footnotesByPage?: Map<number, FootnoteRenderItem[]>;
}): RenderPagesUpdateKind;

// @public
export type RenderPagesUpdateKind = 'incremental' | 'full';

// @public
export function renderParagraphFragment(fragment: ParagraphFragment, block: ParagraphBlock, measure: ParagraphMeasure, context: RenderContext, options?: RenderParagraphOptions): HTMLElement;

// @public
export function renderTableFragment(fragment: TableFragment, block: TableBlock, measure: TableMeasure, context: RenderContext, options?: RenderTableFragmentOptions): HTMLElement;

// @public
export function renderTextBoxFragment(fragment: TextBoxFragment, block: TextBoxBlock, measure: TextBoxMeasure, context: RenderContext, options?: RenderTextBoxFragmentOptions): HTMLElement;

// @public (undocumented)
export function resolveAnchoredObjectPosition(object: AnchoredObjectPositionInput, fragmentY: number, contentWidth: number, geometry?: PageGeometry): AnchoredObjectPosition;

// @public
export function resolveAnchoredObjectVerticalTop(object: AnchoredObjectPositionInput, fragmentY: number, geometry?: PageGeometry): number;

// @public
export function sliceRunsForLine(block: ParagraphBlock, line: MeasuredLine): Run[];

// @public
export const TABLE_CLASS_NAMES: {
    table: string;
    row: string;
    cell: string;
    cellContent: string;
    resizeHandle: string;
    rowResizeHandle: string;
    tableEdgeHandleBottom: string;
    tableEdgeHandleRight: string;
};

// @public
export const TEXTBOX_CLASS_NAMES: {
    textBox: string;
};

// @public
export function toolbarValueToLayoutTarget(value: string): ImageLayoutTarget | undefined;

```
