@eigenpal/docx-editor-core 1.2.1 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.mts +5 -4
- package/dist/agent/index.d.ts +5 -4
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/anchoredObjectPosition-CS-8BfhO.d.ts +48 -0
- package/dist/anchoredObjectPosition-KJEyF-wr.d.mts +48 -0
- package/dist/{chunk-U4WUDHDK.js → chunk-2SGJZYQF.js} +1 -1
- package/dist/chunk-3ANZ3252.mjs +2 -0
- package/dist/chunk-3G44SFHX.mjs +4 -0
- package/dist/{chunk-4QEETB7U.js → chunk-3QPKTG2Y.js} +2 -2
- package/dist/chunk-3R7QHNI5.js +2 -0
- package/dist/chunk-4GFTMGSV.mjs +1 -0
- package/dist/chunk-4MYKVWNF.js +1 -0
- package/dist/chunk-4RTVLMRZ.js +2 -0
- package/dist/chunk-55XWETY4.mjs +1 -0
- package/dist/chunk-6QO4O52Y.mjs +1 -0
- package/dist/{chunk-THLJYXFB.js → chunk-6V3SFHEM.js} +1 -1
- package/dist/{chunk-6ZXL3EIP.mjs → chunk-7CZEZ3UL.mjs} +1 -1
- package/dist/{chunk-Z5MJYQSD.mjs → chunk-7UZJ5YDF.mjs} +1 -1
- package/dist/{chunk-BXWOLARZ.js → chunk-APNMO5JT.js} +1 -1
- package/dist/{chunk-KZXZWGFX.mjs → chunk-B46V5G46.mjs} +1 -1
- package/dist/chunk-BH3ACQ3M.js +59 -0
- package/dist/chunk-BUCOTKYY.js +1 -0
- package/dist/{chunk-5BLQHXWK.mjs → chunk-CDXCFHOY.mjs} +1 -1
- package/dist/chunk-CHN26LLL.mjs +59 -0
- package/dist/chunk-CZSAC65M.js +2 -0
- package/dist/chunk-D3PRIF3Y.mjs +1 -0
- package/dist/chunk-DE2V4X3B.mjs +1 -0
- package/dist/{chunk-7BVHKWEW.mjs → chunk-DFUWJHKF.mjs} +1 -1
- package/dist/{chunk-UGV4KRQB.js → chunk-DG2CMDSM.js} +1 -1
- package/dist/chunk-DKKTY56Q.js +1 -0
- package/dist/chunk-FIGLFSNR.js +1 -0
- package/dist/{chunk-AMB6Y77B.js → chunk-FQS436KN.js} +1 -1
- package/dist/chunk-FYRJTDC4.mjs +2 -0
- package/dist/chunk-GYWTUUXX.mjs +2 -0
- package/dist/chunk-HPJBZL37.mjs +1 -0
- package/dist/chunk-INDYZOOS.js +1 -0
- package/dist/chunk-IUVQJ6PX.mjs +1 -0
- package/dist/chunk-J3YFJDZD.js +1 -0
- package/dist/chunk-JHTURDPX.mjs +1 -0
- package/dist/{chunk-D62KS7QG.mjs → chunk-LAJPGQEE.mjs} +1 -1
- package/dist/chunk-LERLET2D.js +4 -0
- package/dist/chunk-LX35TFGF.mjs +1 -0
- package/dist/{chunk-BOOHU5EW.mjs → chunk-MOCGHQ4A.mjs} +1 -1
- package/dist/chunk-NAFMAKLK.js +2 -0
- package/dist/chunk-NRWQ65NX.js +1 -0
- package/dist/chunk-OTHV7YV2.js +2 -0
- package/dist/chunk-QLAIOTQB.js +1 -0
- package/dist/{chunk-U4XMGWF7.js → chunk-RAWVGULQ.js} +1 -1
- package/dist/chunk-RQVHKDXK.js +2 -0
- package/dist/chunk-RSU4HTC6.js +1 -0
- package/dist/{chunk-E4JMCA5X.js → chunk-SCK6ZM5V.js} +2 -2
- package/dist/chunk-SWBLJF6R.mjs +2 -0
- package/dist/chunk-UE2ZKRYB.mjs +2 -0
- package/dist/chunk-VOCHZNOF.mjs +1 -0
- package/dist/{chunk-OEXVWIHW.mjs → chunk-W77JXDEV.mjs} +1 -1
- package/dist/chunk-W7CQRQZ6.mjs +1 -0
- package/dist/chunk-WWBNJ7KF.js +1 -0
- package/dist/chunk-WWNOXNEX.mjs +2 -0
- package/dist/chunk-YGWUKRFD.mjs +1 -0
- package/dist/chunk-YM7SMTYY.js +1 -0
- package/dist/{chunk-QKLY4F2J.mjs → chunk-YNUPP7UG.mjs} +1 -1
- package/dist/chunk-YPKIQMPR.js +1 -0
- package/dist/{chunk-HQPWFUP5.js → chunk-Z3LGMBJC.js} +1 -1
- package/dist/{colorResolver-BZ_yScf4.d.ts → colorResolver-8A-qj-LP.d.ts} +1 -1
- package/dist/{colorResolver-C6DtsoFI.d.mts → colorResolver-BCvxTlLF.d.mts} +1 -1
- package/dist/{content-CE-ZdMwG.d.mts → content-3xF4WDE8.d.mts} +51 -7
- package/dist/{content-CYXJ2tfQ.d.ts → content-C8fc_tL6.d.ts} +51 -7
- package/dist/{contentControlValues-gyVPsi6m.d.ts → contentControlValues-DGDKD589.d.ts} +1 -1
- package/dist/{contentControlValues-DAwTWfgR.d.mts → contentControlValues-DjWvoJQ-.d.mts} +1 -1
- package/dist/core-plugins.d.mts +6 -5
- package/dist/core-plugins.d.ts +6 -5
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +12 -11
- package/dist/core.d.ts +12 -11
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{documentStyles-DToJv9co.d.ts → documentStyles-C7k_8Sye.d.ts} +1 -1
- package/dist/{documentStyles-D87dxl18.d.mts → documentStyles-qR0VR2s0.d.mts} +1 -1
- package/dist/docx/index.d.mts +3 -2
- package/dist/docx/index.d.ts +3 -2
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +3 -2
- package/dist/docx/parser.d.ts +3 -2
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +3 -2
- package/dist/docx/rezip.d.ts +3 -2
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +42 -4
- package/dist/docx/serializer/index.d.ts +42 -4
- package/dist/docx/serializer/index.js +1 -1
- package/dist/docx/serializer/index.mjs +1 -1
- package/dist/editor/index.d.mts +128 -0
- package/dist/editor/index.d.ts +128 -0
- package/dist/editor/index.js +1 -0
- package/dist/editor/index.mjs +1 -0
- package/dist/{fontLoader-Z7pqeNvZ.d.mts → fontLoader-CUS1BPv7.d.mts} +1 -1
- package/dist/{fontLoader-Cm02v7PO.d.ts → fontLoader-Dl9SEKex.d.ts} +1 -1
- package/dist/{footnotes-lCH_P3N3.d.mts → footnotes-BZ24OTAT.d.mts} +25 -2
- package/dist/{footnotes-skVvEHvZ.d.ts → footnotes-DMsicPGd.d.ts} +25 -2
- package/dist/{headerFooterLayout-Bd58Tum3.d.ts → headerFooterLayout-AtAOhM8E.d.ts} +22 -6
- package/dist/{headerFooterLayout-CuIJiIzi.d.mts → headerFooterLayout-CU6hvszp.d.mts} +22 -6
- package/dist/headless.d.mts +47 -11
- package/dist/headless.d.ts +47 -11
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/clickToPositionDom.d.mts +26 -1
- package/dist/layout-bridge/clickToPositionDom.d.ts +26 -1
- package/dist/layout-bridge/clickToPositionDom.js +1 -1
- package/dist/layout-bridge/clickToPositionDom.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +134 -8
- package/dist/layout-bridge/index.d.ts +134 -8
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +7 -75
- package/dist/layout-bridge/measuring/index.d.ts +7 -75
- 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 +3 -2
- package/dist/layout-bridge/toFlowBlocks.d.ts +3 -2
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +16 -3
- package/dist/layout-engine/index.d.ts +16 -3
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +22 -1
- package/dist/layout-engine/types.d.ts +22 -1
- package/dist/layout-painter/index.d.mts +7 -5
- package/dist/layout-painter/index.d.ts +7 -5
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +15 -6
- package/dist/layout-painter/renderPage.d.ts +15 -6
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/managers/AutoSaveManager.d.mts +3 -2
- package/dist/managers/AutoSaveManager.d.ts +3 -2
- package/dist/managers/TableSelectionManager.d.mts +3 -2
- package/dist/managers/TableSelectionManager.d.ts +3 -2
- package/dist/managers/types.d.mts +3 -2
- package/dist/managers/types.d.ts +3 -2
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +4 -3
- package/dist/mcp.d.ts +4 -3
- package/dist/mcp.js +3 -3
- package/dist/mcp.mjs +2 -2
- package/dist/measureBlocksPipeline-BMqbRFQB.d.mts +96 -0
- package/dist/measureBlocksPipeline-iYNzAH-o.d.ts +96 -0
- package/dist/{nodes-BNkRKBBX.d.ts → nodes-75Q9GBxV.d.ts} +1 -1
- package/dist/{nodes-Bz-UHhLE.d.mts → nodes-cEI7hVY2.d.mts} +1 -1
- package/dist/prosemirror/applyFormatting.d.mts +67 -0
- package/dist/prosemirror/applyFormatting.d.ts +67 -0
- package/dist/prosemirror/applyFormatting.js +1 -0
- package/dist/prosemirror/applyFormatting.mjs +1 -0
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.d.mts +20 -1
- package/dist/prosemirror/commands/index.d.ts +20 -1
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.js +1 -1
- package/dist/prosemirror/commands/paragraph.mjs +1 -1
- package/dist/prosemirror/commentIdAllocator.d.mts +50 -0
- package/dist/prosemirror/commentIdAllocator.d.ts +50 -0
- package/dist/prosemirror/commentIdAllocator.js +1 -0
- package/dist/prosemirror/commentIdAllocator.mjs +1 -0
- package/dist/prosemirror/commentOps.d.mts +46 -0
- package/dist/prosemirror/commentOps.d.ts +46 -0
- package/dist/prosemirror/commentOps.js +1 -0
- package/dist/prosemirror/commentOps.mjs +1 -0
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +3 -2
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +3 -2
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +3 -2
- package/dist/prosemirror/conversion/index.d.ts +3 -2
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/editor.css +12 -2
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/imageCommit.d.mts +35 -0
- package/dist/prosemirror/imageCommit.d.ts +35 -0
- package/dist/prosemirror/imageCommit.js +1 -0
- package/dist/prosemirror/imageCommit.mjs +1 -0
- package/dist/prosemirror/index.d.mts +6 -5
- package/dist/prosemirror/index.d.ts +6 -5
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/index.mjs +1 -1
- package/dist/prosemirror/paraText.d.mts +52 -0
- package/dist/prosemirror/paraText.d.ts +52 -0
- package/dist/prosemirror/paraText.js +1 -0
- package/dist/prosemirror/paraText.mjs +1 -0
- package/dist/prosemirror/plugins/index.d.mts +4 -3
- package/dist/prosemirror/plugins/index.d.ts +4 -3
- package/dist/prosemirror/queries.d.mts +65 -0
- package/dist/prosemirror/queries.d.ts +65 -0
- package/dist/prosemirror/queries.js +2 -0
- package/dist/prosemirror/queries.mjs +2 -0
- package/dist/prosemirror/schema/index.d.mts +3 -2
- package/dist/prosemirror/schema/index.d.ts +3 -2
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/styles/index.d.mts +1 -1
- package/dist/prosemirror/styles/index.d.ts +1 -1
- package/dist/prosemirror/tableResize.d.mts +58 -0
- package/dist/prosemirror/tableResize.d.ts +58 -0
- package/dist/prosemirror/tableResize.js +1 -0
- package/dist/prosemirror/tableResize.mjs +1 -0
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +2 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +2 -1
- package/dist/{registry-Cpyybgij.d.mts → registry-NLnxX7pq.d.mts} +1 -1
- package/dist/{registry-E5pahPKL.d.ts → registry-egK81C_z.d.ts} +1 -1
- package/dist/sectionPropertiesSerializer-D86QlzlT.d.mts +59 -0
- package/dist/sectionPropertiesSerializer-uXyGONxu.d.ts +59 -0
- package/dist/{styles-EI2lxeEN.d.mts → styles-BOJ93SAm.d.mts} +1 -1
- package/dist/{styles-BBv7doYK.d.ts → styles-BWqX2AS-.d.ts} +1 -1
- package/dist/types/content.d.mts +2 -1
- package/dist/types/content.d.ts +2 -1
- package/dist/types/content.js +1 -1
- package/dist/types/content.mjs +1 -0
- package/dist/types/document.d.mts +17 -6
- package/dist/types/document.d.ts +17 -6
- package/dist/types/document.js +1 -1
- package/dist/types/document.mjs +1 -0
- package/dist/{types-DXG7vqe9.d.ts → types-DDQWU7-j.d.ts} +1 -1
- package/dist/{types-dYdjUZMo.d.mts → types-DTF0N7UE.d.mts} +1 -1
- package/dist/utils/autoScroll.d.mts +24 -0
- package/dist/utils/autoScroll.d.ts +24 -0
- package/dist/utils/autoScroll.js +1 -0
- package/dist/utils/autoScroll.mjs +1 -0
- package/dist/utils/comments.d.mts +2 -1
- package/dist/utils/comments.d.ts +2 -1
- package/dist/utils/index.d.mts +5 -4
- package/dist/utils/index.d.ts +5 -4
- package/dist/{variableDetector-HPZbJ_gw.d.ts → variableDetector-1mxzPfs2.d.ts} +1 -1
- package/dist/{variableDetector-C7BLz9sJ.d.mts → variableDetector-CaY-sDau.d.mts} +1 -1
- package/dist/watermark-DAcnAs_J.d.mts +77 -0
- package/dist/watermark-DAcnAs_J.d.ts +77 -0
- package/package.json +73 -1
- package/dist/chunk-2EQGBVPV.js +0 -2
- package/dist/chunk-44FHVKSI.js +0 -1
- package/dist/chunk-44JKHPGF.mjs +0 -2
- package/dist/chunk-5M7TI6TV.js +0 -1
- package/dist/chunk-6Y6LON6Y.mjs +0 -1
- package/dist/chunk-7RDCZLTU.js +0 -1
- package/dist/chunk-7ZN4WI5N.mjs +0 -4
- package/dist/chunk-CCPBNE2F.mjs +0 -2
- package/dist/chunk-DV6GWBUJ.js +0 -2
- package/dist/chunk-EQAORQC3.mjs +0 -1
- package/dist/chunk-FYKRDDKG.js +0 -1
- package/dist/chunk-GUQFNJHE.mjs +0 -1
- package/dist/chunk-ICE6NC3S.mjs +0 -1
- package/dist/chunk-IFUED5ZS.mjs +0 -1
- package/dist/chunk-KGTEBLB6.js +0 -1
- package/dist/chunk-KRN6YSR2.mjs +0 -1
- package/dist/chunk-L72YAV5N.js +0 -3
- package/dist/chunk-LTHT4A4S.js +0 -1
- package/dist/chunk-MERJFGEP.mjs +0 -59
- package/dist/chunk-MP4QSEO2.mjs +0 -1
- package/dist/chunk-PVAVS3IU.js +0 -1
- package/dist/chunk-QYF7BRG3.js +0 -2
- package/dist/chunk-RKDVY7I3.mjs +0 -1
- package/dist/chunk-ROG4MNOR.js +0 -4
- package/dist/chunk-SORYYVJ7.js +0 -1
- package/dist/chunk-SZIOF5SG.js +0 -59
- package/dist/chunk-VMRUBLPI.js +0 -1
- package/dist/chunk-WKUHYMDO.mjs +0 -1
- package/dist/chunk-WLDI6N3B.mjs +0 -3
- package/dist/chunk-WLHNIXWC.mjs +0 -2
- package/dist/chunk-YMZ3F2FZ.mjs +0 -1
- package/dist/chunk-ZBFNOJGY.js +0 -1
- package/dist/documentSerializer-Bghq9rFI.d.mts +0 -36
- package/dist/documentSerializer-C4lFC60P.d.ts +0 -36
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');var x=15,g=300,W=200;function f(n,r){try{let o=n.state.doc.resolve(r+1);for(let t=o.depth;t>=0;t--){let e=o.node(t);if(e.type.name==="table")return {node:e,tablePos:o.before(t)}}}catch{}return null}function S(n,r,o){let t=f(n,r);if(!t)return null;let e=t.node.attrs.columnWidths;return !e||e[o]===void 0||e[o+1]===void 0?null:{left:e[o],right:e[o+1]}}function I(n,r,o){let t=f(n,r);if(!t)return null;let e=null,i=0;return t.node.forEach(s=>{if(i===o){let u=s.attrs.height;u&&(e=u);}i++;}),e}function P(n,r,o){let t=f(n,r);if(!t)return null;let e=t.node.attrs.columnWidths;return !e||e[o]===void 0?null:e[o]}function R(n,r){let{pmStart:o,colIdx:t,newLeft:e,newRight:i}=r,s=f(n,o);if(!s)return;let{node:u,tablePos:d}=s,l=n.state.tr,a=[...u.attrs.columnWidths??[]];a[t]=e,a[t+1]=i,l.setNodeMarkup(d,void 0,{...u.attrs,columnWidths:a});let m=d+1;u.forEach(h=>{let p=m+1,c=0;h.forEach(b=>{let w=b.attrs.colspan||1;if(c===t||c===t+1){let E=c===t?e:i;l.setNodeMarkup(l.mapping.map(p),void 0,{...b.attrs,width:E,widthType:"dxa",colwidth:null});}p+=b.nodeSize,c+=w;}),m+=h.nodeSize;}),n.dispatch(l);}function N(n,r){let{pmStart:o,rowIdx:t,newHeight:e}=r,i=f(n,o);if(!i)return;let{node:s,tablePos:u}=i,d=n.state.tr,l=u+1,a=0;s.forEach(m=>{a===t&&d.setNodeMarkup(d.mapping.map(l),void 0,{...m.attrs,height:e,heightRule:"atLeast"}),l+=m.nodeSize,a++;}),n.dispatch(d);}function T(n,r){let{pmStart:o,colIdx:t,newWidth:e}=r,i=f(n,o);if(!i)return;let{node:s,tablePos:u}=i,d=n.state.tr,l=[...s.attrs.columnWidths??[]];l[t]=e,d.setNodeMarkup(u,void 0,{...s.attrs,columnWidths:l});let a=u+1;s.forEach(m=>{let h=a+1,p=0;m.forEach(c=>{let b=c.attrs.colspan||1;p===t&&d.setNodeMarkup(d.mapping.map(h),void 0,{...c.attrs,width:e,widthType:"dxa",colwidth:null}),h+=c.nodeSize,p+=b;}),a+=m.nodeSize;}),n.dispatch(d);}exports.MIN_CELL_WIDTH_TWIPS=g;exports.MIN_ROW_HEIGHT_TWIPS=W;exports.TWIPS_PER_PIXEL=x;exports.commitColumnResize=R;exports.commitRightEdgeResize=T;exports.commitRowResize=N;exports.readColumnWidthAt=P;exports.readColumnWidths=S;exports.readRowHeight=I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import'../chunk-QYUPLKLP.mjs';var x=15,g=300,W=200;function f(n,r){try{let o=n.state.doc.resolve(r+1);for(let t=o.depth;t>=0;t--){let e=o.node(t);if(e.type.name==="table")return {node:e,tablePos:o.before(t)}}}catch{}return null}function S(n,r,o){let t=f(n,r);if(!t)return null;let e=t.node.attrs.columnWidths;return !e||e[o]===void 0||e[o+1]===void 0?null:{left:e[o],right:e[o+1]}}function I(n,r,o){let t=f(n,r);if(!t)return null;let e=null,i=0;return t.node.forEach(s=>{if(i===o){let u=s.attrs.height;u&&(e=u);}i++;}),e}function P(n,r,o){let t=f(n,r);if(!t)return null;let e=t.node.attrs.columnWidths;return !e||e[o]===void 0?null:e[o]}function R(n,r){let{pmStart:o,colIdx:t,newLeft:e,newRight:i}=r,s=f(n,o);if(!s)return;let{node:u,tablePos:d}=s,l=n.state.tr,a=[...u.attrs.columnWidths??[]];a[t]=e,a[t+1]=i,l.setNodeMarkup(d,void 0,{...u.attrs,columnWidths:a});let m=d+1;u.forEach(h=>{let p=m+1,c=0;h.forEach(b=>{let w=b.attrs.colspan||1;if(c===t||c===t+1){let E=c===t?e:i;l.setNodeMarkup(l.mapping.map(p),void 0,{...b.attrs,width:E,widthType:"dxa",colwidth:null});}p+=b.nodeSize,c+=w;}),m+=h.nodeSize;}),n.dispatch(l);}function N(n,r){let{pmStart:o,rowIdx:t,newHeight:e}=r,i=f(n,o);if(!i)return;let{node:s,tablePos:u}=i,d=n.state.tr,l=u+1,a=0;s.forEach(m=>{a===t&&d.setNodeMarkup(d.mapping.map(l),void 0,{...m.attrs,height:e,heightRule:"atLeast"}),l+=m.nodeSize,a++;}),n.dispatch(d);}function T(n,r){let{pmStart:o,colIdx:t,newWidth:e}=r,i=f(n,o);if(!i)return;let{node:s,tablePos:u}=i,d=n.state.tr,l=[...s.attrs.columnWidths??[]];l[t]=e,d.setNodeMarkup(u,void 0,{...s.attrs,columnWidths:l});let a=u+1;s.forEach(m=>{let h=a+1,p=0;m.forEach(c=>{let b=c.attrs.colspan||1;p===t&&d.setNodeMarkup(d.mapping.map(h),void 0,{...c.attrs,width:e,widthType:"dxa",colwidth:null}),h+=c.nodeSize,p+=b;}),a+=m.nodeSize;}),n.dispatch(d);}export{g as MIN_CELL_WIDTH_TWIPS,W as MIN_ROW_HEIGHT_TWIPS,x as TWIPS_PER_PIXEL,R as commitColumnResize,T as commitRightEdgeResize,N as commitRowResize,P as readColumnWidthAt,S as readColumnWidths,I as readRowHeight};
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { EditorState } from 'prosemirror-state';
|
|
20
20
|
import { TrackedChangeEntry } from '../../utils/comments.mjs';
|
|
21
|
-
import '../../content-
|
|
21
|
+
import '../../content-3xF4WDE8.mjs';
|
|
22
22
|
import '../../formatting-BH4hcZiq.mjs';
|
|
23
23
|
import '../../colors-C3vA7HUU.mjs';
|
|
24
24
|
import '../../docx/wrapTypes.mjs';
|
|
25
|
+
import '../../watermark-DAcnAs_J.mjs';
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* Walk the PM doc once and derive (a) the tracked-change list and (b) a
|
|
@@ -18,10 +18,11 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import { EditorState } from 'prosemirror-state';
|
|
20
20
|
import { TrackedChangeEntry } from '../../utils/comments.js';
|
|
21
|
-
import '../../content-
|
|
21
|
+
import '../../content-C8fc_tL6.js';
|
|
22
22
|
import '../../formatting-_OXU8gLB.js';
|
|
23
23
|
import '../../colors-C3vA7HUU.js';
|
|
24
24
|
import '../../docx/wrapTypes.js';
|
|
25
|
+
import '../../watermark-DAcnAs_J.js';
|
|
25
26
|
|
|
26
27
|
/**
|
|
27
28
|
* Walk the PM doc once and derive (a) the tracked-change list and (b) a
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as CorePlugin, P as PluginOptions, a as PluginRegistrationResult, b as CommandHandler, M as McpToolDefinition, c as PluginEventListener } from './types-DTF0N7UE.mjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Plugin Registry
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as CorePlugin, P as PluginOptions, a as PluginRegistrationResult, b as CommandHandler, M as McpToolDefinition, c as PluginEventListener } from './types-DDQWU7-j.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Plugin Registry
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Document } from './types/document.mjs';
|
|
2
|
+
import { D as DocumentBody, B as BlockContent, S as SectionProperties } from './content-3xF4WDE8.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Document Serializer - Serialize complete document.xml
|
|
6
|
+
*
|
|
7
|
+
* Converts Document objects back to valid document.xml OOXML format.
|
|
8
|
+
* Combines all content (paragraphs, tables) with section properties
|
|
9
|
+
* and proper namespace declarations.
|
|
10
|
+
*
|
|
11
|
+
* OOXML Reference:
|
|
12
|
+
* - Document root: w:document
|
|
13
|
+
* - Document body: w:body
|
|
14
|
+
* - Section properties: w:sectPr
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Serialize a single block content item (paragraph, table, or block SDT).
|
|
19
|
+
*
|
|
20
|
+
* Exported so the footnote/endnote serializer can reuse the exact same
|
|
21
|
+
* block-level emission the document body uses — preserving tracked-change
|
|
22
|
+
* wrappers (`w:ins`/`w:del`), paragraph/run properties, fields, and tables
|
|
23
|
+
* inside note bodies instead of reimplementing a minimal serializer.
|
|
24
|
+
*/
|
|
25
|
+
declare function serializeBlockContent(block: BlockContent): string;
|
|
26
|
+
/**
|
|
27
|
+
* Serialize a DocumentBody to document.xml body content
|
|
28
|
+
*
|
|
29
|
+
* @param body - The document body to serialize
|
|
30
|
+
* @returns XML string for the body element (without body tags)
|
|
31
|
+
*/
|
|
32
|
+
declare function serializeDocumentBody(body: DocumentBody): string;
|
|
33
|
+
/**
|
|
34
|
+
* Serialize a complete Document to valid document.xml
|
|
35
|
+
*
|
|
36
|
+
* @param doc - The document to serialize
|
|
37
|
+
* @returns Complete XML string for document.xml
|
|
38
|
+
*/
|
|
39
|
+
declare function serializeDocument(doc: Document): string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Section Properties Serializer - Serialize w:sectPr
|
|
43
|
+
*
|
|
44
|
+
* Converts SectionProperties back to OOXML `<w:sectPr>`. Used both for the
|
|
45
|
+
* final `w:body/w:sectPr` (last section) and for mid-body section breaks
|
|
46
|
+
* carried on a paragraph via `w:pPr/w:sectPr`.
|
|
47
|
+
*
|
|
48
|
+
* OOXML Reference:
|
|
49
|
+
* - Section properties: w:sectPr (ECMA-376 §17.6.17)
|
|
50
|
+
* - A paragraph-level sectPr (`w:pPr/w:sectPr`) marks the end of a section;
|
|
51
|
+
* the trailing `w:body/w:sectPr` describes the final section.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Serialize section properties (w:sectPr)
|
|
56
|
+
*/
|
|
57
|
+
declare function serializeSectionProperties(props: SectionProperties | undefined): string;
|
|
58
|
+
|
|
59
|
+
export { serializeDocument as a, serializeSectionProperties as b, serializeBlockContent as c, serializeDocumentBody as s };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Document } from './types/document.js';
|
|
2
|
+
import { D as DocumentBody, B as BlockContent, S as SectionProperties } from './content-C8fc_tL6.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Document Serializer - Serialize complete document.xml
|
|
6
|
+
*
|
|
7
|
+
* Converts Document objects back to valid document.xml OOXML format.
|
|
8
|
+
* Combines all content (paragraphs, tables) with section properties
|
|
9
|
+
* and proper namespace declarations.
|
|
10
|
+
*
|
|
11
|
+
* OOXML Reference:
|
|
12
|
+
* - Document root: w:document
|
|
13
|
+
* - Document body: w:body
|
|
14
|
+
* - Section properties: w:sectPr
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Serialize a single block content item (paragraph, table, or block SDT).
|
|
19
|
+
*
|
|
20
|
+
* Exported so the footnote/endnote serializer can reuse the exact same
|
|
21
|
+
* block-level emission the document body uses — preserving tracked-change
|
|
22
|
+
* wrappers (`w:ins`/`w:del`), paragraph/run properties, fields, and tables
|
|
23
|
+
* inside note bodies instead of reimplementing a minimal serializer.
|
|
24
|
+
*/
|
|
25
|
+
declare function serializeBlockContent(block: BlockContent): string;
|
|
26
|
+
/**
|
|
27
|
+
* Serialize a DocumentBody to document.xml body content
|
|
28
|
+
*
|
|
29
|
+
* @param body - The document body to serialize
|
|
30
|
+
* @returns XML string for the body element (without body tags)
|
|
31
|
+
*/
|
|
32
|
+
declare function serializeDocumentBody(body: DocumentBody): string;
|
|
33
|
+
/**
|
|
34
|
+
* Serialize a complete Document to valid document.xml
|
|
35
|
+
*
|
|
36
|
+
* @param doc - The document to serialize
|
|
37
|
+
* @returns Complete XML string for document.xml
|
|
38
|
+
*/
|
|
39
|
+
declare function serializeDocument(doc: Document): string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Section Properties Serializer - Serialize w:sectPr
|
|
43
|
+
*
|
|
44
|
+
* Converts SectionProperties back to OOXML `<w:sectPr>`. Used both for the
|
|
45
|
+
* final `w:body/w:sectPr` (last section) and for mid-body section breaks
|
|
46
|
+
* carried on a paragraph via `w:pPr/w:sectPr`.
|
|
47
|
+
*
|
|
48
|
+
* OOXML Reference:
|
|
49
|
+
* - Section properties: w:sectPr (ECMA-376 §17.6.17)
|
|
50
|
+
* - A paragraph-level sectPr (`w:pPr/w:sectPr`) marks the end of a section;
|
|
51
|
+
* the trailing `w:body/w:sectPr` describes the final section.
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Serialize section properties (w:sectPr)
|
|
56
|
+
*/
|
|
57
|
+
declare function serializeSectionProperties(props: SectionProperties | undefined): string;
|
|
58
|
+
|
|
59
|
+
export { serializeDocument as a, serializeSectionProperties as b, serializeBlockContent as c, serializeDocumentBody as s };
|
|
@@ -230,4 +230,4 @@ interface MediaFile {
|
|
|
230
230
|
dataUrl?: string;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
export type { DocDefaults as D, FontTable as F, MediaFile as M, Relationship as R,
|
|
233
|
+
export type { DocDefaults as D, FontTable as F, MediaFile as M, Relationship as R, StyleDefinitions as S, Theme as T, Style as a, RelationshipMap as b, FontInfo as c, RelationshipType as d, StyleType as e, ThemeColorScheme as f, ThemeFont as g, ThemeFontScheme as h };
|
|
@@ -230,4 +230,4 @@ interface MediaFile {
|
|
|
230
230
|
dataUrl?: string;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
export type { DocDefaults as D, FontTable as F, MediaFile as M, Relationship as R,
|
|
233
|
+
export type { DocDefaults as D, FontTable as F, MediaFile as M, Relationship as R, StyleDefinitions as S, Theme as T, Style as a, RelationshipMap as b, FontInfo as c, RelationshipType as d, StyleType as e, ThemeColorScheme as f, ThemeFont as g, ThemeFontScheme as h };
|
package/dist/types/content.d.mts
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export { B as BlockContent, w as BlockSdt, z as BookmarkEnd, G as BookmarkStart, x as BreakContent, J as Column,
|
|
15
|
+
export { B as BlockContent, w as BlockSdt, z as BookmarkEnd, G as BookmarkStart, x as BreakContent, J as Column, e as Comment, f as CommentRangeEnd, g as CommentRangeStart, K as ComplexField, h as Deletion, D as DocumentBody, O as DrawingContent, E as Endnote, Q as EndnotePosition, U as EndnoteProperties, V as Field, W as FieldCharContent, X as FieldType, Y as FooterReference, F as Footnote, Z as FootnotePosition, _ as FootnoteProperties, y as HeaderFooter, $ as HeaderFooterType, a0 as HeaderReference, H as Hyperlink, I as Image, a1 as ImageCrop, a2 as ImagePadding, a3 as ImagePosition, a4 as ImageSize, a5 as ImageTransform, a6 as ImageWrap, a7 as InlineSdt, i as Insertion, a8 as InstrTextContent, aa as LineNumberRestart, ac as MathEquation, M as MoveFrom, ad as MoveFromRangeEnd, ae as MoveFromRangeStart, j as MoveTo, af as MoveToRangeEnd, ag as MoveToRangeStart, ah as NoBreakHyphenContent, ai as NoteNumberRestart, aj as NoteRefMarkContent, ak as NoteReferenceContent, am as PageOrientation, P as Paragraph, l as ParagraphContent, a as ParagraphPropertyChange, an as PropertyChangeInfo, m as Run, n as RunContent, ao as RunPropertyChange, v as SdtDataBinding, u as SdtProperties, t as SdtType, ap as Section, S as SectionProperties, aq as SectionStart, ar as SeparatorContent, as as Shape, at as ShapeContent, au as ShapeFill, av as ShapeOutline, aw as ShapeTextBody, ax as ShapeType, ay as SimpleField, az as SoftHyphenContent, aA as SymbolContent, aB as TabContent, T as Table, o as TableCell, c as TableCellPropertyChange, b as TablePropertyChange, p as TableRow, d as TableRowPropertyChange, aC as TableStructuralChangeInfo, aD as TextBox, q as TextContent, r as TrackedChangeInfo, s as TrackedRunChange, aE as VerticalAlign } from '../content-3xF4WDE8.mjs';
|
|
16
|
+
export { P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-DAcnAs_J.mjs';
|
|
16
17
|
import '../formatting-BH4hcZiq.mjs';
|
|
17
18
|
import '../colors-C3vA7HUU.mjs';
|
|
18
19
|
import '../docx/wrapTypes.mjs';
|
package/dist/types/content.d.ts
CHANGED
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export { B as BlockContent, w as BlockSdt, z as BookmarkEnd, G as BookmarkStart, x as BreakContent, J as Column,
|
|
15
|
+
export { B as BlockContent, w as BlockSdt, z as BookmarkEnd, G as BookmarkStart, x as BreakContent, J as Column, e as Comment, f as CommentRangeEnd, g as CommentRangeStart, K as ComplexField, h as Deletion, D as DocumentBody, O as DrawingContent, E as Endnote, Q as EndnotePosition, U as EndnoteProperties, V as Field, W as FieldCharContent, X as FieldType, Y as FooterReference, F as Footnote, Z as FootnotePosition, _ as FootnoteProperties, y as HeaderFooter, $ as HeaderFooterType, a0 as HeaderReference, H as Hyperlink, I as Image, a1 as ImageCrop, a2 as ImagePadding, a3 as ImagePosition, a4 as ImageSize, a5 as ImageTransform, a6 as ImageWrap, a7 as InlineSdt, i as Insertion, a8 as InstrTextContent, aa as LineNumberRestart, ac as MathEquation, M as MoveFrom, ad as MoveFromRangeEnd, ae as MoveFromRangeStart, j as MoveTo, af as MoveToRangeEnd, ag as MoveToRangeStart, ah as NoBreakHyphenContent, ai as NoteNumberRestart, aj as NoteRefMarkContent, ak as NoteReferenceContent, am as PageOrientation, P as Paragraph, l as ParagraphContent, a as ParagraphPropertyChange, an as PropertyChangeInfo, m as Run, n as RunContent, ao as RunPropertyChange, v as SdtDataBinding, u as SdtProperties, t as SdtType, ap as Section, S as SectionProperties, aq as SectionStart, ar as SeparatorContent, as as Shape, at as ShapeContent, au as ShapeFill, av as ShapeOutline, aw as ShapeTextBody, ax as ShapeType, ay as SimpleField, az as SoftHyphenContent, aA as SymbolContent, aB as TabContent, T as Table, o as TableCell, c as TableCellPropertyChange, b as TablePropertyChange, p as TableRow, d as TableRowPropertyChange, aC as TableStructuralChangeInfo, aD as TextBox, q as TextContent, r as TrackedChangeInfo, s as TrackedRunChange, aE as VerticalAlign } from '../content-C8fc_tL6.js';
|
|
16
|
+
export { P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-DAcnAs_J.js';
|
|
16
17
|
import '../formatting-_OXU8gLB.js';
|
|
17
18
|
import '../colors-C3vA7HUU.js';
|
|
18
19
|
import '../docx/wrapTypes.js';
|
package/dist/types/content.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var chunkDKKTY56Q_js=require('../chunk-DKKTY56Q.js');require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"pictureWatermarkDisplayEmu",{enumerable:true,get:function(){return chunkDKKTY56Q_js.a}});
|
package/dist/types/content.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as pictureWatermarkDisplayEmu}from'../chunk-VOCHZNOF.mjs';import'../chunk-QYUPLKLP.mjs';
|
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { B as BorderSpec, C as ColorValue, S as ShadingProperties, T as ThemeColorSlot } from '../colors-C3vA7HUU.mjs';
|
|
17
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 {
|
|
19
|
-
export { A as AbstractNumbering, B as BlockContent, w as BlockSdt, z as BookmarkEnd, G as BookmarkStart, x as BreakContent, J as Column,
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
import { D as DocumentBody, k as NumberingDefinitions, F as Footnote, E as Endnote, y as HeaderFooter } from '../content-3xF4WDE8.mjs';
|
|
19
|
+
export { A as AbstractNumbering, B as BlockContent, w as BlockSdt, z as BookmarkEnd, G as BookmarkStart, x as BreakContent, J as Column, e as Comment, f as CommentRangeEnd, g as CommentRangeStart, K as ComplexField, h as Deletion, O as DrawingContent, Q as EndnotePosition, U as EndnoteProperties, V as Field, W as FieldCharContent, X as FieldType, Y as FooterReference, Z as FootnotePosition, _ as FootnoteProperties, $ as HeaderFooterType, a0 as HeaderReference, H as Hyperlink, I as Image, a1 as ImageCrop, a2 as ImagePadding, a3 as ImagePosition, a4 as ImageSize, a5 as ImageTransform, a6 as ImageWrap, a7 as InlineSdt, i as Insertion, a8 as InstrTextContent, a9 as LevelSuffix, aa as LineNumberRestart, L as ListLevel, ab as ListRendering, ac as MathEquation, M as MoveFrom, ad as MoveFromRangeEnd, ae as MoveFromRangeStart, j as MoveTo, af as MoveToRangeEnd, ag as MoveToRangeStart, ah as NoBreakHyphenContent, ai as NoteNumberRestart, aj as NoteRefMarkContent, ak as NoteReferenceContent, N as NumberFormat, al as NumberingInstance, am as PageOrientation, P as Paragraph, l as ParagraphContent, a as ParagraphPropertyChange, an as PropertyChangeInfo, m as Run, n as RunContent, ao as RunPropertyChange, v as SdtDataBinding, u as SdtProperties, t as SdtType, ap as Section, S as SectionProperties, aq as SectionStart, ar as SeparatorContent, as as Shape, at as ShapeContent, au as ShapeFill, av as ShapeOutline, aw as ShapeTextBody, ax as ShapeType, ay as SimpleField, az as SoftHyphenContent, aA as SymbolContent, aB as TabContent, T as Table, o as TableCell, c as TableCellPropertyChange, b as TablePropertyChange, p as TableRow, d as TableRowPropertyChange, aC as TableStructuralChangeInfo, aD as TextBox, q as TextContent, r as TrackedChangeInfo, s as TrackedRunChange, aE as VerticalAlign } from '../content-3xF4WDE8.mjs';
|
|
20
|
+
export { P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-DAcnAs_J.mjs';
|
|
21
|
+
import { S as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-BOJ93SAm.mjs';
|
|
22
|
+
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, a as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-BOJ93SAm.mjs';
|
|
22
23
|
import '../docx/wrapTypes.mjs';
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -70,10 +71,20 @@ interface DocxPackage {
|
|
|
70
71
|
settings?: DocumentSettings;
|
|
71
72
|
/** Font table */
|
|
72
73
|
fontTable?: FontTable;
|
|
73
|
-
/** Footnotes */
|
|
74
|
+
/** Footnotes (normal notes only — separators live in `footnoteSeparators`) */
|
|
74
75
|
footnotes?: Footnote[];
|
|
75
|
-
/** Endnotes */
|
|
76
|
+
/** Endnotes (normal notes only — separators live in `endnoteSeparators`) */
|
|
76
77
|
endnotes?: Endnote[];
|
|
78
|
+
/**
|
|
79
|
+
* Separator footnotes (`w:type="separator"` / `"continuationSeparator"` /
|
|
80
|
+
* `"continuationNotice"`) kept out of `footnotes` so rendering/layout only
|
|
81
|
+
* sees real notes. Retained for round-trip: Word rejects a footnotes part
|
|
82
|
+
* whose separator notes are missing, so the serializer re-emits these ahead
|
|
83
|
+
* of the normal notes.
|
|
84
|
+
*/
|
|
85
|
+
footnoteSeparators?: Footnote[];
|
|
86
|
+
/** Separator endnotes — see `footnoteSeparators`. */
|
|
87
|
+
endnoteSeparators?: Endnote[];
|
|
77
88
|
/** Headers by relationship ID */
|
|
78
89
|
headers?: Map<string, HeaderFooter>;
|
|
79
90
|
/** Footers by relationship ID */
|
package/dist/types/document.d.ts
CHANGED
|
@@ -15,10 +15,11 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { B as BorderSpec, C as ColorValue, S as ShadingProperties, T as ThemeColorSlot } from '../colors-C3vA7HUU.js';
|
|
17
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 {
|
|
19
|
-
export { A as AbstractNumbering, B as BlockContent, w as BlockSdt, z as BookmarkEnd, G as BookmarkStart, x as BreakContent, J as Column,
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
import { D as DocumentBody, k as NumberingDefinitions, F as Footnote, E as Endnote, y as HeaderFooter } from '../content-C8fc_tL6.js';
|
|
19
|
+
export { A as AbstractNumbering, B as BlockContent, w as BlockSdt, z as BookmarkEnd, G as BookmarkStart, x as BreakContent, J as Column, e as Comment, f as CommentRangeEnd, g as CommentRangeStart, K as ComplexField, h as Deletion, O as DrawingContent, Q as EndnotePosition, U as EndnoteProperties, V as Field, W as FieldCharContent, X as FieldType, Y as FooterReference, Z as FootnotePosition, _ as FootnoteProperties, $ as HeaderFooterType, a0 as HeaderReference, H as Hyperlink, I as Image, a1 as ImageCrop, a2 as ImagePadding, a3 as ImagePosition, a4 as ImageSize, a5 as ImageTransform, a6 as ImageWrap, a7 as InlineSdt, i as Insertion, a8 as InstrTextContent, a9 as LevelSuffix, aa as LineNumberRestart, L as ListLevel, ab as ListRendering, ac as MathEquation, M as MoveFrom, ad as MoveFromRangeEnd, ae as MoveFromRangeStart, j as MoveTo, af as MoveToRangeEnd, ag as MoveToRangeStart, ah as NoBreakHyphenContent, ai as NoteNumberRestart, aj as NoteRefMarkContent, ak as NoteReferenceContent, N as NumberFormat, al as NumberingInstance, am as PageOrientation, P as Paragraph, l as ParagraphContent, a as ParagraphPropertyChange, an as PropertyChangeInfo, m as Run, n as RunContent, ao as RunPropertyChange, v as SdtDataBinding, u as SdtProperties, t as SdtType, ap as Section, S as SectionProperties, aq as SectionStart, ar as SeparatorContent, as as Shape, at as ShapeContent, au as ShapeFill, av as ShapeOutline, aw as ShapeTextBody, ax as ShapeType, ay as SimpleField, az as SoftHyphenContent, aA as SymbolContent, aB as TabContent, T as Table, o as TableCell, c as TableCellPropertyChange, b as TablePropertyChange, p as TableRow, d as TableRowPropertyChange, aC as TableStructuralChangeInfo, aD as TextBox, q as TextContent, r as TrackedChangeInfo, s as TrackedRunChange, aE as VerticalAlign } from '../content-C8fc_tL6.js';
|
|
20
|
+
export { P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-DAcnAs_J.js';
|
|
21
|
+
import { S as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-BWqX2AS-.js';
|
|
22
|
+
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, a as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-BWqX2AS-.js';
|
|
22
23
|
import '../docx/wrapTypes.js';
|
|
23
24
|
|
|
24
25
|
/**
|
|
@@ -70,10 +71,20 @@ interface DocxPackage {
|
|
|
70
71
|
settings?: DocumentSettings;
|
|
71
72
|
/** Font table */
|
|
72
73
|
fontTable?: FontTable;
|
|
73
|
-
/** Footnotes */
|
|
74
|
+
/** Footnotes (normal notes only — separators live in `footnoteSeparators`) */
|
|
74
75
|
footnotes?: Footnote[];
|
|
75
|
-
/** Endnotes */
|
|
76
|
+
/** Endnotes (normal notes only — separators live in `endnoteSeparators`) */
|
|
76
77
|
endnotes?: Endnote[];
|
|
78
|
+
/**
|
|
79
|
+
* Separator footnotes (`w:type="separator"` / `"continuationSeparator"` /
|
|
80
|
+
* `"continuationNotice"`) kept out of `footnotes` so rendering/layout only
|
|
81
|
+
* sees real notes. Retained for round-trip: Word rejects a footnotes part
|
|
82
|
+
* whose separator notes are missing, so the serializer re-emits these ahead
|
|
83
|
+
* of the normal notes.
|
|
84
|
+
*/
|
|
85
|
+
footnoteSeparators?: Footnote[];
|
|
86
|
+
/** Separator endnotes — see `footnoteSeparators`. */
|
|
87
|
+
endnoteSeparators?: Endnote[];
|
|
77
88
|
/** Headers by relationship ID */
|
|
78
89
|
headers?: Map<string, HeaderFooter>;
|
|
79
90
|
/** Footers by relationship ID */
|
package/dist/types/document.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';
|
|
1
|
+
'use strict';var chunkDKKTY56Q_js=require('../chunk-DKKTY56Q.js');require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"pictureWatermarkDisplayEmu",{enumerable:true,get:function(){return chunkDKKTY56Q_js.a}});
|
package/dist/types/document.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as pictureWatermarkDisplayEmu}from'../chunk-VOCHZNOF.mjs';import'../chunk-QYUPLKLP.mjs';
|
|
@@ -308,4 +308,4 @@ interface PluginRegistrationResult {
|
|
|
308
308
|
warnings?: string[];
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
export { type
|
|
311
|
+
export { type CorePlugin as C, type ExtractCommand as E, type JsonSchema as J, type LoadedDocument as L, type McpToolDefinition as M, type PluginOptions as P, type TypedCommandHandler as T, type ZodSchemaLike as Z, type PluginRegistrationResult as a, type CommandHandler as b, type PluginEventListener as c, type CommandResult as d, type McpSession as e, type McpToolAnnotations as f, type McpToolContent as g, type McpToolContext as h, type McpToolHandler as i, type McpToolResult as j, type PluginCommand as k, type PluginEvent as l, isZodSchema as m, type McpToolExample as n };
|
|
@@ -308,4 +308,4 @@ interface PluginRegistrationResult {
|
|
|
308
308
|
warnings?: string[];
|
|
309
309
|
}
|
|
310
310
|
|
|
311
|
-
export { type
|
|
311
|
+
export { type CorePlugin as C, type ExtractCommand as E, type JsonSchema as J, type LoadedDocument as L, type McpToolDefinition as M, type PluginOptions as P, type TypedCommandHandler as T, type ZodSchemaLike as Z, type PluginRegistrationResult as a, type CommandHandler as b, type PluginEventListener as c, type CommandResult as d, type McpSession as e, type McpToolAnnotations as f, type McpToolContent as g, type McpToolContext as h, type McpToolHandler as i, type McpToolResult as j, type PluginCommand as k, type PluginEvent as l, isZodSchema as m, type McpToolExample as n };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drag auto-scroll geometry shared by the React and Vue adapters.
|
|
3
|
+
*
|
|
4
|
+
* When the user drag-selects and the pointer nears the top/bottom edge of the
|
|
5
|
+
* scroll container, the container should auto-scroll at a speed proportional to
|
|
6
|
+
* how deep into the edge zone the pointer is. The per-frame loop and the
|
|
7
|
+
* framework wiring stay in each adapter's hook; this is just the pure delta.
|
|
8
|
+
*/
|
|
9
|
+
/** Pixel distance from the container edge where auto-scroll activates. */
|
|
10
|
+
declare const AUTO_SCROLL_EDGE_ZONE = 40;
|
|
11
|
+
/** Maximum scroll speed in pixels per frame (~60fps). */
|
|
12
|
+
declare const AUTO_SCROLL_MAX_SPEED = 12;
|
|
13
|
+
/**
|
|
14
|
+
* Vertical scroll delta (px/frame) for a pointer at `mouseY` over a container
|
|
15
|
+
* whose viewport spans `rect.top`..`rect.bottom`. Negative scrolls up, positive
|
|
16
|
+
* down, 0 when the pointer is outside both edge zones. Speed ramps linearly
|
|
17
|
+
* from 0 at the edge-zone boundary to `AUTO_SCROLL_MAX_SPEED` at the edge.
|
|
18
|
+
*/
|
|
19
|
+
declare function computeAutoScrollDelta(rect: {
|
|
20
|
+
top: number;
|
|
21
|
+
bottom: number;
|
|
22
|
+
}, mouseY: number): number;
|
|
23
|
+
|
|
24
|
+
export { AUTO_SCROLL_EDGE_ZONE, AUTO_SCROLL_MAX_SPEED, computeAutoScrollDelta };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drag auto-scroll geometry shared by the React and Vue adapters.
|
|
3
|
+
*
|
|
4
|
+
* When the user drag-selects and the pointer nears the top/bottom edge of the
|
|
5
|
+
* scroll container, the container should auto-scroll at a speed proportional to
|
|
6
|
+
* how deep into the edge zone the pointer is. The per-frame loop and the
|
|
7
|
+
* framework wiring stay in each adapter's hook; this is just the pure delta.
|
|
8
|
+
*/
|
|
9
|
+
/** Pixel distance from the container edge where auto-scroll activates. */
|
|
10
|
+
declare const AUTO_SCROLL_EDGE_ZONE = 40;
|
|
11
|
+
/** Maximum scroll speed in pixels per frame (~60fps). */
|
|
12
|
+
declare const AUTO_SCROLL_MAX_SPEED = 12;
|
|
13
|
+
/**
|
|
14
|
+
* Vertical scroll delta (px/frame) for a pointer at `mouseY` over a container
|
|
15
|
+
* whose viewport spans `rect.top`..`rect.bottom`. Negative scrolls up, positive
|
|
16
|
+
* down, 0 when the pointer is outside both edge zones. Speed ramps linearly
|
|
17
|
+
* from 0 at the edge-zone boundary to `AUTO_SCROLL_MAX_SPEED` at the edge.
|
|
18
|
+
*/
|
|
19
|
+
declare function computeAutoScrollDelta(rect: {
|
|
20
|
+
top: number;
|
|
21
|
+
bottom: number;
|
|
22
|
+
}, mouseY: number): number;
|
|
23
|
+
|
|
24
|
+
export { AUTO_SCROLL_EDGE_ZONE, AUTO_SCROLL_MAX_SPEED, computeAutoScrollDelta };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');var t=40,L=12;function o(_,E){if(E<_.top+40){let O=Math.max(0,_.top+40-E);return -Math.min(12,O/40*12)}if(E>_.bottom-40){let O=Math.max(0,E-(_.bottom-40));return Math.min(12,O/40*12)}return 0}exports.AUTO_SCROLL_EDGE_ZONE=t;exports.AUTO_SCROLL_MAX_SPEED=L;exports.computeAutoScrollDelta=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import'../chunk-QYUPLKLP.mjs';var t=40,L=12;function o(_,E){if(E<_.top+40){let O=Math.max(0,_.top+40-E);return -Math.min(12,O/40*12)}if(E>_.bottom-40){let O=Math.max(0,E-(_.bottom-40));return Math.min(12,O/40*12)}return 0}export{t as AUTO_SCROLL_EDGE_ZONE,L as AUTO_SCROLL_MAX_SPEED,o as computeAutoScrollDelta};
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { P as Paragraph } from '../content-
|
|
11
|
+
import { P as Paragraph } from '../content-3xF4WDE8.mjs';
|
|
12
12
|
import '../formatting-BH4hcZiq.mjs';
|
|
13
13
|
import '../colors-C3vA7HUU.mjs';
|
|
14
14
|
import '../docx/wrapTypes.mjs';
|
|
15
|
+
import '../watermark-DAcnAs_J.mjs';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Framework-agnostic comment + tracked-change helpers shared by the
|
package/dist/utils/comments.d.ts
CHANGED
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { P as Paragraph } from '../content-
|
|
11
|
+
import { P as Paragraph } from '../content-C8fc_tL6.js';
|
|
12
12
|
import '../formatting-_OXU8gLB.js';
|
|
13
13
|
import '../colors-C3vA7HUU.js';
|
|
14
14
|
import '../docx/wrapTypes.js';
|
|
15
|
+
import '../watermark-DAcnAs_J.js';
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Framework-agnostic comment + tracked-change helpers shared by the
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -8,17 +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-
|
|
12
|
-
import {
|
|
13
|
-
import { T as Theme } from '../styles-
|
|
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-BCvxTlLF.mjs';
|
|
12
|
+
import { m as Run, P as Paragraph } from '../content-3xF4WDE8.mjs';
|
|
13
|
+
import { T as Theme } from '../styles-BOJ93SAm.mjs';
|
|
14
14
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.mjs';
|
|
15
|
-
export { F as FONT_MAPPING, z as FontDefinition, 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, A as extractFontsFromDocument, i as findPageBreaks, B 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, C as loadDocumentFonts, t as loadFont, D as loadFontDefinitions, u as loadFontFromBuffer, E as loadFontFromUrl, G as loadFontWithMapping, v as loadFonts, H as loadFontsWithMapping, J as onFontError, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from '../fontLoader-
|
|
15
|
+
export { F as FONT_MAPPING, z as FontDefinition, 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, A as extractFontsFromDocument, i as findPageBreaks, B 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, C as loadDocumentFonts, t as loadFont, D as loadFontDefinitions, u as loadFontFromBuffer, E as loadFontFromUrl, G as loadFontWithMapping, v as loadFonts, H as loadFontsWithMapping, J as onFontError, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from '../fontLoader-CUS1BPv7.mjs';
|
|
16
16
|
import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.mjs';
|
|
17
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 '../watermark-DAcnAs_J.mjs';
|
|
22
23
|
import '../docx/wrapTypes.mjs';
|
|
23
24
|
import 'prosemirror-model';
|
|
24
25
|
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -8,17 +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-
|
|
12
|
-
import {
|
|
13
|
-
import { T as Theme } from '../styles-
|
|
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-8A-qj-LP.js';
|
|
12
|
+
import { m as Run, P as Paragraph } from '../content-C8fc_tL6.js';
|
|
13
|
+
import { T as Theme } from '../styles-BWqX2AS-.js';
|
|
14
14
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.js';
|
|
15
|
-
export { F as FONT_MAPPING, z as FontDefinition, 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, A as extractFontsFromDocument, i as findPageBreaks, B 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, C as loadDocumentFonts, t as loadFont, D as loadFontDefinitions, u as loadFontFromBuffer, E as loadFontFromUrl, G as loadFontWithMapping, v as loadFonts, H as loadFontsWithMapping, J as onFontError, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from '../fontLoader-
|
|
15
|
+
export { F as FONT_MAPPING, z as FontDefinition, 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, A as extractFontsFromDocument, i as findPageBreaks, B 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, C as loadDocumentFonts, t as loadFont, D as loadFontDefinitions, u as loadFontFromBuffer, E as loadFontFromUrl, G as loadFontWithMapping, v as loadFonts, H as loadFontsWithMapping, J as onFontError, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from '../fontLoader-Dl9SEKex.js';
|
|
16
16
|
import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.js';
|
|
17
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 '../watermark-DAcnAs_J.js';
|
|
22
23
|
import '../docx/wrapTypes.js';
|
|
23
24
|
import 'prosemirror-model';
|
|
24
25
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watermark — the MS Word "Design → Watermark" feature.
|
|
3
|
+
*
|
|
4
|
+
* In OOXML a watermark is legacy VML stored inside a header part, inside a
|
|
5
|
+
* paragraph run: `<w:pict><v:shape>…</v:shape></w:pict>`. It renders behind
|
|
6
|
+
* the body content on every page of the section. Word supports two kinds:
|
|
7
|
+
*
|
|
8
|
+
* - **Text** — `<v:shape type="#_x0000_t136"><v:textpath string="DRAFT"/>`
|
|
9
|
+
* with a fill color, font, optional rotation (diagonal vs horizontal) and a
|
|
10
|
+
* reduced-opacity "semitransparent" look.
|
|
11
|
+
* - **Picture** — `<v:shape><v:imagedata r:id="rIdN"/>` referencing a media
|
|
12
|
+
* file, scaled, optionally "washed out" (lightened).
|
|
13
|
+
*
|
|
14
|
+
* We model the watermark as a dedicated field on the owning `HeaderFooter`
|
|
15
|
+
* rather than as editable run content, so it stays out of the ProseMirror text
|
|
16
|
+
* flow while still round-tripping through parse → render → serialize.
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Text watermark (e.g. "CONFIDENTIAL", "DRAFT").
|
|
20
|
+
*/
|
|
21
|
+
interface TextWatermark {
|
|
22
|
+
kind: 'text';
|
|
23
|
+
/** The watermark text. */
|
|
24
|
+
text: string;
|
|
25
|
+
/** Font family (e.g. 'Calibri'). */
|
|
26
|
+
font: string;
|
|
27
|
+
/** Fill color as a CSS hex string (e.g. '#C0C0C0'). */
|
|
28
|
+
color: string;
|
|
29
|
+
/** Word's "Semitransparent" checkbox — renders at reduced opacity. */
|
|
30
|
+
semitransparent: boolean;
|
|
31
|
+
/** Diagonal (≈ -45°) or horizontal layout. */
|
|
32
|
+
layout: 'diagonal' | 'horizontal';
|
|
33
|
+
/** Font size in points. When undefined the renderer auto-sizes to the page (Word's "Auto"). */
|
|
34
|
+
fontSize?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Picture watermark — a scaled, optionally washed-out background image.
|
|
38
|
+
*/
|
|
39
|
+
interface PictureWatermark {
|
|
40
|
+
kind: 'picture';
|
|
41
|
+
/** Header-part relationship id of the media (set for images parsed from an existing file). */
|
|
42
|
+
relId?: string;
|
|
43
|
+
/** Package path of the media, e.g. 'word/media/image1.png'. */
|
|
44
|
+
mediaPath?: string;
|
|
45
|
+
/** Raw bytes for an image added in-editor (no rId yet). */
|
|
46
|
+
data?: Uint8Array;
|
|
47
|
+
/** MIME type for `data`. */
|
|
48
|
+
contentType?: string;
|
|
49
|
+
/** Ready-to-use data URL for rendering (resolved from media or `data`). */
|
|
50
|
+
dataUrl?: string;
|
|
51
|
+
/** Scale factor; 1 = 100% / Word's "Auto". */
|
|
52
|
+
scale: number;
|
|
53
|
+
/** Word's "Washout" checkbox — lightens the image so text stays readable. */
|
|
54
|
+
washout: boolean;
|
|
55
|
+
/** Natural width in EMUs (when known). */
|
|
56
|
+
widthEmu?: number;
|
|
57
|
+
/** Natural height in EMUs (when known). */
|
|
58
|
+
heightEmu?: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* A document watermark — text or picture.
|
|
62
|
+
*/
|
|
63
|
+
type Watermark = TextWatermark | PictureWatermark;
|
|
64
|
+
/**
|
|
65
|
+
* Compute the display dimensions (in EMUs) for a picture watermark from the
|
|
66
|
+
* source image's natural pixel size. Bounds the larger side to a page-sized
|
|
67
|
+
* default and derives the other from the aspect ratio, so the watermark is
|
|
68
|
+
* never distorted (the serializer would otherwise force a square) and never
|
|
69
|
+
* overflows the page. Returns `undefined` for an unusable size (zero/NaN),
|
|
70
|
+
* letting callers fall back to defaults.
|
|
71
|
+
*/
|
|
72
|
+
declare function pictureWatermarkDisplayEmu(naturalWidthPx: number, naturalHeightPx: number): {
|
|
73
|
+
widthEmu: number;
|
|
74
|
+
heightEmu: number;
|
|
75
|
+
} | undefined;
|
|
76
|
+
|
|
77
|
+
export { type PictureWatermark as P, type TextWatermark as T, type Watermark as W, pictureWatermarkDisplayEmu as p };
|