js.documents 1.92.9 → 1.93.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/clock-C7SUuYN0.d.cts +8 -0
- package/dist/clock-C7SUuYN0.d.ts +8 -0
- package/dist/convert/capability.cjs +12 -15
- package/dist/convert/capability.d.cts +7 -11
- package/dist/convert/capability.d.ts +7 -11
- package/dist/convert/capability.js +12 -16
- package/dist/convert/convert.cjs +52 -18
- package/dist/convert/convert.d.cts +2 -0
- package/dist/convert/convert.d.ts +2 -0
- package/dist/convert/convert.js +52 -18
- package/dist/convert/local.cjs +5 -5
- package/dist/convert/local.js +6 -6
- package/dist/convert/port.d.cts +2 -0
- package/dist/convert/port.d.ts +2 -0
- 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 +1 -1
- package/dist/edit/docx/editor.d.ts +1 -1
- package/dist/edit/markdown/editor.d.cts +1 -1
- package/dist/edit/markdown/editor.d.ts +1 -1
- 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/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/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/content.d.cts +1 -1
- package/dist/edit/odt/content.d.ts +1 -1
- package/dist/edit/odt/editor.d.cts +1 -1
- package/dist/edit/odt/editor.d.ts +1 -1
- package/dist/edit/pdf/editor.d.cts +1 -1
- package/dist/edit/pdf/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/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/model/metadata.cjs +1 -0
- package/dist/model/metadata.d.cts +2 -2
- package/dist/model/metadata.d.ts +2 -2
- package/dist/model/metadata.js +1 -0
- package/dist/ports/clock.d.cts +1 -7
- package/dist/ports/clock.d.ts +1 -7
- package/package.json +2 -2
|
@@ -240,25 +240,22 @@ const DIRECT_EDGES = [
|
|
|
240
240
|
convert: require_convert_convert.odpToOdt
|
|
241
241
|
}
|
|
242
242
|
];
|
|
243
|
+
var UnsupportedConversionError = class extends Error {
|
|
244
|
+
source;
|
|
245
|
+
target;
|
|
246
|
+
constructor(source, target) {
|
|
247
|
+
super(`unsupported conversion: ${source} -> ${target}`);
|
|
248
|
+
this.name = "UnsupportedConversionError";
|
|
249
|
+
this.source = source;
|
|
250
|
+
this.target = target;
|
|
251
|
+
}
|
|
252
|
+
};
|
|
243
253
|
function resolveConversionPath(source, target, edges = DIRECT_EDGES) {
|
|
244
254
|
if (source === target) return;
|
|
245
|
-
|
|
246
|
-
if (direct !== void 0) return {
|
|
247
|
-
kind: "direct",
|
|
248
|
-
edge: direct
|
|
249
|
-
};
|
|
250
|
-
for (const first of edges) {
|
|
251
|
-
if (first.source !== source) continue;
|
|
252
|
-
const second = edges.find((edge) => edge.source === first.target && edge.target === target);
|
|
253
|
-
if (second !== void 0) return {
|
|
254
|
-
kind: "composed",
|
|
255
|
-
via: first.target,
|
|
256
|
-
first,
|
|
257
|
-
second
|
|
258
|
-
};
|
|
259
|
-
}
|
|
255
|
+
return edges.find((edge) => edge.source === source && edge.target === target);
|
|
260
256
|
}
|
|
261
257
|
//#endregion
|
|
262
258
|
exports.DIRECT_EDGES = DIRECT_EDGES;
|
|
263
259
|
exports.FORMAT_CAPABILITIES = FORMAT_CAPABILITIES;
|
|
260
|
+
exports.UnsupportedConversionError = UnsupportedConversionError;
|
|
264
261
|
exports.resolveConversionPath = resolveConversionPath;
|
|
@@ -28,15 +28,11 @@ interface BridgeEdge {
|
|
|
28
28
|
}
|
|
29
29
|
type ConversionEdge = ToPdfEdge | FromPdfEdge | BridgeEdge;
|
|
30
30
|
declare const DIRECT_EDGES: readonly ConversionEdge[];
|
|
31
|
-
|
|
32
|
-
readonly
|
|
33
|
-
readonly
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
readonly first: ConversionEdge;
|
|
38
|
-
readonly second: ConversionEdge;
|
|
39
|
-
};
|
|
40
|
-
declare function resolveConversionPath(source: DocumentFormat, target: DocumentFormat, edges?: readonly ConversionEdge[]): ConversionStrategy | undefined;
|
|
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;
|
|
41
37
|
//#endregion
|
|
42
|
-
export { BridgeEdge, ContentVariant, ConversionEdge,
|
|
38
|
+
export { BridgeEdge, ContentVariant, ConversionEdge, DIRECT_EDGES, FORMAT_CAPABILITIES, FormatCapability, FromPdfEdge, ToPdfEdge, UnsupportedConversionError, resolveConversionPath };
|
|
@@ -28,15 +28,11 @@ interface BridgeEdge {
|
|
|
28
28
|
}
|
|
29
29
|
type ConversionEdge = ToPdfEdge | FromPdfEdge | BridgeEdge;
|
|
30
30
|
declare const DIRECT_EDGES: readonly ConversionEdge[];
|
|
31
|
-
|
|
32
|
-
readonly
|
|
33
|
-
readonly
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
readonly first: ConversionEdge;
|
|
38
|
-
readonly second: ConversionEdge;
|
|
39
|
-
};
|
|
40
|
-
declare function resolveConversionPath(source: DocumentFormat, target: DocumentFormat, edges?: readonly ConversionEdge[]): ConversionStrategy | undefined;
|
|
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;
|
|
41
37
|
//#endregion
|
|
42
|
-
export { BridgeEdge, ContentVariant, ConversionEdge,
|
|
38
|
+
export { BridgeEdge, ContentVariant, ConversionEdge, DIRECT_EDGES, FORMAT_CAPABILITIES, FormatCapability, FromPdfEdge, ToPdfEdge, UnsupportedConversionError, resolveConversionPath };
|
|
@@ -239,23 +239,19 @@ const DIRECT_EDGES = [
|
|
|
239
239
|
convert: odpToOdt
|
|
240
240
|
}
|
|
241
241
|
];
|
|
242
|
+
var UnsupportedConversionError = class extends Error {
|
|
243
|
+
source;
|
|
244
|
+
target;
|
|
245
|
+
constructor(source, target) {
|
|
246
|
+
super(`unsupported conversion: ${source} -> ${target}`);
|
|
247
|
+
this.name = "UnsupportedConversionError";
|
|
248
|
+
this.source = source;
|
|
249
|
+
this.target = target;
|
|
250
|
+
}
|
|
251
|
+
};
|
|
242
252
|
function resolveConversionPath(source, target, edges = DIRECT_EDGES) {
|
|
243
253
|
if (source === target) return;
|
|
244
|
-
|
|
245
|
-
if (direct !== void 0) return {
|
|
246
|
-
kind: "direct",
|
|
247
|
-
edge: direct
|
|
248
|
-
};
|
|
249
|
-
for (const first of edges) {
|
|
250
|
-
if (first.source !== source) continue;
|
|
251
|
-
const second = edges.find((edge) => edge.source === first.target && edge.target === target);
|
|
252
|
-
if (second !== void 0) return {
|
|
253
|
-
kind: "composed",
|
|
254
|
-
via: first.target,
|
|
255
|
-
first,
|
|
256
|
-
second
|
|
257
|
-
};
|
|
258
|
-
}
|
|
254
|
+
return edges.find((edge) => edge.source === source && edge.target === target);
|
|
259
255
|
}
|
|
260
256
|
//#endregion
|
|
261
|
-
export { DIRECT_EDGES, FORMAT_CAPABILITIES, resolveConversionPath };
|
|
257
|
+
export { DIRECT_EDGES, FORMAT_CAPABILITIES, UnsupportedConversionError, resolveConversionPath };
|
package/dist/convert/convert.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_model_geometry = require("../model/geometry.cjs");
|
|
3
|
+
const require_model_metadata = require("../model/metadata.cjs");
|
|
3
4
|
const require_edit_docx_editor = require("../edit/docx/editor.cjs");
|
|
4
5
|
const require_edit_docx_content = require("../edit/docx/content.cjs");
|
|
5
6
|
const require_edit_pptx_editor = require("../edit/pptx/editor.cjs");
|
|
@@ -38,8 +39,12 @@ let pdf_codec = require("pdf-codec");
|
|
|
38
39
|
const mathMetricsAt = (sizePt) => (0, pdf_codec.loadMathFont)().metricsAt(sizePt);
|
|
39
40
|
function docxToPdf(bytes, options) {
|
|
40
41
|
const pkg = require_edit_docx_editor.openDocx(bytes).toPackage();
|
|
41
|
-
const
|
|
42
|
-
if (
|
|
42
|
+
const read = require_ooxml_docx_read.readDocxContent(pkg, { onMathDiagnostic: options?.onMathDiagnostic });
|
|
43
|
+
if (read.kind !== "wordprocessing") throw new Error("readDocxContent returned a non-wordprocessing ContentDocument");
|
|
44
|
+
const content = {
|
|
45
|
+
...read,
|
|
46
|
+
metadata: require_model_metadata.resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
47
|
+
};
|
|
43
48
|
const fonts = require_fonts_registry.createDocumentFontRegistry({
|
|
44
49
|
kind: "docx",
|
|
45
50
|
package: pkg
|
|
@@ -62,8 +67,12 @@ function docxToPdf(bytes, options) {
|
|
|
62
67
|
}
|
|
63
68
|
function odtToPdf(bytes, options) {
|
|
64
69
|
const pkg = (0, odf_js.decodePackage)(bytes);
|
|
65
|
-
const
|
|
66
|
-
if (
|
|
70
|
+
const read = require_odf_odt_read.readOdtContent(pkg);
|
|
71
|
+
if (read.kind !== "wordprocessing") throw new Error("readOdtContent returned a non-wordprocessing ContentDocument");
|
|
72
|
+
const content = {
|
|
73
|
+
...read,
|
|
74
|
+
metadata: require_model_metadata.resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
75
|
+
};
|
|
67
76
|
const fonts = require_fonts_registry.createDocumentFontRegistry({
|
|
68
77
|
kind: "odf",
|
|
69
78
|
package: pkg
|
|
@@ -86,8 +95,12 @@ function odtToPdf(bytes, options) {
|
|
|
86
95
|
}
|
|
87
96
|
function pptxToPdf(bytes, options) {
|
|
88
97
|
const pkg = require_edit_pptx_editor.openPptx(bytes).toPackage();
|
|
89
|
-
const
|
|
90
|
-
if (
|
|
98
|
+
const read = require_ooxml_pptx_read.readPptxContent(pkg);
|
|
99
|
+
if (read.kind !== "presentation") throw new Error("readPptxContent returned a non-presentation ContentDocument");
|
|
100
|
+
const content = {
|
|
101
|
+
...read,
|
|
102
|
+
metadata: require_model_metadata.resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
103
|
+
};
|
|
91
104
|
const fonts = require_fonts_registry.createDocumentFontRegistry({
|
|
92
105
|
kind: "pptx",
|
|
93
106
|
package: pkg
|
|
@@ -110,8 +123,12 @@ function pptxToPdf(bytes, options) {
|
|
|
110
123
|
}
|
|
111
124
|
function odpToPdf(bytes, options) {
|
|
112
125
|
const pkg = (0, odf_js.decodePackage)(bytes);
|
|
113
|
-
const
|
|
114
|
-
if (
|
|
126
|
+
const read = require_odf_odp_read.readOdpContent(pkg);
|
|
127
|
+
if (read.kind !== "presentation") throw new Error("readOdpContent returned a non-presentation ContentDocument");
|
|
128
|
+
const content = {
|
|
129
|
+
...read,
|
|
130
|
+
metadata: require_model_metadata.resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
131
|
+
};
|
|
115
132
|
const fonts = require_fonts_registry.createDocumentFontRegistry({
|
|
116
133
|
kind: "odf",
|
|
117
134
|
package: pkg
|
|
@@ -134,8 +151,12 @@ function odpToPdf(bytes, options) {
|
|
|
134
151
|
}
|
|
135
152
|
function odsToPdf(bytes, options) {
|
|
136
153
|
const pkg = (0, odf_js.decodePackage)(bytes);
|
|
137
|
-
const
|
|
138
|
-
if (
|
|
154
|
+
const read = require_odf_ods_read.readOdsContent(pkg);
|
|
155
|
+
if (read.kind !== "spreadsheet") throw new Error("readOdsContent returned a non-spreadsheet ContentDocument");
|
|
156
|
+
const content = {
|
|
157
|
+
...read,
|
|
158
|
+
metadata: require_model_metadata.resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
159
|
+
};
|
|
139
160
|
const fonts = require_fonts_registry.createDocumentFontRegistry({
|
|
140
161
|
kind: "odf",
|
|
141
162
|
package: pkg
|
|
@@ -159,8 +180,12 @@ function odsToPdf(bytes, options) {
|
|
|
159
180
|
}
|
|
160
181
|
function odgToPdf(bytes, options) {
|
|
161
182
|
const pkg = (0, odf_js.decodePackage)(bytes);
|
|
162
|
-
const
|
|
163
|
-
if (
|
|
183
|
+
const read = require_odf_odg_read.readOdgContent(pkg);
|
|
184
|
+
if (read.kind !== "drawing") throw new Error("readOdgContent returned a non-drawing ContentDocument");
|
|
185
|
+
const content = {
|
|
186
|
+
...read,
|
|
187
|
+
metadata: require_model_metadata.resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
188
|
+
};
|
|
164
189
|
const fonts = require_fonts_registry.createDocumentFontRegistry({
|
|
165
190
|
kind: "odf",
|
|
166
191
|
package: pkg
|
|
@@ -180,11 +205,15 @@ function odgToPdf(bytes, options) {
|
|
|
180
205
|
function markdownToPdf(bytes, options) {
|
|
181
206
|
require_ports_abort.throwIfAborted(options?.signal);
|
|
182
207
|
const text = require_markdown_text.decodeMarkdownText(bytes);
|
|
183
|
-
const
|
|
208
|
+
const read = require_markdown_read.readMarkdownContent(text, {
|
|
184
209
|
signal: options?.signal,
|
|
185
210
|
images: options?.images
|
|
186
211
|
});
|
|
187
|
-
if (
|
|
212
|
+
if (read.kind !== "wordprocessing") throw new Error("readMarkdownContent returned a non-wordprocessing ContentDocument");
|
|
213
|
+
const content = {
|
|
214
|
+
...read,
|
|
215
|
+
metadata: require_model_metadata.resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
216
|
+
};
|
|
188
217
|
const fonts = (0, pdf_codec.createFontRegistry)({
|
|
189
218
|
fonts: options?.fonts,
|
|
190
219
|
onSubstitution: options?.onFontSubstitution
|
|
@@ -210,8 +239,12 @@ const STANDALONE_FORMULA_MARGIN_PT = 72;
|
|
|
210
239
|
function odfToPdf(bytes, options) {
|
|
211
240
|
require_ports_abort.throwIfAborted(options?.signal);
|
|
212
241
|
const pkg = (0, odf_js.decodePackage)(bytes);
|
|
213
|
-
const
|
|
214
|
-
if (
|
|
242
|
+
const read = require_odf_formula_read.readOdfFormulaContent(pkg);
|
|
243
|
+
if (read.kind !== "formula") throw new Error("readOdfFormulaContent returned a non-formula ContentDocument");
|
|
244
|
+
const content = {
|
|
245
|
+
...read,
|
|
246
|
+
metadata: require_model_metadata.resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
247
|
+
};
|
|
215
248
|
const metrics = (0, pdf_codec.loadMathFont)().metricsAt(STANDALONE_FORMULA_SIZE_PT);
|
|
216
249
|
const { box } = require_mathml_layout.layoutFormula(content.formula.mathml, {
|
|
217
250
|
metrics,
|
|
@@ -529,7 +562,8 @@ function xlsxToPdf(bytes, options) {
|
|
|
529
562
|
onSubstitution: options?.onSubstitution,
|
|
530
563
|
onDocument: options?.onDocument,
|
|
531
564
|
fonts: options?.fonts,
|
|
532
|
-
onFontSubstitution: options?.onFontSubstitution
|
|
565
|
+
onFontSubstitution: options?.onFontSubstitution,
|
|
566
|
+
clock: options?.clock
|
|
533
567
|
});
|
|
534
568
|
}
|
|
535
569
|
function pdfToXlsx(bytes, options) {
|
|
@@ -622,7 +656,7 @@ function odmToPdf(bytes, options) {
|
|
|
622
656
|
const content = {
|
|
623
657
|
kind: "wordprocessing",
|
|
624
658
|
formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
|
|
625
|
-
metadata: (0, odf_js.readOdfMetadata)(pkg),
|
|
659
|
+
metadata: require_model_metadata.resolveMetadataTimestamps((0, odf_js.readOdfMetadata)(pkg), options?.clock),
|
|
626
660
|
sections: combinedSections
|
|
627
661
|
};
|
|
628
662
|
const fonts = (0, pdf_codec.createFontRegistry)({
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as ClockPort } from "../clock-C7SUuYN0.cjs";
|
|
1
2
|
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.cjs";
|
|
2
3
|
import { t as OmmlDiagnostic } from "../shared-DLZ3IQUl.cjs";
|
|
3
4
|
import { t as DocumentFontRegistryOptions } from "../registry-ZAWlWHqJ.cjs";
|
|
@@ -16,6 +17,7 @@ interface DocumentToPdfOptions extends DocumentFontRegistryOptions {
|
|
|
16
17
|
readonly sourcePath?: string;
|
|
17
18
|
}) => void;
|
|
18
19
|
readonly images?: MarkdownImageResolver;
|
|
20
|
+
readonly clock?: ClockPort;
|
|
19
21
|
}
|
|
20
22
|
declare function docxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
21
23
|
declare function odtToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as ClockPort } from "../clock-C7SUuYN0.js";
|
|
1
2
|
import { n as HsqldbDecodeOptions } from "../rowformat-Cl2exlEh.js";
|
|
2
3
|
import { t as OmmlDiagnostic } from "../shared-DUOzjwcL.js";
|
|
3
4
|
import { t as DocumentFontRegistryOptions } from "../registry-DpF4A9EM.js";
|
|
@@ -16,6 +17,7 @@ interface DocumentToPdfOptions extends DocumentFontRegistryOptions {
|
|
|
16
17
|
readonly sourcePath?: string;
|
|
17
18
|
}) => void;
|
|
18
19
|
readonly images?: MarkdownImageResolver;
|
|
20
|
+
readonly clock?: ClockPort;
|
|
19
21
|
}
|
|
20
22
|
declare function docxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
21
23
|
declare function odtToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
package/dist/convert/convert.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PAGE_SIZE_A4 as PAGE_SIZE_A4$1, flipY } from "../model/geometry.js";
|
|
2
|
+
import { resolveMetadataTimestamps } from "../model/metadata.js";
|
|
2
3
|
import { openDocx } from "../edit/docx/editor.js";
|
|
3
4
|
import { buildDocxPackage } from "../edit/docx/content.js";
|
|
4
5
|
import { openPptx } from "../edit/pptx/editor.js";
|
|
@@ -37,8 +38,12 @@ import { createFontMeasurer, createFontRegistry, loadMathFont, readPdf, writePdf
|
|
|
37
38
|
const mathMetricsAt = (sizePt) => loadMathFont().metricsAt(sizePt);
|
|
38
39
|
function docxToPdf(bytes, options) {
|
|
39
40
|
const pkg = openDocx(bytes).toPackage();
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
41
|
+
const read = readDocxContent(pkg, { onMathDiagnostic: options?.onMathDiagnostic });
|
|
42
|
+
if (read.kind !== "wordprocessing") throw new Error("readDocxContent returned a non-wordprocessing ContentDocument");
|
|
43
|
+
const content = {
|
|
44
|
+
...read,
|
|
45
|
+
metadata: resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
46
|
+
};
|
|
42
47
|
const fonts = createDocumentFontRegistry({
|
|
43
48
|
kind: "docx",
|
|
44
49
|
package: pkg
|
|
@@ -61,8 +66,12 @@ function docxToPdf(bytes, options) {
|
|
|
61
66
|
}
|
|
62
67
|
function odtToPdf(bytes, options) {
|
|
63
68
|
const pkg = decodePackage$1(bytes);
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
69
|
+
const read = readOdtContent(pkg);
|
|
70
|
+
if (read.kind !== "wordprocessing") throw new Error("readOdtContent returned a non-wordprocessing ContentDocument");
|
|
71
|
+
const content = {
|
|
72
|
+
...read,
|
|
73
|
+
metadata: resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
74
|
+
};
|
|
66
75
|
const fonts = createDocumentFontRegistry({
|
|
67
76
|
kind: "odf",
|
|
68
77
|
package: pkg
|
|
@@ -85,8 +94,12 @@ function odtToPdf(bytes, options) {
|
|
|
85
94
|
}
|
|
86
95
|
function pptxToPdf(bytes, options) {
|
|
87
96
|
const pkg = openPptx(bytes).toPackage();
|
|
88
|
-
const
|
|
89
|
-
if (
|
|
97
|
+
const read = readPptxContent(pkg);
|
|
98
|
+
if (read.kind !== "presentation") throw new Error("readPptxContent returned a non-presentation ContentDocument");
|
|
99
|
+
const content = {
|
|
100
|
+
...read,
|
|
101
|
+
metadata: resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
102
|
+
};
|
|
90
103
|
const fonts = createDocumentFontRegistry({
|
|
91
104
|
kind: "pptx",
|
|
92
105
|
package: pkg
|
|
@@ -109,8 +122,12 @@ function pptxToPdf(bytes, options) {
|
|
|
109
122
|
}
|
|
110
123
|
function odpToPdf(bytes, options) {
|
|
111
124
|
const pkg = decodePackage$1(bytes);
|
|
112
|
-
const
|
|
113
|
-
if (
|
|
125
|
+
const read = readOdpContent(pkg);
|
|
126
|
+
if (read.kind !== "presentation") throw new Error("readOdpContent returned a non-presentation ContentDocument");
|
|
127
|
+
const content = {
|
|
128
|
+
...read,
|
|
129
|
+
metadata: resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
130
|
+
};
|
|
114
131
|
const fonts = createDocumentFontRegistry({
|
|
115
132
|
kind: "odf",
|
|
116
133
|
package: pkg
|
|
@@ -133,8 +150,12 @@ function odpToPdf(bytes, options) {
|
|
|
133
150
|
}
|
|
134
151
|
function odsToPdf(bytes, options) {
|
|
135
152
|
const pkg = decodePackage$1(bytes);
|
|
136
|
-
const
|
|
137
|
-
if (
|
|
153
|
+
const read = readOdsContent(pkg);
|
|
154
|
+
if (read.kind !== "spreadsheet") throw new Error("readOdsContent returned a non-spreadsheet ContentDocument");
|
|
155
|
+
const content = {
|
|
156
|
+
...read,
|
|
157
|
+
metadata: resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
158
|
+
};
|
|
138
159
|
const fonts = createDocumentFontRegistry({
|
|
139
160
|
kind: "odf",
|
|
140
161
|
package: pkg
|
|
@@ -158,8 +179,12 @@ function odsToPdf(bytes, options) {
|
|
|
158
179
|
}
|
|
159
180
|
function odgToPdf(bytes, options) {
|
|
160
181
|
const pkg = decodePackage$1(bytes);
|
|
161
|
-
const
|
|
162
|
-
if (
|
|
182
|
+
const read = readOdgContent(pkg);
|
|
183
|
+
if (read.kind !== "drawing") throw new Error("readOdgContent returned a non-drawing ContentDocument");
|
|
184
|
+
const content = {
|
|
185
|
+
...read,
|
|
186
|
+
metadata: resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
187
|
+
};
|
|
163
188
|
const fonts = createDocumentFontRegistry({
|
|
164
189
|
kind: "odf",
|
|
165
190
|
package: pkg
|
|
@@ -179,11 +204,15 @@ function odgToPdf(bytes, options) {
|
|
|
179
204
|
function markdownToPdf(bytes, options) {
|
|
180
205
|
throwIfAborted(options?.signal);
|
|
181
206
|
const text = decodeMarkdownText(bytes);
|
|
182
|
-
const
|
|
207
|
+
const read = readMarkdownContent(text, {
|
|
183
208
|
signal: options?.signal,
|
|
184
209
|
images: options?.images
|
|
185
210
|
});
|
|
186
|
-
if (
|
|
211
|
+
if (read.kind !== "wordprocessing") throw new Error("readMarkdownContent returned a non-wordprocessing ContentDocument");
|
|
212
|
+
const content = {
|
|
213
|
+
...read,
|
|
214
|
+
metadata: resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
215
|
+
};
|
|
187
216
|
const fonts = createFontRegistry({
|
|
188
217
|
fonts: options?.fonts,
|
|
189
218
|
onSubstitution: options?.onFontSubstitution
|
|
@@ -209,8 +238,12 @@ const STANDALONE_FORMULA_MARGIN_PT = 72;
|
|
|
209
238
|
function odfToPdf(bytes, options) {
|
|
210
239
|
throwIfAborted(options?.signal);
|
|
211
240
|
const pkg = decodePackage$1(bytes);
|
|
212
|
-
const
|
|
213
|
-
if (
|
|
241
|
+
const read = readOdfFormulaContent(pkg);
|
|
242
|
+
if (read.kind !== "formula") throw new Error("readOdfFormulaContent returned a non-formula ContentDocument");
|
|
243
|
+
const content = {
|
|
244
|
+
...read,
|
|
245
|
+
metadata: resolveMetadataTimestamps(read.metadata, options?.clock)
|
|
246
|
+
};
|
|
214
247
|
const metrics = loadMathFont().metricsAt(STANDALONE_FORMULA_SIZE_PT);
|
|
215
248
|
const { box } = layoutFormula(content.formula.mathml, {
|
|
216
249
|
metrics,
|
|
@@ -528,7 +561,8 @@ function xlsxToPdf(bytes, options) {
|
|
|
528
561
|
onSubstitution: options?.onSubstitution,
|
|
529
562
|
onDocument: options?.onDocument,
|
|
530
563
|
fonts: options?.fonts,
|
|
531
|
-
onFontSubstitution: options?.onFontSubstitution
|
|
564
|
+
onFontSubstitution: options?.onFontSubstitution,
|
|
565
|
+
clock: options?.clock
|
|
532
566
|
});
|
|
533
567
|
}
|
|
534
568
|
function pdfToXlsx(bytes, options) {
|
|
@@ -621,7 +655,7 @@ function odmToPdf(bytes, options) {
|
|
|
621
655
|
const content = {
|
|
622
656
|
kind: "wordprocessing",
|
|
623
657
|
formatVersion: CONTENT_FORMAT_VERSION,
|
|
624
|
-
metadata: readOdfMetadata(pkg),
|
|
658
|
+
metadata: resolveMetadataTimestamps(readOdfMetadata(pkg), options?.clock),
|
|
625
659
|
sections: combinedSections
|
|
626
660
|
};
|
|
627
661
|
const fonts = createFontRegistry({
|
package/dist/convert/local.cjs
CHANGED
|
@@ -30,7 +30,7 @@ function fromPdfDiagnostic(diagnostic) {
|
|
|
30
30
|
}
|
|
31
31
|
function createLocalDocumentConverter() {
|
|
32
32
|
return {
|
|
33
|
-
contractVersion:
|
|
33
|
+
contractVersion: 5,
|
|
34
34
|
conversions: SUPPORTED_CONVERSIONS,
|
|
35
35
|
convert(request, options) {
|
|
36
36
|
const { source, targetFormat } = request;
|
|
@@ -43,9 +43,8 @@ function createLocalDocumentConverter() {
|
|
|
43
43
|
diagnostics.push(fontSubstitutionDiagnostic(substitution));
|
|
44
44
|
options.onFontSubstitution?.(substitution);
|
|
45
45
|
};
|
|
46
|
-
const
|
|
47
|
-
if (
|
|
48
|
-
const edge = strategy.edge;
|
|
46
|
+
const edge = require_convert_capability.resolveConversionPath(source.format, targetFormat);
|
|
47
|
+
if (edge === void 0) return Promise.reject(new require_convert_capability.UnsupportedConversionError(source.format, targetFormat));
|
|
49
48
|
if (edge.kind === "toPdf") {
|
|
50
49
|
const bytes = edge.convert(source.bytes, {
|
|
51
50
|
signal: options.signal,
|
|
@@ -53,7 +52,8 @@ function createLocalDocumentConverter() {
|
|
|
53
52
|
onDocument,
|
|
54
53
|
fonts: options.fonts,
|
|
55
54
|
onFontSubstitution,
|
|
56
|
-
images: options.images
|
|
55
|
+
images: options.images,
|
|
56
|
+
clock: options.clock
|
|
57
57
|
});
|
|
58
58
|
return Promise.resolve({
|
|
59
59
|
document: {
|
package/dist/convert/local.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DIRECT_EDGES, resolveConversionPath } from "./capability.js";
|
|
1
|
+
import { DIRECT_EDGES, UnsupportedConversionError, resolveConversionPath } from "./capability.js";
|
|
2
2
|
//#region src/convert/local.ts
|
|
3
3
|
const SUPPORTED_CONVERSIONS = DIRECT_EDGES.map((edge) => ({
|
|
4
4
|
source: edge.source,
|
|
@@ -29,7 +29,7 @@ function fromPdfDiagnostic(diagnostic) {
|
|
|
29
29
|
}
|
|
30
30
|
function createLocalDocumentConverter() {
|
|
31
31
|
return {
|
|
32
|
-
contractVersion:
|
|
32
|
+
contractVersion: 5,
|
|
33
33
|
conversions: SUPPORTED_CONVERSIONS,
|
|
34
34
|
convert(request, options) {
|
|
35
35
|
const { source, targetFormat } = request;
|
|
@@ -42,9 +42,8 @@ function createLocalDocumentConverter() {
|
|
|
42
42
|
diagnostics.push(fontSubstitutionDiagnostic(substitution));
|
|
43
43
|
options.onFontSubstitution?.(substitution);
|
|
44
44
|
};
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
const edge = strategy.edge;
|
|
45
|
+
const edge = resolveConversionPath(source.format, targetFormat);
|
|
46
|
+
if (edge === void 0) return Promise.reject(new UnsupportedConversionError(source.format, targetFormat));
|
|
48
47
|
if (edge.kind === "toPdf") {
|
|
49
48
|
const bytes = edge.convert(source.bytes, {
|
|
50
49
|
signal: options.signal,
|
|
@@ -52,7 +51,8 @@ function createLocalDocumentConverter() {
|
|
|
52
51
|
onDocument,
|
|
53
52
|
fonts: options.fonts,
|
|
54
53
|
onFontSubstitution,
|
|
55
|
-
images: options.images
|
|
54
|
+
images: options.images,
|
|
55
|
+
clock: options.clock
|
|
56
56
|
});
|
|
57
57
|
return Promise.resolve({
|
|
58
58
|
document: {
|
package/dist/convert/port.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as ClockPort } from "../clock-C7SUuYN0.cjs";
|
|
1
2
|
import { DocumentPackage, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
2
3
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
3
4
|
import { z } from "zod";
|
|
@@ -40,6 +41,7 @@ interface ConversionOptions {
|
|
|
40
41
|
readonly fonts?: readonly ProvidedFont[];
|
|
41
42
|
readonly onFontSubstitution?: (substitution: FontSubstitution) => void;
|
|
42
43
|
readonly images?: MarkdownImageResolver;
|
|
44
|
+
readonly clock?: ClockPort;
|
|
43
45
|
}
|
|
44
46
|
interface DocumentConverter {
|
|
45
47
|
readonly contractVersion: number;
|
package/dist/convert/port.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as ClockPort } from "../clock-C7SUuYN0.js";
|
|
1
2
|
import { DocumentPackage, FontSubstitution, ProvidedFont } from "document-schema.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { MarkdownImageResolver } from "markdown-codec";
|
|
@@ -40,6 +41,7 @@ interface ConversionOptions {
|
|
|
40
41
|
readonly fonts?: readonly ProvidedFont[];
|
|
41
42
|
readonly onFontSubstitution?: (substitution: FontSubstitution) => void;
|
|
42
43
|
readonly images?: MarkdownImageResolver;
|
|
44
|
+
readonly clock?: ClockPort;
|
|
43
45
|
}
|
|
44
46
|
interface DocumentConverter {
|
|
45
47
|
readonly contractVersion: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { t as ClockPort } from "../../clock-C7SUuYN0.cjs";
|
|
1
2
|
import { t as OmmlDiagnostic } from "../../shared-DLZ3IQUl.cjs";
|
|
2
|
-
import { ClockPort } from "../../ports/clock.cjs";
|
|
3
3
|
import { ContentDocument } from "document-schema.js";
|
|
4
4
|
import { Package } from "ooxml.js";
|
|
5
5
|
//#region src/edit/docx/content.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { t as ClockPort } from "../../clock-C7SUuYN0.js";
|
|
1
2
|
import { t as OmmlDiagnostic } from "../../shared-DUOzjwcL.js";
|
|
2
|
-
import { ClockPort } from "../../ports/clock.js";
|
|
3
3
|
import { Package } from "ooxml.js";
|
|
4
4
|
import { ContentDocument } from "document-schema.js";
|
|
5
5
|
//#region src/edit/docx/content.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClockPort } from "../../
|
|
1
|
+
import { t as ClockPort } from "../../clock-C7SUuYN0.cjs";
|
|
2
2
|
import { r as Margins, s as PageSize$1 } from "../../geometry-DUF273hM.cjs";
|
|
3
3
|
import { MarkdownParagraph, ParagraphInit } from "./paragraph.cjs";
|
|
4
4
|
import { MarkdownList, MarkdownListInit } from "./list.cjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClockPort } from "../../
|
|
1
|
+
import { t as ClockPort } from "../../clock-C7SUuYN0.js";
|
|
2
2
|
import { r as Margins, s as PageSize$1 } from "../../geometry-BG4fX9Rw.js";
|
|
3
3
|
import { MarkdownParagraph, ParagraphInit } from "./paragraph.js";
|
|
4
4
|
import { MarkdownList, MarkdownListInit } from "./list.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClockPort } from "../../
|
|
1
|
+
import { t as ClockPort } from "../../clock-C7SUuYN0.cjs";
|
|
2
2
|
import { t as OdtParagraph } from "../../paragraph-D7324S0j.cjs";
|
|
3
3
|
import { n as OdtTable } from "../../table-u6fXNuDO.cjs";
|
|
4
4
|
import { ContentDocument, ContentParagraph, ContentTable } from "document-schema.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClockPort } from "../../
|
|
1
|
+
import { t as ClockPort } from "../../clock-C7SUuYN0.js";
|
|
2
2
|
import { t as OdtParagraph } from "../../paragraph-DZyHl2e4.js";
|
|
3
3
|
import { n as OdtTable } from "../../table-qaDB5iJO.js";
|
|
4
4
|
import { ContentDocument, ContentParagraph, ContentTable } from "document-schema.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClockPort } from "../../
|
|
1
|
+
import { t as ClockPort } from "../../clock-C7SUuYN0.cjs";
|
|
2
2
|
import { t as Box$1 } from "../../geometry-DUF273hM.cjs";
|
|
3
3
|
import { n as ParagraphInit, t as OdtParagraph } from "../../paragraph-D7324S0j.cjs";
|
|
4
4
|
import { t as OdtList } from "../../list-MCxkKpI7.cjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClockPort } from "../../
|
|
1
|
+
import { t as ClockPort } from "../../clock-C7SUuYN0.js";
|
|
2
2
|
import { t as Box$1 } from "../../geometry-BG4fX9Rw.js";
|
|
3
3
|
import { n as ParagraphInit, t as OdtParagraph } from "../../paragraph-DZyHl2e4.js";
|
|
4
4
|
import { t as OdtList } from "../../list-BrAIR4Sv.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClockPort } from "../../
|
|
1
|
+
import { t as ClockPort } from "../../clock-C7SUuYN0.cjs";
|
|
2
2
|
import { PageInit, PdfPage } from "./page.cjs";
|
|
3
3
|
import { LayoutDocument, LayoutMetadata } from "document-schema.js";
|
|
4
4
|
import { ReadPdfOptions, WritePdfOptions } from "pdf-codec";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ClockPort } from "../../
|
|
1
|
+
import { t as ClockPort } from "../../clock-C7SUuYN0.js";
|
|
2
2
|
import { PageInit, PdfPage } from "./page.js";
|
|
3
3
|
import { LayoutDocument, LayoutMetadata } from "document-schema.js";
|
|
4
4
|
import { ReadPdfOptions, WritePdfOptions } from "pdf-codec";
|
package/dist/index.d.cts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as fixedClock, r as systemClock, t as ClockPort } from "./clock-C7SUuYN0.cjs";
|
|
1
2
|
import { ConversionOptions, ConversionRequest, ConversionResult, DOCUMENT_FORMATS, Diagnostic, DocumentConverter, DocumentFormat, DocumentFormatSchema, DocumentPayload } from "./convert/port.cjs";
|
|
2
3
|
import { n as HsqldbDecodeOptions, r as HsqldbRowFormatError } from "./rowformat-Cl2exlEh.cjs";
|
|
3
4
|
import { i as mapMathVariant, n as applyMathVariant, r as isMathVariant, t as MathVariant } from "./variant-BMrebjMw.cjs";
|
|
@@ -8,7 +9,6 @@ import { docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, od
|
|
|
8
9
|
import { UnsupportedFontSourceFormatError, extractSourceFontsForFormat } from "./convert/document-fonts.cjs";
|
|
9
10
|
import { buildDocumentBytes } from "./convert/from-package.cjs";
|
|
10
11
|
import { createLocalDocumentConverter } from "./convert/local.cjs";
|
|
11
|
-
import { ClockPort, fixedClock, systemClock } from "./ports/clock.cjs";
|
|
12
12
|
import { BuildDocxPackageOptions, buildDocxPackage } from "./edit/docx/content.cjs";
|
|
13
13
|
import { c as firstChildByLocalName, d as textContent, i as MathMlText, l as isMathMlElement, n as MathMlElement, o as elementChildren, r as MathMlNode, s as elementLocalName, t as MathMlAttribute, u as localName } from "./nodes-pArN9ilm.cjs";
|
|
14
14
|
import { n as buildOfficeMath, r as buildOfficeMathParagraph, t as OmmlWriteResult } from "./write-BQ6SK8r8.cjs";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as fixedClock, r as systemClock, t as ClockPort } from "./clock-C7SUuYN0.js";
|
|
1
2
|
import { ConversionOptions, ConversionRequest, ConversionResult, DOCUMENT_FORMATS, Diagnostic, DocumentConverter, DocumentFormat, DocumentFormatSchema, DocumentPayload } from "./convert/port.js";
|
|
2
3
|
import { n as HsqldbDecodeOptions, r as HsqldbRowFormatError } from "./rowformat-Cl2exlEh.js";
|
|
3
4
|
import { i as mapMathVariant, n as applyMathVariant, r as isMathVariant, t as MathVariant } from "./variant-BMrebjMw.js";
|
|
@@ -8,7 +9,6 @@ import { docxPdfCodec, markdownDocxCodec, markdownOdtCodec, markdownPdfCodec, od
|
|
|
8
9
|
import { UnsupportedFontSourceFormatError, extractSourceFontsForFormat } from "./convert/document-fonts.js";
|
|
9
10
|
import { buildDocumentBytes } from "./convert/from-package.js";
|
|
10
11
|
import { createLocalDocumentConverter } from "./convert/local.js";
|
|
11
|
-
import { ClockPort, fixedClock, systemClock } from "./ports/clock.js";
|
|
12
12
|
import { BuildDocxPackageOptions, buildDocxPackage } from "./edit/docx/content.js";
|
|
13
13
|
import { c as firstChildByLocalName, d as textContent, i as MathMlText, l as isMathMlElement, n as MathMlElement, o as elementChildren, r as MathMlNode, s as elementLocalName, t as MathMlAttribute, u as localName } from "./nodes-pArN9ilm.js";
|
|
14
14
|
import { n as buildOfficeMath, r as buildOfficeMathParagraph, t as OmmlWriteResult } from "./write-THs7ipBq.js";
|
package/dist/model/metadata.cjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
//#region src/model/metadata.ts
|
|
3
3
|
function resolveMetadataTimestamps(metadata, clock) {
|
|
4
|
+
if (clock === void 0) return metadata;
|
|
4
5
|
if (metadata.createdIso !== void 0 && metadata.modifiedIso !== void 0) return metadata;
|
|
5
6
|
const now = clock.now().toISOString();
|
|
6
7
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClockPort } from "../
|
|
1
|
+
import { t as ClockPort } from "../clock-C7SUuYN0.cjs";
|
|
2
2
|
import { LayoutMetadata } from "document-schema.js";
|
|
3
3
|
//#region src/model/metadata.d.ts
|
|
4
|
-
declare function resolveMetadataTimestamps(metadata: LayoutMetadata, clock
|
|
4
|
+
declare function resolveMetadataTimestamps(metadata: LayoutMetadata, clock?: ClockPort): LayoutMetadata;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { resolveMetadataTimestamps };
|
package/dist/model/metadata.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClockPort } from "../
|
|
1
|
+
import { t as ClockPort } from "../clock-C7SUuYN0.js";
|
|
2
2
|
import { LayoutMetadata } from "document-schema.js";
|
|
3
3
|
//#region src/model/metadata.d.ts
|
|
4
|
-
declare function resolveMetadataTimestamps(metadata: LayoutMetadata, clock
|
|
4
|
+
declare function resolveMetadataTimestamps(metadata: LayoutMetadata, clock?: ClockPort): LayoutMetadata;
|
|
5
5
|
//#endregion
|
|
6
6
|
export { resolveMetadataTimestamps };
|
package/dist/model/metadata.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
//#region src/model/metadata.ts
|
|
2
2
|
function resolveMetadataTimestamps(metadata, clock) {
|
|
3
|
+
if (clock === void 0) return metadata;
|
|
3
4
|
if (metadata.createdIso !== void 0 && metadata.modifiedIso !== void 0) return metadata;
|
|
4
5
|
const now = clock.now().toISOString();
|
|
5
6
|
return {
|
package/dist/ports/clock.d.cts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
interface ClockPort {
|
|
3
|
-
now(): Date;
|
|
4
|
-
}
|
|
5
|
-
declare const systemClock: ClockPort;
|
|
6
|
-
declare function fixedClock(date: Date): ClockPort;
|
|
7
|
-
//#endregion
|
|
1
|
+
import { n as fixedClock, r as systemClock, t as ClockPort } from "../clock-C7SUuYN0.cjs";
|
|
8
2
|
export { ClockPort, fixedClock, systemClock };
|
package/dist/ports/clock.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
interface ClockPort {
|
|
3
|
-
now(): Date;
|
|
4
|
-
}
|
|
5
|
-
declare const systemClock: ClockPort;
|
|
6
|
-
declare function fixedClock(date: Date): ClockPort;
|
|
7
|
-
//#endregion
|
|
1
|
+
import { n as fixedClock, r as systemClock, t as ClockPort } from "../clock-C7SUuYN0.js";
|
|
8
2
|
export { ClockPort, fixedClock, systemClock };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "js.documents",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.93.1",
|
|
4
4
|
"description": "Bidirectional docx/pptx <-> PDF conversion and a read+write editable OOXML document model, built on ooxml.js and Zod 4 codecs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
],
|
|
59
59
|
"license": "MIT",
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"byte-codec": "^1.0.
|
|
61
|
+
"byte-codec": "^1.0.4",
|
|
62
62
|
"document-schema.js": "^2.4.3",
|
|
63
63
|
"fflate": "^0.8.3",
|
|
64
64
|
"markdown-codec": "^1.1.14",
|