/** EMU = English Metric Units. Drawing coordinates are stored in EMU on the wire. */ export interface Point2D { /** Horizontal offset in EMU. */ x: number; /** Vertical offset in EMU. */ y: number; } export interface PositiveSize2D { cx: number; cy: number; } /** * `from` / `to` corners reference a cell by 0-based column + row index plus an * EMU offset within the cell. Excel's wire format is 0-based here even though * cell references in formulas / sheetData are 1-based. */ export interface AnchorMarker { col: number; colOff: number; row: number; rowOff: number; } export type DrawingAnchor = { kind: 'absolute'; pos: Point2D; ext: PositiveSize2D; } | { kind: 'oneCell'; from: AnchorMarker; ext: PositiveSize2D; } | { kind: 'twoCell'; from: AnchorMarker; to: AnchorMarker; editAs?: 'twoCell' | 'oneCell' | 'absolute'; }; /** * Convert a cell ref ("A1", "C5") to a 0-based AnchorMarker with `colOff = * rowOff = 0`. Throws on malformed refs. */ export declare function anchorMarkerFromCellRef(ref: string): AnchorMarker; /** Build an absolute anchor from an (x, y, cx, cy) EMU bundle. */ export declare function makeAbsoluteAnchor(opts: { x: number; y: number; cx: number; cy: number; }): DrawingAnchor; /** Build a one-cell anchor pinned at `from` with an explicit pixel extent. */ export declare function makeOneCellAnchor(opts: { from: string | AnchorMarker; widthPx: number; heightPx: number; }): DrawingAnchor; /** * Build a two-cell anchor from cell-ref pairs (or pre-built markers). Defaults * to `editAs='twoCell'` — drag both corners with the cells. */ export declare function makeTwoCellAnchor(opts: { from: string | AnchorMarker; to: string | AnchorMarker; editAs?: 'twoCell' | 'oneCell' | 'absolute'; }): DrawingAnchor;