@eigenpal/docx-editor-core 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +204 -0
- package/README.md +54 -0
- package/dist/ImageExtension-BN327PNe.d.mts +38 -0
- package/dist/ImageExtension-BlI5afZD.d.ts +38 -0
- package/dist/Subscribable-DOz6Ohoo.d.mts +33 -0
- package/dist/Subscribable-DOz6Ohoo.d.ts +33 -0
- package/dist/agent/index.d.mts +169 -0
- package/dist/agent/index.d.ts +169 -0
- package/dist/agent/index.js +1 -0
- package/dist/agent/index.mjs +1 -0
- package/dist/borders-BH_GoYU3.d.mts +58 -0
- package/dist/borders-Z9hPno2u.d.ts +58 -0
- package/dist/chunk-23CP3TOP.js +1 -0
- package/dist/chunk-2KHWHVTA.js +1 -0
- package/dist/chunk-36VIYQHD.mjs +9 -0
- package/dist/chunk-3COGZG7O.mjs +1 -0
- package/dist/chunk-3NRMSZX2.mjs +1 -0
- package/dist/chunk-3SXJPJSV.mjs +1 -0
- package/dist/chunk-44RUAQA2.js +1 -0
- package/dist/chunk-4AJYHCPB.js +2 -0
- package/dist/chunk-4BFNWPKW.js +1 -0
- package/dist/chunk-4EHBV73E.mjs +59 -0
- package/dist/chunk-4G6AJ4ZM.js +1 -0
- package/dist/chunk-4GER4JLW.js +1 -0
- package/dist/chunk-4Q2IP5FW.js +1 -0
- package/dist/chunk-5N5DBQJV.mjs +1 -0
- package/dist/chunk-62NPHRTF.js +1 -0
- package/dist/chunk-67LVRQIR.mjs +1 -0
- package/dist/chunk-6ILFFGGS.js +2 -0
- package/dist/chunk-6LOYA7G5.mjs +2 -0
- package/dist/chunk-6LVPRTB6.js +1 -0
- package/dist/chunk-6NQSIC27.mjs +1 -0
- package/dist/chunk-6VUYFDHY.mjs +1 -0
- package/dist/chunk-7E5VBRDL.mjs +1 -0
- package/dist/chunk-7GHQ4YCJ.mjs +1 -0
- package/dist/chunk-7RDCZLTU.js +1 -0
- package/dist/chunk-7VCMJCBY.js +2 -0
- package/dist/chunk-AAPBAMD7.js +1 -0
- package/dist/chunk-AMENZY5F.mjs +1 -0
- package/dist/chunk-ARHPXIBJ.mjs +1 -0
- package/dist/chunk-BGC7QKP5.mjs +1 -0
- package/dist/chunk-BGY3CB37.mjs +1 -0
- package/dist/chunk-BHBOAP6Z.js +3 -0
- package/dist/chunk-BWHUD2XC.mjs +4 -0
- package/dist/chunk-CCWOLPZE.js +3 -0
- package/dist/chunk-CGJ6S3AH.mjs +1 -0
- package/dist/chunk-CKKO4JWE.mjs +1 -0
- package/dist/chunk-CKXAHSJQ.js +10 -0
- package/dist/chunk-CP5OSG5Z.mjs +1 -0
- package/dist/chunk-CUY2THAO.mjs +1 -0
- package/dist/chunk-CWAP26GB.js +4 -0
- package/dist/chunk-D4RPOJC7.js +1 -0
- package/dist/chunk-D6GO7UGD.mjs +1 -0
- package/dist/chunk-DC7S76ZX.js +1 -0
- package/dist/chunk-DFZTUQ7O.js +2 -0
- package/dist/chunk-DROCYKAR.js +1 -0
- package/dist/chunk-DWFWYHM5.mjs +1 -0
- package/dist/chunk-DY2MJCSV.js +1 -0
- package/dist/chunk-ESI4BSBF.js +1 -0
- package/dist/chunk-FC6QL3E6.js +1 -0
- package/dist/chunk-FWTP7BN7.mjs +4 -0
- package/dist/chunk-G6Y4UZMJ.mjs +1 -0
- package/dist/chunk-GGPKPXON.js +1 -0
- package/dist/chunk-GXW7YSFL.mjs +1 -0
- package/dist/chunk-I6PMX4BO.js +1 -0
- package/dist/chunk-IBNUQL57.mjs +2 -0
- package/dist/chunk-ILJUDEZ5.mjs +1 -0
- package/dist/chunk-IP2VXNWG.js +1 -0
- package/dist/chunk-J7ULKGU2.mjs +10 -0
- package/dist/chunk-JFZIXFRC.js +1 -0
- package/dist/chunk-JHZ3HLSR.mjs +1 -0
- package/dist/chunk-JKVXID22.mjs +1 -0
- package/dist/chunk-JY5EFI4D.js +1 -0
- package/dist/chunk-KBU6QQFU.js +9 -0
- package/dist/chunk-KESNGXGO.js +1 -0
- package/dist/chunk-KQTB5Y7P.mjs +1 -0
- package/dist/chunk-LBKMYD3M.mjs +1 -0
- package/dist/chunk-LMF2ELOB.js +1 -0
- package/dist/chunk-LVD6HXRF.mjs +2 -0
- package/dist/chunk-MJ5FQX7Q.js +1 -0
- package/dist/chunk-MOKKS75W.mjs +3 -0
- package/dist/chunk-MVZOTKNL.mjs +1 -0
- package/dist/chunk-MZ7LW5CH.js +1 -0
- package/dist/chunk-MZOVDLYL.js +1 -0
- package/dist/chunk-N27FJQTG.js +1 -0
- package/dist/chunk-N3Y5BUKV.js +1 -0
- package/dist/chunk-NBLJPT54.mjs +1 -0
- package/dist/chunk-NERY274X.js +1 -0
- package/dist/chunk-NNQWQOC5.mjs +1 -0
- package/dist/chunk-NXLJVVVE.js +1 -0
- package/dist/chunk-O5X22KZ6.mjs +1 -0
- package/dist/chunk-OBMN4VSM.mjs +1 -0
- package/dist/chunk-OCAX2KJQ.js +4 -0
- package/dist/chunk-OZMNIX6U.mjs +1 -0
- package/dist/chunk-PRRM64JO.mjs +1 -0
- package/dist/chunk-Q4CKLXWA.js +1 -0
- package/dist/chunk-Q5QOBZWT.mjs +1 -0
- package/dist/chunk-QPFJJPIC.mjs +1 -0
- package/dist/chunk-QYUPLKLP.mjs +1 -0
- package/dist/chunk-RNOXNNSD.mjs +0 -0
- package/dist/chunk-RPIQG46O.mjs +1 -0
- package/dist/chunk-S7IKPRC3.js +9 -0
- package/dist/chunk-SUXJX72X.js +1 -0
- package/dist/chunk-SYJAAHUK.js +1 -0
- package/dist/chunk-T4CPTPRP.js +1 -0
- package/dist/chunk-TE2AF7FM.js +1 -0
- package/dist/chunk-TE2VQJZG.js +1 -0
- package/dist/chunk-TRJWRZZD.js +1 -0
- package/dist/chunk-U4UCHBZ7.js +1 -0
- package/dist/chunk-UDPROEUK.js +1 -0
- package/dist/chunk-UIROUI5I.mjs +1 -0
- package/dist/chunk-UOFQYE2L.mjs +1 -0
- package/dist/chunk-UQ6WNWXX.js +1 -0
- package/dist/chunk-V7BKPX67.mjs +2 -0
- package/dist/chunk-VKTCTMIO.mjs +2 -0
- package/dist/chunk-VQWZHPWI.mjs +1 -0
- package/dist/chunk-VW22RZ6C.mjs +1 -0
- package/dist/chunk-WLKRUBY4.js +1 -0
- package/dist/chunk-WLQEPVDR.js +1 -0
- package/dist/chunk-WNTT4MGC.js +59 -0
- package/dist/chunk-WTFLNYAT.mjs +1 -0
- package/dist/chunk-XXU7YQVV.js +1 -0
- package/dist/chunk-Y5HZAMND.mjs +9 -0
- package/dist/chunk-Y74ANBPV.js +1 -0
- package/dist/chunk-Y7JZPBBW.js +1 -0
- package/dist/chunk-YGHHSCPR.js +2 -0
- package/dist/chunk-YMZ3F2FZ.mjs +1 -0
- package/dist/chunk-YUKBAAB5.mjs +1 -0
- package/dist/chunk-ZRZ2VRQQ.mjs +1 -0
- package/dist/chunk-ZYESB4KC.mjs +3 -0
- package/dist/colorResolver-C3q7MLLD.d.mts +390 -0
- package/dist/colorResolver-CVsPLsw1.d.ts +390 -0
- package/dist/colors-C3vA7HUU.d.mts +70 -0
- package/dist/colors-C3vA7HUU.d.ts +70 -0
- package/dist/core-plugins.d.mts +64 -0
- package/dist/core-plugins.d.ts +64 -0
- package/dist/core-plugins.js +1 -0
- package/dist/core-plugins.mjs +1 -0
- package/dist/core.d.mts +399 -0
- package/dist/core.d.ts +399 -0
- package/dist/core.js +1 -0
- package/dist/core.mjs +1 -0
- package/dist/documentSerializer-C1ueey5d.d.mts +36 -0
- package/dist/documentSerializer-Chn7J1WG.d.ts +36 -0
- package/dist/docx/index.d.mts +1124 -0
- package/dist/docx/index.d.ts +1124 -0
- package/dist/docx/index.js +1 -0
- package/dist/docx/index.mjs +1 -0
- package/dist/docx/parser.d.mts +109 -0
- package/dist/docx/parser.d.ts +109 -0
- package/dist/docx/parser.js +1 -0
- package/dist/docx/parser.mjs +1 -0
- package/dist/docx/rezip.d.mts +313 -0
- package/dist/docx/rezip.d.ts +313 -0
- package/dist/docx/rezip.js +1 -0
- package/dist/docx/rezip.mjs +1 -0
- package/dist/docx/serializer/index.d.mts +126 -0
- package/dist/docx/serializer/index.d.ts +126 -0
- package/dist/docx/serializer/index.js +1 -0
- package/dist/docx/serializer/index.mjs +1 -0
- package/dist/docx/wrapTypes.d.mts +19 -0
- package/dist/docx/wrapTypes.d.ts +19 -0
- package/dist/docx/wrapTypes.js +1 -0
- package/dist/docx/wrapTypes.mjs +1 -0
- package/dist/docxInput-DTbCa48g.d.mts +21 -0
- package/dist/docxInput-DTbCa48g.d.ts +21 -0
- package/dist/executor-DZAMMQ35.js +1 -0
- package/dist/executor-ZCJRLT3Z.mjs +1 -0
- package/dist/findParagraphByParaId-Maw_8M5D.d.mts +28 -0
- package/dist/findParagraphByParaId-Maw_8M5D.d.ts +28 -0
- package/dist/fontLoader-BOt95Jtf.d.mts +223 -0
- package/dist/fontLoader-QPwbcX5j.d.ts +223 -0
- package/dist/footnotes-lCH_P3N3.d.mts +78 -0
- package/dist/footnotes-skVvEHvZ.d.ts +78 -0
- package/dist/formatting-BwpZWdGi.d.ts +410 -0
- package/dist/formatting-D9I-lFS4.d.mts +410 -0
- package/dist/headerFooterLayout-B3QVg556.d.ts +201 -0
- package/dist/headerFooterLayout-DkclHZ0Z.d.mts +201 -0
- package/dist/headless.d.mts +110 -0
- package/dist/headless.d.ts +110 -0
- package/dist/headless.js +1 -0
- package/dist/headless.mjs +1 -0
- package/dist/layout-bridge/clickToPositionDom.d.mts +56 -0
- package/dist/layout-bridge/clickToPositionDom.d.ts +56 -0
- package/dist/layout-bridge/clickToPositionDom.js +1 -0
- package/dist/layout-bridge/clickToPositionDom.mjs +1 -0
- package/dist/layout-bridge/index.d.mts +462 -0
- package/dist/layout-bridge/index.d.ts +462 -0
- package/dist/layout-bridge/index.js +1 -0
- package/dist/layout-bridge/index.mjs +1 -0
- package/dist/layout-bridge/measuring/index.d.mts +320 -0
- package/dist/layout-bridge/measuring/index.d.ts +320 -0
- package/dist/layout-bridge/measuring/index.js +1 -0
- package/dist/layout-bridge/measuring/index.mjs +1 -0
- package/dist/layout-bridge/tableInsertHover.d.mts +45 -0
- package/dist/layout-bridge/tableInsertHover.d.ts +45 -0
- package/dist/layout-bridge/tableInsertHover.js +1 -0
- package/dist/layout-bridge/tableInsertHover.mjs +1 -0
- package/dist/layout-bridge/toFlowBlocks.d.mts +122 -0
- package/dist/layout-bridge/toFlowBlocks.d.ts +122 -0
- package/dist/layout-bridge/toFlowBlocks.js +1 -0
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -0
- package/dist/layout-engine/index.d.mts +322 -0
- package/dist/layout-engine/index.d.ts +322 -0
- package/dist/layout-engine/index.js +1 -0
- package/dist/layout-engine/index.mjs +1 -0
- package/dist/layout-engine/types.d.mts +903 -0
- package/dist/layout-engine/types.d.ts +903 -0
- package/dist/layout-engine/types.js +1 -0
- package/dist/layout-engine/types.mjs +1 -0
- package/dist/layout-painter/index.d.mts +23 -0
- package/dist/layout-painter/index.d.ts +23 -0
- package/dist/layout-painter/index.js +1 -0
- package/dist/layout-painter/index.mjs +1 -0
- package/dist/layout-painter/renderPage.d.mts +674 -0
- package/dist/layout-painter/renderPage.d.ts +674 -0
- package/dist/layout-painter/renderPage.js +1 -0
- package/dist/layout-painter/renderPage.mjs +1 -0
- package/dist/lists-CdiIk_c1.d.ts +142 -0
- package/dist/lists-JDB80qyP.d.mts +142 -0
- package/dist/managers/AutoSaveManager.d.mts +96 -0
- package/dist/managers/AutoSaveManager.d.ts +96 -0
- package/dist/managers/AutoSaveManager.js +1 -0
- package/dist/managers/AutoSaveManager.mjs +1 -0
- package/dist/managers/TableSelectionManager.d.mts +95 -0
- package/dist/managers/TableSelectionManager.d.ts +95 -0
- package/dist/managers/TableSelectionManager.js +1 -0
- package/dist/managers/TableSelectionManager.mjs +1 -0
- package/dist/managers/types.d.mts +122 -0
- package/dist/managers/types.d.ts +122 -0
- package/dist/managers/types.js +1 -0
- package/dist/managers/types.mjs +0 -0
- package/dist/marks-BujVxYP4.d.ts +56 -0
- package/dist/marks-CCPVlQzL.d.mts +56 -0
- package/dist/mcp-cli.mjs +137 -0
- package/dist/mcp.d.mts +184 -0
- package/dist/mcp.d.ts +184 -0
- package/dist/mcp.js +16 -0
- package/dist/mcp.mjs +16 -0
- package/dist/nodes-BXi1Uu3e.d.mts +257 -0
- package/dist/nodes-DfKj9kUA.d.ts +257 -0
- package/dist/plugin-api/RenderedDomContext.d.mts +74 -0
- package/dist/plugin-api/RenderedDomContext.d.ts +74 -0
- package/dist/plugin-api/RenderedDomContext.js +1 -0
- package/dist/plugin-api/RenderedDomContext.mjs +1 -0
- package/dist/plugin-api/index.d.mts +15 -0
- package/dist/plugin-api/index.d.ts +15 -0
- package/dist/plugin-api/index.js +1 -0
- package/dist/plugin-api/index.mjs +0 -0
- package/dist/plugin-api/resolveItemPositions.d.mts +54 -0
- package/dist/plugin-api/resolveItemPositions.d.ts +54 -0
- package/dist/plugin-api/resolveItemPositions.js +1 -0
- package/dist/plugin-api/resolveItemPositions.mjs +1 -0
- package/dist/plugin-api/types.d.mts +190 -0
- package/dist/plugin-api/types.d.ts +190 -0
- package/dist/plugin-api/types.js +1 -0
- package/dist/plugin-api/types.mjs +0 -0
- package/dist/processTemplate-GPFDLQMX.mjs +1 -0
- package/dist/processTemplate-HH2E3HBO.js +1 -0
- package/dist/prosemirror/commands/formatting.d.mts +100 -0
- package/dist/prosemirror/commands/formatting.d.ts +100 -0
- package/dist/prosemirror/commands/formatting.js +1 -0
- package/dist/prosemirror/commands/formatting.mjs +1 -0
- package/dist/prosemirror/commands/index.d.mts +114 -0
- package/dist/prosemirror/commands/index.d.ts +114 -0
- package/dist/prosemirror/commands/index.js +1 -0
- package/dist/prosemirror/commands/index.mjs +1 -0
- package/dist/prosemirror/commands/pageBreak.d.mts +20 -0
- package/dist/prosemirror/commands/pageBreak.d.ts +20 -0
- package/dist/prosemirror/commands/pageBreak.js +1 -0
- package/dist/prosemirror/commands/pageBreak.mjs +1 -0
- package/dist/prosemirror/commands/paragraph.d.mts +70 -0
- package/dist/prosemirror/commands/paragraph.d.ts +70 -0
- package/dist/prosemirror/commands/paragraph.js +1 -0
- package/dist/prosemirror/commands/paragraph.mjs +1 -0
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +66 -0
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +66 -0
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -0
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -0
- package/dist/prosemirror/conversion/index.d.mts +78 -0
- package/dist/prosemirror/conversion/index.d.ts +78 -0
- package/dist/prosemirror/conversion/index.js +1 -0
- package/dist/prosemirror/conversion/index.mjs +1 -0
- package/dist/prosemirror/editor.css +763 -0
- package/dist/prosemirror/extensions/index.d.mts +79 -0
- package/dist/prosemirror/extensions/index.d.ts +79 -0
- package/dist/prosemirror/extensions/index.js +1 -0
- package/dist/prosemirror/extensions/index.mjs +1 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.d.mts +30 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.d.ts +30 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -0
- package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -0
- package/dist/prosemirror/index.d.mts +71 -0
- package/dist/prosemirror/index.d.ts +71 -0
- package/dist/prosemirror/index.js +1 -0
- package/dist/prosemirror/index.mjs +1 -0
- package/dist/prosemirror/plugins/index.d.mts +50 -0
- package/dist/prosemirror/plugins/index.d.ts +50 -0
- package/dist/prosemirror/plugins/index.js +1 -0
- package/dist/prosemirror/plugins/index.mjs +1 -0
- package/dist/prosemirror/plugins/selectionTracker.d.mts +78 -0
- package/dist/prosemirror/plugins/selectionTracker.d.ts +78 -0
- package/dist/prosemirror/plugins/selectionTracker.js +1 -0
- package/dist/prosemirror/plugins/selectionTracker.mjs +1 -0
- package/dist/prosemirror/schema/index.d.mts +30 -0
- package/dist/prosemirror/schema/index.d.ts +30 -0
- package/dist/prosemirror/schema/index.js +1 -0
- package/dist/prosemirror/schema/index.mjs +1 -0
- package/dist/prosemirror/styles/index.d.mts +124 -0
- package/dist/prosemirror/styles/index.d.ts +124 -0
- package/dist/prosemirror/styles/index.js +1 -0
- package/dist/prosemirror/styles/index.mjs +1 -0
- package/dist/prosemirror/template/prosemirror-plugin.d.mts +66 -0
- package/dist/prosemirror/template/prosemirror-plugin.d.ts +66 -0
- package/dist/prosemirror/template/prosemirror-plugin.js +15 -0
- package/dist/prosemirror/template/prosemirror-plugin.mjs +15 -0
- package/dist/prosemirror/utils/ClickPositionResolver.d.mts +109 -0
- package/dist/prosemirror/utils/ClickPositionResolver.d.ts +109 -0
- package/dist/prosemirror/utils/ClickPositionResolver.js +1 -0
- package/dist/prosemirror/utils/ClickPositionResolver.mjs +1 -0
- package/dist/prosemirror/utils/LayoutSelectionGate.d.mts +81 -0
- package/dist/prosemirror/utils/LayoutSelectionGate.d.ts +81 -0
- package/dist/prosemirror/utils/LayoutSelectionGate.js +1 -0
- package/dist/prosemirror/utils/LayoutSelectionGate.mjs +1 -0
- package/dist/prosemirror/utils/PointerEventHandler.d.mts +94 -0
- package/dist/prosemirror/utils/PointerEventHandler.d.ts +94 -0
- package/dist/prosemirror/utils/PointerEventHandler.js +1 -0
- package/dist/prosemirror/utils/PointerEventHandler.mjs +1 -0
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +63 -0
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +63 -0
- package/dist/prosemirror/utils/extractTrackedChanges.js +1 -0
- package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -0
- package/dist/prosemirror/utils/visualLineNavigation.d.mts +45 -0
- package/dist/prosemirror/utils/visualLineNavigation.d.ts +45 -0
- package/dist/prosemirror/utils/visualLineNavigation.js +1 -0
- package/dist/prosemirror/utils/visualLineNavigation.mjs +1 -0
- package/dist/registry-Cpyybgij.d.mts +165 -0
- package/dist/registry-E5pahPKL.d.ts +165 -0
- package/dist/selectionContext-85CE0f7a.d.ts +570 -0
- package/dist/selectionContext-Xq3AY7pn.d.mts +570 -0
- package/dist/selectiveSave-CWaPEv0B.d.ts +31 -0
- package/dist/selectiveSave-jinP_4xa.d.mts +31 -0
- package/dist/selectiveXmlPatch-ypkxlTD_.d.mts +23 -0
- package/dist/selectiveXmlPatch-ypkxlTD_.d.ts +23 -0
- package/dist/styles-BBoqh07F.d.mts +233 -0
- package/dist/styles-jqO45PSq.d.ts +233 -0
- package/dist/table-P8esKWAc.d.ts +82 -0
- package/dist/table-_t_W8oQf.d.mts +82 -0
- package/dist/types/agentApi.d.mts +467 -0
- package/dist/types/agentApi.d.ts +467 -0
- package/dist/types/agentApi.js +1 -0
- package/dist/types/agentApi.mjs +1 -0
- package/dist/types/content.d.mts +1181 -0
- package/dist/types/content.d.ts +1181 -0
- package/dist/types/content.js +1 -0
- package/dist/types/content.mjs +0 -0
- package/dist/types/document.d.mts +106 -0
- package/dist/types/document.d.ts +106 -0
- package/dist/types/document.js +1 -0
- package/dist/types/document.mjs +0 -0
- package/dist/types-DXG7vqe9.d.ts +311 -0
- package/dist/types-RchZmPFN.d.mts +137 -0
- package/dist/types-RchZmPFN.d.ts +137 -0
- package/dist/types-dYdjUZMo.d.mts +311 -0
- package/dist/utils/cardStyles.d.mts +31 -0
- package/dist/utils/cardStyles.d.ts +31 -0
- package/dist/utils/cardStyles.js +1 -0
- package/dist/utils/cardStyles.mjs +1 -0
- package/dist/utils/comments.d.mts +48 -0
- package/dist/utils/comments.d.ts +48 -0
- package/dist/utils/comments.js +1 -0
- package/dist/utils/comments.mjs +1 -0
- package/dist/utils/findReplace.d.mts +114 -0
- package/dist/utils/findReplace.d.ts +114 -0
- package/dist/utils/findReplace.js +2 -0
- package/dist/utils/findReplace.mjs +2 -0
- package/dist/utils/findVerticalScrollParent.d.mts +25 -0
- package/dist/utils/findVerticalScrollParent.d.ts +25 -0
- package/dist/utils/findVerticalScrollParent.js +1 -0
- package/dist/utils/findVerticalScrollParent.mjs +1 -0
- package/dist/utils/fontOptions.d.mts +21 -0
- package/dist/utils/fontOptions.d.ts +21 -0
- package/dist/utils/fontOptions.js +1 -0
- package/dist/utils/fontOptions.mjs +1 -0
- package/dist/utils/headingCollector.d.mts +32 -0
- package/dist/utils/headingCollector.d.ts +32 -0
- package/dist/utils/headingCollector.js +1 -0
- package/dist/utils/headingCollector.mjs +1 -0
- package/dist/utils/highlightColors.d.mts +14 -0
- package/dist/utils/highlightColors.d.ts +14 -0
- package/dist/utils/highlightColors.js +1 -0
- package/dist/utils/highlightColors.mjs +1 -0
- package/dist/utils/index.d.mts +711 -0
- package/dist/utils/index.d.ts +711 -0
- package/dist/utils/index.js +82 -0
- package/dist/utils/index.mjs +82 -0
- package/dist/utils/listState.d.mts +27 -0
- package/dist/utils/listState.d.ts +27 -0
- package/dist/utils/listState.js +1 -0
- package/dist/utils/listState.mjs +1 -0
- package/dist/utils/reportIssue.d.mts +23 -0
- package/dist/utils/reportIssue.d.ts +23 -0
- package/dist/utils/reportIssue.js +2 -0
- package/dist/utils/reportIssue.mjs +2 -0
- package/dist/utils/sidebarConstants.d.mts +10 -0
- package/dist/utils/sidebarConstants.d.ts +10 -0
- package/dist/utils/sidebarConstants.js +1 -0
- package/dist/utils/sidebarConstants.mjs +1 -0
- package/dist/utils/textSelection.d.mts +92 -0
- package/dist/utils/textSelection.d.ts +92 -0
- package/dist/utils/textSelection.js +1 -0
- package/dist/utils/textSelection.mjs +1 -0
- package/dist/utils/units.d.mts +91 -0
- package/dist/utils/units.d.ts +91 -0
- package/dist/utils/units.js +1 -0
- package/dist/utils/units.mjs +1 -0
- package/dist/variableDetector-CAdt8yOr.d.mts +115 -0
- package/dist/variableDetector-W4XEN9YC.d.ts +115 -0
- package/package.json +565 -0
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { C as ColorValue, S as ShadingProperties, B as BorderSpec } from './colors-C3vA7HUU.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Text, Paragraph, and Table Formatting Types
|
|
5
|
+
*
|
|
6
|
+
* Properties that control how text, paragraphs, and table structures
|
|
7
|
+
* are formatted in OOXML (w:rPr, w:pPr, w:tblPr, etc.).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Underline style options
|
|
12
|
+
*/
|
|
13
|
+
type UnderlineStyle = 'none' | 'single' | 'words' | 'double' | 'thick' | 'dotted' | 'dottedHeavy' | 'dash' | 'dashedHeavy' | 'dashLong' | 'dashLongHeavy' | 'dotDash' | 'dashDotHeavy' | 'dotDotDash' | 'dashDotDotHeavy' | 'wave' | 'wavyHeavy' | 'wavyDouble';
|
|
14
|
+
/**
|
|
15
|
+
* Text effect animations
|
|
16
|
+
*/
|
|
17
|
+
type TextEffect = 'none' | 'blinkBackground' | 'lights' | 'antsBlack' | 'antsRed' | 'shimmer' | 'sparkle';
|
|
18
|
+
/**
|
|
19
|
+
* Emphasis mark type
|
|
20
|
+
*/
|
|
21
|
+
type EmphasisMark = 'none' | 'dot' | 'comma' | 'circle' | 'underDot';
|
|
22
|
+
/**
|
|
23
|
+
* Character-level formatting (`w:rPr`) — the full set of run properties
|
|
24
|
+
* Word supports: weight, slant, font, size, color, highlight, underline,
|
|
25
|
+
* strikethrough, vertical position, language, complex-script variants,
|
|
26
|
+
* spacing/kerning, emphasis marks, and more.
|
|
27
|
+
*
|
|
28
|
+
* Most fields mirror their ECMA-376 element names (see §17.3.2). Missing
|
|
29
|
+
* keys inherit from the run's paragraph style → linked style → document
|
|
30
|
+
* defaults chain.
|
|
31
|
+
*/
|
|
32
|
+
interface TextFormatting {
|
|
33
|
+
/** Bold (w:b) */
|
|
34
|
+
bold?: boolean;
|
|
35
|
+
/** Bold complex script (w:bCs) */
|
|
36
|
+
boldCs?: boolean;
|
|
37
|
+
/** Italic (w:i) */
|
|
38
|
+
italic?: boolean;
|
|
39
|
+
/** Italic complex script (w:iCs) */
|
|
40
|
+
italicCs?: boolean;
|
|
41
|
+
/** Underline style and color (w:u) */
|
|
42
|
+
underline?: {
|
|
43
|
+
style: UnderlineStyle;
|
|
44
|
+
color?: ColorValue;
|
|
45
|
+
};
|
|
46
|
+
/** Strikethrough (w:strike) */
|
|
47
|
+
strike?: boolean;
|
|
48
|
+
/** Double strikethrough (w:dstrike) */
|
|
49
|
+
doubleStrike?: boolean;
|
|
50
|
+
/** Superscript/subscript (w:vertAlign) */
|
|
51
|
+
vertAlign?: 'baseline' | 'superscript' | 'subscript';
|
|
52
|
+
/** Small caps (w:smallCaps) */
|
|
53
|
+
smallCaps?: boolean;
|
|
54
|
+
/** All caps (w:caps) */
|
|
55
|
+
allCaps?: boolean;
|
|
56
|
+
/** Hidden text (w:vanish) */
|
|
57
|
+
hidden?: boolean;
|
|
58
|
+
/** Text color (w:color) */
|
|
59
|
+
color?: ColorValue;
|
|
60
|
+
/** Highlight/background color (w:highlight) */
|
|
61
|
+
highlight?: 'black' | 'blue' | 'cyan' | 'darkBlue' | 'darkCyan' | 'darkGray' | 'darkGreen' | 'darkMagenta' | 'darkRed' | 'darkYellow' | 'green' | 'lightGray' | 'magenta' | 'none' | 'red' | 'white' | 'yellow';
|
|
62
|
+
/** Character shading (w:shd) */
|
|
63
|
+
shading?: ShadingProperties;
|
|
64
|
+
/** Font size in half-points (w:sz) - e.g., 24 = 12pt */
|
|
65
|
+
fontSize?: number;
|
|
66
|
+
/** Font size complex script (w:szCs) */
|
|
67
|
+
fontSizeCs?: number;
|
|
68
|
+
/** Font family (w:rFonts) */
|
|
69
|
+
fontFamily?: {
|
|
70
|
+
ascii?: string;
|
|
71
|
+
hAnsi?: string;
|
|
72
|
+
eastAsia?: string;
|
|
73
|
+
cs?: string;
|
|
74
|
+
/** Theme font reference */
|
|
75
|
+
asciiTheme?: 'majorAscii' | 'majorHAnsi' | 'majorEastAsia' | 'majorBidi' | 'minorAscii' | 'minorHAnsi' | 'minorEastAsia' | 'minorBidi';
|
|
76
|
+
hAnsiTheme?: string;
|
|
77
|
+
eastAsiaTheme?: string;
|
|
78
|
+
csTheme?: string;
|
|
79
|
+
};
|
|
80
|
+
/** Character spacing in twips (w:spacing) */
|
|
81
|
+
spacing?: number;
|
|
82
|
+
/** Raised/lowered text position in half-points (w:position) */
|
|
83
|
+
position?: number;
|
|
84
|
+
/** Horizontal text scale percentage (w:w) */
|
|
85
|
+
scale?: number;
|
|
86
|
+
/** Kerning threshold in half-points (w:kern) */
|
|
87
|
+
kerning?: number;
|
|
88
|
+
/** Text effect animation (w:effect) */
|
|
89
|
+
effect?: TextEffect;
|
|
90
|
+
/** Emphasis mark (w:em) */
|
|
91
|
+
emphasisMark?: EmphasisMark;
|
|
92
|
+
/** Emboss effect (w:emboss) */
|
|
93
|
+
emboss?: boolean;
|
|
94
|
+
/** Imprint/engrave effect (w:imprint) */
|
|
95
|
+
imprint?: boolean;
|
|
96
|
+
/** Outline effect (w:outline) */
|
|
97
|
+
outline?: boolean;
|
|
98
|
+
/** Shadow effect (w:shadow) */
|
|
99
|
+
shadow?: boolean;
|
|
100
|
+
/** Right-to-left text (w:rtl) */
|
|
101
|
+
rtl?: boolean;
|
|
102
|
+
/** Complex script formatting (w:cs) */
|
|
103
|
+
cs?: boolean;
|
|
104
|
+
/** Character style ID (w:rStyle) */
|
|
105
|
+
styleId?: string;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Tab stop alignment
|
|
109
|
+
*/
|
|
110
|
+
type TabStopAlignment = 'left' | 'center' | 'right' | 'decimal' | 'bar' | 'clear' | 'num';
|
|
111
|
+
/**
|
|
112
|
+
* Tab leader character
|
|
113
|
+
*/
|
|
114
|
+
type TabLeader = 'none' | 'dot' | 'hyphen' | 'underscore' | 'heavy' | 'middleDot';
|
|
115
|
+
/**
|
|
116
|
+
* Tab stop definition
|
|
117
|
+
*/
|
|
118
|
+
interface TabStop {
|
|
119
|
+
/** Position in twips from left margin */
|
|
120
|
+
position: number;
|
|
121
|
+
/** Alignment at tab stop */
|
|
122
|
+
alignment: TabStopAlignment;
|
|
123
|
+
/** Leader character */
|
|
124
|
+
leader?: TabLeader;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Line spacing rule
|
|
128
|
+
*/
|
|
129
|
+
type LineSpacingRule = 'auto' | 'exact' | 'atLeast';
|
|
130
|
+
/**
|
|
131
|
+
* Paragraph alignment/justification
|
|
132
|
+
*/
|
|
133
|
+
type ParagraphAlignment = 'left' | 'center' | 'right' | 'both' | 'distribute' | 'mediumKashida' | 'highKashida' | 'lowKashida' | 'thaiDistribute';
|
|
134
|
+
/**
|
|
135
|
+
* Per-side flags identifying which `<w:spacing>` attrs were inline (not
|
|
136
|
+
* inherited from a style chain). Used to suppress style-only spacing on
|
|
137
|
+
* empty paragraphs per Word's behavior.
|
|
138
|
+
*/
|
|
139
|
+
type SpacingExplicit = {
|
|
140
|
+
before?: boolean;
|
|
141
|
+
after?: boolean;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Paragraph-level formatting (`w:pPr`) — alignment, indentation, spacing
|
|
145
|
+
* (before/after, line height), pagination flags (keepNext, keepLines,
|
|
146
|
+
* pageBreakBefore, widowControl), tabs, borders, shading, numbering
|
|
147
|
+
* reference, style reference, and frame/anchored-text properties.
|
|
148
|
+
*
|
|
149
|
+
* Most fields mirror their ECMA-376 element names (see §17.3.1).
|
|
150
|
+
* Inheritance: direct formatting beats the linked style which beats
|
|
151
|
+
* document defaults.
|
|
152
|
+
*/
|
|
153
|
+
interface ParagraphFormatting {
|
|
154
|
+
/** Paragraph alignment (w:jc) */
|
|
155
|
+
alignment?: ParagraphAlignment;
|
|
156
|
+
/** Text direction (w:bidi) */
|
|
157
|
+
bidi?: boolean;
|
|
158
|
+
/** Spacing before in twips (w:spacing/@w:before) */
|
|
159
|
+
spaceBefore?: number;
|
|
160
|
+
/** Spacing after in twips (w:spacing/@w:after) */
|
|
161
|
+
spaceAfter?: number;
|
|
162
|
+
/** Line spacing value (w:spacing/@w:line) */
|
|
163
|
+
lineSpacing?: number;
|
|
164
|
+
/** Line spacing rule (w:spacing/@w:lineRule) */
|
|
165
|
+
lineSpacingRule?: LineSpacingRule;
|
|
166
|
+
/** Auto space before (w:spacing/@w:beforeAutospacing) */
|
|
167
|
+
beforeAutospacing?: boolean;
|
|
168
|
+
/** Auto space after (w:spacing/@w:afterAutospacing) */
|
|
169
|
+
afterAutospacing?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* Per-side flags marking which `<w:spacing>` attrs came from this
|
|
172
|
+
* paragraph's own pPr (vs inherited). Word collapses style-inherited
|
|
173
|
+
* spacing on empty paragraphs but honors the explicit values.
|
|
174
|
+
*/
|
|
175
|
+
spacingExplicit?: SpacingExplicit;
|
|
176
|
+
/** Left indent in twips (w:ind/@w:left) */
|
|
177
|
+
indentLeft?: number;
|
|
178
|
+
/** Right indent in twips (w:ind/@w:right) */
|
|
179
|
+
indentRight?: number;
|
|
180
|
+
/** First line indent in twips - positive for indent, negative for hanging (w:ind/@w:firstLine or @w:hanging) */
|
|
181
|
+
indentFirstLine?: number;
|
|
182
|
+
/** Whether first line is hanging indent */
|
|
183
|
+
hangingIndent?: boolean;
|
|
184
|
+
/** Paragraph borders (w:pBdr) */
|
|
185
|
+
borders?: {
|
|
186
|
+
top?: BorderSpec;
|
|
187
|
+
bottom?: BorderSpec;
|
|
188
|
+
left?: BorderSpec;
|
|
189
|
+
right?: BorderSpec;
|
|
190
|
+
between?: BorderSpec;
|
|
191
|
+
bar?: BorderSpec;
|
|
192
|
+
};
|
|
193
|
+
/** Paragraph shading (w:shd) */
|
|
194
|
+
shading?: ShadingProperties;
|
|
195
|
+
/** Custom tab stops (w:tabs) */
|
|
196
|
+
tabs?: TabStop[];
|
|
197
|
+
/** Keep with next paragraph (w:keepNext) */
|
|
198
|
+
keepNext?: boolean;
|
|
199
|
+
/** Keep lines together (w:keepLines) */
|
|
200
|
+
keepLines?: boolean;
|
|
201
|
+
/** Widow/orphan control (w:widowControl) */
|
|
202
|
+
widowControl?: boolean;
|
|
203
|
+
/** Page break before (w:pageBreakBefore) */
|
|
204
|
+
pageBreakBefore?: boolean;
|
|
205
|
+
/** Contextual spacing — suppress space between paragraphs of the same style (w:contextualSpacing) */
|
|
206
|
+
contextualSpacing?: boolean;
|
|
207
|
+
/** Numbering properties (w:numPr) */
|
|
208
|
+
numPr?: {
|
|
209
|
+
/** Numbering definition ID (w:numId) */
|
|
210
|
+
numId?: number;
|
|
211
|
+
/** List level (0-8) (w:ilvl) */
|
|
212
|
+
ilvl?: number;
|
|
213
|
+
};
|
|
214
|
+
/** Outline level 0-9 (w:outlineLvl) */
|
|
215
|
+
outlineLevel?: number;
|
|
216
|
+
/** Paragraph style ID (w:pStyle) */
|
|
217
|
+
styleId?: string;
|
|
218
|
+
/** Text frame properties (w:framePr) */
|
|
219
|
+
frame?: {
|
|
220
|
+
width?: number;
|
|
221
|
+
height?: number;
|
|
222
|
+
hAnchor?: 'text' | 'margin' | 'page';
|
|
223
|
+
vAnchor?: 'text' | 'margin' | 'page';
|
|
224
|
+
x?: number;
|
|
225
|
+
y?: number;
|
|
226
|
+
xAlign?: 'left' | 'center' | 'right' | 'inside' | 'outside';
|
|
227
|
+
yAlign?: 'top' | 'center' | 'bottom' | 'inside' | 'outside' | 'inline';
|
|
228
|
+
wrap?: 'around' | 'auto' | 'none' | 'notBeside' | 'through' | 'tight';
|
|
229
|
+
};
|
|
230
|
+
/** Suppress line numbers (w:suppressLineNumbers) */
|
|
231
|
+
suppressLineNumbers?: boolean;
|
|
232
|
+
/** Suppress auto hyphens (w:suppressAutoHyphens) */
|
|
233
|
+
suppressAutoHyphens?: boolean;
|
|
234
|
+
/** Run properties to apply to all runs (w:rPr) */
|
|
235
|
+
runProperties?: TextFormatting;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Table width type
|
|
239
|
+
*/
|
|
240
|
+
type TableWidthType = 'auto' | 'dxa' | 'nil' | 'pct';
|
|
241
|
+
/**
|
|
242
|
+
* Table measurement (width or height)
|
|
243
|
+
*/
|
|
244
|
+
interface TableMeasurement {
|
|
245
|
+
/** Value in twips (for dxa) or fifths of a percent (for pct) */
|
|
246
|
+
value: number;
|
|
247
|
+
/** Measurement type */
|
|
248
|
+
type: TableWidthType;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Table borders
|
|
252
|
+
*/
|
|
253
|
+
interface TableBorders {
|
|
254
|
+
top?: BorderSpec;
|
|
255
|
+
bottom?: BorderSpec;
|
|
256
|
+
left?: BorderSpec;
|
|
257
|
+
right?: BorderSpec;
|
|
258
|
+
insideH?: BorderSpec;
|
|
259
|
+
insideV?: BorderSpec;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Cell margins
|
|
263
|
+
*/
|
|
264
|
+
interface CellMargins {
|
|
265
|
+
top?: TableMeasurement;
|
|
266
|
+
bottom?: TableMeasurement;
|
|
267
|
+
left?: TableMeasurement;
|
|
268
|
+
right?: TableMeasurement;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Table look flags (for table styles)
|
|
272
|
+
*/
|
|
273
|
+
interface TableLook {
|
|
274
|
+
firstColumn?: boolean;
|
|
275
|
+
firstRow?: boolean;
|
|
276
|
+
lastColumn?: boolean;
|
|
277
|
+
lastRow?: boolean;
|
|
278
|
+
noHBand?: boolean;
|
|
279
|
+
noVBand?: boolean;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Floating table properties
|
|
283
|
+
*/
|
|
284
|
+
interface FloatingTableProperties {
|
|
285
|
+
/** Horizontal anchor */
|
|
286
|
+
horzAnchor?: 'margin' | 'page' | 'text';
|
|
287
|
+
/** Vertical anchor */
|
|
288
|
+
vertAnchor?: 'margin' | 'page' | 'text';
|
|
289
|
+
/** Horizontal position */
|
|
290
|
+
tblpX?: number;
|
|
291
|
+
tblpXSpec?: 'left' | 'center' | 'right' | 'inside' | 'outside';
|
|
292
|
+
/** Vertical position */
|
|
293
|
+
tblpY?: number;
|
|
294
|
+
tblpYSpec?: 'top' | 'center' | 'bottom' | 'inside' | 'outside' | 'inline';
|
|
295
|
+
/** Distance from surrounding text */
|
|
296
|
+
topFromText?: number;
|
|
297
|
+
bottomFromText?: number;
|
|
298
|
+
leftFromText?: number;
|
|
299
|
+
rightFromText?: number;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Table formatting properties (w:tblPr)
|
|
303
|
+
*/
|
|
304
|
+
interface TableFormatting {
|
|
305
|
+
/** Table width */
|
|
306
|
+
width?: TableMeasurement;
|
|
307
|
+
/** Table justification */
|
|
308
|
+
justification?: 'left' | 'center' | 'right';
|
|
309
|
+
/** Cell spacing */
|
|
310
|
+
cellSpacing?: TableMeasurement;
|
|
311
|
+
/** Table indent from left margin */
|
|
312
|
+
indent?: TableMeasurement;
|
|
313
|
+
/** Table borders */
|
|
314
|
+
borders?: TableBorders;
|
|
315
|
+
/** Default cell margins */
|
|
316
|
+
cellMargins?: CellMargins;
|
|
317
|
+
/** Table layout */
|
|
318
|
+
layout?: 'fixed' | 'autofit';
|
|
319
|
+
/** Table style ID */
|
|
320
|
+
styleId?: string;
|
|
321
|
+
/** Table look (conditional formatting flags) */
|
|
322
|
+
look?: TableLook;
|
|
323
|
+
/** Shading/background */
|
|
324
|
+
shading?: ShadingProperties;
|
|
325
|
+
/** Overlap for floating tables */
|
|
326
|
+
overlap?: 'never' | 'overlap';
|
|
327
|
+
/** Floating table properties */
|
|
328
|
+
floating?: FloatingTableProperties;
|
|
329
|
+
/** Right to left table */
|
|
330
|
+
bidi?: boolean;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Table row formatting properties (w:trPr)
|
|
334
|
+
*/
|
|
335
|
+
interface TableRowFormatting {
|
|
336
|
+
/** Row height */
|
|
337
|
+
height?: TableMeasurement;
|
|
338
|
+
/** Height rule */
|
|
339
|
+
heightRule?: 'auto' | 'atLeast' | 'exact';
|
|
340
|
+
/** Header row (repeats on each page) */
|
|
341
|
+
header?: boolean;
|
|
342
|
+
/** Allow row to break across pages */
|
|
343
|
+
cantSplit?: boolean;
|
|
344
|
+
/** Row justification */
|
|
345
|
+
justification?: 'left' | 'center' | 'right';
|
|
346
|
+
/** Hidden row */
|
|
347
|
+
hidden?: boolean;
|
|
348
|
+
/** Conditional format style */
|
|
349
|
+
conditionalFormat?: ConditionalFormatStyle;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Conditional format style
|
|
353
|
+
*/
|
|
354
|
+
interface ConditionalFormatStyle {
|
|
355
|
+
/** First row */
|
|
356
|
+
firstRow?: boolean;
|
|
357
|
+
/** Last row */
|
|
358
|
+
lastRow?: boolean;
|
|
359
|
+
/** First column */
|
|
360
|
+
firstColumn?: boolean;
|
|
361
|
+
/** Last column */
|
|
362
|
+
lastColumn?: boolean;
|
|
363
|
+
/** Odd horizontal band */
|
|
364
|
+
oddHBand?: boolean;
|
|
365
|
+
/** Even horizontal band */
|
|
366
|
+
evenHBand?: boolean;
|
|
367
|
+
/** Odd vertical band */
|
|
368
|
+
oddVBand?: boolean;
|
|
369
|
+
/** Even vertical band */
|
|
370
|
+
evenVBand?: boolean;
|
|
371
|
+
/** Northwest corner */
|
|
372
|
+
nwCell?: boolean;
|
|
373
|
+
/** Northeast corner */
|
|
374
|
+
neCell?: boolean;
|
|
375
|
+
/** Southwest corner */
|
|
376
|
+
swCell?: boolean;
|
|
377
|
+
/** Southeast corner */
|
|
378
|
+
seCell?: boolean;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Table cell formatting properties (w:tcPr)
|
|
382
|
+
*/
|
|
383
|
+
interface TableCellFormatting {
|
|
384
|
+
/** Cell width */
|
|
385
|
+
width?: TableMeasurement;
|
|
386
|
+
/** Cell borders */
|
|
387
|
+
borders?: TableBorders;
|
|
388
|
+
/** Cell margins (override table default) */
|
|
389
|
+
margins?: CellMargins;
|
|
390
|
+
/** Cell shading/background */
|
|
391
|
+
shading?: ShadingProperties;
|
|
392
|
+
/** Vertical alignment */
|
|
393
|
+
verticalAlign?: 'top' | 'center' | 'bottom';
|
|
394
|
+
/** Text direction */
|
|
395
|
+
textDirection?: 'lr' | 'lrV' | 'rl' | 'rlV' | 'tb' | 'tbV' | 'tbRl' | 'tbRlV' | 'btLr';
|
|
396
|
+
/** Grid span (horizontal merge) */
|
|
397
|
+
gridSpan?: number;
|
|
398
|
+
/** Vertical merge */
|
|
399
|
+
vMerge?: 'restart' | 'continue';
|
|
400
|
+
/** Fit text to cell width */
|
|
401
|
+
fitText?: boolean;
|
|
402
|
+
/** Wrap text */
|
|
403
|
+
noWrap?: boolean;
|
|
404
|
+
/** Hide cell marker */
|
|
405
|
+
hideMark?: boolean;
|
|
406
|
+
/** Conditional format style */
|
|
407
|
+
conditionalFormat?: ConditionalFormatStyle;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export type { CellMargins as C, EmphasisMark as E, FloatingTableProperties as F, LineSpacingRule as L, ParagraphFormatting as P, SpacingExplicit as S, TextFormatting as T, UnderlineStyle as U, ConditionalFormatStyle as a, ParagraphAlignment as b, TabLeader as c, TabStop as d, TabStopAlignment as e, TableBorders as f, TableCellFormatting as g, TableFormatting as h, TableLook as i, TableMeasurement as j, TableRowFormatting as k, TableWidthType as l, TextEffect as m };
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { FlowBlock, Measure, LayoutOptions, FootnoteContent, Layout, Page, PageMargins, ImageRun } from './layout-engine/types.js';
|
|
2
|
+
import { Footnote, HeaderFooter } from './types/content.js';
|
|
3
|
+
import { a as StyleDefinitions, T as Theme } from './styles-jqO45PSq.js';
|
|
4
|
+
import { F as FootnoteRenderItem, H as HeaderFooterContent } from './footnotes-skVvEHvZ.js';
|
|
5
|
+
import { Document } from './types/document.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Footnote Layout Utilities
|
|
9
|
+
*
|
|
10
|
+
* Footnote/endnote rendering pipeline plus page-mapping helpers:
|
|
11
|
+
* - scanning FlowBlocks for footnote references and their PM positions
|
|
12
|
+
* - mapping references to the page that ends up containing them
|
|
13
|
+
* - converting a Footnote → FootnoteContent via the body pipeline
|
|
14
|
+
* (footnoteToProseDoc → toFlowBlocks → caller-supplied measureBlocks)
|
|
15
|
+
* - reserving per-page footnote area heights for layout
|
|
16
|
+
*
|
|
17
|
+
* Everything that's pure OOXML / FlowBlock semantics lives here so the
|
|
18
|
+
* React, Vue, and any future adapters can share the conversion logic
|
|
19
|
+
* and just supply their own measurement function (which depends on
|
|
20
|
+
* platform-specific Canvas/font metrics).
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** Separator line height + vertical padding in pixels. */
|
|
24
|
+
declare const FOOTNOTE_SEPARATOR_HEIGHT = 12;
|
|
25
|
+
/**
|
|
26
|
+
* Hard cap on the multi-pass footnote layout loop. Reserving footnote
|
|
27
|
+
* space can move a reference to another page, so adapters keep remapping
|
|
28
|
+
* until the page→height contract is stable. Dense layouts converge in
|
|
29
|
+
* 2–3 passes in practice; 6 is a safe ceiling.
|
|
30
|
+
*/
|
|
31
|
+
declare const MAX_FOOTNOTE_LAYOUT_PASSES = 6;
|
|
32
|
+
/**
|
|
33
|
+
* Compare two per-page footnote reservation maps. Used by the React +
|
|
34
|
+
* Vue adapters to detect when the multi-pass loop has converged.
|
|
35
|
+
*/
|
|
36
|
+
declare function footnoteReservedHeightsEqual(a: Map<number, number>, b: Map<number, number>): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Scan FlowBlocks for runs with footnoteRefId set.
|
|
39
|
+
* Returns a list of { footnoteId, pmPos } in document order.
|
|
40
|
+
*/
|
|
41
|
+
declare function collectFootnoteRefs(blocks: FlowBlock[]): Array<{
|
|
42
|
+
footnoteId: number;
|
|
43
|
+
pmPos: number;
|
|
44
|
+
}>;
|
|
45
|
+
/**
|
|
46
|
+
* After layout, determine which footnotes appear on which pages.
|
|
47
|
+
* Checks each page's fragments to see if any footnoteRef PM positions fall within.
|
|
48
|
+
*
|
|
49
|
+
* Returns Map<pageNumber, footnoteId[]> in document order.
|
|
50
|
+
*/
|
|
51
|
+
declare function mapFootnotesToPages(pages: Page[], footnoteRefs: Array<{
|
|
52
|
+
footnoteId: number;
|
|
53
|
+
pmPos: number;
|
|
54
|
+
}>): Map<number, number[]>;
|
|
55
|
+
/**
|
|
56
|
+
* Footnote-specific block normalization. Mirrors the spirit of
|
|
57
|
+
* `normalizeHeaderFooterMeasureBlocks`: post-process the body-pipeline
|
|
58
|
+
* output for a single footnote so it carries the correct visual prefix
|
|
59
|
+
* (its display number, rendered as a superscript) and a default 8pt font
|
|
60
|
+
* for any run that didn't specify a size.
|
|
61
|
+
*
|
|
62
|
+
* The displayNumber is prepended onto the FIRST paragraph as a fresh
|
|
63
|
+
* superscript text run — visually matches Word's footnote numbering
|
|
64
|
+
* without disturbing the authored runs.
|
|
65
|
+
*
|
|
66
|
+
* Exported for callers that want to compose their own conversion
|
|
67
|
+
* pipeline; `convertFootnoteToContent` calls it as part of its flow.
|
|
68
|
+
*/
|
|
69
|
+
declare function applyFootnotePresentation(blocks: FlowBlock[], displayNumber: number): FlowBlock[];
|
|
70
|
+
/**
|
|
71
|
+
* Adapter-supplied block measurement function. The caller (React /
|
|
72
|
+
* Vue / etc.) supplies its platform's measure routine — at minimum
|
|
73
|
+
* paragraph + table + image + textBox — so this core helper stays
|
|
74
|
+
* Canvas-free.
|
|
75
|
+
*/
|
|
76
|
+
type MeasureBlocksFn = (blocks: FlowBlock[], contentWidth: number) => Measure[];
|
|
77
|
+
/**
|
|
78
|
+
* Options for {@link convertFootnoteToContent}.
|
|
79
|
+
*/
|
|
80
|
+
type ConvertFootnoteOptions = {
|
|
81
|
+
/** The document's parsed style definitions, threaded into the body pipeline. */
|
|
82
|
+
styles?: StyleDefinitions | null;
|
|
83
|
+
/** Theme for resolving themed fills / fonts inside the footnote. */
|
|
84
|
+
theme?: Theme | null;
|
|
85
|
+
/** Measure callback supplied by the rendering adapter. */
|
|
86
|
+
measureBlocks: MeasureBlocksFn;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Convert a Footnote to renderable FootnoteContent via the body pipeline:
|
|
90
|
+
* `footnoteToProseDoc → toFlowBlocks → applyFootnotePresentation →
|
|
91
|
+
* measureBlocks`. Pre-PR (#378) this lived in a hand-rolled shadow stack
|
|
92
|
+
* that silently dropped non-paragraph content; routing through the body
|
|
93
|
+
* pipeline gives footnotes full block-kind support — paragraph + table
|
|
94
|
+
* + image + textBox + fields.
|
|
95
|
+
*/
|
|
96
|
+
declare function convertFootnoteToContent(footnote: Footnote, displayNumber: number, contentWidth: number, options: ConvertFootnoteOptions): FootnoteContent;
|
|
97
|
+
/**
|
|
98
|
+
* Build footnote content for all footnotes referenced in the document.
|
|
99
|
+
* Display numbers are assigned by first-appearance order (the same way
|
|
100
|
+
* Word renders them).
|
|
101
|
+
*/
|
|
102
|
+
declare function buildFootnoteContentMap(footnotes: Footnote[], footnoteRefs: Array<{
|
|
103
|
+
footnoteId: number;
|
|
104
|
+
}>, contentWidth: number, options: ConvertFootnoteOptions): Map<number, FootnoteContent>;
|
|
105
|
+
/**
|
|
106
|
+
* Calculate per-page footnote reserved heights.
|
|
107
|
+
* Returns Map<pageNumber, reservedHeight>.
|
|
108
|
+
*/
|
|
109
|
+
declare function calculateFootnoteReservedHeights(pageFootnoteMap: Map<number, number[]>, footnoteContentMap: Map<number, {
|
|
110
|
+
height: number;
|
|
111
|
+
}>): Map<number, number>;
|
|
112
|
+
interface StabilizeFootnoteLayoutArgs {
|
|
113
|
+
blocks: FlowBlock[];
|
|
114
|
+
measures: Measure[];
|
|
115
|
+
layoutOpts: LayoutOptions;
|
|
116
|
+
footnoteRefs: Array<{
|
|
117
|
+
footnoteId: number;
|
|
118
|
+
pmPos: number;
|
|
119
|
+
}>;
|
|
120
|
+
footnoteContentMap: Map<number, FootnoteContent>;
|
|
121
|
+
/** First-pass layout already computed by the caller without reserved heights. */
|
|
122
|
+
initialLayout: Layout;
|
|
123
|
+
}
|
|
124
|
+
interface StabilizeFootnoteLayoutResult {
|
|
125
|
+
layout: Layout;
|
|
126
|
+
pageFootnoteMap: Map<number, number[]>;
|
|
127
|
+
/** True if the loop converged before hitting MAX_FOOTNOTE_LAYOUT_PASSES. */
|
|
128
|
+
converged: boolean;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Run the multi-pass footnote layout loop. Reserving footnote space on a
|
|
132
|
+
* page can move a reference to another page, which changes the reservation,
|
|
133
|
+
* which can move references again. Iterate until the page→height contract
|
|
134
|
+
* is the same one used by the latest layout, or `MAX_FOOTNOTE_LAYOUT_PASSES`
|
|
135
|
+
* passes have run.
|
|
136
|
+
*
|
|
137
|
+
* Lives in core so the React + Vue adapters call the same loop and stay in
|
|
138
|
+
* lockstep on convergence behaviour. Writes `page.footnoteIds` onto each
|
|
139
|
+
* page in the returned layout so renderers can paint footnote areas.
|
|
140
|
+
*/
|
|
141
|
+
declare function stabilizeFootnoteLayout(args: StabilizeFootnoteLayoutArgs): StabilizeFootnoteLayoutResult;
|
|
142
|
+
/**
|
|
143
|
+
* Turn the page→footnote-id map into the per-page render payload that
|
|
144
|
+
* `renderPages` consumes via `footnotesByPage`. Skips non-`normal` notes
|
|
145
|
+
* (separators, continuation notices), reads the display number out of the
|
|
146
|
+
* content map, and pulls plain text via `getFootnoteText`.
|
|
147
|
+
*
|
|
148
|
+
* Lives in core (not in either adapter) so React + Vue both call the
|
|
149
|
+
* same helper — same rule as the rest of this module.
|
|
150
|
+
*/
|
|
151
|
+
declare function buildFootnoteRenderItems(pageFootnoteMap: Map<number, number[]>, footnoteContentMap: Map<number, FootnoteContent>, doc: Document | null): Map<number, FootnoteRenderItem[]>;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Header / Footer Layout Utilities
|
|
155
|
+
*
|
|
156
|
+
* The header/footer rendering pipeline lives here so any rendering adapter
|
|
157
|
+
* (React, Vue, etc.) can share the conversion logic and just supply its
|
|
158
|
+
* platform-specific {@link MeasureBlocksFn}. Mirrors the footnote pipeline
|
|
159
|
+
* in `footnoteLayout.ts`.
|
|
160
|
+
*
|
|
161
|
+
* Pipeline:
|
|
162
|
+
* HF.content → headerFooterToProseDoc → toFlowBlocks
|
|
163
|
+
* → measureBlocks (caller-supplied, Canvas-aware)
|
|
164
|
+
* → HeaderFooterContent (blocks, measures, height, visualTop/Bottom)
|
|
165
|
+
*
|
|
166
|
+
* The render side uses the normalized block list so paint and measurement stay
|
|
167
|
+
* in lockstep. Visual-bounds calculation still inspects the original block
|
|
168
|
+
* list because floating images can paint above/below the nominal flow box even
|
|
169
|
+
* when they do not contribute to flow height.
|
|
170
|
+
*/
|
|
171
|
+
|
|
172
|
+
type HeaderFooterMetrics = {
|
|
173
|
+
section: 'header' | 'footer';
|
|
174
|
+
pageSize: {
|
|
175
|
+
w: number;
|
|
176
|
+
h: number;
|
|
177
|
+
};
|
|
178
|
+
margins: PageMargins;
|
|
179
|
+
};
|
|
180
|
+
declare function normalizeHeaderFooterMeasureBlocks(blocks: FlowBlock[]): FlowBlock[];
|
|
181
|
+
declare function resolveHeaderFooterVisualTop(run: ImageRun, paragraphY: number, flowHeight: number, metrics: HeaderFooterMetrics): number;
|
|
182
|
+
declare function calculateHeaderFooterVisualBounds(blocks: FlowBlock[], measures: Measure[], flowHeight: number, metrics: HeaderFooterMetrics): {
|
|
183
|
+
visualTop: number;
|
|
184
|
+
visualBottom: number;
|
|
185
|
+
};
|
|
186
|
+
type ConvertHeaderFooterOptions = {
|
|
187
|
+
styles?: StyleDefinitions | null;
|
|
188
|
+
theme?: Theme | null;
|
|
189
|
+
measureBlocks: MeasureBlocksFn;
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* Convert HeaderFooter (document type) to HeaderFooterContent (render type).
|
|
193
|
+
*
|
|
194
|
+
* Routes through the same pipeline as the body: HF.content →
|
|
195
|
+
* headerFooterToProseDoc → toFlowBlocks → measureBlocks. The inline editor
|
|
196
|
+
* uses the same conversion chain, so block support (paragraph, table, image,
|
|
197
|
+
* textBox, fields) and the inline editor's content stay in lockstep.
|
|
198
|
+
*/
|
|
199
|
+
declare function convertHeaderFooterToContent(headerFooter: HeaderFooter | null | undefined, contentWidth: number, metrics: HeaderFooterMetrics, options: ConvertHeaderFooterOptions): HeaderFooterContent | undefined;
|
|
200
|
+
|
|
201
|
+
export { type ConvertFootnoteOptions as C, FOOTNOTE_SEPARATOR_HEIGHT as F, type HeaderFooterMetrics as H, MAX_FOOTNOTE_LAYOUT_PASSES as M, type StabilizeFootnoteLayoutArgs as S, type ConvertHeaderFooterOptions as a, type MeasureBlocksFn as b, type StabilizeFootnoteLayoutResult as c, buildFootnoteContentMap as d, buildFootnoteRenderItems as e, calculateFootnoteReservedHeights as f, collectFootnoteRefs as g, convertHeaderFooterToContent as h, footnoteReservedHeightsEqual as i, applyFootnotePresentation as j, calculateHeaderFooterVisualBounds as k, convertFootnoteToContent as l, mapFootnotesToPages as m, normalizeHeaderFooterMeasureBlocks as n, resolveHeaderFooterVisualTop as r, stabilizeFootnoteLayout as s };
|