open-agreements 0.3.1 → 0.5.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 (578) hide show
  1. package/README.de.md +6 -1
  2. package/README.es.md +6 -1
  3. package/README.md +13 -1
  4. package/README.pt-br.md +6 -1
  5. package/README.zh.md +6 -1
  6. package/content/external/yc-safe-discount/metadata.yaml +1 -1
  7. package/content/external/yc-safe-mfn/metadata.yaml +1 -1
  8. package/content/external/yc-safe-pro-rata-side-letter/metadata.yaml +1 -1
  9. package/content/external/yc-safe-valuation-cap/metadata.yaml +1 -1
  10. package/content/recipes/QUALITY_TRACKER.md +35 -0
  11. package/content/recipes/nvca-certificate-of-incorporation/clean.json +14 -2
  12. package/content/recipes/nvca-certificate-of-incorporation/computed.json +78 -0
  13. package/content/recipes/nvca-certificate-of-incorporation/metadata.yaml +115 -2
  14. package/content/recipes/nvca-certificate-of-incorporation/replacements.json +50 -2
  15. package/content/recipes/nvca-certificate-of-incorporation/selections-roadmap.md +47 -0
  16. package/content/recipes/nvca-indemnification-agreement/metadata.yaml +5 -1
  17. package/content/recipes/nvca-indemnification-agreement/replacements.json +30 -5
  18. package/content/recipes/nvca-investors-rights-agreement/clean.json +9 -1
  19. package/content/recipes/nvca-investors-rights-agreement/metadata.yaml +1 -1
  20. package/content/recipes/nvca-investors-rights-agreement/replacements.json +4 -1
  21. package/content/recipes/nvca-management-rights-letter/metadata.yaml +1 -1
  22. package/content/recipes/nvca-rofr-co-sale-agreement/clean.json +11 -1
  23. package/content/recipes/nvca-rofr-co-sale-agreement/metadata.yaml +5 -1
  24. package/content/recipes/nvca-rofr-co-sale-agreement/replacements.json +62 -3
  25. package/content/recipes/nvca-stock-purchase-agreement/clean.json +8 -3
  26. package/content/recipes/nvca-stock-purchase-agreement/metadata.yaml +6 -1
  27. package/content/recipes/nvca-stock-purchase-agreement/normalize.json +0 -16
  28. package/content/recipes/nvca-stock-purchase-agreement/replacements.json +15 -12
  29. package/content/recipes/nvca-stock-purchase-agreement/selections.json +17 -0
  30. package/content/recipes/nvca-voting-agreement/clean.json +11 -1
  31. package/content/recipes/nvca-voting-agreement/metadata.yaml +1 -1
  32. package/content/recipes/nvca-voting-agreement/replacements.json +2 -1
  33. package/content/templates/bonterms-mutual-nda/metadata.yaml +1 -1
  34. package/content/templates/bonterms-professional-services-agreement/metadata.yaml +1 -1
  35. package/content/templates/closing-checklist/metadata.yaml +1 -1
  36. package/content/templates/closing-checklist/template.docx +0 -0
  37. package/content/templates/common-paper-ai-addendum/metadata.yaml +1 -1
  38. package/content/templates/common-paper-ai-addendum-in-app/metadata.yaml +1 -1
  39. package/content/templates/common-paper-amendment/metadata.yaml +1 -1
  40. package/content/templates/common-paper-business-associate-agreement/metadata.yaml +1 -1
  41. package/content/templates/common-paper-cloud-service-agreement/metadata.yaml +1 -1
  42. package/content/templates/common-paper-csa-click-through/metadata.yaml +1 -1
  43. package/content/templates/common-paper-csa-with-ai/metadata.yaml +1 -1
  44. package/content/templates/common-paper-csa-with-sla/metadata.yaml +1 -1
  45. package/content/templates/common-paper-csa-without-sla/metadata.yaml +1 -1
  46. package/content/templates/common-paper-data-processing-agreement/metadata.yaml +1 -1
  47. package/content/templates/common-paper-design-partner-agreement/metadata.yaml +1 -1
  48. package/content/templates/common-paper-independent-contractor-agreement/metadata.yaml +1 -1
  49. package/content/templates/common-paper-letter-of-intent/metadata.yaml +1 -1
  50. package/content/templates/common-paper-mutual-nda/metadata.yaml +1 -1
  51. package/content/templates/common-paper-one-way-nda/metadata.yaml +1 -1
  52. package/content/templates/common-paper-order-form/metadata.yaml +1 -1
  53. package/content/templates/common-paper-order-form-with-sla/metadata.yaml +1 -1
  54. package/content/templates/common-paper-partnership-agreement/metadata.yaml +1 -1
  55. package/content/templates/common-paper-pilot-agreement/metadata.yaml +1 -1
  56. package/content/templates/common-paper-professional-services-agreement/metadata.yaml +1 -1
  57. package/content/templates/common-paper-software-license-agreement/metadata.yaml +1 -1
  58. package/content/templates/common-paper-statement-of-work/metadata.yaml +1 -1
  59. package/content/templates/common-paper-term-sheet/metadata.yaml +1 -1
  60. package/content/templates/openagreements-employee-ip-inventions-assignment/metadata.yaml +1 -1
  61. package/content/templates/openagreements-employment-confidentiality-acknowledgement/metadata.yaml +1 -1
  62. package/content/templates/openagreements-employment-offer-letter/metadata.yaml +1 -1
  63. package/content/templates/working-group-list/metadata.yaml +1 -1
  64. package/dist/cli/index.d.ts.map +1 -1
  65. package/dist/cli/index.js +8 -4
  66. package/dist/cli/index.js.map +1 -1
  67. package/dist/commands/fill.js +3 -3
  68. package/dist/commands/fill.js.map +1 -1
  69. package/dist/commands/list.js +19 -15
  70. package/dist/commands/list.js.map +1 -1
  71. package/dist/core/checklist/docx-import.d.ts +50 -0
  72. package/dist/core/checklist/docx-import.d.ts.map +1 -0
  73. package/dist/core/checklist/docx-import.js +613 -0
  74. package/dist/core/checklist/docx-import.js.map +1 -0
  75. package/dist/core/checklist/docx-table-helpers.d.ts +33 -0
  76. package/dist/core/checklist/docx-table-helpers.d.ts.map +1 -0
  77. package/dist/core/checklist/docx-table-helpers.js +154 -0
  78. package/dist/core/checklist/docx-table-helpers.js.map +1 -0
  79. package/dist/core/checklist/format-checklist-docx.d.ts.map +1 -1
  80. package/dist/core/checklist/format-checklist-docx.js +37 -88
  81. package/dist/core/checklist/format-checklist-docx.js.map +1 -1
  82. package/dist/core/checklist/index.d.ts +15 -12
  83. package/dist/core/checklist/index.d.ts.map +1 -1
  84. package/dist/core/checklist/index.js +48 -30
  85. package/dist/core/checklist/index.js.map +1 -1
  86. package/dist/core/checklist/status-labels.d.ts +6 -0
  87. package/dist/core/checklist/status-labels.d.ts.map +1 -1
  88. package/dist/core/checklist/status-labels.js +8 -0
  89. package/dist/core/checklist/status-labels.js.map +1 -1
  90. package/dist/core/command-generation/adapters/claude.js +4 -4
  91. package/dist/core/employment/memo.js +3 -3
  92. package/dist/core/engine.js +1 -1
  93. package/dist/core/external/index.js +1 -1
  94. package/dist/core/fill-pipeline.d.ts +3 -3
  95. package/dist/core/fill-pipeline.js +6 -6
  96. package/dist/core/fill-pipeline.js.map +1 -1
  97. package/dist/core/metadata.d.ts +13 -3
  98. package/dist/core/metadata.d.ts.map +1 -1
  99. package/dist/core/metadata.js +19 -11
  100. package/dist/core/metadata.js.map +1 -1
  101. package/dist/core/recipe/bracket-normalizer.d.ts +4 -5
  102. package/dist/core/recipe/bracket-normalizer.d.ts.map +1 -1
  103. package/dist/core/recipe/bracket-normalizer.js +67 -149
  104. package/dist/core/recipe/bracket-normalizer.js.map +1 -1
  105. package/dist/core/recipe/cleaner.d.ts.map +1 -1
  106. package/dist/core/recipe/cleaner.js +91 -7
  107. package/dist/core/recipe/cleaner.js.map +1 -1
  108. package/dist/core/recipe/downloader.d.ts.map +1 -1
  109. package/dist/core/recipe/downloader.js +8 -3
  110. package/dist/core/recipe/downloader.js.map +1 -1
  111. package/dist/core/recipe/index.d.ts +2 -1
  112. package/dist/core/recipe/index.d.ts.map +1 -1
  113. package/dist/core/recipe/index.js +11 -4
  114. package/dist/core/recipe/index.js.map +1 -1
  115. package/dist/core/recipe/patcher.d.ts +9 -5
  116. package/dist/core/recipe/patcher.d.ts.map +1 -1
  117. package/dist/core/recipe/patcher.js +183 -136
  118. package/dist/core/recipe/patcher.js.map +1 -1
  119. package/dist/core/recipe/replacement-keys.d.ts +2 -7
  120. package/dist/core/recipe/replacement-keys.d.ts.map +1 -1
  121. package/dist/core/recipe/replacement-keys.js +3 -20
  122. package/dist/core/recipe/replacement-keys.js.map +1 -1
  123. package/dist/core/recipe/source-drift.js +1 -1
  124. package/dist/core/recipe/source-drift.js.map +1 -1
  125. package/dist/core/recipe/verifier.d.ts +7 -1
  126. package/dist/core/recipe/verifier.d.ts.map +1 -1
  127. package/dist/core/recipe/verifier.js +69 -3
  128. package/dist/core/recipe/verifier.js.map +1 -1
  129. package/dist/core/selector.d.ts +2 -0
  130. package/dist/core/selector.d.ts.map +1 -1
  131. package/dist/core/selector.js +97 -1
  132. package/dist/core/selector.js.map +1 -1
  133. package/dist/core/template-listing.d.ts +3 -1
  134. package/dist/core/template-listing.d.ts.map +1 -1
  135. package/dist/core/template-listing.js +4 -3
  136. package/dist/core/template-listing.js.map +1 -1
  137. package/dist/core/unified-pipeline.d.ts +1 -1
  138. package/dist/core/unified-pipeline.d.ts.map +1 -1
  139. package/dist/core/unified-pipeline.js +21 -3
  140. package/dist/core/unified-pipeline.js.map +1 -1
  141. package/dist/core/validation/external.d.ts.map +1 -1
  142. package/dist/core/validation/external.js +0 -2
  143. package/dist/core/validation/external.js.map +1 -1
  144. package/dist/core/validation/recipe.d.ts.map +1 -1
  145. package/dist/core/validation/recipe.js +0 -2
  146. package/dist/core/validation/recipe.js.map +1 -1
  147. package/dist/core/validation/scan-metadata.d.ts.map +1 -1
  148. package/dist/core/validation/scan-metadata.js +17 -1
  149. package/dist/core/validation/scan-metadata.js.map +1 -1
  150. package/dist/core/validation/template.js +5 -5
  151. package/dist/index.d.ts +1 -1
  152. package/dist/index.d.ts.map +1 -1
  153. package/dist/index.js +1 -1
  154. package/dist/index.js.map +1 -1
  155. package/node_modules/@usejunior/docx-core/dist/atomizer.d.ts +218 -0
  156. package/node_modules/@usejunior/docx-core/dist/atomizer.d.ts.map +1 -0
  157. package/node_modules/@usejunior/docx-core/dist/atomizer.js +869 -0
  158. package/node_modules/@usejunior/docx-core/dist/atomizer.js.map +1 -0
  159. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/atomLcs.d.ts +96 -0
  160. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/atomLcs.d.ts.map +1 -0
  161. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/atomLcs.js +347 -0
  162. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/atomLcs.js.map +1 -0
  163. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/consumerCompatibility.d.ts +2 -0
  164. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/consumerCompatibility.d.ts.map +1 -0
  165. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/consumerCompatibility.js +188 -0
  166. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/consumerCompatibility.js.map +1 -0
  167. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/debug.d.ts +41 -0
  168. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/debug.d.ts.map +1 -0
  169. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/debug.js +85 -0
  170. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/debug.js.map +1 -0
  171. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.d.ts +64 -0
  172. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.d.ts.map +1 -0
  173. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.js +985 -0
  174. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/documentReconstructor.js.map +1 -0
  175. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/hierarchicalLcs.d.ts +111 -0
  176. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/hierarchicalLcs.d.ts.map +1 -0
  177. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/hierarchicalLcs.js +469 -0
  178. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/hierarchicalLcs.js.map +1 -0
  179. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.d.ts +277 -0
  180. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.d.ts.map +1 -0
  181. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.js +2279 -0
  182. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/inPlaceModifier.js.map +1 -0
  183. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/numberingIntegration.d.ts +59 -0
  184. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/numberingIntegration.d.ts.map +1 -0
  185. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/numberingIntegration.js +209 -0
  186. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/numberingIntegration.js.map +1 -0
  187. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.d.ts +69 -0
  188. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.d.ts.map +1 -0
  189. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.js +910 -0
  190. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/pipeline.js.map +1 -0
  191. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/premergeRuns.d.ts +26 -0
  192. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/premergeRuns.d.ts.map +1 -0
  193. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/premergeRuns.js +153 -0
  194. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/premergeRuns.js.map +1 -0
  195. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptor.d.ts +63 -0
  196. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptor.d.ts.map +1 -0
  197. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptor.js +254 -0
  198. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptor.js.map +1 -0
  199. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.d.ts +64 -0
  200. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.d.ts.map +1 -0
  201. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.js +616 -0
  202. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/trackChangesAcceptorAst.js.map +1 -0
  203. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/xmlToWmlElement.d.ts +65 -0
  204. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/xmlToWmlElement.d.ts.map +1 -0
  205. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/xmlToWmlElement.js +95 -0
  206. package/node_modules/@usejunior/docx-core/dist/baselines/atomizer/xmlToWmlElement.js.map +1 -0
  207. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DocxodusWasm.d.ts +51 -0
  208. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DocxodusWasm.d.ts.map +1 -0
  209. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DocxodusWasm.js +83 -0
  210. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DocxodusWasm.js.map +1 -0
  211. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.d.ts +40 -0
  212. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.d.ts.map +1 -0
  213. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.js +135 -0
  214. package/node_modules/@usejunior/docx-core/dist/baselines/wmlcomparer/DotnetCli.js.map +1 -0
  215. package/node_modules/@usejunior/docx-core/dist/cli/compare-two.d.ts +28 -0
  216. package/node_modules/@usejunior/docx-core/dist/cli/compare-two.d.ts.map +1 -0
  217. package/node_modules/@usejunior/docx-core/dist/cli/compare-two.js +110 -0
  218. package/node_modules/@usejunior/docx-core/dist/cli/compare-two.js.map +1 -0
  219. package/node_modules/@usejunior/docx-core/dist/cli/index.d.ts +3 -0
  220. package/node_modules/@usejunior/docx-core/dist/cli/index.d.ts.map +1 -0
  221. package/node_modules/@usejunior/docx-core/dist/cli/index.js +21 -0
  222. package/node_modules/@usejunior/docx-core/dist/cli/index.js.map +1 -0
  223. package/node_modules/@usejunior/docx-core/dist/core-types.d.ts +296 -0
  224. package/node_modules/@usejunior/docx-core/dist/core-types.d.ts.map +1 -0
  225. package/node_modules/@usejunior/docx-core/dist/core-types.js +122 -0
  226. package/node_modules/@usejunior/docx-core/dist/core-types.js.map +1 -0
  227. package/node_modules/@usejunior/docx-core/dist/footnotes.d.ts +144 -0
  228. package/node_modules/@usejunior/docx-core/dist/footnotes.d.ts.map +1 -0
  229. package/node_modules/@usejunior/docx-core/dist/footnotes.js +291 -0
  230. package/node_modules/@usejunior/docx-core/dist/footnotes.js.map +1 -0
  231. package/node_modules/@usejunior/docx-core/dist/format-detection.d.ts +120 -0
  232. package/node_modules/@usejunior/docx-core/dist/format-detection.d.ts.map +1 -0
  233. package/node_modules/@usejunior/docx-core/dist/format-detection.js +338 -0
  234. package/node_modules/@usejunior/docx-core/dist/format-detection.js.map +1 -0
  235. package/node_modules/@usejunior/docx-core/dist/index.d.ts +177 -0
  236. package/node_modules/@usejunior/docx-core/dist/index.d.ts.map +1 -0
  237. package/node_modules/@usejunior/docx-core/dist/index.js +55 -0
  238. package/node_modules/@usejunior/docx-core/dist/index.js.map +1 -0
  239. package/node_modules/@usejunior/docx-core/dist/integration/output-artifacts.d.ts +6 -0
  240. package/node_modules/@usejunior/docx-core/dist/integration/output-artifacts.d.ts.map +1 -0
  241. package/node_modules/@usejunior/docx-core/dist/integration/output-artifacts.js +30 -0
  242. package/node_modules/@usejunior/docx-core/dist/integration/output-artifacts.js.map +1 -0
  243. package/node_modules/@usejunior/docx-core/dist/move-detection.d.ts +211 -0
  244. package/node_modules/@usejunior/docx-core/dist/move-detection.d.ts.map +1 -0
  245. package/node_modules/@usejunior/docx-core/dist/move-detection.js +391 -0
  246. package/node_modules/@usejunior/docx-core/dist/move-detection.js.map +1 -0
  247. package/node_modules/@usejunior/docx-core/dist/numbering.d.ts +136 -0
  248. package/node_modules/@usejunior/docx-core/dist/numbering.d.ts.map +1 -0
  249. package/node_modules/@usejunior/docx-core/dist/numbering.js +446 -0
  250. package/node_modules/@usejunior/docx-core/dist/numbering.js.map +1 -0
  251. package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.d.ts +30 -0
  252. package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.d.ts.map +1 -0
  253. package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.js +241 -0
  254. package/node_modules/@usejunior/docx-core/dist/primitives/accept_changes.js.map +1 -0
  255. package/node_modules/@usejunior/docx-core/dist/primitives/bookmarks.d.ts +12 -0
  256. package/node_modules/@usejunior/docx-core/dist/primitives/bookmarks.d.ts.map +1 -0
  257. package/node_modules/@usejunior/docx-core/dist/primitives/bookmarks.js +248 -0
  258. package/node_modules/@usejunior/docx-core/dist/primitives/bookmarks.js.map +1 -0
  259. package/node_modules/@usejunior/docx-core/dist/primitives/comments.d.ts +88 -0
  260. package/node_modules/@usejunior/docx-core/dist/primitives/comments.d.ts.map +1 -0
  261. package/node_modules/@usejunior/docx-core/dist/primitives/comments.js +703 -0
  262. package/node_modules/@usejunior/docx-core/dist/primitives/comments.js.map +1 -0
  263. package/node_modules/@usejunior/docx-core/dist/primitives/document.d.ts +186 -0
  264. package/node_modules/@usejunior/docx-core/dist/primitives/document.d.ts.map +1 -0
  265. package/node_modules/@usejunior/docx-core/dist/primitives/document.js +555 -0
  266. package/node_modules/@usejunior/docx-core/dist/primitives/document.js.map +1 -0
  267. package/node_modules/@usejunior/docx-core/dist/primitives/document_view.d.ts +97 -0
  268. package/node_modules/@usejunior/docx-core/dist/primitives/document_view.d.ts.map +1 -0
  269. package/node_modules/@usejunior/docx-core/dist/primitives/document_view.js +749 -0
  270. package/node_modules/@usejunior/docx-core/dist/primitives/document_view.js.map +1 -0
  271. package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.d.ts +94 -0
  272. package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.d.ts.map +1 -0
  273. package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.js +219 -0
  274. package/node_modules/@usejunior/docx-core/dist/primitives/dom-helpers.js.map +1 -0
  275. package/node_modules/@usejunior/docx-core/dist/primitives/errors.d.ts +7 -0
  276. package/node_modules/@usejunior/docx-core/dist/primitives/errors.d.ts.map +1 -0
  277. package/node_modules/@usejunior/docx-core/dist/primitives/errors.js +10 -0
  278. package/node_modules/@usejunior/docx-core/dist/primitives/errors.js.map +1 -0
  279. package/node_modules/@usejunior/docx-core/dist/primitives/extract_revisions.d.ts +50 -0
  280. package/node_modules/@usejunior/docx-core/dist/primitives/extract_revisions.d.ts.map +1 -0
  281. package/node_modules/@usejunior/docx-core/dist/primitives/extract_revisions.js +340 -0
  282. package/node_modules/@usejunior/docx-core/dist/primitives/extract_revisions.js.map +1 -0
  283. package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.d.ts +37 -0
  284. package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.d.ts.map +1 -0
  285. package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.js +552 -0
  286. package/node_modules/@usejunior/docx-core/dist/primitives/footnotes.js.map +1 -0
  287. package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.d.ts +43 -0
  288. package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.d.ts.map +1 -0
  289. package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.js +291 -0
  290. package/node_modules/@usejunior/docx-core/dist/primitives/formatting_tags.js.map +1 -0
  291. package/node_modules/@usejunior/docx-core/dist/primitives/index.d.ts +27 -0
  292. package/node_modules/@usejunior/docx-core/dist/primitives/index.d.ts.map +1 -0
  293. package/node_modules/@usejunior/docx-core/dist/primitives/index.js +27 -0
  294. package/node_modules/@usejunior/docx-core/dist/primitives/index.js.map +1 -0
  295. package/node_modules/@usejunior/docx-core/dist/primitives/layout.d.ts +53 -0
  296. package/node_modules/@usejunior/docx-core/dist/primitives/layout.d.ts.map +1 -0
  297. package/node_modules/@usejunior/docx-core/dist/primitives/layout.js +178 -0
  298. package/node_modules/@usejunior/docx-core/dist/primitives/layout.js.map +1 -0
  299. package/node_modules/@usejunior/docx-core/dist/primitives/list_labels.d.ts +19 -0
  300. package/node_modules/@usejunior/docx-core/dist/primitives/list_labels.d.ts.map +1 -0
  301. package/node_modules/@usejunior/docx-core/dist/primitives/list_labels.js +57 -0
  302. package/node_modules/@usejunior/docx-core/dist/primitives/list_labels.js.map +1 -0
  303. package/node_modules/@usejunior/docx-core/dist/primitives/matching.d.ts +31 -0
  304. package/node_modules/@usejunior/docx-core/dist/primitives/matching.d.ts.map +1 -0
  305. package/node_modules/@usejunior/docx-core/dist/primitives/matching.js +223 -0
  306. package/node_modules/@usejunior/docx-core/dist/primitives/matching.js.map +1 -0
  307. package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.d.ts +23 -0
  308. package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.d.ts.map +1 -0
  309. package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.js +243 -0
  310. package/node_modules/@usejunior/docx-core/dist/primitives/merge_runs.js.map +1 -0
  311. package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.d.ts +91 -0
  312. package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.d.ts.map +1 -0
  313. package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.js +108 -0
  314. package/node_modules/@usejunior/docx-core/dist/primitives/namespaces.js.map +1 -0
  315. package/node_modules/@usejunior/docx-core/dist/primitives/numbering.d.ts +27 -0
  316. package/node_modules/@usejunior/docx-core/dist/primitives/numbering.d.ts.map +1 -0
  317. package/node_modules/@usejunior/docx-core/dist/primitives/numbering.js +182 -0
  318. package/node_modules/@usejunior/docx-core/dist/primitives/numbering.js.map +1 -0
  319. package/node_modules/@usejunior/docx-core/dist/primitives/prevent_double_elevation.d.ts +18 -0
  320. package/node_modules/@usejunior/docx-core/dist/primitives/prevent_double_elevation.d.ts.map +1 -0
  321. package/node_modules/@usejunior/docx-core/dist/primitives/prevent_double_elevation.js +190 -0
  322. package/node_modules/@usejunior/docx-core/dist/primitives/prevent_double_elevation.js.map +1 -0
  323. package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.d.ts +27 -0
  324. package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.d.ts.map +1 -0
  325. package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.js +371 -0
  326. package/node_modules/@usejunior/docx-core/dist/primitives/reject_changes.js.map +1 -0
  327. package/node_modules/@usejunior/docx-core/dist/primitives/relationships.d.ts +7 -0
  328. package/node_modules/@usejunior/docx-core/dist/primitives/relationships.d.ts.map +1 -0
  329. package/node_modules/@usejunior/docx-core/dist/primitives/relationships.js +24 -0
  330. package/node_modules/@usejunior/docx-core/dist/primitives/relationships.js.map +1 -0
  331. package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.d.ts +17 -0
  332. package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.d.ts.map +1 -0
  333. package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.js +58 -0
  334. package/node_modules/@usejunior/docx-core/dist/primitives/semantic_tags.js.map +1 -0
  335. package/node_modules/@usejunior/docx-core/dist/primitives/simplify_redlines.d.ts +19 -0
  336. package/node_modules/@usejunior/docx-core/dist/primitives/simplify_redlines.d.ts.map +1 -0
  337. package/node_modules/@usejunior/docx-core/dist/primitives/simplify_redlines.js +94 -0
  338. package/node_modules/@usejunior/docx-core/dist/primitives/simplify_redlines.js.map +1 -0
  339. package/node_modules/@usejunior/docx-core/dist/primitives/styles.d.ts +36 -0
  340. package/node_modules/@usejunior/docx-core/dist/primitives/styles.d.ts.map +1 -0
  341. package/node_modules/@usejunior/docx-core/dist/primitives/styles.js +205 -0
  342. package/node_modules/@usejunior/docx-core/dist/primitives/styles.js.map +1 -0
  343. package/node_modules/@usejunior/docx-core/dist/primitives/tables.d.ts +54 -0
  344. package/node_modules/@usejunior/docx-core/dist/primitives/tables.d.ts.map +1 -0
  345. package/node_modules/@usejunior/docx-core/dist/primitives/tables.js +205 -0
  346. package/node_modules/@usejunior/docx-core/dist/primitives/tables.js.map +1 -0
  347. package/node_modules/@usejunior/docx-core/dist/primitives/text.d.ts +30 -0
  348. package/node_modules/@usejunior/docx-core/dist/primitives/text.d.ts.map +1 -0
  349. package/node_modules/@usejunior/docx-core/dist/primitives/text.js +461 -0
  350. package/node_modules/@usejunior/docx-core/dist/primitives/text.js.map +1 -0
  351. package/node_modules/@usejunior/docx-core/dist/primitives/validate_document.d.ts +24 -0
  352. package/node_modules/@usejunior/docx-core/dist/primitives/validate_document.d.ts.map +1 -0
  353. package/node_modules/@usejunior/docx-core/dist/primitives/validate_document.js +147 -0
  354. package/node_modules/@usejunior/docx-core/dist/primitives/validate_document.js.map +1 -0
  355. package/node_modules/@usejunior/docx-core/dist/primitives/xml.d.ts +5 -0
  356. package/node_modules/@usejunior/docx-core/dist/primitives/xml.d.ts.map +1 -0
  357. package/node_modules/@usejunior/docx-core/dist/primitives/xml.js +19 -0
  358. package/node_modules/@usejunior/docx-core/dist/primitives/xml.js.map +1 -0
  359. package/node_modules/@usejunior/docx-core/dist/primitives/zip.d.ts +25 -0
  360. package/node_modules/@usejunior/docx-core/dist/primitives/zip.d.ts.map +1 -0
  361. package/node_modules/@usejunior/docx-core/dist/primitives/zip.js +78 -0
  362. package/node_modules/@usejunior/docx-core/dist/primitives/zip.js.map +1 -0
  363. package/node_modules/@usejunior/docx-core/dist/shared/docx/DocxArchive.d.ts +94 -0
  364. package/node_modules/@usejunior/docx-core/dist/shared/docx/DocxArchive.d.ts.map +1 -0
  365. package/node_modules/@usejunior/docx-core/dist/shared/docx/DocxArchive.js +169 -0
  366. package/node_modules/@usejunior/docx-core/dist/shared/docx/DocxArchive.js.map +1 -0
  367. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.d.ts +149 -0
  368. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.d.ts.map +1 -0
  369. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.js +224 -0
  370. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/namespaces.js.map +1 -0
  371. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/types.d.ts +136 -0
  372. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/types.d.ts.map +1 -0
  373. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/types.js +7 -0
  374. package/node_modules/@usejunior/docx-core/dist/shared/ooxml/types.js.map +1 -0
  375. package/node_modules/@usejunior/docx-core/dist/shared/validators/structural.d.ts +31 -0
  376. package/node_modules/@usejunior/docx-core/dist/shared/validators/structural.d.ts.map +1 -0
  377. package/node_modules/@usejunior/docx-core/dist/shared/validators/structural.js +110 -0
  378. package/node_modules/@usejunior/docx-core/dist/shared/validators/structural.js.map +1 -0
  379. package/node_modules/@usejunior/docx-core/package.json +26 -0
  380. package/node_modules/core-util-is/LICENSE +19 -0
  381. package/node_modules/core-util-is/README.md +3 -0
  382. package/node_modules/core-util-is/lib/util.js +107 -0
  383. package/node_modules/core-util-is/package.json +38 -0
  384. package/node_modules/diff-match-patch/LICENSE +202 -0
  385. package/node_modules/diff-match-patch/README.md +94 -0
  386. package/node_modules/diff-match-patch/index.js +2218 -0
  387. package/node_modules/diff-match-patch/package.json +22 -0
  388. package/node_modules/immediate/LICENSE.txt +20 -0
  389. package/node_modules/immediate/README.md +93 -0
  390. package/node_modules/immediate/dist/immediate.js +75 -0
  391. package/node_modules/immediate/dist/immediate.min.js +1 -0
  392. package/node_modules/immediate/lib/browser.js +69 -0
  393. package/node_modules/immediate/lib/index.js +73 -0
  394. package/node_modules/immediate/package.json +42 -0
  395. package/node_modules/inherits/LICENSE +16 -0
  396. package/node_modules/inherits/README.md +42 -0
  397. package/node_modules/inherits/inherits.js +9 -0
  398. package/node_modules/inherits/inherits_browser.js +27 -0
  399. package/node_modules/inherits/package.json +29 -0
  400. package/node_modules/isarray/.npmignore +1 -0
  401. package/node_modules/isarray/.travis.yml +4 -0
  402. package/node_modules/isarray/Makefile +6 -0
  403. package/node_modules/isarray/README.md +60 -0
  404. package/node_modules/isarray/component.json +19 -0
  405. package/node_modules/isarray/index.js +5 -0
  406. package/node_modules/isarray/package.json +45 -0
  407. package/node_modules/isarray/test.js +20 -0
  408. package/node_modules/jszip/.codeclimate.yml +16 -0
  409. package/node_modules/jszip/.editorconfig +8 -0
  410. package/node_modules/jszip/.eslintrc.js +43 -0
  411. package/node_modules/jszip/.github/workflows/pr.yaml +58 -0
  412. package/node_modules/jszip/.jekyll-metadata +0 -0
  413. package/node_modules/jszip/.travis.yml +17 -0
  414. package/node_modules/jszip/CHANGES.md +204 -0
  415. package/node_modules/jszip/LICENSE.markdown +651 -0
  416. package/node_modules/jszip/README.markdown +33 -0
  417. package/node_modules/jszip/deps.js +37 -0
  418. package/node_modules/jszip/dist/jszip.js +11577 -0
  419. package/node_modules/jszip/dist/jszip.min.js +13 -0
  420. package/node_modules/jszip/graph.svg +601 -0
  421. package/node_modules/jszip/index.d.ts +330 -0
  422. package/node_modules/jszip/lib/base64.js +106 -0
  423. package/node_modules/jszip/lib/compressedObject.js +74 -0
  424. package/node_modules/jszip/lib/compressions.js +14 -0
  425. package/node_modules/jszip/lib/crc32.js +77 -0
  426. package/node_modules/jszip/lib/defaults.js +11 -0
  427. package/node_modules/jszip/lib/external.js +18 -0
  428. package/node_modules/jszip/lib/flate.js +85 -0
  429. package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
  430. package/node_modules/jszip/lib/generate/index.js +57 -0
  431. package/node_modules/jszip/lib/index.js +55 -0
  432. package/node_modules/jszip/lib/license_header.js +11 -0
  433. package/node_modules/jszip/lib/load.js +88 -0
  434. package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
  435. package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
  436. package/node_modules/jszip/lib/nodejsUtils.js +57 -0
  437. package/node_modules/jszip/lib/object.js +384 -0
  438. package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
  439. package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
  440. package/node_modules/jszip/lib/reader/DataReader.js +116 -0
  441. package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
  442. package/node_modules/jszip/lib/reader/StringReader.js +38 -0
  443. package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
  444. package/node_modules/jszip/lib/reader/readerFor.js +28 -0
  445. package/node_modules/jszip/lib/signature.js +7 -0
  446. package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
  447. package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
  448. package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
  449. package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
  450. package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
  451. package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
  452. package/node_modules/jszip/lib/support.js +38 -0
  453. package/node_modules/jszip/lib/utf8.js +275 -0
  454. package/node_modules/jszip/lib/utils.js +501 -0
  455. package/node_modules/jszip/lib/zipEntries.js +261 -0
  456. package/node_modules/jszip/lib/zipEntry.js +293 -0
  457. package/node_modules/jszip/lib/zipObject.js +133 -0
  458. package/node_modules/jszip/package.json +67 -0
  459. package/node_modules/jszip/sponsors.md +21 -0
  460. package/node_modules/jszip/tsconfig.json +101 -0
  461. package/node_modules/jszip/vendor/FileSaver.js +247 -0
  462. package/node_modules/lie/README.md +62 -0
  463. package/node_modules/lie/dist/lie.js +350 -0
  464. package/node_modules/lie/dist/lie.min.js +1 -0
  465. package/node_modules/lie/dist/lie.polyfill.js +358 -0
  466. package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
  467. package/node_modules/lie/lib/browser.js +273 -0
  468. package/node_modules/lie/lib/index.js +298 -0
  469. package/node_modules/lie/license.md +7 -0
  470. package/node_modules/lie/lie.d.ts +244 -0
  471. package/node_modules/lie/package.json +69 -0
  472. package/node_modules/lie/polyfill.js +4 -0
  473. package/node_modules/pako/LICENSE +21 -0
  474. package/node_modules/pako/README.md +191 -0
  475. package/node_modules/pako/dist/pako.js +6818 -0
  476. package/node_modules/pako/dist/pako.min.js +1 -0
  477. package/node_modules/pako/dist/pako_deflate.js +3997 -0
  478. package/node_modules/pako/dist/pako_deflate.min.js +1 -0
  479. package/node_modules/pako/dist/pako_inflate.js +3300 -0
  480. package/node_modules/pako/dist/pako_inflate.min.js +1 -0
  481. package/node_modules/pako/index.js +14 -0
  482. package/node_modules/pako/lib/deflate.js +400 -0
  483. package/node_modules/pako/lib/inflate.js +423 -0
  484. package/node_modules/pako/lib/utils/common.js +105 -0
  485. package/node_modules/pako/lib/utils/strings.js +187 -0
  486. package/node_modules/pako/lib/zlib/README +59 -0
  487. package/node_modules/pako/lib/zlib/adler32.js +51 -0
  488. package/node_modules/pako/lib/zlib/constants.js +68 -0
  489. package/node_modules/pako/lib/zlib/crc32.js +59 -0
  490. package/node_modules/pako/lib/zlib/deflate.js +1874 -0
  491. package/node_modules/pako/lib/zlib/gzheader.js +58 -0
  492. package/node_modules/pako/lib/zlib/inffast.js +345 -0
  493. package/node_modules/pako/lib/zlib/inflate.js +1556 -0
  494. package/node_modules/pako/lib/zlib/inftrees.js +343 -0
  495. package/node_modules/pako/lib/zlib/messages.js +32 -0
  496. package/node_modules/pako/lib/zlib/trees.js +1222 -0
  497. package/node_modules/pako/lib/zlib/zstream.js +47 -0
  498. package/node_modules/pako/package.json +44 -0
  499. package/node_modules/process-nextick-args/index.js +45 -0
  500. package/node_modules/process-nextick-args/license.md +19 -0
  501. package/node_modules/process-nextick-args/package.json +25 -0
  502. package/node_modules/process-nextick-args/readme.md +18 -0
  503. package/node_modules/readable-stream/.travis.yml +34 -0
  504. package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
  505. package/node_modules/readable-stream/GOVERNANCE.md +136 -0
  506. package/node_modules/readable-stream/LICENSE +47 -0
  507. package/node_modules/readable-stream/README.md +58 -0
  508. package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
  509. package/node_modules/readable-stream/duplex-browser.js +1 -0
  510. package/node_modules/readable-stream/duplex.js +1 -0
  511. package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
  512. package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
  513. package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
  514. package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
  515. package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
  516. package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
  517. package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
  518. package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
  519. package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
  520. package/node_modules/readable-stream/package.json +52 -0
  521. package/node_modules/readable-stream/passthrough.js +1 -0
  522. package/node_modules/readable-stream/readable-browser.js +7 -0
  523. package/node_modules/readable-stream/readable.js +19 -0
  524. package/node_modules/readable-stream/transform.js +1 -0
  525. package/node_modules/readable-stream/writable-browser.js +1 -0
  526. package/node_modules/readable-stream/writable.js +8 -0
  527. package/node_modules/safe-buffer/LICENSE +21 -0
  528. package/node_modules/safe-buffer/README.md +584 -0
  529. package/node_modules/safe-buffer/index.d.ts +187 -0
  530. package/node_modules/safe-buffer/index.js +62 -0
  531. package/node_modules/safe-buffer/package.json +37 -0
  532. package/node_modules/setimmediate/LICENSE.txt +20 -0
  533. package/node_modules/setimmediate/package.json +30 -0
  534. package/node_modules/setimmediate/setImmediate.js +186 -0
  535. package/node_modules/string_decoder/.travis.yml +50 -0
  536. package/node_modules/string_decoder/LICENSE +48 -0
  537. package/node_modules/string_decoder/README.md +47 -0
  538. package/node_modules/string_decoder/lib/string_decoder.js +296 -0
  539. package/node_modules/string_decoder/package.json +31 -0
  540. package/node_modules/util-deprecate/History.md +16 -0
  541. package/node_modules/util-deprecate/LICENSE +24 -0
  542. package/node_modules/util-deprecate/README.md +53 -0
  543. package/node_modules/util-deprecate/browser.js +67 -0
  544. package/node_modules/util-deprecate/node.js +6 -0
  545. package/node_modules/util-deprecate/package.json +27 -0
  546. package/package.json +11 -5
  547. package/packages/docx-core/node_modules/@xmldom/xmldom/CHANGELOG.md +468 -0
  548. package/packages/docx-core/node_modules/@xmldom/xmldom/LICENSE +8 -0
  549. package/packages/docx-core/node_modules/@xmldom/xmldom/SECURITY.md +50 -0
  550. package/packages/docx-core/node_modules/@xmldom/xmldom/index.d.ts +43 -0
  551. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/.eslintrc.yml +2 -0
  552. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/conventions.js +203 -0
  553. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/dom-parser.js +322 -0
  554. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/dom.js +1879 -0
  555. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/entities.js +2166 -0
  556. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/index.js +4 -0
  557. package/packages/docx-core/node_modules/@xmldom/xmldom/lib/sax.js +662 -0
  558. package/packages/docx-core/node_modules/@xmldom/xmldom/package.json +71 -0
  559. package/packages/docx-core/node_modules/@xmldom/xmldom/readme.md +356 -0
  560. package/server.json +31 -0
  561. package/skills/client-email/SKILL.md +143 -0
  562. package/skills/cloud-service-agreement/SKILL.md +8 -99
  563. package/skills/data-privacy-agreement/SKILL.md +10 -97
  564. package/skills/delaware-franchise-tax/SKILL.md +7 -1
  565. package/skills/edit-docx-agreement/SKILL.md +10 -3
  566. package/skills/employment-contract/SKILL.md +10 -95
  567. package/skills/iso-27001-evidence-collection/SKILL.md +7 -1
  568. package/skills/iso-27001-internal-audit/SKILL.md +6 -0
  569. package/skills/nda/SKILL.md +7 -99
  570. package/skills/open-agreements/CONNECTORS.md +1 -1
  571. package/skills/open-agreements/SKILL.md +17 -104
  572. package/skills/recipe-quality-audit/SKILL.md +116 -0
  573. package/skills/safe/SKILL.md +12 -97
  574. package/skills/services-agreement/SKILL.md +8 -99
  575. package/skills/shared/template-filling-execution.md +92 -0
  576. package/skills/soc2-readiness/SKILL.md +7 -1
  577. package/skills/unit-test-philosophy/SKILL.md +12 -1
  578. package/skills/venture-financing/SKILL.md +11 -96
