/** * OOXML DrawingML guide formula evaluator — public API. * * Built-in variable seeding, guide evaluation, adjustment parsing, * and coordinate resolution. */ import type { GeometryGuide, GeometryContext } from './guide-formula-eval.js'; /** * Seed the built-in variables for a shape of the given dimensions. * * Built-in variables are defined by the OOXML spec (ISO/IEC 29500-1 section 20.1.9): * - **Position/size:** `w`, `h`, `l`, `t`, `r`, `b`, `hc` (horizontal center), `vc` (vertical center) * - **Width fractions:** `wd2` through `wd32` (width divided by the standard divisors) * - **Height fractions:** `hd2` through `hd32` (height divided by the standard divisors) * - **Short/long side:** `ss`, `ls`, `ssd2` through `ssd32` * - **Angular constants:** `cd2` (180 degrees), `cd4` (90 degrees), `cd8` (45 degrees), etc. * * All angular values are in OOXML angle units (60,000ths of a degree). * * @param ctx - Shape dimensions (width and height). * @returns A Map of built-in variable names to their computed values. */ export declare function createBuiltinVariables(ctx: GeometryContext): Map; /** * Evaluate a list of geometry guides in order, resolving each guide's * formula against the accumulated variable context. * * @param guides - Ordered list of guide definitions from `a:gdLst` or `a:avLst`. * @param ctx - Shape dimensions for built-in variables. * @param adjustments - Optional adjustment values (from `a:avLst`), pre-seeded. * @returns A Map of all resolved variable names → numeric values. */ export declare function evaluateGuides(guides: GeometryGuide[], ctx: GeometryContext, adjustments?: Map): Map; /** * Parse `a:gd` XML elements into GeometryGuide array. * * @param gdNodes - Array of guide definition XML objects with `@_name` and `@_fmla` attributes. * @returns Ordered list of parsed guide definitions. */ export declare function parseGuideDefinitions(gdNodes: ReadonlyArray>): GeometryGuide[]; /** * Parse adjustment values from `a:avLst/a:gd` into a Map. * * Each adjustment guide has a formula typically of the form `val `. * This extracts the adjustment name and its numeric value. */ export declare function parseAdjustmentValues(gdNodes: ReadonlyArray>): Map; /** * Resolve a coordinate value that may be a guide name or a numeric literal. * * In OOXML geometry paths, coordinates like `x` and `y` in `a:pt` can be * either numeric literals or references to guide variable names. */ export declare function resolveCoordinate(value: string | number | undefined, variables: Map): number; //# sourceMappingURL=guide-formula-api.d.ts.map