documents.js 1.60.1 → 1.60.2

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.
Files changed (74) hide show
  1. package/README.md +4 -4
  2. package/dist/convert/convert.cjs +1 -2
  3. package/dist/convert/convert.js +2 -3
  4. package/dist/edit/docx/content.d.cts +1 -1
  5. package/dist/edit/docx/content.d.ts +1 -1
  6. package/dist/edit/odg/content.d.cts +1 -1
  7. package/dist/edit/odg/content.d.ts +1 -1
  8. package/dist/edit/odp/content.d.cts +1 -1
  9. package/dist/edit/odp/content.d.ts +1 -1
  10. package/dist/edit/ods/content.d.cts +1 -1
  11. package/dist/edit/ods/content.d.ts +1 -1
  12. package/dist/edit/odt/content.d.cts +1 -2
  13. package/dist/edit/odt/content.d.ts +1 -2
  14. package/dist/edit/pptx/content.d.cts +1 -1
  15. package/dist/edit/pptx/content.d.ts +1 -1
  16. package/dist/index.cjs +12 -3
  17. package/dist/index.d.cts +1 -2
  18. package/dist/index.d.ts +1 -2
  19. package/dist/index.js +1 -2
  20. package/dist/layout/drawing.d.cts +1 -2
  21. package/dist/layout/drawing.d.ts +1 -2
  22. package/dist/layout/engine.d.cts +1 -2
  23. package/dist/layout/engine.d.ts +1 -2
  24. package/dist/layout/reconstruct.cjs +5 -5
  25. package/dist/layout/reconstruct.d.cts +1 -2
  26. package/dist/layout/reconstruct.d.ts +1 -2
  27. package/dist/layout/reconstruct.js +5 -5
  28. package/dist/layout/sheets.d.cts +1 -2
  29. package/dist/layout/sheets.d.ts +1 -2
  30. package/dist/layout/slides.d.cts +1 -2
  31. package/dist/layout/slides.d.ts +1 -2
  32. package/dist/markdown/read.cjs +1 -7
  33. package/dist/markdown/read.d.cts +1 -1
  34. package/dist/markdown/read.d.ts +1 -1
  35. package/dist/markdown/read.js +1 -7
  36. package/dist/markdown/write.d.cts +1 -1
  37. package/dist/markdown/write.d.ts +1 -1
  38. package/dist/odb/spreadsheet.cjs +1 -2
  39. package/dist/odb/spreadsheet.d.cts +1 -1
  40. package/dist/odb/spreadsheet.d.ts +1 -1
  41. package/dist/odb/spreadsheet.js +2 -2
  42. package/dist/odf/formula/placeholder.cjs +1 -2
  43. package/dist/odf/formula/placeholder.d.cts +4 -4
  44. package/dist/odf/formula/placeholder.d.ts +4 -4
  45. package/dist/odf/formula/placeholder.js +2 -2
  46. package/dist/odf/odg/read.cjs +2 -2
  47. package/dist/odf/odg/read.d.cts +1 -1
  48. package/dist/odf/odg/read.d.ts +1 -1
  49. package/dist/odf/odg/read.js +2 -2
  50. package/dist/odf/odp/read.cjs +2 -2
  51. package/dist/odf/odp/read.d.cts +1 -1
  52. package/dist/odf/odp/read.d.ts +1 -1
  53. package/dist/odf/odp/read.js +2 -2
  54. package/dist/odf/ods/read.cjs +2 -2
  55. package/dist/odf/ods/read.d.cts +1 -1
  56. package/dist/odf/ods/read.d.ts +1 -1
  57. package/dist/odf/ods/read.js +2 -2
  58. package/dist/odf/odt/read.cjs +2 -2
  59. package/dist/odf/odt/read.d.cts +1 -1
  60. package/dist/odf/odt/read.d.ts +1 -1
  61. package/dist/odf/odt/read.js +2 -2
  62. package/dist/ooxml/docx/read.cjs +2 -2
  63. package/dist/ooxml/docx/read.d.cts +1 -1
  64. package/dist/ooxml/docx/read.d.ts +1 -1
  65. package/dist/ooxml/docx/read.js +2 -2
  66. package/dist/ooxml/pptx/read.cjs +2 -2
  67. package/dist/ooxml/pptx/read.d.cts +1 -1
  68. package/dist/ooxml/pptx/read.d.ts +1 -1
  69. package/dist/ooxml/pptx/read.js +2 -2
  70. package/package.json +1 -1
  71. package/dist/model/content.cjs +0 -34
  72. package/dist/model/content.d.cts +0 -362
  73. package/dist/model/content.d.ts +0 -362
  74. package/dist/model/content.js +0 -32
