open-agreements 0.3.0 → 0.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 (429) hide show
  1. package/content/templates/closing-checklist/template.docx +0 -0
  2. package/dist/core/checklist/docx-import.d.ts +50 -0
  3. package/dist/core/checklist/docx-import.d.ts.map +1 -0
  4. package/dist/core/checklist/docx-import.js +613 -0
  5. package/dist/core/checklist/docx-import.js.map +1 -0
  6. package/dist/core/checklist/docx-table-helpers.d.ts +33 -0
  7. package/dist/core/checklist/docx-table-helpers.d.ts.map +1 -0
  8. package/dist/core/checklist/docx-table-helpers.js +154 -0
  9. package/dist/core/checklist/docx-table-helpers.js.map +1 -0
  10. package/dist/core/checklist/format-checklist-docx.d.ts.map +1 -1
  11. package/dist/core/checklist/format-checklist-docx.js +37 -88
  12. package/dist/core/checklist/format-checklist-docx.js.map +1 -1
  13. package/dist/core/checklist/index.d.ts +15 -12
  14. package/dist/core/checklist/index.d.ts.map +1 -1
  15. package/dist/core/checklist/index.js +48 -30
  16. package/dist/core/checklist/index.js.map +1 -1
  17. package/dist/core/checklist/status-labels.d.ts +6 -0
  18. package/dist/core/checklist/status-labels.d.ts.map +1 -1
  19. package/dist/core/checklist/status-labels.js +8 -0
  20. package/dist/core/checklist/status-labels.js.map +1 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +1 -1
  24. package/dist/index.js.map +1 -1
  25. package/node_modules/@usejunior/docx-core/dist/atomizer.d.ts +218 -0
  26. package/node_modules/@usejunior/docx-core/dist/atomizer.d.ts.map +1 -0
  27. package/node_modules/@usejunior/docx-core/dist/atomizer.js +869 -0
  28. package/node_modules/@usejunior/docx-core/dist/atomizer.js.map +1 -0
  29. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/atomLcs.d.ts +96 -0
  30. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/atomLcs.d.ts.map +1 -0
  31. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/atomLcs.js +347 -0
  32. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/atomLcs.js.map +1 -0
  33. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/consumerCompatibility.d.ts +2 -0
  34. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/consumerCompatibility.d.ts.map +1 -0
  35. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/consumerCompatibility.js +188 -0
  36. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/consumerCompatibility.js.map +1 -0
  37. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/debug.d.ts +41 -0
  38. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/debug.d.ts.map +1 -0
  39. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/debug.js +85 -0
  40. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/debug.js.map +1 -0
  41. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.d.ts +64 -0
  42. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.d.ts.map +1 -0
  43. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.js +985 -0
  44. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.js.map +1 -0
  45. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/hierarchicalLcs.d.ts +111 -0
  46. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/hierarchicalLcs.d.ts.map +1 -0
  47. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/hierarchicalLcs.js +469 -0
  48. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/hierarchicalLcs.js.map +1 -0
  49. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.d.ts +277 -0
  50. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.d.ts.map +1 -0
  51. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.js +2279 -0
  52. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.js.map +1 -0
  53. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/numberingIntegration.d.ts +59 -0
  54. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/numberingIntegration.d.ts.map +1 -0
  55. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/numberingIntegration.js +209 -0
  56. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/numberingIntegration.js.map +1 -0
  57. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.d.ts +69 -0
  58. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.d.ts.map +1 -0
  59. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.js +910 -0
  60. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.js.map +1 -0
  61. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/premergeRuns.d.ts +26 -0
  62. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/premergeRuns.d.ts.map +1 -0
  63. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/premergeRuns.js +153 -0
  64. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/premergeRuns.js.map +1 -0
  65. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptor.d.ts +63 -0
  66. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptor.d.ts.map +1 -0
  67. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptor.js +254 -0
  68. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptor.js.map +1 -0
  69. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.d.ts +64 -0
  70. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.d.ts.map +1 -0
  71. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.js +616 -0
  72. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.js.map +1 -0
  73. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/xmlToWmlElement.d.ts +65 -0
  74. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/xmlToWmlElement.d.ts.map +1 -0
  75. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/xmlToWmlElement.js +95 -0
  76. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/xmlToWmlElement.js.map +1 -0
  77. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DocxodusWasm.d.ts +51 -0
  78. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DocxodusWasm.d.ts.map +1 -0
  79. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DocxodusWasm.js +83 -0
  80. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DocxodusWasm.js.map +1 -0
  81. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.d.ts +40 -0
  82. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.d.ts.map +1 -0
  83. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.js +135 -0
  84. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.js.map +1 -0
  85. package/node_modules/@usejunior/docx-core/dist/cli/compare-two.d.ts +28 -0
  86. package/node_modules/@usejunior/docx-core/dist/cli/compare-two.d.ts.map +1 -0
  87. package/node_modules/@usejunior/docx-core/dist/cli/compare-two.js +110 -0
  88. package/node_modules/@usejunior/docx-core/dist/cli/compare-two.js.map +1 -0
  89. package/node_modules/@usejunior/docx-core/dist/cli/index.d.ts +3 -0
  90. package/node_modules/@usejunior/docx-core/dist/cli/index.d.ts.map +1 -0
  91. package/node_modules/@usejunior/docx-core/dist/cli/index.js +21 -0
  92. package/node_modules/@usejunior/docx-core/dist/cli/index.js.map +1 -0
  93. package/node_modules/@usejunior/docx-core/dist/core-types.d.ts +296 -0
  94. package/node_modules/@usejunior/docx-core/dist/core-types.d.ts.map +1 -0
  95. package/node_modules/@usejunior/docx-core/dist/core-types.js +122 -0
  96. package/node_modules/@usejunior/docx-core/dist/core-types.js.map +1 -0
  97. package/node_modules/@usejunior/docx-core/dist/footnotes.d.ts +144 -0
  98. package/node_modules/@usejunior/docx-core/dist/footnotes.d.ts.map +1 -0
  99. package/node_modules/@usejunior/docx-core/dist/footnotes.js +291 -0
  100. package/node_modules/@usejunior/docx-core/dist/footnotes.js.map +1 -0
  101. package/node_modules/@usejunior/docx-core/dist/format-detection.d.ts +120 -0
  102. package/node_modules/@usejunior/docx-core/dist/format-detection.d.ts.map +1 -0
  103. package/node_modules/@usejunior/docx-core/dist/format-detection.js +338 -0
  104. package/node_modules/@usejunior/docx-core/dist/format-detection.js.map +1 -0
  105. package/node_modules/@usejunior/docx-core/dist/index.d.ts +177 -0
  106. package/node_modules/@usejunior/docx-core/dist/index.d.ts.map +1 -0
  107. package/node_modules/@usejunior/docx-core/dist/index.js +55 -0
  108. package/node_modules/@usejunior/docx-core/dist/index.js.map +1 -0
  109. package/node_modules/@usejunior/docx-core/dist/integration/output-artifacts.d.ts +6 -0
  110. package/node_modules/@usejunior/docx-core/dist/integration/output-artifacts.d.ts.map +1 -0
  111. package/node_modules/@usejunior/docx-core/dist/integration/output-artifacts.js +30 -0
  112. package/node_modules/@usejunior/docx-core/dist/integration/output-artifacts.js.map +1 -0
  113. package/node_modules/@usejunior/docx-core/dist/move-detection.d.ts +211 -0
  114. package/node_modules/@usejunior/docx-core/dist/move-detection.d.ts.map +1 -0
  115. package/node_modules/@usejunior/docx-core/dist/move-detection.js +391 -0
  116. package/node_modules/@usejunior/docx-core/dist/move-detection.js.map +1 -0
  117. package/node_modules/@usejunior/docx-core/dist/numbering.d.ts +136 -0
  118. package/node_modules/@usejunior/docx-core/dist/numbering.d.ts.map +1 -0
  119. package/node_modules/@usejunior/docx-core/dist/numbering.js +446 -0
  120. package/node_modules/@usejunior/docx-core/dist/numbering.js.map +1 -0
  121. package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.d.ts +30 -0
  122. package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.d.ts.map +1 -0
  123. package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.js +241 -0
  124. package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.js.map +1 -0
  125. package/node_modules/@usejunior/docx-core/dist/primitives/bookmarks.d.ts +12 -0
  126. package/node_modules/@usejunior/docx-core/dist/primitives/bookmarks.d.ts.map +1 -0
  127. package/node_modules/@usejunior/docx-core/dist/primitives/bookmarks.js +248 -0
  128. package/node_modules/@usejunior/docx-core/dist/primitives/bookmarks.js.map +1 -0
  129. package/node_modules/@usejunior/docx-core/dist/primitives/comments.d.ts +88 -0
  130. package/node_modules/@usejunior/docx-core/dist/primitives/comments.d.ts.map +1 -0
  131. package/node_modules/@usejunior/docx-core/dist/primitives/comments.js +703 -0
  132. package/node_modules/@usejunior/docx-core/dist/primitives/comments.js.map +1 -0
  133. package/node_modules/@usejunior/docx-core/dist/primitives/document.d.ts +186 -0
  134. package/node_modules/@usejunior/docx-core/dist/primitives/document.d.ts.map +1 -0
  135. package/node_modules/@usejunior/docx-core/dist/primitives/document.js +555 -0
  136. package/node_modules/@usejunior/docx-core/dist/primitives/document.js.map +1 -0
  137. package/node_modules/@usejunior/docx-core/dist/primitives/document_view.d.ts +97 -0
  138. package/node_modules/@usejunior/docx-core/dist/primitives/document_view.d.ts.map +1 -0
  139. package/node_modules/@usejunior/docx-core/dist/primitives/document_view.js +749 -0
  140. package/node_modules/@usejunior/docx-core/dist/primitives/document_view.js.map +1 -0
  141. package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.d.ts +94 -0
  142. package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.d.ts.map +1 -0
  143. package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.js +219 -0
  144. package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.js.map +1 -0
  145. package/node_modules/@usejunior/docx-core/dist/primitives/errors.d.ts +7 -0
  146. package/node_modules/@usejunior/docx-core/dist/primitives/errors.d.ts.map +1 -0
  147. package/node_modules/@usejunior/docx-core/dist/primitives/errors.js +10 -0
  148. package/node_modules/@usejunior/docx-core/dist/primitives/errors.js.map +1 -0
  149. package/node_modules/@usejunior/docx-core/dist/primitives/extract_revisions.d.ts +50 -0
  150. package/node_modules/@usejunior/docx-core/dist/primitives/extract_revisions.d.ts.map +1 -0
  151. package/node_modules/@usejunior/docx-core/dist/primitives/extract_revisions.js +340 -0
  152. package/node_modules/@usejunior/docx-core/dist/primitives/extract_revisions.js.map +1 -0
  153. package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.d.ts +37 -0
  154. package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.d.ts.map +1 -0
  155. package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.js +552 -0
  156. package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.js.map +1 -0
  157. package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.d.ts +43 -0
  158. package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.d.ts.map +1 -0
  159. package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.js +291 -0
  160. package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.js.map +1 -0
  161. package/node_modules/@usejunior/docx-core/dist/primitives/index.d.ts +27 -0
  162. package/node_modules/@usejunior/docx-core/dist/primitives/index.d.ts.map +1 -0
  163. package/node_modules/@usejunior/docx-core/dist/primitives/index.js +27 -0
  164. package/node_modules/@usejunior/docx-core/dist/primitives/index.js.map +1 -0
  165. package/node_modules/@usejunior/docx-core/dist/primitives/layout.d.ts +53 -0
  166. package/node_modules/@usejunior/docx-core/dist/primitives/layout.d.ts.map +1 -0
  167. package/node_modules/@usejunior/docx-core/dist/primitives/layout.js +178 -0
  168. package/node_modules/@usejunior/docx-core/dist/primitives/layout.js.map +1 -0
  169. package/node_modules/@usejunior/docx-core/dist/primitives/list_labels.d.ts +19 -0
  170. package/node_modules/@usejunior/docx-core/dist/primitives/list_labels.d.ts.map +1 -0
  171. package/node_modules/@usejunior/docx-core/dist/primitives/list_labels.js +57 -0
  172. package/node_modules/@usejunior/docx-core/dist/primitives/list_labels.js.map +1 -0
  173. package/node_modules/@usejunior/docx-core/dist/primitives/matching.d.ts +31 -0
  174. package/node_modules/@usejunior/docx-core/dist/primitives/matching.d.ts.map +1 -0
  175. package/node_modules/@usejunior/docx-core/dist/primitives/matching.js +223 -0
  176. package/node_modules/@usejunior/docx-core/dist/primitives/matching.js.map +1 -0
  177. package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.d.ts +23 -0
  178. package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.d.ts.map +1 -0
  179. package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.js +243 -0
  180. package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.js.map +1 -0
  181. package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.d.ts +91 -0
  182. package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.d.ts.map +1 -0
  183. package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.js +108 -0
  184. package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.js.map +1 -0
  185. package/node_modules/@usejunior/docx-core/dist/primitives/numbering.d.ts +27 -0
  186. package/node_modules/@usejunior/docx-core/dist/primitives/numbering.d.ts.map +1 -0
  187. package/node_modules/@usejunior/docx-core/dist/primitives/numbering.js +182 -0
  188. package/node_modules/@usejunior/docx-core/dist/primitives/numbering.js.map +1 -0
  189. package/node_modules/@usejunior/docx-core/dist/primitives/prevent_double_elevation.d.ts +18 -0
  190. package/node_modules/@usejunior/docx-core/dist/primitives/prevent_double_elevation.d.ts.map +1 -0
  191. package/node_modules/@usejunior/docx-core/dist/primitives/prevent_double_elevation.js +190 -0
  192. package/node_modules/@usejunior/docx-core/dist/primitives/prevent_double_elevation.js.map +1 -0
  193. package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.d.ts +27 -0
  194. package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.d.ts.map +1 -0
  195. package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.js +371 -0
  196. package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.js.map +1 -0
  197. package/node_modules/@usejunior/docx-core/dist/primitives/relationships.d.ts +7 -0
  198. package/node_modules/@usejunior/docx-core/dist/primitives/relationships.d.ts.map +1 -0
  199. package/node_modules/@usejunior/docx-core/dist/primitives/relationships.js +24 -0
  200. package/node_modules/@usejunior/docx-core/dist/primitives/relationships.js.map +1 -0
  201. package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.d.ts +17 -0
  202. package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.d.ts.map +1 -0
  203. package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.js +58 -0
  204. package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.js.map +1 -0
  205. package/node_modules/@usejunior/docx-core/dist/primitives/simplify_redlines.d.ts +19 -0
  206. package/node_modules/@usejunior/docx-core/dist/primitives/simplify_redlines.d.ts.map +1 -0
  207. package/node_modules/@usejunior/docx-core/dist/primitives/simplify_redlines.js +94 -0
  208. package/node_modules/@usejunior/docx-core/dist/primitives/simplify_redlines.js.map +1 -0
  209. package/node_modules/@usejunior/docx-core/dist/primitives/styles.d.ts +36 -0
  210. package/node_modules/@usejunior/docx-core/dist/primitives/styles.d.ts.map +1 -0
  211. package/node_modules/@usejunior/docx-core/dist/primitives/styles.js +205 -0
  212. package/node_modules/@usejunior/docx-core/dist/primitives/styles.js.map +1 -0
  213. package/node_modules/@usejunior/docx-core/dist/primitives/tables.d.ts +54 -0
  214. package/node_modules/@usejunior/docx-core/dist/primitives/tables.d.ts.map +1 -0
  215. package/node_modules/@usejunior/docx-core/dist/primitives/tables.js +205 -0
  216. package/node_modules/@usejunior/docx-core/dist/primitives/tables.js.map +1 -0
  217. package/node_modules/@usejunior/docx-core/dist/primitives/text.d.ts +30 -0
  218. package/node_modules/@usejunior/docx-core/dist/primitives/text.d.ts.map +1 -0
  219. package/node_modules/@usejunior/docx-core/dist/primitives/text.js +461 -0
  220. package/node_modules/@usejunior/docx-core/dist/primitives/text.js.map +1 -0
  221. package/node_modules/@usejunior/docx-core/dist/primitives/validate_document.d.ts +24 -0
  222. package/node_modules/@usejunior/docx-core/dist/primitives/validate_document.d.ts.map +1 -0
  223. package/node_modules/@usejunior/docx-core/dist/primitives/validate_document.js +147 -0
  224. package/node_modules/@usejunior/docx-core/dist/primitives/validate_document.js.map +1 -0
  225. package/node_modules/@usejunior/docx-core/dist/primitives/xml.d.ts +5 -0
  226. package/node_modules/@usejunior/docx-core/dist/primitives/xml.d.ts.map +1 -0
  227. package/node_modules/@usejunior/docx-core/dist/primitives/xml.js +19 -0
  228. package/node_modules/@usejunior/docx-core/dist/primitives/xml.js.map +1 -0
  229. package/node_modules/@usejunior/docx-core/dist/primitives/zip.d.ts +25 -0
  230. package/node_modules/@usejunior/docx-core/dist/primitives/zip.d.ts.map +1 -0
  231. package/node_modules/@usejunior/docx-core/dist/primitives/zip.js +78 -0
  232. package/node_modules/@usejunior/docx-core/dist/primitives/zip.js.map +1 -0
  233. package/node_modules/@usejunior/docx-core/dist/shared/docx/DocxArchive.d.ts +94 -0
  234. package/node_modules/@usejunior/docx-core/dist/shared/docx/DocxArchive.d.ts.map +1 -0
  235. package/node_modules/@usejunior/docx-core/dist/shared/docx/DocxArchive.js +169 -0
  236. package/node_modules/@usejunior/docx-core/dist/shared/docx/DocxArchive.js.map +1 -0
  237. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.d.ts +149 -0
  238. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.d.ts.map +1 -0
  239. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.js +224 -0
  240. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.js.map +1 -0
  241. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/types.d.ts +136 -0
  242. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/types.d.ts.map +1 -0
  243. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/types.js +7 -0
  244. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/types.js.map +1 -0
  245. package/node_modules/@usejunior/docx-core/dist/shared/validators/structural.d.ts +31 -0
  246. package/node_modules/@usejunior/docx-core/dist/shared/validators/structural.d.ts.map +1 -0
  247. package/node_modules/@usejunior/docx-core/dist/shared/validators/structural.js +110 -0
  248. package/node_modules/@usejunior/docx-core/dist/shared/validators/structural.js.map +1 -0
  249. package/node_modules/@usejunior/docx-core/package.json +26 -0
  250. package/node_modules/core-util-is/LICENSE +19 -0
  251. package/node_modules/core-util-is/README.md +3 -0
  252. package/node_modules/core-util-is/lib/util.js +107 -0
  253. package/node_modules/core-util-is/package.json +38 -0
  254. package/node_modules/diff-match-patch/LICENSE +202 -0
  255. package/node_modules/diff-match-patch/README.md +94 -0
  256. package/node_modules/diff-match-patch/index.js +2218 -0
  257. package/node_modules/diff-match-patch/package.json +22 -0
  258. package/node_modules/immediate/LICENSE.txt +20 -0
  259. package/node_modules/immediate/README.md +93 -0
  260. package/node_modules/immediate/dist/immediate.js +75 -0
  261. package/node_modules/immediate/dist/immediate.min.js +1 -0
  262. package/node_modules/immediate/lib/browser.js +69 -0
  263. package/node_modules/immediate/lib/index.js +73 -0
  264. package/node_modules/immediate/package.json +42 -0
  265. package/node_modules/inherits/LICENSE +16 -0
  266. package/node_modules/inherits/README.md +42 -0
  267. package/node_modules/inherits/inherits.js +9 -0
  268. package/node_modules/inherits/inherits_browser.js +27 -0
  269. package/node_modules/inherits/package.json +29 -0
  270. package/node_modules/isarray/.npmignore +1 -0
  271. package/node_modules/isarray/.travis.yml +4 -0
  272. package/node_modules/isarray/Makefile +6 -0
  273. package/node_modules/isarray/README.md +60 -0
  274. package/node_modules/isarray/component.json +19 -0
  275. package/node_modules/isarray/index.js +5 -0
  276. package/node_modules/isarray/package.json +45 -0
  277. package/node_modules/isarray/test.js +20 -0
  278. package/node_modules/jszip/.codeclimate.yml +16 -0
  279. package/node_modules/jszip/.editorconfig +8 -0
  280. package/node_modules/jszip/.eslintrc.js +43 -0
  281. package/node_modules/jszip/.github/workflows/pr.yaml +58 -0
  282. package/node_modules/jszip/.jekyll-metadata +0 -0
  283. package/node_modules/jszip/.travis.yml +17 -0
  284. package/node_modules/jszip/CHANGES.md +204 -0
  285. package/node_modules/jszip/LICENSE.markdown +651 -0
  286. package/node_modules/jszip/README.markdown +33 -0
  287. package/node_modules/jszip/deps.js +37 -0
  288. package/node_modules/jszip/dist/jszip.js +11577 -0
  289. package/node_modules/jszip/dist/jszip.min.js +13 -0
  290. package/node_modules/jszip/graph.svg +601 -0
  291. package/node_modules/jszip/index.d.ts +330 -0
  292. package/node_modules/jszip/lib/base64.js +106 -0
  293. package/node_modules/jszip/lib/compressedObject.js +74 -0
  294. package/node_modules/jszip/lib/compressions.js +14 -0
  295. package/node_modules/jszip/lib/crc32.js +77 -0
  296. package/node_modules/jszip/lib/defaults.js +11 -0
  297. package/node_modules/jszip/lib/external.js +18 -0
  298. package/node_modules/jszip/lib/flate.js +85 -0
  299. package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
  300. package/node_modules/jszip/lib/generate/index.js +57 -0
  301. package/node_modules/jszip/lib/index.js +55 -0
  302. package/node_modules/jszip/lib/license_header.js +11 -0
  303. package/node_modules/jszip/lib/load.js +88 -0
  304. package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
  305. package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
  306. package/node_modules/jszip/lib/nodejsUtils.js +57 -0
  307. package/node_modules/jszip/lib/object.js +384 -0
  308. package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
  309. package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
  310. package/node_modules/jszip/lib/reader/DataReader.js +116 -0
  311. package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
  312. package/node_modules/jszip/lib/reader/StringReader.js +38 -0
  313. package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
  314. package/node_modules/jszip/lib/reader/readerFor.js +28 -0
  315. package/node_modules/jszip/lib/signature.js +7 -0
  316. package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
  317. package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
  318. package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
  319. package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
  320. package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
  321. package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
  322. package/node_modules/jszip/lib/support.js +38 -0
  323. package/node_modules/jszip/lib/utf8.js +275 -0
  324. package/node_modules/jszip/lib/utils.js +501 -0
  325. package/node_modules/jszip/lib/zipEntries.js +261 -0
  326. package/node_modules/jszip/lib/zipEntry.js +293 -0
  327. package/node_modules/jszip/lib/zipObject.js +133 -0
  328. package/node_modules/jszip/package.json +67 -0
  329. package/node_modules/jszip/sponsors.md +21 -0
  330. package/node_modules/jszip/tsconfig.json +101 -0
  331. package/node_modules/jszip/vendor/FileSaver.js +247 -0
  332. package/node_modules/lie/README.md +62 -0
  333. package/node_modules/lie/dist/lie.js +350 -0
  334. package/node_modules/lie/dist/lie.min.js +1 -0
  335. package/node_modules/lie/dist/lie.polyfill.js +358 -0
  336. package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
  337. package/node_modules/lie/lib/browser.js +273 -0
  338. package/node_modules/lie/lib/index.js +298 -0
  339. package/node_modules/lie/license.md +7 -0
  340. package/node_modules/lie/lie.d.ts +244 -0
  341. package/node_modules/lie/package.json +69 -0
  342. package/node_modules/lie/polyfill.js +4 -0
  343. package/node_modules/pako/LICENSE +21 -0
  344. package/node_modules/pako/README.md +191 -0
  345. package/node_modules/pako/dist/pako.js +6818 -0
  346. package/node_modules/pako/dist/pako.min.js +1 -0
  347. package/node_modules/pako/dist/pako_deflate.js +3997 -0
  348. package/node_modules/pako/dist/pako_deflate.min.js +1 -0
  349. package/node_modules/pako/dist/pako_inflate.js +3300 -0
  350. package/node_modules/pako/dist/pako_inflate.min.js +1 -0
  351. package/node_modules/pako/index.js +14 -0
  352. package/node_modules/pako/lib/deflate.js +400 -0
  353. package/node_modules/pako/lib/inflate.js +423 -0
  354. package/node_modules/pako/lib/utils/common.js +105 -0
  355. package/node_modules/pako/lib/utils/strings.js +187 -0
  356. package/node_modules/pako/lib/zlib/README +59 -0
  357. package/node_modules/pako/lib/zlib/adler32.js +51 -0
  358. package/node_modules/pako/lib/zlib/constants.js +68 -0
  359. package/node_modules/pako/lib/zlib/crc32.js +59 -0
  360. package/node_modules/pako/lib/zlib/deflate.js +1874 -0
  361. package/node_modules/pako/lib/zlib/gzheader.js +58 -0
  362. package/node_modules/pako/lib/zlib/inffast.js +345 -0
  363. package/node_modules/pako/lib/zlib/inflate.js +1556 -0
  364. package/node_modules/pako/lib/zlib/inftrees.js +343 -0
  365. package/node_modules/pako/lib/zlib/messages.js +32 -0
  366. package/node_modules/pako/lib/zlib/trees.js +1222 -0
  367. package/node_modules/pako/lib/zlib/zstream.js +47 -0
  368. package/node_modules/pako/package.json +44 -0
  369. package/node_modules/process-nextick-args/index.js +45 -0
  370. package/node_modules/process-nextick-args/license.md +19 -0
  371. package/node_modules/process-nextick-args/package.json +25 -0
  372. package/node_modules/process-nextick-args/readme.md +18 -0
  373. package/node_modules/readable-stream/.travis.yml +34 -0
  374. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  375. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  376. package/node_modules/readable-stream/LICENSE +47 -0
  377. package/node_modules/readable-stream/README.md +58 -0
  378. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  379. package/node_modules/readable-stream/duplex-browser.js +1 -0
  380. package/node_modules/readable-stream/duplex.js +1 -0
  381. package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  382. package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  383. package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  384. package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  385. package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
  386. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
  387. package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
  388. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  389. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  390. package/node_modules/readable-stream/package.json +52 -0
  391. package/node_modules/readable-stream/passthrough.js +1 -0
  392. package/node_modules/readable-stream/readable-browser.js +7 -0
  393. package/node_modules/readable-stream/readable.js +19 -0
  394. package/node_modules/readable-stream/transform.js +1 -0
  395. package/node_modules/readable-stream/writable-browser.js +1 -0
  396. package/node_modules/readable-stream/writable.js +8 -0
  397. package/node_modules/safe-buffer/LICENSE +21 -0
  398. package/node_modules/safe-buffer/README.md +584 -0
  399. package/node_modules/safe-buffer/index.d.ts +187 -0
  400. package/node_modules/safe-buffer/index.js +62 -0
  401. package/node_modules/safe-buffer/package.json +37 -0
  402. package/node_modules/setimmediate/LICENSE.txt +20 -0
  403. package/node_modules/setimmediate/package.json +30 -0
  404. package/node_modules/setimmediate/setImmediate.js +186 -0
  405. package/node_modules/string_decoder/.travis.yml +50 -0
  406. package/node_modules/string_decoder/LICENSE +48 -0
  407. package/node_modules/string_decoder/README.md +47 -0
  408. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  409. package/node_modules/string_decoder/package.json +31 -0
  410. package/node_modules/util-deprecate/History.md +16 -0
  411. package/node_modules/util-deprecate/LICENSE +24 -0
  412. package/node_modules/util-deprecate/README.md +53 -0
  413. package/node_modules/util-deprecate/browser.js +67 -0
  414. package/node_modules/util-deprecate/node.js +6 -0
  415. package/node_modules/util-deprecate/package.json +27 -0
  416. package/package.json +9 -4
  417. package/packages/docx-core/node_modules/@xmldom/xmldom/CHANGELOG.md +468 -0
  418. package/packages/docx-core/node_modules/@xmldom/xmldom/LICENSE +8 -0
  419. package/packages/docx-core/node_modules/@xmldom/xmldom/SECURITY.md +50 -0
  420. package/packages/docx-core/node_modules/@xmldom/xmldom/index.d.ts +43 -0
  421. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/.eslintrc.yml +2 -0
  422. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/conventions.js +203 -0
  423. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/dom-parser.js +322 -0
  424. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/dom.js +1879 -0
  425. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/entities.js +2166 -0
  426. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/index.js +4 -0
  427. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/sax.js +662 -0
  428. package/packages/docx-core/node_modules/@xmldom/xmldom/package.json +71 -0
  429. package/packages/docx-core/node_modules/@xmldom/xmldom/readme.md +356 -0
