@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,322 @@
1
+ /**
2
+ * Layout Engine - Main Entry Point
3
+ *
4
+ * Converts blocks + measures into positioned fragments on pages.
5
+ *
6
+ * @experimental Stable enough for the first-party React adapter, but the
7
+ * API may change in minor releases until a third-party adapter validates
8
+ * it. Pin a version range if you depend on this directly.
9
+ * @packageDocumentation
10
+ * @public
11
+ */
12
+ import { Page, PageMargins, ColumnLayout, Fragment, FlowBlock, Measure, SectionBreakBlock, Layout, TableMeasure, LayoutOptions } from './types.js';
13
+ export { BlockId, BorderStyle, CellBorderSpec, CellBorders, ColumnBreakBlock, ColumnBreakMeasure, DEFAULT_TEXTBOX_MARGINS, DEFAULT_TEXTBOX_WIDTH, DocumentPosition, FieldRun, FloatingTablePosition, FootnoteContent, FragmentBase, HeaderFooterContentHeights, HeaderFooterLayout, HitTestResult, HyperlinkInfo, ImageBlock, ImageFragment, ImageMeasure, ImageRun, ImageRunPosition, LineBreakRun, ListNumPr, MeasuredLine, MeasuredLineSegment, PageBreakBlock, PageBreakMeasure, ParagraphAttrs, ParagraphBlock, ParagraphBorders, ParagraphFragment, ParagraphIndent, ParagraphMeasure, ParagraphSpacing, Run, RunFormatting, SectionBreakMeasure, TabAlignment, TabRun, TabStop, TableBlock, TableCell, TableCellMeasure, TableFragment, TableRow, TableRowMeasure, TextBoxBlock, TextBoxFragment, TextBoxMeasure, TextRun, WrapTextDirection, assertExhaustiveFlowBlock } from './types.js';
14
+
15
+ /**
16
+ * Paginator - manages page state during layout
17
+ *
18
+ * Tracks the current page, cursor position, and available space.
19
+ * Creates new pages when content doesn't fit.
20
+ */
21
+
22
+ /**
23
+ * Current state of a page being laid out.
24
+ */
25
+ type PageState = {
26
+ /** The page being built. */
27
+ page: Page;
28
+ /** Current Y position (cursor) from page top. */
29
+ cursorY: number;
30
+ /** Current column index (0-based). */
31
+ columnIndex: number;
32
+ /** Top margin of content area. */
33
+ topMargin: number;
34
+ /** Bottom boundary of content area (page height - bottom margin). */
35
+ contentBottom: number;
36
+ /** Accumulated trailing spacing (space after previous block). */
37
+ trailingSpacing: number;
38
+ };
39
+ /**
40
+ * Options for creating a paginator.
41
+ */
42
+ type PaginatorOptions = {
43
+ /** Page size (width, height). */
44
+ pageSize: {
45
+ w: number;
46
+ h: number;
47
+ };
48
+ /** Page margins. */
49
+ margins: PageMargins;
50
+ /** Column configuration (optional). */
51
+ columns?: ColumnLayout;
52
+ /** Per-page footnote reserved heights (pageNumber → height in pixels). */
53
+ footnoteReservedHeights?: Map<number, number>;
54
+ /** Callback when a new page is created. */
55
+ onNewPage?: (state: PageState) => void;
56
+ };
57
+ /**
58
+ * Creates a paginator for managing page layout state.
59
+ */
60
+ declare function createPaginator(options: PaginatorOptions): {
61
+ /** All pages created so far. */
62
+ pages: Page[];
63
+ /** All page states. */
64
+ states: PageState[];
65
+ /** Column width in pixels (use getColumnWidth() for current value after updates). */
66
+ readonly columnWidth: number;
67
+ /** Get current column layout (returns copy to prevent external mutation). */
68
+ readonly columns: {
69
+ count: number;
70
+ gap: number;
71
+ equalWidth?: boolean;
72
+ separator?: boolean;
73
+ };
74
+ /** Get current state. */
75
+ getCurrentState: () => PageState;
76
+ /** Get available height in current column. */
77
+ getAvailableHeight: () => number;
78
+ /** Get content width for the active section. */
79
+ getContentWidth: () => number;
80
+ /** Check if height fits in current column. */
81
+ fits: (height: number) => boolean;
82
+ /** Ensure height fits, advancing if needed. */
83
+ ensureFits: (height: number) => PageState;
84
+ /** Add a fragment to current page. */
85
+ addFragment: (fragment: Fragment, height: number, spaceBefore?: number, spaceAfter?: number) => {
86
+ state: PageState;
87
+ x: number;
88
+ y: number;
89
+ };
90
+ /** Force a page break. */
91
+ forcePageBreak: () => PageState;
92
+ /** Force a column break. */
93
+ forceColumnBreak: () => PageState;
94
+ /** Get X position for column. */
95
+ getColumnX: (columnIndex: number) => number;
96
+ /** Update column layout (for section breaks). */
97
+ updateColumns: (newColumns: ColumnLayout) => void;
98
+ /** Update page size/margins for subsequent pages. */
99
+ updatePageLayout: (newPageSize?: {
100
+ w: number;
101
+ h: number;
102
+ }, newMargins?: PageMargins, applyImmediately?: boolean) => void;
103
+ };
104
+ type Paginator = ReturnType<typeof createPaginator>;
105
+
106
+ /**
107
+ * Keep Together Logic - Handle keepNext and keepLines paragraph properties
108
+ *
109
+ * DOCX paragraphs can have keepNext (keep with next paragraph) and keepLines
110
+ * (keep all lines together) properties that affect pagination.
111
+ */
112
+
113
+ /**
114
+ * A chain of consecutive keepNext paragraphs.
115
+ */
116
+ type KeepNextChain = {
117
+ /** Index of the first paragraph in the chain. */
118
+ startIndex: number;
119
+ /** Index of the last paragraph in the chain. */
120
+ endIndex: number;
121
+ /** All paragraph indices in the chain. */
122
+ memberIndices: number[];
123
+ /** Index of the anchor paragraph (first non-keepNext after chain), or -1 if none. */
124
+ anchorIndex: number;
125
+ };
126
+ /**
127
+ * Pre-scan blocks to find all keepNext chains.
128
+ *
129
+ * A keepNext chain is a sequence of consecutive paragraphs with keepNext=true,
130
+ * followed by an anchor paragraph (the first non-keepNext paragraph).
131
+ * The entire chain must stay on the same page as the anchor's first line.
132
+ *
133
+ * Returns a map from chain start index to chain info.
134
+ */
135
+ declare function computeKeepNextChains(blocks: FlowBlock[]): Map<number, KeepNextChain>;
136
+ /**
137
+ * Calculate the total height needed to keep a chain together.
138
+ *
139
+ * Includes all chain members plus the first line of the anchor paragraph.
140
+ */
141
+ declare function calculateChainHeight(chain: KeepNextChain, blocks: FlowBlock[], measures: Measure[]): number;
142
+ /**
143
+ * Get the set of indices that are mid-chain (not chain starters).
144
+ * These should skip the keepNext check since their chain starter already decided.
145
+ */
146
+ declare function getMidChainIndices(chains: Map<number, KeepNextChain>): Set<number>;
147
+ /**
148
+ * Check if a paragraph has keepLines property (all lines must stay together).
149
+ */
150
+ declare function hasKeepLines(block: FlowBlock): boolean;
151
+ /**
152
+ * Check if a paragraph should start on a new page (pageBreakBefore).
153
+ */
154
+ declare function hasPageBreakBefore(block: FlowBlock): boolean;
155
+
156
+ /**
157
+ * Section Breaks - Handle page layout changes at section boundaries
158
+ *
159
+ * Sections in DOCX can have different page sizes, margins, columns, and orientations.
160
+ * This module manages the state transitions between sections during layout.
161
+ */
162
+
163
+ /**
164
+ * State tracking for sections during layout.
165
+ * Uses active/pending pattern to schedule changes at page boundaries.
166
+ */
167
+ type SectionState = {
168
+ /** Currently active top margin. */
169
+ activeTopMargin: number;
170
+ /** Currently active bottom margin. */
171
+ activeBottomMargin: number;
172
+ /** Currently active left margin. */
173
+ activeLeftMargin: number;
174
+ /** Currently active right margin. */
175
+ activeRightMargin: number;
176
+ /** Scheduled top margin for next page. */
177
+ pendingTopMargin: number | null;
178
+ /** Scheduled bottom margin for next page. */
179
+ pendingBottomMargin: number | null;
180
+ /** Scheduled left margin for next page. */
181
+ pendingLeftMargin: number | null;
182
+ /** Scheduled right margin for next page. */
183
+ pendingRightMargin: number | null;
184
+ /** Currently active page size. */
185
+ activePageSize: {
186
+ w: number;
187
+ h: number;
188
+ };
189
+ /** Scheduled page size for next page. */
190
+ pendingPageSize: {
191
+ w: number;
192
+ h: number;
193
+ } | null;
194
+ /** Currently active column layout. */
195
+ activeColumns: ColumnLayout;
196
+ /** Scheduled column layout for next page. */
197
+ pendingColumns: ColumnLayout | null;
198
+ /** Currently active orientation. */
199
+ activeOrientation: 'portrait' | 'landscape' | null;
200
+ /** Scheduled orientation for next page. */
201
+ pendingOrientation: 'portrait' | 'landscape' | null;
202
+ /** Whether any pages have been created yet. */
203
+ hasAnyPages: boolean;
204
+ };
205
+ /**
206
+ * Decision about what happens at a section break.
207
+ */
208
+ type BreakDecision = {
209
+ /** Force a page break. */
210
+ forcePageBreak: boolean;
211
+ /** Force a mid-page region change (for column layout changes). */
212
+ forceMidPageRegion: boolean;
213
+ /** Required page parity (even or odd). */
214
+ requiredParity?: 'even' | 'odd';
215
+ };
216
+ /**
217
+ * Create initial section state from default options.
218
+ */
219
+ declare function createInitialSectionState(margins: PageMargins, pageSize: {
220
+ w: number;
221
+ h: number;
222
+ }, columns?: ColumnLayout): SectionState;
223
+ /**
224
+ * Schedule section break effects by analyzing the break type and updating state.
225
+ *
226
+ * This determines what layout changes should occur (page break, column changes)
227
+ * and schedules the new section properties to be applied at the appropriate boundary.
228
+ */
229
+ declare function scheduleSectionBreak(block: SectionBreakBlock, state: SectionState, _baseMargins: PageMargins): {
230
+ decision: BreakDecision;
231
+ state: SectionState;
232
+ };
233
+ /**
234
+ * Apply pending section state to active state at a page boundary.
235
+ * Transfers all pending values to active and clears pending.
236
+ */
237
+ declare function applyPendingToActive(state: SectionState): SectionState;
238
+ /**
239
+ * Get the effective margins for the current section state.
240
+ * Returns active margins, or pending if scheduled.
241
+ */
242
+ declare function getEffectiveMargins(state: SectionState): PageMargins;
243
+ /**
244
+ * Get the effective page size for the current section state.
245
+ */
246
+ declare function getEffectivePageSize(state: SectionState): {
247
+ w: number;
248
+ h: number;
249
+ };
250
+ /**
251
+ * Get the effective columns for the current section state.
252
+ */
253
+ declare function getEffectiveColumns(state: SectionState): ColumnLayout;
254
+
255
+ /**
256
+ * Page index (0-based) whose layout fragments cover `pmPos`, or null if none.
257
+ * Used when the painted DOM may not yet have `[data-pm-start]` for this position (virtualization).
258
+ *
259
+ * Range semantics: `[pmStart, pmEnd)` — half-open, matching ProseMirror's
260
+ * `pos + nodeSize` convention. Boundary positions belong to the next fragment,
261
+ * so when a fragment ends at the same position the next one starts, the next
262
+ * fragment wins (avoids returning the previous page for the start of the
263
+ * next paragraph).
264
+ */
265
+ declare function findPageIndexContainingPmPos(layout: Layout, pmPos: number): number | null;
266
+
267
+ /**
268
+ * Layout Engine - Main Entry Point
269
+ *
270
+ * Converts blocks + measures into positioned fragments on pages.
271
+ *
272
+ * @experimental Stable enough for the first-party React adapter, but the
273
+ * API may change in minor releases until a third-party adapter validates
274
+ * it. Pin a version range if you depend on this directly.
275
+ * @packageDocumentation
276
+ * @public
277
+ */
278
+
279
+ /**
280
+ * Page-flow geometry resolved from a single section's properties.
281
+ * Exported so the React paged editor can reuse the same shape when
282
+ * measuring blocks per section width — keeping pagination and
283
+ * measurement consistent.
284
+ */
285
+ type SectionLayoutConfig = {
286
+ pageSize: {
287
+ w: number;
288
+ h: number;
289
+ };
290
+ margins: PageMargins;
291
+ /** Optional. Sections without explicit columns inherit `{ count: 1 }`. */
292
+ columns?: ColumnLayout;
293
+ };
294
+ /**
295
+ * Walk `blocks` once and collect per-section geometry. `configs` has one
296
+ * entry per section break plus a trailing `finalConfig`. `breakIndices` is
297
+ * 1-to-1 with the inner break entries (same length as `configs.length - 1`).
298
+ * Callers that need the break `type` can read it from
299
+ * `(blocks[breakIndices[i]] as SectionBreakBlock).type`.
300
+ *
301
+ * @internal
302
+ */
303
+ declare function collectSectionConfigs(blocks: FlowBlock[], initialConfig: SectionLayoutConfig, finalConfig: SectionLayoutConfig): {
304
+ configs: SectionLayoutConfig[];
305
+ breakIndices: number[];
306
+ };
307
+ /**
308
+ * Layout a document: convert blocks + measures into pages with positioned fragments.
309
+ *
310
+ * Algorithm:
311
+ * 1. Walk blocks in order with their corresponding measures
312
+ * 2. For each block, create appropriate fragment(s)
313
+ * 3. Use paginator to manage page/column state
314
+ * 4. Handle page breaks, section breaks, and keepNext chains
315
+ */
316
+ declare function layoutDocument(blocks: FlowBlock[], measures: Measure[], options?: LayoutOptions): Layout;
317
+ /**
318
+ * Calculate total height of header rows from their measures.
319
+ */
320
+ declare function getHeaderRowsHeight(measure: TableMeasure, headerRowCount: number): number;
321
+
322
+ export { type BreakDecision, ColumnLayout, FlowBlock, Fragment, type KeepNextChain, Layout, LayoutOptions, Measure, Page, PageMargins, type PageState, type Paginator, type PaginatorOptions, SectionBreakBlock, type SectionLayoutConfig, type SectionState, TableMeasure, applyPendingToActive, calculateChainHeight, collectSectionConfigs, computeKeepNextChains, createInitialSectionState, createPaginator, findPageIndexContainingPmPos, getEffectiveColumns, getEffectiveMargins, getEffectivePageSize, getHeaderRowsHeight, getMidChainIndices, hasKeepLines, hasPageBreakBefore, layoutDocument, scheduleSectionBreak };
@@ -0,0 +1 @@
1
+ 'use strict';var chunk44RUAQA2_js=require('../chunk-44RUAQA2.js'),chunkDROCYKAR_js=require('../chunk-DROCYKAR.js');require('../chunk-JFZIXFRC.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"applyPendingToActive",{enumerable:true,get:function(){return chunk44RUAQA2_js.k}});Object.defineProperty(exports,"calculateChainHeight",{enumerable:true,get:function(){return chunk44RUAQA2_js.c}});Object.defineProperty(exports,"collectSectionConfigs",{enumerable:true,get:function(){return chunk44RUAQA2_js.p}});Object.defineProperty(exports,"computeKeepNextChains",{enumerable:true,get:function(){return chunk44RUAQA2_js.b}});Object.defineProperty(exports,"createInitialSectionState",{enumerable:true,get:function(){return chunk44RUAQA2_js.i}});Object.defineProperty(exports,"createPaginator",{enumerable:true,get:function(){return chunk44RUAQA2_js.a}});Object.defineProperty(exports,"findPageIndexContainingPmPos",{enumerable:true,get:function(){return chunk44RUAQA2_js.o}});Object.defineProperty(exports,"getEffectiveColumns",{enumerable:true,get:function(){return chunk44RUAQA2_js.n}});Object.defineProperty(exports,"getEffectiveMargins",{enumerable:true,get:function(){return chunk44RUAQA2_js.l}});Object.defineProperty(exports,"getEffectivePageSize",{enumerable:true,get:function(){return chunk44RUAQA2_js.m}});Object.defineProperty(exports,"getHeaderRowsHeight",{enumerable:true,get:function(){return chunk44RUAQA2_js.r}});Object.defineProperty(exports,"getMidChainIndices",{enumerable:true,get:function(){return chunk44RUAQA2_js.d}});Object.defineProperty(exports,"hasKeepLines",{enumerable:true,get:function(){return chunk44RUAQA2_js.e}});Object.defineProperty(exports,"hasPageBreakBefore",{enumerable:true,get:function(){return chunk44RUAQA2_js.f}});Object.defineProperty(exports,"layoutDocument",{enumerable:true,get:function(){return chunk44RUAQA2_js.q}});Object.defineProperty(exports,"scheduleSectionBreak",{enumerable:true,get:function(){return chunk44RUAQA2_js.j}});Object.defineProperty(exports,"DEFAULT_TEXTBOX_MARGINS",{enumerable:true,get:function(){return chunkDROCYKAR_js.a}});Object.defineProperty(exports,"DEFAULT_TEXTBOX_WIDTH",{enumerable:true,get:function(){return chunkDROCYKAR_js.b}});Object.defineProperty(exports,"assertExhaustiveFlowBlock",{enumerable:true,get:function(){return chunkDROCYKAR_js.c}});
@@ -0,0 +1 @@
1
+ export{k as applyPendingToActive,c as calculateChainHeight,p as collectSectionConfigs,b as computeKeepNextChains,i as createInitialSectionState,a as createPaginator,o as findPageIndexContainingPmPos,n as getEffectiveColumns,l as getEffectiveMargins,m as getEffectivePageSize,r as getHeaderRowsHeight,d as getMidChainIndices,e as hasKeepLines,f as hasPageBreakBefore,q as layoutDocument,j as scheduleSectionBreak}from'../chunk-5N5DBQJV.mjs';export{a as DEFAULT_TEXTBOX_MARGINS,b as DEFAULT_TEXTBOX_WIDTH,c as assertExhaustiveFlowBlock}from'../chunk-7E5VBRDL.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-QYUPLKLP.mjs';