// Generated by dts-bundle-generator v9.5.1 import CreativeEngine from '@cesdk/engine'; import { Font, Typeface } from '@cesdk/engine'; export interface TypefaceParams { family: string; style: Font["style"]; weight: Font["weight"]; } export type TypefaceResolver = (fontParameters: TypefaceParams, engine: CreativeEngine) => Promise; export declare function addGoogleFontsAssetLibrary(engine: CreativeEngine, url?: string): Promise; export interface FontResolverResult { typeface: Typeface; font: Font; } export type LogMessage = { message: string; type: "error" | "warning" | "info"; }; export declare class Logger { private static instance; constructor(); private messages; log(message: string, type?: "error" | "warning" | "info"): void; getMessages(): LogMessage[]; } export declare class IDMLParser { private engine; private scene; private idml; private fontResolver; private colors; private gradients; private spreads; private logger; private fontRenderingAdapter; private constructor(); /** * Instantiate a new IDMLParser from a File or Blob * * @param cesdk The CreativeEditorSDK instance * @param file The IDML file * @param fontResolver A function that resolves the font URI from the font name and style * @returns A new IDMLParser instance */ static fromFile(engine: CreativeEngine, file: Blob | File | ArrayBuffer, DOMParser: any, fontResolver?: TypefaceResolver): Promise; parse(): Promise<{ scene: number; logger: Logger; }>; private getSpreads; private getBleedMargins; private generatePagesFromSpreads; private processMultiFrameStories; /** * Loop over the page elements and render the CESDK blocks based on the element type * * @param element The page element * @param spread The page element's parent page * @param pageBlock The page block to append the rendered blocks to * @returns An array of the rendered blocks */ private renderPageElements; /** * Parses the name of an IDML element and applies it to a CE.SDK block * * @param element The IDML element * @param block The CE.SDK block * @returns void */ private copyElementName; /** * Parses the fill styles of an IDML element and applies them to a CESDK block * * @param block The CESDK block to apply the fill to * @param element The IDML element * @param attributeName The name of the attribute to use as the fill color * @returns void */ private applyFill; /** * Parses the stroke styles of an IDML element and applies them to a CESDK block * * @param block The CESDK block to apply the stroke to * @param element The IDML element * @returns void */ private applyStroke; /** * Parses the transparency styles of an IDML element and applies them to a CESDK block * * @param block The CESDK block to apply the transparency to * @param element The IDML element * @returns void */ private applyTransparency; /** * Parses the image fill of an IDML element and applies it to a CESDK block * @param block The CESDK block to apply the image fill to * @param element The IDML element * @returns Promise True if the image fill was applied, false otherwise */ private applyImageFill; /** * Parses the corner radius of an IDML element and applies it to a CESDK block * @param block The CESDK block to apply the corner radius to * @param element The IDML element * @returns void */ private applyBorderRadius; /** * Extracts the line height multiplier from IDML paragraph/character style elements. * Leading can be specified as an explicit value in points or as "Auto". * * @param paragraphStyleRange - The ParagraphStyleRange element from the story * @param appliedParagraphStyle - The resolved ParagraphStyle from Styles.xml * @returns The line height as a multiplier (e.g., 1.2 for 120%) */ private getLineHeightFromIDML; } export {};