@@ -0,0 +1,555 @@
1
+ import { DocxZip } from './zip.js';
2
+ import { parseXml, serializeXml } from './xml.js';
3
+ import { OOXML, W } from './namespaces.js';
4
+ import { findParagraphByBookmarkId, insertParagraphBookmarks, cleanupInternalBookmarks, getParagraphBookmarkId, insertSingleParagraphBookmark, } from './bookmarks.js';
5
+ import { getParagraphRuns, getParagraphText, replaceParagraphTextRange } from './text.js';
6
+ import { buildNodesForDocumentView } from './document_view.js';
7
+ import { findUniqueSubstringMatch } from './matching.js';
8
+ import { parseDocumentRels } from './relationships.js';
9
+ import { setParagraphSpacing, setTableCellPadding, setTableRowHeight, } from './layout.js';
10
+ import { extractTables, } from './tables.js';
11
+ import { mergeRuns } from './merge_runs.js';
12
+ import { simplifyRedlines } from './simplify_redlines.js';
13
+ import { preventDoubleElevation } from './prevent_double_elevation.js';
14
+ import { validateDocument } from './validate_document.js';
15
+ import { acceptChanges as acceptChangesImpl } from './accept_changes.js';
16
+ import { bootstrapCommentParts, addComment as addCommentImpl, addCommentReply as addCommentReplyImpl, getComments as getCommentsImpl, getComment as getCommentImpl, deleteComment as deleteCommentImpl, } from './comments.js';
17
+ import { bootstrapFootnoteParts, getFootnotes as getFootnotesImpl, getFootnote as getFootnoteImpl, addFootnote as addFootnoteImpl, updateFootnoteText as updateFootnoteTextImpl, deleteFootnote as deleteFootnoteImpl, } from './footnotes.js';
18
+ function prevElementSibling(node) {
19
+ let cur = node?.previousSibling ?? null;
20
+ while (cur) {
21
+ if (cur.nodeType === 1)
22
+ return cur;
23
+ cur = cur.previousSibling;
24
+ }
25
+ return null;
26
+ }
27
+ function nextElementSibling(node) {
28
+ let cur = node?.nextSibling ?? null;
29
+ while (cur) {
30
+ if (cur.nodeType === 1)
31
+ return cur;
32
+ cur = cur.nextSibling;
33
+ }
34
+ return null;
35
+ }
36
+ function isW(el, localName) {
37
+ return !!el && el.namespaceURI === OOXML.W_NS && el.localName === localName;
38
+ }
39
+ export class DocxDocument {
40
+ zip;
41
+ documentXml;
42
+ stylesXml;
43
+ numberingXml;
44
+ footnotesXml;
45
+ relsMap;
46
+ dirty;
47
+ documentViewCache;
48
+ constructor(zip, documentXml, stylesXml, numberingXml, footnotesXml, relsMap) {
49
+ this.zip = zip;
50
+ this.documentXml = documentXml;
51
+ this.stylesXml = stylesXml;
52
+ this.numberingXml = numberingXml;
53
+ this.footnotesXml = footnotesXml;
54
+ this.relsMap = relsMap;
55
+ this.dirty = false;
56
+ this.documentViewCache = null;
57
+ }
58
+ static async load(buffer) {
59
+ const zip = await DocxZip.load(buffer);
60
+ const xml = await zip.readText('word/document.xml');
61
+ const doc = parseXml(xml);
62
+ // Optional parts used for fidelity: list labels + style fingerprints.
63
+ const stylesText = await zip.readTextOrNull('word/styles.xml');
64
+ const numberingText = await zip.readTextOrNull('word/numbering.xml');
65
+ const stylesXml = stylesText ? parseXml(stylesText) : null;
66
+ const numberingXml = numberingText ? parseXml(numberingText) : null;
67
+ // Load footnotes for [^N] marker rendering in document view.
68
+ const footnotesText = await zip.readTextOrNull('word/footnotes.xml');
69
+ const footnotesXml = footnotesText ? parseXml(footnotesText) : null;
70
+ // Load document relationships for hyperlink resolution.
71
+ const relsText = await zip.readTextOrNull('word/_rels/document.xml.rels');
72
+ const relsMap = relsText ? parseDocumentRels(parseXml(relsText)) : new Map();
73
+ return new DocxDocument(zip, doc, stylesXml, numberingXml, footnotesXml, relsMap);
74
+ }
75
+ getParagraphs() {
76
+ const body = this.documentXml.getElementsByTagNameNS(OOXML.W_NS, W.body).item(0);
77
+ if (!body)
78
+ return [];
79
+ return Array.from(body.getElementsByTagNameNS(OOXML.W_NS, W.p));
80
+ }
81
+ getParagraphElementById(bookmarkId) {
82
+ return findParagraphByBookmarkId(this.documentXml, bookmarkId);
83
+ }
84
+ getParagraphTextById(bookmarkId) {
85
+ const p = this.getParagraphElementById(bookmarkId);
86
+ if (!p)
87
+ return null;
88
+ return getParagraphText(p);
89
+ }
90
+ insertParagraphBookmarks(attachmentId) {
91
+ const res = insertParagraphBookmarks(this.documentXml, attachmentId);
92
+ if (res.indexedParagraphs > 0)
93
+ this.dirty = true;
94
+ return { paragraphCount: res.indexedParagraphs };
95
+ }
96
+ /**
97
+ * Normalize the document by merging format-identical adjacent runs and
98
+ * consolidating adjacent same-author tracked-change wrappers.
99
+ * Should be called BEFORE bookmark allocation.
100
+ */
101
+ normalize() {
102
+ const mr = mergeRuns(this.documentXml);
103
+ const sr = simplifyRedlines(this.documentXml);
104
+ // Prevent double elevation in footnote/endnote reference styles
105
+ let de = { doubleElevationsFixed: 0 };
106
+ if (this.stylesXml) {
107
+ de = preventDoubleElevation(this.stylesXml);
108
+ if (de.doubleElevationsFixed > 0) {
109
+ this.zip.writeText('word/styles.xml', serializeXml(this.stylesXml));
110
+ }
111
+ }
112
+ if (mr.runsMerged > 0 || sr.wrappersConsolidated > 0 || de.doubleElevationsFixed > 0) {
113
+ this.dirty = true;
114
+ this.documentViewCache = null;
115
+ }
116
+ return {
117
+ runsMerged: mr.runsMerged,
118
+ proofErrRemoved: mr.proofErrRemoved,
119
+ wrappersConsolidated: sr.wrappersConsolidated,
120
+ doubleElevationsFixed: de.doubleElevationsFixed,
121
+ };
122
+ }
123
+ /**
124
+ * Validate structural integrity of the document.
125
+ * Non-destructive, read-only check.
126
+ */
127
+ validate() {
128
+ return validateDocument(this.documentXml);
129
+ }
130
+ /**
131
+ * Accept all tracked changes in the document body, producing a clean
132
+ * document with no revision markup.
133
+ */
134
+ acceptChanges() {
135
+ const result = acceptChangesImpl(this.documentXml);
136
+ if (result.insertionsAccepted > 0 ||
137
+ result.deletionsAccepted > 0 ||
138
+ result.movesResolved > 0 ||
139
+ result.propertyChangesResolved > 0) {
140
+ this.dirty = true;
141
+ this.documentViewCache = null;
142
+ }
143
+ return result;
144
+ }
145
+ removeJuniorBookmarks() {
146
+ const removed = cleanupInternalBookmarks(this.documentXml);
147
+ if (removed > 0)
148
+ this.dirty = true;
149
+ return removed;
150
+ }
151
+ readParagraphs(opts) {
152
+ const all = this.getParagraphs()
153
+ .map((p) => {
154
+ const id = getParagraphBookmarkId(p);
155
+ if (!id)
156
+ return null;
157
+ const text = getParagraphText(p).trim();
158
+ if (!text)
159
+ return null;
160
+ return { id, text };
161
+ })
162
+ .filter((x) => x !== null);
163
+ const total = all.length;
164
+ const { nodeIds, offset, limit } = opts ?? {};
165
+ if (nodeIds && nodeIds.length > 0) {
166
+ const set = new Set(nodeIds);
167
+ return { paragraphs: all.filter((p) => set.has(p.id)), totalParagraphs: total };
168
+ }
169
+ let startIdx = 0;
170
+ if (typeof offset === 'number') {
171
+ // Offset is 1-based in Python server; negative counts from end.
172
+ if (offset > 0)
173
+ startIdx = Math.max(0, offset - 1);
174
+ if (offset < 0)
175
+ startIdx = Math.max(0, total + offset);
176
+ }
177
+ const endIdx = typeof limit === 'number' ? Math.min(total, startIdx + limit) : total;
178
+ return { paragraphs: all.slice(startIdx, endIdx), totalParagraphs: total };
179
+ }
180
+ buildDocumentView(opts) {
181
+ const includeSemanticTags = opts?.includeSemanticTags ?? true;
182
+ const showFormatting = opts?.showFormatting ?? false;
183
+ const formattingMode = opts?.formattingMode ?? 'compact';
184
+ const cached = this.documentViewCache;
185
+ if (!this.dirty && cached && cached.includeSemanticTags === includeSemanticTags && cached.showFormatting === showFormatting && cached.formattingMode === formattingMode) {
186
+ return { nodes: cached.nodes, styles: cached.styles };
187
+ }
188
+ const paragraphs = this.getParagraphs()
189
+ .map((p) => {
190
+ const id = getParagraphBookmarkId(p);
191
+ if (!id)
192
+ return null;
193
+ return { id, p };
194
+ })
195
+ .filter((x) => x !== null);
196
+ const { nodes, styles } = buildNodesForDocumentView({
197
+ paragraphs,
198
+ stylesXml: this.stylesXml,
199
+ numberingXml: this.numberingXml,
200
+ include_semantic_tags: includeSemanticTags,
201
+ show_formatting: showFormatting,
202
+ formatting_mode: formattingMode,
203
+ relsMap: this.relsMap,
204
+ documentXml: this.documentXml,
205
+ footnotesXml: this.footnotesXml,
206
+ });
207
+ this.documentViewCache = { includeSemanticTags, showFormatting, formattingMode, nodes, styles };
208
+ this.dirty = false;
209
+ return { nodes, styles };
210
+ }
211
+ replaceText(params) {
212
+ const { targetParagraphId, findText, replaceText } = params;
213
+ const p = findParagraphByBookmarkId(this.documentXml, targetParagraphId);
214
+ if (!p)
215
+ throw new Error(`Paragraph not found: ${targetParagraphId}`);
216
+ const full = getParagraphText(p);
217
+ const match = findUniqueSubstringMatch(full, findText);
218
+ if (match.status === 'not_found') {
219
+ throw new Error(`Text not found in paragraph ${targetParagraphId}`);
220
+ }
221
+ if (match.status === 'multiple') {
222
+ throw new Error(`Multiple matches (${match.matchCount}) found in paragraph ${targetParagraphId} using ${match.mode} matching`);
223
+ }
224
+ replaceParagraphTextRange(p, match.start, match.end, replaceText);
225
+ this.dirty = true;
226
+ this.documentViewCache = null;
227
+ }
228
+ /**
229
+ * Replace text at a known character range without re-searching.
230
+ * Used by the range-trimming approach where the caller has already located the match.
231
+ */
232
+ replaceTextAtRange(params) {
233
+ const { targetParagraphId, start, end, replaceText } = params;
234
+ const p = findParagraphByBookmarkId(this.documentXml, targetParagraphId);
235
+ if (!p)
236
+ throw new Error(`Paragraph not found: ${targetParagraphId}`);
237
+ replaceParagraphTextRange(p, start, end, replaceText);
238
+ this.dirty = true;
239
+ this.documentViewCache = null;
240
+ }
241
+ insertParagraph(params) {
242
+ const { positionalAnchorNodeId, relativePosition, newText, newParagraphId: _newParagraphId, styleSourceId } = params;
243
+ const anchor = findParagraphByBookmarkId(this.documentXml, positionalAnchorNodeId);
244
+ if (!anchor)
245
+ throw new Error(`Anchor paragraph not found: ${positionalAnchorNodeId}`);
246
+ const anchorP = anchor;
247
+ // Resolve style source paragraph (if provided).
248
+ let styleSourceP = null;
249
+ let styleSourceFallback = false;
250
+ if (styleSourceId) {
251
+ styleSourceP = findParagraphByBookmarkId(this.documentXml, styleSourceId);
252
+ if (!styleSourceP) {
253
+ styleSourceFallback = true;
254
+ // Fall back to anchor
255
+ }
256
+ }
257
+ const formattingSource = styleSourceP ?? anchorP;
258
+ const doc = this.documentXml;
259
+ const parent = anchorP.parentNode;
260
+ if (!parent)
261
+ throw new Error('Anchor paragraph has no parent');
262
+ function isWTag(el, localName) {
263
+ return !!el && el.namespaceURI === OOXML.W_NS && el.localName === localName;
264
+ }
265
+ function setXmlSpacePreserveIfNeeded(t, text) {
266
+ if (!text)
267
+ return;
268
+ if (text.startsWith(' ') || text.endsWith(' ')) {
269
+ t.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve');
270
+ }
271
+ }
272
+ function cloneRunFormattingOnly(sourceRun) {
273
+ const r = doc.createElementNS(OOXML.W_NS, 'w:r');
274
+ for (const child of Array.from(sourceRun.childNodes)) {
275
+ if (child.nodeType !== 1)
276
+ continue;
277
+ const el = child;
278
+ if (isWTag(el, W.rPr)) {
279
+ r.appendChild(el.cloneNode(true));
280
+ break;
281
+ }
282
+ }
283
+ return r;
284
+ }
285
+ function appendTextToRun(run, text) {
286
+ let buf = '';
287
+ const flush = () => {
288
+ if (!buf)
289
+ return;
290
+ const t = doc.createElementNS(OOXML.W_NS, 'w:t');
291
+ setXmlSpacePreserveIfNeeded(t, buf);
292
+ t.appendChild(doc.createTextNode(buf));
293
+ run.appendChild(t);
294
+ buf = '';
295
+ };
296
+ for (let i = 0; i < text.length; i++) {
297
+ const ch = text[i];
298
+ if (ch === '\t') {
299
+ flush();
300
+ run.appendChild(doc.createElementNS(OOXML.W_NS, 'w:tab'));
301
+ continue;
302
+ }
303
+ if (ch === '\n') {
304
+ flush();
305
+ run.appendChild(doc.createElementNS(OOXML.W_NS, 'w:br'));
306
+ continue;
307
+ }
308
+ buf += ch;
309
+ }
310
+ flush();
311
+ }
312
+ function cloneParagraphShell(anchorPara) {
313
+ // Clone anchor paragraph to preserve formatting; then wipe its runs and keep pPr only.
314
+ const newP = anchorPara.cloneNode(true);
315
+ const children = Array.from(newP.childNodes);
316
+ for (const child of children) {
317
+ if (child.nodeType === 1 && isWTag(child, W.pPr))
318
+ continue;
319
+ newP.removeChild(child);
320
+ }
321
+ return newP;
322
+ }
323
+ function getInsertionRefNode() {
324
+ if (relativePosition === 'BEFORE') {
325
+ const prev = prevElementSibling(anchorP);
326
+ return isW(prev, W.bookmarkStart) ? prev : anchorP;
327
+ }
328
+ const next = nextElementSibling(anchorP);
329
+ if (next && isW(next, W.bookmarkEnd))
330
+ return next.nextSibling;
331
+ return anchorP.nextSibling;
332
+ }
333
+ // Choose a run in the formatting source to use as formatting template: pick the run with the most visible text.
334
+ const sourceVisibleRuns = getParagraphRuns(formattingSource);
335
+ let templateRun = null;
336
+ let bestLen = -1;
337
+ for (const tr of sourceVisibleRuns) {
338
+ if (tr.text.length > bestLen) {
339
+ bestLen = tr.text.length;
340
+ templateRun = tr.r;
341
+ }
342
+ }
343
+ if (!templateRun) {
344
+ const allRuns = Array.from(formattingSource.getElementsByTagNameNS(OOXML.W_NS, W.r));
345
+ templateRun = allRuns[0] ?? doc.createElementNS(OOXML.W_NS, 'w:r');
346
+ }
347
+ const paragraphsToInsert = newText.replace(/\r\n/g, '\n').split(/\n{2,}/);
348
+ const insertedIds = [];
349
+ let cursor = getInsertionRefNode();
350
+ for (const paraText of paragraphsToInsert) {
351
+ const newP = cloneParagraphShell(formattingSource);
352
+ const newRun = cloneRunFormattingOnly(templateRun);
353
+ appendTextToRun(newRun, paraText);
354
+ newP.appendChild(newRun);
355
+ parent.insertBefore(newP, cursor);
356
+ const id = insertSingleParagraphBookmark(doc, newP);
357
+ insertedIds.push(id);
358
+ if (relativePosition === 'AFTER') {
359
+ const endEl = nextElementSibling(newP);
360
+ cursor = endEl && isW(endEl, W.bookmarkEnd) ? endEl.nextSibling : newP.nextSibling;
361
+ }
362
+ }
363
+ this.dirty = true;
364
+ this.documentViewCache = null;
365
+ const result = {
366
+ newParagraphId: insertedIds[0],
367
+ newParagraphIds: insertedIds,
368
+ };
369
+ if (styleSourceFallback)
370
+ result.styleSourceFallback = true;
371
+ return result;
372
+ }
373
+ setParagraphSpacing(mutation) {
374
+ const result = setParagraphSpacing(this.documentXml, mutation);
375
+ if (result.affectedParagraphs > 0) {
376
+ this.dirty = true;
377
+ this.documentViewCache = null;
378
+ }
379
+ return result;
380
+ }
381
+ setTableRowHeight(mutation) {
382
+ const result = setTableRowHeight(this.documentXml, mutation);
383
+ if (result.affectedRows > 0) {
384
+ this.dirty = true;
385
+ this.documentViewCache = null;
386
+ }
387
+ return result;
388
+ }
389
+ setTableCellPadding(mutation) {
390
+ const result = setTableCellPadding(this.documentXml, mutation);
391
+ if (result.affectedCells > 0) {
392
+ this.dirty = true;
393
+ this.documentViewCache = null;
394
+ }
395
+ return result;
396
+ }
397
+ /**
398
+ * Extract tables from the document body.
399
+ * Read-only operation — does not mutate document state.
400
+ */
401
+ extractTables(options) {
402
+ return extractTables(this.documentXml, options);
403
+ }
404
+ /**
405
+ * Merge format-identical adjacent runs only (no redline simplification).
406
+ * Useful as a pre-processing step before text search when runs may be fragmented.
407
+ */
408
+ mergeRunsOnly() {
409
+ const result = mergeRuns(this.documentXml);
410
+ if (result.runsMerged > 0) {
411
+ this.dirty = true;
412
+ this.documentViewCache = null;
413
+ }
414
+ return result;
415
+ }
416
+ /**
417
+ * Add a root comment anchored to a text range within a paragraph.
418
+ *
419
+ * Bootstraps comment parts if missing (idempotent).
420
+ * Returns the allocated comment ID.
421
+ */
422
+ async addComment(params) {
423
+ const p = findParagraphByBookmarkId(this.documentXml, params.paragraphId);
424
+ if (!p)
425
+ throw new Error(`Paragraph not found: ${params.paragraphId}`);
426
+ await bootstrapCommentParts(this.zip);
427
+ const result = await addCommentImpl(this.documentXml, this.zip, {
428
+ paragraphEl: p,
429
+ start: params.start,
430
+ end: params.end,
431
+ author: params.author,
432
+ text: params.text,
433
+ initials: params.initials,
434
+ });
435
+ this.dirty = true;
436
+ this.documentViewCache = null;
437
+ return result;
438
+ }
439
+ /**
440
+ * Add a threaded reply to an existing comment.
441
+ *
442
+ * Bootstraps comment parts if missing (idempotent).
443
+ * Returns the allocated comment ID and parent ID.
444
+ */
445
+ async addCommentReply(params) {
446
+ await bootstrapCommentParts(this.zip);
447
+ const result = await addCommentReplyImpl(this.documentXml, this.zip, {
448
+ parentCommentId: params.parentCommentId,
449
+ author: params.author,
450
+ text: params.text,
451
+ initials: params.initials,
452
+ });
453
+ this.dirty = true;
454
+ this.documentViewCache = null;
455
+ return result;
456
+ }
457
+ async getComments() {
458
+ return getCommentsImpl(this.zip, this.documentXml);
459
+ }
460
+ async getComment(commentId) {
461
+ return getCommentImpl(this.zip, this.documentXml, commentId);
462
+ }
463
+ async deleteComment(params) {
464
+ await deleteCommentImpl(this.documentXml, this.zip, params);
465
+ this.dirty = true;
466
+ this.documentViewCache = null;
467
+ }
468
+ // ── Footnote methods ──────────────────────────────────────────────────
469
+ async refreshFootnotesXml() {
470
+ const text = await this.zip.readTextOrNull('word/footnotes.xml');
471
+ this.footnotesXml = text ? parseXml(text) : null;
472
+ }
473
+ async getFootnotes() {
474
+ return getFootnotesImpl(this.zip, this.documentXml);
475
+ }
476
+ async getFootnote(noteId) {
477
+ return getFootnoteImpl(this.zip, this.documentXml, noteId);
478
+ }
479
+ /**
480
+ * Add a footnote anchored to a paragraph, optionally after specific text.
481
+ *
482
+ * Bootstraps footnote parts if missing (idempotent).
483
+ * Returns the allocated footnote ID.
484
+ */
485
+ async addFootnote(params) {
486
+ const p = findParagraphByBookmarkId(this.documentXml, params.paragraphId);
487
+ if (!p)
488
+ throw new Error(`Paragraph not found: ${params.paragraphId}`);
489
+ await bootstrapFootnoteParts(this.zip);
490
+ const result = await addFootnoteImpl(this.documentXml, this.zip, {
491
+ paragraphEl: p,
492
+ afterText: params.afterText,
493
+ text: params.text,
494
+ });
495
+ await this.refreshFootnotesXml();
496
+ this.dirty = true;
497
+ this.documentViewCache = null;
498
+ return result;
499
+ }
500
+ /**
501
+ * Update the text content of an existing footnote.
502
+ */
503
+ async updateFootnoteText(params) {
504
+ await updateFootnoteTextImpl(this.zip, params);
505
+ await this.refreshFootnotesXml();
506
+ this.dirty = true;
507
+ this.documentViewCache = null;
508
+ }
509
+ /**
510
+ * Delete a footnote and its references from the document.
511
+ */
512
+ async deleteFootnote(params) {
513
+ await deleteFootnoteImpl(this.documentXml, this.zip, params);
514
+ await this.refreshFootnotesXml();
515
+ this.dirty = true;
516
+ this.documentViewCache = null;
517
+ }
518
+ /**
519
+ * Return a deep clone of the internal document.xml DOM.
520
+ * Callers can mutate the clone (e.g. acceptChanges / rejectChanges)
521
+ * without affecting session state.
522
+ */
523
+ getDocumentXmlClone() {
524
+ return this.documentXml.cloneNode(true);
525
+ }
526
+ /**
527
+ * Return a deep clone of the comments.xml DOM, or null if the document
528
+ * has no comments part.
529
+ */
530
+ async getCommentsXmlClone() {
531
+ const commentsText = await this.zip.readTextOrNull('word/comments.xml');
532
+ if (!commentsText)
533
+ return null;
534
+ return parseXml(commentsText);
535
+ }
536
+ async toBuffer(opts) {
537
+ // Always write the latest document.xml when saving.
538
+ // Important: when cleanBookmarks=true (download), we must NOT mutate session state.
539
+ const xmlWithBookmarks = serializeXml(this.documentXml);
540
+ this.zip.writeText('word/document.xml', xmlWithBookmarks);
541
+ if (opts?.cleanBookmarks) {
542
+ const cloned = parseXml(xmlWithBookmarks);
543
+ const bookmarksRemoved = cleanupInternalBookmarks(cloned);
544
+ const cleanedXml = serializeXml(cloned);
545
+ // Temporarily swap document.xml in the zip for output, then restore.
546
+ this.zip.writeText('word/document.xml', cleanedXml);
547
+ const buffer = await this.zip.toBuffer();
548
+ this.zip.writeText('word/document.xml', xmlWithBookmarks);
549
+ return { buffer, bookmarksRemoved };
550
+ }
551
+ const buffer = await this.zip.toBuffer();
552
+ return { buffer, bookmarksRemoved: 0 };
553
+ }
554
+ }
555
+ //# sourceMappingURL=document.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.js","sourceRoot":"","sources":["../../src/primitives/document.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EACL,yBAAyB,EACzB,wBAAwB,EACxB,wBAAwB,EACxB,sBAAsB,EACtB,6BAA6B,GAC9B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,yBAAyB,EAAwB,MAAM,WAAW,CAAC;AAChH,OAAO,EAAE,yBAAyB,EAA8C,MAAM,oBAAoB,CAAC;AAE3G,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAgB,MAAM,oBAAoB,CAAC;AACrE,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,i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