import type { Point2D } from './shape-properties'; /** * ECMA-376 §20.1.10.55 preset shape catalogue (`ST_PresetShapeType`, 187 * entries). Pulled from openpyxl's `PresetGeometry2D.prst` Set so the test * corpus stays directly comparable. */ export declare const PRESET_SHAPE_NAMES: ReadonlyArray; /** True iff `name` is one of the 187 ECMA-376 preset shapes. */ export declare const isPresetShapeName: (name: string) => boolean; /** ``. Shape guide / formula. */ export interface ShapeGuide { name: string; fmla: string; } /** * Adjust point. ECMA-376 calls these out as a Coordinate (a string that may be * a literal EMU number or a guide-name reference like `wd2`). We keep them as * strings so guide-references survive round-trip. */ export interface AdjPoint2D { x: string; y: string; } /** ``. */ export interface ConnectionSite { /** Angle: either a number (degrees × 60_000) or a guide reference. */ ang: string; pos: AdjPoint2D; } /** ``-style adjust handle. The polar variant uses the same shape with `ang` in `pos`. */ export interface AdjustHandle { /** `xy` (cartesian) or `polar`. */ kind: 'xy' | 'polar'; pos: AdjPoint2D; /** Range constraints (xy) or radius/angle constraints (polar). */ gdRefX?: string; minX?: string; maxX?: string; gdRefY?: string; minY?: string; maxY?: string; gdRefR?: string; minR?: string; maxR?: string; gdRefAng?: string; minAng?: string; maxAng?: string; } /** ``. Optional bounding rect for custom geometry. */ export interface GuideRect { l: string; t: string; r: string; b: string; } /** Path-command discriminated union. ECMA-376 §20.1.9.* */ export type PathCommand = { kind: 'moveTo'; pt: Point2D; } | { kind: 'lnTo'; pt: Point2D; } | { kind: 'arcTo'; wR: string; hR: string; stAng: string; swAng: string; } | { kind: 'quadBezTo'; pts: [Point2D, Point2D]; } | { kind: 'cubicBezTo'; pts: [Point2D, Point2D, Point2D]; } | { kind: 'close'; }; export type PathFill = 'none' | 'norm' | 'lighten' | 'lightenLess' | 'darken' | 'darkenLess'; /** A single `` element inside ``. */ export interface GeometryPath { w?: number; h?: number; fill?: PathFill; stroke?: boolean; extrusionOk?: boolean; commands: PathCommand[]; } /** ``. */ export interface PresetGeometry { kind: 'preset'; prst: string; avLst?: ShapeGuide[]; } /** `...`. */ export interface CustomGeometry { kind: 'custom'; avLst?: ShapeGuide[]; gdLst?: ShapeGuide[]; ahLst?: AdjustHandle[]; cxnLst?: ConnectionSite[]; rect?: GuideRect; pathLst: GeometryPath[]; } export type Geometry = PresetGeometry | CustomGeometry; export declare const makePresetGeometry: (prst: string, avLst?: ShapeGuide[]) => PresetGeometry; export declare const makeCustomGeometry: (opts: { pathLst: GeometryPath[]; avLst?: ShapeGuide[]; gdLst?: ShapeGuide[]; ahLst?: AdjustHandle[]; cxnLst?: ConnectionSite[]; rect?: GuideRect; }) => CustomGeometry;