@eigenpal/docx-editor-core 1.4.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.d.mts +8 -7
- package/dist/agent/index.d.ts +8 -7
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-2KPOGFFR.js +1 -0
- package/dist/{chunk-KXVCCT2A.js → chunk-2KUOYHXX.js} +1 -1
- package/dist/chunk-2LVK7EF5.mjs +2 -0
- package/dist/chunk-2ZTKTE7P.js +1 -0
- package/dist/{chunk-C45EFOVP.js → chunk-34DJT72K.js} +1 -1
- package/dist/chunk-3HLRRK6N.mjs +2 -0
- package/dist/chunk-4272FQ2E.js +1 -0
- package/dist/chunk-4DCTKHS5.js +1 -0
- package/dist/chunk-4JPHW7ZI.js +2 -0
- package/dist/chunk-4QJEMD23.mjs +4 -0
- package/dist/chunk-4QSFBX26.mjs +1 -0
- package/dist/chunk-4SZAFWLV.mjs +1 -0
- package/dist/{chunk-GGUHM74A.mjs → chunk-5JULVEYK.mjs} +1 -1
- package/dist/chunk-6AGU57TL.mjs +1 -0
- package/dist/chunk-6ENZQGYR.mjs +1 -0
- package/dist/chunk-6KYOT4E7.js +4 -0
- package/dist/chunk-77X765ZO.js +1 -0
- package/dist/chunk-7UMOUKSF.js +1 -0
- package/dist/chunk-AXVWVIIN.js +1 -0
- package/dist/chunk-B6FA4MJ5.mjs +1 -0
- package/dist/chunk-BBJMUBTD.mjs +1 -0
- package/dist/chunk-BJSG6TEG.js +1 -0
- package/dist/chunk-BKP5QMTS.js +1 -0
- package/dist/chunk-C57BOE7B.mjs +2 -0
- package/dist/chunk-CDBKFBC2.mjs +15 -0
- package/dist/{chunk-BUEMXRXH.js → chunk-CDGV7CLS.js} +1 -1
- package/dist/{chunk-6IZOFIQH.js → chunk-CWPIXUU2.js} +1 -1
- package/dist/chunk-DX5XU6JN.js +1 -0
- package/dist/chunk-E7UN3PVC.mjs +1 -0
- package/dist/chunk-EJ2JAYRI.js +1 -0
- package/dist/{chunk-CHN26LLL.mjs → chunk-F24WZXN4.mjs} +1 -1
- package/dist/{chunk-2SGJZYQF.js → chunk-F44XU6G5.js} +1 -1
- package/dist/{chunk-TE2AF7FM.js → chunk-FETIBXTH.js} +1 -1
- package/dist/{chunk-CZSAC65M.js → chunk-GFM6PERG.js} +1 -1
- package/dist/chunk-GLPOVLZD.mjs +1 -0
- package/dist/chunk-H57LNDBH.js +1 -0
- package/dist/chunk-HEJJXAXN.mjs +1 -0
- package/dist/chunk-ILPNMG7Q.js +1 -0
- package/dist/chunk-IM56AITE.mjs +1 -0
- package/dist/{chunk-BH3ACQ3M.js → chunk-JQUIUKRO.js} +3 -3
- package/dist/chunk-KK673XRZ.mjs +1 -0
- package/dist/chunk-KNY7SXPJ.mjs +1 -0
- package/dist/{chunk-DFUWJHKF.mjs → chunk-KSW6W2EK.mjs} +4 -4
- package/dist/chunk-LVUL7O27.js +1 -0
- package/dist/{chunk-SCK6ZM5V.js → chunk-LW5OFHSW.js} +2 -2
- package/dist/chunk-M65C4SQJ.mjs +2 -0
- package/dist/chunk-MA3HLGFO.js +1 -0
- package/dist/chunk-MWOHCSZE.js +1 -0
- package/dist/chunk-NO6PIL32.mjs +1 -0
- package/dist/chunk-NTBZRITU.mjs +1 -0
- package/dist/chunk-NTYJIOUE.js +2 -0
- package/dist/chunk-NY36MZ55.mjs +1 -0
- package/dist/chunk-PJEB3ZWG.mjs +3 -0
- package/dist/chunk-Q2VALXEU.js +3 -0
- package/dist/chunk-QVRMX2AC.js +15 -0
- package/dist/{chunk-FYRJTDC4.mjs → chunk-QZPVZY6S.mjs} +1 -1
- package/dist/{chunk-3QPKTG2Y.js → chunk-RGHRXIIZ.js} +3 -3
- package/dist/chunk-RRJKF2XI.mjs +1 -0
- package/dist/{chunk-ZBCFIW2V.js → chunk-T3UP6LF5.js} +1 -1
- package/dist/chunk-UC7JW66O.mjs +1 -0
- package/dist/chunk-V3NE7Q22.js +2 -0
- package/dist/chunk-VDKSZ5BQ.mjs +1 -0
- package/dist/chunk-VJFIAFZ5.mjs +1 -0
- package/dist/chunk-WCB25ESG.mjs +1 -0
- package/dist/chunk-WEQA5PPW.mjs +1 -0
- package/dist/{chunk-HPAUUQAX.mjs → chunk-WQJWT4RB.mjs} +1 -1
- package/dist/chunk-WWG6PUWU.js +1 -0
- package/dist/chunk-X6AICTHN.js +1 -0
- package/dist/{chunk-YNUPP7UG.mjs → chunk-XTPT4TNP.mjs} +2 -2
- package/dist/{chunk-CHTIWTHQ.mjs → chunk-YMXWLXVF.mjs} +1 -1
- package/dist/{colorResolver-8A-qj-LP.d.ts → colorResolver-C696sd9x.d.ts} +1 -1
- package/dist/{colorResolver-BCvxTlLF.d.mts → colorResolver-DCBfI4ld.d.mts} +1 -1
- package/dist/{content-C8fc_tL6.d.ts → content-BebvPfXc.d.ts} +4 -148
- package/dist/{content-3xF4WDE8.d.mts → content-CbBCrsr0.d.mts} +4 -148
- package/dist/{contentControlValues-DGDKD589.d.ts → contentControlValues-Com1GnZS.d.ts} +1 -1
- package/dist/{contentControlValues-DjWvoJQ-.d.mts → contentControlValues-DVJyudKU.d.mts} +1 -1
- package/dist/core-plugins.d.mts +5 -4
- package/dist/core-plugins.d.ts +5 -4
- 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-qR0VR2s0.d.mts → documentStyles-1G0xTl1v.d.mts} +1 -1
- package/dist/{documentStyles-C7k_8Sye.d.ts → documentStyles-Bw98BwEy.d.ts} +1 -1
- package/dist/docx/index.d.mts +8 -68
- package/dist/docx/index.d.ts +8 -68
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +5 -4
- package/dist/docx/parser.d.ts +5 -4
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +5 -4
- package/dist/docx/rezip.d.ts +5 -4
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +6 -5
- package/dist/docx/serializer/index.d.ts +6 -5
- package/dist/docx/serializer/index.js +1 -1
- package/dist/docx/serializer/index.mjs +1 -1
- package/dist/editor/index.d.mts +5 -4
- package/dist/editor/index.d.ts +5 -4
- package/dist/editor/index.js +1 -1
- package/dist/editor/index.mjs +1 -1
- package/dist/executor-FHL5D4CB.js +1 -0
- package/dist/executor-FL6XGVP3.mjs +1 -0
- package/dist/{fontLoader-CUS1BPv7.d.mts → fontLoader-B4uFKpAy.d.mts} +48 -5
- package/dist/{fontLoader-Dl9SEKex.d.ts → fontLoader-D9SBYuZZ.d.ts} +48 -5
- package/dist/{formatting-BH4hcZiq.d.mts → formatting-DFtuRFQY.d.mts} +13 -0
- package/dist/{formatting-_OXU8gLB.d.ts → formatting-JhqWT_XM.d.ts} +13 -0
- package/dist/{headerFooterLayout-AtAOhM8E.d.ts → headerFooterLayout-CtVsfqxQ.d.ts} +2 -2
- package/dist/{headerFooterLayout-CU6hvszp.d.mts → headerFooterLayout-D2LZLkDC.d.mts} +2 -2
- package/dist/headless.d.mts +10 -9
- package/dist/headless.d.ts +10 -9
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/clickToPositionDom.js +1 -1
- package/dist/layout-bridge/clickToPositionDom.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +70 -7
- package/dist/layout-bridge/index.d.ts +70 -7
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +4 -3
- package/dist/layout-bridge/measuring/index.d.ts +4 -3
- 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 +5 -4
- package/dist/layout-bridge/toFlowBlocks.d.ts +5 -4
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +5 -4
- package/dist/layout-engine/index.d.ts +5 -4
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +22 -10
- package/dist/layout-engine/types.d.ts +22 -10
- package/dist/layout-painter/index.d.mts +6 -5
- package/dist/layout-painter/index.d.ts +6 -5
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +6 -5
- package/dist/layout-painter/renderPage.d.ts +6 -5
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/lists-Bn29SzeS.d.ts +148 -0
- package/dist/lists-CyGxd5Y2.d.mts +148 -0
- package/dist/managers/AutoSaveManager.d.mts +5 -4
- package/dist/managers/AutoSaveManager.d.ts +5 -4
- package/dist/managers/TableSelectionManager.d.mts +5 -4
- package/dist/managers/TableSelectionManager.d.ts +5 -4
- package/dist/managers/types.d.mts +5 -4
- package/dist/managers/types.d.ts +5 -4
- package/dist/{marks-BY573yZn.d.mts → marks-CzrbFi4o.d.mts} +1 -1
- package/dist/{marks-CjC9tF5k.d.ts → marks-Dq1QsxKA.d.ts} +1 -1
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +5 -4
- package/dist/mcp.d.ts +5 -4
- package/dist/mcp.js +8 -8
- package/dist/mcp.mjs +7 -7
- package/dist/{nodes-75Q9GBxV.d.ts → nodes-Bd6tTkp0.d.ts} +17 -2
- package/dist/{nodes-cEI7hVY2.d.mts → nodes-BvO8GGD4.d.mts} +17 -2
- package/dist/numberingParser-ZSQ3SDCV.d.ts +81 -0
- package/dist/numberingParser-nSPZlzKr.d.mts +81 -0
- package/dist/prosemirror/applyFormatting.d.mts +39 -6
- package/dist/prosemirror/applyFormatting.d.ts +39 -6
- package/dist/prosemirror/applyFormatting.js +1 -1
- package/dist/prosemirror/applyFormatting.mjs +1 -1
- package/dist/prosemirror/cellDragSelection.d.mts +46 -0
- package/dist/prosemirror/cellDragSelection.d.ts +46 -0
- package/dist/prosemirror/cellDragSelection.js +1 -0
- package/dist/prosemirror/cellDragSelection.mjs +1 -0
- 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 +34 -4
- package/dist/prosemirror/commands/index.d.ts +34 -4
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.d.mts +11 -1
- package/dist/prosemirror/commands/paragraph.d.ts +11 -1
- package/dist/prosemirror/commands/paragraph.js +1 -1
- package/dist/prosemirror/commands/paragraph.mjs +1 -1
- package/dist/prosemirror/commands/sectionBreak.d.mts +25 -0
- package/dist/prosemirror/commands/sectionBreak.d.ts +25 -0
- package/dist/prosemirror/commands/sectionBreak.js +1 -0
- package/dist/prosemirror/commands/sectionBreak.mjs +1 -0
- package/dist/prosemirror/commentIdAllocator.d.mts +4 -3
- package/dist/prosemirror/commentIdAllocator.d.ts +4 -3
- package/dist/prosemirror/commentOps.d.mts +4 -3
- package/dist/prosemirror/commentOps.d.ts +4 -3
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +5 -4
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +5 -4
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +5 -4
- package/dist/prosemirror/conversion/index.d.ts +5 -4
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/editor.css +13 -0
- package/dist/prosemirror/extensions/index.d.mts +1 -1
- package/dist/prosemirror/extensions/index.d.ts +1 -1
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -1
- package/dist/prosemirror/index.d.mts +21 -11
- package/dist/prosemirror/index.d.ts +21 -11
- package/dist/prosemirror/index.js +3 -3
- package/dist/prosemirror/index.mjs +3 -3
- package/dist/prosemirror/plugins/index.d.mts +6 -5
- package/dist/prosemirror/plugins/index.d.ts +6 -5
- package/dist/prosemirror/plugins/index.js +1 -1
- package/dist/prosemirror/plugins/index.mjs +1 -1
- package/dist/prosemirror/plugins/selectionTracker.d.mts +1 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +1 -1
- package/dist/prosemirror/queries.d.mts +46 -4
- package/dist/prosemirror/queries.d.ts +46 -4
- package/dist/prosemirror/queries.js +2 -2
- package/dist/prosemirror/queries.mjs +2 -2
- package/dist/prosemirror/schema/index.d.mts +6 -5
- package/dist/prosemirror/schema/index.d.ts +6 -5
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/styles/index.d.mts +2 -2
- package/dist/prosemirror/styles/index.d.ts +2 -2
- package/dist/prosemirror/tableResize.js +1 -1
- package/dist/prosemirror/tableResize.mjs +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +4 -3
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +4 -3
- package/dist/prosemirror/utils/extractTrackedChanges.js +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -1
- package/dist/{sectionPropertiesSerializer-uXyGONxu.d.ts → sectionPropertiesSerializer-CzgskSoA.d.ts} +1 -1
- package/dist/{sectionPropertiesSerializer-D86QlzlT.d.mts → sectionPropertiesSerializer-D3yI82iZ.d.mts} +1 -1
- package/dist/{selectionContext-BPAqgNgk.d.ts → selectionContext-BJZZW1JA.d.ts} +1 -1
- package/dist/{selectionContext-CoZat7QZ.d.mts → selectionContext-BjMyVQZO.d.mts} +1 -1
- package/dist/{styles-BOJ93SAm.d.mts → styles-Dqec8Aw6.d.mts} +1 -1
- package/dist/{styles-BWqX2AS-.d.ts → styles-gEujs7j6.d.ts} +1 -1
- package/dist/types/agentApi.d.mts +1 -1
- package/dist/types/agentApi.d.ts +1 -1
- package/dist/types/content.d.mts +4 -3
- package/dist/types/content.d.ts +4 -3
- package/dist/types/content.js +1 -1
- package/dist/types/content.mjs +1 -1
- package/dist/types/document.d.mts +8 -6
- package/dist/types/document.d.ts +8 -6
- package/dist/types/document.js +1 -1
- package/dist/types/document.mjs +1 -1
- package/dist/utils/cardStyles.js +1 -1
- package/dist/utils/cardStyles.mjs +1 -1
- package/dist/utils/comments.d.mts +4 -3
- package/dist/utils/comments.d.ts +4 -3
- package/dist/utils/index.d.mts +41 -7
- package/dist/utils/index.d.ts +41 -7
- package/dist/utils/index.js +3 -3
- package/dist/utils/index.mjs +3 -3
- package/dist/utils/stylePreview.d.mts +83 -0
- package/dist/utils/stylePreview.d.ts +83 -0
- package/dist/utils/stylePreview.js +1 -0
- package/dist/utils/stylePreview.mjs +1 -0
- package/dist/utils/units.d.mts +7 -1
- package/dist/utils/units.d.ts +7 -1
- package/dist/utils/units.js +1 -1
- package/dist/utils/units.mjs +1 -1
- package/dist/{variableDetector-CaY-sDau.d.mts → variableDetector-D2-xDa2O.d.mts} +1 -1
- package/dist/{variableDetector-1mxzPfs2.d.ts → variableDetector-d-PpDlNV.d.ts} +1 -1
- package/dist/{watermark-DAcnAs_J.d.mts → watermark-D90356ZM.d.mts} +7 -1
- package/dist/{watermark-DAcnAs_J.d.ts → watermark-D90356ZM.d.ts} +7 -1
- package/package.json +25 -1
- package/dist/chunk-2WGTGBBS.js +0 -2
- package/dist/chunk-3G44SFHX.mjs +0 -4
- package/dist/chunk-4Q2IP5FW.js +0 -1
- package/dist/chunk-55XWETY4.mjs +0 -1
- package/dist/chunk-77GRQUSK.js +0 -1
- package/dist/chunk-7CZEZ3UL.mjs +0 -2
- package/dist/chunk-7LRR7RKE.mjs +0 -15
- package/dist/chunk-7OW3VCZE.mjs +0 -1
- package/dist/chunk-BHBOAP6Z.js +0 -3
- package/dist/chunk-CRMZH7U7.mjs +0 -2
- package/dist/chunk-CUY2THAO.mjs +0 -1
- package/dist/chunk-D3PRIF3Y.mjs +0 -1
- package/dist/chunk-DKKTY56Q.js +0 -1
- package/dist/chunk-EM33RGHT.mjs +0 -1
- package/dist/chunk-ESCPS4AO.mjs +0 -1
- package/dist/chunk-EUZLYQRB.mjs +0 -1
- package/dist/chunk-EV4LVK4X.js +0 -1
- package/dist/chunk-FW23IMBF.mjs +0 -1
- package/dist/chunk-HKN2NKOG.mjs +0 -1
- package/dist/chunk-INDYZOOS.js +0 -1
- package/dist/chunk-IUJCUITW.mjs +0 -1
- package/dist/chunk-IYKBX24M.js +0 -1
- package/dist/chunk-J3YFJDZD.js +0 -1
- package/dist/chunk-JHTURDPX.mjs +0 -1
- package/dist/chunk-KAOLVBLH.js +0 -1
- package/dist/chunk-L5NPEM7C.js +0 -1
- package/dist/chunk-LERLET2D.js +0 -4
- package/dist/chunk-MNOHUTKE.js +0 -15
- package/dist/chunk-MOKKS75W.mjs +0 -3
- package/dist/chunk-NAFMAKLK.js +0 -2
- package/dist/chunk-OEC6SBDV.mjs +0 -1
- package/dist/chunk-OF373DBR.mjs +0 -1
- package/dist/chunk-OTHV7YV2.js +0 -2
- package/dist/chunk-Q4IEATDJ.js +0 -1
- package/dist/chunk-QAJSNLJR.mjs +0 -1
- package/dist/chunk-RSU4HTC6.js +0 -1
- package/dist/chunk-TUIEV7Q7.js +0 -1
- package/dist/chunk-U67MWOPZ.mjs +0 -1
- package/dist/chunk-UE2ZKRYB.mjs +0 -2
- package/dist/chunk-VOCHZNOF.mjs +0 -1
- package/dist/chunk-VW22RZ6C.mjs +0 -1
- package/dist/chunk-WVERBZZU.js +0 -1
- package/dist/chunk-WWNOXNEX.mjs +0 -2
- package/dist/chunk-XLB6AC5Q.js +0 -1
- package/dist/chunk-YPQACU4A.js +0 -1
- package/dist/chunk-ZX26QZJ5.mjs +0 -1
- package/dist/executor-DZAMMQ35.js +0 -1
- package/dist/executor-ZCJRLT3Z.mjs +0 -1
package/dist/docx/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'../chunk-FYRJTDC4.mjs';export{t as createDocx,i as repackDocx,m as updateMultipleFiles}from'../chunk-CHN26LLL.mjs';import'../chunk-WWNOXNEX.mjs';export{b as formatNumber,d as getBulletCharacter,e as isBulletLevel,f as parseDocx,a as parseNumbering,c as renderListMarker}from'../chunk-UE2ZKRYB.mjs';import {E}from'../chunk-3G44SFHX.mjs';export{y as getEndnoteText,x as getFootnoteText,L as getHyperlinkRuns,G as getHyperlinkText,J as getHyperlinkUrl,j as getTableColumnCount,k as getTableRowCount,K as hasContent,n as hasHeaderRow,l as isCellMergeContinuation,m as isCellMergeStart,H as isExternalLink,I as isInternalLink,A as isSeparatorEndnote,z as isSeparatorFootnote,d as parseBorderSpec,f as parseCellMargins,w as parseEndnoteProperties,u as parseEndnotes,i as parseFloatingTableProperties,v as parseFootnoteProperties,t as parseFootnotes,F as parseHyperlink,g as parseShading,e as parseTableBorders,h as parseTableLook,c as parseTableMeasurement,o as parseTableProperties,M as resolveHyperlinkUrl}from'../chunk-3G44SFHX.mjs';import'../chunk-MOCGHQ4A.mjs';import'../chunk-7LRR7RKE.mjs';import {c,d,e as e$1,b,a}from'../chunk-7CZEZ3UL.mjs';export{f as extractTextBoxContentElements,F as getImageHeightPx,E as getImageWidthPx,k as getTextBoxContentElement,o as getTextBoxDimensionsPx,n as getTextBoxHeightPx,p as getTextBoxMarginsPx,x as getTextBoxOutlineWidthPx,u as getTextBoxText,m as getTextBoxWidthPx,H as getWrapDistancesPx,t as hasTextBoxContent,r as hasTextBoxFill,s as hasTextBoxOutline,C as isBehindText,G as isDecorativeImage,B as isFloatingImage,q as isFloatingTextBox,D as isInFrontOfText,A as isInlineImage,i as isShapeTextBox,h as isTextBoxDrawing,y as parseDrawing,z as parseImage,j as parseTextBox,g as parseTextBoxContent,l as parseTextBoxFromShape,v as resolveTextBoxFillColor,w as resolveTextBoxOutlineColor}from'../chunk-7CZEZ3UL.mjs';import'../chunk-W77JXDEV.mjs';import {j,f,i,h,l,e as e$2,g}from'../chunk-3ANZ3252.mjs';import'../chunk-LE67NTCN.mjs';import {e}from'../chunk-VW22RZ6C.mjs';export{e as emuToPixels,f as pixelsToEmu}from'../chunk-VW22RZ6C.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-QYUPLKLP.mjs';var M=["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE"];function I(e){if(!e)return "UNKNOWN";let n=e.trim().match(/^\\?([A-Z][A-Z0-9]*)/i);if(!n)return "UNKNOWN";let o=n[1].toUpperCase();return M.includes(o)?o:"UNKNOWN"}function at(e){return M.includes(e)}function st(e){let t=I(e),n=e.trim(),o=[],r=n.match(/^\\?([A-Z][A-Z0-9]*)/i),i=r?r[0].length:0,a=n.substring(i).trim(),s=/\\(\*|@|#|!|[a-z])\s*(?:"([^"]*)"|([\S]*))?/gi,l,u=[];for(;(l=s.exec(a))!==null;){let p={switch:l[1]};l[2]?p.value=l[2]:l[3]&&(p.value=l[3]),o.push(p),u.push({start:l.index,end:l.index+l[0].length});}let c;if(a.length>0){let p=u.length>0?u[0].start:a.length,m=a.substring(0,p).trim();m.startsWith('"')&&m.endsWith('"')?c=m.slice(1,-1):m&&(c=m);}return {type:t,raw:e,argument:c,switches:o}}function pt(e){return e.switches.find(n=>n.switch==="*"||n.switch==="@")?.value}function ct(e){return e.switches.find(n=>n.switch==="*")?.value?.toUpperCase()==="MERGEFORMAT"}function ut(e,t,n){let o=j(e,"w","instr")??"",r=I(o),i={type:"simpleField",instruction:o,fieldType:r,content:[]},a=j(e,"w","fldLock");(a==="1"||a==="true")&&(i.fldLock=true);let s=j(e,"w","dirty");(s==="1"||s==="true")&&(i.dirty=true);let l=f(e,"w","r");for(let u of l){let c=E(u,t,n);i.content.push(c);}return i}function dt(){return {state:"outside",instruction:"",codeRuns:[],resultRuns:[],fldLock:false,dirty:false,nestingLevel:0}}function ft(e){return e.type==="simpleField"?e.content.filter(t=>"content"in t).map(t=>U(t)).join(""):e.fieldResult.map(t=>U(t)).join("")}function U(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function mt(e){return e.fieldType==="PAGE"}function ht(e){return e.fieldType==="NUMPAGES"}function gt(e){return ["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME"].includes(e.fieldType)}function Tt(e){return ["AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE"].includes(e.fieldType)}function xt(e){return ["REF","PAGEREF","NOTEREF"].includes(e.fieldType)}function yt(e){return ["MERGEFIELD","IF","NEXT","NEXTIF","ASK","SET"].includes(e.fieldType)}function St(e){return ["TOC","TOA","INDEX"].includes(e.fieldType)}function H(e){if(!e)return;let t=parseInt(e,10);if(!isNaN(t))return t/6e4}function Ft(e,t){let n=b(e);if(n){if(n.type==="gradient"&&e){let r=i(e).find(i=>i.name==="a:gradFill");if(r)return bt(r)}return n}if(e){let o=i(e);if(o.find(a=>a.name==="a:pattFill"))return {type:"pattern"};if(o.find(a=>a.name==="a:blipFill"))return {type:"picture"}}if(t){let o=h(t,"a:fillRef");if(o){if(j(o,null,"idx")==="0")return {type:"none"};let i=a(o);if(i)return {type:"solid",color:i}}}}function bt(e){let t=i(e),n="linear",o,r=t.find(l=>l.name==="a:lin");if(r){n="linear";let l=j(r,null,"ang");l&&(o=parseInt(l,10)/6e4);}let i$1=t.find(l=>l.name==="a:path");if(i$1){let l=j(i$1,null,"path");l==="circle"?n="radial":l==="rect"?n="rectangular":n="path";}let a$1=t.find(l=>l.name==="a:gsLst"),s=[];if(a$1){let l=g(a$1,"gs");for(let u of l){let c=j(u,null,"pos"),p=c?parseInt(c,10):0,m=a(u);m&&s.push({position:p,color:m});}}return {type:"gradient",gradient:{type:n,angle:o,stops:s}}}function Et(e,t){let n=e?h(e,"a:ln"):null;if(!n){if(t){let f=h(t,"a:lnRef");if(f){if(j(f,null,"idx")==="0")return;let g=a(f);if(g)return {color:g,width:9525}}}return}let o=i(n);if(o.find(f=>f.name==="a:noFill"))return;let i$1={},a$1=j(n,null,"w");a$1&&(i$1.width=parseInt(a$1,10));let s=j(n,null,"cap");(s==="flat"||s==="rnd"||s==="sq")&&(i$1.cap=s==="rnd"?"round":s==="sq"?"square":"flat");let l=o.find(f=>f.name==="a:bevel"),u=o.find(f=>f.name==="a:miter"),c=o.find(f=>f.name==="a:round");l?i$1.join="bevel":c?i$1.join="round":u&&(i$1.join="miter");let p=o.find(f=>f.name==="a:solidFill");p&&(i$1.color=a(p));let m=o.find(f=>f.name==="a:prstDash");if(m){let f=j(m,null,"val");f&&(i$1.style=f);}let y=o.find(f=>f.name==="a:headEnd");y&&(i$1.headEnd=X(y));let T=o.find(f=>f.name==="a:tailEnd");return T&&(i$1.tailEnd=X(T)),i$1}function X(e){let t=j(e,null,"type")??"none",n=j(e,null,"w"),o=j(e,null,"len");return {type:{none:"none",triangle:"triangle",stealth:"stealth",diamond:"diamond",oval:"oval",arrow:"arrow"}[t]??"none",width:n,length:o}}function Ct(e){if(!e)return {size:{width:0,height:0}};let t=h(e,"a:ext"),n=l(t,null,"cx")??0,o=l(t,null,"cy")??0,r={width:n,height:o},i=h(e,"a:off"),a;if(i){let m=l(i,null,"x")??0,y=l(i,null,"y")??0;a={x:m,y};}let s=j(e,null,"rot"),l$1=j(e,null,"flipH")==="1",u=j(e,null,"flipV")==="1",c=H(s),p;return (c!==void 0||l$1||u)&&(p={},c!==void 0&&(p.rotation=c),l$1&&(p.flipH=true),u&&(p.flipV=true)),{size:r,transform:p,offset:a}}function wt(e){if(!e)return "rect";let t=h(e,"a:prstGeom");if(t){let o=j(t,null,"prst");if(o)return o}return h(e,"a:custGeom"),"rect"}function At(e){if(!e)return {};let t={},n=j(e,null,"vert");(n==="vert"||n==="vert270"||n==="wordArtVert")&&(t.vertical=true);let o=j(e,null,"rot");o&&(t.rotation=H(o));let r=j(e,null,"anchor");if(r){let m={t:"top",ctr:"middle",b:"bottom",dist:"distributed",just:"justified"};t.anchor=m[r];}j(e,null,"anchorCtr")==="1"&&(t.anchorCenter=true);let i=h(e,"a:noAutofit"),a=h(e,"a:normAutofit"),s=h(e,"a:spAutoFit");i?t.autoFit="none":a?t.autoFit="normal":s&&(t.autoFit="shape");let l$1=l(e,null,"lIns"),u=l(e,null,"rIns"),c=l(e,null,"tIns"),p=l(e,null,"bIns");return (l$1!==void 0||u!==void 0||c!==void 0||p!==void 0)&&(t.margins={left:l$1,right:u,top:c,bottom:p}),t}function Mt(e){if(!e)return [];let t=[],n=g(e,"p");for(let o of n)t.push({type:"paragraph",formatting:{},content:[]});return t}function W(e){let t=i(e),n=t.find(g=>g.name==="wps:cNvPr"),o=t.find(g=>g.name==="wps:spPr"),r=t.find(g=>g.name==="wps:style"),i$1=t.find(g=>g.name==="wps:txbx"),a=i$1?h(i$1,"w:txbxContent"):null,s=t.find(g=>g.name==="wps:bodyPr"),l=wt(o??null),u=o?h(o,"a:xfrm"):null,{size:c,transform:p}=Ct(u),m=Ft(o??null,r??null),y=Et(o??null,r??null),T,f;n&&(T=j(n,null,"id")??void 0,f=j(n,null,"name")??void 0);let S={type:"shape",shapeType:l,size:c};if(T&&(S.id=T),f&&(S.name=f),m&&(S.fill=m),y&&(S.outline=y),p&&(S.transform=p),a||s){let g=At(s??null),P=Mt(a);(P.length>0||Object.keys(g).length>0)&&(S.textBody={...g,content:P});}return S}function It(e){let n=i(e).find(c=>c.name==="wp:inline"||c.name==="wp:anchor");if(!n)return null;let o=n.name==="wp:anchor",r=h(n,"a:graphic");if(!r)return null;let i$1=h(r,"a:graphicData");if(!i$1)return null;let a=h(i$1,"wps:wsp");if(!a)return null;let s=W(a),l$1=h(n,"wp:extent");if(l$1){let c=l(l$1,null,"cx")??0,p=l(l$1,null,"cy")??0;s.size={width:c,height:p};}if(o){let c$1=c(n);c$1&&(s.position=c$1);let p=d(n);p&&(s.wrap=p);}let u=h(n,"wp:docPr");if(u){let c=j(u,null,"id"),p=j(u,null,"name");c&&(s.id=c),p&&(s.name=p);}return s}function Rt(e){let n=i(e).find(a=>a.name==="wp:inline"||a.name==="wp:anchor");if(!n)return false;let o=h(n,"a:graphic");if(!o)return false;let r=h(o,"a:graphicData");return r?h(r,"wps:wsp")!==null:false}function Lt(e){return ["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"].includes(e.shapeType)}function Dt(e){return e.shapeType==="textBox"||e.textBody!==void 0&&e.textBody.content.length>0}function Pt(e){return e.textBody!==void 0&&e.textBody.content.length>0}function Nt(e$1){return e(e$1.size.width)}function Bt(e$1){return e(e$1.size.height)}function vt(e$1){return {width:e(e$1.size.width),height:e(e$1.size.height)}}function Ot(e){return e.position!==void 0||e.wrap!==void 0}function kt(e){return e.fill!==void 0&&e.fill.type!=="none"}function Ut(e){return e.outline!==void 0}function Xt(e$1){return e$1.outline?.width?e(e$1.outline.width):0}function Ht(e){if(!(!e.fill||e.fill.type!=="solid"))return e$1(e.fill.color)}function Wt(e){if(e.outline?.color)return e$1(e.outline.color)}var R=720,L="left",Vt="none";function V(e){let t=l(e,"w","pos"),n=j(e,"w","val");if(t===void 0||!n)return null;let o={position:t,alignment:n},r=j(e,"w","leader");return r&&(o.leader=r),o}function G(e){if(!e)return [];let t=f(e,"w","tab");if(t.length===0)return [];let n=[];for(let o of t){let r=V(o);r&&n.push(r);}return n.sort((o,r)=>o.position-r.position),n}function Gt(e){if(!e)return;let t=e$2(e,"w","tabs"),n=G(t);return n.length>0?n:void 0}function _t(e,t){if(!e&&!t)return [];if(!e)return t??[];if(!t)return [...e];let n=new Map;for(let r of e)n.set(r.position,r);for(let r of t)r.alignment==="clear"?n.delete(r.position):n.set(r.position,r);let o=Array.from(n.values());return o.sort((r,i)=>r.position-i.position),o}function D(e,t,n){for(let r of t)if(r.position>e&&r.alignment!=="clear")return r;let o=Math.ceil((e+1)/R)*R;return o>n?{position:n,alignment:L}:{position:o,alignment:L}}function jt(e,t,n){let o=D(e,t,n);return Math.max(0,o.position-e)}function zt(e,t,n,o=0){let r=D(e,t,n),i;switch(r.alignment){case "right":i=Math.max(0,r.position-e-o);break;case "center":i=Math.max(0,r.position-e-o/2);break;case "decimal":i=Math.max(0,r.position-e-o);break;case "bar":i=Math.max(0,r.position-e);break;default:i=Math.max(0,r.position-e);break}return {width:i,alignment:r.alignment}}function Kt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "heavy":return "_";case "middleDot":return "\xB7";default:return " "}}function Yt(e){return e!==void 0&&e!=="none"}function Jt(e,t){let n=t.filter(i=>i.parentId!=null);if(n.length===0)return;let o=new Map;for(let i of n){let a=o.get(i.parentId);a?a.push(i.id):o.set(i.parentId,[i.id]);}function r(i){for(let a of i)if(a.type==="paragraph"){if(!a.content.some(l=>l.type==="commentRangeStart"||l.type==="commentRangeEnd"))continue;let s=[];for(let l of a.content)if(l.type==="commentRangeStart"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeStart",id:c});}else if(l.type==="commentRangeEnd"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeEnd",id:c});}else s.push(l);a.content=s;}else if(a.type==="table")for(let s of a.rows)for(let l of s.cells)r(l.content);}r(e);}function Zt(e,t){let n=new Set(t.map(a=>a.id)),o=t.filter(a=>a.parentId!=null&&!n.has(a.parentId));if(o.length===0)return;let r=new Map;for(let a of o){let s=r.get(a.parentId);s?s.push(a.id):r.set(a.parentId,[a.id]);}function i(a){for(let s of a)if(s.type==="paragraph"){if(!s.content.some(p=>(p.type==="insertion"||p.type==="deletion")&&r.has(p.info.id)))continue;let u=[],c=s.content;for(let p=0;p<c.length;p++){let m=c[p];if((m.type==="insertion"||m.type==="deletion")&&r.has(m.info.id)){let y=r.get(m.info.id);for(let f of y)u.push({type:"commentRangeStart",id:f});u.push(m);let T=c[p+1];T&&(T.type==="insertion"||T.type==="deletion")&&T.type!==m.type&&T.info.author===m.info.author&&T.info.date===m.info.date&&(u.push(T),p++);for(let f of y)u.push({type:"commentRangeEnd",id:f});}else u.push(m);}s.content=u;}else if(s.type==="table")for(let l of s.rows)for(let u of l.cells)i(u.content);}i(e);}export{L as DEFAULT_TAB_ALIGNMENT,R as DEFAULT_TAB_INTERVAL_TWIPS,Vt as DEFAULT_TAB_LEADER,M as KNOWN_FIELD_TYPES,jt as calculateTabWidth,zt as calculateTabWidthWithAlignment,dt as createComplexFieldContext,ft as getFieldDisplayValue,pt as getFormatSwitch,Kt as getLeaderCharacter,D as getNextTabStop,Xt as getOutlineWidthPx,vt as getShapeDimensionsPx,Bt as getShapeHeightPx,Nt as getShapeWidthPx,kt as hasFill,ct as hasMergeFormat,Ut as hasOutline,Pt as hasTextContent,Yt as hasVisibleLeader,Jt as injectReplyRangeMarkers,Zt as injectTCReplyRangeMarkers,gt as isDateTimeField,Tt as isDocPropertyField,Ot as isFloatingShape,at as isKnownFieldType,Lt as isLineShape,yt as isMergeField,mt as isPageNumberField,xt as isReferenceField,Rt as isShapeDrawing,Dt as isTextBoxShape,St as isTocField,ht as isTotalPagesField,_t as mergeTabStops,st as parseFieldInstruction,I as parseFieldType,W as parseShape,It as parseShapeFromDrawing,ut as parseSimpleField,V as parseTabStop,G as parseTabStops,Gt as parseTabStopsFromParagraphProperties,Ht as resolveFillColor,Wt as resolveOutlineColor};
|
|
1
|
+
export{c as attemptSelectiveSave,b as buildPatchedDocumentXml,a as validatePatchSafety}from'../chunk-QZPVZY6S.mjs';export{t as createDocx,i as repackDocx,m as updateMultipleFiles}from'../chunk-F24WZXN4.mjs';import'../chunk-2LVK7EF5.mjs';export{a as parseDocx}from'../chunk-C57BOE7B.mjs';import {E}from'../chunk-4QJEMD23.mjs';export{y as getEndnoteText,x as getFootnoteText,L as getHyperlinkRuns,G as getHyperlinkText,J as getHyperlinkUrl,j as getTableColumnCount,k as getTableRowCount,K as hasContent,n as hasHeaderRow,l as isCellMergeContinuation,m as isCellMergeStart,H as isExternalLink,I as isInternalLink,A as isSeparatorEndnote,z as isSeparatorFootnote,d as parseBorderSpec,f as parseCellMargins,w as parseEndnoteProperties,u as parseEndnotes,i as parseFloatingTableProperties,v as parseFootnoteProperties,t as parseFootnotes,F as parseHyperlink,g as parseShading,e as parseTableBorders,h as parseTableLook,c as parseTableMeasurement,o as parseTableProperties,M as resolveHyperlinkUrl}from'../chunk-4QJEMD23.mjs';import'../chunk-MOCGHQ4A.mjs';import'../chunk-CDBKFBC2.mjs';import {c,d,e,b,a}from'../chunk-3HLRRK6N.mjs';export{f as extractTextBoxContentElements,G as getImageHeightPx,F as getImageWidthPx,k as getTextBoxContentElement,o as getTextBoxDimensionsPx,n as getTextBoxHeightPx,p as getTextBoxMarginsPx,x as getTextBoxOutlineWidthPx,u as getTextBoxText,m as getTextBoxWidthPx,I as getWrapDistancesPx,t as hasTextBoxContent,r as hasTextBoxFill,s as hasTextBoxOutline,D as isBehindText,H as isDecorativeImage,C as isFloatingImage,q as isFloatingTextBox,E as isInFrontOfText,B as isInlineImage,i as isShapeTextBox,h as isTextBoxDrawing,z as parseDrawing,A as parseImage,j as parseTextBox,g as parseTextBoxContent,l as parseTextBoxFromShape,v as resolveTextBoxFillColor,w as resolveTextBoxOutlineColor}from'../chunk-3HLRRK6N.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-LE67NTCN.mjs';import {f as f$1}from'../chunk-KNY7SXPJ.mjs';export{f as emuToPixels,g as pixelsToEmu}from'../chunk-KNY7SXPJ.mjs';import'../chunk-DI6CRWSW.mjs';export{d as computeListRendering,c as createNumberingMap,e as formatNumber,h as getBulletCharacter,b as getCachedNumberingMap,i as isBulletLevel,a as parseNumbering,g as renderListMarker}from'../chunk-VJFIAFZ5.mjs';import {j,f,i,h,l,e as e$1,g}from'../chunk-3ANZ3252.mjs';import'../chunk-QYUPLKLP.mjs';var M=["PAGE","NUMPAGES","NUMWORDS","NUMCHARS","DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME","AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE","REF","PAGEREF","NOTEREF","HYPERLINK","TOC","TOA","INDEX","SEQ","STYLEREF","AUTONUM","AUTONUMLGL","AUTONUMOUT","SECTION","SECTIONPAGES","USERADDRESS","USERNAME","USERINITIALS","IF","MERGEFIELD","NEXT","NEXTIF","ASK","SET","QUOTE","INCLUDETEXT","INCLUDEPICTURE","SYMBOL","ADVANCE"];function I(e){if(!e)return "UNKNOWN";let n=e.trim().match(/^\\?([A-Z][A-Z0-9]*)/i);if(!n)return "UNKNOWN";let o=n[1].toUpperCase();return M.includes(o)?o:"UNKNOWN"}function ct(e){return M.includes(e)}function ut(e){let t=I(e),n=e.trim(),o=[],r=n.match(/^\\?([A-Z][A-Z0-9]*)/i),i=r?r[0].length:0,a=n.substring(i).trim(),s=/\\(\*|@|#|!|[a-z])\s*(?:"([^"]*)"|([\S]*))?/gi,l,u=[];for(;(l=s.exec(a))!==null;){let p={switch:l[1]};l[2]?p.value=l[2]:l[3]&&(p.value=l[3]),o.push(p),u.push({start:l.index,end:l.index+l[0].length});}let c;if(a.length>0){let p=u.length>0?u[0].start:a.length,m=a.substring(0,p).trim();m.startsWith('"')&&m.endsWith('"')?c=m.slice(1,-1):m&&(c=m);}return {type:t,raw:e,argument:c,switches:o}}function dt(e){return e.switches.find(n=>n.switch==="*"||n.switch==="@")?.value}function ft(e){return e.switches.find(n=>n.switch==="*")?.value?.toUpperCase()==="MERGEFORMAT"}function mt(e,t,n){let o=j(e,"w","instr")??"",r=I(o),i={type:"simpleField",instruction:o,fieldType:r,content:[]},a=j(e,"w","fldLock");(a==="1"||a==="true")&&(i.fldLock=true);let s=j(e,"w","dirty");(s==="1"||s==="true")&&(i.dirty=true);let l=f(e,"w","r");for(let u of l){let c=E(u,t,n);i.content.push(c);}return i}function ht(){return {state:"outside",instruction:"",codeRuns:[],resultRuns:[],fldLock:false,dirty:false,nestingLevel:0}}function gt(e){return e.type==="simpleField"?e.content.filter(t=>"content"in t).map(t=>U(t)).join(""):e.fieldResult.map(t=>U(t)).join("")}function U(e){return e.content.filter(t=>t.type==="text").map(t=>t.text).join("")}function Tt(e){return e.fieldType==="PAGE"}function xt(e){return e.fieldType==="NUMPAGES"}function yt(e){return ["DATE","TIME","CREATEDATE","SAVEDATE","PRINTDATE","EDITTIME"].includes(e.fieldType)}function St(e){return ["AUTHOR","TITLE","SUBJECT","KEYWORDS","COMMENTS","FILENAME","FILESIZE","TEMPLATE","REVNUM","DOCPROPERTY","DOCVARIABLE"].includes(e.fieldType)}function Ft(e){return ["REF","PAGEREF","NOTEREF"].includes(e.fieldType)}function bt(e){return ["MERGEFIELD","IF","NEXT","NEXTIF","ASK","SET"].includes(e.fieldType)}function Et(e){return ["TOC","TOA","INDEX"].includes(e.fieldType)}function H(e){if(!e)return;let t=parseInt(e,10);if(!isNaN(t))return t/6e4}function Ct(e,t){let n=b(e);if(n){if(n.type==="gradient"&&e){let r=i(e).find(i=>i.name==="a:gradFill");if(r)return wt(r)}return n}if(e){let o=i(e);if(o.find(a=>a.name==="a:pattFill"))return {type:"pattern"};if(o.find(a=>a.name==="a:blipFill"))return {type:"picture"}}if(t){let o=h(t,"a:fillRef");if(o){if(j(o,null,"idx")==="0")return {type:"none"};let i=a(o);if(i)return {type:"solid",color:i}}}}function wt(e){let t=i(e),n="linear",o,r=t.find(l=>l.name==="a:lin");if(r){n="linear";let l=j(r,null,"ang");l&&(o=parseInt(l,10)/6e4);}let i$1=t.find(l=>l.name==="a:path");if(i$1){let l=j(i$1,null,"path");l==="circle"?n="radial":l==="rect"?n="rectangular":n="path";}let a$1=t.find(l=>l.name==="a:gsLst"),s=[];if(a$1){let l=g(a$1,"gs");for(let u of l){let c=j(u,null,"pos"),p=c?parseInt(c,10):0,m=a(u);m&&s.push({position:p,color:m});}}return {type:"gradient",gradient:{type:n,angle:o,stops:s}}}function At(e,t){let n=e?h(e,"a:ln"):null;if(!n){if(t){let f=h(t,"a:lnRef");if(f){if(j(f,null,"idx")==="0")return;let g=a(f);if(g)return {color:g,width:9525}}}return}let o=i(n);if(o.find(f=>f.name==="a:noFill"))return;let i$1={},a$1=j(n,null,"w");a$1&&(i$1.width=parseInt(a$1,10));let s=j(n,null,"cap");(s==="flat"||s==="rnd"||s==="sq")&&(i$1.cap=s==="rnd"?"round":s==="sq"?"square":"flat");let l=o.find(f=>f.name==="a:bevel"),u=o.find(f=>f.name==="a:miter"),c=o.find(f=>f.name==="a:round");l?i$1.join="bevel":c?i$1.join="round":u&&(i$1.join="miter");let p=o.find(f=>f.name==="a:solidFill");p&&(i$1.color=a(p));let m=o.find(f=>f.name==="a:prstDash");if(m){let f=j(m,null,"val");f&&(i$1.style=f);}let y=o.find(f=>f.name==="a:headEnd");y&&(i$1.headEnd=X(y));let T=o.find(f=>f.name==="a:tailEnd");return T&&(i$1.tailEnd=X(T)),i$1}function X(e){let t=j(e,null,"type")??"none",n=j(e,null,"w"),o=j(e,null,"len");return {type:{none:"none",triangle:"triangle",stealth:"stealth",diamond:"diamond",oval:"oval",arrow:"arrow"}[t]??"none",width:n,length:o}}function Mt(e){if(!e)return {size:{width:0,height:0}};let t=h(e,"a:ext"),n=l(t,null,"cx")??0,o=l(t,null,"cy")??0,r={width:n,height:o},i=h(e,"a:off"),a;if(i){let m=l(i,null,"x")??0,y=l(i,null,"y")??0;a={x:m,y};}let s=j(e,null,"rot"),l$1=j(e,null,"flipH")==="1",u=j(e,null,"flipV")==="1",c=H(s),p;return (c!==void 0||l$1||u)&&(p={},c!==void 0&&(p.rotation=c),l$1&&(p.flipH=true),u&&(p.flipV=true)),{size:r,transform:p,offset:a}}function It(e){if(!e)return "rect";let t=h(e,"a:prstGeom");if(t){let o=j(t,null,"prst");if(o)return o}return h(e,"a:custGeom"),"rect"}function Rt(e){if(!e)return {};let t={},n=j(e,null,"vert");(n==="vert"||n==="vert270"||n==="wordArtVert")&&(t.vertical=true);let o=j(e,null,"rot");o&&(t.rotation=H(o));let r=j(e,null,"anchor");if(r){let m={t:"top",ctr:"middle",b:"bottom",dist:"distributed",just:"justified"};t.anchor=m[r];}j(e,null,"anchorCtr")==="1"&&(t.anchorCenter=true);let i=h(e,"a:noAutofit"),a=h(e,"a:normAutofit"),s=h(e,"a:spAutoFit");i?t.autoFit="none":a?t.autoFit="normal":s&&(t.autoFit="shape");let l$1=l(e,null,"lIns"),u=l(e,null,"rIns"),c=l(e,null,"tIns"),p=l(e,null,"bIns");return (l$1!==void 0||u!==void 0||c!==void 0||p!==void 0)&&(t.margins={left:l$1,right:u,top:c,bottom:p}),t}function Lt(e){if(!e)return [];let t=[],n=g(e,"p");for(let o of n)t.push({type:"paragraph",formatting:{},content:[]});return t}function W(e){let t=i(e),n=t.find(g=>g.name==="wps:cNvPr"),o=t.find(g=>g.name==="wps:spPr"),r=t.find(g=>g.name==="wps:style"),i$1=t.find(g=>g.name==="wps:txbx"),a=i$1?h(i$1,"w:txbxContent"):null,s=t.find(g=>g.name==="wps:bodyPr"),l=It(o??null),u=o?h(o,"a:xfrm"):null,{size:c,transform:p}=Mt(u),m=Ct(o??null,r??null),y=At(o??null,r??null),T,f;n&&(T=j(n,null,"id")??void 0,f=j(n,null,"name")??void 0);let S={type:"shape",shapeType:l,size:c};if(T&&(S.id=T),f&&(S.name=f),m&&(S.fill=m),y&&(S.outline=y),p&&(S.transform=p),a||s){let g=Rt(s??null),P=Lt(a);(P.length>0||Object.keys(g).length>0)&&(S.textBody={...g,content:P});}return S}function Dt(e){let n=i(e).find(c=>c.name==="wp:inline"||c.name==="wp:anchor");if(!n)return null;let o=n.name==="wp:anchor",r=h(n,"a:graphic");if(!r)return null;let i$1=h(r,"a:graphicData");if(!i$1)return null;let a=h(i$1,"wps:wsp");if(!a)return null;let s=W(a),l$1=h(n,"wp:extent");if(l$1){let c=l(l$1,null,"cx")??0,p=l(l$1,null,"cy")??0;s.size={width:c,height:p};}if(o){let c$1=c(n);c$1&&(s.position=c$1);let p=d(n);p&&(s.wrap=p);}let u=h(n,"wp:docPr");if(u){let c=j(u,null,"id"),p=j(u,null,"name");c&&(s.id=c),p&&(s.name=p);}return s}function Pt(e){let n=i(e).find(a=>a.name==="wp:inline"||a.name==="wp:anchor");if(!n)return false;let o=h(n,"a:graphic");if(!o)return false;let r=h(o,"a:graphicData");return r?h(r,"wps:wsp")!==null:false}function Nt(e){return ["line","straightConnector1","bentConnector2","bentConnector3","bentConnector4","bentConnector5","curvedConnector2","curvedConnector3","curvedConnector4","curvedConnector5"].includes(e.shapeType)}function Bt(e){return e.shapeType==="textBox"||e.textBody!==void 0&&e.textBody.content.length>0}function vt(e){return e.textBody!==void 0&&e.textBody.content.length>0}function Ot(e){return f$1(e.size.width)}function kt(e){return f$1(e.size.height)}function Ut(e){return {width:f$1(e.size.width),height:f$1(e.size.height)}}function Xt(e){return e.position!==void 0||e.wrap!==void 0}function Ht(e){return e.fill!==void 0&&e.fill.type!=="none"}function Wt(e){return e.outline!==void 0}function Vt(e){return e.outline?.width?f$1(e.outline.width):0}function Gt(e$1){if(!(!e$1.fill||e$1.fill.type!=="solid"))return e(e$1.fill.color)}function _t(e$1){if(e$1.outline?.color)return e(e$1.outline.color)}var R=720,L="left",jt="none";function V(e){let t=l(e,"w","pos"),n=j(e,"w","val");if(t===void 0||!n)return null;let o={position:t,alignment:n},r=j(e,"w","leader");return r&&(o.leader=r),o}function G(e){if(!e)return [];let t=f(e,"w","tab");if(t.length===0)return [];let n=[];for(let o of t){let r=V(o);r&&n.push(r);}return n.sort((o,r)=>o.position-r.position),n}function zt(e){if(!e)return;let t=e$1(e,"w","tabs"),n=G(t);return n.length>0?n:void 0}function Kt(e,t){if(!e&&!t)return [];if(!e)return t??[];if(!t)return [...e];let n=new Map;for(let r of e)n.set(r.position,r);for(let r of t)r.alignment==="clear"?n.delete(r.position):n.set(r.position,r);let o=Array.from(n.values());return o.sort((r,i)=>r.position-i.position),o}function D(e,t,n){for(let r of t)if(r.position>e&&r.alignment!=="clear")return r;let o=Math.ceil((e+1)/R)*R;return o>n?{position:n,alignment:L}:{position:o,alignment:L}}function Yt(e,t,n){let o=D(e,t,n);return Math.max(0,o.position-e)}function Jt(e,t,n,o=0){let r=D(e,t,n),i;switch(r.alignment){case "right":i=Math.max(0,r.position-e-o);break;case "center":i=Math.max(0,r.position-e-o/2);break;case "decimal":i=Math.max(0,r.position-e-o);break;case "bar":i=Math.max(0,r.position-e);break;default:i=Math.max(0,r.position-e);break}return {width:i,alignment:r.alignment}}function Zt(e){switch(e){case "dot":return ".";case "hyphen":return "-";case "underscore":return "_";case "heavy":return "_";case "middleDot":return "\xB7";default:return " "}}function qt(e){return e!==void 0&&e!=="none"}function Qt(e,t){let n=t.filter(i=>i.parentId!=null);if(n.length===0)return;let o=new Map;for(let i of n){let a=o.get(i.parentId);a?a.push(i.id):o.set(i.parentId,[i.id]);}function r(i){for(let a of i)if(a.type==="paragraph"){if(!a.content.some(l=>l.type==="commentRangeStart"||l.type==="commentRangeEnd"))continue;let s=[];for(let l of a.content)if(l.type==="commentRangeStart"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeStart",id:c});}else if(l.type==="commentRangeEnd"){s.push(l);let u=o.get(l.id);if(u)for(let c of u)s.push({type:"commentRangeEnd",id:c});}else s.push(l);a.content=s;}else if(a.type==="table")for(let s of a.rows)for(let l of s.cells)r(l.content);}r(e);}function $t(e,t){let n=new Set(t.map(a=>a.id)),o=t.filter(a=>a.parentId!=null&&!n.has(a.parentId));if(o.length===0)return;let r=new Map;for(let a of o){let s=r.get(a.parentId);s?s.push(a.id):r.set(a.parentId,[a.id]);}function i(a){for(let s of a)if(s.type==="paragraph"){if(!s.content.some(p=>(p.type==="insertion"||p.type==="deletion")&&r.has(p.info.id)))continue;let u=[],c=s.content;for(let p=0;p<c.length;p++){let m=c[p];if((m.type==="insertion"||m.type==="deletion")&&r.has(m.info.id)){let y=r.get(m.info.id);for(let f of y)u.push({type:"commentRangeStart",id:f});u.push(m);let T=c[p+1];T&&(T.type==="insertion"||T.type==="deletion")&&T.type!==m.type&&T.info.author===m.info.author&&T.info.date===m.info.date&&(u.push(T),p++);for(let f of y)u.push({type:"commentRangeEnd",id:f});}else u.push(m);}s.content=u;}else if(s.type==="table")for(let l of s.rows)for(let u of l.cells)i(u.content);}i(e);}export{L as DEFAULT_TAB_ALIGNMENT,R as DEFAULT_TAB_INTERVAL_TWIPS,jt as DEFAULT_TAB_LEADER,M as KNOWN_FIELD_TYPES,Yt as calculateTabWidth,Jt as calculateTabWidthWithAlignment,ht as createComplexFieldContext,gt as getFieldDisplayValue,dt as getFormatSwitch,Zt as getLeaderCharacter,D as getNextTabStop,Vt as getOutlineWidthPx,Ut as getShapeDimensionsPx,kt as getShapeHeightPx,Ot as getShapeWidthPx,Ht as hasFill,ft as hasMergeFormat,Wt as hasOutline,vt as hasTextContent,qt as hasVisibleLeader,Qt as injectReplyRangeMarkers,$t as injectTCReplyRangeMarkers,yt as isDateTimeField,St as isDocPropertyField,Xt as isFloatingShape,ct as isKnownFieldType,Nt as isLineShape,bt as isMergeField,Tt as isPageNumberField,Ft as isReferenceField,Pt as isShapeDrawing,Bt as isTextBoxShape,Et as isTocField,xt as isTotalPagesField,Kt as mergeTabStops,ut as parseFieldInstruction,I as parseFieldType,W as parseShape,Dt as parseShapeFromDrawing,mt as parseSimpleField,V as parseTabStop,G as parseTabStops,zt as parseTabStopsFromParagraphProperties,Gt as resolveFillColor,_t as resolveOutlineColor};
|
package/dist/docx/parser.d.mts
CHANGED
|
@@ -22,11 +22,12 @@
|
|
|
22
22
|
import { Document } from '../types/document.mjs';
|
|
23
23
|
import { D as DocxInput } from '../docxInput-DTbCa48g.mjs';
|
|
24
24
|
import '../colors-C3vA7HUU.mjs';
|
|
25
|
-
import '../formatting-
|
|
26
|
-
import '../
|
|
25
|
+
import '../formatting-DFtuRFQY.mjs';
|
|
26
|
+
import '../lists-CyGxd5Y2.mjs';
|
|
27
|
+
import '../content-CbBCrsr0.mjs';
|
|
27
28
|
import './wrapTypes.mjs';
|
|
28
|
-
import '../watermark-
|
|
29
|
-
import '../styles-
|
|
29
|
+
import '../watermark-D90356ZM.mjs';
|
|
30
|
+
import '../styles-Dqec8Aw6.mjs';
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* Main Parser Orchestrator - Unified parseDocx function
|
package/dist/docx/parser.d.ts
CHANGED
|
@@ -22,11 +22,12 @@
|
|
|
22
22
|
import { Document } from '../types/document.js';
|
|
23
23
|
import { D as DocxInput } from '../docxInput-DTbCa48g.js';
|
|
24
24
|
import '../colors-C3vA7HUU.js';
|
|
25
|
-
import '../formatting-
|
|
26
|
-
import '../
|
|
25
|
+
import '../formatting-JhqWT_XM.js';
|
|
26
|
+
import '../lists-Bn29SzeS.js';
|
|
27
|
+
import '../content-BebvPfXc.js';
|
|
27
28
|
import './wrapTypes.js';
|
|
28
|
-
import '../watermark-
|
|
29
|
-
import '../styles-
|
|
29
|
+
import '../watermark-D90356ZM.js';
|
|
30
|
+
import '../styles-gEujs7j6.js';
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* Main Parser Orchestrator - Unified parseDocx function
|
package/dist/docx/parser.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkV3NE7Q22_js=require('../chunk-V3NE7Q22.js');require('../chunk-6KYOT4E7.js'),require('../chunk-FIGLFSNR.js'),require('../chunk-QVRMX2AC.js'),require('../chunk-LW5OFHSW.js'),require('../chunk-Z3LGMBJC.js'),require('../chunk-BJSG6TEG.js'),require('../chunk-GSKMHXHG.js'),require('../chunk-H57LNDBH.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"fullParseDocx",{enumerable:true,get:function(){return chunkV3NE7Q22_js.c}});Object.defineProperty(exports,"getDocxSummary",{enumerable:true,get:function(){return chunkV3NE7Q22_js.e}});Object.defineProperty(exports,"getDocxVariables",{enumerable:true,get:function(){return chunkV3NE7Q22_js.d}});Object.defineProperty(exports,"parseDocx",{enumerable:true,get:function(){return chunkV3NE7Q22_js.a}});Object.defineProperty(exports,"quickParseDocx",{enumerable:true,get:function(){return chunkV3NE7Q22_js.b}});
|
package/dist/docx/parser.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{
|
|
1
|
+
export{c as fullParseDocx,e as getDocxSummary,d as getDocxVariables,a as parseDocx,b as quickParseDocx}from'../chunk-C57BOE7B.mjs';import'../chunk-4QJEMD23.mjs';import'../chunk-MOCGHQ4A.mjs';import'../chunk-CDBKFBC2.mjs';import'../chunk-3HLRRK6N.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-KNY7SXPJ.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-VJFIAFZ5.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-QYUPLKLP.mjs';
|
package/dist/docx/rezip.d.mts
CHANGED
|
@@ -38,11 +38,12 @@
|
|
|
38
38
|
import JSZip from 'jszip';
|
|
39
39
|
import { Document } from '../types/document.mjs';
|
|
40
40
|
import '../colors-C3vA7HUU.mjs';
|
|
41
|
-
import '../formatting-
|
|
42
|
-
import '../
|
|
41
|
+
import '../formatting-DFtuRFQY.mjs';
|
|
42
|
+
import '../lists-CyGxd5Y2.mjs';
|
|
43
|
+
import '../content-CbBCrsr0.mjs';
|
|
43
44
|
import './wrapTypes.mjs';
|
|
44
|
-
import '../watermark-
|
|
45
|
-
import '../styles-
|
|
45
|
+
import '../watermark-D90356ZM.mjs';
|
|
46
|
+
import '../styles-Dqec8Aw6.mjs';
|
|
46
47
|
|
|
47
48
|
/**
|
|
48
49
|
* DOCX Unzipper
|
package/dist/docx/rezip.d.ts
CHANGED
|
@@ -38,11 +38,12 @@
|
|
|
38
38
|
import JSZip from 'jszip';
|
|
39
39
|
import { Document } from '../types/document.js';
|
|
40
40
|
import '../colors-C3vA7HUU.js';
|
|
41
|
-
import '../formatting-
|
|
42
|
-
import '../
|
|
41
|
+
import '../formatting-JhqWT_XM.js';
|
|
42
|
+
import '../lists-Bn29SzeS.js';
|
|
43
|
+
import '../content-BebvPfXc.js';
|
|
43
44
|
import './wrapTypes.js';
|
|
44
|
-
import '../watermark-
|
|
45
|
-
import '../styles-
|
|
45
|
+
import '../watermark-D90356ZM.js';
|
|
46
|
+
import '../styles-gEujs7j6.js';
|
|
46
47
|
|
|
47
48
|
/**
|
|
48
49
|
* DOCX Unzipper
|
package/dist/docx/rezip.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkJQUIUKRO_js=require('../chunk-JQUIUKRO.js');require('../chunk-4JPHW7ZI.js'),require('../chunk-Z3LGMBJC.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"COMMENTS_CONTENT_TYPE",{enumerable:true,get:function(){return chunkJQUIUKRO_js.c}});Object.defineProperty(exports,"COMMENTS_EXTENDED_CONTENT_TYPE",{enumerable:true,get:function(){return chunkJQUIUKRO_js.d}});Object.defineProperty(exports,"COMMENTS_EXTENSIBLE_CONTENT_TYPE",{enumerable:true,get:function(){return chunkJQUIUKRO_js.f}});Object.defineProperty(exports,"COMMENTS_IDS_CONTENT_TYPE",{enumerable:true,get:function(){return chunkJQUIUKRO_js.e}});Object.defineProperty(exports,"addMedia",{enumerable:true,get:function(){return chunkJQUIUKRO_js.p}});Object.defineProperty(exports,"addRelationship",{enumerable:true,get:function(){return chunkJQUIUKRO_js.o}});Object.defineProperty(exports,"applyUpdatesToZip",{enumerable:true,get:function(){return chunkJQUIUKRO_js.n}});Object.defineProperty(exports,"collectHeaderFooterUpdates",{enumerable:true,get:function(){return chunkJQUIUKRO_js.g}});Object.defineProperty(exports,"createDocx",{enumerable:true,get:function(){return chunkJQUIUKRO_js.t}});Object.defineProperty(exports,"createEmptyDocx",{enumerable:true,get:function(){return chunkJQUIUKRO_js.h}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkJQUIUKRO_js.u}});Object.defineProperty(exports,"findMaxRId",{enumerable:true,get:function(){return chunkJQUIUKRO_js.b}});Object.defineProperty(exports,"isDocxBuffer",{enumerable:true,get:function(){return chunkJQUIUKRO_js.s}});Object.defineProperty(exports,"repackDocx",{enumerable:true,get:function(){return chunkJQUIUKRO_js.i}});Object.defineProperty(exports,"repackDocxFromRaw",{enumerable:true,get:function(){return chunkJQUIUKRO_js.j}});Object.defineProperty(exports,"updateCoreProperties",{enumerable:true,get:function(){return chunkJQUIUKRO_js.q}});Object.defineProperty(exports,"updateDocumentXml",{enumerable:true,get:function(){return chunkJQUIUKRO_js.k}});Object.defineProperty(exports,"updateMultipleFiles",{enumerable:true,get:function(){return chunkJQUIUKRO_js.m}});Object.defineProperty(exports,"updateXmlFile",{enumerable:true,get:function(){return chunkJQUIUKRO_js.l}});Object.defineProperty(exports,"validateDocx",{enumerable:true,get:function(){return chunkJQUIUKRO_js.r}});
|
package/dist/docx/rezip.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as COMMENTS_CONTENT_TYPE,d as COMMENTS_EXTENDED_CONTENT_TYPE,f as COMMENTS_EXTENSIBLE_CONTENT_TYPE,e as COMMENTS_IDS_CONTENT_TYPE,p as addMedia,o as addRelationship,n as applyUpdatesToZip,g as collectHeaderFooterUpdates,t as createDocx,h as createEmptyDocx,u as default,b as findMaxRId,s as isDocxBuffer,i as repackDocx,j as repackDocxFromRaw,q as updateCoreProperties,k as updateDocumentXml,m as updateMultipleFiles,l as updateXmlFile,r as validateDocx}from'../chunk-
|
|
1
|
+
export{c as COMMENTS_CONTENT_TYPE,d as COMMENTS_EXTENDED_CONTENT_TYPE,f as COMMENTS_EXTENSIBLE_CONTENT_TYPE,e as COMMENTS_IDS_CONTENT_TYPE,p as addMedia,o as addRelationship,n as applyUpdatesToZip,g as collectHeaderFooterUpdates,t as createDocx,h as createEmptyDocx,u as default,b as findMaxRId,s as isDocxBuffer,i as repackDocx,j as repackDocxFromRaw,q as updateCoreProperties,k as updateDocumentXml,m as updateMultipleFiles,l as updateXmlFile,r as validateDocx}from'../chunk-F24WZXN4.mjs';import'../chunk-2LVK7EF5.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-QYUPLKLP.mjs';
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export { c as serializeBlockContent, a as serializeDocument, s as serializeDocumentBody, b as serializeSectionProperties } from '../../sectionPropertiesSerializer-
|
|
10
|
-
import { P as Paragraph,
|
|
9
|
+
export { c as serializeBlockContent, a as serializeDocument, s as serializeDocumentBody, b as serializeSectionProperties } from '../../sectionPropertiesSerializer-D3yI82iZ.mjs';
|
|
10
|
+
import { P as Paragraph, k as Run, T as Table, w as HeaderFooter, C as Comment, E as Endnote, F as Footnote } from '../../content-CbBCrsr0.mjs';
|
|
11
11
|
import '../../types/document.mjs';
|
|
12
12
|
import '../../colors-C3vA7HUU.mjs';
|
|
13
|
-
import '../../formatting-
|
|
14
|
-
import '../../
|
|
15
|
-
import '../../
|
|
13
|
+
import '../../formatting-DFtuRFQY.mjs';
|
|
14
|
+
import '../../lists-CyGxd5Y2.mjs';
|
|
15
|
+
import '../../watermark-D90356ZM.mjs';
|
|
16
|
+
import '../../styles-Dqec8Aw6.mjs';
|
|
16
17
|
import '../wrapTypes.mjs';
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -6,13 +6,14 @@
|
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
|
-
export { c as serializeBlockContent, a as serializeDocument, s as serializeDocumentBody, b as serializeSectionProperties } from '../../sectionPropertiesSerializer-
|
|
10
|
-
import { P as Paragraph,
|
|
9
|
+
export { c as serializeBlockContent, a as serializeDocument, s as serializeDocumentBody, b as serializeSectionProperties } from '../../sectionPropertiesSerializer-CzgskSoA.js';
|
|
10
|
+
import { P as Paragraph, k as Run, T as Table, w as HeaderFooter, C as Comment, E as Endnote, F as Footnote } from '../../content-BebvPfXc.js';
|
|
11
11
|
import '../../types/document.js';
|
|
12
12
|
import '../../colors-C3vA7HUU.js';
|
|
13
|
-
import '../../formatting-
|
|
14
|
-
import '../../
|
|
15
|
-
import '../../
|
|
13
|
+
import '../../formatting-JhqWT_XM.js';
|
|
14
|
+
import '../../lists-Bn29SzeS.js';
|
|
15
|
+
import '../../watermark-D90356ZM.js';
|
|
16
|
+
import '../../styles-gEujs7j6.js';
|
|
16
17
|
import '../wrapTypes.js';
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk4JPHW7ZI_js=require('../../chunk-4JPHW7ZI.js');require('../../chunk-C2BAPYGJ.js'),require('../../chunk-DC7S76ZX.js');Object.defineProperty(exports,"serializeBlockContent",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.f}});Object.defineProperty(exports,"serializeComments",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.k}});Object.defineProperty(exports,"serializeDocument",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.h}});Object.defineProperty(exports,"serializeDocumentBody",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.g}});Object.defineProperty(exports,"serializeEndnotes",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.p}});Object.defineProperty(exports,"serializeFootnotes",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.o}});Object.defineProperty(exports,"serializeHeaderFooter",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.i}});Object.defineProperty(exports,"serializeParagraph",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.d}});Object.defineProperty(exports,"serializeRun",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.b}});Object.defineProperty(exports,"serializeSectionProperties",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.c}});Object.defineProperty(exports,"serializeTable",{enumerable:true,get:function(){return chunk4JPHW7ZI_js.e}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{f as serializeBlockContent,k as serializeComments,h as serializeDocument,g as serializeDocumentBody,p as serializeEndnotes,o as serializeFootnotes,i as serializeHeaderFooter,d as serializeParagraph,b as serializeRun,c as serializeSectionProperties,e as serializeTable}from'../../chunk-
|
|
1
|
+
export{f as serializeBlockContent,k as serializeComments,h as serializeDocument,g as serializeDocumentBody,p as serializeEndnotes,o as serializeFootnotes,i as serializeHeaderFooter,d as serializeParagraph,b as serializeRun,c as serializeSectionProperties,e as serializeTable}from'../../chunk-2LVK7EF5.mjs';import'../../chunk-LE67NTCN.mjs';import'../../chunk-QYUPLKLP.mjs';
|
package/dist/editor/index.d.mts
CHANGED
|
@@ -2,14 +2,15 @@ import { EditorState, Transaction } from 'prosemirror-state';
|
|
|
2
2
|
import { Node } from 'prosemirror-model';
|
|
3
3
|
import { PageMargins, ColumnLayout, FlowBlock, Measure, Layout } from '../layout-engine/types.mjs';
|
|
4
4
|
import { Document } from '../types/document.mjs';
|
|
5
|
-
import { S as SectionProperties,
|
|
5
|
+
import { S as SectionProperties, w as HeaderFooter } from '../content-CbBCrsr0.mjs';
|
|
6
6
|
import { F as FloatPageGeometry } from '../measureBlocksPipeline-BMqbRFQB.mjs';
|
|
7
7
|
import { H as HeaderFooterContent, F as FootnoteRenderItem } from '../footnotes-BZ24OTAT.mjs';
|
|
8
|
-
import { W as Watermark } from '../watermark-
|
|
9
|
-
import { T as Theme, S as StyleDefinitions } from '../styles-
|
|
10
|
-
import '../formatting-
|
|
8
|
+
import { W as Watermark } from '../watermark-D90356ZM.mjs';
|
|
9
|
+
import { T as Theme, S as StyleDefinitions } from '../styles-Dqec8Aw6.mjs';
|
|
10
|
+
import '../formatting-DFtuRFQY.mjs';
|
|
11
11
|
import '../colors-C3vA7HUU.mjs';
|
|
12
12
|
import '../docx/wrapTypes.mjs';
|
|
13
|
+
import '../lists-CyGxd5Y2.mjs';
|
|
13
14
|
import '../anchoredObjectPosition-KJEyF-wr.mjs';
|
|
14
15
|
|
|
15
16
|
/**
|
package/dist/editor/index.d.ts
CHANGED
|
@@ -2,14 +2,15 @@ import { EditorState, Transaction } from 'prosemirror-state';
|
|
|
2
2
|
import { Node } from 'prosemirror-model';
|
|
3
3
|
import { PageMargins, ColumnLayout, FlowBlock, Measure, Layout } from '../layout-engine/types.js';
|
|
4
4
|
import { Document } from '../types/document.js';
|
|
5
|
-
import { S as SectionProperties,
|
|
5
|
+
import { S as SectionProperties, w as HeaderFooter } from '../content-BebvPfXc.js';
|
|
6
6
|
import { F as FloatPageGeometry } from '../measureBlocksPipeline-iYNzAH-o.js';
|
|
7
7
|
import { H as HeaderFooterContent, F as FootnoteRenderItem } from '../footnotes-DMsicPGd.js';
|
|
8
|
-
import { W as Watermark } from '../watermark-
|
|
9
|
-
import { T as Theme, S as StyleDefinitions } from '../styles-
|
|
10
|
-
import '../formatting-
|
|
8
|
+
import { W as Watermark } from '../watermark-D90356ZM.js';
|
|
9
|
+
import { T as Theme, S as StyleDefinitions } from '../styles-gEujs7j6.js';
|
|
10
|
+
import '../formatting-JhqWT_XM.js';
|
|
11
11
|
import '../colors-C3vA7HUU.js';
|
|
12
12
|
import '../docx/wrapTypes.js';
|
|
13
|
+
import '../lists-Bn29SzeS.js';
|
|
13
14
|
import '../anchoredObjectPosition-CS-8BfhO.js';
|
|
14
15
|
|
|
15
16
|
/**
|
package/dist/editor/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';require('../chunk-
|
|
1
|
+
'use strict';require('../chunk-T3UP6LF5.js');var chunk7UMOUKSF_js=require('../chunk-7UMOUKSF.js');require('../chunk-CWPIXUU2.js');var chunk77X765ZO_js=require('../chunk-77X765ZO.js'),chunk2KPOGFFR_js=require('../chunk-2KPOGFFR.js');require('../chunk-MWOHCSZE.js');var chunkDX5XU6JN_js=require('../chunk-DX5XU6JN.js'),chunkEJ2JAYRI_js=require('../chunk-EJ2JAYRI.js');require('../chunk-IMKU4O3P.js'),require('../chunk-DROCYKAR.js'),require('../chunk-6KYOT4E7.js'),require('../chunk-FIGLFSNR.js'),require('../chunk-BKP5QMTS.js'),require('../chunk-34DJT72K.js'),require('../chunk-ISKTBM4L.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-RQVHKDXK.js'),require('../chunk-LW5OFHSW.js'),require('../chunk-Z3LGMBJC.js'),require('../chunk-AXVWVIIN.js'),require('../chunk-NTYJIOUE.js'),require('../chunk-Q2VALXEU.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-ILPNMG7Q.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-LWH66Q7Q.js'),require('../chunk-X6AICTHN.js'),require('../chunk-7HANRHHL.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-BJSG6TEG.js'),require('../chunk-GSKMHXHG.js'),require('../chunk-H57LNDBH.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-DC7S76ZX.js');function ue(a){let{state:t,document:r,pageSize:e,margins:o,columns:f,finalPageSize:d,finalMargins:L,finalColumns:M,pageGap:X,contentWidth:l,theme:m,styles:k,sectionProperties:s,finalSectionProperties:Y,headerContent:Z,footerContent:ee,firstPageHeaderContent:te,firstPageFooterContent:oe,measureBlocks:g,getHfPmDoc:ne}=a,re=e.h-o.top-o.bottom,n=chunk2KPOGFFR_js.c(t.doc,{theme:m,pageContentHeight:re}),D=chunk7UMOUKSF_js.Q(n,{pageSize:e,margins:o,columns:f},{pageSize:d,margins:L,columns:M});chunk7UMOUKSF_js.b(n,D,l);let c=g(n,D,chunkDX5XU6JN_js.f({size:e,margins:o})),y=chunk77X765ZO_js.d(n),H=y.length>0&&!!r?.package?.footnotes,x={section:"header",pageSize:e,margins:o},T={section:"footer",pageSize:e,margins:o},B=t.doc.attrs?.defaultTabStopTwips,w={styles:k,theme:m,measureBlocks:g,defaultTabStopTwips:B},p=(i,u)=>{if(!i)return;let A=ne(i);return A?chunk7UMOUKSF_js.B(A,l,u,w):chunk7UMOUKSF_js.A(i,l,u,w)},R=p(Z,x),v=p(ee,T),F=s?.titlePg===true,z=F?p(te,x):void 0,E=F?p(oe,T):void 0,ae=t.doc.attrs?.watermark??void 0,{margins:ie,finalMargins:se}=chunk7UMOUKSF_js.F({pageSize:e,margins:o,finalMargins:L,bodyBlocks:n,headers:[R,z],footers:[v,E],warn:i=>console.warn(`[computeLayout] ${i}`)}),de=Y?.sectionStart,P={pageSize:e,margins:ie,finalPageSize:d,finalMargins:se,columns:M,bodyBreakType:de,pageGap:X},h,W=new Map,S=new Map;if(H){let i=chunkEJ2JAYRI_js.X(n,c,P);S=chunk77X765ZO_js.h(r.package.footnotes,y,l,{styles:k??void 0,theme:m??null,measureBlocks:g,defaultTabStopTwips:B});let u=chunk77X765ZO_js.j({blocks:n,measures:c,layoutOpts:P,footnoteRefs:y,footnoteContentMap:S,initialLayout:i});h=u.layout,W=u.pageFootnoteMap;}else h=chunkEJ2JAYRI_js.X(n,c,P);let _=H?chunk77X765ZO_js.k(W,S,r):void 0;return {blocks:n,measures:c,layout:h,headerContentForRender:R,footerContentForRender:v,firstPageHeaderForRender:z,firstPageFooterForRender:E,hasTitlePg:F,watermark:ae,headerDistancePx:s?.headerDistance!=null?chunk7UMOUKSF_js.K(s.headerDistance):void 0,footerDistancePx:s?.footerDistance!=null?chunk7UMOUKSF_js.K(s.footerDistance):void 0,pageBorders:s?.pageBorders,footnotesByPage:_?.size?_:void 0}}function le(a,t=e=>requestAnimationFrame(e),r=e=>cancelAnimationFrame(e)){let e=null;return {schedule(o){if(e){e.state=o;return}e={handle:0,state:o};let f=t(()=>{let d=e;e=null,d&&a(d.state);});e&&(e.handle=f);},cancel(){e&&(r(e.handle),e=null);}}}var Q=false;function ce(a){if(!Q){Q=true;try{let t=a.scrollIntoView();(typeof t.updated!="number"||(t.updated&4)===0)&&console.warn("[docx-editor] prosemirror-state UPDATED_SCROLL bit shape changed; paginated scroll suppression may be stale. Update PM_UPDATED_SCROLL.");}catch{}}}function pe(a,t){ce(t);let r=a;typeof r.updated=="number"&&(r.updated&=-5);}exports.computeLayout=ue;exports.createLayoutScheduler=le;exports.stripScrollFlag=pe;
|
package/dist/editor/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'../chunk-
|
|
1
|
+
import'../chunk-WQJWT4RB.mjs';import {Q as Q$1,b,F,K,B,A}from'../chunk-E7UN3PVC.mjs';import'../chunk-5JULVEYK.mjs';import {d,h,j,k}from'../chunk-4QSFBX26.mjs';import {c}from'../chunk-4SZAFWLV.mjs';import'../chunk-RRJKF2XI.mjs';import {f}from'../chunk-6AGU57TL.mjs';import {X}from'../chunk-BBJMUBTD.mjs';import'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-4QJEMD23.mjs';import'../chunk-MOCGHQ4A.mjs';import'../chunk-KK673XRZ.mjs';import'../chunk-WCB25ESG.mjs';import'../chunk-LK6I3HMH.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-GYWTUUXX.mjs';import'../chunk-3HLRRK6N.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-NO6PIL32.mjs';import'../chunk-M65C4SQJ.mjs';import'../chunk-PJEB3ZWG.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-HEJJXAXN.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-2XP6GLA4.mjs';import'../chunk-NTBZRITU.mjs';import'../chunk-MJ6XZFVD.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-KNY7SXPJ.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-VJFIAFZ5.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-QYUPLKLP.mjs';function ue(a){let{state:t,document:r,pageSize:e,margins:o,columns:f$1,finalPageSize:d$1,finalMargins:L,finalColumns:M,pageGap:X$1,contentWidth:l,theme:m,styles:k$1,sectionProperties:s,finalSectionProperties:Y,headerContent:Z,footerContent:ee,firstPageHeaderContent:te,firstPageFooterContent:oe,measureBlocks:g,getHfPmDoc:ne}=a,re=e.h-o.top-o.bottom,n=c(t.doc,{theme:m,pageContentHeight:re}),D=Q$1(n,{pageSize:e,margins:o,columns:f$1},{pageSize:d$1,margins:L,columns:M});b(n,D,l);let c$1=g(n,D,f({size:e,margins:o})),y=d(n),H=y.length>0&&!!r?.package?.footnotes,x={section:"header",pageSize:e,margins:o},T={section:"footer",pageSize:e,margins:o},B$1=t.doc.attrs?.defaultTabStopTwips,w={styles:k$1,theme:m,measureBlocks:g,defaultTabStopTwips:B$1},p=(i,u)=>{if(!i)return;let A$1=ne(i);return A$1?B(A$1,l,u,w):A(i,l,u,w)},R=p(Z,x),v=p(ee,T),F$1=s?.titlePg===true,z=F$1?p(te,x):void 0,E=F$1?p(oe,T):void 0,ae=t.doc.attrs?.watermark??void 0,{margins:ie,finalMargins:se}=F({pageSize:e,margins:o,finalMargins:L,bodyBlocks:n,headers:[R,z],footers:[v,E],warn:i=>console.warn(`[computeLayout] ${i}`)}),de=Y?.sectionStart,P={pageSize:e,margins:ie,finalPageSize:d$1,finalMargins:se,columns:M,bodyBreakType:de,pageGap:X$1},h$1,W=new Map,S=new Map;if(H){let i=X(n,c$1,P);S=h(r.package.footnotes,y,l,{styles:k$1??void 0,theme:m??null,measureBlocks:g,defaultTabStopTwips:B$1});let u=j({blocks:n,measures:c$1,layoutOpts:P,footnoteRefs:y,footnoteContentMap:S,initialLayout:i});h$1=u.layout,W=u.pageFootnoteMap;}else h$1=X(n,c$1,P);let _=H?k(W,S,r):void 0;return {blocks:n,measures:c$1,layout:h$1,headerContentForRender:R,footerContentForRender:v,firstPageHeaderForRender:z,firstPageFooterForRender:E,hasTitlePg:F$1,watermark:ae,headerDistancePx:s?.headerDistance!=null?K(s.headerDistance):void 0,footerDistancePx:s?.footerDistance!=null?K(s.footerDistance):void 0,pageBorders:s?.pageBorders,footnotesByPage:_?.size?_:void 0}}function le(a,t=e=>requestAnimationFrame(e),r=e=>cancelAnimationFrame(e)){let e=null;return {schedule(o){if(e){e.state=o;return}e={handle:0,state:o};let f=t(()=>{let d=e;e=null,d&&a(d.state);});e&&(e.handle=f);},cancel(){e&&(r(e.handle),e=null);}}}var Q=false;function ce(a){if(!Q){Q=true;try{let t=a.scrollIntoView();(typeof t.updated!="number"||(t.updated&4)===0)&&console.warn("[docx-editor] prosemirror-state UPDATED_SCROLL bit shape changed; paginated scroll suppression may be stale. Update PM_UPDATED_SCROLL.");}catch{}}}function pe(a,t){ce(t);let r=a;typeof r.updated=="number"&&(r.updated&=-5);}export{ue as computeLayout,le as createLayoutScheduler,pe as stripScrollFlag};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkFETIBXTH_js=require('./chunk-FETIBXTH.js');require('./chunk-4BFNWPKW.js'),require('./chunk-BJSG6TEG.js'),require('./chunk-DC7S76ZX.js');Object.defineProperty(exports,"executeCommand",{enumerable:true,get:function(){return chunkFETIBXTH_js.a}});Object.defineProperty(exports,"executeCommands",{enumerable:true,get:function(){return chunkFETIBXTH_js.b}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as executeCommand,b as executeCommands}from'./chunk-B6FA4MJ5.mjs';import'./chunk-3NRMSZX2.mjs';import'./chunk-KNY7SXPJ.mjs';import'./chunk-QYUPLKLP.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document } from './types/document.mjs';
|
|
2
|
-
import {
|
|
2
|
+
import { v as BreakContent, P as Paragraph, k as Run, l as RunContent } from './content-CbBCrsr0.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Insert Operations Utility
|
|
@@ -124,6 +124,37 @@ declare function loadFonts(families: string[], options?: {
|
|
|
124
124
|
* @returns true if the font is loaded, false otherwise
|
|
125
125
|
*/
|
|
126
126
|
declare function isFontLoaded(fontFamily: string): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Enable or disable the editor's automatic Google Fonts lookup.
|
|
129
|
+
*
|
|
130
|
+
* Defaults to enabled. Set to `false` in no-egress embedders (strict CSP,
|
|
131
|
+
* offline) so `loadFont` / `loadFontWithMapping` never inject a
|
|
132
|
+
* `fonts.googleapis.com` stylesheet `<link>`. This gates ONLY the implicit
|
|
133
|
+
* Google Fonts lookup — font URLs you register yourself (the `fonts` prop /
|
|
134
|
+
* `loadFontFromUrl`) are still fetched by the browser, and embedded blobs
|
|
135
|
+
* (`loadFontFromBuffer`) and system fonts still resolve.
|
|
136
|
+
*
|
|
137
|
+
* The flag is page-global (module-level), not per-editor: with multiple
|
|
138
|
+
* editors on one page the last caller wins. Call it before loading documents;
|
|
139
|
+
* disabling does not cancel fetches already in flight. A document font that
|
|
140
|
+
* is neither local nor registered then resolves `loadFont` to `false`
|
|
141
|
+
* silently (no `onFontError`) and renders via its CSS fallback stack.
|
|
142
|
+
*
|
|
143
|
+
* @see isGoogleFontsEnabled
|
|
144
|
+
* @see loadFontFromBuffer
|
|
145
|
+
* @see loadFontFromUrl
|
|
146
|
+
*
|
|
147
|
+
* @public
|
|
148
|
+
*/
|
|
149
|
+
declare function setGoogleFontsEnabled(enabled: boolean): void;
|
|
150
|
+
/**
|
|
151
|
+
* Whether the automatic Google Fonts lookup is currently enabled.
|
|
152
|
+
*
|
|
153
|
+
* @see setGoogleFontsEnabled
|
|
154
|
+
*
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
declare function isGoogleFontsEnabled(): boolean;
|
|
127
158
|
/**
|
|
128
159
|
* Check if any fonts are currently loading
|
|
129
160
|
*
|
|
@@ -154,8 +185,10 @@ declare function onFontError(callback: (error: Error) => void): () => void;
|
|
|
154
185
|
/**
|
|
155
186
|
* Check if a font is available on the system using canvas measurement
|
|
156
187
|
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
188
|
+
* Compares text width with the target font vs a known fallback font (and the
|
|
189
|
+
* opposite fallback, for names that collide with the browser defaults). If
|
|
190
|
+
* the widths differ, the font is available. Reuses one shared canvas; the
|
|
191
|
+
* fallback widths are session constants and memoized.
|
|
159
192
|
*
|
|
160
193
|
* @param fontFamily - The font family name to check
|
|
161
194
|
* @param fallbackFont - Fallback font to compare against
|
|
@@ -165,6 +198,13 @@ declare function canRenderFont(fontFamily: string, fallbackFont?: string): boole
|
|
|
165
198
|
/**
|
|
166
199
|
* Load a font from a raw buffer (e.g., embedded in DOCX)
|
|
167
200
|
*
|
|
201
|
+
* Call before loading the document when possible: registration marks the
|
|
202
|
+
* family as ours, which is what keeps the metric-compatible Google fallback
|
|
203
|
+
* in play for subsetted faces during the document's font resolution pass.
|
|
204
|
+
* Late registration still self-heals on the next pass. Under
|
|
205
|
+
* `setGoogleFontsEnabled(false)` that fallback fetch is suppressed and
|
|
206
|
+
* glyphs missing from the registered faces render via the CSS stack.
|
|
207
|
+
*
|
|
168
208
|
* @param fontFamily - The font family name
|
|
169
209
|
* @param buffer - Font file buffer (TTF, OTF, WOFF, WOFF2)
|
|
170
210
|
* @param options - Font options
|
|
@@ -177,7 +217,10 @@ declare function loadFontFromBuffer(fontFamily: string, buffer: ArrayBuffer, opt
|
|
|
177
217
|
* Load a font face from a URL (woff2, woff, ttf, otf).
|
|
178
218
|
*
|
|
179
219
|
* Injects an `@font-face` rule pointing at the URL. Multiple weights of the
|
|
180
|
-
* same family can be registered independently.
|
|
220
|
+
* same family can be registered independently. Families registered here are
|
|
221
|
+
* treated as potentially subsetted: the editor still fetches their
|
|
222
|
+
* metric-compatible Google equivalent as a glyph-coverage fallback, unless
|
|
223
|
+
* disabled via `setGoogleFontsEnabled(false)`.
|
|
181
224
|
*
|
|
182
225
|
* @param fontFamily - CSS font-family name to expose
|
|
183
226
|
* @param src - URL to the font file
|
|
@@ -280,4 +323,4 @@ declare function extractFontsFromDocument(document: unknown): Set<string>;
|
|
|
280
323
|
*/
|
|
281
324
|
declare function loadDocumentFonts(document: unknown): Promise<void>;
|
|
282
325
|
|
|
283
|
-
export {
|
|
326
|
+
export { setGoogleFontsEnabled as A, type FontDefinition as B, extractFontsFromDocument as C, getGoogleFontEquivalent as D, loadDocumentFonts as E, FONT_MAPPING as F, loadFontDefinitions as G, loadFontFromUrl as H, type InsertPosition as I, loadFontWithMapping as J, loadFontsWithMapping as K, onFontError as L, countPageBreaks as a, createColumnBreak as b, canRenderFont as c, createHorizontalRule as d, createLineBreak as e, createPageBreak as f, createPageBreakParagraph as g, createPageBreakRun as h, findPageBreaks as i, getLoadedFonts as j, hasPageBreakBefore as k, insertHorizontalRule as l, insertPageBreak as m, isBreakContent as n, isColumnBreak as o, isFontLoaded as p, isLoading as q, isGoogleFontsEnabled as r, isLineBreak as s, isPageBreak as t, loadFont as u, loadFontFromBuffer as v, loadFonts as w, onFontsLoaded as x, preloadCommonFonts as y, removePageBreak as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document } from './types/document.js';
|
|
2
|
-
import {
|
|
2
|
+
import { v as BreakContent, P as Paragraph, k as Run, l as RunContent } from './content-BebvPfXc.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Insert Operations Utility
|
|
@@ -124,6 +124,37 @@ declare function loadFonts(families: string[], options?: {
|
|
|
124
124
|
* @returns true if the font is loaded, false otherwise
|
|
125
125
|
*/
|
|
126
126
|
declare function isFontLoaded(fontFamily: string): boolean;
|
|
127
|
+
/**
|
|
128
|
+
* Enable or disable the editor's automatic Google Fonts lookup.
|
|
129
|
+
*
|
|
130
|
+
* Defaults to enabled. Set to `false` in no-egress embedders (strict CSP,
|
|
131
|
+
* offline) so `loadFont` / `loadFontWithMapping` never inject a
|
|
132
|
+
* `fonts.googleapis.com` stylesheet `<link>`. This gates ONLY the implicit
|
|
133
|
+
* Google Fonts lookup — font URLs you register yourself (the `fonts` prop /
|
|
134
|
+
* `loadFontFromUrl`) are still fetched by the browser, and embedded blobs
|
|
135
|
+
* (`loadFontFromBuffer`) and system fonts still resolve.
|
|
136
|
+
*
|
|
137
|
+
* The flag is page-global (module-level), not per-editor: with multiple
|
|
138
|
+
* editors on one page the last caller wins. Call it before loading documents;
|
|
139
|
+
* disabling does not cancel fetches already in flight. A document font that
|
|
140
|
+
* is neither local nor registered then resolves `loadFont` to `false`
|
|
141
|
+
* silently (no `onFontError`) and renders via its CSS fallback stack.
|
|
142
|
+
*
|
|
143
|
+
* @see isGoogleFontsEnabled
|
|
144
|
+
* @see loadFontFromBuffer
|
|
145
|
+
* @see loadFontFromUrl
|
|
146
|
+
*
|
|
147
|
+
* @public
|
|
148
|
+
*/
|
|
149
|
+
declare function setGoogleFontsEnabled(enabled: boolean): void;
|
|
150
|
+
/**
|
|
151
|
+
* Whether the automatic Google Fonts lookup is currently enabled.
|
|
152
|
+
*
|
|
153
|
+
* @see setGoogleFontsEnabled
|
|
154
|
+
*
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
declare function isGoogleFontsEnabled(): boolean;
|
|
127
158
|
/**
|
|
128
159
|
* Check if any fonts are currently loading
|
|
129
160
|
*
|
|
@@ -154,8 +185,10 @@ declare function onFontError(callback: (error: Error) => void): () => void;
|
|
|
154
185
|
/**
|
|
155
186
|
* Check if a font is available on the system using canvas measurement
|
|
156
187
|
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
188
|
+
* Compares text width with the target font vs a known fallback font (and the
|
|
189
|
+
* opposite fallback, for names that collide with the browser defaults). If
|
|
190
|
+
* the widths differ, the font is available. Reuses one shared canvas; the
|
|
191
|
+
* fallback widths are session constants and memoized.
|
|
159
192
|
*
|
|
160
193
|
* @param fontFamily - The font family name to check
|
|
161
194
|
* @param fallbackFont - Fallback font to compare against
|
|
@@ -165,6 +198,13 @@ declare function canRenderFont(fontFamily: string, fallbackFont?: string): boole
|
|
|
165
198
|
/**
|
|
166
199
|
* Load a font from a raw buffer (e.g., embedded in DOCX)
|
|
167
200
|
*
|
|
201
|
+
* Call before loading the document when possible: registration marks the
|
|
202
|
+
* family as ours, which is what keeps the metric-compatible Google fallback
|
|
203
|
+
* in play for subsetted faces during the document's font resolution pass.
|
|
204
|
+
* Late registration still self-heals on the next pass. Under
|
|
205
|
+
* `setGoogleFontsEnabled(false)` that fallback fetch is suppressed and
|
|
206
|
+
* glyphs missing from the registered faces render via the CSS stack.
|
|
207
|
+
*
|
|
168
208
|
* @param fontFamily - The font family name
|
|
169
209
|
* @param buffer - Font file buffer (TTF, OTF, WOFF, WOFF2)
|
|
170
210
|
* @param options - Font options
|
|
@@ -177,7 +217,10 @@ declare function loadFontFromBuffer(fontFamily: string, buffer: ArrayBuffer, opt
|
|
|
177
217
|
* Load a font face from a URL (woff2, woff, ttf, otf).
|
|
178
218
|
*
|
|
179
219
|
* Injects an `@font-face` rule pointing at the URL. Multiple weights of the
|
|
180
|
-
* same family can be registered independently.
|
|
220
|
+
* same family can be registered independently. Families registered here are
|
|
221
|
+
* treated as potentially subsetted: the editor still fetches their
|
|
222
|
+
* metric-compatible Google equivalent as a glyph-coverage fallback, unless
|
|
223
|
+
* disabled via `setGoogleFontsEnabled(false)`.
|
|
181
224
|
*
|
|
182
225
|
* @param fontFamily - CSS font-family name to expose
|
|
183
226
|
* @param src - URL to the font file
|
|
@@ -280,4 +323,4 @@ declare function extractFontsFromDocument(document: unknown): Set<string>;
|
|
|
280
323
|
*/
|
|
281
324
|
declare function loadDocumentFonts(document: unknown): Promise<void>;
|
|
282
325
|
|
|
283
|
-
export {
|
|
326
|
+
export { setGoogleFontsEnabled as A, type FontDefinition as B, extractFontsFromDocument as C, getGoogleFontEquivalent as D, loadDocumentFonts as E, FONT_MAPPING as F, loadFontDefinitions as G, loadFontFromUrl as H, type InsertPosition as I, loadFontWithMapping as J, loadFontsWithMapping as K, onFontError as L, countPageBreaks as a, createColumnBreak as b, canRenderFont as c, createHorizontalRule as d, createLineBreak as e, createPageBreak as f, createPageBreakParagraph as g, createPageBreakRun as h, findPageBreaks as i, getLoadedFonts as j, hasPageBreakBefore as k, insertHorizontalRule as l, insertPageBreak as m, isBreakContent as n, isColumnBreak as o, isFontLoaded as p, isLoading as q, isGoogleFontsEnabled as r, isLineBreak as s, isPageBreak as t, loadFont as u, loadFontFromBuffer as v, loadFonts as w, onFontsLoaded as x, preloadCommonFonts as y, removePageBreak as z };
|
|
@@ -211,6 +211,19 @@ interface ParagraphFormatting {
|
|
|
211
211
|
/** List level (0-8) (w:ilvl) */
|
|
212
212
|
ilvl?: number;
|
|
213
213
|
};
|
|
214
|
+
/**
|
|
215
|
+
* When `numPr` was resolved from the paragraph STYLE's pPr rather than the
|
|
216
|
+
* paragraph's own `<w:numPr>`, this records the style-sourced value. The
|
|
217
|
+
* serializer omits `numPr` while it still equals this value — writing it as
|
|
218
|
+
* direct formatting would flip Word's indent precedence (a directly
|
|
219
|
+
* referenced level's indents beat the style's; a style-referenced level's
|
|
220
|
+
* do not) and break the document on save/reload. Cleared the moment the
|
|
221
|
+
* user changes the numbering (values diverge).
|
|
222
|
+
*/
|
|
223
|
+
numPrFromStyle?: {
|
|
224
|
+
numId?: number;
|
|
225
|
+
ilvl?: number;
|
|
226
|
+
};
|
|
214
227
|
/** Outline level 0-9 (w:outlineLvl) */
|
|
215
228
|
outlineLevel?: number;
|
|
216
229
|
/** Paragraph style ID (w:pStyle) */
|
|
@@ -211,6 +211,19 @@ interface ParagraphFormatting {
|
|
|
211
211
|
/** List level (0-8) (w:ilvl) */
|
|
212
212
|
ilvl?: number;
|
|
213
213
|
};
|
|
214
|
+
/**
|
|
215
|
+
* When `numPr` was resolved from the paragraph STYLE's pPr rather than the
|
|
216
|
+
* paragraph's own `<w:numPr>`, this records the style-sourced value. The
|
|
217
|
+
* serializer omits `numPr` while it still equals this value — writing it as
|
|
218
|
+
* direct formatting would flip Word's indent precedence (a directly
|
|
219
|
+
* referenced level's indents beat the style's; a style-referenced level's
|
|
220
|
+
* do not) and break the document on save/reload. Cleared the moment the
|
|
221
|
+
* user changes the numbering (values diverge).
|
|
222
|
+
*/
|
|
223
|
+
numPrFromStyle?: {
|
|
224
|
+
numId?: number;
|
|
225
|
+
ilvl?: number;
|
|
226
|
+
};
|
|
214
227
|
/** Outline level 0-9 (w:outlineLvl) */
|
|
215
228
|
outlineLevel?: number;
|
|
216
229
|
/** Paragraph style ID (w:pStyle) */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Node } from 'prosemirror-model';
|
|
2
2
|
import { EditorView } from 'prosemirror-view';
|
|
3
3
|
import { FlowBlock, Measure, LayoutOptions, FootnoteContent, Layout, Page, PageMargins, ImageRun } from './layout-engine/types.js';
|
|
4
|
-
import { F as Footnote,
|
|
5
|
-
import { S as StyleDefinitions, T as Theme } from './styles-
|
|
4
|
+
import { F as Footnote, w as HeaderFooter } from './content-BebvPfXc.js';
|
|
5
|
+
import { S as StyleDefinitions, T as Theme } from './styles-gEujs7j6.js';
|
|
6
6
|
import { F as FootnoteRenderItem, H as HeaderFooterContent } from './footnotes-DMsicPGd.js';
|
|
7
7
|
import { Document } from './types/document.js';
|
|
8
8
|
|