export type SvgViewBox = { minX: number; minY: number; width: number; height: number; }; /** * Makes the SVG viewBox and root dimensions exactly match visible content bounds * (path geometry + stroke extent). Single rule — no conditional padding passes. */ export declare function fitViewBoxToVisibleContent(svgSource: string, pad?: number): { svg: string; viewBox: SvgViewBox | null; applied: boolean; }; /** Set root width/height to match viewBox when they diverge (post-fix invariant). */ export declare function syncRootDimensionsToViewBox(svgSource: string): { svg: string; applied: boolean; }; /** * Describes the layout adjustment required when a tight viewBox changes. */ export declare function computeViewBoxDelta(reference: SvgViewBox, current: SvgViewBox): { referenceViewBox: SvgViewBox; currentViewBox: SvgViewBox; scaleX: number; scaleY: number; offsetX: number; offsetY: number; }; export declare function viewBoxContainsBounds(viewBox: SvgViewBox, bounds: { minX: number; minY: number; maxX: number; maxY: number; }, epsilon?: number): boolean; /** Matches cartoon_maker svgEditDragTestHook VIEWBOX_TIGHT_TOLERANCE (0.01px). */ export declare const SVG_EDIT_VIEWBOX_TOLERANCE = 0.01; export interface SvgEditViewBoxPaddingResult { pass: boolean; hasPadding?: boolean; hasOverflow?: boolean; padding?: { left: number; top: number; right: number; bottom: number; }; overflow?: { left: number; top: number; right: number; bottom: number; }; currentViewBox?: SvgViewBox; tightViewBox?: SvgViewBox; reason?: string; } /** Compare current viewBox to the tight content bounds (same math as fitViewBoxToVisibleContent). */ export declare function checkSvgEditViewBoxPadding(svgSource: string): SvgEditViewBoxPaddingResult; export declare function formatSvgEditViewBoxPaddingFailure(result: SvgEditViewBoxPaddingResult): string; export declare function svgEditViewBoxPaddingSeverity(result: SvgEditViewBoxPaddingResult): number; //# sourceMappingURL=svgViewBox.d.ts.map