@eigenpal/docx-editor-core 0.0.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 (419) hide show
  1. package/LICENSE +204 -0
  2. package/README.md +54 -0
  3. package/dist/ImageExtension-BN327PNe.d.mts +38 -0
  4. package/dist/ImageExtension-BlI5afZD.d.ts +38 -0
  5. package/dist/Subscribable-DOz6Ohoo.d.mts +33 -0
  6. package/dist/Subscribable-DOz6Ohoo.d.ts +33 -0
  7. package/dist/agent/index.d.mts +169 -0
  8. package/dist/agent/index.d.ts +169 -0
  9. package/dist/agent/index.js +1 -0
  10. package/dist/agent/index.mjs +1 -0
  11. package/dist/borders-BH_GoYU3.d.mts +58 -0
  12. package/dist/borders-Z9hPno2u.d.ts +58 -0
  13. package/dist/chunk-23CP3TOP.js +1 -0
  14. package/dist/chunk-2KHWHVTA.js +1 -0
  15. package/dist/chunk-36VIYQHD.mjs +9 -0
  16. package/dist/chunk-3COGZG7O.mjs +1 -0
  17. package/dist/chunk-3NRMSZX2.mjs +1 -0
  18. package/dist/chunk-3SXJPJSV.mjs +1 -0
  19. package/dist/chunk-44RUAQA2.js +1 -0
  20. package/dist/chunk-4AJYHCPB.js +2 -0
  21. package/dist/chunk-4BFNWPKW.js +1 -0
  22. package/dist/chunk-4EHBV73E.mjs +59 -0
  23. package/dist/chunk-4G6AJ4ZM.js +1 -0
  24. package/dist/chunk-4GER4JLW.js +1 -0
  25. package/dist/chunk-4Q2IP5FW.js +1 -0
  26. package/dist/chunk-5N5DBQJV.mjs +1 -0
  27. package/dist/chunk-62NPHRTF.js +1 -0
  28. package/dist/chunk-67LVRQIR.mjs +1 -0
  29. package/dist/chunk-6ILFFGGS.js +2 -0
  30. package/dist/chunk-6LOYA7G5.mjs +2 -0
  31. package/dist/chunk-6LVPRTB6.js +1 -0
  32. package/dist/chunk-6NQSIC27.mjs +1 -0
  33. package/dist/chunk-6VUYFDHY.mjs +1 -0
  34. package/dist/chunk-7E5VBRDL.mjs +1 -0
  35. package/dist/chunk-7GHQ4YCJ.mjs +1 -0
  36. package/dist/chunk-7RDCZLTU.js +1 -0
  37. package/dist/chunk-7VCMJCBY.js +2 -0
  38. package/dist/chunk-AAPBAMD7.js +1 -0
  39. package/dist/chunk-AMENZY5F.mjs +1 -0
  40. package/dist/chunk-ARHPXIBJ.mjs +1 -0
  41. package/dist/chunk-BGC7QKP5.mjs +1 -0
  42. package/dist/chunk-BGY3CB37.mjs +1 -0
  43. package/dist/chunk-BHBOAP6Z.js +3 -0
  44. package/dist/chunk-BWHUD2XC.mjs +4 -0
  45. package/dist/chunk-CCWOLPZE.js +3 -0
  46. package/dist/chunk-CGJ6S3AH.mjs +1 -0
  47. package/dist/chunk-CKKO4JWE.mjs +1 -0
  48. package/dist/chunk-CKXAHSJQ.js +10 -0
  49. package/dist/chunk-CP5OSG5Z.mjs +1 -0
  50. package/dist/chunk-CUY2THAO.mjs +1 -0
  51. package/dist/chunk-CWAP26GB.js +4 -0
  52. package/dist/chunk-D4RPOJC7.js +1 -0
  53. package/dist/chunk-D6GO7UGD.mjs +1 -0
  54. package/dist/chunk-DC7S76ZX.js +1 -0
  55. package/dist/chunk-DFZTUQ7O.js +2 -0
  56. package/dist/chunk-DROCYKAR.js +1 -0
  57. package/dist/chunk-DWFWYHM5.mjs +1 -0
  58. package/dist/chunk-DY2MJCSV.js +1 -0
  59. package/dist/chunk-ESI4BSBF.js +1 -0
  60. package/dist/chunk-FC6QL3E6.js +1 -0
  61. package/dist/chunk-FWTP7BN7.mjs +4 -0
  62. package/dist/chunk-G6Y4UZMJ.mjs +1 -0
  63. package/dist/chunk-GGPKPXON.js +1 -0
  64. package/dist/chunk-GXW7YSFL.mjs +1 -0
  65. package/dist/chunk-I6PMX4BO.js +1 -0
  66. package/dist/chunk-IBNUQL57.mjs +2 -0
  67. package/dist/chunk-ILJUDEZ5.mjs +1 -0
  68. package/dist/chunk-IP2VXNWG.js +1 -0
  69. package/dist/chunk-J7ULKGU2.mjs +10 -0
  70. package/dist/chunk-JFZIXFRC.js +1 -0
  71. package/dist/chunk-JHZ3HLSR.mjs +1 -0
  72. package/dist/chunk-JKVXID22.mjs +1 -0
  73. package/dist/chunk-JY5EFI4D.js +1 -0
  74. package/dist/chunk-KBU6QQFU.js +9 -0
  75. package/dist/chunk-KESNGXGO.js +1 -0
  76. package/dist/chunk-KQTB5Y7P.mjs +1 -0
  77. package/dist/chunk-LBKMYD3M.mjs +1 -0
  78. package/dist/chunk-LMF2ELOB.js +1 -0
  79. package/dist/chunk-LVD6HXRF.mjs +2 -0
  80. package/dist/chunk-MJ5FQX7Q.js +1 -0
  81. package/dist/chunk-MOKKS75W.mjs +3 -0
  82. package/dist/chunk-MVZOTKNL.mjs +1 -0
  83. package/dist/chunk-MZ7LW5CH.js +1 -0
  84. package/dist/chunk-MZOVDLYL.js +1 -0
  85. package/dist/chunk-N27FJQTG.js +1 -0
  86. package/dist/chunk-N3Y5BUKV.js +1 -0
  87. package/dist/chunk-NBLJPT54.mjs +1 -0
  88. package/dist/chunk-NERY274X.js +1 -0
  89. package/dist/chunk-NNQWQOC5.mjs +1 -0
  90. package/dist/chunk-NXLJVVVE.js +1 -0
  91. package/dist/chunk-O5X22KZ6.mjs +1 -0
  92. package/dist/chunk-OBMN4VSM.mjs +1 -0
  93. package/dist/chunk-OCAX2KJQ.js +4 -0
  94. package/dist/chunk-OZMNIX6U.mjs +1 -0
  95. package/dist/chunk-PRRM64JO.mjs +1 -0
  96. package/dist/chunk-Q4CKLXWA.js +1 -0
  97. package/dist/chunk-Q5QOBZWT.mjs +1 -0
  98. package/dist/chunk-QPFJJPIC.mjs +1 -0
  99. package/dist/chunk-QYUPLKLP.mjs +1 -0
  100. package/dist/chunk-RNOXNNSD.mjs +0 -0
  101. package/dist/chunk-RPIQG46O.mjs +1 -0
  102. package/dist/chunk-S7IKPRC3.js +9 -0
  103. package/dist/chunk-SUXJX72X.js +1 -0
  104. package/dist/chunk-SYJAAHUK.js +1 -0
  105. package/dist/chunk-T4CPTPRP.js +1 -0
  106. package/dist/chunk-TE2AF7FM.js +1 -0
  107. package/dist/chunk-TE2VQJZG.js +1 -0
  108. package/dist/chunk-TRJWRZZD.js +1 -0
  109. package/dist/chunk-U4UCHBZ7.js +1 -0
  110. package/dist/chunk-UDPROEUK.js +1 -0
  111. package/dist/chunk-UIROUI5I.mjs +1 -0
  112. package/dist/chunk-UOFQYE2L.mjs +1 -0
  113. package/dist/chunk-UQ6WNWXX.js +1 -0
  114. package/dist/chunk-V7BKPX67.mjs +2 -0
  115. package/dist/chunk-VKTCTMIO.mjs +2 -0
  116. package/dist/chunk-VQWZHPWI.mjs +1 -0
  117. package/dist/chunk-VW22RZ6C.mjs +1 -0
  118. package/dist/chunk-WLKRUBY4.js +1 -0
  119. package/dist/chunk-WLQEPVDR.js +1 -0
  120. package/dist/chunk-WNTT4MGC.js +59 -0
  121. package/dist/chunk-WTFLNYAT.mjs +1 -0
  122. package/dist/chunk-XXU7YQVV.js +1 -0
  123. package/dist/chunk-Y5HZAMND.mjs +9 -0
  124. package/dist/chunk-Y74ANBPV.js +1 -0
  125. package/dist/chunk-Y7JZPBBW.js +1 -0
  126. package/dist/chunk-YGHHSCPR.js +2 -0
  127. package/dist/chunk-YMZ3F2FZ.mjs +1 -0
  128. package/dist/chunk-YUKBAAB5.mjs +1 -0
  129. package/dist/chunk-ZRZ2VRQQ.mjs +1 -0
  130. package/dist/chunk-ZYESB4KC.mjs +3 -0
  131. package/dist/colorResolver-C3q7MLLD.d.mts +390 -0
  132. package/dist/colorResolver-CVsPLsw1.d.ts +390 -0
  133. package/dist/colors-C3vA7HUU.d.mts +70 -0
  134. package/dist/colors-C3vA7HUU.d.ts +70 -0
  135. package/dist/core-plugins.d.mts +64 -0
  136. package/dist/core-plugins.d.ts +64 -0
  137. package/dist/core-plugins.js +1 -0
  138. package/dist/core-plugins.mjs +1 -0
  139. package/dist/core.d.mts +399 -0
  140. package/dist/core.d.ts +399 -0
  141. package/dist/core.js +1 -0
  142. package/dist/core.mjs +1 -0
  143. package/dist/documentSerializer-C1ueey5d.d.mts +36 -0
  144. package/dist/documentSerializer-Chn7J1WG.d.ts +36 -0
  145. package/dist/docx/index.d.mts +1124 -0
  146. package/dist/docx/index.d.ts +1124 -0
  147. package/dist/docx/index.js +1 -0
  148. package/dist/docx/index.mjs +1 -0
  149. package/dist/docx/parser.d.mts +109 -0
  150. package/dist/docx/parser.d.ts +109 -0
  151. package/dist/docx/parser.js +1 -0
  152. package/dist/docx/parser.mjs +1 -0
  153. package/dist/docx/rezip.d.mts +313 -0
  154. package/dist/docx/rezip.d.ts +313 -0
  155. package/dist/docx/rezip.js +1 -0
  156. package/dist/docx/rezip.mjs +1 -0
  157. package/dist/docx/serializer/index.d.mts +126 -0
  158. package/dist/docx/serializer/index.d.ts +126 -0
  159. package/dist/docx/serializer/index.js +1 -0
  160. package/dist/docx/serializer/index.mjs +1 -0
  161. package/dist/docx/wrapTypes.d.mts +19 -0
  162. package/dist/docx/wrapTypes.d.ts +19 -0
  163. package/dist/docx/wrapTypes.js +1 -0
  164. package/dist/docx/wrapTypes.mjs +1 -0
  165. package/dist/docxInput-DTbCa48g.d.mts +21 -0
  166. package/dist/docxInput-DTbCa48g.d.ts +21 -0
  167. package/dist/executor-DZAMMQ35.js +1 -0
  168. package/dist/executor-ZCJRLT3Z.mjs +1 -0
  169. package/dist/findParagraphByParaId-Maw_8M5D.d.mts +28 -0
  170. package/dist/findParagraphByParaId-Maw_8M5D.d.ts +28 -0
  171. package/dist/fontLoader-BOt95Jtf.d.mts +223 -0
  172. package/dist/fontLoader-QPwbcX5j.d.ts +223 -0
  173. package/dist/footnotes-lCH_P3N3.d.mts +78 -0
  174. package/dist/footnotes-skVvEHvZ.d.ts +78 -0
  175. package/dist/formatting-BwpZWdGi.d.ts +410 -0
  176. package/dist/formatting-D9I-lFS4.d.mts +410 -0
  177. package/dist/headerFooterLayout-B3QVg556.d.ts +201 -0
  178. package/dist/headerFooterLayout-DkclHZ0Z.d.mts +201 -0
  179. package/dist/headless.d.mts +110 -0
  180. package/dist/headless.d.ts +110 -0
  181. package/dist/headless.js +1 -0
  182. package/dist/headless.mjs +1 -0
  183. package/dist/layout-bridge/clickToPositionDom.d.mts +56 -0
  184. package/dist/layout-bridge/clickToPositionDom.d.ts +56 -0
  185. package/dist/layout-bridge/clickToPositionDom.js +1 -0
  186. package/dist/layout-bridge/clickToPositionDom.mjs +1 -0
  187. package/dist/layout-bridge/index.d.mts +462 -0
  188. package/dist/layout-bridge/index.d.ts +462 -0
  189. package/dist/layout-bridge/index.js +1 -0
  190. package/dist/layout-bridge/index.mjs +1 -0
  191. package/dist/layout-bridge/measuring/index.d.mts +320 -0
  192. package/dist/layout-bridge/measuring/index.d.ts +320 -0
  193. package/dist/layout-bridge/measuring/index.js +1 -0
  194. package/dist/layout-bridge/measuring/index.mjs +1 -0
  195. package/dist/layout-bridge/tableInsertHover.d.mts +45 -0
  196. package/dist/layout-bridge/tableInsertHover.d.ts +45 -0
  197. package/dist/layout-bridge/tableInsertHover.js +1 -0
  198. package/dist/layout-bridge/tableInsertHover.mjs +1 -0
  199. package/dist/layout-bridge/toFlowBlocks.d.mts +122 -0
  200. package/dist/layout-bridge/toFlowBlocks.d.ts +122 -0
  201. package/dist/layout-bridge/toFlowBlocks.js +1 -0
  202. package/dist/layout-bridge/toFlowBlocks.mjs +1 -0
  203. package/dist/layout-engine/index.d.mts +322 -0
  204. package/dist/layout-engine/index.d.ts +322 -0
  205. package/dist/layout-engine/index.js +1 -0
  206. package/dist/layout-engine/index.mjs +1 -0
  207. package/dist/layout-engine/types.d.mts +903 -0
  208. package/dist/layout-engine/types.d.ts +903 -0
  209. package/dist/layout-engine/types.js +1 -0
  210. package/dist/layout-engine/types.mjs +1 -0
  211. package/dist/layout-painter/index.d.mts +23 -0
  212. package/dist/layout-painter/index.d.ts +23 -0
  213. package/dist/layout-painter/index.js +1 -0
  214. package/dist/layout-painter/index.mjs +1 -0
  215. package/dist/layout-painter/renderPage.d.mts +674 -0
  216. package/dist/layout-painter/renderPage.d.ts +674 -0
  217. package/dist/layout-painter/renderPage.js +1 -0
  218. package/dist/layout-painter/renderPage.mjs +1 -0
  219. package/dist/lists-CdiIk_c1.d.ts +142 -0
  220. package/dist/lists-JDB80qyP.d.mts +142 -0
  221. package/dist/managers/AutoSaveManager.d.mts +96 -0
  222. package/dist/managers/AutoSaveManager.d.ts +96 -0
  223. package/dist/managers/AutoSaveManager.js +1 -0
  224. package/dist/managers/AutoSaveManager.mjs +1 -0
  225. package/dist/managers/TableSelectionManager.d.mts +95 -0
  226. package/dist/managers/TableSelectionManager.d.ts +95 -0
  227. package/dist/managers/TableSelectionManager.js +1 -0
  228. package/dist/managers/TableSelectionManager.mjs +1 -0
  229. package/dist/managers/types.d.mts +122 -0
  230. package/dist/managers/types.d.ts +122 -0
  231. package/dist/managers/types.js +1 -0
  232. package/dist/managers/types.mjs +0 -0
  233. package/dist/marks-BujVxYP4.d.ts +56 -0
  234. package/dist/marks-CCPVlQzL.d.mts +56 -0
  235. package/dist/mcp-cli.mjs +137 -0
  236. package/dist/mcp.d.mts +184 -0
  237. package/dist/mcp.d.ts +184 -0
  238. package/dist/mcp.js +16 -0
  239. package/dist/mcp.mjs +16 -0
  240. package/dist/nodes-BXi1Uu3e.d.mts +257 -0
  241. package/dist/nodes-DfKj9kUA.d.ts +257 -0
  242. package/dist/plugin-api/RenderedDomContext.d.mts +74 -0
  243. package/dist/plugin-api/RenderedDomContext.d.ts +74 -0
  244. package/dist/plugin-api/RenderedDomContext.js +1 -0
  245. package/dist/plugin-api/RenderedDomContext.mjs +1 -0
  246. package/dist/plugin-api/index.d.mts +15 -0
  247. package/dist/plugin-api/index.d.ts +15 -0
  248. package/dist/plugin-api/index.js +1 -0
  249. package/dist/plugin-api/index.mjs +0 -0
  250. package/dist/plugin-api/resolveItemPositions.d.mts +54 -0
  251. package/dist/plugin-api/resolveItemPositions.d.ts +54 -0
  252. package/dist/plugin-api/resolveItemPositions.js +1 -0
  253. package/dist/plugin-api/resolveItemPositions.mjs +1 -0
  254. package/dist/plugin-api/types.d.mts +190 -0
  255. package/dist/plugin-api/types.d.ts +190 -0
  256. package/dist/plugin-api/types.js +1 -0
  257. package/dist/plugin-api/types.mjs +0 -0
  258. package/dist/processTemplate-GPFDLQMX.mjs +1 -0
  259. package/dist/processTemplate-HH2E3HBO.js +1 -0
  260. package/dist/prosemirror/commands/formatting.d.mts +100 -0
  261. package/dist/prosemirror/commands/formatting.d.ts +100 -0
  262. package/dist/prosemirror/commands/formatting.js +1 -0
  263. package/dist/prosemirror/commands/formatting.mjs +1 -0
  264. package/dist/prosemirror/commands/index.d.mts +114 -0
  265. package/dist/prosemirror/commands/index.d.ts +114 -0
  266. package/dist/prosemirror/commands/index.js +1 -0
  267. package/dist/prosemirror/commands/index.mjs +1 -0
  268. package/dist/prosemirror/commands/pageBreak.d.mts +20 -0
  269. package/dist/prosemirror/commands/pageBreak.d.ts +20 -0
  270. package/dist/prosemirror/commands/pageBreak.js +1 -0
  271. package/dist/prosemirror/commands/pageBreak.mjs +1 -0
  272. package/dist/prosemirror/commands/paragraph.d.mts +70 -0
  273. package/dist/prosemirror/commands/paragraph.d.ts +70 -0
  274. package/dist/prosemirror/commands/paragraph.js +1 -0
  275. package/dist/prosemirror/commands/paragraph.mjs +1 -0
  276. package/dist/prosemirror/conversion/fromProseDoc.d.mts +66 -0
  277. package/dist/prosemirror/conversion/fromProseDoc.d.ts +66 -0
  278. package/dist/prosemirror/conversion/fromProseDoc.js +1 -0
  279. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -0
  280. package/dist/prosemirror/conversion/index.d.mts +78 -0
  281. package/dist/prosemirror/conversion/index.d.ts +78 -0
  282. package/dist/prosemirror/conversion/index.js +1 -0
  283. package/dist/prosemirror/conversion/index.mjs +1 -0
  284. package/dist/prosemirror/editor.css +763 -0
  285. package/dist/prosemirror/extensions/index.d.mts +79 -0
  286. package/dist/prosemirror/extensions/index.d.ts +79 -0
  287. package/dist/prosemirror/extensions/index.js +1 -0
  288. package/dist/prosemirror/extensions/index.mjs +1 -0
  289. package/dist/prosemirror/extensions/nodes/TableExtension.d.mts +30 -0
  290. package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +30 -0
  291. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -0
  292. package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -0
  293. package/dist/prosemirror/index.d.mts +71 -0
  294. package/dist/prosemirror/index.d.ts +71 -0
  295. package/dist/prosemirror/index.js +1 -0
  296. package/dist/prosemirror/index.mjs +1 -0
  297. package/dist/prosemirror/plugins/index.d.mts +50 -0
  298. package/dist/prosemirror/plugins/index.d.ts +50 -0
  299. package/dist/prosemirror/plugins/index.js +1 -0
  300. package/dist/prosemirror/plugins/index.mjs +1 -0
  301. package/dist/prosemirror/plugins/selectionTracker.d.mts +78 -0
  302. package/dist/prosemirror/plugins/selectionTracker.d.ts +78 -0
  303. package/dist/prosemirror/plugins/selectionTracker.js +1 -0
  304. package/dist/prosemirror/plugins/selectionTracker.mjs +1 -0
  305. package/dist/prosemirror/schema/index.d.mts +30 -0
  306. package/dist/prosemirror/schema/index.d.ts +30 -0
  307. package/dist/prosemirror/schema/index.js +1 -0
  308. package/dist/prosemirror/schema/index.mjs +1 -0
  309. package/dist/prosemirror/styles/index.d.mts +124 -0
  310. package/dist/prosemirror/styles/index.d.ts +124 -0
  311. package/dist/prosemirror/styles/index.js +1 -0
  312. package/dist/prosemirror/styles/index.mjs +1 -0
  313. package/dist/prosemirror/template/prosemirror-plugin.d.mts +66 -0
  314. package/dist/prosemirror/template/prosemirror-plugin.d.ts +66 -0
  315. package/dist/prosemirror/template/prosemirror-plugin.js +15 -0
  316. package/dist/prosemirror/template/prosemirror-plugin.mjs +15 -0
  317. package/dist/prosemirror/utils/ClickPositionResolver.d.mts +109 -0
  318. package/dist/prosemirror/utils/ClickPositionResolver.d.ts +109 -0
  319. package/dist/prosemirror/utils/ClickPositionResolver.js +1 -0
  320. package/dist/prosemirror/utils/ClickPositionResolver.mjs +1 -0
  321. package/dist/prosemirror/utils/LayoutSelectionGate.d.mts +81 -0
  322. package/dist/prosemirror/utils/LayoutSelectionGate.d.ts +81 -0
  323. package/dist/prosemirror/utils/LayoutSelectionGate.js +1 -0
  324. package/dist/prosemirror/utils/LayoutSelectionGate.mjs +1 -0
  325. package/dist/prosemirror/utils/PointerEventHandler.d.mts +94 -0
  326. package/dist/prosemirror/utils/PointerEventHandler.d.ts +94 -0
  327. package/dist/prosemirror/utils/PointerEventHandler.js +1 -0
  328. package/dist/prosemirror/utils/PointerEventHandler.mjs +1 -0
  329. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +63 -0
  330. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +63 -0
  331. package/dist/prosemirror/utils/extractTrackedChanges.js +1 -0
  332. package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -0
  333. package/dist/prosemirror/utils/visualLineNavigation.d.mts +45 -0
  334. package/dist/prosemirror/utils/visualLineNavigation.d.ts +45 -0
  335. package/dist/prosemirror/utils/visualLineNavigation.js +1 -0
  336. package/dist/prosemirror/utils/visualLineNavigation.mjs +1 -0
  337. package/dist/registry-Cpyybgij.d.mts +165 -0
  338. package/dist/registry-E5pahPKL.d.ts +165 -0
  339. package/dist/selectionContext-85CE0f7a.d.ts +570 -0
  340. package/dist/selectionContext-Xq3AY7pn.d.mts +570 -0
  341. package/dist/selectiveSave-CWaPEv0B.d.ts +31 -0
  342. package/dist/selectiveSave-jinP_4xa.d.mts +31 -0
  343. package/dist/selectiveXmlPatch-ypkxlTD_.d.mts +23 -0
  344. package/dist/selectiveXmlPatch-ypkxlTD_.d.ts +23 -0
  345. package/dist/styles-BBoqh07F.d.mts +233 -0
  346. package/dist/styles-jqO45PSq.d.ts +233 -0
  347. package/dist/table-P8esKWAc.d.ts +82 -0
  348. package/dist/table-_t_W8oQf.d.mts +82 -0
  349. package/dist/types/agentApi.d.mts +467 -0
  350. package/dist/types/agentApi.d.ts +467 -0
  351. package/dist/types/agentApi.js +1 -0
  352. package/dist/types/agentApi.mjs +1 -0
  353. package/dist/types/content.d.mts +1181 -0
  354. package/dist/types/content.d.ts +1181 -0
  355. package/dist/types/content.js +1 -0
  356. package/dist/types/content.mjs +0 -0
  357. package/dist/types/document.d.mts +106 -0
  358. package/dist/types/document.d.ts +106 -0
  359. package/dist/types/document.js +1 -0
  360. package/dist/types/document.mjs +0 -0
  361. package/dist/types-DXG7vqe9.d.ts +311 -0
  362. package/dist/types-RchZmPFN.d.mts +137 -0
  363. package/dist/types-RchZmPFN.d.ts +137 -0
  364. package/dist/types-dYdjUZMo.d.mts +311 -0
  365. package/dist/utils/cardStyles.d.mts +31 -0
  366. package/dist/utils/cardStyles.d.ts +31 -0
  367. package/dist/utils/cardStyles.js +1 -0
  368. package/dist/utils/cardStyles.mjs +1 -0
  369. package/dist/utils/comments.d.mts +48 -0
  370. package/dist/utils/comments.d.ts +48 -0
  371. package/dist/utils/comments.js +1 -0
  372. package/dist/utils/comments.mjs +1 -0
  373. package/dist/utils/findReplace.d.mts +114 -0
  374. package/dist/utils/findReplace.d.ts +114 -0
  375. package/dist/utils/findReplace.js +2 -0
  376. package/dist/utils/findReplace.mjs +2 -0
  377. package/dist/utils/findVerticalScrollParent.d.mts +25 -0
  378. package/dist/utils/findVerticalScrollParent.d.ts +25 -0
  379. package/dist/utils/findVerticalScrollParent.js +1 -0
  380. package/dist/utils/findVerticalScrollParent.mjs +1 -0
  381. package/dist/utils/fontOptions.d.mts +21 -0
  382. package/dist/utils/fontOptions.d.ts +21 -0
  383. package/dist/utils/fontOptions.js +1 -0
  384. package/dist/utils/fontOptions.mjs +1 -0
  385. package/dist/utils/headingCollector.d.mts +32 -0
  386. package/dist/utils/headingCollector.d.ts +32 -0
  387. package/dist/utils/headingCollector.js +1 -0
  388. package/dist/utils/headingCollector.mjs +1 -0
  389. package/dist/utils/highlightColors.d.mts +14 -0
  390. package/dist/utils/highlightColors.d.ts +14 -0
  391. package/dist/utils/highlightColors.js +1 -0
  392. package/dist/utils/highlightColors.mjs +1 -0
  393. package/dist/utils/index.d.mts +711 -0
  394. package/dist/utils/index.d.ts +711 -0
  395. package/dist/utils/index.js +82 -0
  396. package/dist/utils/index.mjs +82 -0
  397. package/dist/utils/listState.d.mts +27 -0
  398. package/dist/utils/listState.d.ts +27 -0
  399. package/dist/utils/listState.js +1 -0
  400. package/dist/utils/listState.mjs +1 -0
  401. package/dist/utils/reportIssue.d.mts +23 -0
  402. package/dist/utils/reportIssue.d.ts +23 -0
  403. package/dist/utils/reportIssue.js +2 -0
  404. package/dist/utils/reportIssue.mjs +2 -0
  405. package/dist/utils/sidebarConstants.d.mts +10 -0
  406. package/dist/utils/sidebarConstants.d.ts +10 -0
  407. package/dist/utils/sidebarConstants.js +1 -0
  408. package/dist/utils/sidebarConstants.mjs +1 -0
  409. package/dist/utils/textSelection.d.mts +92 -0
  410. package/dist/utils/textSelection.d.ts +92 -0
  411. package/dist/utils/textSelection.js +1 -0
  412. package/dist/utils/textSelection.mjs +1 -0
  413. package/dist/utils/units.d.mts +91 -0
  414. package/dist/utils/units.d.ts +91 -0
  415. package/dist/utils/units.js +1 -0
  416. package/dist/utils/units.mjs +1 -0
  417. package/dist/variableDetector-CAdt8yOr.d.mts +115 -0
  418. package/dist/variableDetector-W4XEN9YC.d.ts +115 -0
  419. package/package.json +565 -0
