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,110 @@
1
+ /**
2
+ * Structural OOXML validators.
3
+ *
4
+ * General-purpose integrity checks for numbering, footnotes/endnotes,
5
+ * and bookmarks. Used by both integration tests and the quality benchmark.
6
+ */
7
+ import { parseXml } from '../../primitives/xml.js';
8
+ import { findAllByTagName, childElements } from '../../primitives/dom-helpers.js';
9
+ // ── Helpers ─────────────────────────────────────────────────────────
10
+ export function collectIds(root, tagName, attributeName) {
11
+ const values = new Set();
12
+ const duplicateValues = new Set();
13
+ for (const node of findAllByTagName(root, tagName)) {
14
+ const value = node.getAttribute(attributeName);
15
+ if (!value) {
16
+ continue;
17
+ }
18
+ if (values.has(value)) {
19
+ duplicateValues.add(value);
20
+ }
21
+ else {
22
+ values.add(value);
23
+ }
24
+ }
25
+ return { values, duplicates: Array.from(duplicateValues).sort() };
26
+ }
27
+ // ── Validators ──────────────────────────────────────────────────────
28
+ export function validateNumberingIntegrity(documentXml, numberingXml) {
29
+ const documentRoot = parseXml(documentXml).documentElement;
30
+ const numRefIds = collectIds(documentRoot, 'w:numId', 'w:val').values;
31
+ const ilvlNodes = findAllByTagName(documentRoot, 'w:ilvl');
32
+ const invalidLevels = [];
33
+ for (const node of ilvlNodes) {
34
+ const rawLevel = node.getAttribute('w:val');
35
+ if (!rawLevel) {
36
+ continue;
37
+ }
38
+ const parsed = Number.parseInt(rawLevel, 10);
39
+ if (!Number.isFinite(parsed) || parsed < 0 || parsed > 8) {
40
+ invalidLevels.push(rawLevel);
41
+ }
42
+ }
43
+ if (!numberingXml) {
44
+ return {
45
+ missingNumIds: Array.from(numRefIds).sort(),
46
+ missingAbstractNumIds: [],
47
+ invalidLevels: invalidLevels.sort(),
48
+ };
49
+ }
50
+ const numberingRoot = parseXml(numberingXml).documentElement;
51
+ const numDefinitions = collectIds(numberingRoot, 'w:num', 'w:numId').values;
52
+ const abstractDefinitions = collectIds(numberingRoot, 'w:abstractNum', 'w:abstractNumId').values;
53
+ const abstractRefs = new Set();
54
+ for (const numNode of findAllByTagName(numberingRoot, 'w:num')) {
55
+ const abstractNode = childElements(numNode).find((child) => child.tagName === 'w:abstractNumId');
56
+ const abstractId = abstractNode?.getAttribute('w:val');
57
+ if (abstractId) {
58
+ abstractRefs.add(abstractId);
59
+ }
60
+ }
61
+ // In WordprocessingML, numId="0" is a sentinel that means "no numbering".
62
+ const missingNumIds = Array.from(numRefIds)
63
+ .filter((id) => id !== '0' && !numDefinitions.has(id))
64
+ .sort();
65
+ const missingAbstractNumIds = Array.from(abstractRefs)
66
+ .filter((id) => !abstractDefinitions.has(id))
67
+ .sort();
68
+ return {
69
+ missingNumIds,
70
+ missingAbstractNumIds,
71
+ invalidLevels: invalidLevels.sort(),
72
+ };
73
+ }
74
+ export function validateNoteIntegrity(documentXml, footnotesXml, endnotesXml) {
75
+ const documentRoot = parseXml(documentXml).documentElement;
76
+ const footnoteRefs = collectIds(documentRoot, 'w:footnoteReference', 'w:id').values;
77
+ const endnoteRefs = collectIds(documentRoot, 'w:endnoteReference', 'w:id').values;
78
+ const footnoteIds = footnotesXml
79
+ ? collectIds(parseXml(footnotesXml).documentElement, 'w:footnote', 'w:id')
80
+ : { values: new Set(), duplicates: [] };
81
+ const endnoteIds = endnotesXml
82
+ ? collectIds(parseXml(endnotesXml).documentElement, 'w:endnote', 'w:id')
83
+ : { values: new Set(), duplicates: [] };
84
+ const missingFootnoteRefs = Array.from(footnoteRefs)
85
+ .filter((id) => !footnoteIds.values.has(id))
86
+ .sort();
87
+ const missingEndnoteRefs = Array.from(endnoteRefs)
88
+ .filter((id) => !endnoteIds.values.has(id))
89
+ .sort();
90
+ return {
91
+ missingFootnoteRefs,
92
+ missingEndnoteRefs,
93
+ duplicateFootnoteIds: footnoteIds.duplicates,
94
+ duplicateEndnoteIds: endnoteIds.duplicates,
95
+ };
96
+ }
97
+ export function validateBookmarkIntegrity(documentXml) {
98
+ const root = parseXml(documentXml).documentElement;
99
+ const starts = collectIds(root, 'w:bookmarkStart', 'w:id');
100
+ const ends = collectIds(root, 'w:bookmarkEnd', 'w:id');
101
+ const unmatchedStartIds = Array.from(starts.values).filter((id) => !ends.values.has(id)).sort();
102
+ const unmatchedEndIds = Array.from(ends.values).filter((id) => !starts.values.has(id)).sort();
103
+ return {
104
+ unmatchedStartIds,
105
+ unmatchedEndIds,
106
+ duplicateStartIds: starts.duplicates,
107
+ duplicateEndIds: ends.duplicates,
108
+ };
109
+ }
110
+ //# sourceMappingURL=structural.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural.js","sourceRoot":"","sources":["../../../src/shared/validators/structural.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAwBlF,uEAAuE;A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C,UAAU;QACpC,eAAe,EAAE,IAAI,CAAC,UAAU;KACjC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "@usejunior/docx-core",
3
+ "version": "0.1.0",
4
+ "description": "OOXML (.docx) core library: primitives, comparison, and track changes",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/index.js",
11
+ "types": "./dist/index.d.ts"
12
+ }
13
+ },
14
+ "dependencies": {
15
+ "@xmldom/xmldom": "^0.8.10",
16
+ "diff-match-patch": "^1.0.5",
17
+ "jszip": "^3.10.1"
18
+ },
19
+ "engines": {
20
+ "node": ">=18.0.0"
21
+ },
22
+ "files": [
23
+ "dist"
24
+ ],
25
+ "license": "MIT"
26
+ }
@@ -0,0 +1,19 @@
1
+ Copyright Node.js contributors. All rights reserved.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to
5
+ deal in the Software without restriction, including without limitation the
6
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
+ sell copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19
+ IN THE SOFTWARE.
@@ -0,0 +1,3 @@
1
+ # core-util-is
2
+
3
+ The `util.is*` functions introduced in Node v0.12.
@@ -0,0 +1,107 @@
1
+ // Copyright Joyent, Inc. and other Node contributors.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a
4
+ // copy of this software and associated documentation files (the
5
+ // "Software"), to deal in the Software without restriction, including
6
+ // without limitation the rights to use, copy, modify, merge, publish,
7
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
8
+ // persons to whom the Software is furnished to do so, subject to the
9
+ // following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included
12
+ // in all copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
17
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
18
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
19
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
20
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ // NOTE: These type checking functions intentionally don't use `instanceof`
23
+ // because it is fragile and can be easily faked with `Object.create()`.
24
+
25
+ function isArray(arg) {
26
+ if (Array.isArray) {
27
+ return Array.isArray(arg);
28
+ }
29
+ return objectToString(arg) === '[object Array]';
30
+ }
31
+ exports.isArray = isArray;
32
+
33
+ function isBoolean(arg) {
34
+ return typeof arg === 'boolean';
35
+ }
36
+ exports.isBoolean = isBoolean;
37
+
38
+ function isNull(arg) {
39
+ return arg === null;
40
+ }
41
+ exports.isNull = isNull;
42
+
43
+ function isNullOrUndefined(arg) {
44
+ return arg == null;
45
+ }
46
+ exports.isNullOrUndefined = isNullOrUndefined;
47
+
48
+ function isNumber(arg) {
49
+ return typeof arg === 'number';
50
+ }
51
+ exports.isNumber = isNumber;
52
+
53
+ function isString(arg) {
54
+ return typeof arg === 'string';
55
+ }
56
+ exports.isString = isString;
57
+
58
+ function isSymbol(arg) {
59
+ return typeof arg === 'symbol';
60
+ }
61
+ exports.isSymbol = isSymbol;
62
+
63
+ function isUndefined(arg) {
64
+ return arg === void 0;
65
+ }
66
+ exports.isUndefined = isUndefined;
67
+
68
+ function isRegExp(re) {
69
+ return objectToString(re) === '[object RegExp]';
70
+ }
71
+ exports.isRegExp = isRegExp;
72
+
73
+ function isObject(arg) {
74
+ return typeof arg === 'object' && arg !== null;
75
+ }
76
+ exports.isObject = isObject;
77
+
78
+ function isDate(d) {
79
+ return objectToString(d) === '[object Date]';
80
+ }
81
+ exports.isDate = isDate;
82
+
83
+ function isError(e) {
84
+ return (objectToString(e) === '[object Error]' || e instanceof Error);
85
+ }
86
+ exports.isError = isError;
87
+
88
+ function isFunction(arg) {
89
+ return typeof arg === 'function';
90
+ }
91
+ exports.isFunction = isFunction;
92
+
93
+ function isPrimitive(arg) {
94
+ return arg === null ||
95
+ typeof arg === 'boolean' ||
96
+ typeof arg === 'number' ||
97
+ typeof arg === 'string' ||
98
+ typeof arg === 'symbol' || // ES6 symbol
99
+ typeof arg === 'undefined';
100
+ }
101
+ exports.isPrimitive = isPrimitive;
102
+
103
+ exports.isBuffer = require('buffer').Buffer.isBuffer;
104
+
105
+ function objectToString(o) {
106
+ return Object.prototype.toString.call(o);
107
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "core-util-is",
3
+ "version": "1.0.3",
4
+ "description": "The `util.is*` functions introduced in Node v0.12.",
5
+ "main": "lib/util.js",
6
+ "files": [
7
+ "lib"
8
+ ],
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git://github.com/isaacs/core-util-is"
12
+ },
13
+ "keywords": [
14
+ "util",
15
+ "isBuffer",
16
+ "isArray",
17
+ "isNumber",
18
+ "isString",
19
+ "isRegExp",
20
+ "isThis",
21
+ "isThat",
22
+ "polyfill"
23
+ ],
24
+ "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
25
+ "license": "MIT",
26
+ "bugs": {
27
+ "url": "https://github.com/isaacs/core-util-is/issues"
28
+ },
29
+ "scripts": {
30
+ "test": "tap test.js",
31
+ "preversion": "npm test",
32
+ "postversion": "npm publish",
33
+ "prepublishOnly": "git push origin --follow-tags"
34
+ },
35
+ "devDependencies": {
36
+ "tap": "^15.0.9"
37
+ }
38
+ }
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,94 @@
1
+ # diff-match-patch
2
+
3
+ npm package for https://github.com/google/diff-match-patch
4
+
5
+ [![Build Status](https://img.shields.io/travis/JackuB/diff-match-patch/master.svg)](https://travis-ci.org/JackuB/diff-match-patch)
6
+ [![Dependency Status](https://img.shields.io/david/JackuB/diff-match-patch.svg)](https://david-dm.org/JackuB/diff-match-patch)
7
+ [![NPM version](https://img.shields.io/npm/v/diff-match-patch.svg)](https://www.npmjs.com/package/diff-match-patch)
8
+ [![Known Vulnerabilities](https://snyk.io/test/github/JackuB/diff-match-patch/badge.svg)](https://snyk.io/test/github/JackuB/diff-match-patch)
9
+
10
+ ## Installation
11
+
12
+ npm install diff-match-patch
13
+
14
+ ## API
15
+
16
+ [Source](https://github.com/google/diff-match-patch/wiki/API)
17
+
18
+ ### Initialization
19
+
20
+ The first step is to create a new `diff_match_patch` object. This object contains various properties which set the behaviour of the algorithms, as well as the following methods/functions:
21
+
22
+ ### diff_main(text1, text2) → diffs
23
+
24
+ An array of differences is computed which describe the transformation of text1 into text2. Each difference is an array (JavaScript, Lua) or tuple (Python) or Diff object (C++, C#, Objective C, Java). The first element specifies if it is an insertion (1), a deletion (-1) or an equality (0). The second element specifies the affected text.
25
+
26
+ ```diff_main("Good dog", "Bad dog") → [(-1, "Goo"), (1, "Ba"), (0, "d dog")]```
27
+
28
+ Despite the large number of optimisations used in this function, diff can take a while to compute. The `diff_match_patch.Diff_Timeout` property is available to set how many seconds any diff's exploration phase may take. The default value is 1.0. A value of 0 disables the timeout and lets diff run until completion. Should diff timeout, the return value will still be a valid difference, though probably non-optimal.
29
+
30
+ ### diff_cleanupSemantic(diffs) → null
31
+
32
+ A diff of two unrelated texts can be filled with coincidental matches. For example, the diff of "mouse" and "sofas" is `[(-1, "m"), (1, "s"), (0, "o"), (-1, "u"), (1, "fa"), (0, "s"), (-1, "e")]`. While this is the optimum diff, it is difficult for humans to understand. Semantic cleanup rewrites the diff, expanding it into a more intelligible format. The above example would become: `[(-1, "mouse"), (1, "sofas")]`. If a diff is to be human-readable, it should be passed to `diff_cleanupSemantic`.
33
+
34
+ ### diff_cleanupEfficiency(diffs) → null
35
+
36
+ This function is similar to `diff_cleanupSemantic`, except that instead of optimising a diff to be human-readable, it optimises the diff to be efficient for machine processing. The results of both cleanup types are often the same.
37
+
38
+ The efficiency cleanup is based on the observation that a diff made up of large numbers of small diffs edits may take longer to process (in downstream applications) or take more capacity to store or transmit than a smaller number of larger diffs. The `diff_match_patch.Diff_EditCost` property sets what the cost of handling a new edit is in terms of handling extra characters in an existing edit. The default value is 4, which means if expanding the length of a diff by three characters can eliminate one edit, then that optimisation will reduce the total costs.
39
+
40
+ ### diff_levenshtein(diffs) → int
41
+
42
+ Given a diff, measure its Levenshtein distance in terms of the number of inserted, deleted or substituted characters. The minimum distance is 0 which means equality, the maximum distance is the length of the longer string.
43
+
44
+ ### diff_prettyHtml(diffs) → html
45
+
46
+ Takes a diff array and returns a pretty HTML sequence. This function is mainly intended as an example from which to write ones own display functions.
47
+
48
+ ### match_main(text, pattern, loc) → location
49
+
50
+ Given a text to search, a pattern to search for and an expected location in the text near which to find the pattern, return the location which matches closest. The function will search for the best match based on both the number of character errors between the pattern and the potential match, as well as the distance between the expected location and the potential match.
51
+
52
+ The following example is a classic dilemma. There are two potential matches, one is close to the expected location but contains a one character error, the other is far from the expected location but is exactly the pattern sought after: `match_main("abc12345678901234567890abbc", "abc", 26)` Which result is returned (0 or 24) is determined by the `diff_match_patch.Match_Distance` property. An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. For example, a distance of '0' requires the match be at the exact location specified, whereas a threshold of '1000' would require a perfect match to be within 800 characters of the expected location to be found using a 0.8 threshold (see below). The larger Match_Distance is, the slower match_main() may take to compute. This variable defaults to 1000.
53
+
54
+ Another property is `diff_match_patch.Match_Threshold` which determines the cut-off value for a valid match. If Match_Threshold is closer to 0, the requirements for accuracy increase. If Match_Threshold is closer to 1 then it is more likely that a match will be found. The larger Match_Threshold is, the slower match_main() may take to compute. This variable defaults to 0.5. If no match is found, the function returns -1.
55
+
56
+ ### patch_make(text1, text2) → patches
57
+
58
+ ### patch_make(diffs) → patches
59
+
60
+ ### patch_make(text1, diffs) → patches
61
+
62
+ Given two texts, or an already computed list of differences, return an array of patch objects. The third form (text1, diffs) is preferred, use it if you happen to have that data available, otherwise this function will compute the missing pieces.
63
+
64
+ ### patch_toText(patches) → text
65
+
66
+ Reduces an array of patch objects to a block of text which looks extremely similar to the standard GNU diff/patch format. This text may be stored or transmitted.
67
+
68
+ ### patch_fromText(text) → patches
69
+
70
+ Parses a block of text (which was presumably created by the patch_toText function) and returns an array of patch objects.
71
+
72
+ ### patch_apply(patches, text1) → [text2, results]
73
+
74
+ Applies a list of patches to text1. The first element of the return value is the newly patched text. The second element is an array of true/false values indicating which of the patches were successfully applied. [Note that this second element is not too useful since large patches may get broken up internally, resulting in a longer results list than the input with no way to figure out which patch succeeded or failed. A more informative API is in development.]
75
+
76
+ The previously mentioned Match_Distance and Match_Threshold properties are used to evaluate patch application on text which does not match exactly. In addition, the `diff_match_patch.Patch_DeleteThreshold` property determines how closely the text within a major (~64 character) delete needs to match the expected text. If Patch_DeleteThreshold is closer to 0, then the deleted text must match the expected text more closely. If Patch_DeleteThreshold is closer to 1, then the deleted text may contain anything. In most use cases Patch_DeleteThreshold should just be set to the same value as Match_Threshold.
77
+
78
+
79
+ ## Usage
80
+ ```javascript
81
+ import DiffMatchPatch from 'diff-match-patch';
82
+
83
+ const dmp = new DiffMatchPatch();
84
+ const diff = dmp.diff_main('dogs bark', 'cats bark');
85
+
86
+ // You can also use the following properties:
87
+ DiffMatchPatch.DIFF_DELETE = -1;
88
+ DiffMatchPatch.DIFF_INSERT = 1;
89
+ DiffMatchPatch.DIFF_EQUAL = 0;
90
+ ```
91
+
92
+ ## License
93
+
94
+ http://www.apache.org/licenses/LICENSE-2.0