import { RunProperties } from '../core/document-model/index.js'; import { ColorResolver } from '../core/drawingml/colors.js'; import { ThemeFonts } from '../core/drawingml/theme-parser.js'; import { PoNode } from '../core/po-helpers.js'; /** * §19.3.1.36 `p:ph` — a shape's placeholder reference. `type`/`idx` tie a slide * shape to the matching prototype in its layout and master. */ export interface PlaceholderRef { /** The placeholder type, e.g. `'title'`, `'ctrTitle'`, `'subTitle'`, `'body'`, `'obj'`. */ readonly type?: string; readonly idx?: string; } /** An `a:xfrm` box in EMU (`off` + `ext`). */ export interface ShapeBoxEmu { readonly x: number; readonly y: number; readonly cx: number; readonly cy: number; } /** * `p:nvPr/p:ph` → the placeholder reference, or `undefined` for an ordinary * (non-placeholder) shape. A bare `` returns an empty ref (still a * placeholder: `type` defaults to `'obj'`). * * A PICTURE is a placeholder as readily as a shape is — a content placeholder * filled with a photograph writes `p:nvPicPr/p:nvPr/p:ph` and an EMPTY `p:spPr`, * leaving its whole geometry to the layout (customshape-bitmapfill-srcrect). */ export declare function parsePh(sp: PoNode): PlaceholderRef | undefined; /** * An xfrm node (`a:off` + `a:ext` children) → the EMU box. Works for both * `a:xfrm` (in `p:spPr`) and `p:xfrm` (on a `p:graphicFrame`), whose children are * identical. Returns `undefined` for a missing or degenerate (non-positive) * extent. */ export declare function boxFromXfrm(xfrm: PoNode | undefined): ShapeBoxEmu | undefined; /** * `p:spPr/a:xfrm` → the EMU box, or `undefined` when the shape carries no * explicit transform (a placeholder that inherits it from the layout/master). */ export declare function parseXfrmBox(spPr: PoNode | undefined): ShapeBoxEmu | undefined; /** * `a:rPr` / `a:defRPr` → {@link RunProperties}. Both the direct run formatting on * a slide (`a:rPr`) and the per-level defaults in a master's `p:txStyles` * (`a:defRPr`) share this element, so the cascade reuses the same reader: size * (`sz`, hundredths of a point), bold/italic/underline, solid colour and the * latin typeface. Scheme colours and the theme font cascade come in PX5. */ export declare function rPrToRunProps(rPr: PoNode | undefined, colors: ColorResolver, themeFonts?: ThemeFonts): RunProperties;