@eigenpal/docx-editor-core 1.0.2 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/LICENSE +13 -16
  2. package/README.md +1 -1
  3. package/dist/agent/index.d.mts +4 -5
  4. package/dist/agent/index.d.ts +4 -5
  5. package/dist/agent/index.js +1 -1
  6. package/dist/agent/index.mjs +1 -1
  7. package/dist/{chunk-NLTX7XVR.js → chunk-25KY5HLN.js} +1 -1
  8. package/dist/chunk-44FHVKSI.js +1 -0
  9. package/dist/{chunk-4S5VOHQK.mjs → chunk-5CDBSK2R.mjs} +1 -1
  10. package/dist/chunk-6Y6LON6Y.mjs +1 -0
  11. package/dist/chunk-6ZXL3EIP.mjs +2 -0
  12. package/dist/chunk-73AZQWIE.js +1 -0
  13. package/dist/chunk-7HANRHHL.js +1 -0
  14. package/dist/chunk-7LRR7RKE.mjs +15 -0
  15. package/dist/{chunk-AGNZEOVL.mjs → chunk-7Z2AGPNQ.mjs} +1 -1
  16. package/dist/chunk-BGE57OES.js +1 -0
  17. package/dist/chunk-BOOHU5EW.mjs +1 -0
  18. package/dist/chunk-CA2EYL6T.mjs +1 -0
  19. package/dist/chunk-CTHHUJAB.mjs +2 -0
  20. package/dist/chunk-DLCDDB66.mjs +3 -0
  21. package/dist/chunk-DV6GWBUJ.js +2 -0
  22. package/dist/chunk-E4JMCA5X.js +2 -0
  23. package/dist/chunk-F44ZLDZS.js +4 -0
  24. package/dist/chunk-FCJWLEKT.mjs +1 -0
  25. package/dist/chunk-FDEDN2RC.mjs +0 -0
  26. package/dist/chunk-FEWCI2E5.mjs +1 -0
  27. package/dist/chunk-GFDIPDJ6.mjs +1 -0
  28. package/dist/chunk-GM4USWKO.js +2 -0
  29. package/dist/chunk-GWBVJZVT.js +3 -0
  30. package/dist/chunk-GY5BWVM7.js +1 -0
  31. package/dist/{chunk-7SGC3CXJ.js → chunk-H42RXHT4.js} +1 -1
  32. package/dist/chunk-HMBVSDCH.mjs +1 -0
  33. package/dist/chunk-HQPWFUP5.js +2 -0
  34. package/dist/chunk-HV6HE6YR.js +59 -0
  35. package/dist/chunk-IF4C25FN.mjs +1 -0
  36. package/dist/chunk-IMKU4O3P.js +1 -0
  37. package/dist/chunk-IQG3KLWY.mjs +2 -0
  38. package/dist/{chunk-AFMMYLPX.js → chunk-J4J2Y6EU.js} +2 -2
  39. package/dist/chunk-KGDXHUYC.js +1 -0
  40. package/dist/chunk-KHF4JU7D.mjs +1 -0
  41. package/dist/chunk-LCICADWM.js +2 -0
  42. package/dist/{chunk-GFQM7PKY.js → chunk-LOCW6MR2.js} +1 -1
  43. package/dist/chunk-LTHT4A4S.js +1 -0
  44. package/dist/chunk-MJ6XZFVD.mjs +1 -0
  45. package/dist/chunk-MNOHUTKE.js +15 -0
  46. package/dist/chunk-MP4QSEO2.mjs +1 -0
  47. package/dist/chunk-MZ2XCZAN.mjs +1 -0
  48. package/dist/chunk-OAWTQ3IY.js +1 -0
  49. package/dist/chunk-OEXVWIHW.mjs +2 -0
  50. package/dist/chunk-ONRBRDIC.mjs +59 -0
  51. package/dist/{chunk-6PR4XHQ3.mjs → chunk-ONWOHAFW.mjs} +1 -1
  52. package/dist/{chunk-EXOP727C.mjs → chunk-OUEKNYX5.mjs} +1 -1
  53. package/dist/chunk-OX75Q5ZG.mjs +1 -0
  54. package/dist/chunk-QEACB5VG.js +1 -0
  55. package/dist/chunk-RFC2SXZ6.mjs +4 -0
  56. package/dist/chunk-RFVFX5WK.mjs +1 -0
  57. package/dist/chunk-SORYYVJ7.js +1 -0
  58. package/dist/chunk-TUIEV7Q7.js +1 -0
  59. package/dist/chunk-U74VPTIU.js +1 -0
  60. package/dist/chunk-UOQT6A7P.js +1 -0
  61. package/dist/chunk-V5VDCQDN.mjs +1 -0
  62. package/dist/chunk-VHUVPHPI.mjs +1 -0
  63. package/dist/{chunk-XCMA7AY7.js → chunk-W7GLQ6DV.js} +1 -1
  64. package/dist/chunk-WLHNIXWC.mjs +2 -0
  65. package/dist/chunk-X6HFDXKB.js +1 -0
  66. package/dist/chunk-XPV6VILW.mjs +1 -0
  67. package/dist/chunk-Y3ZQQI4D.js +1 -0
  68. package/dist/chunk-YTDWMXNS.js +1 -0
  69. package/dist/chunk-ZUGNF5KU.js +1 -0
  70. package/dist/chunk-ZX26QZJ5.mjs +1 -0
  71. package/dist/{colorResolver-CVsPLsw1.d.ts → colorResolver-BZ_yScf4.d.ts} +1 -1
  72. package/dist/{colorResolver-C3q7MLLD.d.mts → colorResolver-C6DtsoFI.d.mts} +1 -1
  73. package/dist/content-5Mrz6w_b.d.mts +1360 -0
  74. package/dist/content-CmqAwdFL.d.ts +1360 -0
  75. package/dist/core-plugins.d.mts +3 -4
  76. package/dist/core-plugins.d.ts +3 -4
  77. package/dist/core-plugins.js +1 -1
  78. package/dist/core-plugins.mjs +1 -1
  79. package/dist/core.d.mts +10 -11
  80. package/dist/core.d.ts +10 -11
  81. package/dist/core.js +1 -1
  82. package/dist/core.mjs +1 -1
  83. package/dist/{documentSerializer-Chn7J1WG.d.ts → documentSerializer-BRaaXIHm.d.ts} +1 -1
  84. package/dist/{documentSerializer-C1ueey5d.d.mts → documentSerializer-DgO3A9av.d.mts} +1 -1
  85. package/dist/docx/index.d.mts +3 -4
  86. package/dist/docx/index.d.ts +3 -4
  87. package/dist/docx/index.js +1 -1
  88. package/dist/docx/index.mjs +1 -1
  89. package/dist/docx/parser.d.mts +3 -4
  90. package/dist/docx/parser.d.ts +3 -4
  91. package/dist/docx/parser.js +1 -1
  92. package/dist/docx/parser.mjs +1 -1
  93. package/dist/docx/rezip.d.mts +3 -4
  94. package/dist/docx/rezip.d.ts +3 -4
  95. package/dist/docx/rezip.js +1 -1
  96. package/dist/docx/rezip.mjs +1 -1
  97. package/dist/docx/serializer/index.d.mts +4 -5
  98. package/dist/docx/serializer/index.d.ts +4 -5
  99. package/dist/docx/serializer/index.js +1 -1
  100. package/dist/docx/serializer/index.mjs +1 -1
  101. package/dist/{fontLoader-BOt95Jtf.d.mts → fontLoader-8b4X-AIh.d.mts} +63 -3
  102. package/dist/{fontLoader-QPwbcX5j.d.ts → fontLoader-CK2QLq68.d.ts} +63 -3
  103. package/dist/{formatting-D9I-lFS4.d.mts → formatting-BH4hcZiq.d.mts} +1 -1
  104. package/dist/{formatting-BwpZWdGi.d.ts → formatting-_OXU8gLB.d.ts} +1 -1
  105. package/dist/{headerFooterLayout-DkclHZ0Z.d.mts → headerFooterLayout-72Vz7yp3.d.mts} +94 -3
  106. package/dist/{headerFooterLayout-B3QVg556.d.ts → headerFooterLayout-Ca4ESDHF.d.ts} +94 -3
  107. package/dist/headless.d.mts +9 -9
  108. package/dist/headless.d.ts +9 -9
  109. package/dist/headless.js +1 -1
  110. package/dist/headless.mjs +1 -1
  111. package/dist/layout-bridge/index.d.mts +7 -7
  112. package/dist/layout-bridge/index.d.ts +7 -7
  113. package/dist/layout-bridge/index.js +1 -1
  114. package/dist/layout-bridge/index.mjs +1 -1
  115. package/dist/layout-bridge/measuring/index.d.mts +43 -2
  116. package/dist/layout-bridge/measuring/index.d.ts +43 -2
  117. package/dist/layout-bridge/measuring/index.js +1 -1
  118. package/dist/layout-bridge/measuring/index.mjs +1 -1
  119. package/dist/layout-bridge/tableInsertHover.js +1 -1
  120. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  121. package/dist/layout-bridge/toFlowBlocks.d.mts +11 -3
  122. package/dist/layout-bridge/toFlowBlocks.d.ts +11 -3
  123. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  124. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  125. package/dist/layout-engine/index.d.mts +33 -3
  126. package/dist/layout-engine/index.d.ts +33 -3
  127. package/dist/layout-engine/index.js +1 -1
  128. package/dist/layout-engine/index.mjs +1 -1
  129. package/dist/layout-engine/types.d.mts +53 -0
  130. package/dist/layout-engine/types.d.ts +53 -0
  131. package/dist/layout-painter/index.d.mts +4 -5
  132. package/dist/layout-painter/index.d.ts +4 -5
  133. package/dist/layout-painter/index.js +1 -1
  134. package/dist/layout-painter/index.mjs +1 -1
  135. package/dist/layout-painter/renderPage.d.mts +4 -5
  136. package/dist/layout-painter/renderPage.d.ts +4 -5
  137. package/dist/layout-painter/renderPage.js +1 -1
  138. package/dist/layout-painter/renderPage.mjs +1 -1
  139. package/dist/managers/AutoSaveManager.d.mts +3 -4
  140. package/dist/managers/AutoSaveManager.d.ts +3 -4
  141. package/dist/managers/TableSelectionManager.d.mts +3 -4
  142. package/dist/managers/TableSelectionManager.d.ts +3 -4
  143. package/dist/managers/types.d.mts +3 -4
  144. package/dist/managers/types.d.ts +3 -4
  145. package/dist/{marks-CCPVlQzL.d.mts → marks-BY573yZn.d.mts} +1 -1
  146. package/dist/{marks-BujVxYP4.d.ts → marks-CjC9tF5k.d.ts} +1 -1
  147. package/dist/mcp-cli.mjs +24 -23
  148. package/dist/mcp.d.mts +3 -4
  149. package/dist/mcp.d.ts +3 -4
  150. package/dist/mcp.js +3 -3
  151. package/dist/mcp.mjs +1 -1
  152. package/dist/{nodes-BXi1Uu3e.d.mts → nodes-7753Bgi_.d.mts} +66 -3
  153. package/dist/{nodes-DfKj9kUA.d.ts → nodes-CC_nwkT_.d.ts} +66 -3
  154. package/dist/prosemirror/commands/formatting.d.mts +2 -2
  155. package/dist/prosemirror/commands/formatting.d.ts +2 -2
  156. package/dist/prosemirror/commands/formatting.js +1 -1
  157. package/dist/prosemirror/commands/formatting.mjs +1 -1
  158. package/dist/prosemirror/commands/index.d.mts +82 -8
  159. package/dist/prosemirror/commands/index.d.ts +82 -8
  160. package/dist/prosemirror/commands/index.js +1 -1
  161. package/dist/prosemirror/commands/index.mjs +1 -1
  162. package/dist/prosemirror/commands/paragraph.d.mts +1 -1
  163. package/dist/prosemirror/commands/paragraph.d.ts +1 -1
  164. package/dist/prosemirror/commands/paragraph.js +1 -1
  165. package/dist/prosemirror/commands/paragraph.mjs +1 -1
  166. package/dist/prosemirror/conversion/fromProseDoc.d.mts +3 -4
  167. package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -4
  168. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  169. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  170. package/dist/prosemirror/conversion/index.d.mts +11 -4
  171. package/dist/prosemirror/conversion/index.d.ts +11 -4
  172. package/dist/prosemirror/conversion/index.js +1 -1
  173. package/dist/prosemirror/conversion/index.mjs +1 -1
  174. package/dist/prosemirror/editor.css +155 -95
  175. package/dist/prosemirror/extensions/index.d.mts +1 -1
  176. package/dist/prosemirror/extensions/index.d.ts +1 -1
  177. package/dist/prosemirror/extensions/index.js +1 -1
  178. package/dist/prosemirror/extensions/index.mjs +1 -1
  179. package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -1
  180. package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -1
  181. package/dist/prosemirror/index.d.mts +5 -6
  182. package/dist/prosemirror/index.d.ts +5 -6
  183. package/dist/prosemirror/index.js +1 -1
  184. package/dist/prosemirror/index.mjs +1 -1
  185. package/dist/prosemirror/plugins/index.d.mts +122 -18
  186. package/dist/prosemirror/plugins/index.d.ts +122 -18
  187. package/dist/prosemirror/plugins/index.js +1 -1
  188. package/dist/prosemirror/plugins/index.mjs +1 -1
  189. package/dist/prosemirror/plugins/selectionTracker.d.mts +1 -1
  190. package/dist/prosemirror/plugins/selectionTracker.d.ts +1 -1
  191. package/dist/prosemirror/schema/index.d.mts +4 -5
  192. package/dist/prosemirror/schema/index.d.ts +4 -5
  193. package/dist/prosemirror/schema/index.js +1 -1
  194. package/dist/prosemirror/schema/index.mjs +1 -1
  195. package/dist/prosemirror/styles/index.d.mts +2 -2
  196. package/dist/prosemirror/styles/index.d.ts +2 -2
  197. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +45 -23
  198. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +45 -23
  199. package/dist/prosemirror/utils/extractTrackedChanges.js +1 -1
  200. package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -1
  201. package/dist/{selectionContext-85CE0f7a.d.ts → selectionContext-BPAqgNgk.d.ts} +1 -1
  202. package/dist/{selectionContext-Xq3AY7pn.d.mts → selectionContext-CoZat7QZ.d.mts} +1 -1
  203. package/dist/{styles-jqO45PSq.d.ts → styles-BBv7doYK.d.ts} +1 -1
  204. package/dist/{styles-BBoqh07F.d.mts → styles-EI2lxeEN.d.mts} +1 -1
  205. package/dist/types/agentApi.d.mts +1 -1
  206. package/dist/types/agentApi.d.ts +1 -1
  207. package/dist/types/content.d.mts +4 -1167
  208. package/dist/types/content.d.ts +4 -1167
  209. package/dist/types/document.d.mts +25 -8
  210. package/dist/types/document.d.ts +25 -8
  211. package/dist/utils/comments.d.mts +79 -6
  212. package/dist/utils/comments.d.ts +79 -6
  213. package/dist/utils/comments.js +1 -1
  214. package/dist/utils/comments.mjs +1 -1
  215. package/dist/utils/highlightColors.js +1 -1
  216. package/dist/utils/highlightColors.mjs +1 -1
  217. package/dist/utils/index.d.mts +5 -6
  218. package/dist/utils/index.d.ts +5 -6
  219. package/dist/utils/index.js +3 -3
  220. package/dist/utils/index.mjs +3 -3
  221. package/dist/{variableDetector-CAdt8yOr.d.mts → variableDetector-DF3-nxUC.d.mts} +1 -1
  222. package/dist/{variableDetector-W4XEN9YC.d.ts → variableDetector-sBkgVh3f.d.ts} +1 -1
  223. package/package.json +3 -3
  224. package/dist/chunk-2D3UPAMA.mjs +0 -1
  225. package/dist/chunk-2RCMY2GE.mjs +0 -1
  226. package/dist/chunk-3GNIP6IX.mjs +0 -4
  227. package/dist/chunk-44RUAQA2.js +0 -1
  228. package/dist/chunk-5N5DBQJV.mjs +0 -1
  229. package/dist/chunk-5TNMVXDS.mjs +0 -1
  230. package/dist/chunk-6DK4UBGM.js +0 -1
  231. package/dist/chunk-6LOYA7G5.mjs +0 -2
  232. package/dist/chunk-7VCMJCBY.js +0 -2
  233. package/dist/chunk-APFTVA4F.mjs +0 -1
  234. package/dist/chunk-BKHQA6JJ.js +0 -1
  235. package/dist/chunk-BOYVCOLZ.mjs +0 -1
  236. package/dist/chunk-BS35CXMN.js +0 -1
  237. package/dist/chunk-BTOBVF4I.mjs +0 -1
  238. package/dist/chunk-C6GSFUV2.js +0 -2
  239. package/dist/chunk-CP5OSG5Z.mjs +0 -1
  240. package/dist/chunk-CP767TWV.js +0 -1
  241. package/dist/chunk-DV6IEOP5.js +0 -4
  242. package/dist/chunk-IBNUQL57.mjs +0 -2
  243. package/dist/chunk-KBU6QQFU.js +0 -9
  244. package/dist/chunk-LDKESXXK.mjs +0 -3
  245. package/dist/chunk-LTYW3NLX.js +0 -59
  246. package/dist/chunk-NERY274X.js +0 -1
  247. package/dist/chunk-NMSU4MWP.mjs +0 -1
  248. package/dist/chunk-NNQWQOC5.mjs +0 -1
  249. package/dist/chunk-OLKDLRJ4.js +0 -1
  250. package/dist/chunk-P3AXSRLG.mjs +0 -1
  251. package/dist/chunk-P6RNOYAG.mjs +0 -2
  252. package/dist/chunk-R7RR6M4A.mjs +0 -2
  253. package/dist/chunk-RCS6UNIJ.mjs +0 -1
  254. package/dist/chunk-T5RYEG2V.js +0 -1
  255. package/dist/chunk-TRJWRZZD.js +0 -1
  256. package/dist/chunk-TYYOBPNK.js +0 -1
  257. package/dist/chunk-UCZVMHB5.mjs +0 -59
  258. package/dist/chunk-V435QKZB.js +0 -3
  259. package/dist/chunk-VQ2QGHYS.js +0 -2
  260. package/dist/chunk-WZP6ZHBR.js +0 -1
  261. package/dist/chunk-XDH55WXX.mjs +0 -1
  262. package/dist/chunk-Y5HZAMND.mjs +0 -9
  263. package/dist/chunk-YE357WVA.js +0 -1
  264. package/dist/chunk-YGHHSCPR.js +0 -2
  265. package/dist/lists-CdiIk_c1.d.ts +0 -142
  266. package/dist/lists-JDB80qyP.d.mts +0 -142
