@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,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Plugin API — Framework-Agnostic
|
|
3
|
+
*
|
|
4
|
+
* Exports the core plugin interfaces and types that can be used
|
|
5
|
+
* by any framework adapter (React, Vue, etc.).
|
|
6
|
+
*
|
|
7
|
+
* @experimental Plugin API is still evolving. Breaking changes may
|
|
8
|
+
* happen in minor releases until plugin authors stabilize the contract.
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export { EditorPluginCore, PanelConfig, PluginPanelProps, PositionCoordinates, RenderedDomContext, SidebarItem, SidebarItemContext } from './types.mjs';
|
|
13
|
+
import 'prosemirror-state';
|
|
14
|
+
import 'prosemirror-view';
|
|
15
|
+
import 'prosemirror-model';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Plugin API — Framework-Agnostic
|
|
3
|
+
*
|
|
4
|
+
* Exports the core plugin interfaces and types that can be used
|
|
5
|
+
* by any framework adapter (React, Vue, etc.).
|
|
6
|
+
*
|
|
7
|
+
* @experimental Plugin API is still evolving. Breaking changes may
|
|
8
|
+
* happen in minor releases until plugin authors stabilize the contract.
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export { EditorPluginCore, PanelConfig, PluginPanelProps, PositionCoordinates, RenderedDomContext, SidebarItem, SidebarItemContext } from './types.js';
|
|
13
|
+
import 'prosemirror-state';
|
|
14
|
+
import 'prosemirror-view';
|
|
15
|
+
import 'prosemirror-model';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|
|
File without changes
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure layout algorithm: given a list of sidebar items + their
|
|
3
|
+
* anchor sources, return a list of resolved Y positions with
|
|
4
|
+
* collision avoidance applied. Lifted from React's
|
|
5
|
+
* components/sidebar/resolveItemPositions.ts so the Vue adapter
|
|
6
|
+
* can call it directly.
|
|
7
|
+
*
|
|
8
|
+
* The algorithm walks the items in three priority stages:
|
|
9
|
+
* 1. explicit fixedY (already in scroll-container coords)
|
|
10
|
+
* 2. anchorKey lookup in anchorPositions (layout-engine coords)
|
|
11
|
+
* 3. DOM-based anchor lookup via renderedDomContext.getRectsForRange
|
|
12
|
+
* 4. last-known cache so cards don't pop out during transient layout
|
|
13
|
+
*
|
|
14
|
+
* Then it sorts by target Y and pushes overlapping cards down by
|
|
15
|
+
* their height + MIN_CARD_GAP.
|
|
16
|
+
* @packageDocumentation
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
import { SidebarItem, RenderedDomContext } from './types.mjs';
|
|
20
|
+
import 'prosemirror-state';
|
|
21
|
+
import 'prosemirror-view';
|
|
22
|
+
import 'prosemirror-model';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Pure layout algorithm: given a list of sidebar items + their
|
|
26
|
+
* anchor sources, return a list of resolved Y positions with
|
|
27
|
+
* collision avoidance applied. Lifted from React's
|
|
28
|
+
* components/sidebar/resolveItemPositions.ts so the Vue adapter
|
|
29
|
+
* can call it directly.
|
|
30
|
+
*
|
|
31
|
+
* The algorithm walks the items in three priority stages:
|
|
32
|
+
* 1. explicit fixedY (already in scroll-container coords)
|
|
33
|
+
* 2. anchorKey lookup in anchorPositions (layout-engine coords)
|
|
34
|
+
* 3. DOM-based anchor lookup via renderedDomContext.getRectsForRange
|
|
35
|
+
* 4. last-known cache so cards don't pop out during transient layout
|
|
36
|
+
*
|
|
37
|
+
* Then it sorts by target Y and pushes overlapping cards down by
|
|
38
|
+
* their height + MIN_CARD_GAP.
|
|
39
|
+
* @packageDocumentation
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/** Generic sidebar item with optional fixedY / estimatedHeight. */
|
|
44
|
+
interface ResolvableSidebarItem extends SidebarItem {
|
|
45
|
+
fixedY?: number;
|
|
46
|
+
estimatedHeight?: number;
|
|
47
|
+
}
|
|
48
|
+
interface ResolvedPosition<T extends ResolvableSidebarItem = ResolvableSidebarItem> {
|
|
49
|
+
item: T;
|
|
50
|
+
y: number;
|
|
51
|
+
}
|
|
52
|
+
declare function resolveItemPositions<T extends ResolvableSidebarItem>(items: T[], anchorPositions: Map<string, number>, renderedDomContext: RenderedDomContext | null, zoom: number, cardHeights: Map<string, number>, lastKnown: Map<string, number>): ResolvedPosition<T>[];
|
|
53
|
+
|
|
54
|
+
export { type ResolvableSidebarItem, type ResolvedPosition, resolveItemPositions };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure layout algorithm: given a list of sidebar items + their
|
|
3
|
+
* anchor sources, return a list of resolved Y positions with
|
|
4
|
+
* collision avoidance applied. Lifted from React's
|
|
5
|
+
* components/sidebar/resolveItemPositions.ts so the Vue adapter
|
|
6
|
+
* can call it directly.
|
|
7
|
+
*
|
|
8
|
+
* The algorithm walks the items in three priority stages:
|
|
9
|
+
* 1. explicit fixedY (already in scroll-container coords)
|
|
10
|
+
* 2. anchorKey lookup in anchorPositions (layout-engine coords)
|
|
11
|
+
* 3. DOM-based anchor lookup via renderedDomContext.getRectsForRange
|
|
12
|
+
* 4. last-known cache so cards don't pop out during transient layout
|
|
13
|
+
*
|
|
14
|
+
* Then it sorts by target Y and pushes overlapping cards down by
|
|
15
|
+
* their height + MIN_CARD_GAP.
|
|
16
|
+
* @packageDocumentation
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
import { SidebarItem, RenderedDomContext } from './types.js';
|
|
20
|
+
import 'prosemirror-state';
|
|
21
|
+
import 'prosemirror-view';
|
|
22
|
+
import 'prosemirror-model';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Pure layout algorithm: given a list of sidebar items + their
|
|
26
|
+
* anchor sources, return a list of resolved Y positions with
|
|
27
|
+
* collision avoidance applied. Lifted from React's
|
|
28
|
+
* components/sidebar/resolveItemPositions.ts so the Vue adapter
|
|
29
|
+
* can call it directly.
|
|
30
|
+
*
|
|
31
|
+
* The algorithm walks the items in three priority stages:
|
|
32
|
+
* 1. explicit fixedY (already in scroll-container coords)
|
|
33
|
+
* 2. anchorKey lookup in anchorPositions (layout-engine coords)
|
|
34
|
+
* 3. DOM-based anchor lookup via renderedDomContext.getRectsForRange
|
|
35
|
+
* 4. last-known cache so cards don't pop out during transient layout
|
|
36
|
+
*
|
|
37
|
+
* Then it sorts by target Y and pushes overlapping cards down by
|
|
38
|
+
* their height + MIN_CARD_GAP.
|
|
39
|
+
* @packageDocumentation
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
|
|
43
|
+
/** Generic sidebar item with optional fixedY / estimatedHeight. */
|
|
44
|
+
interface ResolvableSidebarItem extends SidebarItem {
|
|
45
|
+
fixedY?: number;
|
|
46
|
+
estimatedHeight?: number;
|
|
47
|
+
}
|
|
48
|
+
interface ResolvedPosition<T extends ResolvableSidebarItem = ResolvableSidebarItem> {
|
|
49
|
+
item: T;
|
|
50
|
+
y: number;
|
|
51
|
+
}
|
|
52
|
+
declare function resolveItemPositions<T extends ResolvableSidebarItem>(items: T[], anchorPositions: Map<string, number>, renderedDomContext: RenderedDomContext | null, zoom: number, cardHeights: Map<string, number>, lastKnown: Map<string, number>): ResolvedPosition<T>[];
|
|
53
|
+
|
|
54
|
+
export { type ResolvableSidebarItem, type ResolvedPosition, resolveItemPositions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';require('../chunk-AAPBAMD7.js'),require('../chunk-DC7S76ZX.js');function g(s,u,n,r,d,l){if(s.length===0)return [];let a=n?.getContainerOffset(),o=[];for(let e of s){let t;if(e.fixedY!=null&&(t=e.fixedY*r),t==null&&e.anchorKey){let i=u.get(e.anchorKey);i!=null&&(t=i*r);}if(t==null&&n){let i=n.getRectsForRange(e.anchorPos,e.anchorPos+1);i.length>0&&a&&(t=(i[0].y+a.y)*r);}if(t==null){let i=l.get(e.id);i!=null&&(t=i);}t!=null&&(o.push({item:e,targetY:t}),l.set(e.id,t));}o.sort((e,t)=>{let i=e.targetY-t.targetY;return i!==0?i:(e.item.priority??0)-(t.item.priority??0)});let m=[],f=0;for(let e of o){let t=d.get(e.item.id)??e.item.estimatedHeight??80,i=Math.max(e.targetY,f+8);m.push({item:e.item,y:i}),f=i+t;}return m}exports.resolveItemPositions=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import'../chunk-PRRM64JO.mjs';import'../chunk-QYUPLKLP.mjs';function g(s,u,n,r,d,l){if(s.length===0)return [];let a=n?.getContainerOffset(),o=[];for(let e of s){let t;if(e.fixedY!=null&&(t=e.fixedY*r),t==null&&e.anchorKey){let i=u.get(e.anchorKey);i!=null&&(t=i*r);}if(t==null&&n){let i=n.getRectsForRange(e.anchorPos,e.anchorPos+1);i.length>0&&a&&(t=(i[0].y+a.y)*r);}if(t==null){let i=l.get(e.id);i!=null&&(t=i);}t!=null&&(o.push({item:e,targetY:t}),l.set(e.id,t));}o.sort((e,t)=>{let i=e.targetY-t.targetY;return i!==0?i:(e.item.priority??0)-(t.item.priority??0)});let m=[],f=0;for(let e of o){let t=d.get(e.item.id)??e.item.estimatedHeight??80,i=Math.max(e.targetY,f+8);m.push({item:e.item,y:i}),f=i+t;}return m}export{g as resolveItemPositions};
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-Agnostic Plugin Interface for the DOCX Editor
|
|
3
|
+
*
|
|
4
|
+
* Core plugin types that can be used by any framework (React, Vue, etc.).
|
|
5
|
+
* Framework-specific adapters extend EditorPluginCore with their own
|
|
6
|
+
* UI rendering capabilities (e.g., ReactEditorPlugin, VueEditorPlugin).
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
import { Plugin } from 'prosemirror-state';
|
|
11
|
+
import { EditorView } from 'prosemirror-view';
|
|
12
|
+
import { Node } from 'prosemirror-model';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Framework-Agnostic Plugin Interface for the DOCX Editor
|
|
16
|
+
*
|
|
17
|
+
* Core plugin types that can be used by any framework (React, Vue, etc.).
|
|
18
|
+
* Framework-specific adapters extend EditorPluginCore with their own
|
|
19
|
+
* UI rendering capabilities (e.g., ReactEditorPlugin, VueEditorPlugin).
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Coordinates returned by position lookup in the rendered DOM.
|
|
26
|
+
*/
|
|
27
|
+
interface PositionCoordinates {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
height: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Context for accessing the rendered DOM in the paged editor.
|
|
34
|
+
*
|
|
35
|
+
* Provides DOM-based position mapping that works with the LayoutPainter
|
|
36
|
+
* output (visible pages). Use this for rendering overlays, annotations,
|
|
37
|
+
* and other visual elements positioned relative to rendered content.
|
|
38
|
+
*
|
|
39
|
+
* The rendered DOM uses data-pm-start/data-pm-end attributes on spans
|
|
40
|
+
* to map between ProseMirror positions and DOM elements.
|
|
41
|
+
*/
|
|
42
|
+
interface RenderedDomContext {
|
|
43
|
+
/** The container element holding all rendered pages. */
|
|
44
|
+
pagesContainer: HTMLElement;
|
|
45
|
+
/**
|
|
46
|
+
* Get pixel coordinates for a ProseMirror position in the rendered DOM.
|
|
47
|
+
* Returns null if the position cannot be found.
|
|
48
|
+
*/
|
|
49
|
+
getCoordinatesForPosition(pmPos: number): PositionCoordinates | null;
|
|
50
|
+
/**
|
|
51
|
+
* Find DOM elements that overlap with a ProseMirror position range.
|
|
52
|
+
*/
|
|
53
|
+
findElementsForRange(from: number, to: number): Element[];
|
|
54
|
+
/**
|
|
55
|
+
* Get bounding rectangles for a range of text, accounting for line wraps.
|
|
56
|
+
* Returns rects relative to the pages container.
|
|
57
|
+
*/
|
|
58
|
+
getRectsForRange(from: number, to: number): Array<{
|
|
59
|
+
x: number;
|
|
60
|
+
y: number;
|
|
61
|
+
width: number;
|
|
62
|
+
height: number;
|
|
63
|
+
}>;
|
|
64
|
+
/** Current zoom level (1 = 100%). */
|
|
65
|
+
zoom: number;
|
|
66
|
+
/**
|
|
67
|
+
* Offset of the pages container from its parent viewport.
|
|
68
|
+
*/
|
|
69
|
+
getContainerOffset(): {
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Props passed to plugin panel components (framework-agnostic base).
|
|
76
|
+
*/
|
|
77
|
+
interface PluginPanelProps<TState = unknown> {
|
|
78
|
+
/** Current ProseMirror editor view */
|
|
79
|
+
editorView: EditorView | null;
|
|
80
|
+
/** Current ProseMirror document */
|
|
81
|
+
doc: Node | null;
|
|
82
|
+
/** Scroll editor to a specific position */
|
|
83
|
+
scrollToPosition: (pos: number) => void;
|
|
84
|
+
/** Select a range in the editor */
|
|
85
|
+
selectRange: (from: number, to: number) => void;
|
|
86
|
+
/** Plugin-specific state (managed by the plugin) */
|
|
87
|
+
pluginState: TState;
|
|
88
|
+
/** Width of the panel in pixels */
|
|
89
|
+
panelWidth: number;
|
|
90
|
+
/**
|
|
91
|
+
* Context for the rendered DOM (LayoutPainter output).
|
|
92
|
+
* May be null if layout hasn't completed yet.
|
|
93
|
+
*/
|
|
94
|
+
renderedDomContext: RenderedDomContext | null;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Configuration for plugin panel rendering.
|
|
98
|
+
*/
|
|
99
|
+
interface PanelConfig {
|
|
100
|
+
/** Where to render the panel */
|
|
101
|
+
position: 'left' | 'right' | 'bottom';
|
|
102
|
+
/** Default width/height of the panel */
|
|
103
|
+
defaultSize: number;
|
|
104
|
+
/** Minimum size */
|
|
105
|
+
minSize?: number;
|
|
106
|
+
/** Maximum size */
|
|
107
|
+
maxSize?: number;
|
|
108
|
+
/** Whether the panel is resizable */
|
|
109
|
+
resizable?: boolean;
|
|
110
|
+
/** Whether the panel can be collapsed */
|
|
111
|
+
collapsible?: boolean;
|
|
112
|
+
/** Initial collapsed state */
|
|
113
|
+
defaultCollapsed?: boolean;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Framework-agnostic core plugin interface.
|
|
117
|
+
*
|
|
118
|
+
* Contains all non-UI plugin capabilities:
|
|
119
|
+
* - ProseMirror plugins (decorations, keymaps, etc.)
|
|
120
|
+
* - State management (initialize, onStateChange, destroy)
|
|
121
|
+
* - CSS injection
|
|
122
|
+
* - Panel configuration
|
|
123
|
+
*
|
|
124
|
+
* Framework adapters (ReactEditorPlugin, VueEditorPlugin) extend this
|
|
125
|
+
* with their own Panel component type and renderOverlay function.
|
|
126
|
+
*/
|
|
127
|
+
interface EditorPluginCore<TState = any> {
|
|
128
|
+
/** Unique plugin identifier */
|
|
129
|
+
id: string;
|
|
130
|
+
/** Display name for the plugin */
|
|
131
|
+
name: string;
|
|
132
|
+
/**
|
|
133
|
+
* ProseMirror plugins to register with the editor.
|
|
134
|
+
* These are merged with the editor's internal plugins.
|
|
135
|
+
*/
|
|
136
|
+
proseMirrorPlugins?: Plugin[];
|
|
137
|
+
/**
|
|
138
|
+
* Configuration for the panel (position, size, etc.)
|
|
139
|
+
*/
|
|
140
|
+
panelConfig?: PanelConfig;
|
|
141
|
+
/**
|
|
142
|
+
* Called when the editor state changes.
|
|
143
|
+
* Use this to update plugin-specific state based on document changes.
|
|
144
|
+
*/
|
|
145
|
+
onStateChange?: (view: EditorView) => TState | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Initialize plugin state when the plugin is first loaded.
|
|
148
|
+
*/
|
|
149
|
+
initialize?: (view: EditorView | null) => TState;
|
|
150
|
+
/**
|
|
151
|
+
* Called when the plugin is being destroyed.
|
|
152
|
+
* Use this for cleanup (subscriptions, timers, etc.)
|
|
153
|
+
*/
|
|
154
|
+
destroy?: () => void;
|
|
155
|
+
/**
|
|
156
|
+
* CSS styles to inject for this plugin.
|
|
157
|
+
* Can be a string of CSS or a URL to a stylesheet.
|
|
158
|
+
*/
|
|
159
|
+
styles?: string;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* A sidebar item anchored to a document position.
|
|
163
|
+
* Framework adapters extend this with rendering capabilities.
|
|
164
|
+
*/
|
|
165
|
+
interface SidebarItem {
|
|
166
|
+
/** Unique ID for this item (used as React key and for overlap resolution). */
|
|
167
|
+
id: string;
|
|
168
|
+
/** ProseMirror document position this item anchors to. */
|
|
169
|
+
anchorPos: number;
|
|
170
|
+
/** Optional key into the anchorPositions Map (e.g. "comment-42", "revision-7"). */
|
|
171
|
+
anchorKey?: string;
|
|
172
|
+
/** Sort priority within items at the same anchor Y. Lower = first. Default: 0. */
|
|
173
|
+
priority?: number;
|
|
174
|
+
/** Temporary items (e.g. "add comment" input) skip entrance animation. */
|
|
175
|
+
isTemporary?: boolean;
|
|
176
|
+
/** Pre-computed Y position (scroll-container coords, pre-zoom). Overrides anchor resolution. */
|
|
177
|
+
fixedY?: number;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Context provided to plugins when computing sidebar items.
|
|
181
|
+
*/
|
|
182
|
+
interface SidebarItemContext {
|
|
183
|
+
editorView: EditorView | null;
|
|
184
|
+
renderedDomContext: RenderedDomContext | null;
|
|
185
|
+
/** Pre-computed Y positions from layout engine (keys like "comment-{id}"). */
|
|
186
|
+
anchorPositions: Map<string, number>;
|
|
187
|
+
zoom: number;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export type { EditorPluginCore, PanelConfig, PluginPanelProps, PositionCoordinates, RenderedDomContext, SidebarItem, SidebarItemContext };
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-Agnostic Plugin Interface for the DOCX Editor
|
|
3
|
+
*
|
|
4
|
+
* Core plugin types that can be used by any framework (React, Vue, etc.).
|
|
5
|
+
* Framework-specific adapters extend EditorPluginCore with their own
|
|
6
|
+
* UI rendering capabilities (e.g., ReactEditorPlugin, VueEditorPlugin).
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
import { Plugin } from 'prosemirror-state';
|
|
11
|
+
import { EditorView } from 'prosemirror-view';
|
|
12
|
+
import { Node } from 'prosemirror-model';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Framework-Agnostic Plugin Interface for the DOCX Editor
|
|
16
|
+
*
|
|
17
|
+
* Core plugin types that can be used by any framework (React, Vue, etc.).
|
|
18
|
+
* Framework-specific adapters extend EditorPluginCore with their own
|
|
19
|
+
* UI rendering capabilities (e.g., ReactEditorPlugin, VueEditorPlugin).
|
|
20
|
+
* @packageDocumentation
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Coordinates returned by position lookup in the rendered DOM.
|
|
26
|
+
*/
|
|
27
|
+
interface PositionCoordinates {
|
|
28
|
+
x: number;
|
|
29
|
+
y: number;
|
|
30
|
+
height: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Context for accessing the rendered DOM in the paged editor.
|
|
34
|
+
*
|
|
35
|
+
* Provides DOM-based position mapping that works with the LayoutPainter
|
|
36
|
+
* output (visible pages). Use this for rendering overlays, annotations,
|
|
37
|
+
* and other visual elements positioned relative to rendered content.
|
|
38
|
+
*
|
|
39
|
+
* The rendered DOM uses data-pm-start/data-pm-end attributes on spans
|
|
40
|
+
* to map between ProseMirror positions and DOM elements.
|
|
41
|
+
*/
|
|
42
|
+
interface RenderedDomContext {
|
|
43
|
+
/** The container element holding all rendered pages. */
|
|
44
|
+
pagesContainer: HTMLElement;
|
|
45
|
+
/**
|
|
46
|
+
* Get pixel coordinates for a ProseMirror position in the rendered DOM.
|
|
47
|
+
* Returns null if the position cannot be found.
|
|
48
|
+
*/
|
|
49
|
+
getCoordinatesForPosition(pmPos: number): PositionCoordinates | null;
|
|
50
|
+
/**
|
|
51
|
+
* Find DOM elements that overlap with a ProseMirror position range.
|
|
52
|
+
*/
|
|
53
|
+
findElementsForRange(from: number, to: number): Element[];
|
|
54
|
+
/**
|
|
55
|
+
* Get bounding rectangles for a range of text, accounting for line wraps.
|
|
56
|
+
* Returns rects relative to the pages container.
|
|
57
|
+
*/
|
|
58
|
+
getRectsForRange(from: number, to: number): Array<{
|
|
59
|
+
x: number;
|
|
60
|
+
y: number;
|
|
61
|
+
width: number;
|
|
62
|
+
height: number;
|
|
63
|
+
}>;
|
|
64
|
+
/** Current zoom level (1 = 100%). */
|
|
65
|
+
zoom: number;
|
|
66
|
+
/**
|
|
67
|
+
* Offset of the pages container from its parent viewport.
|
|
68
|
+
*/
|
|
69
|
+
getContainerOffset(): {
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Props passed to plugin panel components (framework-agnostic base).
|
|
76
|
+
*/
|
|
77
|
+
interface PluginPanelProps<TState = unknown> {
|
|
78
|
+
/** Current ProseMirror editor view */
|
|
79
|
+
editorView: EditorView | null;
|
|
80
|
+
/** Current ProseMirror document */
|
|
81
|
+
doc: Node | null;
|
|
82
|
+
/** Scroll editor to a specific position */
|
|
83
|
+
scrollToPosition: (pos: number) => void;
|
|
84
|
+
/** Select a range in the editor */
|
|
85
|
+
selectRange: (from: number, to: number) => void;
|
|
86
|
+
/** Plugin-specific state (managed by the plugin) */
|
|
87
|
+
pluginState: TState;
|
|
88
|
+
/** Width of the panel in pixels */
|
|
89
|
+
panelWidth: number;
|
|
90
|
+
/**
|
|
91
|
+
* Context for the rendered DOM (LayoutPainter output).
|
|
92
|
+
* May be null if layout hasn't completed yet.
|
|
93
|
+
*/
|
|
94
|
+
renderedDomContext: RenderedDomContext | null;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Configuration for plugin panel rendering.
|
|
98
|
+
*/
|
|
99
|
+
interface PanelConfig {
|
|
100
|
+
/** Where to render the panel */
|
|
101
|
+
position: 'left' | 'right' | 'bottom';
|
|
102
|
+
/** Default width/height of the panel */
|
|
103
|
+
defaultSize: number;
|
|
104
|
+
/** Minimum size */
|
|
105
|
+
minSize?: number;
|
|
106
|
+
/** Maximum size */
|
|
107
|
+
maxSize?: number;
|
|
108
|
+
/** Whether the panel is resizable */
|
|
109
|
+
resizable?: boolean;
|
|
110
|
+
/** Whether the panel can be collapsed */
|
|
111
|
+
collapsible?: boolean;
|
|
112
|
+
/** Initial collapsed state */
|
|
113
|
+
defaultCollapsed?: boolean;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Framework-agnostic core plugin interface.
|
|
117
|
+
*
|
|
118
|
+
* Contains all non-UI plugin capabilities:
|
|
119
|
+
* - ProseMirror plugins (decorations, keymaps, etc.)
|
|
120
|
+
* - State management (initialize, onStateChange, destroy)
|
|
121
|
+
* - CSS injection
|
|
122
|
+
* - Panel configuration
|
|
123
|
+
*
|
|
124
|
+
* Framework adapters (ReactEditorPlugin, VueEditorPlugin) extend this
|
|
125
|
+
* with their own Panel component type and renderOverlay function.
|
|
126
|
+
*/
|
|
127
|
+
interface EditorPluginCore<TState = any> {
|
|
128
|
+
/** Unique plugin identifier */
|
|
129
|
+
id: string;
|
|
130
|
+
/** Display name for the plugin */
|
|
131
|
+
name: string;
|
|
132
|
+
/**
|
|
133
|
+
* ProseMirror plugins to register with the editor.
|
|
134
|
+
* These are merged with the editor's internal plugins.
|
|
135
|
+
*/
|
|
136
|
+
proseMirrorPlugins?: Plugin[];
|
|
137
|
+
/**
|
|
138
|
+
* Configuration for the panel (position, size, etc.)
|
|
139
|
+
*/
|
|
140
|
+
panelConfig?: PanelConfig;
|
|
141
|
+
/**
|
|
142
|
+
* Called when the editor state changes.
|
|
143
|
+
* Use this to update plugin-specific state based on document changes.
|
|
144
|
+
*/
|
|
145
|
+
onStateChange?: (view: EditorView) => TState | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* Initialize plugin state when the plugin is first loaded.
|
|
148
|
+
*/
|
|
149
|
+
initialize?: (view: EditorView | null) => TState;
|
|
150
|
+
/**
|
|
151
|
+
* Called when the plugin is being destroyed.
|
|
152
|
+
* Use this for cleanup (subscriptions, timers, etc.)
|
|
153
|
+
*/
|
|
154
|
+
destroy?: () => void;
|
|
155
|
+
/**
|
|
156
|
+
* CSS styles to inject for this plugin.
|
|
157
|
+
* Can be a string of CSS or a URL to a stylesheet.
|
|
158
|
+
*/
|
|
159
|
+
styles?: string;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* A sidebar item anchored to a document position.
|
|
163
|
+
* Framework adapters extend this with rendering capabilities.
|
|
164
|
+
*/
|
|
165
|
+
interface SidebarItem {
|
|
166
|
+
/** Unique ID for this item (used as React key and for overlap resolution). */
|
|
167
|
+
id: string;
|
|
168
|
+
/** ProseMirror document position this item anchors to. */
|
|
169
|
+
anchorPos: number;
|
|
170
|
+
/** Optional key into the anchorPositions Map (e.g. "comment-42", "revision-7"). */
|
|
171
|
+
anchorKey?: string;
|
|
172
|
+
/** Sort priority within items at the same anchor Y. Lower = first. Default: 0. */
|
|
173
|
+
priority?: number;
|
|
174
|
+
/** Temporary items (e.g. "add comment" input) skip entrance animation. */
|
|
175
|
+
isTemporary?: boolean;
|
|
176
|
+
/** Pre-computed Y position (scroll-container coords, pre-zoom). Overrides anchor resolution. */
|
|
177
|
+
fixedY?: number;
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Context provided to plugins when computing sidebar items.
|
|
181
|
+
*/
|
|
182
|
+
interface SidebarItemContext {
|
|
183
|
+
editorView: EditorView | null;
|
|
184
|
+
renderedDomContext: RenderedDomContext | null;
|
|
185
|
+
/** Pre-computed Y positions from layout engine (keys like "comment-{id}"). */
|
|
186
|
+
anchorPositions: Map<string, number>;
|
|
187
|
+
zoom: number;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export type { EditorPluginCore, PanelConfig, PluginPanelProps, PositionCoordinates, RenderedDomContext, SidebarItem, SidebarItemContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{j as createTemplateProcessor,k as default,g as getMissingVariables,e as getTemplateTags,h as previewTemplate,a as processTemplate,i as processTemplateAdvanced,d as processTemplateAndDownload,c as processTemplateAsBlob,b as processTemplateDetailed,f as validateTemplate}from'./chunk-CGJ6S3AH.mjs';import'./chunk-QYUPLKLP.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkESI4BSBF_js=require('./chunk-ESI4BSBF.js');require('./chunk-DC7S76ZX.js');Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunkESI4BSBF_js.j}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkESI4BSBF_js.k}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunkESI4BSBF_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkESI4BSBF_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunkESI4BSBF_js.i}});Object.defineProperty(exports,"processTemplateAndDownload",{enumerable:true,get:function(){return chunkESI4BSBF_js.d}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkESI4BSBF_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkESI4BSBF_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.f}});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text Formatting Commands — thin re-exports from extension system
|
|
3
|
+
*
|
|
4
|
+
* Toggle marks, set marks, clear formatting, hyperlinks.
|
|
5
|
+
* All implementations live in extensions/marks/; this file re-exports
|
|
6
|
+
* for backward compatibility.
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
import { Command, EditorState } from 'prosemirror-state';
|
|
11
|
+
import { MarkType, Mark } from 'prosemirror-model';
|
|
12
|
+
import { T as TextFormatting } from '../../formatting-D9I-lFS4.mjs';
|
|
13
|
+
import { T as TextColorAttrs } from '../../marks-CCPVlQzL.mjs';
|
|
14
|
+
import '../../colors-C3vA7HUU.mjs';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Shared mark utility functions
|
|
18
|
+
*
|
|
19
|
+
* setMark, removeMark, isMarkActive, getMarkAttr, marksToTextFormatting, textFormattingToMarks, clearFormatting
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Check if a mark is active in the current selection
|
|
24
|
+
*/
|
|
25
|
+
declare function isMarkActive(state: EditorState, markType: MarkType, attrs?: Record<string, unknown>): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Get the current value of a mark attribute
|
|
28
|
+
*/
|
|
29
|
+
declare function getMarkAttr(state: EditorState, markType: MarkType, attr: string): unknown | null;
|
|
30
|
+
/**
|
|
31
|
+
* Clear all text formatting (remove all marks)
|
|
32
|
+
*/
|
|
33
|
+
declare const clearFormatting: Command;
|
|
34
|
+
/**
|
|
35
|
+
* Create a command that sets a mark on the selection
|
|
36
|
+
*/
|
|
37
|
+
declare function createSetMarkCommand(markType: MarkType, attrs?: Record<string, unknown>): Command;
|
|
38
|
+
/**
|
|
39
|
+
* Create a command that removes a mark from the selection
|
|
40
|
+
*/
|
|
41
|
+
declare function createRemoveMarkCommand(markType: MarkType): Command;
|
|
42
|
+
|
|
43
|
+
declare function isHyperlinkActive(state: EditorState): boolean;
|
|
44
|
+
declare function getHyperlinkAttrs(state: EditorState): {
|
|
45
|
+
href: string;
|
|
46
|
+
tooltip?: string;
|
|
47
|
+
} | null;
|
|
48
|
+
declare function getSelectedText(state: EditorState): string;
|
|
49
|
+
/**
|
|
50
|
+
* Resolve the hyperlink mark + contiguous range that surrounds the
|
|
51
|
+
* current cursor. Used by edit/remove popup actions in both adapters.
|
|
52
|
+
*
|
|
53
|
+
* Resolution order for the mark itself:
|
|
54
|
+
* 1. `$from.marks()` — the normal active-marks lookup
|
|
55
|
+
* 2. `$from.nodeAfter`/`nodeBefore` marks — boundary positions don't
|
|
56
|
+
* report active marks via `marks()`
|
|
57
|
+
* 3. (optional) text-node search by `fallbackHref` — last resort when
|
|
58
|
+
* the popup knows the href but the cursor sits at a gap
|
|
59
|
+
*
|
|
60
|
+
* The returned range walks the parent block grouping consecutive text
|
|
61
|
+
* nodes that share the same href, and returns whichever range contains
|
|
62
|
+
* the cursor.
|
|
63
|
+
*/
|
|
64
|
+
declare function findHyperlinkRangeAt(state: EditorState, fallbackHref?: string): {
|
|
65
|
+
mark: Mark;
|
|
66
|
+
start: number;
|
|
67
|
+
end: number;
|
|
68
|
+
} | null;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Text Formatting Commands — thin re-exports from extension system
|
|
72
|
+
*
|
|
73
|
+
* Toggle marks, set marks, clear formatting, hyperlinks.
|
|
74
|
+
* All implementations live in extensions/marks/; this file re-exports
|
|
75
|
+
* for backward compatibility.
|
|
76
|
+
* @packageDocumentation
|
|
77
|
+
* @public
|
|
78
|
+
*/
|
|
79
|
+
|
|
80
|
+
declare function textFormattingToMarks(formatting: TextFormatting): Mark[];
|
|
81
|
+
declare const toggleBold: Command;
|
|
82
|
+
declare const toggleItalic: Command;
|
|
83
|
+
declare const toggleUnderline: Command;
|
|
84
|
+
declare const toggleStrike: Command;
|
|
85
|
+
declare const toggleSuperscript: Command;
|
|
86
|
+
declare const toggleSubscript: Command;
|
|
87
|
+
declare function setTextColor(attrs: TextColorAttrs): Command;
|
|
88
|
+
declare const clearTextColor: Command;
|
|
89
|
+
declare function setHighlight(color: string): Command;
|
|
90
|
+
declare const clearHighlight: Command;
|
|
91
|
+
declare function setFontSize(size: number): Command;
|
|
92
|
+
declare const clearFontSize: Command;
|
|
93
|
+
declare function setFontFamily(fontName: string): Command;
|
|
94
|
+
declare const clearFontFamily: Command;
|
|
95
|
+
declare function setUnderlineStyle(style: string, color?: TextColorAttrs): Command;
|
|
96
|
+
declare function setHyperlink(href: string, tooltip?: string): Command;
|
|
97
|
+
declare const removeHyperlink: Command;
|
|
98
|
+
declare function insertHyperlink(text: string, href: string, tooltip?: string): Command;
|
|
99
|
+
|
|
100
|
+
export { clearFontFamily, clearFontSize, clearFormatting, clearHighlight, clearTextColor, createRemoveMarkCommand, createSetMarkCommand, findHyperlinkRangeAt, getHyperlinkAttrs, getMarkAttr, getSelectedText, insertHyperlink, isHyperlinkActive, isMarkActive, removeHyperlink, setFontFamily, setFontSize, setHighlight, setHyperlink, setTextColor, setUnderlineStyle, textFormattingToMarks, toggleBold, toggleItalic, toggleStrike, toggleSubscript, toggleSuperscript, toggleUnderline };
|