js.documents 1.97.9 → 1.97.11
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/convert/capability.cjs +5 -272
- package/dist/convert/capability.d.cts +1 -1
- package/dist/convert/capability.d.ts +1 -1
- package/dist/convert/capability.js +1 -268
- package/dist/convert/codec.cjs +29 -29
- package/dist/convert/codec.js +1 -1
- package/dist/convert/composition.cjs +5 -0
- package/dist/convert/composition.d.cts +60 -0
- package/dist/convert/composition.d.ts +60 -0
- package/dist/convert/composition.js +2 -0
- package/dist/convert/convert.cjs +42 -797
- package/dist/convert/convert.d.cts +1 -105
- package/dist/convert/convert.d.ts +1 -105
- package/dist/convert/convert.js +1 -756
- package/dist/convert/local.cjs +16 -31
- package/dist/convert/local.js +15 -30
- package/dist/convert-B1izrvnQ.d.cts +106 -0
- package/dist/convert-BO_4tCwz.cjs +1262 -0
- package/dist/convert-HYsWA-LI.d.ts +106 -0
- package/dist/convert-ULGgwmSb.js +975 -0
- package/dist/index.cjs +42 -42
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/metadata/read.cjs +2 -2
- package/dist/metadata/read.js +1 -1
- package/package.json +1 -1
|
@@ -1,273 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
variant: "wordprocessing",
|
|
8
|
-
hasLayoutPath: true
|
|
9
|
-
},
|
|
10
|
-
odt: {
|
|
11
|
-
format: "odt",
|
|
12
|
-
variant: "wordprocessing",
|
|
13
|
-
hasLayoutPath: true
|
|
14
|
-
},
|
|
15
|
-
pptx: {
|
|
16
|
-
format: "pptx",
|
|
17
|
-
variant: "presentation",
|
|
18
|
-
hasLayoutPath: true
|
|
19
|
-
},
|
|
20
|
-
odp: {
|
|
21
|
-
format: "odp",
|
|
22
|
-
variant: "presentation",
|
|
23
|
-
hasLayoutPath: true
|
|
24
|
-
},
|
|
25
|
-
ods: {
|
|
26
|
-
format: "ods",
|
|
27
|
-
variant: "spreadsheet",
|
|
28
|
-
hasLayoutPath: true
|
|
29
|
-
},
|
|
30
|
-
xlsx: {
|
|
31
|
-
format: "xlsx",
|
|
32
|
-
variant: "spreadsheet",
|
|
33
|
-
hasLayoutPath: false
|
|
34
|
-
},
|
|
35
|
-
odg: {
|
|
36
|
-
format: "odg",
|
|
37
|
-
variant: "drawing",
|
|
38
|
-
hasLayoutPath: true
|
|
39
|
-
},
|
|
40
|
-
odf: {
|
|
41
|
-
format: "odf",
|
|
42
|
-
variant: "formula",
|
|
43
|
-
hasLayoutPath: false
|
|
44
|
-
},
|
|
45
|
-
markdown: {
|
|
46
|
-
format: "markdown",
|
|
47
|
-
variant: "wordprocessing",
|
|
48
|
-
hasLayoutPath: true
|
|
49
|
-
},
|
|
50
|
-
pdf: {
|
|
51
|
-
format: "pdf",
|
|
52
|
-
hasLayoutPath: false
|
|
53
|
-
}
|
|
54
|
-
};
|
|
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
|
-
var UnsupportedConversionError = class extends Error {
|
|
256
|
-
source;
|
|
257
|
-
target;
|
|
258
|
-
constructor(source, target) {
|
|
259
|
-
super(`unsupported conversion: ${source} -> ${target}`);
|
|
260
|
-
this.name = "UnsupportedConversionError";
|
|
261
|
-
this.source = source;
|
|
262
|
-
this.target = target;
|
|
263
|
-
}
|
|
264
|
-
};
|
|
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
|
-
//#endregion
|
|
270
|
-
exports.DIRECT_EDGES = DIRECT_EDGES;
|
|
271
|
-
exports.FORMAT_CAPABILITIES = FORMAT_CAPABILITIES;
|
|
272
|
-
exports.UnsupportedConversionError = UnsupportedConversionError;
|
|
273
|
-
exports.resolveConversionPath = resolveConversionPath;
|
|
2
|
+
const require_convert = require("../convert-BO_4tCwz.cjs");
|
|
3
|
+
exports.DIRECT_EDGES = require_convert.DIRECT_EDGES;
|
|
4
|
+
exports.FORMAT_CAPABILITIES = require_convert.FORMAT_CAPABILITIES;
|
|
5
|
+
exports.UnsupportedConversionError = require_convert.UnsupportedConversionError;
|
|
6
|
+
exports.resolveConversionPath = require_convert.resolveConversionPath;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocumentFormat } from "./port.cjs";
|
|
2
|
-
import { DocumentBridgeOptions, DocumentToPdfOptions, PdfToDocumentOptions } from "
|
|
2
|
+
import { n as DocumentBridgeOptions, r as DocumentToPdfOptions, u as PdfToDocumentOptions } from "../convert-B1izrvnQ.cjs";
|
|
3
3
|
//#region src/convert/capability.d.ts
|
|
4
4
|
type ContentVariant = 'wordprocessing' | 'presentation' | 'spreadsheet' | 'drawing' | 'formula';
|
|
5
5
|
interface FormatCapability {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocumentFormat } from "./port.js";
|
|
2
|
-
import { DocumentBridgeOptions, DocumentToPdfOptions, PdfToDocumentOptions } from "
|
|
2
|
+
import { n as DocumentBridgeOptions, r as DocumentToPdfOptions, u as PdfToDocumentOptions } from "../convert-HYsWA-LI.js";
|
|
3
3
|
//#region src/convert/capability.d.ts
|
|
4
4
|
type ContentVariant = 'wordprocessing' | 'presentation' | 'spreadsheet' | 'drawing' | 'formula';
|
|
5
5
|
interface FormatCapability {
|
|
@@ -1,269 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
//#region src/convert/capability.ts
|
|
3
|
-
const FORMAT_CAPABILITIES = {
|
|
4
|
-
docx: {
|
|
5
|
-
format: "docx",
|
|
6
|
-
variant: "wordprocessing",
|
|
7
|
-
hasLayoutPath: true
|
|
8
|
-
},
|
|
9
|
-
odt: {
|
|
10
|
-
format: "odt",
|
|
11
|
-
variant: "wordprocessing",
|
|
12
|
-
hasLayoutPath: true
|
|
13
|
-
},
|
|
14
|
-
pptx: {
|
|
15
|
-
format: "pptx",
|
|
16
|
-
variant: "presentation",
|
|
17
|
-
hasLayoutPath: true
|
|
18
|
-
},
|
|
19
|
-
odp: {
|
|
20
|
-
format: "odp",
|
|
21
|
-
variant: "presentation",
|
|
22
|
-
hasLayoutPath: true
|
|
23
|
-
},
|
|
24
|
-
ods: {
|
|
25
|
-
format: "ods",
|
|
26
|
-
variant: "spreadsheet",
|
|
27
|
-
hasLayoutPath: true
|
|
28
|
-
},
|
|
29
|
-
xlsx: {
|
|
30
|
-
format: "xlsx",
|
|
31
|
-
variant: "spreadsheet",
|
|
32
|
-
hasLayoutPath: false
|
|
33
|
-
},
|
|
34
|
-
odg: {
|
|
35
|
-
format: "odg",
|
|
36
|
-
variant: "drawing",
|
|
37
|
-
hasLayoutPath: true
|
|
38
|
-
},
|
|
39
|
-
odf: {
|
|
40
|
-
format: "odf",
|
|
41
|
-
variant: "formula",
|
|
42
|
-
hasLayoutPath: false
|
|
43
|
-
},
|
|
44
|
-
markdown: {
|
|
45
|
-
format: "markdown",
|
|
46
|
-
variant: "wordprocessing",
|
|
47
|
-
hasLayoutPath: true
|
|
48
|
-
},
|
|
49
|
-
pdf: {
|
|
50
|
-
format: "pdf",
|
|
51
|
-
hasLayoutPath: false
|
|
52
|
-
}
|
|
53
|
-
};
|
|
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
|
-
var UnsupportedConversionError = class extends Error {
|
|
255
|
-
source;
|
|
256
|
-
target;
|
|
257
|
-
constructor(source, target) {
|
|
258
|
-
super(`unsupported conversion: ${source} -> ${target}`);
|
|
259
|
-
this.name = "UnsupportedConversionError";
|
|
260
|
-
this.source = source;
|
|
261
|
-
this.target = target;
|
|
262
|
-
}
|
|
263
|
-
};
|
|
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
|
-
//#endregion
|
|
1
|
+
import { G as DIRECT_EDGES, J as resolveConversionPath, K as FORMAT_CAPABILITIES, q as UnsupportedConversionError } from "../convert-ULGgwmSb.js";
|
|
269
2
|
export { DIRECT_EDGES, FORMAT_CAPABILITIES, UnsupportedConversionError, resolveConversionPath };
|
package/dist/convert/codec.cjs
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_model_bytes = require("../model/bytes.cjs");
|
|
3
|
-
const
|
|
3
|
+
const require_convert = require("../convert-BO_4tCwz.cjs");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
//#region src/convert/codec.ts
|
|
6
6
|
const docxPdfCodec = zod.z.codec(require_model_bytes.DocxBytesSchema, require_model_bytes.PdfBytesSchema, {
|
|
7
|
-
decode: (docxBytes) =>
|
|
8
|
-
encode: (pdfBytes) =>
|
|
7
|
+
decode: (docxBytes) => require_convert.docxToPdf(docxBytes),
|
|
8
|
+
encode: (pdfBytes) => require_convert.pdfToDocx(pdfBytes)
|
|
9
9
|
});
|
|
10
10
|
const pptxPdfCodec = zod.z.codec(require_model_bytes.PptxBytesSchema, require_model_bytes.PdfBytesSchema, {
|
|
11
|
-
decode: (pptxBytes) =>
|
|
12
|
-
encode: (pdfBytes) =>
|
|
11
|
+
decode: (pptxBytes) => require_convert.pptxToPdf(pptxBytes),
|
|
12
|
+
encode: (pdfBytes) => require_convert.pdfToPptx(pdfBytes)
|
|
13
13
|
});
|
|
14
14
|
const odtPdfCodec = zod.z.codec(require_model_bytes.OdtBytesSchema, require_model_bytes.PdfBytesSchema, {
|
|
15
|
-
decode: (odtBytes) =>
|
|
16
|
-
encode: (pdfBytes) =>
|
|
15
|
+
decode: (odtBytes) => require_convert.odtToPdf(odtBytes),
|
|
16
|
+
encode: (pdfBytes) => require_convert.pdfToOdt(pdfBytes)
|
|
17
17
|
});
|
|
18
18
|
const odpPdfCodec = zod.z.codec(require_model_bytes.OdpBytesSchema, require_model_bytes.PdfBytesSchema, {
|
|
19
|
-
decode: (odpBytes) =>
|
|
20
|
-
encode: (pdfBytes) =>
|
|
19
|
+
decode: (odpBytes) => require_convert.odpToPdf(odpBytes),
|
|
20
|
+
encode: (pdfBytes) => require_convert.pdfToOdp(pdfBytes)
|
|
21
21
|
});
|
|
22
22
|
const odsPdfCodec = zod.z.codec(require_model_bytes.OdsBytesSchema, require_model_bytes.PdfBytesSchema, {
|
|
23
|
-
decode: (odsBytes) =>
|
|
24
|
-
encode: (pdfBytes) =>
|
|
23
|
+
decode: (odsBytes) => require_convert.odsToPdf(odsBytes),
|
|
24
|
+
encode: (pdfBytes) => require_convert.pdfToOds(pdfBytes)
|
|
25
25
|
});
|
|
26
26
|
const odgPdfCodec = zod.z.codec(require_model_bytes.OdgBytesSchema, require_model_bytes.PdfBytesSchema, {
|
|
27
|
-
decode: (odgBytes) =>
|
|
28
|
-
encode: (pdfBytes) =>
|
|
27
|
+
decode: (odgBytes) => require_convert.odgToPdf(odgBytes),
|
|
28
|
+
encode: (pdfBytes) => require_convert.pdfToOdg(pdfBytes)
|
|
29
29
|
});
|
|
30
30
|
const xlsxPdfCodec = zod.z.codec(require_model_bytes.XlsxBytesSchema, require_model_bytes.PdfBytesSchema, {
|
|
31
|
-
decode: (xlsxBytes) =>
|
|
32
|
-
encode: (pdfBytes) =>
|
|
31
|
+
decode: (xlsxBytes) => require_convert.xlsxToPdf(xlsxBytes),
|
|
32
|
+
encode: (pdfBytes) => require_convert.pdfToXlsx(pdfBytes)
|
|
33
33
|
});
|
|
34
34
|
const markdownPdfCodec = zod.z.codec(require_model_bytes.MarkdownBytesSchema, require_model_bytes.PdfBytesSchema, {
|
|
35
|
-
decode: (markdownBytes) =>
|
|
36
|
-
encode: (pdfBytes) =>
|
|
35
|
+
decode: (markdownBytes) => require_convert.markdownToPdf(markdownBytes),
|
|
36
|
+
encode: (pdfBytes) => require_convert.pdfToMarkdown(pdfBytes)
|
|
37
37
|
});
|
|
38
38
|
const odtDocxCodec = zod.z.codec(require_model_bytes.OdtBytesSchema, require_model_bytes.DocxBytesSchema, {
|
|
39
|
-
decode: (odtBytes) =>
|
|
40
|
-
encode: (docxBytes) =>
|
|
39
|
+
decode: (odtBytes) => require_convert.odtToDocx(odtBytes),
|
|
40
|
+
encode: (docxBytes) => require_convert.docxToOdt(docxBytes)
|
|
41
41
|
});
|
|
42
42
|
const odpPptxCodec = zod.z.codec(require_model_bytes.OdpBytesSchema, require_model_bytes.PptxBytesSchema, {
|
|
43
|
-
decode: (odpBytes) =>
|
|
44
|
-
encode: (pptxBytes) =>
|
|
43
|
+
decode: (odpBytes) => require_convert.odpToPptx(odpBytes),
|
|
44
|
+
encode: (pptxBytes) => require_convert.pptxToOdp(pptxBytes)
|
|
45
45
|
});
|
|
46
46
|
const odsXlsxCodec = zod.z.codec(require_model_bytes.OdsBytesSchema, require_model_bytes.XlsxBytesSchema, {
|
|
47
|
-
decode: (odsBytes) =>
|
|
48
|
-
encode: (xlsxBytes) =>
|
|
47
|
+
decode: (odsBytes) => require_convert.odsToXlsx(odsBytes),
|
|
48
|
+
encode: (xlsxBytes) => require_convert.xlsxToOds(xlsxBytes)
|
|
49
49
|
});
|
|
50
50
|
const markdownDocxCodec = zod.z.codec(require_model_bytes.MarkdownBytesSchema, require_model_bytes.DocxBytesSchema, {
|
|
51
|
-
decode: (markdownBytes) =>
|
|
52
|
-
encode: (docxBytes) =>
|
|
51
|
+
decode: (markdownBytes) => require_convert.markdownToDocx(markdownBytes),
|
|
52
|
+
encode: (docxBytes) => require_convert.docxToMarkdown(docxBytes)
|
|
53
53
|
});
|
|
54
54
|
const markdownOdtCodec = zod.z.codec(require_model_bytes.MarkdownBytesSchema, require_model_bytes.OdtBytesSchema, {
|
|
55
|
-
decode: (markdownBytes) =>
|
|
56
|
-
encode: (odtBytes) =>
|
|
55
|
+
decode: (markdownBytes) => require_convert.markdownToOdt(markdownBytes),
|
|
56
|
+
encode: (odtBytes) => require_convert.odtToMarkdown(odtBytes)
|
|
57
57
|
});
|
|
58
58
|
const xlsxMarkdownCodec = zod.z.codec(require_model_bytes.XlsxBytesSchema, require_model_bytes.MarkdownBytesSchema, {
|
|
59
|
-
decode: (xlsxBytes) =>
|
|
60
|
-
encode: (markdownBytes) =>
|
|
59
|
+
decode: (xlsxBytes) => require_convert.xlsxToMarkdown(xlsxBytes),
|
|
60
|
+
encode: (markdownBytes) => require_convert.markdownToXlsx(markdownBytes)
|
|
61
61
|
});
|
|
62
62
|
//#endregion
|
|
63
63
|
exports.docxPdfCodec = docxPdfCodec;
|
package/dist/convert/codec.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DocxBytesSchema, MarkdownBytesSchema, OdgBytesSchema, OdpBytesSchema, OdsBytesSchema, OdtBytesSchema, PdfBytesSchema, PptxBytesSchema, XlsxBytesSchema } from "../model/bytes.js";
|
|
2
|
-
import {
|
|
2
|
+
import { A as pdfToOdg, B as xlsxToOds, C as odsToXlsx, D as odtToPdf, F as pdfToXlsx, L as pptxToOdp, M as pdfToOds, N as pdfToOdt, O as pdfToDocx, P as pdfToPptx, R as pptxToPdf, S as odsToPdf, T as odtToMarkdown, V as xlsxToPdf, _ as odgToPdf, b as odpToPdf, c as markdownToOdt, i as docxToPdf, j as pdfToOdp, k as pdfToMarkdown, l as markdownToPdf, n as docxToMarkdown, r as docxToOdt, s as markdownToDocx, u as markdownToXlsx, w as odtToDocx, x as odpToPptx, z as xlsxToMarkdown } from "../convert-ULGgwmSb.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/convert/codec.ts
|
|
5
5
|
const docxPdfCodec = z.codec(DocxBytesSchema, PdfBytesSchema, {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_convert = require("../convert-BO_4tCwz.cjs");
|
|
3
|
+
exports.FORMAT_NODES = require_convert.FORMAT_NODES;
|
|
4
|
+
exports.convertDocument = require_convert.convertDocument;
|
|
5
|
+
exports.resolveCompositionPlan = require_convert.resolveCompositionPlan;
|