/** * Editing helpers — unit conversion and SVG DOM utilities for interactive editing. * * These helpers let frontend developers work with familiar units (px, pt, degrees) * instead of OOXML's EMU / hundredths-of-a-point / 60000ths-of-a-degree. */ /** EMU per point (1 pt = 12700 EMU). */ export declare const EMU_PER_PT = 12700; /** EMU per pixel at 96 DPI (914400 / 96 = 9525). */ export declare const EMU_PER_PX_96DPI = 9525; /** * Convert pixels to EMU. * @param px - Pixel value * @param dpi - DPI (default 96) */ export declare function pxToEmu(px: number, dpi?: number): number; /** * Convert EMU to pixels. * @param emu - EMU value * @param dpi - DPI (default 96) */ export declare function emuToPx(emu: number, dpi?: number): number; /** * Convert points to OOXML hundredths-of-a-point. * @param pt - Point value (e.g. 18) * @returns Hundredths (e.g. 1800) */ export declare function ptToHundredths(pt: number): number; /** * Convert OOXML hundredths-of-a-point to points. * @param val - Hundredths value (e.g. 1800) * @returns Points (e.g. 18) */ export declare function hundredthsToPt(val: number): number; /** * Convert degrees to OOXML angle units (60000ths of a degree). * @param deg - Degrees (e.g. 90) * @returns OOXML angle (e.g. 5400000) */ export declare function degreesToOoxml(deg: number): number; /** * Convert OOXML angle units to degrees. * @param val - OOXML angle (e.g. 5400000) * @returns Degrees (e.g. 90) */ export declare function ooxmlToDegrees(val: number): number; /** Shape transform in EMU (as stored in data-ooxml-* attributes). */ export interface ShapeTransform { x: number; y: number; cx: number; cy: number; rot: number; } /** * Find a shape's `` element by its shape index. * Looks for `data-ooxml-shape-idx="N"` in the SVG. */ export declare function findShapeElement(svg: SVGSVGElement, shapeIdx: number): SVGGElement | null; /** * Read the OOXML transform from a shape's `` element data attributes. * Returns EMU values. */ export declare function getShapeTransform(g: SVGGElement): ShapeTransform; /** * Get all shape `` elements in an SVG (direct children with data-ooxml-shape-idx). */ export declare function getAllShapes(svg: SVGSVGElement): SVGGElement[]; /** * Get the EMU-to-pixel scale factor from the SVG root's data attribute. */ export declare function getSlideScale(svg: SVGSVGElement): number; //# sourceMappingURL=editing-helpers.d.ts.map