@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
@@ -1 +1 @@
1
- export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'../chunk-KRN6YSR2.mjs';export{s as createDocx,h as repackDocx,l as updateMultipleFiles}from'../chunk-MERJFGEP.mjs';import'../chunk-WLDI6N3B.mjs';export{b as formatNumber,d as getBulletCharacter,e as isBulletLevel,f as parseDocx,a as parseNumbering,c as renderListMarker}from'../chunk-44JKHPGF.mjs';import {E}from'../chunk-7ZN4WI5N.mjs';export{y as getEndnoteText,x as getFootnoteText,L as getHyperlinkRuns,G as getHyperlinkText,J as getHyperlinkUrl,j as getTableColumnCount,k as getTableRowCount,K as hasContent,n as hasHeaderRow,l as isCellMergeContinuation,m as isCellMergeStart,H as isExternalLink,I as isInternalLink,A as isSeparatorEndnote,z as isSeparatorFootnote,d as parseBorderSpec,f as parseCellMargins,w as parseEndnoteProperties,u as parseEndnotes,i as parseFloatingTableProperties,v as parseFootnoteProperties,t as parseFootnotes,F as parseHyperlink,g as parseShading,e as parseTableBorders,h as parseTableLook,c as parseTableMeasurement,o as parseTableProperties,M as resolveHyperlinkUrl}from'../chunk-7ZN4WI5N.mjs';import'../chunk-BOOHU5EW.mjs';import'../chunk-7LRR7RKE.mjs';import {c,d,e as e$1,b,a}from'../chunk-6ZXL3EIP.mjs';export{f as extractTextBoxContentElements,F as getImageHeightPx,E as getImageWidthPx,k as getTextBoxContentElement,o as getTextBoxDimensionsPx,n as getTextBoxHeightPx,p as getTextBoxMarginsPx,x as getTextBoxOutlineWidthPx,u as getTextBoxText,m as getTextBoxWidthPx,H as getWrapDistancesPx,t as hasTextBoxContent,r as hasTextBoxFill,s as hasTextBoxOutline,C as isBehindText,G as isDecorativeImage,B as isFloatingImage,q as isFloatingTextBox,D as isInFrontOfText,A as isInlineImage,i as isShapeTextBox,h as isTextBoxDrawing,y as parseDrawing,z as parseImage,j as parseTextBox,g as parseTextBoxContent,l as parseTextBoxFromShape,v as resolveTextBoxFillColor,w as resolveTextBoxOutlineColor}from'../chunk-6ZXL3EIP.mjs';import'../chunk-OEXVWIHW.mjs';import {j,f,i,h,l,e as e$2,g}from'../chunk-WLHNIXWC.mjs';import'../chunk-LE67NTCN.mjs';import {e}from'../chunk-VW22RZ6C.mjs';export{e as emuToPixels,f as pixelsToEmu}from'../chunk-VW22RZ6C.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-QYUPLKLP.mjs';var M=["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE"];function I(e){if(!e)return "UNKNOWN";let n=e.trim().match(/^\\?([A-Z][A-Z0-9]*)/i);if(!n)return "UNKNOWN";let o=n[1].toUpperCase();return M.includes(o)?o:"UNKNOWN"}function at(e){return M.includes(e)}function st(e){let t=I(e),n=e.trim(),o=[],r=n.match(/^\\?([A-Z][A-Z0-9]*)/i),i=r?r[0].length:0,a=n.substring(i).trim(),s=/\\(\*|@|#|!|[a-z])\s*(?:"([^"]*)"|([\S]*))?/gi,l,u=[];for(;(l=s.exec(a))!==null;){let p={switch:l[1]};l[2]?p.value=l[2]:l[3]&&(p.value=l[3]),o.push(p),u.push({start:l.index,end:l.index+l[0].length});}let c;if(a.length>0){let p=u.length>0?u[0].start:a.length,m=a.substring(0,p).trim();m.startsWith('"')&&m.endsWith('"')?c=m.slice(1,-1):m&&(c=m);}return {type:t,raw:e,argument:c,switches:o}}function pt(e){return e.switches.find(n=>n.switch==="*"||n.switch==="@")?.value}function ct(e){return e.switches.find(n=>n.switch==="*")?.value?.toUpperCase()==="MERGEFORMAT"}function ut(e,t,n){let o=j(e,"w","instr")??"",r=I(o),i={type:"simpleField",instruction:o,fieldType:r,content:[]},a=j(e,"w","fldLock");(a==="1"||a==="true")&&(i.fldLock=true);let s=j(e,"w","dirty");(s==="1"||s==="true")&&(i.dirty=true);let l=f(e,"w","r");for(let u of l){let c=E(u,t,n);i.content.push(c);}return i}function dt(){return {state:"outside",instruction:"",codeRuns:[],resultRuns:[],fldLock:false,dirty:false,nestingLevel:0}}function ft(e){return e.type==="simpleField"?e.content.filter(t=>"content"in t).map(t=>U(t)).join(""):e.fieldResult.map(t=>U(t)).join("")}function U(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function mt(e){return e.fieldType==="PAGE"}function ht(e){return e.fieldType==="NUMPAGES"}function gt(e){return ["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME"].includes(e.fieldType)}function Tt(e){return ["AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE"].includes(e.fieldType)}function xt(e){return ["REF","PAGEREF","NOTEREF"].includes(e.fieldType)}function yt(e){return ["MERGEFIELD","IF","NEXT","NEXTIF","ASK","SET"].includes(e.fieldType)}function St(e){return ["TOC","TOA","INDEX"].includes(e.fieldType)}function H(e){if(!e)return;let t=parseInt(e,10);if(!isNaN(t))return t/6e4}function Ft(e,t){let n=b(e);if(n){if(n.type==="gradient"&&e){let r=i(e).find(i=>i.name==="a:gradFill");if(r)return bt(r)}return n}if(e){let o=i(e);if(o.find(a=>a.name==="a:pattFill"))return {type:"pattern"};if(o.find(a=>a.name==="a:blipFill"))return {type:"picture"}}if(t){let o=h(t,"a:fillRef");if(o){if(j(o,null,"idx")==="0")return {type:"none"};let i=a(o);if(i)return {type:"solid",color:i}}}}function bt(e){let t=i(e),n="linear",o,r=t.find(l=>l.name==="a:lin");if(r){n="linear";let l=j(r,null,"ang");l&&(o=parseInt(l,10)/6e4);}let i$1=t.find(l=>l.name==="a:path");if(i$1){let l=j(i$1,null,"path");l==="circle"?n="radial":l==="rect"?n="rectangular":n="path";}let a$1=t.find(l=>l.name==="a:gsLst"),s=[];if(a$1){let l=g(a$1,"gs");for(let u of l){let c=j(u,null,"pos"),p=c?parseInt(c,10):0,m=a(u);m&&s.push({position:p,color:m});}}return {type:"gradient",gradient:{type:n,angle:o,stops:s}}}function Et(e,t){let n=e?h(e,"a:ln"):null;if(!n){if(t){let f=h(t,"a:lnRef");if(f){if(j(f,null,"idx")==="0")return;let g=a(f);if(g)return {color:g,width:9525}}}return}let o=i(n);if(o.find(f=>f.name==="a:noFill"))return;let i$1={},a$1=j(n,null,"w");a$1&&(i$1.width=parseInt(a$1,10));let s=j(n,null,"cap");(s==="flat"||s==="rnd"||s==="sq")&&(i$1.cap=s==="rnd"?"round":s==="sq"?"square":"flat");let l=o.find(f=>f.name==="a:bevel"),u=o.find(f=>f.name==="a:miter"),c=o.find(f=>f.name==="a:round");l?i$1.join="bevel":c?i$1.join="round":u&&(i$1.join="miter");let p=o.find(f=>f.name==="a:solidFill");p&&(i$1.color=a(p));let m=o.find(f=>f.name==="a:prstDash");if(m){let f=j(m,null,"val");f&&(i$1.style=f);}let y=o.find(f=>f.name==="a:headEnd");y&&(i$1.headEnd=X(y));let T=o.find(f=>f.name==="a:tailEnd");return T&&(i$1.tailEnd=X(T)),i$1}function X(e){let t=j(e,null,"type")??"none",n=j(e,null,"w"),o=j(e,null,"len");return {type:{none:"none",triangle:"triangle",stealth:"stealth",diamond:"diamond",oval:"oval",arrow:"arrow"}[t]??"none",width:n,length:o}}function Ct(e){if(!e)return {size:{width:0,height:0}};let t=h(e,"a:ext"),n=l(t,null,"cx")??0,o=l(t,null,"cy")??0,r={width:n,height:o},i=h(e,"a:off"),a;if(i){let m=l(i,null,"x")??0,y=l(i,null,"y")??0;a={x:m,y};}let s=j(e,null,"rot"),l$1=j(e,null,"flipH")==="1",u=j(e,null,"flipV")==="1",c=H(s),p;return (c!==void 0||l$1||u)&&(p={},c!==void 0&&(p.rotation=c),l$1&&(p.flipH=true),u&&(p.flipV=true)),{size:r,transform:p,offset:a}}function wt(e){if(!e)return "rect";let t=h(e,"a:prstGeom");if(t){let o=j(t,null,"prst");if(o)return o}return h(e,"a:custGeom"),"rect"}function At(e){if(!e)return {};let t={},n=j(e,null,"vert");(n==="vert"||n==="vert270"||n==="wordArtVert")&&(t.vertical=true);let o=j(e,null,"rot");o&&(t.rotation=H(o));let r=j(e,null,"anchor");if(r){let m={t:"top",ctr:"middle",b:"bottom",dist:"distributed",just:"justified"};t.anchor=m[r];}j(e,null,"anchorCtr")==="1"&&(t.anchorCenter=true);let i=h(e,"a:noAutofit"),a=h(e,"a:normAutofit"),s=h(e,"a:spAutoFit");i?t.autoFit="none":a?t.autoFit="normal":s&&(t.autoFit="shape");let l$1=l(e,null,"lIns"),u=l(e,null,"rIns"),c=l(e,null,"tIns"),p=l(e,null,"bIns");return (l$1!==void 0||u!==void 0||c!==void 0||p!==void 0)&&(t.margins={left:l$1,right:u,top:c,bottom:p}),t}function Mt(e){if(!e)return [];let t=[],n=g(e,"p");for(let o of n)t.push({type:"paragraph",formatting:{},content:[]});return t}function W(e){let t=i(e),n=t.find(g=>g.name==="wps:cNvPr"),o=t.find(g=>g.name==="wps:spPr"),r=t.find(g=>g.name==="wps:style"),i$1=t.find(g=>g.name==="wps:txbx"),a=i$1?h(i$1,"w:txbxContent"):null,s=t.find(g=>g.name==="wps:bodyPr"),l=wt(o??null),u=o?h(o,"a:xfrm"):null,{size:c,transform:p}=Ct(u),m=Ft(o??null,r??null),y=Et(o??null,r??null),T,f;n&&(T=j(n,null,"id")??void 0,f=j(n,null,"name")??void 0);let S={type:"shape",shapeType:l,size:c};if(T&&(S.id=T),f&&(S.name=f),m&&(S.fill=m),y&&(S.outline=y),p&&(S.transform=p),a||s){let g=At(s??null),P=Mt(a);(P.length>0||Object.keys(g).length>0)&&(S.textBody={...g,content:P});}return S}function It(e){let n=i(e).find(c=>c.name==="wp:inline"||c.name==="wp:anchor");if(!n)return null;let o=n.name==="wp:anchor",r=h(n,"a:graphic");if(!r)return null;let i$1=h(r,"a:graphicData");if(!i$1)return null;let a=h(i$1,"wps:wsp");if(!a)return null;let s=W(a),l$1=h(n,"wp:extent");if(l$1){let c=l(l$1,null,"cx")??0,p=l(l$1,null,"cy")??0;s.size={width:c,height:p};}if(o){let c$1=c(n);c$1&&(s.position=c$1);let p=d(n);p&&(s.wrap=p);}let u=h(n,"wp:docPr");if(u){let c=j(u,null,"id"),p=j(u,null,"name");c&&(s.id=c),p&&(s.name=p);}return s}function Rt(e){let n=i(e).find(a=>a.name==="wp:inline"||a.name==="wp:anchor");if(!n)return false;let o=h(n,"a:graphic");if(!o)return false;let r=h(o,"a:graphicData");return r?h(r,"wps:wsp")!==null:false}function Lt(e){return ["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"].includes(e.shapeType)}function Dt(e){return e.shapeType==="textBox"||e.textBody!==void 0&&e.textBody.content.length>0}function Pt(e){return e.textBody!==void 0&&e.textBody.content.length>0}function Nt(e$1){return e(e$1.size.width)}function Bt(e$1){return e(e$1.size.height)}function vt(e$1){return {width:e(e$1.size.width),height:e(e$1.size.height)}}function Ot(e){return e.position!==void 0||e.wrap!==void 0}function kt(e){return e.fill!==void 0&&e.fill.type!=="none"}function Ut(e){return e.outline!==void 0}function Xt(e$1){return e$1.outline?.width?e(e$1.outline.width):0}function Ht(e){if(!(!e.fill||e.fill.type!=="solid"))return e$1(e.fill.color)}function Wt(e){if(e.outline?.color)return e$1(e.outline.color)}var R=720,L="left",Vt="none";function V(e){let t=l(e,"w","pos"),n=j(e,"w","val");if(t===void 0||!n)return null;let o={position:t,alignment:n},r=j(e,"w","leader");return r&&(o.leader=r),o}function G(e){if(!e)return [];let t=f(e,"w","tab");if(t.length===0)return [];let n=[];for(let o of t){let r=V(o);r&&n.push(r);}return n.sort((o,r)=>o.position-r.position),n}function Gt(e){if(!e)return;let t=e$2(e,"w","tabs"),n=G(t);return n.length>0?n:void 0}function _t(e,t){if(!e&&!t)return [];if(!e)return t??[];if(!t)return [...e];let n=new Map;for(let r of e)n.set(r.position,r);for(let r of t)r.alignment==="clear"?n.delete(r.position):n.set(r.position,r);let o=Array.from(n.values());return o.sort((r,i)=>r.position-i.position),o}function D(e,t,n){for(let r of t)if(r.position>e&&r.alignment!=="clear")return r;let o=Math.ceil((e+1)/R)*R;return o>n?{position:n,alignment:L}:{position:o,alignment:L}}function jt(e,t,n){let o=D(e,t,n);return Math.max(0,o.position-e)}function zt(e,t,n,o=0){let r=D(e,t,n),i;switch(r.alignment){case "right":i=Math.max(0,r.position-e-o);break;case "center":i=Math.max(0,r.position-e-o/2);break;case "decimal":i=Math.max(0,r.position-e-o);break;case "bar":i=Math.max(0,r.position-e);break;default:i=Math.max(0,r.position-e);break}return {width:i,alignment:r.alignment}}function Kt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "heavy":return "_";case "middleDot":return "\xB7";default:return " "}}function Yt(e){return e!==void 0&&e!=="none"}function Jt(e,t){let n=t.filter(i=>i.parentId!=null);if(n.length===0)return;let o=new Map;for(let i of n){let a=o.get(i.parentId);a?a.push(i.id):o.set(i.parentId,[i.id]);}function r(i){for(let a of i)if(a.type==="paragraph"){if(!a.content.some(l=>l.type==="commentRangeStart"||l.type==="commentRangeEnd"))continue;let s=[];for(let l of a.content)if(l.type==="commentRangeStart"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeStart",id:c});}else if(l.type==="commentRangeEnd"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeEnd",id:c});}else s.push(l);a.content=s;}else if(a.type==="table")for(let s of a.rows)for(let l of s.cells)r(l.content);}r(e);}function Zt(e,t){let n=new Set(t.map(a=>a.id)),o=t.filter(a=>a.parentId!=null&&!n.has(a.parentId));if(o.length===0)return;let r=new Map;for(let a of o){let s=r.get(a.parentId);s?s.push(a.id):r.set(a.parentId,[a.id]);}function i(a){for(let s of a)if(s.type==="paragraph"){if(!s.content.some(p=>(p.type==="insertion"||p.type==="deletion")&&r.has(p.info.id)))continue;let u=[],c=s.content;for(let p=0;p<c.length;p++){let m=c[p];if((m.type==="insertion"||m.type==="deletion")&&r.has(m.info.id)){let y=r.get(m.info.id);for(let f of y)u.push({type:"commentRangeStart",id:f});u.push(m);let T=c[p+1];T&&(T.type==="insertion"||T.type==="deletion")&&T.type!==m.type&&T.info.author===m.info.author&&T.info.date===m.info.date&&(u.push(T),p++);for(let f of y)u.push({type:"commentRangeEnd",id:f});}else u.push(m);}s.content=u;}else if(s.type==="table")for(let l of s.rows)for(let u of l.cells)i(u.content);}i(e);}export{L as DEFAULT_TAB_ALIGNMENT,R as DEFAULT_TAB_INTERVAL_TWIPS,Vt as DEFAULT_TAB_LEADER,M as KNOWN_FIELD_TYPES,jt as calculateTabWidth,zt as calculateTabWidthWithAlignment,dt as createComplexFieldContext,ft as getFieldDisplayValue,pt as getFormatSwitch,Kt as getLeaderCharacter,D as getNextTabStop,Xt as getOutlineWidthPx,vt as getShapeDimensionsPx,Bt as getShapeHeightPx,Nt as getShapeWidthPx,kt as hasFill,ct as hasMergeFormat,Ut as hasOutline,Pt as hasTextContent,Yt as hasVisibleLeader,Jt as injectReplyRangeMarkers,Zt as injectTCReplyRangeMarkers,gt as isDateTimeField,Tt as isDocPropertyField,Ot as isFloatingShape,at as isKnownFieldType,Lt as isLineShape,yt as isMergeField,mt as isPageNumberField,xt as isReferenceField,Rt as isShapeDrawing,Dt as isTextBoxShape,St as isTocField,ht as isTotalPagesField,_t as mergeTabStops,st as parseFieldInstruction,I as parseFieldType,W as parseShape,It as parseShapeFromDrawing,ut as parseSimpleField,V as parseTabStop,G as parseTabStops,Gt as parseTabStopsFromParagraphProperties,Ht as resolveFillColor,Wt as resolveOutlineColor};
1
+ export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'../chunk-FYRJTDC4.mjs';export{t as createDocx,i as repackDocx,m as updateMultipleFiles}from'../chunk-CHN26LLL.mjs';import'../chunk-WWNOXNEX.mjs';export{b as formatNumber,d as getBulletCharacter,e as isBulletLevel,f as parseDocx,a as parseNumbering,c as renderListMarker}from'../chunk-UE2ZKRYB.mjs';import {E}from'../chunk-3G44SFHX.mjs';export{y as getEndnoteText,x as getFootnoteText,L as getHyperlinkRuns,G as getHyperlinkText,J as getHyperlinkUrl,j as getTableColumnCount,k as getTableRowCount,K as hasContent,n as hasHeaderRow,l as isCellMergeContinuation,m as isCellMergeStart,H as isExternalLink,I as isInternalLink,A as isSeparatorEndnote,z as isSeparatorFootnote,d as parseBorderSpec,f as parseCellMargins,w as parseEndnoteProperties,u as parseEndnotes,i as parseFloatingTableProperties,v as parseFootnoteProperties,t as parseFootnotes,F as parseHyperlink,g as parseShading,e as parseTableBorders,h as parseTableLook,c as parseTableMeasurement,o as parseTableProperties,M as resolveHyperlinkUrl}from'../chunk-3G44SFHX.mjs';import'../chunk-MOCGHQ4A.mjs';import'../chunk-7LRR7RKE.mjs';import {c,d,e as e$1,b,a}from'../chunk-7CZEZ3UL.mjs';export{f as extractTextBoxContentElements,F as getImageHeightPx,E as getImageWidthPx,k as getTextBoxContentElement,o as getTextBoxDimensionsPx,n as getTextBoxHeightPx,p as getTextBoxMarginsPx,x as getTextBoxOutlineWidthPx,u as getTextBoxText,m as getTextBoxWidthPx,H as getWrapDistancesPx,t as hasTextBoxContent,r as hasTextBoxFill,s as hasTextBoxOutline,C as isBehindText,G as isDecorativeImage,B as isFloatingImage,q as isFloatingTextBox,D as isInFrontOfText,A as isInlineImage,i as isShapeTextBox,h as isTextBoxDrawing,y as parseDrawing,z as parseImage,j as parseTextBox,g as parseTextBoxContent,l as parseTextBoxFromShape,v as resolveTextBoxFillColor,w as resolveTextBoxOutlineColor}from'../chunk-7CZEZ3UL.mjs';import'../chunk-W77JXDEV.mjs';import {j,f,i,h,l,e as e$2,g}from'../chunk-3ANZ3252.mjs';import'../chunk-LE67NTCN.mjs';import {e}from'../chunk-VW22RZ6C.mjs';export{e as emuToPixels,f as pixelsToEmu}from'../chunk-VW22RZ6C.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-QYUPLKLP.mjs';var M=["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE"];function I(e){if(!e)return "UNKNOWN";let n=e.trim().match(/^\\?([A-Z][A-Z0-9]*)/i);if(!n)return "UNKNOWN";let o=n[1].toUpperCase();return M.includes(o)?o:"UNKNOWN"}function at(e){return M.includes(e)}function st(e){let t=I(e),n=e.trim(),o=[],r=n.match(/^\\?([A-Z][A-Z0-9]*)/i),i=r?r[0].length:0,a=n.substring(i).trim(),s=/\\(\*|@|#|!|[a-z])\s*(?:"([^"]*)"|([\S]*))?/gi,l,u=[];for(;(l=s.exec(a))!==null;){let p={switch:l[1]};l[2]?p.value=l[2]:l[3]&&(p.value=l[3]),o.push(p),u.push({start:l.index,end:l.index+l[0].length});}let c;if(a.length>0){let p=u.length>0?u[0].start:a.length,m=a.substring(0,p).trim();m.startsWith('"')&&m.endsWith('"')?c=m.slice(1,-1):m&&(c=m);}return {type:t,raw:e,argument:c,switches:o}}function pt(e){return e.switches.find(n=>n.switch==="*"||n.switch==="@")?.value}function ct(e){return e.switches.find(n=>n.switch==="*")?.value?.toUpperCase()==="MERGEFORMAT"}function ut(e,t,n){let o=j(e,"w","instr")??"",r=I(o),i={type:"simpleField",instruction:o,fieldType:r,content:[]},a=j(e,"w","fldLock");(a==="1"||a==="true")&&(i.fldLock=true);let s=j(e,"w","dirty");(s==="1"||s==="true")&&(i.dirty=true);let l=f(e,"w","r");for(let u of l){let c=E(u,t,n);i.content.push(c);}return i}function dt(){return {state:"outside",instruction:"",codeRuns:[],resultRuns:[],fldLock:false,dirty:false,nestingLevel:0}}function ft(e){return e.type==="simpleField"?e.content.filter(t=>"content"in t).map(t=>U(t)).join(""):e.fieldResult.map(t=>U(t)).join("")}function U(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function mt(e){return e.fieldType==="PAGE"}function ht(e){return e.fieldType==="NUMPAGES"}function gt(e){return ["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME"].includes(e.fieldType)}function Tt(e){return ["AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE"].includes(e.fieldType)}function xt(e){return ["REF","PAGEREF","NOTEREF"].includes(e.fieldType)}function yt(e){return ["MERGEFIELD","IF","NEXT","NEXTIF","ASK","SET"].includes(e.fieldType)}function St(e){return ["TOC","TOA","INDEX"].includes(e.fieldType)}function H(e){if(!e)return;let t=parseInt(e,10);if(!isNaN(t))return t/6e4}function Ft(e,t){let n=b(e);if(n){if(n.type==="gradient"&&e){let r=i(e).find(i=>i.name==="a:gradFill");if(r)return bt(r)}return n}if(e){let o=i(e);if(o.find(a=>a.name==="a:pattFill"))return {type:"pattern"};if(o.find(a=>a.name==="a:blipFill"))return {type:"picture"}}if(t){let o=h(t,"a:fillRef");if(o){if(j(o,null,"idx")==="0")return {type:"none"};let i=a(o);if(i)return {type:"solid",color:i}}}}function bt(e){let t=i(e),n="linear",o,r=t.find(l=>l.name==="a:lin");if(r){n="linear";let l=j(r,null,"ang");l&&(o=parseInt(l,10)/6e4);}let i$1=t.find(l=>l.name==="a:path");if(i$1){let l=j(i$1,null,"path");l==="circle"?n="radial":l==="rect"?n="rectangular":n="path";}let a$1=t.find(l=>l.name==="a:gsLst"),s=[];if(a$1){let l=g(a$1,"gs");for(let u of l){let c=j(u,null,"pos"),p=c?parseInt(c,10):0,m=a(u);m&&s.push({position:p,color:m});}}return {type:"gradient",gradient:{type:n,angle:o,stops:s}}}function Et(e,t){let n=e?h(e,"a:ln"):null;if(!n){if(t){let f=h(t,"a:lnRef");if(f){if(j(f,null,"idx")==="0")return;let g=a(f);if(g)return {color:g,width:9525}}}return}let o=i(n);if(o.find(f=>f.name==="a:noFill"))return;let i$1={},a$1=j(n,null,"w");a$1&&(i$1.width=parseInt(a$1,10));let s=j(n,null,"cap");(s==="flat"||s==="rnd"||s==="sq")&&(i$1.cap=s==="rnd"?"round":s==="sq"?"square":"flat");let l=o.find(f=>f.name==="a:bevel"),u=o.find(f=>f.name==="a:miter"),c=o.find(f=>f.name==="a:round");l?i$1.join="bevel":c?i$1.join="round":u&&(i$1.join="miter");let p=o.find(f=>f.name==="a:solidFill");p&&(i$1.color=a(p));let m=o.find(f=>f.name==="a:prstDash");if(m){let f=j(m,null,"val");f&&(i$1.style=f);}let y=o.find(f=>f.name==="a:headEnd");y&&(i$1.headEnd=X(y));let T=o.find(f=>f.name==="a:tailEnd");return T&&(i$1.tailEnd=X(T)),i$1}function X(e){let t=j(e,null,"type")??"none",n=j(e,null,"w"),o=j(e,null,"len");return {type:{none:"none",triangle:"triangle",stealth:"stealth",diamond:"diamond",oval:"oval",arrow:"arrow"}[t]??"none",width:n,length:o}}function Ct(e){if(!e)return {size:{width:0,height:0}};let t=h(e,"a:ext"),n=l(t,null,"cx")??0,o=l(t,null,"cy")??0,r={width:n,height:o},i=h(e,"a:off"),a;if(i){let m=l(i,null,"x")??0,y=l(i,null,"y")??0;a={x:m,y};}let s=j(e,null,"rot"),l$1=j(e,null,"flipH")==="1",u=j(e,null,"flipV")==="1",c=H(s),p;return (c!==void 0||l$1||u)&&(p={},c!==void 0&&(p.rotation=c),l$1&&(p.flipH=true),u&&(p.flipV=true)),{size:r,transform:p,offset:a}}function wt(e){if(!e)return "rect";let t=h(e,"a:prstGeom");if(t){let o=j(t,null,"prst");if(o)return o}return h(e,"a:custGeom"),"rect"}function At(e){if(!e)return {};let t={},n=j(e,null,"vert");(n==="vert"||n==="vert270"||n==="wordArtVert")&&(t.vertical=true);let o=j(e,null,"rot");o&&(t.rotation=H(o));let r=j(e,null,"anchor");if(r){let m={t:"top",ctr:"middle",b:"bottom",dist:"distributed",just:"justified"};t.anchor=m[r];}j(e,null,"anchorCtr")==="1"&&(t.anchorCenter=true);let i=h(e,"a:noAutofit"),a=h(e,"a:normAutofit"),s=h(e,"a:spAutoFit");i?t.autoFit="none":a?t.autoFit="normal":s&&(t.autoFit="shape");let l$1=l(e,null,"lIns"),u=l(e,null,"rIns"),c=l(e,null,"tIns"),p=l(e,null,"bIns");return (l$1!==void 0||u!==void 0||c!==void 0||p!==void 0)&&(t.margins={left:l$1,right:u,top:c,bottom:p}),t}function Mt(e){if(!e)return [];let t=[],n=g(e,"p");for(let o of n)t.push({type:"paragraph",formatting:{},content:[]});return t}function W(e){let t=i(e),n=t.find(g=>g.name==="wps:cNvPr"),o=t.find(g=>g.name==="wps:spPr"),r=t.find(g=>g.name==="wps:style"),i$1=t.find(g=>g.name==="wps:txbx"),a=i$1?h(i$1,"w:txbxContent"):null,s=t.find(g=>g.name==="wps:bodyPr"),l=wt(o??null),u=o?h(o,"a:xfrm"):null,{size:c,transform:p}=Ct(u),m=Ft(o??null,r??null),y=Et(o??null,r??null),T,f;n&&(T=j(n,null,"id")??void 0,f=j(n,null,"name")??void 0);let S={type:"shape",shapeType:l,size:c};if(T&&(S.id=T),f&&(S.name=f),m&&(S.fill=m),y&&(S.outline=y),p&&(S.transform=p),a||s){let g=At(s??null),P=Mt(a);(P.length>0||Object.keys(g).length>0)&&(S.textBody={...g,content:P});}return S}function It(e){let n=i(e).find(c=>c.name==="wp:inline"||c.name==="wp:anchor");if(!n)return null;let o=n.name==="wp:anchor",r=h(n,"a:graphic");if(!r)return null;let i$1=h(r,"a:graphicData");if(!i$1)return null;let a=h(i$1,"wps:wsp");if(!a)return null;let s=W(a),l$1=h(n,"wp:extent");if(l$1){let c=l(l$1,null,"cx")??0,p=l(l$1,null,"cy")??0;s.size={width:c,height:p};}if(o){let c$1=c(n);c$1&&(s.position=c$1);let p=d(n);p&&(s.wrap=p);}let u=h(n,"wp:docPr");if(u){let c=j(u,null,"id"),p=j(u,null,"name");c&&(s.id=c),p&&(s.name=p);}return s}function Rt(e){let n=i(e).find(a=>a.name==="wp:inline"||a.name==="wp:anchor");if(!n)return false;let o=h(n,"a:graphic");if(!o)return false;let r=h(o,"a:graphicData");return r?h(r,"wps:wsp")!==null:false}function Lt(e){return ["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"].includes(e.shapeType)}function Dt(e){return e.shapeType==="textBox"||e.textBody!==void 0&&e.textBody.content.length>0}function Pt(e){return e.textBody!==void 0&&e.textBody.content.length>0}function Nt(e$1){return e(e$1.size.width)}function Bt(e$1){return e(e$1.size.height)}function vt(e$1){return {width:e(e$1.size.width),height:e(e$1.size.height)}}function Ot(e){return e.position!==void 0||e.wrap!==void 0}function kt(e){return e.fill!==void 0&&e.fill.type!=="none"}function Ut(e){return e.outline!==void 0}function Xt(e$1){return e$1.outline?.width?e(e$1.outline.width):0}function Ht(e){if(!(!e.fill||e.fill.type!=="solid"))return e$1(e.fill.color)}function Wt(e){if(e.outline?.color)return e$1(e.outline.color)}var R=720,L="left",Vt="none";function V(e){let t=l(e,"w","pos"),n=j(e,"w","val");if(t===void 0||!n)return null;let o={position:t,alignment:n},r=j(e,"w","leader");return r&&(o.leader=r),o}function G(e){if(!e)return [];let t=f(e,"w","tab");if(t.length===0)return [];let n=[];for(let o of t){let r=V(o);r&&n.push(r);}return n.sort((o,r)=>o.position-r.position),n}function Gt(e){if(!e)return;let t=e$2(e,"w","tabs"),n=G(t);return n.length>0?n:void 0}function _t(e,t){if(!e&&!t)return [];if(!e)return t??[];if(!t)return [...e];let n=new Map;for(let r of e)n.set(r.position,r);for(let r of t)r.alignment==="clear"?n.delete(r.position):n.set(r.position,r);let o=Array.from(n.values());return o.sort((r,i)=>r.position-i.position),o}function D(e,t,n){for(let r of t)if(r.position>e&&r.alignment!=="clear")return r;let o=Math.ceil((e+1)/R)*R;return o>n?{position:n,alignment:L}:{position:o,alignment:L}}function jt(e,t,n){let o=D(e,t,n);return Math.max(0,o.position-e)}function zt(e,t,n,o=0){let r=D(e,t,n),i;switch(r.alignment){case "right":i=Math.max(0,r.position-e-o);break;case "center":i=Math.max(0,r.position-e-o/2);break;case "decimal":i=Math.max(0,r.position-e-o);break;case "bar":i=Math.max(0,r.position-e);break;default:i=Math.max(0,r.position-e);break}return {width:i,alignment:r.alignment}}function Kt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "heavy":return "_";case "middleDot":return "\xB7";default:return " "}}function Yt(e){return e!==void 0&&e!=="none"}function Jt(e,t){let n=t.filter(i=>i.parentId!=null);if(n.length===0)return;let o=new Map;for(let i of n){let a=o.get(i.parentId);a?a.push(i.id):o.set(i.parentId,[i.id]);}function r(i){for(let a of i)if(a.type==="paragraph"){if(!a.content.some(l=>l.type==="commentRangeStart"||l.type==="commentRangeEnd"))continue;let s=[];for(let l of a.content)if(l.type==="commentRangeStart"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeStart",id:c});}else if(l.type==="commentRangeEnd"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeEnd",id:c});}else s.push(l);a.content=s;}else if(a.type==="table")for(let s of a.rows)for(let l of s.cells)r(l.content);}r(e);}function Zt(e,t){let n=new Set(t.map(a=>a.id)),o=t.filter(a=>a.parentId!=null&&!n.has(a.parentId));if(o.length===0)return;let r=new Map;for(let a of o){let s=r.get(a.parentId);s?s.push(a.id):r.set(a.parentId,[a.id]);}function i(a){for(let s of a)if(s.type==="paragraph"){if(!s.content.some(p=>(p.type==="insertion"||p.type==="deletion")&&r.has(p.info.id)))continue;let u=[],c=s.content;for(let p=0;p<c.length;p++){let m=c[p];if((m.type==="insertion"||m.type==="deletion")&&r.has(m.info.id)){let y=r.get(m.info.id);for(let f of y)u.push({type:"commentRangeStart",id:f});u.push(m);let T=c[p+1];T&&(T.type==="insertion"||T.type==="deletion")&&T.type!==m.type&&T.info.author===m.info.author&&T.info.date===m.info.date&&(u.push(T),p++);for(let f of y)u.push({type:"commentRangeEnd",id:f});}else u.push(m);}s.content=u;}else if(s.type==="table")for(let l of s.rows)for(let u of l.cells)i(u.content);}i(e);}export{L as DEFAULT_TAB_ALIGNMENT,R as DEFAULT_TAB_INTERVAL_TWIPS,Vt as DEFAULT_TAB_LEADER,M as KNOWN_FIELD_TYPES,jt as calculateTabWidth,zt as calculateTabWidthWithAlignment,dt as createComplexFieldContext,ft as getFieldDisplayValue,pt as getFormatSwitch,Kt as getLeaderCharacter,D as getNextTabStop,Xt as getOutlineWidthPx,vt as getShapeDimensionsPx,Bt as getShapeHeightPx,Nt as getShapeWidthPx,kt as hasFill,ct as hasMergeFormat,Ut as hasOutline,Pt as hasTextContent,Yt as hasVisibleLeader,Jt as injectReplyRangeMarkers,Zt as injectTCReplyRangeMarkers,gt as isDateTimeField,Tt as isDocPropertyField,Ot as isFloatingShape,at as isKnownFieldType,Lt as isLineShape,yt as isMergeField,mt as isPageNumberField,xt as isReferenceField,Rt as isShapeDrawing,Dt as isTextBoxShape,St as isTocField,ht as isTotalPagesField,_t as mergeTabStops,st as parseFieldInstruction,I as parseFieldType,W as parseShape,It as parseShapeFromDrawing,ut as parseSimpleField,V as parseTabStop,G as parseTabStops,Gt as parseTabStopsFromParagraphProperties,Ht as resolveFillColor,Wt as resolveOutlineColor};
@@ -23,9 +23,10 @@ import { Document } from '../types/document.mjs';
23
23
  import { D as DocxInput } from '../docxInput-DTbCa48g.mjs';
24
24
  import '../colors-C3vA7HUU.mjs';
25
25
  import '../formatting-BH4hcZiq.mjs';
26
- import '../content-CE-ZdMwG.mjs';
26
+ import '../content-3xF4WDE8.mjs';
27
27
  import './wrapTypes.mjs';
28
- import '../styles-EI2lxeEN.mjs';
28
+ import '../watermark-DAcnAs_J.mjs';
29
+ import '../styles-BOJ93SAm.mjs';
29
30
 
30
31
  /**
31
32
  * Main Parser Orchestrator - Unified parseDocx function
@@ -23,9 +23,10 @@ import { Document } from '../types/document.js';
23
23
  import { D as DocxInput } from '../docxInput-DTbCa48g.js';
24
24
  import '../colors-C3vA7HUU.js';
25
25
  import '../formatting-_OXU8gLB.js';
26
- import '../content-CYXJ2tfQ.js';
26
+ import '../content-C8fc_tL6.js';
27
27
  import './wrapTypes.js';
28
- import '../styles-BBv7doYK.js';
28
+ import '../watermark-DAcnAs_J.js';
29
+ import '../styles-BWqX2AS-.js';
29
30
 
30
31
  /**
31
32
  * Main Parser Orchestrator - Unified parseDocx function
@@ -1 +1 @@
1
- 'use strict';var chunkQYF7BRG3_js=require('../chunk-QYF7BRG3.js');require('../chunk-ROG4MNOR.js'),require('../chunk-44FHVKSI.js'),require('../chunk-MNOHUTKE.js'),require('../chunk-E4JMCA5X.js'),require('../chunk-HQPWFUP5.js'),require('../chunk-DV6GWBUJ.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-GSKMHXHG.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"fullParseDocx",{enumerable:true,get:function(){return chunkQYF7BRG3_js.h}});Object.defineProperty(exports,"getDocxSummary",{enumerable:true,get:function(){return chunkQYF7BRG3_js.j}});Object.defineProperty(exports,"getDocxVariables",{enumerable:true,get:function(){return chunkQYF7BRG3_js.i}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkQYF7BRG3_js.f}});Object.defineProperty(exports,"quickParseDocx",{enumerable:true,get:function(){return chunkQYF7BRG3_js.g}});
1
+ 'use strict';var chunkOTHV7YV2_js=require('../chunk-OTHV7YV2.js');require('../chunk-LERLET2D.js'),require('../chunk-FIGLFSNR.js'),require('../chunk-MNOHUTKE.js'),require('../chunk-SCK6ZM5V.js'),require('../chunk-Z3LGMBJC.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-GSKMHXHG.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"fullParseDocx",{enumerable:true,get:function(){return chunkOTHV7YV2_js.h}});Object.defineProperty(exports,"getDocxSummary",{enumerable:true,get:function(){return chunkOTHV7YV2_js.j}});Object.defineProperty(exports,"getDocxVariables",{enumerable:true,get:function(){return chunkOTHV7YV2_js.i}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkOTHV7YV2_js.f}});Object.defineProperty(exports,"quickParseDocx",{enumerable:true,get:function(){return chunkOTHV7YV2_js.g}});
@@ -1 +1 @@
1
- export{h as fullParseDocx,j as getDocxSummary,i as getDocxVariables,f as parseDocx,g as quickParseDocx}from'../chunk-44JKHPGF.mjs';import'../chunk-7ZN4WI5N.mjs';import'../chunk-BOOHU5EW.mjs';import'../chunk-7LRR7RKE.mjs';import'../chunk-6ZXL3EIP.mjs';import'../chunk-OEXVWIHW.mjs';import'../chunk-WLHNIXWC.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-QYUPLKLP.mjs';
1
+ export{h as fullParseDocx,j as getDocxSummary,i as getDocxVariables,f as parseDocx,g as quickParseDocx}from'../chunk-UE2ZKRYB.mjs';import'../chunk-3G44SFHX.mjs';import'../chunk-MOCGHQ4A.mjs';import'../chunk-7LRR7RKE.mjs';import'../chunk-7CZEZ3UL.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -39,9 +39,10 @@ import JSZip from 'jszip';
39
39
  import { Document } from '../types/document.mjs';
40
40
  import '../colors-C3vA7HUU.mjs';
41
41
  import '../formatting-BH4hcZiq.mjs';
42
- import '../content-CE-ZdMwG.mjs';
42
+ import '../content-3xF4WDE8.mjs';
43
43
  import './wrapTypes.mjs';
44
- import '../styles-EI2lxeEN.mjs';
44
+ import '../watermark-DAcnAs_J.mjs';
45
+ import '../styles-BOJ93SAm.mjs';
45
46
 
46
47
  /**
47
48
  * DOCX Unzipper
@@ -39,9 +39,10 @@ import JSZip from 'jszip';
39
39
  import { Document } from '../types/document.js';
40
40
  import '../colors-C3vA7HUU.js';
41
41
  import '../formatting-_OXU8gLB.js';
42
- import '../content-CYXJ2tfQ.js';
42
+ import '../content-C8fc_tL6.js';
43
43
  import './wrapTypes.js';
44
- import '../styles-BBv7doYK.js';
44
+ import '../watermark-DAcnAs_J.js';
45
+ import '../styles-BWqX2AS-.js';
45
46
 
46
47
  /**
47
48
  * DOCX Unzipper
@@ -1 +1 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkSZIOF5SG_js=require('../chunk-SZIOF5SG.js');require('../chunk-L72YAV5N.js'),require('../chunk-HQPWFUP5.js'),require('../chunk-DV6GWBUJ.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"COMMENTS_CONTENT_TYPE",{enumerable:true,get:function(){return chunkSZIOF5SG_js.b}});Object.defineProperty(exports,"COMMENTS_EXTENDED_CONTENT_TYPE",{enumerable:true,get:function(){return chunkSZIOF5SG_js.c}});Object.defineProperty(exports,"COMMENTS_EXTENSIBLE_CONTENT_TYPE",{enumerable:true,get:function(){return chunkSZIOF5SG_js.e}});Object.defineProperty(exports,"COMMENTS_IDS_CONTENT_TYPE",{enumerable:true,get:function(){return chunkSZIOF5SG_js.d}});Object.defineProperty(exports,"addMedia",{enumerable:true,get:function(){return chunkSZIOF5SG_js.o}});Object.defineProperty(exports,"addRelationship",{enumerable:true,get:function(){return chunkSZIOF5SG_js.n}});Object.defineProperty(exports,"applyUpdatesToZip",{enumerable:true,get:function(){return chunkSZIOF5SG_js.m}});Object.defineProperty(exports,"collectHeaderFooterUpdates",{enumerable:true,get:function(){return chunkSZIOF5SG_js.f}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkSZIOF5SG_js.s}});Object.defineProperty(exports,"createEmptyDocx",{enumerable:true,get:function(){return chunkSZIOF5SG_js.g}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkSZIOF5SG_js.t}});Object.defineProperty(exports,"findMaxRId",{enumerable:true,get:function(){return chunkSZIOF5SG_js.a}});Object.defineProperty(exports,"isDocxBuffer",{enumerable:true,get:function(){return chunkSZIOF5SG_js.r}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkSZIOF5SG_js.h}});Object.defineProperty(exports,"repackDocxFromRaw",{enumerable:true,get:function(){return chunkSZIOF5SG_js.i}});Object.defineProperty(exports,"updateCoreProperties",{enumerable:true,get:function(){return chunkSZIOF5SG_js.p}});Object.defineProperty(exports,"updateDocumentXml",{enumerable:true,get:function(){return chunkSZIOF5SG_js.j}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkSZIOF5SG_js.l}});Object.defineProperty(exports,"updateXmlFile",{enumerable:true,get:function(){return chunkSZIOF5SG_js.k}});Object.defineProperty(exports,"validateDocx",{enumerable:true,get:function(){return chunkSZIOF5SG_js.q}});
1
+ 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkBH3ACQ3M_js=require('../chunk-BH3ACQ3M.js');require('../chunk-NAFMAKLK.js'),require('../chunk-Z3LGMBJC.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"COMMENTS_CONTENT_TYPE",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.c}});Object.defineProperty(exports,"COMMENTS_EXTENDED_CONTENT_TYPE",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.d}});Object.defineProperty(exports,"COMMENTS_EXTENSIBLE_CONTENT_TYPE",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.f}});Object.defineProperty(exports,"COMMENTS_IDS_CONTENT_TYPE",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.e}});Object.defineProperty(exports,"addMedia",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.p}});Object.defineProperty(exports,"addRelationship",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.o}});Object.defineProperty(exports,"applyUpdatesToZip",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.n}});Object.defineProperty(exports,"collectHeaderFooterUpdates",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.g}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.t}});Object.defineProperty(exports,"createEmptyDocx",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.h}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.u}});Object.defineProperty(exports,"findMaxRId",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.b}});Object.defineProperty(exports,"isDocxBuffer",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.i}});Object.defineProperty(exports,"repackDocxFromRaw",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.j}});Object.defineProperty(exports,"updateCoreProperties",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.q}});Object.defineProperty(exports,"updateDocumentXml",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.k}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.m}});Object.defineProperty(exports,"updateXmlFile",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.l}});Object.defineProperty(exports,"validateDocx",{enumerable:true,get:function(){return chunkBH3ACQ3M_js.r}});
@@ -1 +1 @@
1
- export{b as COMMENTS_CONTENT_TYPE,c as COMMENTS_EXTENDED_CONTENT_TYPE,e as COMMENTS_EXTENSIBLE_CONTENT_TYPE,d as COMMENTS_IDS_CONTENT_TYPE,o as addMedia,n as addRelationship,m as applyUpdatesToZip,f as collectHeaderFooterUpdates,s as createDocx,g as createEmptyDocx,t as default,a as findMaxRId,r as isDocxBuffer,h as repackDocx,i as repackDocxFromRaw,p as updateCoreProperties,j as updateDocumentXml,l as updateMultipleFiles,k as updateXmlFile,q as validateDocx}from'../chunk-MERJFGEP.mjs';import'../chunk-WLDI6N3B.mjs';import'../chunk-OEXVWIHW.mjs';import'../chunk-WLHNIXWC.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-QYUPLKLP.mjs';
1
+ export{c as COMMENTS_CONTENT_TYPE,d as COMMENTS_EXTENDED_CONTENT_TYPE,f as COMMENTS_EXTENSIBLE_CONTENT_TYPE,e as COMMENTS_IDS_CONTENT_TYPE,p as addMedia,o as addRelationship,n as applyUpdatesToZip,g as collectHeaderFooterUpdates,t as createDocx,h as createEmptyDocx,u as default,b as findMaxRId,s as isDocxBuffer,i as repackDocx,j as repackDocxFromRaw,q as updateCoreProperties,k as updateDocumentXml,m as updateMultipleFiles,l as updateXmlFile,r as validateDocx}from'../chunk-CHN26LLL.mjs';import'../chunk-WWNOXNEX.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -6,12 +6,13 @@
6
6
  * @packageDocumentation
7
7
  * @public
8
8
  */
9
- export { a as serializeDocument, s as serializeDocumentBody, b as serializeSectionProperties } from '../../documentSerializer-Bghq9rFI.mjs';
10
- import { P as Paragraph, R as Run, T as Table, y as HeaderFooter, C as Comment } from '../../content-CE-ZdMwG.mjs';
9
+ export { c as serializeBlockContent, a as serializeDocument, s as serializeDocumentBody, b as serializeSectionProperties } from '../../sectionPropertiesSerializer-D86QlzlT.mjs';
10
+ import { P as Paragraph, m as Run, T as Table, y as HeaderFooter, e as Comment, E as Endnote, F as Footnote } from '../../content-3xF4WDE8.mjs';
11
11
  import '../../types/document.mjs';
12
12
  import '../../colors-C3vA7HUU.mjs';
13
13
  import '../../formatting-BH4hcZiq.mjs';
14
- import '../../styles-EI2lxeEN.mjs';
14
+ import '../../watermark-DAcnAs_J.mjs';
15
+ import '../../styles-BOJ93SAm.mjs';
15
16
  import '../wrapTypes.mjs';
16
17
 
17
18
  /**
@@ -122,4 +123,41 @@ declare function serializeHeaderFooter(hf: HeaderFooter): string;
122
123
  */
123
124
  declare function serializeComments(comments: Comment[]): string;
124
125
 
125
- export { serializeComments, serializeHeaderFooter, serializeParagraph, serializeRun, serializeTable };
126
+ /**
127
+ * Footnote / Endnote Serializer
128
+ *
129
+ * Serializes Footnote[] → word/footnotes.xml and Endnote[] → word/endnotes.xml.
130
+ *
131
+ * Unlike the comment serializer (which reimplements a minimal paragraph/run
132
+ * emitter), note bodies are serialized with the SAME `serializeBlockContent`
133
+ * the document body uses. That is deliberate: note bodies can carry the full
134
+ * block model — paragraphs, tables, tracked-change wrappers (`w:ins`/`w:del`),
135
+ * fields, run/paragraph properties — and reusing the body serializer preserves
136
+ * all of it on round-trip rather than silently flattening it.
137
+ *
138
+ * Separator notes (`w:type="separator"` / `w:type="continuationSeparator"`) and
139
+ * the in-body auto-number marks (`w:footnoteRef` / `w:endnoteRef`) survive
140
+ * because the run model now carries them (see SeparatorContent / NoteRefMark-
141
+ * Content in types/content/run.ts); no special-casing is needed here.
142
+ *
143
+ * OOXML Reference:
144
+ * - Footnotes root: w:footnotes; each note: w:footnote[@w:id][@w:type]
145
+ * - Endnotes root: w:endnotes; each note: w:endnote[@w:id][@w:type]
146
+ */
147
+
148
+ /**
149
+ * Serialize footnotes to word/footnotes.xml content.
150
+ *
151
+ * @param footnotes - All footnotes in document order, including separator notes.
152
+ * @returns Complete footnotes.xml string.
153
+ */
154
+ declare function serializeFootnotes(footnotes: Footnote[]): string;
155
+ /**
156
+ * Serialize endnotes to word/endnotes.xml content.
157
+ *
158
+ * @param endnotes - All endnotes in document order, including separator notes.
159
+ * @returns Complete endnotes.xml string.
160
+ */
161
+ declare function serializeEndnotes(endnotes: Endnote[]): string;
162
+
163
+ export { serializeComments, serializeEndnotes, serializeFootnotes, serializeHeaderFooter, serializeParagraph, serializeRun, serializeTable };
@@ -6,12 +6,13 @@
6
6
  * @packageDocumentation
7
7
  * @public
8
8
  */
9
- export { a as serializeDocument, s as serializeDocumentBody, b as serializeSectionProperties } from '../../documentSerializer-C4lFC60P.js';
10
- import { P as Paragraph, R as Run, T as Table, y as HeaderFooter, C as Comment } from '../../content-CYXJ2tfQ.js';
9
+ export { c as serializeBlockContent, a as serializeDocument, s as serializeDocumentBody, b as serializeSectionProperties } from '../../sectionPropertiesSerializer-uXyGONxu.js';
10
+ import { P as Paragraph, m as Run, T as Table, y as HeaderFooter, e as Comment, E as Endnote, F as Footnote } from '../../content-C8fc_tL6.js';
11
11
  import '../../types/document.js';
12
12
  import '../../colors-C3vA7HUU.js';
13
13
  import '../../formatting-_OXU8gLB.js';
14
- import '../../styles-BBv7doYK.js';
14
+ import '../../watermark-DAcnAs_J.js';
15
+ import '../../styles-BWqX2AS-.js';
15
16
  import '../wrapTypes.js';
16
17
 
17
18
  /**
@@ -122,4 +123,41 @@ declare function serializeHeaderFooter(hf: HeaderFooter): string;
122
123
  */
123
124
  declare function serializeComments(comments: Comment[]): string;
124
125
 
125
- export { serializeComments, serializeHeaderFooter, serializeParagraph, serializeRun, serializeTable };
126
+ /**
127
+ * Footnote / Endnote Serializer
128
+ *
129
+ * Serializes Footnote[] → word/footnotes.xml and Endnote[] → word/endnotes.xml.
130
+ *
131
+ * Unlike the comment serializer (which reimplements a minimal paragraph/run
132
+ * emitter), note bodies are serialized with the SAME `serializeBlockContent`
133
+ * the document body uses. That is deliberate: note bodies can carry the full
134
+ * block model — paragraphs, tables, tracked-change wrappers (`w:ins`/`w:del`),
135
+ * fields, run/paragraph properties — and reusing the body serializer preserves
136
+ * all of it on round-trip rather than silently flattening it.
137
+ *
138
+ * Separator notes (`w:type="separator"` / `w:type="continuationSeparator"`) and
139
+ * the in-body auto-number marks (`w:footnoteRef` / `w:endnoteRef`) survive
140
+ * because the run model now carries them (see SeparatorContent / NoteRefMark-
141
+ * Content in types/content/run.ts); no special-casing is needed here.
142
+ *
143
+ * OOXML Reference:
144
+ * - Footnotes root: w:footnotes; each note: w:footnote[@w:id][@w:type]
145
+ * - Endnotes root: w:endnotes; each note: w:endnote[@w:id][@w:type]
146
+ */
147
+
148
+ /**
149
+ * Serialize footnotes to word/footnotes.xml content.
150
+ *
151
+ * @param footnotes - All footnotes in document order, including separator notes.
152
+ * @returns Complete footnotes.xml string.
153
+ */
154
+ declare function serializeFootnotes(footnotes: Footnote[]): string;
155
+ /**
156
+ * Serialize endnotes to word/endnotes.xml content.
157
+ *
158
+ * @param endnotes - All endnotes in document order, including separator notes.
159
+ * @returns Complete endnotes.xml string.
160
+ */
161
+ declare function serializeEndnotes(endnotes: Endnote[]): string;
162
+
163
+ export { serializeComments, serializeEndnotes, serializeFootnotes, serializeHeaderFooter, serializeParagraph, serializeRun, serializeTable };
@@ -1 +1 @@
1
- 'use strict';var chunkL72YAV5N_js=require('../../chunk-L72YAV5N.js');require('../../chunk-C2BAPYGJ.js'),require('../../chunk-DC7S76ZX.js');Object.defineProperty(exports,"serializeComments",{enumerable:true,get:function(){return chunkL72YAV5N_js.j}});Object.defineProperty(exports,"serializeDocument",{enumerable:true,get:function(){return chunkL72YAV5N_js.g}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkL72YAV5N_js.f}});Object.defineProperty(exports,"serializeHeaderFooter",{enumerable:true,get:function(){return chunkL72YAV5N_js.h}});Object.defineProperty(exports,"serializeParagraph",{enumerable:true,get:function(){return chunkL72YAV5N_js.c}});Object.defineProperty(exports,"serializeRun",{enumerable:true,get:function(){return chunkL72YAV5N_js.b}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkL72YAV5N_js.e}});Object.defineProperty(exports,"serializeTable",{enumerable:true,get:function(){return chunkL72YAV5N_js.d}});
1
+ 'use strict';var chunkNAFMAKLK_js=require('../../chunk-NAFMAKLK.js');require('../../chunk-C2BAPYGJ.js'),require('../../chunk-DC7S76ZX.js');Object.defineProperty(exports,"serializeBlockContent",{enumerable:true,get:function(){return chunkNAFMAKLK_js.f}});Object.defineProperty(exports,"serializeComments",{enumerable:true,get:function(){return chunkNAFMAKLK_js.k}});Object.defineProperty(exports,"serializeDocument",{enumerable:true,get:function(){return chunkNAFMAKLK_js.h}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunkNAFMAKLK_js.g}});Object.defineProperty(exports,"serializeEndnotes",{enumerable:true,get:function(){return chunkNAFMAKLK_js.p}});Object.defineProperty(exports,"serializeFootnotes",{enumerable:true,get:function(){return chunkNAFMAKLK_js.o}});Object.defineProperty(exports,"serializeHeaderFooter",{enumerable:true,get:function(){return chunkNAFMAKLK_js.i}});Object.defineProperty(exports,"serializeParagraph",{enumerable:true,get:function(){return chunkNAFMAKLK_js.d}});Object.defineProperty(exports,"serializeRun",{enumerable:true,get:function(){return chunkNAFMAKLK_js.b}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunkNAFMAKLK_js.c}});Object.defineProperty(exports,"serializeTable",{enumerable:true,get:function(){return chunkNAFMAKLK_js.e}});
@@ -1 +1 @@
1
- export{j as serializeComments,g as serializeDocument,f as serializeDocumentBody,h as serializeHeaderFooter,c as serializeParagraph,b as serializeRun,e as serializeSectionProperties,d as serializeTable}from'../../chunk-WLDI6N3B.mjs';import'../../chunk-LE67NTCN.mjs';import'../../chunk-QYUPLKLP.mjs';
1
+ export{f as serializeBlockContent,k as serializeComments,h as serializeDocument,g as serializeDocumentBody,p as serializeEndnotes,o as serializeFootnotes,i as serializeHeaderFooter,d as serializeParagraph,b as serializeRun,c as serializeSectionProperties,e as serializeTable}from'../../chunk-WWNOXNEX.mjs';import'../../chunk-LE67NTCN.mjs';import'../../chunk-QYUPLKLP.mjs';
@@ -0,0 +1,128 @@
1
+ import { EditorState, Transaction } from 'prosemirror-state';
2
+ import { Node } from 'prosemirror-model';
3
+ import { PageMargins, ColumnLayout, FlowBlock, Measure, Layout } from '../layout-engine/types.mjs';
4
+ import { Document } from '../types/document.mjs';
5
+ import { S as SectionProperties, y as HeaderFooter } from '../content-3xF4WDE8.mjs';
6
+ import { F as FloatPageGeometry } from '../measureBlocksPipeline-BMqbRFQB.mjs';
7
+ import { H as HeaderFooterContent, F as FootnoteRenderItem } from '../footnotes-BZ24OTAT.mjs';
8
+ import { W as Watermark } from '../watermark-DAcnAs_J.mjs';
9
+ import { T as Theme, S as StyleDefinitions } from '../styles-BOJ93SAm.mjs';
10
+ import '../formatting-BH4hcZiq.mjs';
11
+ import '../colors-C3vA7HUU.mjs';
12
+ import '../docx/wrapTypes.mjs';
13
+ import '../anchoredObjectPosition-KJEyF-wr.mjs';
14
+
15
+ /**
16
+ * The pure layout COMPUTE pass shared by the React and Vue adapters — issue
17
+ * #696 Tier 2, the clean half of the engine spine.
18
+ *
19
+ * This is the 6-step pass from React's `useLayoutPipeline` minus the DOM paint
20
+ * + scroll/event side-effects (which stay adapter-side, where the framework
21
+ * timing lives): PM doc → flow blocks → measure → header/footer resolve →
22
+ * margin extension → `layoutDocument` (+ two-pass footnote stabilization) →
23
+ * footnote render items. It is pure (no DOM, no refs, no rAF) and returns
24
+ * everything the adapter needs to paint.
25
+ *
26
+ * The one injected seam is `measureBlocks` — each adapter passes its own
27
+ * measurer (React's is caching), same pattern as `measureBlocksWithFloats`.
28
+ * `getHfPmDoc` is the HF-unification seam (prefer the persistent PM doc over
29
+ * re-parsing `HeaderFooter.content`).
30
+ */
31
+
32
+ interface PageSizePx {
33
+ w: number;
34
+ h: number;
35
+ }
36
+ /** Adapter-supplied block measurer (React's is caching). */
37
+ type MeasureBlocksFn = (blocks: FlowBlock[], contentWidth: number | number[], pageGeometry?: FloatPageGeometry) => Measure[];
38
+ interface ComputeLayoutInputs {
39
+ state: EditorState;
40
+ document: Document | null;
41
+ pageSize: PageSizePx;
42
+ margins: PageMargins;
43
+ columns: ColumnLayout | undefined;
44
+ finalPageSize: PageSizePx;
45
+ finalMargins: PageMargins;
46
+ finalColumns: ColumnLayout | undefined;
47
+ pageGap: number;
48
+ contentWidth: number;
49
+ theme: Theme | null | undefined;
50
+ styles: StyleDefinitions | null | undefined;
51
+ sectionProperties: SectionProperties | null | undefined;
52
+ finalSectionProperties: SectionProperties | null | undefined;
53
+ /** Resolved HF objects for the section (default + first-page). */
54
+ headerContent: HeaderFooter | null | undefined;
55
+ footerContent: HeaderFooter | null | undefined;
56
+ firstPageHeaderContent: HeaderFooter | null | undefined;
57
+ firstPageFooterContent: HeaderFooter | null | undefined;
58
+ measureBlocks: MeasureBlocksFn;
59
+ /** HF unification: the persistent PM doc for an HF, or null to re-parse content. */
60
+ getHfPmDoc: (hf: HeaderFooter) => Node | null | undefined;
61
+ }
62
+ interface LayoutComputation {
63
+ blocks: FlowBlock[];
64
+ measures: Measure[];
65
+ layout: Layout;
66
+ headerContentForRender: HeaderFooterContent | undefined;
67
+ footerContentForRender: HeaderFooterContent | undefined;
68
+ firstPageHeaderForRender: HeaderFooterContent | undefined;
69
+ firstPageFooterForRender: HeaderFooterContent | undefined;
70
+ hasTitlePg: boolean;
71
+ watermark: Watermark | undefined;
72
+ headerDistancePx: number | undefined;
73
+ footerDistancePx: number | undefined;
74
+ pageBorders: SectionProperties['pageBorders'] | undefined;
75
+ footnotesByPage: Map<number, FootnoteRenderItem[]> | undefined;
76
+ }
77
+ /**
78
+ * Run the pure layout compute pass (the 6 steps in this file's header), lifted
79
+ * verbatim from `useLayoutPipeline`. The adapter performs the DOM paint
80
+ * (`renderPages`), scroll-restore, `painter:painted`, and state writeback with
81
+ * the returned values.
82
+ */
83
+ declare function computeLayout(inputs: ComputeLayoutInputs): LayoutComputation;
84
+
85
+ /**
86
+ * rAF-coalescing layout scheduler shared by the React and Vue adapters
87
+ * (issue #696 Tier 2). Rapid doc-changing transactions (a burst of
88
+ * keystrokes) collapse to a single layout pass per animation frame: while a
89
+ * frame is pending, later `schedule` calls just replace the target state, so
90
+ * only the final state lays out.
91
+ *
92
+ * `scheduleFrame`/`cancelFrame` are injected so a headless/test host can pass
93
+ * a synchronous stub; they default to requestAnimationFrame.
94
+ */
95
+
96
+ interface LayoutScheduler {
97
+ /** Request a layout for `state`, coalesced into the pending frame. */
98
+ schedule(state: EditorState): void;
99
+ /** Cancel any pending frame (call on teardown). */
100
+ cancel(): void;
101
+ }
102
+ declare function createLayoutScheduler(run: (state: EditorState) => void, scheduleFrame?: (cb: () => void) => number, cancelFrame?: (handle: number) => void): LayoutScheduler;
103
+
104
+ /**
105
+ * Strip ProseMirror's internal `UPDATED_SCROLL` flag from a transaction so the
106
+ * hidden, off-screen editor's `updateState` does not force-scroll its ancestors
107
+ * to the selection — the paginated painter owns scroll, not the PM view.
108
+ *
109
+ * Shared by both adapters' `dispatchTransaction` (issue #696 Tier 2). React has
110
+ * always done this; Vue did not, so its hidden editor could yank an ancestor's
111
+ * scroll on edit. Centralizing the magic bit + the drift canary here keeps the
112
+ * two in lockstep.
113
+ *
114
+ * `Transaction.updated` is a private bitfield in `prosemirror-state` whose
115
+ * `UPDATED_SCROLL` bit is not exported. It is `4` in current PM
116
+ * (state/src/transaction.ts). If a future PM release renumbers the bits before
117
+ * SCROLL, `assertScrollFlagShape` logs once so the constant can be updated.
118
+ */
119
+
120
+ /**
121
+ * Clear the scroll-into-view flag on `transaction` in place. Call inside
122
+ * `dispatchTransaction` before `state.apply(transaction)`. `probeTr` should be
123
+ * a fresh `view.state.tr` used only for the one-shot drift canary (so the real
124
+ * transaction is never mutated by the probe).
125
+ */
126
+ declare function stripScrollFlag(transaction: Transaction, probeTr: Transaction): void;
127
+
128
+ export { type ComputeLayoutInputs, type LayoutComputation, type LayoutScheduler, type MeasureBlocksFn, computeLayout, createLayoutScheduler, stripScrollFlag };
@@ -0,0 +1,128 @@
1
+ import { EditorState, Transaction } from 'prosemirror-state';
2
+ import { Node } from 'prosemirror-model';
3
+ import { PageMargins, ColumnLayout, FlowBlock, Measure, Layout } from '../layout-engine/types.js';
4
+ import { Document } from '../types/document.js';
5
+ import { S as SectionProperties, y as HeaderFooter } from '../content-C8fc_tL6.js';
6
+ import { F as FloatPageGeometry } from '../measureBlocksPipeline-iYNzAH-o.js';
7
+ import { H as HeaderFooterContent, F as FootnoteRenderItem } from '../footnotes-DMsicPGd.js';
8
+ import { W as Watermark } from '../watermark-DAcnAs_J.js';
9
+ import { T as Theme, S as StyleDefinitions } from '../styles-BWqX2AS-.js';
10
+ import '../formatting-_OXU8gLB.js';
11
+ import '../colors-C3vA7HUU.js';
12
+ import '../docx/wrapTypes.js';
13
+ import '../anchoredObjectPosition-CS-8BfhO.js';
14
+
15
+ /**
16
+ * The pure layout COMPUTE pass shared by the React and Vue adapters — issue
17
+ * #696 Tier 2, the clean half of the engine spine.
18
+ *
19
+ * This is the 6-step pass from React's `useLayoutPipeline` minus the DOM paint
20
+ * + scroll/event side-effects (which stay adapter-side, where the framework
21
+ * timing lives): PM doc → flow blocks → measure → header/footer resolve →
22
+ * margin extension → `layoutDocument` (+ two-pass footnote stabilization) →
23
+ * footnote render items. It is pure (no DOM, no refs, no rAF) and returns
24
+ * everything the adapter needs to paint.
25
+ *
26
+ * The one injected seam is `measureBlocks` — each adapter passes its own
27
+ * measurer (React's is caching), same pattern as `measureBlocksWithFloats`.
28
+ * `getHfPmDoc` is the HF-unification seam (prefer the persistent PM doc over
29
+ * re-parsing `HeaderFooter.content`).
30
+ */
31
+
32
+ interface PageSizePx {
33
+ w: number;
34
+ h: number;
35
+ }
36
+ /** Adapter-supplied block measurer (React's is caching). */
37
+ type MeasureBlocksFn = (blocks: FlowBlock[], contentWidth: number | number[], pageGeometry?: FloatPageGeometry) => Measure[];
38
+ interface ComputeLayoutInputs {
39
+ state: EditorState;
40
+ document: Document | null;
41
+ pageSize: PageSizePx;
42
+ margins: PageMargins;
43
+ columns: ColumnLayout | undefined;
44
+ finalPageSize: PageSizePx;
45
+ finalMargins: PageMargins;
46
+ finalColumns: ColumnLayout | undefined;
47
+ pageGap: number;
48
+ contentWidth: number;
49
+ theme: Theme | null | undefined;
50
+ styles: StyleDefinitions | null | undefined;
51
+ sectionProperties: SectionProperties | null | undefined;
52
+ finalSectionProperties: SectionProperties | null | undefined;
53
+ /** Resolved HF objects for the section (default + first-page). */
54
+ headerContent: HeaderFooter | null | undefined;
55
+ footerContent: HeaderFooter | null | undefined;
56
+ firstPageHeaderContent: HeaderFooter | null | undefined;
57
+ firstPageFooterContent: HeaderFooter | null | undefined;
58
+ measureBlocks: MeasureBlocksFn;
59
+ /** HF unification: the persistent PM doc for an HF, or null to re-parse content. */
60
+ getHfPmDoc: (hf: HeaderFooter) => Node | null | undefined;
61
+ }
62
+ interface LayoutComputation {
63
+ blocks: FlowBlock[];
64
+ measures: Measure[];
65
+ layout: Layout;
66
+ headerContentForRender: HeaderFooterContent | undefined;
67
+ footerContentForRender: HeaderFooterContent | undefined;
68
+ firstPageHeaderForRender: HeaderFooterContent | undefined;
69
+ firstPageFooterForRender: HeaderFooterContent | undefined;
70
+ hasTitlePg: boolean;
71
+ watermark: Watermark | undefined;
72
+ headerDistancePx: number | undefined;
73
+ footerDistancePx: number | undefined;
74
+ pageBorders: SectionProperties['pageBorders'] | undefined;
75
+ footnotesByPage: Map<number, FootnoteRenderItem[]> | undefined;
76
+ }
77
+ /**
78
+ * Run the pure layout compute pass (the 6 steps in this file's header), lifted
79
+ * verbatim from `useLayoutPipeline`. The adapter performs the DOM paint
80
+ * (`renderPages`), scroll-restore, `painter:painted`, and state writeback with
81
+ * the returned values.
82
+ */
83
+ declare function computeLayout(inputs: ComputeLayoutInputs): LayoutComputation;
84
+
85
+ /**
86
+ * rAF-coalescing layout scheduler shared by the React and Vue adapters
87
+ * (issue #696 Tier 2). Rapid doc-changing transactions (a burst of
88
+ * keystrokes) collapse to a single layout pass per animation frame: while a
89
+ * frame is pending, later `schedule` calls just replace the target state, so
90
+ * only the final state lays out.
91
+ *
92
+ * `scheduleFrame`/`cancelFrame` are injected so a headless/test host can pass
93
+ * a synchronous stub; they default to requestAnimationFrame.
94
+ */
95
+
96
+ interface LayoutScheduler {
97
+ /** Request a layout for `state`, coalesced into the pending frame. */
98
+ schedule(state: EditorState): void;
99
+ /** Cancel any pending frame (call on teardown). */
100
+ cancel(): void;
101
+ }
102
+ declare function createLayoutScheduler(run: (state: EditorState) => void, scheduleFrame?: (cb: () => void) => number, cancelFrame?: (handle: number) => void): LayoutScheduler;
103
+
104
+ /**
105
+ * Strip ProseMirror's internal `UPDATED_SCROLL` flag from a transaction so the
106
+ * hidden, off-screen editor's `updateState` does not force-scroll its ancestors
107
+ * to the selection — the paginated painter owns scroll, not the PM view.
108
+ *
109
+ * Shared by both adapters' `dispatchTransaction` (issue #696 Tier 2). React has
110
+ * always done this; Vue did not, so its hidden editor could yank an ancestor's
111
+ * scroll on edit. Centralizing the magic bit + the drift canary here keeps the
112
+ * two in lockstep.
113
+ *
114
+ * `Transaction.updated` is a private bitfield in `prosemirror-state` whose
115
+ * `UPDATED_SCROLL` bit is not exported. It is `4` in current PM
116
+ * (state/src/transaction.ts). If a future PM release renumbers the bits before
117
+ * SCROLL, `assertScrollFlagShape` logs once so the constant can be updated.
118
+ */
119
+
120
+ /**
121
+ * Clear the scroll-into-view flag on `transaction` in place. Call inside
122
+ * `dispatchTransaction` before `state.apply(transaction)`. `probeTr` should be
123
+ * a fresh `view.state.tr` used only for the one-shot drift canary (so the real
124
+ * transaction is never mutated by the probe).
125
+ */
126
+ declare function stripScrollFlag(transaction: Transaction, probeTr: Transaction): void;
127
+
128
+ export { type ComputeLayoutInputs, type LayoutComputation, type LayoutScheduler, type MeasureBlocksFn, computeLayout, createLayoutScheduler, stripScrollFlag };
@@ -0,0 +1 @@
1
+ 'use strict';require('../chunk-YPKIQMPR.js');var chunkYM7SMTYY_js=require('../chunk-YM7SMTYY.js');require('../chunk-DG2CMDSM.js');var chunkQLAIOTQB_js=require('../chunk-QLAIOTQB.js'),chunkFQS436KN_js=require('../chunk-FQS436KN.js');require('../chunk-4MYKVWNF.js');var chunkJ3YFJDZD_js=require('../chunk-J3YFJDZD.js'),chunkRSU4HTC6_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');function de(a){let{state:t,document:n,pageSize:e,margins:o,columns:p,finalPageSize:d,finalMargins:L,finalColumns:M,pageGap:K,contentWidth:f,theme:m,styles:D,sectionProperties:s,finalSectionProperties:Q,headerContent:X,footerContent:Y,firstPageHeaderContent:Z,firstPageFooterContent:ee,measureBlocks:g,getHfPmDoc:te}=a,oe=e.h-o.top-o.bottom,r=chunkFQS436KN_js.c(t.doc,{theme:m,pageContentHeight:oe}),ne=chunkYM7SMTYY_js.O(r,{pageSize:e,margins:o,columns:p},{pageSize:d,margins:L,columns:M}),l=g(r,ne,chunkJ3YFJDZD_js.f({size:e,margins:o})),y=chunkQLAIOTQB_js.d(r),k=y.length>0&&!!n?.package?.footnotes,H={section:"header",pageSize:e,margins:o},x={section:"footer",pageSize:e,margins:o},T=t.doc.attrs?.defaultTabStopTwips,w={styles:D,theme:m,measureBlocks:g,defaultTabStopTwips:T},c=(i,u)=>{if(!i)return;let _=te(i);return _?chunkYM7SMTYY_js.z(_,f,u,w):chunkYM7SMTYY_js.y(i,f,u,w)},B=c(X,H),R=c(Y,x),F=s?.titlePg===true,v=F?c(Z,H):void 0,z=F?c(ee,x):void 0,re=t.doc.attrs?.watermark??void 0,{margins:ae,finalMargins:ie}=chunkYM7SMTYY_js.D({pageSize:e,margins:o,finalMargins:L,bodyBlocks:r,headers:[B,v],footers:[R,z],warn:i=>console.warn(`[computeLayout] ${i}`)}),se=Q?.sectionStart,P={pageSize:e,margins:ae,finalPageSize:d,finalMargins:ie,columns:M,bodyBreakType:se,pageGap:K},h,E=new Map,S=new Map;if(k){let i=chunkRSU4HTC6_js.U(r,l,P);S=chunkQLAIOTQB_js.h(n.package.footnotes,y,f,{styles:D??void 0,theme:m??null,measureBlocks:g,defaultTabStopTwips:T});let u=chunkQLAIOTQB_js.j({blocks:r,measures:l,layoutOpts:P,footnoteRefs:y,footnoteContentMap:S,initialLayout:i});h=u.layout,E=u.pageFootnoteMap;}else h=chunkRSU4HTC6_js.U(r,l,P);let W=k?chunkQLAIOTQB_js.k(E,S,n):void 0;return {blocks:r,measures:l,layout:h,headerContentForRender:B,footerContentForRender:R,firstPageHeaderForRender:v,firstPageFooterForRender:z,hasTitlePg:F,watermark:re,headerDistancePx:s?.headerDistance?chunkYM7SMTYY_js.I(s.headerDistance):void 0,footerDistancePx:s?.footerDistance?chunkYM7SMTYY_js.I(s.footerDistance):void 0,pageBorders:s?.pageBorders,footnotesByPage:W?.size?W:void 0}}function ue(a,t=e=>requestAnimationFrame(e),n=e=>cancelAnimationFrame(e)){let e=null;return {schedule(o){if(e){e.state=o;return}e={handle:0,state:o};let p=t(()=>{let d=e;e=null,d&&a(d.state);});e&&(e.handle=p);},cancel(){e&&(n(e.handle),e=null);}}}var J=false;function le(a){if(!J){J=true;try{let t=a.scrollIntoView();(typeof t.updated!="number"||(t.updated&4)===0)&&console.warn("[docx-editor] prosemirror-state UPDATED_SCROLL bit shape changed; paginated scroll suppression may be stale. Update PM_UPDATED_SCROLL.");}catch{}}}function ce(a,t){le(t);let n=a;typeof n.updated=="number"&&(n.updated&=-5);}exports.computeLayout=de;exports.createLayoutScheduler=ue;exports.stripScrollFlag=ce;
@@ -0,0 +1 @@
1
+ import'../chunk-DE2V4X3B.mjs';import {O,D,I,z,y}from'../chunk-6QO4O52Y.mjs';import'../chunk-W7CQRQZ6.mjs';import {d,h,j,k}from'../chunk-YGWUKRFD.mjs';import {c}from'../chunk-B46V5G46.mjs';import'../chunk-LX35TFGF.mjs';import {f}from'../chunk-55XWETY4.mjs';import {U}from'../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';function de(a){let{state:t,document:n,pageSize:e,margins:o,columns:p,finalPageSize:d$1,finalMargins:L,finalColumns:M,pageGap:K,contentWidth:f$1,theme:m,styles:D$1,sectionProperties:s,finalSectionProperties:Q,headerContent:X,footerContent:Y,firstPageHeaderContent:Z,firstPageFooterContent:ee,measureBlocks:g,getHfPmDoc:te}=a,oe=e.h-o.top-o.bottom,r=c(t.doc,{theme:m,pageContentHeight:oe}),ne=O(r,{pageSize:e,margins:o,columns:p},{pageSize:d$1,margins:L,columns:M}),l=g(r,ne,f({size:e,margins:o})),y$1=d(r),k$1=y$1.length>0&&!!n?.package?.footnotes,H={section:"header",pageSize:e,margins:o},x={section:"footer",pageSize:e,margins:o},T=t.doc.attrs?.defaultTabStopTwips,w={styles:D$1,theme:m,measureBlocks:g,defaultTabStopTwips:T},c$1=(i,u)=>{if(!i)return;let _=te(i);return _?z(_,f$1,u,w):y(i,f$1,u,w)},B=c$1(X,H),R=c$1(Y,x),F=s?.titlePg===true,v=F?c$1(Z,H):void 0,z$1=F?c$1(ee,x):void 0,re=t.doc.attrs?.watermark??void 0,{margins:ae,finalMargins:ie}=D({pageSize:e,margins:o,finalMargins:L,bodyBlocks:r,headers:[B,v],footers:[R,z$1],warn:i=>console.warn(`[computeLayout] ${i}`)}),se=Q?.sectionStart,P={pageSize:e,margins:ae,finalPageSize:d$1,finalMargins:ie,columns:M,bodyBreakType:se,pageGap:K},h$1,E=new Map,S=new Map;if(k$1){let i=U(r,l,P);S=h(n.package.footnotes,y$1,f$1,{styles:D$1??void 0,theme:m??null,measureBlocks:g,defaultTabStopTwips:T});let u=j({blocks:r,measures:l,layoutOpts:P,footnoteRefs:y$1,footnoteContentMap:S,initialLayout:i});h$1=u.layout,E=u.pageFootnoteMap;}else h$1=U(r,l,P);let W=k$1?k(E,S,n):void 0;return {blocks:r,measures:l,layout:h$1,headerContentForRender:B,footerContentForRender:R,firstPageHeaderForRender:v,firstPageFooterForRender:z$1,hasTitlePg:F,watermark:re,headerDistancePx:s?.headerDistance?I(s.headerDistance):void 0,footerDistancePx:s?.footerDistance?I(s.footerDistance):void 0,pageBorders:s?.pageBorders,footnotesByPage:W?.size?W:void 0}}function ue(a,t=e=>requestAnimationFrame(e),n=e=>cancelAnimationFrame(e)){let e=null;return {schedule(o){if(e){e.state=o;return}e={handle:0,state:o};let p=t(()=>{let d=e;e=null,d&&a(d.state);});e&&(e.handle=p);},cancel(){e&&(n(e.handle),e=null);}}}var J=false;function le(a){if(!J){J=true;try{let t=a.scrollIntoView();(typeof t.updated!="number"||(t.updated&4)===0)&&console.warn("[docx-editor] prosemirror-state UPDATED_SCROLL bit shape changed; paginated scroll suppression may be stale. Update PM_UPDATED_SCROLL.");}catch{}}}function ce(a,t){le(t);let n=a;typeof n.updated=="number"&&(n.updated&=-5);}export{de as computeLayout,ue as createLayoutScheduler,ce as stripScrollFlag};
@@ -1,5 +1,5 @@
1
1
  import { Document } from './types/document.mjs';
2
- import { x as BreakContent, P as Paragraph, R as Run, g as RunContent } from './content-CE-ZdMwG.mjs';
2
+ import { x as BreakContent, P as Paragraph, m as Run, n as RunContent } from './content-3xF4WDE8.mjs';
3
3
 
4
4
  /**
5
5
  * Insert Operations Utility
@@ -1,5 +1,5 @@
1
1
  import { Document } from './types/document.js';
2
- import { x as BreakContent, P as Paragraph, R as Run, g as RunContent } from './content-CYXJ2tfQ.js';
2
+ import { x as BreakContent, P as Paragraph, m as Run, n as RunContent } from './content-C8fc_tL6.js';
3
3
 
4
4
  /**
5
5
  * Insert Operations Utility