@@ -1 +1 @@
1
- 'use strict';var chunkBKHQA6JJ_js=require('../../chunk-BKHQA6JJ.js');require('../../chunk-JFZIXFRC.js'),require('../../chunk-N3Y5BUKV.js'),require('../../chunk-DC7S76ZX.js');Object.defineProperty(exports,"buildFontString",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.c}});Object.defineProperty(exports,"clampFloatingWrapMargins",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.s}});Object.defineProperty(exports,"clearAllCaches",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.M}});Object.defineProperty(exports,"clearFontMetricsCache",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.D}});Object.defineProperty(exports,"clearParagraphMeasureCache",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.J}});Object.defineProperty(exports,"clearTextWidthCache",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.y}});Object.defineProperty(exports,"findCharacterAtX",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.h}});Object.defineProperty(exports,"getCachedFontMetrics",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.B}});Object.defineProperty(exports,"getCachedParagraphMeasure",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.H}});Object.defineProperty(exports,"getCachedTextWidth",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.w}});Object.defineProperty(exports,"getCanvasContext",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.a}});Object.defineProperty(exports,"getFloatingMargins",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.q}});Object.defineProperty(exports,"getFontCacheSize",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.F}});Object.defineProperty(exports,"getFontMetrics",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.d}});Object.defineProperty(exports,"getParagraphCacheSize",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.L}});Object.defineProperty(exports,"getRunCharWidths",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.v}});Object.defineProperty(exports,"getTextCacheSize",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.A}});Object.defineProperty(exports,"getTotalCacheSize",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.N}});Object.defineProperty(exports,"getXForCharacter",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.i}});Object.defineProperty(exports,"halfPtToPx",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.n}});Object.defineProperty(exports,"hashParagraphBlock",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.G}});Object.defineProperty(exports,"measureParagraph",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.t}});Object.defineProperty(exports,"measureParagraphs",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.u}});Object.defineProperty(exports,"measureRun",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.g}});Object.defineProperty(exports,"measureText",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.f}});Object.defineProperty(exports,"measureTextWidth",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.e}});Object.defineProperty(exports,"ptToPx",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.l}});Object.defineProperty(exports,"pxToHalfPt",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.o}});Object.defineProperty(exports,"pxToPt",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.m}});Object.defineProperty(exports,"pxToTwips",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.k}});Object.defineProperty(exports,"rectsToFloatingZones",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.p}});Object.defineProperty(exports,"resetCanvasContext",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.b}});Object.defineProperty(exports,"setCachedFontMetrics",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.C}});Object.defineProperty(exports,"setCachedParagraphMeasure",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.I}});Object.defineProperty(exports,"setCachedTextWidth",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.x}});Object.defineProperty(exports,"setFontCacheSize",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.E}});Object.defineProperty(exports,"setParagraphCacheSize",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.K}});Object.defineProperty(exports,"setTextCacheSize",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.z}});Object.defineProperty(exports,"twipsToPx",{enumerable:true,get:function(){return chunkBKHQA6JJ_js.j}});
1
+ 'use strict';var chunkSORYYVJ7_js=require('../../chunk-SORYYVJ7.js'),chunkLTHT4A4S_js=require('../../chunk-LTHT4A4S.js');require('../../chunk-IMKU4O3P.js'),require('../../chunk-DROCYKAR.js'),require('../../chunk-44FHVKSI.js'),require('../../chunk-JFZIXFRC.js'),require('../../chunk-DV6GWBUJ.js'),require('../../chunk-N3Y5BUKV.js'),require('../../chunk-4Q2IP5FW.js'),require('../../chunk-DC7S76ZX.js');Object.defineProperty(exports,"clearAllCaches",{enumerable:true,get:function(){return chunkSORYYVJ7_js.B}});Object.defineProperty(exports,"clearFontMetricsCache",{enumerable:true,get:function(){return chunkSORYYVJ7_js.s}});Object.defineProperty(exports,"clearParagraphMeasureCache",{enumerable:true,get:function(){return chunkSORYYVJ7_js.y}});Object.defineProperty(exports,"clearTextWidthCache",{enumerable:true,get:function(){return chunkSORYYVJ7_js.n}});Object.defineProperty(exports,"getCachedFontMetrics",{enumerable:true,get:function(){return chunkSORYYVJ7_js.q}});Object.defineProperty(exports,"getCachedParagraphMeasure",{enumerable:true,get:function(){return chunkSORYYVJ7_js.w}});Object.defineProperty(exports,"getCachedTextWidth",{enumerable:true,get:function(){return chunkSORYYVJ7_js.l}});Object.defineProperty(exports,"getFontCacheSize",{enumerable:true,get:function(){return chunkSORYYVJ7_js.u}});Object.defineProperty(exports,"getParagraphCacheSize",{enumerable:true,get:function(){return chunkSORYYVJ7_js.A}});Object.defineProperty(exports,"getTextCacheSize",{enumerable:true,get:function(){return chunkSORYYVJ7_js.p}});Object.defineProperty(exports,"getTotalCacheSize",{enumerable:true,get:function(){return chunkSORYYVJ7_js.C}});Object.defineProperty(exports,"hashParagraphBlock",{enumerable:true,get:function(){return chunkSORYYVJ7_js.v}});Object.defineProperty(exports,"measureBlocksWithFloats",{enumerable:true,get:function(){return chunkSORYYVJ7_js.k}});Object.defineProperty(exports,"setCachedFontMetrics",{enumerable:true,get:function(){return chunkSORYYVJ7_js.r}});Object.defineProperty(exports,"setCachedParagraphMeasure",{enumerable:true,get:function(){return chunkSORYYVJ7_js.x}});Object.defineProperty(exports,"setCachedTextWidth",{enumerable:true,get:function(){return chunkSORYYVJ7_js.m}});Object.defineProperty(exports,"setFontCacheSize",{enumerable:true,get:function(){return chunkSORYYVJ7_js.t}});Object.defineProperty(exports,"setParagraphCacheSize",{enumerable:true,get:function(){return chunkSORYYVJ7_js.z}});Object.defineProperty(exports,"setTextCacheSize",{enumerable:true,get:function(){return chunkSORYYVJ7_js.o}});Object.defineProperty(exports,"buildFontString",{enumerable:true,get:function(){return chunkLTHT4A4S_js.c}});Object.defineProperty(exports,"clampFloatingWrapMargins",{enumerable:true,get:function(){return chunkLTHT4A4S_js.u}});Object.defineProperty(exports,"findCharacterAtX",{enumerable:true,get:function(){return chunkLTHT4A4S_js.h}});Object.defineProperty(exports,"getCanvasContext",{enumerable:true,get:function(){return chunkLTHT4A4S_js.a}});Object.defineProperty(exports,"getFloatingMargins",{enumerable:true,get:function(){return chunkLTHT4A4S_js.q}});Object.defineProperty(exports,"getFontMetrics",{enumerable:true,get:function(){return chunkLTHT4A4S_js.d}});Object.defineProperty(exports,"getRunCharWidths",{enumerable:true,get:function(){return chunkLTHT4A4S_js.x}});Object.defineProperty(exports,"getXForCharacter",{enumerable:true,get:function(){return chunkLTHT4A4S_js.i}});Object.defineProperty(exports,"halfPtToPx",{enumerable:true,get:function(){return chunkLTHT4A4S_js.n}});Object.defineProperty(exports,"measureParagraph",{enumerable:true,get:function(){return chunkLTHT4A4S_js.v}});Object.defineProperty(exports,"measureParagraphs",{enumerable:true,get:function(){return chunkLTHT4A4S_js.w}});Object.defineProperty(exports,"measureRun",{enumerable:true,get:function(){return chunkLTHT4A4S_js.g}});Object.defineProperty(exports,"measureText",{enumerable:true,get:function(){return chunkLTHT4A4S_js.f}});Object.defineProperty(exports,"measureTextWidth",{enumerable:true,get:function(){return chunkLTHT4A4S_js.e}});Object.defineProperty(exports,"ptToPx",{enumerable:true,get:function(){return chunkLTHT4A4S_js.l}});Object.defineProperty(exports,"pxToHalfPt",{enumerable:true,get:function(){return chunkLTHT4A4S_js.o}});Object.defineProperty(exports,"pxToPt",{enumerable:true,get:function(){return chunkLTHT4A4S_js.m}});Object.defineProperty(exports,"pxToTwips",{enumerable:true,get:function(){return chunkLTHT4A4S_js.k}});Object.defineProperty(exports,"rectsToFloatingZones",{enumerable:true,get:function(){return chunkLTHT4A4S_js.p}});Object.defineProperty(exports,"resetCanvasContext",{enumerable:true,get:function(){return chunkLTHT4A4S_js.b}});Object.defineProperty(exports,"twipsToPx",{enumerable:true,get:function(){return chunkLTHT4A4S_js.j}});
@@ -1 +1 @@
1
- export{c as buildFontString,s as clampFloatingWrapMargins,M as clearAllCaches,D as clearFontMetricsCache,J as clearParagraphMeasureCache,y as clearTextWidthCache,h as findCharacterAtX,B as getCachedFontMetrics,H as getCachedParagraphMeasure,w as getCachedTextWidth,a as getCanvasContext,q as getFloatingMargins,F as getFontCacheSize,d as getFontMetrics,L as getParagraphCacheSize,v as getRunCharWidths,A as getTextCacheSize,N as getTotalCacheSize,i as getXForCharacter,n as halfPtToPx,G as hashParagraphBlock,t as measureParagraph,u as measureParagraphs,g as measureRun,f as measureText,e as measureTextWidth,l as ptToPx,o as pxToHalfPt,m as pxToPt,k as pxToTwips,p as rectsToFloatingZones,b as resetCanvasContext,C as setCachedFontMetrics,I as setCachedParagraphMeasure,x as setCachedTextWidth,E as setFontCacheSize,K as setParagraphCacheSize,z as setTextCacheSize,j as twipsToPx}from'../../chunk-2D3UPAMA.mjs';import'../../chunk-QPFJJPIC.mjs';import'../../chunk-AMENZY5F.mjs';import'../../chunk-QYUPLKLP.mjs';
1
+ export{B as clearAllCaches,s as clearFontMetricsCache,y as clearParagraphMeasureCache,n as clearTextWidthCache,q as getCachedFontMetrics,w as getCachedParagraphMeasure,l as getCachedTextWidth,u as getFontCacheSize,A as getParagraphCacheSize,p as getTextCacheSize,C as getTotalCacheSize,v as hashParagraphBlock,k as measureBlocksWithFloats,r as setCachedFontMetrics,x as setCachedParagraphMeasure,m as setCachedTextWidth,t as setFontCacheSize,z as setParagraphCacheSize,o as setTextCacheSize}from'../../chunk-MP4QSEO2.mjs';export{c as buildFontString,u as clampFloatingWrapMargins,h as findCharacterAtX,a as getCanvasContext,q as getFloatingMargins,d as getFontMetrics,x as getRunCharWidths,i as getXForCharacter,n as halfPtToPx,v as measureParagraph,w as measureParagraphs,g as measureRun,f as measureText,e as measureTextWidth,l as ptToPx,o as pxToHalfPt,m as pxToPt,k as pxToTwips,p as rectsToFloatingZones,b as resetCanvasContext,j as twipsToPx}from'../../chunk-6Y6LON6Y.mjs';import'../../chunk-FCJWLEKT.mjs';import'../../chunk-7E5VBRDL.mjs';import'../../chunk-BOOHU5EW.mjs';import'../../chunk-QPFJJPIC.mjs';import'../../chunk-WLHNIXWC.mjs';import'../../chunk-AMENZY5F.mjs';import'../../chunk-VW22RZ6C.mjs';import'../../chunk-QYUPLKLP.mjs';
@@ -1 +1 @@
1
- 'use strict';var chunkGFQM7PKY_js=require('../chunk-GFQM7PKY.js');require('../chunk-T5RYEG2V.js'),require('../chunk-TYYOBPNK.js'),require('../chunk-44RUAQA2.js'),require('../chunk-DROCYKAR.js'),require('../chunk-BKHQA6JJ.js'),require('../chunk-DV6IEOP5.js'),require('../chunk-WZP6ZHBR.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-OLKDLRJ4.js'),require('../chunk-VQ2QGHYS.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-C2BAPYGJ.js'),require('../chunk-Q4CKLXWA.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"TABLE_INSERT_EDGE_PROXIMITY",{enumerable:true,get:function(){return chunkGFQM7PKY_js.a}});Object.defineProperty(exports,"TABLE_INSERT_HIDE_DELAY_MS",{enumerable:true,get:function(){return chunkGFQM7PKY_js.b}});Object.defineProperty(exports,"detectTableInsertHover",{enumerable:true,get:function(){return chunkGFQM7PKY_js.c}});
1
+ 'use strict';var chunkLOCW6MR2_js=require('../chunk-LOCW6MR2.js');require('../chunk-ZUGNF5KU.js'),require('../chunk-GY5BWVM7.js'),require('../chunk-SORYYVJ7.js'),require('../chunk-LTHT4A4S.js'),require('../chunk-IMKU4O3P.js'),require('../chunk-DROCYKAR.js'),require('../chunk-F44ZLDZS.js'),require('../chunk-44FHVKSI.js'),require('../chunk-X6HFDXKB.js'),require('../chunk-D4RPOJC7.js'),require('../chunk-IP2VXNWG.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-MZOVDLYL.js'),require('../chunk-E4JMCA5X.js'),require('../chunk-HQPWFUP5.js'),require('../chunk-DV6GWBUJ.js'),require('../chunk-OAWTQ3IY.js'),require('../chunk-GM4USWKO.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-YTDWMXNS.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-TUIEV7Q7.js'),require('../chunk-7HANRHHL.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-Q4CKLXWA.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"TABLE_INSERT_EDGE_PROXIMITY",{enumerable:true,get:function(){return chunkLOCW6MR2_js.a}});Object.defineProperty(exports,"TABLE_INSERT_HIDE_DELAY_MS",{enumerable:true,get:function(){return chunkLOCW6MR2_js.b}});Object.defineProperty(exports,"detectTableInsertHover",{enumerable:true,get:function(){return chunkLOCW6MR2_js.c}});
@@ -1 +1 @@
1
- export{a as TABLE_INSERT_EDGE_PROXIMITY,b as TABLE_INSERT_HIDE_DELAY_MS,c as detectTableInsertHover}from'../chunk-6PR4XHQ3.mjs';import'../chunk-BTOBVF4I.mjs';import'../chunk-5TNMVXDS.mjs';import'../chunk-5N5DBQJV.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-2D3UPAMA.mjs';import'../chunk-3GNIP6IX.mjs';import'../chunk-2RCMY2GE.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-NMSU4MWP.mjs';import'../chunk-P6RNOYAG.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-LE67NTCN.mjs';import'../chunk-VQWZHPWI.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';
1
+ export{a as TABLE_INSERT_EDGE_PROXIMITY,b as TABLE_INSERT_HIDE_DELAY_MS,c as detectTableInsertHover}from'../chunk-ONWOHAFW.mjs';import'../chunk-RFVFX5WK.mjs';import'../chunk-V5VDCQDN.mjs';import'../chunk-MP4QSEO2.mjs';import'../chunk-6Y6LON6Y.mjs';import'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-RFC2SXZ6.mjs';import'../chunk-BOOHU5EW.mjs';import'../chunk-FEWCI2E5.mjs';import'../chunk-LBKMYD3M.mjs';import'../chunk-NBLJPT54.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-ILJUDEZ5.mjs';import'../chunk-6ZXL3EIP.mjs';import'../chunk-OEXVWIHW.mjs';import'../chunk-WLHNIXWC.mjs';import'../chunk-CA2EYL6T.mjs';import'../chunk-IQG3KLWY.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-VHUVPHPI.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-ZX26QZJ5.mjs';import'../chunk-MJ6XZFVD.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-VQWZHPWI.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -12,10 +12,11 @@
12
12
  */
13
13
  import { Node } from 'prosemirror-model';
14
14
  import { BorderStyle, FlowBlock } from '../layout-engine/types.mjs';
15
- import { T as Theme } from '../styles-BBoqh07F.mjs';
16
- import { c as NumberFormat } from '../lists-JDB80qyP.mjs';
17
- import '../formatting-D9I-lFS4.mjs';
15
+ import { T as Theme } from '../styles-EI2lxeEN.mjs';
16
+ import { o as NumberFormat } from '../content-5Mrz6w_b.mjs';
17
+ import '../formatting-BH4hcZiq.mjs';
18
18
  import '../colors-C3vA7HUU.mjs';
19
+ import '../docx/wrapTypes.mjs';
19
20
 
20
21
  /**
21
22
  * Shared types and primitive helpers used across toFlowBlocks sub-modules.
@@ -33,6 +34,13 @@ type ToFlowBlocksOptions = {
33
34
  theme?: Theme | null;
34
35
  /** Page content height in pixels (pageHeight - marginTop - marginBottom). Images taller than this are scaled down to fit. */
35
36
  pageContentHeight?: number;
37
+ /**
38
+ * Document-wide `w:defaultTabStop` (§17.6.13) in twips. Stamped onto each
39
+ * paragraph's attrs so the layout-time list-marker helper can snap body
40
+ * text to the default tab grid when no custom `w:tabs` are defined.
41
+ * Default 720 twips (Word's spec default).
42
+ */
43
+ defaultTabStopTwips?: number;
36
44
  /**
37
45
  * @internal Allocated by toFlowBlocks() and threaded through table /
38
46
  * text-box conversion so list numbering stays continuous across containers.
@@ -12,10 +12,11 @@
12
12
  */
13
13
  import { Node } from 'prosemirror-model';
14
14
  import { BorderStyle, FlowBlock } from '../layout-engine/types.js';
15
- import { T as Theme } from '../styles-jqO45PSq.js';
16
- import { c as NumberFormat } from '../lists-CdiIk_c1.js';
17
- import '../formatting-BwpZWdGi.js';
15
+ import { T as Theme } from '../styles-BBv7doYK.js';
16
+ import { o as NumberFormat } from '../content-CmqAwdFL.js';
17
+ import '../formatting-_OXU8gLB.js';
18
18
  import '../colors-C3vA7HUU.js';
19
+ import '../docx/wrapTypes.js';
19
20
 
20
21
  /**
21
22
  * Shared types and primitive helpers used across toFlowBlocks sub-modules.
@@ -33,6 +34,13 @@ type ToFlowBlocksOptions = {
33
34
  theme?: Theme | null;
34
35
  /** Page content height in pixels (pageHeight - marginTop - marginBottom). Images taller than this are scaled down to fit. */
35
36
  pageContentHeight?: number;
37
+ /**
38
+ * Document-wide `w:defaultTabStop` (§17.6.13) in twips. Stamped onto each
39
+ * paragraph's attrs so the layout-time list-marker helper can snap body
40
+ * text to the default tab grid when no custom `w:tabs` are defined.
41
+ * Default 720 twips (Word's spec default).
42
+ */
43
+ defaultTabStopTwips?: number;
36
44
  /**
37
45
  * @internal Allocated by toFlowBlocks() and threaded through table /
38
46
  * text-box conversion so list numbering stays continuous across containers.
@@ -1 +1 @@
1
- 'use strict';var chunkTYYOBPNK_js=require('../chunk-TYYOBPNK.js');require('../chunk-DROCYKAR.js'),require('../chunk-DV6IEOP5.js'),require('../chunk-YGHHSCPR.js'),require('../chunk-7VCMJCBY.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"convertBorderSpecToLayout",{enumerable:true,get:function(){return chunkTYYOBPNK_js.b}});Object.defineProperty(exports,"resetBlockIdCounter",{enumerable:true,get:function(){return chunkTYYOBPNK_js.a}});Object.defineProperty(exports,"resolveListTemplate",{enumerable:true,get:function(){return chunkTYYOBPNK_js.c}});Object.defineProperty(exports,"toFlowBlocks",{enumerable:true,get:function(){return chunkTYYOBPNK_js.d}});
1
+ 'use strict';var chunkGY5BWVM7_js=require('../chunk-GY5BWVM7.js'),chunkIMKU4O3P_js=require('../chunk-IMKU4O3P.js');require('../chunk-DROCYKAR.js'),require('../chunk-F44ZLDZS.js'),require('../chunk-E4JMCA5X.js'),require('../chunk-HQPWFUP5.js'),require('../chunk-DV6GWBUJ.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"convertBorderSpecToLayout",{enumerable:true,get:function(){return chunkGY5BWVM7_js.a}});Object.defineProperty(exports,"resolveListTemplate",{enumerable:true,get:function(){return chunkGY5BWVM7_js.b}});Object.defineProperty(exports,"toFlowBlocks",{enumerable:true,get:function(){return chunkGY5BWVM7_js.c}});Object.defineProperty(exports,"resetBlockIdCounter",{enumerable:true,get:function(){return chunkIMKU4O3P_js.d}});
@@ -1 +1 @@
1
- export{b as convertBorderSpecToLayout,a as resetBlockIdCounter,c as resolveListTemplate,d as toFlowBlocks}from'../chunk-5TNMVXDS.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-3GNIP6IX.mjs';import'../chunk-IBNUQL57.mjs';import'../chunk-6LOYA7G5.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';
1
+ export{a as convertBorderSpecToLayout,b as resolveListTemplate,c as toFlowBlocks}from'../chunk-V5VDCQDN.mjs';export{d as resetBlockIdCounter}from'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-RFC2SXZ6.mjs';import'../chunk-6ZXL3EIP.mjs';import'../chunk-OEXVWIHW.mjs';import'../chunk-WLHNIXWC.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -9,8 +9,12 @@
9
9
  * @packageDocumentation
10
10
  * @public
11
11
  */
12
- import { Page, PageMargins, ColumnLayout, Fragment, FlowBlock, Measure, SectionBreakBlock, Layout, TableMeasure, LayoutOptions } from './types.mjs';
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.mjs';
12
+ import { Page, PageMargins, ColumnLayout, Fragment, FlowBlock, Measure, SectionBreakBlock, Layout, TextBoxBlock, TableMeasure, LayoutOptions } from './types.mjs';
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, TextBoxFragment, TextBoxMeasure, TextRun, WrapTextDirection, assertExhaustiveFlowBlock } from './types.mjs';
14
+ export { isFloatingWrapType, isWrapNone, wrapsAroundText } from '../docx/wrapTypes.mjs';
15
+ import '../content-5Mrz6w_b.mjs';
16
+ import '../formatting-BH4hcZiq.mjs';
17
+ import '../colors-C3vA7HUU.mjs';
14
18
 
15
19
  /**
16
20
  * Paginator - manages page state during layout
@@ -264,6 +268,32 @@ declare function getEffectiveColumns(state: SectionState): ColumnLayout;
264
268
  */
265
269
  declare function findPageIndexContainingPmPos(layout: Layout, pmPos: number): number | null;
266
270
 
271
+ /**
272
+ * Subset of {@link TextBoxBlock} needed to classify how a text box flows
273
+ * relative to surrounding content. Kept narrow so callers (measure, layout,
274
+ * paint) can pass partial views without rebuilding the full block.
275
+ *
276
+ * @public
277
+ */
278
+ type TextBoxFlowAttrs = Pick<TextBoxBlock, 'displayMode' | 'wrapType'>;
279
+ /**
280
+ * True when a text box participates in float layout — either via the
281
+ * `float` display mode (CSS-style) or via an OOXML `wrapType` that
282
+ * positions the box outside paragraph flow (`square`, `tight`, `through`,
283
+ * `behind`, `inFront`).
284
+ *
285
+ * @public
286
+ */
287
+ declare function isFloatingTextBoxBlock(block: TextBoxFlowAttrs): boolean;
288
+ /**
289
+ * True when a floating text box reserves an exclusion zone that narrows
290
+ * surrounding text lines. `wrapNone` (`behind` / `inFront`) and
291
+ * `topAndBottom` are floats that don't wrap text on their sides.
292
+ *
293
+ * @public
294
+ */
295
+ declare function floatingTextBoxWrapsText(block: TextBoxFlowAttrs): boolean;
296
+
267
297
  /**
268
298
  * Layout Engine - Main Entry Point
269
299
  *
@@ -319,4 +349,4 @@ declare function layoutDocument(blocks: FlowBlock[], measures: Measure[], option
319
349
  */
320
350
  declare function getHeaderRowsHeight(measure: TableMeasure, headerRowCount: number): number;
321
351
 
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 };
352
+ 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, TextBoxBlock, type TextBoxFlowAttrs, applyPendingToActive, calculateChainHeight, collectSectionConfigs, computeKeepNextChains, createInitialSectionState, createPaginator, findPageIndexContainingPmPos, floatingTextBoxWrapsText, getEffectiveColumns, getEffectiveMargins, getEffectivePageSize, getHeaderRowsHeight, getMidChainIndices, hasKeepLines, hasPageBreakBefore, isFloatingTextBoxBlock, layoutDocument, scheduleSectionBreak };
@@ -9,8 +9,12 @@
9
9
  * @packageDocumentation
