documents.js 1.61.0 → 1.63.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 (236) hide show
  1. package/README.md +120 -47
  2. package/dist/{blr-types-CYYC3yYU.d.cts → blr-types-DVgO1DQ9.d.cts} +1 -1
  3. package/dist/{blr-types-CYYC3yYU.d.ts → blr-types-DVgO1DQ9.d.ts} +1 -1
  4. package/dist/convert/capability.cjs +1 -0
  5. package/dist/convert/capability.d.cts +1 -1
  6. package/dist/convert/capability.d.ts +1 -1
  7. package/dist/convert/capability.js +1 -0
  8. package/dist/convert/convert.cjs +92 -38
  9. package/dist/convert/convert.d.cts +11 -4
  10. package/dist/convert/convert.d.ts +11 -4
  11. package/dist/convert/convert.js +93 -39
  12. package/dist/convert/local.cjs +15 -2
  13. package/dist/convert/local.js +15 -2
  14. package/dist/convert/port.d.cts +8 -4
  15. package/dist/convert/port.d.ts +8 -4
  16. package/dist/edit/docx/content.cjs +75 -13
  17. package/dist/edit/docx/content.d.cts +8 -2
  18. package/dist/edit/docx/content.d.ts +8 -2
  19. package/dist/edit/docx/content.js +75 -13
  20. package/dist/edit/docx/paragraph.cjs +14 -0
  21. package/dist/edit/docx/paragraph.d.cts +5 -0
  22. package/dist/edit/docx/paragraph.d.ts +5 -0
  23. package/dist/edit/docx/paragraph.js +14 -0
  24. package/dist/edit/docx/run.cjs +1 -1
  25. package/dist/edit/docx/run.js +1 -1
  26. package/dist/edit/docx/table.cjs +41 -0
  27. package/dist/edit/docx/table.d.cts +7 -1
  28. package/dist/edit/docx/table.d.ts +7 -1
  29. package/dist/edit/docx/table.js +42 -1
  30. package/dist/edit/geometry.cjs +38 -0
  31. package/dist/edit/geometry.d.cts +7 -0
  32. package/dist/edit/geometry.d.ts +7 -0
  33. package/dist/edit/geometry.js +36 -0
  34. package/dist/edit/odg/content.cjs +15 -12
  35. package/dist/edit/odg/content.js +15 -12
  36. package/dist/edit/odg/editor.d.cts +1 -1
  37. package/dist/edit/odg/editor.d.ts +1 -1
  38. package/dist/edit/odg/page.d.cts +3 -3
  39. package/dist/edit/odg/page.d.ts +3 -3
  40. package/dist/edit/odg/vector.cjs +22 -13
  41. package/dist/edit/odg/vector.d.cts +1 -1
  42. package/dist/edit/odg/vector.d.ts +1 -1
  43. package/dist/edit/odg/vector.js +23 -14
  44. package/dist/edit/odp/content.cjs +15 -0
  45. package/dist/edit/odp/content.js +16 -1
  46. package/dist/edit/odp/editor.d.cts +1 -1
  47. package/dist/edit/odp/editor.d.ts +1 -1
  48. package/dist/edit/odp/image.d.cts +1 -1
  49. package/dist/edit/odp/image.d.ts +1 -1
  50. package/dist/edit/odp/shape.cjs +11 -30
  51. package/dist/edit/odp/shape.d.cts +2 -2
  52. package/dist/edit/odp/shape.d.ts +2 -2
  53. package/dist/edit/odp/shape.js +13 -33
  54. package/dist/edit/odp/slide.cjs +11 -0
  55. package/dist/edit/odp/slide.d.cts +14 -4
  56. package/dist/edit/odp/slide.d.ts +14 -4
  57. package/dist/edit/odp/slide.js +12 -1
  58. package/dist/edit/odt/content.cjs +56 -16
  59. package/dist/edit/odt/content.d.cts +4 -2
  60. package/dist/edit/odt/content.d.ts +4 -2
  61. package/dist/edit/odt/content.js +56 -17
  62. package/dist/edit/odt/editor.d.cts +1 -1
  63. package/dist/edit/odt/editor.d.ts +1 -1
  64. package/dist/edit/odt/table.cjs +36 -0
  65. package/dist/edit/odt/table.d.cts +1 -36
  66. package/dist/edit/odt/table.d.ts +1 -36
  67. package/dist/edit/odt/table.js +37 -1
  68. package/dist/edit/pptx/content.cjs +71 -3
  69. package/dist/edit/pptx/content.js +71 -3
  70. package/dist/edit/pptx/editor.d.cts +1 -1
  71. package/dist/edit/pptx/editor.d.ts +1 -1
  72. package/dist/edit/pptx/image.d.cts +1 -1
  73. package/dist/edit/pptx/image.d.ts +1 -1
  74. package/dist/edit/pptx/shape.cjs +23 -1
  75. package/dist/edit/pptx/shape.d.cts +2 -2
  76. package/dist/edit/pptx/shape.d.ts +2 -2
  77. package/dist/edit/pptx/shape.js +23 -3
  78. package/dist/edit/pptx/slide.cjs +10 -1
  79. package/dist/edit/pptx/slide.d.cts +11 -4
  80. package/dist/edit/pptx/slide.d.ts +11 -4
  81. package/dist/edit/pptx/slide.js +10 -1
  82. package/dist/edit/pptx/table.cjs +136 -0
  83. package/dist/edit/pptx/table.d.cts +2 -0
  84. package/dist/edit/pptx/table.d.ts +2 -0
  85. package/dist/edit/pptx/table.js +131 -0
  86. package/dist/firebird/backup.d.cts +1 -1
  87. package/dist/firebird/backup.d.ts +1 -1
  88. package/dist/firebird/blr-types.cjs +2 -2
  89. package/dist/firebird/blr-types.d.cts +1 -1
  90. package/dist/firebird/blr-types.d.ts +1 -1
  91. package/dist/firebird/blr-types.js +2 -2
  92. package/dist/firebird/data.cjs +68 -14
  93. package/dist/firebird/data.d.cts +1 -1
  94. package/dist/firebird/data.d.ts +1 -1
  95. package/dist/firebird/data.js +68 -14
  96. package/dist/firebird/schema.cjs +13 -1
  97. package/dist/firebird/schema.d.cts +1 -1
  98. package/dist/firebird/schema.d.ts +1 -1
  99. package/dist/firebird/schema.js +13 -1
  100. package/dist/fonts/obfuscation.cjs +50 -0
  101. package/dist/fonts/obfuscation.d.cts +9 -0
  102. package/dist/fonts/obfuscation.d.ts +9 -0
  103. package/dist/fonts/obfuscation.js +46 -0
  104. package/dist/fonts/odf.cjs +86 -0
  105. package/dist/fonts/odf.d.cts +9 -0
  106. package/dist/fonts/odf.d.ts +9 -0
  107. package/dist/fonts/odf.js +84 -0
  108. package/dist/fonts/ooxml.cjs +129 -0
  109. package/dist/fonts/ooxml.d.cts +9 -0
  110. package/dist/fonts/ooxml.d.ts +9 -0
  111. package/dist/fonts/ooxml.js +127 -0
  112. package/dist/fonts/registry.cjs +18 -0
  113. package/dist/fonts/registry.d.cts +2 -0
  114. package/dist/fonts/registry.d.ts +2 -0
  115. package/dist/fonts/registry.js +16 -0
  116. package/dist/{geometry-DvwdrIij.d.cts → geometry-DaJr8yQW.d.cts} +2 -2
  117. package/dist/{geometry-DvwdrIij.d.ts → geometry-DaJr8yQW.d.ts} +2 -2
  118. package/dist/hsqldb/binary-script.cjs +154 -0
  119. package/dist/hsqldb/binary-script.d.cts +15 -0
  120. package/dist/hsqldb/binary-script.d.ts +15 -0
  121. package/dist/hsqldb/binary-script.js +151 -0
  122. package/dist/hsqldb/cache.cjs +18 -11
  123. package/dist/hsqldb/cache.d.cts +9 -4
  124. package/dist/hsqldb/cache.d.ts +9 -4
  125. package/dist/hsqldb/cache.js +18 -11
  126. package/dist/hsqldb/rowformat.cjs +60 -16
  127. package/dist/hsqldb/rowformat.d.cts +2 -21
  128. package/dist/hsqldb/rowformat.d.ts +2 -21
  129. package/dist/hsqldb/rowformat.js +60 -17
  130. package/dist/{image-BZDy72Jb.d.cts → image-7snmKIxn.d.cts} +1 -1
  131. package/dist/{image-B-xQWYYS.d.ts → image-Cs8xF753.d.ts} +1 -1
  132. package/dist/{image-CeqwL-Qs.d.ts → image-DHcA9kaK.d.ts} +1 -1
  133. package/dist/{image-DWX6cNOD.d.cts → image-M5SezZVI.d.cts} +1 -1
  134. package/dist/index.cjs +86 -3
  135. package/dist/index.d.cts +33 -21
  136. package/dist/index.d.ts +33 -21
  137. package/dist/index.js +18 -5
  138. package/dist/layout/cell-typing.cjs +209 -0
  139. package/dist/layout/cell-typing.d.cts +22 -0
  140. package/dist/layout/cell-typing.d.ts +22 -0
  141. package/dist/layout/cell-typing.js +208 -0
  142. package/dist/layout/drawing.cjs +193 -17
  143. package/dist/layout/drawing.js +193 -17
  144. package/dist/layout/engine.cjs +46 -29
  145. package/dist/layout/engine.d.cts +0 -2
  146. package/dist/layout/engine.d.ts +0 -2
  147. package/dist/layout/engine.js +47 -30
  148. package/dist/layout/lattice.cjs +139 -0
  149. package/dist/layout/lattice.d.cts +20 -0
  150. package/dist/layout/lattice.d.ts +20 -0
  151. package/dist/layout/lattice.js +135 -0
  152. package/dist/layout/reconstruct.cjs +176 -113
  153. package/dist/layout/reconstruct.d.cts +2 -0
  154. package/dist/layout/reconstruct.d.ts +2 -0
  155. package/dist/layout/reconstruct.js +173 -110
  156. package/dist/layout/shared.cjs +52 -0
  157. package/dist/layout/shared.d.cts +4 -2
  158. package/dist/layout/shared.d.ts +4 -2
  159. package/dist/layout/shared.js +51 -1
  160. package/dist/layout/sheets.cjs +45 -11
  161. package/dist/layout/sheets.js +46 -12
  162. package/dist/layout/slides.cjs +7 -7
  163. package/dist/layout/slides.d.cts +0 -3
  164. package/dist/layout/slides.d.ts +0 -3
  165. package/dist/layout/slides.js +7 -7
  166. package/dist/markdown/write.cjs +19 -6
  167. package/dist/markdown/write.js +19 -6
  168. package/dist/mathml/layout.cjs +2 -2
  169. package/dist/mathml/layout.d.cts +1 -1
  170. package/dist/mathml/layout.d.ts +1 -1
  171. package/dist/mathml/layout.js +2 -2
  172. package/dist/model/embedded-drawing.cjs +32 -0
  173. package/dist/model/embedded-drawing.d.cts +8 -0
  174. package/dist/model/embedded-drawing.d.ts +8 -0
  175. package/dist/model/embedded-drawing.js +30 -0
  176. package/dist/model/formula.cjs +31 -0
  177. package/dist/model/formula.d.cts +6 -6
  178. package/dist/model/formula.d.ts +6 -6
  179. package/dist/model/formula.js +27 -0
  180. package/dist/model/geometry.d.cts +1 -1
  181. package/dist/model/geometry.d.ts +1 -1
  182. package/dist/model/paint-order.cjs +15 -0
  183. package/dist/model/paint-order.d.cts +14 -0
  184. package/dist/model/paint-order.d.ts +14 -0
  185. package/dist/model/paint-order.js +14 -0
  186. package/dist/odb/components.cjs +12 -0
  187. package/dist/odb/components.d.cts +6 -0
  188. package/dist/odb/components.d.ts +6 -0
  189. package/dist/odb/components.js +10 -0
  190. package/dist/odb/read.cjs +11 -7
  191. package/dist/odb/read.d.cts +3 -2
  192. package/dist/odb/read.d.ts +3 -2
  193. package/dist/odb/read.js +11 -7
  194. package/dist/odf/formula/detect.cjs +86 -18
  195. package/dist/odf/formula/detect.d.cts +10 -6
  196. package/dist/odf/formula/detect.d.ts +10 -6
  197. package/dist/odf/formula/detect.js +86 -19
  198. package/dist/odf/formula/read.cjs +4 -16
  199. package/dist/odf/formula/read.d.cts +4 -8
  200. package/dist/odf/formula/read.d.ts +4 -8
  201. package/dist/odf/formula/read.js +5 -17
  202. package/dist/odf/odp/read.cjs +9 -19
  203. package/dist/odf/odp/read.d.cts +2 -7
  204. package/dist/odf/odp/read.d.ts +2 -7
  205. package/dist/odf/odp/read.js +10 -20
  206. package/dist/odf/odt/read.cjs +63 -23
  207. package/dist/odf/odt/read.d.cts +2 -7
  208. package/dist/odf/odt/read.d.ts +2 -7
  209. package/dist/odf/odt/read.js +64 -24
  210. package/dist/omml/write.cjs +258 -0
  211. package/dist/omml/write.d.cts +2 -0
  212. package/dist/omml/write.d.ts +2 -0
  213. package/dist/omml/write.js +256 -0
  214. package/dist/registry-CrSqLIcn.d.ts +19 -0
  215. package/dist/registry-CtPhMD0f.d.cts +19 -0
  216. package/dist/rowformat-Cl2exlEh.d.cts +25 -0
  217. package/dist/rowformat-Cl2exlEh.d.ts +25 -0
  218. package/dist/{schema-Acco3Ezi.d.cts → schema-BeR_KJ0X.d.cts} +3 -1
  219. package/dist/{schema-VkAA6pF5.d.ts → schema-CSKwSb_v.d.ts} +3 -1
  220. package/dist/{shape-BUfjw5eZ.d.cts → shape-BhkP6HB8.d.cts} +6 -2
  221. package/dist/{shape-CTkl6kt8.d.ts → shape-BkVcwPcf.d.ts} +6 -2
  222. package/dist/{shape-BfN3m52m.d.ts → shape-CVXedeL7.d.ts} +3 -2
  223. package/dist/{shape-CN2ycxOo.d.cts → shape-CXZ6fejV.d.cts} +3 -2
  224. package/dist/table-C3CPZ--2.d.cts +35 -0
  225. package/dist/table-DjYcNOFm.d.cts +44 -0
  226. package/dist/table-DqfqMkVq.d.ts +44 -0
  227. package/dist/table-DvS_7UQS.d.ts +35 -0
  228. package/dist/{vector-ClohqsOe.d.cts → vector-Puuqu_IT.d.cts} +4 -0
  229. package/dist/{vector-ClohqsOe.d.ts → vector-Puuqu_IT.d.ts} +4 -0
  230. package/dist/write-DuyfnbL_.d.cts +16 -0
  231. package/dist/write-Zqwx6pka.d.ts +16 -0
  232. package/package.json +4 -4
  233. package/dist/odf/formula/placeholder.cjs +0 -36
  234. package/dist/odf/formula/placeholder.d.cts +0 -14
  235. package/dist/odf/formula/placeholder.d.ts +0 -14
  236. package/dist/odf/formula/placeholder.js +0 -36
