@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,674 @@
1
+ /**
2
+ * Page Renderer
3
+ *
4
+ * Renders a single page from Layout data to DOM elements.
5
+ * Each page contains positioned fragments within a content area.
6
+ *
7
+ * This file owns the single-page orchestrator (`renderPage`) plus page-level
8
+ * styling (background, borders, content area) and floating-image extraction
9
+ * from paragraphs. Header/footer rendering lives in ./renderPage/headerFooter.ts,
10
+ * footnote area rendering in ./renderPage/footnotes.ts, and the multi-page
11
+ * virtualization / IntersectionObserver layer in ./renderPage/virtualization.ts.
12
+ * @packageDocumentation
13
+ * @public
14
+ */
15
+ import { ImageRun, Page, ParagraphBlock, MeasuredLine, TabStop, Run, ParagraphFragment, ParagraphMeasure, ParagraphBorders, Fragment, TableFragment, TableBlock, TableMeasure, ImageFragment, ImageBlock, ImageMeasure, TextBoxFragment, TextBoxBlock, TextBoxMeasure, FlowBlock, Measure, Layout } from '../layout-engine/types.js';
16
+ import { I as ImageAttrs } from '../nodes-DfKj9kUA.js';
17
+ import { I as ImageLayoutTarget } from '../ImageExtension-BlI5afZD.js';
18
+ import { WrapType } from '../docx/wrapTypes.js';
19
+ import { F as FootnoteRenderItem, H as HeaderFooterContent } from '../footnotes-skVvEHvZ.js';
20
+ export { a as HeaderFooterLayoutInfo, r as resolveHeaderFooterFloatingTablePosition } from '../footnotes-skVvEHvZ.js';
21
+ import { B as BorderSpec } from '../colors-C3vA7HUU.js';
22
+ import { T as Theme } from '../styles-jqO45PSq.js';
23
+ import '../formatting-BwpZWdGi.js';
24
+ import '../lists-CdiIk_c1.js';
25
+ import '../types/content.js';
26
+
27
+ /**
28
+ * Whether a floating image record reserves space in the text-wrap calculation.
29
+ * Records reaching this predicate have already passed `isFloatingImageRun`, so
30
+ * `wrapType=undefined` implies a `cssFloat`-driven float that wraps text.
31
+ */
32
+ declare function floatingImageWrapsText(img: {
33
+ wrapType?: string;
34
+ }): boolean;
35
+ declare function floatingImageIsBehindDoc(img: {
36
+ wrapType?: string;
37
+ }): boolean;
38
+ /**
39
+ * Check if an image run is a floating image positioned at page/cell level.
40
+ */
41
+ declare function isFloatingImageRun(run: ImageRun): boolean;
42
+ /**
43
+ * Check if a floating image should create text wrapping exclusion zones.
44
+ * wrapNone images (`behind` / `inFront`) are positioned floats but do not
45
+ * shrink line widths; text paints over or under them.
46
+ */
47
+ declare function isTextWrappingFloatingImageRun(run: ImageRun): boolean;
48
+
49
+ /**
50
+ * Minimum fields the floating-image painter needs. Page-level and cell-level
51
+ * float records both satisfy this shape.
52
+ */
53
+ interface FloatingImagePaintRecord {
54
+ src: string;
55
+ width: number;
56
+ height: number;
57
+ alt?: string;
58
+ transform?: string;
59
+ x: number;
60
+ y: number;
61
+ pmStart?: number;
62
+ pmEnd?: number;
63
+ /** wp:srcRect crop fractions in [0, 1]. */
64
+ cropTop?: number;
65
+ cropRight?: number;
66
+ cropBottom?: number;
67
+ cropLeft?: number;
68
+ /** a:alphaModFix -> CSS opacity. */
69
+ opacity?: number;
70
+ }
71
+ interface FloatingImagesLayerOptions {
72
+ layerClass: string;
73
+ itemClass: string;
74
+ /**
75
+ * `inset0` sizes the layer with `top/right/bottom/left = 0` (used at page level).
76
+ * `fullSize` uses `width/height = 100%` and adds `overflow: hidden` (used inside table cells).
77
+ */
78
+ sizing: 'inset0' | 'fullSize';
79
+ /** `behind` skips z-index so DOM order keeps the layer below body fragments. */
80
+ layerMode: 'front' | 'behind';
81
+ }
82
+ /**
83
+ * Render a layer of positioned floating images. Used at both page level and
84
+ * inside table cells; the variant differs only in class names and sizing.
85
+ */
86
+ declare function renderFloatingImagesLayer(floatingImages: FloatingImagePaintRecord[], doc: Document, options: FloatingImagesLayerOptions): HTMLElement;
87
+
88
+ /**
89
+ * Multi-page rendering with virtualization.
90
+ *
91
+ * For documents under VIRTUALIZATION_THRESHOLD pages, all pages render
92
+ * eagerly. Larger documents render only pages near the viewport — off-screen
93
+ * pages are lightweight shells (correct dimensions, no fragment content) so
94
+ * scroll position is preserved. An IntersectionObserver populates and clears
95
+ * page content as the user scrolls. Incremental updates (re-rendering only
96
+ * fingerprint-changed pages) avoid blink when the document model shifts.
97
+ */
98
+
99
+ type RenderPagesUpdateKind = 'incremental' | 'full';
100
+ /**
101
+ * Render multiple pages to a container with virtualization for large documents.
102
+ *
103
+ * For documents with fewer than VIRTUALIZATION_THRESHOLD pages, all pages
104
+ * are rendered eagerly. For larger documents, only pages near the visible
105
+ * viewport are fully rendered — off-screen pages are lightweight shells
106
+ * with correct dimensions to preserve scroll position.
107
+ *
108
+ * An IntersectionObserver watches page elements and populates/clears
109
+ * content as pages scroll into and out of view.
110
+ */
111
+ declare function renderPages(pages: Page[], container: HTMLElement, options?: RenderPageOptions & {
112
+ pageGap?: number;
113
+ footnotesByPage?: Map<number, FootnoteRenderItem[]>;
114
+ }): RenderPagesUpdateKind;
115
+
116
+ /**
117
+ * Page Renderer
118
+ *
119
+ * Renders a single page from Layout data to DOM elements.
120
+ * Each page contains positioned fragments within a content area.
121
+ *
122
+ * This file owns the single-page orchestrator (`renderPage`) plus page-level
123
+ * styling (background, borders, content area) and floating-image extraction
124
+ * from paragraphs. Header/footer rendering lives in ./renderPage/headerFooter.ts,
125
+ * footnote area rendering in ./renderPage/footnotes.ts, and the multi-page
126
+ * virtualization / IntersectionObserver layer in ./renderPage/virtualization.ts.
127
+ * @packageDocumentation
128
+ * @public
129
+ */
130
+
131
+ /**
132
+ * CSS class names for page elements
133
+ */
134
+ declare const PAGE_CLASS_NAMES: {
135
+ page: string;
136
+ content: string;
137
+ header: string;
138
+ footer: string;
139
+ };
140
+ /**
141
+ * Context passed to fragment renderers
142
+ */
143
+ interface RenderContext {
144
+ /** Current page number (1-indexed) */
145
+ pageNumber: number;
146
+ /** Total number of pages */
147
+ totalPages: number;
148
+ /** Which section is being rendered */
149
+ section: 'body' | 'header' | 'footer';
150
+ /** Content width in pixels (page width minus margins) - used for justify */
151
+ contentWidth?: number;
152
+ /** When true, floating images render in-flow instead of being skipped (for table cells) */
153
+ insideTableCell?: boolean;
154
+ /** Comment IDs that are resolved — skip highlight for these */
155
+ resolvedCommentIds?: Set<number>;
156
+ /**
157
+ * How the renderer should position its outer element. The body lays
158
+ * fragments at absolute (x, y) on the page (`'absolute'`, the default),
159
+ * while headers/footers and text boxes flow blocks vertically and let
160
+ * normal document flow handle placement (`'flow'`). The caller passes
161
+ * 'flow' instead of overwriting the renderer's inline styles after the
162
+ * fact (#379).
163
+ */
164
+ positioning?: 'absolute' | 'flow';
165
+ }
166
+ /**
167
+ * Options for rendering a page
168
+ */
169
+ interface RenderPageOptions {
170
+ /** Document to create elements in (default: window.document) */
171
+ document?: Document;
172
+ /** Custom page class name */
173
+ pageClassName?: string;
174
+ /** Show page borders (for debugging) */
175
+ showBorders?: boolean;
176
+ /** Background color for pages */
177
+ backgroundColor?: string;
178
+ /** Drop shadow on pages */
179
+ showShadow?: boolean;
180
+ /** Header content to render (used for all pages, or pages 2+ when titlePg is set). */
181
+ headerContent?: HeaderFooterContent;
182
+ /** Footer content to render (used for all pages, or pages 2+ when titlePg is set). */
183
+ footerContent?: HeaderFooterContent;
184
+ /** Header content for the first page only (when titlePg is set). */
185
+ firstPageHeaderContent?: HeaderFooterContent;
186
+ /** Footer content for the first page only (when titlePg is set). */
187
+ firstPageFooterContent?: HeaderFooterContent;
188
+ /** Whether different first page headers/footers are enabled (w:titlePg). */
189
+ titlePg?: boolean;
190
+ /** Distance from page top to header content. */
191
+ headerDistance?: number;
192
+ /** Distance from page bottom to footer content. */
193
+ footerDistance?: number;
194
+ /** Block lookup for rendering actual content. */
195
+ blockLookup?: BlockLookup;
196
+ /** OOXML page borders from section properties. */
197
+ pageBorders?: {
198
+ top?: BorderSpec;
199
+ bottom?: BorderSpec;
200
+ left?: BorderSpec;
201
+ right?: BorderSpec;
202
+ display?: 'allPages' | 'firstPage' | 'notFirstPage';
203
+ offsetFrom?: 'page' | 'text';
204
+ zOrder?: 'front' | 'back';
205
+ };
206
+ /** Theme for resolving border colors. */
207
+ theme?: Theme | null;
208
+ /** Footnotes to render at the bottom of this page. */
209
+ footnoteArea?: FootnoteRenderItem[];
210
+ /** Comment IDs that are resolved — skip highlight for these */
211
+ resolvedCommentIds?: Set<number>;
212
+ }
213
+ /**
214
+ * Apply page styles to an element. Exported because virtualization.ts uses it
215
+ * to size lightweight shells before content lands in them.
216
+ */
217
+ declare function applyPageStyles(element: HTMLElement, width: number, height: number, options: RenderPageOptions): void;
218
+ /**
219
+ * Render a single page to DOM
220
+ *
221
+ * @param page - The page to render
222
+ * @param context - Rendering context
223
+ * @param options - Rendering options
224
+ * @returns The page DOM element
225
+ */
226
+ declare function renderPage(page: Page, context: RenderContext, options?: RenderPageOptions): HTMLElement;
227
+
228
+ /**
229
+ * Line-level rendering.
230
+ *
231
+ * Owns `renderLine` and its helpers: slicing the paragraph's runs to the
232
+ * line's character range, justify decisions, per-line floating margins,
233
+ * tab-width calculation through the tabCalculator (explicit stops + default
234
+ * intervals), inline image dedup, and field-value substitution width math.
235
+ */
236
+
237
+ /**
238
+ * Slice runs for a specific line
239
+ *
240
+ * @param block - The paragraph block
241
+ * @param line - The line measurement
242
+ * @returns Array of runs for this line
243
+ */
244
+ declare function sliceRunsForLine(block: ParagraphBlock, line: MeasuredLine): Run[];
245
+ /**
246
+ * Options for rendering a line with justify support
247
+ */
248
+ interface RenderLineOptions {
249
+ /** Available width for the line (content area width minus indentation) */
250
+ availableWidth: number;
251
+ /** Whether this is the last line of the paragraph */
252
+ isLastLine: boolean;
253
+ /** Whether this is the first line of the paragraph */
254
+ isFirstLine: boolean;
255
+ /** Whether the paragraph ends with a line break */
256
+ paragraphEndsWithLineBreak: boolean;
257
+ /** Tab stops from paragraph attributes */
258
+ tabStops?: TabStop[];
259
+ /** Render context for field substitution */
260
+ context?: RenderContext;
261
+ /** Left indent in pixels */
262
+ leftIndentPx?: number;
263
+ /** First line indent in pixels (positive) or hanging indent (negative) */
264
+ firstLineIndentPx?: number;
265
+ /** Line-specific floating image margins (calculated per-line based on Y overlap) */
266
+ floatingMargins?: {
267
+ leftMargin: number;
268
+ rightMargin: number;
269
+ };
270
+ /** Track inline image runs already rendered in this paragraph fragment to prevent duplicates */
271
+ renderedInlineImageKeys?: Set<string>;
272
+ }
273
+ /**
274
+ * Render a single line
275
+ *
276
+ * @param block - The paragraph block
277
+ * @param line - The line measurement
278
+ * @param alignment - Text alignment
279
+ * @param doc - Document to create elements in
280
+ * @param options - Additional options for justify calculation
281
+ * @returns The line DOM element
282
+ */
283
+ declare function renderLine(block: ParagraphBlock, line: MeasuredLine, alignment: 'left' | 'center' | 'right' | 'justify' | undefined, doc: Document, options?: RenderLineOptions): HTMLElement;
284
+
285
+ /**
286
+ * Paragraph Fragment Renderer
287
+ *
288
+ * Renders paragraph fragments with lines and text runs to DOM.
289
+ * Handles text formatting, alignment, and positioning.
290
+ *
291
+ * This file owns `renderParagraphFragment` (the orchestrator), the
292
+ * border-grouping helpers, and the list-marker renderer. Per-run rendering
293
+ * (text/tab/image/break/field) lives in ./renderParagraph/runs.ts and the
294
+ * line-level walker is in ./renderParagraph/line.ts. The shared class-name
295
+ * constants and run-type guards are in ./renderParagraph/shared.ts.
296
+ */
297
+
298
+ /**
299
+ * Options for rendering a paragraph
300
+ */
301
+ interface RenderParagraphOptions {
302
+ /** Document to create elements in */
303
+ document?: Document;
304
+ /** Fragment's Y position relative to content area (for per-line margin calculation) */
305
+ fragmentContentY?: number;
306
+ /** Borders from the previous adjacent paragraph (for border grouping) */
307
+ prevBorders?: ParagraphBorders;
308
+ /** Borders from the next adjacent paragraph (for border grouping) */
309
+ nextBorders?: ParagraphBorders;
310
+ /** Inline image runs already rendered for this paragraph block */
311
+ renderedInlineImageKeys?: Set<string>;
312
+ }
313
+ /**
314
+ * Render a paragraph fragment
315
+ *
316
+ * @param fragment - The fragment to render
317
+ * @param block - The paragraph block
318
+ * @param measure - The paragraph measurement
319
+ * @param context - Rendering context
320
+ * @param options - Rendering options
321
+ * @returns The fragment DOM element
322
+ */
323
+ declare function renderParagraphFragment(fragment: ParagraphFragment, block: ParagraphBlock, measure: ParagraphMeasure, context: RenderContext, options?: RenderParagraphOptions): HTMLElement;
324
+
325
+ /**
326
+ * Fragment Renderer
327
+ *
328
+ * Renders individual fragments (paragraphs, tables, images) to DOM.
329
+ * Each fragment is positioned within a page's content area.
330
+ */
331
+
332
+ /**
333
+ * CSS class names for fragment elements
334
+ */
335
+ declare const FRAGMENT_CLASS_NAMES: {
336
+ fragment: string;
337
+ paragraph: string;
338
+ table: string;
339
+ image: string;
340
+ line: string;
341
+ run: string;
342
+ };
343
+ /**
344
+ * Options for rendering fragments
345
+ */
346
+ interface RenderFragmentOptions {
347
+ /** Document to create elements in */
348
+ document?: Document;
349
+ }
350
+ /**
351
+ * Render a fragment to DOM
352
+ *
353
+ * @param fragment - The fragment to render
354
+ * @param context - Rendering context
355
+ * @param options - Rendering options
356
+ * @returns The fragment DOM element
357
+ */
358
+ declare function renderFragment(fragment: Fragment, context: RenderContext, options?: RenderFragmentOptions): HTMLElement;
359
+
360
+ /**
361
+ * Table Renderer
362
+ *
363
+ * Renders table fragments to DOM. Handles:
364
+ * - Multi-row tables split across pages
365
+ * - Cell content (paragraphs within cells)
366
+ * - Column widths and cell spans
367
+ * - Basic cell styling (borders, backgrounds)
368
+ */
369
+
370
+ /**
371
+ * CSS class names for table elements
372
+ */
373
+ declare const TABLE_CLASS_NAMES: {
374
+ table: string;
375
+ row: string;
376
+ cell: string;
377
+ cellContent: string;
378
+ resizeHandle: string;
379
+ rowResizeHandle: string;
380
+ tableEdgeHandleBottom: string;
381
+ tableEdgeHandleRight: string;
382
+ };
383
+ /**
384
+ * Options for rendering a table fragment
385
+ */
386
+ interface RenderTableFragmentOptions {
387
+ document?: Document;
388
+ }
389
+ /**
390
+ * Render a table fragment to DOM
391
+ *
392
+ * @param fragment - The table fragment to render
393
+ * @param block - The full table block
394
+ * @param measure - The full table measure
395
+ * @param context - Rendering context
396
+ * @param options - Rendering options
397
+ * @returns The table DOM element
398
+ */
399
+ declare function renderTableFragment(fragment: TableFragment, block: TableBlock, measure: TableMeasure, context: RenderContext, options?: RenderTableFragmentOptions): HTMLElement;
400
+
401
+ /**
402
+ * Image Renderer
403
+ *
404
+ * Renders image fragments to DOM. Handles:
405
+ * - Inline images
406
+ * - Anchored/floating images with z-index layering
407
+ * - Basic image sizing
408
+ */
409
+
410
+ /**
411
+ * CSS class names for image elements
412
+ */
413
+ declare const IMAGE_CLASS_NAMES: {
414
+ image: string;
415
+ imageAnchored: string;
416
+ };
417
+ /**
418
+ * Options for rendering an image fragment
419
+ */
420
+ interface RenderImageFragmentOptions {
421
+ document?: Document;
422
+ }
423
+ /**
424
+ * Render an image fragment to DOM
425
+ *
426
+ * @param fragment - The image fragment to render
427
+ * @param block - The full image block
428
+ * @param measure - The image measure
429
+ * @param context - Rendering context
430
+ * @param options - Rendering options
431
+ * @returns The image DOM element
432
+ */
433
+ declare function renderImageFragment(fragment: ImageFragment, block: ImageBlock, _measure: ImageMeasure, _context: RenderContext, options?: RenderImageFragmentOptions): HTMLElement;
434
+
435
+ /**
436
+ * Text Box Renderer
437
+ *
438
+ * Renders text box fragments to DOM. Handles:
439
+ * - Background fill color
440
+ * - Border/outline
441
+ * - Internal padding (margins)
442
+ * - Paragraph content inside the box (using pre-measured data)
443
+ */
444
+
445
+ /**
446
+ * CSS class names for text box elements
447
+ */
448
+ declare const TEXTBOX_CLASS_NAMES: {
449
+ textBox: string;
450
+ };
451
+ /**
452
+ * Options for rendering a text box fragment
453
+ */
454
+ interface RenderTextBoxFragmentOptions {
455
+ document?: Document;
456
+ }
457
+ /**
458
+ * Render a text box fragment to DOM
459
+ */
460
+ declare function renderTextBoxFragment(fragment: TextBoxFragment, block: TextBoxBlock, measure: TextBoxMeasure, context: RenderContext, options?: RenderTextBoxFragmentOptions): HTMLElement;
461
+
462
+ /**
463
+ * Image layout helpers shared between framework adapters (React, Vue, ...).
464
+ *
465
+ * Everything here is framework-agnostic: pure DOM math + pure functions over
466
+ * OOXML wrap-type vocabulary. The corresponding UI bindings (right-click menu,
467
+ * toolbar dropdown) live in each framework adapter and call into these.
468
+ */
469
+
470
+ declare const LAYOUT_IMAGE_CLASSES: {
471
+ /** Inline image rendered inside `.layout-line`. */
472
+ readonly runImage: "layout-run-image";
473
+ /** Block (centered, topAndBottom) image. */
474
+ readonly blockImage: "layout-block-image";
475
+ /** Anchored image rendered in the page-level floating layer. */
476
+ readonly pageFloatingImage: "layout-page-floating-image";
477
+ /** Anchored image rendered inside a table cell's floating layer. */
478
+ readonly cellFloatingImage: "layout-cell-floating-image";
479
+ readonly pageContent: "layout-page-content";
480
+ readonly paragraph: "layout-paragraph";
481
+ };
482
+ interface ImageHitTestResult {
483
+ /** PM doc position of the image node, read from `data-pm-start`. */
484
+ pos: number;
485
+ /** The matched element — pass to `captureInlinePositionEmu` if it's inline. */
486
+ imageEl: HTMLElement;
487
+ }
488
+ /**
489
+ * Walk up from an event target looking for any rendered image element. Returns
490
+ * the PM position embedded in `data-pm-start`, or null if the target isn't on
491
+ * an image.
492
+ */
493
+ declare function hitTestImage(target: EventTarget | null): ImageHitTestResult | null;
494
+ /**
495
+ * Walk up from a click target to the nearest rendered image element, returning
496
+ * just the element (no PM position parsing). Used by the left-click selection
497
+ * path in both adapters — `data-pm-start` is read separately by callers that
498
+ * need the position. Returns the element when the click was directly on an
499
+ * inline `<img.layout-run-image>` OR inside one of the container classes
500
+ * registered in `LAYOUT_IMAGE_CLASSES`.
501
+ */
502
+ declare function findImageElement(target: EventTarget | null): HTMLElement | null;
503
+ /**
504
+ * Capture the rendered position of an inline image as EMUs, normalised to
505
+ * unzoomed coordinates. Returns horizontal offset relative to the page
506
+ * content area (column origin) and vertical offset relative to the
507
+ * containing paragraph — matches the OOXML attrs the resolver writes
508
+ * (`relativeFrom: 'column'` / `relativeFrom: 'paragraph'`).
509
+ *
510
+ * `zoom` defaults to 1; pass the editor's current zoom factor when the
511
+ * pages container has a CSS scale applied so `getBoundingClientRect` deltas
512
+ * are converted back to authored-pixel space before going to EMU.
513
+ *
514
+ * Returns undefined for non-inline images or detached DOM.
515
+ */
516
+ declare function captureInlinePositionEmu(imageEl: HTMLElement, zoom?: number): {
517
+ horizontalEmu: number;
518
+ verticalEmu: number;
519
+ } | undefined;
520
+ /**
521
+ * Map an image's current OOXML attrs onto the menu's choice vocabulary so the
522
+ * menu can highlight the active option. Returns null for `topAndBottom` and
523
+ * any unknown wrap type — those don't have a directional menu entry.
524
+ *
525
+ * `cssFloat` accepts both `null` and `undefined` so framework adapters can
526
+ * use either as their "unset" sentinel without an extra normalisation step.
527
+ */
528
+ declare function deriveLayoutChoice(wrapType: WrapType, cssFloat?: ImageAttrs['cssFloat'] | null): ImageLayoutTarget | null;
529
+ /**
530
+ * Hint to the framework's icon registry for which Material Symbol — or
531
+ * equivalent — to render alongside each option. Bindings own the icon
532
+ * component itself.
533
+ */
534
+ type ImageLayoutIconHint = 'inline' | 'squareLeft' | 'squareRight' | 'behind' | 'inFront';
535
+ interface ImageLayoutOptionDef {
536
+ /** Choice value — what gets dispatched on click. */
537
+ choice: ImageLayoutTarget;
538
+ /** i18n key under `imageWrap.menu.*`. */
539
+ i18nLabelKey: string;
540
+ /** i18n key under `imageWrap.menuDesc.*`. */
541
+ i18nDescKey: string;
542
+ /** Hint for the framework's icon registry. */
543
+ iconHint: ImageLayoutIconHint;
544
+ }
545
+ /** Mirrors Word's Wrap Text menu — five directional options. */
546
+ declare const IMAGE_LAYOUT_OPTIONS: readonly ImageLayoutOptionDef[];
547
+ /**
548
+ * Whether a given option is enabled for an image with the given current wrap
549
+ * type. Every option stays clickable — picking the option that matches the
550
+ * current state is a no-op (the PM command early-returns), which matches
551
+ * Word's behavior. We don't grey out the current option, so the menu reads
552
+ * consistently regardless of whether the image is inline or anchored.
553
+ *
554
+ * The flag is kept around for forward-compatibility (e.g. future read-only
555
+ * mode), but currently always returns true.
556
+ */
557
+ declare function isImageLayoutOptionEnabled(_option: ImageLayoutOptionDef, _currentWrapType: WrapType): boolean;
558
+ /**
559
+ * Translate the legacy toolbar wrap-type vocabulary (`wrapLeft` / `wrapRight`
560
+ * / `square` / `tight` / `through` / `topAndBottom` / `behind` / `inFront` /
561
+ * `inline`) into a `ImageLayoutTarget` so toolbar dispatch shares the same PM
562
+ * command path as the right-click menu.
563
+ *
564
+ * Returns `undefined` for unknown values; callers should treat that as
565
+ * "no-op".
566
+ */
567
+ declare function toolbarValueToLayoutTarget(value: string): ImageLayoutTarget | undefined;
568
+
569
+ /**
570
+ * Layout Painter
571
+ *
572
+ * Main entry point for rendering Layout data to DOM.
573
+ * Provides reconciliation for efficient incremental updates.
574
+ *
575
+ * @experimental Stable enough for the first-party React adapter, but the
576
+ * API may change in minor releases until a third-party adapter validates
577
+ * it. Pin a version range if you depend on this directly.
578
+ * @packageDocumentation
579
+ * @public
580
+ */
581
+
582
+ /**
583
+ * Block lookup entry for painter
584
+ */
585
+ interface BlockLookupEntry {
586
+ block: FlowBlock;
587
+ measure: Measure;
588
+ version?: string;
589
+ }
590
+ /**
591
+ * Block lookup map type
592
+ */
593
+ type BlockLookup = Map<string, BlockLookupEntry>;
594
+ /**
595
+ * Painter options
596
+ */
597
+ interface PainterOptions {
598
+ /** Document to create elements in */
599
+ document?: Document;
600
+ /** Gap between pages in pixels */
601
+ pageGap?: number;
602
+ /** Show page shadows */
603
+ showShadow?: boolean;
604
+ /** Background color for pages */
605
+ pageBackground?: string;
606
+ /** Container background color */
607
+ containerBackground?: string;
608
+ }
609
+ /**
610
+ * Layout Painter class
611
+ *
612
+ * Renders Layout data to DOM with efficient reconciliation.
613
+ * Only updates changed pages and fragments for better performance.
614
+ */
615
+ declare class LayoutPainter {
616
+ private container;
617
+ private blockLookup;
618
+ private pageStates;
619
+ private totalPages;
620
+ private options;
621
+ private doc;
622
+ resolvedCommentIds: Set<number>;
623
+ constructor(options?: PainterOptions);
624
+ /**
625
+ * Set the block lookup map for rendering fragments
626
+ */
627
+ setBlockLookup(lookup: BlockLookup): void;
628
+ /**
629
+ * Mount the painter to a container element
630
+ */
631
+ mount(container: HTMLElement): void;
632
+ /**
633
+ * Unmount the painter
634
+ */
635
+ unmount(): void;
636
+ /**
637
+ * Apply styles to the container
638
+ */
639
+ private applyContainerStyles;
640
+ /**
641
+ * Paint a layout to the container
642
+ */
643
+ paint(layout: Layout): void;
644
+ /**
645
+ * Render a page using block lookup for full fragment rendering
646
+ */
647
+ private renderPageWithLookup;
648
+ /**
649
+ * Render a fragment using block lookup for full content rendering
650
+ */
651
+ private renderFragmentWithLookup;
652
+ /**
653
+ * Apply positioning styles to a fragment element
654
+ */
655
+ private applyFragmentPosition;
656
+ /**
657
+ * Get the current page count
658
+ */
659
+ getPageCount(): number;
660
+ /**
661
+ * Get a page element by index
662
+ */
663
+ getPageElement(index: number): HTMLElement | null;
664
+ /**
665
+ * Scroll to a specific page
666
+ */
667
+ scrollToPage(pageNumber: number): void;
668
+ }
669
+ /**
670
+ * Create a new LayoutPainter instance
671
+ */
672
+ declare function createPainter(options?: PainterOptions): LayoutPainter;
673
+
674
+ export { type BlockLookup as B, FRAGMENT_CLASS_NAMES as F, type FloatingImagePaintRecord, type FloatingImagesLayerOptions, FootnoteRenderItem, HeaderFooterContent, IMAGE_CLASS_NAMES as I, LAYOUT_IMAGE_CLASSES as L, type PainterOptions as P, PAGE_CLASS_NAMES, type RenderContext, type RenderPageOptions, type RenderPagesUpdateKind, TABLE_CLASS_NAMES as T, type BlockLookupEntry as a, applyPageStyles, IMAGE_LAYOUT_OPTIONS as b, type ImageHitTestResult as c, type ImageLayoutIconHint as d, type ImageLayoutOptionDef as e, LayoutPainter as f, floatingImageIsBehindDoc, floatingImageWrapsText, TEXTBOX_CLASS_NAMES as g, captureInlinePositionEmu as h, createPainter as i, isFloatingImageRun, isTextWrappingFloatingImageRun, deriveLayoutChoice as j, findImageElement as k, hitTestImage as l, isImageLayoutOptionEnabled as m, renderImageFragment as n, renderLine as o, renderParagraphFragment as p, renderTableFragment as q, renderFragment as r, renderFloatingImagesLayer, renderPage, renderPages, renderTextBoxFragment as s, sliceRunsForLine as t, toolbarValueToLayoutTarget as u };
@@ -0,0 +1 @@
1
+ 'use strict';var chunk4AJYHCPB_js=require('../chunk-4AJYHCPB.js');require('../chunk-N27FJQTG.js'),require('../chunk-44RUAQA2.js'),require('../chunk-DROCYKAR.js'),require('../chunk-DY2MJCSV.js'),require('../chunk-CWAP26GB.js'),require('../chunk-Y7JZPBBW.js'),require('../chunk-D4RPOJC7.js'),require('../chunk-IP2VXNWG.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-MZOVDLYL.js'),require('../chunk-YGHHSCPR.js'),require('../chunk-7VCMJCBY.js'),require('../chunk-SUXJX72X.js'),require('../chunk-DFZTUQ7O.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-NERY274X.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-T4CPTPRP.js'),require('../chunk-Q4CKLXWA.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"PAGE_CLASS_NAMES",{enumerable:true,get:function(){return chunk4AJYHCPB_js.D}});Object.defineProperty(exports,"applyPageStyles",{enumerable:true,get:function(){return chunk4AJYHCPB_js.E}});Object.defineProperty(exports,"floatingImageIsBehindDoc",{enumerable:true,get:function(){return chunk4AJYHCPB_js.o}});Object.defineProperty(exports,"floatingImageWrapsText",{enumerable:true,get:function(){return chunk4AJYHCPB_js.n}});Object.defineProperty(exports,"isFloatingImageRun",{enumerable:true,get:function(){return chunk4AJYHCPB_js.p}});Object.defineProperty(exports,"isTextWrappingFloatingImageRun",{enumerable:true,get:function(){return chunk4AJYHCPB_js.q}});Object.defineProperty(exports,"renderFloatingImagesLayer",{enumerable:true,get:function(){return chunk4AJYHCPB_js.w}});Object.defineProperty(exports,"renderPage",{enumerable:true,get:function(){return chunk4AJYHCPB_js.F}});Object.defineProperty(exports,"renderPages",{enumerable:true,get:function(){return chunk4AJYHCPB_js.C}});Object.defineProperty(exports,"resolveHeaderFooterFloatingTablePosition",{enumerable:true,get:function(){return chunk4AJYHCPB_js.B}});
@@ -0,0 +1 @@
1
+ export{D as PAGE_CLASS_NAMES,E as applyPageStyles,o as floatingImageIsBehindDoc,n as floatingImageWrapsText,p as isFloatingImageRun,q as isTextWrappingFloatingImageRun,w as renderFloatingImagesLayer,F as renderPage,C as renderPages,B as resolveHeaderFooterFloatingTablePosition}from'../chunk-V7BKPX67.mjs';import'../chunk-7GHQ4YCJ.mjs';import'../chunk-5N5DBQJV.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-G6Y4UZMJ.mjs';import'../chunk-BWHUD2XC.mjs';import'../chunk-UIROUI5I.mjs';import'../chunk-LBKMYD3M.mjs';import'../chunk-NBLJPT54.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-ILJUDEZ5.mjs';import'../chunk-IBNUQL57.mjs';import'../chunk-6LOYA7G5.mjs';import'../chunk-JKVXID22.mjs';import'../chunk-LVD6HXRF.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-CP5OSG5Z.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-6VUYFDHY.mjs';import'../chunk-VQWZHPWI.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';