import { PoNode } from '../../po-helpers.js'; /** The parts a diagram is run from, as the reader resolved them. */ export interface DiagramParts { readonly data: Uint8Array; readonly layout?: Uint8Array | undefined; readonly colors?: Uint8Array | undefined; } /** * The picture a drawing part caches, when it caches one at all. * * A generator may write the drawing part and put nothing in it — the group * properties and no `dsp:sp` at all. That is a placeholder the generator never * got round to filling, not a diagram drawn as empty, and taking it at its word * paints a blank frame over a diagram whose data, layout and colours are all * present. So an empty tree reads as no tree, and the caller runs the layout * exactly as it does for a file that ships no drawing part in the first place. * * @param drawing The drawing part's bytes. * @param parse The reader's XML parser. * @returns The cached `dsp:spTree`, or undefined when there is none to use. */ export declare function cachedDiagramTree(drawing: Uint8Array, parse: (bytes: Uint8Array) => Array): PoNode | undefined; /** * The `dsp:spTree` a diagram's own parts describe, for a file that ships no * cached drawing. * * @param parts The diagram's data, layout and colours parts. * @param frame The extent the drawing gives the diagram, in EMU. * @param parse The reader's XML parser (the same tree shape either way). * @returns The shape tree, or undefined when there is no layout part or the * layout uses an algorithm this engine does not run — the caller then * reports the diagram as a loss exactly as before. */ export declare function laidOutDiagramTree(parts: DiagramParts, frame: { readonly cx: number; readonly cy: number; }, parse: (bytes: Uint8Array) => Array): PoNode | undefined;