documents.js 4.0.26 → 4.1.0
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/README.md +10 -2
- package/dist/cell-typing-CEWlywIc.d.cts +22 -0
- package/dist/cell-typing-CEWlywIc.d.ts +22 -0
- package/dist/convert/codec.cjs +11 -10
- package/dist/convert/codec.js +2 -1
- package/dist/convert/composition-to-pdf.cjs +133 -0
- package/dist/convert/composition-to-pdf.d.cts +7 -0
- package/dist/convert/composition-to-pdf.d.ts +7 -0
- package/dist/convert/composition-to-pdf.js +131 -0
- package/dist/convert/composition.cjs +26 -127
- package/dist/convert/composition.d.cts +14 -4
- package/dist/convert/composition.d.ts +14 -4
- package/dist/convert/composition.js +20 -126
- package/dist/convert/convert.cjs +35 -75
- package/dist/convert/convert.d.cts +5 -20
- package/dist/convert/convert.d.ts +5 -20
- package/dist/convert/convert.js +2 -32
- package/dist/convert/from-pdf.cjs +44 -0
- package/dist/convert/from-pdf.d.cts +21 -0
- package/dist/convert/from-pdf.d.ts +21 -0
- package/dist/convert/from-pdf.js +34 -0
- package/dist/convert/local.cjs +2 -1
- package/dist/convert/local.js +2 -1
- package/dist/csv/read.d.cts +1 -1
- package/dist/csv/read.d.ts +1 -1
- package/dist/diagnostics-DVAXKgcf.d.cts +10 -0
- package/dist/diagnostics-DVAXKgcf.d.ts +10 -0
- package/dist/fonts/registry.d.cts +1 -19
- package/dist/fonts/registry.d.ts +1 -19
- package/dist/hsqldb/binary-script.d.cts +1 -1
- package/dist/hsqldb/binary-script.d.ts +1 -1
- package/dist/hsqldb/cache.d.cts +1 -1
- package/dist/hsqldb/cache.d.ts +1 -1
- package/dist/hsqldb/rowformat.d.cts +1 -24
- package/dist/hsqldb/rowformat.d.ts +1 -24
- package/dist/index.cjs +13 -11
- package/dist/index.d.cts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +4 -2
- package/dist/layout/cell-typing.d.cts +1 -21
- package/dist/layout/cell-typing.d.ts +1 -21
- package/dist/layout/reconstruct.cjs +4 -3
- package/dist/layout/reconstruct.d.cts +1 -1
- package/dist/layout/reconstruct.d.ts +1 -1
- package/dist/layout/reconstruct.js +2 -1
- package/dist/layout/shared.cjs +2 -2
- package/dist/layout/shared.js +1 -1
- package/dist/odb/read.d.cts +1 -1
- package/dist/odb/read.d.ts +1 -1
- package/dist/odb/report/content.d.cts +1 -1
- package/dist/odb/report/content.d.ts +1 -1
- package/dist/odb/report/source.d.cts +1 -1
- package/dist/odb/report/source.d.ts +1 -1
- package/dist/registry-BcBT-bnX.d.cts +20 -0
- package/dist/registry-D1Pu5XxB.d.ts +20 -0
- package/dist/rowformat-Cl2exlEh.d.cts +25 -0
- package/dist/rowformat-Cl2exlEh.d.ts +25 -0
- package/dist/svg/diagnostics.d.cts +1 -9
- package/dist/svg/diagnostics.d.ts +1 -9
- package/dist/svg/read.d.cts +1 -1
- package/dist/svg/read.d.ts +1 -1
- package/dist/svg/write.d.cts +1 -1
- package/dist/svg/write.d.ts +1 -1
- package/package.json +18 -3
package/dist/convert/convert.js
CHANGED
|
@@ -11,7 +11,7 @@ import { throwIfAborted } from "../ports/abort.js";
|
|
|
11
11
|
import { buildOdbTableCsv } from "../odb/csv.js";
|
|
12
12
|
import { readOdbTables } from "../odb/read.js";
|
|
13
13
|
import { odbTablesToSpreadsheetDocument } from "../odb/spreadsheet.js";
|
|
14
|
-
import { convertDocument } from "./composition.js";
|
|
14
|
+
import { convertDocument } from "./composition-to-pdf.js";
|
|
15
15
|
import { buildXlsxPackageFromContent, encodePackage } from "ooxml.js";
|
|
16
16
|
import { COLOR_BLACK, PAGE_SIZE_A4, assemblePackage } from "document-schema.js";
|
|
17
17
|
import { LAYOUT_FORMAT_VERSION, createFontMeasurer, createFontRegistry, loadMathFont, writePdf } from "pdf-codec";
|
|
@@ -94,33 +94,6 @@ function odfToPdf(bytes, options) {
|
|
|
94
94
|
}]));
|
|
95
95
|
return out;
|
|
96
96
|
}
|
|
97
|
-
function pdfToDocx(bytes, options) {
|
|
98
|
-
return convertDocument("pdf", "docx", bytes, options);
|
|
99
|
-
}
|
|
100
|
-
function pdfToPptx(bytes, options) {
|
|
101
|
-
return convertDocument("pdf", "pptx", bytes, options);
|
|
102
|
-
}
|
|
103
|
-
function pdfToOdt(bytes, options) {
|
|
104
|
-
return convertDocument("pdf", "odt", bytes, options);
|
|
105
|
-
}
|
|
106
|
-
function pdfToOdp(bytes, options) {
|
|
107
|
-
return convertDocument("pdf", "odp", bytes, options);
|
|
108
|
-
}
|
|
109
|
-
function pdfToOdg(bytes, options) {
|
|
110
|
-
return convertDocument("pdf", "odg", bytes, options);
|
|
111
|
-
}
|
|
112
|
-
function pdfToOds(bytes, options) {
|
|
113
|
-
return convertDocument("pdf", "ods", bytes, options);
|
|
114
|
-
}
|
|
115
|
-
function pdfToMarkdown(bytes, options) {
|
|
116
|
-
return convertDocument("pdf", "markdown", bytes, options);
|
|
117
|
-
}
|
|
118
|
-
function pdfToCsv(bytes, options) {
|
|
119
|
-
return convertDocument("pdf", "csv", bytes, options);
|
|
120
|
-
}
|
|
121
|
-
function pdfToSvg(bytes, options) {
|
|
122
|
-
return convertDocument("pdf", "svg", bytes, options);
|
|
123
|
-
}
|
|
124
97
|
function odtToDocx(bytes, options) {
|
|
125
98
|
return convertDocument("odt", "docx", bytes, options);
|
|
126
99
|
}
|
|
@@ -184,9 +157,6 @@ function odpToOdt(bytes, options) {
|
|
|
184
157
|
function xlsxToPdf(bytes, options) {
|
|
185
158
|
return convertDocument("xlsx", "pdf", bytes, options);
|
|
186
159
|
}
|
|
187
|
-
function pdfToXlsx(bytes, options) {
|
|
188
|
-
return convertDocument("pdf", "xlsx", bytes, options);
|
|
189
|
-
}
|
|
190
160
|
function xlsxToMarkdown(bytes, options) {
|
|
191
161
|
return convertDocument("xlsx", "markdown", bytes, options);
|
|
192
162
|
}
|
|
@@ -343,4 +313,4 @@ function odbReportToPdf(content, options) {
|
|
|
343
313
|
return out;
|
|
344
314
|
}
|
|
345
315
|
//#endregion
|
|
346
|
-
export { OdmUnresolvedSectionError, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, inlineOdmSectionToContentSection, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odgToSvg, odmToPdf, odpToOdt, odpToPdf, odpToPptx, odsToCsv, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf,
|
|
316
|
+
export { OdmUnresolvedSectionError, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, inlineOdmSectionToContentSection, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odgToSvg, odmToPdf, odpToOdt, odpToPdf, odpToPptx, odsToCsv, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, pptxToDocx, pptxToOdp, pptxToPdf, svgToOdg, svgToPdf, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_convert_composition = require("./composition.cjs");
|
|
3
|
+
//#region src/convert/from-pdf.ts
|
|
4
|
+
function pdfToDocx(bytes, options) {
|
|
5
|
+
return require_convert_composition.convertDocumentFromPdf("docx", bytes, options);
|
|
6
|
+
}
|
|
7
|
+
function pdfToPptx(bytes, options) {
|
|
8
|
+
return require_convert_composition.convertDocumentFromPdf("pptx", bytes, options);
|
|
9
|
+
}
|
|
10
|
+
function pdfToOdt(bytes, options) {
|
|
11
|
+
return require_convert_composition.convertDocumentFromPdf("odt", bytes, options);
|
|
12
|
+
}
|
|
13
|
+
function pdfToOdp(bytes, options) {
|
|
14
|
+
return require_convert_composition.convertDocumentFromPdf("odp", bytes, options);
|
|
15
|
+
}
|
|
16
|
+
function pdfToOdg(bytes, options) {
|
|
17
|
+
return require_convert_composition.convertDocumentFromPdf("odg", bytes, options);
|
|
18
|
+
}
|
|
19
|
+
function pdfToOds(bytes, options) {
|
|
20
|
+
return require_convert_composition.convertDocumentFromPdf("ods", bytes, options);
|
|
21
|
+
}
|
|
22
|
+
function pdfToMarkdown(bytes, options) {
|
|
23
|
+
return require_convert_composition.convertDocumentFromPdf("markdown", bytes, options);
|
|
24
|
+
}
|
|
25
|
+
function pdfToCsv(bytes, options) {
|
|
26
|
+
return require_convert_composition.convertDocumentFromPdf("csv", bytes, options);
|
|
27
|
+
}
|
|
28
|
+
function pdfToSvg(bytes, options) {
|
|
29
|
+
return require_convert_composition.convertDocumentFromPdf("svg", bytes, options);
|
|
30
|
+
}
|
|
31
|
+
function pdfToXlsx(bytes, options) {
|
|
32
|
+
return require_convert_composition.convertDocumentFromPdf("xlsx", bytes, options);
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
exports.pdfToCsv = pdfToCsv;
|
|
36
|
+
exports.pdfToDocx = pdfToDocx;
|
|
37
|
+
exports.pdfToMarkdown = pdfToMarkdown;
|
|
38
|
+
exports.pdfToOdg = pdfToOdg;
|
|
39
|
+
exports.pdfToOdp = pdfToOdp;
|
|
40
|
+
exports.pdfToOds = pdfToOds;
|
|
41
|
+
exports.pdfToOdt = pdfToOdt;
|
|
42
|
+
exports.pdfToPptx = pdfToPptx;
|
|
43
|
+
exports.pdfToSvg = pdfToSvg;
|
|
44
|
+
exports.pdfToXlsx = pdfToXlsx;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CsvWriteOptions, SvgWriteOptions } from "./convert.cjs";
|
|
2
|
+
import { DocumentPackage } from "document-schema.js";
|
|
3
|
+
import { PdfDiagnosticSink } from "pdf-codec";
|
|
4
|
+
//#region src/convert/from-pdf.d.ts
|
|
5
|
+
interface PdfToDocumentOptions {
|
|
6
|
+
readonly signal?: AbortSignal;
|
|
7
|
+
readonly sink?: PdfDiagnosticSink;
|
|
8
|
+
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
11
|
+
declare function pdfToPptx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
12
|
+
declare function pdfToOdt(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
13
|
+
declare function pdfToOdp(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
14
|
+
declare function pdfToOdg(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
15
|
+
declare function pdfToOds(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
16
|
+
declare function pdfToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
17
|
+
declare function pdfToCsv(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions & CsvWriteOptions): Uint8Array<ArrayBuffer>;
|
|
18
|
+
declare function pdfToSvg(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions & SvgWriteOptions): Uint8Array<ArrayBuffer>;
|
|
19
|
+
declare function pdfToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { PdfToDocumentOptions, pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CsvWriteOptions, SvgWriteOptions } from "./convert.js";
|
|
2
|
+
import { DocumentPackage } from "document-schema.js";
|
|
3
|
+
import { PdfDiagnosticSink } from "pdf-codec";
|
|
4
|
+
//#region src/convert/from-pdf.d.ts
|
|
5
|
+
interface PdfToDocumentOptions {
|
|
6
|
+
readonly signal?: AbortSignal;
|
|
7
|
+
readonly sink?: PdfDiagnosticSink;
|
|
8
|
+
readonly onDocument?: (pkg: DocumentPackage) => void;
|
|
9
|
+
}
|
|
10
|
+
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
11
|
+
declare function pdfToPptx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
12
|
+
declare function pdfToOdt(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
13
|
+
declare function pdfToOdp(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
14
|
+
declare function pdfToOdg(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
15
|
+
declare function pdfToOds(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
16
|
+
declare function pdfToMarkdown(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
17
|
+
declare function pdfToCsv(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions & CsvWriteOptions): Uint8Array<ArrayBuffer>;
|
|
18
|
+
declare function pdfToSvg(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions & SvgWriteOptions): Uint8Array<ArrayBuffer>;
|
|
19
|
+
declare function pdfToXlsx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { PdfToDocumentOptions, pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { convertDocumentFromPdf } from "./composition.js";
|
|
2
|
+
//#region src/convert/from-pdf.ts
|
|
3
|
+
function pdfToDocx(bytes, options) {
|
|
4
|
+
return convertDocumentFromPdf("docx", bytes, options);
|
|
5
|
+
}
|
|
6
|
+
function pdfToPptx(bytes, options) {
|
|
7
|
+
return convertDocumentFromPdf("pptx", bytes, options);
|
|
8
|
+
}
|
|
9
|
+
function pdfToOdt(bytes, options) {
|
|
10
|
+
return convertDocumentFromPdf("odt", bytes, options);
|
|
11
|
+
}
|
|
12
|
+
function pdfToOdp(bytes, options) {
|
|
13
|
+
return convertDocumentFromPdf("odp", bytes, options);
|
|
14
|
+
}
|
|
15
|
+
function pdfToOdg(bytes, options) {
|
|
16
|
+
return convertDocumentFromPdf("odg", bytes, options);
|
|
17
|
+
}
|
|
18
|
+
function pdfToOds(bytes, options) {
|
|
19
|
+
return convertDocumentFromPdf("ods", bytes, options);
|
|
20
|
+
}
|
|
21
|
+
function pdfToMarkdown(bytes, options) {
|
|
22
|
+
return convertDocumentFromPdf("markdown", bytes, options);
|
|
23
|
+
}
|
|
24
|
+
function pdfToCsv(bytes, options) {
|
|
25
|
+
return convertDocumentFromPdf("csv", bytes, options);
|
|
26
|
+
}
|
|
27
|
+
function pdfToSvg(bytes, options) {
|
|
28
|
+
return convertDocumentFromPdf("svg", bytes, options);
|
|
29
|
+
}
|
|
30
|
+
function pdfToXlsx(bytes, options) {
|
|
31
|
+
return convertDocumentFromPdf("xlsx", bytes, options);
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx };
|
package/dist/convert/local.cjs
CHANGED
|
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_convert_capability = require("./capability.cjs");
|
|
3
3
|
const require_convert_port = require("./port.cjs");
|
|
4
4
|
const require_convert_composition = require("./composition.cjs");
|
|
5
|
+
const require_convert_composition_to_pdf = require("./composition-to-pdf.cjs");
|
|
5
6
|
const require_convert_convert = require("./convert.cjs");
|
|
6
7
|
//#region src/convert/local.ts
|
|
7
8
|
const SUPPORTED_CONVERSIONS = (() => {
|
|
@@ -76,7 +77,7 @@ function createLocalDocumentConverter() {
|
|
|
76
77
|
});
|
|
77
78
|
}
|
|
78
79
|
if (require_convert_composition.resolveCompositionPlan(source.format, targetFormat) === void 0) return Promise.reject(new require_convert_capability.UnsupportedConversionError(source.format, targetFormat));
|
|
79
|
-
const bytes =
|
|
80
|
+
const bytes = require_convert_composition_to_pdf.convertDocument(source.format, targetFormat, source.bytes, {
|
|
80
81
|
signal: options.signal,
|
|
81
82
|
fonts: options.fonts,
|
|
82
83
|
onFontSubstitution,
|
package/dist/convert/local.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { UnsupportedConversionError } from "./capability.js";
|
|
2
2
|
import { DOCUMENT_FORMATS } from "./port.js";
|
|
3
|
-
import {
|
|
3
|
+
import { resolveCompositionPlan } from "./composition.js";
|
|
4
|
+
import { convertDocument } from "./composition-to-pdf.js";
|
|
4
5
|
import { odfToPdf } from "./convert.js";
|
|
5
6
|
//#region src/convert/local.ts
|
|
6
7
|
const SUPPORTED_CONVERSIONS = (() => {
|
package/dist/csv/read.d.cts
CHANGED
package/dist/csv/read.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/svg/diagnostics.d.ts
|
|
2
|
+
declare const SVG_DIAGNOSTIC_CODES: readonly ["svg/text-unsupported", "svg/image-unsupported", "svg/use-unsupported", "svg/gradient-unsupported", "svg/element-unsupported", "svg/element-skipped", "svg/css-style-ignored", "svg/paint-unsupported", "svg/opacity-ignored", "svg/preserve-aspect-ratio-stretched", "svg/default-size-assumed", "svg/shape-unsupported", "svg/stroke-style-unsupported"];
|
|
3
|
+
type SvgDiagnosticCode = (typeof SVG_DIAGNOSTIC_CODES)[number];
|
|
4
|
+
interface SvgDiagnostic {
|
|
5
|
+
readonly code: SvgDiagnosticCode;
|
|
6
|
+
readonly detail?: string;
|
|
7
|
+
}
|
|
8
|
+
type SvgDiagnosticSink = (diagnostic: SvgDiagnostic) => void;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { SvgDiagnosticSink as i, SvgDiagnostic as n, SvgDiagnosticCode as r, SVG_DIAGNOSTIC_CODES as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/svg/diagnostics.d.ts
|
|
2
|
+
declare const SVG_DIAGNOSTIC_CODES: readonly ["svg/text-unsupported", "svg/image-unsupported", "svg/use-unsupported", "svg/gradient-unsupported", "svg/element-unsupported", "svg/element-skipped", "svg/css-style-ignored", "svg/paint-unsupported", "svg/opacity-ignored", "svg/preserve-aspect-ratio-stretched", "svg/default-size-assumed", "svg/shape-unsupported", "svg/stroke-style-unsupported"];
|
|
3
|
+
type SvgDiagnosticCode = (typeof SVG_DIAGNOSTIC_CODES)[number];
|
|
4
|
+
interface SvgDiagnostic {
|
|
5
|
+
readonly code: SvgDiagnosticCode;
|
|
6
|
+
readonly detail?: string;
|
|
7
|
+
}
|
|
8
|
+
type SvgDiagnosticSink = (diagnostic: SvgDiagnostic) => void;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { SvgDiagnosticSink as i, SvgDiagnostic as n, SvgDiagnosticCode as r, SVG_DIAGNOSTIC_CODES as t };
|
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FontRegistry } from "pdf-codec";
|
|
3
|
-
import { Package } from "ooxml.js";
|
|
4
|
-
import { Package as Package$1 } from "odf.js";
|
|
5
|
-
//#region src/fonts/registry.d.ts
|
|
6
|
-
type FontSourcePackage = {
|
|
7
|
-
readonly kind: 'docx' | 'pptx';
|
|
8
|
-
readonly package: Package;
|
|
9
|
-
} | {
|
|
10
|
-
readonly kind: 'odf';
|
|
11
|
-
readonly package: Package$1;
|
|
12
|
-
};
|
|
13
|
-
interface DocumentFontRegistryOptions {
|
|
14
|
-
readonly fonts?: readonly ProvidedFont[];
|
|
15
|
-
readonly onFontSubstitution?: (substitution: FontSubstitution) => void;
|
|
16
|
-
}
|
|
17
|
-
declare function extractSourceFonts(source: FontSourcePackage): ProvidedFont[];
|
|
18
|
-
declare function createDocumentFontRegistry(source: FontSourcePackage, options?: DocumentFontRegistryOptions): FontRegistry;
|
|
19
|
-
//#endregion
|
|
1
|
+
import { i as extractSourceFonts, n as FontSourcePackage, r as createDocumentFontRegistry, t as DocumentFontRegistryOptions } from "../registry-BcBT-bnX.cjs";
|
|
20
2
|
export { DocumentFontRegistryOptions, FontSourcePackage, createDocumentFontRegistry, extractSourceFonts };
|
package/dist/fonts/registry.d.ts
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
3
|
-
import { FontRegistry } from "pdf-codec";
|
|
4
|
-
import { Package as Package$1 } from "odf.js";
|
|
5
|
-
//#region src/fonts/registry.d.ts
|
|
6
|
-
type FontSourcePackage = {
|
|
7
|
-
readonly kind: 'docx' | 'pptx';
|
|
8
|
-
readonly package: Package;
|
|
9
|
-
} | {
|
|
10
|
-
readonly kind: 'odf';
|
|
11
|
-
readonly package: Package$1;
|
|
12
|
-
};
|
|
13
|
-
interface DocumentFontRegistryOptions {
|
|
14
|
-
readonly fonts?: readonly ProvidedFont[];
|
|
15
|
-
readonly onFontSubstitution?: (substitution: FontSubstitution) => void;
|
|
16
|
-
}
|
|
17
|
-
declare function extractSourceFonts(source: FontSourcePackage): ProvidedFont[];
|
|
18
|
-
declare function createDocumentFontRegistry(source: FontSourcePackage, options?: DocumentFontRegistryOptions): FontRegistry;
|
|
19
|
-
//#endregion
|
|
1
|
+
import { i as extractSourceFonts, n as FontSourcePackage, r as createDocumentFontRegistry, t as DocumentFontRegistryOptions } from "../registry-D1Pu5XxB.js";
|
|
20
2
|
export { DocumentFontRegistryOptions, FontSourcePackage, createDocumentFontRegistry, extractSourceFonts };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HsqldbDecodeOptions } from "
|
|
1
|
+
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.cjs";
|
|
2
2
|
import { r as HsqldbTable } from "../script-DsGGIzGU.cjs";
|
|
3
3
|
//#region src/hsqldb/binary-script.d.ts
|
|
4
4
|
declare class HsqldbBinaryScriptParseError extends Error {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HsqldbDecodeOptions } from "
|
|
1
|
+
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.js";
|
|
2
2
|
import { r as HsqldbTable } from "../script-DsGGIzGU.js";
|
|
3
3
|
//#region src/hsqldb/binary-script.d.ts
|
|
4
4
|
declare class HsqldbBinaryScriptParseError extends Error {
|
package/dist/hsqldb/cache.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HsqldbDecodeOptions } from "
|
|
1
|
+
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.cjs";
|
|
2
2
|
import { r as HsqldbTable, t as HsqldbColumn } from "../script-DsGGIzGU.cjs";
|
|
3
3
|
import { ContentCellValue } from "document-schema.js";
|
|
4
4
|
//#region src/hsqldb/cache.d.ts
|
package/dist/hsqldb/cache.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HsqldbDecodeOptions } from "
|
|
1
|
+
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.js";
|
|
2
2
|
import { r as HsqldbTable, t as HsqldbColumn } from "../script-DsGGIzGU.js";
|
|
3
3
|
import { ContentCellValue } from "document-schema.js";
|
|
4
4
|
//#region src/hsqldb/cache.d.ts
|
|
@@ -1,25 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/hsqldb/rowformat.d.ts
|
|
3
|
-
declare class HsqldbRowFormatError extends Error {
|
|
4
|
-
constructor(message: string);
|
|
5
|
-
}
|
|
6
|
-
declare function resolveHsqldbTypeCode(declaredType: string): number;
|
|
7
|
-
declare class HsqldbDataCursor {
|
|
8
|
-
private readonly bytes;
|
|
9
|
-
private readonly view;
|
|
10
|
-
position: number;
|
|
11
|
-
constructor(bytes: Uint8Array<ArrayBuffer>, offset?: number);
|
|
12
|
-
readUint8(): number;
|
|
13
|
-
readInt16(): number;
|
|
14
|
-
readInt32(): number;
|
|
15
|
-
readBigInt64(): bigint;
|
|
16
|
-
readFloat64(): number;
|
|
17
|
-
readBytes(length: number): Uint8Array<ArrayBuffer>;
|
|
18
|
-
}
|
|
19
|
-
declare function readModifiedUtf8(bytes: Uint8Array<ArrayBuffer>): string;
|
|
20
|
-
interface HsqldbDecodeOptions {
|
|
21
|
-
readonly timeZone?: string;
|
|
22
|
-
}
|
|
23
|
-
declare function readHsqldbColumnValue(cursor: HsqldbDataCursor, typeCode: number, options?: HsqldbDecodeOptions): ContentCellValue;
|
|
24
|
-
//#endregion
|
|
1
|
+
import { a as readModifiedUtf8, i as readHsqldbColumnValue, n as HsqldbDecodeOptions, o as resolveHsqldbTypeCode, r as HsqldbRowFormatError, t as HsqldbDataCursor } from "../rowformat-Cl2exlEh.cjs";
|
|
25
2
|
export { HsqldbDataCursor, HsqldbDecodeOptions, HsqldbRowFormatError, readHsqldbColumnValue, readModifiedUtf8, resolveHsqldbTypeCode };
|
|
@@ -1,25 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/hsqldb/rowformat.d.ts
|
|
3
|
-
declare class HsqldbRowFormatError extends Error {
|
|
4
|
-
constructor(message: string);
|
|
5
|
-
}
|
|
6
|
-
declare function resolveHsqldbTypeCode(declaredType: string): number;
|
|
7
|
-
declare class HsqldbDataCursor {
|
|
8
|
-
private readonly bytes;
|
|
9
|
-
private readonly view;
|
|
10
|
-
position: number;
|
|
11
|
-
constructor(bytes: Uint8Array<ArrayBuffer>, offset?: number);
|
|
12
|
-
readUint8(): number;
|
|
13
|
-
readInt16(): number;
|
|
14
|
-
readInt32(): number;
|
|
15
|
-
readBigInt64(): bigint;
|
|
16
|
-
readFloat64(): number;
|
|
17
|
-
readBytes(length: number): Uint8Array<ArrayBuffer>;
|
|
18
|
-
}
|
|
19
|
-
declare function readModifiedUtf8(bytes: Uint8Array<ArrayBuffer>): string;
|
|
20
|
-
interface HsqldbDecodeOptions {
|
|
21
|
-
readonly timeZone?: string;
|
|
22
|
-
}
|
|
23
|
-
declare function readHsqldbColumnValue(cursor: HsqldbDataCursor, typeCode: number, options?: HsqldbDecodeOptions): ContentCellValue;
|
|
24
|
-
//#endregion
|
|
1
|
+
import { a as readModifiedUtf8, i as readHsqldbColumnValue, n as HsqldbDecodeOptions, o as resolveHsqldbTypeCode, r as HsqldbRowFormatError, t as HsqldbDataCursor } from "../rowformat-Cl2exlEh.js";
|
|
25
2
|
export { HsqldbDataCursor, HsqldbDecodeOptions, HsqldbRowFormatError, readHsqldbColumnValue, readModifiedUtf8, resolveHsqldbTypeCode };
|
package/dist/index.cjs
CHANGED
|
@@ -97,7 +97,9 @@ const require_odb_read = require("./odb/read.cjs");
|
|
|
97
97
|
const require_odb_spreadsheet = require("./odb/spreadsheet.cjs");
|
|
98
98
|
const require_convert_port = require("./convert/port.cjs");
|
|
99
99
|
const require_convert_composition = require("./convert/composition.cjs");
|
|
100
|
+
const require_convert_composition_to_pdf = require("./convert/composition-to-pdf.cjs");
|
|
100
101
|
const require_convert_convert = require("./convert/convert.cjs");
|
|
102
|
+
const require_convert_from_pdf = require("./convert/from-pdf.cjs");
|
|
101
103
|
const require_convert_codec = require("./convert/codec.cjs");
|
|
102
104
|
const require_odb_components = require("./odb/components.cjs");
|
|
103
105
|
const require_odb_sql_errors = require("./odb/sql/errors.cjs");
|
|
@@ -673,7 +675,7 @@ Object.defineProperty(exports, "contentDocumentWithSchema", {
|
|
|
673
675
|
return document_schema_js.contentDocumentWithSchema;
|
|
674
676
|
}
|
|
675
677
|
});
|
|
676
|
-
exports.convertDocument =
|
|
678
|
+
exports.convertDocument = require_convert_composition_to_pdf.convertDocument;
|
|
677
679
|
exports.convertDrawingToLayout = require_layout_drawing.convertDrawingToLayout;
|
|
678
680
|
exports.convertPresentationToLayout = require_layout_slides.convertPresentationToLayout;
|
|
679
681
|
exports.convertSpreadsheetToLayout = require_layout_sheets.convertSpreadsheetToLayout;
|
|
@@ -938,16 +940,16 @@ Object.defineProperty(exports, "pdfCodec", {
|
|
|
938
940
|
return pdf_codec.pdfCodec;
|
|
939
941
|
}
|
|
940
942
|
});
|
|
941
|
-
exports.pdfToCsv =
|
|
942
|
-
exports.pdfToDocx =
|
|
943
|
-
exports.pdfToMarkdown =
|
|
944
|
-
exports.pdfToOdg =
|
|
945
|
-
exports.pdfToOdp =
|
|
946
|
-
exports.pdfToOds =
|
|
947
|
-
exports.pdfToOdt =
|
|
948
|
-
exports.pdfToPptx =
|
|
949
|
-
exports.pdfToSvg =
|
|
950
|
-
exports.pdfToXlsx =
|
|
943
|
+
exports.pdfToCsv = require_convert_from_pdf.pdfToCsv;
|
|
944
|
+
exports.pdfToDocx = require_convert_from_pdf.pdfToDocx;
|
|
945
|
+
exports.pdfToMarkdown = require_convert_from_pdf.pdfToMarkdown;
|
|
946
|
+
exports.pdfToOdg = require_convert_from_pdf.pdfToOdg;
|
|
947
|
+
exports.pdfToOdp = require_convert_from_pdf.pdfToOdp;
|
|
948
|
+
exports.pdfToOds = require_convert_from_pdf.pdfToOds;
|
|
949
|
+
exports.pdfToOdt = require_convert_from_pdf.pdfToOdt;
|
|
950
|
+
exports.pdfToPptx = require_convert_from_pdf.pdfToPptx;
|
|
951
|
+
exports.pdfToSvg = require_convert_from_pdf.pdfToSvg;
|
|
952
|
+
exports.pdfToXlsx = require_convert_from_pdf.pdfToXlsx;
|
|
951
953
|
exports.pptxPdfCodec = require_convert_codec.pptxPdfCodec;
|
|
952
954
|
exports.pptxToDocx = require_convert_convert.pptxToDocx;
|
|
953
955
|
exports.pptxToOdp = require_convert_convert.pptxToOdp;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { n as fixedClock, r as systemClock, t as ClockPort } from "./clock-C7SUuYN0.cjs";
|
|
2
2
|
import { ConversionOptions, ConversionRequest, ConversionResult, DOCUMENT_FORMATS, Diagnostic, DocumentConverter, DocumentFormat, DocumentFormatSchema, DocumentPayload } from "./convert/port.cjs";
|
|
3
3
|
import { csvMarkdownCodec, csvPdfCodec, docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, odgPdfCodec, odgSvgCodec, odpPdfCodec, odpPptxCodec, odsCsvCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, svgPdfCodec, xlsxCsvCodec, xlsxMarkdownCodec, xlsxPdfCodec } from "./convert/codec.cjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { i as SvgDiagnosticSink, n as SvgDiagnostic, r as SvgDiagnosticCode, t as SVG_DIAGNOSTIC_CODES } from "./diagnostics-DVAXKgcf.cjs";
|
|
5
|
+
import { a as CellTypeRule, i as CellTypeInferenceSink, n as CellTypeInference, o as inferCellValue, r as CellTypeInferenceResult, t as CellTypeDeclineReason } from "./cell-typing-CEWlywIc.cjs";
|
|
6
6
|
import { i as mapMathVariant, n as applyMathVariant, r as isMathVariant, t as MathVariant } from "./variant-BMrebjMw.cjs";
|
|
7
7
|
import { n as OmmlDiagnosticKind, t as OmmlDiagnostic } from "./shared-DLZ3IQUl.cjs";
|
|
8
|
-
import { CompositionHop, ConversionPlan, UnifiedConversionOptions,
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { CompositionHop, ConversionPlan, UnifiedConversionOptions, resolveCompositionPlan } from "./convert/composition.cjs";
|
|
9
|
+
import { convertDocument } from "./convert/composition-to-pdf.cjs";
|
|
10
|
+
import { n as HsqldbDecodeOptions, r as HsqldbRowFormatError } from "./rowformat-Cl2exlEh.cjs";
|
|
11
|
+
import { i as extractSourceFonts, n as FontSourcePackage, r as createDocumentFontRegistry, t as DocumentFontRegistryOptions } from "./registry-BcBT-bnX.cjs";
|
|
12
|
+
import { CsvReadOptions, CsvWriteOptions, DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbReportToDocxOptions, OdbReportToOdtOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError, SvgReadOptions, SvgWriteOptions, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odgToSvg, odmToPdf, odpToOdt, odpToPdf, odpToPptx, odsToCsv, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, pptxToDocx, pptxToOdp, pptxToPdf, svgToOdg, svgToPdf, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf } from "./convert/convert.cjs";
|
|
12
13
|
import { UnsupportedFontSourceFormatError, extractSourceFontsForFormat } from "./convert/document-fonts.cjs";
|
|
13
14
|
import { buildDocumentBytes, layoutDocumentFromPackage } from "./convert/from-package.cjs";
|
|
15
|
+
import { PdfToDocumentOptions, pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx } from "./convert/from-pdf.cjs";
|
|
14
16
|
import { createLocalDocumentConverter } from "./convert/local.cjs";
|
|
15
17
|
import { ReadCsvContentOptions, readCsvContent } from "./csv/read.cjs";
|
|
16
18
|
import { CsvParseError } from "./csv/records.cjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { n as fixedClock, r as systemClock, t as ClockPort } from "./clock-C7SUuYN0.js";
|
|
2
2
|
import { ConversionOptions, ConversionRequest, ConversionResult, DOCUMENT_FORMATS, Diagnostic, DocumentConverter, DocumentFormat, DocumentFormatSchema, DocumentPayload } from "./convert/port.js";
|
|
3
3
|
import { csvMarkdownCodec, csvPdfCodec, docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, odgPdfCodec, odgSvgCodec, odpPdfCodec, odpPptxCodec, odsCsvCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, svgPdfCodec, xlsxCsvCodec, xlsxMarkdownCodec, xlsxPdfCodec } from "./convert/codec.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { i as SvgDiagnosticSink, n as SvgDiagnostic, r as SvgDiagnosticCode, t as SVG_DIAGNOSTIC_CODES } from "./diagnostics-DVAXKgcf.js";
|
|
5
|
+
import { a as CellTypeRule, i as CellTypeInferenceSink, n as CellTypeInference, o as inferCellValue, r as CellTypeInferenceResult, t as CellTypeDeclineReason } from "./cell-typing-CEWlywIc.js";
|
|
6
6
|
import { i as mapMathVariant, n as applyMathVariant, r as isMathVariant, t as MathVariant } from "./variant-BMrebjMw.js";
|
|
7
7
|
import { n as OmmlDiagnosticKind, t as OmmlDiagnostic } from "./shared-DUOzjwcL.js";
|
|
8
|
-
import { CompositionHop, ConversionPlan, UnifiedConversionOptions,
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { CompositionHop, ConversionPlan, UnifiedConversionOptions, resolveCompositionPlan } from "./convert/composition.js";
|
|
9
|
+
import { convertDocument } from "./convert/composition-to-pdf.js";
|
|
10
|
+
import { n as HsqldbDecodeOptions, r as HsqldbRowFormatError } from "./rowformat-Cl2exlEh.js";
|
|
11
|
+
import { i as extractSourceFonts, n as FontSourcePackage, r as createDocumentFontRegistry, t as DocumentFontRegistryOptions } from "./registry-D1Pu5XxB.js";
|
|
12
|
+
import { CsvReadOptions, CsvWriteOptions, DocumentBridgeOptions, DocumentToPdfOptions, OdbConversionOptions, OdbReportToDocxOptions, OdbReportToOdtOptions, OdbToCsvOptions, OdmToPdfOptions, OdmUnresolvedSectionError, SvgReadOptions, SvgWriteOptions, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odgToSvg, odmToPdf, odpToOdt, odpToPdf, odpToPptx, odsToCsv, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, pptxToDocx, pptxToOdp, pptxToPdf, svgToOdg, svgToPdf, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf } from "./convert/convert.js";
|
|
12
13
|
import { UnsupportedFontSourceFormatError, extractSourceFontsForFormat } from "./convert/document-fonts.js";
|
|
13
14
|
import { buildDocumentBytes, layoutDocumentFromPackage } from "./convert/from-package.js";
|
|
15
|
+
import { PdfToDocumentOptions, pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx } from "./convert/from-pdf.js";
|
|
14
16
|
import { createLocalDocumentConverter } from "./convert/local.js";
|
|
15
17
|
import { ReadCsvContentOptions, readCsvContent } from "./csv/read.js";
|
|
16
18
|
import { CsvParseError } from "./csv/records.js";
|
package/dist/index.js
CHANGED
|
@@ -95,8 +95,10 @@ import { FirebirdBackupFormatError, SUPPORTED_BACKUP_FORMAT_VERSION, readFirebir
|
|
|
95
95
|
import { OdbNoEmbeddedDataSourceError, OdbUnsupportedFormatError, readOdbTables } from "./odb/read.js";
|
|
96
96
|
import { odbTablesToSpreadsheetDocument } from "./odb/spreadsheet.js";
|
|
97
97
|
import { DOCUMENT_FORMATS, DocumentFormatSchema } from "./convert/port.js";
|
|
98
|
-
import {
|
|
99
|
-
import {
|
|
98
|
+
import { resolveCompositionPlan } from "./convert/composition.js";
|
|
99
|
+
import { convertDocument } from "./convert/composition-to-pdf.js";
|
|
100
|
+
import { OdmUnresolvedSectionError, csvToMarkdown, csvToOds, csvToPdf, csvToXlsx, docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, markdownToCsv, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odbReportToDocx, odbReportToOdt, odbReportToPdf, odbToCsv, odbToXlsx, odfToPdf, odgToPdf, odgToSvg, odmToPdf, odpToOdt, odpToPdf, odpToPptx, odsToCsv, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, pptxToDocx, pptxToOdp, pptxToPdf, svgToOdg, svgToPdf, xlsxToCsv, xlsxToMarkdown, xlsxToOds, xlsxToPdf } from "./convert/convert.js";
|
|
101
|
+
import { pdfToCsv, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToSvg, pdfToXlsx } from "./convert/from-pdf.js";
|
|
100
102
|
import { csvMarkdownCodec, csvPdfCodec, docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, odgPdfCodec, odgSvgCodec, odpPdfCodec, odpPptxCodec, odsCsvCodec, odsPdfCodec, odsXlsxCodec, odtDocxCodec, odtPdfCodec, pptxPdfCodec, svgPdfCodec, xlsxCsvCodec, xlsxMarkdownCodec, xlsxPdfCodec } from "./convert/codec.js";
|
|
101
103
|
import { readOdbForms, readOdbReports } from "./odb/components.js";
|
|
102
104
|
import { HsqldbSqlEvaluationError, HsqldbSqlParseError, HsqldbSqlUnsupportedError } from "./odb/sql/errors.js";
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/layout/cell-typing.d.ts
|
|
3
|
-
type CellTypeRule = 'boolean-literal' | 'iso-date' | 'named-month-date' | 'plain-number' | 'grouped-number' | 'percentage' | 'currency';
|
|
4
|
-
type CellTypeDeclineReason = 'ambiguous-boolean-word' | 'ambiguous-date-order' | 'ambiguous-grouping-separator' | 'leading-zero-digits' | 'precision-loss';
|
|
5
|
-
type CellTypeInferenceResult = {
|
|
6
|
-
readonly outcome: 'retyped';
|
|
7
|
-
readonly value: ContentCellValue;
|
|
8
|
-
readonly rule: CellTypeRule;
|
|
9
|
-
} | {
|
|
10
|
-
readonly outcome: 'declined';
|
|
11
|
-
readonly reason: CellTypeDeclineReason;
|
|
12
|
-
};
|
|
13
|
-
type CellTypeInference = {
|
|
14
|
-
readonly sheetIndex: number;
|
|
15
|
-
readonly row: number;
|
|
16
|
-
readonly column: number;
|
|
17
|
-
readonly displayText: string;
|
|
18
|
-
} & CellTypeInferenceResult;
|
|
19
|
-
type CellTypeInferenceSink = (inference: CellTypeInference) => void;
|
|
20
|
-
declare function inferCellValue(displayText: string): CellTypeInferenceResult | undefined;
|
|
21
|
-
//#endregion
|
|
1
|
+
import { a as CellTypeRule, i as CellTypeInferenceSink, n as CellTypeInference, o as inferCellValue, r as CellTypeInferenceResult, t as CellTypeDeclineReason } from "../cell-typing-CEWlywIc.cjs";
|
|
22
2
|
export { CellTypeDeclineReason, CellTypeInference, CellTypeInferenceResult, CellTypeInferenceSink, CellTypeRule, inferCellValue };
|
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/layout/cell-typing.d.ts
|
|
3
|
-
type CellTypeRule = 'boolean-literal' | 'iso-date' | 'named-month-date' | 'plain-number' | 'grouped-number' | 'percentage' | 'currency';
|
|
4
|
-
type CellTypeDeclineReason = 'ambiguous-boolean-word' | 'ambiguous-date-order' | 'ambiguous-grouping-separator' | 'leading-zero-digits' | 'precision-loss';
|
|
5
|
-
type CellTypeInferenceResult = {
|
|
6
|
-
readonly outcome: 'retyped';
|
|
7
|
-
readonly value: ContentCellValue;
|
|
8
|
-
readonly rule: CellTypeRule;
|
|
9
|
-
} | {
|
|
10
|
-
readonly outcome: 'declined';
|
|
11
|
-
readonly reason: CellTypeDeclineReason;
|
|
12
|
-
};
|
|
13
|
-
type CellTypeInference = {
|
|
14
|
-
readonly sheetIndex: number;
|
|
15
|
-
readonly row: number;
|
|
16
|
-
readonly column: number;
|
|
17
|
-
readonly displayText: string;
|
|
18
|
-
} & CellTypeInferenceResult;
|
|
19
|
-
type CellTypeInferenceSink = (inference: CellTypeInference) => void;
|
|
20
|
-
declare function inferCellValue(displayText: string): CellTypeInferenceResult | undefined;
|
|
21
|
-
//#endregion
|
|
1
|
+
import { a as CellTypeRule, i as CellTypeInferenceSink, n as CellTypeInference, o as inferCellValue, r as CellTypeInferenceResult, t as CellTypeDeclineReason } from "../cell-typing-CEWlywIc.js";
|
|
22
2
|
export { CellTypeDeclineReason, CellTypeInference, CellTypeInferenceResult, CellTypeInferenceSink, CellTypeRule, inferCellValue };
|
|
@@ -5,7 +5,8 @@ const require_layout_cell_typing = require("./cell-typing.cjs");
|
|
|
5
5
|
const require_layout_shared = require("./shared.cjs");
|
|
6
6
|
const require_ports_abort = require("../ports/abort.cjs");
|
|
7
7
|
const require_layout_lattice = require("./lattice.cjs");
|
|
8
|
-
let
|
|
8
|
+
let pdf_codec_fonts = require("pdf-codec/fonts");
|
|
9
|
+
let pdf_codec_afm_widths = require("pdf-codec/afm-widths");
|
|
9
10
|
//#region src/layout/reconstruct.ts
|
|
10
11
|
const ZERO_MARGINS = {
|
|
11
12
|
topPt: 0,
|
|
@@ -31,8 +32,8 @@ function clusterIntoLines(items) {
|
|
|
31
32
|
return working;
|
|
32
33
|
}
|
|
33
34
|
function textItemVerticalExtent(item) {
|
|
34
|
-
const { standardName } = (0,
|
|
35
|
-
const metrics =
|
|
35
|
+
const { standardName } = (0, pdf_codec_fonts.resolveStandardFont)(item.font.family, item.font.weight === "bold", item.font.style === "italic");
|
|
36
|
+
const metrics = pdf_codec_afm_widths.STANDARD_METRICS[standardName];
|
|
36
37
|
return {
|
|
37
38
|
ascentPt: metrics.ascender / 1e3 * item.sizePt,
|
|
38
39
|
descentPt: Math.abs(metrics.descender) / 1e3 * item.sizePt
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CellTypeInferenceSink } from "
|
|
1
|
+
import { i as CellTypeInferenceSink } from "../cell-typing-CEWlywIc.cjs";
|
|
2
2
|
import { ContentDocument } from "document-schema.js";
|
|
3
3
|
import { LayoutDocument } from "pdf-codec";
|
|
4
4
|
//#region src/layout/reconstruct.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CellTypeInferenceSink } from "
|
|
1
|
+
import { i as CellTypeInferenceSink } from "../cell-typing-CEWlywIc.js";
|
|
2
2
|
import { ContentDocument } from "document-schema.js";
|
|
3
3
|
import { LayoutDocument } from "pdf-codec";
|
|
4
4
|
//#region src/layout/reconstruct.d.ts
|
|
@@ -4,7 +4,8 @@ import { inferCellValue } from "./cell-typing.js";
|
|
|
4
4
|
import { stampFrame } from "./shared.js";
|
|
5
5
|
import { throwIfAborted } from "../ports/abort.js";
|
|
6
6
|
import { detectGridLattice, findColumnIndex, findRowIndex } from "./lattice.js";
|
|
7
|
-
import {
|
|
7
|
+
import { resolveStandardFont } from "pdf-codec/fonts";
|
|
8
|
+
import { STANDARD_METRICS } from "pdf-codec/afm-widths";
|
|
8
9
|
//#region src/layout/reconstruct.ts
|
|
9
10
|
const ZERO_MARGINS = {
|
|
10
11
|
topPt: 0,
|