@eigenpal/docx-editor-core 1.2.1 → 1.3.1

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 (281) hide show
  1. package/dist/agent/index.d.mts +5 -4
  2. package/dist/agent/index.d.ts +5 -4
  3. package/dist/agent/index.js +1 -1
  4. package/dist/agent/index.mjs +1 -1
  5. package/dist/anchoredObjectPosition-CS-8BfhO.d.ts +48 -0
  6. package/dist/anchoredObjectPosition-KJEyF-wr.d.mts +48 -0
  7. package/dist/{chunk-U4WUDHDK.js → chunk-2SGJZYQF.js} +1 -1
  8. package/dist/chunk-3ANZ3252.mjs +2 -0
  9. package/dist/chunk-3G44SFHX.mjs +4 -0
  10. package/dist/{chunk-4QEETB7U.js → chunk-3QPKTG2Y.js} +2 -2
  11. package/dist/chunk-3R7QHNI5.js +2 -0
  12. package/dist/chunk-4GFTMGSV.mjs +1 -0
  13. package/dist/chunk-4MYKVWNF.js +1 -0
  14. package/dist/chunk-4RTVLMRZ.js +2 -0
  15. package/dist/chunk-55XWETY4.mjs +1 -0
  16. package/dist/chunk-6QO4O52Y.mjs +1 -0
  17. package/dist/{chunk-THLJYXFB.js → chunk-6V3SFHEM.js} +1 -1
  18. package/dist/{chunk-6ZXL3EIP.mjs → chunk-7CZEZ3UL.mjs} +1 -1
  19. package/dist/{chunk-Z5MJYQSD.mjs → chunk-7UZJ5YDF.mjs} +1 -1
  20. package/dist/{chunk-BXWOLARZ.js → chunk-APNMO5JT.js} +1 -1
  21. package/dist/{chunk-KZXZWGFX.mjs → chunk-B46V5G46.mjs} +1 -1
  22. package/dist/chunk-BH3ACQ3M.js +59 -0
  23. package/dist/chunk-BUCOTKYY.js +1 -0
  24. package/dist/{chunk-5BLQHXWK.mjs → chunk-CDXCFHOY.mjs} +1 -1
  25. package/dist/chunk-CHN26LLL.mjs +59 -0
  26. package/dist/chunk-CZSAC65M.js +2 -0
  27. package/dist/chunk-D3PRIF3Y.mjs +1 -0
  28. package/dist/chunk-DE2V4X3B.mjs +1 -0
  29. package/dist/{chunk-7BVHKWEW.mjs → chunk-DFUWJHKF.mjs} +1 -1
  30. package/dist/{chunk-UGV4KRQB.js → chunk-DG2CMDSM.js} +1 -1
  31. package/dist/chunk-DKKTY56Q.js +1 -0
  32. package/dist/chunk-FIGLFSNR.js +1 -0
  33. package/dist/{chunk-AMB6Y77B.js → chunk-FQS436KN.js} +1 -1
  34. package/dist/chunk-FYRJTDC4.mjs +2 -0
  35. package/dist/chunk-GYWTUUXX.mjs +2 -0
  36. package/dist/chunk-HPJBZL37.mjs +1 -0
  37. package/dist/chunk-INDYZOOS.js +1 -0
  38. package/dist/chunk-IUVQJ6PX.mjs +1 -0
  39. package/dist/chunk-J3YFJDZD.js +1 -0
  40. package/dist/chunk-JHTURDPX.mjs +1 -0
  41. package/dist/{chunk-D62KS7QG.mjs → chunk-LAJPGQEE.mjs} +1 -1
  42. package/dist/chunk-LERLET2D.js +4 -0
  43. package/dist/chunk-LX35TFGF.mjs +1 -0
  44. package/dist/{chunk-BOOHU5EW.mjs → chunk-MOCGHQ4A.mjs} +1 -1
  45. package/dist/chunk-NAFMAKLK.js +2 -0
  46. package/dist/chunk-NRWQ65NX.js +1 -0
  47. package/dist/chunk-OTHV7YV2.js +2 -0
  48. package/dist/chunk-QLAIOTQB.js +1 -0
  49. package/dist/{chunk-U4XMGWF7.js → chunk-RAWVGULQ.js} +1 -1
  50. package/dist/chunk-RQVHKDXK.js +2 -0
  51. package/dist/chunk-RSU4HTC6.js +1 -0
  52. package/dist/{chunk-E4JMCA5X.js → chunk-SCK6ZM5V.js} +2 -2
  53. package/dist/chunk-SWBLJF6R.mjs +2 -0
  54. package/dist/chunk-UE2ZKRYB.mjs +2 -0
  55. package/dist/chunk-VOCHZNOF.mjs +1 -0
  56. package/dist/{chunk-OEXVWIHW.mjs → chunk-W77JXDEV.mjs} +1 -1
  57. package/dist/chunk-W7CQRQZ6.mjs +1 -0
  58. package/dist/chunk-WWBNJ7KF.js +1 -0
  59. package/dist/chunk-WWNOXNEX.mjs +2 -0
  60. package/dist/chunk-YGWUKRFD.mjs +1 -0
  61. package/dist/chunk-YM7SMTYY.js +1 -0
  62. package/dist/{chunk-QKLY4F2J.mjs → chunk-YNUPP7UG.mjs} +1 -1
  63. package/dist/chunk-YPKIQMPR.js +1 -0
  64. package/dist/{chunk-HQPWFUP5.js → chunk-Z3LGMBJC.js} +1 -1
  65. package/dist/{colorResolver-BZ_yScf4.d.ts → colorResolver-8A-qj-LP.d.ts} +1 -1
  66. package/dist/{colorResolver-C6DtsoFI.d.mts → colorResolver-BCvxTlLF.d.mts} +1 -1
  67. package/dist/{content-CE-ZdMwG.d.mts → content-3xF4WDE8.d.mts} +51 -7
  68. package/dist/{content-CYXJ2tfQ.d.ts → content-C8fc_tL6.d.ts} +51 -7
  69. package/dist/{contentControlValues-gyVPsi6m.d.ts → contentControlValues-DGDKD589.d.ts} +1 -1
  70. package/dist/{contentControlValues-DAwTWfgR.d.mts → contentControlValues-DjWvoJQ-.d.mts} +1 -1
  71. package/dist/core-plugins.d.mts +6 -5
  72. package/dist/core-plugins.d.ts +6 -5
  73. package/dist/core-plugins.js +1 -1
  74. package/dist/core-plugins.mjs +1 -1
  75. package/dist/core.d.mts +12 -11
  76. package/dist/core.d.ts +12 -11
  77. package/dist/core.js +1 -1
  78. package/dist/core.mjs +1 -1
  79. package/dist/{documentStyles-DToJv9co.d.ts → documentStyles-C7k_8Sye.d.ts} +1 -1
  80. package/dist/{documentStyles-D87dxl18.d.mts → documentStyles-qR0VR2s0.d.mts} +1 -1
  81. package/dist/docx/index.d.mts +3 -2
  82. package/dist/docx/index.d.ts +3 -2
  83. package/dist/docx/index.js +1 -1
  84. package/dist/docx/index.mjs +1 -1
  85. package/dist/docx/parser.d.mts +3 -2
  86. package/dist/docx/parser.d.ts +3 -2
  87. package/dist/docx/parser.js +1 -1
  88. package/dist/docx/parser.mjs +1 -1
  89. package/dist/docx/rezip.d.mts +3 -2
  90. package/dist/docx/rezip.d.ts +3 -2
  91. package/dist/docx/rezip.js +1 -1
  92. package/dist/docx/rezip.mjs +1 -1
  93. package/dist/docx/serializer/index.d.mts +42 -4
  94. package/dist/docx/serializer/index.d.ts +42 -4
  95. package/dist/docx/serializer/index.js +1 -1
  96. package/dist/docx/serializer/index.mjs +1 -1
  97. package/dist/editor/index.d.mts +128 -0
  98. package/dist/editor/index.d.ts +128 -0
  99. package/dist/editor/index.js +1 -0
  100. package/dist/editor/index.mjs +1 -0
  101. package/dist/{fontLoader-Z7pqeNvZ.d.mts → fontLoader-CUS1BPv7.d.mts} +1 -1
  102. package/dist/{fontLoader-Cm02v7PO.d.ts → fontLoader-Dl9SEKex.d.ts} +1 -1
  103. package/dist/{footnotes-lCH_P3N3.d.mts → footnotes-BZ24OTAT.d.mts} +25 -2
  104. package/dist/{footnotes-skVvEHvZ.d.ts → footnotes-DMsicPGd.d.ts} +25 -2
  105. package/dist/{headerFooterLayout-Bd58Tum3.d.ts → headerFooterLayout-AtAOhM8E.d.ts} +22 -6
  106. package/dist/{headerFooterLayout-CuIJiIzi.d.mts → headerFooterLayout-CU6hvszp.d.mts} +22 -6
  107. package/dist/headless.d.mts +47 -11
  108. package/dist/headless.d.ts +47 -11
  109. package/dist/headless.js +1 -1
  110. package/dist/headless.mjs +1 -1
  111. package/dist/layout-bridge/clickToPositionDom.d.mts +26 -1
  112. package/dist/layout-bridge/clickToPositionDom.d.ts +26 -1
  113. package/dist/layout-bridge/clickToPositionDom.js +1 -1
  114. package/dist/layout-bridge/clickToPositionDom.mjs +1 -1
  115. package/dist/layout-bridge/index.d.mts +134 -8
  116. package/dist/layout-bridge/index.d.ts +134 -8
  117. package/dist/layout-bridge/index.js +1 -1
  118. package/dist/layout-bridge/index.mjs +1 -1
  119. package/dist/layout-bridge/measuring/index.d.mts +7 -75
  120. package/dist/layout-bridge/measuring/index.d.ts +7 -75
  121. package/dist/layout-bridge/measuring/index.js +1 -1
  122. package/dist/layout-bridge/measuring/index.mjs +1 -1
  123. package/dist/layout-bridge/tableInsertHover.js +1 -1
  124. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  125. package/dist/layout-bridge/toFlowBlocks.d.mts +3 -2
  126. package/dist/layout-bridge/toFlowBlocks.d.ts +3 -2
  127. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  128. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  129. package/dist/layout-engine/index.d.mts +16 -3
  130. package/dist/layout-engine/index.d.ts +16 -3
  131. package/dist/layout-engine/index.js +1 -1
  132. package/dist/layout-engine/index.mjs +1 -1
  133. package/dist/layout-engine/types.d.mts +22 -1
  134. package/dist/layout-engine/types.d.ts +22 -1
  135. package/dist/layout-painter/index.d.mts +7 -5
  136. package/dist/layout-painter/index.d.ts +7 -5
  137. package/dist/layout-painter/index.js +1 -1
  138. package/dist/layout-painter/index.mjs +1 -1
  139. package/dist/layout-painter/renderPage.d.mts +15 -6
  140. package/dist/layout-painter/renderPage.d.ts +15 -6
  141. package/dist/layout-painter/renderPage.js +1 -1
  142. package/dist/layout-painter/renderPage.mjs +1 -1
  143. package/dist/managers/AutoSaveManager.d.mts +3 -2
  144. package/dist/managers/AutoSaveManager.d.ts +3 -2
  145. package/dist/managers/TableSelectionManager.d.mts +3 -2
  146. package/dist/managers/TableSelectionManager.d.ts +3 -2
  147. package/dist/managers/types.d.mts +3 -2
  148. package/dist/managers/types.d.ts +3 -2
  149. package/dist/mcp-cli.mjs +23 -23
  150. package/dist/mcp.d.mts +4 -3
  151. package/dist/mcp.d.ts +4 -3
  152. package/dist/mcp.js +3 -3
  153. package/dist/mcp.mjs +2 -2
  154. package/dist/measureBlocksPipeline-BMqbRFQB.d.mts +96 -0
  155. package/dist/measureBlocksPipeline-iYNzAH-o.d.ts +96 -0
  156. package/dist/{nodes-BNkRKBBX.d.ts → nodes-75Q9GBxV.d.ts} +1 -1
  157. package/dist/{nodes-Bz-UHhLE.d.mts → nodes-cEI7hVY2.d.mts} +1 -1
  158. package/dist/prosemirror/applyFormatting.d.mts +67 -0
  159. package/dist/prosemirror/applyFormatting.d.ts +67 -0
  160. package/dist/prosemirror/applyFormatting.js +1 -0
  161. package/dist/prosemirror/applyFormatting.mjs +1 -0
  162. package/dist/prosemirror/commands/formatting.js +1 -1
  163. package/dist/prosemirror/commands/formatting.mjs +1 -1
  164. package/dist/prosemirror/commands/index.d.mts +20 -1
  165. package/dist/prosemirror/commands/index.d.ts +20 -1
  166. package/dist/prosemirror/commands/index.js +1 -1
  167. package/dist/prosemirror/commands/index.mjs +1 -1
  168. package/dist/prosemirror/commands/paragraph.js +1 -1
  169. package/dist/prosemirror/commands/paragraph.mjs +1 -1
  170. package/dist/prosemirror/commentIdAllocator.d.mts +50 -0
  171. package/dist/prosemirror/commentIdAllocator.d.ts +50 -0
  172. package/dist/prosemirror/commentIdAllocator.js +1 -0
  173. package/dist/prosemirror/commentIdAllocator.mjs +1 -0
  174. package/dist/prosemirror/commentOps.d.mts +46 -0
  175. package/dist/prosemirror/commentOps.d.ts +46 -0
  176. package/dist/prosemirror/commentOps.js +1 -0
  177. package/dist/prosemirror/commentOps.mjs +1 -0
  178. package/dist/prosemirror/conversion/fromProseDoc.d.mts +3 -2
  179. package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -2
  180. package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
  181. package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
  182. package/dist/prosemirror/conversion/index.d.mts +3 -2
  183. package/dist/prosemirror/conversion/index.d.ts +3 -2
  184. package/dist/prosemirror/conversion/index.js +1 -1
  185. package/dist/prosemirror/conversion/index.mjs +1 -1
  186. package/dist/prosemirror/editor.css +12 -2
  187. package/dist/prosemirror/extensions/index.js +1 -1
  188. package/dist/prosemirror/extensions/index.mjs +1 -1
  189. package/dist/prosemirror/imageCommit.d.mts +35 -0
  190. package/dist/prosemirror/imageCommit.d.ts +35 -0
  191. package/dist/prosemirror/imageCommit.js +1 -0
  192. package/dist/prosemirror/imageCommit.mjs +1 -0
  193. package/dist/prosemirror/index.d.mts +6 -5
  194. package/dist/prosemirror/index.d.ts +6 -5
  195. package/dist/prosemirror/index.js +2 -2
  196. package/dist/prosemirror/index.mjs +1 -1
  197. package/dist/prosemirror/paraText.d.mts +52 -0
  198. package/dist/prosemirror/paraText.d.ts +52 -0
  199. package/dist/prosemirror/paraText.js +1 -0
  200. package/dist/prosemirror/paraText.mjs +1 -0
  201. package/dist/prosemirror/plugins/index.d.mts +4 -3
  202. package/dist/prosemirror/plugins/index.d.ts +4 -3
  203. package/dist/prosemirror/queries.d.mts +65 -0
  204. package/dist/prosemirror/queries.d.ts +65 -0
  205. package/dist/prosemirror/queries.js +2 -0
  206. package/dist/prosemirror/queries.mjs +2 -0
  207. package/dist/prosemirror/schema/index.d.mts +3 -2
  208. package/dist/prosemirror/schema/index.d.ts +3 -2
  209. package/dist/prosemirror/schema/index.js +1 -1
  210. package/dist/prosemirror/schema/index.mjs +1 -1
  211. package/dist/prosemirror/styles/index.d.mts +1 -1
  212. package/dist/prosemirror/styles/index.d.ts +1 -1
  213. package/dist/prosemirror/tableResize.d.mts +58 -0
  214. package/dist/prosemirror/tableResize.d.ts +58 -0
  215. package/dist/prosemirror/tableResize.js +1 -0
  216. package/dist/prosemirror/tableResize.mjs +1 -0
  217. package/dist/prosemirror/utils/extractTrackedChanges.d.mts +2 -1
  218. package/dist/prosemirror/utils/extractTrackedChanges.d.ts +2 -1
  219. package/dist/{registry-Cpyybgij.d.mts → registry-NLnxX7pq.d.mts} +1 -1
  220. package/dist/{registry-E5pahPKL.d.ts → registry-egK81C_z.d.ts} +1 -1
  221. package/dist/sectionPropertiesSerializer-D86QlzlT.d.mts +59 -0
  222. package/dist/sectionPropertiesSerializer-uXyGONxu.d.ts +59 -0
  223. package/dist/{styles-EI2lxeEN.d.mts → styles-BOJ93SAm.d.mts} +1 -1
  224. package/dist/{styles-BBv7doYK.d.ts → styles-BWqX2AS-.d.ts} +1 -1
  225. package/dist/types/content.d.mts +2 -1
  226. package/dist/types/content.d.ts +2 -1
  227. package/dist/types/content.js +1 -1
  228. package/dist/types/content.mjs +1 -0
  229. package/dist/types/document.d.mts +17 -6
  230. package/dist/types/document.d.ts +17 -6
  231. package/dist/types/document.js +1 -1
  232. package/dist/types/document.mjs +1 -0
  233. package/dist/{types-DXG7vqe9.d.ts → types-DDQWU7-j.d.ts} +1 -1
  234. package/dist/{types-dYdjUZMo.d.mts → types-DTF0N7UE.d.mts} +1 -1
  235. package/dist/utils/autoScroll.d.mts +24 -0
  236. package/dist/utils/autoScroll.d.ts +24 -0
  237. package/dist/utils/autoScroll.js +1 -0
  238. package/dist/utils/autoScroll.mjs +1 -0
  239. package/dist/utils/comments.d.mts +2 -1
  240. package/dist/utils/comments.d.ts +2 -1
  241. package/dist/utils/index.d.mts +5 -4
  242. package/dist/utils/index.d.ts +5 -4
  243. package/dist/{variableDetector-HPZbJ_gw.d.ts → variableDetector-1mxzPfs2.d.ts} +1 -1
  244. package/dist/{variableDetector-C7BLz9sJ.d.mts → variableDetector-CaY-sDau.d.mts} +1 -1
  245. package/dist/watermark-DAcnAs_J.d.mts +77 -0
  246. package/dist/watermark-DAcnAs_J.d.ts +77 -0
  247. package/package.json +73 -1
  248. package/dist/chunk-2EQGBVPV.js +0 -2
  249. package/dist/chunk-44FHVKSI.js +0 -1
  250. package/dist/chunk-44JKHPGF.mjs +0 -2
  251. package/dist/chunk-5M7TI6TV.js +0 -1
  252. package/dist/chunk-6Y6LON6Y.mjs +0 -1
  253. package/dist/chunk-7RDCZLTU.js +0 -1
  254. package/dist/chunk-7ZN4WI5N.mjs +0 -4
  255. package/dist/chunk-CCPBNE2F.mjs +0 -2
  256. package/dist/chunk-DV6GWBUJ.js +0 -2
  257. package/dist/chunk-EQAORQC3.mjs +0 -1
  258. package/dist/chunk-FYKRDDKG.js +0 -1
  259. package/dist/chunk-GUQFNJHE.mjs +0 -1
  260. package/dist/chunk-ICE6NC3S.mjs +0 -1
  261. package/dist/chunk-IFUED5ZS.mjs +0 -1
  262. package/dist/chunk-KGTEBLB6.js +0 -1
  263. package/dist/chunk-KRN6YSR2.mjs +0 -1
  264. package/dist/chunk-L72YAV5N.js +0 -3
  265. package/dist/chunk-LTHT4A4S.js +0 -1
  266. package/dist/chunk-MERJFGEP.mjs +0 -59
  267. package/dist/chunk-MP4QSEO2.mjs +0 -1
  268. package/dist/chunk-PVAVS3IU.js +0 -1
  269. package/dist/chunk-QYF7BRG3.js +0 -2
  270. package/dist/chunk-RKDVY7I3.mjs +0 -1
  271. package/dist/chunk-ROG4MNOR.js +0 -4
  272. package/dist/chunk-SORYYVJ7.js +0 -1
  273. package/dist/chunk-SZIOF5SG.js +0 -59
  274. package/dist/chunk-VMRUBLPI.js +0 -1
  275. package/dist/chunk-WKUHYMDO.mjs +0 -1
  276. package/dist/chunk-WLDI6N3B.mjs +0 -3
  277. package/dist/chunk-WLHNIXWC.mjs +0 -2
  278. package/dist/chunk-YMZ3F2FZ.mjs +0 -1
  279. package/dist/chunk-ZBFNOJGY.js +0 -1
  280. package/dist/documentSerializer-Bghq9rFI.d.mts +0 -36
  281. package/dist/documentSerializer-C4lFC60P.d.ts +0 -36
