import { PoNode } from '../../po-helpers.js'; /** §21.4.2.27 `dgm:pt@type` — what a point is in the model. */ export type PointType = 'doc' | 'node' | 'asst' | 'parTrans' | 'sibTrans' | 'pres'; /** One point of the data model. */ export interface DiagramPoint { readonly id: string; readonly type: PointType; /** `dgm:t` — the point's text, as the `a:txBody` every other reader takes. */ readonly text?: PoNode; /** `dgm:spPr` — the formatting the user overrode on this node. */ readonly spPr?: PoNode; /** `dgm:prSet` — presentation properties (placeholder text, custom sizes). */ readonly prSet?: PoNode; } /** * The data part as the layout engine asks about it: the point tree recovered * from the connection list, plus the transition points that go with each edge. */ export declare class DiagramData { private readonly byId; private readonly kids; /** The document point every layout starts from. */ readonly root: DiagramPoint | undefined; /** §21.4.2.4 `dgm:bg` — the fill painted behind the whole diagram. */ readonly background: PoNode | undefined; constructor(tree: ReadonlyArray); /** The point with this id, if the model holds one. */ point(id: string): DiagramPoint | undefined; /** * The children of a point, in the order the connections give them. * * @param id The parent's model id. * @param ptType Which kind of child to return — `node` skips the * transitions, `sibTrans` returns them instead. */ children(id: string, ptType?: 'node' | 'sibTrans' | 'parTrans'): Array; /** * How many generations of `node` points the model holds below its root. * * §21.4.3.3 — a layout branches on this (`func="maxDepth" op="gte" val="2"`): * the same part lays a chevron out as one box when the nodes have no * children and as a labelled box over a body when they do. */ get depth(): number; /** The plain text of a point's `dgm:t`, paragraphs joined by newlines. */ static textOf(pt: DiagramPoint | undefined): string; }