js.documents 1.99.78 → 1.100.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.
Files changed (41) hide show
  1. package/dist/convert/composition.cjs +2 -2
  2. package/dist/convert/composition.js +2 -2
  3. package/dist/edit/odp/content.cjs +12 -0
  4. package/dist/edit/odp/content.js +12 -0
  5. package/dist/edit/odp/formula.cjs +20 -0
  6. package/dist/edit/odp/formula.d.cts +7 -0
  7. package/dist/edit/odp/formula.d.ts +7 -0
  8. package/dist/edit/odp/formula.js +18 -0
  9. package/dist/edit/odp/slide.cjs +7 -0
  10. package/dist/edit/odp/slide.d.cts +2 -1
  11. package/dist/edit/odp/slide.d.ts +2 -1
  12. package/dist/edit/odp/slide.js +7 -0
  13. package/dist/edit/pptx/content.cjs +16 -2
  14. package/dist/edit/pptx/content.d.cts +2 -0
  15. package/dist/edit/pptx/content.d.ts +2 -0
  16. package/dist/edit/pptx/content.js +16 -2
  17. package/dist/edit/pptx/shape.cjs +20 -0
  18. package/dist/edit/pptx/shape.d.cts +1 -1
  19. package/dist/edit/pptx/shape.d.ts +1 -1
  20. package/dist/edit/pptx/shape.js +20 -0
  21. package/dist/edit/pptx/slide.d.cts +2 -2
  22. package/dist/edit/pptx/slide.d.ts +2 -2
  23. package/dist/edit/pptx/table.d.cts +1 -1
  24. package/dist/edit/pptx/table.d.ts +1 -1
  25. package/dist/formula-BKgIMfhi.d.ts +10 -0
  26. package/dist/formula-Cs0IexVi.d.cts +10 -0
  27. package/dist/index.d.cts +2 -2
  28. package/dist/index.d.ts +2 -2
  29. package/dist/ooxml/pptx/formula.cjs +64 -0
  30. package/dist/ooxml/pptx/formula.d.cts +2 -0
  31. package/dist/ooxml/pptx/formula.d.ts +2 -0
  32. package/dist/ooxml/pptx/formula.js +63 -0
  33. package/dist/ooxml/pptx/read.cjs +5 -2
  34. package/dist/ooxml/pptx/read.d.cts +6 -2
  35. package/dist/ooxml/pptx/read.d.ts +6 -2
  36. package/dist/ooxml/pptx/read.js +5 -2
  37. package/dist/{shape-D-gBLpxJ.d.ts → shape-CaG-RPiz.d.cts} +6 -1
  38. package/dist/{shape-C5istyRr.d.cts → shape-DyIjuKE9.d.ts} +6 -1
  39. package/dist/{table-BavK-2uP.d.ts → table-CTeOe_vm.d.ts} +1 -1
  40. package/dist/{table-DWY7P_sA.d.cts → table-DH0lJRVv.d.cts} +1 -1
  41. package/package.json +2 -2
@@ -55,8 +55,8 @@ const FORMAT_NODES = {
55
55
  variant: "presentation",
56
56
  family: "ooxml",
57
57
  decode: (bytes) => (0, ooxml_js.decodePackage)(bytes),
58
- read: (pkg) => require_ooxml_pptx_read.readPptxContent(pkg),
59
- build: (content) => require_edit_pptx_content.buildPptxPackage(content),
58
+ read: (pkg, options) => require_ooxml_pptx_read.readPptxContent(pkg, { onMathDiagnostic: options?.onMathDiagnostic }),
59
+ build: (content, options) => require_edit_pptx_content.buildPptxPackage(content, { onMathDiagnostic: options?.onMathDiagnostic }),
60
60
  encode: (pkg) => (0, ooxml_js.encodePackage)(pkg),
61
61
  hasSourcePackage: true
62
62
  },
@@ -54,8 +54,8 @@ const FORMAT_NODES = {
54
54
  variant: "presentation",
55
55
  family: "ooxml",
56
56
  decode: (bytes) => decodePackage(bytes),
57
- read: (pkg) => readPptxContent(pkg),
58
- build: (content) => buildPptxPackage(content),
57
+ read: (pkg, options) => readPptxContent(pkg, { onMathDiagnostic: options?.onMathDiagnostic }),
58
+ build: (content, options) => buildPptxPackage(content, { onMathDiagnostic: options?.onMathDiagnostic }),
59
59
  encode: (pkg) => encodePackage(pkg),
60
60
  hasSourcePackage: true
61
61
  },
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_model_metadata = require("../../model/metadata.cjs");
3
3
  const require_ports_clock = require("../../ports/clock.cjs");
4
4
  const require_model_embedded_drawing = require("../../model/embedded-drawing.cjs");
5
+ const require_model_formula = require("../../model/formula.cjs");
5
6
  const require_edit_odt_content = require("../odt/content.cjs");
6
7
  const require_edit_odp_scaffold = require("./scaffold.cjs");
7
8
  const require_edit_odp_editor = require("./editor.cjs");
@@ -27,6 +28,17 @@ function appendShape(slide, shape) {
27
28
  for (const vector of require_model_embedded_drawing.embeddedDrawingVectors(onlyBlock, shape.frame)) slide.addVector(vector);
28
29
  return;
29
30
  }
