js.documents 1.97.11 → 1.98.1
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/capability-DX0lCSiI.d.ts +16 -0
- package/dist/capability-an5gSNsu.d.cts +16 -0
- package/dist/convert/capability.cjs +65 -5
- package/dist/convert/capability.d.cts +2 -38
- package/dist/convert/capability.d.ts +2 -38
- package/dist/convert/capability.js +64 -2
- package/dist/convert/codec.cjs +29 -29
- package/dist/convert/codec.js +1 -1
- package/dist/convert/composition.cjs +414 -4
- package/dist/convert/composition.d.cts +2 -2
- package/dist/convert/composition.d.ts +1 -1
- package/dist/convert/composition.js +411 -1
- package/dist/convert/convert.cjs +350 -42
- package/dist/convert/convert.d.cts +105 -1
- package/dist/convert/convert.d.ts +105 -1
- package/dist/convert/convert.js +309 -1
- package/dist/convert/local.cjs +23 -8
- package/dist/convert/local.js +20 -5
- package/dist/fonts/registry.d.cts +19 -1
- package/dist/fonts/registry.d.ts +19 -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/rowformat.d.cts +24 -1
- package/dist/hsqldb/rowformat.d.ts +24 -1
- package/dist/index.cjs +44 -41
- package/dist/index.d.cts +8 -7
- package/dist/index.d.ts +6 -5
- package/dist/index.js +3 -2
- package/dist/metadata/read.cjs +2 -2
- package/dist/metadata/read.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/package.json +1 -1
- package/dist/convert-B1izrvnQ.d.cts +0 -106
- package/dist/convert-BO_4tCwz.cjs +0 -1262
- package/dist/convert-HYsWA-LI.d.ts +0 -106
- package/dist/convert-ULGgwmSb.js +0 -975
- package/dist/registry-DpF4A9EM.d.ts +0 -20
- package/dist/registry-ZAWlWHqJ.d.cts +0 -20
- package/dist/rowformat-Cl2exlEh.d.cts +0 -25
- 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,6 +1,66 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
var UnsupportedConversionError = class extends Error {
|
|
55
|
+
source;
|
|
56
|
+
target;
|
|
57
|
+
constructor(source, target) {
|
|
58
|
+
super(`unsupported conversion: ${source} -> ${target}`);
|
|
59
|
+
this.name = "UnsupportedConversionError";
|
|
60
|
+
this.source = source;
|
|
61
|
+
this.target = target;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
65
|
+
exports.FORMAT_CAPABILITIES = FORMAT_CAPABILITIES;
|
|
66
|
+
exports.UnsupportedConversionError = UnsupportedConversionError;
|
|
@@ -1,38 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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 {
|
|
2
|
-
|
|
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,2 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/convert/capability.ts
|
|
2
|
+
const FORMAT_CAPABILITIES = {
|
|
3
|
+
docx: {
|
|
4
|
+
format: "docx",
|
|
5
|
+
variant: "wordprocessing",
|
|
6
|
+
hasLayoutPath: true
|
|
7
|
+
},
|
|
8
|
+
odt: {
|
|
9
|
+
format: "odt",
|
|
10
|
+
variant: "wordprocessing",
|
|
11
|
+
hasLayoutPath: true
|
|
12
|
+
},
|
|
13
|
+
pptx: {
|
|
14
|
+
format: "pptx",
|
|
15
|
+
variant: "presentation",
|
|
16
|
+
hasLayoutPath: true
|
|
17
|
+
},
|
|
18
|
+
odp: {
|
|
19
|
+
format: "odp",
|
|
20
|
+
variant: "presentation",
|
|
21
|
+
hasLayoutPath: true
|
|
22
|
+
},
|
|
23
|
+
ods: {
|
|
24
|
+
format: "ods",
|
|
25
|
+
variant: "spreadsheet",
|
|
26
|
+
hasLayoutPath: true
|
|
27
|
+
},
|
|
28
|
+
xlsx: {
|
|
29
|
+
format: "xlsx",
|
|
30
|
+
variant: "spreadsheet",
|
|
31
|
+
hasLayoutPath: false
|
|
32
|
+
},
|
|
33
|
+
odg: {
|
|
34
|
+
format: "odg",
|
|
35
|
+
variant: "drawing",
|
|
36
|
+
hasLayoutPath: true
|
|
37
|
+
},
|
|
38
|
+
odf: {
|
|
39
|
+
format: "odf",
|
|
40
|
+
variant: "formula",
|
|
41
|
+
hasLayoutPath: false
|
|
42
|
+
},
|
|
43
|
+
markdown: {
|
|
44
|
+
format: "markdown",
|
|
45
|
+
variant: "wordprocessing",
|
|
46
|
+
hasLayoutPath: true
|
|
47
|
+
},
|
|
48
|
+
pdf: {
|
|
49
|
+
format: "pdf",
|
|
50
|
+
hasLayoutPath: false
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
var UnsupportedConversionError = class extends Error {
|
|
54
|
+
source;
|
|
55
|
+
target;
|
|
56
|
+
constructor(source, target) {
|
|
57
|
+
super(`unsupported conversion: ${source} -> ${target}`);
|
|
58
|
+
this.name = "UnsupportedConversionError";
|
|
59
|
+
this.source = source;
|
|
60
|
+
this.target = target;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
export { FORMAT_CAPABILITIES, UnsupportedConversionError };
|
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_convert = require("./convert.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_convert.docxToPdf(docxBytes),
|
|
8
|
+
encode: (pdfBytes) => require_convert_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_convert.pptxToPdf(pptxBytes),
|
|
12
|
+
encode: (pdfBytes) => require_convert_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_convert.odtToPdf(odtBytes),
|
|
16
|
+
encode: (pdfBytes) => require_convert_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_convert.odpToPdf(odpBytes),
|
|
20
|
+
encode: (pdfBytes) => require_convert_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_convert.odsToPdf(odsBytes),
|
|
24
|
+
encode: (pdfBytes) => require_convert_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_convert.odgToPdf(odgBytes),
|
|
28
|
+
encode: (pdfBytes) => require_convert_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_convert.xlsxToPdf(xlsxBytes),
|
|
32
|
+
encode: (pdfBytes) => require_convert_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_convert.markdownToPdf(markdownBytes),
|
|
36
|
+
encode: (pdfBytes) => require_convert_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_convert.odtToDocx(odtBytes),
|
|
40
|
+
encode: (docxBytes) => require_convert_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_convert.odpToPptx(odpBytes),
|
|
44
|
+
encode: (pptxBytes) => require_convert_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_convert.odsToXlsx(odsBytes),
|
|
48
|
+
encode: (xlsxBytes) => require_convert_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_convert.markdownToDocx(markdownBytes),
|
|
52
|
+
encode: (docxBytes) => require_convert_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_convert.markdownToOdt(markdownBytes),
|
|
56
|
+
encode: (odtBytes) => require_convert_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_convert.xlsxToMarkdown(xlsxBytes),
|
|
60
|
+
encode: (markdownBytes) => require_convert_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 { docxToMarkdown, docxToOdt, docxToPdf, markdownToDocx, markdownToOdt, markdownToPdf, markdownToXlsx, odgToPdf, odpToPdf, odpToPptx, odsToPdf, odsToXlsx, odtToDocx, odtToMarkdown, odtToPdf, pdfToDocx, pdfToMarkdown, pdfToOdg, pdfToOdp, pdfToOds, pdfToOdt, pdfToPptx, pdfToXlsx, pptxToOdp, pptxToPdf, xlsxToMarkdown, xlsxToOds, xlsxToPdf } from "./convert.js";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
//#region src/convert/codec.ts
|
|
5
5
|
const docxPdfCodec = z.codec(DocxBytesSchema, PdfBytesSchema, {
|