@@ -6,11 +6,15 @@
6
6
  * @packageDocumentation
7
7
  * @public
8
8
  */
9
- import { WrapTextDirection, TextRun, ParagraphBlock, ParagraphMeasure, FlowBlock, Measure } from '../../layout-engine/types.js';
10
- import '../../content-CYXJ2tfQ.js';
9
+ import { TextRun, ParagraphBlock, ParagraphMeasure } from '../../layout-engine/types.js';
10
+ import { b as FloatingImageZone } from '../../measureBlocksPipeline-iYNzAH-o.js';
11
+ export { F as FloatPageGeometry, a as FloatingExclusionRect, c as FloatingLineSegmentZone, M as MeasureBlockFn, g as getFloatingMargins, m as measureBlocksWithFloats, r as rectsToFloatingZones } from '../../measureBlocksPipeline-iYNzAH-o.js';
12
+ import '../../content-C8fc_tL6.js';
11
13
  import '../../formatting-_OXU8gLB.js';
12
14
  import '../../colors-C3vA7HUU.js';
13
15
  import '../../docx/wrapTypes.js';
16
+ import '../../watermark-DAcnAs_J.js';
17
+ import '../../anchoredObjectPosition-CS-8BfhO.js';
14
18
 
15
19
  /**
16
20
  * Measurement container for text layout
@@ -155,41 +159,6 @@ declare function halfPtToPx(halfPt: number): number;
155
159
  */