31
+ if (shape.blocks.length === 1 && onlyBlock?.kind === "embeddedObject") {
32
+ const formula = require_model_formula.formulaOfBlock(onlyBlock);
33
+ if (formula !== void 0) {
34
+ if (formula.mathml.length === 0) slide.addTextBox({
35
+ frame: shape.frame,
36
+ text: require_model_formula.formulaPlaceholderText(formula)
37
+ });
38
+ else slide.addFormula(shape.frame, formula);
39
+ return;
40
+ }
41
+ }
30
42
  if (shape.blocks.length === 1 && onlyBlock?.kind === "image") {
31
43
  const imageShape = slide.addImage({
32
44
  frame: shape.frame,
@@ -1,6 +1,7 @@
1
1
  import { resolveMetadataTimestamps } from "../../model/metadata.js";
2
2
  import { systemClock } from "../../ports/clock.js";
3
3
  import { drawingOfBlock, embeddedDrawingVectors } from "../../model/embedded-drawing.js";
4
+ import { formulaOfBlock, formulaPlaceholderText } from "../../model/formula.js";
4
5
  import { populateOdtTable, populateParagraph } from "../odt/content.js";
5
6
  import { createEmptyOdpPackage } from "./scaffold.js";
6
7
  import { OdpEditor } from "./editor.js";
@@ -26,6 +27,17 @@ function appendShape(slide, shape) {
26
27
  for (const vector of embeddedDrawingVectors(onlyBlock, shape.frame)) slide.addVector(vector);
27
28
  return;
28
29
  }
30
+ if (shape.blocks.length === 1 && onlyBlock?.kind === "embeddedObject") {
31
+ const formula = formulaOfBlock(onlyBlock);
32
+ if (formula !== void 0) {
33
+ if (formula.mathml.length === 0) slide.addTextBox({
34
+ frame: shape.frame,
35
+ text: formulaPlaceholderText(formula)
36
+ });
37
+ else slide.addFormula(shape.frame, formula);
38
+ return;
39
+ }
40
+ }
29
41
  if (shape.blocks.length === 1 && onlyBlock?.kind === "image") {
30
42
  const imageShape = slide.addImage({
31
43
  frame: shape.frame,
@@ -0,0 +1,20 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_xml_fragment = require("../../xml/fragment.cjs");
3
+ const require_odf_package_formula = require("../../odf-package/formula.cjs");
4
+ let odf_js = require("odf.js");
5
+ //#region src/edit/odp/formula.ts
6
+ function buildFormulaFrame(href, frame) {
7
+ return require_xml_fragment.el("draw:frame", {
8
+ "svg:x": (0, odf_js.formatOdfLength)(frame.xPt),
9
+ "svg:y": (0, odf_js.formatOdfLength)(frame.yPt),
10
+ "svg:width": (0, odf_js.formatOdfLength)(frame.widthPt),
11
+ "svg:height": (0, odf_js.formatOdfLength)(frame.heightPt)
12
+ }, [require_xml_fragment.el("draw:object", { "xlink:href": href })]);
13
+ }
14
+ function insertFormulaFrameMedia(pkg, frame, formula) {
15
+ const { href } = require_odf_package_formula.addFormulaObject(pkg, formula);
16
+ return buildFormulaFrame(href, frame);
17
+ }
18
+ //#endregion
19
+ exports.buildFormulaFrame = buildFormulaFrame;
20
+ exports.insertFormulaFrameMedia = insertFormulaFrameMedia;
@@ -0,0 +1,7 @@
1
+ import { Box, ContentFormula } from "document-schema.js";
2
+ import { Package, XmlElement } from "odf.js";
3
+ //#region src/edit/odp/formula.d.ts
4
+ declare function buildFormulaFrame(href: string, frame: Box): XmlElement;
5
+ declare function insertFormulaFrameMedia(pkg: Package, frame: Box, formula: ContentFormula): XmlElement;
6
+ //#endregion
7
+ export { buildFormulaFrame, insertFormulaFrameMedia };
@@ -0,0 +1,7 @@
1
+ import { Box, ContentFormula } from "document-schema.js";
2
+ import { Package, XmlElement } from "odf.js";
3
+ //#region src/edit/odp/formula.d.ts
4
+ declare function buildFormulaFrame(href: string, frame: Box): XmlElement;
5
+ declare function insertFormulaFrameMedia(pkg: Package, frame: Box, formula: ContentFormula): XmlElement;
6
+ //#endregion
7
+ export { buildFormulaFrame, insertFormulaFrameMedia };
@@ -0,0 +1,18 @@
1
+ import { el } from "../../xml/fragment.js";
2
+ import { addFormulaObject } from "../../odf-package/formula.js";
3
+ import { formatOdfLength } from "odf.js";
4
+ //#region src/edit/odp/formula.ts
5
+ function buildFormulaFrame(href, frame) {
6
+ return el("draw:frame", {
7
+ "svg:x": formatOdfLength(frame.xPt),
8
+ "svg:y": formatOdfLength(frame.yPt),
9
+ "svg:width": formatOdfLength(frame.widthPt),
10
+ "svg:height": formatOdfLength(frame.heightPt)
11
+ }, [el("draw:object", { "xlink:href": href })]);
12
+ }
13
+ function insertFormulaFrameMedia(pkg, frame, formula) {
14
+ const { href } = addFormulaObject(pkg, formula);
15
+ return buildFormulaFrame(href, frame);
16
+ }
17
+ //#endregion
18
+ export { buildFormulaFrame, insertFormulaFrameMedia };
@@ -5,6 +5,7 @@ const require_edit_odg_vector = require("../odg/vector.cjs");
5
5
  const require_xml_odf_text = require("../../xml/odf-text.cjs");
6
6
  const require_edit_odt_paragraph = require("../odt/paragraph.cjs");
7
7
  const require_edit_odt_table = require("../odt/table.cjs");
8
+ const require_edit_odp_formula = require("./formula.cjs");
8
9
  const require_edit_odp_shape = require("./shape.cjs");
9
10
  const require_edit_odp_image = require("./image.cjs");
10
11
  let ooxml_js = require("ooxml.js");
@@ -61,6 +62,12 @@ var OdpSlide = class {
61
62
  node.children.push(frameElement);
62
63
  return new require_edit_odp_shape.OdpShape(node.children, frameElement, this.context.pkg);
63
64
  }
65
+ addFormula(frame, formula) {
66
+ const node = this.live();
67
+ const frameElement = require_edit_odp_formula.insertFormulaFrameMedia(this.context.pkg, frame, formula);
68
+ node.children.push(frameElement);
69
+ return new require_edit_odp_shape.OdpShape(node.children, frameElement, this.context.pkg);
70
+ }
64
71
  addTable(init) {
65
72
  const node = this.live();
66
73
  const tableElement = require_edit_odt_table.buildTable(this.context.pkg, init.table);
@@ -2,7 +2,7 @@ import { t as ImageInit } from "../../image-3ql9_z1y.cjs";
2
2
  import { t as OdpShape } from "../../shape-Cuk0RTZn.cjs";
3
3
  import { s as OdgVector } from "../../vector-D03KX8Ux.cjs";
4
4
  import { a as TableInit, n as OdtTable } from "../../table-b9-ipGtZ.cjs";
5
- import { Box, ContentVector } from "document-schema.js";
5
+ import { Box, ContentFormula, ContentVector } from "document-schema.js";
6
6
  import { Package, XmlElement, XmlNode } from "odf.js";
7
7
  //#region src/edit/odp/slide.d.ts
8
8
  interface TextBoxInit {
@@ -33,6 +33,7 @@ declare class OdpSlide {
33
33
  shapes(): OdpShape[];
34
34
  addTextBox(init: TextBoxInit): OdpShape;
35
35
  addImage(init: SlideImageInit): OdpShape;
36
+ addFormula(frame: Box, formula: ContentFormula): OdpShape;
36
37
  addTable(init: SlideTableInit): OdpTableShape;
37
38
  tables(): OdpTableShape[];
38
39
  addVector(vector: ContentVector): OdgVector;
@@ -2,7 +2,7 @@ import { t as ImageInit } from "../../image-3ql9_z1y.js";
2
2
  import { t as OdpShape } from "../../shape-CCPBGhbV.js";
3
3
  import { s as OdgVector } from "../../vector-D03KX8Ux.js";
4
4
  import { a as TableInit, n as OdtTable } from "../../table-Dtml8NyR.js";
5
- import { Box, ContentVector } from "document-schema.js";
5
+ import { Box, ContentFormula, ContentVector } from "document-schema.js";
6
6
  import { Package, XmlElement, XmlNode } from "odf.js";
7
7
  //#region src/edit/odp/slide.d.ts
8
8
  interface TextBoxInit {
@@ -33,6 +33,7 @@ declare class OdpSlide {
33
33
  shapes(): OdpShape[];
34
34
  addTextBox(init: TextBoxInit): OdpShape;
35
35
  addImage(init: SlideImageInit): OdpShape;
36
+ addFormula(frame: Box, formula: ContentFormula): OdpShape;
36
37
  addTable(init: SlideTableInit): OdpTableShape;
37
38
  tables(): OdpTableShape[];
38
39
  addVector(vector: ContentVector): OdgVector;
@@ -4,6 +4,7 @@ import { appendVectorTo } from "../odg/vector.js";
4
4
  import { decodeOdfText as decodeOdfText$1 } from "../../xml/odf-text.js";
5
5
  import { buildParagraph } from "../odt/paragraph.js";
6
6
  import { OdtTable, buildTable } from "../odt/table.js";
7
+ import { insertFormulaFrameMedia } from "./formula.js";
7
8
  import { OdpShape, buildTableFrame, buildTextBoxFrame } from "./shape.js";
8
9
  import { insertImageFrameMedia } from "./image.js";
9
10
  import { elementsWithTag } from "ooxml.js";
@@ -60,6 +61,12 @@ var OdpSlide = class {
60
61
  node.children.push(frameElement);
61
62
  return new OdpShape(node.children, frameElement, this.context.pkg);
62
63
  }
64
+ addFormula(frame, formula) {
65
+ const node = this.live();
66
+ const frameElement = insertFormulaFrameMedia(this.context.pkg, frame, formula);
67
+ node.children.push(frameElement);
68
+ return new OdpShape(node.children, frameElement, this.context.pkg);
69
+ }
63
70
  addTable(init) {
64
71
  const node = this.live();
65
72
  const tableElement = buildTable(this.context.pkg, init.table);
@@ -2,6 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_model_metadata = require("../../model/metadata.cjs");
3
3
  const require_ports_clock = require("../../ports/clock.cjs");
4
4
  const require_model_embedded_drawing = require("../../model/embedded-drawing.cjs");
5
+ const require_model_formula = require("../../model/formula.cjs");
5
6
  const require_edit_pptx_scaffold = require("./scaffold.cjs");
6
7
  const require_edit_pptx_editor = require("./editor.cjs");
7
8
  let ooxml_js = require("ooxml.js");
@@ -15,17 +16,30 @@ function buildPptxPackage(content, options) {
15
16
  if (firstSlide !== void 0) editor.slideSize = firstSlide.size;
16
17
  for (const slide of content.slides) {
17
18
  const pptxSlide = editor.addSlide();
18
- for (const shape of slide.shapes) appendShape(pptxSlide, shape);
19
+ for (const shape of slide.shapes) appendShape(pptxSlide, shape, options);
19
20
  if (slide.notes.length > 0) pptxSlide.notes = slide.notes;
20
21
  }
21
22
  return editor.toPackage();
22
23
  }
23
- function appendShape(slide, shape) {
24
+ function appendShape(slide, shape, options) {
24
25
  const [onlyBlock] = shape.blocks;
25
26
  if (shape.blocks.length === 1 && onlyBlock?.kind === "embeddedObject" && require_model_embedded_drawing.drawingOfBlock(onlyBlock) !== void 0) {
26
27
  for (const vector of require_model_embedded_drawing.embeddedDrawingVectors(onlyBlock, shape.frame)) slide.addVector(vector);
27
28
  return;
28
29
  }
30
+ if (shape.blocks.length === 1 && onlyBlock?.kind === "embeddedObject") {
31
+ const formula = require_model_formula.formulaOfBlock(onlyBlock);
32
+ if (formula !== void 0) {
33
+ const textShape = slide.addTextBox({
34
+ frame: shape.frame,
35
+ text: ""
36
+ });
37
+ const { written, diagnostics } = textShape.appendOfficeMath(formula.mathml);
38
+ for (const diagnostic of diagnostics) options?.onMathDiagnostic?.(diagnostic, { sourcePath: onlyBlock.sourcePath });
39
+ if (!written) textShape.setParagraphs([{ runs: [{ text: require_model_formula.formulaPlaceholderText(formula) }] }]);
40
+ return;
41
+ }
42
+ }
29
43
  if (shape.blocks.length === 1 && onlyBlock?.kind === "image") {
30
44
  const imageShape = slide.addImage({
31
45
  frame: shape.frame,
@@ -1,9 +1,11 @@
1
1
  import { t as ClockPort } from "../../clock-C7SUuYN0.cjs";
2
+ import { t as OmmlDiagnosticSink } from "../../formula-Cs0IexVi.cjs";
2
3
  import { ContentDocument } from "document-schema.js";
3
4
  import { Package } from "ooxml.js";
4
5
  //#region src/edit/pptx/content.d.ts
5
6
  interface BuildPptxPackageOptions {
6
7
  readonly clock?: ClockPort;
8
+ readonly onMathDiagnostic?: OmmlDiagnosticSink;
7
9
  }
8
10
  declare function buildPptxPackage(content: ContentDocument, options?: BuildPptxPackageOptions): Package;
9
11
  //#endregion
@@ -1,9 +1,11 @@
1
1
  import { t as ClockPort } from "../../clock-C7SUuYN0.js";
2
+ import { t as OmmlDiagnosticSink } from "../../formula-BKgIMfhi.js";
2
3
  import { Package } from "ooxml.js";
3
4
  import { ContentDocument } from "document-schema.js";
4
5
  //#region src/edit/pptx/content.d.ts
5
6
  interface BuildPptxPackageOptions {
6
7
  readonly clock?: ClockPort;
8
+ readonly onMathDiagnostic?: OmmlDiagnosticSink;
7
9
  }
8
10
  declare function buildPptxPackage(content: ContentDocument, options?: BuildPptxPackageOptions): Package;
9
11
  //#endregion
@@ -1,6 +1,7 @@
1
1
  import { resolveMetadataTimestamps } from "../../model/metadata.js";
2
2
  import { systemClock } from "../../ports/clock.js";
3
3
  import { drawingOfBlock, embeddedDrawingVectors } from "../../model/embedded-drawing.js";
4
+ import { formulaOfBlock, formulaPlaceholderText } from "../../model/formula.js";
4
5
  import { createEmptyPptxPackage } from "./scaffold.js";
5
6
  import { PptxEditor } from "./editor.js";
6
7
  import { base64ToBytes } from "ooxml.js";
@@ -14,17 +15,30 @@ function buildPptxPackage(content, options) {
14
15
  if (firstSlide !== void 0) editor.slideSize = firstSlide.size;
15
16
  for (const slide of content.slides) {
16
17
  const pptxSlide = editor.addSlide();
17
- for (const shape of slide.shapes) appendShape(pptxSlide, shape);
18
+ for (const shape of slide.shapes) appendShape(pptxSlide, shape, options);
18
19
  if (slide.notes.length > 0) pptxSlide.notes = slide.notes;
19
20
  }
20
21
  return editor.toPackage();
21
22
  }
22
- function appendShape(slide, shape) {
23
+ function appendShape(slide, shape, options) {
23
24
  const [onlyBlock] = shape.blocks;
24
25
  if (shape.blocks.length === 1 && onlyBlock?.kind === "embeddedObject" && drawingOfBlock(onlyBlock) !== void 0) {
25
26
  for (const vector of embeddedDrawingVectors(onlyBlock, shape.frame)) slide.addVector(vector);
26
27
  return;
27
28
  }
29
+ if (shape.blocks.length === 1 && onlyBlock?.kind === "embeddedObject") {
30
+ const formula = formulaOfBlock(onlyBlock);
31
+ if (formula !== void 0) {
32
+ const textShape = slide.addTextBox({
33
+ frame: shape.frame,
34
+ text: ""
35
+ });
36
+ const { written, diagnostics } = textShape.appendOfficeMath(formula.mathml);
37
+ for (const diagnostic of diagnostics) options?.onMathDiagnostic?.(diagnostic, { sourcePath: onlyBlock.sourcePath });
38
+ if (!written) textShape.setParagraphs([{ runs: [{ text: formulaPlaceholderText(formula) }] }]);
39
+ return;
40
+ }
41
+ }
28
42
  if (shape.blocks.length === 1 && onlyBlock?.kind === "image") {
29
43
  const imageShape = slide.addImage({
30
44
  frame: shape.frame,
@@ -1,6 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_xml_fragment = require("../../xml/fragment.cjs");
3
3
  const require_xml_entities = require("../../xml/entities.cjs");
4
+ const require_omml_write = require("../../omml/write.cjs");
4
5
  const require_model_units = require("../../model/units.cjs");
5
6
  const require_xml_edit = require("../../xml/edit.cjs");
6
7
  const require_edit_drawingml_vector = require("../drawingml/vector.cjs");
@@ -194,6 +195,25 @@ var PptxShape = class {
194
195
  const nonParagraphChildren = txBody.children.filter((c) => !(c.type === "element" && c.tag === "a:p"));
195
196
  txBody.children = [...nonParagraphChildren, ...paragraphs.map(buildDrawingParagraph)];
196
197
  }
198
+ appendOfficeMath(mathml) {
199
+ const result = require_omml_write.buildOfficeMathParagraph(mathml);
200
+ if (result.element === void 0) return {
201
+ ...result,
202
+ written: false
203
+ };
204
+ const node = this.live();
205
+ let txBody = directChild(node, "p:txBody");
206
+ if (txBody === void 0) {
207
+ txBody = require_xml_fragment.el("p:txBody", {}, [require_xml_fragment.el("a:bodyPr"), require_xml_fragment.el("a:lstStyle")]);
208
+ node.children.push(txBody);
209
+ }
210
+ const nonParagraphChildren = txBody.children.filter((c) => !(c.type === "element" && c.tag === "a:p"));
211
+ txBody.children = [...nonParagraphChildren, require_xml_fragment.el("a:p", {}, [result.element])];
212
+ return {
213
+ ...result,
214
+ written: true
215
+ };
216
+ }
197
217
  remove() {
198
218
  require_xml_edit.removeChild(this.container, this.live());
199
219
  this.removed = true;
@@ -1,2 +1,2 @@
1
- import { a as buildDrawingParagraph, i as ROTATION_UNITS_PER_DEGREE, n as DrawingRunInit, o as buildPictureShape, r as PptxShape, s as buildTextBoxShape, t as DrawingParagraphInit } from "../../shape-C5istyRr.cjs";
1
+ import { a as buildDrawingParagraph, i as ROTATION_UNITS_PER_DEGREE, n as DrawingRunInit, o as buildPictureShape, r as PptxShape, s as buildTextBoxShape, t as DrawingParagraphInit } from "../../shape-CaG-RPiz.cjs";
2
2
  export { DrawingParagraphInit, DrawingRunInit, PptxShape, ROTATION_UNITS_PER_DEGREE, buildDrawingParagraph, buildPictureShape, buildTextBoxShape };
@@ -1,2 +1,2 @@
1
- import { a as buildDrawingParagraph, i as ROTATION_UNITS_PER_DEGREE, n as DrawingRunInit, o as buildPictureShape, r as PptxShape, s as buildTextBoxShape, t as DrawingParagraphInit } from "../../shape-D-gBLpxJ.js";
1
+ import { a as buildDrawingParagraph, i as ROTATION_UNITS_PER_DEGREE, n as DrawingRunInit, o as buildPictureShape, r as PptxShape, s as buildTextBoxShape, t as DrawingParagraphInit } from "../../shape-DyIjuKE9.js";
2
2
  export { DrawingParagraphInit, DrawingRunInit, PptxShape, ROTATION_UNITS_PER_DEGREE, buildDrawingParagraph, buildPictureShape, buildTextBoxShape };
@@ -1,5 +1,6 @@
1
1
  import { el, txt } from "../../xml/fragment.js";
2
2
  import { encodeXmlText, needsSpacePreserve } from "../../xml/entities.js";
3
+ import { buildOfficeMathParagraph } from "../../omml/write.js";
3
4
  import { emuToPt, ptToEmu } from "../../model/units.js";
4
5
  import { removeAttr, removeChild, setAttr } from "../../xml/edit.js";
5
6
  import { drawingMlColorHex } from "../drawingml/vector.js";
@@ -193,6 +194,25 @@ var PptxShape = class {
193
194
  const nonParagraphChildren = txBody.children.filter((c) => !(c.type === "element" && c.tag === "a:p"));
194
195
  txBody.children = [...nonParagraphChildren, ...paragraphs.map(buildDrawingParagraph)];
195
196
  }
197
+ appendOfficeMath(mathml) {
198
+ const result = buildOfficeMathParagraph(mathml);
199
+ if (result.element === void 0) return {
200
+ ...result,
201
+ written: false
202
+ };
203
+ const node = this.live();
204
+ let txBody = directChild(node, "p:txBody");
205
+ if (txBody === void 0) {
206
+ txBody = el("p:txBody", {}, [el("a:bodyPr"), el("a:lstStyle")]);
207
+ node.children.push(txBody);
208
+ }
209
+ const nonParagraphChildren = txBody.children.filter((c) => !(c.type === "element" && c.tag === "a:p"));
210
+ txBody.children = [...nonParagraphChildren, el("a:p", {}, [result.element])];
211
+ return {
212
+ ...result,
213
+ written: true
214
+ };
215
+ }
196
216
  remove() {
197
217
  removeChild(this.container, this.live());
198
218
  this.removed = true;
@@ -1,6 +1,6 @@
1
1
  import { t as ImageInit } from "../../image-CRgc_j2Q.cjs";
2
- import { r as PptxShape } from "../../shape-C5istyRr.cjs";
3
- import { r as PptxTableInit, t as PptxTable } from "../../table-DWY7P_sA.cjs";
2
+ import { r as PptxShape } from "../../shape-CaG-RPiz.cjs";
3
+ import { r as PptxTableInit, t as PptxTable } from "../../table-DH0lJRVv.cjs";
4
4
  import { Box, ContentVector } from "document-schema.js";
5
5
  import { Package, XmlElement, XmlNode } from "ooxml.js";
6
6
  //#region src/edit/pptx/slide.d.ts
@@ -1,6 +1,6 @@
1
1
  import { t as ImageInit } from "../../image-CyYr22TE.js";
2
- import { r as PptxShape } from "../../shape-D-gBLpxJ.js";
3
- import { r as PptxTableInit, t as PptxTable } from "../../table-BavK-2uP.js";
2
+ import { r as PptxShape } from "../../shape-DyIjuKE9.js";
3
+ import { r as PptxTableInit, t as PptxTable } from "../../table-CTeOe_vm.js";
4
4
  import { Package, XmlElement, XmlNode } from "ooxml.js";
5
5
  import { Box, ContentVector } from "document-schema.js";
6
6
  //#region src/edit/pptx/slide.d.ts
@@ -1,2 +1,2 @@
1
- import { a as buildDrawingTable, i as PptxTableRow, n as PptxTableCell, o as buildTableGraphicFrame, r as PptxTableInit, s as findGraphicFrameTable, t as PptxTable } from "../../table-DWY7P_sA.cjs";
1
+ import { a as buildDrawingTable, i as PptxTableRow, n as PptxTableCell, o as buildTableGraphicFrame, r as PptxTableInit, s as findGraphicFrameTable, t as PptxTable } from "../../table-DH0lJRVv.cjs";
2
2
  export { PptxTable, PptxTableCell, PptxTableInit, PptxTableRow, buildDrawingTable, buildTableGraphicFrame, findGraphicFrameTable };
@@ -1,2 +1,2 @@
1
- import { a as buildDrawingTable, i as PptxTableRow, n as PptxTableCell, o as buildTableGraphicFrame, r as PptxTableInit, s as findGraphicFrameTable, t as PptxTable } from "../../table-BavK-2uP.js";
1
+ import { a as buildDrawingTable, i as PptxTableRow, n as PptxTableCell, o as buildTableGraphicFrame, r as PptxTableInit, s as findGraphicFrameTable, t as PptxTable } from "../../table-CTeOe_vm.js";
2
2
  export { PptxTable, PptxTableCell, PptxTableInit, PptxTableRow, buildDrawingTable, buildTableGraphicFrame, findGraphicFrameTable };
@@ -0,0 +1,10 @@
1
+ import { t as OmmlDiagnostic } from "./shared-DUOzjwcL.js";
2
+ import { XmlNode } from "ooxml.js";
3
+ import { ContentSlide } from "document-schema.js";
4
+ //#region src/ooxml/pptx/formula.d.ts
5
+ type OmmlDiagnosticSink = (diagnostic: OmmlDiagnostic, context: {
6
+ readonly sourcePath?: string;
7
+ }) => void;
8
+ declare function spliceSlideFormulas(slide: ContentSlide, slideIndex: number, spTreeChildren: readonly XmlNode[], onMathDiagnostic?: OmmlDiagnosticSink): ContentSlide;
9
+ //#endregion
10
+ export { spliceSlideFormulas as n, OmmlDiagnosticSink as t };
@@ -0,0 +1,10 @@
1
+ import { t as OmmlDiagnostic } from "./shared-DLZ3IQUl.cjs";
2
+ import { ContentSlide } from "document-schema.js";
3
+ import { XmlNode } from "ooxml.js";
4
+ //#region src/ooxml/pptx/formula.d.ts
5
+ type OmmlDiagnosticSink = (diagnostic: OmmlDiagnostic, context: {
6
+ readonly sourcePath?: string;
7
+ }) => void;
8
+ declare function spliceSlideFormulas(slide: ContentSlide, slideIndex: number, spTreeChildren: readonly XmlNode[], onMathDiagnostic?: OmmlDiagnosticSink): ContentSlide;
9
+ //#endregion
10
+ export { spliceSlideFormulas as n, OmmlDiagnosticSink as t };
package/dist/index.d.cts CHANGED
@@ -49,8 +49,8 @@ import { a as PdfItem, c as PdfLinkInit, d as PdfPathItem, f as PdfRectInit, h a
49
49
  import { PageInit, PdfPage } from "./edit/pdf/page.cjs";
50
50
  import { CreatePdfOptions, PdfEditor, createPdf, openPdf } from "./edit/pdf/editor.cjs";
51
51
  import { BuildPptxPackageOptions, buildPptxPackage } from "./edit/pptx/content.cjs";
52
- import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-C5istyRr.cjs";
53
- import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-DWY7P_sA.cjs";
52
+ import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-CaG-RPiz.cjs";
53
+ import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-DH0lJRVv.cjs";
54
54
  import { PptxSlide, SlideImageInit as SlideImageInit$1, SlideTableInit as SlideTableInit$1, TextBoxInit as TextBoxInit$2 } from "./edit/pptx/slide.cjs";
55
55
  import { CreatePptxOptions, PptxEditor, createPptx, openPptx } from "./edit/pptx/editor.cjs";
56
56
  import { CreateEmptyPptxPackageOptions } from "./edit/pptx/scaffold.cjs";
package/dist/index.d.ts CHANGED
@@ -49,8 +49,8 @@ import { a as PdfItem, c as PdfLinkInit, d as PdfPathItem, f as PdfRectInit, h a
49
49
  import { PageInit, PdfPage } from "./edit/pdf/page.js";
50
50
  import { CreatePdfOptions, PdfEditor, createPdf, openPdf } from "./edit/pdf/editor.js";
51
51
  import { BuildPptxPackageOptions, buildPptxPackage } from "./edit/pptx/content.js";
52
- import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-D-gBLpxJ.js";
53
- import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-BavK-2uP.js";
52
+ import { n as DrawingRunInit, r as PptxShape, t as DrawingParagraphInit } from "./shape-DyIjuKE9.js";
53
+ import { i as PptxTableRow, n as PptxTableCell, r as PptxTableInit, t as PptxTable } from "./table-CTeOe_vm.js";
54
54
  import { PptxSlide, SlideImageInit as SlideImageInit$1, SlideTableInit as SlideTableInit$1, TextBoxInit as TextBoxInit$2 } from "./edit/pptx/slide.js";
55
55
  import { CreatePptxOptions, PptxEditor, createPptx, openPptx } from "./edit/pptx/editor.js";
56
56
  import { CreateEmptyPptxPackageOptions } from "./edit/pptx/scaffold.js";
@@ -0,0 +1,64 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_model_formula = require("../../model/formula.cjs");
3
+ const require_omml_read = require("../../omml/read.cjs");
4
+ let ooxml_js = require("ooxml.js");
5
+ //#region src/ooxml/pptx/formula.ts
6
+ function formulaOnlyEquation(shape) {
7
+ const txBody = (0, ooxml_js.childrenWithTag)(shape, "p:txBody")[0];
8
+ if (txBody === void 0) return;
9
+ const paragraphs = (0, ooxml_js.childrenWithTag)(txBody, "a:p");
10
+ if (paragraphs.length !== 1) return;
11
+ const [paragraph] = paragraphs;
12
+ const mathParas = (0, ooxml_js.childrenWithTag)(paragraph, "m:oMathPara");
13
+ if (mathParas.length !== 1) return;
14
+ const [mathPara] = mathParas;
15
+ for (const child of paragraph.children) {
16
+ if (child.type === "text") {
17
+ if (child.value.trim().length > 0) return;
18
+ continue;
19
+ }
20
+ if (child.type !== "element" || child.tag === "a:pPr" || child === mathPara) continue;
21
+ return;
22
+ }
23
+ return mathPara;
24
+ }
25
+ function collectFormulaShapes(children, state, out) {
26
+ for (const node of children) {
27
+ if (node.type !== "element") continue;
28
+ if (node.tag === "p:sp") {
29
+ const shapeIndex = state.shapeIndex;
30
+ state.shapeIndex += 1;
31
+ const equation = formulaOnlyEquation(node);
32
+ if (equation !== void 0) out.push({
33
+ shapeIndex,
34
+ equation
35
+ });
36
+ } else if (node.tag === "p:pic" || node.tag === "p:graphicFrame") state.shapeIndex += 1;
37
+ else if (node.tag === "p:grpSp") collectFormulaShapes(node.children, state, out);
38
+ }
39
+ }
40
+ function spliceSlideFormulas(slide, slideIndex, spTreeChildren, onMathDiagnostic) {
41
+ const state = { shapeIndex: 0 };
42
+ const found = [];
43
+ collectFormulaShapes(spTreeChildren, state, found);
44
+ if (found.length === 0) return slide;
45
+ const shapes = [...slide.shapes];
46
+ for (const { shapeIndex, equation } of found) {
47
+ const shape = shapes[shapeIndex];
48
+ if (shape === void 0) continue;
49
+ const sourcePath = `slides[${slideIndex}].shapes[${shapeIndex}]`;
50
+ const { mathml, diagnostics } = require_omml_read.readOfficeMath(equation);
51
+ for (const diagnostic of diagnostics) onMathDiagnostic?.(diagnostic, { sourcePath });
52
+ if (mathml.length === 0) continue;
53
+ shapes[shapeIndex] = {
54
+ ...shape,
55
+ blocks: [require_model_formula.buildFormulaBlock({ mathml }, shape.frame, sourcePath)]
56
+ };
57
+ }
58
+ return {
59
+ ...slide,
60
+ shapes
61
+ };
62
+ }
63
+ //#endregion
64
+ exports.spliceSlideFormulas = spliceSlideFormulas;
@@ -0,0 +1,2 @@
1
+ import { n as spliceSlideFormulas, t as OmmlDiagnosticSink } from "../../formula-Cs0IexVi.cjs";
2
+ export { OmmlDiagnosticSink, spliceSlideFormulas };
@@ -0,0 +1,2 @@
1
+ import { n as spliceSlideFormulas, t as OmmlDiagnosticSink } from "../../formula-BKgIMfhi.js";
2
+ export { OmmlDiagnosticSink, spliceSlideFormulas };
@@ -0,0 +1,63 @@
1
+ import { buildFormulaBlock } from "../../model/formula.js";
2
+ import { readOfficeMath } from "../../omml/read.js";
3
+ import { childrenWithTag } from "ooxml.js";
4
+ //#region src/ooxml/pptx/formula.ts
5
+ function formulaOnlyEquation(shape) {
6
+ const txBody = childrenWithTag(shape, "p:txBody")[0];
7
+ if (txBody === void 0) return;
8
+ const paragraphs = childrenWithTag(txBody, "a:p");
9
+ if (paragraphs.length !== 1) return;
10
+ const [paragraph] = paragraphs;
11
+ const mathParas = childrenWithTag(paragraph, "m:oMathPara");
12
+ if (mathParas.length !== 1) return;
13
+ const [mathPara] = mathParas;
14
+ for (const child of paragraph.children) {
15
+ if (child.type === "text") {
16
+ if (child.value.trim().length > 0) return;
17
+ continue;
18
+ }
19
+ if (child.type !== "element" || child.tag === "a:pPr" || child === mathPara) continue;
20
+ return;
21
+ }
22
+ return mathPara;
23
+ }
24
+ function collectFormulaShapes(children, state, out) {
25
+ for (const node of children) {
26
+ if (node.type !== "element") continue;
27
+ if (node.tag === "p:sp") {
28
+ const shapeIndex = state.shapeIndex;
29
+ state.shapeIndex += 1;
30
+ const equation = formulaOnlyEquation(node);
31
+ if (equation !== void 0) out.push({
32
+ shapeIndex,
33
+ equation
34
+ });
35
+ } else if (node.tag === "p:pic" || node.tag === "p:graphicFrame") state.shapeIndex += 1;
36
+ else if (node.tag === "p:grpSp") collectFormulaShapes(node.children, state, out);
37
+ }
38
+ }
39
+ function spliceSlideFormulas(slide, slideIndex, spTreeChildren, onMathDiagnostic) {
40
+ const state = { shapeIndex: 0 };
41
+ const found = [];
42
+ collectFormulaShapes(spTreeChildren, state, found);
43
+ if (found.length === 0) return slide;
44
+ const shapes = [...slide.shapes];
45
+ for (const { shapeIndex, equation } of found) {
46
+ const shape = shapes[shapeIndex];
47
+ if (shape === void 0) continue;
48
+ const sourcePath = `slides[${slideIndex}].shapes[${shapeIndex}]`;
49
+ const { mathml, diagnostics } = readOfficeMath(equation);
50
+ for (const diagnostic of diagnostics) onMathDiagnostic?.(diagnostic, { sourcePath });
51
+ if (mathml.length === 0) continue;
52
+ shapes[shapeIndex] = {
53
+ ...shape,
54
+ blocks: [buildFormulaBlock({ mathml }, shape.frame, sourcePath)]
55
+ };
56
+ }
57
+ return {
58
+ ...slide,
59
+ shapes
60
+ };
61
+ }
62
+ //#endregion
63
+ export { spliceSlideFormulas };
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_ooxml_pptx_formula = require("./formula.cjs");
2
3
  const require_ooxml_pptx_vector = require("./vector.cjs");
3
4
  let ooxml_js = require("ooxml.js");
4
5
  let document_schema_js = require("document-schema.js");
@@ -18,7 +19,7 @@ function slidePathsInOrder(pkg) {
18
19
  }
19
20
  return paths;
20
21
  }
21
- function readPptxContent(pkg) {
22
+ function readPptxContent(pkg, options) {
22
23
  const pptxDoc = (0, ooxml_js.readPptx)(pkg);
23
24
  const slidePaths = slidePathsInOrder(pkg);
24
25
  const slides = pptxDoc.slides.map((slide, slideIndex) => {
@@ -26,7 +27,9 @@ function readPptxContent(pkg) {
26
27
  const slideRoot = slidePath === void 0 ? void 0 : (0, ooxml_js.rootElement)(pkg.parts[slidePath]);
27
28
  const cSld = slideRoot === void 0 ? void 0 : (0, ooxml_js.childrenWithTag)(slideRoot, "p:cSld")[0];
28
29
  const spTree = cSld === void 0 ? void 0 : (0, ooxml_js.childrenWithTag)(cSld, "p:spTree")[0];
29
- return spTree === void 0 ? slide : require_ooxml_pptx_vector.collapseVectorShapeRuns(slide, slideIndex, spTree.children);
30
+ if (spTree === void 0) return slide;
31
+ const withFormulas = require_ooxml_pptx_formula.spliceSlideFormulas(slide, slideIndex, spTree.children, options?.onMathDiagnostic);
32
+ return require_ooxml_pptx_vector.collapseVectorShapeRuns(withFormulas, slideIndex, spTree.children);
30
33
  });
31
34
  return {
32
35
  kind: "presentation",
@@ -1,6 +1,10 @@
1
+ import { t as OmmlDiagnosticSink } from "../../formula-Cs0IexVi.cjs";
1
2
  import { ContentDocument } from "document-schema.js";
2
3
  import { Package } from "ooxml.js";
3
4
  //#region src/ooxml/pptx/read.d.ts
4
- declare function readPptxContent(pkg: Package): ContentDocument;
5
+ interface ReadPptxContentOptions {
6
+ readonly onMathDiagnostic?: OmmlDiagnosticSink;
7
+ }
8
+ declare function readPptxContent(pkg: Package, options?: ReadPptxContentOptions): ContentDocument;
5
9
  //#endregion
6
- export { readPptxContent };
10
+ export { ReadPptxContentOptions, readPptxContent };
@@ -1,6 +1,10 @@
1
+ import { t as OmmlDiagnosticSink } from "../../formula-BKgIMfhi.js";
1
2
  import { Package } from "ooxml.js";
2
3
  import { ContentDocument } from "document-schema.js";
3
4
  //#region src/ooxml/pptx/read.d.ts
4
- declare function readPptxContent(pkg: Package): ContentDocument;
5
+ interface ReadPptxContentOptions {
6
+ readonly onMathDiagnostic?: OmmlDiagnosticSink;
7
+ }
8
+ declare function readPptxContent(pkg: Package, options?: ReadPptxContentOptions): ContentDocument;
5
9
  //#endregion
6
- export { readPptxContent };
10
+ export { ReadPptxContentOptions, readPptxContent };
@@ -1,3 +1,4 @@
1
+ import { spliceSlideFormulas } from "./formula.js";
1
2
  import { collapseVectorShapeRuns } from "./vector.js";
2
3
  import { attr, childrenWithTag, readPptx, resolveRelationships, rootElement } from "ooxml.js";
3
4
  import { CONTENT_FORMAT_VERSION } from "document-schema.js";
@@ -17,7 +18,7 @@ function slidePathsInOrder(pkg) {
17
18
  }
18
19
  return paths;
19
20
  }
20
- function readPptxContent(pkg) {
21
+ function readPptxContent(pkg, options) {
21
22
  const pptxDoc = readPptx(pkg);
22
23
  const slidePaths = slidePathsInOrder(pkg);
23
24
  const slides = pptxDoc.slides.map((slide, slideIndex) => {
@@ -25,7 +26,9 @@ function readPptxContent(pkg) {
25
26
  const slideRoot = slidePath === void 0 ? void 0 : rootElement(pkg.parts[slidePath]);
26
27
  const cSld = slideRoot === void 0 ? void 0 : childrenWithTag(slideRoot, "p:cSld")[0];
27
28
  const spTree = cSld === void 0 ? void 0 : childrenWithTag(cSld, "p:spTree")[0];
28
- return spTree === void 0 ? slide : collapseVectorShapeRuns(slide, slideIndex, spTree.children);
29
+ if (spTree === void 0) return slide;
30
+ const withFormulas = spliceSlideFormulas(slide, slideIndex, spTree.children, options?.onMathDiagnostic);
31
+ return collapseVectorShapeRuns(withFormulas, slideIndex, spTree.children);
29
32
  });
30
33
  return {
31
34
  kind: "presentation",
@@ -1,5 +1,7 @@
1
- import { XmlElement, XmlNode } from "ooxml.js";
1
+ import { r as MathMlNode$1 } from "./nodes-pArN9ilm.cjs";
2
+ import { t as OmmlWriteResult } from "./write-BQ6SK8r8.cjs";
2
3
  import { Alignment, Box, Color } from "document-schema.js";
4
+ import { XmlElement, XmlNode } from "ooxml.js";
3
5
  //#region src/edit/pptx/shape.d.ts
4
6
  declare const ROTATION_UNITS_PER_DEGREE = 60000;
5
7
  declare class PptxShape {
@@ -30,6 +32,9 @@ declare class PptxShape {
30
32
  get text(): string;
31
33
  set text(value: string);
32
34
  setParagraphs(paragraphs: readonly DrawingParagraphInit[]): void;
35
+ appendOfficeMath(mathml: readonly MathMlNode$1[]): OmmlWriteResult & {
36
+ readonly written: boolean;
37
+ };
33
38
  remove(): void;
34
39
  }
35
40
  interface DrawingRunInit {
@@ -1,5 +1,7 @@
1
- import { Alignment, Box, Color } from "document-schema.js";
1
+ import { r as MathMlNode$1 } from "./nodes-pArN9ilm.js";
2
+ import { t as OmmlWriteResult } from "./write-THs7ipBq.js";
2
3
  import { XmlElement, XmlNode } from "ooxml.js";
4
+ import { Alignment, Box, Color } from "document-schema.js";
3
5
  //#region src/edit/pptx/shape.d.ts
4
6
  declare const ROTATION_UNITS_PER_DEGREE = 60000;
5
7
  declare class PptxShape {
@@ -30,6 +32,9 @@ declare class PptxShape {
30
32
  get text(): string;
31
33
  set text(value: string);
32
34
  setParagraphs(paragraphs: readonly DrawingParagraphInit[]): void;
35
+ appendOfficeMath(mathml: readonly MathMlNode$1[]): OmmlWriteResult & {
36
+ readonly written: boolean;
37
+ };
33
38
  remove(): void;
34
39
  }
35
40
  interface DrawingRunInit {
@@ -1,4 +1,4 @@
1
- import { t as DrawingParagraphInit } from "./shape-D-gBLpxJ.js";
1
+ import { t as DrawingParagraphInit } from "./shape-DyIjuKE9.js";
2
2
  import { XmlElement } from "ooxml.js";
3
3
  import { Box, Color, ContentCellBorders } from "document-schema.js";
4
4
  //#region src/edit/pptx/table.d.ts
@@ -1,4 +1,4 @@
1
- import { t as DrawingParagraphInit } from "./shape-C5istyRr.cjs";
1
+ import { t as DrawingParagraphInit } from "./shape-CaG-RPiz.cjs";
2
2
  import { Box, Color, ContentCellBorders } from "document-schema.js";
3
3
  import { XmlElement } from "ooxml.js";
4
4
  //#region src/edit/pptx/table.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js.documents",
3
- "version": "1.99.78",
3
+ "version": "1.100.0",
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": {
@@ -64,7 +64,7 @@
64
64
  "byte-codec": "^1.1.9",
65
65
  "document-schema.js": "^2.7.17",
66
66
  "fflate": "^0.8.3",
67
- "markdown-codec": "^1.3.30",
67
+ "markdown-codec": "^1.4.0",
68
68
  "odf.js": "^2.7.23",
69
69
  "ooxml.js": "^2.11.31",
70
70
  "pdf-codec": "^2.2.32",