@deepseek-ai/libreoffice-kit 0.0.2-rc4 → 0.0.2-rc6
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.
- package/NOTICE +238 -0
- package/README.md +5 -3
- package/README.zh.md +3 -3
- package/assets/font-subset.json +4 -4
- package/lib/browser/assets.json +2 -2
- package/lib/browser/index.js +92 -72
- package/lib/browser/types/connection.d.ts +3 -3
- package/lib/browser/types/font-channel.d.ts +5 -4
- package/lib/browser/types/index.d.ts +2 -2
- package/lib/browser/types/office-engine.d.ts +48 -0
- package/lib/browser/types/office-types.d.ts +107 -0
- package/lib/browser/types/office.d.ts +4 -0
- package/lib/browser/types/protocol.d.ts +34 -37
- package/lib/browser/types/types.d.ts +3 -1
- package/lib/browser/worker.js +338 -507
- package/lib/browser-assets.js +1 -1
- package/lib/cli.js +91 -58
- package/lib/font-source.js +89 -56
- package/lib/font-worker.js +717 -45
- package/lib/index.js +91 -58
- package/lib/types/default-fonts.d.ts +3 -0
- package/lib/types/engine.d.ts +1 -1
- package/lib/types/font-preferences-data.d.ts +16 -0
- package/lib/types/font-preferences.d.ts +29 -0
- package/lib/types/font-source-types.d.ts +2 -0
- package/lib/types/fonts.d.ts +11 -8
- package/lib/types/options.d.ts +1 -1
- package/lib/worker.js +707 -37
- package/package.json +3 -3
- package/sources/browser/packages/browser/package.json +2 -2
- package/sources/browser/packages/browser/src/connection.ts +8 -10
- package/sources/browser/packages/browser/src/font-channel.ts +22 -12
- package/sources/browser/packages/browser/src/index.ts +3 -3
- package/sources/browser/packages/browser/src/office-engine.ts +323 -0
- package/sources/browser/packages/browser/src/office-types.ts +77 -0
- package/sources/browser/packages/browser/src/office.ts +62 -0
- package/sources/browser/packages/browser/src/protocol.ts +19 -18
- package/sources/browser/packages/browser/src/types.ts +3 -1
- package/sources/browser/packages/browser/src/worker.ts +37 -33
- package/sources/browser/scripts/build-browser.mjs +9 -1
- package/sources/font-subset/scripts/platform-matrix.mjs +1 -1
- package/sources/font-subset/scripts/verify-artifacts.mjs +2 -2
- package/lib/browser/types/editor-engine.d.ts +0 -50
- package/lib/browser/types/editor-types.d.ts +0 -141
- package/lib/browser/types/editor.d.ts +0 -9
- package/sources/browser/packages/browser/src/editor-engine.ts +0 -382
- package/sources/browser/packages/browser/src/editor-types.ts +0 -106
- package/sources/browser/packages/browser/src/editor.ts +0 -55
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { FontState } from './protocol.ts';
|
|
2
|
+
import type { FontIdentity } from './protocol.ts';
|
|
2
3
|
import type { BrowserFontRequest, BrowserFontResult } from './types.ts';
|
|
3
4
|
/** Views shared by the owner and engine; only the engine uses Atomics.wait. */
|
|
4
5
|
export declare function fontViews(channel: SharedArrayBuffer): {
|
|
5
6
|
control: Int32Array;
|
|
6
7
|
bytes: Uint8Array;
|
|
7
8
|
};
|
|
8
|
-
/**
|
|
9
|
-
export declare function fontFrames(result: BrowserFontResult): Generator<{
|
|
9
|
+
/** Only uninstalled content crosses the channel; each family retains its own alias. */
|
|
10
|
+
export declare function fontFrames(result: BrowserFontResult, known?: readonly FontIdentity[]): Generator<{
|
|
10
11
|
state: FontState;
|
|
11
12
|
bytes: Uint8Array;
|
|
12
13
|
}>;
|
|
@@ -15,6 +16,6 @@ export interface EngineFontFace {
|
|
|
15
16
|
readonly path: string;
|
|
16
17
|
readonly family: string;
|
|
17
18
|
}
|
|
18
|
-
/** The synchronous reader installs immutable
|
|
19
|
-
export declare function createFontReader(channel: SharedArrayBuffer, timeoutMs: number, maxLoadedFontBytes: number, declaredFamilies: ReadonlyMap<string, string>, request: (request: BrowserFontRequest) => void, next: () => void, install: (path: string, bytes: Uint8Array) => void, missing: (families: readonly string[]) => void): (request: BrowserFontRequest) => EngineFontFace[];
|
|
19
|
+
/** The synchronous reader installs immutable font assets before returning their MEMFS paths and aliases. */
|
|
20
|
+
export declare function createFontReader(channel: SharedArrayBuffer, timeoutMs: number, maxLoadedFontBytes: number, declaredFamilies: ReadonlyMap<string, string>, request: (request: BrowserFontRequest, known: readonly FontIdentity[]) => void, next: () => void, install: (path: string, bytes: Uint8Array) => void, missing: (families: readonly string[]) => void): (request: BrowserFontRequest) => EngineFontFace[];
|
|
20
21
|
//# sourceMappingURL=font-channel.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BrowserDocument, BrowserDocumentOptions } from './types.ts';
|
|
2
2
|
export { BrowserRenderError } from './types.ts';
|
|
3
|
-
export {
|
|
4
|
-
export type * from './
|
|
3
|
+
export { openOfficeDocument } from './office.ts';
|
|
4
|
+
export type * from './office-types.ts';
|
|
5
5
|
export type { BrowserDocument, BrowserDocumentOptions, BrowserEngineAssets, BrowserFontRequest, BrowserFontResult, BrowserPage, BrowserRenderErrorCode, BrowserTile, BrowserTileRequest } from './types.ts';
|
|
6
6
|
/**
|
|
7
7
|
* Open a read-only document; each call owns an independent Worker.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { BrowserTile } from './types.ts';
|
|
2
|
+
import type { EmscriptenModule } from './engine-types.ts';
|
|
3
|
+
import type { OfficeOperation } from './protocol.ts';
|
|
4
|
+
import type { OfficeDocumentEvent, OfficeDocumentFormat, OfficeDocumentState, OfficeDocumentTileRequest, OfficeDocumentLayoutResult } from './office-types.ts';
|
|
5
|
+
/** One read-only document, driven exclusively by its Worker's messages and timer. */
|
|
6
|
+
export declare class OfficeEngine {
|
|
7
|
+
private readonly module;
|
|
8
|
+
private readonly document;
|
|
9
|
+
private readonly emit;
|
|
10
|
+
private readonly failure;
|
|
11
|
+
state: OfficeDocumentState;
|
|
12
|
+
private timer;
|
|
13
|
+
private readonly callbacks;
|
|
14
|
+
private geometryDirty;
|
|
15
|
+
private stopped;
|
|
16
|
+
private layoutWidth;
|
|
17
|
+
private viewport;
|
|
18
|
+
private captureView;
|
|
19
|
+
private readingView;
|
|
20
|
+
private commandResult;
|
|
21
|
+
constructor(module: EmscriptenModule, document: number, format: OfficeDocumentFormat, emit: (event: OfficeDocumentEvent) => void, failure: (error: unknown) => void);
|
|
22
|
+
private call;
|
|
23
|
+
private text;
|
|
24
|
+
private invoke;
|
|
25
|
+
private requireOpen;
|
|
26
|
+
/** Collect callbacks without reentering LibreOffice inside its callback. */
|
|
27
|
+
callback(type: number, payload: string): void;
|
|
28
|
+
/** Enforce the native read-only view before accepting any input. */
|
|
29
|
+
start(): Promise<void>;
|
|
30
|
+
private schedule;
|
|
31
|
+
/** Stop event processing before destroying the document. */
|
|
32
|
+
stop(): void;
|
|
33
|
+
/** Return the part whose cached coordinates changed, or -1 when part identities changed. */
|
|
34
|
+
private refreshGeometry;
|
|
35
|
+
private pump;
|
|
36
|
+
private flush;
|
|
37
|
+
/** The Worker permits only these typed reading operations, including at runtime. */
|
|
38
|
+
operation(operation: OfficeOperation): Promise<{
|
|
39
|
+
text?: string;
|
|
40
|
+
layout?: OfficeDocumentLayoutResult;
|
|
41
|
+
}>;
|
|
42
|
+
private configure;
|
|
43
|
+
/** Internal whitelist commands only; no arbitrary command crosses the public API. */
|
|
44
|
+
private command;
|
|
45
|
+
/** Direct tiles preserve the active view, navigation state and selection. */
|
|
46
|
+
render(request: OfficeDocumentTileRequest): BrowserTile;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=office-engine.d.ts.map
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/** Retained Office reading sessions; this API never exposes document mutation. */
|
|
2
|
+
import type { BrowserDocumentOptions, BrowserPage, BrowserRenderErrorCode, BrowserTile } from './types.ts';
|
|
3
|
+
/** Office containers supported by the reading engine. */
|
|
4
|
+
export type OfficeDocumentFormat = 'doc' | 'docx' | 'xls' | 'xlsx' | 'ppt' | 'pptx';
|
|
5
|
+
/** Source bytes, engine resources and Host fonts; all sessions are read-only. */
|
|
6
|
+
export type OfficeDocumentOptions = Omit<BrowserDocumentOptions, 'extension'> & {
|
|
7
|
+
readonly extension: OfficeDocumentFormat;
|
|
8
|
+
};
|
|
9
|
+
/** Document coordinates in CSS pixels at 96 DPI, independent of zoom. */
|
|
10
|
+
export interface OfficeDocumentRectangle extends BrowserPage {
|
|
11
|
+
readonly x: number;
|
|
12
|
+
readonly y: number;
|
|
13
|
+
}
|
|
14
|
+
/** One Writer document, Calc worksheet or Impress slide. */
|
|
15
|
+
export interface OfficeDocumentPart extends BrowserPage {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
}
|
|
18
|
+
/** Writer layout; other document types always remain paginated. */
|
|
19
|
+
export type OfficeDocumentLayout = 'paginated' | 'continuous';
|
|
20
|
+
/** A point in the previous layout, normally the upper visible line of body text. */
|
|
21
|
+
export interface OfficeDocumentAnchor {
|
|
22
|
+
readonly x: number;
|
|
23
|
+
readonly y: number;
|
|
24
|
+
}
|
|
25
|
+
/** Continuous width is the available content width in document CSS pixels. */
|
|
26
|
+
export type OfficeDocumentLayoutRequest = {
|
|
27
|
+
readonly mode: 'paginated';
|
|
28
|
+
readonly anchor?: OfficeDocumentAnchor;
|
|
29
|
+
} | {
|
|
30
|
+
readonly mode: 'continuous';
|
|
31
|
+
readonly width: number;
|
|
32
|
+
readonly anchor?: OfficeDocumentAnchor;
|
|
33
|
+
};
|
|
34
|
+
/** An optional body-text rectangle in the new layout for restoring reading position. */
|
|
35
|
+
export interface OfficeDocumentLayoutResult {
|
|
36
|
+
readonly changed: boolean;
|
|
37
|
+
readonly anchor?: OfficeDocumentRectangle;
|
|
38
|
+
}
|
|
39
|
+
/** Geometry and selection; cursor is a navigation/cell rectangle, never an editing caret. */
|
|
40
|
+
export interface OfficeDocumentState {
|
|
41
|
+
readonly documentType: 'text' | 'spreadsheet' | 'presentation';
|
|
42
|
+
readonly renderGeneration: number;
|
|
43
|
+
readonly layoutGeneration: number;
|
|
44
|
+
readonly layout: OfficeDocumentLayout;
|
|
45
|
+
readonly part: number;
|
|
46
|
+
readonly parts: readonly OfficeDocumentPart[];
|
|
47
|
+
/** Writer page rectangles in paginated mode; one continuous rectangle otherwise. */
|
|
48
|
+
readonly pages: readonly OfficeDocumentRectangle[];
|
|
49
|
+
readonly cursor: OfficeDocumentRectangle | null;
|
|
50
|
+
readonly selection: readonly OfficeDocumentRectangle[];
|
|
51
|
+
readonly graphicSelection: OfficeDocumentRectangle | null;
|
|
52
|
+
readonly cellAddress: string;
|
|
53
|
+
readonly cellFormula: string;
|
|
54
|
+
}
|
|
55
|
+
/** Primary-button selection; modifiers use LOK Shift (0x1000) / Control (0x2000). */
|
|
56
|
+
export interface OfficeDocumentPointer {
|
|
57
|
+
readonly action: 'down' | 'up' | 'move';
|
|
58
|
+
readonly x: number;
|
|
59
|
+
readonly y: number;
|
|
60
|
+
readonly buttons: number;
|
|
61
|
+
readonly modifiers: number;
|
|
62
|
+
readonly clicks: number;
|
|
63
|
+
}
|
|
64
|
+
/** Only navigation keys are accepted; no arbitrary character or key injection. */
|
|
65
|
+
export interface OfficeDocumentNavigation {
|
|
66
|
+
readonly key: 'left' | 'right' | 'up' | 'down' | 'home' | 'end' | 'pageUp' | 'pageDown';
|
|
67
|
+
readonly extend?: boolean;
|
|
68
|
+
readonly word?: boolean;
|
|
69
|
+
}
|
|
70
|
+
/** One region of the current part. Pixel density does not change document layout. */
|
|
71
|
+
export interface OfficeDocumentTileRequest extends OfficeDocumentRectangle {
|
|
72
|
+
readonly part: number;
|
|
73
|
+
readonly scale: number;
|
|
74
|
+
}
|
|
75
|
+
/** A null rectangle invalidates an entire part; negative part means every part. */
|
|
76
|
+
export type OfficeDocumentEvent = {
|
|
77
|
+
readonly type: 'state';
|
|
78
|
+
readonly state: OfficeDocumentState;
|
|
79
|
+
} | {
|
|
80
|
+
readonly type: 'invalidate';
|
|
81
|
+
readonly part: number;
|
|
82
|
+
readonly rectangle: OfficeDocumentRectangle | null;
|
|
83
|
+
readonly generation: number;
|
|
84
|
+
} | {
|
|
85
|
+
readonly type: 'error';
|
|
86
|
+
readonly code: BrowserRenderErrorCode;
|
|
87
|
+
readonly message: string;
|
|
88
|
+
};
|
|
89
|
+
/** Retain this session while hidden; dispose only when the document is closed. */
|
|
90
|
+
export interface OfficeDocument {
|
|
91
|
+
readonly state: OfficeDocumentState;
|
|
92
|
+
subscribe(listener: (event: OfficeDocumentEvent) => void): () => void;
|
|
93
|
+
pointer(event: OfficeDocumentPointer): Promise<void>;
|
|
94
|
+
navigate(event: OfficeDocumentNavigation): Promise<void>;
|
|
95
|
+
selectAll(): Promise<void>;
|
|
96
|
+
copy(): Promise<string>;
|
|
97
|
+
/** Select a bounded A1 cell or range on the current worksheet. */
|
|
98
|
+
goToCell(address: string): Promise<void>;
|
|
99
|
+
setPart(part: number): Promise<void>;
|
|
100
|
+
setViewport(rectangle: OfficeDocumentRectangle, scale: number): Promise<void>;
|
|
101
|
+
/** Coalesces pending widths; superseded callers observe the newest applied layout. */
|
|
102
|
+
setLayout(request: OfficeDocumentLayoutRequest): Promise<OfficeDocumentLayoutResult>;
|
|
103
|
+
/** Only the current part can be painted; queued requests for a former part reject with stale-part without changing selection. */
|
|
104
|
+
renderTile(request: OfficeDocumentTileRequest, signal?: AbortSignal): Promise<BrowserTile>;
|
|
105
|
+
dispose(): Promise<void>;
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=office-types.d.ts.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { OfficeDocument, OfficeDocumentOptions } from './office-types.ts';
|
|
2
|
+
/** Open one read-only Office model; source bytes remain owned by the caller. */
|
|
3
|
+
export declare function openOfficeDocument(options: OfficeDocumentOptions, signal?: AbortSignal): Promise<OfficeDocument>;
|
|
4
|
+
//# sourceMappingURL=office.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Private messages exchanged by the document owner and its single engine Worker. */
|
|
2
2
|
import type { BrowserDocumentOptions, BrowserFontRequest, BrowserPage, BrowserRenderErrorCode, BrowserTile, BrowserTileRequest } from './types.ts';
|
|
3
|
-
import type {
|
|
3
|
+
import type { OfficeDocumentEvent, OfficeDocumentNavigation, OfficeDocumentOptions, OfficeDocumentState, OfficeDocumentPointer, OfficeDocumentLayoutRequest, OfficeDocumentLayoutResult, OfficeDocumentTileRequest, OfficeDocumentRectangle } from './office-types.ts';
|
|
4
4
|
export declare const FONT_CHUNK_BYTES: number;
|
|
5
5
|
export declare const FONT_HEADER_BYTES = 8;
|
|
6
6
|
export declare const enum FontState {
|
|
@@ -11,19 +11,18 @@ export declare const enum FontState {
|
|
|
11
11
|
Error = 4,
|
|
12
12
|
Cancelled = 5
|
|
13
13
|
}
|
|
14
|
-
export type WorkerOptions = Omit<BrowserDocumentOptions |
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly
|
|
14
|
+
export type WorkerOptions = Omit<BrowserDocumentOptions | OfficeDocumentOptions, 'resolveFonts' | 'onMissingFonts'>;
|
|
15
|
+
export type OfficeOperation = {
|
|
16
|
+
readonly type: 'pointer';
|
|
17
|
+
readonly event: OfficeDocumentPointer;
|
|
18
|
+
} | {
|
|
19
|
+
readonly type: 'navigate';
|
|
20
|
+
readonly event: OfficeDocumentNavigation;
|
|
20
21
|
} | {
|
|
21
|
-
readonly type: '
|
|
22
|
-
readonly command: string;
|
|
23
|
-
readonly arguments?: BrowserCommandArguments;
|
|
22
|
+
readonly type: 'select-all';
|
|
24
23
|
} | {
|
|
25
|
-
readonly type: '
|
|
26
|
-
readonly
|
|
24
|
+
readonly type: 'cell';
|
|
25
|
+
readonly address: string;
|
|
27
26
|
} | {
|
|
28
27
|
readonly type: 'copy';
|
|
29
28
|
} | {
|
|
@@ -31,33 +30,30 @@ export type EditorOperation = {
|
|
|
31
30
|
readonly part: number;
|
|
32
31
|
} | {
|
|
33
32
|
readonly type: 'viewport';
|
|
34
|
-
readonly rectangle:
|
|
33
|
+
readonly rectangle: OfficeDocumentRectangle;
|
|
35
34
|
readonly scale: number;
|
|
36
35
|
} | {
|
|
37
|
-
readonly type: '
|
|
36
|
+
readonly type: 'layout';
|
|
37
|
+
readonly request: OfficeDocumentLayoutRequest;
|
|
38
38
|
};
|
|
39
39
|
export type OwnerMessage = {
|
|
40
40
|
readonly type: 'open';
|
|
41
41
|
readonly id: number;
|
|
42
42
|
readonly options: WorkerOptions;
|
|
43
43
|
readonly channel: SharedArrayBuffer;
|
|
44
|
-
readonly
|
|
44
|
+
readonly office?: boolean;
|
|
45
45
|
} | {
|
|
46
46
|
readonly type: 'tile';
|
|
47
47
|
readonly id: number;
|
|
48
48
|
readonly request: BrowserTileRequest;
|
|
49
49
|
} | {
|
|
50
|
-
readonly type: '
|
|
51
|
-
readonly id: number;
|
|
52
|
-
readonly request: BrowserEditorTileRequest;
|
|
53
|
-
} | {
|
|
54
|
-
readonly type: 'capture';
|
|
50
|
+
readonly type: 'office-tile';
|
|
55
51
|
readonly id: number;
|
|
56
|
-
readonly request:
|
|
52
|
+
readonly request: OfficeDocumentTileRequest;
|
|
57
53
|
} | {
|
|
58
|
-
readonly type: '
|
|
54
|
+
readonly type: 'office-operation';
|
|
59
55
|
readonly id: number;
|
|
60
|
-
readonly operation:
|
|
56
|
+
readonly operation: OfficeOperation;
|
|
61
57
|
} | {
|
|
62
58
|
readonly type: 'dispose';
|
|
63
59
|
readonly id: number;
|
|
@@ -68,23 +64,19 @@ export type WorkerMessage = {
|
|
|
68
64
|
readonly type: 'opened';
|
|
69
65
|
readonly id: number;
|
|
70
66
|
readonly pages: readonly BrowserPage[];
|
|
71
|
-
readonly
|
|
67
|
+
readonly office?: OfficeDocumentState;
|
|
72
68
|
} | {
|
|
73
69
|
readonly type: 'tile';
|
|
74
70
|
readonly id: number;
|
|
75
71
|
readonly tile: BrowserTile;
|
|
76
72
|
} | {
|
|
77
|
-
readonly type: '
|
|
78
|
-
readonly id: number;
|
|
79
|
-
readonly capture: BrowserEditorCapture;
|
|
80
|
-
} | {
|
|
81
|
-
readonly type: 'edited';
|
|
73
|
+
readonly type: 'office-result';
|
|
82
74
|
readonly id: number;
|
|
83
75
|
readonly text?: string;
|
|
84
|
-
readonly
|
|
76
|
+
readonly layout?: OfficeDocumentLayoutResult;
|
|
85
77
|
} | {
|
|
86
|
-
readonly type: '
|
|
87
|
-
readonly event:
|
|
78
|
+
readonly type: 'office-event';
|
|
79
|
+
readonly event: OfficeDocumentEvent;
|
|
88
80
|
} | {
|
|
89
81
|
readonly type: 'disposed';
|
|
90
82
|
readonly id: number;
|
|
@@ -97,20 +89,25 @@ export type WorkerMessage = {
|
|
|
97
89
|
} | {
|
|
98
90
|
readonly type: 'font';
|
|
99
91
|
readonly request: BrowserFontRequest;
|
|
92
|
+
readonly known: readonly FontIdentity[];
|
|
100
93
|
} | {
|
|
101
94
|
readonly type: 'font-next';
|
|
102
95
|
} | {
|
|
103
96
|
readonly type: 'missing-fonts';
|
|
104
97
|
readonly families: readonly string[];
|
|
105
98
|
};
|
|
99
|
+
/** Immutable bytes already installed in this document's MEMFS. */
|
|
100
|
+
export interface FontIdentity {
|
|
101
|
+
readonly id: string;
|
|
102
|
+
readonly bytes: number;
|
|
103
|
+
readonly format?: 'ttf' | 'otf' | 'ttc';
|
|
104
|
+
}
|
|
106
105
|
export interface FontHeader {
|
|
107
|
-
readonly fonts: readonly {
|
|
108
|
-
readonly id: string;
|
|
109
|
-
readonly bytes: number;
|
|
106
|
+
readonly fonts: readonly (FontIdentity & {
|
|
110
107
|
readonly family: string;
|
|
111
108
|
readonly alias: string;
|
|
112
|
-
readonly
|
|
113
|
-
}[];
|
|
109
|
+
readonly reference?: true;
|
|
110
|
+
})[];
|
|
114
111
|
readonly missingFamily?: string;
|
|
115
112
|
}
|
|
116
113
|
export {};
|
|
@@ -30,6 +30,8 @@ export interface BrowserFontResult {
|
|
|
30
30
|
readonly format?: 'ttf' | 'otf' | 'ttc';
|
|
31
31
|
}[];
|
|
32
32
|
readonly missingFamily?: string;
|
|
33
|
+
/** Missing scalars reported by the Host, independently of a substituted family. */
|
|
34
|
+
readonly unresolvedCodePoints?: readonly number[];
|
|
33
35
|
}
|
|
34
36
|
/** All sizes are CSS pixels at 96 pixels per inch. */
|
|
35
37
|
export interface BrowserPage {
|
|
@@ -81,7 +83,7 @@ export interface BrowserDocument {
|
|
|
81
83
|
dispose(): Promise<void>;
|
|
82
84
|
}
|
|
83
85
|
/** Stable failures callers may map to their own localized product copy. */
|
|
84
|
-
export type BrowserRenderErrorCode = 'unavailable' | 'invalid-document' | 'timeout' | 'font-limit' | 'font-unavailable' | 'disposed' | 'render-failed' | '
|
|
86
|
+
export type BrowserRenderErrorCode = 'unavailable' | 'invalid-document' | 'timeout' | 'font-limit' | 'font-unavailable' | 'disposed' | 'render-failed' | 'stale-part';
|
|
85
87
|
/** A rendering failure with a stable machine-readable category. */
|
|
86
88
|
export declare class BrowserRenderError extends Error {
|
|
87
89
|
readonly code: BrowserRenderErrorCode;
|