156
160
  declare function pxToHalfPt(px: number): number;
157
161
 
158
- interface FloatingExclusionRect {
159
- /** Which side the object is on for simple one-sided wrapping. */
160
- side: 'left' | 'right';
161
- /** X position relative to the content area. */
162
- x: number;
163
- /** Y position relative to the content area. */
164
- y: number;
165
- width: number;
166
- height: number;
167
- distTop: number;
168
- distBottom: number;
169
- distLeft: number;
170
- distRight: number;
171
- wrapText?: WrapTextDirection;
172
- wrapType?: string;
173
- }
174
- interface FloatingImageZone {
175
- leftMargin: number;
176
- rightMargin: number;
177
- topY: number;
178
- bottomY: number;
179
- segments?: FloatingLineSegmentZone[];
180
- }
181
- interface FloatingLineSegmentZone {
182
- leftOffset: number;
183
- availableWidth: number;
184
- }
185
- interface FloatingLineMargins {
186
- leftMargin: number;
187
- rightMargin: number;
188
- segments?: FloatingLineSegmentZone[];
189
- }
190
- declare function rectsToFloatingZones(rects: FloatingExclusionRect[], contentWidth: number): FloatingImageZone[];
191
- declare function getFloatingMargins(lineY: number, lineHeight: number, zones: FloatingImageZone[] | undefined, paragraphYOffset: number): FloatingLineMargins;
192
-
193
162
  /**
194
163
  * Paragraph measurement module
195
164
  *
@@ -247,43 +216,6 @@ declare function measureParagraphs(blocks: ParagraphBlock[], maxWidth: number):
247
216
  */
248
217
  declare function getRunCharWidths(run: TextRun): number[];
249
218
 
250
- /**
251
- * Floating-aware block measurement pipeline.
252
- *
253
- * Pre-scans a block list to extract exclusion zones from anchored images,
254
- * floating tables, and floating text boxes; groups co-located floats so
255
- * their combined exclusion applies starting from the earliest anchor; then
256
- * walks the blocks calling the caller-supplied `measureBlock` with the
257
- * active zones and cumulative Y at each step.
258
- *
259
- * Adapters (React, Vue) provide their own `measureBlock` so they can
260
- * decide e.g. whether to cache paragraph measures. The orchestration,
261
- * extraction, and grouping live here so both adapters stay in lockstep.
262
- *
263
- * @packageDocumentation
264
- * @public
265
- */
266
-
267
- /**
268
- * Block-measurement callback shape passed to {@link measureBlocksWithFloats}.
269
- * Adapters (React, Vue) supply this so they can decide platform-specific
270
- * concerns (e.g. paragraph-measure caching, per-section width) while
271
- * sharing the floating-zone orchestration. This is adapter-author API,
272
- * not end-consumer API.
273
- *
274
- * @public
275
- */
276
- type MeasureBlockFn = (block: FlowBlock, contentWidth: number, floatingZones?: FloatingImageZone[], cumulativeY?: number) => Measure;
277
- /**
278
- * Walk `blocks` and produce one `Measure` per block. Before measuring, this
279
- * extracts floating exclusion zones (images / floating tables / floating
280
- * textboxes), groups overlapping co-located floats, and threads the active
281
- * zones plus cumulative Y into each `measureBlock` call.
282
- *
283
- * @public
284
- */
285
- declare function measureBlocksWithFloats(blocks: FlowBlock[], contentWidth: number | number[], measureBlock: MeasureBlockFn): Measure[];
286
-
287
219
  /**
288
220
  * Measurement Cache
289
221
  *
@@ -374,4 +306,4 @@ declare function clearAllCaches(): void;
374
306
  */
375
307
  declare function getTotalCacheSize(): number;
376
308
 