10
10
  * @public
11
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';
12
+ import { Page, PageMargins, ColumnLayout, Fragment, FlowBlock, Measure, SectionBreakBlock, Layout, TextBoxBlock, 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, TextBoxFragment, TextBoxMeasure, TextRun, WrapTextDirection, assertExhaustiveFlowBlock } from './types.js';
14
+ export { isFloatingWrapType, isWrapNone, wrapsAroundText } from '../docx/wrapTypes.js';
15
+ import '../content-CmqAwdFL.js';
16
+ import '../formatting-_OXU8gLB.js';
17
+ import '../colors-C3vA7HUU.js';
14
18
 
15
19
  /**
16
20
  * Paginator - manages page state during layout
@@ -264,6 +268,32 @@ declare function getEffectiveColumns(state: SectionState): ColumnLayout;
264
268
  */
265
269
  declare function findPageIndexContainingPmPos(layout: Layout, pmPos: number): number | null;
266
270
 
271
+ /**
272
+ * Subset of {@link TextBoxBlock} needed to classify how a text box flows
273
+ * relative to surrounding content. Kept narrow so callers (measure, layout,
274
+ * paint) can pass partial views without rebuilding the full block.
275
+ *
276
+ * @public
277
+ */
278
+ type TextBoxFlowAttrs = Pick<TextBoxBlock, 'displayMode' | 'wrapType'>;
279
+ /**
280
+ * True when a text box participates in float layout — either via the
281
+ * `float` display mode (CSS-style) or via an OOXML `wrapType` that
282
+ * positions the box outside paragraph flow (`square`, `tight`, `through`,
283
+ * `behind`, `inFront`).
284
+ *
285
+ * @public
286
+ */
287
+ declare function isFloatingTextBoxBlock(block: TextBoxFlowAttrs): boolean;
288
+ /**
289
+ * True when a floating text box reserves an exclusion zone that narrows
290
+ * surrounding text lines. `wrapNone` (`behind` / `inFront`) and
291
+ * `topAndBottom` are floats that don't wrap text on their sides.
292
+ *
293
+ * @public
294
+ */
295
+ declare function floatingTextBoxWrapsText(block: TextBoxFlowAttrs): boolean;
296
+
267
297
  /**
268
298
  * Layout Engine - Main Entry Point
269
299
  *
@@ -319,4 +349,4 @@ declare function layoutDocument(blocks: FlowBlock[], measures: Measure[], option
319
349
  */
