docxmlater 10.1.3 → 10.1.5

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 (371) hide show
  1. package/README.md +759 -754
  2. package/dist/constants/legacyCompatFlags.js +1 -1
  3. package/dist/constants/legacyCompatFlags.js.map +1 -1
  4. package/dist/constants/limits.js.map +1 -1
  5. package/dist/core/Document.d.ts +50 -50
  6. package/dist/core/Document.d.ts.map +1 -1
  7. package/dist/core/Document.js +483 -471
  8. package/dist/core/Document.js.map +1 -1
  9. package/dist/core/DocumentContent.d.ts +9 -9
  10. package/dist/core/DocumentContent.d.ts.map +1 -1
  11. package/dist/core/DocumentContent.js +1 -1
  12. package/dist/core/DocumentContent.js.map +1 -1
  13. package/dist/core/DocumentGenerator.d.ts +11 -11
  14. package/dist/core/DocumentGenerator.d.ts.map +1 -1
  15. package/dist/core/DocumentGenerator.js +251 -251
  16. package/dist/core/DocumentGenerator.js.map +1 -1
  17. package/dist/core/DocumentIdManager.js.map +1 -1
  18. package/dist/core/DocumentParser.d.ts +15 -15
  19. package/dist/core/DocumentParser.d.ts.map +1 -1
  20. package/dist/core/DocumentParser.js +2123 -2155
  21. package/dist/core/DocumentParser.js.map +1 -1
  22. package/dist/core/DocumentValidator.d.ts.map +1 -1
  23. package/dist/core/DocumentValidator.js +2 -5
  24. package/dist/core/DocumentValidator.js.map +1 -1
  25. package/dist/core/Relationship.js.map +1 -1
  26. package/dist/core/RelationshipManager.d.ts.map +1 -1
  27. package/dist/core/RelationshipManager.js +3 -3
  28. package/dist/core/RelationshipManager.js.map +1 -1
  29. package/dist/elements/AlternateContent.js.map +1 -1
  30. package/dist/elements/Bookmark.d.ts.map +1 -1
  31. package/dist/elements/Bookmark.js +3 -1
  32. package/dist/elements/Bookmark.js.map +1 -1
  33. package/dist/elements/BookmarkManager.d.ts.map +1 -1
  34. package/dist/elements/BookmarkManager.js.map +1 -1
  35. package/dist/elements/Comment.d.ts.map +1 -1
  36. package/dist/elements/Comment.js +9 -6
  37. package/dist/elements/Comment.js.map +1 -1
  38. package/dist/elements/CommentManager.d.ts.map +1 -1
  39. package/dist/elements/CommentManager.js +18 -17
  40. package/dist/elements/CommentManager.js.map +1 -1
  41. package/dist/elements/CommonTypes.d.ts +21 -21
  42. package/dist/elements/CommonTypes.d.ts.map +1 -1
  43. package/dist/elements/CommonTypes.js +56 -56
  44. package/dist/elements/CommonTypes.js.map +1 -1
  45. package/dist/elements/CustomXml.js.map +1 -1
  46. package/dist/elements/Endnote.d.ts.map +1 -1
  47. package/dist/elements/Endnote.js +6 -6
  48. package/dist/elements/Endnote.js.map +1 -1
  49. package/dist/elements/EndnoteManager.d.ts.map +1 -1
  50. package/dist/elements/EndnoteManager.js +6 -7
  51. package/dist/elements/EndnoteManager.js.map +1 -1
  52. package/dist/elements/Field.d.ts.map +1 -1
  53. package/dist/elements/Field.js +82 -25
  54. package/dist/elements/Field.js.map +1 -1
  55. package/dist/elements/FieldHelpers.d.ts.map +1 -1
  56. package/dist/elements/FieldHelpers.js.map +1 -1
  57. package/dist/elements/FontManager.d.ts.map +1 -1
  58. package/dist/elements/FontManager.js +1 -1
  59. package/dist/elements/FontManager.js.map +1 -1
  60. package/dist/elements/Footer.js +2 -2
  61. package/dist/elements/Footer.js.map +1 -1
  62. package/dist/elements/Footnote.d.ts.map +1 -1
  63. package/dist/elements/Footnote.js +6 -6
  64. package/dist/elements/Footnote.js.map +1 -1
  65. package/dist/elements/FootnoteManager.d.ts.map +1 -1
  66. package/dist/elements/FootnoteManager.js +6 -7
  67. package/dist/elements/FootnoteManager.js.map +1 -1
  68. package/dist/elements/Header.js +2 -2
  69. package/dist/elements/Header.js.map +1 -1
  70. package/dist/elements/HeaderFooterManager.js.map +1 -1
  71. package/dist/elements/Hyperlink.d.ts +5 -3
  72. package/dist/elements/Hyperlink.d.ts.map +1 -1
  73. package/dist/elements/Hyperlink.js +134 -76
  74. package/dist/elements/Hyperlink.js.map +1 -1
  75. package/dist/elements/Image.d.ts.map +1 -1
  76. package/dist/elements/Image.js +238 -106
  77. package/dist/elements/Image.js.map +1 -1
  78. package/dist/elements/ImageManager.d.ts.map +1 -1
  79. package/dist/elements/ImageManager.js +1 -1
  80. package/dist/elements/ImageManager.js.map +1 -1
  81. package/dist/elements/ImageRun.js +1 -1
  82. package/dist/elements/ImageRun.js.map +1 -1
  83. package/dist/elements/MathElement.js.map +1 -1
  84. package/dist/elements/Paragraph.d.ts +24 -24
  85. package/dist/elements/Paragraph.d.ts.map +1 -1
  86. package/dist/elements/Paragraph.js +181 -188
  87. package/dist/elements/Paragraph.js.map +1 -1
  88. package/dist/elements/PreservedElement.js.map +1 -1
  89. package/dist/elements/PropertyChangeTypes.d.ts.map +1 -1
  90. package/dist/elements/PropertyChangeTypes.js +6 -6
  91. package/dist/elements/PropertyChangeTypes.js.map +1 -1
  92. package/dist/elements/RangeMarker.d.ts.map +1 -1
  93. package/dist/elements/RangeMarker.js.map +1 -1
  94. package/dist/elements/Revision.d.ts.map +1 -1
  95. package/dist/elements/Revision.js +4 -5
  96. package/dist/elements/Revision.js.map +1 -1
  97. package/dist/elements/RevisionContent.js.map +1 -1
  98. package/dist/elements/RevisionManager.d.ts.map +1 -1
  99. package/dist/elements/RevisionManager.js +40 -48
  100. package/dist/elements/RevisionManager.js.map +1 -1
  101. package/dist/elements/Run.d.ts +16 -16
  102. package/dist/elements/Run.d.ts.map +1 -1
  103. package/dist/elements/Run.js +256 -238
  104. package/dist/elements/Run.js.map +1 -1
  105. package/dist/elements/Section.d.ts.map +1 -1
  106. package/dist/elements/Section.js +36 -11
  107. package/dist/elements/Section.js.map +1 -1
  108. package/dist/elements/Shape.d.ts.map +1 -1
  109. package/dist/elements/Shape.js.map +1 -1
  110. package/dist/elements/StructuredDocumentTag.d.ts +6 -6
  111. package/dist/elements/StructuredDocumentTag.d.ts.map +1 -1
  112. package/dist/elements/StructuredDocumentTag.js +99 -104
  113. package/dist/elements/StructuredDocumentTag.js.map +1 -1
  114. package/dist/elements/Table.d.ts +11 -11
  115. package/dist/elements/Table.d.ts.map +1 -1
  116. package/dist/elements/Table.js +102 -107
  117. package/dist/elements/Table.js.map +1 -1
  118. package/dist/elements/TableCell.d.ts +10 -10
  119. package/dist/elements/TableCell.d.ts.map +1 -1
  120. package/dist/elements/TableCell.js +105 -106
  121. package/dist/elements/TableCell.js.map +1 -1
  122. package/dist/elements/TableGridChange.d.ts.map +1 -1
  123. package/dist/elements/TableGridChange.js.map +1 -1
  124. package/dist/elements/TableOfContents.d.ts.map +1 -1
  125. package/dist/elements/TableOfContents.js +4 -4
  126. package/dist/elements/TableOfContents.js.map +1 -1
  127. package/dist/elements/TableOfContentsElement.js.map +1 -1
  128. package/dist/elements/TableRow.d.ts.map +1 -1
  129. package/dist/elements/TableRow.js +13 -6
  130. package/dist/elements/TableRow.js.map +1 -1
  131. package/dist/elements/TextBox.d.ts.map +1 -1
  132. package/dist/elements/TextBox.js +3 -5
  133. package/dist/elements/TextBox.js.map +1 -1
  134. package/dist/formatting/AbstractNumbering.d.ts +4 -4
  135. package/dist/formatting/AbstractNumbering.d.ts.map +1 -1
  136. package/dist/formatting/AbstractNumbering.js +54 -49
  137. package/dist/formatting/AbstractNumbering.js.map +1 -1
  138. package/dist/formatting/NumberingInstance.d.ts.map +1 -1
  139. package/dist/formatting/NumberingInstance.js +1 -3
  140. package/dist/formatting/NumberingInstance.js.map +1 -1
  141. package/dist/formatting/NumberingLevel.d.ts +5 -5
  142. package/dist/formatting/NumberingLevel.d.ts.map +1 -1
  143. package/dist/formatting/NumberingLevel.js +119 -125
  144. package/dist/formatting/NumberingLevel.js.map +1 -1
  145. package/dist/formatting/NumberingManager.d.ts.map +1 -1
  146. package/dist/formatting/NumberingManager.js +9 -9
  147. package/dist/formatting/NumberingManager.js.map +1 -1
  148. package/dist/formatting/Style.d.ts +11 -11
  149. package/dist/formatting/Style.d.ts.map +1 -1
  150. package/dist/formatting/Style.js +219 -247
  151. package/dist/formatting/Style.js.map +1 -1
  152. package/dist/formatting/StylesManager.d.ts +2 -2
  153. package/dist/formatting/StylesManager.d.ts.map +1 -1
  154. package/dist/formatting/StylesManager.js +96 -102
  155. package/dist/formatting/StylesManager.js.map +1 -1
  156. package/dist/helpers/CleanupHelper.d.ts +1 -1
  157. package/dist/helpers/CleanupHelper.d.ts.map +1 -1
  158. package/dist/helpers/CleanupHelper.js +6 -6
  159. package/dist/helpers/CleanupHelper.js.map +1 -1
  160. package/dist/images/ImageOptimizer.js +7 -7
  161. package/dist/images/ImageOptimizer.js.map +1 -1
  162. package/dist/index.d.ts +9 -9
  163. package/dist/index.d.ts.map +1 -1
  164. package/dist/index.js.map +1 -1
  165. package/dist/managers/DrawingManager.js.map +1 -1
  166. package/dist/tracking/DocumentTrackingContext.d.ts.map +1 -1
  167. package/dist/tracking/DocumentTrackingContext.js +23 -7
  168. package/dist/tracking/DocumentTrackingContext.js.map +1 -1
  169. package/dist/tracking/TrackingContext.d.ts.map +1 -1
  170. package/dist/tracking/TrackingContext.js.map +1 -1
  171. package/dist/types/compatibility-types.js.map +1 -1
  172. package/dist/types/formatting.js.map +1 -1
  173. package/dist/types/list-types.d.ts +6 -6
  174. package/dist/types/list-types.js.map +1 -1
  175. package/dist/types/settings-types.js.map +1 -1
  176. package/dist/types/styleConfig.d.ts +2 -2
  177. package/dist/types/styleConfig.js.map +1 -1
  178. package/dist/utils/ChangelogGenerator.d.ts.map +1 -1
  179. package/dist/utils/ChangelogGenerator.js +97 -101
  180. package/dist/utils/ChangelogGenerator.js.map +1 -1
  181. package/dist/utils/CompatibilityUpgrader.d.ts.map +1 -1
  182. package/dist/utils/CompatibilityUpgrader.js +1 -1
  183. package/dist/utils/CompatibilityUpgrader.js.map +1 -1
  184. package/dist/utils/InMemoryRevisionAcceptor.d.ts.map +1 -1
  185. package/dist/utils/InMemoryRevisionAcceptor.js +1 -6
  186. package/dist/utils/InMemoryRevisionAcceptor.js.map +1 -1
  187. package/dist/utils/MoveOperationHelper.d.ts.map +1 -1
  188. package/dist/utils/MoveOperationHelper.js +1 -1
  189. package/dist/utils/MoveOperationHelper.js.map +1 -1
  190. package/dist/utils/RevisionAwareProcessor.d.ts.map +1 -1
  191. package/dist/utils/RevisionAwareProcessor.js +2 -4
  192. package/dist/utils/RevisionAwareProcessor.js.map +1 -1
  193. package/dist/utils/RevisionWalker.d.ts.map +1 -1
  194. package/dist/utils/RevisionWalker.js +4 -12
  195. package/dist/utils/RevisionWalker.js.map +1 -1
  196. package/dist/utils/SelectiveRevisionAcceptor.d.ts.map +1 -1
  197. package/dist/utils/SelectiveRevisionAcceptor.js +2 -6
  198. package/dist/utils/SelectiveRevisionAcceptor.js.map +1 -1
  199. package/dist/utils/ShadingResolver.d.ts.map +1 -1
  200. package/dist/utils/ShadingResolver.js +1 -1
  201. package/dist/utils/ShadingResolver.js.map +1 -1
  202. package/dist/utils/acceptRevisions.d.ts.map +1 -1
  203. package/dist/utils/acceptRevisions.js +23 -12
  204. package/dist/utils/acceptRevisions.js.map +1 -1
  205. package/dist/utils/cnfStyleDecoder.d.ts +1 -1
  206. package/dist/utils/cnfStyleDecoder.d.ts.map +1 -1
  207. package/dist/utils/cnfStyleDecoder.js +40 -40
  208. package/dist/utils/cnfStyleDecoder.js.map +1 -1
  209. package/dist/utils/corruptionDetection.d.ts.map +1 -1
  210. package/dist/utils/corruptionDetection.js.map +1 -1
  211. package/dist/utils/dateFormatting.js.map +1 -1
  212. package/dist/utils/deepClone.js +1 -1
  213. package/dist/utils/deepClone.js.map +1 -1
  214. package/dist/utils/diagnostics.d.ts.map +1 -1
  215. package/dist/utils/diagnostics.js +1 -1
  216. package/dist/utils/diagnostics.js.map +1 -1
  217. package/dist/utils/errorHandling.js.map +1 -1
  218. package/dist/utils/formatting.d.ts.map +1 -1
  219. package/dist/utils/formatting.js +10 -2
  220. package/dist/utils/formatting.js.map +1 -1
  221. package/dist/utils/list-detection.d.ts +2 -2
  222. package/dist/utils/list-detection.d.ts.map +1 -1
  223. package/dist/utils/list-detection.js +21 -23
  224. package/dist/utils/list-detection.js.map +1 -1
  225. package/dist/utils/logger.d.ts.map +1 -1
  226. package/dist/utils/logger.js +12 -7
  227. package/dist/utils/logger.js.map +1 -1
  228. package/dist/utils/parsingHelpers.js.map +1 -1
  229. package/dist/utils/stripTrackedChanges.d.ts.map +1 -1
  230. package/dist/utils/stripTrackedChanges.js +3 -3
  231. package/dist/utils/stripTrackedChanges.js.map +1 -1
  232. package/dist/utils/textDiff.d.ts +1 -1
  233. package/dist/utils/textDiff.js +8 -8
  234. package/dist/utils/textDiff.js.map +1 -1
  235. package/dist/utils/units.js.map +1 -1
  236. package/dist/utils/validation.d.ts.map +1 -1
  237. package/dist/utils/validation.js +24 -7
  238. package/dist/utils/validation.js.map +1 -1
  239. package/dist/utils/xmlSanitization.d.ts.map +1 -1
  240. package/dist/utils/xmlSanitization.js +3 -3
  241. package/dist/utils/xmlSanitization.js.map +1 -1
  242. package/dist/validation/RevisionAutoFixer.d.ts.map +1 -1
  243. package/dist/validation/RevisionAutoFixer.js +5 -5
  244. package/dist/validation/RevisionAutoFixer.js.map +1 -1
  245. package/dist/validation/RevisionValidator.d.ts.map +1 -1
  246. package/dist/validation/RevisionValidator.js +7 -9
  247. package/dist/validation/RevisionValidator.js.map +1 -1
  248. package/dist/validation/ValidationRules.js +3 -3
  249. package/dist/validation/ValidationRules.js.map +1 -1
  250. package/dist/validation/index.js.map +1 -1
  251. package/dist/xml/XMLBuilder.d.ts +1 -1
  252. package/dist/xml/XMLBuilder.d.ts.map +1 -1
  253. package/dist/xml/XMLBuilder.js +98 -100
  254. package/dist/xml/XMLBuilder.js.map +1 -1
  255. package/dist/xml/XMLParser.d.ts.map +1 -1
  256. package/dist/xml/XMLParser.js +61 -66
  257. package/dist/xml/XMLParser.js.map +1 -1
  258. package/dist/zip/ZipHandler.d.ts.map +1 -1
  259. package/dist/zip/ZipHandler.js.map +1 -1
  260. package/dist/zip/ZipReader.d.ts.map +1 -1
  261. package/dist/zip/ZipReader.js +1 -3
  262. package/dist/zip/ZipReader.js.map +1 -1
  263. package/dist/zip/ZipWriter.d.ts +1 -1
  264. package/dist/zip/ZipWriter.d.ts.map +1 -1
  265. package/dist/zip/ZipWriter.js +28 -36
  266. package/dist/zip/ZipWriter.js.map +1 -1
  267. package/dist/zip/types.js +1 -1
  268. package/dist/zip/types.js.map +1 -1
  269. package/package.json +92 -92
  270. package/src/__tests__/helper-methods.test.ts +512 -512
  271. package/src/constants/legacyCompatFlags.ts +138 -138
  272. package/src/constants/limits.ts +50 -50
  273. package/src/core/Document.ts +985 -1145
  274. package/src/core/DocumentContent.ts +461 -467
  275. package/src/core/DocumentGenerator.ts +1133 -1104
  276. package/src/core/DocumentIdManager.ts +158 -158
  277. package/src/core/DocumentParser.ts +2347 -2716
  278. package/src/core/DocumentValidator.ts +363 -372
  279. package/src/core/Relationship.ts +367 -367
  280. package/src/core/RelationshipManager.ts +429 -428
  281. package/src/elements/AlternateContent.ts +42 -42
  282. package/src/elements/Bookmark.ts +212 -210
  283. package/src/elements/BookmarkManager.ts +247 -250
  284. package/src/elements/Comment.ts +356 -359
  285. package/src/elements/CommentManager.ts +499 -502
  286. package/src/elements/CommonTypes.ts +524 -549
  287. package/src/elements/CustomXml.ts +36 -36
  288. package/src/elements/Endnote.ts +221 -217
  289. package/src/elements/EndnoteManager.ts +246 -249
  290. package/src/elements/Field.ts +1292 -1233
  291. package/src/elements/FieldHelpers.ts +329 -333
  292. package/src/elements/FontManager.ts +336 -339
  293. package/src/elements/Footer.ts +269 -269
  294. package/src/elements/Footnote.ts +221 -217
  295. package/src/elements/FootnoteManager.ts +246 -249
  296. package/src/elements/Header.ts +269 -269
  297. package/src/elements/HeaderFooterManager.ts +219 -219
  298. package/src/elements/Hyperlink.ts +1288 -1193
  299. package/src/elements/Image.ts +1982 -1756
  300. package/src/elements/ImageManager.ts +437 -432
  301. package/src/elements/ImageRun.ts +59 -59
  302. package/src/elements/MathElement.ts +65 -65
  303. package/src/elements/Paragraph.ts +4347 -4287
  304. package/src/elements/PreservedElement.ts +53 -53
  305. package/src/elements/PropertyChangeTypes.ts +458 -442
  306. package/src/elements/RangeMarker.ts +382 -400
  307. package/src/elements/Revision.ts +1198 -1217
  308. package/src/elements/RevisionContent.ts +73 -73
  309. package/src/elements/RevisionManager.ts +1070 -1070
  310. package/src/elements/Run.ts +3103 -3073
  311. package/src/elements/Section.ts +1521 -1421
  312. package/src/elements/Shape.ts +884 -873
  313. package/src/elements/StructuredDocumentTag.ts +1176 -1207
  314. package/src/elements/Table.ts +2468 -2524
  315. package/src/elements/TableCell.ts +1617 -1621
  316. package/src/elements/TableGridChange.ts +149 -151
  317. package/src/elements/TableOfContents.ts +701 -691
  318. package/src/elements/TableOfContentsElement.ts +89 -89
  319. package/src/elements/TableRow.ts +960 -929
  320. package/src/elements/TextBox.ts +766 -768
  321. package/src/formatting/AbstractNumbering.ts +580 -579
  322. package/src/formatting/NumberingInstance.ts +295 -299
  323. package/src/formatting/NumberingLevel.ts +981 -1040
  324. package/src/formatting/NumberingManager.ts +833 -827
  325. package/src/formatting/Style.ts +1785 -1879
  326. package/src/formatting/StylesManager.ts +1090 -1130
  327. package/src/helpers/CleanupHelper.ts +524 -524
  328. package/src/images/ImageOptimizer.ts +274 -274
  329. package/src/index.ts +559 -554
  330. package/src/managers/DrawingManager.ts +319 -319
  331. package/src/tracking/DocumentTrackingContext.ts +687 -674
  332. package/src/tracking/TrackingContext.ts +175 -173
  333. package/src/types/compatibility-types.ts +49 -49
  334. package/src/types/formatting.ts +210 -210
  335. package/src/types/list-types.ts +14 -14
  336. package/src/types/settings-types.ts +59 -59
  337. package/src/types/styleConfig.ts +189 -189
  338. package/src/utils/ChangelogGenerator.ts +1583 -1581
  339. package/src/utils/CompatibilityUpgrader.ts +235 -237
  340. package/src/utils/InMemoryRevisionAcceptor.ts +691 -696
  341. package/src/utils/MoveOperationHelper.ts +233 -238
  342. package/src/utils/RevisionAwareProcessor.ts +518 -526
  343. package/src/utils/RevisionWalker.ts +427 -457
  344. package/src/utils/SelectiveRevisionAcceptor.ts +662 -683
  345. package/src/utils/ShadingResolver.ts +105 -107
  346. package/src/utils/acceptRevisions.ts +723 -714
  347. package/src/utils/cnfStyleDecoder.ts +212 -217
  348. package/src/utils/corruptionDetection.ts +346 -345
  349. package/src/utils/dateFormatting.ts +20 -20
  350. package/src/utils/deepClone.ts +77 -78
  351. package/src/utils/diagnostics.ts +125 -129
  352. package/src/utils/errorHandling.ts +80 -80
  353. package/src/utils/formatting.ts +220 -213
  354. package/src/utils/list-detection.ts +32 -42
  355. package/src/utils/logger.ts +412 -404
  356. package/src/utils/parsingHelpers.ts +190 -190
  357. package/src/utils/stripTrackedChanges.ts +356 -353
  358. package/src/utils/textDiff.ts +100 -100
  359. package/src/utils/units.ts +421 -421
  360. package/src/utils/validation.ts +553 -542
  361. package/src/utils/xmlSanitization.ts +179 -182
  362. package/src/validation/RevisionAutoFixer.ts +541 -542
  363. package/src/validation/RevisionValidator.ts +470 -460
  364. package/src/validation/ValidationRules.ts +338 -338
  365. package/src/validation/index.ts +30 -30
  366. package/src/xml/XMLBuilder.ts +857 -871
  367. package/src/xml/XMLParser.ts +877 -919
  368. package/src/zip/ZipHandler.ts +629 -637
  369. package/src/zip/ZipReader.ts +295 -299
  370. package/src/zip/ZipWriter.ts +374 -390
  371. package/src/zip/types.ts +116 -116