377
- export { type FloatingExclusionRect, type FloatingImageZone, type FloatingLineSegmentZone, type FontMetrics, type FontStyle, type MeasureBlockFn, type MeasureParagraphOptions, type RunMeasurement, type TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureBlocksWithFloats, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx };
309
+ export { FloatingImageZone, type FontMetrics, type FontStyle, type MeasureParagraphOptions, type RunMeasurement, type TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx };
@@ -1 +1 @@
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
+ 'use strict';var chunkJ3YFJDZD_js=require('../../chunk-J3YFJDZD.js'),chunkRSU4HTC6_js=require('../../chunk-RSU4HTC6.js');require('../../chunk-IMKU4O3P.js'),require('../../chunk-DROCYKAR.js'),require('../../chunk-FIGLFSNR.js'),require('../../chunk-JFZIXFRC.js'),require('../../chunk-3R7QHNI5.js'),require('../../chunk-N3Y5BUKV.js'),require('../../chunk-4Q2IP5FW.js'),require('../../chunk-DC7S76ZX.js');Object.defineProperty(exports,"clearAllCaches",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.B}});Object.defineProperty(exports,"clearFontMetricsCache",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.s}});Object.defineProperty(exports,"clearParagraphMeasureCache",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.y}});Object.defineProperty(exports,"clearTextWidthCache",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.n}});Object.defineProperty(exports,"getCachedFontMetrics",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.q}});Object.defineProperty(exports,"getCachedParagraphMeasure",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.w}});Object.defineProperty(exports,"getCachedTextWidth",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.l}});Object.defineProperty(exports,"getFontCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.u}});Object.defineProperty(exports,"getParagraphCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.A}});Object.defineProperty(exports,"getTextCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.p}});Object.defineProperty(exports,"getTotalCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.C}});Object.defineProperty(exports,"hashParagraphBlock",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.v}});Object.defineProperty(exports,"measureBlocksWithFloats",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.k}});Object.defineProperty(exports,"setCachedFontMetrics",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.r}});Object.defineProperty(exports,"setCachedParagraphMeasure",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.x}});Object.defineProperty(exports,"setCachedTextWidth",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.m}});Object.defineProperty(exports,"setFontCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.t}});Object.defineProperty(exports,"setParagraphCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.z}});Object.defineProperty(exports,"setTextCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.o}});Object.defineProperty(exports,"buildFontString",{enumerable:true,get:function(){return chunkRSU4HTC6_js.g}});Object.defineProperty(exports,"clampFloatingWrapMargins",{enumerable:true,get:function(){return chunkRSU4HTC6_js.y}});Object.defineProperty(exports,"findCharacterAtX",{enumerable:true,get:function(){return chunkRSU4HTC6_js.l}});Object.defineProperty(exports,"getCanvasContext",{enumerable:true,get:function(){return chunkRSU4HTC6_js.e}});Object.defineProperty(exports,"getFloatingMargins",{enumerable:true,get:function(){return chunkRSU4HTC6_js.u}});Object.defineProperty(exports,"getFontMetrics",{enumerable:true,get:function(){return chunkRSU4HTC6_js.h}});Object.defineProperty(exports,"getRunCharWidths",{enumerable:true,get:function(){return chunkRSU4HTC6_js.B}});Object.defineProperty(exports,"getXForCharacter",{enumerable:true,get:function(){return chunkRSU4HTC6_js.m}});Object.defineProperty(exports,"halfPtToPx",{enumerable:true,get:function(){return chunkRSU4HTC6_js.r}});Object.defineProperty(exports,"measureParagraph",{enumerable:true,get:function(){return chunkRSU4HTC6_js.z}});Object.defineProperty(exports,"measureParagraphs",{enumerable:true,get:function(){return chunkRSU4HTC6_js.A}});Object.defineProperty(exports,"measureRun",{enumerable:true,get:function(){return chunkRSU4HTC6_js.k}});Object.defineProperty(exports,"measureText",{enumerable:true,get:function(){return chunkRSU4HTC6_js.j}});Object.defineProperty(exports,"measureTextWidth",{enumerable:true,get:function(){return chunkRSU4HTC6_js.i}});Object.defineProperty(exports,"ptToPx",{enumerable:true,get:function(){return chunkRSU4HTC6_js.p}});Object.defineProperty(exports,"pxToHalfPt",{enumerable:true,get:function(){return chunkRSU4HTC6_js.s}});Object.defineProperty(exports,"pxToPt",{enumerable:true,get:function(){return chunkRSU4HTC6_js.q}});Object.defineProperty(exports,"pxToTwips",{enumerable:true,get:function(){return chunkRSU4HTC6_js.o}});Object.defineProperty(exports,"rectsToFloatingZones",{enumerable:true,get:function(){return chunkRSU4HTC6_js.t}});Object.defineProperty(exports,"resetCanvasContext",{enumerable:true,get:function(){return chunkRSU4HTC6_js.f}});Object.defineProperty(exports,"twipsToPx",{enumerable:true,get:function(){return chunkRSU4HTC6_js.n}});
@@ -1 +1 @@
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
+ 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-55XWETY4.mjs';export{g as buildFontString,y as clampFloatingWrapMargins,l as findCharacterAtX,e as getCanvasContext,u as getFloatingMargins,h as getFontMetrics,B as getRunCharWidths,m as getXForCharacter,r as halfPtToPx,z as measureParagraph,A as measureParagraphs,k as measureRun,j as measureText,i as measureTextWidth,p as ptToPx,s as pxToHalfPt,q as pxToPt,o as pxToTwips,t as rectsToFloatingZones,f as resetCanvasContext,n as twipsToPx}from'../../chunk-JHTURDPX.mjs';import'../../chunk-FCJWLEKT.mjs';import'../../chunk-7E5VBRDL.mjs';import'../../chunk-MOCGHQ4A.mjs';import'../../chunk-QPFJJPIC.mjs';import'../../chunk-3ANZ3252.mjs';import'../../chunk-AMENZY5F.mjs';import'../../chunk-VW22RZ6C.mjs';import'../../chunk-QYUPLKLP.mjs';
@@ -1 +1 @@
1
- 'use strict';var chunkUGV4KRQB_js=require('../chunk-UGV4KRQB.js');require('../chunk-KGTEBLB6.js'),require('../chunk-AMB6Y77B.js'),require('../chunk-SORYYVJ7.js'),require('../chunk-LTHT4A4S.js'),require('../chunk-IMKU4O3P.js'),require('../chunk-DROCYKAR.js'),require('../chunk-ROG4MNOR.js'),require('../chunk-44FHVKSI.js'),require('../chunk-ZBFNOJGY.js'),require('../chunk-C45EFOVP.js'),require('../chunk-ISKTBM4L.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-E4JMCA5X.js'),require('../chunk-HQPWFUP5.js'),require('../chunk-DV6GWBUJ.js'),require('../chunk-VMRUBLPI.js'),require('../chunk-2EQGBVPV.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-WVERBZZU.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-LWH66Q7Q.js'),require('../chunk-TUIEV7Q7.js'),require('../chunk-7HANRHHL.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-GSKMHXHG.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"TABLE_INSERT_EDGE_PROXIMITY",{enumerable:true,get:function(){return chunkUGV4KRQB_js.a}});Object.defineProperty(exports,"TABLE_INSERT_HIDE_DELAY_MS",{enumerable:true,get:function(){return chunkUGV4KRQB_js.b}});Object.defineProperty(exports,"detectTableInsertHover",{enumerable:true,get:function(){return chunkUGV4KRQB_js.c}});
1
+ 'use strict';var chunkDG2CMDSM_js=require('../chunk-DG2CMDSM.js');require('../chunk-QLAIOTQB.js'),require('../chunk-FQS436KN.js'),require('../chunk-J3YFJDZD.js'),require('../chunk-RSU4HTC6.js'),require('../chunk-IMKU4O3P.js'),require('../chunk-DROCYKAR.js'),require('../chunk-LERLET2D.js'),require('../chunk-FIGLFSNR.js'),require('../chunk-BUCOTKYY.js'),require('../chunk-C45EFOVP.js'),require('../chunk-ISKTBM4L.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-RQVHKDXK.js'),require('../chunk-SCK6ZM5V.js'),require('../chunk-Z3LGMBJC.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-WWBNJ7KF.js'),require('../chunk-4RTVLMRZ.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-WVERBZZU.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-LWH66Q7Q.js'),require('../chunk-TUIEV7Q7.js'),require('../chunk-7HANRHHL.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-GSKMHXHG.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"TABLE_INSERT_EDGE_PROXIMITY",{enumerable:true,get:function(){return chunkDG2CMDSM_js.a}});Object.defineProperty(exports,"TABLE_INSERT_HIDE_DELAY_MS",{enumerable:true,get:function(){return chunkDG2CMDSM_js.b}});Object.defineProperty(exports,"detectTableInsertHover",{enumerable:true,get:function(){return chunkDG2CMDSM_js.c}});
@@ -1 +1 @@
1
- export{a as TABLE_INSERT_EDGE_PROXIMITY,b as TABLE_INSERT_HIDE_DELAY_MS,c as detectTableInsertHover}from'../chunk-WKUHYMDO.mjs';import'../chunk-RKDVY7I3.mjs';import'../chunk-KZXZWGFX.mjs';import'../chunk-MP4QSEO2.mjs';import'../chunk-6Y6LON6Y.mjs';import'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-7ZN4WI5N.mjs';import'../chunk-BOOHU5EW.mjs';import'../chunk-EQAORQC3.mjs';import'../chunk-7OW3VCZE.mjs';import'../chunk-LK6I3HMH.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-6ZXL3EIP.mjs';import'../chunk-OEXVWIHW.mjs';import'../chunk-WLHNIXWC.mjs';import'../chunk-ICE6NC3S.mjs';import'../chunk-CCPBNE2F.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-U67MWOPZ.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-2XP6GLA4.mjs';import'../chunk-ZX26QZJ5.mjs';import'../chunk-MJ6XZFVD.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-DI6CRWSW.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-W7CQRQZ6.mjs';import'../chunk-YGWUKRFD.mjs';import'../chunk-B46V5G46.mjs';import'../chunk-55XWETY4.mjs';import'../chunk-JHTURDPX.mjs';import'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-3G44SFHX.mjs';import'../chunk-MOCGHQ4A.mjs';import'../chunk-IUVQJ6PX.mjs';import'../chunk-7OW3VCZE.mjs';import'../chunk-LK6I3HMH.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-GYWTUUXX.mjs';import'../chunk-7CZEZ3UL.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-4GFTMGSV.mjs';import'../chunk-SWBLJF6R.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-U67MWOPZ.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-2XP6GLA4.mjs';import'../chunk-ZX26QZJ5.mjs';import'../chunk-MJ6XZFVD.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -12,11 +12,12 @@
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-EI2lxeEN.mjs';
16
- import { o as NumberFormat } from '../content-CE-ZdMwG.mjs';
15
+ import { T as Theme } from '../styles-BOJ93SAm.mjs';
16
+ import { N as NumberFormat } from '../content-3xF4WDE8.mjs';
17
17
  import '../formatting-BH4hcZiq.mjs';
18
18
  import '../colors-C3vA7HUU.mjs';
19
19
  import '../docx/wrapTypes.mjs';
20
+ import '../watermark-DAcnAs_J.mjs';
20
21
 
21
22
  /**
22
23
  * Shared types and primitive helpers used across toFlowBlocks sub-modules.
@@ -12,11 +12,12 @@
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-BBv7doYK.js';
16
- import { o as NumberFormat } from '../content-CYXJ2tfQ.js';
15
+ import { T as Theme } from '../styles-BWqX2AS-.js';
16
+ import { N as NumberFormat } from '../content-C8fc_tL6.js';
17
17
  import '../formatting-_OXU8gLB.js';
18
18
  import '../colors-C3vA7HUU.js';
19
19
  import '../docx/wrapTypes.js';
20
+ import '../watermark-DAcnAs_J.js';
20
21
 
21
22
  /**
22
23
  * Shared types and primitive helpers used across toFlowBlocks sub-modules.
@@ -1 +1 @@
1
- 'use strict';var chunkAMB6Y77B_js=require('../chunk-AMB6Y77B.js'),chunkIMKU4O3P_js=require('../chunk-IMKU4O3P.js');require('../chunk-DROCYKAR.js'),require('../chunk-ROG4MNOR.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 chunkAMB6Y77B_js.a}});Object.defineProperty(exports,"resolveListTemplate",{enumerable:true,get:function(){return chunkAMB6Y77B_js.b}});Object.defineProperty(exports,"toFlowBlocks",{enumerable:true,get:function(){return chunkAMB6Y77B_js.c}});Object.defineProperty(exports,"resetBlockIdCounter",{enumerable:true,get:function(){return chunkIMKU4O3P_js.d}});
1
+ 'use strict';var chunkFQS436KN_js=require('../chunk-FQS436KN.js'),chunkIMKU4O3P_js=require('../chunk-IMKU4O3P.js');require('../chunk-DROCYKAR.js'),require('../chunk-LERLET2D.js'),require('../chunk-SCK6ZM5V.js'),require('../chunk-Z3LGMBJC.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"convertBorderSpecToLayout",{enumerable:true,get:function(){return chunkFQS436KN_js.a}});Object.defineProperty(exports,"resolveListTemplate",{enumerable:true,get:function(){return chunkFQS436KN_js.b}});Object.defineProperty(exports,"toFlowBlocks",{enumerable:true,get:function(){return chunkFQS436KN_js.c}});Object.defineProperty(exports,"resetBlockIdCounter",{enumerable:true,get:function(){return chunkIMKU4O3P_js.d}});
@@ -1 +1 @@
1
- export{a as convertBorderSpecToLayout,b as resolveListTemplate,c as toFlowBlocks}from'../chunk-KZXZWGFX.mjs';export{d as resetBlockIdCounter}from'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-7ZN4WI5N.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';
1
+ export{a as convertBorderSpecToLayout,b as resolveListTemplate,c as toFlowBlocks}from'../chunk-B46V5G46.mjs';export{d as resetBlockIdCounter}from'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-3G44SFHX.mjs';import'../chunk-7CZEZ3UL.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -12,9 +12,10 @@
12
12
  import { Page, PageMargins, ColumnLayout, Fragment, FlowBlock, Measure, SectionBreakBlock, Layout, TextBoxBlock, TableMeasure, LayoutOptions } from './types.mjs';
13
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, SdtGroup, SectionBreakMeasure, TabAlignment, TabRun, TabStop, TableBlock, TableCell, TableCellMeasure, TableFragment, TableRow, TableRowMeasure, TextBoxFragment, TextBoxMeasure, TextRun, WrapTextDirection, assertExhaustiveFlowBlock } from './types.mjs';
14
14
  export { isFloatingWrapType, isWrapNone, wrapsAroundText } from '../docx/wrapTypes.mjs';
15
- import '../content-CE-ZdMwG.mjs';
15
+ import '../content-3xF4WDE8.mjs';
16
16
  import '../formatting-BH4hcZiq.mjs';
17
17
  import '../colors-C3vA7HUU.mjs';
18
+ import '../watermark-DAcnAs_J.mjs';
18
19
 
19
20
  /**
20
21
  * Paginator - manages page state during layout
@@ -280,11 +281,23 @@ type TextBoxFlowAttrs = Pick<TextBoxBlock, 'displayMode' | 'wrapType'>;
280
281
  * True when a text box participates in float layout — either via the
281
282
  * `float` display mode (CSS-style) or via an OOXML `wrapType` that
282
283
  * positions the box outside paragraph flow (`square`, `tight`, `through`,
283
- * `behind`, `inFront`).
284
+ * `behind`, `inFront`, `topAndBottom`).
285
+ *
286
+ * `topAndBottom` is positioned (it honours its OOXML anchor, e.g. a banner
287
+ * pinned to the top of the page) even though text never wraps beside it —
288
+ * see {@link floatingTextBoxReservesBand}.
284
289
  *
285
290
  * @public
286
291
  */
287
292
  declare function isFloatingTextBoxBlock(block: TextBoxFlowAttrs): boolean;
293
+ /**
294
+ * True when a floating text box reserves a full-width vertical band rather
295
+ * than a side exclusion. `topAndBottom` boxes break the text above and below
296
+ * the box (no text beside it), so surrounding lines flow past the band.
297
+ *
298
+ * @public
299
+ */
300
+ declare function floatingTextBoxReservesBand(block: TextBoxFlowAttrs): boolean;
288
301
  /**
289
302
  * True when a floating text box reserves an exclusion zone that narrows
290
303
  * surrounding text lines. `wrapNone` (`behind` / `inFront`) and
@@ -349,4 +362,4 @@ declare function layoutDocument(blocks: FlowBlock[], measures: Measure[], option
349
362
  */
350
363
  declare function getHeaderRowsHeight(measure: TableMeasure, headerRowCount: number): number;
351
364
 
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 };
365
+ 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, floatingTextBoxReservesBand, floatingTextBoxWrapsText, getEffectiveColumns, getEffectiveMargins, getEffectivePageSize, getHeaderRowsHeight, getMidChainIndices, hasKeepLines, hasPageBreakBefore, isFloatingTextBoxBlock, layoutDocument, scheduleSectionBreak };
@@ -12,9 +12,10 @@
12
12
  import { Page, PageMargins, ColumnLayout, Fragment, FlowBlock, Measure, SectionBreakBlock, Layout, TextBoxBlock, TableMeasure, LayoutOptions } from './types.js';
13
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, SdtGroup, SectionBreakMeasure, TabAlignment, TabRun, TabStop, TableBlock, TableCell, TableCellMeasure, TableFragment, TableRow, TableRowMeasure, TextBoxFragment, TextBoxMeasure, TextRun, WrapTextDirection, assertExhaustiveFlowBlock } from './types.js';
14
14
  export { isFloatingWrapType, isWrapNone, wrapsAroundText } from '../docx/wrapTypes.js';