320
350
  declare function getHeaderRowsHeight(measure: TableMeasure, headerRowCount: number): number;
321
351
 
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 };
352
+ 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, TextBoxBlock, type TextBoxFlowAttrs, applyPendingToActive, calculateChainHeight, collectSectionConfigs, computeKeepNextChains, createInitialSectionState, createPaginator, findPageIndexContainingPmPos, floatingTextBoxWrapsText, getEffectiveColumns, getEffectiveMargins, getEffectivePageSize, getHeaderRowsHeight, getMidChainIndices, hasKeepLines, hasPageBreakBefore, isFloatingTextBoxBlock, layoutDocument, scheduleSectionBreak };
@@ -1 +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}});
1
+ 'use strict';var chunkLTHT4A4S_js=require('../chunk-LTHT4A4S.js');require('../chunk-IMKU4O3P.js');var chunkDROCYKAR_js=require('../chunk-DROCYKAR.js');require('../chunk-44FHVKSI.js');var chunkJFZIXFRC_js=require('../chunk-JFZIXFRC.js');require('../chunk-DV6GWBUJ.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"applyPendingToActive",{enumerable:true,get:function(){return chunkLTHT4A4S_js.I}});Object.defineProperty(exports,"calculateChainHeight",{enumerable:true,get:function(){return chunkLTHT4A4S_js.A}});Object.defineProperty(exports,"collectSectionConfigs",{enumerable:true,get:function(){return chunkLTHT4A4S_js.N}});Object.defineProperty(exports,"computeKeepNextChains",{enumerable:true,get:function(){return chunkLTHT4A4S_js.z}});Object.defineProperty(exports,"createInitialSectionState",{enumerable:true,get:function(){return chunkLTHT4A4S_js.G}});Object.defineProperty(exports,"createPaginator",{enumerable:true,get:function(){return chunkLTHT4A4S_js.y}});Object.defineProperty(exports,"findPageIndexContainingPmPos",{enumerable:true,get:function(){return chunkLTHT4A4S_js.M}});Object.defineProperty(exports,"floatingTextBoxWrapsText",{enumerable:true,get:function(){return chunkLTHT4A4S_js.F}});Object.defineProperty(exports,"getEffectiveColumns",{enumerable:true,get:function(){return chunkLTHT4A4S_js.L}});Object.defineProperty(exports,"getEffectiveMargins",{enumerable:true,get:function(){return chunkLTHT4A4S_js.J}});Object.defineProperty(exports,"getEffectivePageSize",{enumerable:true,get:function(){return chunkLTHT4A4S_js.K}});Object.defineProperty(exports,"getHeaderRowsHeight",{enumerable:true,get:function(){return chunkLTHT4A4S_js.P}});Object.defineProperty(exports,"getMidChainIndices",{enumerable:true,get:function(){return chunkLTHT4A4S_js.B}});Object.defineProperty(exports,"hasKeepLines",{enumerable:true,get:function(){return chunkLTHT4A4S_js.C}});Object.defineProperty(exports,"hasPageBreakBefore",{enumerable:true,get:function(){return chunkLTHT4A4S_js.D}});Object.defineProperty(exports,"isFloatingTextBoxBlock",{enumerable:true,get:function(){return chunkLTHT4A4S_js.E}});Object.defineProperty(exports,"layoutDocument",{enumerable:true,get:function(){return chunkLTHT4A4S_js.O}});Object.defineProperty(exports,"scheduleSectionBreak",{enumerable:true,get:function(){return chunkLTHT4A4S_js.H}});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}});Object.defineProperty(exports,"isFloatingWrapType",{enumerable:true,get:function(){return chunkJFZIXFRC_js.a}});Object.defineProperty(exports,"isWrapNone",{enumerable:true,get:function(){return chunkJFZIXFRC_js.b}});Object.defineProperty(exports,"wrapsAroundText",{enumerable:true,get:function(){return chunkJFZIXFRC_js.c}});
@@ -1 +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';
1
+ export{I as applyPendingToActive,A as calculateChainHeight,N as collectSectionConfigs,z as computeKeepNextChains,G as createInitialSectionState,y as createPaginator,M as findPageIndexContainingPmPos,F as floatingTextBoxWrapsText,L as getEffectiveColumns,J as getEffectiveMargins,K as getEffectivePageSize,P as getHeaderRowsHeight,B as getMidChainIndices,C as hasKeepLines,D as hasPageBreakBefore,E as isFloatingTextBoxBlock,O as layoutDocument,H as scheduleSectionBreak}from'../chunk-6Y6LON6Y.mjs';import'../chunk-FCJWLEKT.mjs';export{a as DEFAULT_TEXTBOX_MARGINS,b as DEFAULT_TEXTBOX_WIDTH,c as assertExhaustiveFlowBlock}from'../chunk-7E5VBRDL.mjs';import'../chunk-BOOHU5EW.mjs';export{a as isFloatingWrapType,b as isWrapNone,c as wrapsAroundText}from'../chunk-QPFJJPIC.mjs';import'../chunk-WLHNIXWC.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Layout Engine Types
3
+ *
4
+ * Core types for the paginated layout engine.
5
+ * Converts document blocks + measurements into positioned fragments on pages.
6
+ * @packageDocumentation
7
+ * @public
8
+ */
9
+ import { m as RevisionInfo, n as CellMarker } from '../content-5Mrz6w_b.mjs';
10
+ import '../formatting-BH4hcZiq.mjs';
11
+ import '../colors-C3vA7HUU.mjs';
12
+ import '../docx/wrapTypes.mjs';
13
+
1
14
  /**
2
15
  * Layout Engine Types
3
16
  *
@@ -178,6 +191,16 @@ type ImageRun = {
178
191
  cropLeft?: number;
179
192
  /** a:alphaModFix → CSS opacity in [0, 1]. */
180
193
  opacity?: number;
194
+ /** Whether this picture is itself a tracked insertion (`<w:ins>`). */
195
+ isInsertion?: boolean;
196
+ /** Whether this picture is itself a tracked deletion (`<w:del>`). */
197
+ isDeletion?: boolean;
198
+ /** Author of the tracked change wrapping the picture. */
199
+ changeAuthor?: string;
200
+ /** Date of the tracked change wrapping the picture. */
201
+ changeDate?: string;
202
+ /** Revision id of the tracked change (for sidebar matching). */
203
+ changeRevisionId?: number;
181
204
  pmStart?: number;
182
205
  pmEnd?: number;
183
206
  };
