@zeke-02/docx-editor-core 0.1.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 +201 -0
- package/README.md +89 -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 +168 -0
- package/dist/agent/index.d.ts +168 -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-2HFQ4QTU.js +1 -0
- package/dist/chunk-2KHWHVTA.js +1 -0
- package/dist/chunk-2MSZXH6Q.mjs +2 -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-44FHVKSI.js +1 -0
- package/dist/chunk-4BFNWPKW.js +1 -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-56D223FM.mjs +1 -0
- package/dist/chunk-5VBNOHRE.mjs +1 -0
- package/dist/chunk-67LVRQIR.mjs +1 -0
- package/dist/chunk-6LVPRTB6.js +1 -0
- package/dist/chunk-6NQSIC27.mjs +1 -0
- package/dist/chunk-6Y6LON6Y.mjs +1 -0
- package/dist/chunk-6ZXL3EIP.mjs +2 -0
- package/dist/chunk-7AMYZMCX.js +1 -0
- package/dist/chunk-7E5VBRDL.mjs +1 -0
- package/dist/chunk-7HANRHHL.js +1 -0
- package/dist/chunk-7LRR7RKE.mjs +15 -0
- package/dist/chunk-7RDCZLTU.js +1 -0
- package/dist/chunk-7U4I6BKJ.js +1 -0
- package/dist/chunk-7Z2AGPNQ.mjs +10 -0
- package/dist/chunk-AAPBAMD7.js +1 -0
- package/dist/chunk-AGVFAXVQ.mjs +9 -0
- package/dist/chunk-AMENZY5F.mjs +1 -0
- package/dist/chunk-ARHPXIBJ.mjs +1 -0
- package/dist/chunk-BGY3CB37.mjs +1 -0
- package/dist/chunk-BHBOAP6Z.js +3 -0
- package/dist/chunk-BOOHU5EW.mjs +1 -0
- package/dist/chunk-C2BAPYGJ.js +1 -0
- package/dist/chunk-CGJ6S3AH.mjs +1 -0
- package/dist/chunk-CKKO4JWE.mjs +1 -0
- package/dist/chunk-CTHHUJAB.mjs +2 -0
- package/dist/chunk-CUY2THAO.mjs +1 -0
- package/dist/chunk-CXQDYR2Y.js +1 -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-DROCYKAR.js +1 -0
- package/dist/chunk-DV6GWBUJ.js +2 -0
- package/dist/chunk-DZYYLV2O.js +1 -0
- package/dist/chunk-E4JMCA5X.js +2 -0
- package/dist/chunk-ERNVFCGN.js +59 -0
- package/dist/chunk-ESI4BSBF.js +1 -0
- package/dist/chunk-F44ZLDZS.js +4 -0
- package/dist/chunk-FCJWLEKT.mjs +1 -0
- package/dist/chunk-FDEDN2RC.mjs +0 -0
- package/dist/chunk-FRYMBAHP.js +3 -0
- package/dist/chunk-FWTP7BN7.mjs +4 -0
- package/dist/chunk-G3YJ5RKC.mjs +1 -0
- package/dist/chunk-GGPKPXON.js +1 -0
- package/dist/chunk-HKVAW3RE.js +1 -0
- package/dist/chunk-HQPWFUP5.js +2 -0
- package/dist/chunk-I6PMX4BO.js +1 -0
- package/dist/chunk-ILJUDEZ5.mjs +1 -0
- package/dist/chunk-IMKU4O3P.js +1 -0
- package/dist/chunk-IP2VXNWG.js +1 -0
- package/dist/chunk-J4J2Y6EU.js +10 -0
- package/dist/chunk-J7NADDC4.mjs +1 -0
- package/dist/chunk-JFZIXFRC.js +1 -0
- package/dist/chunk-JHZ3HLSR.mjs +1 -0
- package/dist/chunk-JY5EFI4D.js +1 -0
- package/dist/chunk-JZESIPVC.mjs +3 -0
- package/dist/chunk-K7GVLZS6.mjs +1 -0
- package/dist/chunk-KESNGXGO.js +1 -0
- package/dist/chunk-KQTB5Y7P.mjs +1 -0
- package/dist/chunk-L2U3TTAD.js +9 -0
- package/dist/chunk-LBKMYD3M.mjs +1 -0
- package/dist/chunk-LCICADWM.js +2 -0
- package/dist/chunk-LE67NTCN.mjs +1 -0
- package/dist/chunk-LTHT4A4S.js +1 -0
- package/dist/chunk-MCFHOMA2.js +2 -0
- package/dist/chunk-MCX4GVRX.mjs +1 -0
- package/dist/chunk-MJ5FQX7Q.js +1 -0
- package/dist/chunk-MJ6XZFVD.mjs +1 -0
- package/dist/chunk-MNOHUTKE.js +15 -0
- package/dist/chunk-MOKKS75W.mjs +3 -0
- package/dist/chunk-MP4QSEO2.mjs +1 -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-N3Y5BUKV.js +1 -0
- package/dist/chunk-NBLJPT54.mjs +1 -0
- package/dist/chunk-NDDJ67FQ.mjs +1 -0
- package/dist/chunk-NMUHXIF5.js +1 -0
- package/dist/chunk-NXLJVVVE.js +1 -0
- package/dist/chunk-OBMN4VSM.mjs +1 -0
- package/dist/chunk-OCAX2KJQ.js +4 -0
- package/dist/chunk-OEXVWIHW.mjs +2 -0
- package/dist/chunk-OZMNIX6U.mjs +1 -0
- package/dist/chunk-PRRM64JO.mjs +1 -0
- package/dist/chunk-PXE2OWEA.mjs +1 -0
- package/dist/chunk-Q4CKLXWA.js +1 -0
- package/dist/chunk-Q5QOBZWT.mjs +1 -0
- package/dist/chunk-QJJQ53V6.mjs +1 -0
- package/dist/chunk-QLPQVR5W.mjs +1 -0
- package/dist/chunk-QLX4HX3I.mjs +59 -0
- package/dist/chunk-QPFJJPIC.mjs +1 -0
- package/dist/chunk-QYUPLKLP.mjs +1 -0
- package/dist/chunk-RFC2SXZ6.mjs +4 -0
- package/dist/chunk-RNOXNNSD.mjs +0 -0
- package/dist/chunk-RPIQG46O.mjs +1 -0
- package/dist/chunk-RQN4C636.js +1 -0
- package/dist/chunk-SHJBS42Y.js +1 -0
- package/dist/chunk-SORYYVJ7.js +1 -0
- package/dist/chunk-SWC6T7YQ.js +1 -0
- package/dist/chunk-TE2AF7FM.js +1 -0
- package/dist/chunk-TE2VQJZG.js +1 -0
- package/dist/chunk-TUIEV7Q7.js +1 -0
- package/dist/chunk-U4UCHBZ7.js +1 -0
- package/dist/chunk-U74VPTIU.js +1 -0
- package/dist/chunk-UCJGOQ4J.mjs +1 -0
- package/dist/chunk-UQ6WNWXX.js +1 -0
- package/dist/chunk-VHUVPHPI.mjs +1 -0
- package/dist/chunk-VQWZHPWI.mjs +1 -0
- package/dist/chunk-VW22RZ6C.mjs +1 -0
- package/dist/chunk-WLHNIXWC.mjs +2 -0
- package/dist/chunk-WLKRUBY4.js +1 -0
- package/dist/chunk-WTFLNYAT.mjs +1 -0
- package/dist/chunk-XNDGWWDT.js +1 -0
- package/dist/chunk-XXU7YQVV.js +1 -0
- package/dist/chunk-Y74ANBPV.js +1 -0
- package/dist/chunk-YMZ3F2FZ.mjs +1 -0
- package/dist/chunk-YTDWMXNS.js +1 -0
- package/dist/chunk-YUZQTRI2.js +1 -0
- package/dist/chunk-ZX26QZJ5.mjs +1 -0
- package/dist/chunk-ZY7EMTZ3.mjs +1 -0
- package/dist/colorResolver-BZ_yScf4.d.ts +390 -0
- package/dist/colorResolver-C6DtsoFI.d.mts +390 -0
- package/dist/colors-C3vA7HUU.d.mts +70 -0
- package/dist/colors-C3vA7HUU.d.ts +70 -0
- package/dist/content-5Mrz6w_b.d.mts +1360 -0
- package/dist/content-CmqAwdFL.d.ts +1360 -0
- package/dist/core-plugins.d.mts +63 -0
- package/dist/core-plugins.d.ts +63 -0
- package/dist/core-plugins.js +1 -0
- package/dist/core-plugins.mjs +1 -0
- package/dist/core.d.mts +398 -0
- package/dist/core.d.ts +398 -0
- package/dist/core.js +1 -0
- package/dist/core.mjs +1 -0
- package/dist/documentSerializer-BRaaXIHm.d.ts +36 -0
- package/dist/documentSerializer-DgO3A9av.d.mts +36 -0
- package/dist/docx/index.d.mts +1123 -0
- package/dist/docx/index.d.ts +1123 -0
- package/dist/docx/index.js +1 -0
- package/dist/docx/index.mjs +1 -0
- package/dist/docx/parser.d.mts +108 -0
- package/dist/docx/parser.d.ts +108 -0
- package/dist/docx/parser.js +1 -0
- package/dist/docx/parser.mjs +1 -0
- package/dist/docx/rezip.d.mts +312 -0
- package/dist/docx/rezip.d.ts +312 -0
- package/dist/docx/rezip.js +1 -0
- package/dist/docx/rezip.mjs +1 -0
- package/dist/docx/serializer/index.d.mts +125 -0
- package/dist/docx/serializer/index.d.ts +125 -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-8b4X-AIh.d.mts +283 -0
- package/dist/fontLoader-CK2QLq68.d.ts +283 -0
- package/dist/footnotes-lCH_P3N3.d.mts +78 -0
- package/dist/footnotes-skVvEHvZ.d.ts +78 -0
- package/dist/formatting-BH4hcZiq.d.mts +410 -0
- package/dist/formatting-_OXU8gLB.d.ts +410 -0
- package/dist/headerFooterLayout-72Vz7yp3.d.mts +292 -0
- package/dist/headerFooterLayout-Ca4ESDHF.d.ts +292 -0
- package/dist/headless.d.mts +109 -0
- package/dist/headless.d.ts +109 -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 +377 -0
- package/dist/layout-bridge/measuring/index.d.ts +377 -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 +130 -0
- package/dist/layout-bridge/toFlowBlocks.d.ts +130 -0
- package/dist/layout-bridge/toFlowBlocks.js +1 -0
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -0
- package/dist/layout-engine/index.d.mts +352 -0
- package/dist/layout-engine/index.d.ts +352 -0
- package/dist/layout-engine/index.js +1 -0
- package/dist/layout-engine/index.mjs +1 -0
- package/dist/layout-engine/types.d.mts +943 -0
- package/dist/layout-engine/types.d.ts +943 -0
- package/dist/layout-engine/types.js +1 -0
- package/dist/layout-engine/types.mjs +1 -0
- package/dist/layout-painter/index.d.mts +22 -0
- package/dist/layout-painter/index.d.ts +22 -0
- package/dist/layout-painter/index.js +1 -0
- package/dist/layout-painter/index.mjs +1 -0
- package/dist/layout-painter/renderPage.d.mts +680 -0
- package/dist/layout-painter/renderPage.d.ts +680 -0
- package/dist/layout-painter/renderPage.js +1 -0
- package/dist/layout-painter/renderPage.mjs +1 -0
- package/dist/managers/AutoSaveManager.d.mts +95 -0
- package/dist/managers/AutoSaveManager.d.ts +95 -0
- package/dist/managers/AutoSaveManager.js +1 -0
- package/dist/managers/AutoSaveManager.mjs +1 -0
- package/dist/managers/TableSelectionManager.d.mts +94 -0
- package/dist/managers/TableSelectionManager.d.ts +94 -0
- package/dist/managers/TableSelectionManager.js +1 -0
- package/dist/managers/TableSelectionManager.mjs +1 -0
- package/dist/managers/types.d.mts +121 -0
- package/dist/managers/types.d.ts +121 -0
- package/dist/managers/types.js +1 -0
- package/dist/managers/types.mjs +0 -0
- package/dist/marks-BY573yZn.d.mts +56 -0
- package/dist/marks-CjC9tF5k.d.ts +56 -0
- package/dist/mcp-cli.mjs +138 -0
- package/dist/mcp.d.mts +183 -0
- package/dist/mcp.d.ts +183 -0
- package/dist/mcp.js +16 -0
- package/dist/mcp.mjs +16 -0
- package/dist/nodes-7753Bgi_.d.mts +320 -0
- package/dist/nodes-CC_nwkT_.d.ts +320 -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 +188 -0
- package/dist/prosemirror/commands/index.d.ts +188 -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 +65 -0
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +65 -0
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -0
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -0
- package/dist/prosemirror/conversion/index.d.mts +85 -0
- package/dist/prosemirror/conversion/index.d.ts +85 -0
- package/dist/prosemirror/conversion/index.js +1 -0
- package/dist/prosemirror/conversion/index.mjs +1 -0
- package/dist/prosemirror/editor.css +823 -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 +70 -0
- package/dist/prosemirror/index.d.ts +70 -0
- package/dist/prosemirror/index.js +1 -0
- package/dist/prosemirror/index.mjs +1 -0
- package/dist/prosemirror/plugins/index.d.mts +154 -0
- package/dist/prosemirror/plugins/index.d.ts +154 -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 +29 -0
- package/dist/prosemirror/schema/index.d.ts +29 -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 +85 -0
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +85 -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-BPAqgNgk.d.ts +570 -0
- package/dist/selectionContext-CoZat7QZ.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-BBv7doYK.d.ts +233 -0
- package/dist/styles-EI2lxeEN.d.mts +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 +18 -0
- package/dist/types/content.d.ts +18 -0
- package/dist/types/content.js +1 -0
- package/dist/types/content.mjs +0 -0
- package/dist/types/document.d.mts +123 -0
- package/dist/types/document.d.ts +123 -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 +121 -0
- package/dist/utils/comments.d.ts +121 -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 +710 -0
- package/dist/utils/index.d.ts +710 -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-DF3-nxUC.d.mts +115 -0
- package/dist/variableDetector-sBkgVh3f.d.ts +115 -0
- package/package.json +565 -0
|
@@ -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-BH4hcZiq.mjs';
|
|
13
|
+
import { T as TextColorAttrs } from '../../marks-BY573yZn.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 };
|
|
@@ -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-_OXU8gLB.js';
|
|
13
|
+
import { T as TextColorAttrs } from '../../marks-CjC9tF5k.js';
|
|
14
|
+
import '../../colors-C3vA7HUU.js';
|
|
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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkDZYYLV2O_js=require('../../chunk-DZYYLV2O.js');require('../../chunk-SHJBS42Y.js');var chunkMCFHOMA2_js=require('../../chunk-MCFHOMA2.js');require('../../chunk-BHBOAP6Z.js'),require('../../chunk-MZ7LW5CH.js'),require('../../chunk-N3Y5BUKV.js');var chunkYTDWMXNS_js=require('../../chunk-YTDWMXNS.js');require('../../chunk-6LVPRTB6.js'),require('../../chunk-TUIEV7Q7.js'),require('../../chunk-7HANRHHL.js'),require('../../chunk-MJ5FQX7Q.js'),require('../../chunk-C2BAPYGJ.js'),require('../../chunk-4Q2IP5FW.js'),require('../../chunk-Q4CKLXWA.js'),require('../../chunk-DC7S76ZX.js');Object.defineProperty(exports,"clearFontFamily",{enumerable:true,get:function(){return chunkDZYYLV2O_js.o}});Object.defineProperty(exports,"clearFontSize",{enumerable:true,get:function(){return chunkDZYYLV2O_js.m}});Object.defineProperty(exports,"clearHighlight",{enumerable:true,get:function(){return chunkDZYYLV2O_js.k}});Object.defineProperty(exports,"clearTextColor",{enumerable:true,get:function(){return chunkDZYYLV2O_js.i}});Object.defineProperty(exports,"insertHyperlink",{enumerable:true,get:function(){return chunkDZYYLV2O_js.s}});Object.defineProperty(exports,"removeHyperlink",{enumerable:true,get:function(){return chunkDZYYLV2O_js.r}});Object.defineProperty(exports,"setFontFamily",{enumerable:true,get:function(){return chunkDZYYLV2O_js.n}});Object.defineProperty(exports,"setFontSize",{enumerable:true,get:function(){return chunkDZYYLV2O_js.l}});Object.defineProperty(exports,"setHighlight",{enumerable:true,get:function(){return chunkDZYYLV2O_js.j}});Object.defineProperty(exports,"setHyperlink",{enumerable:true,get:function(){return chunkDZYYLV2O_js.q}});Object.defineProperty(exports,"setTextColor",{enumerable:true,get:function(){return chunkDZYYLV2O_js.h}});Object.defineProperty(exports,"setUnderlineStyle",{enumerable:true,get:function(){return chunkDZYYLV2O_js.p}});Object.defineProperty(exports,"textFormattingToMarks",{enumerable:true,get:function(){return chunkDZYYLV2O_js.a}});Object.defineProperty(exports,"toggleBold",{enumerable:true,get:function(){return chunkDZYYLV2O_js.b}});Object.defineProperty(exports,"toggleItalic",{enumerable:true,get:function(){return chunkDZYYLV2O_js.c}});Object.defineProperty(exports,"toggleStrike",{enumerable:true,get:function(){return chunkDZYYLV2O_js.e}});Object.defineProperty(exports,"toggleSubscript",{enumerable:true,get:function(){return chunkDZYYLV2O_js.g}});Object.defineProperty(exports,"toggleSuperscript",{enumerable:true,get:function(){return chunkDZYYLV2O_js.f}});Object.defineProperty(exports,"toggleUnderline",{enumerable:true,get:function(){return chunkDZYYLV2O_js.d}});Object.defineProperty(exports,"findHyperlinkRangeAt",{enumerable:true,get:function(){return chunkMCFHOMA2_js.h}});Object.defineProperty(exports,"getHyperlinkAttrs",{enumerable:true,get:function(){return chunkMCFHOMA2_js.f}});Object.defineProperty(exports,"getSelectedText",{enumerable:true,get:function(){return chunkMCFHOMA2_js.g}});Object.defineProperty(exports,"isHyperlinkActive",{enumerable:true,get:function(){return chunkMCFHOMA2_js.e}});Object.defineProperty(exports,"clearFormatting",{enumerable:true,get:function(){return chunkYTDWMXNS_js.f}});Object.defineProperty(exports,"createRemoveMarkCommand",{enumerable:true,get:function(){return chunkYTDWMXNS_js.h}});Object.defineProperty(exports,"createSetMarkCommand",{enumerable:true,get:function(){return chunkYTDWMXNS_js.g}});Object.defineProperty(exports,"getMarkAttr",{enumerable:true,get:function(){return chunkYTDWMXNS_js.d}});Object.defineProperty(exports,"isMarkActive",{enumerable:true,get:function(){return chunkYTDWMXNS_js.c}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{o as clearFontFamily,m as clearFontSize,k as clearHighlight,i as clearTextColor,s as insertHyperlink,r as removeHyperlink,n as setFontFamily,l as setFontSize,j as setHighlight,q as setHyperlink,h as setTextColor,p as setUnderlineStyle,a as textFormattingToMarks,b as toggleBold,c as toggleItalic,e as toggleStrike,g as toggleSubscript,f as toggleSuperscript,d as toggleUnderline}from'../../chunk-QJJQ53V6.mjs';import'../../chunk-J7NADDC4.mjs';export{h as findHyperlinkRangeAt,f as getHyperlinkAttrs,g as getSelectedText,e as isHyperlinkActive}from'../../chunk-2MSZXH6Q.mjs';import'../../chunk-MOKKS75W.mjs';import'../../chunk-OZMNIX6U.mjs';import'../../chunk-AMENZY5F.mjs';export{f as clearFormatting,h as createRemoveMarkCommand,g as createSetMarkCommand,d as getMarkAttr,c as isMarkActive}from'../../chunk-VHUVPHPI.mjs';import'../../chunk-BGY3CB37.mjs';import'../../chunk-ZX26QZJ5.mjs';import'../../chunk-MJ6XZFVD.mjs';import'../../chunk-67LVRQIR.mjs';import'../../chunk-LE67NTCN.mjs';import'../../chunk-VW22RZ6C.mjs';import'../../chunk-VQWZHPWI.mjs';import'../../chunk-QYUPLKLP.mjs';
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProseMirror Commands
|
|
3
|
+
*
|
|
4
|
+
* Commands for formatting text and paragraphs.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export { clearFontFamily, clearFontSize, clearFormatting, clearHighlight, clearTextColor, createRemoveMarkCommand, createSetMarkCommand, findHyperlinkRangeAt, getHyperlinkAttrs, getMarkAttr, getSelectedText, insertHyperlink, isHyperlinkActive, isMarkActive, removeHyperlink, setFontFamily, setFontSize, setHighlight, setHyperlink, setTextColor, setUnderlineStyle, toggleBold, toggleItalic, toggleStrike, toggleSubscript, toggleSuperscript, toggleUnderline } from './formatting.mjs';
|
|
9
|
+
export { ResolvedStyleAttrs, addTabStop, alignCenter, alignJustify, alignLeft, alignRight, applyStyle, clearStyle, decreaseIndent, decreaseListLevel, doubleSpacing, generateTOC, getListInfo, getParagraphAlignment, getParagraphBidi, getStyleId, increaseIndent, increaseListLevel, isInList, oneAndHalfSpacing, removeList, removeTabStop, setAlignment, setIndentFirstLine, setIndentLeft, setIndentRight, setLineSpacing, setLtr, setRtl, setSpaceAfter, setSpaceBefore, singleSpacing, toggleBulletList, toggleNumberedList } from './paragraph.mjs';
|
|
10
|
+
export { a as addColumnLeft, b as addColumnRight, c as addRowAbove, d as addRowBelow, e as applyTableStyle, f as autoFitContents, g as deleteColumn, h as deleteRow, i as deleteTable, j as distributeColumns, k as insertTable, m as mergeCells, r as removeTableBorders, s as selectColumn, l as selectRow, n as selectTable, o as setAllTableBorders, p as setCellBorder, q as setCellFillColor, t as setCellMargins, u as setCellTextDirection, v as setCellVerticalAlign, w as setInsideTableBorders, x as setOutsideTableBorders, y as setRowHeight, z as setTableBorderColor, A as setTableBorderWidth, B as setTableBorders, C as setTableProperties, D as splitCell, E as toggleHeaderRow, F as toggleNoWrap } from '../../table-_t_W8oQf.mjs';
|
|
11
|
+
export { insertPageBreak } from './pageBreak.mjs';
|
|
12
|
+
import { EditorState, Transaction, Command } from 'prosemirror-state';
|
|
13
|
+
import { Node } from 'prosemirror-model';
|
|
14
|
+
import { I as ImageLayoutTarget, S as SetImageWrapTypeOptions } from '../../ImageExtension-BN327PNe.mjs';
|
|
15
|
+
export { A as AnchorWrapType } from '../../ImageExtension-BN327PNe.mjs';
|
|
16
|
+
export { B as BorderPreset, T as TableContextInfo, g as getTableContext, i as isInTable } from '../../borders-BH_GoYU3.mjs';
|
|
17
|
+
import '../../formatting-BH4hcZiq.mjs';
|
|
18
|
+
import '../../colors-C3vA7HUU.mjs';
|
|
19
|
+
import '../../marks-BY573yZn.mjs';
|
|
20
|
+
import '../../docx/wrapTypes.mjs';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* ProseMirror table cell splitting — dialog-backed split with explicit
|
|
24
|
+
* row/column input.
|
|
25
|
+
*
|
|
26
|
+
* Uses the shared split algorithm from utils/tableSplitAlgorithm.ts for the
|
|
27
|
+
* core layout computation, then maps the result back into ProseMirror
|
|
28
|
+
* transactions.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
interface SplitCellDialogConfig {
|
|
32
|
+
minRows: number;
|
|
33
|
+
minCols: number;
|
|
34
|
+
initialRows: number;
|
|
35
|
+
initialCols: number;
|
|
36
|
+
/** Captured row index of the target cell at dialog-open time */
|
|
37
|
+
capturedCellRow: number;
|
|
38
|
+
/** Captured column index of the target cell at dialog-open time */
|
|
39
|
+
capturedCellCol: number;
|
|
40
|
+
}
|
|
41
|
+
declare function getSplitCellDialogConfig(state: EditorState): SplitCellDialogConfig | null;
|
|
42
|
+
declare function splitActiveTableCell(state: EditorState, dispatch: ((tr: Transaction) => void) | undefined, rows: number, cols: number,
|
|
43
|
+
/** Target cell row/col captured at dialog-open time. Falls back to current cursor. */
|
|
44
|
+
targetRow?: number, targetCol?: number): boolean;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Image commands — thin re-exports from the extension system.
|
|
48
|
+
*
|
|
49
|
+
* Wrap-type transitions for floating images. Inline↔anchor conversions are
|
|
50
|
+
* structural and live in a follow-up; this surface only covers anchor↔anchor.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Insert an image node at `pos`, wrapping with the `insertion` mark when
|
|
55
|
+
* suggesting mode is active. Centralizes the tracked-image-insert flow
|
|
56
|
+
* so React `useFileIO`, Vue `useImageActions`, and clipboard-paste
|
|
57
|
+
* paths all share one source of truth — adding a fresh image in
|
|
58
|
+
* suggesting mode always round-trips as `<w:ins>{run with drawing}</w:ins>`.
|
|
59
|
+
*
|
|
60
|
+
* Caller responsibility: produce the `image` node via `schema.nodes.image.create`.
|
|
61
|
+
* This helper handles the dispatch + optional mark application.
|
|
62
|
+
*
|
|
63
|
+
* @public
|
|
64
|
+
*/
|
|
65
|
+
declare function insertImageNode(state: EditorState, dispatch: ((tr: Transaction) => void) | undefined, imageNode: Node, pos: number): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Change a floating image's wrap layout. `pos` is the PM document position of
|
|
68
|
+
* the image node; `target` is either an OOXML wrap type (square / tight /
|
|
69
|
+
* topAndBottom / behind / inFront / inline) or a directional convenience
|
|
70
|
+
* choice (`squareLeft` / `squareRight`).
|
|
71
|
+
*
|
|
72
|
+
* `opts.initialPositionEmu` is used when promoting an inline image to an
|
|
73
|
+
* anchor — the caller measures the image's current rendered offset relative
|
|
74
|
+
* to the column origin in EMUs and passes it through, so the new float lands
|
|
75
|
+
* exactly where the inline glyph used to sit (matches Word's behavior).
|
|
76
|
+
*/
|
|
77
|
+
declare function setImageWrapType(pos: number, target: ImageLayoutTarget, opts?: SetImageWrapTypeOptions): Command;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Comment and Track Changes Commands
|
|
81
|
+
*
|
|
82
|
+
* PM commands for adding/removing comments and accepting/rejecting tracked changes.
|
|
83
|
+
*/
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Add a comment mark to the current selection.
|
|
87
|
+
*/
|
|
88
|
+
declare function addCommentMark(commentId: number): Command;
|
|
89
|
+
/**
|
|
90
|
+
* Remove a comment mark by ID from the entire document.
|
|
91
|
+
*/
|
|
92
|
+
declare function removeCommentMark(commentId: number): Command;
|
|
93
|
+
/**
|
|
94
|
+
* Accept a tracked change at the given range.
|
|
95
|
+
* - Insertion: remove mark, keep text
|
|
96
|
+
* - Deletion: remove mark AND text
|
|
97
|
+
*
|
|
98
|
+
* Use {@link acceptChangeById} when accepting a coalesced revision —
|
|
99
|
+
* a single editing session can scatter sites across multiple paragraphs
|
|
100
|
+
* and only the by-id resolver walks every site.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { acceptChange } from '@zeke-02/docx-editor-core/prosemirror/commands';
|
|
105
|
+
* acceptChange(from, to)(view.state, view.dispatch);
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
declare function acceptChange(from: number, to: number): Command;
|
|
109
|
+
/**
|
|
110
|
+
* Reject a tracked change at the given range.
|
|
111
|
+
* - Insertion: remove mark AND text
|
|
112
|
+
* - Deletion: remove mark, keep text
|
|
113
|
+
*
|
|
114
|
+
* Use {@link rejectChangeById} when rejecting a coalesced revision.
|
|
115
|
+
*/
|
|
116
|
+
declare function rejectChange(from: number, to: number): Command;
|
|
117
|
+
/**
|
|
118
|
+
* Accept every tracked change in the document — inline marks plus
|
|
119
|
+
* structural revisions (paragraph-mark, row, cell, property changes).
|
|
120
|
+
*
|
|
121
|
+
* Dispatches one transaction per distinct `revisionId` so each revision
|
|
122
|
+
* remains individually undoable. The acceptance order follows document
|
|
123
|
+
* order; later transactions read fresh state and skip ids whose sites
|
|
124
|
+
* were already removed.
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* ```ts
|
|
128
|
+
* import { acceptAllChanges } from '@zeke-02/docx-editor-core/prosemirror/commands';
|
|
129
|
+
* acceptAllChanges()(view.state, view.dispatch);
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
declare function acceptAllChanges(): Command;
|
|
133
|
+
/**
|
|
134
|
+
* Reject all tracked changes in the document — inverse of `acceptAllChanges`.
|
|
135
|
+
*/
|
|
136
|
+
declare function rejectAllChanges(): Command;
|
|
137
|
+
interface ChangeRange {
|
|
138
|
+
from: number;
|
|
139
|
+
to: number;
|
|
140
|
+
type: 'insertion' | 'deletion';
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Find the next tracked-change range (inline insertion / deletion mark)
|
|
144
|
+
* after `startPos`. Wraps to the document start when no later change is
|
|
145
|
+
* found. Useful for "next change" / "previous change" toolbar buttons.
|
|
146
|
+
*
|
|
147
|
+
* Only walks inline marks — structural revisions (pPrIns / pPrDel / row
|
|
148
|
+
* / cell) are not surfaced here. Use {@link extractTrackedChanges} for a
|
|
149
|
+
* complete revision list.
|
|
150
|
+
*/
|
|
151
|
+
declare function findNextChange(state: EditorState, startPos: number): ChangeRange | null;
|
|
152
|
+
/**
|
|
153
|
+
* Accept every site of a tracked revision in one PM transaction. Walks
|
|
154
|
+
* the doc for all sites carrying `revisionId` — inline insertion/
|
|
155
|
+
* deletion marks, paragraph-mark `pPrIns` / `pPrDel`, paragraph
|
|
156
|
+
* property changes, table row / cell / table revisions — and applies
|
|
157
|
+
* the accept semantics each requires.
|
|
158
|
+
*
|
|
159
|
+
* This is the right command for any coalesced revision (Enter chains,
|
|
160
|
+
* replace pairs, multi-paragraph runs) because one editing session can
|
|
161
|
+
* scatter sites across the doc; the range-based {@link acceptChange}
|
|
162
|
+
* only clears sites within its `(from, to)`.
|
|
163
|
+
*
|
|
164
|
+
* Returns `false` (no-op) if the id is not present.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* ```ts
|
|
168
|
+
* import { acceptChangeById } from '@zeke-02/docx-editor-core/prosemirror/commands';
|
|
169
|
+
* acceptChangeById(revisionId)(view.state, view.dispatch);
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
declare function acceptChangeById(revisionId: number): Command;
|
|
173
|
+
/**
|
|
174
|
+
* Reject every site of a tracked revision in one PM transaction.
|
|
175
|
+
* Inverse of {@link acceptChangeById} — inserts are removed, deletions
|
|
176
|
+
* keep their text, paragraph-mark insertions join paragraphs back,
|
|
177
|
+
* paragraph-mark deletions stay split, paragraph property changes
|
|
178
|
+
* restore prior values, and tracked row insertions are removed.
|
|
179
|
+
*/
|
|
180
|
+
declare function rejectChangeById(revisionId: number): Command;
|
|
181
|
+
/**
|
|
182
|
+
* Find the previous tracked-change range (inline insertion / deletion
|
|
183
|
+
* mark) before `startPos`. Wraps to the document end when no earlier
|
|
184
|
+
* change is found. Counterpart to {@link findNextChange}.
|
|
185
|
+
*/
|
|
186
|
+
declare function findPreviousChange(state: EditorState, startPos: number): ChangeRange | null;
|
|
187
|
+
|
|
188
|
+
export { ImageLayoutTarget, SetImageWrapTypeOptions, type SplitCellDialogConfig, acceptAllChanges, acceptChange, acceptChangeById, addCommentMark, findNextChange, findPreviousChange, getSplitCellDialogConfig, insertImageNode, rejectAllChanges, rejectChange, rejectChangeById, removeCommentMark, setImageWrapType, splitActiveTableCell };
|