15
- import '../content-CYXJ2tfQ.js';
15
+ import '../content-C8fc_tL6.js';
16
16
  import '../formatting-_OXU8gLB.js';
17
17
  import '../colors-C3vA7HUU.js';
18
+ import '../watermark-DAcnAs_J.js';
18
19
 
19
20
  /**
20
21
  * Paginator - manages page state during layout
@@ -280,11 +281,23 @@ type TextBoxFlowAttrs = Pick<TextBoxBlock, 'displayMode' | 'wrapType'>;
280
281
  * True when a text box participates in float layout — either via the
281
282
  * `float` display mode (CSS-style) or via an OOXML `wrapType` that
282
283
  * positions the box outside paragraph flow (`square`, `tight`, `through`,
283
- * `behind`, `inFront`).
284
+ * `behind`, `inFront`, `topAndBottom`).
285
+ *
286
+ * `topAndBottom` is positioned (it honours its OOXML anchor, e.g. a banner
287
+ * pinned to the top of the page) even though text never wraps beside it —
288
+ * see {@link floatingTextBoxReservesBand}.
284
289
  *
285
290
  * @public
286
291
  */
287
292
  declare function isFloatingTextBoxBlock(block: TextBoxFlowAttrs): boolean;
293
+ /**
294
+ * True when a floating text box reserves a full-width vertical band rather
295
+ * than a side exclusion. `topAndBottom` boxes break the text above and below
296
+ * the box (no text beside it), so surrounding lines flow past the band.
297
+ *
298
+ * @public
299
+ */
300
+ declare function floatingTextBoxReservesBand(block: TextBoxFlowAttrs): boolean;
288
301
  /**
289
302
  * True when a floating text box reserves an exclusion zone that narrows
290
303
  * surrounding text lines. `wrapNone` (`behind` / `inFront`) and
@@ -349,4 +362,4 @@ declare function layoutDocument(blocks: FlowBlock[], measures: Measure[], option
349
362
  */
350
363
  declare function getHeaderRowsHeight(measure: TableMeasure, headerRowCount: number): number;
