js.documents 14.4.31 → 14.4.33
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/dist/{blr-types-CMN0QKUE.d.cts → blr-types-deHhtYjv.d.cts} +2 -1
- package/dist/{blr-types-CMN0QKUE.d.ts → blr-types-deHhtYjv.d.ts} +2 -1
- package/dist/{clock-C7SUuYN0.d.cts → clock-Cewekmhw.d.cts} +1 -1
- package/dist/{clock-C7SUuYN0.d.ts → clock-Cewekmhw.d.ts} +1 -1
- package/dist/codecs/registry.d.cts +2 -2
- package/dist/codecs/registry.d.ts +2 -2
- package/dist/convert/composition.cjs +65 -65
- package/dist/convert/composition.d.cts +2 -2
- package/dist/convert/composition.d.ts +2 -2
- package/dist/convert/composition.js +65 -65
- package/dist/convert/convert.d.cts +1 -1
- package/dist/convert/convert.d.ts +1 -1
- package/dist/convert/local.cjs +7 -3
- package/dist/convert/local.js +7 -3
- package/dist/convert/port.d.cts +2 -2
- package/dist/convert/port.d.ts +2 -2
- package/dist/edit/doc/editor.d.cts +5 -5
- package/dist/edit/doc/editor.d.ts +5 -5
- package/dist/edit/docx/content.d.cts +1 -1
- package/dist/edit/docx/content.d.ts +1 -1
- package/dist/edit/docx/editor.d.cts +10 -10
- package/dist/edit/docx/editor.d.ts +10 -10
- package/dist/edit/docx/table.cjs +1 -1
- package/dist/edit/docx/table.js +1 -1
- package/dist/edit/markdown/editor.d.cts +6 -6
- package/dist/edit/markdown/editor.d.ts +6 -6
- package/dist/edit/odg/content.d.cts +1 -1
- package/dist/edit/odg/content.d.ts +1 -1
- package/dist/edit/odg/editor.d.cts +1 -1
- package/dist/edit/odg/editor.d.ts +1 -1
- package/dist/edit/odg/page.d.cts +1 -1
- package/dist/edit/odg/page.d.ts +1 -1
- package/dist/edit/odg/vector.cjs +5 -0
- package/dist/edit/odg/vector.d.cts +2 -2
- package/dist/edit/odg/vector.d.ts +2 -2
- package/dist/edit/odg/vector.js +5 -1
- package/dist/edit/odp/content.d.cts +1 -1
- package/dist/edit/odp/content.d.ts +1 -1
- package/dist/edit/odp/editor.d.cts +1 -1
- package/dist/edit/odp/editor.d.ts +1 -1
- package/dist/edit/odp/slide.d.cts +1 -1
- package/dist/edit/odp/slide.d.ts +1 -1
- package/dist/edit/ods/content.d.cts +1 -1
- package/dist/edit/ods/content.d.ts +1 -1
- package/dist/edit/ods/editor.d.cts +1 -1
- package/dist/edit/ods/editor.d.ts +1 -1
- package/dist/edit/odt/automatic-styles.cjs +1 -1
- package/dist/edit/odt/automatic-styles.js +1 -1
- package/dist/edit/odt/content.cjs +32 -32
- package/dist/edit/odt/content.d.cts +1 -1
- package/dist/edit/odt/content.d.ts +1 -1
- package/dist/edit/odt/content.js +32 -32
- package/dist/edit/odt/editor.d.cts +12 -12
- package/dist/edit/odt/editor.d.ts +12 -12
- package/dist/edit/odt/table.cjs +1 -1
- package/dist/edit/odt/table.js +1 -1
- package/dist/edit/pdf/editor.d.cts +1 -1
- package/dist/edit/pdf/editor.d.ts +1 -1
- package/dist/edit/pdf/item.cjs +5 -0
- package/dist/edit/pdf/item.d.cts +2 -2
- package/dist/edit/pdf/item.d.ts +2 -2
- package/dist/edit/pdf/item.js +5 -1
- package/dist/edit/pdf/page.d.cts +1 -1
- package/dist/edit/pdf/page.d.ts +1 -1
- package/dist/edit/ppt/editor.d.cts +1 -1
- package/dist/edit/ppt/editor.d.ts +1 -1
- package/dist/edit/pptx/content.d.cts +1 -1
- package/dist/edit/pptx/content.d.ts +1 -1
- package/dist/edit/pptx/editor.d.cts +1 -1
- package/dist/edit/pptx/editor.d.ts +1 -1
- package/dist/edit/xls/editor.d.cts +1 -1
- package/dist/edit/xls/editor.d.ts +1 -1
- package/dist/evaluate-BbOsgdmN.d.cts +15 -0
- package/dist/evaluate-C7fmk69X.d.ts +15 -0
- package/dist/firebird/backup.d.cts +1 -1
- package/dist/firebird/backup.d.ts +1 -1
- package/dist/firebird/blr-types.cjs +5 -0
- package/dist/firebird/blr-types.d.cts +2 -2
- package/dist/firebird/blr-types.d.ts +2 -2
- package/dist/firebird/blr-types.js +5 -1
- package/dist/firebird/schema.d.cts +1 -1
- package/dist/firebird/schema.d.ts +1 -1
- 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/script.cjs +5 -0
- package/dist/hsqldb/script.d.cts +2 -2
- package/dist/hsqldb/script.d.ts +2 -2
- package/dist/hsqldb/script.js +5 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/{item-SUC4uKDO.d.cts → item-B5d6CCqq.d.cts} +2 -1
- package/dist/{item-SUC4uKDO.d.ts → item-B5d6CCqq.d.ts} +2 -1
- package/dist/latex/lower.cjs +2 -2
- package/dist/latex/lower.js +2 -2
- package/dist/layout/lattice.cjs +1 -1
- package/dist/layout/lattice.js +1 -1
- package/dist/layout/reconstruct.cjs +3 -3
- package/dist/layout/reconstruct.js +3 -3
- package/dist/markdown/render.cjs +5 -0
- package/dist/markdown/render.d.cts +2 -1
- package/dist/markdown/render.d.ts +2 -1
- package/dist/markdown/render.js +5 -1
- package/dist/model/embedded-drawing.cjs +5 -0
- package/dist/model/embedded-drawing.d.cts +2 -1
- package/dist/model/embedded-drawing.d.ts +2 -1
- package/dist/model/embedded-drawing.js +5 -1
- package/dist/model/metadata.d.cts +1 -1
- package/dist/model/metadata.d.ts +1 -1
- package/dist/odb/csv.d.cts +1 -1
- package/dist/odb/csv.d.ts +1 -1
- package/dist/odb/formula/evaluate.cjs +5 -0
- package/dist/odb/formula/evaluate.d.cts +3 -2
- package/dist/odb/formula/evaluate.d.ts +3 -2
- package/dist/odb/formula/evaluate.js +5 -1
- package/dist/odb/formula/parser.d.cts +1 -1
- package/dist/odb/formula/parser.d.ts +1 -1
- package/dist/odb/read.d.cts +1 -1
- package/dist/odb/read.d.ts +1 -1
- package/dist/odb/report/render.cjs +5 -0
- package/dist/odb/report/render.d.cts +3 -2
- package/dist/odb/report/render.d.ts +3 -2
- package/dist/odb/report/render.js +5 -1
- package/dist/odb/report/source.d.cts +1 -1
- package/dist/odb/report/source.d.ts +1 -1
- package/dist/odb/spreadsheet.d.cts +1 -1
- package/dist/odb/spreadsheet.d.ts +1 -1
- package/dist/odb/sql/evaluate.cjs +21 -1
- package/dist/odb/sql/evaluate.d.cts +2 -2
- package/dist/odb/sql/evaluate.d.ts +2 -2
- package/dist/odb/sql/evaluate.js +18 -2
- package/dist/odb/sql/parser.cjs +12 -7
- package/dist/odb/sql/parser.d.cts +2 -2
- package/dist/odb/sql/parser.d.ts +2 -2
- package/dist/odb/sql/parser.js +12 -8
- package/dist/odb/values.cjs +5 -0
- package/dist/odb/values.d.cts +2 -2
- package/dist/odb/values.d.ts +2 -2
- package/dist/odb/values.js +5 -1
- package/dist/{parser-Oq6zLQsu.d.cts → parser-BTA1wXPd.d.cts} +2 -1
- package/dist/{parser-CfMvvMT1.d.ts → parser-CoIi0l9I.d.ts} +2 -1
- package/dist/ports/clock.d.cts +1 -1
- package/dist/ports/clock.d.ts +1 -1
- package/dist/ppt/write.cjs +5 -0
- package/dist/ppt/write.d.cts +2 -1
- package/dist/ppt/write.d.ts +2 -1
- package/dist/ppt/write.js +5 -1
- package/dist/{script-DsGGIzGU.d.cts → script-pkZ2Kor4.d.cts} +2 -1
- package/dist/{script-DsGGIzGU.d.ts → script-pkZ2Kor4.d.ts} +2 -1
- package/dist/svg/transform.cjs +5 -0
- package/dist/svg/transform.d.cts +2 -1
- package/dist/svg/transform.d.ts +2 -1
- package/dist/svg/transform.js +5 -1
- package/dist/svg/write.cjs +5 -0
- package/dist/svg/write.d.cts +2 -1
- package/dist/svg/write.d.ts +2 -1
- package/dist/svg/write.js +5 -1
- package/dist/{values-BBN9E8dV.d.cts → values-DcupkLKg.d.cts} +2 -1
- package/dist/{values-BBN9E8dV.d.ts → values-DcupkLKg.d.ts} +2 -1
- package/dist/{vector-DDP7hgvm.d.cts → vector-DWSXN_G2.d.cts} +2 -1
- package/dist/{vector-DDP7hgvm.d.ts → vector-DWSXN_G2.d.ts} +2 -1
- package/package.json +13 -13
- package/dist/evaluate-BnRKjJ1G.d.ts +0 -11
- package/dist/evaluate-CYYLwKtR.d.cts +0 -11
|
@@ -31,5 +31,6 @@ declare class FirebirdUnsupportedFieldTypeError extends Error {
|
|
|
31
31
|
}
|
|
32
32
|
declare function decodeBlrType(blrType: number): FirebirdPhysicalType;
|
|
33
33
|
declare function describeFieldType(physical: FirebirdPhysicalType, lengthBytes: number, scale: number, characterLength: number | undefined, subType: number): string;
|
|
34
|
+
declare function assertNeverPhysical(value: never): never;
|
|
34
35
|
//#endregion
|
|
35
|
-
export { BLR_TIMESTAMP_TZ as C, FirebirdUnsupportedFieldTypeError as D, FirebirdPhysicalType as E,
|
|
36
|
+
export { describeFieldType as A, BLR_TIMESTAMP_TZ as C, FirebirdUnsupportedFieldTypeError as D, FirebirdPhysicalType as E, assertNeverPhysical as O, BLR_TIMESTAMP as S, BLR_VARYING2 as T, BLR_SQL_DATE as _, BLR_DEC128 as a, BLR_TEXT as b, BLR_D_FLOAT as c, BLR_FLOAT as d, BLR_INT128 as f, BLR_SHORT as g, BLR_QUAD as h, BLR_CSTRING2 as i, decodeBlrType as k, BLR_EX_TIMESTAMP_TZ as l, BLR_LONG as m, BLR_BOOL as n, BLR_DEC64 as o, BLR_INT64 as p, BLR_CSTRING as r, BLR_DOUBLE as s, BLR_BLOB as t, BLR_EX_TIME_TZ as u, BLR_SQL_TIME as v, BLR_VARYING as w, BLR_TEXT2 as x, BLR_SQL_TIME_TZ as y };
|
|
@@ -31,5 +31,6 @@ declare class FirebirdUnsupportedFieldTypeError extends Error {
|
|
|
31
31
|
}
|
|
32
32
|
declare function decodeBlrType(blrType: number): FirebirdPhysicalType;
|
|
33
33
|
declare function describeFieldType(physical: FirebirdPhysicalType, lengthBytes: number, scale: number, characterLength: number | undefined, subType: number): string;
|
|
34
|
+
declare function assertNeverPhysical(value: never): never;
|
|
34
35
|
//#endregion
|
|
35
|
-
export { BLR_TIMESTAMP_TZ as C, FirebirdUnsupportedFieldTypeError as D, FirebirdPhysicalType as E,
|
|
36
|
+
export { describeFieldType as A, BLR_TIMESTAMP_TZ as C, FirebirdUnsupportedFieldTypeError as D, FirebirdPhysicalType as E, assertNeverPhysical as O, BLR_TIMESTAMP as S, BLR_VARYING2 as T, BLR_SQL_DATE as _, BLR_DEC128 as a, BLR_TEXT as b, BLR_D_FLOAT as c, BLR_FLOAT as d, BLR_INT128 as f, BLR_SHORT as g, BLR_QUAD as h, BLR_CSTRING2 as i, decodeBlrType as k, BLR_EX_TIMESTAMP_TZ as l, BLR_LONG as m, BLR_BOOL as n, BLR_DEC64 as o, BLR_INT64 as p, BLR_CSTRING as r, BLR_DOUBLE as s, BLR_BLOB as t, BLR_EX_TIME_TZ as u, BLR_SQL_TIME as v, BLR_VARYING as w, BLR_TEXT2 as x, BLR_SQL_TIME_TZ as y };
|
|
@@ -4,8 +4,8 @@ import { ContentCodec } from "document-schema.js";
|
|
|
4
4
|
import { LayoutDocument } from "pdf-codec";
|
|
5
5
|
//#region src/codecs/registry.d.ts
|
|
6
6
|
interface LayoutEntryCodec {
|
|
7
|
-
read(bytes: Uint8Array, options?: DocumentCodecOptions)
|
|
8
|
-
write(layout: LayoutDocument, options?: DocumentCodecOptions)
|
|
7
|
+
read: (bytes: Uint8Array, options?: DocumentCodecOptions) => LayoutDocument;
|
|
8
|
+
write: (layout: LayoutDocument, options?: DocumentCodecOptions) => Uint8Array;
|
|
9
9
|
}
|
|
10
10
|
interface DocumentFormatCodecs {
|
|
11
11
|
readonly content?: ContentCodec<DocumentCodecOptions>;
|
|
@@ -4,8 +4,8 @@ import { ContentCodec } from "document-schema.js";
|
|
|
4
4
|
import { LayoutDocument } from "pdf-codec";
|
|
5
5
|
//#region src/codecs/registry.d.ts
|
|
6
6
|
interface LayoutEntryCodec {
|
|
7
|
-
read(bytes: Uint8Array, options?: DocumentCodecOptions)
|
|
8
|
-
write(layout: LayoutDocument, options?: DocumentCodecOptions)
|
|
7
|
+
read: (bytes: Uint8Array, options?: DocumentCodecOptions) => LayoutDocument;
|
|
8
|
+
write: (layout: LayoutDocument, options?: DocumentCodecOptions) => Uint8Array;
|
|
9
9
|
}
|
|
10
10
|
interface DocumentFormatCodecs {
|
|
11
11
|
readonly content?: ContentCodec<DocumentCodecOptions>;
|
|
@@ -39,71 +39,6 @@ require("markdown-codec");
|
|
|
39
39
|
let wpd_codec = require("wpd-codec");
|
|
40
40
|
let pdf_codec_read = require("pdf-codec/read");
|
|
41
41
|
//#region src/convert/composition.ts
|
|
42
|
-
const CONTENT_FORMATS = [
|
|
43
|
-
"docx",
|
|
44
|
-
"pptx",
|
|
45
|
-
"xlsx",
|
|
46
|
-
"odt",
|
|
47
|
-
"odp",
|
|
48
|
-
"ods",
|
|
49
|
-
"odg",
|
|
50
|
-
"svg",
|
|
51
|
-
"csv",
|
|
52
|
-
"markdown",
|
|
53
|
-
"rtf",
|
|
54
|
-
"doc",
|
|
55
|
-
"xls",
|
|
56
|
-
"ppt",
|
|
57
|
-
"epub"
|
|
58
|
-
];
|
|
59
|
-
function isTextFormatNode(node) {
|
|
60
|
-
return !node.hasSourcePackage;
|
|
61
|
-
}
|
|
62
|
-
const READ_ONLY_CONTENT_FORMATS = ["wpd"];
|
|
63
|
-
const READ_ONLY_FORMAT_NODES = { wpd: {
|
|
64
|
-
variant: "wordprocessing",
|
|
65
|
-
read: (bytes) => (0, wpd_codec.readWpdContent)(bytes)
|
|
66
|
-
} };
|
|
67
|
-
function isReadOnlyContentFormat(format) {
|
|
68
|
-
return READ_ONLY_CONTENT_FORMATS.includes(format);
|
|
69
|
-
}
|
|
70
|
-
function readSourceContent(format, bytes, options) {
|
|
71
|
-
if (isReadOnlyContentFormat(format)) {
|
|
72
|
-
const node = READ_ONLY_FORMAT_NODES[format];
|
|
73
|
-
return {
|
|
74
|
-
content: node.read(bytes, options),
|
|
75
|
-
variant: node.variant
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
const node = FORMAT_NODES[format];
|
|
79
|
-
if (isTextFormatNode(node)) {
|
|
80
|
-
const text = node.decode(bytes);
|
|
81
|
-
return {
|
|
82
|
-
content: node.read(text, options),
|
|
83
|
-
variant: node.variant
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
const pkg = node.decode(bytes);
|
|
87
|
-
return {
|
|
88
|
-
content: node.read(pkg, options),
|
|
89
|
-
variant: node.variant
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
const LATIN1_CHUNK_SIZE = 8192;
|
|
93
|
-
function bytesToLatin1(bytes) {
|
|
94
|
-
let text = "";
|
|
95
|
-
for (let start = 0; start < bytes.length; start += LATIN1_CHUNK_SIZE) text += String.fromCharCode(...bytes.subarray(start, start + LATIN1_CHUNK_SIZE));
|
|
96
|
-
return text;
|
|
97
|
-
}
|
|
98
|
-
function latin1ToBytes(text) {
|
|
99
|
-
const bytes = new Uint8Array(text.length);
|
|
100
|
-
for (let index = 0; index < text.length; index += 1) {
|
|
101
|
-
const code = text.charCodeAt(index);
|
|
102
|
-
if (code > 255) throw new TypeError(`latin1ToBytes: character at index ${String(index)} is U+${code.toString(16).toUpperCase().padStart(4, "0")}, above U+00FF — this string no longer holds the file's original bytes`);
|
|
103
|
-
bytes[index] = code;
|
|
104
|
-
}
|
|
105
|
-
return bytes;
|
|
106
|
-
}
|
|
107
42
|
const FORMAT_NODES = {
|
|
108
43
|
docx: {
|
|
109
44
|
variant: "wordprocessing",
|
|
@@ -268,6 +203,71 @@ const FORMAT_NODES = {
|
|
|
268
203
|
hasSourcePackage: false
|
|
269
204
|
}
|
|
270
205
|
};
|
|
206
|
+
const CONTENT_FORMATS = [
|
|
207
|
+
"docx",
|
|
208
|
+
"pptx",
|
|
209
|
+
"xlsx",
|
|
210
|
+
"odt",
|
|
211
|
+
"odp",
|
|
212
|
+
"ods",
|
|
213
|
+
"odg",
|
|
214
|
+
"svg",
|
|
215
|
+
"csv",
|
|
216
|
+
"markdown",
|
|
217
|
+
"rtf",
|
|
218
|
+
"doc",
|
|
219
|
+
"xls",
|
|
220
|
+
"ppt",
|
|
221
|
+
"epub"
|
|
222
|
+
];
|
|
223
|
+
function isTextFormatNode(node) {
|
|
224
|
+
return !node.hasSourcePackage;
|
|
225
|
+
}
|
|
226
|
+
const READ_ONLY_CONTENT_FORMATS = ["wpd"];
|
|
227
|
+
const READ_ONLY_FORMAT_NODES = { wpd: {
|
|
228
|
+
variant: "wordprocessing",
|
|
229
|
+
read: (bytes) => (0, wpd_codec.readWpdContent)(bytes)
|
|
230
|
+
} };
|
|
231
|
+
function isReadOnlyContentFormat(format) {
|
|
232
|
+
return READ_ONLY_CONTENT_FORMATS.includes(format);
|
|
233
|
+
}
|
|
234
|
+
function readSourceContent(format, bytes, options) {
|
|
235
|
+
if (isReadOnlyContentFormat(format)) {
|
|
236
|
+
const node = READ_ONLY_FORMAT_NODES[format];
|
|
237
|
+
return {
|
|
238
|
+
content: node.read(bytes, options),
|
|
239
|
+
variant: node.variant
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
const node = FORMAT_NODES[format];
|
|
243
|
+
if (isTextFormatNode(node)) {
|
|
244
|
+
const text = node.decode(bytes);
|
|
245
|
+
return {
|
|
246
|
+
content: node.read(text, options),
|
|
247
|
+
variant: node.variant
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
const pkg = node.decode(bytes);
|
|
251
|
+
return {
|
|
252
|
+
content: node.read(pkg, options),
|
|
253
|
+
variant: node.variant
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
const LATIN1_CHUNK_SIZE = 8192;
|
|
257
|
+
function bytesToLatin1(bytes) {
|
|
258
|
+
let text = "";
|
|
259
|
+
for (let start = 0; start < bytes.length; start += LATIN1_CHUNK_SIZE) text += String.fromCharCode(...bytes.subarray(start, start + LATIN1_CHUNK_SIZE));
|
|
260
|
+
return text;
|
|
261
|
+
}
|
|
262
|
+
function latin1ToBytes(text) {
|
|
263
|
+
const bytes = new Uint8Array(text.length);
|
|
264
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
265
|
+
const code = text.charCodeAt(index);
|
|
266
|
+
if (code > 255) throw new TypeError(`latin1ToBytes: character at index ${String(index)} is U+${code.toString(16).toUpperCase().padStart(4, "0")}, above U+00FF — this string no longer holds the file's original bytes`);
|
|
267
|
+
bytes[index] = code;
|
|
268
|
+
}
|
|
269
|
+
return bytes;
|
|
270
|
+
}
|
|
271
271
|
const LAYOUT_CAPABLE = /* @__PURE__ */ new Set([
|
|
272
272
|
"docx",
|
|
273
273
|
"pptx",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../clock-
|
|
1
|
+
import { t as ClockPort } from "../clock-Cewekmhw.cjs";
|
|
2
2
|
import { DocumentFormat } from "./port.cjs";
|
|
3
3
|
import { t as ContentVariant } from "../capability-WJWAE-5Z.cjs";
|
|
4
4
|
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.cjs";
|
|
@@ -9,6 +9,7 @@ import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
|
9
9
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
10
10
|
import { Package } from "ooxml.js";
|
|
11
11
|
//#region src/convert/composition.d.ts
|
|
12
|
+
declare const FORMAT_NODES: Readonly<Record<ContentFormat, FormatNode>>;
|
|
12
13
|
type SourcePackage = Package;
|
|
13
14
|
interface UnifiedConversionOptions {
|
|
14
15
|
readonly signal?: AbortSignal;
|
|
@@ -60,7 +61,6 @@ interface ReadOnlyFormatNode {
|
|
|
60
61
|
declare const READ_ONLY_FORMAT_NODES: Readonly<Record<ReadOnlyContentFormat, ReadOnlyFormatNode>>;
|
|
61
62
|
type SourceContentFormat = ContentFormat | ReadOnlyContentFormat;
|
|
62
63
|
declare function isReadOnlyContentFormat(format: DocumentFormat): format is ReadOnlyContentFormat;
|
|
63
|
-
declare const FORMAT_NODES: Readonly<Record<ContentFormat, FormatNode>>;
|
|
64
64
|
declare const LAYOUT_CAPABLE: ReadonlySet<SourceContentFormat>;
|
|
65
65
|
declare function executeBridge(source: SourceContentFormat, target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
66
66
|
declare function executeFromPdf(target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../clock-
|
|
1
|
+
import { t as ClockPort } from "../clock-Cewekmhw.js";
|
|
2
2
|
import { DocumentFormat } from "./port.js";
|
|
3
3
|
import { t as ContentVariant } from "../capability-BmRwrPL9.js";
|
|
4
4
|
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.js";
|
|
@@ -9,6 +9,7 @@ import { ContentDocument, DocumentTree, FontSubstitution, ProvidedFont } from "d
|
|
|
9
9
|
import { PdfDiagnosticSink, WinAnsiSubstitution } from "pdf-codec";
|
|
10
10
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
11
11
|
//#region src/convert/composition.d.ts
|
|
12
|
+
declare const FORMAT_NODES: Readonly<Record<ContentFormat, FormatNode>>;
|
|
12
13
|
type SourcePackage = Package;
|
|
13
14
|
interface UnifiedConversionOptions {
|
|
14
15
|
readonly signal?: AbortSignal;
|
|
@@ -60,7 +61,6 @@ interface ReadOnlyFormatNode {
|
|
|
60
61
|
declare const READ_ONLY_FORMAT_NODES: Readonly<Record<ReadOnlyContentFormat, ReadOnlyFormatNode>>;
|
|
61
62
|
type SourceContentFormat = ContentFormat | ReadOnlyContentFormat;
|
|
62
63
|
declare function isReadOnlyContentFormat(format: DocumentFormat): format is ReadOnlyContentFormat;
|
|
63
|
-
declare const FORMAT_NODES: Readonly<Record<ContentFormat, FormatNode>>;
|
|
64
64
|
declare const LAYOUT_CAPABLE: ReadonlySet<SourceContentFormat>;
|
|
65
65
|
declare function executeBridge(source: SourceContentFormat, target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
66
66
|
declare function executeFromPdf(target: ContentFormat, bytes: Uint8Array<ArrayBuffer>, options?: UnifiedConversionOptions): Uint8Array<ArrayBuffer>;
|
|
@@ -38,71 +38,6 @@ import "markdown-codec";
|
|
|
38
38
|
import { readWpdContent } from "wpd-codec";
|
|
39
39
|
import { readPdf } from "pdf-codec/read";
|
|
40
40
|
//#region src/convert/composition.ts
|
|
41
|
-
const CONTENT_FORMATS = [
|
|
42
|
-
"docx",
|
|
43
|
-
"pptx",
|
|
44
|
-
"xlsx",
|
|
45
|
-
"odt",
|
|
46
|
-
"odp",
|
|
47
|
-
"ods",
|
|
48
|
-
"odg",
|
|
49
|
-
"svg",
|
|
50
|
-
"csv",
|
|
51
|
-
"markdown",
|
|
52
|
-
"rtf",
|
|
53
|
-
"doc",
|
|
54
|
-
"xls",
|
|
55
|
-
"ppt",
|
|
56
|
-
"epub"
|
|
57
|
-
];
|
|
58
|
-
function isTextFormatNode(node) {
|
|
59
|
-
return !node.hasSourcePackage;
|
|
60
|
-
}
|
|
61
|
-
const READ_ONLY_CONTENT_FORMATS = ["wpd"];
|
|
62
|
-
const READ_ONLY_FORMAT_NODES = { wpd: {
|
|
63
|
-
variant: "wordprocessing",
|
|
64
|
-
read: (bytes) => readWpdContent(bytes)
|
|
65
|
-
} };
|
|
66
|
-
function isReadOnlyContentFormat(format) {
|
|
67
|
-
return READ_ONLY_CONTENT_FORMATS.includes(format);
|
|
68
|
-
}
|
|
69
|
-
function readSourceContent(format, bytes, options) {
|
|
70
|
-
if (isReadOnlyContentFormat(format)) {
|
|
71
|
-
const node = READ_ONLY_FORMAT_NODES[format];
|
|
72
|
-
return {
|
|
73
|
-
content: node.read(bytes, options),
|
|
74
|
-
variant: node.variant
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
const node = FORMAT_NODES[format];
|
|
78
|
-
if (isTextFormatNode(node)) {
|
|
79
|
-
const text = node.decode(bytes);
|
|
80
|
-
return {
|
|
81
|
-
content: node.read(text, options),
|
|
82
|
-
variant: node.variant
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
const pkg = node.decode(bytes);
|
|
86
|
-
return {
|
|
87
|
-
content: node.read(pkg, options),
|
|
88
|
-
variant: node.variant
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
const LATIN1_CHUNK_SIZE = 8192;
|
|
92
|
-
function bytesToLatin1(bytes) {
|
|
93
|
-
let text = "";
|
|
94
|
-
for (let start = 0; start < bytes.length; start += LATIN1_CHUNK_SIZE) text += String.fromCharCode(...bytes.subarray(start, start + LATIN1_CHUNK_SIZE));
|
|
95
|
-
return text;
|
|
96
|
-
}
|
|
97
|
-
function latin1ToBytes(text) {
|
|
98
|
-
const bytes = new Uint8Array(text.length);
|
|
99
|
-
for (let index = 0; index < text.length; index += 1) {
|
|
100
|
-
const code = text.charCodeAt(index);
|
|
101
|
-
if (code > 255) throw new TypeError(`latin1ToBytes: character at index ${String(index)} is U+${code.toString(16).toUpperCase().padStart(4, "0")}, above U+00FF — this string no longer holds the file's original bytes`);
|
|
102
|
-
bytes[index] = code;
|
|
103
|
-
}
|
|
104
|
-
return bytes;
|
|
105
|
-
}
|
|
106
41
|
const FORMAT_NODES = {
|
|
107
42
|
docx: {
|
|
108
43
|
variant: "wordprocessing",
|
|
@@ -267,6 +202,71 @@ const FORMAT_NODES = {
|
|
|
267
202
|
hasSourcePackage: false
|
|
268
203
|
}
|
|
269
204
|
};
|
|
205
|
+
const CONTENT_FORMATS = [
|
|
206
|
+
"docx",
|
|
207
|
+
"pptx",
|
|
208
|
+
"xlsx",
|
|
209
|
+
"odt",
|
|
210
|
+
"odp",
|
|
211
|
+
"ods",
|
|
212
|
+
"odg",
|
|
213
|
+
"svg",
|
|
214
|
+
"csv",
|
|
215
|
+
"markdown",
|
|
216
|
+
"rtf",
|
|
217
|
+
"doc",
|
|
218
|
+
"xls",
|
|
219
|
+
"ppt",
|
|
220
|
+
"epub"
|
|
221
|
+
];
|
|
222
|
+
function isTextFormatNode(node) {
|
|
223
|
+
return !node.hasSourcePackage;
|
|
224
|
+
}
|
|
225
|
+
const READ_ONLY_CONTENT_FORMATS = ["wpd"];
|
|
226
|
+
const READ_ONLY_FORMAT_NODES = { wpd: {
|
|
227
|
+
variant: "wordprocessing",
|
|
228
|
+
read: (bytes) => readWpdContent(bytes)
|
|
229
|
+
} };
|
|
230
|
+
function isReadOnlyContentFormat(format) {
|
|
231
|
+
return READ_ONLY_CONTENT_FORMATS.includes(format);
|
|
232
|
+
}
|
|
233
|
+
function readSourceContent(format, bytes, options) {
|
|
234
|
+
if (isReadOnlyContentFormat(format)) {
|
|
235
|
+
const node = READ_ONLY_FORMAT_NODES[format];
|
|
236
|
+
return {
|
|
237
|
+
content: node.read(bytes, options),
|
|
238
|
+
variant: node.variant
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
const node = FORMAT_NODES[format];
|
|
242
|
+
if (isTextFormatNode(node)) {
|
|
243
|
+
const text = node.decode(bytes);
|
|
244
|
+
return {
|
|
245
|
+
content: node.read(text, options),
|
|
246
|
+
variant: node.variant
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
const pkg = node.decode(bytes);
|
|
250
|
+
return {
|
|
251
|
+
content: node.read(pkg, options),
|
|
252
|
+
variant: node.variant
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
const LATIN1_CHUNK_SIZE = 8192;
|
|
256
|
+
function bytesToLatin1(bytes) {
|
|
257
|
+
let text = "";
|
|
258
|
+
for (let start = 0; start < bytes.length; start += LATIN1_CHUNK_SIZE) text += String.fromCharCode(...bytes.subarray(start, start + LATIN1_CHUNK_SIZE));
|
|
259
|
+
return text;
|
|
260
|
+
}
|
|
261
|
+
function latin1ToBytes(text) {
|
|
262
|
+
const bytes = new Uint8Array(text.length);
|
|
263
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
264
|
+
const code = text.charCodeAt(index);
|
|
265
|
+
if (code > 255) throw new TypeError(`latin1ToBytes: character at index ${String(index)} is U+${code.toString(16).toUpperCase().padStart(4, "0")}, above U+00FF — this string no longer holds the file's original bytes`);
|
|
266
|
+
bytes[index] = code;
|
|
267
|
+
}
|
|
268
|
+
return bytes;
|
|
269
|
+
}
|
|
270
270
|
const LAYOUT_CAPABLE = /* @__PURE__ */ new Set([
|
|
271
271
|
"docx",
|
|
272
272
|
"pptx",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../clock-
|
|
1
|
+
import { t as ClockPort } from "../clock-Cewekmhw.cjs";
|
|
2
2
|
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.cjs";
|
|
3
3
|
import { i as CellTypeInferenceSink } from "../cell-typing-BQ-xQ5X5.cjs";
|
|
4
4
|
import { t as OmmlDiagnostic } from "../shared-c0Lp3_iY.cjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../clock-
|
|
1
|
+
import { t as ClockPort } from "../clock-Cewekmhw.js";
|
|
2
2
|
import { i as SvgDiagnosticSink } from "../diagnostics-DVAXKgcf.js";
|
|
3
3
|
import { i as CellTypeInferenceSink } from "../cell-typing-BQ-xQ5X5.js";
|
|
4
4
|
import { t as OmmlDiagnostic } from "../shared-DHu5jDJf.js";
|
package/dist/convert/local.cjs
CHANGED
|
@@ -48,7 +48,7 @@ function createLocalDocumentConverter() {
|
|
|
48
48
|
return {
|
|
49
49
|
contractVersion: 7,
|
|
50
50
|
conversions: SUPPORTED_CONVERSIONS,
|
|
51
|
-
convert(request, options) {
|
|
51
|
+
async convert(request, options) {
|
|
52
52
|
const { source, targetFormat } = request;
|
|
53
53
|
const diagnostics = [];
|
|
54
54
|
let documentPackage;
|
|
@@ -81,8 +81,12 @@ function createLocalDocumentConverter() {
|
|
|
81
81
|
signal: options.signal,
|
|
82
82
|
fonts: options.fonts,
|
|
83
83
|
onFontSubstitution,
|
|
84
|
-
onSubstitution: (s, c) =>
|
|
85
|
-
|
|
84
|
+
onSubstitution: (s, c) => {
|
|
85
|
+
diagnostics.push(substitutionDiagnostic(s, c));
|
|
86
|
+
},
|
|
87
|
+
sink: (d) => {
|
|
88
|
+
diagnostics.push(fromPdfDiagnostic(d));
|
|
89
|
+
},
|
|
86
90
|
images: options.images,
|
|
87
91
|
delimiter: options.delimiter,
|
|
88
92
|
sheet: options.sheet,
|
package/dist/convert/local.js
CHANGED
|
@@ -47,7 +47,7 @@ function createLocalDocumentConverter() {
|
|
|
47
47
|
return {
|
|
48
48
|
contractVersion: 7,
|
|
49
49
|
conversions: SUPPORTED_CONVERSIONS,
|
|
50
|
-
convert(request, options) {
|
|
50
|
+
async convert(request, options) {
|
|
51
51
|
const { source, targetFormat } = request;
|
|
52
52
|
const diagnostics = [];
|
|
53
53
|
let documentPackage;
|
|
@@ -80,8 +80,12 @@ function createLocalDocumentConverter() {
|
|
|
80
80
|
signal: options.signal,
|
|
81
81
|
fonts: options.fonts,
|
|
82
82
|
onFontSubstitution,
|
|
83
|
-
onSubstitution: (s, c) =>
|
|
84
|
-
|
|
83
|
+
onSubstitution: (s, c) => {
|
|
84
|
+
diagnostics.push(substitutionDiagnostic(s, c));
|
|
85
|
+
},
|
|
86
|
+
sink: (d) => {
|
|
87
|
+
diagnostics.push(fromPdfDiagnostic(d));
|
|
88
|
+
},
|
|
85
89
|
images: options.images,
|
|
86
90
|
delimiter: options.delimiter,
|
|
87
91
|
sheet: options.sheet,
|
package/dist/convert/port.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../clock-
|
|
1
|
+
import { t as ClockPort } from "../clock-Cewekmhw.cjs";
|
|
2
2
|
import { DocumentTree, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
3
3
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -60,7 +60,7 @@ interface DocumentConverter {
|
|
|
60
60
|
readonly source: DocumentFormat;
|
|
61
61
|
readonly target: DocumentFormat;
|
|
62
62
|
}[];
|
|
63
|
-
convert(request: ConversionRequest, options: ConversionOptions)
|
|
63
|
+
convert: (request: ConversionRequest, options: ConversionOptions) => Promise<ConversionResult>;
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
66
|
export { ConversionOptions, ConversionRequest, ConversionResult, DOCUMENT_FORMATS, Diagnostic, DocumentConverter, DocumentFormat, DocumentFormatSchema, DocumentPayload };
|
package/dist/convert/port.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../clock-
|
|
1
|
+
import { t as ClockPort } from "../clock-Cewekmhw.js";
|
|
2
2
|
import { DocumentTree, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
@@ -60,7 +60,7 @@ interface DocumentConverter {
|
|
|
60
60
|
readonly source: DocumentFormat;
|
|
61
61
|
readonly target: DocumentFormat;
|
|
62
62
|
}[];
|
|
63
|
-
convert(request: ConversionRequest, options: ConversionOptions)
|
|
63
|
+
convert: (request: ConversionRequest, options: ConversionOptions) => Promise<ConversionResult>;
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
66
|
export { ConversionOptions, ConversionRequest, ConversionResult, DOCUMENT_FORMATS, Diagnostic, DocumentConverter, DocumentFormat, DocumentFormatSchema, DocumentPayload };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../../clock-
|
|
1
|
+
import { t as ClockPort } from "../../clock-Cewekmhw.cjs";
|
|
2
2
|
import { MetadataOverrides } from "../../metadata/core-patch.cjs";
|
|
3
3
|
import { n as ParagraphInit, t as DocParagraph } from "../../paragraph-DM9n9I4T.cjs";
|
|
4
4
|
import { DocTable, TableInit } from "./table.cjs";
|
|
@@ -29,10 +29,10 @@ declare class DocSection {
|
|
|
29
29
|
remove(): void;
|
|
30
30
|
}
|
|
31
31
|
interface DocBody {
|
|
32
|
-
paragraphs()
|
|
33
|
-
appendParagraph(init?: ParagraphInit)
|
|
34
|
-
tables()
|
|
35
|
-
appendTable(init: TableInit)
|
|
32
|
+
paragraphs: () => DocParagraph[];
|
|
33
|
+
appendParagraph: (init?: ParagraphInit) => DocParagraph;
|
|
34
|
+
tables: () => DocTable[];
|
|
35
|
+
appendTable: (init: TableInit) => DocTable;
|
|
36
36
|
}
|
|
37
37
|
interface CreateDocOptions {
|
|
38
38
|
readonly clock?: ClockPort;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../../clock-
|
|
1
|
+
import { t as ClockPort } from "../../clock-Cewekmhw.js";
|
|
2
2
|
import { MetadataOverrides } from "../../metadata/core-patch.js";
|
|
3
3
|
import { n as ParagraphInit, t as DocParagraph } from "../../paragraph-Byw2Y7xu.js";
|
|
4
4
|
import { DocTable, TableInit } from "./table.js";
|
|
@@ -29,10 +29,10 @@ declare class DocSection {
|
|
|
29
29
|
remove(): void;
|
|
30
30
|
}
|
|
31
31
|
interface DocBody {
|
|
32
|
-
paragraphs()
|
|
33
|
-
appendParagraph(init?: ParagraphInit)
|
|
34
|
-
tables()
|
|
35
|
-
appendTable(init: TableInit)
|
|
32
|
+
paragraphs: () => DocParagraph[];
|
|
33
|
+
appendParagraph: (init?: ParagraphInit) => DocParagraph;
|
|
34
|
+
tables: () => DocTable[];
|
|
35
|
+
appendTable: (init: TableInit) => DocTable;
|
|
36
36
|
}
|
|
37
37
|
interface CreateDocOptions {
|
|
38
38
|
readonly clock?: ClockPort;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../../clock-
|
|
1
|
+
import { t as ClockPort } from "../../clock-Cewekmhw.cjs";
|
|
2
2
|
import { t as OmmlDiagnostic } from "../../shared-c0Lp3_iY.cjs";
|
|
3
3
|
import { a as DocxWriteDiagnosticSink } from "../../diagnostics-C2-C2uUI.cjs";
|
|
4
4
|
import { ContentDocument } from "document-schema.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../../clock-
|
|
1
|
+
import { t as ClockPort } from "../../clock-Cewekmhw.js";
|
|
2
2
|
import { t as OmmlDiagnostic } from "../../shared-DHu5jDJf.js";
|
|
3
3
|
import { a as DocxWriteDiagnosticSink } from "../../diagnostics-C2-C2uUI.js";
|
|
4
4
|
import { Package } from "ooxml.js";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { t as ClockPort } from "../../clock-
|
|
1
|
+
import { t as ClockPort } from "../../clock-Cewekmhw.cjs";
|
|
2
2
|
import { DocxParagraph, ParagraphInit } from "./paragraph.cjs";
|
|
3
3
|
import { DocxTable, TableInit } from "./table.cjs";
|
|
4
4
|
import { ContentControlDescriptor, LayoutMetadata, ProvenanceDescriptor } from "document-schema.js";
|
|
5
5
|
import { Package } from "ooxml.js";
|
|
6
6
|
//#region src/edit/docx/editor.d.ts
|
|
7
7
|
interface DocxBody {
|
|
8
|
-
insertParagraphAt(index: number, init?: ParagraphInit)
|
|
9
|
-
appendParagraph(init?: ParagraphInit)
|
|
10
|
-
appendTable(init: TableInit)
|
|
11
|
-
appendPageBreak()
|
|
12
|
-
appendBookmarkStart(id: number, name: string)
|
|
13
|
-
appendBookmarkEnd(id: number)
|
|
14
|
-
openContentControlRegion(descriptor: ContentControlDescriptor)
|
|
15
|
-
openProvenanceRegion(descriptor: ProvenanceDescriptor)
|
|
16
|
-
closeRegion()
|
|
8
|
+
insertParagraphAt: (index: number, init?: ParagraphInit) => DocxParagraph;
|
|
9
|
+
appendParagraph: (init?: ParagraphInit) => DocxParagraph;
|
|
10
|
+
appendTable: (init: TableInit) => DocxTable;
|
|
11
|
+
appendPageBreak: () => void;
|
|
12
|
+
appendBookmarkStart: (id: number, name: string) => void;
|
|
13
|
+
appendBookmarkEnd: (id: number) => void;
|
|
14
|
+
openContentControlRegion: (descriptor: ContentControlDescriptor) => void;
|
|
15
|
+
openProvenanceRegion: (descriptor: ProvenanceDescriptor) => boolean;
|
|
16
|
+
closeRegion: () => void;
|
|
17
17
|
}
|
|
18
18
|
declare class DocxEditor {
|
|
19
19
|
readonly body: DocxBody;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { t as ClockPort } from "../../clock-
|
|
1
|
+
import { t as ClockPort } from "../../clock-Cewekmhw.js";
|
|
2
2
|
import { DocxParagraph, ParagraphInit } from "./paragraph.js";
|
|
3
3
|
import { DocxTable, TableInit } from "./table.js";
|
|
4
4
|
import { Package } from "ooxml.js";
|
|
5
5
|
import { ContentControlDescriptor, LayoutMetadata, ProvenanceDescriptor } from "document-schema.js";
|
|
6
6
|
//#region src/edit/docx/editor.d.ts
|
|
7
7
|
interface DocxBody {
|
|
8
|
-
insertParagraphAt(index: number, init?: ParagraphInit)
|
|
9
|
-
appendParagraph(init?: ParagraphInit)
|
|
10
|
-
appendTable(init: TableInit)
|
|
11
|
-
appendPageBreak()
|
|
12
|
-
appendBookmarkStart(id: number, name: string)
|
|
13
|
-
appendBookmarkEnd(id: number)
|
|
14
|
-
openContentControlRegion(descriptor: ContentControlDescriptor)
|
|
15
|
-
openProvenanceRegion(descriptor: ProvenanceDescriptor)
|
|
16
|
-
closeRegion()
|
|
8
|
+
insertParagraphAt: (index: number, init?: ParagraphInit) => DocxParagraph;
|
|
9
|
+
appendParagraph: (init?: ParagraphInit) => DocxParagraph;
|
|
10
|
+
appendTable: (init: TableInit) => DocxTable;
|
|
11
|
+
appendPageBreak: () => void;
|
|
12
|
+
appendBookmarkStart: (id: number, name: string) => void;
|
|
13
|
+
appendBookmarkEnd: (id: number) => void;
|
|
14
|
+
openContentControlRegion: (descriptor: ContentControlDescriptor) => void;
|
|
15
|
+
openProvenanceRegion: (descriptor: ProvenanceDescriptor) => boolean;
|
|
16
|
+
closeRegion: () => void;
|
|
17
17
|
}
|
|
18
18
|
declare class DocxEditor {
|
|
19
19
|
readonly body: DocxBody;
|
package/dist/edit/docx/table.cjs
CHANGED
|
@@ -278,7 +278,7 @@ function physicalCells(cells) {
|
|
|
278
278
|
function verticalSpan(rowsBelow, columnIndex) {
|
|
279
279
|
let span = 1;
|
|
280
280
|
for (const row of rowsBelow) {
|
|
281
|
-
if (
|
|
281
|
+
if (row.find((cell) => cell.columnIndex === columnIndex)?.continuesVerticalMerge !== true) break;
|
|
282
282
|
span++;
|
|
283
283
|
}
|
|
284
284
|
return span;
|
package/dist/edit/docx/table.js
CHANGED
|
@@ -277,7 +277,7 @@ function physicalCells(cells) {
|
|
|
277
277
|
function verticalSpan(rowsBelow, columnIndex) {
|
|
278
278
|
let span = 1;
|
|
279
279
|
for (const row of rowsBelow) {
|
|
280
|
-
if (
|
|
280
|
+
if (row.find((cell) => cell.columnIndex === columnIndex)?.continuesVerticalMerge !== true) break;
|
|
281
281
|
span++;
|
|
282
282
|
}
|
|
283
283
|
return span;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as ClockPort } from "../../clock-
|
|
1
|
+
import { t as ClockPort } from "../../clock-Cewekmhw.cjs";
|
|
2
2
|
import { MarkdownParagraph, ParagraphInit } from "./paragraph.cjs";
|
|
3
3
|
import { MarkdownList, MarkdownListInit } from "./list.cjs";
|
|
4
4
|
import { MarkdownTable, TableInit } from "./table.cjs";
|
|
@@ -6,11 +6,11 @@ import { ContentDocument, Margins, PageSize } from "document-schema.js";
|
|
|
6
6
|
import { ReadMarkdownOptions, WriteMarkdownOptions } from "markdown-codec";
|
|
7
7
|
//#region src/edit/markdown/editor.d.ts
|
|
8
8
|
interface MarkdownBody {
|
|
9
|
-
paragraphs()
|
|
10
|
-
appendParagraph(init?: ParagraphInit)
|
|
11
|
-
tables()
|
|
12
|
-
appendTable(init: TableInit)
|
|
13
|
-
startList(init: MarkdownListInit)
|
|
9
|
+
paragraphs: () => MarkdownParagraph[];
|
|
10
|
+
appendParagraph: (init?: ParagraphInit) => MarkdownParagraph;
|
|
11
|
+
tables: () => MarkdownTable[];
|
|
12
|
+
appendTable: (init: TableInit) => MarkdownTable;
|
|
13
|
+
startList: (init: MarkdownListInit) => MarkdownList;
|
|
14
14
|
}
|
|
15
15
|
interface CreateMarkdownEditorOptions {
|
|
16
16
|
readonly clock?: ClockPort;
|