import type { DocxRendererId } from '../renderers/types'; import { type ThemeConfig } from '../styles'; import type { ServicesConfig, FontRuntimeOpts } from '@json-to-office/shared'; import type { DocumentGeneratorBuilder, GenerationValidationOptions } from './types'; /** * Options for creating a document generator */ export interface DocumentGeneratorOptions { /** Default theme used when no custom or built-in theme matches */ theme?: ThemeConfig; /** Custom themes keyed by name, resolved per-document via document.props.theme */ customThemes?: Record; /** Enable debug logging */ debug?: boolean; /** External service configuration (e.g. Highcharts export server) */ services?: ServicesConfig; /** Font resolution options — extraEntries, Google Fonts config, onResolved hook. */ fonts?: FontRuntimeOpts; /** * Default validation behavior for every generateBuffer/generateFile * call. Per-call `options.validation` overrides these. Validation is on by * default; pass `{ enabled: false }` to opt out. */ validation?: GenerationValidationOptions; /** Normalize volatile OOXML values for byte-identical output. Defaults true. */ deterministic?: boolean; /** Default build timestamp for generated metadata. */ generatedAt?: string | Date; /** * Directory that relative asset paths (image `path` props) resolve against. * Per-call `options.baseDir` overrides it; defaults to `process.cwd()` * when neither is set (#142). */ baseDir?: string; /** * Backend that turns the compiled document into bytes. * * Defaults to `docxjs`, which is what every existing caller gets. * `office-open` is experimental and opt-in: it declares a subset of features * and fails before rendering on anything outside it. */ renderer?: DocxRendererId; /** * Rasterize a PNG fallback for each inline SVG. Defaults to true. * * Only readers older than Word 2016 draw that raster; everything current * draws the vector. Producing it dominates the render of a document whose * artwork is many small SVGs, so it can be turned off. */ svgRasterFallback?: boolean; } /** * Create a document generator with chainable component registration. */ export declare function createDocumentGenerator(options: DocumentGeneratorOptions): DocumentGeneratorBuilder; //# sourceMappingURL=createDocumentGenerator.d.ts.map