@@ -1,4 +1,4 @@
1
- import { ContentDocument } from "../model/content.cjs";
1
+ import { ContentDocument } from "document-schema.js";
2
2
  import { WriteMarkdownOptions } from "markdown-codec";
3
3
  //#region src/markdown/write.d.ts
4
4
  declare function buildMarkdownText(document: ContentDocument, options?: WriteMarkdownOptions): string;
@@ -1,4 +1,4 @@
1
- import { ContentDocument } from "../model/content.js";
1
+ import { ContentDocument } from "document-schema.js";
2
2
  import { WriteMarkdownOptions } from "markdown-codec";
3
3
  //#region src/markdown/write.d.ts
4
4
  declare function buildMarkdownText(document: ContentDocument, options?: WriteMarkdownOptions): string;
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../model/content.cjs");
3
2
  const require_hsqldb_script = require("../hsqldb/script.cjs");
4
3
  let document_schema_js = require("document-schema.js");
5
4
  //#region src/odb/spreadsheet.ts
@@ -59,7 +58,7 @@ function tableToSheet(table) {
59
58
  function odbTablesToSpreadsheetDocument(tables) {
60
59
  return {
61
60
  kind: "spreadsheet",
62
- formatVersion: 1,
61
+ formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
63
62
  metadata: {},
64
63
  sheets: tables.map(tableToSheet)
65
64
  };
@@ -1,5 +1,5 @@
1
- import { ContentDocument } from "../model/content.cjs";
2
1
  import { HsqldbTable } from "../hsqldb/script.cjs";
2
+ import { ContentDocument } from "document-schema.js";
3
3
  //#region src/odb/spreadsheet.d.ts
4
4
  declare function odbTablesToSpreadsheetDocument(tables: readonly HsqldbTable[]): ContentDocument;
5
5
  //#endregion
@@ -1,5 +1,5 @@
1
- import { ContentDocument } from "../model/content.js";
2
1
  import { HsqldbTable } from "../hsqldb/script.js";
2
+ import { ContentDocument } from "document-schema.js";
3
3
  //#region src/odb/spreadsheet.d.ts
4
4
  declare function odbTablesToSpreadsheetDocument(tables: readonly HsqldbTable[]): ContentDocument;
5
5
  //#endregion
@@ -1,6 +1,6 @@
1
- import "../model/content.js";
2
1
  import { PAGE_SIZE_A4 } from "../model/geometry.js";
3
2
  import { displayTextFor } from "../hsqldb/script.js";
3
+ import { CONTENT_FORMAT_VERSION } from "document-schema.js";
4
4
  //#region src/odb/spreadsheet.ts
5
5
  const HEADER_ROW_INDEX = 0;
6
6
  const COLUMN_WIDTH_PT = 64;
@@ -58,7 +58,7 @@ function tableToSheet(table) {
58
58
  function odbTablesToSpreadsheetDocument(tables) {
59
59
  return {
60
60
  kind: "spreadsheet",
61
- formatVersion: 1,
61
+ formatVersion: CONTENT_FORMAT_VERSION,
62
62
  metadata: {},
63
63
  sheets: tables.map(tableToSheet)
64
64
  };
@@ -1,5 +1,4 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../../model/content.cjs");
3
2
  let document_schema_js = require("document-schema.js");
4
3
  //#region src/odf/formula/placeholder.ts
5
4
  const ZERO_MARGINS = {
@@ -12,7 +11,7 @@ function placeholderFormulaDocument(formula) {
12
11
  const text = formula.starMath ?? "[formula]";
13
12
  return {
14
13
  kind: "wordprocessing",
15
- formatVersion: 1,
14
+ formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
16
15
  metadata: {},
17
16
  sections: [{
18
17
  pageSize: document_schema_js.PAGE_SIZE_A4,
@@ -1,14 +1,14 @@
1
- import { ContentDocument } from "../../model/content.cjs";
2
- import { t as Box } from "../../geometry-DvwdrIij.cjs";
1
+ import { t as Box$1 } from "../../geometry-DvwdrIij.cjs";
3
2
  import { EmbeddedFormula } from "../../model/formula.cjs";
3
+ import { ContentDocument } from "document-schema.js";
4
4
  //#region src/odf/formula/placeholder.d.ts
5
5
  interface FormulaPlaceholderBlock {
6
6
  readonly kind: 'embeddedObject';
7
7
  readonly objectKind: 'formula';
8
8
  readonly document: ContentDocument;
9
- readonly frame: Box;
9
+ readonly frame: Box$1;
10
10
  readonly sourcePath: string;
11
11
  }
12
- declare function buildFormulaPlaceholderBlock(formula: EmbeddedFormula, frame: Box, sourcePath: string): FormulaPlaceholderBlock;
12
+ declare function buildFormulaPlaceholderBlock(formula: EmbeddedFormula, frame: Box$1, sourcePath: string): FormulaPlaceholderBlock;
13
13
  //#endregion
14
14
  export { FormulaPlaceholderBlock, buildFormulaPlaceholderBlock };
@@ -1,14 +1,14 @@
1
- import { ContentDocument } from "../../model/content.js";
2
- import { t as Box } from "../../geometry-DvwdrIij.js";
1
+ import { t as Box$1 } from "../../geometry-DvwdrIij.js";
3
2
  import { EmbeddedFormula } from "../../model/formula.js";
3
+ import { ContentDocument } from "document-schema.js";
4
4
  //#region src/odf/formula/placeholder.d.ts
5
5
  interface FormulaPlaceholderBlock {
6
6
  readonly kind: 'embeddedObject';
7
7
  readonly objectKind: 'formula';
8
8
  readonly document: ContentDocument;
9
- readonly frame: Box;
9
+ readonly frame: Box$1;
10
10
  readonly sourcePath: string;
11
11
  }
12
- declare function buildFormulaPlaceholderBlock(formula: EmbeddedFormula, frame: Box, sourcePath: string): FormulaPlaceholderBlock;
12
+ declare function buildFormulaPlaceholderBlock(formula: EmbeddedFormula, frame: Box$1, sourcePath: string): FormulaPlaceholderBlock;
13
13
  //#endregion
14
14
  export { FormulaPlaceholderBlock, buildFormulaPlaceholderBlock };
@@ -1,5 +1,5 @@
1
- import "../../model/content.js";
2
1
  import { PAGE_SIZE_A4 } from "../../model/geometry.js";
2
+ import { CONTENT_FORMAT_VERSION } from "document-schema.js";
3
3
  //#region src/odf/formula/placeholder.ts
4
4
  const ZERO_MARGINS = {
5
5
  topPt: 0,
@@ -11,7 +11,7 @@ function placeholderFormulaDocument(formula) {
11
11
  const text = formula.starMath ?? "[formula]";
12
12
  return {
13
13
  kind: "wordprocessing",
14
- formatVersion: 1,
14
+ formatVersion: CONTENT_FORMAT_VERSION,
15
15
  metadata: {},
16
16
  sections: [{
17
17
  pageSize: PAGE_SIZE_A4,
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../../model/content.cjs");
2
+ let document_schema_js = require("document-schema.js");
3
3
  let odf_js = require("odf.js");
4
4
  //#region src/odf/odg/read.ts
5
5
  function readOdgContent(pkg) {
6
6
  const odgDoc = (0, odf_js.readOdg)(pkg);
7
7
  return {
8
8
  kind: "drawing",
9
- formatVersion: 1,
9
+ formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
10
10
  metadata: { ...odgDoc.metadata },
11
11
  pages: odgDoc.pages
12
12
  };
@@ -1,4 +1,4 @@
1
- import { ContentDocument } from "../../model/content.cjs";
1
+ import { ContentDocument } from "document-schema.js";
2
2
  import { Package } from "odf.js";
3
3
  //#region src/odf/odg/read.d.ts
4
4
  declare function readOdgContent(pkg: Package): ContentDocument;
@@ -1,4 +1,4 @@
1
- import { ContentDocument } from "../../model/content.js";
1
+ import { ContentDocument } from "document-schema.js";
2
2
  import { Package } from "odf.js";
3
3
  //#region src/odf/odg/read.d.ts
4
4
  declare function readOdgContent(pkg: Package): ContentDocument;
@@ -1,11 +1,11 @@
1
- import "../../model/content.js";
1
+ import { CONTENT_FORMAT_VERSION } from "document-schema.js";
2
2
  import { readOdg } from "odf.js";
3
3
  //#region src/odf/odg/read.ts
4
4
  function readOdgContent(pkg) {
5
5
  const odgDoc = readOdg(pkg);
6
6
  return {
7
7
  kind: "drawing",
8
- formatVersion: 1,
8
+ formatVersion: CONTENT_FORMAT_VERSION,
9
9
  metadata: { ...odgDoc.metadata },
10
10
  pages: odgDoc.pages
11
11
  };
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../../model/content.cjs");
3
2
  const require_odf_formula_detect = require("../formula/detect.cjs");
4
3
  const require_odf_formula_placeholder = require("../formula/placeholder.cjs");
4
+ let document_schema_js = require("document-schema.js");
5
5
  let odf_js = require("odf.js");
6
6
  //#region src/odf/odp/read.ts
7
7
  function readOdpContent(pkg) {
@@ -34,7 +34,7 @@ function readOdpContent(pkg) {
34
34
  return {
35
35
  document: {
36
36
  kind: "presentation",
37
- formatVersion: 1,
37
+ formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
38
38
  metadata: { ...odpDoc.metadata },
39
39
  slides: odpDoc.slides
40
40
  },
@@ -1,5 +1,5 @@
1
- import { ContentDocument } from "../../model/content.cjs";
2
1
  import { EmbeddedFormula } from "../../model/formula.cjs";
2
+ import { ContentDocument } from "document-schema.js";
3
3
  import { Package } from "odf.js";
4
4
  //#region src/odf/odp/read.d.ts
5
5
  interface OdpContentResult {
@@ -1,5 +1,5 @@
1
- import { ContentDocument } from "../../model/content.js";
2
1
  import { EmbeddedFormula } from "../../model/formula.js";
2
+ import { ContentDocument } from "document-schema.js";
3
3
  import { Package } from "odf.js";
4
4
  //#region src/odf/odp/read.d.ts
5
5
  interface OdpContentResult {
@@ -1,6 +1,6 @@
1
- import "../../model/content.js";
2
1
  import { detectEmbeddedFormulaFrames } from "../formula/detect.js";
3
2
  import { buildFormulaPlaceholderBlock } from "../formula/placeholder.js";
3
+ import { CONTENT_FORMAT_VERSION } from "document-schema.js";
4
4
  import { childrenWithTag, findChildElement, readOdp, rootElement } from "odf.js";
5
5
  //#region src/odf/odp/read.ts
6
6
  function readOdpContent(pkg) {
@@ -33,7 +33,7 @@ function readOdpContent(pkg) {
33
33
  return {
34
34
  document: {
35
35
  kind: "presentation",
36
- formatVersion: 1,
36
+ formatVersion: CONTENT_FORMAT_VERSION,
37
37
  metadata: { ...odpDoc.metadata },
38
38
  slides: odpDoc.slides
39
39
  },
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../../model/content.cjs");
2
+ let document_schema_js = require("document-schema.js");
3
3
  let odf_js = require("odf.js");
4
4
  //#region src/odf/ods/read.ts
5
5
  function readOdsContent(pkg) {
6
6
  const odsDoc = (0, odf_js.readOds)(pkg);
7
7
  return {
8
8
  kind: "spreadsheet",
9
- formatVersion: 1,
9
+ formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
10
10
  metadata: { ...odsDoc.metadata },
11
11
  sheets: odsDoc.sheets
12
12
  };
@@ -1,4 +1,4 @@
1
- import { ContentDocument } from "../../model/content.cjs";
1
+ import { ContentDocument } from "document-schema.js";
2
2
  import { Package } from "odf.js";
3
3
  //#region src/odf/ods/read.d.ts
4
4
  declare function readOdsContent(pkg: Package): ContentDocument;
@@ -1,4 +1,4 @@
1
- import { ContentDocument } from "../../model/content.js";
1
+ import { ContentDocument } from "document-schema.js";
2
2
  import { Package } from "odf.js";
3
3
  //#region src/odf/ods/read.d.ts
4
4
  declare function readOdsContent(pkg: Package): ContentDocument;
@@ -1,11 +1,11 @@
1
- import "../../model/content.js";
1
+ import { CONTENT_FORMAT_VERSION } from "document-schema.js";
2
2
  import { readOds } from "odf.js";
3
3
  //#region src/odf/ods/read.ts
4
4
  function readOdsContent(pkg) {
5
5
  const odsDoc = readOds(pkg);
6
6
  return {
7
7
  kind: "spreadsheet",
8
- formatVersion: 1,
8
+ formatVersion: CONTENT_FORMAT_VERSION,
9
9
  metadata: { ...odsDoc.metadata },
10
10
  sheets: odsDoc.sheets
11
11
  };
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../../model/content.cjs");
3
2
  const require_odf_formula_detect = require("../formula/detect.cjs");
4
3
  const require_odf_formula_placeholder = require("../formula/placeholder.cjs");
4
+ let document_schema_js = require("document-schema.js");
5
5
  let odf_js = require("odf.js");
6
6
  //#region src/odf/odt/read.ts
7
7
  function readOdtContent(pkg) {
@@ -32,7 +32,7 @@ function readOdtContent(pkg) {
32
32
  return {
33
33
  document: {
34
34
  kind: "wordprocessing",
35
- formatVersion: 1,
35
+ formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
36
36
  metadata: { ...odtDoc.metadata },
37
37
  sections: odtDoc.sections
38
38
  },
@@ -1,5 +1,5 @@
1
- import { ContentDocument } from "../../model/content.cjs";
2
1
  import { EmbeddedFormula } from "../../model/formula.cjs";
2
+ import { ContentDocument } from "document-schema.js";
3
3
  import { Package } from "odf.js";
4
4
  //#region src/odf/odt/read.d.ts
5
5
  interface OdtContentResult {
@@ -1,5 +1,5 @@
1
- import { ContentDocument } from "../../model/content.js";
2
1
  import { EmbeddedFormula } from "../../model/formula.js";
2
+ import { ContentDocument } from "document-schema.js";
3
3
  import { Package } from "odf.js";
4
4
  //#region src/odf/odt/read.d.ts
5
5
  interface OdtContentResult {
@@ -1,6 +1,6 @@
1
- import "../../model/content.js";
2
1
  import { detectEmbeddedFormulaFrames } from "../formula/detect.js";
3
2
  import { buildFormulaPlaceholderBlock } from "../formula/placeholder.js";
3
+ import { CONTENT_FORMAT_VERSION } from "document-schema.js";
4
4
  import { findChildElement, readOdt, rootElement } from "odf.js";
5
5
  //#region src/odf/odt/read.ts
6
6
  function readOdtContent(pkg) {
@@ -31,7 +31,7 @@ function readOdtContent(pkg) {
31
31
  return {
32
32
  document: {
33
33
  kind: "wordprocessing",
34
- formatVersion: 1,
34
+ formatVersion: CONTENT_FORMAT_VERSION,
35
35
  metadata: { ...odtDoc.metadata },
36
36
  sections: odtDoc.sections
37
37
  },
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../../model/content.cjs");
3
2
  let ooxml_js = require("ooxml.js");
3
+ let document_schema_js = require("document-schema.js");
4
4
  //#region src/ooxml/docx/read.ts
5
5
  function readDocxContent(pkg) {
6
6
  const docxDoc = (0, ooxml_js.readDocx)(pkg);
7
7
  return {
8
8
  kind: "wordprocessing",
9
- formatVersion: 1,
9
+ formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
10
10
  metadata: { ...docxDoc.metadata },
11
11
  sections: docxDoc.sections
12
12
  };
@@ -1,4 +1,4 @@
1
- import { ContentDocument } from "../../model/content.cjs";
1
+ import { ContentDocument } from "document-schema.js";
2
2
  import { Package } from "ooxml.js";
3
3
  //#region src/ooxml/docx/read.d.ts
4
4
  declare function readDocxContent(pkg: Package): ContentDocument;
@@ -1,5 +1,5 @@
1
- import { ContentDocument } from "../../model/content.js";
2
1
  import { Package } from "ooxml.js";
2
+ import { ContentDocument } from "document-schema.js";
3
3
  //#region src/ooxml/docx/read.d.ts
4
4
  declare function readDocxContent(pkg: Package): ContentDocument;
5
5
  //#endregion
@@ -1,11 +1,11 @@
1
- import "../../model/content.js";
2
1
  import { readDocx } from "ooxml.js";
2
+ import { CONTENT_FORMAT_VERSION } from "document-schema.js";
3
3
  //#region src/ooxml/docx/read.ts
4
4
  function readDocxContent(pkg) {
5
5
  const docxDoc = readDocx(pkg);
6
6
  return {
7
7
  kind: "wordprocessing",
8
- formatVersion: 1,
8
+ formatVersion: CONTENT_FORMAT_VERSION,
9
9
  metadata: { ...docxDoc.metadata },
10
10
  sections: docxDoc.sections
11
11
  };
@@ -1,12 +1,12 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- require("../../model/content.cjs");
3
2
  let ooxml_js = require("ooxml.js");
3
+ let document_schema_js = require("document-schema.js");
4
4
  //#region src/ooxml/pptx/read.ts
5
5
  function readPptxContent(pkg) {
6
6
  const pptxDoc = (0, ooxml_js.readPptx)(pkg);
7
7
  return {
8
8
  kind: "presentation",
9
- formatVersion: 1,
9
+ formatVersion: document_schema_js.CONTENT_FORMAT_VERSION,
10
10
  metadata: { ...pptxDoc.metadata },
11
11
  slides: pptxDoc.slides
12
12
  };
@@ -1,4 +1,4 @@
1
- import { ContentDocument } from "../../model/content.cjs";
1
+ import { ContentDocument } from "document-schema.js";
2
2
  import { Package } from "ooxml.js";
3
3
  //#region src/ooxml/pptx/read.d.ts
4
4
  declare function readPptxContent(pkg: Package): ContentDocument;
@@ -1,5 +1,5 @@
1
- import { ContentDocument } from "../../model/content.js";
2
1
  import { Package } from "ooxml.js";
2
+ import { ContentDocument } from "document-schema.js";
3
3
  //#region src/ooxml/pptx/read.d.ts
4
4
  declare function readPptxContent(pkg: Package): ContentDocument;
5
5
  //#endregion
@@ -1,11 +1,11 @@
1
- import "../../model/content.js";
2
1
  import { readPptx } from "ooxml.js";
2
+ import { CONTENT_FORMAT_VERSION } from "document-schema.js";
3
3
  //#region src/ooxml/pptx/read.ts
4
4
  function readPptxContent(pkg) {
5
5
  const pptxDoc = readPptx(pkg);
6
6
  return {
7
7
  kind: "presentation",
8
- formatVersion: 1,
8
+ formatVersion: CONTENT_FORMAT_VERSION,
9
9
  metadata: { ...pptxDoc.metadata },
10
10
  slides: pptxDoc.slides
11
11
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "documents.js",
3
- "version": "1.60.1",
3
+ "version": "1.60.2",
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": {
@@ -1,34 +0,0 @@
1
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- let document_schema_js = require("document-schema.js");
3
- let zod = require("zod");
4
- //#region src/model/content.ts
5
- const CONTENT_FORMAT_VERSION = 1;
6
- const ContentDocumentSchema = zod.z.discriminatedUnion("kind", [
7
- zod.z.object({
8
- kind: zod.z.literal("wordprocessing"),
9
- formatVersion: zod.z.literal(1),
10
- metadata: document_schema_js.LayoutMetadataSchema,
11
- sections: zod.z.array(document_schema_js.ContentSectionSchema)
12
- }),
13
- zod.z.object({
14
- kind: zod.z.literal("presentation"),
15
- formatVersion: zod.z.literal(1),
16
- metadata: document_schema_js.LayoutMetadataSchema,
17
- slides: zod.z.array(document_schema_js.ContentSlideSchema)
18
- }),
19
- zod.z.object({
20
- kind: zod.z.literal("spreadsheet"),
21
- formatVersion: zod.z.literal(1),
22
- metadata: document_schema_js.LayoutMetadataSchema,
23
- sheets: zod.z.array(document_schema_js.ContentSheetSchema)
24
- }),
25
- zod.z.object({
26
- kind: zod.z.literal("drawing"),
27
- formatVersion: zod.z.literal(1),
28
- metadata: document_schema_js.LayoutMetadataSchema,
29
- pages: zod.z.array(document_schema_js.ContentDrawPageSchema)
30
- })
31
- ]);
32
- //#endregion
33
- exports.CONTENT_FORMAT_VERSION = CONTENT_FORMAT_VERSION;
34
- exports.ContentDocumentSchema = ContentDocumentSchema;