import * as wasm from "./pkg"; import { WidthType } from "."; import { TableRow } from "./table-row"; import { TablePositionProperty } from "./json/bindings/TablePositionProperty"; export { TablePositionProperty } from "./json/bindings/TablePositionProperty"; export type TableAlignmentType = "center" | "left" | "right"; export type TableLayoutType = "fixed" | "autofit"; export declare class TablePosition { property: Partial; leftFromText(n: number): this; rightFromText(n: number): this; verticalAnchor(n: string): this; horizontalAnchor(n: string): this; positionXAlignment(n: string): this; positionYAlignment(n: string): this; positionX(n: number): this; positionY(n: number): this; build(): wasm.TablePositionProperty; } export type TableProperty = { indent?: number; align?: TableAlignmentType; width?: number; styleId?: string; cellMargins: { top: { val: number; type: WidthType; }; left: { val: number; type: WidthType; }; bottom: { val: number; type: WidthType; }; right: { val: number; type: WidthType; }; }; layout?: TableLayoutType; position?: TablePosition; }; export declare const createDefaultTableCellMargins: () => { readonly top: { readonly val: 0; readonly type: "dxa"; }; readonly left: { readonly val: 55; readonly type: "dxa"; }; readonly bottom: { readonly val: 0; readonly type: "dxa"; }; readonly right: { readonly val: 55; readonly type: "dxa"; }; }; export declare class Table { hasNumberings: boolean; rows: TableRow[]; grid: number[]; property: TableProperty; addRow(row: TableRow): this; style(id: string): this; setGrid(grid: number[]): this; indent(v: number): this; align(v: TableAlignmentType): this; layout(l: TableLayoutType): this; width(w: number): this; cellMargins(top: number, right: number, bottom: number, left: number): this; cellMarginTop(v: number, t: WidthType): this; cellMarginLeft(v: number, t: WidthType): this; cellMarginRight(v: number, t: WidthType): this; cellMarginBottom(v: number, t: WidthType): this; position(p: TablePosition): this; build(): wasm.Table; } export declare const convertWidthType: (t: string) => wasm.WidthType.Dxa | wasm.WidthType.Auto | wasm.WidthType.Pct | wasm.WidthType.Nil; export declare const setTableProperty: (target: T, property: TableProperty) => T;