@@ -0,0 +1,1124 @@
1
+ /**
2
+ * DOCX I/O
3
+ *
4
+ * Parsing DOCX archives into the `Document` model and re-zipping a
5
+ * model back into a DOCX file. Use `./docx/serializer` for the lower-level
6
+ * Document → XML transforms.
7
+ *
8
+ * The named exports below are the public API contract. Adding a parser
9
+ * helper to a source module does not automatically make it public — it
10
+ * must be added to this barrel to be reachable from
11
+ * `@eigenpal/docx-editor-core/docx`.
12
+ * @packageDocumentation
13
+ * @public
14
+ */
15
+ export { parseDocx } from './parser.mjs';
16
+ export { createDocx, default as repackDocx, updateMultipleFiles } from './rezip.mjs';
17
+ export { a as attemptSelectiveSave } from '../selectiveSave-jinP_4xa.mjs';
18
+ export { b as buildPatchedDocumentXml, v as validatePatchSafety } from '../selectiveXmlPatch-ypkxlTD_.mjs';
19
+ import { Image, Endnote, Footnote, EndnoteProperties, FootnoteProperties, Run, FieldType, Field, SimpleField, Hyperlink, Shape, Table, TableCell, Paragraph, TextBox, ImageSize, ImagePosition, ImageWrap, BlockContent, Comment } from '../types/content.mjs';
20
+ import { b as RelationshipMap, M as MediaFile, S as Style, T as Theme } from '../styles-BBoqh07F.mjs';
21
+ import { Element } from 'xml-js';
22
+ import { N as NumberingDefinitions, L as ListLevel, A as AbstractNumbering, d as NumberingInstance, c as NumberFormat } from '../lists-JDB80qyP.mjs';
23
+ import { e as TabStopAlignment, c as TabLeader, d as TabStop, C as CellMargins, F as FloatingTableProperties, f as TableBorders, i as TableLook, j as TableMeasurement, h as TableFormatting } from '../formatting-D9I-lFS4.mjs';
24
+ export { emuToPixels, pixelsToEmu } from '../utils/units.mjs';
25
+ import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.mjs';
26
+ import '../types/document.mjs';
27
+ import './wrapTypes.mjs';
28
+ import '../docxInput-DTbCa48g.mjs';
29
+ import 'jszip';
30
+
31
+ /**
32
+ * Image Parser - Parse embedded images from w:drawing elements
33
+ *
34
+ * DOCX images are contained in <w:drawing> elements with either:
35
+ * - wp:inline - Inline images that flow with text
36
+ * - wp:anchor - Floating/anchored images with text wrapping
37
+ *
38
+ * OOXML Structure:
39
+ * w:drawing
40
+ * ├── wp:inline or wp:anchor
41
+ * │ ├── wp:extent (size: cx, cy in EMUs)
42
+ * │ ├── wp:effectExtent (effect margins)
43
+ * │ ├── wp:docPr (document properties: id, name, descr, title)
44
+ * │ ├── wp:positionH / wp:positionV (for anchor only)
45
+ * │ ├── wp:wrap* (wrapping mode for anchor: wrapNone, wrapSquare, etc.)
46
+ * │ └── a:graphic
47
+ * │ └── a:graphicData
48
+ * │ └── pic:pic
49
+ * │ ├── pic:nvPicPr (non-visual properties)
50
+ * │ ├── pic:blipFill
51
+ * │ │ └── a:blip (r:embed = rId)
52
+ * │ └── pic:spPr
53
+ * │ └── a:xfrm (transform: rotation, flip)
54
+ *
55
+ * EMU (English Metric Units): 914400 EMU = 1 inch
56
+ * Conversion: pixels = (emu * 96) / 914400
57
+ */
58
+
59
+ /**
60
+ * Parse a w:drawing element
61
+ *
62
+ * The drawing element contains either wp:inline or wp:anchor.
63
+ *
64
+ * @param drawingEl - The w:drawing element
65
+ * @param rels - Relationship map for resolving rId
66
+ * @param media - Media files map
67
+ * @returns Parsed Image object or null if not an image
68
+ */
69
+ declare function parseDrawing(drawingEl: Element, rels: RelationshipMap | undefined, media: Map<string, MediaFile> | undefined): Image | null;
70
+ /**
71
+ * Parse an image from a w:drawing element
72
+ *
73
+ * This is the main entry point for image parsing.
74
+ *
75
+ * @param node - The w:drawing XML element
76
+ * @param rels - Relationship map for resolving rId
77
+ * @param media - Media files map
78
+ * @returns Parsed Image object or null if parsing fails
79
+ */
80
+ declare function parseImage(node: Element, rels: RelationshipMap | undefined, media: Map<string, MediaFile> | undefined): Image | null;
81
+ /**
82
+ * Check if an image is inline (not floating)
83
+ */
84
+ declare function isInlineImage(image: Image): boolean;
85
+ /**
86
+ * Check if an image is floating (anchored)
87
+ */
88
+ declare function isFloatingImage(image: Image): boolean;
89
+ /**
90
+ * Check if an image is behind text
91
+ */
92
+ declare function isBehindText(image: Image): boolean;
93
+ /**
94
+ * Check if an image is in front of text
95
+ */
96
+ declare function isInFrontOfText(image: Image): boolean;
97
+ /**
98
+ * Get image width in pixels
99
+ */
100
+ declare function getImageWidthPx(image: Image): number;
101
+ /**
102
+ * Get image height in pixels
103
+ */
104
+ declare function getImageHeightPx(image: Image): number;
105
+ /**
106
+ * Check if image is decorative (should be ignored by screen readers)
107
+ */
108
+ declare function isDecorativeImage(image: Image): boolean;
109
+ /**
110
+ * Get wrap distances in pixels
111
+ */
112
+ declare function getWrapDistancesPx(image: Image): {
113
+ top: number;
114
+ bottom: number;
115
+ left: number;
116
+ right: number;
117
+ };
118
+
119
+ /**
120
+ * Style Parser - Parse styles.xml with full inheritance resolution
121
+ *
122
+ * Parses all style types (paragraph, character, table, list) with
123
+ * complete basedOn inheritance chain resolution.
124
+ *
125
+ * OOXML Reference:
126
+ * - Style file is at: word/styles.xml
127
+ * - Uses WordprocessingML namespace (w:)
128
+ *
129
+ * Style Cascade (lowest to highest priority):
130
+ * 1. Document defaults (w:docDefaults)
131
+ * 2. Parent style properties (w:basedOn chain)
132
+ * 3. Current style properties
133
+ * 4. Direct formatting in document
134
+ *
135
+ * This file owns the style element itself, docDefaults, inheritance
136
+ * resolution, and the top-level entry points (parseStyles,
137
+ * parseStyleDefinitions, getResolved*). Property-level parsers live under
138
+ * ./styleParser/{runProperties,paragraphProperties,tableProperties}.ts.
139
+ */
140
+
141
+ /**
142
+ * Style map keyed by styleId
143
+ */
144
+ type StyleMap = Map<string, Style>;
145
+
146
+ /**
147
+ * Numbering/List Parser for DOCX
148
+ *
149
+ * Parses numbering.xml to extract:
150
+ * - Abstract numbering definitions (templates with levels)
151
+ * - Numbering instances (concrete references with optional overrides)
152
+ *
153
+ * OOXML Structure:
154
+ * - w:abstractNum - Template definitions with 9 levels (0-8)
155
+ * - w:num - Instances that reference abstractNum and can override levels
156
+ * - w:lvl - Level definition with start, format, text pattern, etc.
157
+ */
158
+
159
+ /**
160
+ * Map of rId to numbering definitions
161
+ */
162
+ type NumberingMap = {
163
+ definitions: NumberingDefinitions;
164
+ /** Get level info for a numId and ilvl */
165
+ getLevel: (numId: number, ilvl: number) => ListLevel | null;
166
+ /** Get abstract numbering by ID */
167
+ getAbstract: (abstractNumId: number) => AbstractNumbering | null;
168
+ /** Get the numbering instance (numId → abstractNumId + lvlOverrides) */
169
+ getInstance: (numId: number) => NumberingInstance | null;
170
+ /** Check if numId exists */
171
+ hasNumbering: (numId: number) => boolean;
172
+ };
173
+ /**
174
+ * Parse numbering.xml into NumberingDefinitions
175
+ *
176
+ * @param numberingXml - Raw XML string from word/numbering.xml (or null if not present)
177
+ * @returns NumberingMap with definitions and helper functions
178
+ */
179
+ declare function parseNumbering(numberingXml: string | null): NumberingMap;
180
+ /**
181
+ * Format a number according to the specified format
182
+ *
183
+ * @param num - The number to format
184
+ * @param format - The number format
185
+ * @returns Formatted string
186
+ */
187
+ declare function formatNumber(num: number, format: NumberFormat): string;
188
+ /**
189
+ * Render list marker text by replacing placeholders with formatted numbers
190
+ *
191
+ * @param lvlText - The level text pattern (e.g., "%1.", "%1.%2")
192
+ * @param counters - Array of counter values for each level (index 0 = level 0, etc.)
193
+ * @param formats - Array of number formats for each level
194
+ * @returns Rendered marker text
195
+ */
196
+ declare function renderListMarker(lvlText: string, counters: number[], formats: NumberFormat[]): string;
197
+ /**
198
+ * Get the bullet character for a bullet list level
199
+ *
200
+ * @param level - The list level definition
201
+ * @returns The bullet character to display
202
+ */
203
+ declare function getBulletCharacter(level: ListLevel): string;
204
+ /**
205
+ * Check if a list level is a bullet (not numbered)
206
+ */
207
+ declare function isBulletLevel(level: ListLevel): boolean;
208
+
209
+ /**
210
+ * Footnote/Endnote Parser - Parse footnotes.xml and endnotes.xml
211
+ *
212
+ * Footnotes and endnotes are stored in separate XML files within the DOCX package:
213
+ * - word/footnotes.xml - Contains all footnote definitions
214
+ * - word/endnotes.xml - Contains all endnote definitions
215
+ *
216
+ * Each note contains:
217
+ * - An ID that matches references in document.xml (w:footnoteReference, w:endnoteReference)
218
+ * - A type (normal, separator, continuationSeparator, continuationNotice)
219
+ * - Content (paragraphs)
220
+ *
221
+ * The references in the document body are parsed by runParser as NoteReferenceContent.
222
+ *
223
+ * OOXML Reference:
224
+ * - Footnote: w:footnote[@w:id][@w:type]
225
+ * - Endnote: w:endnote[@w:id][@w:type]
226
+ * - Content: w:p (paragraphs)
227
+ */
228
+
229
+ /**
230
+ * Footnote map returned by parseFootnotes
231
+ */
232
+ interface FootnoteMap {
233
+ /** All footnotes indexed by ID */
234
+ byId: Map<number, Footnote>;
235
+ /** Array of all footnotes in document order */
236
+ footnotes: Footnote[];
237
+ /** Get footnote by ID */
238
+ getFootnote(id: number): Footnote | undefined;
239
+ /** Check if footnote exists */
240
+ hasFootnote(id: number): boolean;
241
+ /** Get all normal (non-separator) footnotes */
242
+ getNormalFootnotes(): Footnote[];
243
+ /** Get separator footnote if exists */
244
+ getSeparator(): Footnote | undefined;
245
+ /** Get continuation separator if exists */
246
+ getContinuationSeparator(): Footnote | undefined;
247
+ }
248
+ /**
249
+ * Endnote map returned by parseEndnotes
250
+ */
251
+ interface EndnoteMap {
252
+ /** All endnotes indexed by ID */
253
+ byId: Map<number, Endnote>;
254
+ /** Array of all endnotes in document order */
255
+ endnotes: Endnote[];
256
+ /** Get endnote by ID */
257
+ getEndnote(id: number): Endnote | undefined;
258
+ /** Check if endnote exists */
259
+ hasEndnote(id: number): boolean;
260
+ /** Get all normal (non-separator) endnotes */
261
+ getNormalEndnotes(): Endnote[];
262
+ /** Get separator endnote if exists */
263
+ getSeparator(): Endnote | undefined;
264
+ /** Get continuation separator if exists */
265
+ getContinuationSeparator(): Endnote | undefined;
266
+ }
267
+ /**
268
+ * Parse footnotes.xml
269
+ *
270
+ * @param footnotesXml - The raw XML content of word/footnotes.xml
271
+ * @param styles - Parsed style map for applying styles
272
+ * @param theme - Parsed theme for color resolution
273
+ * @param numbering - Parsed numbering definitions for lists
274
+ * @param rels - Relationships for resolving hyperlinks
275
+ * @param media - Media files for images
276
+ * @returns FootnoteMap with all footnotes
277
+ */
278
+ declare function parseFootnotes(footnotesXml: string | null, styles?: StyleMap | null, theme?: Theme | null, numbering?: NumberingMap | null, rels?: RelationshipMap | null, media?: Map<string, MediaFile> | null): FootnoteMap;
279
+ /**
280
+ * Parse endnotes.xml
281
+ *
282
+ * @param endnotesXml - The raw XML content of word/endnotes.xml
283
+ * @param styles - Parsed style map for applying styles
284
+ * @param theme - Parsed theme for color resolution
285
+ * @param numbering - Parsed numbering definitions for lists
286
+ * @param rels - Relationships for resolving hyperlinks
287
+ * @param media - Media files for images
288
+ * @returns EndnoteMap with all endnotes
289
+ */
290
+ declare function parseEndnotes(endnotesXml: string | null, styles?: StyleMap | null, theme?: Theme | null, numbering?: NumberingMap | null, rels?: RelationshipMap | null, media?: Map<string, MediaFile> | null): EndnoteMap;
291
+ /**
292
+ * Parse footnote properties from w:footnotePr element
293
+ * (Can appear in w:sectPr or w:settings)
294
+ */
295
+ declare function parseFootnoteProperties(element: Element | null): FootnoteProperties;
296
+ /**
297
+ * Parse endnote properties from w:endnotePr element
298
+ * (Can appear in w:sectPr or w:settings)
299
+ */
300
+ declare function parseEndnoteProperties(element: Element | null): EndnoteProperties;
301
+ /**
302
+ * Get plain text content of a footnote
303
+ */
304
+ declare function getFootnoteText(footnote: Footnote): string;
305
+ /**
306
+ * Get plain text content of an endnote
307
+ */
308
+ declare function getEndnoteText(endnote: Endnote): string;
309
+ /**
310
+ * Check if a footnote is a separator (not regular content)
311
+ */
312
+ declare function isSeparatorFootnote(footnote: Footnote): boolean;
313
+ /**
314
+ * Check if an endnote is a separator (not regular content)
315
+ */
316
+ declare function isSeparatorEndnote(endnote: Endnote): boolean;
317
+
318
+ /**
319
+ * Field Parser - Parse field codes in DOCX documents
320
+ *
321
+ * OOXML supports two types of fields:
322
+ * 1. Simple fields (w:fldSimple) - Single element with instruction attribute
323
+ * 2. Complex fields (w:fldChar + w:instrText) - Multi-element spanning runs
324
+ *
325
+ * Fields provide dynamic content like:
326
+ * - Page numbers (PAGE, NUMPAGES)
327
+ * - Dates and times (DATE, TIME, CREATEDATE)
328
+ * - Document properties (AUTHOR, TITLE, FILENAME)
329
+ * - Cross-references (REF, PAGEREF, NOTEREF)
330
+ * - Tables of contents (TOC, INDEX)
331
+ * - Mail merge fields (MERGEFIELD)
332
+ *
333
+ * OOXML Reference:
334
+ * - Simple field: <w:fldSimple w:instr="FIELD INSTRUCTION">content</w:fldSimple>
335
+ * - Complex field:
336
+ * <w:r><w:fldChar w:fldCharType="begin"/></w:r>
337
+ * <w:r><w:instrText>FIELD INSTRUCTION</w:instrText></w:r>
338
+ * <w:r><w:fldChar w:fldCharType="separate"/></w:r>
339
+ * <w:r><w:t>display result</w:t></w:r>
340
+ * <w:r><w:fldChar w:fldCharType="end"/></w:r>
341
+ */
342
+
343
+ /**
344
+ * All known field types from OOXML specification
345
+ */
346
+ declare const KNOWN_FIELD_TYPES: FieldType[];
347
+ /**
348
+ * Parse field type from instruction string
349
+ *
350
+ * Field instructions follow the format: FIELDNAME [arguments] [switches]
351
+ * Examples:
352
+ * - "PAGE \\* MERGEFORMAT"
353
+ * - "DATE \\@ \"MMMM d, yyyy\""
354
+ * - "MERGEFIELD client_name \\* Upper"
355
+ * - "REF _Ref123456 \\h"
356
+ *
357
+ * @param instruction - The field instruction string
358
+ * @returns The detected field type
359
+ */
360
+ declare function parseFieldType(instruction: string): FieldType;
361
+ /**
362
+ * Check if a field type is a known type
363
+ *
364
+ * @param type - Field type string to check
365
+ * @returns true if it's a known field type
366
+ */
367
+ declare function isKnownFieldType(type: string): type is FieldType;
368
+ /**
369
+ * Parsed field instruction with arguments and switches
370
+ */
371
+ interface ParsedFieldInstruction {
372
+ /** Field type */
373
+ type: FieldType;
374
+ /** Raw instruction string */
375
+ raw: string;
376
+ /** Field argument (e.g., property name for DOCPROPERTY, bookmark name for REF) */
377
+ argument?: string;
378
+ /** Field switches (e.g., \* MERGEFORMAT, \@ "date format") */
379
+ switches: FieldSwitch[];
380
+ }
381
+ /**
382
+ * Field switch parsed from instruction
383
+ */
384
+ interface FieldSwitch {
385
+ /** Switch character (e.g., '*', '@', '#', 'h', 'p') */
386
+ switch: string;
387
+ /** Switch value if any */
388
+ value?: string;
389
+ }
390
+ /**
391
+ * Parse a complete field instruction into structured data
392
+ *
393
+ * @param instruction - Raw instruction string
394
+ * @returns Parsed instruction object
395
+ */
396
+ declare function parseFieldInstruction(instruction: string): ParsedFieldInstruction;
397
+ /**
398
+ * Get the format switch value (\* or \@)
399
+ *
400
+ * @param instruction - Parsed instruction
401
+ * @returns Format string or undefined
402
+ */
403
+ declare function getFormatSwitch(instruction: ParsedFieldInstruction): string | undefined;
404
+ /**
405
+ * Check if field has MERGEFORMAT switch (preserve formatting)
406
+ *
407
+ * @param instruction - Parsed instruction
408
+ * @returns true if MERGEFORMAT is present
409
+ */
410
+ declare function hasMergeFormat(instruction: ParsedFieldInstruction): boolean;
411
+ /**
412
+ * Parse a simple field element (w:fldSimple)
413
+ *
414
+ * @param node - The w:fldSimple XML element
415
+ * @param styles - Style definitions for parsing content runs
416
+ * @param theme - Theme for color/font resolution
417
+ * @returns Parsed SimpleField object
418
+ */
419
+ declare function parseSimpleField(node: Element, styles: StyleMap | null, theme: Theme | null): SimpleField;
420
+ /**
421
+ * State machine for tracking complex field parsing
422
+ */
423
+ type ComplexFieldState = 'outside' | 'code' | 'result';
424
+ /**
425
+ * Complex field parsing context
426
+ */
427
+ interface ComplexFieldContext {
428
+ /** Current state */
429
+ state: ComplexFieldState;
430
+ /** Accumulated instruction text */
431
+ instruction: string;
432
+ /** Runs in the field code section */
433
+ codeRuns: Run[];
434
+ /** Runs in the result section */
435
+ resultRuns: Run[];
436
+ /** Whether field is locked */
437
+ fldLock: boolean;
438
+ /** Whether field needs update */
439
+ dirty: boolean;
440
+ /** Nesting level (for nested fields) */
441
+ nestingLevel: number;
442
+ }
443
+ /**
444
+ * Create a new complex field context
445
+ */
446
+ declare function createComplexFieldContext(): ComplexFieldContext;
447
+ /**
448
+ * Get the current display value of a field
449
+ *
450
+ * @param field - The field (simple or complex)
451
+ * @returns The display text
452
+ */
453
+ declare function getFieldDisplayValue(field: Field): string;
454
+ /**
455
+ * Check if field represents a page number
456
+ *
457
+ * @param field - The field to check
458
+ * @returns true if this is a page number field
459
+ */
460
+ declare function isPageNumberField(field: Field): boolean;
461
+ /**
462
+ * Check if field represents total page count
463
+ *
464
+ * @param field - The field to check
465
+ * @returns true if this is a total pages field
466
+ */
467
+ declare function isTotalPagesField(field: Field): boolean;
468
+ /**
469
+ * Check if field is a date/time field
470
+ *
471
+ * @param field - The field to check
472
+ * @returns true if this is a date/time field
473
+ */
474
+ declare function isDateTimeField(field: Field): boolean;
475
+ /**
476
+ * Check if field is a document property field
477
+ *
478
+ * @param field - The field to check
479
+ * @returns true if this is a document property field
480
+ */
481
+ declare function isDocPropertyField(field: Field): boolean;
482
+ /**
483
+ * Check if field is a cross-reference field
484
+ *
485
+ * @param field - The field to check
486
+ * @returns true if this is a cross-reference field
487
+ */
488
+ declare function isReferenceField(field: Field): boolean;
489
+ /**
490
+ * Check if field is a mail merge field
491
+ *
492
+ * @param field - The field to check
493
+ * @returns true if this is a mail merge field
494
+ */
495
+ declare function isMergeField(field: Field): boolean;
496
+ /**
497
+ * Check if field is a TOC/Index field
498
+ *
499
+ * @param field - The field to check
500
+ * @returns true if this is a TOC or index field
501
+ */
502
+ declare function isTocField(field: Field): boolean;
503
+
504
+ /**
505
+ * Hyperlink Parser - Parse hyperlinks (w:hyperlink) with URL resolution
506
+ *
507
+ * OOXML Reference:
508
+ * - Hyperlink element: w:hyperlink
509
+ * - Attributes:
510
+ * - r:id - Relationship ID for external link (resolves via .rels)
511
+ * - w:anchor - Internal bookmark name
512
+ * - w:tooltip - Tooltip/title text
513
+ * - w:tgtFrame - Target frame (_blank, _self, etc.)
514
+ * - w:history - Whether to add to history
515
+ * - w:docLocation - Location within a document
516
+ *
517
+ * External links use r:id to reference a relationship in document.xml.rels
518
+ * Internal links use w:anchor to reference a bookmark in the same document
519
+ */
520
+
521
+ /**
522
+ * Parse a hyperlink element (w:hyperlink)
523
+ *
524
+ * Handles both external links (via r:id relationship) and internal
525
+ * links (via w:anchor bookmark reference).
526
+ *
527
+ * @param node - The w:hyperlink XML element
528
+ * @param rels - Relationship map to resolve r:id references
529
+ * @param styles - Style map for resolving run styles
530
+ * @param theme - Theme for resolving colors/fonts
531
+ * @param media - Media files map for image data
532
+ * @returns Parsed Hyperlink object
533
+ */
534
+ declare function parseHyperlink(node: Element, rels: RelationshipMap | null, styles?: StyleMap | null, theme?: Theme | null, media?: Map<string, MediaFile> | null): Hyperlink;
535
+ /**
536
+ * Get the display text of a hyperlink
537
+ *
538
+ * Concatenates text from all child runs.
539
+ *
540
+ * @param hyperlink - Parsed Hyperlink object
541
+ * @returns Display text string
542
+ */
543
+ declare function getHyperlinkText(hyperlink: Hyperlink): string;
544
+ /**
545
+ * Check if a hyperlink is an external link
546
+ *
547
+ * @param hyperlink - Parsed Hyperlink object
548
+ * @returns true if this links to an external URL
549
+ */
550
+ declare function isExternalLink(hyperlink: Hyperlink): boolean;
551
+ /**
552
+ * Check if a hyperlink is an internal bookmark link
553
+ *
554
+ * @param hyperlink - Parsed Hyperlink object
555
+ * @returns true if this links to an internal bookmark
556
+ */
557
+ declare function isInternalLink(hyperlink: Hyperlink): boolean;
558
+ /**
559
+ * Get the resolved URL of a hyperlink
560
+ *
561
+ * For external links, returns the full URL.
562
+ * For internal links, returns the anchor prefixed with #.
563
+ * Returns undefined if the link couldn't be resolved.
564
+ *
565
+ * @param hyperlink - Parsed Hyperlink object
566
+ * @returns Resolved URL or undefined
567
+ */
568
+ declare function getHyperlinkUrl(hyperlink: Hyperlink): string | undefined;
569
+ /**
570
+ * Check if a hyperlink has any content (runs)
571
+ *
572
+ * @param hyperlink - Parsed Hyperlink object
573
+ * @returns true if hyperlink has child runs
574
+ */
575
+ declare function hasContent(hyperlink: Hyperlink): boolean;
576
+ /**
577
+ * Get all runs from a hyperlink
578
+ *
579
+ * @param hyperlink - Parsed Hyperlink object
580
+ * @returns Array of Run objects
581
+ */
582
+ declare function getHyperlinkRuns(hyperlink: Hyperlink): Run[];
583
+ /**
584
+ * Resolve a hyperlink's rId to a URL using a relationship map
585
+ *
586
+ * This is useful when you have a hyperlink that was parsed without
587
+ * relationship context and need to resolve it later.
588
+ *
589
+ * @param hyperlink - Parsed Hyperlink object (will be modified)
590
+ * @param rels - Relationship map to resolve against
591
+ * @returns The resolved URL or undefined
592
+ */
593
+ declare function resolveHyperlinkUrl(hyperlink: Hyperlink, rels: RelationshipMap): string | undefined;
594
+
595
+ /**
596
+ * Shape Parser - Parse shapes and drawings from wps:wsp elements
597
+ *
598
+ * DOCX shapes are contained in drawings with wps:wsp (Word Processing Shape) elements.
599
+ * Shapes can be standalone or inside groups (wpg:wgp).
600
+ *
601
+ * OOXML Structure:
602
+ * w:drawing
603
+ * └── wp:inline or wp:anchor
604
+ * └── a:graphic
605
+ * └── a:graphicData
606
+ * └── wps:wsp (shape)
607
+ * ├── wps:cNvSpPr (non-visual properties)
608
+ * ├── wps:spPr (shape properties)
609
+ * │ ├── a:xfrm (transform: position, size, rotation)
610
+ * │ ├── a:prstGeom (preset geometry/shape type)
611
+ * │ ├── a:solidFill / a:noFill / a:gradFill (fill)
612
+ * │ └── a:ln (line/outline properties)
613
+ * ├── wps:style (style reference)
614
+ * ├── wps:txbx (text box container)
615
+ * │ └── w:txbxContent (text content)
616
+ * └── wps:bodyPr (body/text properties)
617
+ *
618
+ * EMU (English Metric Units): 914400 EMU = 1 inch
619
+ */
620
+
621
+ /**
622
+ * Parse a wps:wsp (Word Processing Shape) element
623
+ *
624
+ * @param node - The wps:wsp XML element
625
+ * @returns Parsed Shape object
626
+ */
627
+ declare function parseShape(node: Element): Shape;
628
+ /**
629
+ * Parse shape from a w:drawing element that contains a shape (not an image)
630
+ *
631
+ * @param drawingEl - The w:drawing element
632
+ * @returns Parsed Shape object or null if not a shape
633
+ */
634
+ declare function parseShapeFromDrawing(drawingEl: Element): Shape | null;
635
+ /**
636
+ * Check if a drawing element contains a shape (not an image)
637
+ */
638
+ declare function isShapeDrawing(drawingEl: Element): boolean;
639
+ /**
640
+ * Check if a shape is a line (connector)
641
+ */
642
+ declare function isLineShape(shape: Shape): boolean;
643
+ /**
644
+ * Check if a shape is a text box
645
+ */
646
+ declare function isTextBoxShape(shape: Shape): boolean;
647
+ /**
648
+ * Check if a shape has text content
649
+ */
650
+ declare function hasTextContent(shape: Shape): boolean;
651
+ /**
652
+ * Get shape width in pixels
653
+ */
654
+ declare function getShapeWidthPx(shape: Shape): number;
655
+ /**
656
+ * Get shape height in pixels
657
+ */
658
+ declare function getShapeHeightPx(shape: Shape): number;
659
+ /**
660
+ * Get shape dimensions in pixels
661
+ */
662
+ declare function getShapeDimensionsPx(shape: Shape): {
663
+ width: number;
664
+ height: number;
665
+ };
666
+ /**
667
+ * Check if shape is floating (anchored)
668
+ */
669
+ declare function isFloatingShape(shape: Shape): boolean;
670
+ /**
671
+ * Check if shape has fill
672
+ */
673
+ declare function hasFill(shape: Shape): boolean;
674
+ /**
675
+ * Check if shape has outline
676
+ */
677
+ declare function hasOutline(shape: Shape): boolean;
678
+ /**
679
+ * Get outline width in pixels
680
+ */
681
+ declare function getOutlineWidthPx(shape: Shape): number;
682
+ /**
683
+ * Resolve fill color to CSS color string
684
+ */
685
+ declare function resolveFillColor(shape: Shape): string | undefined;
686
+ /**
687
+ * Resolve outline color to CSS color string
688
+ */
689
+ declare function resolveOutlineColor(shape: Shape): string | undefined;
690
+
691
+ /**
692
+ * Tab Parser - Parse and handle tab stops in DOCX documents
693
+ *
694
+ * Tab stops define positions where the cursor jumps when the user presses Tab.
695
+ * They can have different alignments (left, center, right, decimal) and
696
+ * leader characters (dots, dashes, underscores).
697
+ *
698
+ * OOXML Reference:
699
+ * - Tab stops container: w:tabs
700
+ * - Individual tab stop: w:tab
701
+ * - Tab character in runs: w:tab (different from tab stop definition)
702
+ *
703
+ * Attributes of w:tab in w:tabs:
704
+ * - w:val - alignment type (left, center, right, decimal, bar, clear, num)
705
+ * - w:pos - position in twips from left margin
706
+ * - w:leader - leader character (none, dot, hyphen, underscore, heavy, middleDot)
707
+ */
708
+
709
+ /**
710
+ * Default tab stop interval in twips (0.5 inches = 720 twips at 1440 twips/inch)
711
+ * Word uses this when no explicit tab stops are defined
712
+ */
713
+ declare const DEFAULT_TAB_INTERVAL_TWIPS = 720;
714
+ /**
715
+ * Default tab alignment
716
+ */
717
+ declare const DEFAULT_TAB_ALIGNMENT: TabStopAlignment;
718
+ /**
719
+ * Default tab leader
720
+ */
721
+ declare const DEFAULT_TAB_LEADER: TabLeader;
722
+ /**
723
+ * Parse a single tab stop element (w:tab within w:tabs)
724
+ *
725
+ * @param tab - The w:tab XML element
726
+ * @returns Parsed TabStop or null if invalid
727
+ */
728
+ declare function parseTabStop(tab: Element): TabStop | null;
729
+ /**
730
+ * Parse tab stops container (w:tabs)
731
+ *
732
+ * @param tabs - The w:tabs XML element
733
+ * @returns Array of TabStop objects, sorted by position
734
+ */
735
+ declare function parseTabStops(tabs: Element | null): TabStop[];
736
+ /**
737
+ * Parse tab stops from paragraph properties element
738
+ *
739
+ * @param pPr - The w:pPr XML element
740
+ * @returns Array of TabStop objects or undefined if none
741
+ */
742
+ declare function parseTabStopsFromParagraphProperties(pPr: Element | null): TabStop[] | undefined;
743
+ /**
744
+ * Merge tab stops from different sources (style, direct formatting)
745
+ *
746
+ * Direct formatting tab stops override style tab stops at the same position.
747
+ * "clear" alignment removes a tab stop from the style.
748
+ *
749
+ * @param styleTabs - Tab stops from style
750
+ * @param directTabs - Tab stops from direct formatting (w:pPr in paragraph)
751
+ * @returns Merged and filtered tab stops
752
+ */
753
+ declare function mergeTabStops(styleTabs: TabStop[] | undefined, directTabs: TabStop[] | undefined): TabStop[];
754
+ /**
755
+ * Get the next tab stop position for a given current position
756
+ *
757
+ * @param currentPosition - Current position in twips from left margin
758
+ * @param tabStops - Defined tab stops
759
+ * @param pageWidth - Page content width in twips (for boundary)
760
+ * @returns The next tab stop or a default position
761
+ */
762
+ declare function getNextTabStop(currentPosition: number, tabStops: TabStop[], pageWidth: number): TabStop;
763
+ /**
764
+ * Calculate the width needed for a tab at a given position
765
+ *
766
+ * @param currentPosition - Current position in twips
767
+ * @param tabStops - Defined tab stops
768
+ * @param pageWidth - Page content width in twips
769
+ * @returns Width in twips that the tab should span
770
+ */
771
+ declare function calculateTabWidth(currentPosition: number, tabStops: TabStop[], pageWidth: number): number;
772
+ /**
773
+ * Calculate tab width considering alignment
774
+ *
775
+ * For non-left alignments (center, right, decimal), the width depends on
776
+ * the content that follows the tab.
777
+ *
778
+ * @param currentPosition - Current position in twips
779
+ * @param tabStops - Defined tab stops
780
+ * @param pageWidth - Page content width in twips
781
+ * @param followingContentWidth - Width of content after the tab (for alignment)
782
+ * @returns Width in twips
783
+ */
784
+ declare function calculateTabWidthWithAlignment(currentPosition: number, tabStops: TabStop[], pageWidth: number, followingContentWidth?: number): {
785
+ width: number;
786
+ alignment: TabStopAlignment;
787
+ };
788
+ /**
789
+ * Get the character used for a tab leader
790
+ *
791
+ * @param leader - Tab leader type
792
+ * @returns The character to use for filling
793
+ */
794
+ declare function getLeaderCharacter(leader: TabLeader | undefined): string;
795
+ /**
796
+ * Check if a leader type requires visible filling
797
+ *
798
+ * @param leader - Tab leader type
799
+ * @returns true if the leader needs visible characters
800
+ */
801
+ declare function hasVisibleLeader(leader: TabLeader | undefined): boolean;
802
+
803
+ /**
804
+ * Table Atom-level Property Parsers
805
+ *
806
+ * Parsers for the small, leaf-style table property elements:
807
+ * - measurements (w:tblW, w:tcW, w:trHeight twip values + width type)
808
+ * - borders (w:tblBorders, w:tcBorders, individual side specs)
809
+ * - cell margins (w:tblCellMar, w:tcMar)
810
+ * - shading (w:shd background + theme tint/shade)
811
+ * - table look flags (w:tblLook firstRow/lastRow/etc.)
812
+ * - floating table positioning (w:tblpPr anchors + offsets)
813
+ *
814
+ * These are leaf parsers — they don't recurse into rows/cells. The composite
815
+ * row/cell/table parsers (in `../tableParser.ts`) compose these.
816
+ */
817
+
818
+ /**
819
+ * Parse a table measurement (width, height, etc.)
820
+ *
821
+ * @param element - Element with w:w and w:type attributes
822
+ * @returns Parsed measurement or undefined
823
+ */
824
+ declare function parseTableMeasurement(element: Element | null): TableMeasurement | undefined;
825
+ /**
826
+ * Parse a single border specification
827
+ *
828
+ * @param element - Border element (w:top, w:bottom, etc.)
829
+ * @returns Parsed border or undefined
830
+ */
831
+ declare function parseBorderSpec(element: Element | null): BorderSpec | undefined;
832
+ /**
833
+ * Parse table borders (w:tblBorders or w:tcBorders)
834
+ *
835
+ * @param bordersElement - The borders container element
836
+ * @returns Parsed borders or undefined
837
+ */
838
+ declare function parseTableBorders(bordersElement: Element | null): TableBorders | undefined;
839
+ /**
840
+ * Parse cell margins (w:tblCellMar or w:tcMar)
841
+ *
842
+ * @param marginsElement - The margins container element
843
+ * @returns Parsed margins or undefined
844
+ */
845
+ declare function parseCellMargins(marginsElement: Element | null): CellMargins | undefined;
846
+ /**
847
+ * Parse shading properties (w:shd)
848
+ *
849
+ * @param shdElement - The w:shd element
850
+ * @returns Parsed shading or undefined
851
+ */
852
+ declare function parseShading(shdElement: Element | null): ShadingProperties | undefined;
853
+ /**
854
+ * Parse table look flags (w:tblLook)
855
+ *
856
+ * @param lookElement - The w:tblLook element
857
+ * @returns Parsed table look or undefined
858
+ */
859
+ declare function parseTableLook(lookElement: Element | null): TableLook | undefined;
860
+ /**
861
+ * Parse floating table properties (w:tblpPr)
862
+ *
863
+ * @param tblpPrElement - The w:tblpPr element
864
+ * @returns Parsed floating properties or undefined
865
+ */
866
+ declare function parseFloatingTableProperties(tblpPrElement: Element | null): FloatingTableProperties | undefined;
867
+
868
+ /**
869
+ * Table Query Helpers
870
+ *
871
+ * Read-only utilities for inspecting a parsed Table model — column/row
872
+ * counts, cell merge state, plain-text extraction, header detection,
873
+ * floating-table detection. No XML access; these operate on the parsed
874
+ * `Table` shape.
875
+ */
876
+
877
+ /**
878
+ * Get the number of columns in a table
879
+ *
880
+ * Uses the table grid if available, otherwise counts cells in first row.
881
+ *
882
+ * @param table - The table to measure
883
+ * @returns Number of columns
884
+ */
885
+ declare function getTableColumnCount(table: Table): number;
886
+ /**
887
+ * Get the number of rows in a table
888
+ *
889
+ * @param table - The table to measure
890
+ * @returns Number of rows
891
+ */
892
+ declare function getTableRowCount(table: Table): number;
893
+ /**
894
+ * Check if a cell is part of a vertical merge
895
+ *
896
+ * @param cell - The cell to check
897
+ * @returns true if cell continues a vertical merge
898
+ */
899
+ declare function isCellMergeContinuation(cell: TableCell): boolean;
900
+ /**
901
+ * Check if a cell starts a vertical merge
902
+ *
903
+ * @param cell - The cell to check
904
+ * @returns true if cell starts a vertical merge
905
+ */
906
+ declare function isCellMergeStart(cell: TableCell): boolean;
907
+ /**
908
+ * Check if table has header row
909
+ *
910
+ * @param table - The table to check
911
+ * @returns true if first row is marked as header
912
+ */
913
+ declare function hasHeaderRow(table: Table): boolean;
914
+
915
+ /**
916
+ * Table Parser - Parse tables with full OOXML structure
917
+ *
918
+ * OOXML tables consist of:
919
+ * - w:tbl - Table element
920
+ * - w:tblPr - Table properties (width, borders, style)
921
+ * - w:tblGrid - Column width definitions
922
+ * - w:tr - Table rows
923
+ * - w:trPr - Row properties (height, header)
924
+ * - w:tc - Table cells
925
+ * - w:tcPr - Cell properties (width, borders, merge)
926
+ *
927
+ * Cell merging:
928
+ * - Horizontal: w:gridSpan (how many grid columns this cell spans)
929
+ * - Vertical: w:vMerge (restart = start of merge, continue = continuation)
930
+ *
931
+ * OOXML Reference:
932
+ * - w:tbl contains w:tblPr, w:tblGrid, and w:tr elements
933
+ * - w:tr contains w:trPr and w:tc elements
934
+ * - w:tc contains w:tcPr and content (paragraphs, tables)
935
+ *
936
+ * Composite parsers (parseTable, parseTableRow, parseTableCell, plus the
937
+ * three property parsers and their tracked-change variants) live here.
938
+ * Leaf property parsers (measurements, borders, margins, shading, look,
939
+ * floating) are in ./tableParser/properties.ts. Query helpers (counts, merge
940
+ * checks, text extraction) are in ./tableParser/queries.ts.
941
+ */
942
+
943
+ /**
944
+ * Parse table properties (w:tblPr)
945
+ *
946
+ * @param tblPrElement - The w:tblPr element
947
+ * @returns Parsed table formatting
948
+ */
949
+ declare function parseTableProperties(tblPrElement: Element | null): TableFormatting | undefined;
950
+
951
+ /**
952
+ * Text Box Parser - Parse floating text box containers
953
+ *
954
+ * Text boxes in DOCX are implemented as shapes (wps:wsp) with text body content (wps:txbx).
955
+ * The text body contains w:txbxContent which holds paragraphs and tables like the main document.
956
+ *
957
+ * OOXML Structure:
958
+ * w:drawing
959
+ * └── wp:inline or wp:anchor
960
+ * └── a:graphic
961
+ * └── a:graphicData
962
+ * └── wps:wsp (shape)
963
+ * ├── wps:cNvSpPr (non-visual properties)
964
+ * ├── wps:spPr (shape properties)
965
+ * │ ├── a:xfrm (transform: position, size)
966
+ * │ ├── a:prstGeom (preset geometry - typically "rect" for text boxes)
967
+ * │ ├── a:solidFill / a:noFill (fill)
968
+ * │ └── a:ln (outline)
969
+ * ├── wps:txbx (text box container)
970
+ * │ └── w:txbxContent (text content)
971
+ * │ ├── w:p (paragraphs)
972
+ * │ └── w:tbl (tables)
973
+ * └── wps:bodyPr (body properties - margins, text direction, etc.)
974
+ *
975
+ * EMU (English Metric Units): 914400 EMU = 1 inch
976
+ */
977
+
978
+ /**
979
+ * Extract raw paragraph elements from w:txbxContent
980
+ * Actual parsing happens via document parser to avoid circular dependencies
981
+ */
982
+ declare function extractTextBoxContentElements(txbxContent: Element | null): {
983
+ paragraphElements: Element[];
984
+ tableElements: Element[];
985
+ };
986
+ /**
987
+ * Type for the paragraph parser function to avoid circular imports
988
+ */
989
+ type ParagraphParserFn = (node: Element, styles: StyleMap | null, theme: Theme | null, numbering: NumberingMap | null, rels?: RelationshipMap | null) => Paragraph;
990
+ /**
991
+ * Type for the table parser function to avoid circular imports
992
+ */
993
+ type TableParserFn = (node: Element, styles: StyleMap | null, theme: Theme | null, numbering: NumberingMap | null, rels?: RelationshipMap | null, media?: Map<string, MediaFile>) => Table;
994
+ /**
995
+ * Parse text box content with provided parser functions
996
+ * This avoids circular dependencies by accepting parser functions as parameters
997
+ */
998
+ declare function parseTextBoxContent(txbxContent: Element | null, parseParagraph: ParagraphParserFn, parseTable: TableParserFn | null, styles: StyleMap | null, theme: Theme | null, numbering: NumberingMap | null, rels?: RelationshipMap | null, _media?: Map<string, MediaFile>): Paragraph[];
999
+ /**
1000
+ * Check if a drawing element contains a text box
1001
+ * Text boxes are shapes with wps:txbx content
1002
+ */
1003
+ declare function isTextBoxDrawing(drawingEl: Element): boolean;
1004
+ /**
1005
+ * Check if a wps:wsp element is a text box
1006
+ */
1007
+ declare function isShapeTextBox(wsp: Element): boolean;
1008
+ /**
1009
+ * Parse a text box from a w:drawing element
1010
+ *
1011
+ * This creates a TextBox object with placeholder content.
1012
+ * The actual content parsing requires paragraph/table parsers which
1013
+ * creates a circular dependency. The document parser should call
1014
+ * parseTextBoxContent() separately with the required parsers.
1015
+ *
1016
+ * @param drawingEl - The w:drawing XML element
1017
+ * @returns TextBox object with placeholder content, or null if not a text box
1018
+ */
1019
+ declare function parseTextBox(drawingEl: Element): TextBox | null;
1020
+ /**
1021
+ * Parse text box content XML element
1022
+ * @param wsp - The wps:wsp element containing the text box
1023
+ * @returns The w:txbxContent element or null
1024
+ */
1025
+ declare function getTextBoxContentElement(wsp: Element): Element | null;
1026
+ /**
1027
+ * Parse text box from a wps:wsp element directly
1028
+ * Useful when you already have the shape element
1029
+ */
1030
+ declare function parseTextBoxFromShape(wsp: Element, size: ImageSize, position?: ImagePosition, wrap?: ImageWrap): TextBox | null;
1031
+ /**
1032
+ * Get text box width in pixels
1033
+ */
1034
+ declare function getTextBoxWidthPx(textBox: TextBox): number;
1035
+ /**
1036
+ * Get text box height in pixels
1037
+ */
1038
+ declare function getTextBoxHeightPx(textBox: TextBox): number;
1039
+ /**
1040
+ * Get text box dimensions in pixels
1041
+ */
1042
+ declare function getTextBoxDimensionsPx(textBox: TextBox): {
1043
+ width: number;
1044
+ height: number;
1045
+ };
1046
+ /**
1047
+ * Get text box margins in pixels
1048
+ */
1049
+ declare function getTextBoxMarginsPx(textBox: TextBox): {
1050
+ top: number;
1051
+ bottom: number;
1052
+ left: number;
1053
+ right: number;
1054
+ };
1055
+ /**
1056
+ * Check if text box is floating (anchored)
1057
+ */
1058
+ declare function isFloatingTextBox(textBox: TextBox): boolean;
1059
+ /**
1060
+ * Check if text box has fill
1061
+ */
1062
+ declare function hasTextBoxFill(textBox: TextBox): boolean;
1063
+ /**
1064
+ * Check if text box has outline
1065
+ */
1066
+ declare function hasTextBoxOutline(textBox: TextBox): boolean;
1067
+ /**
1068
+ * Check if text box has content
1069
+ */
1070
+ declare function hasTextBoxContent(textBox: TextBox): boolean;
1071
+ /**
1072
+ * Get plain text from text box (helper for search/indexing)
1073
+ */
1074
+ declare function getTextBoxText(textBox: TextBox): string;
1075
+ /**
1076
+ * Resolve fill color to CSS color string
1077
+ */
1078
+ declare function resolveTextBoxFillColor(textBox: TextBox): string | undefined;
1079
+ /**
1080
+ * Resolve outline color to CSS color string
1081
+ */
1082
+ declare function resolveTextBoxOutlineColor(textBox: TextBox): string | undefined;
1083
+ /**
1084
+ * Get outline width in pixels
1085
+ */
1086
+ declare function getTextBoxOutlineWidthPx(textBox: TextBox): number;
1087
+
1088
+ /**
1089
+ * Reply-range marker injection for serialization.
1090
+ *
1091
+ * Word / Pages / LibreOffice expect every comment in `comments.xml`
1092
+ * (including REPLY threads) to have matching `commentRangeStart` /
1093
+ * `commentRangeEnd` / `commentReference` markers in `document.xml`.
1094
+ * The PM document only stamps marks for the parent comment because
1095
+ * replies don't have their own visible range — they share the parent
1096
+ * thread's text. So before serialization we walk the body content and
1097
+ * synthesize parallel range markers for every reply.
1098
+ *
1099
+ * Two helpers, one per parent shape:
1100
+ * - `injectReplyRangeMarkers` — replies whose parent is another
1101
+ * comment (regular threaded discussion). Finds the parent's
1102
+ * `commentRangeStart`/`End` and adds parallel markers next to them.
1103
+ * - `injectTCReplyRangeMarkers` — replies whose parent is a tracked
1104
+ * change (insertion/deletion). Wraps the TC content with
1105
+ * commentRange markers.
1106
+ *
1107
+ * Pre-#... this code lived inside React's DocxEditor.tsx; Vue had no
1108
+ * equivalent and so silently lost reply markers when saving collab
1109
+ * documents. Living in core means both adapters get it for free.
1110
+ */
1111
+
1112
+ /**
1113
+ * Inject `commentRangeStart`/`commentRangeEnd` for reply comments
1114
+ * that share their parent comment's text range.
1115
+ */
1116
+ declare function injectReplyRangeMarkers(content: BlockContent[], comments: Comment[]): void;
1117
+ /**
1118
+ * Inject `commentRangeStart`/`commentRangeEnd` for comments whose
1119
+ * parent is a tracked-change revision (insertion/deletion). The TC
1120
+ * content nodes don't carry the comment's range, so we wrap them.
1121
+ */
1122
+ declare function injectTCReplyRangeMarkers(content: BlockContent[], comments: Comment[]): void;
1123
+
1124
+ export { type ComplexFieldContext, type ComplexFieldState, DEFAULT_TAB_ALIGNMENT, DEFAULT_TAB_INTERVAL_TWIPS, DEFAULT_TAB_LEADER, type EndnoteMap, type FieldSwitch, type FootnoteMap, KNOWN_FIELD_TYPES, type NumberingMap, type ParagraphParserFn, type ParsedFieldInstruction, type TableParserFn, calculateTabWidth, calculateTabWidthWithAlignment, createComplexFieldContext, extractTextBoxContentElements, formatNumber, getBulletCharacter, getEndnoteText, getFieldDisplayValue, getFootnoteText, getFormatSwitch, getHyperlinkRuns, getHyperlinkText, getHyperlinkUrl, getImageHeightPx, getImageWidthPx, getLeaderCharacter, getNextTabStop, getOutlineWidthPx, getShapeDimensionsPx, getShapeHeightPx, getShapeWidthPx, getTableColumnCount, getTableRowCount, getTextBoxContentElement, getTextBoxDimensionsPx, getTextBoxHeightPx, getTextBoxMarginsPx, getTextBoxOutlineWidthPx, getTextBoxText, getTextBoxWidthPx, getWrapDistancesPx, hasContent, hasFill, hasHeaderRow, hasMergeFormat, hasOutline, hasTextBoxContent, hasTextBoxFill, hasTextBoxOutline, hasTextContent, hasVisibleLeader, injectReplyRangeMarkers, injectTCReplyRangeMarkers, isBehindText, isBulletLevel, isCellMergeContinuation, isCellMergeStart, isDateTimeField, isDecorativeImage, isDocPropertyField, isExternalLink, isFloatingImage, isFloatingShape, isFloatingTextBox, isInFrontOfText, isInlineImage, isInternalLink, isKnownFieldType, isLineShape, isMergeField, isPageNumberField, isReferenceField, isSeparatorEndnote, isSeparatorFootnote, isShapeDrawing, isShapeTextBox, isTextBoxDrawing, isTextBoxShape, isTocField, isTotalPagesField, mergeTabStops, parseBorderSpec, parseCellMargins, parseDrawing, parseEndnoteProperties, parseEndnotes, parseFieldInstruction, parseFieldType, parseFloatingTableProperties, parseFootnoteProperties, parseFootnotes, parseHyperlink, parseImage, parseNumbering, parseShading, parseShape, parseShapeFromDrawing, parseSimpleField, parseTabStop, parseTabStops, parseTabStopsFromParagraphProperties, parseTableBorders, parseTableLook, parseTableMeasurement, parseTableProperties, parseTextBox, parseTextBoxContent, parseTextBoxFromShape, renderListMarker, resolveFillColor, resolveHyperlinkUrl, resolveOutlineColor, resolveTextBoxFillColor, resolveTextBoxOutlineColor };