351
364
 
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 };
365
+ 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, floatingTextBoxReservesBand, floatingTextBoxWrapsText, getEffectiveColumns, getEffectiveMargins, getEffectivePageSize, getHeaderRowsHeight, getMidChainIndices, hasKeepLines, hasPageBreakBefore, isFloatingTextBoxBlock, layoutDocument, scheduleSectionBreak };
@@ -1 +1 @@
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
+ 'use strict';var chunkRSU4HTC6_js=require('../chunk-RSU4HTC6.js');require('../chunk-IMKU4O3P.js');var chunkDROCYKAR_js=require('../chunk-DROCYKAR.js');require('../chunk-FIGLFSNR.js');var chunkJFZIXFRC_js=require('../chunk-JFZIXFRC.js');require('../chunk-3R7QHNI5.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"applyPendingToActive",{enumerable:true,get:function(){return chunkRSU4HTC6_js.O}});Object.defineProperty(exports,"calculateChainHeight",{enumerable:true,get:function(){return chunkRSU4HTC6_js.E}});Object.defineProperty(exports,"collectSectionConfigs",{enumerable:true,get:function(){return chunkRSU4HTC6_js.T}});Object.defineProperty(exports,"computeKeepNextChains",{enumerable:true,get:function(){return chunkRSU4HTC6_js.D}});Object.defineProperty(exports,"createInitialSectionState",{enumerable:true,get:function(){return chunkRSU4HTC6_js.M}});Object.defineProperty(exports,"createPaginator",{enumerable:true,get:function(){return chunkRSU4HTC6_js.C}});Object.defineProperty(exports,"findPageIndexContainingPmPos",{enumerable:true,get:function(){return chunkRSU4HTC6_js.S}});Object.defineProperty(exports,"floatingTextBoxReservesBand",{enumerable:true,get:function(){return chunkRSU4HTC6_js.J}});Object.defineProperty(exports,"floatingTextBoxWrapsText",{enumerable:true,get:function(){return chunkRSU4HTC6_js.K}});Object.defineProperty(exports,"getEffectiveColumns",{enumerable:true,get:function(){return chunkRSU4HTC6_js.R}});Object.defineProperty(exports,"getEffectiveMargins",{enumerable:true,get:function(){return chunkRSU4HTC6_js.P}});Object.defineProperty(exports,"getEffectivePageSize",{enumerable:true,get:function(){return chunkRSU4HTC6_js.Q}});Object.defineProperty(exports,"getHeaderRowsHeight",{enumerable:true,get:function(){return chunkRSU4HTC6_js.V}});Object.defineProperty(exports,"getMidChainIndices",{enumerable:true,get:function(){return chunkRSU4HTC6_js.F}});Object.defineProperty(exports,"hasKeepLines",{enumerable:true,get:function(){return chunkRSU4HTC6_js.G}});Object.defineProperty(exports,"hasPageBreakBefore",{enumerable:true,get:function(){return chunkRSU4HTC6_js.H}});Object.defineProperty(exports,"isFloatingTextBoxBlock",{enumerable:true,get:function(){return chunkRSU4HTC6_js.I}});Object.defineProperty(exports,"layoutDocument",{enumerable:true,get:function(){return chunkRSU4HTC6_js.U}});Object.defineProperty(exports,"scheduleSectionBreak",{enumerable:true,get:function(){return chunkRSU4HTC6_js.N}});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{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
+ export{O as applyPendingToActive,E as calculateChainHeight,T as collectSectionConfigs,D as computeKeepNextChains,M as createInitialSectionState,C as createPaginator,S as findPageIndexContainingPmPos,J as floatingTextBoxReservesBand,K as floatingTextBoxWrapsText,R as getEffectiveColumns,P as getEffectiveMargins,Q as getEffectivePageSize,V as getHeaderRowsHeight,F as getMidChainIndices,G as hasKeepLines,H as hasPageBreakBefore,I as isFloatingTextBoxBlock,U as layoutDocument,N as scheduleSectionBreak}from'../chunk-JHTURDPX.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-MOCGHQ4A.mjs';export{a as isFloatingWrapType,b as isWrapNone,c as wrapsAroundText}from'../chunk-QPFJJPIC.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -6,10 +6,11 @@
6
6
  * @packageDocumentation
7
7
  * @public
8
8
  */
9
- import { m as RevisionInfo, n as CellMarker } from '../content-CE-ZdMwG.mjs';
9
+ import { R as RevisionInfo, C as CellMarker } from '../content-3xF4WDE8.mjs';
10
10
  import '../formatting-BH4hcZiq.mjs';
11
11
  import '../colors-C3vA7HUU.mjs';
12
12
  import '../docx/wrapTypes.mjs';
13
+ import '../watermark-DAcnAs_J.mjs';
13
14
 
14
15
  /**
15
16
  * Layout Engine Types
@@ -419,6 +420,12 @@ type TableRow = {
419
420
  height?: number;
420
421
  heightRule?: 'auto' | 'atLeast' | 'exact';
421
422
  isHeader?: boolean;
423
+ /**
424
+ * `w:cantSplit` (§17.4.6): the row may not break across a page boundary.
425
+ * The layout engine keeps such a row whole, moving it wholesale to the next
426
+ * page rather than splitting its content.
427
+ */
428
+ cantSplit?: boolean;
422
429
  /** Tracked row ins / del (`<w:trPr><w:ins/>` / `<w:del/>`). */
423
430
  trackedIns?: RevisionInfo;
424
431
  /** see trackedIns */ trackedDel?: RevisionInfo;
@@ -789,6 +796,20 @@ type TableFragment = FragmentBase & {
789
796
  continuesOnNext?: boolean;
790
797
  /** Number of header rows prepended to this continuation fragment (0 or undefined for first fragment). */
791
798
  headerRowCount?: number;
799
+ /**
800
+ * Pixels to skip from the top of `fromRow`. Non-zero when this fragment's
801
+ * first row is the continuation of a row that broke across a page boundary
802
+ * (Word's "allow row to break across pages"). The painter renders the row
803
+ * shifted up by this amount so the already-shown top slice is clipped.
804
+ */
805
+ topClip?: number;
806
+ /**
807
+ * Visible height (px) measured from the top of the LAST row (`toRow - 1`).
808
+ * Set when that row breaks mid-content onto the next page; `undefined`
809
+ * means the last row is fully visible. When `fromRow === toRow - 1`, the
810
+ * visible band of that single row is `[topClip, bottomClip)`.
811
+ */
812
+ bottomClip?: number;
792
813
  };
793
814
  /**
794
815
  * An image fragment positioned on a page.
@@ -6,10 +6,11 @@
6
6
  * @packageDocumentation
7
7
  * @public
8
8
  */
9
- import { m as RevisionInfo, n as CellMarker } from '../content-CYXJ2tfQ.js';
9
+ import { R as RevisionInfo, C as CellMarker } from '../content-C8fc_tL6.js';
10
10
  import '../formatting-_OXU8gLB.js';
11
11
  import '../colors-C3vA7HUU.js';
12
12
  import '../docx/wrapTypes.js';
13
+ import '../watermark-DAcnAs_J.js';
13
14
 
14
15
  /**
15
16
  * Layout Engine Types
@@ -419,6 +420,12 @@ type TableRow = {
419
420
  height?: number;
420
421
  heightRule?: 'auto' | 'atLeast' | 'exact';
421
422
  isHeader?: boolean;
423
+ /**
424
+ * `w:cantSplit` (§17.4.6): the row may not break across a page boundary.
425
+ * The layout engine keeps such a row whole, moving it wholesale to the next
426
+ * page rather than splitting its content.
427
+ */
428
+ cantSplit?: boolean;
422
429
  /** Tracked row ins / del (`<w:trPr><w:ins/>` / `<w:del/>`). */
423
430
  trackedIns?: RevisionInfo;
424
431
  /** see trackedIns */ trackedDel?: RevisionInfo;
@@ -789,6 +796,20 @@ type TableFragment = FragmentBase & {
789
796
  continuesOnNext?: boolean;
790
797
  /** Number of header rows prepended to this continuation fragment (0 or undefined for first fragment). */
791
798
  headerRowCount?: number;
799
+ /**
800
+ * Pixels to skip from the top of `fromRow`. Non-zero when this fragment's
801
+ * first row is the continuation of a row that broke across a page boundary
802
+ * (Word's "allow row to break across pages"). The painter renders the row
803
+ * shifted up by this amount so the already-shown top slice is clipped.
804
+ */
805
+ topClip?: number;
806
+ /**
807
+ * Visible height (px) measured from the top of the LAST row (`toRow - 1`).
808
+ * Set when that row breaks mid-content onto the next page; `undefined`
809
+ * means the last row is fully visible. When `fromRow === toRow - 1`, the
810
+ * visible band of that single row is `[topClip, bottomClip)`.
811
+ */
812
+ bottomClip?: number;
792
813
  };
793
814
  /**
794
815
  * An image fragment positioned on a page.
@@ -11,13 +11,15 @@
11
11
  * @public
12
12
  */
13
13
  import '../layout-engine/types.mjs';
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 applySdtFocus, i as captureInlinePositionEmu, j as createPainter, k as deriveLayoutChoice, l as enclosingSdtGroupIds, m as findImageElement, n as hitTestImage, isFloatingImageRun, o as isImageLayoutOptionEnabled, isTextWrappingFloatingImageRun, renderAllPagesNow, r as renderFragment, p as renderImageFragment, q as renderLine, renderPage, renderPages, s as renderParagraphFragment, t as renderTableFragment, u as renderTextBoxFragment, v as sliceRunsForLine, w as toolbarValueToLayoutTarget } from './renderPage.mjs';
15
- export { F as FootnoteRenderItem, H as HeaderFooterContent } from '../footnotes-lCH_P3N3.mjs';
16
- import '../content-CE-ZdMwG.mjs';
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 applySdtFocus, i as buildBlockLookup, j as captureInlinePositionEmu, k as createPainter, l as deriveLayoutChoice, m as enclosingSdtGroupIds, n as findImageElement, o as hitTestImage, isFloatingImageRun, p as isImageLayoutOptionEnabled, isTextWrappingFloatingImageRun, renderAllPagesNow, r as renderFragment, q as renderImageFragment, s as renderLine, renderPage, renderPages, t as renderParagraphFragment, u as renderTableFragment, v as renderTextBoxFragment, w as sliceRunsForLine, x as toolbarValueToLayoutTarget } from './renderPage.mjs';
15
+ export { P as PageGeometry, p as pageGeometryFromPage, r as resolveAnchoredObjectPosition, a as resolveAnchoredObjectVerticalTop } from '../anchoredObjectPosition-KJEyF-wr.mjs';
16
+ export { F as FootnoteRenderItem, H as HeaderFooterContent } from '../footnotes-BZ24OTAT.mjs';
17
+ import '../content-3xF4WDE8.mjs';
17
18
  import '../formatting-BH4hcZiq.mjs';