@@ -293,6 +316,16 @@ type ParagraphAttrs = {
293
316
  listMarkerHidden?: boolean;
294
317
  listMarkerFontFamily?: string;
295
318
  listMarkerFontSize?: number;
319
+ listMarkerSuffix?: 'tab' | 'space' | 'nothing';
320
+ /**
321
+ * Tracked-change state of the list numbering itself. When a list is applied
322
+ * (or removed) under suggesting mode, the marker paints in the insertion /
323
+ * deletion color so an inserted list item's number reads as part of the
324
+ * suggestion, matching Word. `undefined` = numbering is not a pending change.
325
+ */
326
+ listMarkerRevision?: 'ins' | 'del';
327
+ /** Document-wide `w:defaultTabStop` in twips (§17.6.13). Default 720. */
328
+ defaultTabStopTwips?: number;
296
329
  defaultFontSize?: number;
297
330
  defaultFontFamily?: string;
298
331
  /**
@@ -303,6 +336,15 @@ type ParagraphAttrs = {
303
336
  * (#381).
304
337
  */
305
338
  suppressEmptyParagraphHeight?: boolean;
339
+ /**
340
+ * Tracked-change marker on the paragraph mark itself
341
+ * (`<w:pPr><w:rPr><w:ins/>`). The painter renders a pilcrow and margin
342
+ * change bar; the cache key includes presence so two paragraphs with
343
+ * different revisions don't share a measurement.
344
+ */
345
+ pPrIns?: RevisionInfo | null;
346
+ /** Tracked-change marker on the paragraph mark (`<w:pPr><w:rPr><w:del/>`). */
347
+ pPrDel?: RevisionInfo | null;
306
348
  };
307
349
  /**
308
350
  * A paragraph block containing runs.
@@ -363,6 +405,8 @@ type TableCell = {
363
405
  * — content stays on one line and the cell expands horizontally.
364
406
  */
365
407
  noWrap?: boolean;
408
+ /** Tracked cell marker (`<w:cellIns>` / `<w:cellDel>` / `<w:cellMerge>`) — painter colors the top border. */
409
+ trackedMarker?: CellMarker;
366
410
  };
367
411
  /**
368
412
  * A table row containing cells.
@@ -373,6 +417,9 @@ type TableRow = {
373
417
  height?: number;
374
418
  heightRule?: 'auto' | 'atLeast' | 'exact';
375
419
  isHeader?: boolean;
420
+ /** Tracked row ins / del (`<w:trPr><w:ins/>` / `<w:del/>`). */
421
+ trackedIns?: RevisionInfo;
422
+ /** see trackedIns */ trackedDel?: RevisionInfo;
376
423
  };
377
424
  /**
378
425
  * Floating table positioning info (pixel values).
@@ -568,6 +615,12 @@ type MeasuredLine = {
568
615
  rightOffset?: number;
569
616
  /** Optional split segments for centered floating exclusions. */
570
617
  segments?: MeasuredLineSegment[];
618
+ /**
619
+ * Vertical space inserted before this line to skip past floats that leave
620
+ * no usable horizontal width at the natural line Y. Painters render this
621
+ * as marginTop on the line element; measurement adds it to totalHeight.
622
+ */
623
+ floatSkipBefore?: number;
571
624
  };
572
625
  type MeasuredLineSegment = {
573
626
  fromRun: number;
@@ -1,3 +1,16 @@
1
+ /**
2
+ * Layout Engine Types
3
+ *
4
+ * Core types for the paginated layout engine.
5
+ * Converts document blocks + measurements into positioned fragments on pages.
6
+ * @packageDocumentation
7
+ * @public
8
+ */
9
+ import { m as RevisionInfo, n as CellMarker } from '../content-CmqAwdFL.js';
10
+ import '../formatting-_OXU8gLB.js';
11
+ import '../colors-C3vA7HUU.js';
12
+ import '../docx/wrapTypes.js';
13
+
1
14
  /**
2
15
  * Layout Engine Types
3
16
  *
@@ -178,6 +191,16 @@ type ImageRun = {
178
191
  cropLeft?: number;
179
192
  /** a:alphaModFix → CSS opacity in [0, 1]. */
180
193
  opacity?: number;
194
+ /** Whether this picture is itself a tracked insertion (`<w:ins>`). */
195
+ isInsertion?: boolean;
196
+ /** Whether this picture is itself a tracked deletion (`<w:del>`). */
197
+ isDeletion?: boolean;
198
+ /** Author of the tracked change wrapping the picture. */
199
+ changeAuthor?: string;
200
+ /** Date of the tracked change wrapping the picture. */
201
+ changeDate?: string;
202
+ /** Revision id of the tracked change (for sidebar matching). */
203
+ changeRevisionId?: number;
181
204
  pmStart?: number;
182
205
  pmEnd?: number;
183
206
  };
@@ -293,6 +316,16 @@ type ParagraphAttrs = {
293
316
  listMarkerHidden?: boolean;
294
317
  listMarkerFontFamily?: string;
295
318
  listMarkerFontSize?: number;
319
+ listMarkerSuffix?: 'tab' | 'space' | 'nothing';
320
+ /**
321
+ * Tracked-change state of the list numbering itself. When a list is applied
322
+ * (or removed) under suggesting mode, the marker paints in the insertion /
323
+ * deletion color so an inserted list item's number reads as part of the
324
+ * suggestion, matching Word. `undefined` = numbering is not a pending change.
325
+ */
326
+ listMarkerRevision?: 'ins' | 'del';
327
+ /** Document-wide `w:defaultTabStop` in twips (§17.6.13). Default 720. */
328
+ defaultTabStopTwips?: number;
296
329
  defaultFontSize?: number;
297
330
  defaultFontFamily?: string;
298
331
  /**
@@ -303,6 +336,15 @@ type ParagraphAttrs = {
303
336
  * (#381).
304
337
  */
305
338
  suppressEmptyParagraphHeight?: boolean;
339
+ /**
340
+ * Tracked-change marker on the paragraph mark itself
341
+ * (`<w:pPr><w:rPr><w:ins/>`). The painter renders a pilcrow and margin
342
+ * change bar; the cache key includes presence so two paragraphs with
343
+ * different revisions don't share a measurement.
344
+ */
345
+ pPrIns?: RevisionInfo | null;
346
+ /** Tracked-change marker on the paragraph mark (`<w:pPr><w:rPr><w:del/>`). */
347
+ pPrDel?: RevisionInfo | null;
306
348
  };
307
349
  /**
308
350
  * A paragraph block containing runs.
@@ -363,6 +405,8 @@ type TableCell = {
363
405
  * — content stays on one line and the cell expands horizontally.
364
406
  */
365
407
  noWrap?: boolean;
408
+ /** Tracked cell marker (`<w:cellIns>` / `<w:cellDel>` / `<w:cellMerge>`) — painter colors the top border. */
409
+ trackedMarker?: CellMarker;
366
410
  };
367
411
  /**
368
412
  * A table row containing cells.
@@ -373,6 +417,9 @@ type TableRow = {
373
417
  height?: number;
374
418
  heightRule?: 'auto' | 'atLeast' | 'exact';
375
419
  isHeader?: boolean;
420
+ /** Tracked row ins / del (`<w:trPr><w:ins/>` / `<w:del/>`). */
421
+ trackedIns?: RevisionInfo;
422
+ /** see trackedIns */ trackedDel?: RevisionInfo;
376
423
  };
377
424
  /**
378
425
  * Floating table positioning info (pixel values).
@@ -568,6 +615,12 @@ type MeasuredLine = {
568
615
  rightOffset?: number;
569
616
  /** Optional split segments for centered floating exclusions. */
570
617
  segments?: MeasuredLineSegment[];
618
+ /**
619
+ * Vertical space inserted before this line to skip past floats that leave
620
+ * no usable horizontal width at the natural line Y. Painters render this
621
+ * as marginTop on the line element; measurement adds it to totalHeight.
622
+ */
623
+ floatSkipBefore?: number;
571
624
  };
