import { t as ClockPort } from "../clock-C7SUuYN0.js"; import { DocumentTree, FontSubstitution, ProvidedFont } from "document-schema.js"; import { z } from "zod"; import { MarkdownImageResolver } from "markdown-codec"; //#region src/convert/port.d.ts declare const DocumentFormatSchema: z.ZodEnum<{ docx: "docx"; pptx: "pptx"; xlsx: "xlsx"; odt: "odt"; odp: "odp"; ods: "ods"; odg: "odg"; svg: "svg"; odf: "odf"; csv: "csv"; markdown: "markdown"; rtf: "rtf"; doc: "doc"; xls: "xls"; ppt: "ppt"; wpd: "wpd"; epub: "epub"; pdf: "pdf"; }>; type DocumentFormat = z.infer; declare const DOCUMENT_FORMATS: readonly DocumentFormat[]; interface DocumentPayload { readonly format: DocumentFormat; readonly bytes: Uint8Array; } interface Diagnostic { readonly severity: "info" | "warning"; readonly code: string; readonly message: string; readonly pageIndex?: number; } interface ConversionRequest { readonly source: DocumentPayload; readonly targetFormat: DocumentFormat; } interface ConversionResult { readonly document: DocumentPayload; readonly diagnostics: readonly Diagnostic[]; readonly package?: DocumentTree; } interface ConversionOptions { readonly signal: AbortSignal; readonly fonts?: readonly ProvidedFont[]; readonly onFontSubstitution?: (substitution: FontSubstitution) => void; readonly images?: MarkdownImageResolver; readonly delimiter?: string; readonly sheet?: string; readonly page?: number; readonly clock?: ClockPort; } interface DocumentConverter { readonly contractVersion: number; readonly conversions: readonly { readonly source: DocumentFormat; readonly target: DocumentFormat; }[]; convert(request: ConversionRequest, options: ConversionOptions): Promise; } //#endregion export { ConversionOptions, ConversionRequest, ConversionResult, DOCUMENT_FORMATS, Diagnostic, DocumentConverter, DocumentFormat, DocumentFormatSchema, DocumentPayload };