import { type AcExSnapshotV1 } from '@mlightcad/cad-html-exporter'; /** * Orchestrates export of the active drawing to a downloadable HTML file. * * Workflow: * 1. Build a display-only {@link AcExSnapshotV1} from the current scene and database. * 2. Fetch the IIFE viewer runtime (inlined into the HTML). * 3. Package snapshot + runtime via `packHtml` and trigger a browser download. * * A busy indicator is shown for the duration of the operation. The UI thread * is yielded between heavy steps so the browser can repaint. */ export declare class AcApHtmlConvertor { /** Collects geometry and metadata from the live Three.js scene. */ private readonly _snapshotBuilder; /** * Exports the document currently open in {@link AcApDocManager}. * * @param fileName - Optional base name for the download (without extension). * When omitted, the active document's `fileName` is used. A `.html` suffix * is always applied; `.dwg` / `.dxf` suffixes on the input are stripped. * @returns Resolves when packaging and download complete. */ convert(fileName?: string): Promise; /** * Packages a pre-built snapshot into HTML and downloads it. * * Skips scene collection; useful for tests, CLI tooling, or re-exporting a * snapshot produced elsewhere. * * @param snapshot - Complete v1 snapshot to embed in the HTML. * @param downloadName - File name passed to the browser download API (should * include the `.html` extension). * @returns Resolves when packaging and download complete. */ packSnapshot(snapshot: AcExSnapshotV1, downloadName: string): Promise; /** * Fetches the offline viewer runtime as source text for inlining. * * @param url - Absolute or relative URL of `viewer-runtime.iife.js`. When * omitted, {@link DEFAULT_RUNTIME_URL} is used. * @returns The runtime script body as a string. * @throws If the HTTP response is not OK (missing build artifact, CORS, etc.). */ private loadViewerRuntime; /** * Derives the browser download file name from a drawing file name. * * @param fileName - Source drawing name (may include `.dwg` or `.dxf`). * @returns Base name without drawing extension, plus `.html`. */ private resolveDownloadName; /** * Triggers a client-side download of the generated HTML string. * * @param content - Full HTML document text. * @param downloadName - Value for the anchor `download` attribute. */ private downloadHtml; } //# sourceMappingURL=AcApHtmlConvertor.d.ts.map