@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,257 @@
1
+ import { b as ParagraphAlignment, L as LineSpacingRule, S as SpacingExplicit, d as TabStop, T as TextFormatting, P as ParagraphFormatting, F as FloatingTableProperties, i as TableLook, h as TableFormatting, g as TableCellFormatting, k as TableRowFormatting } from './formatting-D9I-lFS4.mjs';
2
+ import { B as BorderSpec, S as ShadingProperties } from './colors-C3vA7HUU.mjs';
3
+ import { c as NumberFormat } from './lists-JDB80qyP.mjs';
4
+ import { WrapType } from './docx/wrapTypes.mjs';
5
+ import { SectionProperties } from './types/content.mjs';
6
+
7
+ /**
8
+ * Paragraph node attributes - maps to ParagraphFormatting
9
+ */
10
+ interface ParagraphAttrs {
11
+ paraId?: string;
12
+ textId?: string;
13
+ alignment?: ParagraphAlignment;
14
+ spaceBefore?: number;
15
+ spaceAfter?: number;
16
+ lineSpacing?: number;
17
+ lineSpacingRule?: LineSpacingRule;
18
+ /** See ParagraphFormatting.spacingExplicit. */
19
+ spacingExplicit?: SpacingExplicit;
20
+ indentLeft?: number;
21
+ indentRight?: number;
22
+ indentFirstLine?: number;
23
+ hangingIndent?: boolean;
24
+ numPr?: {
25
+ numId?: number;
26
+ ilvl?: number;
27
+ };
28
+ /** List number format (decimal, lowerRoman, upperRoman, etc.) for CSS counter styling */
29
+ listNumFmt?: NumberFormat;
30
+ /** Whether this is a bullet list */
31
+ listIsBullet?: boolean;
32
+ /** Computed list marker text (e.g., "1.", "1.1.", "•") */
33
+ listMarker?: string;
34
+ /** Whether the list marker is hidden (w:vanish on numbering level rPr) */
35
+ listMarkerHidden?: boolean;
36
+ /** Marker font family from numbering level rPr */
37
+ listMarkerFontFamily?: string;
38
+ /** Marker font size from numbering level rPr, in points */
39
+ listMarkerFontSize?: number;
40
+ /**
41
+ * NumberFormat for each level 0..ilvl (inclusive).
42
+ * Lets toFlowBlocks resolve multi-level templates like "%1.%2." with
43
+ * the correct format per token.
44
+ */
45
+ listLevelNumFmts?: NumberFormat[];
46
+ /** See ListRendering.abstractNumId. */
47
+ listAbstractNumId?: number;
48
+ /** See ListRendering.startOverride. */
49
+ listStartOverride?: number;
50
+ styleId?: string;
51
+ borders?: {
52
+ top?: BorderSpec;
53
+ bottom?: BorderSpec;
54
+ left?: BorderSpec;
55
+ right?: BorderSpec;
56
+ between?: BorderSpec;
57
+ bar?: BorderSpec;
58
+ };
59
+ shading?: ShadingProperties;
60
+ tabs?: TabStop[];
61
+ pageBreakBefore?: boolean;
62
+ /**
63
+ * Word's cached layout marker (`<w:lastRenderedPageBreak/>`). Treated like
64
+ * `pageBreakBefore` for layout, kept as a separate attr so save+reload
65
+ * preserves the marker at the same position Word recorded.
66
+ */
67
+ renderedPageBreakBefore?: boolean;
68
+ keepNext?: boolean;
69
+ keepLines?: boolean;
70
+ /** Contextual spacing — suppress space between same-style paragraphs */
71
+ contextualSpacing?: boolean;
72
+ defaultTextFormatting?: TextFormatting;
73
+ sectionBreakType?: 'nextPage' | 'continuous' | 'oddPage' | 'evenPage';
74
+ bidi?: boolean;
75
+ outlineLevel?: number;
76
+ bookmarks?: Array<{
77
+ id: number;
78
+ name: string;
79
+ }>;
80
+ /** Original inline paragraph formatting from DOCX (pre-style-resolution).
81
+ * Used by fromProseDoc for lossless round-trip serialization. */
82
+ _originalFormatting?: ParagraphFormatting;
83
+ /** Full section properties for paragraphs that end a section.
84
+ * Used by layout engine for per-section column/page config and round-trip. */
85
+ _sectionProperties?: SectionProperties;
86
+ }
87
+ /**
88
+ * Image position for floating images (horizontal and vertical positioning)
89
+ */
90
+ interface ImagePositionAttrs {
91
+ horizontal?: {
92
+ relativeTo?: string;
93
+ posOffset?: number;
94
+ align?: string;
95
+ };
96
+ vertical?: {
97
+ relativeTo?: string;
98
+ posOffset?: number;
99
+ align?: string;
100
+ };
101
+ }
102
+ /**
103
+ * Image node attributes
104
+ */
105
+ interface ImageAttrs {
106
+ src: string;
107
+ alt?: string;
108
+ title?: string;
109
+ /** Width in pixels (already converted from EMU) */
110
+ width?: number;
111
+ /** Height in pixels (already converted from EMU) */
112
+ height?: number;
113
+ rId?: string;
114
+ /** Wrap type from DOCX: inline, square, tight, through, topAndBottom, behind, inFront */
115
+ wrapType?: WrapType;
116
+ /** Display mode for CSS: inline (flows with text), float (left/right float), block (centered) */
117
+ displayMode?: 'inline' | 'float' | 'block';
118
+ /** CSS float direction for floating images */
119
+ cssFloat?: 'left' | 'right' | 'none';
120
+ /** CSS transform string (rotation, flip) */
121
+ transform?: string;
122
+ /** Distance from text above (pixels) */
123
+ distTop?: number;
124
+ /** Distance from text below (pixels) */
125
+ distBottom?: number;
126
+ /** Distance from text left (pixels) */
127
+ distLeft?: number;
128
+ /** Distance from text right (pixels) */
129
+ distRight?: number;
130
+ /** Position for floating images (horizontal and vertical alignment) */
131
+ position?: ImagePositionAttrs;
132
+ /** Border width in pixels */
133
+ borderWidth?: number;
134
+ /** Border color as CSS color string */
135
+ borderColor?: string;
136
+ /** Border style (CSS border-style value) */
137
+ borderStyle?: string;
138
+ /** Wrap text setting from DOCX (left, right, bothSides, largest) for round-trip */
139
+ wrapText?: string;
140
+ /** Hyperlink URL for clickable image */
141
+ hlinkHref?: string;
142
+ /**
143
+ * `wp:srcRect` crop fractions in [0, 1]. Each side is the fraction of the
144
+ * source image that should be hidden. Renders as CSS `clip-path: inset(...)`.
145
+ */
146
+ cropTop?: number;
147
+ cropRight?: number;
148
+ cropBottom?: number;
149
+ cropLeft?: number;
150
+ /** `a:alphaModFix amt` mapped to CSS `opacity` in [0, 1]. */
151
+ opacity?: number;
152
+ /**
153
+ * `wp:effectExtent` padding (pixels) — extra space reserved around the image
154
+ * for shadows, glows, soft edges, etc. Applied as outer margin so the
155
+ * effect isn't clipped by surrounding content.
156
+ */
157
+ effectExtentTop?: number;
158
+ effectExtentBottom?: number;
159
+ effectExtentLeft?: number;
160
+ effectExtentRight?: number;
161
+ /**
162
+ * `wp:anchor layoutInCell`. Tri-state: true / false / undefined (= Word's
163
+ * default "1"). Floating-only; round-tripped on save.
164
+ */
165
+ layoutInCell?: boolean;
166
+ /** `wp:anchor allowOverlap`. Same tri-state convention as `layoutInCell`. */
167
+ allowOverlap?: boolean;
168
+ }
169
+ /**
170
+ * Table node attributes
171
+ */
172
+ interface TableAttrs {
173
+ /** Table style ID */
174
+ styleId?: string;
175
+ /** Table width (in twips) */
176
+ width?: number;
177
+ /** Table width type ('auto', 'pct', 'dxa') */
178
+ widthType?: string;
179
+ /** Table justification/alignment */
180
+ justification?: 'left' | 'center' | 'right';
181
+ /** Column widths (in twips) from w:tblGrid */
182
+ columnWidths?: number[];
183
+ /** Floating table properties (w:tblpPr) */
184
+ floating?: FloatingTableProperties;
185
+ /** Default cell margins for the table (w:tblCellMar), in twips */
186
+ cellMargins?: {
187
+ top?: number;
188
+ bottom?: number;
189
+ left?: number;
190
+ right?: number;
191
+ };
192
+ /** Table look flags for conditional formatting (w:tblLook) */
193
+ look?: TableLook;
194
+ /** Original table formatting from DOCX for lossless round-trip serialization */
195
+ _originalFormatting?: TableFormatting;
196
+ }
197
+ /**
198
+ * Table row attributes
199
+ */
200
+ interface TableRowAttrs {
201
+ /** Row height (in twips) */
202
+ height?: number;
203
+ /** Height rule ('auto', 'exact', 'atLeast') */
204
+ heightRule?: string;
205
+ /** Is header row */
206
+ isHeader?: boolean;
207
+ /** Original row formatting from DOCX for lossless round-trip serialization */
208
+ _originalFormatting?: TableRowFormatting;
209
+ }
210
+ /**
211
+ * Table cell attributes
212
+ */
213
+ interface TableCellAttrs {
214
+ /** Column span */
215
+ colspan: number;
216
+ /** Row span */
217
+ rowspan: number;
218
+ /** Column widths for prosemirror-tables resizing (array of pixel widths) */
219
+ colwidth?: number[] | null;
220
+ /** Cell width (in twips) */
221
+ width?: number;
222
+ /** Cell width type */
223
+ widthType?: string;
224
+ /** Vertical alignment */
225
+ verticalAlign?: 'top' | 'center' | 'bottom';
226
+ /** Background color (RGB hex) */
227
+ backgroundColor?: string;
228
+ /** OOXML text direction (e.g. 'tbRl', 'btLr') */
229
+ textDirection?: string;
230
+ /** No text wrapping in cell */
231
+ noWrap?: boolean;
232
+ /** Cell borders — full BorderSpec per side (style, color, size) */
233
+ borders?: {
234
+ top?: BorderSpec;
235
+ bottom?: BorderSpec;
236
+ left?: BorderSpec;
237
+ right?: BorderSpec;
238
+ };
239
+ /** Cell margins/padding in twips per side */
240
+ margins?: {
241
+ top?: number;
242
+ bottom?: number;
243
+ left?: number;
244
+ right?: number;
245
+ };
246
+ /** Original cell formatting from DOCX for lossless round-trip serialization */
247
+ _originalFormatting?: TableCellFormatting;
248
+ /**
249
+ * The resolved hex of the original `shading.fill` at parse time. Used by
250
+ * fromProseDoc to detect whether the user changed `backgroundColor`: if they
251
+ * didn't, we preserve `_originalFormatting.shading` (keeping themeFill +
252
+ * tint/shade); if they did, we write plain rgb.
253
+ */
254
+ _originalResolvedFill?: string;
255
+ }
256
+
257
+ export type { ImageAttrs as I, ParagraphAttrs as P, TableAttrs as T, ImagePositionAttrs as a, TableCellAttrs as b, TableRowAttrs as c };
@@ -0,0 +1,257 @@
1
+ import { b as ParagraphAlignment, L as LineSpacingRule, S as SpacingExplicit, d as TabStop, T as TextFormatting, P as ParagraphFormatting, F as FloatingTableProperties, i as TableLook, h as TableFormatting, g as TableCellFormatting, k as TableRowFormatting } from './formatting-BwpZWdGi.js';
2
+ import { B as BorderSpec, S as ShadingProperties } from './colors-C3vA7HUU.js';
3
+ import { c as NumberFormat } from './lists-CdiIk_c1.js';
4
+ import { WrapType } from './docx/wrapTypes.js';
5
+ import { SectionProperties } from './types/content.js';
6
+
7
+ /**
8
+ * Paragraph node attributes - maps to ParagraphFormatting
9
+ */
10
+ interface ParagraphAttrs {
11
+ paraId?: string;
12
+ textId?: string;
13
+ alignment?: ParagraphAlignment;
14
+ spaceBefore?: number;
15
+ spaceAfter?: number;
16
+ lineSpacing?: number;
17
+ lineSpacingRule?: LineSpacingRule;
18
+ /** See ParagraphFormatting.spacingExplicit. */
19
+ spacingExplicit?: SpacingExplicit;
20
+ indentLeft?: number;
21
+ indentRight?: number;
22
+ indentFirstLine?: number;
23
+ hangingIndent?: boolean;
24
+ numPr?: {
25
+ numId?: number;
26
+ ilvl?: number;
27
+ };
28
+ /** List number format (decimal, lowerRoman, upperRoman, etc.) for CSS counter styling */
29
+ listNumFmt?: NumberFormat;
30
+ /** Whether this is a bullet list */
31
+ listIsBullet?: boolean;
32
+ /** Computed list marker text (e.g., "1.", "1.1.", "•") */
33
+ listMarker?: string;
34
+ /** Whether the list marker is hidden (w:vanish on numbering level rPr) */
35
+ listMarkerHidden?: boolean;
36
+ /** Marker font family from numbering level rPr */
37
+ listMarkerFontFamily?: string;
38
+ /** Marker font size from numbering level rPr, in points */
39
+ listMarkerFontSize?: number;
40
+ /**
41
+ * NumberFormat for each level 0..ilvl (inclusive).
42
+ * Lets toFlowBlocks resolve multi-level templates like "%1.%2." with
43
+ * the correct format per token.
44
+ */
45
+ listLevelNumFmts?: NumberFormat[];
46
+ /** See ListRendering.abstractNumId. */
47
+ listAbstractNumId?: number;
48
+ /** See ListRendering.startOverride. */
49
+ listStartOverride?: number;
50
+ styleId?: string;
51
+ borders?: {
52
+ top?: BorderSpec;
53
+ bottom?: BorderSpec;
54
+ left?: BorderSpec;
55
+ right?: BorderSpec;
56
+ between?: BorderSpec;
57
+ bar?: BorderSpec;
58
+ };
59
+ shading?: ShadingProperties;
60
+ tabs?: TabStop[];
61
+ pageBreakBefore?: boolean;
62
+ /**
63
+ * Word's cached layout marker (`<w:lastRenderedPageBreak/>`). Treated like
64
+ * `pageBreakBefore` for layout, kept as a separate attr so save+reload
65
+ * preserves the marker at the same position Word recorded.
66
+ */
67
+ renderedPageBreakBefore?: boolean;
68
+ keepNext?: boolean;
69
+ keepLines?: boolean;
70
+ /** Contextual spacing — suppress space between same-style paragraphs */
71
+ contextualSpacing?: boolean;
72
+ defaultTextFormatting?: TextFormatting;
73
+ sectionBreakType?: 'nextPage' | 'continuous' | 'oddPage' | 'evenPage';
74
+ bidi?: boolean;
75
+ outlineLevel?: number;
76
+ bookmarks?: Array<{
77
+ id: number;
78
+ name: string;
79
+ }>;
80
+ /** Original inline paragraph formatting from DOCX (pre-style-resolution).
81
+ * Used by fromProseDoc for lossless round-trip serialization. */
82
+ _originalFormatting?: ParagraphFormatting;
83
+ /** Full section properties for paragraphs that end a section.
84
+ * Used by layout engine for per-section column/page config and round-trip. */
85
+ _sectionProperties?: SectionProperties;
86
+ }
87
+ /**
88
+ * Image position for floating images (horizontal and vertical positioning)
89
+ */
90
+ interface ImagePositionAttrs {
91
+ horizontal?: {
92
+ relativeTo?: string;
93
+ posOffset?: number;
94
+ align?: string;
95
+ };
96
+ vertical?: {
97
+ relativeTo?: string;
98
+ posOffset?: number;
99
+ align?: string;
100
+ };
101
+ }
102
+ /**
103
+ * Image node attributes
104
+ */
105
+ interface ImageAttrs {
106
+ src: string;
107
+ alt?: string;
108
+ title?: string;
109
+ /** Width in pixels (already converted from EMU) */
110
+ width?: number;
111
+ /** Height in pixels (already converted from EMU) */
112
+ height?: number;
113
+ rId?: string;
114
+ /** Wrap type from DOCX: inline, square, tight, through, topAndBottom, behind, inFront */
115
+ wrapType?: WrapType;
116
+ /** Display mode for CSS: inline (flows with text), float (left/right float), block (centered) */
117
+ displayMode?: 'inline' | 'float' | 'block';
118
+ /** CSS float direction for floating images */
119
+ cssFloat?: 'left' | 'right' | 'none';
120
+ /** CSS transform string (rotation, flip) */
121
+ transform?: string;
122
+ /** Distance from text above (pixels) */
123
+ distTop?: number;
124
+ /** Distance from text below (pixels) */
125
+ distBottom?: number;
126
+ /** Distance from text left (pixels) */
127
+ distLeft?: number;
128
+ /** Distance from text right (pixels) */
129
+ distRight?: number;
130
+ /** Position for floating images (horizontal and vertical alignment) */
131
+ position?: ImagePositionAttrs;
132
+ /** Border width in pixels */
133
+ borderWidth?: number;
134
+ /** Border color as CSS color string */
135
+ borderColor?: string;
136
+ /** Border style (CSS border-style value) */
137
+ borderStyle?: string;
138
+ /** Wrap text setting from DOCX (left, right, bothSides, largest) for round-trip */
139
+ wrapText?: string;
140
+ /** Hyperlink URL for clickable image */
141
+ hlinkHref?: string;
142
+ /**
143
+ * `wp:srcRect` crop fractions in [0, 1]. Each side is the fraction of the
144
+ * source image that should be hidden. Renders as CSS `clip-path: inset(...)`.
145
+ */
146
+ cropTop?: number;
147
+ cropRight?: number;
148
+ cropBottom?: number;
149
+ cropLeft?: number;
150
+ /** `a:alphaModFix amt` mapped to CSS `opacity` in [0, 1]. */
151
+ opacity?: number;
152
+ /**
153
+ * `wp:effectExtent` padding (pixels) — extra space reserved around the image
154
+ * for shadows, glows, soft edges, etc. Applied as outer margin so the
155
+ * effect isn't clipped by surrounding content.
156
+ */
157
+ effectExtentTop?: number;
158
+ effectExtentBottom?: number;
159
+ effectExtentLeft?: number;
160
+ effectExtentRight?: number;
161
+ /**
162
+ * `wp:anchor layoutInCell`. Tri-state: true / false / undefined (= Word's
163
+ * default "1"). Floating-only; round-tripped on save.
164
+ */
165
+ layoutInCell?: boolean;
166
+ /** `wp:anchor allowOverlap`. Same tri-state convention as `layoutInCell`. */
167
+ allowOverlap?: boolean;
168
+ }
169
+ /**
170
+ * Table node attributes
171
+ */
172
+ interface TableAttrs {
173
+ /** Table style ID */
174
+ styleId?: string;
175
+ /** Table width (in twips) */
176
+ width?: number;
177
+ /** Table width type ('auto', 'pct', 'dxa') */
178
+ widthType?: string;
179
+ /** Table justification/alignment */
180
+ justification?: 'left' | 'center' | 'right';
181
+ /** Column widths (in twips) from w:tblGrid */
182
+ columnWidths?: number[];
183
+ /** Floating table properties (w:tblpPr) */
184
+ floating?: FloatingTableProperties;
185
+ /** Default cell margins for the table (w:tblCellMar), in twips */
186
+ cellMargins?: {
187
+ top?: number;
188
+ bottom?: number;
189
+ left?: number;
190
+ right?: number;
191
+ };
192
+ /** Table look flags for conditional formatting (w:tblLook) */
193
+ look?: TableLook;
194
+ /** Original table formatting from DOCX for lossless round-trip serialization */
195
+ _originalFormatting?: TableFormatting;
196
+ }
197
+ /**
198
+ * Table row attributes
199
+ */
200
+ interface TableRowAttrs {
201
+ /** Row height (in twips) */
202
+ height?: number;
203
+ /** Height rule ('auto', 'exact', 'atLeast') */
204
+ heightRule?: string;
205
+ /** Is header row */
206
+ isHeader?: boolean;
207
+ /** Original row formatting from DOCX for lossless round-trip serialization */
208
+ _originalFormatting?: TableRowFormatting;
209
+ }
210
+ /**
211
+ * Table cell attributes
212
+ */
213
+ interface TableCellAttrs {
214
+ /** Column span */
215
+ colspan: number;
216
+ /** Row span */
217
+ rowspan: number;
218
+ /** Column widths for prosemirror-tables resizing (array of pixel widths) */
219
+ colwidth?: number[] | null;
220
+ /** Cell width (in twips) */
221
+ width?: number;
222
+ /** Cell width type */
223
+ widthType?: string;
224
+ /** Vertical alignment */
225
+ verticalAlign?: 'top' | 'center' | 'bottom';
226
+ /** Background color (RGB hex) */
227
+ backgroundColor?: string;
228
+ /** OOXML text direction (e.g. 'tbRl', 'btLr') */
229
+ textDirection?: string;
230
+ /** No text wrapping in cell */
231
+ noWrap?: boolean;
232
+ /** Cell borders — full BorderSpec per side (style, color, size) */
233
+ borders?: {
234
+ top?: BorderSpec;
235
+ bottom?: BorderSpec;
236
+ left?: BorderSpec;
237
+ right?: BorderSpec;
238
+ };
239
+ /** Cell margins/padding in twips per side */
240
+ margins?: {
241
+ top?: number;
242
+ bottom?: number;
243
+ left?: number;
244
+ right?: number;
245
+ };
246
+ /** Original cell formatting from DOCX for lossless round-trip serialization */
247
+ _originalFormatting?: TableCellFormatting;
248
+ /**
249
+ * The resolved hex of the original `shading.fill` at parse time. Used by
250
+ * fromProseDoc to detect whether the user changed `backgroundColor`: if they
251
+ * didn't, we preserve `_originalFormatting.shading` (keeping themeFill +
252
+ * tint/shade); if they did, we write plain rgb.
253
+ */
254
+ _originalResolvedFill?: string;
255
+ }
256
+
257
+ export type { ImageAttrs as I, ParagraphAttrs as P, TableAttrs as T, ImagePositionAttrs as a, TableCellAttrs as b, TableRowAttrs as c };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * RenderedDomContext Implementation
3
+ *
4
+ * Provides DOM-based position mapping for the LayoutPainter output.
5
+ * Uses the same data-pm-start/data-pm-end attribute pattern as the
6
+ * selection overlay in PagedEditor.
7
+ * @packageDocumentation
8
+ * @public
9
+ */
10
+ import { RenderedDomContext, PositionCoordinates } from './types.mjs';
11
+ import 'prosemirror-state';
12
+ import 'prosemirror-view';
13
+ import 'prosemirror-model';
14
+
15
+ /**
16
+ * RenderedDomContext Implementation
17
+ *
18
+ * Provides DOM-based position mapping for the LayoutPainter output.
19
+ * Uses the same data-pm-start/data-pm-end attribute pattern as the
20
+ * selection overlay in PagedEditor.
21
+ * @packageDocumentation
22
+ * @public
23
+ */
24
+
25
+ /**
26
+ * Implementation of RenderedDomContext.
27
+ *
28
+ * This class provides position mapping between ProseMirror document
29
+ * positions and pixel coordinates in the rendered DOM. It uses the
30
+ * data-pm-start and data-pm-end attributes that LayoutPainter adds
31
+ * to span elements.
32
+ */
33
+ declare class RenderedDomContextImpl implements RenderedDomContext {
34
+ pagesContainer: HTMLElement;
35
+ zoom: number;
36
+ constructor(pagesContainer: HTMLElement, zoom?: number);
37
+ /**
38
+ * Get pixel coordinates for a ProseMirror position.
39
+ * Uses the browser's text rendering via Range API for precise positioning.
40
+ */
41
+ getCoordinatesForPosition(pmPos: number): PositionCoordinates | null;
42
+ /**
43
+ * Find DOM elements that overlap with a ProseMirror position range.
44
+ */
45
+ findElementsForRange(from: number, to: number): Element[];
46
+ /**
47
+ * Get bounding rectangles for a range of text.
48
+ * Handles line wraps by returning multiple rects.
49
+ */
50
+ getRectsForRange(from: number, to: number): Array<{
51
+ x: number;
52
+ y: number;
53
+ width: number;
54
+ height: number;
55
+ }>;
56
+ /**
57
+ * Get the offset of the pages container from its parent viewport.
58
+ * This is needed for positioning overlays that are rendered in the
59
+ * viewport container rather than directly in the pages container.
60
+ */
61
+ getContainerOffset(): {
62
+ x: number;
63
+ y: number;
64
+ };
65
+ }
66
+ /**
67
+ * Create a RenderedDomContext for a pages container element.
68
+ *
69
+ * @param pagesContainer - The container element holding rendered pages
70
+ * @param zoom - Current zoom level (default 1)
71
+ */
72
+ declare function createRenderedDomContext(pagesContainer: HTMLElement, zoom?: number): RenderedDomContext;
73
+
74
+ export { RenderedDomContextImpl, createRenderedDomContext };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * RenderedDomContext Implementation
3
+ *
4
+ * Provides DOM-based position mapping for the LayoutPainter output.
5
+ * Uses the same data-pm-start/data-pm-end attribute pattern as the
6
+ * selection overlay in PagedEditor.
7
+ * @packageDocumentation
8
+ * @public
9
+ */
10
+ import { RenderedDomContext, PositionCoordinates } from './types.js';
11
+ import 'prosemirror-state';
12
+ import 'prosemirror-view';
13
+ import 'prosemirror-model';
14
+
15
+ /**
16
+ * RenderedDomContext Implementation
17
+ *
18
+ * Provides DOM-based position mapping for the LayoutPainter output.
19
+ * Uses the same data-pm-start/data-pm-end attribute pattern as the
20
+ * selection overlay in PagedEditor.
21
+ * @packageDocumentation
22
+ * @public
23
+ */
24
+
25
+ /**
26
+ * Implementation of RenderedDomContext.
27
+ *
28
+ * This class provides position mapping between ProseMirror document
29
+ * positions and pixel coordinates in the rendered DOM. It uses the
30
+ * data-pm-start and data-pm-end attributes that LayoutPainter adds
31
+ * to span elements.
32
+ */
33
+ declare class RenderedDomContextImpl implements RenderedDomContext {
34
+ pagesContainer: HTMLElement;
35
+ zoom: number;
36
+ constructor(pagesContainer: HTMLElement, zoom?: number);
37
+ /**
38
+ * Get pixel coordinates for a ProseMirror position.
39
+ * Uses the browser's text rendering via Range API for precise positioning.
40
+ */
41
+ getCoordinatesForPosition(pmPos: number): PositionCoordinates | null;
42
+ /**
43
+ * Find DOM elements that overlap with a ProseMirror position range.
44
+ */
45
+ findElementsForRange(from: number, to: number): Element[];
46
+ /**
47
+ * Get bounding rectangles for a range of text.
48
+ * Handles line wraps by returning multiple rects.
49
+ */
50
+ getRectsForRange(from: number, to: number): Array<{
51
+ x: number;
52
+ y: number;
53
+ width: number;
54
+ height: number;
55
+ }>;
56
+ /**
57
+ * Get the offset of the pages container from its parent viewport.
58
+ * This is needed for positioning overlays that are rendered in the
59
+ * viewport container rather than directly in the pages container.
60
+ */
61
+ getContainerOffset(): {
62
+ x: number;
63
+ y: number;
64
+ };
65
+ }
66
+ /**
67
+ * Create a RenderedDomContext for a pages container element.
68
+ *
69
+ * @param pagesContainer - The container element holding rendered pages
70
+ * @param zoom - Current zoom level (default 1)
71
+ */
72
+ declare function createRenderedDomContext(pagesContainer: HTMLElement, zoom?: number): RenderedDomContext;
73
+
74
+ export { RenderedDomContextImpl, createRenderedDomContext };
@@ -0,0 +1 @@
1
+ 'use strict';var chunkDC7S76ZX_js=require('../chunk-DC7S76ZX.js');var E=class{constructor(t,n=1){chunkDC7S76ZX_js.a(this,"pagesContainer");chunkDC7S76ZX_js.a(this,"zoom");this.pagesContainer=t,this.zoom=n;}getCoordinatesForPosition(t){let n=this.pagesContainer.getBoundingClientRect(),s=this.pagesContainer.querySelectorAll("span[data-pm-start][data-pm-end]");for(let a of Array.from(s)){let e=a,o=Number(e.dataset.pmStart),m=Number(e.dataset.pmEnd);if(e.classList.contains("layout-run-tab")){if(t>=o&&t<m){let c=e.getBoundingClientRect(),r=e.closest(".layout-line"),l=r?r.offsetHeight:16;return {x:(c.left-n.left)/this.zoom,y:(c.top-n.top)/this.zoom,height:l/this.zoom}}continue}if(t>=o&&t<=m&&a.firstChild?.nodeType===Node.TEXT_NODE){let c=a.firstChild,r=Math.min(t-o,c.length),l=e.ownerDocument;if(!l)continue;let h=l.createRange();h.setStart(c,r),h.setEnd(c,r);let p=h.getBoundingClientRect(),i=e.closest(".layout-line"),g=i?i.offsetHeight:16;return {x:(p.left-n.left)/this.zoom,y:(p.top-n.top)/this.zoom,height:g/this.zoom}}}let u=this.pagesContainer.querySelectorAll(".layout-empty-run");for(let a of Array.from(u)){let e=a.closest(".layout-paragraph");if(!e)continue;let o=Number(e.dataset.pmStart),m=Number(e.dataset.pmEnd);if(t>=o&&t<=m){let c=a.getBoundingClientRect(),r=a.closest(".layout-line"),l=r?r.offsetHeight:16;return {x:(c.left-n.left)/this.zoom,y:(c.top-n.top)/this.zoom,height:l/this.zoom}}}return null}findElementsForRange(t,n){let s=[],u=this.pagesContainer.querySelectorAll("span[data-pm-start][data-pm-end]");for(let a of Array.from(u)){let e=a,o=Number(e.dataset.pmStart);Number(e.dataset.pmEnd)>t&&o<n&&s.push(e);}return s}getRectsForRange(t,n){let s=this.pagesContainer.getBoundingClientRect(),u=[],a=this.pagesContainer.querySelectorAll("span[data-pm-start][data-pm-end]");for(let e of Array.from(a)){let o=e,m=Number(o.dataset.pmStart);if(Number(o.dataset.pmEnd)>t&&m<n){if(o.classList.contains("layout-run-tab")){let i=o.getBoundingClientRect();u.push({x:(i.left-s.left)/this.zoom,y:(i.top-s.top)/this.zoom,width:i.width/this.zoom,height:i.height/this.zoom});continue}if(e.firstChild?.nodeType!==Node.TEXT_NODE)continue;let r=e.firstChild,l=o.ownerDocument;if(!l)continue;let h=Math.max(0,t-m),p=Math.min(r.length,n-m);if(h<p){let i=l.createRange();i.setStart(r,h),i.setEnd(r,p);let g=i.getClientRects();for(let d of Array.from(g))u.push({x:(d.left-s.left)/this.zoom,y:(d.top-s.top)/this.zoom,width:d.width/this.zoom,height:d.height/this.zoom});}}}return u}getContainerOffset(){let t=this.pagesContainer.parentElement;if(!t)return {x:0,y:0};let n=this.pagesContainer.getBoundingClientRect(),s=t.getBoundingClientRect();return {x:(n.left-s.left)/this.zoom,y:(n.top-s.top)/this.zoom}}};function C(y,t=1){return new E(y,t)}exports.RenderedDomContextImpl=E;exports.createRenderedDomContext=C;
@@ -0,0 +1 @@
1
+ import {a}from'../chunk-QYUPLKLP.mjs';var E=class{constructor(t,n=1){a(this,"pagesContainer");a(this,"zoom");this.pagesContainer=t,this.zoom=n;}getCoordinatesForPosition(t){let n=this.pagesContainer.getBoundingClientRect(),s=this.pagesContainer.querySelectorAll("span[data-pm-start][data-pm-end]");for(let a of Array.from(s)){let e=a,o=Number(e.dataset.pmStart),m=Number(e.dataset.pmEnd);if(e.classList.contains("layout-run-tab")){if(t>=o&&t<m){let c=e.getBoundingClientRect(),r=e.closest(".layout-line"),l=r?r.offsetHeight:16;return {x:(c.left-n.left)/this.zoom,y:(c.top-n.top)/this.zoom,height:l/this.zoom}}continue}if(t>=o&&t<=m&&a.firstChild?.nodeType===Node.TEXT_NODE){let c=a.firstChild,r=Math.min(t-o,c.length),l=e.ownerDocument;if(!l)continue;let h=l.createRange();h.setStart(c,r),h.setEnd(c,r);let p=h.getBoundingClientRect(),i=e.closest(".layout-line"),g=i?i.offsetHeight:16;return {x:(p.left-n.left)/this.zoom,y:(p.top-n.top)/this.zoom,height:g/this.zoom}}}let u=this.pagesContainer.querySelectorAll(".layout-empty-run");for(let a of Array.from(u)){let e=a.closest(".layout-paragraph");if(!e)continue;let o=Number(e.dataset.pmStart),m=Number(e.dataset.pmEnd);if(t>=o&&t<=m){let c=a.getBoundingClientRect(),r=a.closest(".layout-line"),l=r?r.offsetHeight:16;return {x:(c.left-n.left)/this.zoom,y:(c.top-n.top)/this.zoom,height:l/this.zoom}}}return null}findElementsForRange(t,n){let s=[],u=this.pagesContainer.querySelectorAll("span[data-pm-start][data-pm-end]");for(let a of Array.from(u)){let e=a,o=Number(e.dataset.pmStart);Number(e.dataset.pmEnd)>t&&o<n&&s.push(e);}return s}getRectsForRange(t,n){let s=this.pagesContainer.getBoundingClientRect(),u=[],a=this.pagesContainer.querySelectorAll("span[data-pm-start][data-pm-end]");for(let e of Array.from(a)){let o=e,m=Number(o.dataset.pmStart);if(Number(o.dataset.pmEnd)>t&&m<n){if(o.classList.contains("layout-run-tab")){let i=o.getBoundingClientRect();u.push({x:(i.left-s.left)/this.zoom,y:(i.top-s.top)/this.zoom,width:i.width/this.zoom,height:i.height/this.zoom});continue}if(e.firstChild?.nodeType!==Node.TEXT_NODE)continue;let r=e.firstChild,l=o.ownerDocument;if(!l)continue;let h=Math.max(0,t-m),p=Math.min(r.length,n-m);if(h<p){let i=l.createRange();i.setStart(r,h),i.setEnd(r,p);let g=i.getClientRects();for(let d of Array.from(g))u.push({x:(d.left-s.left)/this.zoom,y:(d.top-s.top)/this.zoom,width:d.width/this.zoom,height:d.height/this.zoom});}}}return u}getContainerOffset(){let t=this.pagesContainer.parentElement;if(!t)return {x:0,y:0};let n=this.pagesContainer.getBoundingClientRect(),s=t.getBoundingClientRect();return {x:(n.left-s.left)/this.zoom,y:(n.top-s.top)/this.zoom}}};function C(y,t=1){return new E(y,t)}export{E as RenderedDomContextImpl,C as createRenderedDomContext};