@@ -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;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;AASxB,uEAAuE;AAEvE,SAAS,GAAG,CAAC,IAAU,EAAE,SAAiB;IACxC,OAAO,CACL,IAAI,CAAC,QAAQ,KAAK,CAAC;QAClB,IAAgB,CAAC,YAAY,KAAK,IAAI;QACtC,IAAgB,CAAC,SAAS,KAAK,SAAS,CAC1C,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,IAAU;IAC5B,OAAO,IAAI,CAAC,QAAQ,KAAK,CAAC,IAAK,IAAgB,CAAC,YAAY,KAAK,IAAI,CAAC;AACxE,CAAC;AAED,SAAS,QAAQ,CAAC,IAAU;IAC1B,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,GAAG,GAAgB,IAAI,CAAC,UAAU,CAAC;IACvC,OAAO,GAAG,EAAE,CAAC;QACX,KAAK,EAAE,CAAC;QACR,GAAG,GAAG,GAAG,CAAC,UAAU,CAAC;IACvB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,kBAAkB,CAAC,SAA6B,EAAE,SAAiB;IAC1E,OAAO,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CA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,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,C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AAE,EAAE,CAAC,CAAC;AACnE,CAAC;AAED,qEAAqE;AAErE,MAAM,kBAAkB,GACtB,4GAA4G,CAAC;AAE/G;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,kBAAkB,CAAC,SAAS,GAAG,CAAC,CAAC;IACjC,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * simplify_redlines — merge adjacent same-author tracked-change wrappers.
3
+ *
4
+ * Consolidates consecutive `w:ins`, `w:del`, `w:moveFrom`, or `w:moveTo`
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"}