@zeke-02/docx-editor-core 0.1.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 (431) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +89 -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 +168 -0
  8. package/dist/agent/index.d.ts +168 -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-2HFQ4QTU.js +1 -0
  14. package/dist/chunk-2KHWHVTA.js +1 -0
  15. package/dist/chunk-2MSZXH6Q.mjs +2 -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-44FHVKSI.js +1 -0
  20. package/dist/chunk-4BFNWPKW.js +1 -0
  21. package/dist/chunk-4G6AJ4ZM.js +1 -0
  22. package/dist/chunk-4GER4JLW.js +1 -0
  23. package/dist/chunk-4Q2IP5FW.js +1 -0
  24. package/dist/chunk-56D223FM.mjs +1 -0
  25. package/dist/chunk-5VBNOHRE.mjs +1 -0
  26. package/dist/chunk-67LVRQIR.mjs +1 -0
  27. package/dist/chunk-6LVPRTB6.js +1 -0
  28. package/dist/chunk-6NQSIC27.mjs +1 -0
  29. package/dist/chunk-6Y6LON6Y.mjs +1 -0
  30. package/dist/chunk-6ZXL3EIP.mjs +2 -0
  31. package/dist/chunk-7AMYZMCX.js +1 -0
  32. package/dist/chunk-7E5VBRDL.mjs +1 -0
  33. package/dist/chunk-7HANRHHL.js +1 -0
  34. package/dist/chunk-7LRR7RKE.mjs +15 -0
  35. package/dist/chunk-7RDCZLTU.js +1 -0
  36. package/dist/chunk-7U4I6BKJ.js +1 -0
  37. package/dist/chunk-7Z2AGPNQ.mjs +10 -0
  38. package/dist/chunk-AAPBAMD7.js +1 -0
  39. package/dist/chunk-AGVFAXVQ.mjs +9 -0
  40. package/dist/chunk-AMENZY5F.mjs +1 -0
  41. package/dist/chunk-ARHPXIBJ.mjs +1 -0
  42. package/dist/chunk-BGY3CB37.mjs +1 -0
  43. package/dist/chunk-BHBOAP6Z.js +3 -0
  44. package/dist/chunk-BOOHU5EW.mjs +1 -0
  45. package/dist/chunk-C2BAPYGJ.js +1 -0
  46. package/dist/chunk-CGJ6S3AH.mjs +1 -0
  47. package/dist/chunk-CKKO4JWE.mjs +1 -0
  48. package/dist/chunk-CTHHUJAB.mjs +2 -0
  49. package/dist/chunk-CUY2THAO.mjs +1 -0
  50. package/dist/chunk-CXQDYR2Y.js +1 -0
  51. package/dist/chunk-D4RPOJC7.js +1 -0
  52. package/dist/chunk-D6GO7UGD.mjs +1 -0
  53. package/dist/chunk-DC7S76ZX.js +1 -0
  54. package/dist/chunk-DROCYKAR.js +1 -0
  55. package/dist/chunk-DV6GWBUJ.js +2 -0
  56. package/dist/chunk-DZYYLV2O.js +1 -0
  57. package/dist/chunk-E4JMCA5X.js +2 -0
  58. package/dist/chunk-ERNVFCGN.js +59 -0
  59. package/dist/chunk-ESI4BSBF.js +1 -0
  60. package/dist/chunk-F44ZLDZS.js +4 -0
  61. package/dist/chunk-FCJWLEKT.mjs +1 -0
  62. package/dist/chunk-FDEDN2RC.mjs +0 -0
  63. package/dist/chunk-FRYMBAHP.js +3 -0
  64. package/dist/chunk-FWTP7BN7.mjs +4 -0
  65. package/dist/chunk-G3YJ5RKC.mjs +1 -0
  66. package/dist/chunk-GGPKPXON.js +1 -0
  67. package/dist/chunk-HKVAW3RE.js +1 -0
  68. package/dist/chunk-HQPWFUP5.js +2 -0
  69. package/dist/chunk-I6PMX4BO.js +1 -0
  70. package/dist/chunk-ILJUDEZ5.mjs +1 -0
  71. package/dist/chunk-IMKU4O3P.js +1 -0
  72. package/dist/chunk-IP2VXNWG.js +1 -0
  73. package/dist/chunk-J4J2Y6EU.js +10 -0
  74. package/dist/chunk-J7NADDC4.mjs +1 -0
  75. package/dist/chunk-JFZIXFRC.js +1 -0
  76. package/dist/chunk-JHZ3HLSR.mjs +1 -0
  77. package/dist/chunk-JY5EFI4D.js +1 -0
  78. package/dist/chunk-JZESIPVC.mjs +3 -0
  79. package/dist/chunk-K7GVLZS6.mjs +1 -0
  80. package/dist/chunk-KESNGXGO.js +1 -0
  81. package/dist/chunk-KQTB5Y7P.mjs +1 -0
  82. package/dist/chunk-L2U3TTAD.js +9 -0
  83. package/dist/chunk-LBKMYD3M.mjs +1 -0
  84. package/dist/chunk-LCICADWM.js +2 -0
  85. package/dist/chunk-LE67NTCN.mjs +1 -0
  86. package/dist/chunk-LTHT4A4S.js +1 -0
  87. package/dist/chunk-MCFHOMA2.js +2 -0
  88. package/dist/chunk-MCX4GVRX.mjs +1 -0
  89. package/dist/chunk-MJ5FQX7Q.js +1 -0
  90. package/dist/chunk-MJ6XZFVD.mjs +1 -0
  91. package/dist/chunk-MNOHUTKE.js +15 -0
  92. package/dist/chunk-MOKKS75W.mjs +3 -0
  93. package/dist/chunk-MP4QSEO2.mjs +1 -0
  94. package/dist/chunk-MVZOTKNL.mjs +1 -0
  95. package/dist/chunk-MZ7LW5CH.js +1 -0
  96. package/dist/chunk-MZOVDLYL.js +1 -0
  97. package/dist/chunk-N3Y5BUKV.js +1 -0
  98. package/dist/chunk-NBLJPT54.mjs +1 -0
  99. package/dist/chunk-NDDJ67FQ.mjs +1 -0
  100. package/dist/chunk-NMUHXIF5.js +1 -0
  101. package/dist/chunk-NXLJVVVE.js +1 -0
  102. package/dist/chunk-OBMN4VSM.mjs +1 -0
  103. package/dist/chunk-OCAX2KJQ.js +4 -0
  104. package/dist/chunk-OEXVWIHW.mjs +2 -0
  105. package/dist/chunk-OZMNIX6U.mjs +1 -0
  106. package/dist/chunk-PRRM64JO.mjs +1 -0
  107. package/dist/chunk-PXE2OWEA.mjs +1 -0
  108. package/dist/chunk-Q4CKLXWA.js +1 -0
  109. package/dist/chunk-Q5QOBZWT.mjs +1 -0
  110. package/dist/chunk-QJJQ53V6.mjs +1 -0
  111. package/dist/chunk-QLPQVR5W.mjs +1 -0
  112. package/dist/chunk-QLX4HX3I.mjs +59 -0
  113. package/dist/chunk-QPFJJPIC.mjs +1 -0
  114. package/dist/chunk-QYUPLKLP.mjs +1 -0
  115. package/dist/chunk-RFC2SXZ6.mjs +4 -0
  116. package/dist/chunk-RNOXNNSD.mjs +0 -0
  117. package/dist/chunk-RPIQG46O.mjs +1 -0
  118. package/dist/chunk-RQN4C636.js +1 -0
  119. package/dist/chunk-SHJBS42Y.js +1 -0
  120. package/dist/chunk-SORYYVJ7.js +1 -0
  121. package/dist/chunk-SWC6T7YQ.js +1 -0
  122. package/dist/chunk-TE2AF7FM.js +1 -0
  123. package/dist/chunk-TE2VQJZG.js +1 -0
  124. package/dist/chunk-TUIEV7Q7.js +1 -0
  125. package/dist/chunk-U4UCHBZ7.js +1 -0
  126. package/dist/chunk-U74VPTIU.js +1 -0
  127. package/dist/chunk-UCJGOQ4J.mjs +1 -0
  128. package/dist/chunk-UQ6WNWXX.js +1 -0
  129. package/dist/chunk-VHUVPHPI.mjs +1 -0
  130. package/dist/chunk-VQWZHPWI.mjs +1 -0
  131. package/dist/chunk-VW22RZ6C.mjs +1 -0
  132. package/dist/chunk-WLHNIXWC.mjs +2 -0
  133. package/dist/chunk-WLKRUBY4.js +1 -0
  134. package/dist/chunk-WTFLNYAT.mjs +1 -0
  135. package/dist/chunk-XNDGWWDT.js +1 -0
  136. package/dist/chunk-XXU7YQVV.js +1 -0
  137. package/dist/chunk-Y74ANBPV.js +1 -0
  138. package/dist/chunk-YMZ3F2FZ.mjs +1 -0
  139. package/dist/chunk-YTDWMXNS.js +1 -0
  140. package/dist/chunk-YUZQTRI2.js +1 -0
  141. package/dist/chunk-ZX26QZJ5.mjs +1 -0
  142. package/dist/chunk-ZY7EMTZ3.mjs +1 -0
  143. package/dist/colorResolver-BZ_yScf4.d.ts +390 -0
  144. package/dist/colorResolver-C6DtsoFI.d.mts +390 -0
  145. package/dist/colors-C3vA7HUU.d.mts +70 -0
  146. package/dist/colors-C3vA7HUU.d.ts +70 -0
  147. package/dist/content-5Mrz6w_b.d.mts +1360 -0
  148. package/dist/content-CmqAwdFL.d.ts +1360 -0
  149. package/dist/core-plugins.d.mts +63 -0
  150. package/dist/core-plugins.d.ts +63 -0
  151. package/dist/core-plugins.js +1 -0
  152. package/dist/core-plugins.mjs +1 -0
  153. package/dist/core.d.mts +398 -0
  154. package/dist/core.d.ts +398 -0
  155. package/dist/core.js +1 -0
  156. package/dist/core.mjs +1 -0
  157. package/dist/documentSerializer-BRaaXIHm.d.ts +36 -0
  158. package/dist/documentSerializer-DgO3A9av.d.mts +36 -0
  159. package/dist/docx/index.d.mts +1123 -0
  160. package/dist/docx/index.d.ts +1123 -0
  161. package/dist/docx/index.js +1 -0
  162. package/dist/docx/index.mjs +1 -0
  163. package/dist/docx/parser.d.mts +108 -0
  164. package/dist/docx/parser.d.ts +108 -0
  165. package/dist/docx/parser.js +1 -0
  166. package/dist/docx/parser.mjs +1 -0
  167. package/dist/docx/rezip.d.mts +312 -0
  168. package/dist/docx/rezip.d.ts +312 -0
  169. package/dist/docx/rezip.js +1 -0
  170. package/dist/docx/rezip.mjs +1 -0
  171. package/dist/docx/serializer/index.d.mts +125 -0
  172. package/dist/docx/serializer/index.d.ts +125 -0
  173. package/dist/docx/serializer/index.js +1 -0
  174. package/dist/docx/serializer/index.mjs +1 -0
  175. package/dist/docx/wrapTypes.d.mts +19 -0
  176. package/dist/docx/wrapTypes.d.ts +19 -0
  177. package/dist/docx/wrapTypes.js +1 -0
  178. package/dist/docx/wrapTypes.mjs +1 -0
  179. package/dist/docxInput-DTbCa48g.d.mts +21 -0
  180. package/dist/docxInput-DTbCa48g.d.ts +21 -0
  181. package/dist/executor-DZAMMQ35.js +1 -0
  182. package/dist/executor-ZCJRLT3Z.mjs +1 -0
  183. package/dist/findParagraphByParaId-Maw_8M5D.d.mts +28 -0
  184. package/dist/findParagraphByParaId-Maw_8M5D.d.ts +28 -0
  185. package/dist/fontLoader-8b4X-AIh.d.mts +283 -0
  186. package/dist/fontLoader-CK2QLq68.d.ts +283 -0
  187. package/dist/footnotes-lCH_P3N3.d.mts +78 -0
  188. package/dist/footnotes-skVvEHvZ.d.ts +78 -0
  189. package/dist/formatting-BH4hcZiq.d.mts +410 -0
  190. package/dist/formatting-_OXU8gLB.d.ts +410 -0
  191. package/dist/headerFooterLayout-72Vz7yp3.d.mts +292 -0
  192. package/dist/headerFooterLayout-Ca4ESDHF.d.ts +292 -0
  193. package/dist/headless.d.mts +109 -0
  194. package/dist/headless.d.ts +109 -0
  195. package/dist/headless.js +1 -0
  196. package/dist/headless.mjs +1 -0
  197. package/dist/layout-bridge/clickToPositionDom.d.mts +56 -0
  198. package/dist/layout-bridge/clickToPositionDom.d.ts +56 -0
  199. package/dist/layout-bridge/clickToPositionDom.js +1 -0
  200. package/dist/layout-bridge/clickToPositionDom.mjs +1 -0
  201. package/dist/layout-bridge/index.d.mts +462 -0
  202. package/dist/layout-bridge/index.d.ts +462 -0
  203. package/dist/layout-bridge/index.js +1 -0
  204. package/dist/layout-bridge/index.mjs +1 -0
  205. package/dist/layout-bridge/measuring/index.d.mts +377 -0
  206. package/dist/layout-bridge/measuring/index.d.ts +377 -0
  207. package/dist/layout-bridge/measuring/index.js +1 -0
  208. package/dist/layout-bridge/measuring/index.mjs +1 -0
  209. package/dist/layout-bridge/tableInsertHover.d.mts +45 -0
  210. package/dist/layout-bridge/tableInsertHover.d.ts +45 -0
  211. package/dist/layout-bridge/tableInsertHover.js +1 -0
  212. package/dist/layout-bridge/tableInsertHover.mjs +1 -0
  213. package/dist/layout-bridge/toFlowBlocks.d.mts +130 -0
  214. package/dist/layout-bridge/toFlowBlocks.d.ts +130 -0
  215. package/dist/layout-bridge/toFlowBlocks.js +1 -0
  216. package/dist/layout-bridge/toFlowBlocks.mjs +1 -0
  217. package/dist/layout-engine/index.d.mts +352 -0
  218. package/dist/layout-engine/index.d.ts +352 -0
  219. package/dist/layout-engine/index.js +1 -0
  220. package/dist/layout-engine/index.mjs +1 -0
  221. package/dist/layout-engine/types.d.mts +943 -0
  222. package/dist/layout-engine/types.d.ts +943 -0
  223. package/dist/layout-engine/types.js +1 -0
  224. package/dist/layout-engine/types.mjs +1 -0
  225. package/dist/layout-painter/index.d.mts +22 -0
  226. package/dist/layout-painter/index.d.ts +22 -0
  227. package/dist/layout-painter/index.js +1 -0
  228. package/dist/layout-painter/index.mjs +1 -0
  229. package/dist/layout-painter/renderPage.d.mts +680 -0
  230. package/dist/layout-painter/renderPage.d.ts +680 -0
  231. package/dist/layout-painter/renderPage.js +1 -0
  232. package/dist/layout-painter/renderPage.mjs +1 -0
  233. package/dist/managers/AutoSaveManager.d.mts +95 -0
  234. package/dist/managers/AutoSaveManager.d.ts +95 -0
  235. package/dist/managers/AutoSaveManager.js +1 -0
  236. package/dist/managers/AutoSaveManager.mjs +1 -0
  237. package/dist/managers/TableSelectionManager.d.mts +94 -0
  238. package/dist/managers/TableSelectionManager.d.ts +94 -0
  239. package/dist/managers/TableSelectionManager.js +1 -0
  240. package/dist/managers/TableSelectionManager.mjs +1 -0
  241. package/dist/managers/types.d.mts +121 -0
  242. package/dist/managers/types.d.ts +121 -0
  243. package/dist/managers/types.js +1 -0
  244. package/dist/managers/types.mjs +0 -0
  245. package/dist/marks-BY573yZn.d.mts +56 -0
  246. package/dist/marks-CjC9tF5k.d.ts +56 -0
  247. package/dist/mcp-cli.mjs +138 -0
  248. package/dist/mcp.d.mts +183 -0
  249. package/dist/mcp.d.ts +183 -0
  250. package/dist/mcp.js +16 -0
  251. package/dist/mcp.mjs +16 -0
  252. package/dist/nodes-7753Bgi_.d.mts +320 -0
  253. package/dist/nodes-CC_nwkT_.d.ts +320 -0
  254. package/dist/plugin-api/RenderedDomContext.d.mts +74 -0
  255. package/dist/plugin-api/RenderedDomContext.d.ts +74 -0
  256. package/dist/plugin-api/RenderedDomContext.js +1 -0
  257. package/dist/plugin-api/RenderedDomContext.mjs +1 -0
  258. package/dist/plugin-api/index.d.mts +15 -0
  259. package/dist/plugin-api/index.d.ts +15 -0
  260. package/dist/plugin-api/index.js +1 -0
  261. package/dist/plugin-api/index.mjs +0 -0
  262. package/dist/plugin-api/resolveItemPositions.d.mts +54 -0
  263. package/dist/plugin-api/resolveItemPositions.d.ts +54 -0
  264. package/dist/plugin-api/resolveItemPositions.js +1 -0
  265. package/dist/plugin-api/resolveItemPositions.mjs +1 -0
  266. package/dist/plugin-api/types.d.mts +190 -0
  267. package/dist/plugin-api/types.d.ts +190 -0
  268. package/dist/plugin-api/types.js +1 -0
  269. package/dist/plugin-api/types.mjs +0 -0
  270. package/dist/processTemplate-GPFDLQMX.mjs +1 -0
  271. package/dist/processTemplate-HH2E3HBO.js +1 -0
  272. package/dist/prosemirror/commands/formatting.d.mts +100 -0
  273. package/dist/prosemirror/commands/formatting.d.ts +100 -0
  274. package/dist/prosemirror/commands/formatting.js +1 -0
  275. package/dist/prosemirror/commands/formatting.mjs +1 -0
  276. package/dist/prosemirror/commands/index.d.mts +188 -0
  277. package/dist/prosemirror/commands/index.d.ts +188 -0
  278. package/dist/prosemirror/commands/index.js +1 -0
  279. package/dist/prosemirror/commands/index.mjs +1 -0
  280. package/dist/prosemirror/commands/pageBreak.d.mts +20 -0
  281. package/dist/prosemirror/commands/pageBreak.d.ts +20 -0
  282. package/dist/prosemirror/commands/pageBreak.js +1 -0
  283. package/dist/prosemirror/commands/pageBreak.mjs +1 -0
  284. package/dist/prosemirror/commands/paragraph.d.mts +70 -0
  285. package/dist/prosemirror/commands/paragraph.d.ts +70 -0
  286. package/dist/prosemirror/commands/paragraph.js +1 -0
  287. package/dist/prosemirror/commands/paragraph.mjs +1 -0
  288. package/dist/prosemirror/conversion/fromProseDoc.d.mts +65 -0
  289. package/dist/prosemirror/conversion/fromProseDoc.d.ts +65 -0
  290. package/dist/prosemirror/conversion/fromProseDoc.js +1 -0
  291. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -0
  292. package/dist/prosemirror/conversion/index.d.mts +85 -0
  293. package/dist/prosemirror/conversion/index.d.ts +85 -0
  294. package/dist/prosemirror/conversion/index.js +1 -0
  295. package/dist/prosemirror/conversion/index.mjs +1 -0
  296. package/dist/prosemirror/editor.css +823 -0
  297. package/dist/prosemirror/extensions/index.d.mts +79 -0
  298. package/dist/prosemirror/extensions/index.d.ts +79 -0
  299. package/dist/prosemirror/extensions/index.js +1 -0
  300. package/dist/prosemirror/extensions/index.mjs +1 -0
  301. package/dist/prosemirror/extensions/nodes/TableExtension.d.mts +30 -0
  302. package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +30 -0
  303. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -0
  304. package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -0
  305. package/dist/prosemirror/index.d.mts +70 -0
  306. package/dist/prosemirror/index.d.ts +70 -0
  307. package/dist/prosemirror/index.js +1 -0
  308. package/dist/prosemirror/index.mjs +1 -0
  309. package/dist/prosemirror/plugins/index.d.mts +154 -0
  310. package/dist/prosemirror/plugins/index.d.ts +154 -0
  311. package/dist/prosemirror/plugins/index.js +1 -0
  312. package/dist/prosemirror/plugins/index.mjs +1 -0
  313. package/dist/prosemirror/plugins/selectionTracker.d.mts +78 -0
  314. package/dist/prosemirror/plugins/selectionTracker.d.ts +78 -0
  315. package/dist/prosemirror/plugins/selectionTracker.js +1 -0
  316. package/dist/prosemirror/plugins/selectionTracker.mjs +1 -0
  317. package/dist/prosemirror/schema/index.d.mts +29 -0
  318. package/dist/prosemirror/schema/index.d.ts +29 -0
  319. package/dist/prosemirror/schema/index.js +1 -0
  320. package/dist/prosemirror/schema/index.mjs +1 -0
  321. package/dist/prosemirror/styles/index.d.mts +124 -0
  322. package/dist/prosemirror/styles/index.d.ts +124 -0
  323. package/dist/prosemirror/styles/index.js +1 -0
  324. package/dist/prosemirror/styles/index.mjs +1 -0
  325. package/dist/prosemirror/template/prosemirror-plugin.d.mts +66 -0
  326. package/dist/prosemirror/template/prosemirror-plugin.d.ts +66 -0
  327. package/dist/prosemirror/template/prosemirror-plugin.js +15 -0
  328. package/dist/prosemirror/template/prosemirror-plugin.mjs +15 -0
  329. package/dist/prosemirror/utils/ClickPositionResolver.d.mts +109 -0
  330. package/dist/prosemirror/utils/ClickPositionResolver.d.ts +109 -0
  331. package/dist/prosemirror/utils/ClickPositionResolver.js +1 -0
  332. package/dist/prosemirror/utils/ClickPositionResolver.mjs +1 -0
  333. package/dist/prosemirror/utils/LayoutSelectionGate.d.mts +81 -0
  334. package/dist/prosemirror/utils/LayoutSelectionGate.d.ts +81 -0
  335. package/dist/prosemirror/utils/LayoutSelectionGate.js +1 -0
  336. package/dist/prosemirror/utils/LayoutSelectionGate.mjs +1 -0
  337. package/dist/prosemirror/utils/PointerEventHandler.d.mts +94 -0
  338. package/dist/prosemirror/utils/PointerEventHandler.d.ts +94 -0
  339. package/dist/prosemirror/utils/PointerEventHandler.js +1 -0
  340. package/dist/prosemirror/utils/PointerEventHandler.mjs +1 -0
  341. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +85 -0
  342. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +85 -0
  343. package/dist/prosemirror/utils/extractTrackedChanges.js +1 -0
  344. package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -0
  345. package/dist/prosemirror/utils/visualLineNavigation.d.mts +45 -0
  346. package/dist/prosemirror/utils/visualLineNavigation.d.ts +45 -0
  347. package/dist/prosemirror/utils/visualLineNavigation.js +1 -0
  348. package/dist/prosemirror/utils/visualLineNavigation.mjs +1 -0
  349. package/dist/registry-Cpyybgij.d.mts +165 -0
  350. package/dist/registry-E5pahPKL.d.ts +165 -0
  351. package/dist/selectionContext-BPAqgNgk.d.ts +570 -0
  352. package/dist/selectionContext-CoZat7QZ.d.mts +570 -0
  353. package/dist/selectiveSave-CWaPEv0B.d.ts +31 -0
  354. package/dist/selectiveSave-jinP_4xa.d.mts +31 -0
  355. package/dist/selectiveXmlPatch-ypkxlTD_.d.mts +23 -0
  356. package/dist/selectiveXmlPatch-ypkxlTD_.d.ts +23 -0
  357. package/dist/styles-BBv7doYK.d.ts +233 -0
  358. package/dist/styles-EI2lxeEN.d.mts +233 -0
  359. package/dist/table-P8esKWAc.d.ts +82 -0
  360. package/dist/table-_t_W8oQf.d.mts +82 -0
  361. package/dist/types/agentApi.d.mts +467 -0
  362. package/dist/types/agentApi.d.ts +467 -0
  363. package/dist/types/agentApi.js +1 -0
  364. package/dist/types/agentApi.mjs +1 -0
  365. package/dist/types/content.d.mts +18 -0
  366. package/dist/types/content.d.ts +18 -0
  367. package/dist/types/content.js +1 -0
  368. package/dist/types/content.mjs +0 -0
  369. package/dist/types/document.d.mts +123 -0
  370. package/dist/types/document.d.ts +123 -0
  371. package/dist/types/document.js +1 -0
  372. package/dist/types/document.mjs +0 -0
  373. package/dist/types-DXG7vqe9.d.ts +311 -0
  374. package/dist/types-RchZmPFN.d.mts +137 -0
  375. package/dist/types-RchZmPFN.d.ts +137 -0
  376. package/dist/types-dYdjUZMo.d.mts +311 -0
  377. package/dist/utils/cardStyles.d.mts +31 -0
  378. package/dist/utils/cardStyles.d.ts +31 -0
  379. package/dist/utils/cardStyles.js +1 -0
  380. package/dist/utils/cardStyles.mjs +1 -0
  381. package/dist/utils/comments.d.mts +121 -0
  382. package/dist/utils/comments.d.ts +121 -0
  383. package/dist/utils/comments.js +1 -0
  384. package/dist/utils/comments.mjs +1 -0
  385. package/dist/utils/findReplace.d.mts +114 -0
  386. package/dist/utils/findReplace.d.ts +114 -0
  387. package/dist/utils/findReplace.js +2 -0
  388. package/dist/utils/findReplace.mjs +2 -0
  389. package/dist/utils/findVerticalScrollParent.d.mts +25 -0
  390. package/dist/utils/findVerticalScrollParent.d.ts +25 -0
  391. package/dist/utils/findVerticalScrollParent.js +1 -0
  392. package/dist/utils/findVerticalScrollParent.mjs +1 -0
  393. package/dist/utils/fontOptions.d.mts +21 -0
  394. package/dist/utils/fontOptions.d.ts +21 -0
  395. package/dist/utils/fontOptions.js +1 -0
  396. package/dist/utils/fontOptions.mjs +1 -0
  397. package/dist/utils/headingCollector.d.mts +32 -0
  398. package/dist/utils/headingCollector.d.ts +32 -0
  399. package/dist/utils/headingCollector.js +1 -0
  400. package/dist/utils/headingCollector.mjs +1 -0
  401. package/dist/utils/highlightColors.d.mts +14 -0
  402. package/dist/utils/highlightColors.d.ts +14 -0
  403. package/dist/utils/highlightColors.js +1 -0
  404. package/dist/utils/highlightColors.mjs +1 -0
  405. package/dist/utils/index.d.mts +710 -0
  406. package/dist/utils/index.d.ts +710 -0
  407. package/dist/utils/index.js +82 -0
  408. package/dist/utils/index.mjs +82 -0
  409. package/dist/utils/listState.d.mts +27 -0
  410. package/dist/utils/listState.d.ts +27 -0
  411. package/dist/utils/listState.js +1 -0
  412. package/dist/utils/listState.mjs +1 -0
  413. package/dist/utils/reportIssue.d.mts +23 -0
  414. package/dist/utils/reportIssue.d.ts +23 -0
  415. package/dist/utils/reportIssue.js +2 -0
  416. package/dist/utils/reportIssue.mjs +2 -0
  417. package/dist/utils/sidebarConstants.d.mts +10 -0
  418. package/dist/utils/sidebarConstants.d.ts +10 -0
  419. package/dist/utils/sidebarConstants.js +1 -0
  420. package/dist/utils/sidebarConstants.mjs +1 -0
  421. package/dist/utils/textSelection.d.mts +92 -0
  422. package/dist/utils/textSelection.d.ts +92 -0
  423. package/dist/utils/textSelection.js +1 -0
  424. package/dist/utils/textSelection.mjs +1 -0
  425. package/dist/utils/units.d.mts +91 -0
  426. package/dist/utils/units.d.ts +91 -0
  427. package/dist/utils/units.js +1 -0
  428. package/dist/utils/units.mjs +1 -0
  429. package/dist/variableDetector-DF3-nxUC.d.mts +115 -0
  430. package/dist/variableDetector-sBkgVh3f.d.ts +115 -0
  431. package/package.json +565 -0