572
625
  type MeasuredLineSegment = {
573
626
  fromRun: number;
@@ -13,11 +13,10 @@
13
13
  import '../layout-engine/types.mjs';
14
14
  export { B as BlockLookup, a as BlockLookupEntry, F as FRAGMENT_CLASS_NAMES, I as IMAGE_CLASS_NAMES, b as IMAGE_LAYOUT_OPTIONS, c as ImageHitTestResult, d as ImageLayoutIconHint, e as ImageLayoutOptionDef, L as LAYOUT_IMAGE_CLASSES, f as LayoutPainter, P as PainterOptions, RenderContext, RenderPageOptions, RenderPagesUpdateKind, T as TABLE_CLASS_NAMES, g as TEXTBOX_CLASS_NAMES, h as captureInlinePositionEmu, i as createPainter, j as deriveLayoutChoice, k as findImageElement, l as hitTestImage, isFloatingImageRun, m as isImageLayoutOptionEnabled, isTextWrappingFloatingImageRun, r as renderFragment, n as renderImageFragment, o as renderLine, renderPage, renderPages, p as renderParagraphFragment, q as renderTableFragment, s as renderTextBoxFragment, t as sliceRunsForLine, u as toolbarValueToLayoutTarget } from './renderPage.mjs';
15
15
  export { F as FootnoteRenderItem, H as HeaderFooterContent } from '../footnotes-lCH_P3N3.mjs';
16
- import '../nodes-BXi1Uu3e.mjs';
17
- import '../formatting-D9I-lFS4.mjs';
16
+ import '../content-5Mrz6w_b.mjs';
17
+ import '../formatting-BH4hcZiq.mjs';
18
18
  import '../colors-C3vA7HUU.mjs';
19
- import '../lists-JDB80qyP.mjs';
20
19
  import '../docx/wrapTypes.mjs';
21
- import '../types/content.mjs';
20
+ import '../nodes-7753Bgi_.mjs';
22
21
  import '../ImageExtension-BN327PNe.mjs';
23
- import '../styles-BBoqh07F.mjs';
22
+ import '../styles-EI2lxeEN.mjs';
@@ -13,11 +13,10 @@
13
13
  import '../layout-engine/types.js';
14
14
  export { B as BlockLookup, a as BlockLookupEntry, F as FRAGMENT_CLASS_NAMES, I as IMAGE_CLASS_NAMES, b as IMAGE_LAYOUT_OPTIONS, c as ImageHitTestResult, d as ImageLayoutIconHint, e as ImageLayoutOptionDef, L as LAYOUT_IMAGE_CLASSES, f as LayoutPainter, P as PainterOptions, RenderContext, RenderPageOptions, RenderPagesUpdateKind, T as TABLE_CLASS_NAMES, g as TEXTBOX_CLASS_NAMES, h as captureInlinePositionEmu, i as createPainter, j as deriveLayoutChoice, k as findImageElement, l as hitTestImage, isFloatingImageRun, m as isImageLayoutOptionEnabled, isTextWrappingFloatingImageRun, r as renderFragment, n as renderImageFragment, o as renderLine, renderPage, renderPages, p as renderParagraphFragment, q as renderTableFragment, s as renderTextBoxFragment, t as sliceRunsForLine, u as toolbarValueToLayoutTarget } from './renderPage.js';
15
15
  export { F as FootnoteRenderItem, H as HeaderFooterContent } from '../footnotes-skVvEHvZ.js';
16
- import '../nodes-DfKj9kUA.js';
17
- import '../formatting-BwpZWdGi.js';
16
+ import '../content-CmqAwdFL.js';
17
+ import '../formatting-_OXU8gLB.js';
18
18
  import '../colors-C3vA7HUU.js';
19
- import '../lists-CdiIk_c1.js';
20
19
  import '../docx/wrapTypes.js';
21
- import '../types/content.js';
20
+ import '../nodes-CC_nwkT_.js';
22
21
  import '../ImageExtension-BlI5afZD.js';
23
- import '../styles-jqO45PSq.js';
22
+ import '../styles-BBv7doYK.js';
@@ -1 +1 @@
1
- 'use strict';var chunkT5RYEG2V_js=require('../chunk-T5RYEG2V.js');require('../chunk-TYYOBPNK.js'),require('../chunk-44RUAQA2.js'),require('../chunk-DROCYKAR.js'),require('../chunk-BKHQA6JJ.js'),require('../chunk-DV6IEOP5.js'),require('../chunk-WZP6ZHBR.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-OLKDLRJ4.js'),require('../chunk-VQ2QGHYS.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-C2BAPYGJ.js'),require('../chunk-Q4CKLXWA.js');var chunk4Q2IP5FW_js=require('../chunk-4Q2IP5FW.js'),chunkDC7S76ZX_js=require('../chunk-DC7S76ZX.js');var i={runImage:"layout-run-image",blockImage:"layout-block-image",pageFloatingImage:"layout-page-floating-image",cellFloatingImage:"layout-cell-floating-image",pageContent:"layout-page-content",paragraph:"layout-paragraph"},y=[`.${i.pageFloatingImage}`,`.${i.cellFloatingImage}`,`.${i.blockImage}`,`.${i.runImage}`].join(", ");function P(n){if(!(n instanceof Element))return null;let e=n.closest(y);if(!e)return null;let o=e.dataset.pmStart;if(o===void 0)return null;let t=Number(o);return Number.isNaN(t)?null:{pos:t,imageEl:e}}function v(n){if(!(n instanceof HTMLElement))return null;if(n.tagName==="IMG"&&n.classList.contains(i.runImage))return n;let e=n.closest(y);return e&&e.dataset.pmStart?e:null}function B(n,e=1){if(!n.classList.contains(i.runImage))return;let o=n.closest(`.${i.pageContent}`),t=n.closest(`.${i.paragraph}`);if(!o||!t)return;let a=n.getBoundingClientRect(),r=o.getBoundingClientRect(),l=t.getBoundingClientRect(),p=e>0?e:1;return {horizontalEmu:Math.round(chunk4Q2IP5FW_js.f((a.left-r.left)/p)),verticalEmu:Math.round(chunk4Q2IP5FW_js.f((a.top-l.top)/p))}}function C(n,e){return n==="inline"?"inline":n==="behind"?"behind":n==="inFront"?"inFront":n==="square"||n==="tight"||n==="through"?e==="right"?"squareRight":"squareLeft":null}var H=[{choice:"inline",i18nLabelKey:"inLineWithText",i18nDescKey:"inLineWithText",iconHint:"inline"},{choice:"squareLeft",i18nLabelKey:"squareLeft",i18nDescKey:"squareLeft",iconHint:"squareLeft"},{choice:"squareRight",i18nLabelKey:"squareRight",i18nDescKey:"squareRight",iconHint:"squareRight"},{choice:"behind",i18nLabelKey:"behindText",i18nDescKey:"behindText",iconHint:"behind"},{choice:"inFront",i18nLabelKey:"inFrontOfText",i18nDescKey:"inFrontOfText",iconHint:"inFront"}];function R(n,e){return true}function A(n){switch(n){case "inline":return "inline";case "square":case "tight":case "through":return "squareLeft";case "topAndBottom":return "topAndBottom";case "behind":return "behind";case "inFront":return "inFront";case "wrapRight":return "squareLeft";case "wrapLeft":return "squareRight";default:return}}var c=class{constructor(e={}){chunkDC7S76ZX_js.a(this,"container",null);chunkDC7S76ZX_js.a(this,"blockLookup",new Map);chunkDC7S76ZX_js.a(this,"pageStates",[]);chunkDC7S76ZX_js.a(this,"totalPages",0);chunkDC7S76ZX_js.a(this,"options");chunkDC7S76ZX_js.a(this,"doc");chunkDC7S76ZX_js.a(this,"resolvedCommentIds",new Set);this.options=e,this.doc=e.document??document;}setBlockLookup(e){this.blockLookup=e;}mount(e){this.container=e,this.applyContainerStyles();}unmount(){this.container&&(this.container.innerHTML=""),this.container=null,this.pageStates=[];}applyContainerStyles(){if(!this.container)return;let e=this.options.pageGap??24;this.container.style.display="flex",this.container.style.flexDirection="column",this.container.style.alignItems="center",this.container.style.gap=`${e}px`,this.container.style.padding=`${e}px`,this.container.style.backgroundColor=this.options.containerBackground??"var(--doc-bg, #f8f9fa)",this.container.style.minHeight="100%";}paint(e){if(!this.container)throw new Error("LayoutPainter: not mounted");let{pages:o}=e;this.totalPages=o.length,this.container.innerHTML="",this.pageStates=[];for(let t=0;t<o.length;t++){let a=o[t],r={pageNumber:a.number,totalPages:this.totalPages,section:"body",resolvedCommentIds:this.resolvedCommentIds},l=this.renderPageWithLookup(a,r);this.container.appendChild(l),this.pageStates.push({element:l,pageNumber:a.number,fragmentCount:a.fragments.length});}}renderPageWithLookup(e,o){let t=this.doc.createElement("div");t.className="layout-page",t.dataset.pageNumber=String(e.number),t.style.position="relative",t.style.width=`${e.size.w}px`,t.style.height=`${e.size.h}px`,t.style.backgroundColor=this.options.pageBackground??"#ffffff",t.style.overflow="hidden",this.options.showShadow&&(t.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");let a=this.doc.createElement("div");a.className="layout-page-content",a.style.position="absolute",a.style.top=`${e.margins.top}px`,a.style.left=`${e.margins.left}px`,a.style.right=`${e.margins.right}px`,a.style.bottom=`${e.margins.bottom}px`,a.style.overflow="visible";for(let r of e.fragments){let l=this.renderFragmentWithLookup(r,o);this.applyFragmentPosition(l,r),a.appendChild(l);}return t.appendChild(a),t}renderFragmentWithLookup(e,o){let t=this.blockLookup.get(String(e.blockId));if(e.kind==="paragraph"&&t){let a=t.block,r=t.measure;return chunkT5RYEG2V_js.v(e,a,r,o,{document:this.doc})}if(e.kind==="table"&&t){let a=t.block,r=t.measure;return chunkT5RYEG2V_js.y(e,a,r,o,{document:this.doc})}if(e.kind==="image"&&t){let a=t.block,r=t.measure;return chunkT5RYEG2V_js.s(e,a,r,o,{document:this.doc})}if(e.kind==="textBox"&&t){let a=t.block,r=t.measure;return chunkT5RYEG2V_js.A(e,a,r,o,{document:this.doc})}return chunkT5RYEG2V_js.m(e,o,{document:this.doc})}applyFragmentPosition(e,o){e.style.position="absolute",e.style.left=`${o.x}px`,e.style.top=`${o.y}px`,e.style.width=`${o.width}px`,"height"in o&&(e.style.height=`${o.height}px`);}getPageCount(){return this.totalPages}getPageElement(e){return this.pageStates[e]?.element??null}scrollToPage(e){let o=this.pageStates.find(t=>t.pageNumber===e);o?.element&&o.element.scrollIntoView({behavior:"smooth",block:"start"});}};function W(n){return new c(n)}Object.defineProperty(exports,"FRAGMENT_CLASS_NAMES",{enumerable:true,get:function(){return chunkT5RYEG2V_js.l}});Object.defineProperty(exports,"IMAGE_CLASS_NAMES",{enumerable:true,get:function(){return chunkT5RYEG2V_js.r}});Object.defineProperty(exports,"TABLE_CLASS_NAMES",{enumerable:true,get:function(){return chunkT5RYEG2V_js.x}});Object.defineProperty(exports,"TEXTBOX_CLASS_NAMES",{enumerable:true,get:function(){return chunkT5RYEG2V_js.z}});Object.defineProperty(exports,"isFloatingImageRun",{enumerable:true,get:function(){return chunkT5RYEG2V_js.p}});Object.defineProperty(exports,"isTextWrappingFloatingImageRun",{enumerable:true,get:function(){return chunkT5RYEG2V_js.q}});Object.defineProperty(exports,"renderFragment",{enumerable:true,get:function(){return chunkT5RYEG2V_js.m}});Object.defineProperty(exports,"renderImageFragment",{enumerable:true,get:function(){return chunkT5RYEG2V_js.s}});Object.defineProperty(exports,"renderLine",{enumerable:true,get:function(){return chunkT5RYEG2V_js.u}});Object.defineProperty(exports,"renderPage",{enumerable:true,get:function(){return chunkT5RYEG2V_js.F}});Object.defineProperty(exports,"renderPages",{enumerable:true,get:function(){return chunkT5RYEG2V_js.C}});Object.defineProperty(exports,"renderParagraphFragment",{enumerable:true,get:function(){return chunkT5RYEG2V_js.v}});Object.defineProperty(exports,"renderTableFragment",{enumerable:true,get:function(){return chunkT5RYEG2V_js.y}});Object.defineProperty(exports,"renderTextBoxFragment",{enumerable:true,get:function(){return chunkT5RYEG2V_js.A}});Object.defineProperty(exports,"sliceRunsForLine",{enumerable:true,get:function(){return chunkT5RYEG2V_js.t}});exports.IMAGE_LAYOUT_OPTIONS=H;exports.LAYOUT_IMAGE_CLASSES=i;exports.LayoutPainter=c;exports.captureInlinePositionEmu=B;exports.createPainter=W;exports.deriveLayoutChoice=C;exports.findImageElement=v;exports.hitTestImage=P;exports.isImageLayoutOptionEnabled=R;exports.toolbarValueToLayoutTarget=A;
1
+ 'use strict';var chunkZUGNF5KU_js=require('../chunk-ZUGNF5KU.js');require('../chunk-GY5BWVM7.js');var chunkSORYYVJ7_js=require('../chunk-SORYYVJ7.js');require('../chunk-LTHT4A4S.js'),require('../chunk-IMKU4O3P.js'),require('../chunk-DROCYKAR.js'),require('../chunk-F44ZLDZS.js'),require('../chunk-44FHVKSI.js'),require('../chunk-X6HFDXKB.js'),require('../chunk-D4RPOJC7.js'),require('../chunk-IP2VXNWG.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-MZOVDLYL.js'),require('../chunk-E4JMCA5X.js'),require('../chunk-HQPWFUP5.js'),require('../chunk-DV6GWBUJ.js'),require('../chunk-OAWTQ3IY.js'),require('../chunk-GM4USWKO.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-YTDWMXNS.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-TUIEV7Q7.js'),require('../chunk-7HANRHHL.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js');var chunk4Q2IP5FW_js=require('../chunk-4Q2IP5FW.js');require('../chunk-Q4CKLXWA.js');var chunkDC7S76ZX_js=require('../chunk-DC7S76ZX.js');var i={runImage:"layout-run-image",blockImage:"layout-block-image",pageFloatingImage:"layout-page-floating-image",cellFloatingImage:"layout-cell-floating-image",pageContent:"layout-page-content",paragraph:"layout-paragraph"},y=[`.${i.pageFloatingImage}`,`.${i.cellFloatingImage}`,`.${i.blockImage}`,`.${i.runImage}`].join(", ");function P(n){if(!(n instanceof Element))return null;let e=n.closest(y);if(!e)return null;let o=e.dataset.pmStart;if(o===void 0)return null;let t=Number(o);return Number.isNaN(t)?null:{pos:t,imageEl:e}}function v(n){if(!(n instanceof HTMLElement))return null;if(n.tagName==="IMG"&&n.classList.contains(i.runImage))return n;let e=n.closest(y);return e&&e.dataset.pmStart?e:null}function B(n,e=1){if(!n.classList.contains(i.runImage))return;let o=n.closest(`.${i.pageContent}`),t=n.closest(`.${i.paragraph}`);if(!o||!t)return;let a=n.getBoundingClientRect(),r=o.getBoundingClientRect(),l=t.getBoundingClientRect(),p=e>0?e:1;return {horizontalEmu:Math.round(chunk4Q2IP5FW_js.f((a.left-r.left)/p)),verticalEmu:Math.round(chunk4Q2IP5FW_js.f((a.top-l.top)/p))}}function C(n,e){return n==="inline"?"inline":n==="behind"?"behind":n==="inFront"?"inFront":n==="square"||n==="tight"||n==="through"?e==="right"?"squareRight":"squareLeft":null}var H=[{choice:"inline",i18nLabelKey:"inLineWithText",i18nDescKey:"inLineWithText",iconHint:"inline"},{choice:"squareLeft",i18nLabelKey:"squareLeft",i18nDescKey:"squareLeft",iconHint:"squareLeft"},{choice:"squareRight",i18nLabelKey:"squareRight",i18nDescKey:"squareRight",iconHint:"squareRight"},{choice:"behind",i18nLabelKey:"behindText",i18nDescKey:"behindText",iconHint:"behind"},{choice:"inFront",i18nLabelKey:"inFrontOfText",i18nDescKey:"inFrontOfText",iconHint:"inFront"}];function R(n,e){return true}function A(n){switch(n){case "inline":return "inline";case "square":case "tight":case "through":return "squareLeft";case "topAndBottom":return "topAndBottom";case "behind":return "behind";case "inFront":return "inFront";case "wrapRight":return "squareLeft";case "wrapLeft":return "squareRight";default:return}}var c=class{constructor(e={}){chunkDC7S76ZX_js.a(this,"container",null);chunkDC7S76ZX_js.a(this,"blockLookup",new Map);chunkDC7S76ZX_js.a(this,"pageStates",[]);chunkDC7S76ZX_js.a(this,"totalPages",0);chunkDC7S76ZX_js.a(this,"options");chunkDC7S76ZX_js.a(this,"doc");chunkDC7S76ZX_js.a(this,"resolvedCommentIds",new Set);this.options=e,this.doc=e.document??document;}setBlockLookup(e){this.blockLookup=e;}mount(e){this.container=e,this.applyContainerStyles();}unmount(){this.container&&(this.container.innerHTML=""),this.container=null,this.pageStates=[];}applyContainerStyles(){if(!this.container)return;let e=this.options.pageGap??24;this.container.style.display="flex",this.container.style.flexDirection="column",this.container.style.alignItems="center",this.container.style.gap=`${e}px`,this.container.style.padding=`${e}px`,this.container.style.backgroundColor=this.options.containerBackground??"var(--doc-bg, #f8f9fa)",this.container.style.minHeight="100%";}paint(e){if(!this.container)throw new Error("LayoutPainter: not mounted");let{pages:o}=e;this.totalPages=o.length,this.container.innerHTML="",this.pageStates=[];for(let t=0;t<o.length;t++){let a=o[t],r={pageNumber:a.number,totalPages:this.totalPages,section:"body",resolvedCommentIds:this.resolvedCommentIds},l=this.renderPageWithLookup(a,r);this.container.appendChild(l),this.pageStates.push({element:l,pageNumber:a.number,fragmentCount:a.fragments.length});}}renderPageWithLookup(e,o){let t=this.doc.createElement("div");t.className="layout-page",t.dataset.pageNumber=String(e.number),t.style.position="relative",t.style.width=`${e.size.w}px`,t.style.height=`${e.size.h}px`,t.style.backgroundColor=this.options.pageBackground??"#ffffff",t.style.overflow="hidden",this.options.showShadow&&(t.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");let a=this.doc.createElement("div");a.className="layout-page-content",a.style.position="absolute",a.style.top=`${e.margins.top}px`,a.style.left=`${e.margins.left}px`,a.style.right=`${e.margins.right}px`,a.style.bottom=`${e.margins.bottom}px`,a.style.overflow="visible";for(let r of e.fragments){let l=this.renderFragmentWithLookup(r,o);this.applyFragmentPosition(l,r),a.appendChild(l);}return t.appendChild(a),t}renderFragmentWithLookup(e,o){let t=this.blockLookup.get(String(e.blockId));if(e.kind==="paragraph"&&t){let a=t.block,r=t.measure;return chunkZUGNF5KU_js.r(e,a,r,o,{document:this.doc})}if(e.kind==="table"&&t){let a=t.block,r=t.measure;return chunkZUGNF5KU_js.u(e,a,r,o,{document:this.doc})}if(e.kind==="image"&&t){let a=t.block,r=t.measure;return chunkZUGNF5KU_js.o(e,a,r,o,{document:this.doc})}if(e.kind==="textBox"&&t){let a=t.block,r=t.measure;return chunkZUGNF5KU_js.w(e,a,r,o,{document:this.doc})}return chunkZUGNF5KU_js.m(e,o,{document:this.doc})}applyFragmentPosition(e,o){e.style.position="absolute",e.style.left=`${o.x}px`,e.style.top=`${o.y}px`,e.style.width=`${o.width}px`,"height"in o&&(e.style.height=`${o.height}px`);}getPageCount(){return this.totalPages}getPageElement(e){return this.pageStates[e]?.element??null}scrollToPage(e){let o=this.pageStates.find(t=>t.pageNumber===e);o?.element&&o.element.scrollIntoView({behavior:"smooth",block:"start"});}};function W(n){return new c(n)}Object.defineProperty(exports,"FRAGMENT_CLASS_NAMES",{enumerable:true,get:function(){return chunkZUGNF5KU_js.l}});Object.defineProperty(exports,"IMAGE_CLASS_NAMES",{enumerable:true,get:function(){return chunkZUGNF5KU_js.n}});Object.defineProperty(exports,"TABLE_CLASS_NAMES",{enumerable:true,get:function(){return chunkZUGNF5KU_js.t}});Object.defineProperty(exports,"TEXTBOX_CLASS_NAMES",{enumerable:true,get:function(){return chunkZUGNF5KU_js.v}});Object.defineProperty(exports,"renderFragment",{enumerable:true,get:function(){return chunkZUGNF5KU_js.m}});Object.defineProperty(exports,"renderImageFragment",{enumerable:true,get:function(){return chunkZUGNF5KU_js.o}});Object.defineProperty(exports,"renderLine",{enumerable:true,get:function(){return chunkZUGNF5KU_js.q}});Object.defineProperty(exports,"renderPage",{enumerable:true,get:function(){return chunkZUGNF5KU_js.B}});Object.defineProperty(exports,"renderPages",{enumerable:true,get:function(){return chunkZUGNF5KU_js.y}});Object.defineProperty(exports,"renderParagraphFragment",{enumerable:true,get:function(){return chunkZUGNF5KU_js.r}});Object.defineProperty(exports,"renderTableFragment",{enumerable:true,get:function(){return chunkZUGNF5KU_js.u}});Object.defineProperty(exports,"renderTextBoxFragment",{enumerable:true,get:function(){return chunkZUGNF5KU_js.w}});Object.defineProperty(exports,"sliceRunsForLine",{enumerable:true,get:function(){return chunkZUGNF5KU_js.p}});Object.defineProperty(exports,"isFloatingImageRun",{enumerable:true,get:function(){return chunkSORYYVJ7_js.f}});Object.defineProperty(exports,"isTextWrappingFloatingImageRun",{enumerable:true,get:function(){return chunkSORYYVJ7_js.g}});exports.IMAGE_LAYOUT_OPTIONS=H;exports.LAYOUT_IMAGE_CLASSES=i;exports.LayoutPainter=c;exports.captureInlinePositionEmu=B;exports.createPainter=W;exports.deriveLayoutChoice=C;exports.findImageElement=v;exports.hitTestImage=P;exports.isImageLayoutOptionEnabled=R;exports.toolbarValueToLayoutTarget=A;
@@ -1 +1 @@
1
- import {v as v$1,y as y$1,s,A as A$1,m}from'../chunk-BTOBVF4I.mjs';export{l as FRAGMENT_CLASS_NAMES,r as IMAGE_CLASS_NAMES,x as TABLE_CLASS_NAMES,z as TEXTBOX_CLASS_NAMES,p as isFloatingImageRun,q as isTextWrappingFloatingImageRun,m as renderFragment,s as renderImageFragment,u as renderLine,F as renderPage,C as renderPages,v as renderParagraphFragment,y as renderTableFragment,A as renderTextBoxFragment,t as sliceRunsForLine}from'../chunk-BTOBVF4I.mjs';import'../chunk-5TNMVXDS.mjs';import'../chunk-5N5DBQJV.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-2D3UPAMA.mjs';import'../chunk-3GNIP6IX.mjs';import'../chunk-2RCMY2GE.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-NMSU4MWP.mjs';import'../chunk-P6RNOYAG.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-LE67NTCN.mjs';import'../chunk-VQWZHPWI.mjs';import {f}from'../chunk-VW22RZ6C.mjs';import {a}from'../chunk-QYUPLKLP.mjs';var i={runImage:"layout-run-image",blockImage:"layout-block-image",pageFloatingImage:"layout-page-floating-image",cellFloatingImage:"layout-cell-floating-image",pageContent:"layout-page-content",paragraph:"layout-paragraph"},y=[`.${i.pageFloatingImage}`,`.${i.cellFloatingImage}`,`.${i.blockImage}`,`.${i.runImage}`].join(", ");function P(n){if(!(n instanceof Element))return null;let e=n.closest(y);if(!e)return null;let o=e.dataset.pmStart;if(o===void 0)return null;let t=Number(o);return Number.isNaN(t)?null:{pos:t,imageEl:e}}function v(n){if(!(n instanceof HTMLElement))return null;if(n.tagName==="IMG"&&n.classList.contains(i.runImage))return n;let e=n.closest(y);return e&&e.dataset.pmStart?e:null}function B(n,e=1){if(!n.classList.contains(i.runImage))return;let o=n.closest(`.${i.pageContent}`),t=n.closest(`.${i.paragraph}`);if(!o||!t)return;let a=n.getBoundingClientRect(),r=o.getBoundingClientRect(),l=t.getBoundingClientRect(),p=e>0?e:1;return {horizontalEmu:Math.round(f((a.left-r.left)/p)),verticalEmu:Math.round(f((a.top-l.top)/p))}}function C(n,e){return n==="inline"?"inline":n==="behind"?"behind":n==="inFront"?"inFront":n==="square"||n==="tight"||n==="through"?e==="right"?"squareRight":"squareLeft":null}var H=[{choice:"inline",i18nLabelKey:"inLineWithText",i18nDescKey:"inLineWithText",iconHint:"inline"},{choice:"squareLeft",i18nLabelKey:"squareLeft",i18nDescKey:"squareLeft",iconHint:"squareLeft"},{choice:"squareRight",i18nLabelKey:"squareRight",i18nDescKey:"squareRight",iconHint:"squareRight"},{choice:"behind",i18nLabelKey:"behindText",i18nDescKey:"behindText",iconHint:"behind"},{choice:"inFront",i18nLabelKey:"inFrontOfText",i18nDescKey:"inFrontOfText",iconHint:"inFront"}];function R(n,e){return true}function A(n){switch(n){case "inline":return "inline";case "square":case "tight":case "through":return "squareLeft";case "topAndBottom":return "topAndBottom";case "behind":return "behind";case "inFront":return "inFront";case "wrapRight":return "squareLeft";case "wrapLeft":return "squareRight";default:return}}var c=class{constructor(e={}){a(this,"container",null);a(this,"blockLookup",new Map);a(this,"pageStates",[]);a(this,"totalPages",0);a(this,"options");a(this,"doc");a(this,"resolvedCommentIds",new Set);this.options=e,this.doc=e.document??document;}setBlockLookup(e){this.blockLookup=e;}mount(e){this.container=e,this.applyContainerStyles();}unmount(){this.container&&(this.container.innerHTML=""),this.container=null,this.pageStates=[];}applyContainerStyles(){if(!this.container)return;let e=this.options.pageGap??24;this.container.style.display="flex",this.container.style.flexDirection="column",this.container.style.alignItems="center",this.container.style.gap=`${e}px`,this.container.style.padding=`${e}px`,this.container.style.backgroundColor=this.options.containerBackground??"var(--doc-bg, #f8f9fa)",this.container.style.minHeight="100%";}paint(e){if(!this.container)throw new Error("LayoutPainter: not mounted");let{pages:o}=e;this.totalPages=o.length,this.container.innerHTML="",this.pageStates=[];for(let t=0;t<o.length;t++){let a=o[t],r={pageNumber:a.number,totalPages:this.totalPages,section:"body",resolvedCommentIds:this.resolvedCommentIds},l=this.renderPageWithLookup(a,r);this.container.appendChild(l),this.pageStates.push({element:l,pageNumber:a.number,fragmentCount:a.fragments.length});}}renderPageWithLookup(e,o){let t=this.doc.createElement("div");t.className="layout-page",t.dataset.pageNumber=String(e.number),t.style.position="relative",t.style.width=`${e.size.w}px`,t.style.height=`${e.size.h}px`,t.style.backgroundColor=this.options.pageBackground??"#ffffff",t.style.overflow="hidden",this.options.showShadow&&(t.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");let a=this.doc.createElement("div");a.className="layout-page-content",a.style.position="absolute",a.style.top=`${e.margins.top}px`,a.style.left=`${e.margins.left}px`,a.style.right=`${e.margins.right}px`,a.style.bottom=`${e.margins.bottom}px`,a.style.overflow="visible";for(let r of e.fragments){let l=this.renderFragmentWithLookup(r,o);this.applyFragmentPosition(l,r),a.appendChild(l);}return t.appendChild(a),t}renderFragmentWithLookup(e,o){let t=this.blockLookup.get(String(e.blockId));if(e.kind==="paragraph"&&t){let a=t.block,r=t.measure;return v$1(e,a,r,o,{document:this.doc})}if(e.kind==="table"&&t){let a=t.block,r=t.measure;return y$1(e,a,r,o,{document:this.doc})}if(e.kind==="image"&&t){let a=t.block,r=t.measure;return s(e,a,r,o,{document:this.doc})}if(e.kind==="textBox"&&t){let a=t.block,r=t.measure;return A$1(e,a,r,o,{document:this.doc})}return m(e,o,{document:this.doc})}applyFragmentPosition(e,o){e.style.position="absolute",e.style.left=`${o.x}px`,e.style.top=`${o.y}px`,e.style.width=`${o.width}px`,"height"in o&&(e.style.height=`${o.height}px`);}getPageCount(){return this.totalPages}getPageElement(e){return this.pageStates[e]?.element??null}scrollToPage(e){let o=this.pageStates.find(t=>t.pageNumber===e);o?.element&&o.element.scrollIntoView({behavior:"smooth",block:"start"});}};function W(n){return new c(n)}export{H as IMAGE_LAYOUT_OPTIONS,i as LAYOUT_IMAGE_CLASSES,c as LayoutPainter,B as captureInlinePositionEmu,W as createPainter,C as deriveLayoutChoice,v as findImageElement,P as hitTestImage,R as isImageLayoutOptionEnabled,A as toolbarValueToLayoutTarget};
1
+ import {r,u,o,w,m}from'../chunk-RFVFX5WK.mjs';export{l as FRAGMENT_CLASS_NAMES,n as IMAGE_CLASS_NAMES,t as TABLE_CLASS_NAMES,v as TEXTBOX_CLASS_NAMES,m as renderFragment,o as renderImageFragment,q as renderLine,B as renderPage,y as renderPages,r as renderParagraphFragment,u as renderTableFragment,w as renderTextBoxFragment,p as sliceRunsForLine}from'../chunk-RFVFX5WK.mjs';import'../chunk-V5VDCQDN.mjs';export{f as isFloatingImageRun,g as isTextWrappingFloatingImageRun}from'../chunk-MP4QSEO2.mjs';import'../chunk-6Y6LON6Y.mjs';import'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-RFC2SXZ6.mjs';import'../chunk-BOOHU5EW.mjs';import'../chunk-FEWCI2E5.mjs';import'../chunk-LBKMYD3M.mjs';import'../chunk-NBLJPT54.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-ILJUDEZ5.mjs';import'../chunk-6ZXL3EIP.mjs';import'../chunk-OEXVWIHW.mjs';import'../chunk-WLHNIXWC.mjs';import'../chunk-CA2EYL6T.mjs';import'../chunk-IQG3KLWY.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-VHUVPHPI.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-ZX26QZJ5.mjs';import'../chunk-MJ6XZFVD.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-LE67NTCN.mjs';import {f}from'../chunk-VW22RZ6C.mjs';import'../chunk-VQWZHPWI.mjs';import {a}from'../chunk-QYUPLKLP.mjs';var i={runImage:"layout-run-image",blockImage:"layout-block-image",pageFloatingImage:"layout-page-floating-image",cellFloatingImage:"layout-cell-floating-image",pageContent:"layout-page-content",paragraph:"layout-paragraph"},y=[`.${i.pageFloatingImage}`,`.${i.cellFloatingImage}`,`.${i.blockImage}`,`.${i.runImage}`].join(", ");function P(n){if(!(n instanceof Element))return null;let e=n.closest(y);if(!e)return null;let o=e.dataset.pmStart;if(o===void 0)return null;let t=Number(o);return Number.isNaN(t)?null:{pos:t,imageEl:e}}function v(n){if(!(n instanceof HTMLElement))return null;if(n.tagName==="IMG"&&n.classList.contains(i.runImage))return n;let e=n.closest(y);return e&&e.dataset.pmStart?e:null}function B(n,e=1){if(!n.classList.contains(i.runImage))return;let o=n.closest(`.${i.pageContent}`),t=n.closest(`.${i.paragraph}`);if(!o||!t)return;let a=n.getBoundingClientRect(),r=o.getBoundingClientRect(),l=t.getBoundingClientRect(),p=e>0?e:1;return {horizontalEmu:Math.round(f((a.left-r.left)/p)),verticalEmu:Math.round(f((a.top-l.top)/p))}}function C(n,e){return n==="inline"?"inline":n==="behind"?"behind":n==="inFront"?"inFront":n==="square"||n==="tight"||n==="through"?e==="right"?"squareRight":"squareLeft":null}var H=[{choice:"inline",i18nLabelKey:"inLineWithText",i18nDescKey:"inLineWithText",iconHint:"inline"},{choice:"squareLeft",i18nLabelKey:"squareLeft",i18nDescKey:"squareLeft",iconHint:"squareLeft"},{choice:"squareRight",i18nLabelKey:"squareRight",i18nDescKey:"squareRight",iconHint:"squareRight"},{choice:"behind",i18nLabelKey:"behindText",i18nDescKey:"behindText",iconHint:"behind"},{choice:"inFront",i18nLabelKey:"inFrontOfText",i18nDescKey:"inFrontOfText",iconHint:"inFront"}];function R(n,e){return true}function A(n){switch(n){case "inline":return "inline";case "square":case "tight":case "through":return "squareLeft";case "topAndBottom":return "topAndBottom";case "behind":return "behind";case "inFront":return "inFront";case "wrapRight":return "squareLeft";case "wrapLeft":return "squareRight";default:return}}var c=class{constructor(e={}){a(this,"container",null);a(this,"blockLookup",new Map);a(this,"pageStates",[]);a(this,"totalPages",0);a(this,"options");a(this,"doc");a(this,"resolvedCommentIds",new Set);this.options=e,this.doc=e.document??document;}setBlockLookup(e){this.blockLookup=e;}mount(e){this.container=e,this.applyContainerStyles();}unmount(){this.container&&(this.container.innerHTML=""),this.container=null,this.pageStates=[];}applyContainerStyles(){if(!this.container)return;let e=this.options.pageGap??24;this.container.style.display="flex",this.container.style.flexDirection="column",this.container.style.alignItems="center",this.container.style.gap=`${e}px`,this.container.style.padding=`${e}px`,this.container.style.backgroundColor=this.options.containerBackground??"var(--doc-bg, #f8f9fa)",this.container.style.minHeight="100%";}paint(e){if(!this.container)throw new Error("LayoutPainter: not mounted");let{pages:o}=e;this.totalPages=o.length,this.container.innerHTML="",this.pageStates=[];for(let t=0;t<o.length;t++){let a=o[t],r={pageNumber:a.number,totalPages:this.totalPages,section:"body",resolvedCommentIds:this.resolvedCommentIds},l=this.renderPageWithLookup(a,r);this.container.appendChild(l),this.pageStates.push({element:l,pageNumber:a.number,fragmentCount:a.fragments.length});}}renderPageWithLookup(e,o){let t=this.doc.createElement("div");t.className="layout-page",t.dataset.pageNumber=String(e.number),t.style.position="relative",t.style.width=`${e.size.w}px`,t.style.height=`${e.size.h}px`,t.style.backgroundColor=this.options.pageBackground??"#ffffff",t.style.overflow="hidden",this.options.showShadow&&(t.style.boxShadow="0 2px 8px rgba(0, 0, 0, 0.15)");let a=this.doc.createElement("div");a.className="layout-page-content",a.style.position="absolute",a.style.top=`${e.margins.top}px`,a.style.left=`${e.margins.left}px`,a.style.right=`${e.margins.right}px`,a.style.bottom=`${e.margins.bottom}px`,a.style.overflow="visible";for(let r of e.fragments){let l=this.renderFragmentWithLookup(r,o);this.applyFragmentPosition(l,r),a.appendChild(l);}return t.appendChild(a),t}renderFragmentWithLookup(e,o$1){let t=this.blockLookup.get(String(e.blockId));if(e.kind==="paragraph"&&t){let a=t.block,r$1=t.measure;return r(e,a,r$1,o$1,{document:this.doc})}if(e.kind==="table"&&t){let a=t.block,r=t.measure;return u(e,a,r,o$1,{document:this.doc})}if(e.kind==="image"&&t){let a=t.block,r=t.measure;return o(e,a,r,o$1,{document:this.doc})}if(e.kind==="textBox"&&t){let a=t.block,r=t.measure;return w(e,a,r,o$1,{document:this.doc})}return m(e,o$1,{document:this.doc})}applyFragmentPosition(e,o){e.style.position="absolute",e.style.left=`${o.x}px`,e.style.top=`${o.y}px`,e.style.width=`${o.width}px`,"height"in o&&(e.style.height=`${o.height}px`);}getPageCount(){return this.totalPages}getPageElement(e){return this.pageStates[e]?.element??null}scrollToPage(e){let o=this.pageStates.find(t=>t.pageNumber===e);o?.element&&o.element.scrollIntoView({behavior:"smooth",block:"start"});}};function W(n){return new c(n)}export{H as IMAGE_LAYOUT_OPTIONS,i as LAYOUT_IMAGE_CLASSES,c as LayoutPainter,B as captureInlinePositionEmu,W as createPainter,C as deriveLayoutChoice,v as findImageElement,P as hitTestImage,R as isImageLayoutOptionEnabled,A as toolbarValueToLayoutTarget};