18
19
  import '../colors-C3vA7HUU.mjs';
19
20
  import '../docx/wrapTypes.mjs';
21
+ import '../watermark-DAcnAs_J.mjs';
20
22
  import 'prosemirror-model';
21
- import '../nodes-Bz-UHhLE.mjs';
23
+ import '../nodes-cEI7hVY2.mjs';
22
24
  import '../ImageExtension-BN327PNe.mjs';
23
- import '../styles-EI2lxeEN.mjs';
25
+ import '../styles-BOJ93SAm.mjs';
@@ -11,13 +11,15 @@
11
11
  * @public
12
12
  */
13
13
  import '../layout-engine/types.js';
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 applySdtFocus, i as captureInlinePositionEmu, j as createPainter, k as deriveLayoutChoice, l as enclosingSdtGroupIds, m as findImageElement, n as hitTestImage, isFloatingImageRun, o as isImageLayoutOptionEnabled, isTextWrappingFloatingImageRun, renderAllPagesNow, r as renderFragment, p as renderImageFragment, q as renderLine, renderPage, renderPages, s as renderParagraphFragment, t as renderTableFragment, u as renderTextBoxFragment, v as sliceRunsForLine, w as toolbarValueToLayoutTarget } from './renderPage.js';
15
- export { F as FootnoteRenderItem, H as HeaderFooterContent } from '../footnotes-skVvEHvZ.js';
16
- import '../content-CYXJ2tfQ.js';
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 applySdtFocus, i as buildBlockLookup, j as captureInlinePositionEmu, k as createPainter, l as deriveLayoutChoice, m as enclosingSdtGroupIds, n as findImageElement, o as hitTestImage, isFloatingImageRun, p as isImageLayoutOptionEnabled, isTextWrappingFloatingImageRun, renderAllPagesNow, r as renderFragment, q as renderImageFragment, s as renderLine, renderPage, renderPages, t as renderParagraphFragment, u as renderTableFragment, v as renderTextBoxFragment, w as sliceRunsForLine, x as toolbarValueToLayoutTarget } from './renderPage.js';
15
+ export { P as PageGeometry, p as pageGeometryFromPage, r as resolveAnchoredObjectPosition, a as resolveAnchoredObjectVerticalTop } from '../anchoredObjectPosition-CS-8BfhO.js';
16
+ export { F as FootnoteRenderItem, H as HeaderFooterContent } from '../footnotes-DMsicPGd.js';
17
+ import '../content-C8fc_tL6.js';
17
18
  import '../formatting-_OXU8gLB.js';
18
19
  import '../colors-C3vA7HUU.js';
19
20
  import '../docx/wrapTypes.js';
21
+ import '../watermark-DAcnAs_J.js';
20
22
  import 'prosemirror-model';
21
- import '../nodes-BNkRKBBX.js';
23
+ import '../nodes-75Q9GBxV.js';
22
24
  import '../ImageExtension-BlI5afZD.js';
