@deepseek-ai/libreoffice-kit 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ import type { DocumentFontMetadata } from './ooxml.ts';
2
+ import type { ResolvedOptions } from './options.ts';
3
+ /** Input suffixes accepted by the public converter. */
4
+ export declare const DOCUMENT_EXTENSIONS: readonly ["doc", "docx", "xls", "xlsx", "ppt", "pptx"];
5
+ /**
6
+ * Inspect the input container before invoking LibreOffice's document importer.
7
+ * Compound-file streams and legacy font tables are interpreted by LibreOffice;
8
+ * they do not supply the API's OOXML font diagnostics.
9
+ * @param bytes - Source bytes already bounded by maxInputBytes.
10
+ * @param extension - Lowercase source suffix.
11
+ * @param limits - Limits applied to ZIP-based document contents.
12
+ * @returns OOXML font metadata, or empty diagnostics for a binary document.
13
+ */
14
+ export declare function inspectDocument(bytes: Uint8Array, extension: string, limits: Pick<ResolvedOptions, 'maxArchiveEntries' | 'maxUncompressedBytes'>): DocumentFontMetadata;
15
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Engine-family version every installed engine package must carry. The engine
3
+ * family shares its release version with this Node API.
4
+ */
5
+ export declare const ENGINE_VERSION = "0.0.1";
6
+ /** Host diagnostic fields used to identify the runtime glibc version. */
7
+ export interface EngineHostReport {
8
+ readonly header?: {
9
+ readonly glibcVersionRuntime?: string;
10
+ };
11
+ }
12
+ /** Process identification and diagnostic report the resolver classifies the host with. */
13
+ export interface EngineResolutionHost {
14
+ readonly platform?: string;
15
+ readonly arch?: string;
16
+ readonly report?: () => EngineHostReport;
17
+ }
18
+ /** Engine installation fields both backends carry. */
19
+ interface EngineInstallation {
20
+ /** Installed package root the manifest resolved to. */
21
+ readonly root: string;
22
+ /** Program resources the engine loads: a real directory natively, a virtual path in WASM. */
23
+ readonly programDirectory: string;
24
+ /** Recorded glibc floor when the native manifest declares one. */
25
+ readonly glibcMinimum?: string;
26
+ }
27
+ /** A resolved native LibreOfficeKit helper. */
28
+ export interface NativeEngine extends EngineInstallation {
29
+ readonly backend: 'native';
30
+ readonly executable: string;
31
+ }
32
+ /** A resolved shared Node WebAssembly engine. */
33
+ export interface WasmEngine extends EngineInstallation {
34
+ readonly backend: 'wasm';
35
+ readonly loader: string;
36
+ readonly wasm: string;
37
+ readonly data: string;
38
+ readonly metadata: string;
39
+ }
40
+ /** One resolved engine installation. */
41
+ export type Engine = NativeEngine | WasmEngine;
42
+ /** Engine backend a conversion runs in. */
43
+ export type EngineBackend = Engine['backend'];
44
+ /**
45
+ * Whether an installed engine package directory is present on the resolution path.
46
+ * @param name - Engine package name.
47
+ * @returns true when at least one resolution directory holds the package.
48
+ */
49
+ export declare function installedPackageExists(name: string): boolean;
50
+ /**
51
+ * Return the optional package target for the current process ABI.
52
+ * @param platform - Host operating system.
53
+ * @param arch - Host CPU architecture.
54
+ * @param report - Host diagnostic report used to identify glibc.
55
+ * @returns the declared platform target, or undefined for an unsupported host.
56
+ */
57
+ export declare function platformTarget(platform?: string, arch?: string, report?: () => EngineHostReport): string | undefined;
58
+ /**
59
+ * macOS and Windows require their native engine. Linux uses WASM when no compatible development native engine is installed.
60
+ * @param resolvePackage - Package manifest resolver; injectable for selection tests.
61
+ * @param packageExists - Installed-package probe; injectable for selection tests.
62
+ * @param host - Process identification and diagnostic report.
63
+ * @returns the installed native engine, or the installed WASM engine.
64
+ */
65
+ export declare function resolveEngine(resolvePackage?: (name: string) => string, packageExists?: (name: string) => boolean, { platform, arch, report }?: EngineResolutionHost): Promise<Engine>;
66
+ export {};
67
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1,21 @@
1
+ /** Stable render failure categories shared across the Node worker and native helper transports. */
2
+ /** Categories a conversion can report across the worker and native helper messages. */
3
+ export type ConversionErrorCode = 'input-too-large' | 'output-too-large' | 'invalid-document' | 'unsupported-format' | 'invalid-output' | 'timeout' | 'unavailable' | 'failed';
4
+ /** An actionable converter failure; operating-system errors and caller abort reasons remain unchanged. */
5
+ export declare class ConversionError extends Error {
6
+ /** Published failure category carried across worker and helper transports. */
7
+ readonly code: ConversionErrorCode;
8
+ /**
9
+ * @param code - Published failure category.
10
+ * @param message - Consumer-facing failure description.
11
+ * @param options - Standard error options; a cause is preserved for diagnostics.
12
+ */
13
+ constructor(code: ConversionErrorCode, message: string, options?: ErrorOptions);
14
+ }
15
+ /**
16
+ * Only published categories cross worker/helper messages; unknown errors use the generic failure category.
17
+ * @param error - The thrown value, which may be any type and may carry an unpublished `code`.
18
+ * @returns The published category, or `failed` when no published category is present.
19
+ */
20
+ export declare function failureCode(error: unknown): ConversionErrorCode;
21
+ //# sourceMappingURL=errors.d.ts.map
@@ -0,0 +1,42 @@
1
+ import type { FontFace, FontMatchRequest } from './fonts.ts';
2
+ import type { DocumentFontMetadata } from './ooxml.ts';
3
+ import type { ResolvedOptions } from './options.ts';
4
+ /** Missing-family choices the native helper writes into its private profile. */
5
+ export interface FontSubstitution {
6
+ readonly family: string;
7
+ /** Installed family selected for the missing one. */
8
+ readonly substitute: string;
9
+ }
10
+ /** One conversion's font imports: a serialized resolver plus its diagnostics. */
11
+ export interface FontLoader {
12
+ /** Declared document families no installed face provides, in discovery order. */
13
+ readonly missingFonts: string[];
14
+ /** Missing families the catalog resolved to an installed substitute. */
15
+ readonly substitutions: FontSubstitution[];
16
+ /** Installed file paths this conversion received, deduplicated by origin. */
17
+ readonly files: string[];
18
+ /**
19
+ * @param request - VCL family/style attributes and the scalars it still needs.
20
+ * @returns installed file paths for the selected faces.
21
+ */
22
+ resolve(request: FontMatchRequest): string[];
23
+ }
24
+ /**
25
+ * Place installed original bytes where the engine can read them.
26
+ * @param name - Unique file name within this conversion's font directory.
27
+ * @param bytes - Complete original font bytes.
28
+ * @returns the path the engine should read.
29
+ */
30
+ export type FontInstaller = (name: string, bytes: Buffer) => string;
31
+ /** Build the metadata catalog inside a cancellable conversion worker. */
32
+ export declare function createFontLoader(options: ResolvedOptions, document: DocumentFontMetadata, install: FontInstaller, faces: readonly FontFace[]): FontLoader;
33
+ /** Supply native imports and seed WASM's first usable default font. */
34
+ export declare function preloadFonts(loader: FontLoader, options: ResolvedOptions, document: DocumentFontMetadata, native?: boolean): void;
35
+ /**
36
+ * Fontconfig XML restricts WASM discovery to imported originals in MEMFS.
37
+ * @param families - Ordered family groups; the first name of each group is its canonical spelling.
38
+ * @param requested - Additional family names the document declared.
39
+ * @returns the fontconfig document written into the module's memory filesystem.
40
+ */
41
+ export declare function memoryFontConfig(families: readonly (readonly string[])[], requested?: Iterable<string>): string;
42
+ //# sourceMappingURL=font-loader.d.ts.map
@@ -0,0 +1,141 @@
1
+ import type { Font, FontCollection } from 'fontkit';
2
+ /** One inclusive Unicode range a physical face renders. */
3
+ export type GlyphRange = [number, number];
4
+ /** Metadata for one physical face, captured without retaining its bytes or glyph coverage. */
5
+ export interface FontFace {
6
+ readonly path: string;
7
+ readonly size: number;
8
+ readonly mtimeMs: number;
9
+ readonly ctimeMs: number;
10
+ readonly dev: number;
11
+ readonly ino: number;
12
+ readonly faceIndex: number;
13
+ readonly family: string;
14
+ readonly style: string;
15
+ readonly aliases: string[];
16
+ readonly weight: number;
17
+ readonly width: number;
18
+ readonly italic: boolean;
19
+ readonly fixed: boolean;
20
+ readonly postscriptName: string | null;
21
+ /** Decoded glyph ranges; absent until a match reads this face's coverage. */
22
+ coverage?: GlyphRange[];
23
+ }
24
+ /** VCL attributes LibreOffice requests one family for. */
25
+ export interface FontMatchRequest {
26
+ readonly family: string;
27
+ readonly style: string;
28
+ readonly weight: number;
29
+ readonly italic: number;
30
+ readonly width: number;
31
+ readonly pitch: number;
32
+ readonly language: string;
33
+ readonly codePoints: readonly number[];
34
+ }
35
+ /** Selected physical files and the requested family the catalog could not find. */
36
+ export interface FontMatchResult {
37
+ readonly fonts: FontFace[];
38
+ readonly missingFamily?: string;
39
+ }
40
+ /** One host font snapshot and the ordered fallback groups a conversion supplies. */
41
+ export interface SystemFontCatalogOptions {
42
+ readonly faces: readonly FontFace[];
43
+ readonly fallbackFamilies: readonly (readonly string[])[];
44
+ }
45
+ /** Host font roots and physical file limits. */
46
+ export interface FontIndexOptions {
47
+ readonly directories: readonly string[];
48
+ readonly maxFiles: number;
49
+ readonly maxFileBytes: number;
50
+ }
51
+ /**
52
+ * @param error - Thrown filesystem value.
53
+ * @returns whether it means the path is not a usable font source.
54
+ */
55
+ export declare function absent(error: unknown): boolean;
56
+ /**
57
+ * Case- and separator-insensitive family key used to compare names across sources.
58
+ * @param value - Family, style, or postscript name as recorded by a document or font.
59
+ * @returns The normalized key.
60
+ */
61
+ export declare function normalize(value: string): string;
62
+ /**
63
+ * Order named substitutions and their generic text family without excluding unlisted fonts.
64
+ * @param requested - Original family names, in document order.
65
+ * @param groups - Ordered family groups shared with Fontconfig aliases.
66
+ * @param pitch - VCL pitch; one requests a monospaced fallback.
67
+ * @param symbols - Whether symbol alternatives precede the generic fallback.
68
+ * @returns distinct family names, with original requests first.
69
+ */
70
+ export declare function fontFamilyPriority(requested: readonly string[], groups: readonly (readonly string[])[], pitch?: number, symbols?: boolean): string[];
71
+ /**
72
+ * Discover system and per-user font roots using the selected platform's path separators.
73
+ * @param platform - Host operating system.
74
+ * @param home - Host user home used to locate per-user font directories.
75
+ * @param env - Host environment containing Windows and XDG directory overrides.
76
+ * @returns candidate directories; missing platform directories are ignored during indexing.
77
+ */
78
+ export declare function systemFontDirectories(platform?: NodeJS.Platform, home?: string, env?: NodeJS.ProcessEnv): string[];
79
+ /**
80
+ * Font asset directories macOS publishes under its MobileAsset root.
81
+ * @param assets - Absolute MobileAsset font directory root.
82
+ * @returns matching asset directories, sorted by name.
83
+ * @throws when the root exists but cannot be read for a reason other than its absence or protection.
84
+ */
85
+ export declare function mobileAssetFontDirectories(assets: string): string[];
86
+ /**
87
+ * Decode glyph coverage for one parsed face.
88
+ * @param font - The parsed physical face.
89
+ * @returns the inclusive ranges the face renders, or none when its glyph tables reject decoding.
90
+ */
91
+ export declare function faceCoverage(font: Font): GlyphRange[];
92
+ /**
93
+ * @param parsed - Parsed font file: one face, or a collection of faces.
94
+ * @param face - Indexed metadata naming the face inside that file.
95
+ * @returns the physical face the index names.
96
+ * @throws when the file no longer provides the indexed face.
97
+ */
98
+ export declare function indexedFace(parsed: Font | FontCollection, face: Pick<FontFace, 'faceIndex' | 'postscriptName'>): Font;
99
+ /**
100
+ * VCL weight, width, and fixed-pitch values for one parsed face.
101
+ * @param font - The parsed physical face, whose `OS/2` and `post` tables may be absent.
102
+ * @returns the recorded classes, or the regular defaults for an absent table.
103
+ */
104
+ export declare function faceMetrics(font: Pick<Font, 'OS/2' | 'post'>): {
105
+ weight: number;
106
+ width: number;
107
+ fixed: boolean;
108
+ };
109
+ /**
110
+ * Snapshot eligible local font metadata without retaining font bytes or decoding glyph coverage.
111
+ * @param options - Host font roots and physical file limits.
112
+ * @returns metadata reused for the converter lifetime; recreate it after changing installed fonts.
113
+ */
114
+ export declare function indexSystemFonts(options: FontIndexOptions): FontFace[];
115
+ /** Conversion-local glyph coverage over the converter's first metadata snapshot. */
116
+ export declare class SystemFontCatalog {
117
+ private readonly options;
118
+ private readonly faces;
119
+ /**
120
+ * @param options - Host metadata snapshot and fallback families.
121
+ */
122
+ constructor(options: SystemFontCatalogOptions);
123
+ /**
124
+ * Find installed faces covering the requested family or missing characters.
125
+ * Exact families precede configured alternatives, symbol families for missing symbols,
126
+ * generic families, then other glyph-covering faces.
127
+ * @param request - VCL family/style attributes and Unicode scalars missing from its current font.
128
+ * @param signal - cancellation checked between synchronous font reads.
129
+ * @returns selected physical files, deduplicated across collection faces; absent glyphs remain unresolved.
130
+ * @throws if an indexed font changes or cannot be read during glyph matching.
131
+ */
132
+ match(request: FontMatchRequest, signal: AbortSignal): FontMatchResult;
133
+ }
134
+ /**
135
+ * Read the unchanged indexed regular file; reject concurrent replacement or truncation.
136
+ * @param face - Indexed face metadata whose identity and timestamps must still match the file.
137
+ * @returns the complete original font bytes.
138
+ * @throws when the file changed, was replaced, or was truncated since indexing.
139
+ */
140
+ export declare function readFont(face: FontFace): Buffer;
141
+ //# sourceMappingURL=fonts.d.ts.map
@@ -0,0 +1,65 @@
1
+ export { ConversionError } from './errors.ts';
2
+ export type { ConversionErrorCode } from './errors.ts';
3
+ export { ENGINE_VERSION } from './engine.ts';
4
+ /** Host limits used by both native and Node WASM conversions. All byte limits are positive safe integers. */
5
+ export interface ConverterOptions {
6
+ /** Deadline after a queued conversion starts, including font work and output. Default: 120000 ms. */
7
+ timeoutMs?: number;
8
+ /** Maximum source bytes. Default: 64 MiB. */
9
+ maxInputBytes?: number;
10
+ /** Maximum generated PDF bytes. Default: 128 MiB. */
11
+ maxOutputBytes?: number;
12
+ /** PDF export image resolution in DPI. Default: 144. */
13
+ maxImageResolution?: number;
14
+ /** Maximum ZIP entries. Default: 20000. */
15
+ maxArchiveEntries?: number;
16
+ /** Maximum declared uncompressed archive bytes. Default: 512 MiB. */
17
+ maxUncompressedBytes?: number;
18
+ /** Font roots; defaults to conventional platform and user directories. */
19
+ fontDirectories?: string[];
20
+ /** Ordered family groups replace the defaults. Exact installed families precede alternatives; the full indexed
21
+ * catalog remains available for missing glyphs. Native LibreOffice also resolves installed metric-compatible
22
+ * fonts before configured choices. */
23
+ fontFallbacks?: string[][];
24
+ /** Families imported before loading a document. Defaults to none. */
25
+ initialFontFamilies?: string[];
26
+ /** Maximum visited physical font files. Default: 20000. */
27
+ maxFontFiles?: number;
28
+ /** Files exceeding this limit are omitted. Default: 256 MiB. */
29
+ maxFontFileBytes?: number;
30
+ /** Complete original font bytes imported per conversion. Default: 512 MiB. Native platform fonts remain OS-managed. */
31
+ maxLoadedFontBytes?: number;
32
+ }
33
+ /** Result of one conversion. */
34
+ export interface RenderResult {
35
+ readonly backend: 'native' | 'wasm';
36
+ /** Declared OOXML families no installed font provides; binary formats return an empty list. */
37
+ readonly missingFonts: string[];
38
+ }
39
+ /** A converter serializes document operations; cancellation and disposal await process/worker exit. */
40
+ export interface Converter {
41
+ readonly backend: 'native' | 'wasm';
42
+ /**
43
+ * Convert a private, caller-authorized regular Office file to a fresh exclusive PDF path.
44
+ * The caller owns both directories and must prevent concurrent path changes.
45
+ * Rejects existing output paths; removes a newly created output on failure or cancellation.
46
+ * @param request - Absolute paths. Input suffix: doc, docx, xls, xlsx, ppt, or pptx.
47
+ * @param signal - Optional cancellation, including while queued.
48
+ * @returns Engine choice and missing declared font families.
49
+ */
50
+ render(request: {
51
+ inputPath: string;
52
+ outputPath: string;
53
+ }, signal?: AbortSignal): Promise<RenderResult>;
54
+ /** Abort queued and active work, await exit and cleanup, and permanently reject further renders. */
55
+ dispose(): Promise<void>;
56
+ }
57
+ /**
58
+ * Resolve the installed engine and deployment limits without starting LibreOffice.
59
+ * @param options - Conversion, font, and output limits.
60
+ * @returns A serial converter; dispose it after use.
61
+ * @throws TypeError for invalid options, or an unavailable ConversionError for invalid installed engines.
62
+ * An absent native engine or a known unsupported glibc version selects WASM.
63
+ */
64
+ export declare function createConverter(options?: ConverterOptions): Promise<Converter>;
65
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ /** Localized search names from LibreOffice Core's fixed font-name dictionary. */
2
+ export declare const LOCALIZED_FONT_SEARCH_NAMES: Map<string, string>;
3
+ //# sourceMappingURL=native-font-names.d.ts.map
@@ -0,0 +1,34 @@
1
+ import type { FontSubstitution } from './font-loader.ts';
2
+ import type { NativeEngine } from './engine.ts';
3
+ import type { ResolvedOptions } from './options.ts';
4
+ /**
5
+ * Write missing-family choices into the private profile's VCL substitution table.
6
+ * Installed originals and metric-compatible fonts are resolved before this table by LibreOffice.
7
+ * @param profile - Existing, conversion-owned profile directory.
8
+ * @param substitutions - Missing document families and the selected installed family.
9
+ * @returns Resolves after the exclusive profile file is written; empty choices create no file.
10
+ */
11
+ export declare function prepareNativeFontProfile(profile: string, substitutions: readonly FontSubstitution[]): Promise<void>;
12
+ /**
13
+ * Linux searches the verified program directory; ambient loader overrides and credentials are excluded.
14
+ * @param profile - Conversion-owned profile directory the helper treats as home.
15
+ * @param programDirectory - Verified engine program directory.
16
+ * @param source - Embedding process environment.
17
+ * @param platform - Host operating system.
18
+ * @returns the environment the helper starts with.
19
+ */
20
+ export declare function nativeEnvironment(profile: string, programDirectory: string, source?: NodeJS.ProcessEnv, platform?: string): Record<string, string>;
21
+ /**
22
+ * Run one native conversion and await bounded result transport.
23
+ * @param engine - Resolved native engine installation.
24
+ * @param options - Validated conversion limits.
25
+ * @param input - Private source path inside the conversion scratch directory.
26
+ * @param output - Private PDF path inside the conversion scratch directory.
27
+ * @param profile - Conversion-owned profile directory.
28
+ * @param fonts - Installed font files the helper may load.
29
+ * @param substitutions - Missing families and their selected installed substitutes.
30
+ * @param signal - Cancellation; it kills the helper and awaits its exit.
31
+ * @throws ConversionError for a reported conversion failure, and the abort reason for cancellation.
32
+ */
33
+ export declare function runNative(engine: NativeEngine, options: ResolvedOptions, input: string, output: string, profile: string, fonts: readonly string[], substitutions: readonly FontSubstitution[], signal: AbortSignal): Promise<void>;
34
+ //# sourceMappingURL=native.d.ts.map
@@ -0,0 +1,17 @@
1
+ import type { ResolvedOptions } from './options.ts';
2
+ /** Declared font families and scalar values one inspected document carries. */
3
+ export interface DocumentFontMetadata {
4
+ /** Normalized family key to the family name as the document declared it. */
5
+ readonly families: Map<string, string>;
6
+ readonly codePoints: readonly number[];
7
+ }
8
+ /**
9
+ * Validate ZIP size and membership before decoding selected document XML.
10
+ * @param bytes - Complete source document bytes.
11
+ * @param extension - Input extension, which selects the main document part.
12
+ * @param limits - Archive entry and declared uncompressed byte limits.
13
+ * @returns declared font families and the scalar values readable document XML declares.
14
+ * @throws ConversionError when the extension is unsupported or the archive violates its limits.
15
+ */
16
+ export declare function inspectDocument(bytes: Uint8Array, extension: string, limits: Pick<ResolvedOptions, 'maxArchiveEntries' | 'maxUncompressedBytes'>): DocumentFontMetadata;
17
+ //# sourceMappingURL=ooxml.d.ts.map
@@ -0,0 +1,28 @@
1
+ /** Validated deployment limits shared by native and Node WASM conversions. */
2
+ import type { ConverterOptions } from './index.ts';
3
+ /** Ordered family groups used when the caller supplies none. */
4
+ export declare const FONT_FALLBACKS: readonly (readonly string[])[];
5
+ /** Resolved limits and font settings used by every conversion of one converter. */
6
+ export interface ResolvedOptions {
7
+ readonly timeoutMs: number;
8
+ readonly maxInputBytes: number;
9
+ readonly maxOutputBytes: number;
10
+ readonly maxImageResolution: number;
11
+ readonly maxArchiveEntries: number;
12
+ readonly maxUncompressedBytes: number;
13
+ readonly maxFontFiles: number;
14
+ readonly maxFontFileBytes: number;
15
+ readonly maxLoadedFontBytes: number;
16
+ readonly fontDirectories: string[];
17
+ readonly fontFallbacks: string[][];
18
+ readonly initialFontFamilies: string[];
19
+ }
20
+ /**
21
+ * Resolve defaults once; reject misspelled options and malformed font settings.
22
+ * @param input - Caller options; absent fields keep their documented default.
23
+ * @returns The validated limits and font settings, with caller arrays copied.
24
+ * @throws TypeError for a non-object argument or an unknown option name.
25
+ * @throws RangeError for a limit outside the positive safe-integer timer range.
26
+ */
27
+ export declare function resolveOptions(input?: ConverterOptions): ResolvedOptions;
28
+ //# sourceMappingURL=options.d.ts.map
@@ -0,0 +1,25 @@
1
+ import type { FontFace } from './fonts.ts';
2
+ import type { DocumentFontMetadata } from './ooxml.ts';
3
+ import type { ResolvedOptions } from './options.ts';
4
+ import type { WasmEngine } from './engine.ts';
5
+ /** One conversion request executed inside the Node worker. */
6
+ export interface WasmConversionRequest {
7
+ readonly engine: WasmEngine;
8
+ readonly bytes: Uint8Array;
9
+ readonly extension: string;
10
+ readonly options: ResolvedOptions;
11
+ readonly document: DocumentFontMetadata;
12
+ readonly faces: readonly FontFace[];
13
+ }
14
+ /** Owned PDF bytes and declared families the installed catalog could not provide. */
15
+ export interface WasmConversionResult {
16
+ readonly pdf: Uint8Array;
17
+ readonly missingFonts: string[];
18
+ }
19
+ /**
20
+ * Convert bounded source bytes; return owned PDF bytes only after engine teardown.
21
+ * @param request - Engine installation, source bytes, limits, and font metadata.
22
+ * @returns the generated PDF bytes and the declared families the catalog could not provide.
23
+ */
24
+ export declare function convertWithWasm(request: WasmConversionRequest): Promise<WasmConversionResult>;
25
+ //# sourceMappingURL=wasm.d.ts.map
@@ -0,0 +1,14 @@
1
+ import type { Engine } from './engine.ts';
2
+ import type { FontFace } from './fonts.ts';
3
+ import type { ResolvedOptions } from './options.ts';
4
+ /** Worker input: inspected paths, validated limits, the resolved engine, and cached faces. */
5
+ export interface WorkerRequest {
6
+ readonly inputPath: string;
7
+ readonly extension: string;
8
+ readonly options: ResolvedOptions;
9
+ readonly engine: Engine;
10
+ readonly scratch: string;
11
+ /** Faces the previous conversion indexed; absent until the worker reports them. */
12
+ readonly fontFaces?: FontFace[] | undefined;
13
+ }
14
+ //# sourceMappingURL=worker.d.ts.map