package/src/index.ts CHANGED
@@ -1,554 +1,559 @@
1
- /**
2
- * DocXML - DOCX Editing Framework
3
- * Main entry point
4
- */
5
-
6
- // =============================================================================
7
- // PUBLIC API — Core Document Classes
8
- // =============================================================================
9
-
10
- export { Document, DocumentProperties, DocumentOptions, DocumentLoadOptions, DocumentPart } from './core/Document';
11
-
12
- // =============================================================================
13
- // PUBLIC API — Document Elements
14
- // =============================================================================
15
-
16
- export {
17
- Paragraph,
18
- ParagraphAlignment,
19
- ParagraphFormatting,
20
- ParagraphContent,
21
- FieldLike,
22
- isRun,
23
- isField,
24
- isSimpleField,
25
- isComplexField,
26
- isHyperlink,
27
- isRevision,
28
- isRangeMarker,
29
- isShape,
30
- isTextBox,
31
- } from './elements/Paragraph';
32
- export { Run, RunFormatting, ThemeColorValue } from './elements/Run';
33
- export {
34
- Section,
35
- PageOrientation,
36
- SectionType,
37
- PageNumberFormat,
38
- PageSize,
39
- Margins,
40
- Columns,
41
- PageNumbering,
42
- SectionProperties,
43
- LineNumbering,
44
- LineNumberingRestart,
45
- } from './elements/Section';
46
- export {
47
- Table,
48
- TableAlignment,
49
- TableLayout,
50
- TableBorder,
51
- TableBorders,
52
- TableFormatting,
53
- } from './elements/Table';
54
- export { TableRow, RowFormatting } from './elements/TableRow';
55
- export {
56
- TableCell,
57
- CellBorder,
58
- CellBorders,
59
- CellShading,
60
- CellFormatting,
61
- } from './elements/TableCell';
62
- export { TableGridChange, GridColumn, TableGridChangeProperties } from './elements/TableGridChange';
63
- export {
64
- Image,
65
- ImageFormat,
66
- ImageProperties,
67
- ImageBorder,
68
- ImageEffects,
69
- PresetGeometry,
70
- BlipCompressionState,
71
- PicLockAttribute,
72
- PicNonVisualProperties,
73
- } from './elements/Image';
74
- export { ImageRun } from './elements/ImageRun';
75
- export { Shape, ShapeType, ShapeProperties, ShapeFill, ShapeOutline } from './elements/Shape';
76
- export { TextBox, TextBoxProperties, TextBoxFill, TextBoxMargins } from './elements/TextBox';
77
- export { Header, HeaderType, HeaderProperties } from './elements/Header';
78
- export { Footer, FooterType, FooterProperties } from './elements/Footer';
79
- export { Hyperlink, HyperlinkProperties } from './elements/Hyperlink';
80
- export { Bookmark, BookmarkProperties } from './elements/Bookmark';
81
- export { RangeMarker, RangeMarkerType, RangeMarkerProperties } from './elements/RangeMarker';
82
- export { Comment, CommentProperties } from './elements/Comment';
83
- export { Footnote, FootnoteType, FootnoteProperties } from './elements/Footnote';
84
- export { Endnote, EndnoteType, EndnoteProperties } from './elements/Endnote';
85
- export {
86
- Field,
87
- FieldType,
88
- FieldProperties,
89
- ComplexField,
90
- ComplexFieldProperties,
91
- FieldCharType,
92
- TOCFieldOptions,
93
- createTOCField,
94
- } from './elements/Field';
95
- export {
96
- createNestedIFMergeField,
97
- createMergeField,
98
- createRefField,
99
- createIFField,
100
- createNestedField,
101
- parseHyperlinkInstruction,
102
- buildHyperlinkInstruction,
103
- isHyperlinkInstruction,
104
- ParsedHyperlinkInstruction,
105
- } from './elements/FieldHelpers';
106
- export { StructuredDocumentTag, SDTProperties, SDTLockType, SDTContent, SDTPlaceholder, SDTDataBinding, ContentControlType } from './elements/StructuredDocumentTag';
107
- export { TableOfContents, TOCProperties } from './elements/TableOfContents';
108
- export { TableOfContentsElement } from './elements/TableOfContentsElement';
109
- export { AlternateContent } from './elements/AlternateContent';
110
- export { MathParagraph, MathExpression } from './elements/MathElement';
111
- export { CustomXmlBlock } from './elements/CustomXml';
112
- export { PreservedElement, PreservedElementContext } from './elements/PreservedElement';
113
-
114
- // =============================================================================
115
- // PUBLIC API — Track Changes / Revisions
116
- // =============================================================================
117
-
118
- export { Revision, RevisionType, RevisionProperties, FieldContext } from './elements/Revision';
119
- export { RevisionContent, isRunContent, isHyperlinkContent } from './elements/RevisionContent';
120
- export {
121
- RevisionLocation,
122
- RunPropertyChange,
123
- ParagraphPropertyChange,
124
- ParagraphFormattingPartial,
125
- ParagraphBorderDef,
126
- ParagraphBorders,
127
- ParagraphShading,
128
- TabStopDef,
129
- PropertyChangeBase,
130
- TablePropertyChange,
131
- TablePropertyChangeType,
132
- SectionPropertyChange,
133
- NumberingChange,
134
- AnyPropertyChange,
135
- isRunPropertyChange,
136
- isParagraphPropertyChange,
137
- isTablePropertyChange,
138
- isSectionPropertyChange,
139
- isNumberingChange,
140
- } from './elements/PropertyChangeTypes';
141
- export {
142
- acceptRevisionsInMemory,
143
- AcceptRevisionsOptions,
144
- AcceptRevisionsResult,
145
- paragraphHasRevisions,
146
- getRevisionsFromParagraph,
147
- countRevisionsByType,
148
- stripRevisionsFromXml,
149
- } from './utils/InMemoryRevisionAcceptor';
150
- export {
151
- MoveOperationHelper,
152
- MoveOperationOptions,
153
- MoveOperationResult,
154
- } from './utils/MoveOperationHelper';
155
- export {
156
- SelectiveRevisionAcceptor,
157
- SelectiveAcceptResult,
158
- } from './utils/SelectiveRevisionAcceptor';
159
- export {
160
- RevisionAwareProcessor,
161
- RevisionHandlingMode,
162
- RevisionProcessingOptions,
163
- SelectionCriteria,
164
- RevisionProcessingResult,
165
- ConflictInfo,
166
- ProcessingLogEntry,
167
- } from './utils/RevisionAwareProcessor';
168
- export {
169
- ChangelogGenerator,
170
- ChangeEntry,
171
- ChangeCategory,
172
- ChangeLocation,
173
- ChangelogOptions,
174
- ChangelogFormat,
175
- ConsolidatedChange,
176
- ChangelogSummary,
177
- } from './utils/ChangelogGenerator';
178
-
179
- // =============================================================================
180
- // PUBLIC API — Formatting / Styles / Numbering
181
- // =============================================================================
182
-
183
- export { Style, StyleType, StyleProperties } from './formatting/Style';
184
- export { StylesManager, ValidationResult, LatentStylesConfig, LatentStyleException } from './formatting/StylesManager';
185
- export {
186
- NumberingLevel,
187
- NumberFormat,
188
- NumberAlignment,
189
- NumberingLevelProperties,
190
- WORD_NATIVE_BULLETS,
191
- WordNativeBullet,
192
- } from './formatting/NumberingLevel';
193
- export {
194
- AbstractNumbering,
195
- AbstractNumberingProperties,
196
- } from './formatting/AbstractNumbering';
197
- export {
198
- NumberingInstance,
199
- NumberingInstanceProperties,
200
- } from './formatting/NumberingInstance';
201
- export {
202
- NumberingManager,
203
- NumberingConsolidationOptions,
204
- NumberingConsolidationResult,
205
- } from './formatting/NumberingManager';
206
- export {
207
- StyleRunFormatting,
208
- StyleParagraphFormatting,
209
- Heading2TableOptions,
210
- StyleConfig,
211
- Heading2Config,
212
- ApplyCustomFormattingOptions,
213
- } from './types/styleConfig';
214
- export {
215
- FormatOptions,
216
- StyleApplyOptions,
217
- EmphasisType,
218
- ListPrefix,
219
- } from './types/formatting';
220
-
221
- // =============================================================================
222
- // PUBLIC API — Managers
223
- // =============================================================================
224
-
225
- export { RevisionManager, RevisionCategory, RevisionSummary } from './elements/RevisionManager';
226
- export { ImageManager } from './elements/ImageManager';
227
- export { BookmarkManager } from './elements/BookmarkManager';
228
- export { CommentManager } from './elements/CommentManager';
229
- export { FootnoteManager } from './elements/FootnoteManager';
230
- export { EndnoteManager } from './elements/EndnoteManager';
231
- export { HeaderFooterManager } from './elements/HeaderFooterManager';
232
- export { FontManager, FontFormat, FontEntry } from './elements/FontManager';
233
- export { DrawingManager, DrawingElement, DrawingType, PreservedDrawing } from './managers/DrawingManager';
234
-
235
- // =============================================================================
236
- // PUBLIC API Image Optimization
237
- // =============================================================================
238
-
239
- export type { ImageOptimizationResult } from './images/ImageOptimizer';
240
-
241
- // =============================================================================
242
- // TYPES — Common / Shared Type Definitions
243
- // =============================================================================
244
-
245
- export {
246
- ShadingPattern,
247
- BasicShadingPattern,
248
- BorderStyle,
249
- ExtendedBorderStyle,
250
- FullBorderStyle,
251
- BorderDefinition,
252
- FourSidedBorders,
253
- TableBorderDefinitions,
254
- HorizontalAlignment,
255
- VerticalAlignment,
256
- PageVerticalAlignment,
257
- CellVerticalAlignment,
258
- ParagraphAlignment as CommonParagraphAlignment,
259
- TableAlignment as CommonTableAlignment,
260
- RowJustification,
261
- TextVerticalAlignment,
262
- TabAlignment,
263
- PositionAnchor,
264
- HorizontalAnchor,
265
- VerticalAnchor,
266
- TextDirection,
267
- SectionTextDirection,
268
- WidthType,
269
- ShadingConfig,
270
- buildShadingAttributes,
271
- TabLeader,
272
- TabStop,
273
- isShadingPattern,
274
- isBorderStyle,
275
- isHorizontalAlignment,
276
- isVerticalAlignment,
277
- isParagraphAlignment,
278
- isWidthType,
279
- DEFAULT_BORDER,
280
- NO_BORDER,
281
- } from './elements/CommonTypes';
282
- export {
283
- ListCategory,
284
- NumberFormat as ListNumberFormat,
285
- BulletFormat,
286
- ListDetectionResult,
287
- ListAnalysis,
288
- ListNormalizationOptions,
289
- ListNormalizationReport,
290
- IndentationLevel,
291
- } from './types/list-types';
292
-
293
- export {
294
- CompatibilityMode,
295
- CompatibilityInfo,
296
- CompatSetting,
297
- } from './types/compatibility-types';
298
-
299
- export {
300
- DocumentProtection,
301
- RevisionViewSettings,
302
- TrackChangesSettings,
303
- WebSettingsInfo,
304
- } from './types/settings-types';
305
-
306
- // =============================================================================
307
- // TYPES — Compatibility Upgrade
308
- // =============================================================================
309
-
310
- export { CompatibilityUpgrader, UpgradeReport } from './utils/CompatibilityUpgrader';
311
- export {
312
- LEGACY_COMPAT_ELEMENTS,
313
- LEGACY_COMPAT_ELEMENT_NAMES,
314
- MODERN_COMPAT_SETTINGS,
315
- MS_WORD_COMPAT_URI,
316
- } from './constants/legacyCompatFlags';
317
-
318
- // =============================================================================
319
- // UTILITIES Unit Conversions
320
- // =============================================================================
321
-
322
- export {
323
- STANDARD_DPI,
324
- UNITS,
325
- PAGE_SIZES,
326
- COMMON_MARGINS,
327
- twipsToPoints,
328
- twipsToInches,
329
- twipsToCm,
330
- twipsToEmus,
331
- emusToTwips,
332
- emusToInches,
333
- emusToCm,
334
- emusToPoints,
335
- emusToPixels,
336
- pointsToTwips,
337
- pointsToEmus,
338
- pointsToInches,
339
- pointsToCm,
340
- pointsToHalfPoints,
341
- halfPointsToPoints,
342
- inchesToTwips,
343
- inchesToEmus,
344
- inchesToPoints,
345
- inchesToCm,
346
- inchesToPixels,
347
- cmToTwips,
348
- cmToEmus,
349
- cmToInches,
350
- cmToPoints,
351
- cmToPixels,
352
- pixelsToEmus,
353
- pixelsToInches,
354
- pixelsToTwips,
355
- pixelsToCm,
356
- pixelsToPoints,
357
- } from './utils/units';
358
-
359
- // =============================================================================
360
- // UTILITIES — Validation, Corruption Detection, Error Handling
361
- // =============================================================================
362
-
363
- export {
364
- validateDocxStructure,
365
- isBinaryFile,
366
- normalizePath,
367
- isValidZipBuffer,
368
- isTextContent,
369
- validateTwips,
370
- validateColor,
371
- validateHexColor,
372
- normalizeColor,
373
- validateNumberingId,
374
- validateLevel,
375
- validateAlignment,
376
- validateFontSize,
377
- validateNonEmptyString,
378
- validatePercentage,
379
- validateEmus,
380
- detectXmlInText,
381
- cleanXmlFromText,
382
- validateRunText,
383
- TextValidationResult,
384
- } from './utils/validation';
385
- export {
386
- detectCorruptionInDocument,
387
- detectCorruptionInText,
388
- suggestFix,
389
- looksCorrupted,
390
- CorruptionReport,
391
- CorruptionLocation,
392
- CorruptionType,
393
- } from './utils/corruptionDetection';
394
- export { isError, toError, wrapError, getErrorMessage } from './utils/errorHandling';
395
- export {
396
- REVISION_RULES,
397
- ValidationSeverity,
398
- ValidationIssue,
399
- ValidationRule,
400
- ValidationOptions,
401
- AutoFixOptions,
402
- ValidationResult as RevisionValidationResult,
403
- FixAction,
404
- AutoFixResult,
405
- createIssueFromRule,
406
- getRuleByCode,
407
- getRulesBySeverity,
408
- getAutoFixableRules,
409
- RevisionValidator,
410
- RevisionAutoFixer,
411
- } from './validation';
412
-
413
- // =============================================================================
414
- // UTILITIES — Formatting, Parsing, Sanitization
415
- // =============================================================================
416
-
417
- export {
418
- mergeFormatting,
419
- cloneFormatting,
420
- hasFormatting,
421
- cleanFormatting,
422
- isEqualFormatting,
423
- applyDefaults,
424
- } from './utils/formatting';
425
- export {
426
- safeParseInt,
427
- parseOoxmlBoolean,
428
- isExplicitlySet,
429
- parseNumericAttribute,
430
- parseOnOffAttribute,
431
- } from './utils/parsingHelpers';
432
- export {
433
- removeInvalidXmlChars,
434
- findInvalidXmlChars,
435
- hasInvalidXmlChars,
436
- XML_CONTROL_CHARS,
437
- } from './utils/xmlSanitization';
438
-
439
- // =============================================================================
440
- // UTILITIES — List Detection (kept for basic detection; normalization moved to consumer)
441
- // =============================================================================
442
-
443
- export {
444
- detectTypedPrefix,
445
- detectListType,
446
- inferLevelFromIndentation,
447
- getParagraphIndentation,
448
- validateListSequence,
449
- getListCategoryFromFormat,
450
- getLevelFromFormat,
451
- TYPED_LIST_PATTERNS,
452
- PATTERN_TO_CATEGORY,
453
- FORMAT_TO_LEVEL,
454
- } from './utils/list-detection';
455
-
456
- // =============================================================================
457
- // UTILITIES — Logging
458
- // =============================================================================
459
-
460
- export {
461
- ILogger,
462
- LogLevel,
463
- LogEntry,
464
- ConsoleLogger,
465
- SilentLogger,
466
- CollectingLogger,
467
- defaultLogger,
468
- createScopedLogger,
469
- createComponentLogger,
470
- getGlobalLogger,
471
- setGlobalLogger,
472
- resetGlobalLogger,
473
- } from './utils/logger';
474
-
475
- // =============================================================================
476
- // UTILITIES — Revision Walker
477
- // =============================================================================
478
-
479
- export { RevisionWalker, RevisionWalkerOptions } from './utils/RevisionWalker';
480
- export { resolveCellShading } from './utils/ShadingResolver';
481
- export { decodeCnfStyle, getActiveConditionalsInPriorityOrder } from './utils/cnfStyleDecoder';
482
-
483
- // =============================================================================
484
- // UTILITIES — Cleanup
485
- // =============================================================================
486
-
487
- export {
488
- CleanupHelper,
489
- CleanupOptions,
490
- CleanupReport,
491
- } from './helpers/CleanupHelper';
492
-
493
- // =============================================================================
494
- // INTERNAL — ZIP Handling (advanced usage)
495
- // =============================================================================
496
-
497
- export { ZipHandler } from './zip/ZipHandler';
498
- export { ZipReader } from './zip/ZipReader';
499
- export { ZipWriter } from './zip/ZipWriter';
500
- export {
501
- ZipFile,
502
- FileMap,
503
- LoadOptions,
504
- SaveOptions,
505
- AddFileOptions,
506
- SizeLimitOptions,
507
- DEFAULT_SIZE_LIMITS,
508
- REQUIRED_DOCX_FILES,
509
- DOCX_PATHS,
510
- } from './zip/types';
511
- export {
512
- DocxError,
513
- DocxNotFoundError,
514
- InvalidDocxError,
515
- CorruptedArchiveError,
516
- MissingRequiredFileError,
517
- FileOperationError,
518
- } from './zip/errors';
519
-
520
- // =============================================================================
521
- // INTERNAL — XML Builder and Parser (advanced usage)
522
- // =============================================================================
523
-
524
- export { XMLBuilder, XMLElement } from './xml/XMLBuilder';
525
- export {
526
- XMLParser,
527
- ParseToObjectOptions,
528
- ParsedXMLValue,
529
- ParsedXMLObject,
530
- DEFAULT_MAX_NESTING_DEPTH,
531
- } from './xml/XMLParser';
532
-
533
- // =============================================================================
534
- // INTERNAL — Parser, Generator, Validator (advanced usage)
535
- // =============================================================================
536
-
537
- export { Relationship, RelationshipType, RelationshipProperties } from './core/Relationship';
538
- export { RelationshipManager } from './core/RelationshipManager';
539
- export { DocumentParser, ParseError } from './core/DocumentParser';
540
- export { DocumentGenerator, IZipHandlerReader } from './core/DocumentGenerator';
541
- export { DocumentValidator, SizeEstimate, MemoryOptions } from './core/DocumentValidator';
542
- export { DocumentIdManager } from './core/DocumentIdManager';
543
-
544
- // =============================================================================
545
- // INTERNAL Document Subsystem Classes (advanced usage)
546
- // =============================================================================
547
-
548
- export { DocumentContent, BodyElement } from './core/DocumentContent';
549
-
550
- // =============================================================================
551
- // INTERNAL — Constants
552
- // =============================================================================
553
-
554
- export { LIMITS } from './constants/limits';
1
+ /**
2
+ * DocXML - DOCX Editing Framework
3
+ * Main entry point
4
+ */
5
+
6
+ // =============================================================================
7
+ // PUBLIC API — Core Document Classes
8
+ // =============================================================================
9
+
10
+ export {
11
+ Document,
12
+ DocumentProperties,
13
+ DocumentOptions,
14
+ DocumentLoadOptions,
15
+ DocumentPart,
16
+ } from './core/Document';
17
+
18
+ // =============================================================================
19
+ // PUBLIC API — Document Elements
20
+ // =============================================================================
21
+
22
+ export {
23
+ Paragraph,
24
+ ParagraphAlignment,
25
+ ParagraphFormatting,
26
+ ParagraphContent,
27
+ FieldLike,
28
+ isRun,
29
+ isField,
30
+ isSimpleField,
31
+ isComplexField,
32
+ isHyperlink,
33
+ isRevision,
34
+ isRangeMarker,
35
+ isShape,
36
+ isTextBox,
37
+ } from './elements/Paragraph';
38
+ export { Run, RunFormatting, ThemeColorValue } from './elements/Run';
39
+ export {
40
+ Section,
41
+ PageOrientation,
42
+ SectionType,
43
+ PageNumberFormat,
44
+ PageSize,
45
+ Margins,
46
+ Columns,
47
+ PageNumbering,
48
+ SectionProperties,
49
+ LineNumbering,
50
+ LineNumberingRestart,
51
+ } from './elements/Section';
52
+ export {
53
+ Table,
54
+ TableAlignment,
55
+ TableLayout,
56
+ TableBorder,
57
+ TableBorders,
58
+ TableFormatting,
59
+ } from './elements/Table';
60
+ export { TableRow, RowFormatting } from './elements/TableRow';
61
+ export {
62
+ TableCell,
63
+ CellBorder,
64
+ CellBorders,
65
+ CellShading,
66
+ CellFormatting,
67
+ } from './elements/TableCell';
68
+ export { TableGridChange, GridColumn, TableGridChangeProperties } from './elements/TableGridChange';
69
+ export {
70
+ Image,
71
+ ImageFormat,
72
+ ImageProperties,
73
+ ImageBorder,
74
+ ImageEffects,
75
+ PresetGeometry,
76
+ BlipCompressionState,
77
+ PicLockAttribute,
78
+ PicNonVisualProperties,
79
+ } from './elements/Image';
80
+ export { ImageRun } from './elements/ImageRun';
81
+ export { Shape, ShapeType, ShapeProperties, ShapeFill, ShapeOutline } from './elements/Shape';
82
+ export { TextBox, TextBoxProperties, TextBoxFill, TextBoxMargins } from './elements/TextBox';
83
+ export { Header, HeaderType, HeaderProperties } from './elements/Header';
84
+ export { Footer, FooterType, FooterProperties } from './elements/Footer';
85
+ export { Hyperlink, HyperlinkProperties } from './elements/Hyperlink';
86
+ export { Bookmark, BookmarkProperties } from './elements/Bookmark';
87
+ export { RangeMarker, RangeMarkerType, RangeMarkerProperties } from './elements/RangeMarker';
88
+ export { Comment, CommentProperties } from './elements/Comment';
89
+ export { Footnote, FootnoteType, FootnoteProperties } from './elements/Footnote';
90
+ export { Endnote, EndnoteType, EndnoteProperties } from './elements/Endnote';
91
+ export {
92
+ Field,
93
+ FieldType,
94
+ FieldProperties,
95
+ ComplexField,
96
+ ComplexFieldProperties,
97
+ FieldCharType,
98
+ TOCFieldOptions,
99
+ createTOCField,
100
+ } from './elements/Field';
101
+ export {
102
+ createNestedIFMergeField,
103
+ createMergeField,
104
+ createRefField,
105
+ createIFField,
106
+ createNestedField,
107
+ parseHyperlinkInstruction,
108
+ buildHyperlinkInstruction,
109
+ isHyperlinkInstruction,
110
+ ParsedHyperlinkInstruction,
111
+ } from './elements/FieldHelpers';
112
+ export {
113
+ StructuredDocumentTag,
114
+ SDTProperties,
115
+ SDTLockType,
116
+ SDTContent,
117
+ SDTPlaceholder,
118
+ SDTDataBinding,
119
+ ContentControlType,
120
+ } from './elements/StructuredDocumentTag';
121
+ export { TableOfContents, TOCProperties } from './elements/TableOfContents';
122
+ export { TableOfContentsElement } from './elements/TableOfContentsElement';
123
+ export { AlternateContent } from './elements/AlternateContent';
124
+ export { MathParagraph, MathExpression } from './elements/MathElement';
125
+ export { CustomXmlBlock } from './elements/CustomXml';
126
+ export { PreservedElement, PreservedElementContext } from './elements/PreservedElement';
127
+
128
+ // =============================================================================
129
+ // PUBLIC API — Track Changes / Revisions
130
+ // =============================================================================
131
+
132
+ export { Revision, RevisionType, RevisionProperties, FieldContext } from './elements/Revision';
133
+ export { RevisionContent, isRunContent, isHyperlinkContent } from './elements/RevisionContent';
134
+ export {
135
+ RevisionLocation,
136
+ RunPropertyChange,
137
+ ParagraphPropertyChange,
138
+ ParagraphFormattingPartial,
139
+ ParagraphBorderDef,
140
+ ParagraphBorders,
141
+ ParagraphShading,
142
+ TabStopDef,
143
+ PropertyChangeBase,
144
+ TablePropertyChange,
145
+ TablePropertyChangeType,
146
+ SectionPropertyChange,
147
+ NumberingChange,
148
+ AnyPropertyChange,
149
+ isRunPropertyChange,
150
+ isParagraphPropertyChange,
151
+ isTablePropertyChange,
152
+ isSectionPropertyChange,
153
+ isNumberingChange,
154
+ } from './elements/PropertyChangeTypes';
155
+ export {
156
+ acceptRevisionsInMemory,
157
+ AcceptRevisionsOptions,
158
+ AcceptRevisionsResult,
159
+ paragraphHasRevisions,
160
+ getRevisionsFromParagraph,
161
+ countRevisionsByType,
162
+ stripRevisionsFromXml,
163
+ } from './utils/InMemoryRevisionAcceptor';
164
+ export {
165
+ MoveOperationHelper,
166
+ MoveOperationOptions,
167
+ MoveOperationResult,
168
+ } from './utils/MoveOperationHelper';
169
+ export {
170
+ SelectiveRevisionAcceptor,
171
+ SelectiveAcceptResult,
172
+ } from './utils/SelectiveRevisionAcceptor';
173
+ export {
174
+ RevisionAwareProcessor,
175
+ RevisionHandlingMode,
176
+ RevisionProcessingOptions,
177
+ SelectionCriteria,
178
+ RevisionProcessingResult,
179
+ ConflictInfo,
180
+ ProcessingLogEntry,
181
+ } from './utils/RevisionAwareProcessor';
182
+ export {
183
+ ChangelogGenerator,
184
+ ChangeEntry,
185
+ ChangeCategory,
186
+ ChangeLocation,
187
+ ChangelogOptions,
188
+ ChangelogFormat,
189
+ ConsolidatedChange,
190
+ ChangelogSummary,
191
+ } from './utils/ChangelogGenerator';
192
+
193
+ // =============================================================================
194
+ // PUBLIC API — Formatting / Styles / Numbering
195
+ // =============================================================================
196
+
197
+ export { Style, StyleType, StyleProperties } from './formatting/Style';
198
+ export {
199
+ StylesManager,
200
+ ValidationResult,
201
+ LatentStylesConfig,
202
+ LatentStyleException,
203
+ } from './formatting/StylesManager';
204
+ export {
205
+ NumberingLevel,
206
+ NumberFormat,
207
+ NumberAlignment,
208
+ NumberingLevelProperties,
209
+ WORD_NATIVE_BULLETS,
210
+ WordNativeBullet,
211
+ } from './formatting/NumberingLevel';
212
+ export { AbstractNumbering, AbstractNumberingProperties } from './formatting/AbstractNumbering';
213
+ export { NumberingInstance, NumberingInstanceProperties } from './formatting/NumberingInstance';
214
+ export {
215
+ NumberingManager,
216
+ NumberingConsolidationOptions,
217
+ NumberingConsolidationResult,
218
+ } from './formatting/NumberingManager';
219
+ export {
220
+ StyleRunFormatting,
221
+ StyleParagraphFormatting,
222
+ Heading2TableOptions,
223
+ StyleConfig,
224
+ Heading2Config,
225
+ ApplyCustomFormattingOptions,
226
+ } from './types/styleConfig';
227
+ export { FormatOptions, StyleApplyOptions, EmphasisType, ListPrefix } from './types/formatting';
228
+
229
+ // =============================================================================
230
+ // PUBLIC API Managers
231
+ // =============================================================================
232
+
233
+ export { RevisionManager, RevisionCategory, RevisionSummary } from './elements/RevisionManager';
234
+ export { ImageManager } from './elements/ImageManager';
235
+ export { BookmarkManager } from './elements/BookmarkManager';
236
+ export { CommentManager } from './elements/CommentManager';
237
+ export { FootnoteManager } from './elements/FootnoteManager';
238
+ export { EndnoteManager } from './elements/EndnoteManager';
239
+ export { HeaderFooterManager } from './elements/HeaderFooterManager';
240
+ export { FontManager, FontFormat, FontEntry } from './elements/FontManager';
241
+ export {
242
+ DrawingManager,
243
+ DrawingElement,
244
+ DrawingType,
245
+ PreservedDrawing,
246
+ } from './managers/DrawingManager';
247
+
248
+ // =============================================================================
249
+ // PUBLIC API — Image Optimization
250
+ // =============================================================================
251
+
252
+ export type { ImageOptimizationResult } from './images/ImageOptimizer';
253
+
254
+ // =============================================================================
255
+ // TYPES — Common / Shared Type Definitions
256
+ // =============================================================================
257
+
258
+ export {
259
+ ShadingPattern,
260
+ BasicShadingPattern,
261
+ BorderStyle,
262
+ ExtendedBorderStyle,
263
+ FullBorderStyle,
264
+ BorderDefinition,
265
+ FourSidedBorders,
266
+ TableBorderDefinitions,
267
+ HorizontalAlignment,
268
+ VerticalAlignment,
269
+ PageVerticalAlignment,
270
+ CellVerticalAlignment,
271
+ ParagraphAlignment as CommonParagraphAlignment,
272
+ TableAlignment as CommonTableAlignment,
273
+ RowJustification,
274
+ TextVerticalAlignment,
275
+ TabAlignment,
276
+ PositionAnchor,
277
+ HorizontalAnchor,
278
+ VerticalAnchor,
279
+ TextDirection,
280
+ SectionTextDirection,
281
+ WidthType,
282
+ ShadingConfig,
283
+ buildShadingAttributes,
284
+ TabLeader,
285
+ TabStop,
286
+ isShadingPattern,
287
+ isBorderStyle,
288
+ isHorizontalAlignment,
289
+ isVerticalAlignment,
290
+ isParagraphAlignment,
291
+ isWidthType,
292
+ DEFAULT_BORDER,
293
+ NO_BORDER,
294
+ } from './elements/CommonTypes';
295
+ export {
296
+ ListCategory,
297
+ NumberFormat as ListNumberFormat,
298
+ BulletFormat,
299
+ ListDetectionResult,
300
+ ListAnalysis,
301
+ ListNormalizationOptions,
302
+ ListNormalizationReport,
303
+ IndentationLevel,
304
+ } from './types/list-types';
305
+
306
+ export { CompatibilityMode, CompatibilityInfo, CompatSetting } from './types/compatibility-types';
307
+
308
+ export {
309
+ DocumentProtection,
310
+ RevisionViewSettings,
311
+ TrackChangesSettings,
312
+ WebSettingsInfo,
313
+ } from './types/settings-types';
314
+
315
+ // =============================================================================
316
+ // TYPES — Compatibility Upgrade
317
+ // =============================================================================
318
+
319
+ export { CompatibilityUpgrader, UpgradeReport } from './utils/CompatibilityUpgrader';
320
+ export {
321
+ LEGACY_COMPAT_ELEMENTS,
322
+ LEGACY_COMPAT_ELEMENT_NAMES,
323
+ MODERN_COMPAT_SETTINGS,
324
+ MS_WORD_COMPAT_URI,
325
+ } from './constants/legacyCompatFlags';
326
+
327
+ // =============================================================================
328
+ // UTILITIES — Unit Conversions
329
+ // =============================================================================
330
+
331
+ export {
332
+ STANDARD_DPI,
333
+ UNITS,
334
+ PAGE_SIZES,
335
+ COMMON_MARGINS,
336
+ twipsToPoints,
337
+ twipsToInches,
338
+ twipsToCm,
339
+ twipsToEmus,
340
+ emusToTwips,
341
+ emusToInches,
342
+ emusToCm,
343
+ emusToPoints,
344
+ emusToPixels,
345
+ pointsToTwips,
346
+ pointsToEmus,
347
+ pointsToInches,
348
+ pointsToCm,
349
+ pointsToHalfPoints,
350
+ halfPointsToPoints,
351
+ inchesToTwips,
352
+ inchesToEmus,
353
+ inchesToPoints,
354
+ inchesToCm,
355
+ inchesToPixels,
356
+ cmToTwips,
357
+ cmToEmus,
358
+ cmToInches,
359
+ cmToPoints,
360
+ cmToPixels,
361
+ pixelsToEmus,
362
+ pixelsToInches,
363
+ pixelsToTwips,
364
+ pixelsToCm,
365
+ pixelsToPoints,
366
+ } from './utils/units';
367
+
368
+ // =============================================================================
369
+ // UTILITIES — Validation, Corruption Detection, Error Handling
370
+ // =============================================================================
371
+
372
+ export {
373
+ validateDocxStructure,
374
+ isBinaryFile,
375
+ normalizePath,
376
+ isValidZipBuffer,
377
+ isTextContent,
378
+ validateTwips,
379
+ validateColor,
380
+ validateHexColor,
381
+ normalizeColor,
382
+ validateNumberingId,
383
+ validateLevel,
384
+ validateAlignment,
385
+ validateFontSize,
386
+ validateNonEmptyString,
387
+ validatePercentage,
388
+ validateEmus,
389
+ detectXmlInText,
390
+ cleanXmlFromText,
391
+ validateRunText,
392
+ TextValidationResult,
393
+ } from './utils/validation';
394
+ export {
395
+ detectCorruptionInDocument,
396
+ detectCorruptionInText,
397
+ suggestFix,
398
+ looksCorrupted,
399
+ CorruptionReport,
400
+ CorruptionLocation,
401
+ CorruptionType,
402
+ } from './utils/corruptionDetection';
403
+ export { isError, toError, wrapError, getErrorMessage } from './utils/errorHandling';
404
+ export {
405
+ REVISION_RULES,
406
+ ValidationSeverity,
407
+ ValidationIssue,
408
+ ValidationRule,
409
+ ValidationOptions,
410
+ AutoFixOptions,
411
+ ValidationResult as RevisionValidationResult,
412
+ FixAction,
413
+ AutoFixResult,
414
+ createIssueFromRule,
415
+ getRuleByCode,
416
+ getRulesBySeverity,
417
+ getAutoFixableRules,
418
+ RevisionValidator,
419
+ RevisionAutoFixer,
420
+ } from './validation';
421
+
422
+ // =============================================================================
423
+ // UTILITIES — Formatting, Parsing, Sanitization
424
+ // =============================================================================
425
+
426
+ export {
427
+ mergeFormatting,
428
+ cloneFormatting,
429
+ hasFormatting,
430
+ cleanFormatting,
431
+ isEqualFormatting,
432
+ applyDefaults,
433
+ } from './utils/formatting';
434
+ export {
435
+ safeParseInt,
436
+ parseOoxmlBoolean,
437
+ isExplicitlySet,
438
+ parseNumericAttribute,
439
+ parseOnOffAttribute,
440
+ } from './utils/parsingHelpers';
441
+ export {
442
+ removeInvalidXmlChars,
443
+ findInvalidXmlChars,
444
+ hasInvalidXmlChars,
445
+ XML_CONTROL_CHARS,
446
+ } from './utils/xmlSanitization';
447
+
448
+ // =============================================================================
449
+ // UTILITIES — List Detection (kept for basic detection; normalization moved to consumer)
450
+ // =============================================================================
451
+
452
+ export {
453
+ detectTypedPrefix,
454
+ detectListType,
455
+ inferLevelFromIndentation,
456
+ getParagraphIndentation,
457
+ validateListSequence,
458
+ getListCategoryFromFormat,
459
+ getLevelFromFormat,
460
+ TYPED_LIST_PATTERNS,
461
+ PATTERN_TO_CATEGORY,
462
+ FORMAT_TO_LEVEL,
463
+ } from './utils/list-detection';
464
+
465
+ // =============================================================================
466
+ // UTILITIES — Logging
467
+ // =============================================================================
468
+
469
+ export {
470
+ ILogger,
471
+ LogLevel,
472
+ LogEntry,
473
+ ConsoleLogger,
474
+ SilentLogger,
475
+ CollectingLogger,
476
+ defaultLogger,
477
+ createScopedLogger,
478
+ createComponentLogger,
479
+ getGlobalLogger,
480
+ setGlobalLogger,
481
+ resetGlobalLogger,
482
+ } from './utils/logger';
483
+
484
+ // =============================================================================
485
+ // UTILITIES — Revision Walker
486
+ // =============================================================================
487
+
488
+ export { RevisionWalker, RevisionWalkerOptions } from './utils/RevisionWalker';
489
+ export { resolveCellShading } from './utils/ShadingResolver';
490
+ export { decodeCnfStyle, getActiveConditionalsInPriorityOrder } from './utils/cnfStyleDecoder';
491
+
492
+ // =============================================================================
493
+ // UTILITIES — Cleanup
494
+ // =============================================================================
495
+
496
+ export { CleanupHelper, CleanupOptions, CleanupReport } from './helpers/CleanupHelper';
497
+
498
+ // =============================================================================
499
+ // INTERNAL ZIP Handling (advanced usage)
500
+ // =============================================================================
501
+
502
+ export { ZipHandler } from './zip/ZipHandler';
503
+ export { ZipReader } from './zip/ZipReader';
504
+ export { ZipWriter } from './zip/ZipWriter';
505
+ export {
506
+ ZipFile,
507
+ FileMap,
508
+ LoadOptions,
509
+ SaveOptions,
510
+ AddFileOptions,
511
+ SizeLimitOptions,
512
+ DEFAULT_SIZE_LIMITS,
513
+ REQUIRED_DOCX_FILES,
514
+ DOCX_PATHS,
515
+ } from './zip/types';
516
+ export {
517
+ DocxError,
518
+ DocxNotFoundError,
519
+ InvalidDocxError,
520
+ CorruptedArchiveError,
521
+ MissingRequiredFileError,
522
+ FileOperationError,
523
+ } from './zip/errors';
524
+
525
+ // =============================================================================
526
+ // INTERNAL — XML Builder and Parser (advanced usage)
527
+ // =============================================================================
528
+
529
+ export { XMLBuilder, XMLElement } from './xml/XMLBuilder';
530
+ export {
531
+ XMLParser,
532
+ ParseToObjectOptions,
533
+ ParsedXMLValue,
534
+ ParsedXMLObject,
535
+ DEFAULT_MAX_NESTING_DEPTH,
536
+ } from './xml/XMLParser';
537
+
538
+ // =============================================================================
539
+ // INTERNAL — Parser, Generator, Validator (advanced usage)
540
+ // =============================================================================
541
+
542
+ export { Relationship, RelationshipType, RelationshipProperties } from './core/Relationship';
543
+ export { RelationshipManager } from './core/RelationshipManager';
544
+ export { DocumentParser, ParseError } from './core/DocumentParser';
545
+ export { DocumentGenerator, IZipHandlerReader } from './core/DocumentGenerator';
546
+ export { DocumentValidator, SizeEstimate, MemoryOptions } from './core/DocumentValidator';
547
+ export { DocumentIdManager } from './core/DocumentIdManager';
548
+
549
+ // =============================================================================
550
+ // INTERNAL — Document Subsystem Classes (advanced usage)
551
+ // =============================================================================
552
+
553
+ export { DocumentContent, BodyElement } from './core/DocumentContent';
554
+
555
+ // =============================================================================
556
+ // INTERNAL — Constants
557
+ // =============================================================================
558
+
559
+ export { LIMITS } from './constants/limits';