23
- import '../styles-BBv7doYK.js';
25
+ import '../styles-BWqX2AS-.js';
@@ -1 +1 @@
1
- 'use strict';var chunkKGTEBLB6_js=require('../chunk-KGTEBLB6.js');require('../chunk-AMB6Y77B.js');var chunkSORYYVJ7_js=require('../chunk-SORYYVJ7.js');require('../chunk-LTHT4A4S.js'),require('../chunk-IMKU4O3P.js'),require('../chunk-DROCYKAR.js'),require('../chunk-ROG4MNOR.js'),require('../chunk-44FHVKSI.js'),require('../chunk-ZBFNOJGY.js'),require('../chunk-C45EFOVP.js'),require('../chunk-ISKTBM4L.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-E4JMCA5X.js'),require('../chunk-HQPWFUP5.js'),require('../chunk-DV6GWBUJ.js'),require('../chunk-VMRUBLPI.js'),require('../chunk-2EQGBVPV.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-WVERBZZU.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-LWH66Q7Q.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-GSKMHXHG.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 C(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 H(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 R(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 A(n,e){return n==="inline"?"inline":n==="behind"?"behind":n==="inFront"?"inFront":n==="square"||n==="tight"||n==="through"?e==="right"?"squareRight":"squareLeft":null}var O=[{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 N(n,e){return true}function _(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 chunkKGTEBLB6_js.t(e,a,r,o,{document:this.doc})}if(e.kind==="table"&&t){let a=t.block,r=t.measure;return chunkKGTEBLB6_js.w(e,a,r,o,{document:this.doc})}if(e.kind==="image"&&t){let a=t.block,r=t.measure;return chunkKGTEBLB6_js.q(e,a,r,o,{document:this.doc})}if(e.kind==="textBox"&&t){let a=t.block,r=t.measure;return chunkKGTEBLB6_js.y(e,a,r,o,{document:this.doc})}return chunkKGTEBLB6_js.o(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 z(n){return new c(n)}Object.defineProperty(exports,"FRAGMENT_CLASS_NAMES",{enumerable:true,get:function(){return chunkKGTEBLB6_js.n}});Object.defineProperty(exports,"IMAGE_CLASS_NAMES",{enumerable:true,get:function(){return chunkKGTEBLB6_js.p}});Object.defineProperty(exports,"TABLE_CLASS_NAMES",{enumerable:true,get:function(){return chunkKGTEBLB6_js.v}});Object.defineProperty(exports,"TEXTBOX_CLASS_NAMES",{enumerable:true,get:function(){return chunkKGTEBLB6_js.x}});Object.defineProperty(exports,"applySdtFocus",{enumerable:true,get:function(){return chunkKGTEBLB6_js.m}});Object.defineProperty(exports,"enclosingSdtGroupIds",{enumerable:true,get:function(){return chunkKGTEBLB6_js.l}});Object.defineProperty(exports,"renderAllPagesNow",{enumerable:true,get:function(){return chunkKGTEBLB6_js.B}});Object.defineProperty(exports,"renderFragment",{enumerable:true,get:function(){return chunkKGTEBLB6_js.o}});Object.defineProperty(exports,"renderImageFragment",{enumerable:true,get:function(){return chunkKGTEBLB6_js.q}});Object.defineProperty(exports,"renderLine",{enumerable:true,get:function(){return chunkKGTEBLB6_js.s}});Object.defineProperty(exports,"renderPage",{enumerable:true,get:function(){return chunkKGTEBLB6_js.E}});Object.defineProperty(exports,"renderPages",{enumerable:true,get:function(){return chunkKGTEBLB6_js.A}});Object.defineProperty(exports,"renderParagraphFragment",{enumerable:true,get:function(){return chunkKGTEBLB6_js.t}});Object.defineProperty(exports,"renderTableFragment",{enumerable:true,get:function(){return chunkKGTEBLB6_js.w}});Object.defineProperty(exports,"renderTextBoxFragment",{enumerable:true,get:function(){return chunkKGTEBLB6_js.y}});Object.defineProperty(exports,"sliceRunsForLine",{enumerable:true,get:function(){return chunkKGTEBLB6_js.r}});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=O;exports.LAYOUT_IMAGE_CLASSES=i;exports.LayoutPainter=c;exports.captureInlinePositionEmu=R;exports.createPainter=z;exports.deriveLayoutChoice=A;exports.findImageElement=H;exports.hitTestImage=C;exports.isImageLayoutOptionEnabled=N;exports.toolbarValueToLayoutTarget=_;
1
+ 'use strict';var chunkYPKIQMPR_js=require('../chunk-YPKIQMPR.js'),chunkQLAIOTQB_js=require('../chunk-QLAIOTQB.js');require('../chunk-FQS436KN.js');var chunkJ3YFJDZD_js=require('../chunk-J3YFJDZD.js');require('../chunk-RSU4HTC6.js'),require('../chunk-IMKU4O3P.js'),require('../chunk-DROCYKAR.js'),require('../chunk-LERLET2D.js'),require('../chunk-FIGLFSNR.js'),require('../chunk-BUCOTKYY.js'),require('../chunk-C45EFOVP.js'),require('../chunk-ISKTBM4L.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-RQVHKDXK.js'),require('../chunk-SCK6ZM5V.js'),require('../chunk-Z3LGMBJC.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-WWBNJ7KF.js'),require('../chunk-4RTVLMRZ.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-WVERBZZU.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-LWH66Q7Q.js'),require('../chunk-TUIEV7Q7.js'),require('../chunk-7HANRHHL.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-GSKMHXHG.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"IMAGE_LAYOUT_OPTIONS",{enumerable:true,get:function(){return chunkYPKIQMPR_js.f}});Object.defineProperty(exports,"LAYOUT_IMAGE_CLASSES",{enumerable:true,get:function(){return chunkYPKIQMPR_js.a}});Object.defineProperty(exports,"LayoutPainter",{enumerable:true,get:function(){return chunkYPKIQMPR_js.j}});Object.defineProperty(exports,"buildBlockLookup",{enumerable:true,get:function(){return chunkYPKIQMPR_js.i}});Object.defineProperty(exports,"captureInlinePositionEmu",{enumerable:true,get:function(){return chunkYPKIQMPR_js.d}});Object.defineProperty(exports,"createPainter",{enumerable:true,get:function(){return chunkYPKIQMPR_js.k}});Object.defineProperty(exports,"deriveLayoutChoice",{enumerable:true,get:function(){return chunkYPKIQMPR_js.e}});Object.defineProperty(exports,"findImageElement",{enumerable:true,get:function(){return chunkYPKIQMPR_js.c}});Object.defineProperty(exports,"hitTestImage",{enumerable:true,get:function(){return chunkYPKIQMPR_js.b}});Object.defineProperty(exports,"isImageLayoutOptionEnabled",{enumerable:true,get:function(){return chunkYPKIQMPR_js.g}});Object.defineProperty(exports,"toolbarValueToLayoutTarget",{enumerable:true,get:function(){return chunkYPKIQMPR_js.h}});Object.defineProperty(exports,"FRAGMENT_CLASS_NAMES",{enumerable:true,get:function(){return chunkQLAIOTQB_js.n}});Object.defineProperty(exports,"IMAGE_CLASS_NAMES",{enumerable:true,get:function(){return chunkQLAIOTQB_js.p}});Object.defineProperty(exports,"TABLE_CLASS_NAMES",{enumerable:true,get:function(){return chunkQLAIOTQB_js.v}});Object.defineProperty(exports,"TEXTBOX_CLASS_NAMES",{enumerable:true,get:function(){return chunkQLAIOTQB_js.x}});Object.defineProperty(exports,"applySdtFocus",{enumerable:true,get:function(){return chunkQLAIOTQB_js.m}});Object.defineProperty(exports,"enclosingSdtGroupIds",{enumerable:true,get:function(){return chunkQLAIOTQB_js.l}});Object.defineProperty(exports,"renderAllPagesNow",{enumerable:true,get:function(){return chunkQLAIOTQB_js.C}});Object.defineProperty(exports,"renderFragment",{enumerable:true,get:function(){return chunkQLAIOTQB_js.o}});Object.defineProperty(exports,"renderImageFragment",{enumerable:true,get:function(){return chunkQLAIOTQB_js.q}});Object.defineProperty(exports,"renderLine",{enumerable:true,get:function(){return chunkQLAIOTQB_js.s}});Object.defineProperty(exports,"renderPage",{enumerable:true,get:function(){return chunkQLAIOTQB_js.F}});Object.defineProperty(exports,"renderPages",{enumerable:true,get:function(){return chunkQLAIOTQB_js.B}});Object.defineProperty(exports,"renderParagraphFragment",{enumerable:true,get:function(){return chunkQLAIOTQB_js.t}});Object.defineProperty(exports,"renderTableFragment",{enumerable:true,get:function(){return chunkQLAIOTQB_js.w}});Object.defineProperty(exports,"renderTextBoxFragment",{enumerable:true,get:function(){return chunkQLAIOTQB_js.y}});Object.defineProperty(exports,"sliceRunsForLine",{enumerable:true,get:function(){return chunkQLAIOTQB_js.r}});Object.defineProperty(exports,"isFloatingImageRun",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.c}});Object.defineProperty(exports,"isTextWrappingFloatingImageRun",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.d}});Object.defineProperty(exports,"pageGeometryFromPage",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.f}});Object.defineProperty(exports,"resolveAnchoredObjectPosition",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.g}});Object.defineProperty(exports,"resolveAnchoredObjectVerticalTop",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.h}});
@@ -1 +1 @@
1
- import {t,w,q,y as y$1,o}from'../chunk-RKDVY7I3.mjs';export{n as FRAGMENT_CLASS_NAMES,p as IMAGE_CLASS_NAMES,v as TABLE_CLASS_NAMES,x as TEXTBOX_CLASS_NAMES,m as applySdtFocus,l as enclosingSdtGroupIds,B as renderAllPagesNow,o as renderFragment,q as renderImageFragment,s as renderLine,E as renderPage,A as renderPages,t as renderParagraphFragment,w as renderTableFragment,y as renderTextBoxFragment,r as sliceRunsForLine}from'../chunk-RKDVY7I3.mjs';import'../chunk-KZXZWGFX.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-7ZN4WI5N.mjs';import'../chunk-BOOHU5EW.mjs';import'../chunk-EQAORQC3.mjs';import'../chunk-7OW3VCZE.mjs';import'../chunk-LK6I3HMH.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-6ZXL3EIP.mjs';import'../chunk-OEXVWIHW.mjs';import'../chunk-WLHNIXWC.mjs';import'../chunk-ICE6NC3S.mjs';import'../chunk-CCPBNE2F.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-U67MWOPZ.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-2XP6GLA4.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-DI6CRWSW.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 C(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 H(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 R(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 A(n,e){return n==="inline"?"inline":n==="behind"?"behind":n==="inFront"?"inFront":n==="square"||n==="tight"||n==="through"?e==="right"?"squareRight":"squareLeft":null}var O=[{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 N(n,e){return true}function _(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$1=this.blockLookup.get(String(e.blockId));if(e.kind==="paragraph"&&t$1){let a=t$1.block,r=t$1.measure;return t(e,a,r,o$1,{document:this.doc})}if(e.kind==="table"&&t$1){let a=t$1.block,r=t$1.measure;return w(e,a,r,o$1,{document:this.doc})}if(e.kind==="image"&&t$1){let a=t$1.block,r=t$1.measure;return q(e,a,r,o$1,{document:this.doc})}if(e.kind==="textBox"&&t$1){let a=t$1.block,r=t$1.measure;return y$1(e,a,r,o$1,{document:this.doc})}return o(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 z(n){return new c(n)}export{O as IMAGE_LAYOUT_OPTIONS,i as LAYOUT_IMAGE_CLASSES,c as LayoutPainter,R as captureInlinePositionEmu,z as createPainter,A as deriveLayoutChoice,H as findImageElement,C as hitTestImage,N as isImageLayoutOptionEnabled,_ as toolbarValueToLayoutTarget};
1
+ export{f as IMAGE_LAYOUT_OPTIONS,a as LAYOUT_IMAGE_CLASSES,j as LayoutPainter,i as buildBlockLookup,d as captureInlinePositionEmu,k as createPainter,e as deriveLayoutChoice,c as findImageElement,b as hitTestImage,g as isImageLayoutOptionEnabled,h as toolbarValueToLayoutTarget}from'../chunk-DE2V4X3B.mjs';export{n as FRAGMENT_CLASS_NAMES,p as IMAGE_CLASS_NAMES,v as TABLE_CLASS_NAMES,x as TEXTBOX_CLASS_NAMES,m as applySdtFocus,l as enclosingSdtGroupIds,C as renderAllPagesNow,o as renderFragment,q as renderImageFragment,s as renderLine,F as renderPage,B as renderPages,t as renderParagraphFragment,w as renderTableFragment,y as renderTextBoxFragment,r as sliceRunsForLine}from'../chunk-YGWUKRFD.mjs';import'../chunk-B46V5G46.mjs';export{c as isFloatingImageRun,d as isTextWrappingFloatingImageRun,f as pageGeometryFromPage,g as resolveAnchoredObjectPosition,h as resolveAnchoredObjectVerticalTop}from'../chunk-55XWETY4.mjs';import'../chunk-JHTURDPX.mjs';import'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-3G44SFHX.mjs';import'../chunk-MOCGHQ4A.mjs';import'../chunk-IUVQJ6PX.mjs';import'../chunk-7OW3VCZE.mjs';import'../chunk-LK6I3HMH.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-GYWTUUXX.mjs';import'../chunk-7CZEZ3UL.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-4GFTMGSV.mjs';import'../chunk-SWBLJF6R.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-U67MWOPZ.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-2XP6GLA4.mjs';import'../chunk-ZX26QZJ5.mjs';import'../chunk-MJ6XZFVD.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-QYUPLKLP.mjs';