@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,82 @@
|
|
|
1
|
+
'use strict';var chunkAAPBAMD7_js=require('../chunk-AAPBAMD7.js'),chunkWLKRUBY4_js=require('../chunk-WLKRUBY4.js'),chunkKESNGXGO_js=require('../chunk-KESNGXGO.js'),chunkNXLJVVVE_js=require('../chunk-NXLJVVVE.js'),chunkESI4BSBF_js=require('../chunk-ESI4BSBF.js'),chunkMNOHUTKE_js=require('../chunk-MNOHUTKE.js'),chunk2KHWHVTA_js=require('../chunk-2KHWHVTA.js'),chunkBHBOAP6Z_js=require('../chunk-BHBOAP6Z.js'),chunkMZ7LW5CH_js=require('../chunk-MZ7LW5CH.js');require('../chunk-N3Y5BUKV.js');var chunkMJ5FQX7Q_js=require('../chunk-MJ5FQX7Q.js'),chunk4Q2IP5FW_js=require('../chunk-4Q2IP5FW.js');require('../chunk-DC7S76ZX.js');function u(e){return e?/[\p{L}\p{N}_]/u.test(e):false}function x(e){return e?/\s/.test(e):false}function jt(e){return e?/[\p{P}]/u.test(e):false}function Vt(e,t){if(t<=0)return 0;t>e.length&&(t=e.length);let o=t;for(;o>0&&x(e[o-1]);)o--;if(o===0)return 0;for(;o>0&&u(e[o-1]);)o--;return o}function Yt(e,t){if(t>=e.length)return e.length;t<0&&(t=0);let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&x(e[o]);)o++;return o}function b(e,t){if(t>=e.length)return e.length;let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&!u(e[o]);)o++;return o}function y(e,t){if(t<=0)return 0;let o=t;for(;o>0&&!u(e[o-1]);)o--;for(;o>0&&u(e[o-1]);)o--;return o}function C(e,t){if(!window.getSelection())return null;let n=document.createRange();if(e.nodeType===Node.TEXT_NODE){n.setStart(e,Math.min(t,e.textContent?.length||0)),n.collapse(true);let l=n.getBoundingClientRect().top,i=0,c=t;for(;i<c;){let a=Math.floor((i+c)/2);n.setStart(e,a),n.collapse(true);let f=n.getBoundingClientRect();Math.abs(f.top-l)<2?c=a:i=a+1;}return {node:e,offset:i}}return null}function T(e,t){if(!window.getSelection())return null;let n=e.textContent?.length||0,r=document.createRange();if(e.nodeType===Node.TEXT_NODE){r.setStart(e,Math.min(t,n)),r.collapse(true);let i=r.getBoundingClientRect().top,c=t,a=n;for(;c<a;){let f=Math.ceil((c+a)/2);r.setStart(e,f),r.collapse(true);let D=r.getBoundingClientRect();Math.abs(D.top-i)<2?c=f:a=f-1;}return {node:e,offset:c}}return null}function qt(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0);return {node:t.startContainer,offset:t.startOffset,anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,text:e.toString()}}function h(e,t){let o=window.getSelection();if(!o)return;let n=document.createRange(),r=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;n.setStart(e,Math.min(t,r)),n.collapse(true),o.removeAllRanges(),o.addRange(n);}function p(e,t){let o=window.getSelection();if(!(!o||!o.anchorNode))try{o.extend(e,Math.min(t,e.textContent?.length||0));}catch{let n=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;o.setBaseAndExtent(o.anchorNode,o.anchorOffset,e,Math.min(t,n));}}function R(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n||n.nodeType!==Node.TEXT_NODE)return false;let r=n.textContent||"",l=o.focusOffset,i;return e==="left"?i=y(r,l):i=b(r,l),t?p(n,i):h(n,i),true}function w(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n)return false;if(n.nodeType===Node.TEXT_NODE){let i=e==="start"?C(n,o.focusOffset):T(n,o.focusOffset);if(i)return t?p(i.node,i.offset):h(i.node,i.offset),true}let r=n.textContent||"",l=e==="start"?0:r.length;return t?p(n,l):h(n,l),true}function E(e){let{key:t,ctrlKey:o,metaKey:n,shiftKey:r,altKey:l}=e,i=o||n;switch(t){case "ArrowLeft":if(i)return {direction:"left",unit:"word",extend:r};break;case "ArrowRight":if(i)return {direction:"right",unit:"word",extend:r};break;case "Home":return i?{direction:"left",unit:"document",extend:r}:{direction:"left",unit:"line",extend:r};case "End":return i?{direction:"right",unit:"document",extend:r}:{direction:"right",unit:"line",extend:r}}return null}function Jt(e,t){let o=E(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&R(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(w(n,o.extend))return e.preventDefault(),true;break;case "document":if(o.direction==="left"&&t?.onDocumentStart)return e.preventDefault(),t.onDocumentStart(),true;if(o.direction==="right"&&t?.onDocumentEnd)return e.preventDefault(),t.onDocumentEnd(),true;break}return false}function Qt(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function Zt(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return false;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;if(r===l)return false;let i=document.createRange();return i.setStart(t,r),i.setEnd(t,l),e.removeAllRanges(),e.addRange(i),true}function eo(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;return r===l?null:o.slice(r,l)}function to(e,t){let o=e.ctrlKey||e.metaKey,n=t.ctrlKey||t.metaKey;return e.key.toLowerCase()===t.key.toLowerCase()&&o===!!n&&e.shiftKey===!!t.shiftKey&&e.altKey===!!t.altKey}var s={wordLeft:{key:"ArrowLeft",ctrlKey:true},wordRight:{key:"ArrowRight",ctrlKey:true},selectWordLeft:{key:"ArrowLeft",ctrlKey:true,shiftKey:true},selectWordRight:{key:"ArrowRight",ctrlKey:true,shiftKey:true},lineStart:{key:"Home"},lineEnd:{key:"End"},selectToLineStart:{key:"Home",shiftKey:true},selectToLineEnd:{key:"End",shiftKey:true},documentStart:{key:"Home",ctrlKey:true},documentEnd:{key:"End",ctrlKey:true},selectToDocumentStart:{key:"Home",ctrlKey:true,shiftKey:true},selectToDocumentEnd:{key:"End",ctrlKey:true,shiftKey:true}};function d(e){let t=[];if(e.ctrlKey||e.metaKey){let n=typeof navigator<"u"&&/Mac/i.test(navigator.platform);t.push(n?"\u2318":"Ctrl");}e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let o=e.key;return o==="ArrowLeft"?o="\u2190":o==="ArrowRight"?o="\u2192":o==="ArrowUp"?o="\u2191":o==="ArrowDown"&&(o="\u2193"),t.push(o),t.join("+")}function oo(){return [{action:"Move by word (left)",shortcut:d(s.wordLeft)},{action:"Move by word (right)",shortcut:d(s.wordRight)},{action:"Select word (left)",shortcut:d(s.selectWordLeft)},{action:"Select word (right)",shortcut:d(s.selectWordRight)},{action:"Go to line start",shortcut:d(s.lineStart)},{action:"Go to line end",shortcut:d(s.lineEnd)},{action:"Select to line start",shortcut:d(s.selectToLineStart)},{action:"Select to line end",shortcut:d(s.selectToLineEnd)},{action:"Go to document start",shortcut:d(s.documentStart)},{action:"Go to document end",shortcut:d(s.documentEnd)},{action:"Select to document start",shortcut:d(s.selectToDocumentStart)},{action:"Select to document end",shortcut:d(s.selectToDocumentEnd)}]}var m={backgroundColor:"rgba(26, 115, 232, 0.3)",borderRadius:0,zIndex:0,opacity:1,mixBlendMode:"multiply"},no={backgroundColor:"rgba(0, 120, 215, 0.4)",borderColor:"rgba(0, 120, 215, 0.6)",borderRadius:1,zIndex:0,opacity:1},ro={backgroundColor:"--docx-selection-bg",borderColor:"--docx-selection-border",textColor:"--docx-selection-text"};function S(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return [];let o=t.getRangeAt(0);if(e&&!e.contains(o.commonAncestorContainer))return [];let n=o.getClientRects(),r=[],l=0,i=0;if(e){let c=e.getBoundingClientRect();l=c.left+e.scrollLeft,i=c.top+e.scrollTop;}for(let c=0;c<n.length;c++){let a=n[c];a.width===0&&a.height===0||r.push({left:a.left-l,top:a.top-i,width:a.width,height:a.height});}return r}function N(e,t=2){if(e.length<=1)return e;let o=[...e].sort((l,i)=>Math.abs(l.top-i.top)<t?l.left-i.left:l.top-i.top),n=[],r={...o[0]};for(let l=1;l<o.length;l++){let i=o[l],c=Math.abs(i.top-r.top)<t,a=i.left<=r.left+r.width+t;if(c&&a){let f=Math.max(r.left+r.width,i.left+i.width);r.width=f-r.left,r.height=Math.max(r.height,i.height);}else n.push(r),r={...i};}return n.push(r),n}function k(e){let t=S(e);return N(t)}function io(e,t=m){return {position:"absolute",left:`${e.left}px`,top:`${e.top}px`,width:`${e.width}px`,height:`${e.height}px`,backgroundColor:t.backgroundColor,borderRadius:t.borderRadius?`${t.borderRadius}px`:void 0,border:t.borderColor?`1px solid ${t.borderColor}`:void 0,zIndex:t.zIndex??0,opacity:t.opacity??1,mixBlendMode:t.mixBlendMode,pointerEvents:"none",userSelect:"none"}}function lo(e,t=m){let o=t.backgroundColor;return `
|
|
2
|
+
${e}::selection,
|
|
3
|
+
${e} *::selection {
|
|
4
|
+
background-color: ${o} !important;
|
|
5
|
+
color: inherit !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
${e}::-moz-selection,
|
|
9
|
+
${e} *::-moz-selection {
|
|
10
|
+
background-color: ${o} !important;
|
|
11
|
+
color: inherit !important;
|
|
12
|
+
}
|
|
13
|
+
`}function co(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function ao(){let e=window.getSelection();return e?e.toString():""}function so(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let o=t.getRangeAt(0);return e.contains(o.commonAncestorContainer)}function uo(){let e=window.getSelection();return !e||e.rangeCount===0?null:e.getRangeAt(0).getBoundingClientRect()}function go(e,t,o,n,r){try{let l=document.createRange();return l.setStart(t,o),l.setEnd(n,r),l}catch{return null}}function fo(e){let t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e));}function ho(){let e=window.getSelection();e&&e.removeAllRanges();}function A(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.anchorNode,o=e.focusNode;return !t||!o?false:t===o?e.focusOffset<e.anchorOffset:(t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING)!==0}function po(){let e=window.getSelection();if(!e||e.rangeCount===0||!A())return;let t=e.getRangeAt(0),o=document.createRange();o.setStart(t.startContainer,t.startOffset),o.setEnd(t.endContainer,t.endOffset),e.removeAllRanges(),e.addRange(o);}var g=null;function mo(e=m){v();let t=`
|
|
14
|
+
/* DOCX Editor Selection Highlighting */
|
|
15
|
+
|
|
16
|
+
/* Base selection style for all editable content */
|
|
17
|
+
.docx-editor [contenteditable="true"]::selection,
|
|
18
|
+
.docx-editor [contenteditable="true"] *::selection,
|
|
19
|
+
.docx-run-editable::selection,
|
|
20
|
+
.docx-run-editable *::selection {
|
|
21
|
+
background-color: ${e.backgroundColor} !important;
|
|
22
|
+
color: inherit !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Firefox selection */
|
|
26
|
+
.docx-editor [contenteditable="true"]::-moz-selection,
|
|
27
|
+
.docx-editor [contenteditable="true"] *::-moz-selection,
|
|
28
|
+
.docx-run-editable::-moz-selection,
|
|
29
|
+
.docx-run-editable *::-moz-selection {
|
|
30
|
+
background-color: ${e.backgroundColor} !important;
|
|
31
|
+
color: inherit !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Ensure selection is visible against all backgrounds */
|
|
35
|
+
.docx-run-highlighted::selection,
|
|
36
|
+
.docx-run-highlighted *::selection {
|
|
37
|
+
/* For highlighted (yellow background) text, use darker selection */
|
|
38
|
+
background-color: rgba(26, 115, 232, 0.5) !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.docx-run-highlighted::-moz-selection,
|
|
42
|
+
.docx-run-highlighted *::-moz-selection {
|
|
43
|
+
background-color: rgba(26, 115, 232, 0.5) !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Selection in dark text */
|
|
47
|
+
.docx-run-dark-bg::selection,
|
|
48
|
+
.docx-run-dark-bg *::selection {
|
|
49
|
+
/* Use lighter selection for dark backgrounds */
|
|
50
|
+
background-color: rgba(100, 181, 246, 0.5) !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.docx-run-dark-bg::-moz-selection,
|
|
54
|
+
.docx-run-dark-bg *::-moz-selection {
|
|
55
|
+
background-color: rgba(100, 181, 246, 0.5) !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Programmatic highlight class */
|
|
59
|
+
.docx-selection-highlight {
|
|
60
|
+
background-color: ${e.backgroundColor};
|
|
61
|
+
${e.borderRadius?`border-radius: ${e.borderRadius}px;`:""}
|
|
62
|
+
${e.mixBlendMode?`mix-blend-mode: ${e.mixBlendMode};`:""}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Find/replace highlight */
|
|
66
|
+
.docx-find-highlight {
|
|
67
|
+
background-color: rgba(255, 235, 59, 0.5);
|
|
68
|
+
border-radius: 2px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.docx-find-highlight-current {
|
|
72
|
+
background-color: rgba(255, 152, 0, 0.6);
|
|
73
|
+
border-radius: 2px;
|
|
74
|
+
outline: 2px solid rgba(255, 152, 0, 0.8);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* AI action selection preview */
|
|
78
|
+
.docx-ai-selection-preview {
|
|
79
|
+
background-color: rgba(156, 39, 176, 0.2);
|
|
80
|
+
border-bottom: 2px dashed rgba(156, 39, 176, 0.6);
|
|
81
|
+
}
|
|
82
|
+
`;g=document.createElement("style"),g.id="docx-selection-styles",g.textContent=t,document.head.appendChild(g);}function v(){g&&(g.remove(),g=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function xo(){return g!==null||document.getElementById("docx-selection-styles")!==null}function So(e,t,o=true){return ()=>{if(!e){t([]);return}let n=o?k(e):S(e);t(n);}}async function bo(e){let t=e.target;if(!t||!t.files)return null;let o=t.files[0];return t.value="",o?{buffer:await o.arrayBuffer(),name:o.name.replace(/\.docx$/i,"")}:null}Object.defineProperty(exports,"MIN_CARD_GAP",{enumerable:true,get:function(){return chunkAAPBAMD7_js.d}});Object.defineProperty(exports,"SIDEBAR_DOCUMENT_SHIFT",{enumerable:true,get:function(){return chunkAAPBAMD7_js.c}});Object.defineProperty(exports,"SIDEBAR_PAGE_GAP",{enumerable:true,get:function(){return chunkAAPBAMD7_js.b}});Object.defineProperty(exports,"SIDEBAR_WIDTH",{enumerable:true,get:function(){return chunkAAPBAMD7_js.a}});Object.defineProperty(exports,"createDoubleClickWordSelector",{enumerable:true,get:function(){return chunkWLKRUBY4_js.k}});Object.defineProperty(exports,"createTripleClickParagraphSelector",{enumerable:true,get:function(){return chunkWLKRUBY4_js.l}});Object.defineProperty(exports,"expandSelectionToWordBoundaries",{enumerable:true,get:function(){return chunkWLKRUBY4_js.h}});Object.defineProperty(exports,"findWordAt",{enumerable:true,get:function(){return chunkWLKRUBY4_js.e}});Object.defineProperty(exports,"findWordBoundaries",{enumerable:true,get:function(){return chunkWLKRUBY4_js.c}});Object.defineProperty(exports,"getWordAt",{enumerable:true,get:function(){return chunkWLKRUBY4_js.d}});Object.defineProperty(exports,"handleClickForMultiClick",{enumerable:true,get:function(){return chunkWLKRUBY4_js.j}});Object.defineProperty(exports,"selectParagraphAtCursor",{enumerable:true,get:function(){return chunkWLKRUBY4_js.i}});Object.defineProperty(exports,"selectWordAtCursor",{enumerable:true,get:function(){return chunkWLKRUBY4_js.f}});Object.defineProperty(exports,"selectWordInTextNode",{enumerable:true,get:function(){return chunkWLKRUBY4_js.g}});Object.defineProperty(exports,"countPageBreaks",{enumerable:true,get:function(){return chunkKESNGXGO_js.n}});Object.defineProperty(exports,"createColumnBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.b}});Object.defineProperty(exports,"createHorizontalRule",{enumerable:true,get:function(){return chunkKESNGXGO_js.g}});Object.defineProperty(exports,"createLineBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.c}});Object.defineProperty(exports,"createPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.a}});Object.defineProperty(exports,"createPageBreakParagraph",{enumerable:true,get:function(){return chunkKESNGXGO_js.e}});Object.defineProperty(exports,"createPageBreakRun",{enumerable:true,get:function(){return chunkKESNGXGO_js.d}});Object.defineProperty(exports,"findPageBreaks",{enumerable:true,get:function(){return chunkKESNGXGO_js.o}});Object.defineProperty(exports,"hasPageBreakBefore",{enumerable:true,get:function(){return chunkKESNGXGO_js.m}});Object.defineProperty(exports,"insertHorizontalRule",{enumerable:true,get:function(){return chunkKESNGXGO_js.h}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.f}});Object.defineProperty(exports,"isBreakContent",{enumerable:true,get:function(){return chunkKESNGXGO_js.l}});Object.defineProperty(exports,"isColumnBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.j}});Object.defineProperty(exports,"isLineBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.k}});Object.defineProperty(exports,"isPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.i}});Object.defineProperty(exports,"removePageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.p}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkNXLJVVVE_js.b}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkNXLJVVVE_js.a}});Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunkESI4BSBF_js.j}});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}});Object.defineProperty(exports,"FONT_MAPPING",{enumerable:true,get:function(){return chunkMNOHUTKE_js.l}});Object.defineProperty(exports,"canRenderFont",{enumerable:true,get:function(){return chunkMNOHUTKE_js.h}});Object.defineProperty(exports,"extractFontsFromDocument",{enumerable:true,get:function(){return chunkMNOHUTKE_js.q}});Object.defineProperty(exports,"getGoogleFontEquivalent",{enumerable:true,get:function(){return chunkMNOHUTKE_js.m}});Object.defineProperty(exports,"getLoadedFonts",{enumerable:true,get:function(){return chunkMNOHUTKE_js.e}});Object.defineProperty(exports,"isFontLoaded",{enumerable:true,get:function(){return chunkMNOHUTKE_js.c}});Object.defineProperty(exports,"isLoading",{enumerable:true,get:function(){return chunkMNOHUTKE_js.d}});Object.defineProperty(exports,"loadDocumentFonts",{enumerable:true,get:function(){return chunkMNOHUTKE_js.r}});Object.defineProperty(exports,"loadFont",{enumerable:true,get:function(){return chunkMNOHUTKE_js.a}});Object.defineProperty(exports,"loadFontDefinitions",{enumerable:true,get:function(){return chunkMNOHUTKE_js.k}});Object.defineProperty(exports,"loadFontFromBuffer",{enumerable:true,get:function(){return chunkMNOHUTKE_js.i}});Object.defineProperty(exports,"loadFontFromUrl",{enumerable:true,get:function(){return chunkMNOHUTKE_js.j}});Object.defineProperty(exports,"loadFontWithMapping",{enumerable:true,get:function(){return chunkMNOHUTKE_js.n}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkMNOHUTKE_js.b}});Object.defineProperty(exports,"loadFontsWithMapping",{enumerable:true,get:function(){return chunkMNOHUTKE_js.o}});Object.defineProperty(exports,"onFontError",{enumerable:true,get:function(){return chunkMNOHUTKE_js.g}});Object.defineProperty(exports,"onFontsLoaded",{enumerable:true,get:function(){return chunkMNOHUTKE_js.f}});Object.defineProperty(exports,"preloadCommonFonts",{enumerable:true,get:function(){return chunkMNOHUTKE_js.p}});Object.defineProperty(exports,"toArrayBuffer",{enumerable:true,get:function(){return chunkMNOHUTKE_js.s}});Object.defineProperty(exports,"buildAnchorMaps",{enumerable:true,get:function(){return chunk2KHWHVTA_js.d}});Object.defineProperty(exports,"computeSplitDialogDefaults",{enumerable:true,get:function(){return chunk2KHWHVTA_js.e}});Object.defineProperty(exports,"computeSplitLayout",{enumerable:true,get:function(){return chunk2KHWHVTA_js.c}});Object.defineProperty(exports,"redistributeColumnWidths",{enumerable:true,get:function(){return chunk2KHWHVTA_js.b}});Object.defineProperty(exports,"sumColumnWidths",{enumerable:true,get:function(){return chunk2KHWHVTA_js.a}});Object.defineProperty(exports,"CLIPBOARD_TYPES",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.i}});Object.defineProperty(exports,"INTERNAL_CLIPBOARD_TYPE",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.h}});Object.defineProperty(exports,"borderToStyle",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.c}});Object.defineProperty(exports,"cleanWordHtml",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.u}});Object.defineProperty(exports,"copyParagraphs",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.l}});Object.defineProperty(exports,"copyRuns",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.k}});Object.defineProperty(exports,"createClipboardHandlers",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.w}});Object.defineProperty(exports,"getClipboardImageFiles",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.j}});Object.defineProperty(exports,"handlePasteEvent",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.q}});Object.defineProperty(exports,"htmlToRuns",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.v}});Object.defineProperty(exports,"isEditorHtml",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.t}});Object.defineProperty(exports,"isWordHtml",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.s}});Object.defineProperty(exports,"mergeStyles",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.e}});Object.defineProperty(exports,"paragraphToStyle",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.b}});Object.defineProperty(exports,"paragraphsToClipboardContent",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.n}});Object.defineProperty(exports,"parseClipboardHtml",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.r}});Object.defineProperty(exports,"readFromClipboard",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.p}});Object.defineProperty(exports,"resolveShadingFill",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.d}});Object.defineProperty(exports,"runsToClipboardContent",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.m}});Object.defineProperty(exports,"sectionToStyle",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.g}});Object.defineProperty(exports,"tableCellToStyle",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.f}});Object.defineProperty(exports,"textToStyle",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.a}});Object.defineProperty(exports,"writeToClipboard",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.o}});Object.defineProperty(exports,"collectHeadings",{enumerable:true,get:function(){return chunkMZ7LW5CH_js.a}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.m}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.r}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.j}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.i}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.k}});Object.defineProperty(exports,"ensureHexPrefix",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.n}});Object.defineProperty(exports,"generateThemeTintShadeMatrix",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.q}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.g}});Object.defineProperty(exports,"getThemeTintShadeHex",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.p}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.e}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.f}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.l}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.h}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.a}});Object.defineProperty(exports,"resolveColorToHex",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.b}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.c}});Object.defineProperty(exports,"resolveHighlightToCss",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.o}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.d}});Object.defineProperty(exports,"PIXELS_PER_INCH",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.b}});Object.defineProperty(exports,"TWIPS_PER_INCH",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.a}});Object.defineProperty(exports,"clamp",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.o}});Object.defineProperty(exports,"eighthsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.m}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.e}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.g}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.p}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.j}});Object.defineProperty(exports,"halfPointsToPoints",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.k}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.f}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.d}});Object.defineProperty(exports,"pointsToHalfPoints",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.l}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.i}});Object.defineProperty(exports,"roundPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.n}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.h}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.c}});exports.DEFAULT_SELECTION_STYLE=m;exports.HIGH_CONTRAST_SELECTION_STYLE=no;exports.NAVIGATION_SHORTCUTS=s;exports.SELECTION_CSS_VARS=ro;exports.areSelectionStylesInjected=xo;exports.clearSelection=ho;exports.createSelectionChangeHandler=So;exports.describeShortcut=d;exports.expandSelectionToWord=Zt;exports.extendSelectionTo=p;exports.findNextWordStart=b;exports.findPreviousWordStart=y;exports.findVisualLineEnd=T;exports.findVisualLineStart=C;exports.findWordEnd=Yt;exports.findWordStart=Vt;exports.generateSelectionCSS=lo;exports.getHighlightRectStyle=io;exports.getMergedSelectionRects=k;exports.getNavigationShortcutDescriptions=oo;exports.getSelectedText=ao;exports.getSelectionBoundingRect=uo;exports.getSelectionInfo=qt;exports.getSelectionRects=S;exports.getWordAtCursor=eo;exports.handleNavigationKey=Jt;exports.hasActiveSelection=co;exports.highlightTextRange=go;exports.injectSelectionStyles=mo;exports.isNavigationKey=Qt;exports.isPunctuation=jt;exports.isSelectionBackwards=A;exports.isSelectionWithin=so;exports.isWhitespace=x;exports.isWordCharacter=u;exports.matchesShortcut=to;exports.mergeAdjacentRects=N;exports.moveByWord=R;exports.moveToLineEdge=w;exports.normalizeSelectionDirection=po;exports.parseNavigationAction=E;exports.readDocxFileFromInput=bo;exports.removeSelectionStyles=v;exports.selectRange=fo;exports.setSelectionPosition=h;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export{d as MIN_CARD_GAP,c as SIDEBAR_DOCUMENT_SHIFT,b as SIDEBAR_PAGE_GAP,a as SIDEBAR_WIDTH}from'../chunk-PRRM64JO.mjs';export{k as createDoubleClickWordSelector,l as createTripleClickParagraphSelector,h as expandSelectionToWordBoundaries,e as findWordAt,c as findWordBoundaries,d as getWordAt,j as handleClickForMultiClick,i as selectParagraphAtCursor,f as selectWordAtCursor,g as selectWordInTextNode}from'../chunk-OBMN4VSM.mjs';export{n as countPageBreaks,b as createColumnBreak,g as createHorizontalRule,c as createLineBreak,a as createPageBreak,e as createPageBreakParagraph,d as createPageBreakRun,o as findPageBreaks,m as hasPageBreakBefore,h as insertHorizontalRule,f as insertPageBreak,l as isBreakContent,j as isColumnBreak,k as isLineBreak,i as isPageBreak,p as removePageBreak}from'../chunk-WTFLNYAT.mjs';export{b as createDocumentWithText,a as createEmptyDocument}from'../chunk-CKKO4JWE.mjs';export{j as createTemplateProcessor,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';export{l as FONT_MAPPING,h as canRenderFont,q as extractFontsFromDocument,m as getGoogleFontEquivalent,e as getLoadedFonts,c as isFontLoaded,d as isLoading,r as loadDocumentFonts,a as loadFont,k as loadFontDefinitions,i as loadFontFromBuffer,j as loadFontFromUrl,n as loadFontWithMapping,b as loadFonts,o as loadFontsWithMapping,g as onFontError,f as onFontsLoaded,p as preloadCommonFonts,s as toArrayBuffer}from'../chunk-7LRR7RKE.mjs';export{d as buildAnchorMaps,e as computeSplitDialogDefaults,c as computeSplitLayout,b as redistributeColumnWidths,a as sumColumnWidths}from'../chunk-KQTB5Y7P.mjs';export{i as CLIPBOARD_TYPES,h as INTERNAL_CLIPBOARD_TYPE,c as borderToStyle,u as cleanWordHtml,l as copyParagraphs,k as copyRuns,w as createClipboardHandlers,j as getClipboardImageFiles,q as handlePasteEvent,v as htmlToRuns,t as isEditorHtml,s as isWordHtml,e as mergeStyles,b as paragraphToStyle,n as paragraphsToClipboardContent,r as parseClipboardHtml,p as readFromClipboard,d as resolveShadingFill,m as runsToClipboardContent,g as sectionToStyle,f as tableCellToStyle,a as textToStyle,o as writeToClipboard}from'../chunk-MOKKS75W.mjs';export{a as collectHeadings}from'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';export{m as blendColors,r as colorsEqual,j as createRgbColor,i as createThemeColor,k as darkenColor,n as ensureHexPrefix,q as generateThemeTintShadeMatrix,g as getContrastingColor,p as getThemeTintShadeHex,e as isBlack,f as isWhite,l as lightenColor,h as parseColorString,a as resolveColor,b as resolveColorToHex,c as resolveHighlightColor,o as resolveHighlightToCss,d as resolveShadingColor}from'../chunk-67LVRQIR.mjs';export{b as PIXELS_PER_INCH,a as TWIPS_PER_INCH,o as clamp,m as eighthsToPixels,e as emuToPixels,g as emuToTwips,p as formatPx,j as halfPointsToPixels,k as halfPointsToPoints,f as pixelsToEmu,d as pixelsToTwips,l as pointsToHalfPoints,i as pointsToPixels,n as roundPixels,h as twipsToEmu,c as twipsToPixels}from'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';function u(e){return e?/[\p{L}\p{N}_]/u.test(e):false}function x(e){return e?/\s/.test(e):false}function jt(e){return e?/[\p{P}]/u.test(e):false}function Vt(e,t){if(t<=0)return 0;t>e.length&&(t=e.length);let o=t;for(;o>0&&x(e[o-1]);)o--;if(o===0)return 0;for(;o>0&&u(e[o-1]);)o--;return o}function Yt(e,t){if(t>=e.length)return e.length;t<0&&(t=0);let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&x(e[o]);)o++;return o}function b(e,t){if(t>=e.length)return e.length;let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&!u(e[o]);)o++;return o}function y(e,t){if(t<=0)return 0;let o=t;for(;o>0&&!u(e[o-1]);)o--;for(;o>0&&u(e[o-1]);)o--;return o}function C(e,t){if(!window.getSelection())return null;let n=document.createRange();if(e.nodeType===Node.TEXT_NODE){n.setStart(e,Math.min(t,e.textContent?.length||0)),n.collapse(true);let l=n.getBoundingClientRect().top,i=0,c=t;for(;i<c;){let a=Math.floor((i+c)/2);n.setStart(e,a),n.collapse(true);let f=n.getBoundingClientRect();Math.abs(f.top-l)<2?c=a:i=a+1;}return {node:e,offset:i}}return null}function T(e,t){if(!window.getSelection())return null;let n=e.textContent?.length||0,r=document.createRange();if(e.nodeType===Node.TEXT_NODE){r.setStart(e,Math.min(t,n)),r.collapse(true);let i=r.getBoundingClientRect().top,c=t,a=n;for(;c<a;){let f=Math.ceil((c+a)/2);r.setStart(e,f),r.collapse(true);let D=r.getBoundingClientRect();Math.abs(D.top-i)<2?c=f:a=f-1;}return {node:e,offset:c}}return null}function qt(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0);return {node:t.startContainer,offset:t.startOffset,anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,text:e.toString()}}function h(e,t){let o=window.getSelection();if(!o)return;let n=document.createRange(),r=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;n.setStart(e,Math.min(t,r)),n.collapse(true),o.removeAllRanges(),o.addRange(n);}function p(e,t){let o=window.getSelection();if(!(!o||!o.anchorNode))try{o.extend(e,Math.min(t,e.textContent?.length||0));}catch{let n=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;o.setBaseAndExtent(o.anchorNode,o.anchorOffset,e,Math.min(t,n));}}function R(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n||n.nodeType!==Node.TEXT_NODE)return false;let r=n.textContent||"",l=o.focusOffset,i;return e==="left"?i=y(r,l):i=b(r,l),t?p(n,i):h(n,i),true}function w(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n)return false;if(n.nodeType===Node.TEXT_NODE){let i=e==="start"?C(n,o.focusOffset):T(n,o.focusOffset);if(i)return t?p(i.node,i.offset):h(i.node,i.offset),true}let r=n.textContent||"",l=e==="start"?0:r.length;return t?p(n,l):h(n,l),true}function E(e){let{key:t,ctrlKey:o,metaKey:n,shiftKey:r,altKey:l}=e,i=o||n;switch(t){case "ArrowLeft":if(i)return {direction:"left",unit:"word",extend:r};break;case "ArrowRight":if(i)return {direction:"right",unit:"word",extend:r};break;case "Home":return i?{direction:"left",unit:"document",extend:r}:{direction:"left",unit:"line",extend:r};case "End":return i?{direction:"right",unit:"document",extend:r}:{direction:"right",unit:"line",extend:r}}return null}function Jt(e,t){let o=E(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&R(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(w(n,o.extend))return e.preventDefault(),true;break;case "document":if(o.direction==="left"&&t?.onDocumentStart)return e.preventDefault(),t.onDocumentStart(),true;if(o.direction==="right"&&t?.onDocumentEnd)return e.preventDefault(),t.onDocumentEnd(),true;break}return false}function Qt(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function Zt(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return false;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;if(r===l)return false;let i=document.createRange();return i.setStart(t,r),i.setEnd(t,l),e.removeAllRanges(),e.addRange(i),true}function eo(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;return r===l?null:o.slice(r,l)}function to(e,t){let o=e.ctrlKey||e.metaKey,n=t.ctrlKey||t.metaKey;return e.key.toLowerCase()===t.key.toLowerCase()&&o===!!n&&e.shiftKey===!!t.shiftKey&&e.altKey===!!t.altKey}var s={wordLeft:{key:"ArrowLeft",ctrlKey:true},wordRight:{key:"ArrowRight",ctrlKey:true},selectWordLeft:{key:"ArrowLeft",ctrlKey:true,shiftKey:true},selectWordRight:{key:"ArrowRight",ctrlKey:true,shiftKey:true},lineStart:{key:"Home"},lineEnd:{key:"End"},selectToLineStart:{key:"Home",shiftKey:true},selectToLineEnd:{key:"End",shiftKey:true},documentStart:{key:"Home",ctrlKey:true},documentEnd:{key:"End",ctrlKey:true},selectToDocumentStart:{key:"Home",ctrlKey:true,shiftKey:true},selectToDocumentEnd:{key:"End",ctrlKey:true,shiftKey:true}};function d(e){let t=[];if(e.ctrlKey||e.metaKey){let n=typeof navigator<"u"&&/Mac/i.test(navigator.platform);t.push(n?"\u2318":"Ctrl");}e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let o=e.key;return o==="ArrowLeft"?o="\u2190":o==="ArrowRight"?o="\u2192":o==="ArrowUp"?o="\u2191":o==="ArrowDown"&&(o="\u2193"),t.push(o),t.join("+")}function oo(){return [{action:"Move by word (left)",shortcut:d(s.wordLeft)},{action:"Move by word (right)",shortcut:d(s.wordRight)},{action:"Select word (left)",shortcut:d(s.selectWordLeft)},{action:"Select word (right)",shortcut:d(s.selectWordRight)},{action:"Go to line start",shortcut:d(s.lineStart)},{action:"Go to line end",shortcut:d(s.lineEnd)},{action:"Select to line start",shortcut:d(s.selectToLineStart)},{action:"Select to line end",shortcut:d(s.selectToLineEnd)},{action:"Go to document start",shortcut:d(s.documentStart)},{action:"Go to document end",shortcut:d(s.documentEnd)},{action:"Select to document start",shortcut:d(s.selectToDocumentStart)},{action:"Select to document end",shortcut:d(s.selectToDocumentEnd)}]}var m={backgroundColor:"rgba(26, 115, 232, 0.3)",borderRadius:0,zIndex:0,opacity:1,mixBlendMode:"multiply"},no={backgroundColor:"rgba(0, 120, 215, 0.4)",borderColor:"rgba(0, 120, 215, 0.6)",borderRadius:1,zIndex:0,opacity:1},ro={backgroundColor:"--docx-selection-bg",borderColor:"--docx-selection-border",textColor:"--docx-selection-text"};function S(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return [];let o=t.getRangeAt(0);if(e&&!e.contains(o.commonAncestorContainer))return [];let n=o.getClientRects(),r=[],l=0,i=0;if(e){let c=e.getBoundingClientRect();l=c.left+e.scrollLeft,i=c.top+e.scrollTop;}for(let c=0;c<n.length;c++){let a=n[c];a.width===0&&a.height===0||r.push({left:a.left-l,top:a.top-i,width:a.width,height:a.height});}return r}function N(e,t=2){if(e.length<=1)return e;let o=[...e].sort((l,i)=>Math.abs(l.top-i.top)<t?l.left-i.left:l.top-i.top),n=[],r={...o[0]};for(let l=1;l<o.length;l++){let i=o[l],c=Math.abs(i.top-r.top)<t,a=i.left<=r.left+r.width+t;if(c&&a){let f=Math.max(r.left+r.width,i.left+i.width);r.width=f-r.left,r.height=Math.max(r.height,i.height);}else n.push(r),r={...i};}return n.push(r),n}function k(e){let t=S(e);return N(t)}function io(e,t=m){return {position:"absolute",left:`${e.left}px`,top:`${e.top}px`,width:`${e.width}px`,height:`${e.height}px`,backgroundColor:t.backgroundColor,borderRadius:t.borderRadius?`${t.borderRadius}px`:void 0,border:t.borderColor?`1px solid ${t.borderColor}`:void 0,zIndex:t.zIndex??0,opacity:t.opacity??1,mixBlendMode:t.mixBlendMode,pointerEvents:"none",userSelect:"none"}}function lo(e,t=m){let o=t.backgroundColor;return `
|
|
2
|
+
${e}::selection,
|
|
3
|
+
${e} *::selection {
|
|
4
|
+
background-color: ${o} !important;
|
|
5
|
+
color: inherit !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
${e}::-moz-selection,
|
|
9
|
+
${e} *::-moz-selection {
|
|
10
|
+
background-color: ${o} !important;
|
|
11
|
+
color: inherit !important;
|
|
12
|
+
}
|
|
13
|
+
`}function co(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function ao(){let e=window.getSelection();return e?e.toString():""}function so(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let o=t.getRangeAt(0);return e.contains(o.commonAncestorContainer)}function uo(){let e=window.getSelection();return !e||e.rangeCount===0?null:e.getRangeAt(0).getBoundingClientRect()}function go(e,t,o,n,r){try{let l=document.createRange();return l.setStart(t,o),l.setEnd(n,r),l}catch{return null}}function fo(e){let t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e));}function ho(){let e=window.getSelection();e&&e.removeAllRanges();}function A(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.anchorNode,o=e.focusNode;return !t||!o?false:t===o?e.focusOffset<e.anchorOffset:(t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING)!==0}function po(){let e=window.getSelection();if(!e||e.rangeCount===0||!A())return;let t=e.getRangeAt(0),o=document.createRange();o.setStart(t.startContainer,t.startOffset),o.setEnd(t.endContainer,t.endOffset),e.removeAllRanges(),e.addRange(o);}var g=null;function mo(e=m){v();let t=`
|
|
14
|
+
/* DOCX Editor Selection Highlighting */
|
|
15
|
+
|
|
16
|
+
/* Base selection style for all editable content */
|
|
17
|
+
.docx-editor [contenteditable="true"]::selection,
|
|
18
|
+
.docx-editor [contenteditable="true"] *::selection,
|
|
19
|
+
.docx-run-editable::selection,
|
|
20
|
+
.docx-run-editable *::selection {
|
|
21
|
+
background-color: ${e.backgroundColor} !important;
|
|
22
|
+
color: inherit !important;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* Firefox selection */
|
|
26
|
+
.docx-editor [contenteditable="true"]::-moz-selection,
|
|
27
|
+
.docx-editor [contenteditable="true"] *::-moz-selection,
|
|
28
|
+
.docx-run-editable::-moz-selection,
|
|
29
|
+
.docx-run-editable *::-moz-selection {
|
|
30
|
+
background-color: ${e.backgroundColor} !important;
|
|
31
|
+
color: inherit !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* Ensure selection is visible against all backgrounds */
|
|
35
|
+
.docx-run-highlighted::selection,
|
|
36
|
+
.docx-run-highlighted *::selection {
|
|
37
|
+
/* For highlighted (yellow background) text, use darker selection */
|
|
38
|
+
background-color: rgba(26, 115, 232, 0.5) !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.docx-run-highlighted::-moz-selection,
|
|
42
|
+
.docx-run-highlighted *::-moz-selection {
|
|
43
|
+
background-color: rgba(26, 115, 232, 0.5) !important;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Selection in dark text */
|
|
47
|
+
.docx-run-dark-bg::selection,
|
|
48
|
+
.docx-run-dark-bg *::selection {
|
|
49
|
+
/* Use lighter selection for dark backgrounds */
|
|
50
|
+
background-color: rgba(100, 181, 246, 0.5) !important;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.docx-run-dark-bg::-moz-selection,
|
|
54
|
+
.docx-run-dark-bg *::-moz-selection {
|
|
55
|
+
background-color: rgba(100, 181, 246, 0.5) !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Programmatic highlight class */
|
|
59
|
+
.docx-selection-highlight {
|
|
60
|
+
background-color: ${e.backgroundColor};
|
|
61
|
+
${e.borderRadius?`border-radius: ${e.borderRadius}px;`:""}
|
|
62
|
+
${e.mixBlendMode?`mix-blend-mode: ${e.mixBlendMode};`:""}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Find/replace highlight */
|
|
66
|
+
.docx-find-highlight {
|
|
67
|
+
background-color: rgba(255, 235, 59, 0.5);
|
|
68
|
+
border-radius: 2px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.docx-find-highlight-current {
|
|
72
|
+
background-color: rgba(255, 152, 0, 0.6);
|
|
73
|
+
border-radius: 2px;
|
|
74
|
+
outline: 2px solid rgba(255, 152, 0, 0.8);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* AI action selection preview */
|
|
78
|
+
.docx-ai-selection-preview {
|
|
79
|
+
background-color: rgba(156, 39, 176, 0.2);
|
|
80
|
+
border-bottom: 2px dashed rgba(156, 39, 176, 0.6);
|
|
81
|
+
}
|
|
82
|
+
`;g=document.createElement("style"),g.id="docx-selection-styles",g.textContent=t,document.head.appendChild(g);}function v(){g&&(g.remove(),g=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function xo(){return g!==null||document.getElementById("docx-selection-styles")!==null}function So(e,t,o=true){return ()=>{if(!e){t([]);return}let n=o?k(e):S(e);t(n);}}async function bo(e){let t=e.target;if(!t||!t.files)return null;let o=t.files[0];return t.value="",o?{buffer:await o.arrayBuffer(),name:o.name.replace(/\.docx$/i,"")}:null}export{m as DEFAULT_SELECTION_STYLE,no as HIGH_CONTRAST_SELECTION_STYLE,s as NAVIGATION_SHORTCUTS,ro as SELECTION_CSS_VARS,xo as areSelectionStylesInjected,ho as clearSelection,So as createSelectionChangeHandler,d as describeShortcut,Zt as expandSelectionToWord,p as extendSelectionTo,b as findNextWordStart,y as findPreviousWordStart,T as findVisualLineEnd,C as findVisualLineStart,Yt as findWordEnd,Vt as findWordStart,lo as generateSelectionCSS,io as getHighlightRectStyle,k as getMergedSelectionRects,oo as getNavigationShortcutDescriptions,ao as getSelectedText,uo as getSelectionBoundingRect,qt as getSelectionInfo,S as getSelectionRects,eo as getWordAtCursor,Jt as handleNavigationKey,co as hasActiveSelection,go as highlightTextRange,mo as injectSelectionStyles,Qt as isNavigationKey,jt as isPunctuation,A as isSelectionBackwards,so as isSelectionWithin,x as isWhitespace,u as isWordCharacter,to as matchesShortcut,N as mergeAdjacentRects,R as moveByWord,w as moveToLineEdge,po as normalizeSelectionDirection,E as parseNavigationAction,bo as readDocxFileFromInput,v as removeSelectionStyles,fo as selectRange,h as setSelectionPosition};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure list-state helpers used by both adapter toolbars to track
|
|
3
|
+
* whether the selection is in a bullet/numbered list and at what
|
|
4
|
+
* indent level. Lifted from packages/react/src/components/ui/
|
|
5
|
+
* ListButtons.tsx so the React + Vue toolbars share identical
|
|
6
|
+
* state-mutation logic.
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
type ListType = 'bullet' | 'numbered' | 'none';
|
|
11
|
+
interface ListState {
|
|
12
|
+
type: ListType;
|
|
13
|
+
level: number;
|
|
14
|
+
isInList: boolean;
|
|
15
|
+
numId?: number;
|
|
16
|
+
}
|
|
17
|
+
declare function createDefaultListState(): ListState;
|
|
18
|
+
declare function createBulletListState(level?: number, numId?: number): ListState;
|
|
19
|
+
declare function createNumberedListState(level?: number, numId?: number): ListState;
|
|
20
|
+
declare function isBulletListState(state: ListState | undefined): boolean;
|
|
21
|
+
declare function isNumberedListState(state: ListState | undefined): boolean;
|
|
22
|
+
declare function isAnyListState(state: ListState | undefined): boolean;
|
|
23
|
+
declare function getNextIndentLevel(currentLevel: number): number;
|
|
24
|
+
declare function getPreviousIndentLevel(currentLevel: number): number;
|
|
25
|
+
declare function toggleListType(state: ListState | undefined, targetType: ListType): ListState;
|
|
26
|
+
|
|
27
|
+
export { type ListState, type ListType, createBulletListState, createDefaultListState, createNumberedListState, getNextIndentLevel, getPreviousIndentLevel, isAnyListState, isBulletListState, isNumberedListState, toggleListType };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure list-state helpers used by both adapter toolbars to track
|
|
3
|
+
* whether the selection is in a bullet/numbered list and at what
|
|
4
|
+
* indent level. Lifted from packages/react/src/components/ui/
|
|
5
|
+
* ListButtons.tsx so the React + Vue toolbars share identical
|
|
6
|
+
* state-mutation logic.
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
* @public
|
|
9
|
+
*/
|
|
10
|
+
type ListType = 'bullet' | 'numbered' | 'none';
|
|
11
|
+
interface ListState {
|
|
12
|
+
type: ListType;
|
|
13
|
+
level: number;
|
|
14
|
+
isInList: boolean;
|
|
15
|
+
numId?: number;
|
|
16
|
+
}
|
|
17
|
+
declare function createDefaultListState(): ListState;
|
|
18
|
+
declare function createBulletListState(level?: number, numId?: number): ListState;
|
|
19
|
+
declare function createNumberedListState(level?: number, numId?: number): ListState;
|
|
20
|
+
declare function isBulletListState(state: ListState | undefined): boolean;
|
|
21
|
+
declare function isNumberedListState(state: ListState | undefined): boolean;
|
|
22
|
+
declare function isAnyListState(state: ListState | undefined): boolean;
|
|
23
|
+
declare function getNextIndentLevel(currentLevel: number): number;
|
|
24
|
+
declare function getPreviousIndentLevel(currentLevel: number): number;
|
|
25
|
+
declare function toggleListType(state: ListState | undefined, targetType: ListType): ListState;
|
|
26
|
+
|
|
27
|
+
export { type ListState, type ListType, createBulletListState, createDefaultListState, createNumberedListState, getNextIndentLevel, getPreviousIndentLevel, isAnyListState, isBulletListState, isNumberedListState, toggleListType };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');function r(){return {type:"none",level:0,isInList:false}}function i(e=0,t){return {type:"bullet",level:e,isInList:true,numId:t}}function u(e=0,t){return {type:"numbered",level:e,isInList:true,numId:t}}function s(e){return e?.type==="bullet"}function o(e){return e?.type==="numbered"}function l(e){return e?.isInList===true}function L(e){return Math.min(e+1,8)}function a(e){return Math.max(e-1,0)}function b(e,t){if(e?.type===t)return r();let n=e?.isInList?e.level:0;return t==="bullet"?i(n):t==="numbered"?u(n):r()}exports.createBulletListState=i;exports.createDefaultListState=r;exports.createNumberedListState=u;exports.getNextIndentLevel=L;exports.getPreviousIndentLevel=a;exports.isAnyListState=l;exports.isBulletListState=s;exports.isNumberedListState=o;exports.toggleListType=b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import'../chunk-QYUPLKLP.mjs';function r(){return {type:"none",level:0,isInList:false}}function i(e=0,t){return {type:"bullet",level:e,isInList:true,numId:t}}function u(e=0,t){return {type:"numbered",level:e,isInList:true,numId:t}}function s(e){return e?.type==="bullet"}function o(e){return e?.type==="numbered"}function l(e){return e?.isInList===true}function L(e){return Math.min(e+1,8)}function a(e){return Math.max(e-1,0)}function b(e,t){if(e?.type===t)return r();let n=e?.isInList?e.level:0;return t==="bullet"?i(n):t==="numbered"?u(n):r()}export{i as createBulletListState,r as createDefaultListState,u as createNumberedListState,L as getNextIndentLevel,a as getPreviousIndentLevel,l as isAnyListState,s as isBulletListState,o as isNumberedListState,b as toggleListType};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-agnostic helper to open a pre-filled GitHub "new issue"
|
|
3
|
+
* URL for the Help > Report issue action. GitHub doesn't allow file
|
|
4
|
+
* attachments via URL params, so the body asks the user to drag-drop
|
|
5
|
+
* their DOCX onto the issue after it opens.
|
|
6
|
+
*
|
|
7
|
+
* Lifted from packages/react/src/components/reportIssue.ts so the
|
|
8
|
+
* Vue adapter can re-use it without re-implementing.
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
interface ReportIssueEnv {
|
|
13
|
+
userAgent?: string;
|
|
14
|
+
viewport?: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
pageUrl?: string;
|
|
19
|
+
}
|
|
20
|
+
declare function buildReportIssueUrl(env?: ReportIssueEnv): string;
|
|
21
|
+
declare function openReportIssue(env?: ReportIssueEnv): void;
|
|
22
|
+
|
|
23
|
+
export { type ReportIssueEnv, buildReportIssueUrl, openReportIssue };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-agnostic helper to open a pre-filled GitHub "new issue"
|
|
3
|
+
* URL for the Help > Report issue action. GitHub doesn't allow file
|
|
4
|
+
* attachments via URL params, so the body asks the user to drag-drop
|
|
5
|
+
* their DOCX onto the issue after it opens.
|
|
6
|
+
*
|
|
7
|
+
* Lifted from packages/react/src/components/reportIssue.ts so the
|
|
8
|
+
* Vue adapter can re-use it without re-implementing.
|
|
9
|
+
* @packageDocumentation
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
interface ReportIssueEnv {
|
|
13
|
+
userAgent?: string;
|
|
14
|
+
viewport?: {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
pageUrl?: string;
|
|
19
|
+
}
|
|
20
|
+
declare function buildReportIssueUrl(env?: ReportIssueEnv): string;
|
|
21
|
+
declare function openReportIssue(env?: ReportIssueEnv): void;
|
|
22
|
+
|
|
23
|
+
export { type ReportIssueEnv, buildReportIssueUrl, openReportIssue };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');var i="https://github.com/eigenpal/docx-editor/issues/new";function s(e={}){let n=e.userAgent??(typeof navigator<"u"?navigator.userAgent:"unknown"),t=e.viewport??(typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}),o=["### What happened","","### Steps to reproduce","1. ","2. ","3. ","","### Expected","","### Actual","","### Attach the DOCX","Please drag the `.docx` file that reproduces this onto the issue (below this text box). Bugs are much faster to fix with a real file.","","### Environment",`- URL: ${e.pageUrl??(typeof window<"u"?window.location.href:"")}`,`- Viewport: ${t.width} x ${t.height}`,`- User agent: ${n}`,""].join(`
|
|
2
|
+
`),r=new URLSearchParams({title:"[Bug] ",body:o});return `${i}?${r.toString()}`}function d(e){typeof window>"u"||window.open(s(e),"_blank","noopener,noreferrer");}exports.buildReportIssueUrl=s;exports.openReportIssue=d;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import'../chunk-QYUPLKLP.mjs';var i="https://github.com/eigenpal/docx-editor/issues/new";function s(e={}){let n=e.userAgent??(typeof navigator<"u"?navigator.userAgent:"unknown"),t=e.viewport??(typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0}),o=["### What happened","","### Steps to reproduce","1. ","2. ","3. ","","### Expected","","### Actual","","### Attach the DOCX","Please drag the `.docx` file that reproduces this onto the issue (below this text box). Bugs are much faster to fix with a real file.","","### Environment",`- URL: ${e.pageUrl??(typeof window<"u"?window.location.href:"")}`,`- Viewport: ${t.width} x ${t.height}`,`- User agent: ${n}`,""].join(`
|
|
2
|
+
`),r=new URLSearchParams({title:"[Bug] ",body:o});return `${i}?${r.toString()}`}function d(e){typeof window>"u"||window.open(s(e),"_blank","noopener,noreferrer");}export{s as buildReportIssueUrl,d as openReportIssue};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Sidebar geometry constants — shared by both adapters so the
|
|
2
|
+
* page-shift and card-gap math stays consistent.
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
* @public */
|
|
5
|
+
declare const SIDEBAR_WIDTH = 340;
|
|
6
|
+
declare const SIDEBAR_PAGE_GAP = 12;
|
|
7
|
+
declare const SIDEBAR_DOCUMENT_SHIFT: number;
|
|
8
|
+
declare const MIN_CARD_GAP = 8;
|
|
9
|
+
|
|
10
|
+
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Sidebar geometry constants — shared by both adapters so the
|
|
2
|
+
* page-shift and card-gap math stays consistent.
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
* @public */
|
|
5
|
+
declare const SIDEBAR_WIDTH = 340;
|
|
6
|
+
declare const SIDEBAR_PAGE_GAP = 12;
|
|
7
|
+
declare const SIDEBAR_DOCUMENT_SHIFT: number;
|
|
8
|
+
declare const MIN_CARD_GAP = 8;
|
|
9
|
+
|
|
10
|
+
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkAAPBAMD7_js=require('../chunk-AAPBAMD7.js');require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"MIN_CARD_GAP",{enumerable:true,get:function(){return chunkAAPBAMD7_js.d}});Object.defineProperty(exports,"SIDEBAR_DOCUMENT_SHIFT",{enumerable:true,get:function(){return chunkAAPBAMD7_js.c}});Object.defineProperty(exports,"SIDEBAR_PAGE_GAP",{enumerable:true,get:function(){return chunkAAPBAMD7_js.b}});Object.defineProperty(exports,"SIDEBAR_WIDTH",{enumerable:true,get:function(){return chunkAAPBAMD7_js.a}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{d as MIN_CARD_GAP,c as SIDEBAR_DOCUMENT_SHIFT,b as SIDEBAR_PAGE_GAP,a as SIDEBAR_WIDTH}from'../chunk-PRRM64JO.mjs';import'../chunk-QYUPLKLP.mjs';
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text Selection Utilities
|
|
3
|
+
*
|
|
4
|
+
* Utilities for word-level and paragraph-level text selection.
|
|
5
|
+
* Used for double-click (word) and triple-click (paragraph) selection.
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Check if a character is a word character
|
|
11
|
+
*/
|
|
12
|
+
declare function isWordCharacter(char: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Check if a character is whitespace
|
|
15
|
+
*/
|
|
16
|
+
declare function isWhitespace(char: string): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Find word boundaries around a position in text
|
|
19
|
+
* Returns [startIndex, endIndex] inclusive start, exclusive end
|
|
20
|
+
*/
|
|
21
|
+
declare function findWordBoundaries(text: string, position: number): [number, number];
|
|
22
|
+
/**
|
|
23
|
+
* Get the word at a position in text
|
|
24
|
+
*/
|
|
25
|
+
declare function getWordAt(text: string, position: number): string;
|
|
26
|
+
/**
|
|
27
|
+
* Word selection result
|
|
28
|
+
*/
|
|
29
|
+
interface WordSelectionResult {
|
|
30
|
+
/** The selected word */
|
|
31
|
+
word: string;
|
|
32
|
+
/** Start index in the text (inclusive) */
|
|
33
|
+
startIndex: number;
|
|
34
|
+
/** End index in the text (exclusive) */
|
|
35
|
+
endIndex: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Find the word at a position and return detailed info
|
|
39
|
+
*/
|
|
40
|
+
declare function findWordAt(text: string, position: number): WordSelectionResult;
|
|
41
|
+
/**
|
|
42
|
+
* Select a word at the current cursor position using the browser's native APIs.
|
|
43
|
+
* This works reliably across different browsers and handles contentEditable well.
|
|
44
|
+
*/
|
|
45
|
+
declare function selectWordAtCursor(): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Select a word in a specific text node at the given offset
|
|
48
|
+
*/
|
|
49
|
+
declare function selectWordInTextNode(textNode: Text, offset: number): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Expand the current selection to word boundaries.
|
|
52
|
+
* If there's a collapsed selection (cursor), selects the word at cursor.
|
|
53
|
+
* If there's an existing selection, expands to include complete words.
|
|
54
|
+
*/
|
|
55
|
+
declare function expandSelectionToWordBoundaries(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Select the entire paragraph containing the current selection.
|
|
58
|
+
* Looks for the nearest element with [data-paragraph-index] attribute.
|
|
59
|
+
*/
|
|
60
|
+
declare function selectParagraphAtCursor(): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Handle click event for multi-click detection.
|
|
63
|
+
* Call this in your click handler.
|
|
64
|
+
* Returns the click count (1 = single, 2 = double, 3 = triple).
|
|
65
|
+
*/
|
|
66
|
+
declare function handleClickForMultiClick(event: MouseEvent): number;
|
|
67
|
+
/**
|
|
68
|
+
* Create a double-click handler that selects words.
|
|
69
|
+
* Returns a function that should be called on dblclick events.
|
|
70
|
+
*/
|
|
71
|
+
declare function createDoubleClickWordSelector(): (event: MouseEvent) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Create a triple-click handler that selects paragraphs.
|
|
74
|
+
* This uses our custom click counting since browsers have inconsistent triple-click.
|
|
75
|
+
*/
|
|
76
|
+
declare function createTripleClickParagraphSelector(): (event: MouseEvent) => void;
|
|
77
|
+
declare const _default: {
|
|
78
|
+
isWordCharacter: typeof isWordCharacter;
|
|
79
|
+
isWhitespace: typeof isWhitespace;
|
|
80
|
+
findWordBoundaries: typeof findWordBoundaries;
|
|
81
|
+
getWordAt: typeof getWordAt;
|
|
82
|
+
findWordAt: typeof findWordAt;
|
|
83
|
+
selectWordAtCursor: typeof selectWordAtCursor;
|
|
84
|
+
selectWordInTextNode: typeof selectWordInTextNode;
|
|
85
|
+
expandSelectionToWordBoundaries: typeof expandSelectionToWordBoundaries;
|
|
86
|
+
selectParagraphAtCursor: typeof selectParagraphAtCursor;
|
|
87
|
+
handleClickForMultiClick: typeof handleClickForMultiClick;
|
|
88
|
+
createDoubleClickWordSelector: typeof createDoubleClickWordSelector;
|
|
89
|
+
createTripleClickParagraphSelector: typeof createTripleClickParagraphSelector;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export { type WordSelectionResult, createDoubleClickWordSelector, createTripleClickParagraphSelector, _default as default, expandSelectionToWordBoundaries, findWordAt, findWordBoundaries, getWordAt, handleClickForMultiClick, isWhitespace, isWordCharacter, selectParagraphAtCursor, selectWordAtCursor, selectWordInTextNode };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Text Selection Utilities
|
|
3
|
+
*
|
|
4
|
+
* Utilities for word-level and paragraph-level text selection.
|
|
5
|
+
* Used for double-click (word) and triple-click (paragraph) selection.
|
|
6
|
+
* @packageDocumentation
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Check if a character is a word character
|
|
11
|
+
*/
|
|
12
|
+
declare function isWordCharacter(char: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Check if a character is whitespace
|
|
15
|
+
*/
|
|
16
|
+
declare function isWhitespace(char: string): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Find word boundaries around a position in text
|
|
19
|
+
* Returns [startIndex, endIndex] inclusive start, exclusive end
|
|
20
|
+
*/
|
|
21
|
+
declare function findWordBoundaries(text: string, position: number): [number, number];
|
|
22
|
+
/**
|
|
23
|
+
* Get the word at a position in text
|
|
24
|
+
*/
|
|
25
|
+
declare function getWordAt(text: string, position: number): string;
|
|
26
|
+
/**
|
|
27
|
+
* Word selection result
|
|
28
|
+
*/
|
|
29
|
+
interface WordSelectionResult {
|
|
30
|
+
/** The selected word */
|
|
31
|
+
word: string;
|
|
32
|
+
/** Start index in the text (inclusive) */
|
|
33
|
+
startIndex: number;
|
|
34
|
+
/** End index in the text (exclusive) */
|
|
35
|
+
endIndex: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Find the word at a position and return detailed info
|
|
39
|
+
*/
|
|
40
|
+
declare function findWordAt(text: string, position: number): WordSelectionResult;
|
|
41
|
+
/**
|
|
42
|
+
* Select a word at the current cursor position using the browser's native APIs.
|
|
43
|
+
* This works reliably across different browsers and handles contentEditable well.
|
|
44
|
+
*/
|
|
45
|
+
declare function selectWordAtCursor(): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Select a word in a specific text node at the given offset
|
|
48
|
+
*/
|
|
49
|
+
declare function selectWordInTextNode(textNode: Text, offset: number): boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Expand the current selection to word boundaries.
|
|
52
|
+
* If there's a collapsed selection (cursor), selects the word at cursor.
|
|
53
|
+
* If there's an existing selection, expands to include complete words.
|
|
54
|
+
*/
|
|
55
|
+
declare function expandSelectionToWordBoundaries(): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Select the entire paragraph containing the current selection.
|
|
58
|
+
* Looks for the nearest element with [data-paragraph-index] attribute.
|
|
59
|
+
*/
|
|
60
|
+
declare function selectParagraphAtCursor(): boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Handle click event for multi-click detection.
|
|
63
|
+
* Call this in your click handler.
|
|
64
|
+
* Returns the click count (1 = single, 2 = double, 3 = triple).
|
|
65
|
+
*/
|
|
66
|
+
declare function handleClickForMultiClick(event: MouseEvent): number;
|
|
67
|
+
/**
|
|
68
|
+
* Create a double-click handler that selects words.
|
|
69
|
+
* Returns a function that should be called on dblclick events.
|
|
70
|
+
*/
|
|
71
|
+
declare function createDoubleClickWordSelector(): (event: MouseEvent) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Create a triple-click handler that selects paragraphs.
|
|
74
|
+
* This uses our custom click counting since browsers have inconsistent triple-click.
|
|
75
|
+
*/
|
|
76
|
+
declare function createTripleClickParagraphSelector(): (event: MouseEvent) => void;
|
|
77
|
+
declare const _default: {
|
|
78
|
+
isWordCharacter: typeof isWordCharacter;
|
|
79
|
+
isWhitespace: typeof isWhitespace;
|
|
80
|
+
findWordBoundaries: typeof findWordBoundaries;
|
|
81
|
+
getWordAt: typeof getWordAt;
|
|
82
|
+
findWordAt: typeof findWordAt;
|
|
83
|
+
selectWordAtCursor: typeof selectWordAtCursor;
|
|
84
|
+
selectWordInTextNode: typeof selectWordInTextNode;
|
|
85
|
+
expandSelectionToWordBoundaries: typeof expandSelectionToWordBoundaries;
|
|
86
|
+
selectParagraphAtCursor: typeof selectParagraphAtCursor;
|
|
87
|
+
handleClickForMultiClick: typeof handleClickForMultiClick;
|
|
88
|
+
createDoubleClickWordSelector: typeof createDoubleClickWordSelector;
|
|
89
|
+
createTripleClickParagraphSelector: typeof createTripleClickParagraphSelector;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export { type WordSelectionResult, createDoubleClickWordSelector, createTripleClickParagraphSelector, _default as default, expandSelectionToWordBoundaries, findWordAt, findWordBoundaries, getWordAt, handleClickForMultiClick, isWhitespace, isWordCharacter, selectParagraphAtCursor, selectWordAtCursor, selectWordInTextNode };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';Object.defineProperty(exports,'__esModule',{value:true});var chunkWLKRUBY4_js=require('../chunk-WLKRUBY4.js');require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"createDoubleClickWordSelector",{enumerable:true,get:function(){return chunkWLKRUBY4_js.k}});Object.defineProperty(exports,"createTripleClickParagraphSelector",{enumerable:true,get:function(){return chunkWLKRUBY4_js.l}});Object.defineProperty(exports,"default",{enumerable:true,get:function(){return chunkWLKRUBY4_js.m}});Object.defineProperty(exports,"expandSelectionToWordBoundaries",{enumerable:true,get:function(){return chunkWLKRUBY4_js.h}});Object.defineProperty(exports,"findWordAt",{enumerable:true,get:function(){return chunkWLKRUBY4_js.e}});Object.defineProperty(exports,"findWordBoundaries",{enumerable:true,get:function(){return chunkWLKRUBY4_js.c}});Object.defineProperty(exports,"getWordAt",{enumerable:true,get:function(){return chunkWLKRUBY4_js.d}});Object.defineProperty(exports,"handleClickForMultiClick",{enumerable:true,get:function(){return chunkWLKRUBY4_js.j}});Object.defineProperty(exports,"isWhitespace",{enumerable:true,get:function(){return chunkWLKRUBY4_js.b}});Object.defineProperty(exports,"isWordCharacter",{enumerable:true,get:function(){return chunkWLKRUBY4_js.a}});Object.defineProperty(exports,"selectParagraphAtCursor",{enumerable:true,get:function(){return chunkWLKRUBY4_js.i}});Object.defineProperty(exports,"selectWordAtCursor",{enumerable:true,get:function(){return chunkWLKRUBY4_js.f}});Object.defineProperty(exports,"selectWordInTextNode",{enumerable:true,get:function(){return chunkWLKRUBY4_js.g}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{k as createDoubleClickWordSelector,l as createTripleClickParagraphSelector,m as default,h as expandSelectionToWordBoundaries,e as findWordAt,c as findWordBoundaries,d as getWordAt,j as handleClickForMultiClick,b as isWhitespace,a as isWordCharacter,i as selectParagraphAtCursor,f as selectWordAtCursor,g as selectWordInTextNode}from'../chunk-OBMN4VSM.mjs';import'../chunk-QYUPLKLP.mjs';
|