js.documents 1.97.10 → 1.98.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.
Files changed (39) hide show
  1. package/dist/capability-DX0lCSiI.d.ts +16 -0
  2. package/dist/capability-an5gSNsu.d.cts +16 -0
  3. package/dist/convert/capability.cjs +0 -207
  4. package/dist/convert/capability.d.cts +2 -38
  5. package/dist/convert/capability.d.ts +2 -38
  6. package/dist/convert/capability.js +1 -206
  7. package/dist/convert/composition.cjs +415 -0
  8. package/dist/convert/composition.d.cts +60 -0
  9. package/dist/convert/composition.d.ts +60 -0
  10. package/dist/convert/composition.js +412 -0
  11. package/dist/convert/convert.cjs +33 -480
  12. package/dist/convert/convert.d.cts +3 -3
  13. package/dist/convert/convert.d.ts +2 -2
  14. package/dist/convert/convert.js +36 -483
  15. package/dist/convert/local.cjs +33 -33
  16. package/dist/convert/local.js +34 -34
  17. package/dist/fonts/registry.d.cts +19 -1
  18. package/dist/fonts/registry.d.ts +19 -1
  19. package/dist/hsqldb/binary-script.d.cts +1 -1
  20. package/dist/hsqldb/binary-script.d.ts +1 -1
  21. package/dist/hsqldb/cache.d.cts +1 -1
  22. package/dist/hsqldb/cache.d.ts +1 -1
  23. package/dist/hsqldb/rowformat.d.cts +24 -1
  24. package/dist/hsqldb/rowformat.d.ts +24 -1
  25. package/dist/index.cjs +4 -1
  26. package/dist/index.d.cts +7 -6
  27. package/dist/index.d.ts +5 -4
  28. package/dist/index.js +3 -2
  29. package/dist/odb/read.d.cts +1 -1
  30. package/dist/odb/read.d.ts +1 -1
  31. package/dist/odb/report/content.d.cts +1 -1
  32. package/dist/odb/report/content.d.ts +1 -1
  33. package/dist/odb/report/source.d.cts +1 -1
  34. package/dist/odb/report/source.d.ts +1 -1
  35. package/package.json +1 -1
  36. package/dist/registry-DpF4A9EM.d.ts +0 -20
  37. package/dist/registry-ZAWlWHqJ.d.cts +0 -20
  38. package/dist/rowformat-Cl2exlEh.d.cts +0 -25
  39. package/dist/rowformat-Cl2exlEh.d.ts +0 -25
@@ -0,0 +1,16 @@
1
+ import { DocumentFormat } from "./convert/port.js";
2
+ //#region src/convert/capability.d.ts
3
+ type ContentVariant = 'wordprocessing' | 'presentation' | 'spreadsheet' | 'drawing' | 'formula';
4
+ interface FormatCapability {
5
+ readonly format: DocumentFormat;
6
+ readonly variant?: ContentVariant;
7
+ readonly hasLayoutPath: boolean;
8
+ }
9
+ declare const FORMAT_CAPABILITIES: Readonly<Record<DocumentFormat, FormatCapability>>;
10
+ declare class UnsupportedConversionError extends Error {
11
+ readonly source: DocumentFormat;
12
+ readonly target: DocumentFormat;
13
+ constructor(source: DocumentFormat, target: DocumentFormat);
14
+ }
15
+ //#endregion
16
+ export { UnsupportedConversionError as i, FORMAT_CAPABILITIES as n, FormatCapability as r, ContentVariant as t };
@@ -0,0 +1,16 @@
1
+ import { DocumentFormat } from "./convert/port.cjs";
2
+ //#region src/convert/capability.d.ts
3
+ type ContentVariant = 'wordprocessing' | 'presentation' | 'spreadsheet' | 'drawing' | 'formula';
4
+ interface FormatCapability {
5
+ readonly format: DocumentFormat;
6
+ readonly variant?: ContentVariant;
7
+ readonly hasLayoutPath: boolean;
8
+ }
9
+ declare const FORMAT_CAPABILITIES: Readonly<Record<DocumentFormat, FormatCapability>>;
10
+ declare class UnsupportedConversionError extends Error {
11
+ readonly source: DocumentFormat;
12
+ readonly target: DocumentFormat;
13
+ constructor(source: DocumentFormat, target: DocumentFormat);
14
+ }
15
+ //#endregion
16
+ export { UnsupportedConversionError as i, FORMAT_CAPABILITIES as n, FormatCapability as r, ContentVariant as t };
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_convert_convert = require("./convert.cjs");
3
2
  //#region src/convert/capability.ts
