documents.js 1.37.0 → 1.39.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/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
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
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";
3
3
  import { z } from "zod";
4
- import { Package as Package$2 } from "odf.js";
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
6
6
  declare const CONTENT_FORMAT_VERSION = 1;
7
7
  declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -98,7 +98,7 @@ interface MediaContext {
98
98
  }
99
99
  //#endregion
100
100
  //#region src/edit/docx/run.d.ts
101
- interface RunInit {
101
+ interface RunInit$1 {
102
102
  readonly text?: string;
103
103
  readonly bold?: boolean;
104
104
  readonly italic?: boolean;
@@ -132,7 +132,7 @@ declare class DocxRun {
132
132
  }
133
133
  //#endregion
134
134
  //#region src/edit/docx/paragraph.d.ts
135
- interface ParagraphInit {
135
+ interface ParagraphInit$1 {
136
136
  readonly text?: string;
137
137
  readonly styleId?: string;
138
138
  readonly alignment?: 'left' | 'center' | 'right' | 'justify';
@@ -152,9 +152,9 @@ declare class DocxParagraph {
152
152
  private pPr;
153
153
  get text(): string;
154
154
  runs(): DocxRun[];
155
- appendRun(init?: RunInit): DocxRun;
155
+ appendRun(init?: RunInit$1): DocxRun;
156
156
  appendTab(): void;
157
- insertRunAt(index: number, init?: RunInit): DocxRun;
157
+ insertRunAt(index: number, init?: RunInit$1): DocxRun;
158
158
  get styleId(): string | undefined;
159
159
  set styleId(value: string | undefined);
160
160
  get alignment(): 'left' | 'center' | 'right' | 'justify' | undefined;
@@ -166,7 +166,7 @@ declare class DocxParagraph {
166
166
  }
167
167
  //#endregion
168
168
  //#region src/edit/docx/table.d.ts
169
- interface TableInit {
169
+ interface TableInit$1 {
170
170
  readonly rows: number;
171
171
  readonly columns: number;
172
172
  readonly columnWidthsTwips?: readonly number[];
@@ -175,7 +175,7 @@ declare class DocxTableCell {
175
175
  private readonly node;
176
176
  constructor(node: XmlElement$1);
177
177
  paragraphs(): DocxParagraph[];
178
- appendParagraph(init?: ParagraphInit): DocxParagraph;
178
+ appendParagraph(init?: ParagraphInit$1): DocxParagraph;
179
179
  get text(): string;
180
180
  }
181
181
  declare class DocxTableRow {
@@ -197,9 +197,9 @@ declare class DocxTable {
197
197
  //#endregion
198
198
  //#region src/edit/docx/editor.d.ts
199
199
  interface DocxBody {
200
- insertParagraphAt(index: number, init?: ParagraphInit): DocxParagraph;
201
- appendParagraph(init?: ParagraphInit): DocxParagraph;
202
- appendTable(init: TableInit): DocxTable;
200
+ insertParagraphAt(index: number, init?: ParagraphInit$1): DocxParagraph;
201
+ appendParagraph(init?: ParagraphInit$1): DocxParagraph;
202
+ appendTable(init: TableInit$1): DocxTable;
203
203
  appendPageBreak(): void;
204
204
  }
205
205
  declare class DocxEditor {
@@ -299,6 +299,141 @@ declare function createPptx(): PptxEditor;
299
299
  //#region src/edit/pptx/content.d.ts
300
300
  declare function buildPptxPackage(content: ContentDocument): Package$1;
301
301
  //#endregion
302
+ //#region src/edit/odt/run.d.ts
303
+ interface RunInit {
304
+ readonly text?: string;
305
+ readonly bold?: boolean;
306
+ readonly italic?: boolean;
307
+ readonly underline?: boolean;
308
+ readonly fontFamily?: string;
309
+ readonly sizePt?: number;
310
+ readonly color?: LayoutColor;
311
+ }
312
+ declare class OdtRun {
313
+ private readonly container;
314
+ private readonly node;
315
+ private readonly pkg;
316
+ private removed;
317
+ constructor(container: XmlNode$2[], node: XmlElement$2, pkg: Package$2);
318
+ private live;
319
+ get text(): string;
320
+ set text(value: string);
321
+ get bold(): boolean;
322
+ set bold(value: boolean);
323
+ get italic(): boolean;
324
+ set italic(value: boolean);
325
+ get underline(): boolean;
326
+ set underline(value: boolean);
327
+ get fontFamily(): string | undefined;
328
+ set fontFamily(value: string);
329
+ get sizePt(): number | undefined;
330
+ set sizePt(value: number);
331
+ get color(): LayoutColor | undefined;
332
+ set color(value: LayoutColor);
333
+ remove(): void;
334
+ }
335
+ //#endregion
336
+ //#region src/edit/odt/paragraph.d.ts
337
+ interface ParagraphInit {
338
+ readonly text?: string;
339
+ readonly styleId?: string;
340
+ readonly alignment?: Alignment;
341
+ }
342
+ declare class OdtParagraph {
343
+ private readonly container;
344
+ private readonly node;
345
+ private readonly pkg;
346
+ private removed;
347
+ constructor(container: XmlNode$2[], node: XmlElement$2, pkg: Package$2);
348
+ private live;
349
+ get text(): string;
350
+ runs(): OdtRun[];
351
+ appendRun(init?: RunInit): OdtRun;
352
+ appendTab(): void;
353
+ insertRunAt(index: number, init?: RunInit): OdtRun;
354
+ get styleId(): string | undefined;
355
+ set styleId(value: string | undefined);
356
+ get alignment(): Alignment | undefined;
357
+ set alignment(value: Alignment | undefined);
358
+ remove(): void;
359
+ }
360
+ //#endregion
361
+ //#region src/edit/odt/list.d.ts
362
+ declare class OdtListItem {
363
+ private readonly node;
364
+ private readonly pkg;
365
+ constructor(node: XmlElement$2, pkg: Package$2);
366
+ appendParagraph(init?: ParagraphInit): OdtParagraph;
367
+ addNestedList(): OdtList;
368
+ }
369
+ declare class OdtList {
370
+ private readonly container;
371
+ private readonly node;
372
+ private readonly pkg;
373
+ private removed;
374
+ constructor(container: XmlNode$2[], node: XmlElement$2, pkg: Package$2);
375
+ private live;
376
+ items(): OdtListItem[];
377
+ addItem(): OdtListItem;
378
+ remove(): void;
379
+ }
380
+ //#endregion
381
+ //#region src/edit/odt/table.d.ts
382
+ interface TableInit {
383
+ readonly rows: number;
384
+ readonly columns: number;
385
+ readonly columnWidthsPt?: readonly number[];
386
+ }
387
+ declare class OdtTableCell {
388
+ private readonly node;
389
+ private readonly pkg;
390
+ constructor(node: XmlElement$2, pkg: Package$2);
391
+ paragraphs(): OdtParagraph[];
392
+ appendParagraph(init?: ParagraphInit): OdtParagraph;
393
+ get text(): string;
394
+ }
395
+ declare class OdtTableRow {
396
+ private readonly node;
397
+ private readonly pkg;
398
+ constructor(node: XmlElement$2, pkg: Package$2);
399
+ cells(): OdtTableCell[];
400
+ }
401
+ declare class OdtTable {
402
+ private readonly container;
403
+ private readonly node;
404
+ private readonly pkg;
405
+ private removed;
406
+ constructor(container: XmlNode$2[], node: XmlElement$2, pkg: Package$2);
407
+ private live;
408
+ rows(): OdtTableRow[];
409
+ cell(rowIndex: number, columnIndex: number): OdtTableCell;
410
+ appendRow(columnCount: number): OdtTableRow;
411
+ remove(): void;
412
+ }
413
+ //#endregion
414
+ //#region src/edit/odt/editor.d.ts
415
+ interface OdtBody {
416
+ appendParagraph(init?: ParagraphInit): OdtParagraph;
417
+ appendTable(init: TableInit): OdtTable;
418
+ appendList(): OdtList;
419
+ appendPageBreak(): void;
420
+ }
421
+ declare class OdtEditor {
422
+ readonly body: OdtBody;
423
+ private readonly pkg;
424
+ constructor(pkg: Package$2);
425
+ paragraphs(): OdtParagraph[];
426
+ tables(): OdtTable[];
427
+ lists(): OdtList[];
428
+ toPackage(): Package$2;
429
+ toBytes(): Uint8Array<ArrayBuffer>;
430
+ }
431
+ declare function openOdt(bytes: Uint8Array<ArrayBuffer>): OdtEditor;
432
+ declare function createOdt(): OdtEditor;
433
+ //#endregion
434
+ //#region src/edit/odt/content.d.ts
435
+ declare function buildOdtPackage(content: ContentDocument): Package$2;
436
+ //#endregion
302
437
  //#region src/pdf/diagnostics.d.ts
303
438
  type PdfDiagnosticSeverity = 'info' | 'warning';
304
439
  interface PdfDiagnostic {
@@ -579,4 +714,4 @@ declare function fixedClock(date: Date): ClockPort;
579
714
  //#region src/ports/abort.d.ts
580
715
  declare function throwIfAborted(signal: AbortSignal | undefined): void;
581
716
  //#endregion
582
- 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, OdtBytesSchema, 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, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, convertPresentationToLayout, convertWordprocessingToLayout, createDocx, createLocalDocumentConverter, createPptx, decodeCompactPackage, decodeEntities, decodePackage, docxPdfCodec, docxToPdf, elementsWithTag, encodeCompactPackage, encodePackage, fixedClock, flipY, fromCompact, isCompactXmlNode, isContentBlock, isXmlNode, odtToPdf, openDocx, openPptx, packageCodec, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToPptx, pptxPdfCodec, pptxToPdf, readDocxContent, readOdtContent, readPdf, readPptxContent, reconstructPresentation, reconstructWordprocessing, resolveRelationships, rgbHexToColor, rootElement, serializePackage, systemClock, textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xmlCodec, zipPackage };
717
+ 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, odtToPdf, openDocx, openOdt, openPptx, packageCodec, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToPptx, pptxPdfCodec, pptxToPdf, readDocxContent, readOdtContent, readPdf, readPptxContent, reconstructPresentation, reconstructWordprocessing, resolveRelationships, rgbHexToColor, rootElement, serializePackage, systemClock, textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xmlCodec, zipPackage };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
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
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";
3
3
  import { z } from "zod";
4
- import { Package as Package$2 } from "odf.js";
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
6
6
  declare const CONTENT_FORMAT_VERSION = 1;
7
7
  declare const ContentDocumentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -98,7 +98,7 @@ interface MediaContext {
98
98
  }
99
99
  //#endregion
100
100
  //#region src/edit/docx/run.d.ts
101
- interface RunInit {
101
+ interface RunInit$1 {
102
102
  readonly text?: string;
103
103
  readonly bold?: boolean;
104
104
  readonly italic?: boolean;
@@ -132,7 +132,7 @@ declare class DocxRun {
132
132
  }
133
133
  //#endregion
134
134
  //#region src/edit/docx/paragraph.d.ts
135
- interface ParagraphInit {
135
+ interface ParagraphInit$1 {
136
136
  readonly text?: string;
137
137
  readonly styleId?: string;
138
138
  readonly alignment?: 'left' | 'center' | 'right' | 'justify';
@@ -152,9 +152,9 @@ declare class DocxParagraph {
152
152
  private pPr;
153
153
  get text(): string;
154
154
  runs(): DocxRun[];
155
- appendRun(init?: RunInit): DocxRun;
155
+ appendRun(init?: RunInit$1): DocxRun;
156
156
  appendTab(): void;
157
- insertRunAt(index: number, init?: RunInit): DocxRun;
157
+ insertRunAt(index: number, init?: RunInit$1): DocxRun;
158
158
  get styleId(): string | undefined;
159
159
  set styleId(value: string | undefined);
160
160
  get alignment(): 'left' | 'center' | 'right' | 'justify' | undefined;
@@ -166,7 +166,7 @@ declare class DocxParagraph {
166
166
  }
167
167
  //#endregion
168
168
  //#region src/edit/docx/table.d.ts
169
- interface TableInit {
169
+ interface TableInit$1 {
170
170
  readonly rows: number;
171
171
  readonly columns: number;
172
172
  readonly columnWidthsTwips?: readonly number[];
@@ -175,7 +175,7 @@ declare class DocxTableCell {
175
175
  private readonly node;
176
176
  constructor(node: XmlElement$1);
177
177
  paragraphs(): DocxParagraph[];
178
- appendParagraph(init?: ParagraphInit): DocxParagraph;
178
+ appendParagraph(init?: ParagraphInit$1): DocxParagraph;
179
179
  get text(): string;
180
180
  }
181
181
  declare class DocxTableRow {
@@ -197,9 +197,9 @@ declare class DocxTable {
197
197
  //#endregion
198
198
  //#region src/edit/docx/editor.d.ts
199
199
  interface DocxBody {
200
- insertParagraphAt(index: number, init?: ParagraphInit): DocxParagraph;
201
- appendParagraph(init?: ParagraphInit): DocxParagraph;
202
- appendTable(init: TableInit): DocxTable;
200
+ insertParagraphAt(index: number, init?: ParagraphInit$1): DocxParagraph;
201
+ appendParagraph(init?: ParagraphInit$1): DocxParagraph;
202
+ appendTable(init: TableInit$1): DocxTable;
203
203
  appendPageBreak(): void;
204
204
  }
205
205
  declare class DocxEditor {
@@ -299,6 +299,141 @@ declare function createPptx(): PptxEditor;
299
299
  //#region src/edit/pptx/content.d.ts
300
300
  declare function buildPptxPackage(content: ContentDocument): Package$1;
301
301
  //#endregion
302
+ //#region src/edit/odt/run.d.ts
303
+ interface RunInit {
304
+ readonly text?: string;
305
+ readonly bold?: boolean;
306
+ readonly italic?: boolean;
307
+ readonly underline?: boolean;
308
+ readonly fontFamily?: string;
309
+ readonly sizePt?: number;
310
+ readonly color?: LayoutColor;
311
+ }
312
+ declare class OdtRun {
313
+ private readonly container;
314
+ private readonly node;
315
+ private readonly pkg;
316
+ private removed;
317
+ constructor(container: XmlNode$2[], node: XmlElement$2, pkg: Package$2);
318
+ private live;
319
+ get text(): string;
320
+ set text(value: string);
321
+ get bold(): boolean;
322
+ set bold(value: boolean);
323
+ get italic(): boolean;
324
+ set italic(value: boolean);
325
+ get underline(): boolean;
326
+ set underline(value: boolean);
327
+ get fontFamily(): string | undefined;
328
+ set fontFamily(value: string);
329
+ get sizePt(): number | undefined;
330
+ set sizePt(value: number);
331
+ get color(): LayoutColor | undefined;
332
+ set color(value: LayoutColor);
333
+ remove(): void;
334
+ }
335
+ //#endregion
336
+ //#region src/edit/odt/paragraph.d.ts
337
+ interface ParagraphInit {
338
+ readonly text?: string;
339
+ readonly styleId?: string;
340
+ readonly alignment?: Alignment;
341
+ }
342
+ declare class OdtParagraph {
343
+ private readonly container;
344
+ private readonly node;
345
+ private readonly pkg;
346
+ private removed;
347
+ constructor(container: XmlNode$2[], node: XmlElement$2, pkg: Package$2);
348
+ private live;
349
+ get text(): string;
350
+ runs(): OdtRun[];
351
+ appendRun(init?: RunInit): OdtRun;
352
+ appendTab(): void;
353
+ insertRunAt(index: number, init?: RunInit): OdtRun;
354
+ get styleId(): string | undefined;
355
+ set styleId(value: string | undefined);
356
+ get alignment(): Alignment | undefined;
357
+ set alignment(value: Alignment | undefined);
358
+ remove(): void;
359
+ }
360
+ //#endregion
361
+ //#region src/edit/odt/list.d.ts
362
+ declare class OdtListItem {
363
+ private readonly node;
364
+ private readonly pkg;
365
+ constructor(node: XmlElement$2, pkg: Package$2);
366
+ appendParagraph(init?: ParagraphInit): OdtParagraph;
367
+ addNestedList(): OdtList;
368
+ }
369
+ declare class OdtList {
370
+ private readonly container;
371
+ private readonly node;
372
+ private readonly pkg;
373
+ private removed;
374
+ constructor(container: XmlNode$2[], node: XmlElement$2, pkg: Package$2);
375
+ private live;
376
+ items(): OdtListItem[];
377
+ addItem(): OdtListItem;
378
+ remove(): void;
379
+ }
380
+ //#endregion
381
+ //#region src/edit/odt/table.d.ts
382
+ interface TableInit {
383
+ readonly rows: number;
384
+ readonly columns: number;
385
+ readonly columnWidthsPt?: readonly number[];
386
+ }
387
+ declare class OdtTableCell {
388
+ private readonly node;
389
+ private readonly pkg;
390
+ constructor(node: XmlElement$2, pkg: Package$2);
391
+ paragraphs(): OdtParagraph[];
392
+ appendParagraph(init?: ParagraphInit): OdtParagraph;
393
+ get text(): string;
394
+ }
395
+ declare class OdtTableRow {
396
+ private readonly node;
397
+ private readonly pkg;
398
+ constructor(node: XmlElement$2, pkg: Package$2);
399
+ cells(): OdtTableCell[];
400
+ }
401
+ declare class OdtTable {
402
+ private readonly container;
403
+ private readonly node;
404
+ private readonly pkg;
405
+ private removed;
406
+ constructor(container: XmlNode$2[], node: XmlElement$2, pkg: Package$2);
407
+ private live;
408
+ rows(): OdtTableRow[];
409
+ cell(rowIndex: number, columnIndex: number): OdtTableCell;
410
+ appendRow(columnCount: number): OdtTableRow;
411
+ remove(): void;
412
+ }
413
+ //#endregion
414
+ //#region src/edit/odt/editor.d.ts
415
+ interface OdtBody {
416
+ appendParagraph(init?: ParagraphInit): OdtParagraph;
417
+ appendTable(init: TableInit): OdtTable;
418
+ appendList(): OdtList;
419
+ appendPageBreak(): void;
420
+ }
421
+ declare class OdtEditor {
422
+ readonly body: OdtBody;
423
+ private readonly pkg;
424
+ constructor(pkg: Package$2);
425
+ paragraphs(): OdtParagraph[];
426
+ tables(): OdtTable[];
427
+ lists(): OdtList[];
428
+ toPackage(): Package$2;
429
+ toBytes(): Uint8Array<ArrayBuffer>;
430
+ }
431
+ declare function openOdt(bytes: Uint8Array<ArrayBuffer>): OdtEditor;
432
+ declare function createOdt(): OdtEditor;
433
+ //#endregion
434
+ //#region src/edit/odt/content.d.ts
435
+ declare function buildOdtPackage(content: ContentDocument): Package$2;
436
+ //#endregion
302
437
  //#region src/pdf/diagnostics.d.ts
303
438
  type PdfDiagnosticSeverity = 'info' | 'warning';
304
439
  interface PdfDiagnostic {
@@ -579,4 +714,4 @@ declare function fixedClock(date: Date): ClockPort;
579
714
  //#region src/ports/abort.d.ts
580
715
  declare function throwIfAborted(signal: AbortSignal | undefined): void;
581
716
  //#endregion
582
- 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, OdtBytesSchema, 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, buildPptxPackage, buildXml, bytesToBase64, childrenWithTag, compactCodec, compactPackageCodec, convertPresentationToLayout, convertWordprocessingToLayout, createDocx, createLocalDocumentConverter, createPptx, decodeCompactPackage, decodeEntities, decodePackage, docxPdfCodec, docxToPdf, elementsWithTag, encodeCompactPackage, encodePackage, fixedClock, flipY, fromCompact, isCompactXmlNode, isContentBlock, isXmlNode, odtToPdf, openDocx, openPptx, packageCodec, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToPptx, pptxPdfCodec, pptxToPdf, readDocxContent, readOdtContent, readPdf, readPptxContent, reconstructPresentation, reconstructWordprocessing, resolveRelationships, rgbHexToColor, rootElement, serializePackage, systemClock, textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xmlCodec, zipPackage };
717
+ 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, odtToPdf, openDocx, openOdt, openPptx, packageCodec, parsePackage, parseXml, pdfCodec, pdfToDocx, pdfToPptx, pptxPdfCodec, pptxToPdf, readDocxContent, readOdtContent, readPdf, readPptxContent, reconstructPresentation, reconstructWordprocessing, resolveRelationships, rgbHexToColor, rootElement, serializePackage, systemClock, textContent, throwIfAborted, toCompact, unzipPackage, walk, writePdf, xmlCodec, zipPackage };