odf.js 6.2.1 → 6.4.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 (168) hide show
  1. package/README.md +191 -17
  2. package/dist/{cascade-BDkyOmoo.d.cts → cascade-BpMwrjkB.d.cts} +1 -1
  3. package/dist/{cascade-CaVinmvp.d.ts → cascade-PDS3hgrP.d.ts} +1 -1
  4. package/dist/{codec-B72LApRl.d.cts → codec-CFdlbFLJ.d.cts} +21 -13
  5. package/dist/{codec-rbZGlr37.d.ts → codec-DTAgph2r.d.ts} +21 -13
  6. package/dist/codec.d.cts +1 -1
  7. package/dist/codec.d.ts +1 -1
  8. package/dist/{embedded-UQQNFd5U.js → embedded-BnavfkP-.js} +4 -5
  9. package/dist/{embedded-BsO-SvtW.cjs → embedded-Bxyss_ck.cjs} +15 -4
  10. package/dist/index.cjs +53 -1
  11. package/dist/index.d.cts +24 -16
  12. package/dist/index.d.ts +24 -16
  13. package/dist/index.js +19 -11
  14. package/dist/list-7FO0SDqZ.d.ts +32 -0
  15. package/dist/list-BorrTJBY.d.cts +32 -0
  16. package/dist/metadata-BUzwE_-u.d.ts +10 -0
  17. package/dist/metadata-CYXgXL_h.d.cts +10 -0
  18. package/dist/{ns-C14w-Zhf.d.cts → ns-DrleaIZQ.d.cts} +3 -1
  19. package/dist/{ns-CTyKJZeF.d.ts → ns-E0TfX9tZ.d.ts} +3 -1
  20. package/dist/ooo1/ns.cjs +9 -0
  21. package/dist/ooo1/ns.d.cts +2 -2
  22. package/dist/ooo1/ns.d.ts +2 -2
  23. package/dist/ooo1/ns.js +8 -1
  24. package/dist/ooo1/properties.cjs +30 -0
  25. package/dist/ooo1/properties.d.cts +6 -2
  26. package/dist/ooo1/properties.d.ts +6 -2
  27. package/dist/ooo1/properties.js +30 -1
  28. package/dist/ooo1/read.cjs +1 -1
  29. package/dist/ooo1/read.d.cts +1 -1
  30. package/dist/ooo1/read.d.ts +1 -1
  31. package/dist/ooo1/read.js +1 -1
  32. package/dist/ooo1/transform.cjs +290 -0
  33. package/dist/ooo1/transform.d.cts +2 -2
  34. package/dist/ooo1/transform.d.ts +2 -2
  35. package/dist/ooo1/transform.js +293 -4
  36. package/dist/ooo1/write.cjs +40 -0
  37. package/dist/ooo1/write.d.cts +2 -0
  38. package/dist/ooo1/write.d.ts +2 -0
  39. package/dist/ooo1/write.js +32 -0
  40. package/dist/package-io/scaffold.cjs +65 -0
  41. package/dist/package-io/scaffold.d.cts +2 -0
  42. package/dist/package-io/scaffold.d.ts +2 -0
  43. package/dist/package-io/scaffold.js +62 -0
  44. package/dist/paragraph-Bf6Iq5wC.d.cts +28 -0
  45. package/dist/paragraph-DtC86tft.d.ts +28 -0
  46. package/dist/{path-CK0dIPgx.d.cts → path-8HQS-J7y.d.cts} +3 -1
  47. package/dist/{path-CK0dIPgx.d.ts → path-8HQS-J7y.d.ts} +3 -1
  48. package/dist/{read-Bo1GBjSE.d.ts → read-A3CJkqVM.d.ts} +3 -1
  49. package/dist/{read-RFqq4ckj.d.cts → read-BgnLFuSi.d.cts} +1 -1
  50. package/dist/{read-3yy5EFV_.d.ts → read-CqaZ01kU.d.ts} +1 -1
  51. package/dist/{read-tpfiT_n4.d.cts → read-fphkvCpR.d.cts} +3 -1
  52. package/dist/{registry-Dajfxsbz.d.ts → registry-C_16-N6i.d.ts} +2 -0
  53. package/dist/{registry-B-ZkdQv1.d.cts → registry-PoQIRgbY.d.cts} +2 -0
  54. package/dist/scaffold-44EIMGll.d.cts +8 -0
  55. package/dist/scaffold-ehGsIpZ5.d.ts +8 -0
  56. package/dist/{shapes-QkOsc-WT.d.ts → shapes-B6Ms7ibr.d.ts} +1 -1
  57. package/dist/{shapes-BCjeY90t.d.cts → shapes-CbBc9t0y.d.cts} +1 -1
  58. package/dist/styles/properties.cjs +1 -1
  59. package/dist/styles/properties.js +2 -2
  60. package/dist/styles/registry.cjs +9 -6
  61. package/dist/styles/registry.d.cts +1 -1
  62. package/dist/styles/registry.d.ts +1 -1
  63. package/dist/styles/registry.js +9 -6
  64. package/dist/table-CECMtPxZ.d.cts +20 -0
  65. package/dist/table-XuniPr2I.d.ts +20 -0
  66. package/dist/text-B8350HA2.d.ts +17 -0
  67. package/dist/text-pmlTqzgi.d.cts +17 -0
  68. package/dist/{transform-SDysw9wx.d.cts → transform-DFCPKX7e.d.cts} +2 -1
  69. package/dist/{transform-DRr76JEu.d.ts → transform-DPliWQuD.d.ts} +2 -1
  70. package/dist/typed/draw/embedded.cjs +1 -1
  71. package/dist/typed/draw/embedded.js +1 -1
  72. package/dist/typed/draw/shapes.cjs +7 -2
  73. package/dist/typed/draw/shapes.d.cts +1 -1
  74. package/dist/typed/draw/shapes.d.ts +1 -1
  75. package/dist/typed/draw/shapes.js +7 -2
  76. package/dist/typed/draw/write-shapes.cjs +210 -0
  77. package/dist/typed/draw/write-shapes.d.cts +2 -0
  78. package/dist/typed/draw/write-shapes.d.ts +2 -0
  79. package/dist/typed/draw/write-shapes.js +203 -0
  80. package/dist/typed/draw/write-vectors.cjs +132 -0
  81. package/dist/typed/draw/write-vectors.d.cts +2 -0
  82. package/dist/typed/draw/write-vectors.d.ts +2 -0
  83. package/dist/typed/draw/write-vectors.js +129 -0
  84. package/dist/typed/odb/form.cjs +1 -1
  85. package/dist/typed/odb/form.js +1 -1
  86. package/dist/typed/odg/write.cjs +80 -0
  87. package/dist/typed/odg/write.d.cts +2 -0
  88. package/dist/typed/odg/write.d.ts +2 -0
  89. package/dist/typed/odg/write.js +77 -0
  90. package/dist/typed/odp/write.cjs +108 -0
  91. package/dist/typed/odp/write.d.cts +2 -0
  92. package/dist/typed/odp/write.d.ts +2 -0
  93. package/dist/typed/odp/write.js +105 -0
  94. package/dist/typed/ods/read.cjs +3 -1
  95. package/dist/typed/ods/read.d.cts +2 -2
  96. package/dist/typed/ods/read.d.ts +2 -2
  97. package/dist/typed/ods/read.js +2 -2
  98. package/dist/typed/ods/write.cjs +578 -0
  99. package/dist/typed/ods/write.d.cts +2 -0
  100. package/dist/typed/ods/write.d.ts +2 -0
  101. package/dist/typed/ods/write.js +575 -0
  102. package/dist/typed/odt/read.cjs +1 -1
  103. package/dist/typed/odt/read.js +1 -1
  104. package/dist/typed/odt/write.cjs +278 -0
  105. package/dist/typed/odt/write.d.cts +2 -0
  106. package/dist/typed/odt/write.d.ts +2 -0
  107. package/dist/typed/odt/write.js +275 -0
  108. package/dist/typed/shared/canonicalise.cjs +126 -0
  109. package/dist/typed/shared/canonicalise.d.cts +10 -0
  110. package/dist/typed/shared/canonicalise.d.ts +10 -0
  111. package/dist/typed/shared/canonicalise.js +120 -0
  112. package/dist/typed/shared/cascade.d.cts +1 -1
  113. package/dist/typed/shared/cascade.d.ts +1 -1
  114. package/dist/typed/shared/list.cjs +81 -0
  115. package/dist/typed/shared/list.d.cts +2 -2
  116. package/dist/typed/shared/list.d.ts +2 -2
  117. package/dist/typed/shared/list.js +75 -1
  118. package/dist/typed/shared/metadata.cjs +41 -0
  119. package/dist/typed/shared/metadata.d.cts +2 -2
  120. package/dist/typed/shared/metadata.d.ts +2 -2
  121. package/dist/typed/shared/metadata.js +41 -2
  122. package/dist/typed/shared/paragraph.cjs +118 -2
  123. package/dist/typed/shared/paragraph.d.cts +2 -2
  124. package/dist/typed/shared/paragraph.d.ts +2 -2
  125. package/dist/typed/shared/paragraph.js +117 -5
  126. package/dist/typed/shared/path.cjs +19 -0
  127. package/dist/typed/shared/path.d.cts +2 -2
  128. package/dist/typed/shared/path.d.ts +2 -2
  129. package/dist/typed/shared/path.js +18 -1
  130. package/dist/typed/shared/table.cjs +84 -0
  131. package/dist/typed/shared/table.d.cts +2 -2
  132. package/dist/typed/shared/table.d.ts +2 -2
  133. package/dist/typed/shared/table.js +84 -4
  134. package/dist/typed/shared/text.cjs +60 -0
  135. package/dist/typed/shared/text.d.cts +2 -2
  136. package/dist/typed/shared/text.d.ts +2 -2
  137. package/dist/typed/shared/text.js +60 -2
  138. package/dist/typed/shared/units.cjs +16 -1
  139. package/dist/typed/shared/units.d.cts +2 -2
  140. package/dist/typed/shared/units.d.ts +2 -2
  141. package/dist/typed/shared/units.js +16 -2
  142. package/dist/{units-BQSNkTQZ.d.cts → units-DdyaQolR.d.cts} +2 -1
  143. package/dist/{units-BQSNkTQZ.d.ts → units-DdyaQolR.d.ts} +2 -1
  144. package/dist/write-4kMi-asu.d.ts +14 -0
  145. package/dist/write-BZXpT8F6.d.cts +17 -0
  146. package/dist/write-BhG3t3fJ.d.cts +14 -0
  147. package/dist/write-BuLQmwLD.d.cts +14 -0
  148. package/dist/write-C2c4xBXs.d.cts +14 -0
  149. package/dist/write-CPATqG4v.d.cts +14 -0
  150. package/dist/write-CfTE2jY8.d.ts +14 -0
  151. package/dist/write-DttX1rTC.d.ts +14 -0
  152. package/dist/write-JERychL3.d.ts +14 -0
  153. package/dist/write-SKnCTU4C.d.ts +17 -0
  154. package/dist/write-shapes-Co7BrmMZ.d.ts +36 -0
  155. package/dist/write-shapes-D4piGKf4.d.cts +36 -0
  156. package/dist/write-vectors-B-RVHAKI.d.cts +11 -0
  157. package/dist/write-vectors-CYjZoVBW.d.ts +11 -0
  158. package/package.json +2 -2
  159. package/dist/list-DwTyo_B2.d.cts +0 -13
  160. package/dist/list-X_GJY7P3.d.ts +0 -13
  161. package/dist/metadata-01SgHkRR.d.cts +0 -7
  162. package/dist/metadata-D1SOBTh8.d.ts +0 -7
  163. package/dist/paragraph-ByTzS8Li.d.ts +0 -18
  164. package/dist/paragraph-CVULactG.d.cts +0 -18
  165. package/dist/table-CYvFMlP6.d.cts +0 -14
  166. package/dist/table-DclDgC5h.d.ts +0 -14
  167. package/dist/text-Bn3C7lnm.d.ts +0 -10
  168. package/dist/text-CDUCcwje.d.cts +0 -10
