/** * Shared utility functions for the export-docx package */ import { type ImageMeta } from 'image-meta'; /** * Extract image type from URL or base64 data */ export declare function getImageTypeFromSrc(src: string): 'png' | 'jpeg' | 'gif' | 'bmp' | 'tiff' | 'webp'; /** * Create floating options for full-width images */ export declare function createFloatingOptions(): { horizontalPosition: { relative: string; align: string; }; verticalPosition: { relative: string; align: string; }; lockAnchor: boolean; behindDocument: boolean; inFrontOfText: boolean; }; /** * Get image width with clear priority: node attrs > options.run > image metadata > default * Width is capped at MAX_IMAGE_WIDTH to ensure images fit within DOCX page content area. */ export declare function getImageWidth(node: { attrs?: { width?: number | null; }; }, options?: { run?: { transformation?: { width?: number; }; }; }, imageMeta?: { width?: number | null; }): number; /** * Get image height, maintaining aspect ratio when width is capped. * Priority: options.run > aspect ratio from node attrs > aspect ratio from image metadata > default */ export declare function getImageHeight(node: { attrs?: { width?: number | null; height?: number | null; }; }, width: number, options?: { run?: { transformation?: { height?: number; }; }; }, imageMeta?: { width?: number | null; height?: number | null; }): number; /** * Fetch image data and metadata from URL */ export declare function getImageDataAndMeta(url: string): Promise<{ data: Uint8Array; meta: ImageMeta; }>;