import { ElementNode } from './element';
import { TextStyle, ParagraphStyle } from './style';
/**
 * 文本块快照类型
 */
export type TextRunSnapshot = {
    id: string;
    type: 'text';
    text: string;
    rPr?: TextStyle;
    rawProperties?: ElementNode;
    extra?: any;
    widgetMeta?: any;
    fieldMeta?: any;
    valuePath?: string;
};
/**
 * 图片块快照类型
 */
export type ImageRunSnapshot = {
    id: string;
    type: 'image';
    image: {
        embedId?: string;
        descr?: string;
        name?: string;
        width?: number;
        height?: number;
        rawProperties?: ElementNode;
    };
    rawProperties?: ElementNode;
    extra?: any;
    widgetMeta?: any;
};
/**
 * Run 快照联合类型（文本块或图片块）
 */
export type RunSnapshot = TextRunSnapshot | ImageRunSnapshot;
/**
 * 段落快照类型
 */
export type ParagraphSnapshot = {
    id: string;
    type: 'paragraph';
    attrs?: any;
    styleId?: string;
    pPr?: ParagraphStyle;
    rawProperties?: ElementNode;
    runs: RunSnapshot[];
};
/**
 * 表格单元格快照类型
 */
export type TableCellSnapshot = {
    id: string;
    type: 'tableCell';
    content: ParagraphSnapshot[];
    attrs?: any;
    gridSpan?: number;
    vMerge?: 'restart' | 'continue';
    colspan?: number;
    rowspan?: number;
    mergeFromId?: string;
    mergeId?: string;
    repeatingId?: string;
    _2DTableId?: string;
    boundedId?: string;
    boundedItemId?: string;
    checkTableId?: string;
    dataGroup2DId?: string;
    rawProperties?: any;
};
/**
 * 表格行快照类型
 */
export type TableRowSnapshot = {
    id: string;
    type: 'tableRow';
    cells: TableCellSnapshot[];
    attrs?: any;
    rowHeight?: number;
    rowHeightRule?: string;
    rawProperties?: any;
};
/**
 * 表格快照类型
 */
export type TableSnapshot = {
    id: string;
    type: 'table';
    rows: TableRowSnapshot[];
    colWidths?: number[];
    attrs?: any;
    tableProperties?: any;
    rawProperties?: any;
};
/**
 * 分节快照类型
 */
export type SectionSnapshot = {
    id: string;
    type: 'section';
    attrs?: any;
    pageSize?: {
        width?: number;
        height?: number;
    };
    margins?: {
        top?: number;
        bottom?: number;
        left?: number;
        right?: number;
        header?: number;
        footer?: number;
        gutter?: number;
    };
    columns?: {
        num?: number;
        space?: number;
    };
    docGrid?: {
        type?: string;
        linePitch?: number;
    };
    rawProperties?: ElementNode;
};
/**
 * 文档主体快照类型
 */
export type BodySnapshot = {
    id: string;
    type: 'body';
    children: Array<ParagraphSnapshot | TableSnapshot | SectionSnapshot>;
};
/**
 * 文档快照类型
 */
export type DocumentSnapshot = {
    id: string;
    type: 'document';
    attrs?: any;
    modelMeta?: any;
    body: BodySnapshot;
};