@@ -0,0 +1,10 @@
1
+ import { Color, ContentImageBlock, ContentParagraph, ContentRun, ContentTable, LayoutMetadata } from "document-schema.js";
2
+ //#region src/typed/shared/canonicalise.d.ts
3
+ declare function canonicalColor(color: Color): Color;
4
+ declare function canonicalRun(run: ContentRun): ContentRun;
5
+ declare function canonicalParagraph(paragraph: ContentParagraph, listNumId: string | undefined): ContentParagraph;
6
+ declare function canonicalTable(table: ContentTable): ContentTable;
7
+ declare function canonicalMetadata(metadata: LayoutMetadata): LayoutMetadata;
8
+ declare function canonicalImage(image: ContentImageBlock): ContentImageBlock;
9
+ //#endregion
10
+ export { canonicalColor, canonicalImage, canonicalMetadata, canonicalParagraph, canonicalRun, canonicalTable };
@@ -0,0 +1,10 @@
1
+ import { Color, ContentImageBlock, ContentParagraph, ContentRun, ContentTable, LayoutMetadata } from "document-schema.js";
2
+ //#region src/typed/shared/canonicalise.d.ts
3
+ declare function canonicalColor(color: Color): Color;
4
+ declare function canonicalRun(run: ContentRun): ContentRun;
5
+ declare function canonicalParagraph(paragraph: ContentParagraph, listNumId: string | undefined): ContentParagraph;
6
+ declare function canonicalTable(table: ContentTable): ContentTable;
7
+ declare function canonicalMetadata(metadata: LayoutMetadata): LayoutMetadata;
8
+ declare function canonicalImage(image: ContentImageBlock): ContentImageBlock;
9
+ //#endregion
10
+ export { canonicalColor, canonicalImage, canonicalMetadata, canonicalParagraph, canonicalRun, canonicalTable };
@@ -0,0 +1,120 @@
1
+ import { segmentOdfParagraphRuns } from "./paragraph.js";
2
+ import { colorToRgbHex, rgbHexToColor } from "document-schema.js";
3
+ //#region src/typed/shared/canonicalise.ts
4
+ function unsupportedContent(what, where) {
5
+ return /* @__PURE__ */ new Error(`${where} carries ${what}, which no ODF writer in this package can produce yet -- refusing to state a canonical form for content that would be silently lost on write. See ExaDev/documents.js for the tracked follow-up covering the fidelity constructs and embedded objects.`);
6
+ }
7
+ function canonicalColor(color) {
8
+ return rgbHexToColor(colorToRgbHex(color));
9
+ }
10
+ function canonicalRun(run) {
11
+ const canonical = { text: run.text };
12
+ if (run.bold !== void 0) canonical.bold = run.bold;
13
+ if (run.italic !== void 0) canonical.italic = run.italic;
14
+ if (run.underline !== void 0) canonical.underline = run.underline;
15
+ if (run.strike !== void 0) canonical.strike = run.strike;
16
+ if (run.fontFamily !== void 0) canonical.fontFamily = run.fontFamily;
17
+ if (run.sizePt !== void 0) canonical.sizePt = run.sizePt;
18
+ if (run.color !== void 0) canonical.color = canonicalColor(run.color);
19
+ if (run.hyperlink !== void 0) canonical.hyperlink = run.hyperlink;
20
+ return canonical;
21
+ }
22
+ function canonicalParagraph(paragraph, listNumId) {
23
+ if (paragraph.constructs !== void 0 && paragraph.constructs.length > 0) throw unsupportedContent("run-level construct extents (a field, bookmark, note, annotation, or tracked change)", "a paragraph");
24
+ const canonical = {
25
+ kind: "paragraph",
26
+ runs: segmentOdfParagraphRuns(paragraph.runs).map(canonicalRun)
27
+ };
28
+ if (paragraph.headingLevel !== void 0) {
29
+ canonical.headingLevel = paragraph.headingLevel;
30
+ canonical.styleId = `Heading${paragraph.headingLevel}`;
31
+ }
32
+ if (paragraph.alignment !== void 0) canonical.alignment = paragraph.alignment;
33
+ if (listNumId !== void 0 && paragraph.list !== void 0) canonical.list = {
34
+ numId: listNumId,
35
+ level: paragraph.list.level
36
+ };
37
+ if (paragraph.spacingBeforePt !== void 0) canonical.spacingBeforePt = paragraph.spacingBeforePt;
38
+ if (paragraph.spacingAfterPt !== void 0) canonical.spacingAfterPt = paragraph.spacingAfterPt;
39
+ if (paragraph.lineSpacing !== void 0) canonical.lineSpacing = paragraph.lineSpacing;
40
+ if (paragraph.indentLeftPt !== void 0) canonical.indentLeftPt = paragraph.indentLeftPt;
41
+ if (paragraph.indentFirstLinePt !== void 0) canonical.indentFirstLinePt = paragraph.indentFirstLinePt;
42
+ if (paragraph.pageBreakBefore !== void 0) canonical.pageBreakBefore = paragraph.pageBreakBefore;
43
+ if (paragraph.pageBreakAfter !== void 0) canonical.pageBreakAfter = paragraph.pageBreakAfter;
44
+ return canonical;
45
+ }
46
+ function canonicalCell(cell, covered) {
47
+ if (covered) return { blocks: [] };
48
+ const canonical = { blocks: cell.blocks.map((block) => {
49
+ if (block.kind !== "paragraph") throw unsupportedContent(`a "${block.kind}" block`, "a table cell");
50
+ return canonicalParagraph(block, void 0);
51
+ }) };
52
+ if (cell.colSpan !== void 0) canonical.colSpan = cell.colSpan;
53
+ if (cell.rowSpan !== void 0) canonical.rowSpan = cell.rowSpan;
54
+ if (cell.background !== void 0) canonical.background = canonicalColor(cell.background);
55
+ if (cell.borders !== void 0) {
56
+ const borders = {};
57
+ for (const edge of [
58
+ "left",
59
+ "right",
60
+ "top",
61
+ "bottom"
62
+ ]) {
63
+ const border = cell.borders[edge];
64
+ if (border !== void 0) borders[edge] = {
65
+ color: canonicalColor(border.color),
66
+ widthPt: border.widthPt,
67
+ style: border.style ?? "solid"
68
+ };
69
+ }
70
+ canonical.borders = borders;
71
+ }
72
+ return canonical;
73
+ }
74
+ function canonicalTable(table) {
75
+ const covered = /* @__PURE__ */ new Set();
76
+ return {
77
+ kind: "table",
78
+ columnWidthsPt: [...table.columnWidthsPt],
79
+ rows: table.rows.map((row, rowIndex) => {
80
+ const cells = row.cells.map((cell, columnIndex) => {
81
+ const key = `${rowIndex},${columnIndex}`;
82
+ const isCovered = covered.has(key);
83
+ if (!isCovered) {
84
+ const colSpan = cell.colSpan ?? 1;
85
+ const rowSpan = cell.rowSpan ?? 1;
86
+ for (let r = rowIndex; r < rowIndex + rowSpan; r += 1) for (let c = columnIndex; c < columnIndex + colSpan; c += 1) if (r !== rowIndex || c !== columnIndex) covered.add(`${r},${c}`);
87
+ }
88
+ return canonicalCell(cell, isCovered);
89
+ });
90
+ return row.heightPt === void 0 ? { cells } : {
91
+ cells,
92
+ heightPt: row.heightPt
93
+ };
94
+ })
95
+ };
96
+ }
97
+ function canonicalMetadata(metadata) {
98
+ const canonical = {};
99
+ if (metadata.title !== void 0) canonical.title = metadata.title;
100
+ if (metadata.author !== void 0) canonical.author = metadata.author;
101
+ if (metadata.subject !== void 0) canonical.subject = metadata.subject;
102
+ if (metadata.keywords !== void 0 && metadata.keywords.length > 0) canonical.keywords = [...metadata.keywords];
103
+ if (metadata.creator !== void 0) canonical.creator = metadata.creator;
104
+ if (metadata.createdIso !== void 0) canonical.createdIso = metadata.createdIso;
105
+ if (metadata.modifiedIso !== void 0) canonical.modifiedIso = metadata.modifiedIso;
106
+ return canonical;
107
+ }
108
+ function canonicalImage(image) {
109
+ const canonical = {
110
+ kind: "image",
111
+ format: image.format,
112
+ base64: image.base64,
113
+ widthPt: image.widthPt,
114
+ heightPt: image.heightPt
115
+ };
116
+ if (image.altText !== void 0) canonical.altText = image.altText;
117
+ return canonical;
118
+ }
119
+ //#endregion
120
+ export { canonicalColor, canonicalImage, canonicalMetadata, canonicalParagraph, canonicalRun, canonicalTable };
@@ -1,2 +1,2 @@
1
- import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "../../cascade-BDkyOmoo.cjs";
1
+ import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "../../cascade-BpMwrjkB.cjs";
2
2
  export { CascadeDiagnostic, StyleCascadeResult, StyleElementChainResult, findStyleElement, resolveStyle, resolveStyleElementChain };
