@deepseek-ai/libreoffice-kit 0.0.1 → 0.0.2-rc4
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 +2 -0
- package/README.md +43 -47
- package/README.zh.md +35 -50
- package/assets/font-subset.json +70 -0
- package/assets/font-subset.wasm +0 -0
- package/lib/browser/assets.json +10 -0
- package/lib/browser/index.js +435 -0
- package/lib/browser/types/connection.d.ts +20 -0
- package/lib/browser/types/editor-engine.d.ts +50 -0
- package/lib/browser/types/editor-types.d.ts +141 -0
- package/lib/browser/types/editor.d.ts +9 -0
- package/lib/browser/types/engine-rendering.d.ts +3 -0
- package/lib/browser/types/engine-types.d.ts +17 -0
- package/lib/browser/types/font-channel.d.ts +20 -0
- package/lib/browser/types/index.d.ts +13 -0
- package/lib/browser/types/protocol.d.ts +117 -0
- package/lib/browser/types/rendering.d.ts +4 -0
- package/lib/browser/types/types.d.ts +90 -0
- package/lib/browser/types/worker.d.ts +2 -0
- package/lib/browser/worker.js +3711 -0
- package/lib/browser-assets.js +119 -0
- package/lib/cli.js +1303 -0
- package/lib/document.js +178 -0
- package/lib/engine-rendering.js +120 -0
- package/lib/font-config.js +46 -0
- package/lib/font-source.js +344 -0
- package/lib/font-worker.js +712 -0
- package/lib/index.js +319 -109
- package/lib/rendering.js +99 -0
- package/lib/sheet-geometry.js +111 -0
- package/lib/types/browser-assets.d.ts +15 -0
- package/lib/types/cli.d.ts +3 -0
- package/lib/types/document.d.ts +1 -1
- package/lib/types/engine-rendering.d.ts +15 -0
- package/lib/types/engine.d.ts +5 -5
- package/lib/types/font-config.d.ts +24 -0
- package/lib/types/font-full.d.ts +13 -0
- package/lib/types/font-loader.d.ts +1 -7
- package/lib/types/font-request.d.ts +12 -0
- package/lib/types/font-source-types.d.ts +82 -0
- package/lib/types/font-source.d.ts +10 -0
- package/lib/types/font-subsets.d.ts +35 -0
- package/lib/types/font-worker.d.ts +2 -0
- package/lib/types/fonts.d.ts +9 -29
- package/lib/types/harfbuzz-subset.d.ts +11 -0
- package/lib/types/image-operations.d.ts +58 -0
- package/lib/types/image-renderer.d.ts +6 -0
- package/lib/types/index.d.ts +25 -2
- package/lib/types/native.d.ts +4 -2
- package/lib/types/operations.d.ts +41 -0
- package/lib/types/png.d.ts +2 -0
- package/lib/types/profile.d.ts +8 -0
- package/lib/types/rendering.d.ts +41 -0
- package/lib/types/runtime.d.ts +14 -0
- package/lib/types/sheet-geometry.d.ts +38 -0
- package/lib/types/unicode-scripts.d.ts +18 -0
- package/lib/types/wasm.d.ts +76 -1
- package/lib/types/worker.d.ts +3 -0
- package/lib/worker.js +1012 -237
- package/licenses/font-subset/harfbuzz-COPYING +42 -0
- package/licenses/font-subset/harfbuzzjs-LICENSE +19 -0
- package/licenses/javascript/fflate-LICENSE +21 -0
- package/licenses/javascript/saxes-LICENSE +64 -0
- package/licenses/javascript/xmlchars-LICENSE +18 -0
- package/package.json +59 -12
- package/sources/browser/packages/browser/package.json +22 -0
- package/sources/browser/packages/browser/src/connection.ts +168 -0
- package/sources/browser/packages/browser/src/editor-engine.ts +382 -0
- package/sources/browser/packages/browser/src/editor-types.ts +106 -0
- package/sources/browser/packages/browser/src/editor.ts +55 -0
- package/sources/browser/packages/browser/src/engine-rendering.ts +2 -0
- package/sources/browser/packages/browser/src/engine-types.ts +14 -0
- package/sources/browser/packages/browser/src/font-channel.ts +99 -0
- package/sources/browser/packages/browser/src/index.ts +39 -0
- package/sources/browser/packages/browser/src/protocol.ts +40 -0
- package/sources/browser/packages/browser/src/rendering.ts +3 -0
- package/sources/browser/packages/browser/src/types.ts +92 -0
- package/sources/browser/packages/browser/src/worker.ts +171 -0
- package/sources/browser/packages/browser/tsconfig.json +5 -0
- package/sources/browser/packages/browser/tsdown.config.ts +7 -0
- package/sources/browser/scripts/build-browser.mjs +74 -0
- package/sources/font-subset/engine/font-subset/README.md +23 -0
- package/sources/font-subset/engine/font-subset/README.zh.md +23 -0
- package/sources/font-subset/engine/font-subset/source.json +16 -0
- package/sources/font-subset/harfbuzzjs/config-override-subset.h +7 -0
- package/sources/font-subset/harfbuzzjs/harfbuzz-subset.symbols +34 -0
- package/sources/font-subset/scripts/build-font-subset.mjs +64 -0
- package/sources/font-subset/scripts/pack-utils.mjs +69 -0
- package/sources/font-subset/scripts/platform-matrix.mjs +100 -0
- package/sources/font-subset/scripts/verify-artifacts.mjs +260 -0
package/lib/rendering.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
//#region lib/types/rendering.js
|
|
2
|
+
const TWIPS_PER_CSS_PIXEL = 15;
|
|
3
|
+
const MAX_TILE_PIXELS = 16777216;
|
|
4
|
+
/** Split a region on its output-pixel grid, bounding the plan before allocating it. */
|
|
5
|
+
function splitRasterRectangle(rectangle, scale, limits) {
|
|
6
|
+
const { x, y, width, height } = rectangle;
|
|
7
|
+
const { maxPixels, maxDimension, maxTiles } = limits;
|
|
8
|
+
if (![
|
|
9
|
+
x,
|
|
10
|
+
y,
|
|
11
|
+
width,
|
|
12
|
+
height,
|
|
13
|
+
scale
|
|
14
|
+
].every(Number.isFinite) || x < 0 || y < 0 || width <= 0 || height <= 0 || scale <= 0 || !Number.isSafeInteger(maxPixels) || maxPixels < 1 || maxPixels > 16777216 || !Number.isSafeInteger(maxDimension) || maxDimension < 1 || maxDimension > 16777216 || !Number.isSafeInteger(maxTiles) || maxTiles < 0) throw new TypeError("Invalid raster splitting limits or rectangle.");
|
|
15
|
+
const pixelWidth = Math.ceil(width * scale - 1e-9), pixelHeight = Math.ceil(height * scale - 1e-9);
|
|
16
|
+
if (![pixelWidth, pixelHeight].every((value) => Number.isSafeInteger(value) && value > 0)) throw new RangeError("Raster dimensions exceed the coordinate range.");
|
|
17
|
+
let tileWidth = Math.min(pixelWidth, maxDimension), tileHeight = Math.min(pixelHeight, maxDimension);
|
|
18
|
+
if (tileWidth * tileHeight > maxPixels) {
|
|
19
|
+
const side = Math.floor(Math.sqrt(maxPixels));
|
|
20
|
+
if (tileWidth <= side) tileHeight = Math.floor(maxPixels / tileWidth);
|
|
21
|
+
else if (tileHeight <= side) tileWidth = Math.floor(maxPixels / tileHeight);
|
|
22
|
+
else {
|
|
23
|
+
tileWidth = side;
|
|
24
|
+
tileHeight = Math.min(tileHeight, Math.floor(maxPixels / tileWidth));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
const columns = Math.ceil(pixelWidth / tileWidth), rows = Math.ceil(pixelHeight / tileHeight);
|
|
28
|
+
if (columns * rows > maxTiles) throw new RangeError("Raster batch exceeds maxPages after worksheet splitting.");
|
|
29
|
+
const result = [];
|
|
30
|
+
for (let row = 0; row < rows; row++) for (let column = 0; column < columns; column++) {
|
|
31
|
+
const left = column * tileWidth / scale, top = row * tileHeight / scale;
|
|
32
|
+
result.push({
|
|
33
|
+
x: x + left,
|
|
34
|
+
y: y + top,
|
|
35
|
+
width: Math.min(tileWidth / scale, width - left),
|
|
36
|
+
height: Math.min(tileHeight / scale, height - top)
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return result;
|
|
40
|
+
}
|
|
41
|
+
/** Writer's zero-area parity placeholders have no visible page. Offsets stay in twips. */
|
|
42
|
+
function writerPages(rectangles) {
|
|
43
|
+
const pages = rectangles.split(";").filter((value) => value.trim()).flatMap((rectangle) => {
|
|
44
|
+
const fields = rectangle.split(",").map((value) => Number(value.trim()));
|
|
45
|
+
const [x, y, width, height] = fields;
|
|
46
|
+
if (fields.length !== 4 || x === void 0 || y === void 0 || width === void 0 || height === void 0 || fields.some((value) => !Number.isSafeInteger(value) || value < 0 || value > 2147483647) || width === 0 !== (height === 0) || x + width > 2147483647 || y + height > 2147483647) throw new Error("LibreOffice returned invalid page rectangles.");
|
|
47
|
+
return width === 0 ? [] : [{
|
|
48
|
+
x,
|
|
49
|
+
y,
|
|
50
|
+
width: width / 15,
|
|
51
|
+
height: height / 15,
|
|
52
|
+
part: -1
|
|
53
|
+
}];
|
|
54
|
+
});
|
|
55
|
+
if (pages.length === 0) throw new Error("LibreOffice returned no document pages.");
|
|
56
|
+
return pages;
|
|
57
|
+
}
|
|
58
|
+
/** Validate coordinates before allocation or wasm32 integer conversion. */
|
|
59
|
+
function tileDimensions(request, pages) {
|
|
60
|
+
const page = pages[request.pageIndex];
|
|
61
|
+
if (!Number.isSafeInteger(request.pageIndex) || !page || ![
|
|
62
|
+
request.x,
|
|
63
|
+
request.y,
|
|
64
|
+
request.width,
|
|
65
|
+
request.height,
|
|
66
|
+
request.scale
|
|
67
|
+
].every(Number.isFinite) || request.x < 0 || request.y < 0 || request.width <= 0 || request.height <= 0 || request.scale <= 0 || request.x + request.width > page.width + .001 || request.y + request.height > page.height + .001) throw new Error("Tile rectangle lies outside its page.");
|
|
68
|
+
const width = Math.ceil(request.width * request.scale - 1e-9);
|
|
69
|
+
const height = Math.ceil(request.height * request.scale - 1e-9);
|
|
70
|
+
if (width <= 0 || height <= 0 || !Number.isSafeInteger(width * height) || width * height > 16777216) throw new Error("Tile exceeds the 16 megapixel allocation limit.");
|
|
71
|
+
const twips = [
|
|
72
|
+
page.x + Math.round(request.x * 15),
|
|
73
|
+
page.y + Math.round(request.y * 15),
|
|
74
|
+
Math.round(request.width * 15),
|
|
75
|
+
Math.round(request.height * 15)
|
|
76
|
+
];
|
|
77
|
+
if (twips.some((value) => !Number.isSafeInteger(value) || value < 0 || value > 2147483647) || twips[0] + twips[2] > 2147483647 || twips[1] + twips[3] > 2147483647) throw new Error("Tile coordinates exceed the wasm32 range.");
|
|
78
|
+
return {
|
|
79
|
+
page,
|
|
80
|
+
width,
|
|
81
|
+
height
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/** Cairo/LO channels are premultiplied; PNG and ImageData require straight RGBA. */
|
|
85
|
+
function rgbaPixels(source, tileMode) {
|
|
86
|
+
if (tileMode !== 0 && tileMode !== 1 || source.length % 4 !== 0) throw new Error("LibreOffice returned an unsupported tile pixel format.");
|
|
87
|
+
const result = new Uint8ClampedArray(source.length);
|
|
88
|
+
for (let index = 0; index < source.length; index += 4) {
|
|
89
|
+
const alpha = source[index + 3];
|
|
90
|
+
const multiplier = alpha === 0 ? 0 : 255 / alpha;
|
|
91
|
+
result[index] = source[index + (tileMode === 1 ? 2 : 0)] * multiplier;
|
|
92
|
+
result[index + 1] = source[index + 1] * multiplier;
|
|
93
|
+
result[index + 2] = source[index + (tileMode === 1 ? 0 : 2)] * multiplier;
|
|
94
|
+
result[index + 3] = alpha;
|
|
95
|
+
}
|
|
96
|
+
return result;
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
export { MAX_TILE_PIXELS, TWIPS_PER_CSS_PIXEL, rgbaPixels, splitRasterRectangle, tileDimensions, writerPages };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
//#region lib/types/sheet-geometry.js
|
|
2
|
+
const MAX_COLUMN = 16383;
|
|
3
|
+
const MAX_ROW = 1048575;
|
|
4
|
+
function column(index) {
|
|
5
|
+
let name = "";
|
|
6
|
+
for (let value = index + 1; value > 0; value = Math.floor((value - 1) / 26)) name = String.fromCharCode(65 + (value - 1) % 26) + name;
|
|
7
|
+
return name;
|
|
8
|
+
}
|
|
9
|
+
function rangeName(range) {
|
|
10
|
+
return `${column(range.firstColumn)}${range.firstRow + 1}:${column(range.lastColumn)}${range.lastRow + 1}`;
|
|
11
|
+
}
|
|
12
|
+
function parseCellRange(value) {
|
|
13
|
+
const match = /^\$?([A-Z]{1,3})\$?([1-9]\d{0,6})(?::\$?([A-Z]{1,3})\$?([1-9]\d{0,6}))?$/i.exec(value);
|
|
14
|
+
if (!match) throw new TypeError("range must be an A1 cell or rectangle without a sheet prefix.");
|
|
15
|
+
const col = (name) => [...name.toUpperCase()].reduce((sum, c) => sum * 26 + c.charCodeAt(0) - 64, 0) - 1;
|
|
16
|
+
const firstColumn = col(match[1]);
|
|
17
|
+
const firstRow = Number(match[2]) - 1;
|
|
18
|
+
const lastColumn = col(match[3] ?? match[1]);
|
|
19
|
+
const lastRow = Number(match[4] ?? match[2]) - 1;
|
|
20
|
+
if (lastColumn < firstColumn || lastRow < firstRow || lastColumn > MAX_COLUMN || lastRow > MAX_ROW) throw new TypeError("range exceeds Calc worksheet bounds or has reversed endpoints.");
|
|
21
|
+
return {
|
|
22
|
+
firstColumn,
|
|
23
|
+
firstRow,
|
|
24
|
+
lastColumn,
|
|
25
|
+
lastRow
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function sheetPartInfo(value) {
|
|
29
|
+
const info = JSON.parse(value);
|
|
30
|
+
if (!info || typeof info.name !== "string" || ![0, 1].includes(info.visible) || ![0, 1].includes(info.rtllayout) || !Number.isInteger(info.lastcolumn) || !Number.isInteger(info.lastrow) || info.lastcolumn < 0 || info.lastrow < 0 || info.lastcolumn > MAX_COLUMN || info.lastrow > MAX_ROW) throw new Error("LibreOffice returned invalid worksheet data-area metadata.");
|
|
31
|
+
return info;
|
|
32
|
+
}
|
|
33
|
+
/** Formatting-only cells and standalone drawings do not enlarge LibreOffice's data area. */
|
|
34
|
+
function dataArea(info) {
|
|
35
|
+
return {
|
|
36
|
+
firstColumn: 0,
|
|
37
|
+
firstRow: 0,
|
|
38
|
+
lastColumn: info.lastcolumn,
|
|
39
|
+
lastRow: info.lastrow
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function spans(encoded, flags, maximum) {
|
|
43
|
+
if (typeof encoded !== "string" || encoded.length > 33554432) throw new Error("Invalid worksheet geometry span encoding.");
|
|
44
|
+
const tokens = encoded.trim().split(/\s+/);
|
|
45
|
+
let previous = -1;
|
|
46
|
+
let flag = 0;
|
|
47
|
+
const result = tokens.map((token, i) => {
|
|
48
|
+
const fields = token.split(":");
|
|
49
|
+
let value;
|
|
50
|
+
let end;
|
|
51
|
+
if (flags && i > 0) {
|
|
52
|
+
value = flag = 1 - flag;
|
|
53
|
+
end = Number(fields[0]);
|
|
54
|
+
if (fields.length !== 1) throw new Error("Invalid worksheet flag span.");
|
|
55
|
+
} else {
|
|
56
|
+
value = Number(fields[0]);
|
|
57
|
+
end = Number(fields[1]);
|
|
58
|
+
flag = value;
|
|
59
|
+
if (fields.length !== 2) throw new Error("Invalid worksheet size span.");
|
|
60
|
+
}
|
|
61
|
+
if (!Number.isSafeInteger(value) || value < 0 || (flags ? value > 1 : value > 65535) || !Number.isSafeInteger(end) || end <= previous || end > maximum) throw new Error("Invalid worksheet geometry span.");
|
|
62
|
+
previous = end;
|
|
63
|
+
return {
|
|
64
|
+
end,
|
|
65
|
+
value
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
if (previous !== maximum) throw new Error("Worksheet geometry does not cover the complete dimension.");
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
function dimension(data, first, last, maximum, scale) {
|
|
72
|
+
const sizes = spans(data?.sizes, false, maximum);
|
|
73
|
+
const hidden = spans(data?.hidden, true, maximum);
|
|
74
|
+
const filtered = spans(data?.filtered, true, maximum);
|
|
75
|
+
let position = 0, start = 0, index = 0, si = 0, hi = 0, fi = 0;
|
|
76
|
+
while (index <= last) {
|
|
77
|
+
const size = sizes[si], hide = hidden[hi], filter = filtered[fi];
|
|
78
|
+
const end = Math.min(size.end, hide.end, filter.end, last, index < first ? first - 1 : last);
|
|
79
|
+
const pixels = hide.value || filter.value || size.value === 0 ? 0 : Math.max(1, Math.floor(size.value * scale / 15));
|
|
80
|
+
if (index === first) start = position;
|
|
81
|
+
position += (end - index + 1) * pixels;
|
|
82
|
+
index = end + 1;
|
|
83
|
+
if (index > size.end) si++;
|
|
84
|
+
if (index > hide.end) hi++;
|
|
85
|
+
if (index > filter.end) fi++;
|
|
86
|
+
}
|
|
87
|
+
return [start / scale, (position - start) / scale];
|
|
88
|
+
}
|
|
89
|
+
/** Logical columns advance from A; LOK itself mirrors RTL sheet painting. No manual x inversion. */
|
|
90
|
+
function sheetRangeRectangle(geometry, range, scale) {
|
|
91
|
+
if (!Number.isFinite(scale) || scale <= 0 || scale > 16) throw new TypeError("Invalid worksheet raster scale.");
|
|
92
|
+
const [x, width] = dimension(geometry.columns, range.firstColumn, range.lastColumn, MAX_COLUMN, scale);
|
|
93
|
+
const [y, height] = dimension(geometry.rows, range.firstRow, range.lastRow, MAX_ROW, scale);
|
|
94
|
+
if (width <= 0 || height <= 0) throw new Error("The selected worksheet range is entirely hidden or filtered.");
|
|
95
|
+
if ([
|
|
96
|
+
x,
|
|
97
|
+
y,
|
|
98
|
+
width,
|
|
99
|
+
height,
|
|
100
|
+
x + width,
|
|
101
|
+
y + height
|
|
102
|
+
].some((value) => !Number.isFinite(value) || value * 15 > 2147483647)) throw new Error("The selected worksheet range exceeds the supported coordinate range.");
|
|
103
|
+
return {
|
|
104
|
+
x,
|
|
105
|
+
y,
|
|
106
|
+
width,
|
|
107
|
+
height
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
export { dataArea, parseCellRange, rangeName, sheetPartInfo, sheetRangeRectangle };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** A validated local resource. Servers should expose opaque URLs, not these filesystem paths. */
|
|
2
|
+
export interface BrowserAsset {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly bytes: number;
|
|
5
|
+
readonly sha256: string;
|
|
6
|
+
}
|
|
7
|
+
/** Exactly the resources consumed by the browser transport. */
|
|
8
|
+
export interface BrowserAssets {
|
|
9
|
+
readonly schemaVersion: 1;
|
|
10
|
+
readonly programDirectory: string;
|
|
11
|
+
readonly files: Readonly<Record<'worker' | 'loader' | 'wasm' | 'data' | 'metadata', BrowserAsset>>;
|
|
12
|
+
}
|
|
13
|
+
/** Validate package identity, resource paths, sizes, and hashes once for this immutable installation. */
|
|
14
|
+
export declare function resolveBrowserAssets(): Promise<BrowserAssets>;
|
|
15
|
+
//# sourceMappingURL=browser-assets.d.ts.map
|
package/lib/types/document.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DocumentFontMetadata } from './ooxml.ts';
|
|
2
2
|
import type { ResolvedOptions } from './options.ts';
|
|
3
3
|
/** Input suffixes accepted by the public converter. */
|
|
4
|
-
export declare const DOCUMENT_EXTENSIONS: readonly ["doc", "docx", "xls", "xlsx", "ppt", "pptx"];
|
|
4
|
+
export declare const DOCUMENT_EXTENSIONS: readonly ["doc", "docx", "odt", "xls", "xlsx", "ods", "ppt", "pptx", "odp"];
|
|
5
5
|
/**
|
|
6
6
|
* Inspect the input container before invoking LibreOffice's document importer.
|
|
7
7
|
* Compound-file streams and legacy font tables are interpreted by LibreOffice;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Shared bounded raster allocations for browser and Node engine owners. */
|
|
2
|
+
import { type EnginePage, type RasterTile, type TileRequest } from './rendering.ts';
|
|
3
|
+
export interface RasterModule {
|
|
4
|
+
readonly HEAPU32: Uint32Array;
|
|
5
|
+
ccall(name: string, returnType: string | null, argTypes: string[], args: unknown[]): number;
|
|
6
|
+
UTF8ToString(pointer: number): string;
|
|
7
|
+
}
|
|
8
|
+
export declare function numericCall(module: RasterModule, name: string, args: number[]): number;
|
|
9
|
+
/** Copy/free one engine-owned UTF-8 return value. */
|
|
10
|
+
export declare function engineString(module: RasterModule, name: string, types: string[], args: unknown[], failure: () => Error): string;
|
|
11
|
+
/** Paint into a temporary allocation; copy pixels before free or another engine call. */
|
|
12
|
+
export declare function renderRegion(module: RasterModule, document: number, request: TileRequest, pages: readonly EnginePage[], failure: () => Error, pdf?: boolean): RasterTile;
|
|
13
|
+
/** PDF page dimensions use the same twips ABI, with an immutable PDF page index as part. */
|
|
14
|
+
export declare function pdfPages(module: RasterModule, pdf: number, failure: () => Error): EnginePage[];
|
|
15
|
+
//# sourceMappingURL=engine-rendering.d.ts.map
|
package/lib/types/engine.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Engine-family version every installed engine package must carry. The engine
|
|
3
3
|
* family shares its release version with this Node API.
|
|
4
4
|
*/
|
|
5
|
-
export declare const ENGINE_VERSION = "0.0.
|
|
5
|
+
export declare const ENGINE_VERSION = "0.0.2-rc4";
|
|
6
6
|
/** Host diagnostic fields used to identify the runtime glibc version. */
|
|
7
7
|
export interface EngineHostReport {
|
|
8
8
|
readonly header?: {
|
|
@@ -56,12 +56,12 @@ export declare function installedPackageExists(name: string): boolean;
|
|
|
56
56
|
*/
|
|
57
57
|
export declare function platformTarget(platform?: string, arch?: string, report?: () => EngineHostReport): string | undefined;
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* Resolve the shared WASM engine on every supported operating system.
|
|
60
60
|
* @param resolvePackage - Package manifest resolver; injectable for selection tests.
|
|
61
|
-
* @param
|
|
61
|
+
* @param _packageExists - Retained positional compatibility with earlier resolvers.
|
|
62
62
|
* @param host - Process identification and diagnostic report.
|
|
63
|
-
* @returns the installed
|
|
63
|
+
* @returns the installed WASM engine; native packages never change selection.
|
|
64
64
|
*/
|
|
65
|
-
export declare function resolveEngine(resolvePackage?: (name: string) => string,
|
|
65
|
+
export declare function resolveEngine(resolvePackage?: (name: string) => string, _packageExists?: (name: string) => boolean, { platform, arch }?: EngineResolutionHost): Promise<Engine>;
|
|
66
66
|
export {};
|
|
67
67
|
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Browser-safe family ordering and Fontconfig XML shared by both WASM adapters. */
|
|
2
|
+
/**
|
|
3
|
+
* Case- and separator-insensitive family key used to compare names across sources.
|
|
4
|
+
* @param value - Family, style, or postscript name as recorded by a document or font.
|
|
5
|
+
* @returns The normalized key.
|
|
6
|
+
*/
|
|
7
|
+
export declare function normalize(value: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Order named substitutions and their generic text family without excluding unlisted fonts.
|
|
10
|
+
* @param requested - Original family names, in document order.
|
|
11
|
+
* @param groups - Ordered family groups shared with Fontconfig aliases.
|
|
12
|
+
* @param pitch - VCL pitch; one requests a monospaced fallback.
|
|
13
|
+
* @param symbols - Whether symbol alternatives precede the generic fallback.
|
|
14
|
+
* @returns distinct family names, with original requests first.
|
|
15
|
+
*/
|
|
16
|
+
export declare function fontFamilyPriority(requested: readonly string[], groups: readonly (readonly string[])[], pitch?: number, symbols?: boolean): string[];
|
|
17
|
+
/**
|
|
18
|
+
* Fontconfig XML restricts WASM discovery to imported originals in MEMFS.
|
|
19
|
+
* @param families - Ordered family groups; the first name of each group is its canonical spelling.
|
|
20
|
+
* @param requested - Additional family names the document declared.
|
|
21
|
+
* @returns the fontconfig document written into the module's memory filesystem.
|
|
22
|
+
*/
|
|
23
|
+
export declare function memoryFontConfig(families: readonly (readonly string[])[], requested?: Iterable<string>): string;
|
|
24
|
+
//# sourceMappingURL=font-config.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type FontFace } from './fonts.ts';
|
|
2
|
+
import type { ResolvedOptions } from './options.ts';
|
|
3
|
+
export type FontFileFormat = 'ttf' | 'otf' | 'ttc';
|
|
4
|
+
export declare function fontFileFormat(bytes: Uint8Array): FontFileFormat;
|
|
5
|
+
/** Keep full names, encoding tables and glyphs. Apple dfont containers expose one complete sfnt resource. */
|
|
6
|
+
export declare function fullFontFile(face: FontFace): {
|
|
7
|
+
bytes: Uint8Array;
|
|
8
|
+
sourceHash: string;
|
|
9
|
+
format: FontFileFormat;
|
|
10
|
+
};
|
|
11
|
+
/** Mount a fixed bounded set before PDFium performs its first installed-font enumeration. */
|
|
12
|
+
export declare function preloadPdfFonts(options: ResolvedOptions, faces: readonly FontFace[], install: (name: string, bytes: Uint8Array) => void): void;
|
|
13
|
+
//# sourceMappingURL=font-full.d.ts.map
|
|
@@ -32,11 +32,5 @@ export type FontInstaller = (name: string, bytes: Buffer) => string;
|
|
|
32
32
|
export declare function createFontLoader(options: ResolvedOptions, document: DocumentFontMetadata, install: FontInstaller, faces: readonly FontFace[]): FontLoader;
|
|
33
33
|
/** Supply native imports and seed WASM's first usable default font. */
|
|
34
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;
|
|
35
|
+
export { memoryFontConfig } from './font-config.ts';
|
|
42
36
|
//# sourceMappingURL=font-loader.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** VCL attributes LibreOffice requests one family for. */
|
|
2
|
+
export interface FontMatchRequest {
|
|
3
|
+
readonly family: string;
|
|
4
|
+
readonly style: string;
|
|
5
|
+
readonly weight: number;
|
|
6
|
+
readonly italic: number;
|
|
7
|
+
readonly width: number;
|
|
8
|
+
readonly pitch: number;
|
|
9
|
+
readonly language: string;
|
|
10
|
+
readonly codePoints: readonly number[];
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=font-request.d.ts.map
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/** Installed font files exposed without disclosing Host filesystem paths. */
|
|
2
|
+
import type { FontMatchRequest } from './font-request.ts';
|
|
3
|
+
export type { FontMatchRequest } from './font-request.ts';
|
|
4
|
+
/** Full mode preserves font names, encoding and all glyphs for PDFium. */
|
|
5
|
+
export interface FontResolveRequest extends FontMatchRequest {
|
|
6
|
+
readonly mode?: 'subset' | 'full';
|
|
7
|
+
}
|
|
8
|
+
/** Content identity of one deterministic physical-face Unicode-script subset. */
|
|
9
|
+
export type FontAssetId = string & {
|
|
10
|
+
readonly __fontAssetId: unique symbol;
|
|
11
|
+
};
|
|
12
|
+
/** A matched file available through the same font source lifetime. */
|
|
13
|
+
export interface FontAsset {
|
|
14
|
+
readonly id: FontAssetId;
|
|
15
|
+
readonly bytes: number;
|
|
16
|
+
readonly family: string;
|
|
17
|
+
/** Browser-only VCL identity distinguishing subsets with the same original family/style. */
|
|
18
|
+
readonly alias: string;
|
|
19
|
+
/** Full assets preserve original names; subset remains the default. */
|
|
20
|
+
readonly mode?: 'full';
|
|
21
|
+
readonly format?: 'ttf' | 'otf' | 'ttc';
|
|
22
|
+
}
|
|
23
|
+
/** Matched font subsets and an unavailable requested family, when applicable. */
|
|
24
|
+
export interface FontResolution {
|
|
25
|
+
readonly fonts: readonly FontAsset[];
|
|
26
|
+
readonly missingFamily?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Font discovery limits; omitted values use the Node converter's font defaults. */
|
|
29
|
+
export interface FontSourceOptions {
|
|
30
|
+
readonly fontDirectories?: readonly string[];
|
|
31
|
+
readonly fontFallbacks?: readonly (readonly string[])[];
|
|
32
|
+
readonly maxFontFiles?: number;
|
|
33
|
+
readonly maxFontFileBytes?: number;
|
|
34
|
+
/** Retained subset bytes in the font Worker; defaults to 128 MiB. */
|
|
35
|
+
readonly maxCachedSubsetBytes?: number;
|
|
36
|
+
}
|
|
37
|
+
/** One lazily indexed Host font catalog with all CPU and file work in its Worker. */
|
|
38
|
+
export interface FontSource {
|
|
39
|
+
/** Resolved ordered font family preferences shared with browser Fontconfig. */
|
|
40
|
+
readonly fontFallbacks: readonly (readonly string[])[];
|
|
41
|
+
/**
|
|
42
|
+
* Select deterministic Unicode-script subsets using LibreOffice's requested attributes.
|
|
43
|
+
* @param request - Family, style, language, and required Unicode scalars.
|
|
44
|
+
* @param signal - Checked before dispatch and before publishing the result.
|
|
45
|
+
* @returns subset content identities with no Host paths.
|
|
46
|
+
*/
|
|
47
|
+
resolve(request: FontResolveRequest, signal?: AbortSignal): Promise<FontResolution>;
|
|
48
|
+
/**
|
|
49
|
+
* Read or regenerate a selected subset while its original font remains unchanged.
|
|
50
|
+
* @param id - Identity returned by resolve in this source lifetime.
|
|
51
|
+
* @param signal - Checked before dispatch and before publishing the result.
|
|
52
|
+
* @returns caller-owned subset sfnt bytes; changed or unknown files reject.
|
|
53
|
+
*/
|
|
54
|
+
read(id: FontAssetId, signal?: AbortSignal): Promise<Uint8Array>;
|
|
55
|
+
/** Stop pending work, terminate the Worker, and await its exit. */
|
|
56
|
+
dispose(): Promise<void>;
|
|
57
|
+
}
|
|
58
|
+
/** Parent-to-worker operations; neither message contains a caller-selected file path. */
|
|
59
|
+
export type FontCommand = {
|
|
60
|
+
readonly id: number;
|
|
61
|
+
readonly kind: 'resolve';
|
|
62
|
+
readonly request: FontResolveRequest;
|
|
63
|
+
} | {
|
|
64
|
+
readonly id: number;
|
|
65
|
+
readonly kind: 'read';
|
|
66
|
+
readonly asset: FontAssetId;
|
|
67
|
+
};
|
|
68
|
+
/** Worker replies retain their operation discriminator across structured cloning. */
|
|
69
|
+
export type FontReply = {
|
|
70
|
+
readonly id: number;
|
|
71
|
+
readonly kind: 'resolved';
|
|
72
|
+
readonly value: FontResolution;
|
|
73
|
+
} | {
|
|
74
|
+
readonly id: number;
|
|
75
|
+
readonly kind: 'bytes';
|
|
76
|
+
readonly value: Uint8Array;
|
|
77
|
+
} | {
|
|
78
|
+
readonly id: number;
|
|
79
|
+
readonly kind: 'failed';
|
|
80
|
+
readonly message: string;
|
|
81
|
+
};
|
|
82
|
+
//# sourceMappingURL=font-source-types.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FontSource, FontSourceOptions } from './font-source-types.ts';
|
|
2
|
+
export type { FontAsset, FontAssetId, FontMatchRequest, FontResolveRequest, FontResolution, FontSource, FontSourceOptions } from './font-source-types.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Create a font catalog without loading a LibreOffice engine or reading fonts yet.
|
|
5
|
+
* @param options - Font directories, fallback groups, and discovery limits.
|
|
6
|
+
* @returns a source whose first operation starts its private Worker. Cancellation
|
|
7
|
+
* discards a result after dispatched work settles; dispose terminates all work.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createFontSource(options?: FontSourceOptions): FontSource;
|
|
10
|
+
//# sourceMappingURL=font-source.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { FontIndexOptions } from './fonts.ts';
|
|
2
|
+
import type { FontAssetId, FontResolution, FontResolveRequest } from './font-source-types.ts';
|
|
3
|
+
/** Source limits and resolved family preferences passed to the private font Worker. */
|
|
4
|
+
export interface FontSubsetOptions extends FontIndexOptions {
|
|
5
|
+
readonly fallbackFamilies: readonly (readonly string[])[];
|
|
6
|
+
readonly maxCachedSubsetBytes: number;
|
|
7
|
+
}
|
|
8
|
+
/** One Worker-owned font index and LRU whose byte budget excludes transient subsetting input/output. */
|
|
9
|
+
export declare class FontSubsetSource {
|
|
10
|
+
private readonly options;
|
|
11
|
+
private snapshot;
|
|
12
|
+
private catalog;
|
|
13
|
+
private readonly selected;
|
|
14
|
+
private readonly partitions;
|
|
15
|
+
private readonly cached;
|
|
16
|
+
private cachedBytes;
|
|
17
|
+
/** @param options - Resolved discovery, fallback, and retained subset limits. */
|
|
18
|
+
constructor(options: FontSubsetOptions);
|
|
19
|
+
private retain;
|
|
20
|
+
private generate;
|
|
21
|
+
private describe;
|
|
22
|
+
/**
|
|
23
|
+
* Refresh installed files and select whole Unicode-script subsets for matching physical faces.
|
|
24
|
+
* @param request - Requested family/style attributes and Unicode scalars.
|
|
25
|
+
* @returns reusable subset identities; unavailable characters remain unresolved.
|
|
26
|
+
*/
|
|
27
|
+
resolve(request: FontResolveRequest): Promise<FontResolution>;
|
|
28
|
+
/**
|
|
29
|
+
* Return caller-owned bytes, regenerating an evicted subset from its unchanged original.
|
|
30
|
+
* @param id - Subset identity previously returned by this source.
|
|
31
|
+
* @returns sfnt bytes copied so a Worker transfer cannot detach the retained cache entry.
|
|
32
|
+
*/
|
|
33
|
+
read(id: FontAssetId): Promise<Uint8Array<ArrayBuffer>>;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=font-subsets.d.ts.map
|
package/lib/types/fonts.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import type { FontMatchRequest } from './font-request.ts';
|
|
2
|
+
export type { FontMatchRequest } from './font-request.ts';
|
|
3
|
+
export { fontFamilyPriority, normalize } from './font-config.ts';
|
|
1
4
|
import type { Font, FontCollection } from 'fontkit';
|
|
2
5
|
/** One inclusive Unicode range a physical face renders. */
|
|
3
6
|
export type GlyphRange = [number, number];
|
|
@@ -21,17 +24,6 @@ export interface FontFace {
|
|
|
21
24
|
/** Decoded glyph ranges; absent until a match reads this face's coverage. */
|
|
22
25
|
coverage?: GlyphRange[];
|
|
23
26
|
}
|
|
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
27
|
/** Selected physical files and the requested family the catalog could not find. */
|
|
36
28
|
export interface FontMatchResult {
|
|
37
29
|
readonly fonts: FontFace[];
|
|
@@ -41,6 +33,8 @@ export interface FontMatchResult {
|
|
|
41
33
|
export interface SystemFontCatalogOptions {
|
|
42
34
|
readonly faces: readonly FontFace[];
|
|
43
35
|
readonly fallbackFamilies: readonly (readonly string[])[];
|
|
36
|
+
/** Whole-file consumers deduplicate collections; subset consumers retain each selected face. */
|
|
37
|
+
readonly deduplicateBy?: 'file' | 'face';
|
|
44
38
|
}
|
|
45
39
|
/** Host font roots and physical file limits. */
|
|
46
40
|
export interface FontIndexOptions {
|
|
@@ -53,21 +47,6 @@ export interface FontIndexOptions {
|
|
|
53
47
|
* @returns whether it means the path is not a usable font source.
|
|
54
48
|
*/
|
|
55
49
|
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
50
|
/**
|
|
72
51
|
* Discover system and per-user font roots using the selected platform's path separators.
|
|
73
52
|
* @param platform - Host operating system.
|
|
@@ -109,9 +88,10 @@ export declare function faceMetrics(font: Pick<Font, 'OS/2' | 'post'>): {
|
|
|
109
88
|
/**
|
|
110
89
|
* Snapshot eligible local font metadata without retaining font bytes or decoding glyph coverage.
|
|
111
90
|
* @param options - Host font roots and physical file limits.
|
|
112
|
-
* @
|
|
91
|
+
* @param previous - Optional prior snapshot whose unchanged physical files can reuse parsed metadata.
|
|
92
|
+
* @returns current metadata; changed and newly installed files are decoded again.
|
|
113
93
|
*/
|
|
114
|
-
export declare function indexSystemFonts(options: FontIndexOptions): FontFace[];
|
|
94
|
+
export declare function indexSystemFonts(options: FontIndexOptions, previous?: readonly FontFace[]): FontFace[];
|
|
115
95
|
/** Conversion-local glyph coverage over the converter's first metadata snapshot. */
|
|
116
96
|
export declare class SystemFontCatalog {
|
|
117
97
|
private readonly options;
|
|
@@ -126,7 +106,7 @@ export declare class SystemFontCatalog {
|
|
|
126
106
|
* generic families, then other glyph-covering faces.
|
|
127
107
|
* @param request - VCL family/style attributes and Unicode scalars missing from its current font.
|
|
128
108
|
* @param signal - cancellation checked between synchronous font reads.
|
|
129
|
-
* @returns selected physical
|
|
109
|
+
* @returns selected files or physical faces according to deduplicateBy; absent glyphs remain unresolved.
|
|
130
110
|
* @throws if an indexed font changes or cannot be read during glyph matching.
|
|
131
111
|
*/
|
|
132
112
|
match(request: FontMatchRequest, signal: AbortSignal): FontMatchResult;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Exact upstream subset source and heap-growth recipe, included in generated subset identities. */
|
|
2
|
+
export declare const FONT_SUBSET_VERSION = "harfbuzzjs-1.6.1-hb-36cb489-growth-v1";
|
|
3
|
+
/**
|
|
4
|
+
* Extract and subset one physical face without renaming it or instancing variable axes.
|
|
5
|
+
* @param original - TTF, OTF, or collection bytes.
|
|
6
|
+
* @param faceIndex - Collection face index; zero for a standalone face.
|
|
7
|
+
* @param points - Unicode scalars, including any required variation selectors.
|
|
8
|
+
* @returns caller-owned sfnt bytes; all layout scripts/features and glyph closure remain enabled.
|
|
9
|
+
*/
|
|
10
|
+
export declare function subsetFont(original: Uint8Array, faceIndex: number, points: readonly number[]): Promise<Uint8Array>;
|
|
11
|
+
//# sourceMappingURL=harfbuzz-subset.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { type Rectangle } from './sheet-geometry.ts';
|
|
2
|
+
export declare const IMAGE_FORMATS: readonly ["doc", "docx", "odt", "xls", "xlsx", "ods", "ppt", "pptx", "odp", "pdf"];
|
|
3
|
+
export interface RenderImagesRequest {
|
|
4
|
+
readonly inputPath: string;
|
|
5
|
+
/** Must not exist. A failed or cancelled batch removes this entire new directory. */
|
|
6
|
+
readonly outputDir: string;
|
|
7
|
+
/** One-based physical pages/slides; forbidden for worksheets. Default: all. */
|
|
8
|
+
readonly pages?: 'all' | readonly number[];
|
|
9
|
+
/** Calc only. Exact worksheet name. Without it, render each visible worksheet's data area. */
|
|
10
|
+
readonly sheet?: string;
|
|
11
|
+
/** Calc only. A1 rectangle, requiring an exact sheet. Default: A1 through the last data cell. */
|
|
12
|
+
readonly range?: string;
|
|
13
|
+
/** Raster DPI. Default 144, range 24–600. */
|
|
14
|
+
readonly dpi?: number;
|
|
15
|
+
/** Total output image limit, including worksheet fragments. Never truncates. Default: 100. */
|
|
16
|
+
readonly maxPages?: number;
|
|
17
|
+
/** Per-image pixel limit. Default and maximum: 16777216. */
|
|
18
|
+
readonly maxPixels?: number;
|
|
19
|
+
/** Per-image width/height limit in output pixels. Default: 8192. */
|
|
20
|
+
readonly maxDimension?: number;
|
|
21
|
+
}
|
|
22
|
+
export interface RenderedImage {
|
|
23
|
+
readonly index: number;
|
|
24
|
+
readonly page?: number;
|
|
25
|
+
readonly sheet?: string;
|
|
26
|
+
readonly range?: string;
|
|
27
|
+
readonly rtl?: boolean;
|
|
28
|
+
readonly path: string;
|
|
29
|
+
readonly width: number;
|
|
30
|
+
readonly height: number;
|
|
31
|
+
/** Source rectangle in CSS pixels at 96 DPI, before raster scale. */
|
|
32
|
+
readonly rectangle: Rectangle;
|
|
33
|
+
readonly byteLength: number;
|
|
34
|
+
}
|
|
35
|
+
export interface RenderImagesResult {
|
|
36
|
+
readonly schemaVersion: 1;
|
|
37
|
+
readonly backend: 'wasm';
|
|
38
|
+
readonly rasterEngine: 'libreoffice' | 'pdfium';
|
|
39
|
+
readonly source: 'saved';
|
|
40
|
+
readonly inputPath: string;
|
|
41
|
+
readonly sourceSha256: string;
|
|
42
|
+
readonly dpi: number;
|
|
43
|
+
/** Total physical pages/slides, or visible worksheets; images contains the selected subset. */
|
|
44
|
+
readonly pageCount: number;
|
|
45
|
+
readonly images: readonly RenderedImage[];
|
|
46
|
+
readonly missingFonts: string[];
|
|
47
|
+
}
|
|
48
|
+
export interface ImageRenderSpec extends RenderImagesRequest {
|
|
49
|
+
readonly kind: 'images';
|
|
50
|
+
readonly extension: string;
|
|
51
|
+
readonly dpi: number;
|
|
52
|
+
readonly maxPages: number;
|
|
53
|
+
readonly maxPixels: number;
|
|
54
|
+
readonly maxDimension: number;
|
|
55
|
+
}
|
|
56
|
+
export declare function resolveImageRender(request: RenderImagesRequest): ImageRenderSpec;
|
|
57
|
+
export declare function selectedPages(pages: 'all' | readonly number[] | undefined, count: number, limit: number): number[];
|
|
58
|
+
//# sourceMappingURL=image-operations.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type WasmConversionRequest } from './wasm.ts';
|
|
2
|
+
import { type ImageRenderSpec, type RenderImagesResult } from './image-operations.ts';
|
|
3
|
+
export declare function renderImagesWithWasm(request: Omit<WasmConversionRequest, 'operation'> & {
|
|
4
|
+
operation: ImageRenderSpec;
|
|
5
|
+
}): Promise<RenderImagesResult>;
|
|
6
|
+
//# sourceMappingURL=image-renderer.d.ts.map
|