4
3
  const FORMAT_CAPABILITIES = {
5
4
  docx: {
@@ -52,206 +51,6 @@ const FORMAT_CAPABILITIES = {
52
51
  hasLayoutPath: false
53
52
  }
54
53
  };
55
- const DIRECT_EDGES = [
56
- {
57
- kind: "toPdf",
58
- source: "docx",
59
- target: "pdf",
60
- convert: require_convert_convert.docxToPdf
61
- },
62
- {
63
- kind: "toPdf",
64
- source: "pptx",
65
- target: "pdf",
66
- convert: require_convert_convert.pptxToPdf
67
- },
68
- {
69
- kind: "toPdf",
70
- source: "odt",
71
- target: "pdf",
72
- convert: require_convert_convert.odtToPdf
73
- },
74
- {
75
- kind: "toPdf",
76
- source: "odp",
77
- target: "pdf",
78
- convert: require_convert_convert.odpToPdf
79
- },
80
- {
81
- kind: "toPdf",
82
- source: "ods",
83
- target: "pdf",
84
- convert: require_convert_convert.odsToPdf
85
- },
86
- {
87
- kind: "toPdf",
88
- source: "odg",
89
- target: "pdf",
90
- convert: require_convert_convert.odgToPdf
91
- },
92
- {
93
- kind: "toPdf",
94
- source: "odf",
95
- target: "pdf",
96
- convert: require_convert_convert.odfToPdf
97
- },
98
- {
99
- kind: "toPdf",
100
- source: "xlsx",
101
- target: "pdf",
102
- convert: require_convert_convert.xlsxToPdf
103
- },
104
- {
105
- kind: "toPdf",
106
- source: "markdown",
107
- target: "pdf",
108
- convert: require_convert_convert.markdownToPdf
109
- },
110
- {
111
- kind: "fromPdf",
112
- source: "pdf",
113
- target: "docx",
114
- convert: require_convert_convert.pdfToDocx
115
- },
116
- {
117
- kind: "fromPdf",
118
- source: "pdf",
119
- target: "pptx",
120
- convert: require_convert_convert.pdfToPptx
121
- },
122
- {
123
- kind: "fromPdf",
124
- source: "pdf",
125
- target: "odt",
126
- convert: require_convert_convert.pdfToOdt
127
- },
128
- {
129
- kind: "fromPdf",
130
- source: "pdf",
131
- target: "odp",
132
- convert: require_convert_convert.pdfToOdp
133
- },
134
- {
135
- kind: "fromPdf",
136
- source: "pdf",
137
- target: "ods",
138
- convert: require_convert_convert.pdfToOds
139
- },
140
- {
141
- kind: "fromPdf",
142
- source: "pdf",
143
- target: "odg",
144
- convert: require_convert_convert.pdfToOdg
145
- },
146
- {
147
- kind: "fromPdf",
148
- source: "pdf",
149
- target: "xlsx",
150
- convert: require_convert_convert.pdfToXlsx
151
- },
152
- {
153
- kind: "fromPdf",
154
- source: "pdf",
155
- target: "markdown",
156
- convert: require_convert_convert.pdfToMarkdown
157
- },
158
- {
159
- kind: "bridge",
160
- source: "odt",
161
- target: "docx",
162
- convert: require_convert_convert.odtToDocx
163
- },
164
- {
165
- kind: "bridge",
166
- source: "docx",
167
- target: "odt",
168
- convert: require_convert_convert.docxToOdt
169
- },
170
- {
171
- kind: "bridge",
172
- source: "odp",
173
- target: "pptx",
174
- convert: require_convert_convert.odpToPptx
175
- },
176
- {
177
- kind: "bridge",
178
- source: "pptx",
179
- target: "odp",
180
- convert: require_convert_convert.pptxToOdp
181
- },
182
- {
183
- kind: "bridge",
184
- source: "ods",
185
- target: "xlsx",
186
- convert: require_convert_convert.odsToXlsx
187
- },
188
- {
189
- kind: "bridge",
190
- source: "xlsx",
191
- target: "ods",
192
- convert: require_convert_convert.xlsxToOds
193
- },
194
- {
195
- kind: "bridge",
196
- source: "markdown",
197
- target: "docx",
198
- convert: require_convert_convert.markdownToDocx
199
- },
200
- {
201
- kind: "bridge",
202
- source: "docx",
203
- target: "markdown",
204
- convert: require_convert_convert.docxToMarkdown
205
- },
206
- {
207
- kind: "bridge",
208
- source: "markdown",
209
- target: "odt",
210
- convert: require_convert_convert.markdownToOdt
211
- },
212
- {
213
- kind: "bridge",
214
- source: "odt",
215
- target: "markdown",
216
- convert: require_convert_convert.odtToMarkdown
217
- },
218
- {
219
- kind: "bridge",
220
- source: "docx",
221
- target: "pptx",
222
- convert: require_convert_convert.docxToPptx
223
- },
224
- {
225
- kind: "bridge",
226
- source: "pptx",
227
- target: "docx",
228
- convert: require_convert_convert.pptxToDocx
229
- },
230
- {
231
- kind: "bridge",
232
- source: "odt",
233
- target: "odp",
234
- convert: require_convert_convert.odtToOdp
235
- },
236
- {
237
- kind: "bridge",
238
- source: "odp",
239
- target: "odt",
240
- convert: require_convert_convert.odpToOdt
241
- },
242
- {
243
- kind: "bridge",
244
- source: "xlsx",
245
- target: "markdown",
246
- convert: require_convert_convert.xlsxToMarkdown
247
- },
248
- {
249
- kind: "bridge",
250
- source: "markdown",
251
- target: "xlsx",
252
- convert: require_convert_convert.markdownToXlsx
253
- }
254
- ];
255
54
  var UnsupportedConversionError = class extends Error {
256
55
  source;
257
56
  target;
@@ -262,12 +61,6 @@ var UnsupportedConversionError = class extends Error {
262
61
  this.target = target;
263
62
  }
264
63
  };
265
- function resolveConversionPath(source, target, edges = DIRECT_EDGES) {
266
- if (source === target) return;
267
- return edges.find((edge) => edge.source === source && edge.target === target);
268
- }
269
64
  //#endregion
270
- exports.DIRECT_EDGES = DIRECT_EDGES;
271
65
  exports.FORMAT_CAPABILITIES = FORMAT_CAPABILITIES;
272
66
  exports.UnsupportedConversionError = UnsupportedConversionError;
273
- exports.resolveConversionPath = resolveConversionPath;
@@ -1,38 +1,2 @@
1
- import { DocumentFormat } from "./port.cjs";
2
- import { DocumentBridgeOptions, DocumentToPdfOptions, PdfToDocumentOptions } from "./convert.cjs";
3
- //#region src/convert/capability.d.ts
4
- type ContentVariant = 'wordprocessing' | 'presentation' | 'spreadsheet' | 'drawing' | 'formula';
5
- interface FormatCapability {
6
- readonly format: DocumentFormat;
7
- readonly variant?: ContentVariant;
8
- readonly hasLayoutPath: boolean;
9
- }
10
- declare const FORMAT_CAPABILITIES: Readonly<Record<DocumentFormat, FormatCapability>>;
11
- interface ToPdfEdge {
12
- readonly kind: 'toPdf';
13
- readonly source: DocumentFormat;
14
- readonly target: 'pdf';
15
- readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: DocumentToPdfOptions) => Uint8Array<ArrayBuffer>;
16
- }
17
- interface FromPdfEdge {
18
- readonly kind: 'fromPdf';
19
- readonly source: 'pdf';
20
- readonly target: DocumentFormat;
21
- readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: PdfToDocumentOptions) => Uint8Array<ArrayBuffer>;
22
- }
23
- interface BridgeEdge {
24
- readonly kind: 'bridge';
25
- readonly source: DocumentFormat;
26
- readonly target: DocumentFormat;
27
- readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: DocumentBridgeOptions) => Uint8Array<ArrayBuffer>;
28
- }
29
- type ConversionEdge = ToPdfEdge | FromPdfEdge | BridgeEdge;
30
- declare const DIRECT_EDGES: readonly ConversionEdge[];
31
- declare class UnsupportedConversionError extends Error {
32
- readonly source: DocumentFormat;
33
- readonly target: DocumentFormat;
34
- constructor(source: DocumentFormat, target: DocumentFormat);
35
- }
36
- declare function resolveConversionPath(source: DocumentFormat, target: DocumentFormat, edges?: readonly ConversionEdge[]): ConversionEdge | undefined;
37
- //#endregion
38
- export { BridgeEdge, ContentVariant, ConversionEdge, DIRECT_EDGES, FORMAT_CAPABILITIES, FormatCapability, FromPdfEdge, ToPdfEdge, UnsupportedConversionError, resolveConversionPath };
1
+ import { i as UnsupportedConversionError, n as FORMAT_CAPABILITIES, r as FormatCapability, t as ContentVariant } from "../capability-an5gSNsu.cjs";
2
+ export { ContentVariant, FORMAT_CAPABILITIES, FormatCapability, UnsupportedConversionError };
@@ -1,38 +1,2 @@
1
- import { DocumentFormat } from "./port.js";
2
- import { DocumentBridgeOptions, DocumentToPdfOptions, PdfToDocumentOptions } from "./convert.js";
3
- //#region src/convert/capability.d.ts
4
- type ContentVariant = 'wordprocessing' | 'presentation' | 'spreadsheet' | 'drawing' | 'formula';
5
- interface FormatCapability {
6
- readonly format: DocumentFormat;
7
- readonly variant?: ContentVariant;
8
- readonly hasLayoutPath: boolean;
9
- }
10
- declare const FORMAT_CAPABILITIES: Readonly<Record<DocumentFormat, FormatCapability>>;
11
- interface ToPdfEdge {
12
- readonly kind: 'toPdf';
13
- readonly source: DocumentFormat;
14
- readonly target: 'pdf';
15
- readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: DocumentToPdfOptions) => Uint8Array<ArrayBuffer>;
16
- }
17
- interface FromPdfEdge {
18
- readonly kind: 'fromPdf';
19
- readonly source: 'pdf';
20
- readonly target: DocumentFormat;
21
- readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: PdfToDocumentOptions) => Uint8Array<ArrayBuffer>;
22
- }
23
- interface BridgeEdge {
24
- readonly kind: 'bridge';
25
- readonly source: DocumentFormat;
26
- readonly target: DocumentFormat;
27
- readonly convert: (bytes: Uint8Array<ArrayBuffer>, options: DocumentBridgeOptions) => Uint8Array<ArrayBuffer>;
28
- }
29
- type ConversionEdge = ToPdfEdge | FromPdfEdge | BridgeEdge;
30
- declare const DIRECT_EDGES: readonly ConversionEdge[];
31
- declare class UnsupportedConversionError extends Error {
32
- readonly source: DocumentFormat;
33
- readonly target: DocumentFormat;
34
- constructor(source: DocumentFormat, target: DocumentFormat);
35
- }
36
- declare function resolveConversionPath(source: DocumentFormat, target: DocumentFormat, edges?: readonly ConversionEdge[]): ConversionEdge | undefined;
37
- //#endregion
38
- export { BridgeEdge, ContentVariant, ConversionEdge, DIRECT_EDGES, FORMAT_CAPABILITIES, FormatCapability, FromPdfEdge, ToPdfEdge, UnsupportedConversionError, resolveConversionPath };
1
+ import { i as UnsupportedConversionError, n as FORMAT_CAPABILITIES, r as FormatCapability, t as ContentVariant } from "../capability-DX0lCSiI.js";
2
+ export { ContentVariant, FORMAT_CAPABILITIES, FormatCapability, UnsupportedConversionError };
@@ -1,4 +1,3 @@
1
- import { docxToMarkdown, docxToOdt, docxToPdf, docxToPptx, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odfToPdf, odgToPdf, odpToOdt, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToOdp, odtToPdf, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToDocx, pptxToOdp, pptxToPdf, xlsxToMarkdown, xlsxToOds, xlsxToPdf } from "./convert.js";
2
1
  //#region src/convert/capability.ts