@@ -1,2 +1,2 @@
1
- import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "../../cascade-CaVinmvp.js";
1
+ import { a as resolveStyle, i as findStyleElement, n as StyleCascadeResult, o as resolveStyleElementChain, r as StyleElementChainResult, t as CascadeDiagnostic } from "../../cascade-PDS3hgrP.js";
2
2
  export { CascadeDiagnostic, StyleCascadeResult, StyleElementChainResult, findStyleElement, resolveStyle, resolveStyleElementChain };
@@ -1,4 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_xml_fragment = require("../../xml/fragment.cjs");
3
+ const require_xml_entities = require("../../xml/entities.cjs");
4
+ const require_typed_shared_units = require("./units.cjs");
2
5
  const require_xml_query = require("../../xml/query.cjs");
3
6
  //#region src/typed/shared/list.ts
4
7
  function resolveOdfListKind(pkg, styleName) {
@@ -26,6 +29,77 @@ function mintOdfListNumId(pkg, listElement, state) {
26
29
  state.next += 1;
27
30
  return numId;
28
31
  }
32
+ const ODF_LIST_LEVELS = 10;
33
+ const LIST_INDENT_STEP_PT = 18;
34
+ const LIST_BULLET_CHARACTER = "•";
35
+ function buildOdfListStyle(styleName, kind) {
36
+ const levels = [];
37
+ for (let level = 1; level <= ODF_LIST_LEVELS; level += 1) {
38
+ const properties = require_xml_fragment.el("style:list-level-properties", {
39
+ "text:space-before": require_typed_shared_units.formatOdfLength(level * LIST_INDENT_STEP_PT),
40
+ "text:min-label-width": require_typed_shared_units.formatOdfLength(LIST_INDENT_STEP_PT)
41
+ });
42
+ levels.push(kind === "ordered" ? require_xml_fragment.el("text:list-level-style-number", {
43
+ "text:level": String(level),
44
+ "style:num-suffix": ".",
45
+ "style:num-format": "1"
46
+ }, [properties]) : require_xml_fragment.el("text:list-level-style-bullet", {
47
+ "text:level": String(level),
48
+ "text:bullet-char": LIST_BULLET_CHARACTER
49
+ }, [properties]));
50
+ }
51
+ return require_xml_fragment.el("text:list-style", { "style:name": require_xml_entities.encodeXmlText(styleName) }, levels);
52
+ }
53
+ function writeOdfList(entries, styleName) {
54
+ const root = require_xml_fragment.el("text:list", styleName === void 0 ? {} : { "text:style-name": require_xml_entities.encodeXmlText(styleName) });
55
+ const openLists = [root];
56
+ for (const entry of entries) {
57
+ const level = Math.max(0, Math.trunc(entry.level));
58
+ while (openLists.length - 1 > level) openLists.pop();
59
+ while (openLists.length - 1 < level) {
60
+ const enclosing = openLists[openLists.length - 1];
61
+ const lastChild = enclosing.children[enclosing.children.length - 1];
62
+ let host;
63
+ if (lastChild?.type === "element" && lastChild.tag === "text:list-item") host = lastChild;
64
+ else {
65
+ host = require_xml_fragment.el("text:list-item");
66
+ enclosing.children.push(host);
67
+ }
68
+ const nested = require_xml_fragment.el("text:list");
69
+ host.children.push(nested);
70
+ openLists.push(nested);
71
+ }
72
+ openLists[openLists.length - 1].children.push(require_xml_fragment.el("text:list-item", {}, [entry.element]));
73
+ }
74
+ return root;
75
+ }
76
+ function listKindOf(numId) {
77
+ if (numId === void 0) return;
78
+ if (numId.startsWith("ordered:")) return "ordered";
79
+ return numId.startsWith("bullet:") ? "bullet" : void 0;
80
+ }
81
+ const NO_NUM_ID_KEY = "\0";
82
+ function canonicalNumId(incoming, ordinal) {
83
+ const kind = listKindOf(incoming);
84
+ return kind === void 0 ? `list${ordinal}` : `${kind}:list${ordinal}`;
85
+ }
86
+ function planListMembership(membership, listState) {
87
+ if (membership === void 0) {
88
+ closeListPlan(listState);
89
+ return;
90
+ }
91
+ const incomingKey = membership.numId ?? "\0";
92
+ if (listState.openNumId !== incomingKey) {
93
+ listState.openNumId = incomingKey;
94
+ listState.openCanonicalNumId = canonicalNumId(membership.numId, listState.next);
95
+ listState.next += 1;
96
+ }
97
+ return listState.openCanonicalNumId;
98
+ }
99
+ function closeListPlan(listState) {
100
+ listState.openNumId = void 0;
101
+ listState.openCanonicalNumId = void 0;
102
+ }
29
103
  function readOdfListParagraphs(listElement, membership, readParagraph) {
30
104
  const paragraphs = [];
31
105
  for (const item of listElement.children) {
@@ -45,6 +119,13 @@ function readOdfListParagraphs(listElement, membership, readParagraph) {
45
119
  return paragraphs;
46
120
  }
47
121
  //#endregion
122
+ exports.NO_NUM_ID_KEY = NO_NUM_ID_KEY;
123
+ exports.buildOdfListStyle = buildOdfListStyle;
124
+ exports.canonicalNumId = canonicalNumId;
125
+ exports.closeListPlan = closeListPlan;
126
+ exports.listKindOf = listKindOf;
48
127
  exports.mintOdfListNumId = mintOdfListNumId;
128
+ exports.planListMembership = planListMembership;
49
129
  exports.readOdfListParagraphs = readOdfListParagraphs;
50
130
  exports.resolveOdfListKind = resolveOdfListKind;
131
+ exports.writeOdfList = writeOdfList;
@@ -1,2 +1,2 @@
1
- import { a as resolveOdfListKind, i as readOdfListParagraphs, n as OdfListParagraphReader, r as mintOdfListNumId, t as OdfListIdState } from "../../list-DwTyo_B2.cjs";
2
- export { OdfListIdState, OdfListParagraphReader, mintOdfListNumId, readOdfListParagraphs, resolveOdfListKind };
1
+ import { a as OdfListParagraphReader, c as closeListPlan, d as planListMembership, f as readOdfListParagraphs, i as OdfListIdState, l as listKindOf, m as writeOdfList, n as NO_NUM_ID_KEY, o as buildOdfListStyle, p as resolveOdfListKind, r as OdfListEntry, s as canonicalNumId, t as ListPlanState, u as mintOdfListNumId } from "../../list-BorrTJBY.cjs";
2
+ export { ListPlanState, NO_NUM_ID_KEY, OdfListEntry, OdfListIdState, OdfListParagraphReader, buildOdfListStyle, canonicalNumId, closeListPlan, listKindOf, mintOdfListNumId, planListMembership, readOdfListParagraphs, resolveOdfListKind, writeOdfList };
@@ -1,2 +1,2 @@
1
- import { a as resolveOdfListKind, i as readOdfListParagraphs, n as OdfListParagraphReader, r as mintOdfListNumId, t as OdfListIdState } from "../../list-X_GJY7P3.js";
2
- export { OdfListIdState, OdfListParagraphReader, mintOdfListNumId, readOdfListParagraphs, resolveOdfListKind };
1
+ import { a as OdfListParagraphReader, c as closeListPlan, d as planListMembership, f as readOdfListParagraphs, i as OdfListIdState, l as listKindOf, m as writeOdfList, n as NO_NUM_ID_KEY, o as buildOdfListStyle, p as resolveOdfListKind, r as OdfListEntry, s as canonicalNumId, t as ListPlanState, u as mintOdfListNumId } from "../../list-7FO0SDqZ.js";
2
+ export { ListPlanState, NO_NUM_ID_KEY, OdfListEntry, OdfListIdState, OdfListParagraphReader, buildOdfListStyle, canonicalNumId, closeListPlan, listKindOf, mintOdfListNumId, planListMembership, readOdfListParagraphs, resolveOdfListKind, writeOdfList };
@@ -1,3 +1,6 @@
1
+ import { el } from "../../xml/fragment.js";
2
+ import { encodeXmlText } from "../../xml/entities.js";
3
+ import { formatOdfLength } from "./units.js";
1
4
  import { attrValue, childrenWithTag, findChildElement, rootElement } from "../../xml/query.js";
2
5
  //#region src/typed/shared/list.ts
3
6
  function resolveOdfListKind(pkg, styleName) {
@@ -25,6 +28,77 @@ function mintOdfListNumId(pkg, listElement, state) {
25
28
  state.next += 1;
26
29
  return numId;
27
30
  }
31
+ const ODF_LIST_LEVELS = 10;
32
+ const LIST_INDENT_STEP_PT = 18;
33
+ const LIST_BULLET_CHARACTER = "•";
34
+ function buildOdfListStyle(styleName, kind) {
35
+ const levels = [];
36
+ for (let level = 1; level <= ODF_LIST_LEVELS; level += 1) {
37
+ const properties = el("style:list-level-properties", {
38
+ "text:space-before": formatOdfLength(level * LIST_INDENT_STEP_PT),
39
+ "text:min-label-width": formatOdfLength(LIST_INDENT_STEP_PT)
40
+ });
41
+ levels.push(kind === "ordered" ? el("text:list-level-style-number", {
42
+ "text:level": String(level),
43
+ "style:num-suffix": ".",
44
+ "style:num-format": "1"
45
+ }, [properties]) : el("text:list-level-style-bullet", {
46
+ "text:level": String(level),
47
+ "text:bullet-char": LIST_BULLET_CHARACTER
48
+ }, [properties]));
49
+ }
50
+ return el("text:list-style", { "style:name": encodeXmlText(styleName) }, levels);
51
+ }
52
+ function writeOdfList(entries, styleName) {
53
+ const root = el("text:list", styleName === void 0 ? {} : { "text:style-name": encodeXmlText(styleName) });
54
+ const openLists = [root];
55
+ for (const entry of entries) {
56
+ const level = Math.max(0, Math.trunc(entry.level));
57
+ while (openLists.length - 1 > level) openLists.pop();
58
+ while (openLists.length - 1 < level) {
59
+ const enclosing = openLists[openLists.length - 1];
60
+ const lastChild = enclosing.children[enclosing.children.length - 1];
61
+ let host;
62
+ if (lastChild?.type === "element" && lastChild.tag === "text:list-item") host = lastChild;
63
+ else {
64
+ host = el("text:list-item");
65
+ enclosing.children.push(host);
66
+ }
67
+ const nested = el("text:list");
68
+ host.children.push(nested);
69
+ openLists.push(nested);
70
+ }
71
+ openLists[openLists.length - 1].children.push(el("text:list-item", {}, [entry.element]));
72
+ }
73
+ return root;
74
+ }
75
+ function listKindOf(numId) {
76
+ if (numId === void 0) return;
77
+ if (numId.startsWith("ordered:")) return "ordered";
78
+ return numId.startsWith("bullet:") ? "bullet" : void 0;
79
+ }
80
+ const NO_NUM_ID_KEY = "\0";
81
+ function canonicalNumId(incoming, ordinal) {
82
+ const kind = listKindOf(incoming);
83
+ return kind === void 0 ? `list${ordinal}` : `${kind}:list${ordinal}`;
84
+ }
85
+ function planListMembership(membership, listState) {
86
+ if (membership === void 0) {
87
+ closeListPlan(listState);
88
+ return;
89
+ }
90
+ const incomingKey = membership.numId ?? "\0";
91
+ if (listState.openNumId !== incomingKey) {
92
+ listState.openNumId = incomingKey;
93
+ listState.openCanonicalNumId = canonicalNumId(membership.numId, listState.next);
94
+ listState.next += 1;
95
+ }
96
+ return listState.openCanonicalNumId;
97
+ }
98
+ function closeListPlan(listState) {
99
+ listState.openNumId = void 0;
100
+ listState.openCanonicalNumId = void 0;
101
+ }
28
102
  function readOdfListParagraphs(listElement, membership, readParagraph) {
29
103
  const paragraphs = [];
30
104
  for (const item of listElement.children) {
@@ -44,4 +118,4 @@ function readOdfListParagraphs(listElement, membership, readParagraph) {
44
118
  return paragraphs;
45
119
  }
46
120
  //#endregion
47
- export { mintOdfListNumId, readOdfListParagraphs, resolveOdfListKind };
121
+ export { NO_NUM_ID_KEY, buildOdfListStyle, canonicalNumId, closeListPlan, listKindOf, mintOdfListNumId, planListMembership, readOdfListParagraphs, resolveOdfListKind, writeOdfList };
@@ -1,4 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_ns = require("../../ns.cjs");
3
+ const require_xml_fragment = require("../../xml/fragment.cjs");
2
4
  const require_xml_entities = require("../../xml/entities.cjs");
3
5
  const require_xml_query = require("../../xml/query.cjs");
4
6
  //#region src/typed/shared/metadata.ts
@@ -37,6 +39,45 @@ function readOdfMetadata(pkg) {
37
39
  if (modifiedIso !== void 0) metadata.modifiedIso = modifiedIso;
38
40
  return metadata;
39
41
  }
42
+ function metaElement(tag, value) {
43
+ return require_xml_fragment.el(tag, {}, [require_xml_fragment.txt(require_xml_entities.encodeXmlText(value))]);
44
+ }
45
+ function buildOdfMetaNodes(metadata, version) {
46
+ const children = [];
47
+ if (metadata.creator !== void 0) children.push(metaElement("meta:generator", metadata.creator));
48
+ if (metadata.title !== void 0) children.push(metaElement("dc:title", metadata.title));
49
+ if (metadata.subject !== void 0) children.push(metaElement("dc:subject", metadata.subject));
50
+ for (const keyword of metadata.keywords ?? []) children.push(metaElement("meta:keyword", keyword));
51
+ if (metadata.author !== void 0) children.push(metaElement("meta:initial-creator", metadata.author));
52
+ if (metadata.createdIso !== void 0) children.push(metaElement("meta:creation-date", metadata.createdIso));
53
+ if (metadata.modifiedIso !== void 0) children.push(metaElement("dc:date", metadata.modifiedIso));
54
+ if (metadata.language !== void 0) children.push(metaElement("dc:language", metadata.language));
55
+ return [{
56
+ type: "declaration",
57
+ attributes: [{
58
+ name: "version",
59
+ value: "1.0"
60
+ }, {
61
+ name: "encoding",
62
+ value: "UTF-8"
63
+ }]
64
+ }, require_xml_fragment.el("office:document-meta", {
65
+ ...require_ns.xmlnsAttributes([
66
+ "office",
67
+ "meta",
68
+ "dc"
69
+ ]),
70
+ "office:version": require_xml_entities.encodeXmlText(version)
71
+ }, [require_xml_fragment.el("office:meta", {}, children)])];
72
+ }
73
+ function writeOdfMetadata(pkg, metadata, version) {
74
+ pkg.parts[META_PART] = {
75
+ kind: "xml",
76
+ nodes: buildOdfMetaNodes(metadata, version)
77
+ };
78
+ }
40
79
  //#endregion
41
80
  exports.META_PART = META_PART;
81
+ exports.buildOdfMetaNodes = buildOdfMetaNodes;
42
82
  exports.readOdfMetadata = readOdfMetadata;
83
+ exports.writeOdfMetadata = writeOdfMetadata;
@@ -1,2 +1,2 @@
1
- import { n as readOdfMetadata, t as META_PART } from "../../metadata-01SgHkRR.cjs";
2
- export { META_PART, readOdfMetadata };
1
+ import { i as writeOdfMetadata, n as buildOdfMetaNodes, r as readOdfMetadata, t as META_PART } from "../../metadata-CYXgXL_h.cjs";
2
+ export { META_PART, buildOdfMetaNodes, readOdfMetadata, writeOdfMetadata };
@@ -1,2 +1,2 @@
1
- import { n as readOdfMetadata, t as META_PART } from "../../metadata-D1SOBTh8.js";
2
- export { META_PART, readOdfMetadata };
1
+ import { i as writeOdfMetadata, n as buildOdfMetaNodes, r as readOdfMetadata, t as META_PART } from "../../metadata-BUzwE_-u.js";
2
+ export { META_PART, buildOdfMetaNodes, readOdfMetadata, writeOdfMetadata };
@@ -1,4 +1,6 @@
1
- import { decodeXmlText } from "../../xml/entities.js";
1
+ import { xmlnsAttributes } from "../../ns.js";
2
+ import { el, txt } from "../../xml/fragment.js";
3
+ import { decodeXmlText, encodeXmlText } from "../../xml/entities.js";
2
4
  import { childrenWithTag, findChildElement, rootElement } from "../../xml/query.js";
3
5
  //#region src/typed/shared/metadata.ts
4
6
  const META_PART = "meta.xml";
@@ -36,5 +38,42 @@ function readOdfMetadata(pkg) {
36
38
  if (modifiedIso !== void 0) metadata.modifiedIso = modifiedIso;
37
39
  return metadata;
38
40
  }
41
+ function metaElement(tag, value) {
42
+ return el(tag, {}, [txt(encodeXmlText(value))]);
43
+ }
44
+ function buildOdfMetaNodes(metadata, version) {
45
+ const children = [];
46
+ if (metadata.creator !== void 0) children.push(metaElement("meta:generator", metadata.creator));
47
+ if (metadata.title !== void 0) children.push(metaElement("dc:title", metadata.title));
48
+ if (metadata.subject !== void 0) children.push(metaElement("dc:subject", metadata.subject));
49
+ for (const keyword of metadata.keywords ?? []) children.push(metaElement("meta:keyword", keyword));
50
+ if (metadata.author !== void 0) children.push(metaElement("meta:initial-creator", metadata.author));
51
+ if (metadata.createdIso !== void 0) children.push(metaElement("meta:creation-date", metadata.createdIso));
52
+ if (metadata.modifiedIso !== void 0) children.push(metaElement("dc:date", metadata.modifiedIso));
53
+ if (metadata.language !== void 0) children.push(metaElement("dc:language", metadata.language));
54
+ return [{
55
+ type: "declaration",
56
+ attributes: [{
57
+ name: "version",
58
+ value: "1.0"
59
+ }, {
60
+ name: "encoding",
61
+ value: "UTF-8"
62
+ }]
63
+ }, el("office:document-meta", {
64
+ ...xmlnsAttributes([
65
+ "office",
66
+ "meta",
67
+ "dc"
68
+ ]),
69
+ "office:version": encodeXmlText(version)
70
+ }, [el("office:meta", {}, children)])];
71
+ }
72
+ function writeOdfMetadata(pkg, metadata, version) {
73
+ pkg.parts[META_PART] = {
74
+ kind: "xml",
75
+ nodes: buildOdfMetaNodes(metadata, version)
76
+ };
77
+ }
39
78
  //#endregion
40
- export { META_PART, readOdfMetadata };
79
+ export { META_PART, buildOdfMetaNodes, readOdfMetadata, writeOdfMetadata };
@@ -1,6 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_xml_fragment = require("../../xml/fragment.cjs");
2
3
  const require_xml_entities = require("../../xml/entities.cjs");
3
4
  const require_styles_properties = require("../../styles/properties.cjs");
5
+ const require_styles_serialize = require("../../styles/serialize.cjs");
4
6
  const require_xml_query = require("../../xml/query.cjs");
5
7
  const require_typed_shared_text = require("./text.cjs");
6
8
  const require_typed_shared_cascade = require("./cascade.cjs");
@@ -42,8 +44,10 @@ function collectRuns(container, baseProperties, pkg, out, walk, hyperlinkTarget)
42
44
  ...baseProperties,
43
45
  ...require_typed_shared_cascade.resolveStyle(styleName, "text", pkg).properties
44
46
  }, pkg, out, walk, hyperlinkTarget);
45
- } else if (node.tag === "text:a") collectRuns(node, baseProperties, pkg, out, walk, require_xml_query.attrValue(node, "xlink:href") ?? hyperlinkTarget);
46
- else if (require_typed_shared_text.isOdfFieldElement(node)) {
47
+ } else if (node.tag === "text:a") {
48
+ const rawHref = require_xml_query.attrValue(node, "xlink:href");
49
+ collectRuns(node, baseProperties, pkg, out, walk, (rawHref === void 0 ? void 0 : require_xml_entities.decodeXmlText(rawHref)) ?? hyperlinkTarget);
50
+ } else if (require_typed_shared_text.isOdfFieldElement(node)) {
47
51
  const startRun = out.length;
48
52
  collectRuns(node, baseProperties, pkg, out, walk, hyperlinkTarget);
49
53
  walk.extents.push({
@@ -277,7 +281,119 @@ function readParagraphOrHeading(element, paragraph) {
277
281
  }
278
282
  return paragraph;
279
283
  }
284
+ function odfRunProperties(run) {
285
+ const properties = {};
286
+ if (run.bold !== void 0) properties.bold = run.bold;
287
+ if (run.italic !== void 0) properties.italic = run.italic;
288
+ if (run.underline !== void 0) properties.underline = run.underline;
289
+ if (run.strike !== void 0) properties.strike = run.strike;
290
+ if (run.fontFamily !== void 0) properties.fontFamily = run.fontFamily;
291
+ if (run.sizePt !== void 0) properties.sizePt = run.sizePt;
292
+ if (run.color !== void 0) properties.color = run.color;
293
+ return properties;
294
+ }
295
+ function odfParagraphProperties(paragraph) {
296
+ const properties = {};
297
+ if (paragraph.alignment !== void 0) properties.alignment = paragraph.alignment;
298
+ if (paragraph.spacingBeforePt !== void 0) properties.spacingBeforePt = paragraph.spacingBeforePt;
299
+ if (paragraph.spacingAfterPt !== void 0) properties.spacingAfterPt = paragraph.spacingAfterPt;
300
+ if (paragraph.lineSpacing !== void 0) properties.lineSpacing = paragraph.lineSpacing;
301
+ if (paragraph.indentLeftPt !== void 0) properties.indentLeftPt = paragraph.indentLeftPt;
302
+ if (paragraph.indentFirstLinePt !== void 0) properties.indentFirstLinePt = paragraph.indentFirstLinePt;
303
+ if (paragraph.pageBreakBefore !== void 0) properties.pageBreakBefore = paragraph.pageBreakBefore;
304
+ if (paragraph.pageBreakAfter !== void 0) properties.pageBreakAfter = paragraph.pageBreakAfter;
305
+ return properties;
306
+ }
307
+ const KEY_SEPARATOR = "\0";
308
+ function runFormattingKey(run) {
309
+ const hyperlink = run.hyperlink === void 0 ? "" : `link${KEY_SEPARATOR}${run.hyperlink}`;
310
+ return `${require_styles_serialize.canonicalPropertiesString(odfRunProperties(run))}${KEY_SEPARATOR}${hyperlink}`;
311
+ }
312
+ function segmentOdfParagraphRuns(runs) {
313
+ const merged = [];
314
+ for (const run of runs) {
315
+ if (run.text.length === 0) continue;
316
+ const previous = merged[merged.length - 1];
317
+ if (previous !== void 0 && runFormattingKey(previous) === runFormattingKey(run)) {
318
+ merged[merged.length - 1] = {
319
+ ...previous,
320
+ text: previous.text + run.text
321
+ };
322
+ continue;
323
+ }
324
+ merged.push(run);
325
+ }
326
+ const canonical = [];
327
+ for (const [index, run] of merged.entries()) {
328
+ const previousText = merged[index - 1]?.text;
329
+ const nextText = merged[index + 1]?.text;
330
+ const protectLeading = previousText === void 0 || previousText.endsWith(" ");
331
+ const protectTrailing = nextText === void 0 || nextText.startsWith(" ");
332
+ for (const segment of require_typed_shared_text.segmentOdfText(run.text, protectLeading, protectTrailing)) canonical.push({
333
+ ...run,
334
+ text: segment.text
335
+ });
336
+ }
337
+ return canonical;
338
+ }
339
+ function writeOdfFormattedRunNodes(canonical, from, to, registry) {
340
+ const nodes = [];
341
+ let index = from;
342
+ while (index < to) {
343
+ const properties = odfRunProperties(canonical[index]);
344
+ const key = require_styles_serialize.canonicalPropertiesString(properties);
345
+ let end = index + 1;
346
+ while (end < to && require_styles_serialize.canonicalPropertiesString(odfRunProperties(canonical[end])) === key) end += 1;
347
+ const inner = [];
348
+ for (let position = index; position < end; position += 1) {
349
+ const previousText = canonical[position - 1]?.text;
350
+ const nextText = canonical[position + 1]?.text;
351
+ inner.push(...require_typed_shared_text.buildOdfInlineNodes(require_typed_shared_text.segmentOdfText(canonical[position].text, previousText === void 0 || previousText.endsWith(" "), nextText === void 0 || nextText.startsWith(" "))));
352
+ }
353
+ if (Object.keys(properties).length === 0) nodes.push(...inner);
354
+ else nodes.push(require_xml_fragment.el("text:span", { "text:style-name": require_xml_entities.encodeXmlText(registry.intern({
355
+ properties,
356
+ family: "text"
357
+ })) }, inner));
358
+ index = end;
359
+ }
360
+ return nodes;
361
+ }
362
+ function writeOdfParagraphChildren(runs, registry) {
363
+ const canonical = segmentOdfParagraphRuns(runs);
364
+ const children = [];
365
+ let index = 0;
366
+ while (index < canonical.length) {
367
+ const target = canonical[index].hyperlink;
368
+ let end = index + 1;
369
+ while (end < canonical.length && canonical[end].hyperlink === target) end += 1;
370
+ const nodes = writeOdfFormattedRunNodes(canonical, index, end, registry);
371
+ if (target === void 0) children.push(...nodes);
372
+ else children.push(require_xml_fragment.el("text:a", {
373
+ "xlink:type": "simple",
374
+ "xlink:href": require_xml_entities.encodeXmlText(target)
375
+ }, nodes));
376
+ index = end;
377
+ }
378
+ return children;
379
+ }
380
+ function writeOdfParagraph(paragraph, registry, options = {}) {
381
+ const properties = odfParagraphProperties(paragraph);
382
+ const attributes = {};
383
+ if (Object.keys(properties).length > 0) attributes["text:style-name"] = require_xml_entities.encodeXmlText(registry.intern({
384
+ properties,
385
+ family: "paragraph",
386
+ ...options.parentStyleName === void 0 ? {} : { parentStyleName: options.parentStyleName }
387
+ }));
388
+ else if (options.parentStyleName !== void 0) attributes["text:style-name"] = require_xml_entities.encodeXmlText(options.parentStyleName);
389
+ if (paragraph.headingLevel !== void 0) attributes["text:outline-level"] = String(paragraph.headingLevel);
390
+ return require_xml_fragment.el(paragraph.headingLevel === void 0 ? "text:p" : "text:h", attributes, [...writeOdfParagraphChildren(paragraph.runs, registry), ...options.trailingNodes ?? []]);
391
+ }
280
392
  //#endregion
393
+ exports.odfParagraphProperties = odfParagraphProperties;
394
+ exports.odfRunProperties = odfRunProperties;
281
395
  exports.readOdfConstructBodyBlocks = readOdfConstructBodyBlocks;
282
396
  exports.readOdfParagraph = readOdfParagraph;
283
397
  exports.readParagraphOrHeading = readParagraphOrHeading;
398
+ exports.segmentOdfParagraphRuns = segmentOdfParagraphRuns;
399
+ exports.writeOdfParagraph = writeOdfParagraph;
@@ -1,2 +1,2 @@
1
- import { i as readParagraphOrHeading, n as readOdfConstructBodyBlocks, r as readOdfParagraph, t as OdfParagraphContext } from "../../paragraph-CVULactG.cjs";
2
- export { OdfParagraphContext, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading };
1
+ import { a as readOdfConstructBodyBlocks, c as segmentOdfParagraphRuns, i as odfRunProperties, l as writeOdfParagraph, n as OdfParagraphWriteOptions, o as readOdfParagraph, r as odfParagraphProperties, s as readParagraphOrHeading, t as OdfParagraphContext } from "../../paragraph-Bf6Iq5wC.cjs";
2
+ export { OdfParagraphContext, OdfParagraphWriteOptions, odfParagraphProperties, odfRunProperties, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading, segmentOdfParagraphRuns, writeOdfParagraph };
@@ -1,2 +1,2 @@
1
- import { i as readParagraphOrHeading, n as readOdfConstructBodyBlocks, r as readOdfParagraph, t as OdfParagraphContext } from "../../paragraph-ByTzS8Li.js";
2
- export { OdfParagraphContext, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading };
1
+ import { a as readOdfConstructBodyBlocks, c as segmentOdfParagraphRuns, i as odfRunProperties, l as writeOdfParagraph, n as OdfParagraphWriteOptions, o as readOdfParagraph, r as odfParagraphProperties, s as readParagraphOrHeading, t as OdfParagraphContext } from "../../paragraph-DtC86tft.js";
2
+ export { OdfParagraphContext, OdfParagraphWriteOptions, odfParagraphProperties, odfRunProperties, readOdfConstructBodyBlocks, readOdfParagraph, readParagraphOrHeading, segmentOdfParagraphRuns, writeOdfParagraph };