@@ -1,16 +1,44 @@
1
1
  import { ptToTwips } from "../../model/units.js";
2
2
  import { createDocx } from "./editor.js";
3
+ import { formulaOfBlock, formulaPlaceholderText } from "../../model/formula.js";
3
4
  import { base64ToBytes } from "ooxml.js";
4
5
  //#region src/edit/docx/content.ts
5
- function buildDocxPackage(content) {
6
+ function buildDocxPackage(content, options) {
6
7
  if (content.kind !== "wordprocessing") throw new Error("buildDocxPackage requires a wordprocessing ContentDocument");
7
8
  const editor = createDocx();
8
9
  content.sections.forEach((section, sectionIndex) => {
9
10
  if (sectionIndex > 0) editor.body.appendPageBreak();
10
- for (const block of section.blocks) appendBlock(editor.body, block);
11
+ appendBlocks(editor.body, section.blocks, options);
11
12
  });
12
13
  return editor.toPackage();
13
14
  }
15
+ function isMergeableImageParagraph(block) {
16
+ return block.kind === "paragraph" && block.runs.every((run) => run.text === "");
17
+ }
18
+ function appendBlocks(body, blocks, options) {
19
+ let index = 0;
20
+ while (index < blocks.length) {
21
+ const block = blocks[index];
22
+ const next = blocks[index + 1];
23
+ if (block !== void 0 && isMergeableImageParagraph(block) && next?.kind === "image") {
24
+ const paragraph = body.appendParagraph();
25
+ paragraph.styleId = block.styleId;
26
+ paragraph.alignment = block.alignment;
27
+ paragraph.list = block.list;
28
+ paragraph.insertImageAfter({
29
+ format: next.format,
30
+ bytes: base64ToBytes(next.base64),
31
+ widthPt: next.widthPt,
32
+ heightPt: next.heightPt,
33
+ altText: next.altText
34
+ });
35
+ index += 2;
36
+ continue;
37
+ }
38
+ if (block !== void 0) appendBlock(body, block, options);
39
+ index += 1;
40
+ }
41
+ }
14
42
  function populateParagraph(paragraph, block) {
15
43
  paragraph.styleId = block.styleId;
16
44
  paragraph.alignment = block.alignment;
@@ -29,32 +57,57 @@ function populateParagraph(paragraph, block) {
29
57
  if (run.color !== void 0) docxRun.color = run.color;
30
58
  }
31
59
  }
60
+ function populateCellBlocks(cell, blocks) {
61
+ const [firstBlock, ...restBlocks] = blocks;
62
+ const firstParagraph = cell.paragraphs()[0];
63
+ if (firstBlock?.kind === "paragraph" && firstParagraph !== void 0) populateParagraph(firstParagraph, firstBlock);
64
+ else if (firstBlock !== void 0) appendCellBlock(cell, firstBlock);
65
+ for (const remaining of restBlocks) appendCellBlock(cell, remaining);
66
+ }
32
67
  function appendTable(body, block) {
33
68
  const columns = block.columnWidthsPt.length;
34
69
  if (block.rows.length === 0 || columns === 0) return;
35
70
  const table = body.appendTable({
36
- rows: block.rows.length,
71
+ rows: 0,
37
72
  columns,
38
73
  columnWidthsTwips: block.columnWidthsPt.map(ptToTwips)
39
74
  });
40
- block.rows.forEach((row, rowIndex) => {
41
- const tableRow = table.rows()[rowIndex];
42
- if (tableRow === void 0) return;
75
+ const verticalMerges = /* @__PURE__ */ new Map();
76
+ block.rows.forEach((row) => {
77
+ const domCells = table.appendRow(row.cells.length).cells();
78
+ let colIndex = 0;
43
79
  row.cells.forEach((cell, cellIndex) => {
44
- const tableCell = tableRow.cells()[cellIndex];
80
+ const tableCell = domCells[cellIndex];
45
81
  if (tableCell === void 0) return;
46
- const [firstBlock, ...restBlocks] = cell.blocks;
47
- const firstParagraph = tableCell.paragraphs()[0];
48
- if (firstBlock?.kind === "paragraph" && firstParagraph !== void 0) populateParagraph(firstParagraph, firstBlock);
49
- else if (firstBlock !== void 0) appendCellBlock(tableCell, firstBlock);
50
- for (const remaining of restBlocks) appendCellBlock(tableCell, remaining);
82
+ const active = verticalMerges.get(colIndex);
83
+ if (active !== void 0 && active.rowsRemaining > 0) {
84
+ if (active.gridSpan > 1) tableCell.colSpan = active.gridSpan;
85
+ tableCell.verticalMerge = "continue";
86
+ verticalMerges.set(colIndex, {
87
+ rowsRemaining: active.rowsRemaining - 1,
88
+ gridSpan: active.gridSpan
89
+ });
90
+ colIndex += active.gridSpan;
91
+ return;
92
+ }
93
+ const span = cell.colSpan ?? 1;
94
+ if (span > 1) tableCell.colSpan = span;
95
+ if (cell.rowSpan !== void 0 && cell.rowSpan > 1) {
96
+ tableCell.verticalMerge = "restart";
97
+ verticalMerges.set(colIndex, {
98
+ rowsRemaining: cell.rowSpan - 1,
99
+ gridSpan: span
100
+ });
101
+ }
102
+ populateCellBlocks(tableCell, cell.blocks);
103
+ colIndex += span;
51
104
  });
52
105
  });
53
106
  }
54
107
  function appendCellBlock(cell, block) {
55
108
  if (block.kind === "paragraph") populateParagraph(cell.appendParagraph(), block);
56
109
  }
57
- function appendBlock(body, block) {
110
+ function appendBlock(body, block, options) {
58
111
  if (block.kind === "paragraph") populateParagraph(body.appendParagraph(), block);
59
112
  else if (block.kind === "image") body.appendParagraph().insertImageAfter({
60
113
  format: block.format,
@@ -65,6 +118,15 @@ function appendBlock(body, block) {
65
118
  });
66
119
  else if (block.kind === "pageBreak") body.appendPageBreak();
67
120
  else if (block.kind === "table") appendTable(body, block);
121
+ else if (block.kind === "embeddedObject") appendEmbeddedObject(body, block, options);
122
+ }
123
+ function appendEmbeddedObject(body, block, options) {
124
+ const formula = formulaOfBlock(block);
125
+ if (formula === void 0) return;
126
+ const paragraph = body.appendParagraph();
127
+ const { written, diagnostics } = paragraph.appendOfficeMath(formula.mathml);
128
+ for (const diagnostic of diagnostics) options?.onMathDiagnostic?.(diagnostic, { sourcePath: block.sourcePath });
129
+ if (!written) paragraph.appendRun({ text: formulaPlaceholderText(formula) });
68
130
  }
69
131
  //#endregion
70
132
  export { buildDocxPackage };
@@ -1,5 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_xml_fragment = require("../../xml/fragment.cjs");
3
+ const require_omml_write = require("../../omml/write.cjs");
3
4
  const require_xml_edit = require("../../xml/edit.cjs");
4
5
  const require_edit_docx_image = require("./image.cjs");
5
6
  const require_edit_docx_props = require("./props.cjs");
@@ -104,6 +105,19 @@ var DocxParagraph = class {
104
105
  const numPr = require_xml_edit.getOrCreateChildElement(pPr, "w:numPr", require_edit_docx_props.PPR_ORDER, () => require_xml_fragment.el("w:numPr"));
105
106
  numPr.children = [require_xml_fragment.el("w:ilvl", { "w:val": String(value.level) }), require_xml_fragment.el("w:numId", { "w:val": value.numId })];
106
107
  }
108
+ appendOfficeMath(mathml) {
109
+ const node = this.live();
110
+ const result = require_omml_write.buildOfficeMathParagraph(mathml);
111
+ if (result.element === void 0) return {
112
+ ...result,
113
+ written: false
114
+ };
115
+ node.children.push(result.element);
116
+ return {
117
+ ...result,
118
+ written: true
119
+ };
120
+ }
107
121
  insertImageAfter(image) {
108
122
  const node = this.live();
109
123
  if (this.imageContext === void 0) throw new Error("insertImageAfter requires a paragraph opened through a DocxEditor");
@@ -1,3 +1,5 @@
1
+ import { r as MathMlNode } from "../../nodes-pArN9ilm.cjs";
2
+ import { r as OmmlWriteResult } from "../../write-DuyfnbL_.cjs";
1
3
  import { n as MediaContext, t as ImageInit } from "../../image-BfRLAD9B.cjs";
2
4
  import { n as RunInit, t as DocxRun } from "../../run-B3GNScJH.cjs";
3
5
  import { ContentListMembership } from "document-schema.js";
@@ -32,6 +34,9 @@ declare class DocxParagraph {
32
34
  set alignment(value: 'left' | 'center' | 'right' | 'justify' | undefined);
33
35
  get list(): ContentListMembership | undefined;
34
36
  set list(value: ContentListMembership | undefined);
37
+ appendOfficeMath(mathml: readonly MathMlNode[]): OmmlWriteResult & {
38
+ readonly written: boolean;
39
+ };
35
40
  insertImageAfter(image: ImageInit): void;
36
41
  remove(): void;
37
42
  }
@@ -1,3 +1,5 @@
1
+ import { r as MathMlNode } from "../../nodes-pArN9ilm.js";
2
+ import { r as OmmlWriteResult } from "../../write-Zqwx6pka.js";
1
3
  import { n as MediaContext, t as ImageInit } from "../../image-BfRLAD9B.js";
2
4
  import { n as RunInit, t as DocxRun } from "../../run-D2rTWHbt.js";
3
5
  import { Package, XmlElement, XmlNode } from "ooxml.js";
@@ -32,6 +34,9 @@ declare class DocxParagraph {
32
34
  set alignment(value: 'left' | 'center' | 'right' | 'justify' | undefined);
33
35
  get list(): ContentListMembership | undefined;
34
36
  set list(value: ContentListMembership | undefined);
37
+ appendOfficeMath(mathml: readonly MathMlNode[]): OmmlWriteResult & {
38
+ readonly written: boolean;
39
+ };
35
40
  insertImageAfter(image: ImageInit): void;
36
41
  remove(): void;
37
42
  }
@@ -1,4 +1,5 @@
1
1
  import { el } from "../../xml/fragment.js";
2
+ import { buildOfficeMathParagraph } from "../../omml/write.js";
2
3
  import { getOrCreateChildElement, removeChild } from "../../xml/edit.js";
3
4
  import { insertImageMedia } from "./image.js";
4
5
  import { PPR_ORDER, ensureFirstChild, getAlignment, getStyleId, setAlignment, setStyleId } from "./props.js";
@@ -103,6 +104,19 @@ var DocxParagraph = class {
103
104
  const numPr = getOrCreateChildElement(pPr, "w:numPr", PPR_ORDER, () => el("w:numPr"));
104
105
  numPr.children = [el("w:ilvl", { "w:val": String(value.level) }), el("w:numId", { "w:val": value.numId })];
105
106
  }
107
+ appendOfficeMath(mathml) {
108
+ const node = this.live();
109
+ const result = buildOfficeMathParagraph(mathml);
110
+ if (result.element === void 0) return {
111
+ ...result,
112
+ written: false
113
+ };
114
+ node.children.push(result.element);
115
+ return {
116
+ ...result,
117
+ written: true
118
+ };
119
+ }
106
120
  insertImageAfter(image) {
107
121
  const node = this.live();
108
122
  if (this.imageContext === void 0) throw new Error("insertImageAfter requires a paragraph opened through a DocxEditor");
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_xml_fragment = require("../../xml/fragment.cjs");
3
+ const require_xml_entities = require("../../xml/entities.cjs");
3
4
  const require_xml_edit = require("../../xml/edit.cjs");
4
5
  const require_edit_docx_props = require("./props.cjs");
5
- const require_xml_entities = require("../../xml/entities.cjs");
6
6
  let ooxml_js = require("ooxml.js");
7
7
  let document_schema_js = require("document-schema.js");
8
8
  //#region src/edit/docx/run.ts
@@ -1,8 +1,8 @@
1
1
  import { colorToRgbHex } from "../../model/color.js";
2
2
  import { el, txt } from "../../xml/fragment.js";
3
+ import { encodeXmlText, needsSpacePreserve } from "../../xml/entities.js";
3
4
  import { removeChild, setAttr } from "../../xml/edit.js";
4
5
  import { RPR_ORDER, ensureFirstChild, getColor, getFontFamily, getSizePt, getToggle, setColor, setFontFamily, setSizePt, setToggle } from "./props.js";
5
- import { encodeXmlText, needsSpacePreserve } from "../../xml/entities.js";
6
6
  import { textContent } from "ooxml.js";
7
7
  //#region src/edit/docx/run.ts
8
8
  function directChild(parent, tag) {
@@ -2,13 +2,54 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_xml_fragment = require("../../xml/fragment.cjs");
3
3
  const require_xml_edit = require("../../xml/edit.cjs");
4
4
  const require_edit_docx_paragraph = require("./paragraph.cjs");
5
+ let ooxml_js = require("ooxml.js");
5
6
  //#region src/edit/docx/table.ts
6
7
  const DEFAULT_TABLE_WIDTH_TWIPS = 9360;
8
+ const TC_PR_CHILD_ORDER = ["w:gridSpan", "w:vMerge"];
7
9
  var DocxTableCell = class {
8
10
  node;
9
11
  constructor(node) {
10
12
  this.node = node;
11
13
  }
14
+ tcPrElement(create) {
15
+ const existing = require_xml_edit.directChildElement(this.node, "w:tcPr");
16
+ if (existing !== void 0 || !create) return existing;
17
+ const created = require_xml_fragment.el("w:tcPr");
18
+ this.node.children.unshift(created);
19
+ return created;
20
+ }
21
+ get colSpan() {
22
+ const tcPr = this.tcPrElement(false);
23
+ const gridSpan = tcPr === void 0 ? void 0 : require_xml_edit.directChildElement(tcPr, "w:gridSpan");
24
+ const val = gridSpan === void 0 ? void 0 : (0, ooxml_js.attr)(gridSpan, "w:val");
25
+ return val === void 0 ? void 0 : Number(val);
26
+ }
27
+ set colSpan(value) {
28
+ if (value === void 0) {
29
+ const tcPr = this.tcPrElement(false);
30
+ if (tcPr !== void 0) tcPr.children = tcPr.children.filter((c) => !(c.type === "element" && c.tag === "w:gridSpan"));
31
+ return;
32
+ }
33
+ const tcPr = this.tcPrElement(true);
34
+ tcPr.children = tcPr.children.filter((c) => !(c.type === "element" && c.tag === "w:gridSpan"));
35
+ require_xml_edit.insertInSchemaOrder(tcPr, require_xml_fragment.el("w:gridSpan", { "w:val": String(value) }), TC_PR_CHILD_ORDER);
36
+ }
37
+ get verticalMerge() {
38
+ const tcPr = this.tcPrElement(false);
39
+ const vMerge = tcPr === void 0 ? void 0 : require_xml_edit.directChildElement(tcPr, "w:vMerge");
40
+ if (vMerge === void 0) return;
41
+ return (0, ooxml_js.attr)(vMerge, "w:val") === "restart" ? "restart" : "continue";
42
+ }
43
+ set verticalMerge(value) {
44
+ if (value === void 0) {
45
+ const tcPr = this.tcPrElement(false);
46
+ if (tcPr !== void 0) tcPr.children = tcPr.children.filter((c) => !(c.type === "element" && c.tag === "w:vMerge"));
47
+ return;
48
+ }
49
+ const tcPr = this.tcPrElement(true);
50
+ tcPr.children = tcPr.children.filter((c) => !(c.type === "element" && c.tag === "w:vMerge"));
51
+ require_xml_edit.insertInSchemaOrder(tcPr, value === "restart" ? require_xml_fragment.el("w:vMerge", { "w:val": "restart" }) : require_xml_fragment.el("w:vMerge"), TC_PR_CHILD_ORDER);
52
+ }
12
53
  paragraphs() {
13
54
  const out = [];
14
55
  for (const child of this.node.children) if (child.type === "element" && child.tag === "w:p") out.push(new require_edit_docx_paragraph.DocxParagraph(this.node.children, child));
@@ -6,9 +6,15 @@ interface TableInit {
6
6
  readonly columns: number;
7
7
  readonly columnWidthsTwips?: readonly number[];
8
8
  }
9
+ type DocxVerticalMerge = 'restart' | 'continue';
9
10
  declare class DocxTableCell {
10
11
  private readonly node;
11
12
  constructor(node: XmlElement);
13
+ private tcPrElement;
14
+ get colSpan(): number | undefined;
15
+ set colSpan(value: number | undefined);
16
+ get verticalMerge(): DocxVerticalMerge | undefined;
17
+ set verticalMerge(value: DocxVerticalMerge | undefined);
12
18
  paragraphs(): DocxParagraph[];
13
19
  appendParagraph(init?: ParagraphInit): DocxParagraph;
14
20
  get text(): string;
@@ -31,4 +37,4 @@ declare class DocxTable {
31
37
  }
32
38
  declare function buildTable(init: TableInit): XmlElement;
33
39
  //#endregion
34
- export { DocxTable, DocxTableCell, DocxTableRow, TableInit, buildTable };
40
+ export { DocxTable, DocxTableCell, DocxTableRow, DocxVerticalMerge, TableInit, buildTable };
@@ -6,9 +6,15 @@ interface TableInit {
6
6
  readonly columns: number;
7
7
  readonly columnWidthsTwips?: readonly number[];
8
8
  }
9
+ type DocxVerticalMerge = 'restart' | 'continue';
9
10
  declare class DocxTableCell {
10
11
  private readonly node;
11
12
  constructor(node: XmlElement);
13
+ private tcPrElement;
14
+ get colSpan(): number | undefined;
15
+ set colSpan(value: number | undefined);
16
+ get verticalMerge(): DocxVerticalMerge | undefined;
17
+ set verticalMerge(value: DocxVerticalMerge | undefined);
12
18
  paragraphs(): DocxParagraph[];
13
19
  appendParagraph(init?: ParagraphInit): DocxParagraph;
14
20
  get text(): string;
@@ -31,4 +37,4 @@ declare class DocxTable {
31
37
  }
32
38
  declare function buildTable(init: TableInit): XmlElement;
33
39
  //#endregion
34
- export { DocxTable, DocxTableCell, DocxTableRow, TableInit, buildTable };
40
+ export { DocxTable, DocxTableCell, DocxTableRow, DocxVerticalMerge, TableInit, buildTable };
@@ -1,13 +1,54 @@
1
1
  import { el } from "../../xml/fragment.js";
2
- import { removeChild } from "../../xml/edit.js";
2
+ import { directChildElement, insertInSchemaOrder, removeChild } from "../../xml/edit.js";
3
3
  import { DocxParagraph, buildParagraph } from "./paragraph.js";
4
+ import { attr } from "ooxml.js";
4
5
  //#region src/edit/docx/table.ts
5
6
  const DEFAULT_TABLE_WIDTH_TWIPS = 9360;
7
+ const TC_PR_CHILD_ORDER = ["w:gridSpan", "w:vMerge"];
6
8
  var DocxTableCell = class {
7
9
  node;
8
10
  constructor(node) {
9
11
  this.node = node;
10
12
  }
13
+ tcPrElement(create) {
14
+ const existing = directChildElement(this.node, "w:tcPr");
15
+ if (existing !== void 0 || !create) return existing;
16
+ const created = el("w:tcPr");
17
+ this.node.children.unshift(created);
18
+ return created;
19
+ }
20
+ get colSpan() {
21
+ const tcPr = this.tcPrElement(false);
22
+ const gridSpan = tcPr === void 0 ? void 0 : directChildElement(tcPr, "w:gridSpan");
23
+ const val = gridSpan === void 0 ? void 0 : attr(gridSpan, "w:val");
24
+ return val === void 0 ? void 0 : Number(val);
25
+ }
26
+ set colSpan(value) {
27
+ if (value === void 0) {
28
+ const tcPr = this.tcPrElement(false);
29
+ if (tcPr !== void 0) tcPr.children = tcPr.children.filter((c) => !(c.type === "element" && c.tag === "w:gridSpan"));
30
+ return;
31
+ }
32
+ const tcPr = this.tcPrElement(true);
33
+ tcPr.children = tcPr.children.filter((c) => !(c.type === "element" && c.tag === "w:gridSpan"));
34
+ insertInSchemaOrder(tcPr, el("w:gridSpan", { "w:val": String(value) }), TC_PR_CHILD_ORDER);
35
+ }
36
+ get verticalMerge() {
37
+ const tcPr = this.tcPrElement(false);
38
+ const vMerge = tcPr === void 0 ? void 0 : directChildElement(tcPr, "w:vMerge");
39
+ if (vMerge === void 0) return;
40
+ return attr(vMerge, "w:val") === "restart" ? "restart" : "continue";
41
+ }
42
+ set verticalMerge(value) {
43
+ if (value === void 0) {
44
+ const tcPr = this.tcPrElement(false);
45
+ if (tcPr !== void 0) tcPr.children = tcPr.children.filter((c) => !(c.type === "element" && c.tag === "w:vMerge"));
46
+ return;
47
+ }
48
+ const tcPr = this.tcPrElement(true);
49
+ tcPr.children = tcPr.children.filter((c) => !(c.type === "element" && c.tag === "w:vMerge"));
50
+ insertInSchemaOrder(tcPr, value === "restart" ? el("w:vMerge", { "w:val": "restart" }) : el("w:vMerge"), TC_PR_CHILD_ORDER);
51
+ }
11
52
  paragraphs() {
12
53
  const out = [];
13
54
  for (const child of this.node.children) if (child.type === "element" && child.tag === "w:p") out.push(new DocxParagraph(this.node.children, child));
@@ -0,0 +1,38 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_xml_edit = require("../xml/edit.cjs");
3
+ let odf_js = require("odf.js");
4
+ //#region src/edit/geometry.ts
5
+ function buildTransformAttr(frame, rotationDeg) {
6
+ const angleRad = -rotationDeg * Math.PI / 180;
7
+ const localCenter = {
8
+ xPt: frame.widthPt / 2,
9
+ yPt: frame.heightPt / 2
10
+ };
11
+ const rotatedCenter = (0, odf_js.applyOdfTransform)([{
12
+ kind: "rotate",
13
+ angleRad
14
+ }], localCenter);
15
+ const desiredCenter = {
16
+ xPt: frame.xPt + frame.widthPt / 2,
17
+ yPt: frame.yPt + frame.heightPt / 2
18
+ };
19
+ const txPt = desiredCenter.xPt - rotatedCenter.xPt;
20
+ const tyPt = desiredCenter.yPt - rotatedCenter.yPt;
21
+ return `rotate(${angleRad}) translate(${(0, odf_js.formatOdfLength)(txPt)} ${(0, odf_js.formatOdfLength)(tyPt)})`;
22
+ }
23
+ function applyOdfGeometry(node, frame, rotationDeg) {
24
+ require_xml_edit.setAttr(node, "svg:width", (0, odf_js.formatOdfLength)(frame.widthPt));
25
+ require_xml_edit.setAttr(node, "svg:height", (0, odf_js.formatOdfLength)(frame.heightPt));
26
+ if (rotationDeg === void 0 || rotationDeg === 0) {
27
+ require_xml_edit.removeAttr(node, "draw:transform");
28
+ require_xml_edit.setAttr(node, "svg:x", (0, odf_js.formatOdfLength)(frame.xPt));
29
+ require_xml_edit.setAttr(node, "svg:y", (0, odf_js.formatOdfLength)(frame.yPt));
30
+ return;
31
+ }
32
+ require_xml_edit.removeAttr(node, "svg:x");
33
+ require_xml_edit.removeAttr(node, "svg:y");
34
+ require_xml_edit.setAttr(node, "draw:transform", buildTransformAttr(frame, rotationDeg));
35
+ }
36
+ //#endregion
37
+ exports.applyOdfGeometry = applyOdfGeometry;
38
+ exports.buildTransformAttr = buildTransformAttr;
@@ -0,0 +1,7 @@
1
+ import { t as Box } from "../geometry-DaJr8yQW.cjs";
2
+ import { XmlElement } from "odf.js";
3
+ //#region src/edit/geometry.d.ts
4
+ declare function buildTransformAttr(frame: Box, rotationDeg: number): string;
5
+ declare function applyOdfGeometry(node: XmlElement, frame: Box, rotationDeg: number | undefined): void;
6
+ //#endregion
7
+ export { applyOdfGeometry, buildTransformAttr };
@@ -0,0 +1,7 @@
1
+ import { t as Box } from "../geometry-DaJr8yQW.js";
2
+ import { XmlElement } from "odf.js";
3
+ //#region src/edit/geometry.d.ts
4
+ declare function buildTransformAttr(frame: Box, rotationDeg: number): string;
5
+ declare function applyOdfGeometry(node: XmlElement, frame: Box, rotationDeg: number | undefined): void;
6
+ //#endregion
7
+ export { applyOdfGeometry, buildTransformAttr };
@@ -0,0 +1,36 @@
1
+ import { removeAttr, setAttr } from "../xml/edit.js";
2
+ import { applyOdfTransform, formatOdfLength } from "odf.js";
3
+ //#region src/edit/geometry.ts
4
+ function buildTransformAttr(frame, rotationDeg) {
5
+ const angleRad = -rotationDeg * Math.PI / 180;
6
+ const localCenter = {
7
+ xPt: frame.widthPt / 2,
8
+ yPt: frame.heightPt / 2
9
+ };
10
+ const rotatedCenter = applyOdfTransform([{
11
+ kind: "rotate",
12
+ angleRad
13
+ }], localCenter);
14
+ const desiredCenter = {
15
+ xPt: frame.xPt + frame.widthPt / 2,
16
+ yPt: frame.yPt + frame.heightPt / 2
17
+ };
18
+ const txPt = desiredCenter.xPt - rotatedCenter.xPt;
19
+ const tyPt = desiredCenter.yPt - rotatedCenter.yPt;
20
+ return `rotate(${angleRad}) translate(${formatOdfLength(txPt)} ${formatOdfLength(tyPt)})`;
21
+ }
22
+ function applyOdfGeometry(node, frame, rotationDeg) {
23
+ setAttr(node, "svg:width", formatOdfLength(frame.widthPt));
24
+ setAttr(node, "svg:height", formatOdfLength(frame.heightPt));
25
+ if (rotationDeg === void 0 || rotationDeg === 0) {
26
+ removeAttr(node, "draw:transform");
27
+ setAttr(node, "svg:x", formatOdfLength(frame.xPt));
28
+ setAttr(node, "svg:y", formatOdfLength(frame.yPt));
29
+ return;
30
+ }
31
+ removeAttr(node, "svg:x");
32
+ removeAttr(node, "svg:y");
33
+ setAttr(node, "draw:transform", buildTransformAttr(frame, rotationDeg));
34
+ }
35
+ //#endregion
36
+ export { applyOdfGeometry, buildTransformAttr };
@@ -1,6 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_edit_odt_content = require("../odt/content.cjs");
3
3
  const require_edit_odg_editor = require("./editor.cjs");
4
+ const require_model_paint_order = require("../../model/paint-order.cjs");
4
5
  let odf_js = require("odf.js");
5
6
  //#region src/edit/odg/content.ts
6
7
  function buildOdgPackage(content) {
@@ -10,33 +11,35 @@ function buildOdgPackage(content) {
10
11
  if (firstPage !== void 0) editor.pageSize = firstPage.size;
11
12
  for (const page of content.pages) {
12
13
  const odgPage = editor.addPage();
13
- for (const vector of page.vectors) appendVector(odgPage, vector);
14
- for (const shape of page.shapes) appendShape(odgPage, shape);
14
+ for (const entry of require_model_paint_order.mergeByPaintOrder(page.vectors, page.shapes)) if (entry.kind === "vector") appendVector(odgPage, entry.value);
15
+ else appendShape(odgPage, entry.value);
15
16
  }
16
17
  return editor.toPackage();
17
18
  }
18
19
  function appendVector(page, vector) {
19
- if (vector.kind === "rect") page.addRect({
20
+ if (vector.kind === "line") {
21
+ page.addLine({
22
+ from: vector.from,
23
+ to: vector.to,
24
+ stroke: vector.stroke
25
+ });
26
+ return;
27
+ }
28
+ const built = vector.kind === "rect" ? page.addRect({
20
29
  frame: vector.frame,
21
30
  fill: vector.fill,
22
31
  stroke: vector.stroke
23
- });
24
- else if (vector.kind === "ellipse") page.addEllipse({
32
+ }) : vector.kind === "ellipse" ? page.addEllipse({
25
33
  frame: vector.frame,
26
34
  fill: vector.fill,
27
35
  stroke: vector.stroke
28
- });
29
- else if (vector.kind === "line") page.addLine({
30
- from: vector.from,
31
- to: vector.to,
32
- stroke: vector.stroke
33
- });
34
- else page.addPath({
36
+ }) : page.addPath({
35
37
  frame: vector.frame,
36
38
  subpaths: vector.subpaths,
37
39
  fill: vector.fill,
38
40
  stroke: vector.stroke
39
41
  });
42
+ if (vector.rotationDeg !== void 0) built.rotationDeg = vector.rotationDeg;
40
43
  }
41
44
  function appendShape(page, shape) {
42
45
  const [onlyBlock] = shape.blocks;
@@ -1,5 +1,6 @@
1
1
  import { populateParagraph } from "../odt/content.js";
2
2
  import { createOdg } from "./editor.js";
3
+ import { mergeByPaintOrder } from "../../model/paint-order.js";
3
4
  import { base64ToBytes } from "odf.js";
4
5
  //#region src/edit/odg/content.ts
5
6
  function buildOdgPackage(content) {
@@ -9,33 +10,35 @@ function buildOdgPackage(content) {
9
10
  if (firstPage !== void 0) editor.pageSize = firstPage.size;
10
11
  for (const page of content.pages) {
11
12
  const odgPage = editor.addPage();
12
- for (const vector of page.vectors) appendVector(odgPage, vector);
13
- for (const shape of page.shapes) appendShape(odgPage, shape);
13
+ for (const entry of mergeByPaintOrder(page.vectors, page.shapes)) if (entry.kind === "vector") appendVector(odgPage, entry.value);
14
+ else appendShape(odgPage, entry.value);
14
15
  }
15
16
  return editor.toPackage();
16
17
  }
17
18
  function appendVector(page, vector) {
18
- if (vector.kind === "rect") page.addRect({
19
+ if (vector.kind === "line") {
20
+ page.addLine({
21
+ from: vector.from,
22
+ to: vector.to,
23
+ stroke: vector.stroke
24
+ });
25
+ return;
26
+ }
27
+ const built = vector.kind === "rect" ? page.addRect({
19
28
  frame: vector.frame,
20
29
  fill: vector.fill,
21
30
  stroke: vector.stroke
22
- });
23
- else if (vector.kind === "ellipse") page.addEllipse({
31
+ }) : vector.kind === "ellipse" ? page.addEllipse({
24
32
  frame: vector.frame,
25
33
  fill: vector.fill,
26
34
  stroke: vector.stroke
27
- });
28
- else if (vector.kind === "line") page.addLine({
29
- from: vector.from,
30
- to: vector.to,
31
- stroke: vector.stroke
32
- });
33
- else page.addPath({
35
+ }) : page.addPath({
34
36
  frame: vector.frame,
35
37
  subpaths: vector.subpaths,
36
38
  fill: vector.fill,
37
39
  stroke: vector.stroke
38
40
  });
41
+ if (vector.rotationDeg !== void 0) built.rotationDeg = vector.rotationDeg;
39
42
  }
40
43
  function appendShape(page, shape) {
41
44
  const [onlyBlock] = shape.blocks;
@@ -1,4 +1,4 @@
1
- import { s as PageSize } from "../../geometry-DvwdrIij.cjs";
1
+ import { s as PageSize } from "../../geometry-DaJr8yQW.cjs";
2
2
  import { OdgPage } from "./page.cjs";
3
3
  import { Package } from "odf.js";
4
4
  //#region src/edit/odg/editor.d.ts
@@ -1,4 +1,4 @@
1
- import { s as PageSize } from "../../geometry-DvwdrIij.js";
1
+ import { s as PageSize } from "../../geometry-DaJr8yQW.js";
2
2
  import { OdgPage } from "./page.js";
3
3
  import { Package } from "odf.js";
4
4
  //#region src/edit/odg/editor.d.ts
@@ -1,6 +1,6 @@
1
- import { t as ImageInit } from "../../image-DWX6cNOD.cjs";
2
- import { t as OdpShape } from "../../shape-CN2ycxOo.cjs";
3
- import { a as OdgLineVector, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as PathVectorInit, t as BoxVectorInit } from "../../vector-ClohqsOe.cjs";
1
+ import { t as ImageInit } from "../../image-M5SezZVI.cjs";
2
+ import { t as OdpShape } from "../../shape-CXZ6fejV.cjs";
3
+ import { a as OdgLineVector, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as PathVectorInit, t as BoxVectorInit } from "../../vector-Puuqu_IT.cjs";
4
4
  import { Box } from "document-schema.js";
5
5
  import { Package, XmlElement, XmlNode } from "odf.js";
6
6
  //#region src/edit/odg/page.d.ts
@@ -1,6 +1,6 @@
1
- import { t as ImageInit } from "../../image-CeqwL-Qs.js";
2
- import { t as OdpShape } from "../../shape-BfN3m52m.js";
3
- import { a as OdgLineVector, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as PathVectorInit, t as BoxVectorInit } from "../../vector-ClohqsOe.js";
1
+ import { t as ImageInit } from "../../image-DHcA9kaK.js";
2
+ import { t as OdpShape } from "../../shape-CVXedeL7.js";
3
+ import { a as OdgLineVector, n as LineVectorInit, o as OdgPathVector, r as OdgBoxVector, s as PathVectorInit, t as BoxVectorInit } from "../../vector-Puuqu_IT.js";
4
4
  import { Box } from "document-schema.js";
5
5
  import { Package, XmlElement, XmlNode } from "odf.js";
6
6
  //#region src/edit/odg/page.d.ts