3
2
  const FORMAT_CAPABILITIES = {
4
3
  docx: {
@@ -51,206 +50,6 @@ const FORMAT_CAPABILITIES = {
51
50
  hasLayoutPath: false
52
51
  }
53
52
  };
54
- const DIRECT_EDGES = [
55
- {
56
- kind: "toPdf",
57
- source: "docx",
58
- target: "pdf",
59
- convert: docxToPdf
60
- },
61
- {
62
- kind: "toPdf",
63
- source: "pptx",
64
- target: "pdf",
65
- convert: pptxToPdf
66
- },
67
- {
68
- kind: "toPdf",
69
- source: "odt",
70
- target: "pdf",
71
- convert: odtToPdf
72
- },
73
- {
74
- kind: "toPdf",
75
- source: "odp",
76
- target: "pdf",
77
- convert: odpToPdf
78
- },
79
- {
80
- kind: "toPdf",
81
- source: "ods",
82
- target: "pdf",
83
- convert: odsToPdf
84
- },
85
- {
86
- kind: "toPdf",
87
- source: "odg",
88
- target: "pdf",
89
- convert: odgToPdf
90
- },
91
- {
92
- kind: "toPdf",
93
- source: "odf",
94
- target: "pdf",
95
- convert: odfToPdf
96
- },
97
- {
98
- kind: "toPdf",
99
- source: "xlsx",
100
- target: "pdf",
101
- convert: xlsxToPdf
102
- },
103
- {
104
- kind: "toPdf",
105
- source: "markdown",
106
- target: "pdf",
107
- convert: markdownToPdf
108
- },
109
- {
110
- kind: "fromPdf",
111
- source: "pdf",
112
- target: "docx",
113
- convert: pdfToDocx
114
- },
115
- {
116
- kind: "fromPdf",
117
- source: "pdf",
118
- target: "pptx",
119
- convert: pdfToPptx
120
- },
121
- {
122
- kind: "fromPdf",
123
- source: "pdf",
124
- target: "odt",
125
- convert: pdfToOdt
126
- },
127
- {
128
- kind: "fromPdf",
129
- source: "pdf",
130
- target: "odp",
131
- convert: pdfToOdp
132
- },
133
- {
134
- kind: "fromPdf",
135
- source: "pdf",
136
- target: "ods",
137
- convert: pdfToOds
138
- },
139
- {
140
- kind: "fromPdf",
141
- source: "pdf",
142
- target: "odg",
143
- convert: pdfToOdg
144
- },
145
- {
146
- kind: "fromPdf",
147
- source: "pdf",
148
- target: "xlsx",
149
- convert: pdfToXlsx
150
- },
151
- {
152
- kind: "fromPdf",
153
- source: "pdf",
154
- target: "markdown",
155
- convert: pdfToMarkdown
156
- },
157
- {
158
- kind: "bridge",
159
- source: "odt",
160
- target: "docx",
161
- convert: odtToDocx
162
- },
163
- {
164
- kind: "bridge",
165
- source: "docx",
166
- target: "odt",
167
- convert: docxToOdt
168
- },
169
- {
170
- kind: "bridge",
171
- source: "odp",
172
- target: "pptx",
173
- convert: odpToPptx
174
- },
175
- {
176
- kind: "bridge",
177
- source: "pptx",
178
- target: "odp",
179
- convert: pptxToOdp
180
- },
181
- {
182
- kind: "bridge",
183
- source: "ods",
184
- target: "xlsx",
185
- convert: odsToXlsx
186
- },
187
- {
188
- kind: "bridge",
189
- source: "xlsx",
190
- target: "ods",
191
- convert: xlsxToOds
192
- },
193
- {
194
- kind: "bridge",
195
- source: "markdown",
196
- target: "docx",
197
- convert: markdownToDocx
198
- },
199
- {
200
- kind: "bridge",
201
- source: "docx",
202
- target: "markdown",
203
- convert: docxToMarkdown
204
- },
205
- {
206
- kind: "bridge",
207
- source: "markdown",
208
- target: "odt",
209
- convert: markdownToOdt
210
- },
211
- {
212
- kind: "bridge",
213
- source: "odt",
214
- target: "markdown",
215
- convert: odtToMarkdown
216
- },
217
- {
218
- kind: "bridge",
219
- source: "docx",
220
- target: "pptx",
221
- convert: docxToPptx
222
- },
223
- {
224
- kind: "bridge",
225
- source: "pptx",
226
- target: "docx",
227
- convert: pptxToDocx
228
- },
229
- {
230
- kind: "bridge",
231
- source: "odt",
232
- target: "odp",
233
- convert: odtToOdp
234
- },
235
- {
236
- kind: "bridge",
237
- source: "odp",
238
- target: "odt",
239
- convert: odpToOdt
240
- },
241
- {
242
- kind: "bridge",
243
- source: "xlsx",
244
- target: "markdown",
245
- convert: xlsxToMarkdown
246
- },
247
- {
248
- kind: "bridge",
249
- source: "markdown",
250
- target: "xlsx",
251
- convert: markdownToXlsx
252
- }
253
- ];
254
53
  var UnsupportedConversionError = class extends Error {
255
54
  source;
256
55
  target;
@@ -261,9 +60,5 @@ var UnsupportedConversionError = class extends Error {
261
60
  this.target = target;
262
61
  }
263
62
  };
264
- function resolveConversionPath(source, target, edges = DIRECT_EDGES) {
265
- if (source === target) return;
266
- return edges.find((edge) => edge.source === source && edge.target === target);
267
- }
268
63
  //#endregion
269
- export { DIRECT_EDGES, FORMAT_CAPABILITIES, UnsupportedConversionError, resolveConversionPath };
64
+ export { FORMAT_CAPABILITIES, UnsupportedConversionError };