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