documents.js 1.40.0 → 1.42.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.
- package/README.md +34 -16
- package/dist/index.cjs +1103 -96
- package/dist/index.d.cts +239 -12
- package/dist/index.d.ts +239 -12
- package/dist/index.js +1048 -100
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Attribute, AttributeSchema, BinaryPart, BinaryPartSchema, Comment, CommentSchema, CompactAttrPairs, CompactPackage, CompactPackageSchema, CompactPart, CompactPartSchema, CompactXmlNode, CompactXmlNodeSchema, DefinedName, DefinedNameSchema, Package, Package as Package$1, PackageSchema, Part, PartSchema, Relationship, XmlCdata, XmlCdataSchema, XmlComment, XmlCommentSchema, XmlDeclaration, XmlDeclarationSchema, XmlElement, XmlElement as XmlElement$1, XmlElementSchema, XmlNode, XmlNode as XmlNode$1, XmlNodeSchema, XmlPart, XmlPartSchema, XmlPi, XmlPiSchema, XmlText, XmlTextSchema, attr, base64ToBytes, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, decodeCompactPackage, decodeEntities, decodePackage, elementsWithTag, encodeCompactPackage, encodePackage, fromCompact, isCompactXmlNode, isXmlNode, packageCodec, parsePackage, parseXml, resolveRelationships, rootElement, serializePackage, textContent, toCompact, unzipPackage, walk, xmlCodec, zipPackage } from "ooxml.js";
|
|
2
|
-
import { Alignment, Box, Box as Box$1, COLOR_BLACK, Color as LayoutColor, ContentBlock, ContentBlockSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembership as ContentListMembership$1, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSlide, ContentSlideSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, DEFAULT_LAYOUT_FONT, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocument as LayoutDocument$1, LayoutEllipse, LayoutFont, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutMetadata, LayoutPage, LayoutRect, LayoutText, Margins, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, isContentBlock, rgbHexToColor } from "document-content-model";
|
|
2
|
+
import { Alignment, Box, Box as Box$1, COLOR_BLACK, Color as LayoutColor, ContentBlock, ContentBlockSchema, ContentCellValue, ContentCellValueSchema, ContentImageBlock, ContentImageBlockSchema, ContentListMembership, ContentListMembership as ContentListMembership$1, ContentPageBreak, ContentPageBreakSchema, ContentParagraph, ContentParagraphSchema, ContentRun, ContentRunSchema, ContentSection, ContentSectionSchema, ContentShape, ContentShapeSchema, ContentSheet, ContentSheetCell, ContentSheetCellSchema, ContentSheetColumn, ContentSheetColumnSchema, ContentSheetImage, ContentSheetPrintRange, ContentSheetPrintRangeSchema, ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, ContentSlide, ContentSlideSchema, ContentTable, ContentTableCell, ContentTableCellSchema, ContentTableRow, ContentTableRowSchema, ContentTableSchema, DEFAULT_LAYOUT_FONT, LAYOUT_FORMAT_VERSION, LayoutDocument, LayoutDocument as LayoutDocument$1, LayoutEllipse, LayoutFont, LayoutImage, LayoutImageAsset, LayoutItem, LayoutLine, LayoutLink, LayoutMetadata, LayoutPage, LayoutRect, LayoutText, Margins, PAGE_SIZE_A4, PAGE_SIZE_LETTER, PageSize, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, isContentBlock, rgbHexToColor } from "document-content-model";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { Package as Package$2, XmlElement as XmlElement$2, XmlNode as XmlNode$2 } from "odf.js";
|
|
5
5
|
//#region src/model/content.d.ts
|
|
@@ -68,6 +68,142 @@ declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
68
68
|
}, z.core.$strip>>;
|
|
69
69
|
notes: z.ZodString;
|
|
70
70
|
}, z.core.$strip>>;
|
|
71
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
72
|
+
kind: z.ZodLiteral<"spreadsheet">;
|
|
73
|
+
formatVersion: z.ZodLiteral<1>;
|
|
74
|
+
metadata: z.ZodObject<{
|
|
75
|
+
title: z.ZodOptional<z.ZodString>;
|
|
76
|
+
author: z.ZodOptional<z.ZodString>;
|
|
77
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
78
|
+
keywords: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
79
|
+
creator: z.ZodOptional<z.ZodString>;
|
|
80
|
+
producer: z.ZodOptional<z.ZodString>;
|
|
81
|
+
createdIso: z.ZodOptional<z.ZodString>;
|
|
82
|
+
modifiedIso: z.ZodOptional<z.ZodString>;
|
|
83
|
+
}, z.core.$strip>;
|
|
84
|
+
sheets: z.ZodArray<z.ZodObject<{
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
cells: z.ZodArray<z.ZodObject<{
|
|
87
|
+
row: z.ZodNumber;
|
|
88
|
+
column: z.ZodNumber;
|
|
89
|
+
value: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
90
|
+
kind: z.ZodLiteral<"number">;
|
|
91
|
+
value: z.ZodNumber;
|
|
92
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
93
|
+
kind: z.ZodLiteral<"percentage">;
|
|
94
|
+
value: z.ZodNumber;
|
|
95
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
96
|
+
kind: z.ZodLiteral<"currency">;
|
|
97
|
+
value: z.ZodNumber;
|
|
98
|
+
currency: z.ZodOptional<z.ZodString>;
|
|
99
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
100
|
+
kind: z.ZodLiteral<"boolean">;
|
|
101
|
+
value: z.ZodBoolean;
|
|
102
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
103
|
+
kind: z.ZodLiteral<"date">;
|
|
104
|
+
value: z.ZodString;
|
|
105
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
106
|
+
kind: z.ZodLiteral<"time">;
|
|
107
|
+
value: z.ZodString;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
kind: z.ZodLiteral<"string">;
|
|
110
|
+
value: z.ZodString;
|
|
111
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
112
|
+
kind: z.ZodLiteral<"error">;
|
|
113
|
+
value: z.ZodString;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
kind: z.ZodLiteral<"empty">;
|
|
116
|
+
}, z.core.$strip>], "kind">;
|
|
117
|
+
formula: z.ZodOptional<z.ZodString>;
|
|
118
|
+
displayText: z.ZodString;
|
|
119
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
120
|
+
text: z.ZodString;
|
|
121
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
122
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
underline: z.ZodOptional<z.ZodBoolean>;
|
|
124
|
+
strike: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
fontFamily: z.ZodOptional<z.ZodString>;
|
|
126
|
+
sizePt: z.ZodOptional<z.ZodNumber>;
|
|
127
|
+
color: z.ZodOptional<z.ZodObject<{
|
|
128
|
+
r: z.ZodNumber;
|
|
129
|
+
g: z.ZodNumber;
|
|
130
|
+
b: z.ZodNumber;
|
|
131
|
+
}, z.core.$strip>>;
|
|
132
|
+
hyperlink: z.ZodOptional<z.ZodString>;
|
|
133
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
134
|
+
}, z.core.$strip>>>;
|
|
135
|
+
colSpan: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
rowSpan: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
}, z.core.$strip>>;
|
|
138
|
+
columns: z.ZodArray<z.ZodObject<{
|
|
139
|
+
index: z.ZodNumber;
|
|
140
|
+
widthPt: z.ZodNumber;
|
|
141
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
144
|
+
index: z.ZodNumber;
|
|
145
|
+
heightPt: z.ZodNumber;
|
|
146
|
+
hidden: z.ZodOptional<z.ZodBoolean>;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
images: z.ZodArray<z.ZodObject<{
|
|
149
|
+
kind: z.ZodLiteral<"image">;
|
|
150
|
+
format: z.ZodEnum<{
|
|
151
|
+
png: "png";
|
|
152
|
+
jpeg: "jpeg";
|
|
153
|
+
}>;
|
|
154
|
+
base64: z.ZodString;
|
|
155
|
+
widthPt: z.ZodNumber;
|
|
156
|
+
heightPt: z.ZodNumber;
|
|
157
|
+
altText: z.ZodOptional<z.ZodString>;
|
|
158
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
159
|
+
anchorRow: z.ZodNumber;
|
|
160
|
+
anchorColumn: z.ZodNumber;
|
|
161
|
+
offsetXPt: z.ZodNumber;
|
|
162
|
+
offsetYPt: z.ZodNumber;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
printSettings: z.ZodObject<{
|
|
165
|
+
pageSize: z.ZodObject<{
|
|
166
|
+
widthPt: z.ZodNumber;
|
|
167
|
+
heightPt: z.ZodNumber;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
margins: z.ZodObject<{
|
|
170
|
+
topPt: z.ZodNumber;
|
|
171
|
+
rightPt: z.ZodNumber;
|
|
172
|
+
bottomPt: z.ZodNumber;
|
|
173
|
+
leftPt: z.ZodNumber;
|
|
174
|
+
}, z.core.$strip>;
|
|
175
|
+
printRange: z.ZodOptional<z.ZodObject<{
|
|
176
|
+
startRow: z.ZodNumber;
|
|
177
|
+
startColumn: z.ZodNumber;
|
|
178
|
+
endRow: z.ZodNumber;
|
|
179
|
+
endColumn: z.ZodNumber;
|
|
180
|
+
}, z.core.$strip>>;
|
|
181
|
+
scale: z.ZodOptional<z.ZodNumber>;
|
|
182
|
+
fitToPages: z.ZodOptional<z.ZodObject<{
|
|
183
|
+
width: z.ZodNumber;
|
|
184
|
+
height: z.ZodNumber;
|
|
185
|
+
}, z.core.$strip>>;
|
|
186
|
+
repeatRows: z.ZodOptional<z.ZodObject<{
|
|
187
|
+
start: z.ZodNumber;
|
|
188
|
+
end: z.ZodNumber;
|
|
189
|
+
}, z.core.$strip>>;
|
|
190
|
+
repeatColumns: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
start: z.ZodNumber;
|
|
192
|
+
end: z.ZodNumber;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
gridlines: z.ZodBoolean;
|
|
195
|
+
headers: z.ZodBoolean;
|
|
196
|
+
pageOrder: z.ZodEnum<{
|
|
197
|
+
downThenOver: "downThenOver";
|
|
198
|
+
overThenDown: "overThenDown";
|
|
199
|
+
}>;
|
|
200
|
+
manualBreaks: z.ZodOptional<z.ZodObject<{
|
|
201
|
+
rows: z.ZodArray<z.ZodNumber>;
|
|
202
|
+
columns: z.ZodArray<z.ZodNumber>;
|
|
203
|
+
}, z.core.$strip>>;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
embeddedObjects: z.ZodOptional<z.ZodArray<z.ZodCustom<import("document-content-model").ContentEmbeddedObject, import("document-content-model").ContentEmbeddedObject>>>;
|
|
206
|
+
}, z.core.$strip>>;
|
|
71
207
|
}, z.core.$strip>], "kind">;
|
|
72
208
|
type ContentDocument = z.infer<typeof ContentDocumentSchema>;
|
|
73
209
|
//#endregion
|
|
@@ -84,7 +220,7 @@ declare const OdpBytesSchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<Ar
|
|
|
84
220
|
declare const OdgBytesSchema: z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>;
|
|
85
221
|
//#endregion
|
|
86
222
|
//#region src/edit/docx/image.d.ts
|
|
87
|
-
interface ImageInit$
|
|
223
|
+
interface ImageInit$2 {
|
|
88
224
|
readonly format: 'png' | 'jpeg';
|
|
89
225
|
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
90
226
|
readonly widthPt: number;
|
|
@@ -161,7 +297,7 @@ declare class DocxParagraph {
|
|
|
161
297
|
set alignment(value: 'left' | 'center' | 'right' | 'justify' | undefined);
|
|
162
298
|
get list(): ContentListMembership$1 | undefined;
|
|
163
299
|
set list(value: ContentListMembership$1 | undefined);
|
|
164
|
-
insertImageAfter(image: ImageInit$
|
|
300
|
+
insertImageAfter(image: ImageInit$2): void;
|
|
165
301
|
remove(): void;
|
|
166
302
|
}
|
|
167
303
|
//#endregion
|
|
@@ -218,7 +354,7 @@ declare function createDocx(): DocxEditor;
|
|
|
218
354
|
declare function buildDocxPackage(content: ContentDocument): Package$1;
|
|
219
355
|
//#endregion
|
|
220
356
|
//#region src/edit/pptx/image.d.ts
|
|
221
|
-
interface ImageInit {
|
|
357
|
+
interface ImageInit$1 {
|
|
222
358
|
readonly format: 'png' | 'jpeg';
|
|
223
359
|
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
224
360
|
readonly altText?: string;
|
|
@@ -253,14 +389,14 @@ interface DrawingParagraphInit {
|
|
|
253
389
|
}
|
|
254
390
|
//#endregion
|
|
255
391
|
//#region src/edit/pptx/slide.d.ts
|
|
256
|
-
interface TextBoxInit {
|
|
392
|
+
interface TextBoxInit$1 {
|
|
257
393
|
readonly frame: Box;
|
|
258
394
|
readonly text: string;
|
|
259
395
|
}
|
|
260
|
-
interface SlideImageInit extends ImageInit {
|
|
396
|
+
interface SlideImageInit$1 extends ImageInit$1 {
|
|
261
397
|
readonly frame: Box;
|
|
262
398
|
}
|
|
263
|
-
interface SlideContext {
|
|
399
|
+
interface SlideContext$1 {
|
|
264
400
|
readonly pkg: Package$1;
|
|
265
401
|
readonly slidePartPath: string;
|
|
266
402
|
readonly mediaDir: string;
|
|
@@ -270,11 +406,11 @@ declare class PptxSlide {
|
|
|
270
406
|
private readonly node;
|
|
271
407
|
private readonly context;
|
|
272
408
|
private removed;
|
|
273
|
-
constructor(container: XmlNode$1[], node: XmlElement$1, context: SlideContext);
|
|
409
|
+
constructor(container: XmlNode$1[], node: XmlElement$1, context: SlideContext$1);
|
|
274
410
|
private live;
|
|
275
411
|
shapes(): PptxShape[];
|
|
276
|
-
addTextBox(init: TextBoxInit): PptxShape;
|
|
277
|
-
addImage(init: SlideImageInit): PptxShape;
|
|
412
|
+
addTextBox(init: TextBoxInit$1): PptxShape;
|
|
413
|
+
addImage(init: SlideImageInit$1): PptxShape;
|
|
278
414
|
get notes(): string;
|
|
279
415
|
set notes(value: string);
|
|
280
416
|
remove(): void;
|
|
@@ -434,6 +570,81 @@ declare function createOdt(): OdtEditor;
|
|
|
434
570
|
//#region src/edit/odt/content.d.ts
|
|
435
571
|
declare function buildOdtPackage(content: ContentDocument): Package$2;
|
|
436
572
|
//#endregion
|
|
573
|
+
//#region src/edit/odp/image.d.ts
|
|
574
|
+
interface ImageInit {
|
|
575
|
+
readonly format: 'png' | 'jpeg';
|
|
576
|
+
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
577
|
+
readonly altText?: string;
|
|
578
|
+
}
|
|
579
|
+
//#endregion
|
|
580
|
+
//#region src/edit/odp/shape.d.ts
|
|
581
|
+
declare class OdpShape {
|
|
582
|
+
private readonly container;
|
|
583
|
+
private readonly node;
|
|
584
|
+
private readonly pkg;
|
|
585
|
+
private removed;
|
|
586
|
+
constructor(container: XmlNode$2[], node: XmlElement$2, pkg: Package$2);
|
|
587
|
+
private live;
|
|
588
|
+
get name(): string | undefined;
|
|
589
|
+
get frame(): Box | undefined;
|
|
590
|
+
set frame(value: Box);
|
|
591
|
+
get rotationDeg(): number | undefined;
|
|
592
|
+
set rotationDeg(value: number | undefined);
|
|
593
|
+
private applyGeometry;
|
|
594
|
+
private textBox;
|
|
595
|
+
paragraphs(): OdtParagraph[];
|
|
596
|
+
appendParagraph(init?: ParagraphInit): OdtParagraph;
|
|
597
|
+
get text(): string;
|
|
598
|
+
set text(value: string);
|
|
599
|
+
addList(): OdtList;
|
|
600
|
+
remove(): void;
|
|
601
|
+
}
|
|
602
|
+
//#endregion
|
|
603
|
+
//#region src/edit/odp/slide.d.ts
|
|
604
|
+
interface TextBoxInit {
|
|
605
|
+
readonly frame: Box;
|
|
606
|
+
readonly text: string;
|
|
607
|
+
}
|
|
608
|
+
interface SlideImageInit extends ImageInit {
|
|
609
|
+
readonly frame: Box;
|
|
610
|
+
}
|
|
611
|
+
interface SlideContext {
|
|
612
|
+
readonly pkg: Package$2;
|
|
613
|
+
}
|
|
614
|
+
declare class OdpSlide {
|
|
615
|
+
private readonly container;
|
|
616
|
+
private readonly node;
|
|
617
|
+
private readonly context;
|
|
618
|
+
private removed;
|
|
619
|
+
constructor(container: XmlNode$2[], node: XmlElement$2, context: SlideContext);
|
|
620
|
+
private live;
|
|
621
|
+
shapes(): OdpShape[];
|
|
622
|
+
addTextBox(init: TextBoxInit): OdpShape;
|
|
623
|
+
addImage(init: SlideImageInit): OdpShape;
|
|
624
|
+
get notes(): string;
|
|
625
|
+
set notes(value: string);
|
|
626
|
+
remove(): void;
|
|
627
|
+
}
|
|
628
|
+
//#endregion
|
|
629
|
+
//#region src/edit/odp/editor.d.ts
|
|
630
|
+
declare class OdpEditor {
|
|
631
|
+
private readonly pkg;
|
|
632
|
+
constructor(pkg: Package$2);
|
|
633
|
+
slides(): OdpSlide[];
|
|
634
|
+
addSlide(): OdpSlide;
|
|
635
|
+
removeSlideAt(index: number): void;
|
|
636
|
+
moveSlide(from: number, to: number): void;
|
|
637
|
+
get slideSize(): PageSize;
|
|
638
|
+
set slideSize(size: PageSize);
|
|
639
|
+
toPackage(): Package$2;
|
|
640
|
+
toBytes(): Uint8Array<ArrayBuffer>;
|
|
641
|
+
}
|
|
642
|
+
declare function openOdp(bytes: Uint8Array<ArrayBuffer>): OdpEditor;
|
|
643
|
+
declare function createOdp(): OdpEditor;
|
|
644
|
+
//#endregion
|
|
645
|
+
//#region src/edit/odp/content.d.ts
|
|
646
|
+
declare function buildOdpPackage(content: ContentDocument): Package$2;
|
|
647
|
+
//#endregion
|
|
437
648
|
//#region src/pdf/diagnostics.d.ts
|
|
438
649
|
type PdfDiagnosticSeverity = 'info' | 'warning';
|
|
439
650
|
interface PdfDiagnostic {
|
|
@@ -613,6 +824,9 @@ declare function readOdtContent(pkg: Package$2): ContentDocument;
|
|
|
613
824
|
//#region src/odf/odp/read.d.ts
|
|
614
825
|
declare function readOdpContent(pkg: Package$2): ContentDocument;
|
|
615
826
|
//#endregion
|
|
827
|
+
//#region src/odf/ods/read.d.ts
|
|
828
|
+
declare function readOdsContent(pkg: Package$2): ContentDocument;
|
|
829
|
+
//#endregion
|
|
616
830
|
//#region src/pdf/measure.d.ts
|
|
617
831
|
interface UnderlineMetrics {
|
|
618
832
|
readonly offsetPt: number;
|
|
@@ -645,6 +859,16 @@ type PresentationContentDocument = Extract<ContentDocument, {
|
|
|
645
859
|
}>;
|
|
646
860
|
declare function convertPresentationToLayout(doc: PresentationContentDocument, options: SlidesLayoutOptions): LayoutDocument$1;
|
|
647
861
|
//#endregion
|
|
862
|
+
//#region src/layout/sheets.d.ts
|
|
863
|
+
interface SheetsLayoutOptions {
|
|
864
|
+
readonly measurer: TextMeasurer;
|
|
865
|
+
readonly signal?: AbortSignal;
|
|
866
|
+
}
|
|
867
|
+
type SpreadsheetContentDocument = Extract<ContentDocument, {
|
|
868
|
+
kind: 'spreadsheet';
|
|
869
|
+
}>;
|
|
870
|
+
declare function convertSpreadsheetToLayout(doc: SpreadsheetContentDocument, options: SheetsLayoutOptions): LayoutDocument$1;
|
|
871
|
+
//#endregion
|
|
648
872
|
//#region src/layout/reconstruct.d.ts
|
|
649
873
|
interface ReconstructOptions {
|
|
650
874
|
readonly signal?: AbortSignal;
|
|
@@ -663,6 +887,7 @@ declare function docxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToP
|
|
|
663
887
|
declare function odtToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
664
888
|
declare function pptxToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
665
889
|
declare function odpToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
890
|
+
declare function odsToPdf(bytes: Uint8Array<ArrayBuffer>, options?: DocumentToPdfOptions): Uint8Array<ArrayBuffer>;
|
|
666
891
|
interface PdfToDocumentOptions {
|
|
667
892
|
readonly signal?: AbortSignal;
|
|
668
893
|
readonly sink?: PdfDiagnosticSink;
|
|
@@ -670,14 +895,16 @@ interface PdfToDocumentOptions {
|
|
|
670
895
|
declare function pdfToDocx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
671
896
|
declare function pdfToPptx(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
672
897
|
declare function pdfToOdt(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
898
|
+
declare function pdfToOdp(bytes: Uint8Array<ArrayBuffer>, options?: PdfToDocumentOptions): Uint8Array<ArrayBuffer>;
|
|
673
899
|
//#endregion
|
|
674
900
|
//#region src/convert/codec.d.ts
|
|
675
901
|
declare const docxPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
676
902
|
declare const pptxPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
677
903
|
declare const odtPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
904
|
+
declare const odpPdfCodec: z.ZodCodec<z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>, z.ZodCustom<Uint8Array<ArrayBuffer>, Uint8Array<ArrayBuffer>>>;
|
|
678
905
|
//#endregion
|
|
679
906
|
//#region src/convert/port.d.ts
|
|
680
|
-
type DocumentFormat = 'docx' | 'pptx' | 'odt' | 'odp' | 'pdf';
|
|
907
|
+
type DocumentFormat = 'docx' | 'pptx' | 'odt' | 'odp' | 'ods' | 'pdf';
|
|
681
908
|
interface DocumentPayload {
|
|
682
909
|
readonly format: DocumentFormat;
|
|
683
910
|
readonly bytes: Uint8Array<ArrayBuffer>;
|
|
@@ -720,4 +947,4 @@ declare function fixedClock(date: Date): ClockPort;
|
|
|
720
947
|
//#region src/ports/abort.d.ts
|
|
721
948
|
declare function throwIfAborted(signal: AbortSignal | undefined): void;
|
|
722
949
|
//#endregion
|
|
723
|
-
export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, COLOR_BLACK, CONTENT_FORMAT_VERSION, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSlide, ContentSlideSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ConversionRequest, type ConversionResult, DEFAULT_LAYOUT_FONT, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentConverter, type DocumentFormat, type DocumentPayload, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DrawingParagraphInit, type DrawingRunInit, type EngineLayoutOptions, LAYOUT_FORMAT_VERSION, type LayoutColor, type LayoutDocument, type LayoutEllipse, type LayoutFont, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutRect, type LayoutText, type Margins, NOOP_DIAGNOSTIC_SINK, OdgBytesSchema, OdpBytesSchema, OdsBytesSchema, type OdtBody, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit as OdtParagraphInit, OdtRun, type RunInit as OdtRunInit, OdtTable, OdtTableCell, type TableInit as OdtTableInit, OdtTableRow, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, type PdfToDocumentOptions, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, type ReadPdfOptions, type ReconstructOptions, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SlideImageInit, type SlidesLayoutOptions, type TextBoxInit, type WinAnsiSubstitution, type WritePdfOptions, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, attr, base64ToBytes, buildDocxPackage, buildOdtPackage, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, convertPresentationToLayout, convertWordprocessingToLayout, createDocx, createLocalDocumentConverter, createOdt, createPptx, decodeCompactPackage, decodeEntities, decodePackage, docxPdfCodec, docxToPdf, elementsWithTag, encodeCompactPackage, encodePackage, fixedClock, flipY, fromCompact, isCompactXmlNode, isContentBlock, isXmlNode, odpToPdf, odtPdfCodec, odtToPdf, openDocx, openOdt, openPptx, packageCodec, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToOdt, pdfToPptx, pptxPdfCodec, pptxToPdf, readDocxContent, readOdpContent, readOdtContent, readPdf, readPptxContent, reconstructPresentation, reconstructWordprocessing, resolveRelationships, rgbHexToColor, rootElement, serializePackage, systemClock, textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xmlCodec, zipPackage };
|
|
950
|
+
export { type Alignment, type Attribute, AttributeSchema, type BinaryPart, BinaryPartSchema, type Box, COLOR_BLACK, CONTENT_FORMAT_VERSION, type ClockPort, type Comment, CommentSchema, type CompactAttrPairs, type CompactPackage, CompactPackageSchema, type CompactPart, CompactPartSchema, type CompactXmlNode, CompactXmlNodeSchema, type ContentBlock, ContentBlockSchema, type ContentCellValue, ContentCellValueSchema, type ContentDocument, ContentDocumentSchema, type ContentImageBlock, ContentImageBlockSchema, type ContentListMembership, type ContentPageBreak, ContentPageBreakSchema, type ContentParagraph, ContentParagraphSchema, type ContentRun, ContentRunSchema, type ContentSection, ContentSectionSchema, type ContentShape, ContentShapeSchema, type ContentSheet, type ContentSheetCell, ContentSheetCellSchema, type ContentSheetColumn, ContentSheetColumnSchema, type ContentSheetImage, type ContentSheetPrintRange, ContentSheetPrintRangeSchema, type ContentSheetPrintSettings, ContentSheetPrintSettingsSchema, type ContentSheetRepeatRange, ContentSheetRepeatRangeSchema, type ContentSheetRow, ContentSheetRowSchema, ContentSheetSchema, type ContentSlide, ContentSlideSchema, type ContentTable, type ContentTableCell, ContentTableCellSchema, type ContentTableRow, ContentTableRowSchema, ContentTableSchema, type ConversionRequest, type ConversionResult, DEFAULT_LAYOUT_FONT, type DefinedName, DefinedNameSchema, type Diagnostic, type DocumentConverter, type DocumentFormat, type DocumentPayload, type DocumentToPdfOptions, type DocxBody, DocxBytesSchema, DocxEditor, DocxParagraph, DocxRun, DocxTable, DocxTableCell, DocxTableRow, type DrawingParagraphInit, type DrawingRunInit, type EngineLayoutOptions, LAYOUT_FORMAT_VERSION, type LayoutColor, type LayoutDocument, type LayoutEllipse, type LayoutFont, type LayoutImage, type LayoutImageAsset, type LayoutItem, type LayoutLine, type LayoutLink, type LayoutMetadata, type LayoutPage, type LayoutRect, type LayoutText, type Margins, NOOP_DIAGNOSTIC_SINK, OdgBytesSchema, OdpBytesSchema, OdpEditor, OdpShape, OdpSlide, type SlideImageInit as OdpSlideImageInit, type TextBoxInit as OdpTextBoxInit, OdsBytesSchema, type OdtBody, OdtBytesSchema, OdtEditor, OdtList, OdtListItem, OdtParagraph, type ParagraphInit as OdtParagraphInit, OdtRun, type RunInit as OdtRunInit, OdtTable, OdtTableCell, type TableInit as OdtTableInit, OdtTableRow, PAGE_SIZE_A4, PAGE_SIZE_LETTER, type Package, PackageSchema, type PageSize, type Part, PartSchema, PdfBytesSchema, type PdfDiagnostic, type PdfDiagnosticSeverity, type PdfDiagnosticSink, PdfEncryptedError, PdfParseError, type PdfToDocumentOptions, PptxBytesSchema, PptxEditor, PptxShape, PptxSlide, type ReadPdfOptions, type ReconstructOptions, type Relationship, SLIDE_SIZE_STANDARD, SLIDE_SIZE_WIDESCREEN, type SheetsLayoutOptions, type SlideImageInit$1 as SlideImageInit, type SlidesLayoutOptions, type TextBoxInit$1 as TextBoxInit, type WinAnsiSubstitution, type WritePdfOptions, type XmlCdata, XmlCdataSchema, type XmlComment, XmlCommentSchema, type XmlDeclaration, XmlDeclarationSchema, type XmlElement, XmlElementSchema, type XmlNode, XmlNodeSchema, type XmlPart, XmlPartSchema, type XmlPi, XmlPiSchema, type XmlText, XmlTextSchema, attr, base64ToBytes, buildDocxPackage, buildOdpPackage, buildOdtPackage, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, convertPresentationToLayout, convertSpreadsheetToLayout, convertWordprocessingToLayout, createDocx, createLocalDocumentConverter, createOdp, createOdt, createPptx, decodeCompactPackage, decodeEntities, decodePackage, docxPdfCodec, docxToPdf, elementsWithTag, encodeCompactPackage, encodePackage, fixedClock, flipY, fromCompact, isCompactXmlNode, isContentBlock, isXmlNode, odpPdfCodec, odpToPdf, odsToPdf, odtPdfCodec, odtToPdf, openDocx, openOdp, openOdt, openPptx, packageCodec, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToOdp, pdfToOdt, pdfToPptx, pptxPdfCodec, pptxToPdf, readDocxContent, readOdpContent, readOdsContent, readOdtContent, readPdf, readPptxContent, reconstructPresentation, reconstructWordprocessing, resolveRelationships, rgbHexToColor, rootElement, serializePackage, systemClock, textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xmlCodec, zipPackage };
|