/** * Parse an SVG's `viewBox` (its rendered coordinate extent) from the file bytes. * * Why it matters for placement: InDesign records a placed SVG's `GraphicBounds` as the * CONTENT (ink) bounding box — it auto-crops the artboard padding — but a browser renders * the WHOLE viewBox. So a source-pixel crop must be expressed against the viewBox (what is * actually drawn), not GraphicBounds, or the ink lands at the wrong scale/offset. Returns * `{minX, minY, width, height}` in the SVG's user units, or undefined if there's no usable * viewBox. (Only the first 4KB is scanned — the `` root is always at the very top.) */ export declare function parseSvgViewBox(bytes: ArrayBuffer | Uint8Array): { minX: number; minY: number; width: number; height: number; } | undefined; export type SvgViewBox = { minX: number; minY: number; width: number; height: number; }; /** * Force an SVG's intrinsic size to equal its viewBox by writing `width`/`height` on the * root `` (= the viewBox dimensions). Adobe SVGs commonly declare only a `viewBox`, so * a browser reports a bogus default intrinsic size (e.g. 300×150) — which breaks a crop * expressed in viewBox coordinates (core's `fitImageV2` compares `crop.width` to the measured * `imageInfo.width`). With width/height pinned to the viewBox, `imageInfo` == the viewBox == * the crop reference, so the placement is exact. No-op when there's no viewBox. */ export declare function ensureSvgIntrinsicSize(bytes: ArrayBuffer | Uint8Array): Uint8Array; //# sourceMappingURL=svgViewBox.d.ts.map