@eigenpal/docx-editor-core 1.0.2 → 1.0.3
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/README.md +1 -1
- package/dist/agent/index.d.mts +4 -4
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-2IE6UDHJ.mjs +2 -0
- package/dist/chunk-3AZWLVLC.js +1 -0
- package/dist/chunk-3JXR6YU4.mjs +1 -0
- package/dist/{chunk-LTYW3NLX.js → chunk-3NLVHZMT.js} +2 -2
- package/dist/chunk-5SU4HPQS.mjs +1 -0
- package/dist/{chunk-6PR4XHQ3.mjs → chunk-7PX32GLB.mjs} +1 -1
- package/dist/{chunk-AFMMYLPX.js → chunk-ABBG4WD2.js} +2 -2
- package/dist/chunk-AHXPHBMT.js +1 -0
- package/dist/chunk-B6LYBJ4H.mjs +1 -0
- package/dist/chunk-BFB4PRS4.mjs +1 -0
- package/dist/chunk-BRHHK4MG.mjs +2 -0
- package/dist/chunk-CUXXRGPQ.mjs +1 -0
- package/dist/chunk-D536HC5M.js +2 -0
- package/dist/{chunk-GFQM7PKY.js → chunk-D5E5TA74.js} +1 -1
- package/dist/chunk-EPX7BBJD.js +2 -0
- package/dist/chunk-EQVNAHL7.mjs +1 -0
- package/dist/{chunk-EXOP727C.mjs → chunk-EV6W6KXG.mjs} +1 -1
- package/dist/chunk-FCJWLEKT.mjs +1 -0
- package/dist/{chunk-XDH55WXX.mjs → chunk-G7AKYAKU.mjs} +1 -1
- package/dist/{chunk-AGNZEOVL.mjs → chunk-GHQS3I2W.mjs} +1 -1
- package/dist/chunk-HAAMO2Z2.mjs +1 -0
- package/dist/chunk-HL5PQT3A.mjs +2 -0
- package/dist/chunk-IMKU4O3P.js +1 -0
- package/dist/chunk-IN6IYQ2X.js +1 -0
- package/dist/chunk-IO6HZ7KR.js +2 -0
- package/dist/{chunk-CP767TWV.js → chunk-N3EIZN65.js} +1 -1
- package/dist/chunk-NO5LW2DQ.mjs +1 -0
- package/dist/chunk-OTDF6PZK.js +1 -0
- package/dist/chunk-QMLIXLZJ.mjs +4 -0
- package/dist/chunk-QVEAQOMR.mjs +2 -0
- package/dist/{chunk-APFTVA4F.mjs → chunk-QXHL67FG.mjs} +1 -1
- package/dist/{chunk-XCMA7AY7.js → chunk-SAFW7UQZ.js} +1 -1
- package/dist/chunk-TGPS3SRR.mjs +1 -0
- package/dist/chunk-TMISJEGL.js +1 -0
- package/dist/chunk-TRQN2SFW.mjs +59 -0
- package/dist/chunk-UGXSKZVM.js +1 -0
- package/dist/chunk-V6SWUCTS.js +2 -0
- package/dist/chunk-X3NB7STJ.js +1 -0
- package/dist/{chunk-7SGC3CXJ.js → chunk-XBHF5Q2F.js} +1 -1
- package/dist/chunk-XBIKSAH6.js +1 -0
- package/dist/{chunk-6DK4UBGM.js → chunk-XOH7YAYL.js} +1 -1
- package/dist/{chunk-4S5VOHQK.mjs → chunk-XWQB6APW.mjs} +1 -1
- package/dist/chunk-Y7I5QDCN.mjs +1 -0
- package/dist/chunk-YCDB5TA6.js +4 -0
- package/dist/chunk-YVYB4YCI.js +1 -0
- package/dist/{chunk-NLTX7XVR.js → chunk-Z4SJCSTS.js} +1 -1
- 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/core-plugins.d.mts +3 -3
- package/dist/core-plugins.d.ts +3 -3
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +6 -6
- package/dist/core.d.ts +6 -6
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/docx/index.d.mts +3 -3
- package/dist/docx/index.d.ts +3 -3
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +3 -3
- package/dist/docx/parser.d.ts +3 -3
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +3 -3
- package/dist/docx/rezip.d.ts +3 -3
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +3 -3
- package/dist/docx/serializer/index.d.ts +3 -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-B3QVg556.d.ts → headerFooterLayout-B5LyDpSM.d.ts} +20 -1
- package/dist/{headerFooterLayout-DkclHZ0Z.d.mts → headerFooterLayout-DVFcJ832.d.mts} +20 -1
- package/dist/headless.d.mts +5 -5
- package/dist/headless.d.ts +5 -5
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +5 -5
- package/dist/layout-bridge/index.d.ts +5 -5
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +39 -2
- package/dist/layout-bridge/measuring/index.d.ts +39 -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 +10 -3
- package/dist/layout-bridge/toFlowBlocks.d.ts +10 -3
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +30 -3
- package/dist/layout-engine/index.d.ts +30 -3
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +9 -0
- package/dist/layout-engine/types.d.ts +9 -0
- package/dist/layout-painter/index.d.mts +4 -4
- package/dist/layout-painter/index.d.ts +4 -4
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +4 -4
- package/dist/layout-painter/renderPage.d.ts +4 -4
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/{lists-JDB80qyP.d.mts → lists-CvG_iVK3.d.mts} +8 -2
- package/dist/{lists-CdiIk_c1.d.ts → lists-UTp_tk7B.d.ts} +8 -2
- package/dist/managers/AutoSaveManager.d.mts +3 -3
- package/dist/managers/AutoSaveManager.d.ts +3 -3
- package/dist/managers/TableSelectionManager.d.mts +3 -3
- package/dist/managers/TableSelectionManager.d.ts +3 -3
- package/dist/managers/types.d.mts +3 -3
- package/dist/managers/types.d.ts +3 -3
- 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 +23 -23
- package/dist/mcp.d.mts +3 -3
- package/dist/mcp.d.ts +3 -3
- package/dist/mcp.js +3 -3
- package/dist/mcp.mjs +1 -1
- package/dist/{nodes-BXi1Uu3e.d.mts → nodes-CL8M0L-a.d.mts} +4 -2
- package/dist/{nodes-DfKj9kUA.d.ts → nodes-D7PTUJ2N.d.ts} +4 -2
- 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 +2 -2
- package/dist/prosemirror/commands/index.d.ts +2 -2
- 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 -3
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -3
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +11 -3
- package/dist/prosemirror/conversion/index.d.ts +11 -3
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- 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/index.d.mts +5 -5
- package/dist/prosemirror/index.d.ts +5 -5
- package/dist/prosemirror/index.js +1 -1
- package/dist/prosemirror/index.mjs +1 -1
- package/dist/prosemirror/plugins/index.d.mts +1 -1
- package/dist/prosemirror/plugins/index.d.ts +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 -4
- package/dist/prosemirror/schema/index.d.ts +4 -4
- 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 +2 -2
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +2 -2
- 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 +2 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/document.d.mts +25 -6
- package/dist/types/document.d.ts +25 -6
- package/dist/utils/comments.d.mts +2 -2
- package/dist/utils/comments.d.ts +2 -2
- package/dist/utils/index.d.mts +4 -4
- package/dist/utils/index.d.ts +4 -4
- package/package.json +1 -1
- 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-6LOYA7G5.mjs +0 -2
- package/dist/chunk-7VCMJCBY.js +0 -2
- 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-DV6IEOP5.js +0 -4
- package/dist/chunk-IBNUQL57.mjs +0 -2
- package/dist/chunk-NMSU4MWP.mjs +0 -1
- package/dist/chunk-OLKDLRJ4.js +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-TYYOBPNK.js +0 -1
- package/dist/chunk-UCZVMHB5.mjs +0 -59
- package/dist/chunk-VQ2QGHYS.js +0 -2
- package/dist/chunk-WZP6ZHBR.js +0 -1
- package/dist/chunk-YGHHSCPR.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';require('../chunk-TRJWRZZD.js');var chunk4GER4JLW_js=require('../chunk-4GER4JLW.js'),chunkI6PMX4BO_js=require('../chunk-I6PMX4BO.js');require('../chunk-UQ6WNWXX.js');var chunkYE357WVA_js=require('../chunk-YE357WVA.js'),chunkWZP6ZHBR_js=require('../chunk-WZP6ZHBR.js');require('../chunk-D4RPOJC7.js');var chunkIP2VXNWG_js=require('../chunk-IP2VXNWG.js');require('../chunk-JFZIXFRC.js'),require('../chunk-MZOVDLYL.js'),require('../chunk-YGHHSCPR.js'),require('../chunk-7VCMJCBY.js');var chunk6DK4UBGM_js=require('../chunk-6DK4UBGM.js'),chunk7SGC3CXJ_js=require('../chunk-7SGC3CXJ.js'),chunkXCMA7AY7_js=require('../chunk-XCMA7AY7.js'),chunkGGPKPXON_js=require('../chunk-GGPKPXON.js');require('../chunk-2KHWHVTA.js');var chunkOLKDLRJ4_js=require('../chunk-OLKDLRJ4.js'),chunkVQ2QGHYS_js=require('../chunk-VQ2QGHYS.js');require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js');var chunk6LVPRTB6_js=require('../chunk-6LVPRTB6.js'),chunkNERY274X_js=require('../chunk-NERY274X.js');require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-Q4CKLXWA.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');var prosemirrorState=require('prosemirror-state');function fe(i){let{selection:l,doc:s}=i,{from:g,to:h,empty:u}=l,b=s.resolve(g),o=0,n=0;s.forEach((a,m,f)=>{m<=g&&(o=f),m<=h&&(n=f);});let e={},t=b.parent,S=t.type.name==="paragraph"&&t.textContent.length===0,c=t.attrs?.defaultTextFormatting,p=i.storedMarks||l.$from.marks();S&&p.length===0&&c&&(e={...c});for(let a of p)switch(a.type.name){case "bold":e.bold=true;break;case "italic":e.italic=true;break;case "underline":e.underline={style:a.attrs.style||"single",color:a.attrs.color};break;case "strike":a.attrs.double?e.doubleStrike=true:e.strike=true;break;case "textColor":e.color={rgb:a.attrs.rgb,themeColor:a.attrs.themeColor};break;case "highlight":e.highlight=a.attrs.color;break;case "fontSize":e.fontSize=a.attrs.size;break;case "fontFamily":e.fontFamily={ascii:a.attrs.ascii,hAnsi:a.attrs.hAnsi};break;case "superscript":e.vertAlign="superscript";break;case "subscript":e.vertAlign="subscript";break}let r={},d=null;return t.type.name==="paragraph"&&(t.attrs.alignment&&(r.alignment=t.attrs.alignment),t.attrs.lineSpacing&&(r.lineSpacing=t.attrs.lineSpacing,r.lineSpacingRule=t.attrs.lineSpacingRule),t.attrs.numPr&&(r.numPr=t.attrs.numPr),t.attrs.indentLeft&&(r.indentLeft=t.attrs.indentLeft),t.attrs.indentRight&&(r.indentRight=t.attrs.indentRight),t.attrs.indentFirstLine&&(r.indentFirstLine=t.attrs.indentFirstLine),t.attrs.hangingIndent&&(r.hangingIndent=t.attrs.hangingIndent),t.attrs.tabs&&(r.tabs=t.attrs.tabs),t.attrs.bidi&&(r.bidi=true),t.attrs.styleId&&(d=t.attrs.styleId)),{hasSelection:!u,isMultiParagraph:o!==n,textFormatting:e,paragraphFormatting:r,styleId:d,startParagraphIndex:o,endParagraphIndex:n}}Object.defineProperty(exports,"LayoutSelectionGate",{enumerable:true,get:function(){return chunk4GER4JLW_js.a}});Object.defineProperty(exports,"findParagraphByParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.b}});Object.defineProperty(exports,"findStartPosForParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.a}});Object.defineProperty(exports,"fromProseDoc",{enumerable:true,get:function(){return chunkYE357WVA_js.a}});Object.defineProperty(exports,"updateDocumentContent",{enumerable:true,get:function(){return chunkYE357WVA_js.b}});Object.defineProperty(exports,"createEmptyDoc",{enumerable:true,get:function(){return chunkWZP6ZHBR_js.d}});Object.defineProperty(exports,"footnoteToProseDoc",{enumerable:true,get:function(){return chunkWZP6ZHBR_js.c}});Object.defineProperty(exports,"headerFooterToProseDoc",{enumerable:true,get:function(){return chunkWZP6ZHBR_js.b}});Object.defineProperty(exports,"toProseDoc",{enumerable:true,get:function(){return chunkWZP6ZHBR_js.a}});Object.defineProperty(exports,"StyleResolver",{enumerable:true,get:function(){return chunkIP2VXNWG_js.a}});Object.defineProperty(exports,"createStyleResolver",{enumerable:true,get:function(){return chunkIP2VXNWG_js.b}});Object.defineProperty(exports,"addColumnLeft",{enumerable:true,get:function(){return chunk6DK4UBGM_js.g}});Object.defineProperty(exports,"addColumnRight",{enumerable:true,get:function(){return chunk6DK4UBGM_js.h}});Object.defineProperty(exports,"addRowAbove",{enumerable:true,get:function(){return chunk6DK4UBGM_js.d}});Object.defineProperty(exports,"addRowBelow",{enumerable:true,get:function(){return chunk6DK4UBGM_js.e}});Object.defineProperty(exports,"applyTableStyle",{enumerable:true,get:function(){return chunk6DK4UBGM_js.E}});Object.defineProperty(exports,"autoFitContents",{enumerable:true,get:function(){return chunk6DK4UBGM_js.C}});Object.defineProperty(exports,"deleteColumn",{enumerable:true,get:function(){return chunk6DK4UBGM_js.i}});Object.defineProperty(exports,"deleteRow",{enumerable:true,get:function(){return chunk6DK4UBGM_js.f}});Object.defineProperty(exports,"deleteTable",{enumerable:true,get:function(){return chunk6DK4UBGM_js.j}});Object.defineProperty(exports,"distributeColumns",{enumerable:true,get:function(){return chunk6DK4UBGM_js.B}});Object.defineProperty(exports,"insertTable",{enumerable:true,get:function(){return chunk6DK4UBGM_js.c}});Object.defineProperty(exports,"mergeCells",{enumerable:true,get:function(){return chunk6DK4UBGM_js.n}});Object.defineProperty(exports,"removeTableBorders",{enumerable:true,get:function(){return chunk6DK4UBGM_js.r}});Object.defineProperty(exports,"selectColumn",{enumerable:true,get:function(){return chunk6DK4UBGM_js.m}});Object.defineProperty(exports,"selectRow",{enumerable:true,get:function(){return chunk6DK4UBGM_js.l}});Object.defineProperty(exports,"selectTable",{enumerable:true,get:function(){return chunk6DK4UBGM_js.k}});Object.defineProperty(exports,"setAllTableBorders",{enumerable:true,get:function(){return chunk6DK4UBGM_js.s}});Object.defineProperty(exports,"setCellBorder",{enumerable:true,get:function(){return chunk6DK4UBGM_js.p}});Object.defineProperty(exports,"setCellFillColor",{enumerable:true,get:function(){return chunk6DK4UBGM_js.F}});Object.defineProperty(exports,"setCellMargins",{enumerable:true,get:function(){return chunk6DK4UBGM_js.w}});Object.defineProperty(exports,"setCellTextDirection",{enumerable:true,get:function(){return chunk6DK4UBGM_js.x}});Object.defineProperty(exports,"setCellVerticalAlign",{enumerable:true,get:function(){return chunk6DK4UBGM_js.v}});Object.defineProperty(exports,"setInsideTableBorders",{enumerable:true,get:function(){return chunk6DK4UBGM_js.u}});Object.defineProperty(exports,"setOutsideTableBorders",{enumerable:true,get:function(){return chunk6DK4UBGM_js.t}});Object.defineProperty(exports,"setRowHeight",{enumerable:true,get:function(){return chunk6DK4UBGM_js.z}});Object.defineProperty(exports,"setTableBorderColor",{enumerable:true,get:function(){return chunk6DK4UBGM_js.G}});Object.defineProperty(exports,"setTableBorderWidth",{enumerable:true,get:function(){return chunk6DK4UBGM_js.H}});Object.defineProperty(exports,"setTableBorders",{enumerable:true,get:function(){return chunk6DK4UBGM_js.q}});Object.defineProperty(exports,"setTableProperties",{enumerable:true,get:function(){return chunk6DK4UBGM_js.D}});Object.defineProperty(exports,"splitCell",{enumerable:true,get:function(){return chunk6DK4UBGM_js.o}});Object.defineProperty(exports,"toggleHeaderRow",{enumerable:true,get:function(){return chunk6DK4UBGM_js.A}});Object.defineProperty(exports,"toggleNoWrap",{enumerable:true,get:function(){return chunk6DK4UBGM_js.y}});Object.defineProperty(exports,"addTabStop",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.z}});Object.defineProperty(exports,"alignCenter",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.c}});Object.defineProperty(exports,"alignJustify",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.e}});Object.defineProperty(exports,"alignLeft",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.b}});Object.defineProperty(exports,"alignRight",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.d}});Object.defineProperty(exports,"applyStyle",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.v}});Object.defineProperty(exports,"clearStyle",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.w}});Object.defineProperty(exports,"decreaseIndent",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.k}});Object.defineProperty(exports,"decreaseListLevel",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.r}});Object.defineProperty(exports,"generateTOC",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.D}});Object.defineProperty(exports,"increaseIndent",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.j}});Object.defineProperty(exports,"increaseListLevel",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.q}});Object.defineProperty(exports,"removeList",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.s}});Object.defineProperty(exports,"removeTabStop",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.A}});Object.defineProperty(exports,"setAlignment",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.a}});Object.defineProperty(exports,"setIndentFirstLine",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.n}});Object.defineProperty(exports,"setIndentLeft",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.l}});Object.defineProperty(exports,"setIndentRight",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.m}});Object.defineProperty(exports,"setLineSpacing",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.f}});Object.defineProperty(exports,"setLtr",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.C}});Object.defineProperty(exports,"setRtl",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.B}});Object.defineProperty(exports,"toggleBulletList",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.o}});Object.defineProperty(exports,"toggleNumberedList",{enumerable:true,get:function(){return chunk7SGC3CXJ_js.p}});Object.defineProperty(exports,"clearFontFamily",{enumerable:true,get:function(){return chunkXCMA7AY7_js.o}});Object.defineProperty(exports,"clearFontSize",{enumerable:true,get:function(){return chunkXCMA7AY7_js.m}});Object.defineProperty(exports,"clearHighlight",{enumerable:true,get:function(){return chunkXCMA7AY7_js.k}});Object.defineProperty(exports,"clearTextColor",{enumerable:true,get:function(){return chunkXCMA7AY7_js.i}});Object.defineProperty(exports,"insertHyperlink",{enumerable:true,get:function(){return chunkXCMA7AY7_js.s}});Object.defineProperty(exports,"removeHyperlink",{enumerable:true,get:function(){return chunkXCMA7AY7_js.r}});Object.defineProperty(exports,"setFontFamily",{enumerable:true,get:function(){return chunkXCMA7AY7_js.n}});Object.defineProperty(exports,"setFontSize",{enumerable:true,get:function(){return chunkXCMA7AY7_js.l}});Object.defineProperty(exports,"setHighlight",{enumerable:true,get:function(){return chunkXCMA7AY7_js.j}});Object.defineProperty(exports,"setHyperlink",{enumerable:true,get:function(){return chunkXCMA7AY7_js.q}});Object.defineProperty(exports,"setTextColor",{enumerable:true,get:function(){return chunkXCMA7AY7_js.h}});Object.defineProperty(exports,"toggleBold",{enumerable:true,get:function(){return chunkXCMA7AY7_js.b}});Object.defineProperty(exports,"toggleItalic",{enumerable:true,get:function(){return chunkXCMA7AY7_js.c}});Object.defineProperty(exports,"toggleStrike",{enumerable:true,get:function(){return chunkXCMA7AY7_js.e}});Object.defineProperty(exports,"toggleSubscript",{enumerable:true,get:function(){return chunkXCMA7AY7_js.g}});Object.defineProperty(exports,"toggleSuperscript",{enumerable:true,get:function(){return chunkXCMA7AY7_js.f}});Object.defineProperty(exports,"toggleUnderline",{enumerable:true,get:function(){return chunkXCMA7AY7_js.d}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunkGGPKPXON_js.a}});Object.defineProperty(exports,"schema",{enumerable:true,get:function(){return chunkOLKDLRJ4_js.b}});Object.defineProperty(exports,"clearFormatting",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.h}});Object.defineProperty(exports,"findHyperlinkRangeAt",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.n}});Object.defineProperty(exports,"getHyperlinkAttrs",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.l}});Object.defineProperty(exports,"getListInfo",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.p}});Object.defineProperty(exports,"getMarkAttr",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.f}});Object.defineProperty(exports,"getParagraphAlignment",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.a}});Object.defineProperty(exports,"getParagraphBidi",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.d}});Object.defineProperty(exports,"getSelectedText",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.m}});Object.defineProperty(exports,"getStyleId",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.c}});Object.defineProperty(exports,"isHyperlinkActive",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.k}});Object.defineProperty(exports,"isInList",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.o}});Object.defineProperty(exports,"isMarkActive",{enumerable:true,get:function(){return chunkVQ2QGHYS_js.e}});Object.defineProperty(exports,"createSelectionTrackerPlugin",{enumerable:true,get:function(){return chunk6LVPRTB6_js.c}});Object.defineProperty(exports,"extractSelectionContext",{enumerable:true,get:function(){return chunk6LVPRTB6_js.b}});Object.defineProperty(exports,"getSelectionContext",{enumerable:true,get:function(){return chunk6LVPRTB6_js.d}});Object.defineProperty(exports,"selectionTrackerKey",{enumerable:true,get:function(){return chunk6LVPRTB6_js.a}});Object.defineProperty(exports,"getTableContext",{enumerable:true,get:function(){return chunkNERY274X_js.e}});Object.defineProperty(exports,"isInTable",{enumerable:true,get:function(){return chunkNERY274X_js.f}});Object.defineProperty(exports,"TextSelection",{enumerable:true,get:function(){return prosemirrorState.TextSelection}});exports.extractSelectionState=fe;
|
|
1
|
+
'use strict';require('../chunk-TRJWRZZD.js');var chunk4GER4JLW_js=require('../chunk-4GER4JLW.js'),chunkI6PMX4BO_js=require('../chunk-I6PMX4BO.js');require('../chunk-UQ6WNWXX.js');var chunkYE357WVA_js=require('../chunk-YE357WVA.js'),chunkX3NB7STJ_js=require('../chunk-X3NB7STJ.js');require('../chunk-D4RPOJC7.js');var chunkIP2VXNWG_js=require('../chunk-IP2VXNWG.js');require('../chunk-JFZIXFRC.js'),require('../chunk-MZOVDLYL.js'),require('../chunk-EPX7BBJD.js'),require('../chunk-D536HC5M.js'),require('../chunk-TMISJEGL.js');var chunkXOH7YAYL_js=require('../chunk-XOH7YAYL.js'),chunkXBHF5Q2F_js=require('../chunk-XBHF5Q2F.js'),chunkSAFW7UQZ_js=require('../chunk-SAFW7UQZ.js'),chunkGGPKPXON_js=require('../chunk-GGPKPXON.js');require('../chunk-2KHWHVTA.js');var chunkYVYB4YCI_js=require('../chunk-YVYB4YCI.js'),chunkIO6HZ7KR_js=require('../chunk-IO6HZ7KR.js');require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js');var chunk6LVPRTB6_js=require('../chunk-6LVPRTB6.js'),chunkNERY274X_js=require('../chunk-NERY274X.js');require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-Q4CKLXWA.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-DC7S76ZX.js');var prosemirrorState=require('prosemirror-state');function fe(i){let{selection:l,doc:s}=i,{from:g,to:h,empty:u}=l,b=s.resolve(g),o=0,n=0;s.forEach((a,m,f)=>{m<=g&&(o=f),m<=h&&(n=f);});let e={},t=b.parent,S=t.type.name==="paragraph"&&t.textContent.length===0,c=t.attrs?.defaultTextFormatting,p=i.storedMarks||l.$from.marks();S&&p.length===0&&c&&(e={...c});for(let a of p)switch(a.type.name){case "bold":e.bold=true;break;case "italic":e.italic=true;break;case "underline":e.underline={style:a.attrs.style||"single",color:a.attrs.color};break;case "strike":a.attrs.double?e.doubleStrike=true:e.strike=true;break;case "textColor":e.color={rgb:a.attrs.rgb,themeColor:a.attrs.themeColor};break;case "highlight":e.highlight=a.attrs.color;break;case "fontSize":e.fontSize=a.attrs.size;break;case "fontFamily":e.fontFamily={ascii:a.attrs.ascii,hAnsi:a.attrs.hAnsi};break;case "superscript":e.vertAlign="superscript";break;case "subscript":e.vertAlign="subscript";break}let r={},d=null;return t.type.name==="paragraph"&&(t.attrs.alignment&&(r.alignment=t.attrs.alignment),t.attrs.lineSpacing&&(r.lineSpacing=t.attrs.lineSpacing,r.lineSpacingRule=t.attrs.lineSpacingRule),t.attrs.numPr&&(r.numPr=t.attrs.numPr),t.attrs.indentLeft&&(r.indentLeft=t.attrs.indentLeft),t.attrs.indentRight&&(r.indentRight=t.attrs.indentRight),t.attrs.indentFirstLine&&(r.indentFirstLine=t.attrs.indentFirstLine),t.attrs.hangingIndent&&(r.hangingIndent=t.attrs.hangingIndent),t.attrs.tabs&&(r.tabs=t.attrs.tabs),t.attrs.bidi&&(r.bidi=true),t.attrs.styleId&&(d=t.attrs.styleId)),{hasSelection:!u,isMultiParagraph:o!==n,textFormatting:e,paragraphFormatting:r,styleId:d,startParagraphIndex:o,endParagraphIndex:n}}Object.defineProperty(exports,"LayoutSelectionGate",{enumerable:true,get:function(){return chunk4GER4JLW_js.a}});Object.defineProperty(exports,"findParagraphByParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.b}});Object.defineProperty(exports,"findStartPosForParaId",{enumerable:true,get:function(){return chunkI6PMX4BO_js.a}});Object.defineProperty(exports,"fromProseDoc",{enumerable:true,get:function(){return chunkYE357WVA_js.a}});Object.defineProperty(exports,"updateDocumentContent",{enumerable:true,get:function(){return chunkYE357WVA_js.b}});Object.defineProperty(exports,"createEmptyDoc",{enumerable:true,get:function(){return chunkX3NB7STJ_js.d}});Object.defineProperty(exports,"footnoteToProseDoc",{enumerable:true,get:function(){return chunkX3NB7STJ_js.c}});Object.defineProperty(exports,"headerFooterToProseDoc",{enumerable:true,get:function(){return chunkX3NB7STJ_js.b}});Object.defineProperty(exports,"toProseDoc",{enumerable:true,get:function(){return chunkX3NB7STJ_js.a}});Object.defineProperty(exports,"StyleResolver",{enumerable:true,get:function(){return chunkIP2VXNWG_js.a}});Object.defineProperty(exports,"createStyleResolver",{enumerable:true,get:function(){return chunkIP2VXNWG_js.b}});Object.defineProperty(exports,"addColumnLeft",{enumerable:true,get:function(){return chunkXOH7YAYL_js.g}});Object.defineProperty(exports,"addColumnRight",{enumerable:true,get:function(){return chunkXOH7YAYL_js.h}});Object.defineProperty(exports,"addRowAbove",{enumerable:true,get:function(){return chunkXOH7YAYL_js.d}});Object.defineProperty(exports,"addRowBelow",{enumerable:true,get:function(){return chunkXOH7YAYL_js.e}});Object.defineProperty(exports,"applyTableStyle",{enumerable:true,get:function(){return chunkXOH7YAYL_js.E}});Object.defineProperty(exports,"autoFitContents",{enumerable:true,get:function(){return chunkXOH7YAYL_js.C}});Object.defineProperty(exports,"deleteColumn",{enumerable:true,get:function(){return chunkXOH7YAYL_js.i}});Object.defineProperty(exports,"deleteRow",{enumerable:true,get:function(){return chunkXOH7YAYL_js.f}});Object.defineProperty(exports,"deleteTable",{enumerable:true,get:function(){return chunkXOH7YAYL_js.j}});Object.defineProperty(exports,"distributeColumns",{enumerable:true,get:function(){return chunkXOH7YAYL_js.B}});Object.defineProperty(exports,"insertTable",{enumerable:true,get:function(){return chunkXOH7YAYL_js.c}});Object.defineProperty(exports,"mergeCells",{enumerable:true,get:function(){return chunkXOH7YAYL_js.n}});Object.defineProperty(exports,"removeTableBorders",{enumerable:true,get:function(){return chunkXOH7YAYL_js.r}});Object.defineProperty(exports,"selectColumn",{enumerable:true,get:function(){return chunkXOH7YAYL_js.m}});Object.defineProperty(exports,"selectRow",{enumerable:true,get:function(){return chunkXOH7YAYL_js.l}});Object.defineProperty(exports,"selectTable",{enumerable:true,get:function(){return chunkXOH7YAYL_js.k}});Object.defineProperty(exports,"setAllTableBorders",{enumerable:true,get:function(){return chunkXOH7YAYL_js.s}});Object.defineProperty(exports,"setCellBorder",{enumerable:true,get:function(){return chunkXOH7YAYL_js.p}});Object.defineProperty(exports,"setCellFillColor",{enumerable:true,get:function(){return chunkXOH7YAYL_js.F}});Object.defineProperty(exports,"setCellMargins",{enumerable:true,get:function(){return chunkXOH7YAYL_js.w}});Object.defineProperty(exports,"setCellTextDirection",{enumerable:true,get:function(){return chunkXOH7YAYL_js.x}});Object.defineProperty(exports,"setCellVerticalAlign",{enumerable:true,get:function(){return chunkXOH7YAYL_js.v}});Object.defineProperty(exports,"setInsideTableBorders",{enumerable:true,get:function(){return chunkXOH7YAYL_js.u}});Object.defineProperty(exports,"setOutsideTableBorders",{enumerable:true,get:function(){return chunkXOH7YAYL_js.t}});Object.defineProperty(exports,"setRowHeight",{enumerable:true,get:function(){return chunkXOH7YAYL_js.z}});Object.defineProperty(exports,"setTableBorderColor",{enumerable:true,get:function(){return chunkXOH7YAYL_js.G}});Object.defineProperty(exports,"setTableBorderWidth",{enumerable:true,get:function(){return chunkXOH7YAYL_js.H}});Object.defineProperty(exports,"setTableBorders",{enumerable:true,get:function(){return chunkXOH7YAYL_js.q}});Object.defineProperty(exports,"setTableProperties",{enumerable:true,get:function(){return chunkXOH7YAYL_js.D}});Object.defineProperty(exports,"splitCell",{enumerable:true,get:function(){return chunkXOH7YAYL_js.o}});Object.defineProperty(exports,"toggleHeaderRow",{enumerable:true,get:function(){return chunkXOH7YAYL_js.A}});Object.defineProperty(exports,"toggleNoWrap",{enumerable:true,get:function(){return chunkXOH7YAYL_js.y}});Object.defineProperty(exports,"addTabStop",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.z}});Object.defineProperty(exports,"alignCenter",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.c}});Object.defineProperty(exports,"alignJustify",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.e}});Object.defineProperty(exports,"alignLeft",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.b}});Object.defineProperty(exports,"alignRight",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.d}});Object.defineProperty(exports,"applyStyle",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.v}});Object.defineProperty(exports,"clearStyle",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.w}});Object.defineProperty(exports,"decreaseIndent",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.k}});Object.defineProperty(exports,"decreaseListLevel",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.r}});Object.defineProperty(exports,"generateTOC",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.D}});Object.defineProperty(exports,"increaseIndent",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.j}});Object.defineProperty(exports,"increaseListLevel",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.q}});Object.defineProperty(exports,"removeList",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.s}});Object.defineProperty(exports,"removeTabStop",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.A}});Object.defineProperty(exports,"setAlignment",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.a}});Object.defineProperty(exports,"setIndentFirstLine",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.n}});Object.defineProperty(exports,"setIndentLeft",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.l}});Object.defineProperty(exports,"setIndentRight",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.m}});Object.defineProperty(exports,"setLineSpacing",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.f}});Object.defineProperty(exports,"setLtr",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.C}});Object.defineProperty(exports,"setRtl",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.B}});Object.defineProperty(exports,"toggleBulletList",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.o}});Object.defineProperty(exports,"toggleNumberedList",{enumerable:true,get:function(){return chunkXBHF5Q2F_js.p}});Object.defineProperty(exports,"clearFontFamily",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.o}});Object.defineProperty(exports,"clearFontSize",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.m}});Object.defineProperty(exports,"clearHighlight",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.k}});Object.defineProperty(exports,"clearTextColor",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.i}});Object.defineProperty(exports,"insertHyperlink",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.s}});Object.defineProperty(exports,"removeHyperlink",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.r}});Object.defineProperty(exports,"setFontFamily",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.n}});Object.defineProperty(exports,"setFontSize",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.l}});Object.defineProperty(exports,"setHighlight",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.j}});Object.defineProperty(exports,"setHyperlink",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.q}});Object.defineProperty(exports,"setTextColor",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.h}});Object.defineProperty(exports,"toggleBold",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.b}});Object.defineProperty(exports,"toggleItalic",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.c}});Object.defineProperty(exports,"toggleStrike",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.e}});Object.defineProperty(exports,"toggleSubscript",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.g}});Object.defineProperty(exports,"toggleSuperscript",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.f}});Object.defineProperty(exports,"toggleUnderline",{enumerable:true,get:function(){return chunkSAFW7UQZ_js.d}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunkGGPKPXON_js.a}});Object.defineProperty(exports,"schema",{enumerable:true,get:function(){return chunkYVYB4YCI_js.b}});Object.defineProperty(exports,"clearFormatting",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.h}});Object.defineProperty(exports,"findHyperlinkRangeAt",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.n}});Object.defineProperty(exports,"getHyperlinkAttrs",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.l}});Object.defineProperty(exports,"getListInfo",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.p}});Object.defineProperty(exports,"getMarkAttr",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.f}});Object.defineProperty(exports,"getParagraphAlignment",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.a}});Object.defineProperty(exports,"getParagraphBidi",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.d}});Object.defineProperty(exports,"getSelectedText",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.m}});Object.defineProperty(exports,"getStyleId",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.c}});Object.defineProperty(exports,"isHyperlinkActive",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.k}});Object.defineProperty(exports,"isInList",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.o}});Object.defineProperty(exports,"isMarkActive",{enumerable:true,get:function(){return chunkIO6HZ7KR_js.e}});Object.defineProperty(exports,"createSelectionTrackerPlugin",{enumerable:true,get:function(){return chunk6LVPRTB6_js.c}});Object.defineProperty(exports,"extractSelectionContext",{enumerable:true,get:function(){return chunk6LVPRTB6_js.b}});Object.defineProperty(exports,"getSelectionContext",{enumerable:true,get:function(){return chunk6LVPRTB6_js.d}});Object.defineProperty(exports,"selectionTrackerKey",{enumerable:true,get:function(){return chunk6LVPRTB6_js.a}});Object.defineProperty(exports,"getTableContext",{enumerable:true,get:function(){return chunkNERY274X_js.e}});Object.defineProperty(exports,"isInTable",{enumerable:true,get:function(){return chunkNERY274X_js.f}});Object.defineProperty(exports,"TextSelection",{enumerable:true,get:function(){return prosemirrorState.TextSelection}});exports.extractSelectionState=fe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import'../chunk-NNQWQOC5.mjs';export{a as LayoutSelectionGate}from'../chunk-Q5QOBZWT.mjs';export{b as findParagraphByParaId,a as findStartPosForParaId}from'../chunk-3SXJPJSV.mjs';import'../chunk-RNOXNNSD.mjs';export{a as fromProseDoc,b as updateDocumentContent}from'../chunk-P3AXSRLG.mjs';export{d as createEmptyDoc,c as footnoteToProseDoc,b as headerFooterToProseDoc,a as toProseDoc}from'../chunk-
|
|
1
|
+
import'../chunk-NNQWQOC5.mjs';export{a as LayoutSelectionGate}from'../chunk-Q5QOBZWT.mjs';export{b as findParagraphByParaId,a as findStartPosForParaId}from'../chunk-3SXJPJSV.mjs';import'../chunk-RNOXNNSD.mjs';export{a as fromProseDoc,b as updateDocumentContent}from'../chunk-P3AXSRLG.mjs';export{d as createEmptyDoc,c as footnoteToProseDoc,b as headerFooterToProseDoc,a as toProseDoc}from'../chunk-NO5LW2DQ.mjs';import'../chunk-LBKMYD3M.mjs';export{a as StyleResolver,b as createStyleResolver}from'../chunk-NBLJPT54.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-ILJUDEZ5.mjs';import'../chunk-QVEAQOMR.mjs';import'../chunk-HL5PQT3A.mjs';import'../chunk-B6LYBJ4H.mjs';export{g as addColumnLeft,h as addColumnRight,d as addRowAbove,e as addRowBelow,E as applyTableStyle,C as autoFitContents,i as deleteColumn,f as deleteRow,j as deleteTable,B as distributeColumns,c as insertTable,n as mergeCells,r as removeTableBorders,m as selectColumn,l as selectRow,k as selectTable,s as setAllTableBorders,p as setCellBorder,F as setCellFillColor,w as setCellMargins,x as setCellTextDirection,v as setCellVerticalAlign,u as setInsideTableBorders,t as setOutsideTableBorders,z as setRowHeight,G as setTableBorderColor,H as setTableBorderWidth,q as setTableBorders,D as setTableProperties,o as splitCell,A as toggleHeaderRow,y as toggleNoWrap}from'../chunk-QXHL67FG.mjs';export{z as addTabStop,c as alignCenter,e as alignJustify,b as alignLeft,d as alignRight,v as applyStyle,w as clearStyle,k as decreaseIndent,r as decreaseListLevel,D as generateTOC,j as increaseIndent,q as increaseListLevel,s as removeList,A as removeTabStop,a as setAlignment,n as setIndentFirstLine,l as setIndentLeft,m as setIndentRight,f as setLineSpacing,C as setLtr,B as setRtl,o as toggleBulletList,p as toggleNumberedList}from'../chunk-XWQB6APW.mjs';export{o as clearFontFamily,m as clearFontSize,k as clearHighlight,i as clearTextColor,s as insertHyperlink,r as removeHyperlink,n as setFontFamily,l as setFontSize,j as setHighlight,q as setHyperlink,h as setTextColor,b as toggleBold,c as toggleItalic,e as toggleStrike,g as toggleSubscript,f as toggleSuperscript,d as toggleUnderline}from'../chunk-G7AKYAKU.mjs';export{a as insertPageBreak}from'../chunk-3COGZG7O.mjs';import'../chunk-KQTB5Y7P.mjs';export{b as schema}from'../chunk-TGPS3SRR.mjs';export{h as clearFormatting,n as findHyperlinkRangeAt,l as getHyperlinkAttrs,p as getListInfo,f as getMarkAttr,a as getParagraphAlignment,d as getParagraphBidi,m as getSelectedText,c as getStyleId,k as isHyperlinkActive,o as isInList,e as isMarkActive}from'../chunk-BRHHK4MG.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';export{c as createSelectionTrackerPlugin,b as extractSelectionContext,d as getSelectionContext,a as selectionTrackerKey}from'../chunk-BGY3CB37.mjs';export{e as getTableContext,f as isInTable}from'../chunk-CP5OSG5Z.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-VQWZHPWI.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';export{TextSelection}from'prosemirror-state';function fe(i){let{selection:l,doc:s}=i,{from:g,to:h,empty:u}=l,b=s.resolve(g),o=0,n=0;s.forEach((a,m,f)=>{m<=g&&(o=f),m<=h&&(n=f);});let e={},t=b.parent,S=t.type.name==="paragraph"&&t.textContent.length===0,c=t.attrs?.defaultTextFormatting,p=i.storedMarks||l.$from.marks();S&&p.length===0&&c&&(e={...c});for(let a of p)switch(a.type.name){case "bold":e.bold=true;break;case "italic":e.italic=true;break;case "underline":e.underline={style:a.attrs.style||"single",color:a.attrs.color};break;case "strike":a.attrs.double?e.doubleStrike=true:e.strike=true;break;case "textColor":e.color={rgb:a.attrs.rgb,themeColor:a.attrs.themeColor};break;case "highlight":e.highlight=a.attrs.color;break;case "fontSize":e.fontSize=a.attrs.size;break;case "fontFamily":e.fontFamily={ascii:a.attrs.ascii,hAnsi:a.attrs.hAnsi};break;case "superscript":e.vertAlign="superscript";break;case "subscript":e.vertAlign="subscript";break}let r={},d=null;return t.type.name==="paragraph"&&(t.attrs.alignment&&(r.alignment=t.attrs.alignment),t.attrs.lineSpacing&&(r.lineSpacing=t.attrs.lineSpacing,r.lineSpacingRule=t.attrs.lineSpacingRule),t.attrs.numPr&&(r.numPr=t.attrs.numPr),t.attrs.indentLeft&&(r.indentLeft=t.attrs.indentLeft),t.attrs.indentRight&&(r.indentRight=t.attrs.indentRight),t.attrs.indentFirstLine&&(r.indentFirstLine=t.attrs.indentFirstLine),t.attrs.hangingIndent&&(r.hangingIndent=t.attrs.hangingIndent),t.attrs.tabs&&(r.tabs=t.attrs.tabs),t.attrs.bidi&&(r.bidi=true),t.attrs.styleId&&(d=t.attrs.styleId)),{hasSelection:!u,isMultiParagraph:o!==n,textFormatting:e,paragraphFormatting:r,styleId:d,startParagraphIndex:o,endParagraphIndex:n}}export{fe as extractSelectionState};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export { SelectionChangeCallback, SelectionContext, createSelectionTrackerPlugin, extractSelectionContext, getSelectionContext, selectionTrackerKey } from './selectionTracker.mjs';
|
|
10
10
|
import { Plugin, EditorState, Transaction, PluginKey } from 'prosemirror-state';
|
|
11
|
-
import '../../formatting-
|
|
11
|
+
import '../../formatting-BH4hcZiq.mjs';
|
|
12
12
|
import '../../colors-C3vA7HUU.mjs';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export { SelectionChangeCallback, SelectionContext, createSelectionTrackerPlugin, extractSelectionContext, getSelectionContext, selectionTrackerKey } from './selectionTracker.js';
|
|
10
10
|
import { Plugin, EditorState, Transaction, PluginKey } from 'prosemirror-state';
|
|
11
|
-
import '../../formatting-
|
|
11
|
+
import '../../formatting-_OXU8gLB.js';
|
|
12
12
|
import '../../colors-C3vA7HUU.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
12
|
import { Plugin, EditorState, PluginKey } from 'prosemirror-state';
|
|
13
|
-
import { T as TextFormatting, P as ParagraphFormatting } from '../../formatting-
|
|
13
|
+
import { T as TextFormatting, P as ParagraphFormatting } from '../../formatting-BH4hcZiq.mjs';
|
|
14
14
|
import '../../colors-C3vA7HUU.mjs';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
12
|
import { Plugin, EditorState, PluginKey } from 'prosemirror-state';
|
|
13
|
-
import { T as TextFormatting, P as ParagraphFormatting } from '../../formatting-
|
|
13
|
+
import { T as TextFormatting, P as ParagraphFormatting } from '../../formatting-_OXU8gLB.js';
|
|
14
14
|
import '../../colors-C3vA7HUU.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import * as prosemirror_model from 'prosemirror-model';
|
|
11
11
|
import { a as ExtensionManager } from '../../types-RchZmPFN.mjs';
|
|
12
|
-
export { I as ImageAttrs, a as ImagePositionAttrs, P as ParagraphAttrs, T as TableAttrs, b as TableCellAttrs, c as TableRowAttrs } from '../../nodes-
|
|
13
|
-
export { F as FontFamilyAttrs, a as FontSizeAttrs, H as HyperlinkAttrs, T as TextColorAttrs, U as UnderlineAttrs } from '../../marks-
|
|
12
|
+
export { I as ImageAttrs, a as ImagePositionAttrs, P as ParagraphAttrs, T as TableAttrs, b as TableCellAttrs, c as TableRowAttrs } from '../../nodes-CL8M0L-a.mjs';
|
|
13
|
+
export { F as FontFamilyAttrs, a as FontSizeAttrs, H as HyperlinkAttrs, T as TextColorAttrs, U as UnderlineAttrs } from '../../marks-BY573yZn.mjs';
|
|
14
14
|
import 'prosemirror-state';
|
|
15
|
-
import '../../formatting-
|
|
15
|
+
import '../../formatting-BH4hcZiq.mjs';
|
|
16
16
|
import '../../colors-C3vA7HUU.mjs';
|
|
17
|
-
import '../../lists-
|
|
17
|
+
import '../../lists-CvG_iVK3.mjs';
|
|
18
18
|
import '../../docx/wrapTypes.mjs';
|
|
19
19
|
import '../../types/content.mjs';
|
|
20
20
|
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import * as prosemirror_model from 'prosemirror-model';
|
|
11
11
|
import { a as ExtensionManager } from '../../types-RchZmPFN.js';
|
|
12
|
-
export { I as ImageAttrs, a as ImagePositionAttrs, P as ParagraphAttrs, T as TableAttrs, b as TableCellAttrs, c as TableRowAttrs } from '../../nodes-
|
|
13
|
-
export { F as FontFamilyAttrs, a as FontSizeAttrs, H as HyperlinkAttrs, T as TextColorAttrs, U as UnderlineAttrs } from '../../marks-
|
|
12
|
+
export { I as ImageAttrs, a as ImagePositionAttrs, P as ParagraphAttrs, T as TableAttrs, b as TableCellAttrs, c as TableRowAttrs } from '../../nodes-D7PTUJ2N.js';
|
|
13
|
+
export { F as FontFamilyAttrs, a as FontSizeAttrs, H as HyperlinkAttrs, T as TextColorAttrs, U as UnderlineAttrs } from '../../marks-CjC9tF5k.js';
|
|
14
14
|
import 'prosemirror-state';
|
|
15
|
-
import '../../formatting-
|
|
15
|
+
import '../../formatting-_OXU8gLB.js';
|
|
16
16
|
import '../../colors-C3vA7HUU.js';
|
|
17
|
-
import '../../lists-
|
|
17
|
+
import '../../lists-UTp_tk7B.js';
|
|
18
18
|
import '../../docx/wrapTypes.js';
|
|
19
19
|
import '../../types/content.js';
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkYVYB4YCI_js=require('../../chunk-YVYB4YCI.js');require('../../chunk-IO6HZ7KR.js'),require('../../chunk-BHBOAP6Z.js'),require('../../chunk-MZ7LW5CH.js'),require('../../chunk-N3Y5BUKV.js'),require('../../chunk-6LVPRTB6.js'),require('../../chunk-NERY274X.js'),require('../../chunk-MJ5FQX7Q.js'),require('../../chunk-C2BAPYGJ.js'),require('../../chunk-Q4CKLXWA.js'),require('../../chunk-4Q2IP5FW.js'),require('../../chunk-DC7S76ZX.js');Object.defineProperty(exports,"schema",{enumerable:true,get:function(){return chunkYVYB4YCI_js.b}});Object.defineProperty(exports,"singletonManager",{enumerable:true,get:function(){return chunkYVYB4YCI_js.a}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{b as schema,a as singletonManager}from'../../chunk-
|
|
1
|
+
export{b as schema,a as singletonManager}from'../../chunk-TGPS3SRR.mjs';import'../../chunk-BRHHK4MG.mjs';import'../../chunk-MOKKS75W.mjs';import'../../chunk-OZMNIX6U.mjs';import'../../chunk-AMENZY5F.mjs';import'../../chunk-BGY3CB37.mjs';import'../../chunk-CP5OSG5Z.mjs';import'../../chunk-67LVRQIR.mjs';import'../../chunk-LE67NTCN.mjs';import'../../chunk-VQWZHPWI.mjs';import'../../chunk-VW22RZ6C.mjs';import'../../chunk-QYUPLKLP.mjs';
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @packageDocumentation
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
import { P as ParagraphFormatting, T as TextFormatting } from '../../formatting-
|
|
7
|
-
import { a as StyleDefinitions, S as Style, D as DocDefaults } from '../../styles-
|
|
6
|
+
import { P as ParagraphFormatting, T as TextFormatting } from '../../formatting-BH4hcZiq.mjs';
|
|
7
|
+
import { a as StyleDefinitions, S as Style, D as DocDefaults } from '../../styles-EI2lxeEN.mjs';
|
|
8
8
|
import '../../colors-C3vA7HUU.mjs';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* @packageDocumentation
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
|
-
import { P as ParagraphFormatting, T as TextFormatting } from '../../formatting-
|
|
7
|
-
import { a as StyleDefinitions, S as Style, D as DocDefaults } from '../../styles-
|
|
6
|
+
import { P as ParagraphFormatting, T as TextFormatting } from '../../formatting-_OXU8gLB.js';
|
|
7
|
+
import { a as StyleDefinitions, S as Style, D as DocDefaults } from '../../styles-BBv7doYK.js';
|
|
8
8
|
import '../../colors-C3vA7HUU.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
import { EditorState } from 'prosemirror-state';
|
|
22
22
|
import { TrackedChangeEntry } from '../../utils/comments.mjs';
|
|
23
23
|
import '../../types/content.mjs';
|
|
24
|
-
import '../../formatting-
|
|
24
|
+
import '../../formatting-BH4hcZiq.mjs';
|
|
25
25
|
import '../../colors-C3vA7HUU.mjs';
|
|
26
26
|
import '../../docx/wrapTypes.mjs';
|
|
27
|
-
import '../../lists-
|
|
27
|
+
import '../../lists-CvG_iVK3.mjs';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Walk the PM doc once and derive (a) the tracked-change list and (b) a
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
import { EditorState } from 'prosemirror-state';
|
|
22
22
|
import { TrackedChangeEntry } from '../../utils/comments.js';
|
|
23
23
|
import '../../types/content.js';
|
|
24
|
-
import '../../formatting-
|
|
24
|
+
import '../../formatting-_OXU8gLB.js';
|
|
25
25
|
import '../../colors-C3vA7HUU.js';
|
|
26
26
|
import '../../docx/wrapTypes.js';
|
|
27
|
-
import '../../lists-
|
|
27
|
+
import '../../lists-UTp_tk7B.js';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Walk the PM doc once and derive (a) the tracked-change list and (b) a
|
|
@@ -2,7 +2,7 @@ import { Document } from './types/document.js';
|
|
|
2
2
|
import { StyleInfo, AgentContext, Position, Range, AgentCommand, SelectionContext } from './types/agentApi.js';
|
|
3
3
|
import { S as SelectiveSaveOptions } from './selectiveSave-CWaPEv0B.js';
|
|
4
4
|
import { D as DocxInput } from './docxInput-DTbCa48g.js';
|
|
5
|
-
import { T as TextFormatting, P as ParagraphFormatting } from './formatting-
|
|
5
|
+
import { T as TextFormatting, P as ParagraphFormatting } from './formatting-_OXU8gLB.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* DocumentAgent - High-level fluent API for programmatic document manipulation
|
|
@@ -2,7 +2,7 @@ import { Document } from './types/document.mjs';
|
|
|
2
2
|
import { StyleInfo, AgentContext, Position, Range, AgentCommand, SelectionContext } from './types/agentApi.mjs';
|
|
3
3
|
import { S as SelectiveSaveOptions } from './selectiveSave-jinP_4xa.mjs';
|
|
4
4
|
import { D as DocxInput } from './docxInput-DTbCa48g.mjs';
|
|
5
|
-
import { T as TextFormatting, P as ParagraphFormatting } from './formatting-
|
|
5
|
+
import { T as TextFormatting, P as ParagraphFormatting } from './formatting-BH4hcZiq.mjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* DocumentAgent - High-level fluent API for programmatic document manipulation
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TextFormatting, P as ParagraphFormatting,
|
|
1
|
+
import { T as TextFormatting, P as ParagraphFormatting, a as TableFormatting, b as TableRowFormatting, c as TableCellFormatting } from './formatting-_OXU8gLB.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Styles, Theme, Font Table, Relationships & Media Types
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as TextFormatting, P as ParagraphFormatting,
|
|
1
|
+
import { T as TextFormatting, P as ParagraphFormatting, a as TableFormatting, b as TableRowFormatting, c as TableCellFormatting } from './formatting-BH4hcZiq.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Styles, Theme, Font Table, Relationships & Media Types
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { T as TextFormatting, P as ParagraphFormatting } from '../formatting-
|
|
11
|
+
import { T as TextFormatting, P as ParagraphFormatting } from '../formatting-BH4hcZiq.mjs';
|
|
12
12
|
import '../colors-C3vA7HUU.mjs';
|
|
13
13
|
|
|
14
14
|
/**
|
package/dist/types/agentApi.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { T as TextFormatting, P as ParagraphFormatting } from '../formatting-
|
|
11
|
+
import { T as TextFormatting, P as ParagraphFormatting } from '../formatting-_OXU8gLB.js';
|
|
12
12
|
import '../colors-C3vA7HUU.js';
|
|
13
13
|
|
|
14
14
|
/**
|
package/dist/types/content.d.mts
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
import { P as ParagraphFormatting, T as TextFormatting,
|
|
15
|
+
import { P as ParagraphFormatting, T as TextFormatting, a as TableFormatting, b as TableRowFormatting, c as TableCellFormatting } from '../formatting-BH4hcZiq.mjs';
|
|
16
16
|
import { WrapType } from '../docx/wrapTypes.mjs';
|
|
17
17
|
import { B as BorderSpec, C as ColorValue, T as ThemeColorSlot } from '../colors-C3vA7HUU.mjs';
|
|
18
|
-
import {
|
|
18
|
+
import { a as NumberFormat, c as ListRendering } from '../lists-CvG_iVK3.mjs';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Hyperlinks (`w:hyperlink`), bookmark markers (`w:bookmarkStart`/`End`),
|
package/dist/types/content.d.ts
CHANGED
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
import { P as ParagraphFormatting, T as TextFormatting,
|
|
15
|
+
import { P as ParagraphFormatting, T as TextFormatting, a as TableFormatting, b as TableRowFormatting, c as TableCellFormatting } from '../formatting-_OXU8gLB.js';
|
|
16
16
|
import { WrapType } from '../docx/wrapTypes.js';
|
|
17
17
|
import { B as BorderSpec, C as ColorValue, T as ThemeColorSlot } from '../colors-C3vA7HUU.js';
|
|
18
|
-
import {
|
|
18
|
+
import { a as NumberFormat, c as ListRendering } from '../lists-UTp_tk7B.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Hyperlinks (`w:hyperlink`), bookmark markers (`w:bookmarkStart`/`End`),
|
|
@@ -14,15 +14,32 @@
|
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
16
|
export { B as BorderSpec, C as ColorValue, S as ShadingProperties, T as ThemeColorSlot } from '../colors-C3vA7HUU.mjs';
|
|
17
|
-
export { C as CellMargins,
|
|
18
|
-
import { N as NumberingDefinitions } from '../lists-
|
|
19
|
-
export { A as AbstractNumbering,
|
|
17
|
+
export { C as CellMargins, g as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, d as ParagraphAlignment, P as ParagraphFormatting, h as TabLeader, e as TabStop, i as TabStopAlignment, j as TableBorders, c as TableCellFormatting, a as TableFormatting, f as TableLook, k as TableMeasurement, b as TableRowFormatting, l as TableWidthType, m as TextEffect, T as TextFormatting, U as UnderlineStyle } from '../formatting-BH4hcZiq.mjs';
|
|
18
|
+
import { N as NumberingDefinitions } from '../lists-CvG_iVK3.mjs';
|
|
19
|
+
export { A as AbstractNumbering, b as LevelSuffix, L as ListLevel, c as ListRendering, a as NumberFormat, d as NumberingInstance } from '../lists-CvG_iVK3.mjs';
|
|
20
20
|
import { DocumentBody, Footnote, Endnote, HeaderFooter } from './content.mjs';
|
|
21
21
|
export { BlockContent, BlockSdt, BookmarkEnd, BookmarkStart, BreakContent, Column, Comment, CommentRangeEnd, CommentRangeStart, ComplexField, Deletion, DrawingContent, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FooterReference, FootnotePosition, FootnoteProperties, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InlineSdt, Insertion, InstrTextContent, LineNumberRestart, MathEquation, MoveFrom, MoveFromRangeEnd, MoveFromRangeStart, MoveTo, MoveToRangeEnd, MoveToRangeStart, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, PageOrientation, Paragraph, ParagraphContent, ParagraphPropertyChange, PropertyChangeInfo, Run, RunContent, RunPropertyChange, SdtProperties, SdtType, Section, SectionProperties, SectionStart, Shape, ShapeContent, ShapeFill, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, SymbolContent, TabContent, Table, TableCell, TableCellPropertyChange, TablePropertyChange, TableRow, TableRowPropertyChange, TableStructuralChangeInfo, TextBox, TextContent, TrackedChangeInfo, TrackedRunChange, VerticalAlign } from './content.mjs';
|
|
22
|
-
import { a as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-
|
|
23
|
-
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, S as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-
|
|
22
|
+
import { a as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-EI2lxeEN.mjs';
|
|
23
|
+
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, S as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-EI2lxeEN.mjs';
|
|
24
24
|
import '../docx/wrapTypes.mjs';
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* settings.xml parser
|
|
28
|
+
*
|
|
29
|
+
* Extracts document-wide settings the layout pipeline needs at render time.
|
|
30
|
+
* We only read what's currently consumed; most of settings.xml (compatibility
|
|
31
|
+
* flags, view state, autoformat) is irrelevant to layout.
|
|
32
|
+
*/
|
|
33
|
+
/** Document-wide settings parsed from `word/settings.xml`. */
|
|
34
|
+
interface DocumentSettings {
|
|
35
|
+
/**
|
|
36
|
+
* `w:defaultTabStop` (§17.6.13) — interval in twips between default tab
|
|
37
|
+
* stops applied when a paragraph has no custom `w:tabs`. Word's default
|
|
38
|
+
* if unspecified is 720 twips (0.5 inch).
|
|
39
|
+
*/
|
|
40
|
+
defaultTabStop: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
26
43
|
/**
|
|
27
44
|
* Comprehensive TypeScript types for full DOCX document representation
|
|
28
45
|
*
|
|
@@ -51,6 +68,8 @@ interface DocxPackage {
|
|
|
51
68
|
theme?: Theme;
|
|
52
69
|
/** Numbering definitions */
|
|
53
70
|
numbering?: NumberingDefinitions;
|
|
71
|
+
/** Document-wide settings from `word/settings.xml` */
|
|
72
|
+
settings?: DocumentSettings;
|
|
54
73
|
/** Font table */
|
|
55
74
|
fontTable?: FontTable;
|
|
56
75
|
/** Footnotes */
|
|
@@ -103,4 +122,4 @@ interface Document {
|
|
|
103
122
|
warnings?: string[];
|
|
104
123
|
}
|
|
105
124
|
|
|
106
|
-
export { type Document, DocumentBody, type DocxPackage, Endnote, FontTable, Footnote, HeaderFooter, MediaFile, NumberingDefinitions, RelationshipMap, StyleDefinitions, Theme };
|
|
125
|
+
export { type Document, DocumentBody, type DocumentSettings, type DocxPackage, Endnote, FontTable, Footnote, HeaderFooter, MediaFile, NumberingDefinitions, RelationshipMap, StyleDefinitions, Theme };
|
package/dist/types/document.d.ts
CHANGED
|
@@ -14,15 +14,32 @@
|
|
|
14
14
|
* @public
|
|
15
15
|
*/
|
|
16
16
|
export { B as BorderSpec, C as ColorValue, S as ShadingProperties, T as ThemeColorSlot } from '../colors-C3vA7HUU.js';
|
|
17
|
-
export { C as CellMargins,
|
|
18
|
-
import { N as NumberingDefinitions } from '../lists-
|
|
19
|
-
export { A as AbstractNumbering,
|
|
17
|
+
export { C as CellMargins, g as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, d as ParagraphAlignment, P as ParagraphFormatting, h as TabLeader, e as TabStop, i as TabStopAlignment, j as TableBorders, c as TableCellFormatting, a as TableFormatting, f as TableLook, k as TableMeasurement, b as TableRowFormatting, l as TableWidthType, m as TextEffect, T as TextFormatting, U as UnderlineStyle } from '../formatting-_OXU8gLB.js';
|
|
18
|
+
import { N as NumberingDefinitions } from '../lists-UTp_tk7B.js';
|
|
19
|
+
export { A as AbstractNumbering, b as LevelSuffix, L as ListLevel, c as ListRendering, a as NumberFormat, d as NumberingInstance } from '../lists-UTp_tk7B.js';
|
|
20
20
|
import { DocumentBody, Footnote, Endnote, HeaderFooter } from './content.js';
|
|
21
21
|
export { BlockContent, BlockSdt, BookmarkEnd, BookmarkStart, BreakContent, Column, Comment, CommentRangeEnd, CommentRangeStart, ComplexField, Deletion, DrawingContent, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FooterReference, FootnotePosition, FootnoteProperties, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InlineSdt, Insertion, InstrTextContent, LineNumberRestart, MathEquation, MoveFrom, MoveFromRangeEnd, MoveFromRangeStart, MoveTo, MoveToRangeEnd, MoveToRangeStart, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, PageOrientation, Paragraph, ParagraphContent, ParagraphPropertyChange, PropertyChangeInfo, Run, RunContent, RunPropertyChange, SdtProperties, SdtType, Section, SectionProperties, SectionStart, Shape, ShapeContent, ShapeFill, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, SymbolContent, TabContent, Table, TableCell, TableCellPropertyChange, TablePropertyChange, TableRow, TableRowPropertyChange, TableStructuralChangeInfo, TextBox, TextContent, TrackedChangeInfo, TrackedRunChange, VerticalAlign } from './content.js';
|
|
22
|
-
import { a as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-
|
|
23
|
-
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, S as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-
|
|
22
|
+
import { a as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-BBv7doYK.js';
|
|
23
|
+
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, S as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-BBv7doYK.js';
|
|
24
24
|
import '../docx/wrapTypes.js';
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* settings.xml parser
|
|
28
|
+
*
|
|
29
|
+
* Extracts document-wide settings the layout pipeline needs at render time.
|
|
30
|
+
* We only read what's currently consumed; most of settings.xml (compatibility
|
|
31
|
+
* flags, view state, autoformat) is irrelevant to layout.
|
|
32
|
+
*/
|
|
33
|
+
/** Document-wide settings parsed from `word/settings.xml`. */
|
|
34
|
+
interface DocumentSettings {
|
|
35
|
+
/**
|
|
36
|
+
* `w:defaultTabStop` (§17.6.13) — interval in twips between default tab
|
|
37
|
+
* stops applied when a paragraph has no custom `w:tabs`. Word's default
|
|
38
|
+
* if unspecified is 720 twips (0.5 inch).
|
|
39
|
+
*/
|
|
40
|
+
defaultTabStop: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
26
43
|
/**
|
|
27
44
|
* Comprehensive TypeScript types for full DOCX document representation
|
|
28
45
|
*
|
|
@@ -51,6 +68,8 @@ interface DocxPackage {
|
|
|
51
68
|
theme?: Theme;
|
|
52
69
|
/** Numbering definitions */
|
|
53
70
|
numbering?: NumberingDefinitions;
|
|
71
|
+
/** Document-wide settings from `word/settings.xml` */
|
|
72
|
+
settings?: DocumentSettings;
|
|
54
73
|
/** Font table */
|
|
55
74
|
fontTable?: FontTable;
|
|
56
75
|
/** Footnotes */
|
|
@@ -103,4 +122,4 @@ interface Document {
|
|
|
103
122
|
warnings?: string[];
|
|
104
123
|
}
|
|
105
124
|
|
|
106
|
-
export { type Document, DocumentBody, type DocxPackage, Endnote, FontTable, Footnote, HeaderFooter, MediaFile, NumberingDefinitions, RelationshipMap, StyleDefinitions, Theme };
|
|
125
|
+
export { type Document, DocumentBody, type DocumentSettings, type DocxPackage, Endnote, FontTable, Footnote, HeaderFooter, MediaFile, NumberingDefinitions, RelationshipMap, StyleDefinitions, Theme };
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
11
|
import { Paragraph } from '../types/content.mjs';
|
|
12
|
-
import '../formatting-
|
|
12
|
+
import '../formatting-BH4hcZiq.mjs';
|
|
13
13
|
import '../colors-C3vA7HUU.mjs';
|
|
14
14
|
import '../docx/wrapTypes.mjs';
|
|
15
|
-
import '../lists-
|
|
15
|
+
import '../lists-CvG_iVK3.mjs';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Framework-agnostic comment + tracked-change helpers shared by the
|
package/dist/utils/comments.d.ts
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
11
|
import { Paragraph } from '../types/content.js';
|
|
12
|
-
import '../formatting-
|
|
12
|
+
import '../formatting-_OXU8gLB.js';
|
|
13
13
|
import '../colors-C3vA7HUU.js';
|
|
14
14
|
import '../docx/wrapTypes.js';
|
|
15
|
-
import '../lists-
|
|
15
|
+
import '../lists-UTp_tk7B.js';
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
18
|
* Framework-agnostic comment + tracked-change helpers shared by the
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
10
|
export { PIXELS_PER_INCH, TWIPS_PER_INCH, clamp, eighthsToPixels, emuToPixels, emuToTwips, formatPx, halfPointsToPixels, halfPointsToPoints, pixelsToEmu, pixelsToTwips, pointsToHalfPoints, pointsToPixels, roundPixels, twipsToEmu, twipsToPixels } from './units.mjs';
|
|
11
|
-
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, z as ThemeMatrixCell, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, A as ensureHexPrefix, B as generateThemeTintShadeMatrix, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, D as getThemeTintShadeHex, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, F as processTemplateAndDownload, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, G as resolveColorToHex, w as resolveHighlightColor, E as resolveHighlightToCss, x as resolveShadingColor, y as validateTemplate } from '../colorResolver-
|
|
11
|
+
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, z as ThemeMatrixCell, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, A as ensureHexPrefix, B as generateThemeTintShadeMatrix, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, D as getThemeTintShadeHex, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, F as processTemplateAndDownload, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, G as resolveColorToHex, w as resolveHighlightColor, E as resolveHighlightToCss, x as resolveShadingColor, y as validateTemplate } from '../colorResolver-C6DtsoFI.mjs';
|
|
12
12
|
import { Run, Paragraph } from '../types/content.mjs';
|
|
13
|
-
import { T as Theme } from '../styles-
|
|
13
|
+
import { T as Theme } from '../styles-EI2lxeEN.mjs';
|
|
14
14
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.mjs';
|
|
15
15
|
export { F as FONT_MAPPING, I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, z as extractFontsFromDocument, i as findPageBreaks, A as getGoogleFontEquivalent, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, r as isLineBreak, q as isLoading, s as isPageBreak, B as loadDocumentFonts, t as loadFont, u as loadFontFromBuffer, C as loadFontWithMapping, v as loadFonts, D as loadFontsWithMapping, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from '../fontLoader-BOt95Jtf.mjs';
|
|
16
16
|
import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.mjs';
|
|
17
|
-
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-
|
|
17
|
+
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-BH4hcZiq.mjs';
|
|
18
18
|
export { HeadingInfo, collectHeadings } from './headingCollector.mjs';
|
|
19
19
|
export { WordSelectionResult, createDoubleClickWordSelector, createTripleClickParagraphSelector, expandSelectionToWordBoundaries, findWordAt, findWordBoundaries, getWordAt, handleClickForMultiClick, selectParagraphAtCursor, selectWordAtCursor, selectWordInTextNode } from './textSelection.mjs';
|
|
20
20
|
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH } from './sidebarConstants.mjs';
|
|
21
21
|
import '../types/document.mjs';
|
|
22
|
-
import '../lists-
|
|
22
|
+
import '../lists-CvG_iVK3.mjs';
|
|
23
23
|
import '../docx/wrapTypes.mjs';
|
|
24
24
|
import 'prosemirror-model';
|
|
25
25
|
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -8,18 +8,18 @@
|
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
10
|
export { PIXELS_PER_INCH, TWIPS_PER_INCH, clamp, eighthsToPixels, emuToPixels, emuToTwips, formatPx, halfPointsToPixels, halfPointsToPoints, pixelsToEmu, pixelsToTwips, pointsToHalfPoints, pointsToPixels, roundPixels, twipsToEmu, twipsToPixels } from './units.js';
|
|
11
|
-
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, z as ThemeMatrixCell, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, A as ensureHexPrefix, B as generateThemeTintShadeMatrix, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, D as getThemeTintShadeHex, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, F as processTemplateAndDownload, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, G as resolveColorToHex, w as resolveHighlightColor, E as resolveHighlightToCss, x as resolveShadingColor, y as validateTemplate } from '../colorResolver-
|
|
11
|
+
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, z as ThemeMatrixCell, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, A as ensureHexPrefix, B as generateThemeTintShadeMatrix, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, D as getThemeTintShadeHex, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, F as processTemplateAndDownload, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, G as resolveColorToHex, w as resolveHighlightColor, E as resolveHighlightToCss, x as resolveShadingColor, y as validateTemplate } from '../colorResolver-BZ_yScf4.js';
|
|
12
12
|
import { Run, Paragraph } from '../types/content.js';
|
|
13
|
-
import { T as Theme } from '../styles-
|
|
13
|
+
import { T as Theme } from '../styles-BBv7doYK.js';
|
|
14
14
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.js';
|
|
15
15
|
export { F as FONT_MAPPING, I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, z as extractFontsFromDocument, i as findPageBreaks, A as getGoogleFontEquivalent, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, r as isLineBreak, q as isLoading, s as isPageBreak, B as loadDocumentFonts, t as loadFont, u as loadFontFromBuffer, C as loadFontWithMapping, v as loadFonts, D as loadFontsWithMapping, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from '../fontLoader-QPwbcX5j.js';
|
|
16
16
|
import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.js';
|
|
17
|
-
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-
|
|
17
|
+
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-_OXU8gLB.js';
|
|
18
18
|
export { HeadingInfo, collectHeadings } from './headingCollector.js';
|
|
19
19
|
export { WordSelectionResult, createDoubleClickWordSelector, createTripleClickParagraphSelector, expandSelectionToWordBoundaries, findWordAt, findWordBoundaries, getWordAt, handleClickForMultiClick, selectParagraphAtCursor, selectWordAtCursor, selectWordInTextNode } from './textSelection.js';
|
|
20
20
|
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH } from './sidebarConstants.js';
|
|
21
21
|
import '../types/document.js';
|
|
22
|
-
import '../lists-
|
|
22
|
+
import '../lists-UTp_tk7B.js';
|
|
23
23
|
import '../docx/wrapTypes.js';
|
|
24
24
|
import 'prosemirror-model';
|
|
25
25
|
|
package/package.json
CHANGED
package/dist/chunk-2D3UPAMA.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import {c}from'./chunk-QPFJJPIC.mjs';import {a}from'./chunk-AMENZY5F.mjs';var Xt=1440,q=96,ft=Xt/q,ht=11,gt="Calibri",Yt=1,jt=.8,Gt=.2,z=null;function $(){if(!z){let t=typeof document<"u"?document.createElement("canvas"):null;if(!t)throw new Error("Canvas not available. Ensure this runs in a DOM environment.");if(z=t.getContext("2d"),!z)throw new Error("Failed to get 2D context from canvas")}return z}function Kt(){z=null;}var ct=new Map;function mt(t){let e=ct.get(t);if(e===void 0){let i=a(t);e={cssFallback:i.cssFallback,singleLineRatio:i.singleLineRatio},ct.set(t,e);}return e}function Vt(t){return mt(t).cssFallback}function D(t){let e=[];t.italic&&e.push("italic"),t.bold&&e.push("bold");let i=t.fontSize??ht,n=W(i);e.push(`${n}px`);let r=t.fontFamily??gt;return e.push(Vt(r)),e.join(" ")}function A(t){let e=t.fontSize??ht,i=t.fontFamily??gt,n=W(e),r=n*jt,o=n*Gt,u=n*Yt;try{let g=$();g.font=D(t);let c=g.measureText("Hg");typeof c.actualBoundingBoxAscent=="number"&&typeof c.actualBoundingBoxDescent=="number"&&(r=c.actualBoundingBoxAscent,o=c.actualBoundingBoxDescent);}catch{}u=Math.max(u,r+o);let f=mt(i).singleLineRatio;return {fontSize:e,ascent:r,descent:o,lineHeight:u,fontFamily:i,singleLineRatio:f}}function S(t,e){if(!t)return 0;let i=$();i.font=D(e);let r=i.measureText(t).width;return e.letterSpacing&&t.length>1&&(r+=e.letterSpacing*(t.length-1)),r}function qt(t,e){let i=S(t,e),n=A(e);return {width:i,height:n.ascent+n.descent,ascent:n.ascent,descent:n.descent}}function J(t,e){let i=A(e);if(!t)return {width:0,charWidths:[],metrics:i};let n=$();n.font=D(e);let r=e.letterSpacing??0,o=[],u=0;for(let f=0;f<t.length;f++){let g=t[f],b=n.measureText(g).width;r&&f<t.length-1&&(b+=r),o.push(b),u+=b;}return {width:u,charWidths:o,metrics:i}}function Jt(t,e){if(e.length===0||t<=0)return 0;let i=0;for(let n=0;n<e.length;n++){let r=e[n],o=i+r/2;if(t<=o)return n;i+=r;}return e.length}function Qt(t,e){if(t<=0||e.length===0)return 0;let i=Math.min(t,e.length),n=0;for(let r=0;r<i;r++)n+=e[r];return n}function te(t){return t/ft}function ee(t){return Math.round(t*ft)}function W(t){return t*q/72}function dt(t){return t*72/q}function ne(t){return W(t/2)}function ie(t){return dt(t)*2}function re(t,e){return t.map(i=>{let n=i.x-i.distLeft,r=i.x+i.width+i.distRight,o=i.y-i.distTop,u=i.y+i.height+i.distBottom,f=0,g=0,c,b=i.wrapText??"bothSides";b==="right"?f=Q(r):b==="left"?g=tt(n,e):b==="largest"?{leftMargin:f,rightMargin:g}=le(n,r,e):oe(n,r,e)?c=se(n,r,e):i.side==="left"?f=Q(r):g=tt(n,e);let p=nt(f,g,e);return {leftMargin:p.leftMargin,rightMargin:p.rightMargin,topY:o,bottomY:u,segments:c}})}function et(t,e){return t.segments?.reduce((n,r)=>n+r.availableWidth,0)??e-t.leftMargin-t.rightMargin}function N(t,e,i,n){if(!i||i.length===0)return {leftMargin:0,rightMargin:0};let r=0,o=0,u,f=n+t,g=f+e;for(let c of i)if(!(g<=c.topY||f>=c.bottomY)){if(c.segments?.length){u=u?ae(u,c.segments):c.segments;continue}r=Math.max(r,c.leftMargin),o=Math.max(o,c.rightMargin);}return {leftMargin:r,rightMargin:o,segments:u}}function ae(t,e){let i=[];for(let n of t)for(let r of e){let o=Math.max(n.leftOffset,r.leftOffset),u=Math.min(n.leftOffset+n.availableWidth,r.leftOffset+r.availableWidth);u>o&&i.push({leftOffset:o,availableWidth:u-o});}return i}function oe(t,e,i){return t>0&&e<i}function se(t,e,i){return [{leftOffset:0,availableWidth:Math.max(0,t)},{leftOffset:Math.max(0,e),availableWidth:Math.max(0,i-e)}].filter(n=>n.availableWidth>1)}function le(t,e,i){let n=Math.max(0,t);return Math.max(0,i-e)>=n?{leftMargin:Q(e),rightMargin:0}:{leftMargin:0,rightMargin:tt(t,i)}}function Q(t){return Math.max(0,t)}function tt(t,e){return Math.max(0,e-t)}function it(t){return t/1440*96}function rt(t){return t/96*1440}function ue(t){let{explicitStops:e=[],defaultTabInterval:i=720,leftIndent:n=0}=t,r=e.filter(p=>p.val!=="clear").filter(p=>p.pos>=n),o=e.filter(p=>p.val==="clear").map(p=>p.pos),u=r.reduce((p,R)=>Math.max(p,R.pos),0),f=[...r];n>0&&!r.some(p=>p.pos<=n)&&(o.some(R=>Math.abs(R-n)<20)||f.push({val:"start",pos:n,leader:"none"}));let c=u>0?Math.max(u,n):n,b=n+14400;for(;c<b;){c+=i;let p=r.some(H=>Math.abs(H.pos-c)<20),R=o.some(H=>Math.abs(H-c)<20),Y=n>0&&Math.abs(c-n)<20;!p&&!R&&!Y&&f.push({val:"start",pos:c,leader:"none"});}return f.sort((p,R)=>p.pos-R.pos)}function pt(t,e,i={}){let{defaultTabInterval:n=720}=e,r=rt(t),u=ue(e).find(c=>c.pos>r);if(!u){let c=it(n),b=c-t%c;return b<=0&&(b=c),{width:b,alignment:"default"}}let g=it(u.pos)-t;if(u.val==="center")g-=(i.followingWidth??0)/2;else if(u.val==="end")g-=i.followingWidth??0;else if(u.val==="decimal")g-=i.decimalPrefixWidth??0;else if(u.val==="bar")return {width:0,leader:u.leader,alignment:"bar"};if(g<1){let c=it(n),b=c-t%c;return b<=0&&(b=c),{width:b,alignment:"default"}}return {width:g,leader:u.leader,alignment:u.val}}var y=11,O="Calibri",ce=1.15,X=1,k=.5;function bt(t,e,i,n=false){let r=1,o=t.length,u=0;for(;r<=o;){let f=r+o>>>1;S(t.slice(0,f),e)<=i?(u=f,r=f+1):o=f-1;}return n&&u===0?1:u}function Z(t){return {fontFamily:t.fontFamily??O,fontSize:t.fontSize??y,bold:t.bold,italic:t.italic,letterSpacing:t.letterSpacing}}function Ft(t,e,i){let n=W(t),r=i?.ascent??n*.8,o=i?.descent??n*.2,u=i?.singleLineRatio??1.15,f=n*u,g;if(e?.lineRule==="exact"&&e.line!==void 0)g=e.line;else if(e?.lineRule==="atLeast"&&e.line!==void 0){let c=f*X;g=Math.max(e.line,c);}else e?.line!==void 0&&e?.lineUnit==="multiplier"?g=f*e.line:e?.line!==void 0&&e?.lineUnit==="px"?g=e.line:g=f*X;return {ascent:r,descent:o,lineHeight:g}}function xt(t,e,i){let n=A({fontSize:t,fontFamily:i??O}),r=Ft(t,e,n),o=e?.lineRule??"auto";if(o==="auto"||o==="atLeast"){let u=W(t),f=Math.max(r.lineHeight,u*ce);if(f!==r.lineHeight)return {...r,lineHeight:f}}return r}function U(t){return t.kind==="text"}function Tt(t){return t.kind==="tab"}function Mt(t){return t.kind==="image"}function Ct(t){return t.kind==="lineBreak"}function St(t){return t.kind==="field"}function fe(t){return !t.text||t.text.replace(/\u00a0/g," ").trim().length===0}function he(t,e){let i=0;for(let n=e+1;n<t.length;n++){let r=t[n];if(Tt(r)||Ct(r))break;if(U(r))i+=S(r.text||"",Z(r));else if(St(r)){let o={fontFamily:r.fontFamily??O,fontSize:r.fontSize??y,bold:r.bold,italic:r.italic};i+=S(r.fallback||"1",o);}else Mt(r)&&(i+=r.width||0);}return i}function ge(t){let e=[];for(let i=0;i<t.length;i++){let n=t[i];(n===" "||n==="-"||n===" ")&&e.push(i+1);}return e}function nt(t,e,i){let n=Math.max(1,i),r=Math.max(0,t),o=Math.max(0,e);return r>=n||o>=n||r+o>=n?{leftMargin:0,rightMargin:0}:{leftMargin:r,rightMargin:o}}function Rt(t,e,i){let n=t.runs,r=t.attrs,o=r?.spacing,u=i?.floatingZones,f=i?.paragraphYOffset??0,g=r?.indent,c$1=g?.left??0,b=g?.right??0,p=(g?.firstLine??0)-(g?.hanging??0),R=Math.max(1,e-c$1-b),Y=Math.max(1,R-p),H=0,Zt=W(y)*X,B=N(0,Zt,u,f),Bt=Math.max(1,et(B,Y)),C=[];if(n.length===0){if(r?.suppressEmptyParagraphHeight)return C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,ascent:0,descent:0,lineHeight:0}),{kind:"paragraph",lines:C,totalHeight:0};let s=r?.defaultFontSize??y,l=r?.defaultFontFamily??O,m=xt(s,o,l);C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...m});let h=m.lineHeight;return o?.before&&(h+=o.before),o?.after&&(h+=o.after),{kind:"paragraph",lines:C,totalHeight:h}}if(n.length===1&&U(n[0])&&fe(n[0])){let s=n[0],l=s.fontSize??r?.defaultFontSize??y,m=s.fontFamily??r?.defaultFontFamily??O,h=xt(l,o,m);C.push({fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,...h});let d=h.lineHeight;return o?.before&&(d+=o.before),o?.after&&(d+=o.after),{kind:"paragraph",lines:C,totalHeight:d}}let a={fromRun:0,fromChar:0,toRun:0,toChar:0,width:0,maxFontSize:y,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:Bt,leftOffset:B.leftMargin,rightOffset:B.rightMargin,segmentZones:B.segments},ot=()=>{let s=Ft(a.maxFontSize,o,a.maxFontMetrics),l={...s};if(a.maxImageHeightPx>l.lineHeight){let h=a.maxImageHeightPx,d=l.descent;l.lineHeight=h+d*2,l.ascent=h+d;}let m={fromRun:a.fromRun,fromChar:a.fromChar,toRun:a.toRun,toChar:a.toChar,width:a.width,...l};a.leftOffset>0&&(m.leftOffset=a.leftOffset),a.rightOffset>0&&(m.rightOffset=a.rightOffset),a.segmentZones?.length&&(m.segments=$t(m,a.segmentZones)),C.push(m),H+=s.lineHeight;},$t=(s,l)=>{let m=l[0],h=l[1];if(!m)return;if(!h||s.width<=m.availableWidth+k)return [{fromRun:s.fromRun,fromChar:s.fromChar,toRun:s.toRun,toChar:s.toChar,width:s.width,leftOffset:m.leftOffset,availableWidth:m.availableWidth}];if(s.fromRun!==s.toRun)return;let d=n[s.fromRun];if(!d||!U(d))return;let P=d,x=P.text.slice(s.fromChar,s.toChar),T=Z(P),F=bt(x,T,m.availableWidth);if(F<=0||F>=x.length)return;let w=s.fromChar+F,M=x.slice(0,F),G=x.slice(F);return [{fromRun:s.fromRun,fromChar:s.fromChar,toRun:s.toRun,toChar:w,width:S(M,T),leftOffset:m.leftOffset,availableWidth:m.availableWidth},{fromRun:s.fromRun,fromChar:w,toRun:s.toRun,toChar:s.toChar,width:S(G,T),leftOffset:h.leftOffset,availableWidth:h.availableWidth}]},L=(s,l)=>{ot();let m=W(y)*X,h=N(H,m,u,f),d=Math.max(1,et(h,R));a={fromRun:s,fromChar:l,toRun:s,toChar:l,width:0,maxFontSize:y,maxFontMetrics:null,maxImageHeightPx:0,availableWidth:d,leftOffset:h.leftMargin,rightOffset:h.rightMargin,segmentZones:h.segments};},_=s=>{let l=s.fontSize??y;(!a.maxFontMetrics||l>a.maxFontSize)&&(a.maxFontSize=l,a.maxFontMetrics=A(s));};for(let s=0;s<n.length;s++){let l=n[s];if(Ct(l)){a.toRun=s,a.toChar=0,L(s+1,0);continue}if(Tt(l)){let m=Z(l);_(m);let h=he(n,s),d=a.width+(a.leftOffset??0),P=C.length===0,x=c$1+(P?p:0)+d,T={explicitStops:r?.tabs,leftIndent:rt(c$1)},F=pt(x,T,{followingWidth:h}).width;if(d+F>a.availableWidth+k){let w=a.availableWidth-d-h;w>1&&(F=w);}a.width+F>a.availableWidth+k&&(L(s,0),_(m)),a.width+=F,a.toRun=s,a.toChar=1;continue}if(Mt(l)){let m=l.wrapType,h=l.displayMode==="float"||c(m);if(l.position&&h){a.toRun=s,a.toChar=1;continue}if(m==="topAndBottom"||l.displayMode==="block"){a.width>0&&L(s,0);let x=l.height,T=l.distTop??6,F=l.distBottom??6;a.toRun=s,a.toChar=1,a.maxImageHeightPx=x+T+F,L(s+1,0);continue}let d=l.width,P=l.height;P>a.maxImageHeightPx&&(a.maxImageHeightPx=P),a.width+d>a.availableWidth+k&&L(s,0),a.width+=d,a.toRun=s,a.toChar=1;continue}if(St(l)){let m=l.fallback||"1",h={fontFamily:l.fontFamily??O,fontSize:l.fontSize??y,bold:l.bold,italic:l.italic};_(h);let d=S(m,h);a.width>0&&a.width+d>a.availableWidth+k&&(L(s,0),_(h)),a.width+=d,a.toRun=s,a.toChar=1;continue}if(U(l)){let m=l,h=m.text,d=Z(m);if(_(d),!h||h.length===0){a.toRun=s,a.toChar=0;continue}let P=ge(h),x=0;for(;x<h.length;){let T=h.length;for(let M of P)if(M>x){T=M;break}let F=h.slice(x,T),w=S(F,d);if(w>a.availableWidth+k){let M=0;for(;M<F.length;){let G=a.availableWidth-a.width+k,Dt=F.slice(M),K=bt(Dt,d,G);if(K===0){if(a.width>0){L(s,x+M),_(d);continue}K=1;}let V=M+K,Nt=F.slice(M,V),Ut=S(Nt,d);a.width+=Ut,a.toRun=s,a.toChar=x+V,M=V,M<F.length&&(L(s,x+M),_(d));}x=T;continue}a.width>0&&a.width+w>a.availableWidth+k&&(L(s,x),_(d)),a.width+=w,a.toRun=s,a.toChar=T,x=T;}}}ot();let st=C.reduce((s,l)=>s+l.lineHeight,0);r?.listMarker&&!r?.listMarkerHidden&&(g?.hanging??0)===0&&C.length>0&&(st+=C[0].lineHeight);let j=st;return o?.before&&(j+=o.before),o?.after&&(j+=o.after),{kind:"paragraph",lines:C,totalHeight:j}}function me(t,e){return t.map(i=>Rt(i,e))}function de(t){let e=Z(t);return J(t.text,e).charWidths}var yt=2e4,v=new Map;function Lt(t,e,i){return `${t}|${e}|${i||0}`}function Pt(){for(;v.size>yt;){let t=v.keys().next().value;if(t===void 0)break;v.delete(t);}}function pe(t,e,i=0){let n=Lt(t,e,i),r=v.get(n);if(r!==void 0)return v.delete(n),v.set(n,r),r.width}function be(t,e,i,n){let r=Lt(t,e,i);v.set(r,{width:n}),Pt();}function wt(){v.clear();}function xe(t){!Number.isFinite(t)||t<=0||(yt=t,Pt());}function Wt(){return v.size}var Fe=1e3,vt=Fe,E=new Map;function Et(t,e,i=false,n=false){return `${t}|${e}|${i}|${n}`}function It(){for(;E.size>vt;){let t=E.keys().next().value;if(t===void 0)break;E.delete(t);}}function Te(t,e,i=false,n=false){let r=Et(t,e,i,n),o=E.get(r);if(o!==void 0)return E.delete(r),E.set(r,o),o}function Me(t,e,i,n,r){let o=Et(t,e,i,n);E.set(o,r),It();}function _t(){E.clear();}function Ce(t){!Number.isFinite(t)||t<=0||(vt=t,It());}function kt(){return E.size}var Se=5e3,Ht=Se,I=new Map;function at(t){let e=[];for(let n of t.runs)n.kind==="text"?e.push(`t:${n.text}|${n.fontFamily}|${n.fontSize}|${n.bold}|${n.italic}`):n.kind==="tab"?e.push(`tab:${n.width}`):n.kind==="image"?e.push(`img:${n.width}x${n.height}`):n.kind==="lineBreak"&&e.push("br");let i=t.attrs;if(i){i.alignment&&e.push(`align:${i.alignment}`),i.indent&&e.push(`indent:${i.indent.left}|${i.indent.right}|${i.indent.firstLine}|${i.indent.hanging}`),i.spacing&&e.push(`spacing:${i.spacing.before}|${i.spacing.after}|${i.spacing.line}|${i.spacing.lineRule}`),i.defaultFontSize!=null&&e.push(`dfs:${i.defaultFontSize}`),i.defaultFontFamily!=null&&e.push(`dff:${i.defaultFontFamily}`);let n=i.borders;if(n){let r=o=>o?`${o.width??""},${o.style??""},${o.color??""}`:"";e.push(`bdr:${r(n.top)}|${r(n.bottom)}|${r(n.left)}|${r(n.right)}`);}i.suppressEmptyParagraphHeight&&e.push("sup");}return e.join("||")}function At(){for(;I.size>Ht;){let t=I.keys().next().value;if(t===void 0)break;I.delete(t);}}function Re(t,e){let i=at(t),n=I.get(i);if(n!==void 0&&n.maxWidth===e)return I.delete(i),I.set(i,n),n.measure}function ye(t,e,i){let n=at(t);I.set(n,{measure:i,maxWidth:e}),At();}function Ot(){I.clear();}function Le(t){!Number.isFinite(t)||t<=0||(Ht=t,At());}function zt(){return I.size}function Pe(){wt(),_t(),Ot();}function we(){return Wt()+kt()+zt()}export{Wt as A,Te as B,Me as C,_t as D,Ce as E,kt as F,at as G,Re as H,ye as I,Ot as J,Le as K,zt as L,Pe as M,we as N,$ as a,Kt as b,D as c,A as d,S as e,qt as f,J as g,Jt as h,Qt as i,te as j,ee as k,W as l,dt as m,ne as n,ie as o,re as p,N as q,pt as r,nt as s,Rt as t,me as u,de as v,pe as w,be as x,wt as y,xe as z};
|