@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,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-agnostic comment + tracked-change helpers shared by the
|
|
3
|
+
* React and Vue adapters. The data shapes and string-formatting rules
|
|
4
|
+
* here are part of the visible UI (avatar colors, date strings) so
|
|
5
|
+
* keep this file as the single source of truth — both adapters import
|
|
6
|
+
* from here. CSS-property factories live in adapter-specific files
|
|
7
|
+
* (sidebar/cardUtils.ts in React, sidebar/sidebarUtils.ts in Vue).
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
import { P as Paragraph } from '../content-CmqAwdFL.js';
|
|
12
|
+
import '../formatting-_OXU8gLB.js';
|
|
13
|
+
import '../colors-C3vA7HUU.js';
|
|
14
|
+
import '../docx/wrapTypes.js';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Framework-agnostic comment + tracked-change helpers shared by the
|
|
18
|
+
* React and Vue adapters. The data shapes and string-formatting rules
|
|
19
|
+
* here are part of the visible UI (avatar colors, date strings) so
|
|
20
|
+
* keep this file as the single source of truth — both adapters import
|
|
21
|
+
* from here. CSS-property factories live in adapter-specific files
|
|
22
|
+
* (sidebar/cardUtils.ts in React, sidebar/sidebarUtils.ts in Vue).
|
|
23
|
+
* @packageDocumentation
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/** Extract plain text from a Comment's paragraph content. */
|
|
28
|
+
declare function getCommentText(paragraphs?: Paragraph[]): string;
|
|
29
|
+
declare function formatDate(dateStr?: string): string;
|
|
30
|
+
declare function getInitials(name: string): string;
|
|
31
|
+
declare function getAvatarColor(name: string): string;
|
|
32
|
+
declare function truncateText(text: string, maxLength?: number): string;
|
|
33
|
+
/**
|
|
34
|
+
* One tracked change surfaced by `extractTrackedChanges`. Each entry
|
|
35
|
+
* groups all sites of one revision into a single row that the sidebar
|
|
36
|
+
* renders as one card. Resolve via {@link acceptChangeById} /
|
|
37
|
+
* {@link rejectChangeById} for any type — the by-id resolver walks
|
|
38
|
+
* every site sharing the id so coalesced edits clear in one click.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
42
|
+
interface TrackedChangeEntry {
|
|
43
|
+
/**
|
|
44
|
+
* Revision shape. Inline shapes (`insertion`, `deletion`, `replacement`)
|
|
45
|
+
* wrap text runs; the rest are structural revisions on node attrs.
|
|
46
|
+
*
|
|
47
|
+
* - `insertion` — text was added (`<w:ins>`).
|
|
48
|
+
* - `deletion` — text was struck through but not removed (`<w:del>`).
|
|
49
|
+
* - `replacement` — a deletion + insertion by the same author at the
|
|
50
|
+
* same position+time; sidebar shows one combined card. `deletedText`
|
|
51
|
+
* and `insertionRevisionId` are set on this variant.
|
|
52
|
+
* - `paragraphMarkInsertion` / `paragraphMarkDeletion` — Enter /
|
|
53
|
+
* Backspace produced a tracked paragraph break (`<w:pPr><w:rPr><w:ins/>` /
|
|
54
|
+
* `<w:del/>`).
|
|
55
|
+
* - `paragraphPropertiesChanged` — formatting (alignment, spacing,
|
|
56
|
+
* etc.) on the paragraph was changed (`<w:pPrChange>`).
|
|
57
|
+
* - `rowInserted` / `rowDeleted` / `rowPropertiesChanged` — table
|
|
58
|
+
* row authored / removed / formatted (`<w:trPr><w:ins/>` / `<w:del/>`
|
|
59
|
+
* / `<w:trPrChange>`).
|
|
60
|
+
* - `cellInserted` / `cellDeleted` / `cellMerged` /
|
|
61
|
+
* `cellPropertiesChanged` — per-cell revisions
|
|
62
|
+
* (`<w:cellIns>` / `<w:cellDel>` / `<w:cellMerge>` / `<w:tcPrChange>`).
|
|
63
|
+
* - `tablePropertiesChanged` — table-level formatting
|
|
64
|
+
* (`<w:tblPrChange>`).
|
|
65
|
+
*/
|
|
66
|
+
type: 'insertion' | 'deletion' | 'replacement' | 'paragraphMarkInsertion' | 'paragraphMarkDeletion' | 'paragraphPropertiesChanged' | 'rowInserted' | 'rowDeleted' | 'rowPropertiesChanged' | 'cellInserted' | 'cellDeleted' | 'cellMerged' | 'cellPropertiesChanged' | 'tableInserted' | 'tableDeleted' | 'tablePropertiesChanged';
|
|
67
|
+
/**
|
|
68
|
+
* Affected text. For inline types this is the run's text; for
|
|
69
|
+
* structural types it's the surrounding paragraph / cell content
|
|
70
|
+
* (truncated by the sidebar before display).
|
|
71
|
+
*/
|
|
72
|
+
text: string;
|
|
73
|
+
/**
|
|
74
|
+
* Only set when `type === 'replacement'` — the text the user removed.
|
|
75
|
+
* The inserted text lives in {@link TrackedChangeEntry.text}.
|
|
76
|
+
*/
|
|
77
|
+
deletedText?: string;
|
|
78
|
+
/** Author that minted the revision (`w:author`). */
|
|
79
|
+
author: string;
|
|
80
|
+
/** ISO timestamp the revision was minted (`w:date`). May be undefined for legacy imports. */
|
|
81
|
+
date?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Document position where the revision starts. For inline types this
|
|
84
|
+
* is the start of the marked text run; for structural types it's the
|
|
85
|
+
* containing paragraph / row / cell / table node's start position.
|
|
86
|
+
* Used by the sidebar to anchor the card at the correct vertical
|
|
87
|
+
* offset.
|
|
88
|
+
*/
|
|
89
|
+
from: number;
|
|
90
|
+
/**
|
|
91
|
+
* Document position where the revision ends. For inline coalesced
|
|
92
|
+
* runs that span multiple paragraphs, this is the END position of the
|
|
93
|
+
* LAST run in the group; the intervening structural positions are not
|
|
94
|
+
* preserved.
|
|
95
|
+
*/
|
|
96
|
+
to: number;
|
|
97
|
+
/**
|
|
98
|
+
* The `w:id` of the revision. Pass to
|
|
99
|
+
* {@link acceptChangeById} / {@link rejectChangeById} to resolve every
|
|
100
|
+
* site sharing this id — including pPrIns paragraph attrs and
|
|
101
|
+
* subsequent typed runs in the same editing session.
|
|
102
|
+
*/
|
|
103
|
+
revisionId: number;
|
|
104
|
+
/**
|
|
105
|
+
* Only set when `type === 'replacement'` — the insertion half carries
|
|
106
|
+
* a DIFFERENT `w:id` from the deletion (sharing would trip the OOXML
|
|
107
|
+
* move-pair serializer). Card Accept handlers dispatch BOTH ids to
|
|
108
|
+
* clear the deletion and the insertion + any coalesced paragraph-marks.
|
|
109
|
+
*/
|
|
110
|
+
insertionRevisionId?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Extra `w:id`s that map to the same logical revision as this card.
|
|
113
|
+
* Populated when the extractor coalesces a burst of distinct ids by
|
|
114
|
+
* (author, date) — e.g. a foreign document where the source editor
|
|
115
|
+
* minted a fresh id per atomic edit. Accept/reject handlers must
|
|
116
|
+
* resolve every id in this list in addition to {@link revisionId}.
|
|
117
|
+
*/
|
|
118
|
+
coalescedRevisionIds?: number[];
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export { type TrackedChangeEntry, formatDate, getAvatarColor, getCommentText, getInitials, truncateText };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');function i(e){return e?.length?e.flatMap(r=>r.content.filter(t=>t.type==="run").flatMap(t=>"content"in t?t.content:[]).filter(t=>t.type==="text").map(t=>"text"in t?t.text:"")).join(""):""}function o(e){return e?new Date(e).toLocaleString(void 0,{hour:"numeric",minute:"2-digit",month:"short",day:"numeric"}):""}function a(e){return e.split(/\s+/).map(r=>r[0]).join("").toUpperCase().slice(0,2)}var n=["#6DCCB1","#79AAD9","#EE789D","#A987D1","#E6A85F","#F2CC8F","#68B3A2","#B07AA1","#59A14F","#FF9DA7","#E15759","#76B7B2"];function s(e){let r=0;for(let t=0;t<e.length;t++)r=e.charCodeAt(t)+((r<<5)-r);return n[Math.abs(r)%n.length]}function l(e,r=50){return e.length>r?e.slice(0,r)+"...":e}exports.formatDate=o;exports.getAvatarColor=s;exports.getCommentText=i;exports.getInitials=a;exports.truncateText=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import'../chunk-QYUPLKLP.mjs';function i(e){return e?.length?e.flatMap(r=>r.content.filter(t=>t.type==="run").flatMap(t=>"content"in t?t.content:[]).filter(t=>t.type==="text").map(t=>"text"in t?t.text:"")).join(""):""}function o(e){return e?new Date(e).toLocaleString(void 0,{hour:"numeric",minute:"2-digit",month:"short",day:"numeric"}):""}function a(e){return e.split(/\s+/).map(r=>r[0]).join("").toUpperCase().slice(0,2)}var n=["#6DCCB1","#79AAD9","#EE789D","#A987D1","#E6A85F","#F2CC8F","#68B3A2","#B07AA1","#59A14F","#FF9DA7","#E15759","#76B7B2"];function s(e){let r=0;for(let t=0;t<e.length;t++)r=e.charCodeAt(t)+((r<<5)-r);return n[Math.abs(r)%n.length]}function l(e,r=50){return e.length>r?e.slice(0,r)+"...":e}export{o as formatDate,s as getAvatarColor,i as getCommentText,a as getInitials,l as truncateText};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find & Replace Utility Functions
|
|
3
|
+
*
|
|
4
|
+
* Pure utility functions for text search, pattern matching, and
|
|
5
|
+
* document search. Lifted from packages/react/src/components/dialogs/
|
|
6
|
+
* findReplaceUtils.ts so the React adapter and the Vue adapter share
|
|
7
|
+
* one implementation.
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* A single match result in the document
|
|
13
|
+
*/
|
|
14
|
+
interface FindMatch {
|
|
15
|
+
/** Index of the paragraph containing the match */
|
|
16
|
+
paragraphIndex: number;
|
|
17
|
+
/** Index of the run/content within the paragraph */
|
|
18
|
+
contentIndex: number;
|
|
19
|
+
/** Character offset within the content */
|
|
20
|
+
startOffset: number;
|
|
21
|
+
/** Character offset for end of match */
|
|
22
|
+
endOffset: number;
|
|
23
|
+
/** The matched text */
|
|
24
|
+
text: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Find options for controlling search behavior
|
|
28
|
+
*/
|
|
29
|
+
interface FindOptions {
|
|
30
|
+
/** Whether to match case */
|
|
31
|
+
matchCase: boolean;
|
|
32
|
+
/** Whether to match whole words only */
|
|
33
|
+
matchWholeWord: boolean;
|
|
34
|
+
/** Whether to use regular expressions (future) */
|
|
35
|
+
useRegex?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Find result with all matches
|
|
39
|
+
*/
|
|
40
|
+
interface FindResult {
|
|
41
|
+
/** All matches found */
|
|
42
|
+
matches: FindMatch[];
|
|
43
|
+
/** Total match count */
|
|
44
|
+
totalCount: number;
|
|
45
|
+
/** Current match index (0-based) */
|
|
46
|
+
currentIndex: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Highlight options for document rendering
|
|
50
|
+
*/
|
|
51
|
+
interface HighlightOptions {
|
|
52
|
+
/** Background color for current match */
|
|
53
|
+
currentMatchColor: string;
|
|
54
|
+
/** Background color for other matches */
|
|
55
|
+
otherMatchColor: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Create default find options
|
|
59
|
+
*/
|
|
60
|
+
declare function createDefaultFindOptions(): FindOptions;
|
|
61
|
+
/**
|
|
62
|
+
* Escape string for use in regex pattern
|
|
63
|
+
*/
|
|
64
|
+
declare function escapeRegexString(str: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* Create a regex pattern from search text and options
|
|
67
|
+
*/
|
|
68
|
+
declare function createSearchPattern(searchText: string, options: FindOptions): RegExp | null;
|
|
69
|
+
/**
|
|
70
|
+
* Find all matches of search text in content
|
|
71
|
+
*/
|
|
72
|
+
declare function findAllMatches(content: string, searchText: string, options: FindOptions): Array<{
|
|
73
|
+
start: number;
|
|
74
|
+
end: number;
|
|
75
|
+
}>;
|
|
76
|
+
/**
|
|
77
|
+
* Replace text in content
|
|
78
|
+
*/
|
|
79
|
+
declare function replaceAllInContent(content: string, searchText: string, replaceText: string, options: FindOptions): string;
|
|
80
|
+
/**
|
|
81
|
+
* Replace first match in content
|
|
82
|
+
*/
|
|
83
|
+
declare function replaceFirstInContent(content: string, searchText: string, replaceText: string, options: FindOptions, startIndex?: number): {
|
|
84
|
+
content: string;
|
|
85
|
+
replaced: boolean;
|
|
86
|
+
matchStart: number;
|
|
87
|
+
matchEnd: number;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Get match count for status display
|
|
91
|
+
*/
|
|
92
|
+
declare function getMatchCountText(result: FindResult | null): string;
|
|
93
|
+
/**
|
|
94
|
+
* Check if search text is empty or whitespace-only
|
|
95
|
+
*/
|
|
96
|
+
declare function isEmptySearch(searchText: string): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Get default highlight options
|
|
99
|
+
*/
|
|
100
|
+
declare function getDefaultHighlightOptions(): HighlightOptions;
|
|
101
|
+
/**
|
|
102
|
+
* Find all matches in a document
|
|
103
|
+
*/
|
|
104
|
+
declare function findInDocument(document: any, searchText: string, options: FindOptions): FindMatch[];
|
|
105
|
+
/**
|
|
106
|
+
* Find matches in a single paragraph
|
|
107
|
+
*/
|
|
108
|
+
declare function findInParagraph(paragraph: any, searchText: string, options: FindOptions, paragraphIndex: number): FindMatch[];
|
|
109
|
+
/**
|
|
110
|
+
* Scroll to a match in the document
|
|
111
|
+
*/
|
|
112
|
+
declare function scrollToMatch(containerElement: HTMLElement | null, match: FindMatch): void;
|
|
113
|
+
|
|
114
|
+
export { type FindMatch, type FindOptions, type FindResult, type HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, findInDocument, findInParagraph, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent, scrollToMatch };
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find & Replace Utility Functions
|
|
3
|
+
*
|
|
4
|
+
* Pure utility functions for text search, pattern matching, and
|
|
5
|
+
* document search. Lifted from packages/react/src/components/dialogs/
|
|
6
|
+
* findReplaceUtils.ts so the React adapter and the Vue adapter share
|
|
7
|
+
* one implementation.
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* A single match result in the document
|
|
13
|
+
*/
|
|
14
|
+
interface FindMatch {
|
|
15
|
+
/** Index of the paragraph containing the match */
|
|
16
|
+
paragraphIndex: number;
|
|
17
|
+
/** Index of the run/content within the paragraph */
|
|
18
|
+
contentIndex: number;
|
|
19
|
+
/** Character offset within the content */
|
|
20
|
+
startOffset: number;
|
|
21
|
+
/** Character offset for end of match */
|
|
22
|
+
endOffset: number;
|
|
23
|
+
/** The matched text */
|
|
24
|
+
text: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Find options for controlling search behavior
|
|
28
|
+
*/
|
|
29
|
+
interface FindOptions {
|
|
30
|
+
/** Whether to match case */
|
|
31
|
+
matchCase: boolean;
|
|
32
|
+
/** Whether to match whole words only */
|
|
33
|
+
matchWholeWord: boolean;
|
|
34
|
+
/** Whether to use regular expressions (future) */
|
|
35
|
+
useRegex?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Find result with all matches
|
|
39
|
+
*/
|
|
40
|
+
interface FindResult {
|
|
41
|
+
/** All matches found */
|
|
42
|
+
matches: FindMatch[];
|
|
43
|
+
/** Total match count */
|
|
44
|
+
totalCount: number;
|
|
45
|
+
/** Current match index (0-based) */
|
|
46
|
+
currentIndex: number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Highlight options for document rendering
|
|
50
|
+
*/
|
|
51
|
+
interface HighlightOptions {
|
|
52
|
+
/** Background color for current match */
|
|
53
|
+
currentMatchColor: string;
|
|
54
|
+
/** Background color for other matches */
|
|
55
|
+
otherMatchColor: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Create default find options
|
|
59
|
+
*/
|
|
60
|
+
declare function createDefaultFindOptions(): FindOptions;
|
|
61
|
+
/**
|
|
62
|
+
* Escape string for use in regex pattern
|
|
63
|
+
*/
|
|
64
|
+
declare function escapeRegexString(str: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* Create a regex pattern from search text and options
|
|
67
|
+
*/
|
|
68
|
+
declare function createSearchPattern(searchText: string, options: FindOptions): RegExp | null;
|
|
69
|
+
/**
|
|
70
|
+
* Find all matches of search text in content
|
|
71
|
+
*/
|
|
72
|
+
declare function findAllMatches(content: string, searchText: string, options: FindOptions): Array<{
|
|
73
|
+
start: number;
|
|
74
|
+
end: number;
|
|
75
|
+
}>;
|
|
76
|
+
/**
|
|
77
|
+
* Replace text in content
|
|
78
|
+
*/
|
|
79
|
+
declare function replaceAllInContent(content: string, searchText: string, replaceText: string, options: FindOptions): string;
|
|
80
|
+
/**
|
|
81
|
+
* Replace first match in content
|
|
82
|
+
*/
|
|
83
|
+
declare function replaceFirstInContent(content: string, searchText: string, replaceText: string, options: FindOptions, startIndex?: number): {
|
|
84
|
+
content: string;
|
|
85
|
+
replaced: boolean;
|
|
86
|
+
matchStart: number;
|
|
87
|
+
matchEnd: number;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Get match count for status display
|
|
91
|
+
*/
|
|
92
|
+
declare function getMatchCountText(result: FindResult | null): string;
|
|
93
|
+
/**
|
|
94
|
+
* Check if search text is empty or whitespace-only
|
|
95
|
+
*/
|
|
96
|
+
declare function isEmptySearch(searchText: string): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Get default highlight options
|
|
99
|
+
*/
|
|
100
|
+
declare function getDefaultHighlightOptions(): HighlightOptions;
|
|
101
|
+
/**
|
|
102
|
+
* Find all matches in a document
|
|
103
|
+
*/
|
|
104
|
+
declare function findInDocument(document: any, searchText: string, options: FindOptions): FindMatch[];
|
|
105
|
+
/**
|
|
106
|
+
* Find matches in a single paragraph
|
|
107
|
+
*/
|
|
108
|
+
declare function findInParagraph(paragraph: any, searchText: string, options: FindOptions, paragraphIndex: number): FindMatch[];
|
|
109
|
+
/**
|
|
110
|
+
* Scroll to a match in the document
|
|
111
|
+
*/
|
|
112
|
+
declare function scrollToMatch(containerElement: HTMLElement | null, match: FindMatch): void;
|
|
113
|
+
|
|
114
|
+
export { type FindMatch, type FindOptions, type FindResult, type HighlightOptions, createDefaultFindOptions, createSearchPattern, escapeRegexString, findAllMatches, findInDocument, findInParagraph, getDefaultHighlightOptions, getMatchCountText, isEmptySearch, replaceAllInContent, replaceFirstInContent, scrollToMatch };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');function b(){return {matchCase:false,matchWholeWord:false,useRegex:false}}function g(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function p(t,e){if(!t)return null;try{let n;e.useRegex?n=t:n=g(t),e.matchWholeWord&&(n=`\\b${n}\\b`);let r=e.matchCase?"g":"gi";return new RegExp(n,r)}catch{return null}}function l(t,e,n){if(!t||!e)return [];let r=[],o=e;n.matchCase||(o=e.toLowerCase());let c=h=>h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i;n.matchWholeWord?i=`\\b${c(o)}\\b`:i=c(o);let a=n.matchCase?"g":"gi",s=new RegExp(i,a),f;for(;(f=s.exec(t))!==null;)r.push({start:f.index,end:f.index+f[0].length}),f[0].length===0&&s.lastIndex++;return r}function I(t,e,n,r){let o=p(e,r);return o?t.replace(o,n):t}function F(t,e,n,r,o=0){let c=l(t,e,r),i=c.find(s=>s.start>=o)||c[0];return i?{content:t.substring(0,i.start)+n+t.substring(i.end),replaced:true,matchStart:i.start,matchEnd:i.start+n.length}:{content:t,replaced:false,matchStart:-1,matchEnd:-1}}function y(t){return t?t.totalCount===0?"No results":t.totalCount===1?"1 match":`${t.currentIndex+1} of ${t.totalCount} matches`:""}function C(t){return !t||t.trim()===""}function M(){return {currentMatchColor:"#FFFF00",otherMatchColor:"#FFFFAA"}}function u(t){if(!t||!t.content)return "";let e="";for(let n of t.content)n.type==="text"?e+=n.text||"":n.type==="tab"?e+=" ":n.type==="break"&&n.breakType==="textWrapping"&&(e+=`
|
|
2
|
+
`);return e}function d(t){if(!t||!t.content)return "";let e="";for(let n of t.content)if(n.type==="run")e+=u(n);else if(n.type==="hyperlink")for(let r of n.children||[])r.type==="run"&&(e+=u(r));return e}function O(t,e,n){if(!t||!e)return [];let r=[],o=t.package?.document||t.package?.document;if(!o||!o.content)return r;let c=0;for(let i of o.content)if(i.type==="paragraph"){let a=x(i,e,n,c);r.push(...a),c++;}else if(i.type==="table")for(let a of i.rows||[])for(let s of a.cells||[])for(let f of s.content||[])f.type;return r}function x(t,e,n,r){let o=[],c=d(t);if(!c)return o;let i=l(c,e,n);for(let a of i){let s=m(t,a.start);o.push({paragraphIndex:r,contentIndex:s.contentIndex,startOffset:s.offsetInContent,endOffset:s.offsetInContent+(a.end-a.start),text:c.substring(a.start,a.end)});}return o}function m(t,e){if(!t||!t.content)return {contentIndex:0,runIndex:0,offsetInContent:e};let n=0,r=0;for(let o of t.content){let c="";if(o.type==="run")c=u(o);else if(o.type==="hyperlink")for(let a of o.children||[])a.type==="run"&&(c+=u(a));let i=c.length;if(n+i>e)return {contentIndex:r,runIndex:r,offsetInContent:e-n};n+=i,r++;}return {contentIndex:Math.max(0,t.content.length-1),runIndex:Math.max(0,t.content.length-1),offsetInContent:0}}function R(t,e){if(!t||!e)return;let n=t.querySelector(`[data-paragraph-index="${e.paragraphIndex}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"center"});}exports.createDefaultFindOptions=b;exports.createSearchPattern=p;exports.escapeRegexString=g;exports.findAllMatches=l;exports.findInDocument=O;exports.findInParagraph=x;exports.getDefaultHighlightOptions=M;exports.getMatchCountText=y;exports.isEmptySearch=C;exports.replaceAllInContent=I;exports.replaceFirstInContent=F;exports.scrollToMatch=R;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'../chunk-QYUPLKLP.mjs';function b(){return {matchCase:false,matchWholeWord:false,useRegex:false}}function g(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function p(t,e){if(!t)return null;try{let n;e.useRegex?n=t:n=g(t),e.matchWholeWord&&(n=`\\b${n}\\b`);let r=e.matchCase?"g":"gi";return new RegExp(n,r)}catch{return null}}function l(t,e,n){if(!t||!e)return [];let r=[],o=e;n.matchCase||(o=e.toLowerCase());let c=h=>h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i;n.matchWholeWord?i=`\\b${c(o)}\\b`:i=c(o);let a=n.matchCase?"g":"gi",s=new RegExp(i,a),f;for(;(f=s.exec(t))!==null;)r.push({start:f.index,end:f.index+f[0].length}),f[0].length===0&&s.lastIndex++;return r}function I(t,e,n,r){let o=p(e,r);return o?t.replace(o,n):t}function F(t,e,n,r,o=0){let c=l(t,e,r),i=c.find(s=>s.start>=o)||c[0];return i?{content:t.substring(0,i.start)+n+t.substring(i.end),replaced:true,matchStart:i.start,matchEnd:i.start+n.length}:{content:t,replaced:false,matchStart:-1,matchEnd:-1}}function y(t){return t?t.totalCount===0?"No results":t.totalCount===1?"1 match":`${t.currentIndex+1} of ${t.totalCount} matches`:""}function C(t){return !t||t.trim()===""}function M(){return {currentMatchColor:"#FFFF00",otherMatchColor:"#FFFFAA"}}function u(t){if(!t||!t.content)return "";let e="";for(let n of t.content)n.type==="text"?e+=n.text||"":n.type==="tab"?e+=" ":n.type==="break"&&n.breakType==="textWrapping"&&(e+=`
|
|
2
|
+
`);return e}function d(t){if(!t||!t.content)return "";let e="";for(let n of t.content)if(n.type==="run")e+=u(n);else if(n.type==="hyperlink")for(let r of n.children||[])r.type==="run"&&(e+=u(r));return e}function O(t,e,n){if(!t||!e)return [];let r=[],o=t.package?.document||t.package?.document;if(!o||!o.content)return r;let c=0;for(let i of o.content)if(i.type==="paragraph"){let a=x(i,e,n,c);r.push(...a),c++;}else if(i.type==="table")for(let a of i.rows||[])for(let s of a.cells||[])for(let f of s.content||[])f.type;return r}function x(t,e,n,r){let o=[],c=d(t);if(!c)return o;let i=l(c,e,n);for(let a of i){let s=m(t,a.start);o.push({paragraphIndex:r,contentIndex:s.contentIndex,startOffset:s.offsetInContent,endOffset:s.offsetInContent+(a.end-a.start),text:c.substring(a.start,a.end)});}return o}function m(t,e){if(!t||!t.content)return {contentIndex:0,runIndex:0,offsetInContent:e};let n=0,r=0;for(let o of t.content){let c="";if(o.type==="run")c=u(o);else if(o.type==="hyperlink")for(let a of o.children||[])a.type==="run"&&(c+=u(a));let i=c.length;if(n+i>e)return {contentIndex:r,runIndex:r,offsetInContent:e-n};n+=i,r++;}return {contentIndex:Math.max(0,t.content.length-1),runIndex:Math.max(0,t.content.length-1),offsetInContent:0}}function R(t,e){if(!t||!e)return;let n=t.querySelector(`[data-paragraph-index="${e.paragraphIndex}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"center"});}export{b as createDefaultFindOptions,p as createSearchPattern,g as escapeRegexString,l as findAllMatches,O as findInDocument,x as findInParagraph,M as getDefaultHighlightOptions,y as getMatchCountText,C as isEmptySearch,I as replaceAllInContent,F as replaceFirstInContent,R as scrollToMatch};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure DOM helpers — locate the element that vertically scrolls the
|
|
3
|
+
* paginated editor. Lifted from packages/react/src/paged-editor/
|
|
4
|
+
* findVerticalScrollParent.ts so both adapters use the same logic
|
|
5
|
+
* for scroll-to-position, arrow-key line navigation, and drag
|
|
6
|
+
* auto-scroll.
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* First ancestor of `el` with `overflow-y: auto|scroll` and a scrollable
|
|
12
|
+
* overflow height. Walk starts at `el.parentElement` (does not treat
|
|
13
|
+
* `el` itself as the scroller).
|
|
14
|
+
*
|
|
15
|
+
* @returns `null` when no such ancestor exists before `document.documentElement`.
|
|
16
|
+
*/
|
|
17
|
+
declare function findVerticalScrollParent(el: HTMLElement): HTMLElement | null;
|
|
18
|
+
/**
|
|
19
|
+
* Same as {@link findVerticalScrollParent} but falls back to
|
|
20
|
+
* `document.documentElement` so callers always get a valid scroll
|
|
21
|
+
* target (matches legacy `scrollIntoView` root).
|
|
22
|
+
*/
|
|
23
|
+
declare function findVerticalScrollParentOrRoot(el: HTMLElement): HTMLElement;
|
|
24
|
+
|
|
25
|
+
export { findVerticalScrollParent, findVerticalScrollParentOrRoot };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure DOM helpers — locate the element that vertically scrolls the
|
|
3
|
+
* paginated editor. Lifted from packages/react/src/paged-editor/
|
|
4
|
+
* findVerticalScrollParent.ts so both adapters use the same logic
|
|
5
|
+
* for scroll-to-position, arrow-key line navigation, and drag
|
|
6
|
+
* auto-scroll.
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* First ancestor of `el` with `overflow-y: auto|scroll` and a scrollable
|
|
12
|
+
* overflow height. Walk starts at `el.parentElement` (does not treat
|
|
13
|
+
* `el` itself as the scroller).
|
|
14
|
+
*
|
|
15
|
+
* @returns `null` when no such ancestor exists before `document.documentElement`.
|
|
16
|
+
*/
|
|
17
|
+
declare function findVerticalScrollParent(el: HTMLElement): HTMLElement | null;
|
|
18
|
+
/**
|
|
19
|
+
* Same as {@link findVerticalScrollParent} but falls back to
|
|
20
|
+
* `document.documentElement` so callers always get a valid scroll
|
|
21
|
+
* target (matches legacy `scrollIntoView` root).
|
|
22
|
+
*/
|
|
23
|
+
declare function findVerticalScrollParentOrRoot(el: HTMLElement): HTMLElement;
|
|
24
|
+
|
|
25
|
+
export { findVerticalScrollParent, findVerticalScrollParentOrRoot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkJY5EFI4D_js=require('../chunk-JY5EFI4D.js');require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"findVerticalScrollParent",{enumerable:true,get:function(){return chunkJY5EFI4D_js.a}});Object.defineProperty(exports,"findVerticalScrollParentOrRoot",{enumerable:true,get:function(){return chunkJY5EFI4D_js.b}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as findVerticalScrollParent,b as findVerticalScrollParentOrRoot}from'../chunk-RPIQG46O.mjs';import'../chunk-QYUPLKLP.mjs';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared FontOption shape + normaliser used by FontPicker components
|
|
3
|
+
* in both adapters. Lifted from packages/react/src/components/ui/
|
|
4
|
+
* normalizeFontFamilies.ts so the type definition has a single home.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
interface FontOption {
|
|
9
|
+
name: string;
|
|
10
|
+
fontFamily: string;
|
|
11
|
+
category?: 'sans-serif' | 'serif' | 'monospace' | 'other';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Normalize a `fontFamilies` prop (mix of strings and FontOption
|
|
15
|
+
* objects) into a uniform `FontOption[]`. Returns `undefined` for
|
|
16
|
+
* `undefined` input so callers fall back to their built-in defaults.
|
|
17
|
+
* Strings expand into the `'other'` group with no CSS fallback chain.
|
|
18
|
+
*/
|
|
19
|
+
declare function normalizeFontFamilies(fontFamilies: ReadonlyArray<string | FontOption> | undefined): FontOption[] | undefined;
|
|
20
|
+
|
|
21
|
+
export { type FontOption, normalizeFontFamilies };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared FontOption shape + normaliser used by FontPicker components
|
|
3
|
+
* in both adapters. Lifted from packages/react/src/components/ui/
|
|
4
|
+
* normalizeFontFamilies.ts so the type definition has a single home.
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
interface FontOption {
|
|
9
|
+
name: string;
|
|
10
|
+
fontFamily: string;
|
|
11
|
+
category?: 'sans-serif' | 'serif' | 'monospace' | 'other';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Normalize a `fontFamilies` prop (mix of strings and FontOption
|
|
15
|
+
* objects) into a uniform `FontOption[]`. Returns `undefined` for
|
|
16
|
+
* `undefined` input so callers fall back to their built-in defaults.
|
|
17
|
+
* Strings expand into the `'other'` group with no CSS fallback chain.
|
|
18
|
+
*/
|
|
19
|
+
declare function normalizeFontFamilies(fontFamilies: ReadonlyArray<string | FontOption> | undefined): FontOption[] | undefined;
|
|
20
|
+
|
|
21
|
+
export { type FontOption, normalizeFontFamilies };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');function a(o){if(o===void 0)return;let t=o.map(n=>typeof n=="string"?{name:n,fontFamily:n,category:"other"}:n);if(r()){let n=new Set,i=new Set;for(let e of t)i.has(e.name)&&!n.has(e.name)&&(console.warn(`[DocxEditor] Duplicate font name in fontFamilies: "${e.name}"`),n.add(e.name)),i.add(e.name);}return t}function r(){return typeof process<"u"&&process.env?.NODE_ENV!=="production"}exports.normalizeFontFamilies=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import'../chunk-QYUPLKLP.mjs';function a(o){if(o===void 0)return;let t=o.map(n=>typeof n=="string"?{name:n,fontFamily:n,category:"other"}:n);if(r()){let n=new Set,i=new Set;for(let e of t)i.has(e.name)&&!n.has(e.name)&&(console.warn(`[DocxEditor] Duplicate font name in fontFamilies: "${e.name}"`),n.add(e.name)),i.add(e.name);}return t}function r(){return typeof process<"u"&&process.env?.NODE_ENV!=="production"}export{a as normalizeFontFamilies};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
import { Node } from 'prosemirror-model';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Information about a heading found in the document.
|
|
14
|
+
*/
|
|
15
|
+
interface HeadingInfo {
|
|
16
|
+
/** The text content of the heading */
|
|
17
|
+
text: string;
|
|
18
|
+
/** Outline level (0 = Heading 1, 1 = Heading 2, etc.) */
|
|
19
|
+
level: number;
|
|
20
|
+
/** ProseMirror document position of the paragraph node */
|
|
21
|
+
pmPos: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Collect all headings from a ProseMirror document.
|
|
25
|
+
*
|
|
26
|
+
* Detection logic:
|
|
27
|
+
* 1. Check `outlineLevel` attr (set by OOXML parsing or style resolution)
|
|
28
|
+
* 2. Fallback to `styleId` matching /^[Hh]eading(\d)$/
|
|
29
|
+
*/
|
|
30
|
+
declare function collectHeadings(doc: Node): HeadingInfo[];
|
|
31
|
+
|
|
32
|
+
export { type HeadingInfo, collectHeadings };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* @public
|
|
4
|
+
*/
|
|
5
|
+
import { Node } from 'prosemirror-model';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Information about a heading found in the document.
|
|
14
|
+
*/
|
|
15
|
+
interface HeadingInfo {
|
|
16
|
+
/** The text content of the heading */
|
|
17
|
+
text: string;
|
|
18
|
+
/** Outline level (0 = Heading 1, 1 = Heading 2, etc.) */
|
|
19
|
+
level: number;
|
|
20
|
+
/** ProseMirror document position of the paragraph node */
|
|
21
|
+
pmPos: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Collect all headings from a ProseMirror document.
|
|
25
|
+
*
|
|
26
|
+
* Detection logic:
|
|
27
|
+
* 1. Check `outlineLevel` attr (set by OOXML parsing or style resolution)
|
|
28
|
+
* 2. Fallback to `styleId` matching /^[Hh]eading(\d)$/
|
|
29
|
+
*/
|
|
30
|
+
declare function collectHeadings(doc: Node): HeadingInfo[];
|
|
31
|
+
|
|
32
|
+
export { type HeadingInfo, collectHeadings };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkMZ7LW5CH_js=require('../chunk-MZ7LW5CH.js');require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"collectHeadings",{enumerable:true,get:function(){return chunkMZ7LW5CH_js.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as collectHeadings}from'../chunk-OZMNIX6U.mjs';import'../chunk-QYUPLKLP.mjs';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OOXML highlight color name <-> hex mapping. Used by both adapter
|
|
3
|
+
* toolbars when serialising highlight selections to the
|
|
4
|
+
* `w:highlight` attribute (which only accepts named colors).
|
|
5
|
+
*
|
|
6
|
+
* Lifted from packages/react/src/components/toolbarUtils.ts so both
|
|
7
|
+
* sides share the same canonical table.
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
declare const HIGHLIGHT_HEX_TO_NAME: Record<string, string>;
|
|
12
|
+
declare function mapHexToHighlightName(hex: string): string | null;
|
|
13
|
+
|
|
14
|
+
export { HIGHLIGHT_HEX_TO_NAME, mapHexToHighlightName };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OOXML highlight color name <-> hex mapping. Used by both adapter
|
|
3
|
+
* toolbars when serialising highlight selections to the
|
|
4
|
+
* `w:highlight` attribute (which only accepts named colors).
|
|
5
|
+
*
|
|
6
|
+
* Lifted from packages/react/src/components/toolbarUtils.ts so both
|
|
7
|
+
* sides share the same canonical table.
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
declare const HIGHLIGHT_HEX_TO_NAME: Record<string, string>;
|
|
12
|
+
declare function mapHexToHighlightName(hex: string): string | null;
|
|
13
|
+
|
|
14
|
+
export { HIGHLIGHT_HEX_TO_NAME, mapHexToHighlightName };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');var F={FFFF00:"yellow","00FF00":"green","00FFFF":"cyan",FF00FF:"magenta","0000FF":"blue",FF0000:"red","00008B":"darkBlue","008080":"darkCyan","008000":"darkGreen",800080:"darkMagenta","8B0000":"darkRed",808e3:"darkYellow",808080:"darkGray",C0C0C0:"lightGray","000000":"black",FFFFFF:"white"};function a(e){let r=e.replace(/^#/,"").toUpperCase();return F[r]||null}exports.HIGHLIGHT_HEX_TO_NAME=F;exports.mapHexToHighlightName=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import'../chunk-QYUPLKLP.mjs';var F={FFFF00:"yellow","00FF00":"green","00FFFF":"cyan",FF00FF:"magenta","0000FF":"blue",FF0000:"red","00008B":"darkBlue","008080":"darkCyan","008000":"darkGreen",800080:"darkMagenta","8B0000":"darkRed",808e3:"darkYellow",808080:"darkGray",C0C0C0:"lightGray","000000":"black",FFFFFF:"white"};function a(e){let r=e.replace(/^#/,"").toUpperCase();return F[r]||null}export{F as HIGHLIGHT_HEX_TO_NAME,a as mapHexToHighlightName};
|