open-agreements 0.3.1 → 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,27 @@
1
+ /**
2
+ * reject_changes — reject all tracked changes in a OOXML document body.
3
+ *
4
+ * Produces the document as it was before tracked changes were made by:
5
+ * - Removing w:ins elements AND their content (insertions undone)
6
+ * - Unwrapping w:del elements and converting w:delText → w:t (deletions restored)
7
+ * - Unwrapping w:moveFrom (keep at original position), removing w:moveTo and content
8
+ * - Restoring original properties from *PrChange records
9
+ * - Preserving cross-paragraph bookmark boundaries when removing inserted paragraphs
10
+ * - Stripping paragraph-level revision markers and rsidDel attributes
11
+ *
12
+ * Operates on the W3C DOM (`@xmldom/xmldom`).
13
+ */
14
+ export type RejectChangesResult = {
15
+ insertionsRemoved: number;
16
+ deletionsRestored: number;
17
+ movesReverted: number;
18
+ propertyChangesReverted: number;
19
+ };
20
+ /**
21
+ * Reject all tracked changes in the document body, restoring the
22
+ * document to its pre-edit state.
23
+ *
24
+ * Mutates the Document in place (same convention as acceptChanges).
25
+ */
26
+ export declare function rejectChanges(doc: Document): RejectChangesResult;
27
+ //# sourceMappingURL=reject_changes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reject_changes.d.ts","sourceRoot":"","sources":["../../src/primitives/reject_changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,MAAM,MAAM,mBAAmB,GAAG;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC;AA6NF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,QAAQ,GAAG,mBAAmB,CAoJhE"}
@@ -0,0 +1,371 @@
1
+ /**
2
+ * reject_changes — reject all tracked changes in a OOXML document body.
3
+ *
4
+ * Produces the document as it was before tracked changes were made by:
5
+ * - Removing w:ins elements AND their content (insertions undone)
6
+ * - Unwrapping w:del elements and converting w:delText → w:t (deletions restored)
7
+ * - Unwrapping w:moveFrom (keep at original position), removing w:moveTo and content
8
+ * - Restoring original properties from *PrChange records
9
+ * - Preserving cross-paragraph bookmark boundaries when removing inserted paragraphs
10
+ * - Stripping paragraph-level revision markers and rsidDel attributes
11
+ *
12
+ * Operates on the W3C DOM (`@xmldom/xmldom`).
13
+ */
14
+ import { OOXML } from './namespaces.js';
15
+ const W_NS = OOXML.W_NS;
16
+ // ── DOM helpers (internal) ──────────────────────────────────────────
17
+ function isW(node, localName) {
18
+ return (node.nodeType === 1 &&
19
+ node.namespaceURI === W_NS &&
20
+ node.localName === localName);
21
+ }
22
+ function isWElement(node) {
23
+ return node.nodeType === 1 && node.namespaceURI === W_NS;
24
+ }
25
+ function getDepth(node) {
26
+ let depth = 0;
27
+ let cur = node.parentNode;
28
+ while (cur) {
29
+ depth++;
30
+ cur = cur.parentNode;
31
+ }
32
+ return depth;
33
+ }
34
+ function collectByLocalName(container, localName) {
35
+ return Array.from(container.getElementsByTagNameNS(W_NS, localName));
36
+ }
37
+ function removeAllByLocalName(container, localName) {
38
+ const elements = collectByLocalName(container, localName);
39
+ let count = 0;
40
+ for (const el of elements) {
41
+ if (el.parentNode) {
42
+ el.parentNode.removeChild(el);
43
+ count++;
44
+ }
45
+ }
46
+ return count;
47
+ }
48
+ function unwrapAllByLocalName(container, localName) {
49
+ const elements = collectByLocalName(container, localName);
50
+ // Sort deepest-first to handle nested wrappers correctly
51
+ elements.sort((a, b) => getDepth(b) - getDepth(a));
52
+ let count = 0;
53
+ for (const el of elements) {
54
+ const parent = el.parentNode;
55
+ if (!parent)
56
+ continue;
57
+ while (el.firstChild) {
58
+ parent.insertBefore(el.firstChild, el);
59
+ }
60
+ parent.removeChild(el);
61
+ count++;
62
+ }
63
+ return count;
64
+ }
65
+ /**
66
+ * Check if a paragraph has a paragraph-level revision marker.
67
+ * Pattern: w:p > w:pPr > w:rPr > w:ins (or w:del)
68
+ */
69
+ function paragraphHasParaMarker(p, markerLocalName) {
70
+ for (let i = 0; i < p.childNodes.length; i++) {
71
+ const child = p.childNodes[i];
72
+ if (!isW(child, 'pPr'))
73
+ continue;
74
+ for (let j = 0; j < child.childNodes.length; j++) {
75
+ const pPrChild = child.childNodes[j];
76
+ if (!isW(pPrChild, 'rPr'))
77
+ continue;
78
+ for (let k = 0; k < pPrChild.childNodes.length; k++) {
79
+ const rPrChild = pPrChild.childNodes[k];
80
+ if (isW(rPrChild, markerLocalName))
81
+ return true;
82
+ }
83
+ }
84
+ }
85
+ return false;
86
+ }
87
+ /**
88
+ * Check if a node (or its descendants) contains any w:r elements.
89
+ */
90
+ function containsRun(node) {
91
+ if (isW(node, 'r'))
92
+ return true;
93
+ for (let i = 0; i < node.childNodes.length; i++) {
94
+ if (containsRun(node.childNodes[i]))
95
+ return true;
96
+ }
97
+ return false;
98
+ }
99
+ // Tags that are "inserted" content — removal candidates when rejecting
100
+ const INSERTED_LOCALS = new Set(['ins', 'moveTo']);
101
+ // Tags that are "kept" content when rejecting
102
+ const KEPT_LOCALS = new Set(['del', 'moveFrom']);
103
+ // Range marker tags to ignore
104
+ const RANGE_MARKER_LOCALS = new Set([
105
+ 'moveFromRangeStart', 'moveFromRangeEnd',
106
+ 'moveToRangeStart', 'moveToRangeEnd',
107
+ ]);
108
+ /**
109
+ * Determine if a paragraph's only content lives inside w:ins or w:moveTo
110
+ * (no w:r outside those wrappers, and no w:del/w:moveFrom siblings).
111
+ * These paragraphs should be removed when rejecting changes.
112
+ */
113
+ function paragraphHasOnlyInsertedContent(p) {
114
+ for (let i = 0; i < p.childNodes.length; i++) {
115
+ const child = p.childNodes[i];
116
+ if (child.nodeType !== 1)
117
+ continue;
118
+ const el = child;
119
+ if (el.namespaceURI !== W_NS)
120
+ continue;
121
+ const local = el.localName;
122
+ // If the paragraph has kept content wrappers, it stays
123
+ if (KEPT_LOCALS.has(local))
124
+ return false;
125
+ // Skip pPr, range markers, and inserted wrappers
126
+ if (local === 'pPr' || RANGE_MARKER_LOCALS.has(local) || INSERTED_LOCALS.has(local))
127
+ continue;
128
+ // A bare w:r or any other element that contains runs means live content
129
+ if (local === 'r' || containsRun(el))
130
+ return false;
131
+ }
132
+ // We passed all children without finding live content — but there must be
133
+ // at least one inserted wrapper for this to be an "inserted content" paragraph
134
+ for (let i = 0; i < p.childNodes.length; i++) {
135
+ const child = p.childNodes[i];
136
+ if (child.nodeType === 1 && isWElement(child) && INSERTED_LOCALS.has(child.localName)) {
137
+ return true;
138
+ }
139
+ }
140
+ return false;
141
+ }
142
+ // Property change element local names (all 6 types)
143
+ const PR_CHANGE_LOCALS = [
144
+ 'rPrChange', 'pPrChange', 'sectPrChange',
145
+ 'tblPrChange', 'trPrChange', 'tcPrChange',
146
+ ];
147
+ /**
148
+ * Relocate orphaned bookmarks from a paragraph being removed to an
149
+ * adjacent kept paragraph. This preserves cross-paragraph bookmark boundaries.
150
+ */
151
+ function relocateBookmarks(p, paragraphsToRemove) {
152
+ const parent = p.parentNode;
153
+ if (!parent)
154
+ return;
155
+ // Find an adjacent kept paragraph (prefer next, fallback to previous)
156
+ let target = null;
157
+ let sibling = p.nextSibling;
158
+ while (sibling) {
159
+ if (sibling.nodeType === 1 && isW(sibling, 'p') && !paragraphsToRemove.has(sibling)) {
160
+ target = sibling;
161
+ break;
162
+ }
163
+ sibling = sibling.nextSibling;
164
+ }
165
+ if (!target) {
166
+ sibling = p.previousSibling;
167
+ while (sibling) {
168
+ if (sibling.nodeType === 1 && isW(sibling, 'p') && !paragraphsToRemove.has(sibling)) {
169
+ target = sibling;
170
+ break;
171
+ }
172
+ sibling = sibling.previousSibling;
173
+ }
174
+ }
175
+ if (!target)
176
+ return;
177
+ // Move bookmarkStart/bookmarkEnd elements that are direct children of the paragraph
178
+ const toMove = [];
179
+ for (let i = 0; i < p.childNodes.length; i++) {
180
+ const child = p.childNodes[i];
181
+ if (child.nodeType !== 1)
182
+ continue;
183
+ const el = child;
184
+ if (isW(el, 'bookmarkStart') || isW(el, 'bookmarkEnd')) {
185
+ toMove.push(el);
186
+ }
187
+ }
188
+ // Also check sibling bookmarks (sibling-style: <bookmarkStart/><p/><bookmarkEnd/>)
189
+ let prev = p.previousSibling;
190
+ while (prev) {
191
+ if (prev.nodeType === 1) {
192
+ const el = prev;
193
+ if (isW(el, 'bookmarkStart') || isW(el, 'bookmarkEnd')) {
194
+ toMove.push(el);
195
+ prev = prev.previousSibling;
196
+ continue;
197
+ }
198
+ break;
199
+ }
200
+ prev = prev.previousSibling;
201
+ }
202
+ let next = p.nextSibling;
203
+ while (next) {
204
+ if (next.nodeType === 1) {
205
+ const el = next;
206
+ if (isW(el, 'bookmarkStart') || isW(el, 'bookmarkEnd')) {
207
+ toMove.push(el);
208
+ next = next.nextSibling;
209
+ continue;
210
+ }
211
+ break;
212
+ }
213
+ next = next.nextSibling;
214
+ }
215
+ for (const bm of toMove) {
216
+ // Insert at the beginning of the target paragraph (after pPr if present)
217
+ const firstNonPPr = Array.from(target.childNodes).find((n) => !(n.nodeType === 1 && isW(n, 'pPr')));
218
+ if (bm.parentNode)
219
+ bm.parentNode.removeChild(bm);
220
+ target.insertBefore(bm, firstNonPPr ?? null);
221
+ }
222
+ }
223
+ // ── Public API ──────────────────────────────────────────────────────
224
+ /**
225
+ * Reject all tracked changes in the document body, restoring the
226
+ * document to its pre-edit state.
227
+ *
228
+ * Mutates the Document in place (same convention as acceptChanges).
229
+ */
230
+ export function rejectChanges(doc) {
231
+ const body = doc.getElementsByTagNameNS(W_NS, 'body').item(0);
232
+ if (!body) {
233
+ return { insertionsRemoved: 0, deletionsRestored: 0, movesReverted: 0, propertyChangesReverted: 0 };
234
+ }
235
+ // Phase A — Identify paragraphs to remove (entirely inserted paragraphs)
236
+ const paragraphsToRemove = new Set();
237
+ const allParagraphs = collectByLocalName(body, 'p');
238
+ for (const p of allParagraphs) {
239
+ // Paragraph-level insertion marker: w:p > w:pPr > w:rPr > w:ins
240
+ if (paragraphHasParaMarker(p, 'ins')) {
241
+ paragraphsToRemove.add(p);
242
+ continue;
243
+ }
244
+ // Paragraphs whose only content is inside w:ins or w:moveTo
245
+ if (paragraphHasOnlyInsertedContent(p)) {
246
+ paragraphsToRemove.add(p);
247
+ }
248
+ }
249
+ // Phase B — Preserve cross-paragraph bookmark boundaries
250
+ for (const p of paragraphsToRemove) {
251
+ relocateBookmarks(p, paragraphsToRemove);
252
+ }
253
+ // Phase C — Remove insertions and move destinations
254
+ const insertionsRemoved = removeAllByLocalName(body, 'ins');
255
+ const moveToRemoved = removeAllByLocalName(body, 'moveTo');
256
+ removeAllByLocalName(body, 'moveToRangeStart');
257
+ removeAllByLocalName(body, 'moveToRangeEnd');
258
+ removeAllByLocalName(body, 'moveFromRangeStart');
259
+ removeAllByLocalName(body, 'moveFromRangeEnd');
260
+ // Phase D — Unwrap deletions and convert w:delText → w:t
261
+ const deletionsRestored = unwrapAllByLocalName(body, 'del');
262
+ // Rename all w:delText elements to w:t so getParagraphText() sees them
263
+ const delTexts = collectByLocalName(body, 'delText');
264
+ for (const dt of delTexts) {
265
+ const parent = dt.parentNode;
266
+ if (!parent)
267
+ continue;
268
+ const t = doc.createElementNS(W_NS, 'w:t');
269
+ // Copy text content
270
+ if (dt.textContent) {
271
+ t.appendChild(doc.createTextNode(dt.textContent));
272
+ }
273
+ // Copy xml:space attribute if present
274
+ const xmlSpace = dt.getAttributeNS('http://www.w3.org/XML/1998/namespace', 'space')
275
+ ?? dt.getAttribute('xml:space');
276
+ if (xmlSpace) {
277
+ t.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', xmlSpace);
278
+ }
279
+ parent.replaceChild(t, dt);
280
+ }
281
+ // Phase E — Unwrap move sources (keep content at original position)
282
+ const moveFromUnwrapped = unwrapAllByLocalName(body, 'moveFrom');
283
+ // Phase F — Restore original properties from *PrChange records
284
+ let propertyChangesReverted = 0;
285
+ for (const localName of PR_CHANGE_LOCALS) {
286
+ const changes = collectByLocalName(body, localName);
287
+ // Sort deepest-first
288
+ changes.sort((a, b) => getDepth(b) - getDepth(a));
289
+ for (const change of changes) {
290
+ const parentProp = change.parentNode;
291
+ if (!parentProp)
292
+ continue;
293
+ const grandParent = parentProp.parentNode;
294
+ if (!grandParent)
295
+ continue;
296
+ // The *PrChange element contains the original properties.
297
+ // Extract the original property element (e.g. rPr inside rPrChange).
298
+ // The expected mapping:
299
+ // rPrChange → child rPr = original run properties
300
+ // pPrChange → child pPr = original paragraph properties
301
+ // etc.
302
+ const expectedChildLocal = localName.replace('Change', '');
303
+ let originalProps = null;
304
+ for (let i = 0; i < change.childNodes.length; i++) {
305
+ const child = change.childNodes[i];
306
+ if (child.nodeType === 1 && isW(child, expectedChildLocal)) {
307
+ originalProps = child;
308
+ break;
309
+ }
310
+ }
311
+ if (originalProps) {
312
+ // Replace the current property element with the original
313
+ const restored = originalProps.cloneNode(true);
314
+ grandParent.replaceChild(restored, parentProp);
315
+ }
316
+ else {
317
+ // Original props were empty — remove the parent property element entirely
318
+ grandParent.removeChild(parentProp);
319
+ }
320
+ propertyChangesReverted++;
321
+ }
322
+ }
323
+ // Phase G — Cleanup
324
+ // Strip paragraph-level revision markers from w:pPr/w:rPr
325
+ for (const p of collectByLocalName(body, 'p')) {
326
+ for (let i = 0; i < p.childNodes.length; i++) {
327
+ const child = p.childNodes[i];
328
+ if (!isW(child, 'pPr'))
329
+ continue;
330
+ for (let j = 0; j < child.childNodes.length; j++) {
331
+ const pPrChild = child.childNodes[j];
332
+ if (!isW(pPrChild, 'rPr'))
333
+ continue;
334
+ const toRemove = [];
335
+ for (let k = 0; k < pPrChild.childNodes.length; k++) {
336
+ const rPrChild = pPrChild.childNodes[k];
337
+ if (isW(rPrChild, 'ins') || isW(rPrChild, 'del')) {
338
+ toRemove.push(rPrChild);
339
+ }
340
+ }
341
+ for (const el of toRemove) {
342
+ pPrChild.removeChild(el);
343
+ }
344
+ }
345
+ }
346
+ }
347
+ // Remove paragraphs collected in Phase A
348
+ for (const p of paragraphsToRemove) {
349
+ if (p.parentNode) {
350
+ p.parentNode.removeChild(p);
351
+ }
352
+ }
353
+ // Strip w:rsidDel attributes on remaining elements
354
+ const allElements = body.getElementsByTagNameNS(W_NS, '*');
355
+ for (let i = 0; i < allElements.length; i++) {
356
+ const el = allElements[i];
357
+ if (el.hasAttributeNS(W_NS, 'rsidDel')) {
358
+ el.removeAttributeNS(W_NS, 'rsidDel');
359
+ }
360
+ if (el.hasAttribute('w:rsidDel')) {
361
+ el.removeAttribute('w:rsidDel');
362
+ }
363
+ }
364
+ return {
365
+ insertionsRemoved,
366
+ deletionsRestored,
367
+ movesReverted: moveFromUnwrapped + moveToRemoved,
368
+ propertyChangesReverted,
369
+ };
370
+ }
371
+ //# sourceMappingURL=reject_changes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reject_changes.js","sourceRoot":"","sources":["../../src/primitives/reject_changes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;A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C,IAAI,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC;wBACjD,QAAQ,CAAC,IAAI,CAAC,QAAmB,CAAC,CAAC;oBACrC,CAAC;gBACH,CAAC;gBACD,KAAK,MAAM,EAAE,IAAI,QAAQ,EAAE,CAAC;oBAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;gBAC3B,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;IAED,yCAAyC;IACzC,KAAK,MAAM,CAAC,IAAI,kBAAkB,EAAE,CAAC;QACnC,IAAI,CAAC,CAAC,UAAU,EAAE,CAAC;YACjB,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,mDAAmD;IACnD,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC3D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5C,MAAM,EAAE,GAAG,WAAW,CAAC,CAAC,CAAE,CAAC;QAC3B,IAAI,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,CAAC;YACvC,EAAE,CAAC,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;QACxC,CAAC;QACD,IAAI,EAAE,CAAC,YAAY,CAAC,WAAW,CAAC,EAAE,CAAC;YACjC,EAAE,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;QAClC,CAAC;IACH,CAAC;IAED,OAAO;QACL,iBAAiB;QACjB,iBAAiB;QACjB,aAAa,EAAE,iBAAiB,GAAG,aAAa;QAChD,uBAAuB;KACxB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ export type RelsMap = Map<string, string>;
2
+ /**
3
+ * Parse a document.xml.rels DOM and return a Map<rId, targetUrl> for external hyperlinks only.
4
+ * Returns an empty map when the rels document is null (e.g. file missing from the DOCX archive).
5
+ */
6
+ export declare function parseDocumentRels(relsDoc: Document | null): RelsMap;
7
+ //# sourceMappingURL=relationships.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationships.d.ts","sourceRoot":"","sources":["../../src/primitives/relationships.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,IAAI,GAAG,OAAO,CAiBnE"}
@@ -0,0 +1,24 @@
1
+ // Parser for word/_rels/document.xml.rels — extracts external hyperlink relationships.
2
+ import { OOXML } from './namespaces.js';
3
+ /**
4
+ * Parse a document.xml.rels DOM and return a Map<rId, targetUrl> for external hyperlinks only.
5
+ * Returns an empty map when the rels document is null (e.g. file missing from the DOCX archive).
6
+ */
7
+ export function parseDocumentRels(relsDoc) {
8
+ const map = new Map();
9
+ if (!relsDoc)
10
+ return map;
11
+ const relationships = relsDoc.getElementsByTagName('Relationship');
12
+ for (let i = 0; i < relationships.length; i++) {
13
+ const rel = relationships.item(i);
14
+ const type = rel.getAttribute('Type');
15
+ const targetMode = rel.getAttribute('TargetMode');
16
+ const id = rel.getAttribute('Id');
17
+ const target = rel.getAttribute('Target');
18
+ if (type === OOXML.HYPERLINK_REL_TYPE && targetMode === 'External' && id && target) {
19
+ map.set(id, target);
20
+ }
21
+ }
22
+ return map;
23
+ }
24
+ //# sourceMappingURL=relationships.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relationships.js","sourceRoot":"","sources":["../../src/primitives/relationships.ts"],"names":[],"mappings":"AAAA,uFAAuF;AAEvF,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAIxC;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAwB;IACxD,MAAM,GAAG,GAAY,IAAI,GAAG,EAAE,CAAC;IAC/B,IAAI,CAAC,OAAO;QAAE,OAAO,GAAG,CAAC;IAEzB,MAAM,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC,cAAc,CAAC,CAAC;IACnE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAC9C,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC;QACnC,MAAM,IAAI,GAAG,GAAG,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACtC,MAAM,UAAU,GAAG,GAAG,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QAClD,MAAM,EAAE,GAAG,GAAG,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAClC,MAAM,MAAM,GAAG,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;QAE1C,IAAI,IAAI,KAAK,KAAK,CAAC,kBAAkB,IAAI,UAAU,KAAK,UAAU,IAAI,EAAE,IAAI,MAAM,EAAE,CAAC;YACnF,GAAG,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,17 @@
1
+ export declare const HIGHLIGHT_TAG = "highlight";
2
+ export declare function hasFormattingTags(text: string): boolean;
3
+ export declare function stripFormattingTags(text: string): string;
4
+ export declare function hasHyperlinkTags(text: string): boolean;
5
+ export declare function stripHyperlinkTags(text: string): string;
6
+ export declare function hasHighlightTags(text: string): boolean;
7
+ export declare function stripHighlightTags(text: string): string;
8
+ export declare function hasFontTags(text: string): boolean;
9
+ export declare function stripFontTags(text: string): string;
10
+ /**
11
+ * Strip ALL known inline tags from text. Handles `<b>`, `<i>`, `<u>`,
12
+ * `<highlight>`, `<highlighting>`, `<a href="...">`, `</a>`, `<font ...>`,
13
+ * `</font>`, `<header>`, `</header>`, `<RunInHeader>`, `</RunInHeader>`,
14
+ * `<definition>`, `</definition>`.
15
+ */
16
+ export declare function stripAllInlineTags(text: string): string;
17
+ //# sourceMappingURL=semantic_tags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semantic_tags.d.ts","sourceRoot":"","sources":["../../src/primitives/semantic_tags.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,cAAc,CAAC;AAQzC,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIxD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOtD;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAMvD;AAOD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEjD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGlD;AAOD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAGvD"}
@@ -0,0 +1,58 @@
1
+ // Semantic tag emission + stripping for Safe-Docx TS.
2
+ //
3
+ // Headers are represented via a dedicated column (not inline tags) in TOON output.
4
+ export const HIGHLIGHT_TAG = 'highlight';
5
+ // Formatting tag helpers ───────────────────────────────────────────
6
+ const FORMATTING_TAG_RE = /<\/?[biu]>/g;
7
+ const HYPERLINK_OPEN_RE = /<a\s+href="[^"]*">/g;
8
+ const HYPERLINK_CLOSE_RE = /<\/a>/g;
9
+ export function hasFormattingTags(text) {
10
+ return FORMATTING_TAG_RE.test(text);
11
+ }
12
+ export function stripFormattingTags(text) {
13
+ // Reset lastIndex since these are global regexes.
14
+ FORMATTING_TAG_RE.lastIndex = 0;
15
+ return text.replace(FORMATTING_TAG_RE, '');
16
+ }
17
+ export function hasHyperlinkTags(text) {
18
+ return text.includes('<a ') || text.includes('</a>');
19
+ }
20
+ export function stripHyperlinkTags(text) {
21
+ return text.replace(HYPERLINK_OPEN_RE, '').replace(HYPERLINK_CLOSE_RE, '');
22
+ }
23
+ export function hasHighlightTags(text) {
24
+ return (text.includes(`<${HIGHLIGHT_TAG}>`) ||
25
+ text.includes(`</${HIGHLIGHT_TAG}>`) ||
26
+ text.includes('<highlighting>') ||
27
+ text.includes('</highlighting>'));
28
+ }
29
+ export function stripHighlightTags(text) {
30
+ return text
31
+ .replaceAll(new RegExp(`<${HIGHLIGHT_TAG}>`, 'g'), '')
32
+ .replaceAll(new RegExp(`</${HIGHLIGHT_TAG}>`, 'g'), '')
33
+ .replaceAll(/<highlighting>/g, '')
34
+ .replaceAll(/<\/highlighting>/g, '');
35
+ }
36
+ // Font tag helpers ─────────────────────────────────────────────────
37
+ const FONT_OPEN_RE = /<font\b[^>]*>/g;
38
+ const FONT_CLOSE_RE = /<\/font>/g;
39
+ export function hasFontTags(text) {
40
+ return text.includes('<font') || text.includes('</font>');
41
+ }
42
+ export function stripFontTags(text) {
43
+ FONT_OPEN_RE.lastIndex = 0;
44
+ return text.replace(FONT_OPEN_RE, '').replace(FONT_CLOSE_RE, '');
45
+ }
46
+ // General-purpose inline tag stripper ──────────────────────────────
47
+ const ALL_INLINE_TAGS_RE = /<\/?(?:b|i|u|highlight|highlighting|a|font|header|RunInHeader|definition)(?:\s[^>]*)?>|<a\s+href="[^"]*">/g;
48
+ /**
49
+ * Strip ALL known inline tags from text. Handles `<b>`, `<i>`, `<u>`,
50
+ * `<highlight>`, `<highlighting>`, `<a href="...">`, `</a>`, `<font ...>`,
51
+ * `</font>`, `<header>`, `</header>`, `<RunInHeader>`, `</RunInHeader>`,
52
+ * `<definition>`, `</definition>`.
53
+ */
54
+ export function stripAllInlineTags(text) {
55
+ ALL_INLINE_TAGS_RE.lastIndex = 0;
56
+ return text.replace(ALL_INLINE_TAGS_RE, '');
57
+ }
58
+ //# sourceMappingURL=semantic_tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"semantic_tags.js","sourceRoot":"","sources":["../../src/primitives/semantic_tags.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,EAAE;AACF,mFAAmF;AAEnF,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;AAEzC,qEAAqE;AAErE,MAAM,iBAAiB,GAAG,aAAa,CAAC;AACxC,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAChD,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AAEpC,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC5C,OAAO,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,kDAAkD;IAClD,iBAAiB,CAAC,SAAS,GAAG,CAAC,CAAC;IAChC,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,CACL,IAAI,CAAC,QAAQ,CAAC,IAAI,aAAa,GAAG,CAAC;QACnC,IAAI,CAAC,QAAQ,CAAC,KAAK,aAAa,GAAG,CAAC;QACpC,IAAI,CAAC,QAAQ,CAA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o`
5
+ * wrappers that share the same `w:author` attribute and local name.
6
+ * Does not merge across different change types or non-whitespace separators.
7
+ */
8
+ export type SimplifyRedlinesResult = {
9
+ wrappersConsolidated: number;
10
+ };
11
+ /**
12
+ * Simplify tracked-change wrappers across all paragraphs in the document
13
+ * body by merging adjacent same-type, same-author wrappers.
14
+ *
15
+ * This reduces visual clutter in redline documents without altering
16
+ * semantics (every run's tracked-change attribution is preserved).
17
+ */
18
+ export declare function simplifyRedlines(doc: Document): SimplifyRedlinesResult;
19
+ //# sourceMappingURL=simplify_redlines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"simplify_redlines.d.ts","sourceRoot":"","sources":["../../src/primitives/simplify_redlines.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,sBAAsB,GAAG;IACnC,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AA2FF;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,QAAQ,GAAG,sBAAsB,CAetE"}