@@ -0,0 +1,1360 @@
1
+ import { P as ParagraphFormatting, T as TextFormatting, a as TableFormatting, b as TableRowFormatting, c as TableCellFormatting } from './formatting-_OXU8gLB.js';
2
+ import { WrapType } from './docx/wrapTypes.js';
3
+ import { B as BorderSpec, C as ColorValue, T as ThemeColorSlot } from './colors-C3vA7HUU.js';
4
+
5
+ /**
6
+ * Lists & Numbering Types
7
+ *
8
+ * Types for bullet lists, numbered lists, and numbering definitions.
9
+ */
10
+
11
+ /**
12
+ * Number format type
13
+ */
14
+ type NumberFormat = 'decimal' | 'upperRoman' | 'lowerRoman' | 'upperLetter' | 'lowerLetter' | 'ordinal' | 'cardinalText' | 'ordinalText' | 'hex' | 'chicago' | 'ideographDigital' | 'japaneseCounting' | 'aiueo' | 'iroha' | 'decimalFullWidth' | 'decimalHalfWidth' | 'japaneseLegal' | 'japaneseDigitalTenThousand' | 'decimalEnclosedCircle' | 'decimalFullWidth2' | 'aiueoFullWidth' | 'irohaFullWidth' | 'decimalZero' | 'bullet' | 'ganada' | 'chosung' | 'decimalEnclosedFullstop' | 'decimalEnclosedParen' | 'decimalEnclosedCircleChinese' | 'ideographEnclosedCircle' | 'ideographTraditional' | 'ideographZodiac' | 'ideographZodiacTraditional' | 'taiwaneseCounting' | 'ideographLegalTraditional' | 'taiwaneseCountingThousand' | 'taiwaneseDigital' | 'chineseCounting' | 'chineseLegalSimplified' | 'chineseCountingThousand' | 'koreanDigital' | 'koreanCounting' | 'koreanLegal' | 'koreanDigital2' | 'vietnameseCounting' | 'russianLower' | 'russianUpper' | 'none' | 'numberInDash' | 'hebrew1' | 'hebrew2' | 'arabicAlpha' | 'arabicAbjad' | 'hindiVowels' | 'hindiConsonants' | 'hindiNumbers' | 'hindiCounting' | 'thaiLetters' | 'thaiNumbers' | 'thaiCounting';
15
+ /**
16
+ * Multi-level suffix (what follows the number)
17
+ */
18
+ type LevelSuffix = 'tab' | 'space' | 'nothing';
19
+ /**
20
+ * One indentation level of an abstract numbering definition (`w:lvl`).
21
+ * Carries the number format, the marker template (`lvlText` — e.g.
22
+ * `"%1.%2."`), the level's paragraph properties (indent, hanging) and
23
+ * character properties (font, size, color for the marker itself).
24
+ *
25
+ * `ilvl` ranges 0-8 in standard Word documents.
26
+ */
27
+ interface ListLevel {
28
+ /** Level index (0-8) */
29
+ ilvl: number;
30
+ /** Starting number */
31
+ start?: number;
32
+ /** Number format */
33
+ numFmt: NumberFormat;
34
+ /** Level text (e.g., "%1." or "•") */
35
+ lvlText: string;
36
+ /** Justification */
37
+ lvlJc?: 'left' | 'center' | 'right';
38
+ /** Suffix after number */
39
+ suffix?: LevelSuffix;
40
+ /** Paragraph properties for this level */
41
+ pPr?: ParagraphFormatting;
42
+ /** Run properties for the number/bullet */
43
+ rPr?: TextFormatting;
44
+ /** Restart numbering from higher level */
45
+ lvlRestart?: number;
46
+ /** Is legal numbering style */
47
+ isLgl?: boolean;
48
+ /** Legacy settings */
49
+ legacy?: {
50
+ legacy?: boolean;
51
+ legacySpace?: number;
52
+ legacyIndent?: number;
53
+ };
54
+ }
55
+ /**
56
+ * Abstract numbering definition (`w:abstractNum`) — the reusable template
57
+ * for a list: which `NumberFormat` at each indentation level, what
58
+ * marker text, what paragraph/character formatting. Multiple
59
+ * `NumberingInstance`s (`w:num`) can reference one abstract numbering
60
+ * to share the template while keeping independent counters.
61
+ *
62
+ * See ECMA-376 §17.9.
63
+ */
64
+ interface AbstractNumbering {
65
+ /** Abstract numbering ID */
66
+ abstractNumId: number;
67
+ /** Multi-level type */
68
+ multiLevelType?: 'hybridMultilevel' | 'multilevel' | 'singleLevel';
69
+ /** Numbering style link */
70
+ numStyleLink?: string;
71
+ /** Style link */
72
+ styleLink?: string;
73
+ /** Level definitions */
74
+ levels: ListLevel[];
75
+ /** Name */
76
+ name?: string;
77
+ }
78
+ /**
79
+ * Numbering instance (w:num)
80
+ */
81
+ interface NumberingInstance {
82
+ /** Numbering ID (referenced by paragraphs) */
83
+ numId: number;
84
+ /** Reference to abstract numbering */
85
+ abstractNumId: number;
86
+ /** Level overrides */
87
+ levelOverrides?: Array<{
88
+ ilvl: number;
89
+ startOverride?: number;
90
+ lvl?: ListLevel;
91
+ }>;
92
+ }
93
+ /**
94
+ * Computed list marker for one paragraph — what the layout engine and
95
+ * painter need to render the "1.", "a)", "•" prefix. Not part of the
96
+ * wire format; the parser fills this from the `numbering.xml` chain plus
97
+ * the paragraph's `numPr`. Paragraphs without list rendering omit it.
98
+ */
99
+ interface ListRendering {
100
+ /** Computed marker text (e.g., "1.", "a)", "•") */
101
+ marker: string;
102
+ /** List level (0-8) */
103
+ level: number;
104
+ /** Numbering ID */
105
+ numId: number;
106
+ /** Whether this is a bullet or numbered list */
107
+ isBullet: boolean;
108
+ /** Number format type (decimal, lowerRoman, upperRoman, etc.) */
109
+ numFmt?: NumberFormat;
110
+ /** Whether the list marker is hidden (w:vanish on level rPr) */
111
+ markerHidden?: boolean;
112
+ /** Marker font family from numbering level rPr (ascii name) */
113
+ markerFontFamily?: string;
114
+ /** Marker font size from numbering level rPr, in points */
115
+ markerFontSize?: number;
116
+ /**
117
+ * Suffix character placed after the marker before body text (§17.9.25).
118
+ * Default is `tab`; `space` inserts a single space; `nothing` no gap.
119
+ * Drives marker-slot sizing in `getListMarkerInlineWidth`.
120
+ */
121
+ markerSuffix?: LevelSuffix;
122
+ /**
123
+ * NumberFormat for each level from 0..ilvl (inclusive).
124
+ * Used to resolve multi-level templates like "%1.%2." where each %N
125
+ * may need a different format (e.g., upperRoman parent + decimal child).
126
+ */
127
+ levelNumFmts?: NumberFormat[];
128
+ /** abstractNumId the paragraph's numId points to (counters key on this). */
129
+ abstractNumId?: number;
130
+ /**
131
+ * Start value from the numId's lvlOverride for the paragraph's ilvl, if any.
132
+ * Per ECMA-376 §17.9.18, this resets the shared abstractNum counter the
133
+ * first time the numId appears.
134
+ */
135
+ startOverride?: number;
136
+ }
137
+ /**
138
+ * Top-level numbering data from `numbering.xml` — the set of abstract
139
+ * templates and the per-document `NumberingInstance`s that reference
140
+ * them. Paragraphs reference a `numId` (instance), not an
141
+ * `abstractNumId` directly.
142
+ */
143
+ interface NumberingDefinitions {
144
+ /** Abstract numbering definitions */
145
+ abstractNums: AbstractNumbering[];
146
+ /** Numbering instances */
147
+ nums: NumberingInstance[];
148
+ }
149
+
150
+ /**
151
+ * Hyperlinks (`w:hyperlink`), bookmark markers (`w:bookmarkStart`/`End`),
152
+ * and field types (`w:fldSimple`, complex `w:fldChar` runs).
153
+ */
154
+
155
+ /**
156
+ * Hyperlink (`w:hyperlink`) — wraps runs in a clickable link. External
157
+ * targets resolve through the relationships part (`rId` → `href`);
158
+ * internal targets reference a `BookmarkStart` anchor by name.
159
+ */
160
+ interface Hyperlink {
161
+ type: 'hyperlink';
162
+ /** Relationship ID for external link */
163
+ rId?: string;
164
+ /** Resolved URL (from relationships) */
165
+ href?: string;
166
+ /** Internal bookmark anchor */
167
+ anchor?: string;
168
+ /** Tooltip text */
169
+ tooltip?: string;
170
+ /** Target frame */
171
+ target?: string;
172
+ /** Link history tracking */
173
+ history?: boolean;
174
+ /** Document location */
175
+ docLocation?: string;
176
+ /** Child runs */
177
+ children: (Run | BookmarkStart | BookmarkEnd)[];
178
+ }
179
+ /**
180
+ * Bookmark start marker (w:bookmarkStart)
181
+ */
182
+ interface BookmarkStart {
183
+ type: 'bookmarkStart';
184
+ /** Bookmark ID */
185
+ id: number;
186
+ /** Bookmark name */
187
+ name: string;
188
+ /** Column index for table bookmarks */
189
+ colFirst?: number;
190
+ colLast?: number;
191
+ }
192
+ /**
193
+ * Bookmark end marker (w:bookmarkEnd)
194
+ */
195
+ interface BookmarkEnd {
196
+ type: 'bookmarkEnd';
197
+ /** Bookmark ID */
198
+ id: number;
199
+ }
200
+ /**
201
+ * Known field types
202
+ */
203
+ type FieldType = 'PAGE' | 'NUMPAGES' | 'NUMWORDS' | 'NUMCHARS' | 'DATE' | 'TIME' | 'CREATEDATE' | 'SAVEDATE' | 'PRINTDATE' | 'AUTHOR' | 'TITLE' | 'SUBJECT' | 'KEYWORDS' | 'COMMENTS' | 'FILENAME' | 'FILESIZE' | 'TEMPLATE' | 'DOCPROPERTY' | 'DOCVARIABLE' | 'REF' | 'PAGEREF' | 'NOTEREF' | 'HYPERLINK' | 'TOC' | 'TOA' | 'INDEX' | 'SEQ' | 'STYLEREF' | 'AUTONUM' | 'AUTONUMLGL' | 'AUTONUMOUT' | 'IF' | 'MERGEFIELD' | 'NEXT' | 'NEXTIF' | 'ASK' | 'SET' | 'QUOTE' | 'INCLUDETEXT' | 'INCLUDEPICTURE' | 'SYMBOL' | 'ADVANCE' | 'EDITTIME' | 'REVNUM' | 'SECTION' | 'SECTIONPAGES' | 'USERADDRESS' | 'USERNAME' | 'USERINITIALS' | 'UNKNOWN';
204
+ /**
205
+ * Simple field (w:fldSimple)
206
+ */
207
+ interface SimpleField {
208
+ type: 'simpleField';
209
+ /** Field instruction (e.g., "PAGE \\* MERGEFORMAT") */
210
+ instruction: string;
211
+ /** Parsed field type */
212
+ fieldType: FieldType;
213
+ /** Current display value */
214
+ content: (Run | Hyperlink)[];
215
+ /** Field is locked */
216
+ fldLock?: boolean;
217
+ /** Field is dirty */
218
+ dirty?: boolean;
219
+ }
220
+ /**
221
+ * Complex field (w:fldChar begin/separate/end with w:instrText)
222
+ */
223
+ interface ComplexField {
224
+ type: 'complexField';
225
+ /** Field instruction */
226
+ instruction: string;
227
+ /** Parsed field type */
228
+ fieldType: FieldType;
229
+ /** Field code runs */
230
+ fieldCode: Run[];
231
+ /** Display result runs */
232
+ fieldResult: Run[];
233
+ /** Field is locked */
234
+ fldLock?: boolean;
235
+ /** Field is dirty */
236
+ dirty?: boolean;
237
+ }
238
+ type Field = SimpleField | ComplexField;
239
+
240
+ /**
241
+ * Math equations (`m:oMath`, `m:oMathPara`). OMML XML is round-tripped
242
+ * verbatim to preserve fidelity Word/Pages/Docs can disagree on.
243
+ */
244
+ /**
245
+ * Math equation content (m:oMath or m:oMathPara)
246
+ */
247
+ interface MathEquation {
248
+ type: 'mathEquation';
249
+ /** Whether this is a block (oMathPara) or inline (oMath) equation */
250
+ display: 'inline' | 'block';
251
+ /** Raw OMML XML for round-trip preservation */
252
+ ommlXml: string;
253
+ /** Plain text representation for accessibility/fallback */
254
+ plainText?: string;
255
+ }
256
+
257
+ /**
258
+ * Tracked-changes model — insertion/deletion/move wrappers, range
259
+ * markers, and per-element property-change wrappers (`w:rPrChange`,
260
+ * `w:pPrChange`, `w:tblPrChange`, `w:trPrChange`, `w:tcPrChange`) plus
261
+ * structural changes (row/cell insert/delete/merge).
262
+ */
263
+
264
+ /**
265
+ * Tracked change metadata (w:ins, w:del attributes)
266
+ */
267
+ interface TrackedChangeInfo {
268
+ /** Revision ID */
269
+ id: number;
270
+ /** Author who made the change */
271
+ author: string;
272
+ /** Date of the change */
273
+ date?: string;
274
+ }
275
+ /**
276
+ * Tracked-change attribute triple as it appears on PM node attrs
277
+ * (`paragraph.pPrIns`, `tableRow.trIns`, etc). Mirrors `TrackedChangeInfo`
278
+ * but with a `null` date (PM attr defaults) and a `revisionId` name that
279
+ * matches OOXML's `w:id` more idiomatically on the editor side.
280
+ *
281
+ * Round-trip pairs with `TrackedChangeInfo` via
282
+ * `{ id, author, date? } ↔ { revisionId, author, date | null }`.
283
+ */
284
+ interface RevisionInfo {
285
+ revisionId: number;
286
+ author: string;
287
+ date: string | null;
288
+ }
289
+ /**
290
+ * Tracked-cell marker — the OOXML `<w:cellIns>` / `<w:cellDel>` /
291
+ * `<w:cellMerge>` shape attached to a `TableCell` PM node and surfaced
292
+ * to the layout model and painter for visual rendering.
293
+ *
294
+ * `kind` matches the OOXML element name (ins / del / merge).
295
+ */
296
+ interface CellMarker {
297
+ kind: 'ins' | 'del' | 'merge';
298
+ info: RevisionInfo;
299
+ }
300
+ /**
301
+ * Generic tracked property-change wrapper metadata (w:*PrChange)
302
+ */
303
+ interface PropertyChangeInfo extends TrackedChangeInfo {
304
+ /** Optional revision session ID */
305
+ rsid?: string;
306
+ }
307
+ /**
308
+ * Insertion wrapper (w:ins) — runs inserted by tracked changes
309
+ */
310
+ interface Insertion {
311
+ type: 'insertion';
312
+ /** Tracked change metadata */
313
+ info: TrackedChangeInfo;
314
+ /** Inserted content */
315
+ content: (Run | Hyperlink)[];
316
+ }
317
+ /**
318
+ * Deletion wrapper (w:del) — runs deleted by tracked changes
319
+ */
320
+ interface Deletion {
321
+ type: 'deletion';
322
+ /** Tracked change metadata */
323
+ info: TrackedChangeInfo;
324
+ /** Deleted content */
325
+ content: (Run | Hyperlink)[];
326
+ }
327
+ /**
328
+ * Move-from wrapper (w:moveFrom) — content moved away from this position
329
+ */
330
+ interface MoveFrom {
331
+ type: 'moveFrom';
332
+ /** Tracked change metadata */
333
+ info: TrackedChangeInfo;
334
+ /** Moved content */
335
+ content: (Run | Hyperlink)[];
336
+ }
337
+ /**
338
+ * Move-to wrapper (w:moveTo) — content moved into this position
339
+ */
340
+ interface MoveTo {
341
+ type: 'moveTo';
342
+ /** Tracked change metadata */
343
+ info: TrackedChangeInfo;
344
+ /** Moved content */
345
+ content: (Run | Hyperlink)[];
346
+ }
347
+ /**
348
+ * Move-from range start marker (w:moveFromRangeStart) — ECMA-376 §17.13.5.22
349
+ * Pairs with moveFromRangeEnd to delimit the source of a move in the document.
350
+ */
351
+ interface MoveFromRangeStart {
352
+ type: 'moveFromRangeStart';
353
+ id: number;
354
+ name: string;
355
+ }
356
+ /**
357
+ * Move-from range end marker (w:moveFromRangeEnd)
358
+ */
359
+ interface MoveFromRangeEnd {
360
+ type: 'moveFromRangeEnd';
361
+ id: number;
362
+ }
363
+ /**
364
+ * Move-to range start marker (w:moveToRangeStart) — ECMA-376 §17.13.5.24
365
+ * Pairs with moveToRangeEnd to delimit the destination of a move.
366
+ */
367
+ interface MoveToRangeStart {
368
+ type: 'moveToRangeStart';
369
+ id: number;
370
+ name: string;
371
+ }
372
+ /**
373
+ * Move-to range end marker (w:moveToRangeEnd)
374
+ */
375
+ interface MoveToRangeEnd {
376
+ type: 'moveToRangeEnd';
377
+ id: number;
378
+ }
379
+ /**
380
+ * Run-level tracked wrappers represented in WordprocessingML.
381
+ */
382
+ type TrackedRunChange = Insertion | Deletion | MoveFrom | MoveTo;
383
+ /**
384
+ * Run property change (w:rPrChange)
385
+ */
386
+ interface RunPropertyChange {
387
+ type: 'runPropertyChange';
388
+ /** Tracked change metadata */
389
+ info: PropertyChangeInfo;
390
+ /** Run properties before the tracked change */
391
+ previousFormatting?: TextFormatting;
392
+ /** Run properties after the tracked change (editor model convenience) */
393
+ currentFormatting?: TextFormatting;
394
+ }
395
+ /**
396
+ * Paragraph property change (w:pPrChange)
397
+ */
398
+ interface ParagraphPropertyChange {
399
+ type: 'paragraphPropertyChange';
400
+ /** Tracked change metadata */
401
+ info: PropertyChangeInfo;
402
+ /** Paragraph properties before the tracked change */
403
+ previousFormatting?: ParagraphFormatting;
404
+ /** Paragraph properties after the tracked change (editor model convenience) */
405
+ currentFormatting?: ParagraphFormatting;
406
+ }
407
+ /**
408
+ * Table property change (w:tblPrChange)
409
+ */
410
+ interface TablePropertyChange {
411
+ type: 'tablePropertyChange';
412
+ /** Tracked change metadata */
413
+ info: PropertyChangeInfo;
414
+ /** Table properties before the tracked change */
415
+ previousFormatting?: TableFormatting;
416
+ /** Table properties after the tracked change (editor model convenience) */
417
+ currentFormatting?: TableFormatting;
418
+ }
419
+ /**
420
+ * Table row property change (w:trPrChange)
421
+ */
422
+ interface TableRowPropertyChange {
423
+ type: 'tableRowPropertyChange';
424
+ /** Tracked change metadata */
425
+ info: PropertyChangeInfo;
426
+ /** Row properties before the tracked change */
427
+ previousFormatting?: TableRowFormatting;
428
+ /** Row properties after the tracked change (editor model convenience) */
429
+ currentFormatting?: TableRowFormatting;
430
+ }
431
+ /**
432
+ * Table cell property change (w:tcPrChange)
433
+ */
434
+ interface TableCellPropertyChange {
435
+ type: 'tableCellPropertyChange';
436
+ /** Tracked change metadata */
437
+ info: PropertyChangeInfo;
438
+ /** Cell properties before the tracked change */
439
+ previousFormatting?: TableCellFormatting;
440
+ /** Cell properties after the tracked change (editor model convenience) */
441
+ currentFormatting?: TableCellFormatting;
442
+ }
443
+ /**
444
+ * Table structural tracked change metadata (row/cell insert/delete/merge)
445
+ */
446
+ interface TableStructuralChangeInfo {
447
+ type: 'tableRowInsertion' | 'tableRowDeletion' | 'tableCellInsertion' | 'tableCellDeletion' | 'tableCellMerge';
448
+ /** Tracked change metadata */
449
+ info: TrackedChangeInfo;
450
+ /**
451
+ * `<w:cellMerge w:vMerge="…">` value, only meaningful for `tableCellMerge`.
452
+ * Schema `ST_AnnotationVMerge`: `"rest"` = anchor (start of merged span),
453
+ * `"cont"` = continuation (merged into predecessor). Word's default for a
454
+ * tracked merge is `"cont"` (most edits track "this cell got merged INTO
455
+ * the one above"); we preserve the on-disk value when present.
456
+ */
457
+ vMerge?: 'rest' | 'cont';
458
+ /** `<w:cellMerge w:vMergeOrig="…">` — the pre-merge vMerge state. */
459
+ vMergeOrig?: 'rest' | 'cont';
460
+ }
461
+
462
+ /**
463
+ * Tables (`w:tbl`), rows (`w:tr`), and cells (`w:tc`).
464
+ */
465
+
466
+ /**
467
+ * Table cell (`w:tc`). Holds nested block content (paragraphs and nested
468
+ * tables), cell-level formatting (borders, shading, vertical merge),
469
+ * tracked property changes, and tracked structural changes for cell
470
+ * insert/delete/merge operations.
471
+ */
472
+ interface TableCell {
473
+ type: 'tableCell';
474
+ /** Cell formatting */
475
+ formatting?: TableCellFormatting;
476
+ /** Cell-level tracked property changes (w:tcPrChange) */
477
+ propertyChanges?: TableCellPropertyChange[];
478
+ /** Tracked structural changes (cell insert/delete/merge) */
479
+ structuralChange?: TableStructuralChangeInfo;
480
+ /** Cell content (paragraphs, tables, etc.) */
481
+ content: (Paragraph | Table)[];
482
+ }
483
+ /**
484
+ * Table row (`w:tr`) — an ordered list of `TableCell` plus row-level
485
+ * formatting (height, repeated header, cantSplit) and tracked changes
486
+ * for inserts/deletes.
487
+ */
488
+ interface TableRow {
489
+ type: 'tableRow';
490
+ /** Row formatting */
491
+ formatting?: TableRowFormatting;
492
+ /** Row-level tracked property changes (w:trPrChange) */
493
+ propertyChanges?: TableRowPropertyChange[];
494
+ /** Tracked structural changes (row insert/delete) */
495
+ structuralChange?: TableStructuralChangeInfo;
496
+ /** Cells in this row */
497
+ cells: TableCell[];
498
+ }
499
+ /**
500
+ * Table (`w:tbl`) — a block-level grid of rows × cells. Tables carry
501
+ * their own formatting layer (borders, shading, alignment, indent,
502
+ * floating placement) and an explicit column-width grid in twips. Tables
503
+ * can nest arbitrarily through `TableCell.content`.
504
+ *
505
+ * See ECMA-376 §17.4.
506
+ */
507
+ interface Table {
508
+ type: 'table';
509
+ /** Table formatting */
510
+ formatting?: TableFormatting;
511
+ /** Table-level tracked property changes (w:tblPrChange) */
512
+ propertyChanges?: TablePropertyChange[];
513
+ /** Column widths in twips */
514
+ columnWidths?: number[];
515
+ /** Table rows */
516
+ rows: TableRow[];
517
+ }
518
+
519
+ /**
520
+ * Structured Document Tags / content controls (`w:sdt`) — inline and
521
+ * block variants, plus properties (alias, tag, lock, list items,
522
+ * checkbox state) for the supported SDT types.
523
+ */
524
+
525
+ /**
526
+ * SDT type (content control type)
527
+ */
528
+ type SdtType = 'richText' | 'plainText' | 'date' | 'dropdown' | 'comboBox' | 'checkbox' | 'picture' | 'buildingBlockGallery' | 'group' | 'unknown';
529
+ /**
530
+ * SDT properties (w:sdtPr)
531
+ */
532
+ interface SdtProperties {
533
+ /** SDT type */
534
+ sdtType: SdtType;
535
+ /** Alias (friendly name) */
536
+ alias?: string;
537
+ /** Tag (developer identifier) */
538
+ tag?: string;
539
+ /** Lock content editing */
540
+ lock?: 'sdtLocked' | 'contentLocked' | 'sdtContentLocked' | 'unlocked';
541
+ /** Placeholder text */
542
+ placeholder?: string;
543
+ /** Whether showing placeholder */
544
+ showingPlaceholder?: boolean;
545
+ /** Date format for date controls */
546
+ dateFormat?: string;
547
+ /** Dropdown/combobox list items */
548
+ listItems?: {
549
+ displayText: string;
550
+ value: string;
551
+ }[];
552
+ /** Checkbox checked state */
553
+ checked?: boolean;
554
+ }
555
+ /**
556
+ * Inline SDT (content control within a paragraph)
557
+ */
558
+ interface InlineSdt {
559
+ type: 'inlineSdt';
560
+ /** SDT properties */
561
+ properties: SdtProperties;
562
+ /**
563
+ * Inline content held inside the control. OOXML allows runs,
564
+ * hyperlinks, simple/complex fields, nested SDTs, and math at this
565
+ * level; the renderer must descend into all of them so docProps-bound
566
+ * fields and similar template content survive paged rendering.
567
+ */
568
+ content: (Run | Hyperlink | SimpleField | ComplexField | InlineSdt | MathEquation)[];
569
+ }
570
+ /**
571
+ * Block-level SDT (content control wrapping paragraphs/tables)
572
+ */
573
+ interface BlockSdt {
574
+ type: 'blockSdt';
575
+ /** SDT properties */
576
+ properties: SdtProperties;
577
+ /** Block content inside the control */
578
+ content: (Paragraph | Table)[];
579
+ }
580
+
581
+ /**
582
+ * Comments (`w:comment` in `comments.xml`) and the inline range markers
583
+ * (`w:commentRangeStart`/`End`) that anchor them inside paragraphs.
584
+ */
585
+
586
+ /**
587
+ * A comment from `comments.xml` — the top-level entity for review
588
+ * comments and replies. `id` matches the inline `CommentRangeStart` /
589
+ * `CommentRangeEnd` markers that anchor it inside a paragraph; `parentId`
590
+ * threads replies under their parent; `done` reflects Word's "Resolve"
591
+ * state (`w15:done`).
592
+ */
593
+ interface Comment {
594
+ /** Comment ID (matches commentRangeStart/End) */
595
+ id: number;
596
+ /** Author name */
597
+ author: string;
598
+ /** Author initials */
599
+ initials?: string;
600
+ /** Date */
601
+ date?: string;
602
+ /** Comment content (paragraphs) */
603
+ content: Paragraph[];
604
+ /** Parent comment ID (for replies) */
605
+ parentId?: number;
606
+ /** Whether the comment is resolved/done */
607
+ done?: boolean;
608
+ }
609
+ /**
610
+ * Comment range start marker in paragraph content
611
+ */
612
+ interface CommentRangeStart {
613
+ type: 'commentRangeStart';
614
+ id: number;
615
+ }
616
+ /**
617
+ * Comment range end marker in paragraph content
618
+ */
619
+ interface CommentRangeEnd {
620
+ type: 'commentRangeEnd';
621
+ id: number;
622
+ }
623
+
624
+ /**
625
+ * Page furniture — headers (`w:hdr`), footers (`w:ftr`), footnotes
626
+ * (`w:footnote`), and endnotes (`w:endnote`), plus the section-level
627
+ * properties (`w:footnotePr`/`w:endnotePr`) that configure note layout.
628
+ */
629
+
630
+ /**
631
+ * Header/footer type
632
+ */
633
+ type HeaderFooterType = 'default' | 'first' | 'even';
634
+ /**
635
+ * Header or footer reference
636
+ */
637
+ interface HeaderReference {
638
+ type: HeaderFooterType;
639
+ rId: string;
640
+ }
641
+ interface FooterReference {
642
+ type: HeaderFooterType;
643
+ rId: string;
644
+ }
645
+ /**
646
+ * Header or footer content
647
+ */
648
+ interface HeaderFooter {
649
+ type: 'header' | 'footer';
650
+ /** Header/footer type */
651
+ hdrFtrType: HeaderFooterType;
652
+ /** Content (paragraphs, tables, etc.) */
653
+ content: (Paragraph | Table)[];
654
+ }
655
+ /**
656
+ * Footnote position
657
+ */
658
+ type FootnotePosition = 'pageBottom' | 'beneathText' | 'sectEnd' | 'docEnd';
659
+ /**
660
+ * Endnote position
661
+ */
662
+ type EndnotePosition = 'sectEnd' | 'docEnd';
663
+ /**
664
+ * Number restart type
665
+ */
666
+ type NoteNumberRestart = 'continuous' | 'eachSect' | 'eachPage';
667
+ /**
668
+ * Footnote properties
669
+ */
670
+ interface FootnoteProperties {
671
+ position?: FootnotePosition;
672
+ numFmt?: NumberFormat;
673
+ numStart?: number;
674
+ numRestart?: NoteNumberRestart;
675
+ }
676
+ /**
677
+ * Endnote properties
678
+ */
679
+ interface EndnoteProperties {
680
+ position?: EndnotePosition;
681
+ numFmt?: NumberFormat;
682
+ numStart?: number;
683
+ numRestart?: NoteNumberRestart;
684
+ }
685
+ /**
686
+ * Footnote (w:footnote)
687
+ */
688
+ interface Footnote {
689
+ type: 'footnote';
690
+ /** Footnote ID */
691
+ id: number;
692
+ /** Special footnote type */
693
+ noteType?: 'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice';
694
+ /**
695
+ * Content. Per ECMA-376 §17.11.10 footnotes can hold the same blocks as
696
+ * the body — paragraphs and tables. The parser previously only collected
697
+ * <w:p> children which silently dropped any <w:tbl> inside a footnote;
698
+ * widened to match HeaderFooter / TableCell shape so the body pipeline
699
+ * (toProseDoc → toFlowBlocks) can render them uniformly.
700
+ */
701
+ content: (Paragraph | Table)[];
702
+ }
703
+ /**
704
+ * Endnote (w:endnote)
705
+ */
706
+ interface Endnote {
707
+ type: 'endnote';
708
+ /** Endnote ID */
709
+ id: number;
710
+ /** Special endnote type */
711
+ noteType?: 'normal' | 'separator' | 'continuationSeparator' | 'continuationNotice';
712
+ /**
713
+ * Content. Per ECMA-376 §17.11.4 endnotes can hold the same blocks as
714
+ * the body — paragraphs and tables. See note on `Footnote.content`.
715
+ */
716
+ content: (Paragraph | Table)[];
717
+ }
718
+
719
+ /**
720
+ * Section properties (`w:sectPr`) — page size and margins, columns,
721
+ * header/footer references, line numbers, page borders, document grid,
722
+ * paper sources — plus the section and document-body containers that
723
+ * group block-level content.
724
+ */
725
+
726
+ /**
727
+ * Page orientation
728
+ */
729
+ type PageOrientation = 'portrait' | 'landscape';
730
+ /**
731
+ * Section start type
732
+ */
733
+ type SectionStart = 'continuous' | 'nextPage' | 'oddPage' | 'evenPage' | 'nextColumn';
734
+ /**
735
+ * Vertical alignment
736
+ */
737
+ type VerticalAlign = 'top' | 'center' | 'both' | 'bottom';
738
+ /**
739
+ * Line number restart type
740
+ */
741
+ type LineNumberRestart = 'continuous' | 'newPage' | 'newSection';
742
+ /**
743
+ * Column definition
744
+ */
745
+ interface Column {
746
+ /** Column width in twips */
747
+ width?: number;
748
+ /** Space after column in twips */
749
+ space?: number;
750
+ }
751
+ /**
752
+ * Section properties (`w:sectPr`) — page geometry, margins, columns,
753
+ * header/footer references, and page numbering for one section of the
754
+ * document. Sections are introduced by inline `sectPr` markers on the
755
+ * terminating paragraph (`Paragraph.sectionProperties`) and the body's
756
+ * final `sectPr`.
757
+ *
758
+ * All distance units are twips (1/20 of a point) on the wire. The layout
759
+ * engine converts to pixels.
760
+ *
761
+ * See ECMA-376 §17.6.
762
+ */
763
+ interface SectionProperties {
764
+ /** Page width in twips */
765
+ pageWidth?: number;
766
+ /** Page height in twips */
767
+ pageHeight?: number;
768
+ /** Page orientation */
769
+ orientation?: PageOrientation;
770
+ /** Top margin in twips */
771
+ marginTop?: number;
772
+ /** Bottom margin in twips */
773
+ marginBottom?: number;
774
+ /** Left margin in twips */
775
+ marginLeft?: number;
776
+ /** Right margin in twips */
777
+ marginRight?: number;
778
+ /** Header distance from top in twips */
779
+ headerDistance?: number;
780
+ /** Footer distance from bottom in twips */
781
+ footerDistance?: number;
782
+ /** Gutter margin in twips */
783
+ gutter?: number;
784
+ /** Number of columns */
785
+ columnCount?: number;
786
+ /** Space between columns in twips */
787
+ columnSpace?: number;
788
+ /** Equal width columns */
789
+ equalWidth?: boolean;
790
+ /** Separator line between columns */
791
+ separator?: boolean;
792
+ /** Individual column definitions */
793
+ columns?: Column[];
794
+ /** Section start type */
795
+ sectionStart?: SectionStart;
796
+ /** Vertical alignment of text */
797
+ verticalAlign?: VerticalAlign;
798
+ /** Right-to-left section */
799
+ bidi?: boolean;
800
+ /** Header references */
801
+ headerReferences?: HeaderReference[];
802
+ /** Footer references */
803
+ footerReferences?: FooterReference[];
804
+ /** Different first page header/footer */
805
+ titlePg?: boolean;
806
+ /** Different odd/even page headers/footers */
807
+ evenAndOddHeaders?: boolean;
808
+ /** Line numbering settings */
809
+ lineNumbers?: {
810
+ start?: number;
811
+ countBy?: number;
812
+ distance?: number;
813
+ restart?: LineNumberRestart;
814
+ };
815
+ /** Page borders */
816
+ pageBorders?: {
817
+ top?: BorderSpec;
818
+ bottom?: BorderSpec;
819
+ left?: BorderSpec;
820
+ right?: BorderSpec;
821
+ /** Display setting */
822
+ display?: 'allPages' | 'firstPage' | 'notFirstPage';
823
+ /** Offset from */
824
+ offsetFrom?: 'page' | 'text';
825
+ /** Z-order */
826
+ zOrder?: 'front' | 'back';
827
+ };
828
+ /** Page background */
829
+ background?: {
830
+ color?: ColorValue;
831
+ themeColor?: ThemeColorSlot;
832
+ themeTint?: string;
833
+ themeShade?: string;
834
+ };
835
+ /** Footnote properties for this section */
836
+ footnotePr?: FootnoteProperties;
837
+ /** Endnote properties for this section */
838
+ endnotePr?: EndnoteProperties;
839
+ /** Document grid */
840
+ docGrid?: {
841
+ type?: 'default' | 'lines' | 'linesAndChars' | 'snapToChars';
842
+ linePitch?: number;
843
+ charSpace?: number;
844
+ };
845
+ /** First page paper source */
846
+ paperSrcFirst?: number;
847
+ /** Other pages paper source */
848
+ paperSrcOther?: number;
849
+ }
850
+ /**
851
+ * Block-level content types
852
+ */
853
+ type BlockContent = Paragraph | Table | BlockSdt;
854
+ /**
855
+ * One section of the document — a `SectionProperties` plus the block
856
+ * content (`Paragraph`s and `Table`s) that lives under those properties.
857
+ *
858
+ * Sections are derived during parse: every paragraph carrying an inline
859
+ * `sectPr` ends a section, and the body's final `sectPr` defines the
860
+ * last section. Each section may carry its own headers/footers map.
861
+ */
862
+ interface Section {
863
+ /** Section properties */
864
+ properties: SectionProperties;
865
+ /** Content in this section */
866
+ content: BlockContent[];
867
+ /** Headers for this section */
868
+ headers?: Map<HeaderFooterType, HeaderFooter>;
869
+ /** Footers for this section */
870
+ footers?: Map<HeaderFooterType, HeaderFooter>;
871
+ }
872
+ /**
873
+ * Document body (`w:body`) — the editable content of the document.
874
+ *
875
+ * Contains the ordered block content (paragraphs and tables), the section
876
+ * layout chain derived from inline `sectPr` markers, the final `sectPr`,
877
+ * and any document-level comments. This is what most edit operations
878
+ * mutate; headers/footers/styles live elsewhere in the package.
879
+ */
880
+ interface DocumentBody {
881
+ /** All content (paragraphs, tables) */
882
+ content: BlockContent[];
883
+ /** Sections (derived from sectPr in paragraphs and final sectPr) */
884
+ sections?: Section[];
885
+ /** Final section properties (from body's sectPr) */
886
+ finalSectionProperties?: SectionProperties;
887
+ /** Comments from comments.xml */
888
+ comments?: Comment[];
889
+ }
890
+
891
+ /**
892
+ * Paragraph (`w:p`) — the union of inline content that can sit inside a
893
+ * paragraph (runs, hyperlinks, bookmarks, fields, SDT, comment ranges,
894
+ * tracked-change wrappers, math) plus paragraph-level metadata
895
+ * (formatting, list rendering, optional terminating section properties).
896
+ */
897
+
898
+ /**
899
+ * Inline content that can appear inside a paragraph. Covers runs (text),
900
+ * hyperlinks, bookmarks, fields, structured document tags, comment range
901
+ * markers, tracked-change wrappers, and math equations. Every node in
902
+ * this union carries a `type` discriminator so consumers can narrow at
903
+ * runtime.
904
+ */
905
+ type ParagraphContent = Run | Hyperlink | BookmarkStart | BookmarkEnd | SimpleField | ComplexField | InlineSdt | CommentRangeStart | CommentRangeEnd | Insertion | Deletion | MoveFrom | MoveTo | MoveFromRangeStart | MoveFromRangeEnd | MoveToRangeStart | MoveToRangeEnd | MathEquation;
906
+ /**
907
+ * Paragraph (`w:p`) — the primary block-level container in a Word document.
908
+ *
909
+ * Every paragraph carries direct formatting (`formatting`), tracked
910
+ * property changes (`propertyChanges`), inline content (`content`), and
911
+ * optional list rendering / section break metadata. `paraId` is Word's
912
+ * stable identifier (`w14:paraId`) and is what `EditorBridge` and the
913
+ * agent toolkit use to address paragraphs.
914
+ *
915
+ * See ECMA-376 §17.3.1.
916
+ */
917
+ interface Paragraph {
918
+ type: 'paragraph';
919
+ /** Unique paragraph ID */
920
+ paraId?: string;
921
+ /** Text ID */
922
+ textId?: string;
923
+ /** Paragraph formatting */
924
+ formatting?: ParagraphFormatting;
925
+ /** Paragraph-level tracked property changes (w:pPrChange) */
926
+ propertyChanges?: ParagraphPropertyChange[];
927
+ /**
928
+ * Paragraph-mark insertion tracking (`<w:pPr><w:rPr><w:ins/>`). Set when
929
+ * this paragraph's terminating pilcrow was added as a tracked change —
930
+ * e.g., the user pressed Enter mid-paragraph in suggesting mode. Reject
931
+ * joins this paragraph with the following one.
932
+ */
933
+ pPrIns?: TrackedChangeInfo;
934
+ /**
935
+ * Paragraph-mark deletion tracking (`<w:pPr><w:rPr><w:del/>`). Set when
936
+ * this paragraph's terminating pilcrow was deleted as a tracked change —
937
+ * e.g., the user pressed Backspace at the start of the next paragraph in
938
+ * suggesting mode. Accept joins this paragraph with the following one.
939
+ */
940
+ pPrDel?: TrackedChangeInfo;
941
+ /** Paragraph content */
942
+ content: ParagraphContent[];
943
+ /** Computed list rendering (if this is a list item) */
944
+ listRendering?: ListRendering;
945
+ /** Word's cached layout says this paragraph started on a new rendered page. */
946
+ renderedPageBreakBefore?: boolean;
947
+ /** Section properties (if this paragraph ends a section) */
948
+ sectionProperties?: SectionProperties;
949
+ }
950
+
951
+ /**
952
+ * DrawingML shapes (`wps:wsp`) and text boxes — preset shape types,
953
+ * fill, outline, shape text body, transform.
954
+ */
955
+
956
+ /**
957
+ * Shape types
958
+ */
959
+ type ShapeType = 'rect' | 'roundRect' | 'ellipse' | 'triangle' | 'rtTriangle' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'hexagon' | 'heptagon' | 'octagon' | 'decagon' | 'dodecagon' | 'star4' | 'star5' | 'star6' | 'star7' | 'star8' | 'star10' | 'star12' | 'star16' | 'star24' | 'star32' | 'line' | 'straightConnector1' | 'bentConnector2' | 'bentConnector3' | 'bentConnector4' | 'bentConnector5' | 'curvedConnector2' | 'curvedConnector3' | 'curvedConnector4' | 'curvedConnector5' | 'rightArrow' | 'leftArrow' | 'upArrow' | 'downArrow' | 'leftRightArrow' | 'upDownArrow' | 'quadArrow' | 'leftRightUpArrow' | 'bentArrow' | 'uturnArrow' | 'leftUpArrow' | 'bentUpArrow' | 'curvedRightArrow' | 'curvedLeftArrow' | 'curvedUpArrow' | 'curvedDownArrow' | 'stripedRightArrow' | 'notchedRightArrow' | 'homePlate' | 'chevron' | 'rightArrowCallout' | 'downArrowCallout' | 'leftArrowCallout' | 'upArrowCallout' | 'leftRightArrowCallout' | 'quadArrowCallout' | 'circularArrow' | 'flowChartProcess' | 'flowChartAlternateProcess' | 'flowChartDecision' | 'flowChartInputOutput' | 'flowChartPredefinedProcess' | 'flowChartInternalStorage' | 'flowChartDocument' | 'flowChartMultidocument' | 'flowChartTerminator' | 'flowChartPreparation' | 'flowChartManualInput' | 'flowChartManualOperation' | 'flowChartConnector' | 'flowChartOffpageConnector' | 'flowChartPunchedCard' | 'flowChartPunchedTape' | 'flowChartSummingJunction' | 'flowChartOr' | 'flowChartCollate' | 'flowChartSort' | 'flowChartExtract' | 'flowChartMerge' | 'flowChartOnlineStorage' | 'flowChartDelay' | 'flowChartMagneticTape' | 'flowChartMagneticDisk' | 'flowChartMagneticDrum' | 'flowChartDisplay' | 'wedgeRectCallout' | 'wedgeRoundRectCallout' | 'wedgeEllipseCallout' | 'cloudCallout' | 'borderCallout1' | 'borderCallout2' | 'borderCallout3' | 'accentCallout1' | 'accentCallout2' | 'accentCallout3' | 'callout1' | 'callout2' | 'callout3' | 'accentBorderCallout1' | 'accentBorderCallout2' | 'accentBorderCallout3' | 'actionButtonBlank' | 'actionButtonHome' | 'actionButtonHelp' | 'actionButtonInformation' | 'actionButtonBackPrevious' | 'actionButtonForwardNext' | 'actionButtonBeginning' | 'actionButtonEnd' | 'actionButtonReturn' | 'actionButtonDocument' | 'actionButtonSound' | 'actionButtonMovie' | 'irregularSeal1' | 'irregularSeal2' | 'frame' | 'halfFrame' | 'corner' | 'diagStripe' | 'chord' | 'arc' | 'bracketPair' | 'bracePair' | 'leftBracket' | 'rightBracket' | 'leftBrace' | 'rightBrace' | 'can' | 'cube' | 'bevel' | 'donut' | 'noSmoking' | 'blockArc' | 'foldedCorner' | 'smileyFace' | 'heart' | 'lightningBolt' | 'sun' | 'moon' | 'cloud' | 'snip1Rect' | 'snip2SameRect' | 'snip2DiagRect' | 'snipRoundRect' | 'round1Rect' | 'round2SameRect' | 'round2DiagRect' | 'plaque' | 'teardrop' | 'mathPlus' | 'mathMinus' | 'mathMultiply' | 'mathDivide' | 'mathEqual' | 'mathNotEqual' | 'gear6' | 'gear9' | 'funnel' | 'pieWedge' | 'pie' | 'leftCircularArrow' | 'leftRightCircularArrow' | 'swooshArrow' | 'textBox';
960
+ /**
961
+ * Shape fill type
962
+ */
963
+ interface ShapeFill {
964
+ type: 'none' | 'solid' | 'gradient' | 'pattern' | 'picture';
965
+ /** Solid fill color */
966
+ color?: ColorValue;
967
+ /** Gradient stops for gradient fill */
968
+ gradient?: {
969
+ type: 'linear' | 'radial' | 'rectangular' | 'path';
970
+ angle?: number;
971
+ stops: Array<{
972
+ position: number;
973
+ color: ColorValue;
974
+ }>;
975
+ };
976
+ }
977
+ /**
978
+ * Shape outline/stroke
979
+ */
980
+ interface ShapeOutline {
981
+ /** Line width in EMUs */
982
+ width?: number;
983
+ /** Line color */
984
+ color?: ColorValue;
985
+ /** Line style */
986
+ style?: 'solid' | 'dot' | 'dash' | 'lgDash' | 'dashDot' | 'lgDashDot' | 'lgDashDotDot' | 'sysDot' | 'sysDash' | 'sysDashDot' | 'sysDashDotDot';
987
+ /** Line cap */
988
+ cap?: 'flat' | 'round' | 'square';
989
+ /** Line join */
990
+ join?: 'bevel' | 'miter' | 'round';
991
+ /** Head arrow */
992
+ headEnd?: {
993
+ type: 'none' | 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow';
994
+ width?: 'sm' | 'med' | 'lg';
995
+ length?: 'sm' | 'med' | 'lg';
996
+ };
997
+ /** Tail arrow */
998
+ tailEnd?: {
999
+ type: 'none' | 'triangle' | 'stealth' | 'diamond' | 'oval' | 'arrow';
1000
+ width?: 'sm' | 'med' | 'lg';
1001
+ length?: 'sm' | 'med' | 'lg';
1002
+ };
1003
+ }
1004
+ /**
1005
+ * Text body inside a shape
1006
+ */
1007
+ interface ShapeTextBody {
1008
+ /** Text direction */
1009
+ vertical?: boolean;
1010
+ /** Rotation */
1011
+ rotation?: number;
1012
+ /** Anchor/vertical alignment */
1013
+ anchor?: 'top' | 'middle' | 'bottom' | 'distributed' | 'justified';
1014
+ /** Anchor center */
1015
+ anchorCenter?: boolean;
1016
+ /** Auto fit */
1017
+ autoFit?: 'none' | 'normal' | 'shape';
1018
+ /** Text margins */
1019
+ margins?: {
1020
+ top?: number;
1021
+ bottom?: number;
1022
+ left?: number;
1023
+ right?: number;
1024
+ };
1025
+ /** Paragraphs inside the shape */
1026
+ content: Paragraph[];
1027
+ }
1028
+ /**
1029
+ * Shape/drawing object (wps:wsp)
1030
+ */
1031
+ interface Shape {
1032
+ type: 'shape';
1033
+ /** Shape type preset */
1034
+ shapeType: ShapeType;
1035
+ /** Unique ID */
1036
+ id?: string;
1037
+ /** Name */
1038
+ name?: string;
1039
+ /** Size in EMUs */
1040
+ size: ImageSize;
1041
+ /** Position for floating shapes */
1042
+ position?: ImagePosition;
1043
+ /** Wrap settings */
1044
+ wrap?: ImageWrap;
1045
+ /** Fill */
1046
+ fill?: ShapeFill;
1047
+ /** Outline/stroke */
1048
+ outline?: ShapeOutline;
1049
+ /** Transform */
1050
+ transform?: ImageTransform;
1051
+ /** Text content inside the shape */
1052
+ textBody?: ShapeTextBody;
1053
+ /** Custom geometry points */
1054
+ customGeometry?: string;
1055
+ }
1056
+ /**
1057
+ * Text box (floating text container)
1058
+ */
1059
+ interface TextBox {
1060
+ type: 'textBox';
1061
+ /** Unique ID */
1062
+ id?: string;
1063
+ /** Size */
1064
+ size: ImageSize;
1065
+ /** Position */
1066
+ position?: ImagePosition;
1067
+ /** Wrap settings */
1068
+ wrap?: ImageWrap;
1069
+ /** Fill */
1070
+ fill?: ShapeFill;
1071
+ /** Outline */
1072
+ outline?: ShapeOutline;
1073
+ /** Text content */
1074
+ content: Paragraph[];
1075
+ /** Internal margins */
1076
+ margins?: {
1077
+ top?: number;
1078
+ bottom?: number;
1079
+ left?: number;
1080
+ right?: number;
1081
+ };
1082
+ }
1083
+
1084
+ /**
1085
+ * Embedded images (`w:drawing` → `pic:pic`): size, wrap, position,
1086
+ * transform, padding, crop.
1087
+ */
1088
+
1089
+ /**
1090
+ * Image size specification
1091
+ */
1092
+ interface ImageSize {
1093
+ /** Width in EMUs (English Metric Units) */
1094
+ width: number;
1095
+ /** Height in EMUs */
1096
+ height: number;
1097
+ }
1098
+ /**
1099
+ * Image wrap type for floating images
1100
+ */
1101
+ interface ImageWrap {
1102
+ type: WrapType;
1103
+ /** Wrap text direction */
1104
+ wrapText?: 'bothSides' | 'left' | 'right' | 'largest';
1105
+ /** Distance from text */
1106
+ distT?: number;
1107
+ distB?: number;
1108
+ distL?: number;
1109
+ distR?: number;
1110
+ }
1111
+ /**
1112
+ * Position for floating images
1113
+ */
1114
+ interface ImagePosition {
1115
+ /** Horizontal positioning */
1116
+ horizontal: {
1117
+ relativeTo: 'character' | 'column' | 'insideMargin' | 'leftMargin' | 'margin' | 'outsideMargin' | 'page' | 'rightMargin';
1118
+ alignment?: 'left' | 'right' | 'center' | 'inside' | 'outside';
1119
+ posOffset?: number;
1120
+ };
1121
+ /** Vertical positioning */
1122
+ vertical: {
1123
+ relativeTo: 'insideMargin' | 'line' | 'margin' | 'outsideMargin' | 'page' | 'paragraph' | 'topMargin' | 'bottomMargin';
1124
+ alignment?: 'top' | 'bottom' | 'center' | 'inside' | 'outside';
1125
+ posOffset?: number;
1126
+ };
1127
+ }
1128
+ /**
1129
+ * Image transformation
1130
+ */
1131
+ interface ImageTransform {
1132
+ /** Rotation in degrees */
1133
+ rotation?: number;
1134
+ /** Flip horizontal */
1135
+ flipH?: boolean;
1136
+ /** Flip vertical */
1137
+ flipV?: boolean;
1138
+ }
1139
+ /**
1140
+ * Image padding/margins
1141
+ */
1142
+ interface ImagePadding {
1143
+ top?: number;
1144
+ bottom?: number;
1145
+ left?: number;
1146
+ right?: number;
1147
+ }
1148
+ /**
1149
+ * Image crop, expressed as fractions of the source image to trim from each
1150
+ * edge. OOXML's `<a:srcRect l="10000" t="0" r="5000" b="0"/>` uses units of
1151
+ * 1/100000 (so 10000 → 0.1 → 10% trimmed from the left). We store the
1152
+ * normalised fraction so both the renderer and the saver can read it
1153
+ * directly without re-parsing units.
1154
+ */
1155
+ interface ImageCrop {
1156
+ left?: number;
1157
+ top?: number;
1158
+ right?: number;
1159
+ bottom?: number;
1160
+ }
1161
+ /**
1162
+ * Embedded image (`w:drawing` with an inline or anchored picture). Carries
1163
+ * the relationship-id pointer to the binary in `word/media/`, its
1164
+ * resolved data URL (`src`), display dimensions, optional crop /
1165
+ * transform / wrap behaviors, and anchor positioning for floating
1166
+ * images.
1167
+ *
1168
+ * See ECMA-376 §20.4 (DrawingML wordprocessingDrawing).
1169
+ */
1170
+ interface Image {
1171
+ type: 'image';
1172
+ /** Unique ID */
1173
+ id?: string;
1174
+ /** Relationship ID for the image data */
1175
+ rId: string;
1176
+ /** Resolved image data (base64 or blob URL) */
1177
+ src?: string;
1178
+ /** Image MIME type */
1179
+ mimeType?: string;
1180
+ /** Original filename */
1181
+ filename?: string;
1182
+ /** Alt text for accessibility */
1183
+ alt?: string;
1184
+ /** Title/description */
1185
+ title?: string;
1186
+ /** Image size */
1187
+ size: ImageSize;
1188
+ /** Original size before any transforms */
1189
+ originalSize?: ImageSize;
1190
+ /** Wrap settings */
1191
+ wrap: ImageWrap;
1192
+ /** Position for floating images */
1193
+ position?: ImagePosition;
1194
+ /** Image transformations */
1195
+ transform?: ImageTransform;
1196
+ /** Padding around image */
1197
+ padding?: ImagePadding;
1198
+ /** Source-image crop (fractional, OOXML `a:srcRect`). */
1199
+ crop?: ImageCrop;
1200
+ /** Opacity in [0, 1] (OOXML `a:alphaModFix amt`). Undefined = fully opaque. */
1201
+ opacity?: number;
1202
+ /** Whether this is a decorative image */
1203
+ decorative?: boolean;
1204
+ /**
1205
+ * `wp:anchor layoutInCell` — when true (default), an anchored image inside
1206
+ * a table cell is constrained to the cell. When false, the image escapes
1207
+ * the cell into the page area. Round-tripped on save.
1208
+ */
1209
+ layoutInCell?: boolean;
1210
+ /**
1211
+ * `wp:anchor allowOverlap` — when true (default), anchored objects may
1212
+ * overlap; when false, Word repositions them to avoid collisions. We
1213
+ * don't currently reposition; we round-trip the flag so saving preserves
1214
+ * the author's intent.
1215
+ */
1216
+ allowOverlap?: boolean;
1217
+ /** Hyperlink URL for clickable image */
1218
+ hlinkHref?: string;
1219
+ /** Image outline/border */
1220
+ outline?: ShapeOutline;
1221
+ /** Image effects */
1222
+ effects?: {
1223
+ brightness?: number;
1224
+ contrast?: number;
1225
+ saturation?: number;
1226
+ };
1227
+ }
1228
+
1229
+ /**
1230
+ * Run content (`w:r`) and the inline pieces that live inside a run —
1231
+ * text, tab, break, symbol, footnote/endnote references, field chars,
1232
+ * instruction text, soft/no-break hyphens, drawings, shapes.
1233
+ */
1234
+
1235
+ /**
1236
+ * Plain text run content (`w:t`). `preserveSpace` mirrors the
1237
+ * `xml:space="preserve"` attribute and matters for runs that begin or end
1238
+ * with whitespace — without it, Word collapses leading/trailing spaces.
1239
+ */
1240
+ interface TextContent {
1241
+ type: 'text';
1242
+ /** The text string */
1243
+ text: string;
1244
+ /** Preserve whitespace (xml:space="preserve") */
1245
+ preserveSpace?: boolean;
1246
+ }
1247
+ /**
1248
+ * Tab character
1249
+ */
1250
+ interface TabContent {
1251
+ type: 'tab';
1252
+ }
1253
+ /**
1254
+ * Line break
1255
+ */
1256
+ interface BreakContent {
1257
+ type: 'break';
1258
+ /** Break type */
1259
+ breakType?: 'page' | 'column' | 'textWrapping';
1260
+ /** Clear type for text wrapping break */
1261
+ clear?: 'none' | 'left' | 'right' | 'all';
1262
+ }
1263
+ /**
1264
+ * Symbol character (special font character)
1265
+ */
1266
+ interface SymbolContent {
1267
+ type: 'symbol';
1268
+ /** Font name */
1269
+ font: string;
1270
+ /** Character code */
1271
+ char: string;
1272
+ }
1273
+ /**
1274
+ * Footnote or endnote reference
1275
+ */
1276
+ interface NoteReferenceContent {
1277
+ type: 'footnoteRef' | 'endnoteRef';
1278
+ /** Note ID */
1279
+ id: number;
1280
+ }
1281
+ /**
1282
+ * Field character (begin/separate/end)
1283
+ */
1284
+ interface FieldCharContent {
1285
+ type: 'fieldChar';
1286
+ /** Field character type */
1287
+ charType: 'begin' | 'separate' | 'end';
1288
+ /** Field is locked */
1289
+ fldLock?: boolean;
1290
+ /** Field is dirty (needs update) */
1291
+ dirty?: boolean;
1292
+ }
1293
+ /**
1294
+ * Field instruction text
1295
+ */
1296
+ interface InstrTextContent {
1297
+ type: 'instrText';
1298
+ /** Field instruction */
1299
+ text: string;
1300
+ }
1301
+ /**
1302
+ * Soft hyphen
1303
+ */
1304
+ interface SoftHyphenContent {
1305
+ type: 'softHyphen';
1306
+ }
1307
+ /**
1308
+ * Non-breaking hyphen
1309
+ */
1310
+ interface NoBreakHyphenContent {
1311
+ type: 'noBreakHyphen';
1312
+ }
1313
+ /**
1314
+ * Drawing/image reference
1315
+ */
1316
+ interface DrawingContent {
1317
+ type: 'drawing';
1318
+ /** Image data */
1319
+ image: Image;
1320
+ }
1321
+ /**
1322
+ * Shape reference
1323
+ */
1324
+ interface ShapeContent {
1325
+ type: 'shape';
1326
+ /** Shape data */
1327
+ shape: Shape;
1328
+ }
1329
+ /**
1330
+ * All possible run content types
1331
+ */
1332
+ type RunContent = TextContent | TabContent | BreakContent | SymbolContent | NoteReferenceContent | FieldCharContent | InstrTextContent | SoftHyphenContent | NoBreakHyphenContent | DrawingContent | ShapeContent;
1333
+ /**
1334
+ * A run (`w:r`) — a contiguous span of inline content sharing one set of
1335
+ * character properties (bold, italic, font, color, etc.). Runs are the
1336
+ * atomic unit of character formatting; toggling bold on a selection that
1337
+ * spans different formatting creates new runs.
1338
+ *
1339
+ * See ECMA-376 §17.3.2.
1340
+ *
1341
+ * @example
1342
+ * ```ts
1343
+ * const run: Run = {
1344
+ * type: 'run',
1345
+ * formatting: { bold: true },
1346
+ * content: [{ type: 'text', text: 'Hello' }],
1347
+ * };
1348
+ * ```
1349
+ */
1350
+ interface Run {
1351
+ type: 'run';
1352
+ /** Text formatting properties */
1353
+ formatting?: TextFormatting;
1354
+ /** Run-level tracked property changes (w:rPrChange) */
1355
+ propertyChanges?: RunPropertyChange[];
1356
+ /** Run content (text, tabs, breaks, etc.) */
1357
+ content: RunContent[];
1358
+ }
1359
+
1360
+ export type { ImagePadding as $, AbstractNumbering as A, BlockContent as B, Comment as C, Deletion as D, Endnote as E, Footnote as F, DrawingContent as G, Hyperlink as H, Image as I, EndnotePosition as J, EndnoteProperties as K, ListLevel as L, MoveFrom as M, NumberingDefinitions as N, Field as O, Paragraph as P, FieldCharContent as Q, Run as R, SectionProperties as S, Table as T, FieldType as U, FooterReference as V, FootnotePosition as W, FootnoteProperties as X, HeaderFooterType as Y, HeaderReference as Z, ImageCrop as _, CommentRangeEnd as a, ImagePosition as a0, ImageSize as a1, ImageTransform as a2, ImageWrap as a3, InlineSdt as a4, InstrTextContent as a5, LevelSuffix as a6, LineNumberRestart as a7, ListRendering as a8, MathEquation as a9, TextBox as aA, VerticalAlign as aB, MoveFromRangeEnd as aa, MoveFromRangeStart as ab, MoveToRangeEnd as ac, MoveToRangeStart as ad, NoBreakHyphenContent as ae, NoteNumberRestart as af, NoteReferenceContent as ag, NumberingInstance as ah, PageOrientation as ai, PropertyChangeInfo as aj, RunPropertyChange as ak, SdtProperties as al, SdtType as am, Section as an, SectionStart as ao, Shape as ap, ShapeContent as aq, ShapeFill as ar, ShapeOutline as as, ShapeTextBody as at, ShapeType as au, SimpleField as av, SoftHyphenContent as aw, SymbolContent as ax, TabContent as ay, TableStructuralChangeInfo as az, CommentRangeStart as b, DocumentBody as c, Insertion as d, MoveTo as e, ParagraphContent as f, RunContent as g, TableCell as h, TableRow as i, TextContent as j, TrackedChangeInfo as k, TrackedRunChange as l, RevisionInfo as m, CellMarker as n, NumberFormat as o, ParagraphPropertyChange as p, TablePropertyChange as q, TableCellPropertyChange as r, TableRowPropertyChange as s, BreakContent as t, HeaderFooter as u, BlockSdt as v, BookmarkEnd as w, BookmarkStart as x, Column as y, ComplexField as z };