@eigenpal/docx-editor-core 1.4.0 → 1.6.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/dist/agent/index.d.mts +8 -7
- package/dist/agent/index.d.ts +8 -7
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-2KPOGFFR.js +1 -0
- package/dist/{chunk-KXVCCT2A.js → chunk-2KUOYHXX.js} +1 -1
- package/dist/chunk-2LVK7EF5.mjs +2 -0
- package/dist/chunk-2ZTKTE7P.js +1 -0
- package/dist/{chunk-C45EFOVP.js → chunk-34DJT72K.js} +1 -1
- package/dist/chunk-3HLRRK6N.mjs +2 -0
- package/dist/chunk-4272FQ2E.js +1 -0
- package/dist/chunk-4DCTKHS5.js +1 -0
- package/dist/chunk-4JPHW7ZI.js +2 -0
- package/dist/chunk-4QJEMD23.mjs +4 -0
- package/dist/chunk-4QSFBX26.mjs +1 -0
- package/dist/chunk-4SZAFWLV.mjs +1 -0
- package/dist/{chunk-GGUHM74A.mjs → chunk-5JULVEYK.mjs} +1 -1
- package/dist/chunk-6AGU57TL.mjs +1 -0
- package/dist/chunk-6ENZQGYR.mjs +1 -0
- package/dist/chunk-6KYOT4E7.js +4 -0
- package/dist/chunk-77X765ZO.js +1 -0
- package/dist/chunk-7UMOUKSF.js +1 -0
- package/dist/chunk-AXVWVIIN.js +1 -0
- package/dist/chunk-B6FA4MJ5.mjs +1 -0
- package/dist/chunk-BBJMUBTD.mjs +1 -0
- package/dist/chunk-BJSG6TEG.js +1 -0
- package/dist/chunk-BKP5QMTS.js +1 -0
- package/dist/chunk-C57BOE7B.mjs +2 -0
- package/dist/chunk-CDBKFBC2.mjs +15 -0
- package/dist/{chunk-BUEMXRXH.js → chunk-CDGV7CLS.js} +1 -1
- package/dist/{chunk-6IZOFIQH.js → chunk-CWPIXUU2.js} +1 -1
- package/dist/chunk-DX5XU6JN.js +1 -0
- package/dist/chunk-E7UN3PVC.mjs +1 -0
- package/dist/chunk-EJ2JAYRI.js +1 -0
- package/dist/{chunk-CHN26LLL.mjs → chunk-F24WZXN4.mjs} +1 -1
- package/dist/{chunk-2SGJZYQF.js → chunk-F44XU6G5.js} +1 -1
- package/dist/{chunk-TE2AF7FM.js → chunk-FETIBXTH.js} +1 -1
- package/dist/{chunk-CZSAC65M.js → chunk-GFM6PERG.js} +1 -1
- package/dist/chunk-GLPOVLZD.mjs +1 -0
- package/dist/chunk-H57LNDBH.js +1 -0
- package/dist/chunk-HEJJXAXN.mjs +1 -0
- package/dist/chunk-ILPNMG7Q.js +1 -0
- package/dist/chunk-IM56AITE.mjs +1 -0
- package/dist/{chunk-BH3ACQ3M.js → chunk-JQUIUKRO.js} +3 -3
- package/dist/chunk-KK673XRZ.mjs +1 -0
- package/dist/chunk-KNY7SXPJ.mjs +1 -0
- package/dist/{chunk-DFUWJHKF.mjs → chunk-KSW6W2EK.mjs} +4 -4
- package/dist/chunk-LVUL7O27.js +1 -0
- package/dist/{chunk-SCK6ZM5V.js → chunk-LW5OFHSW.js} +2 -2
- package/dist/chunk-M65C4SQJ.mjs +2 -0
- package/dist/chunk-MA3HLGFO.js +1 -0
- package/dist/chunk-MWOHCSZE.js +1 -0
- package/dist/chunk-NO6PIL32.mjs +1 -0
- package/dist/chunk-NTBZRITU.mjs +1 -0
- package/dist/chunk-NTYJIOUE.js +2 -0
- package/dist/chunk-NY36MZ55.mjs +1 -0
- package/dist/chunk-PJEB3ZWG.mjs +3 -0
- package/dist/chunk-Q2VALXEU.js +3 -0
- package/dist/chunk-QVRMX2AC.js +15 -0
- package/dist/{chunk-FYRJTDC4.mjs → chunk-QZPVZY6S.mjs} +1 -1
- package/dist/{chunk-3QPKTG2Y.js → chunk-RGHRXIIZ.js} +3 -3
- package/dist/chunk-RRJKF2XI.mjs +1 -0
- package/dist/{chunk-ZBCFIW2V.js → chunk-T3UP6LF5.js} +1 -1
- package/dist/chunk-UC7JW66O.mjs +1 -0
- package/dist/chunk-V3NE7Q22.js +2 -0
- package/dist/chunk-VDKSZ5BQ.mjs +1 -0
- package/dist/chunk-VJFIAFZ5.mjs +1 -0
- package/dist/chunk-WCB25ESG.mjs +1 -0
- package/dist/chunk-WEQA5PPW.mjs +1 -0
- package/dist/{chunk-HPAUUQAX.mjs → chunk-WQJWT4RB.mjs} +1 -1
- package/dist/chunk-WWG6PUWU.js +1 -0
- package/dist/chunk-X6AICTHN.js +1 -0
- package/dist/{chunk-YNUPP7UG.mjs → chunk-XTPT4TNP.mjs} +2 -2
- package/dist/{chunk-CHTIWTHQ.mjs → chunk-YMXWLXVF.mjs} +1 -1
- package/dist/{colorResolver-8A-qj-LP.d.ts → colorResolver-C696sd9x.d.ts} +1 -1
- package/dist/{colorResolver-BCvxTlLF.d.mts → colorResolver-DCBfI4ld.d.mts} +1 -1
- package/dist/{content-C8fc_tL6.d.ts → content-BebvPfXc.d.ts} +4 -148
- package/dist/{content-3xF4WDE8.d.mts → content-CbBCrsr0.d.mts} +4 -148
- package/dist/{contentControlValues-DGDKD589.d.ts → contentControlValues-Com1GnZS.d.ts} +1 -1
- package/dist/{contentControlValues-DjWvoJQ-.d.mts → contentControlValues-DVJyudKU.d.mts} +1 -1
- package/dist/core-plugins.d.mts +5 -4
- package/dist/core-plugins.d.ts +5 -4
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +12 -11
- package/dist/core.d.ts +12 -11
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{documentStyles-qR0VR2s0.d.mts → documentStyles-1G0xTl1v.d.mts} +1 -1
- package/dist/{documentStyles-C7k_8Sye.d.ts → documentStyles-Bw98BwEy.d.ts} +1 -1
- package/dist/docx/index.d.mts +8 -68
- package/dist/docx/index.d.ts +8 -68
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +5 -4
- package/dist/docx/parser.d.ts +5 -4
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +5 -4
- package/dist/docx/rezip.d.ts +5 -4
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +6 -5
- package/dist/docx/serializer/index.d.ts +6 -5
- package/dist/docx/serializer/index.js +1 -1
- package/dist/docx/serializer/index.mjs +1 -1
- package/dist/editor/index.d.mts +5 -4
- package/dist/editor/index.d.ts +5 -4
- package/dist/editor/index.js +1 -1
- package/dist/editor/index.mjs +1 -1
- package/dist/executor-FHL5D4CB.js +1 -0
- package/dist/executor-FL6XGVP3.mjs +1 -0
- package/dist/{fontLoader-CUS1BPv7.d.mts → fontLoader-B4uFKpAy.d.mts} +48 -5
- package/dist/{fontLoader-Dl9SEKex.d.ts → fontLoader-D9SBYuZZ.d.ts} +48 -5
- package/dist/{formatting-BH4hcZiq.d.mts → formatting-DFtuRFQY.d.mts} +13 -0
- package/dist/{formatting-_OXU8gLB.d.ts → formatting-JhqWT_XM.d.ts} +13 -0
- package/dist/{headerFooterLayout-AtAOhM8E.d.ts → headerFooterLayout-CtVsfqxQ.d.ts} +2 -2
- package/dist/{headerFooterLayout-CU6hvszp.d.mts → headerFooterLayout-D2LZLkDC.d.mts} +2 -2
- package/dist/headless.d.mts +10 -9
- package/dist/headless.d.ts +10 -9
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/clickToPositionDom.js +1 -1
- package/dist/layout-bridge/clickToPositionDom.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +70 -7
- package/dist/layout-bridge/index.d.ts +70 -7
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +4 -3
- package/dist/layout-bridge/measuring/index.d.ts +4 -3
- package/dist/layout-bridge/measuring/index.js +1 -1
- package/dist/layout-bridge/measuring/index.mjs +1 -1
- package/dist/layout-bridge/tableInsertHover.js +1 -1
- package/dist/layout-bridge/tableInsertHover.mjs +1 -1
- package/dist/layout-bridge/toFlowBlocks.d.mts +5 -4
- package/dist/layout-bridge/toFlowBlocks.d.ts +5 -4
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +5 -4
- package/dist/layout-engine/index.d.ts +5 -4
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +22 -10
- package/dist/layout-engine/types.d.ts +22 -10
- package/dist/layout-painter/index.d.mts +6 -5
- package/dist/layout-painter/index.d.ts +6 -5
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +6 -5
- package/dist/layout-painter/renderPage.d.ts +6 -5
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/lists-Bn29SzeS.d.ts +148 -0
- package/dist/lists-CyGxd5Y2.d.mts +148 -0
- package/dist/managers/AutoSaveManager.d.mts +5 -4
- package/dist/managers/AutoSaveManager.d.ts +5 -4
- package/dist/managers/TableSelectionManager.d.mts +5 -4
- package/dist/managers/TableSelectionManager.d.ts +5 -4
- package/dist/managers/types.d.mts +5 -4
- package/dist/managers/types.d.ts +5 -4
- package/dist/{marks-BY573yZn.d.mts → marks-CzrbFi4o.d.mts} +1 -1
- package/dist/{marks-CjC9tF5k.d.ts → marks-Dq1QsxKA.d.ts} +1 -1
- package/dist/mcp-cli.mjs +23 -23
- package/dist/mcp.d.mts +5 -4
- package/dist/mcp.d.ts +5 -4
- package/dist/mcp.js +8 -8
- package/dist/mcp.mjs +7 -7
- package/dist/{nodes-75Q9GBxV.d.ts → nodes-Bd6tTkp0.d.ts} +17 -2
- package/dist/{nodes-cEI7hVY2.d.mts → nodes-BvO8GGD4.d.mts} +17 -2
- package/dist/numberingParser-ZSQ3SDCV.d.ts +81 -0
- package/dist/numberingParser-nSPZlzKr.d.mts +81 -0
- package/dist/prosemirror/applyFormatting.d.mts +39 -6
- package/dist/prosemirror/applyFormatting.d.ts +39 -6
- package/dist/prosemirror/applyFormatting.js +1 -1
- package/dist/prosemirror/applyFormatting.mjs +1 -1
- package/dist/prosemirror/cellDragSelection.d.mts +46 -0
- package/dist/prosemirror/cellDragSelection.d.ts +46 -0
- package/dist/prosemirror/cellDragSelection.js +1 -0
- package/dist/prosemirror/cellDragSelection.mjs +1 -0
- package/dist/prosemirror/commands/formatting.d.mts +2 -2
- package/dist/prosemirror/commands/formatting.d.ts +2 -2
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.d.mts +34 -4
- package/dist/prosemirror/commands/index.d.ts +34 -4
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -1
- package/dist/prosemirror/commands/paragraph.d.mts +11 -1
- package/dist/prosemirror/commands/paragraph.d.ts +11 -1
- package/dist/prosemirror/commands/paragraph.js +1 -1
- package/dist/prosemirror/commands/paragraph.mjs +1 -1
- package/dist/prosemirror/commands/sectionBreak.d.mts +25 -0
- package/dist/prosemirror/commands/sectionBreak.d.ts +25 -0
- package/dist/prosemirror/commands/sectionBreak.js +1 -0
- package/dist/prosemirror/commands/sectionBreak.mjs +1 -0
- package/dist/prosemirror/commentIdAllocator.d.mts +4 -3
- package/dist/prosemirror/commentIdAllocator.d.ts +4 -3
- package/dist/prosemirror/commentOps.d.mts +4 -3
- package/dist/prosemirror/commentOps.d.ts +4 -3
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +5 -4
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +5 -4
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +5 -4
- package/dist/prosemirror/conversion/index.d.ts +5 -4
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/editor.css +13 -0
- package/dist/prosemirror/extensions/index.d.mts +1 -1
- package/dist/prosemirror/extensions/index.d.ts +1 -1
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -1
- package/dist/prosemirror/index.d.mts +21 -11
- package/dist/prosemirror/index.d.ts +21 -11
- package/dist/prosemirror/index.js +3 -3
- package/dist/prosemirror/index.mjs +3 -3
- package/dist/prosemirror/plugins/index.d.mts +6 -5
- package/dist/prosemirror/plugins/index.d.ts +6 -5
- package/dist/prosemirror/plugins/index.js +1 -1
- package/dist/prosemirror/plugins/index.mjs +1 -1
- package/dist/prosemirror/plugins/selectionTracker.d.mts +1 -1
- package/dist/prosemirror/plugins/selectionTracker.d.ts +1 -1
- package/dist/prosemirror/queries.d.mts +46 -4
- package/dist/prosemirror/queries.d.ts +46 -4
- package/dist/prosemirror/queries.js +2 -2
- package/dist/prosemirror/queries.mjs +2 -2
- package/dist/prosemirror/schema/index.d.mts +6 -5
- package/dist/prosemirror/schema/index.d.ts +6 -5
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/styles/index.d.mts +2 -2
- package/dist/prosemirror/styles/index.d.ts +2 -2
- package/dist/prosemirror/tableResize.js +1 -1
- package/dist/prosemirror/tableResize.mjs +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +4 -3
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +4 -3
- package/dist/prosemirror/utils/extractTrackedChanges.js +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -1
- package/dist/{sectionPropertiesSerializer-uXyGONxu.d.ts → sectionPropertiesSerializer-CzgskSoA.d.ts} +1 -1
- package/dist/{sectionPropertiesSerializer-D86QlzlT.d.mts → sectionPropertiesSerializer-D3yI82iZ.d.mts} +1 -1
- package/dist/{selectionContext-BPAqgNgk.d.ts → selectionContext-BJZZW1JA.d.ts} +1 -1
- package/dist/{selectionContext-CoZat7QZ.d.mts → selectionContext-BjMyVQZO.d.mts} +1 -1
- package/dist/{styles-BOJ93SAm.d.mts → styles-Dqec8Aw6.d.mts} +1 -1
- package/dist/{styles-BWqX2AS-.d.ts → styles-gEujs7j6.d.ts} +1 -1
- package/dist/types/agentApi.d.mts +1 -1
- package/dist/types/agentApi.d.ts +1 -1
- package/dist/types/content.d.mts +4 -3
- package/dist/types/content.d.ts +4 -3
- package/dist/types/content.js +1 -1
- package/dist/types/content.mjs +1 -1
- package/dist/types/document.d.mts +8 -6
- package/dist/types/document.d.ts +8 -6
- package/dist/types/document.js +1 -1
- package/dist/types/document.mjs +1 -1
- package/dist/utils/cardStyles.js +1 -1
- package/dist/utils/cardStyles.mjs +1 -1
- package/dist/utils/comments.d.mts +4 -3
- package/dist/utils/comments.d.ts +4 -3
- package/dist/utils/index.d.mts +41 -7
- package/dist/utils/index.d.ts +41 -7
- package/dist/utils/index.js +3 -3
- package/dist/utils/index.mjs +3 -3
- package/dist/utils/stylePreview.d.mts +83 -0
- package/dist/utils/stylePreview.d.ts +83 -0
- package/dist/utils/stylePreview.js +1 -0
- package/dist/utils/stylePreview.mjs +1 -0
- package/dist/utils/units.d.mts +7 -1
- package/dist/utils/units.d.ts +7 -1
- package/dist/utils/units.js +1 -1
- package/dist/utils/units.mjs +1 -1
- package/dist/{variableDetector-CaY-sDau.d.mts → variableDetector-D2-xDa2O.d.mts} +1 -1
- package/dist/{variableDetector-1mxzPfs2.d.ts → variableDetector-d-PpDlNV.d.ts} +1 -1
- package/dist/{watermark-DAcnAs_J.d.mts → watermark-D90356ZM.d.mts} +7 -1
- package/dist/{watermark-DAcnAs_J.d.ts → watermark-D90356ZM.d.ts} +7 -1
- package/package.json +25 -1
- package/dist/chunk-2WGTGBBS.js +0 -2
- package/dist/chunk-3G44SFHX.mjs +0 -4
- package/dist/chunk-4Q2IP5FW.js +0 -1
- package/dist/chunk-55XWETY4.mjs +0 -1
- package/dist/chunk-77GRQUSK.js +0 -1
- package/dist/chunk-7CZEZ3UL.mjs +0 -2
- package/dist/chunk-7LRR7RKE.mjs +0 -15
- package/dist/chunk-7OW3VCZE.mjs +0 -1
- package/dist/chunk-BHBOAP6Z.js +0 -3
- package/dist/chunk-CRMZH7U7.mjs +0 -2
- package/dist/chunk-CUY2THAO.mjs +0 -1
- package/dist/chunk-D3PRIF3Y.mjs +0 -1
- package/dist/chunk-DKKTY56Q.js +0 -1
- package/dist/chunk-EM33RGHT.mjs +0 -1
- package/dist/chunk-ESCPS4AO.mjs +0 -1
- package/dist/chunk-EUZLYQRB.mjs +0 -1
- package/dist/chunk-EV4LVK4X.js +0 -1
- package/dist/chunk-FW23IMBF.mjs +0 -1
- package/dist/chunk-HKN2NKOG.mjs +0 -1
- package/dist/chunk-INDYZOOS.js +0 -1
- package/dist/chunk-IUJCUITW.mjs +0 -1
- package/dist/chunk-IYKBX24M.js +0 -1
- package/dist/chunk-J3YFJDZD.js +0 -1
- package/dist/chunk-JHTURDPX.mjs +0 -1
- package/dist/chunk-KAOLVBLH.js +0 -1
- package/dist/chunk-L5NPEM7C.js +0 -1
- package/dist/chunk-LERLET2D.js +0 -4
- package/dist/chunk-MNOHUTKE.js +0 -15
- package/dist/chunk-MOKKS75W.mjs +0 -3
- package/dist/chunk-NAFMAKLK.js +0 -2
- package/dist/chunk-OEC6SBDV.mjs +0 -1
- package/dist/chunk-OF373DBR.mjs +0 -1
- package/dist/chunk-OTHV7YV2.js +0 -2
- package/dist/chunk-Q4IEATDJ.js +0 -1
- package/dist/chunk-QAJSNLJR.mjs +0 -1
- package/dist/chunk-RSU4HTC6.js +0 -1
- package/dist/chunk-TUIEV7Q7.js +0 -1
- package/dist/chunk-U67MWOPZ.mjs +0 -1
- package/dist/chunk-UE2ZKRYB.mjs +0 -2
- package/dist/chunk-VOCHZNOF.mjs +0 -1
- package/dist/chunk-VW22RZ6C.mjs +0 -1
- package/dist/chunk-WVERBZZU.js +0 -1
- package/dist/chunk-WWNOXNEX.mjs +0 -2
- package/dist/chunk-XLB6AC5Q.js +0 -1
- package/dist/chunk-YPQACU4A.js +0 -1
- package/dist/chunk-ZX26QZJ5.mjs +0 -1
- package/dist/executor-DZAMMQ35.js +0 -1
- package/dist/executor-ZCJRLT3Z.mjs +0 -1
package/dist/utils/cardStyles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';require('../chunk-DC7S76ZX.js');var r={padding:"8px 10px",borderRadius:8,backgroundColor:"
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');var r={padding:"8px 10px",borderRadius:8,backgroundColor:"var(--doc-card)",cursor:"pointer",boxShadow:"var(--doc-card-shadow)"},o={padding:"10px 12px",borderRadius:8,backgroundColor:"var(--doc-surface)",cursor:"pointer",boxShadow:"var(--doc-card-shadow-strong)"};exports.CARD_STYLE_COLLAPSED=r;exports.CARD_STYLE_EXPANDED=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import'../chunk-QYUPLKLP.mjs';var r={padding:"8px 10px",borderRadius:8,backgroundColor:"
|
|
1
|
+
import'../chunk-QYUPLKLP.mjs';var r={padding:"8px 10px",borderRadius:8,backgroundColor:"var(--doc-card)",cursor:"pointer",boxShadow:"var(--doc-card-shadow)"},o={padding:"10px 12px",borderRadius:8,backgroundColor:"var(--doc-surface)",cursor:"pointer",boxShadow:"var(--doc-card-shadow-strong)"};export{r as CARD_STYLE_COLLAPSED,o as CARD_STYLE_EXPANDED};
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { P as Paragraph } from '../content-
|
|
12
|
-
import '../formatting-
|
|
11
|
+
import { P as Paragraph } from '../content-CbBCrsr0.mjs';
|
|
12
|
+
import '../formatting-DFtuRFQY.mjs';
|
|
13
13
|
import '../colors-C3vA7HUU.mjs';
|
|
14
14
|
import '../docx/wrapTypes.mjs';
|
|
15
|
-
import '../
|
|
15
|
+
import '../lists-CyGxd5Y2.mjs';
|
|
16
|
+
import '../watermark-D90356ZM.mjs';
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Framework-agnostic comment + tracked-change helpers shared by the
|
package/dist/utils/comments.d.ts
CHANGED
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { P as Paragraph } from '../content-
|
|
12
|
-
import '../formatting-
|
|
11
|
+
import { P as Paragraph } from '../content-BebvPfXc.js';
|
|
12
|
+
import '../formatting-JhqWT_XM.js';
|
|
13
13
|
import '../colors-C3vA7HUU.js';
|
|
14
14
|
import '../docx/wrapTypes.js';
|
|
15
|
-
import '../
|
|
15
|
+
import '../lists-Bn29SzeS.js';
|
|
16
|
+
import '../watermark-D90356ZM.js';
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Framework-agnostic comment + tracked-change helpers shared by the
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -8,18 +8,19 @@
|
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
10
|
export { PIXELS_PER_INCH, TWIPS_PER_INCH, clamp, eighthsToPixels, emuToPixels, emuToTwips, formatPx, halfPointsToPixels, halfPointsToPoints, pixelsToEmu, pixelsToTwips, pointsToHalfPoints, pointsToPixels, roundPixels, twipsToEmu, twipsToPixels } from './units.mjs';
|
|
11
|
-
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, z as ThemeMatrixCell, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, A as ensureHexPrefix, B as generateThemeTintShadeMatrix, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, D as getThemeTintShadeHex, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, F as processTemplateAndDownload, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, G as resolveColorToHex, w as resolveHighlightColor, E as resolveHighlightToCss, x as resolveShadingColor, y as validateTemplate } from '../colorResolver-
|
|
12
|
-
import {
|
|
13
|
-
import { T as Theme } from '../styles-
|
|
11
|
+
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, z as ThemeMatrixCell, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, A as ensureHexPrefix, B as generateThemeTintShadeMatrix, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, D as getThemeTintShadeHex, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, F as processTemplateAndDownload, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, G as resolveColorToHex, w as resolveHighlightColor, E as resolveHighlightToCss, x as resolveShadingColor, y as validateTemplate } from '../colorResolver-DCBfI4ld.mjs';
|
|
12
|
+
import { k as Run, P as Paragraph } from '../content-CbBCrsr0.mjs';
|
|
13
|
+
import { T as Theme } from '../styles-Dqec8Aw6.mjs';
|
|
14
14
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.mjs';
|
|
15
|
-
export { F as FONT_MAPPING,
|
|
15
|
+
export { F as FONT_MAPPING, B as FontDefinition, I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, C as extractFontsFromDocument, i as findPageBreaks, D as getGoogleFontEquivalent, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, r as isGoogleFontsEnabled, s as isLineBreak, q as isLoading, t as isPageBreak, E as loadDocumentFonts, u as loadFont, G as loadFontDefinitions, v as loadFontFromBuffer, H as loadFontFromUrl, J as loadFontWithMapping, w as loadFonts, K as loadFontsWithMapping, L as onFontError, x as onFontsLoaded, y as preloadCommonFonts, z as removePageBreak, A as setGoogleFontsEnabled } from '../fontLoader-B4uFKpAy.mjs';
|
|
16
16
|
import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.mjs';
|
|
17
|
-
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-
|
|
17
|
+
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-DFtuRFQY.mjs';
|
|
18
18
|
export { HeadingInfo, collectHeadings } from './headingCollector.mjs';
|
|
19
19
|
export { WordSelectionResult, createDoubleClickWordSelector, createTripleClickParagraphSelector, expandSelectionToWordBoundaries, findWordAt, findWordBoundaries, getWordAt, handleClickForMultiClick, selectParagraphAtCursor, selectWordAtCursor, selectWordInTextNode } from './textSelection.mjs';
|
|
20
20
|
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH } from './sidebarConstants.mjs';
|
|
21
21
|
import '../types/document.mjs';
|
|
22
|
-
import '../
|
|
22
|
+
import '../lists-CyGxd5Y2.mjs';
|
|
23
|
+
import '../watermark-D90356ZM.mjs';
|
|
23
24
|
import '../docx/wrapTypes.mjs';
|
|
24
25
|
import 'prosemirror-model';
|
|
25
26
|
|
|
@@ -708,4 +709,37 @@ interface ReadDocxFileResult {
|
|
|
708
709
|
*/
|
|
709
710
|
declare function readDocxFileFromInput(event: Event): Promise<ReadDocxFileResult | null>;
|
|
710
711
|
|
|
711
|
-
|
|
712
|
+
/**
|
|
713
|
+
* Color-mode resolution shared by every adapter so the light/dark/auto logic
|
|
714
|
+
* (and its SSR + prefers-color-scheme handling) can't drift between React, Vue,
|
|
715
|
+
* or any future host. The adapters keep only their framework binding
|
|
716
|
+
* (useState/useEffect vs ref/watchEffect); the rules live here.
|
|
717
|
+
*
|
|
718
|
+
* @packageDocumentation
|
|
719
|
+
*/
|
|
720
|
+
/** UI color theme for the editor chrome and canvas. */
|
|
721
|
+
type ColorMode = 'light' | 'dark' | 'system';
|
|
722
|
+
/**
|
|
723
|
+
* Current OS dark-mode preference. Returns false when `matchMedia` is
|
|
724
|
+
* unavailable (e.g. server-side render), so it is safe to call as a state seed.
|
|
725
|
+
*
|
|
726
|
+
* @public
|
|
727
|
+
*/
|
|
728
|
+
declare function prefersColorSchemeDark(): boolean;
|
|
729
|
+
/**
|
|
730
|
+
* Resolve the effective dark flag from a {@link ColorMode} and the current OS
|
|
731
|
+
* preference. `'system'` follows the OS; `'dark'`/`'light'` are explicit.
|
|
732
|
+
*
|
|
733
|
+
* @public
|
|
734
|
+
*/
|
|
735
|
+
declare function resolveIsDark(colorMode: ColorMode, systemDark: boolean): boolean;
|
|
736
|
+
/**
|
|
737
|
+
* Subscribe to OS dark-mode changes. Invokes `onChange` immediately with the
|
|
738
|
+
* current value (so a stale seed is corrected on entry), then on every change.
|
|
739
|
+
* Returns an unsubscribe function. A no-op under SSR.
|
|
740
|
+
*
|
|
741
|
+
* @public
|
|
742
|
+
*/
|
|
743
|
+
declare function subscribeSystemDark(onChange: (dark: boolean) => void): () => void;
|
|
744
|
+
|
|
745
|
+
export { CLIPBOARD_TYPES, type CellAnchor, type ClipboardContent, type ClipboardOptions, type ColorMode, DEFAULT_SELECTION_STYLE, HIGH_CONTRAST_SELECTION_STYLE, type HighlightRect, INTERNAL_CLIPBOARD_TYPE, type KeyboardShortcut, NAVIGATION_SHORTCUTS, type NavigationAction, type NavigationDirection, type NavigationUnit, type ParsedClipboardContent, type ReadDocxFileResult, SELECTION_CSS_VARS, type SelectionHighlightConfig, type SelectionRange, type SplitLayoutResult, type SplitTarget, areSelectionStylesInjected, borderToStyle, buildAnchorMaps, cleanWordHtml, clearSelection, computeSplitDialogDefaults, computeSplitLayout, copyParagraphs, copyRuns, createClipboardHandlers, createSelectionChangeHandler, describeShortcut, expandSelectionToWord, extendSelectionTo, findNextWordStart, findPreviousWordStart, findVisualLineEnd, findVisualLineStart, findWordEnd, findWordStart, generateSelectionCSS, getClipboardImageFiles, getHighlightRectStyle, getMergedSelectionRects, getNavigationShortcutDescriptions, getSelectedText, getSelectionBoundingRect, getSelectionInfo, getSelectionRects, getWordAtCursor, handleNavigationKey, handlePasteEvent, hasActiveSelection, highlightTextRange, htmlToRuns, injectSelectionStyles, isEditorHtml, isNavigationKey, isPunctuation, isSelectionBackwards, isSelectionWithin, isWhitespace, isWordCharacter, isWordHtml, matchesShortcut, mergeAdjacentRects, mergeStyles, moveByWord, moveToLineEdge, normalizeSelectionDirection, paragraphToStyle, paragraphsToClipboardContent, parseClipboardHtml, parseNavigationAction, prefersColorSchemeDark, readDocxFileFromInput, readFromClipboard, redistributeColumnWidths, removeSelectionStyles, resolveIsDark, resolveShadingFill, runsToClipboardContent, sectionToStyle, selectRange, setSelectionPosition, subscribeSystemDark, sumColumnWidths, tableCellToStyle, textToStyle, writeToClipboard };
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -8,18 +8,19 @@
|
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
10
|
export { PIXELS_PER_INCH, TWIPS_PER_INCH, clamp, eighthsToPixels, emuToPixels, emuToTwips, formatPx, halfPointsToPixels, halfPointsToPoints, pixelsToEmu, pixelsToTwips, pointsToHalfPoints, pointsToPixels, roundPixels, twipsToEmu, twipsToPixels } from './units.js';
|
|
11
|
-
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, z as ThemeMatrixCell, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, A as ensureHexPrefix, B as generateThemeTintShadeMatrix, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, D as getThemeTintShadeHex, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, F as processTemplateAndDownload, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, G as resolveColorToHex, w as resolveHighlightColor, E as resolveHighlightToCss, x as resolveShadingColor, y as validateTemplate } from '../colorResolver-
|
|
12
|
-
import {
|
|
13
|
-
import { T as Theme } from '../styles-
|
|
11
|
+
export { C as CreateEmptyDocumentOptions, P as ProcessTemplateOptions, a as ProcessTemplateResult, T as TemplateError, z as ThemeMatrixCell, b as blendColors, c as colorsEqual, d as createDocumentWithText, e as createEmptyDocument, f as createRgbColor, g as createTemplateProcessor, h as createThemeColor, i as darkenColor, A as ensureHexPrefix, B as generateThemeTintShadeMatrix, j as getContrastingColor, k as getMissingVariables, l as getTemplateTags, D as getThemeTintShadeHex, m as isBlack, n as isWhite, o as lightenColor, p as parseColorString, q as previewTemplate, r as processTemplate, s as processTemplateAdvanced, F as processTemplateAndDownload, t as processTemplateAsBlob, u as processTemplateDetailed, v as resolveColor, G as resolveColorToHex, w as resolveHighlightColor, E as resolveHighlightToCss, x as resolveShadingColor, y as validateTemplate } from '../colorResolver-C696sd9x.js';
|
|
12
|
+
import { k as Run, P as Paragraph } from '../content-BebvPfXc.js';
|
|
13
|
+
import { T as Theme } from '../styles-gEujs7j6.js';
|
|
14
14
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.js';
|
|
15
|
-
export { F as FONT_MAPPING,
|
|
15
|
+
export { F as FONT_MAPPING, B as FontDefinition, I as InsertPosition, c as canRenderFont, a as countPageBreaks, b as createColumnBreak, d as createHorizontalRule, e as createLineBreak, f as createPageBreak, g as createPageBreakParagraph, h as createPageBreakRun, C as extractFontsFromDocument, i as findPageBreaks, D as getGoogleFontEquivalent, j as getLoadedFonts, k as hasPageBreakBefore, l as insertHorizontalRule, m as insertPageBreak, n as isBreakContent, o as isColumnBreak, p as isFontLoaded, r as isGoogleFontsEnabled, s as isLineBreak, q as isLoading, t as isPageBreak, E as loadDocumentFonts, u as loadFont, G as loadFontDefinitions, v as loadFontFromBuffer, H as loadFontFromUrl, J as loadFontWithMapping, w as loadFonts, K as loadFontsWithMapping, L as onFontError, x as onFontsLoaded, y as preloadCommonFonts, z as removePageBreak, A as setGoogleFontsEnabled } from '../fontLoader-D9SBYuZZ.js';
|
|
16
16
|
import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.js';
|
|
17
|
-
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-
|
|
17
|
+
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-JhqWT_XM.js';
|
|
18
18
|
export { HeadingInfo, collectHeadings } from './headingCollector.js';
|
|
19
19
|
export { WordSelectionResult, createDoubleClickWordSelector, createTripleClickParagraphSelector, expandSelectionToWordBoundaries, findWordAt, findWordBoundaries, getWordAt, handleClickForMultiClick, selectParagraphAtCursor, selectWordAtCursor, selectWordInTextNode } from './textSelection.js';
|
|
20
20
|
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH } from './sidebarConstants.js';
|
|
21
21
|
import '../types/document.js';
|
|
22
|
-
import '../
|
|
22
|
+
import '../lists-Bn29SzeS.js';
|
|
23
|
+
import '../watermark-D90356ZM.js';
|
|
23
24
|
import '../docx/wrapTypes.js';
|
|
24
25
|
import 'prosemirror-model';
|
|
25
26
|
|
|
@@ -708,4 +709,37 @@ interface ReadDocxFileResult {
|
|
|
708
709
|
*/
|
|
709
710
|
declare function readDocxFileFromInput(event: Event): Promise<ReadDocxFileResult | null>;
|
|
710
711
|
|
|
711
|
-
|
|
712
|
+
/**
|
|
713
|
+
* Color-mode resolution shared by every adapter so the light/dark/auto logic
|
|
714
|
+
* (and its SSR + prefers-color-scheme handling) can't drift between React, Vue,
|
|
715
|
+
* or any future host. The adapters keep only their framework binding
|
|
716
|
+
* (useState/useEffect vs ref/watchEffect); the rules live here.
|
|
717
|
+
*
|
|
718
|
+
* @packageDocumentation
|
|
719
|
+
*/
|
|
720
|
+
/** UI color theme for the editor chrome and canvas. */
|
|
721
|
+
type ColorMode = 'light' | 'dark' | 'system';
|
|
722
|
+
/**
|
|
723
|
+
* Current OS dark-mode preference. Returns false when `matchMedia` is
|
|
724
|
+
* unavailable (e.g. server-side render), so it is safe to call as a state seed.
|
|
725
|
+
*
|
|
726
|
+
* @public
|
|
727
|
+
*/
|
|
728
|
+
declare function prefersColorSchemeDark(): boolean;
|
|
729
|
+
/**
|
|
730
|
+
* Resolve the effective dark flag from a {@link ColorMode} and the current OS
|
|
731
|
+
* preference. `'system'` follows the OS; `'dark'`/`'light'` are explicit.
|
|
732
|
+
*
|
|
733
|
+
* @public
|
|
734
|
+
*/
|
|
735
|
+
declare function resolveIsDark(colorMode: ColorMode, systemDark: boolean): boolean;
|
|
736
|
+
/**
|
|
737
|
+
* Subscribe to OS dark-mode changes. Invokes `onChange` immediately with the
|
|
738
|
+
* current value (so a stale seed is corrected on entry), then on every change.
|
|
739
|
+
* Returns an unsubscribe function. A no-op under SSR.
|
|
740
|
+
*
|
|
741
|
+
* @public
|
|
742
|
+
*/
|
|
743
|
+
declare function subscribeSystemDark(onChange: (dark: boolean) => void): () => void;
|
|
744
|
+
|
|
745
|
+
export { CLIPBOARD_TYPES, type CellAnchor, type ClipboardContent, type ClipboardOptions, type ColorMode, DEFAULT_SELECTION_STYLE, HIGH_CONTRAST_SELECTION_STYLE, type HighlightRect, INTERNAL_CLIPBOARD_TYPE, type KeyboardShortcut, NAVIGATION_SHORTCUTS, type NavigationAction, type NavigationDirection, type NavigationUnit, type ParsedClipboardContent, type ReadDocxFileResult, SELECTION_CSS_VARS, type SelectionHighlightConfig, type SelectionRange, type SplitLayoutResult, type SplitTarget, areSelectionStylesInjected, borderToStyle, buildAnchorMaps, cleanWordHtml, clearSelection, computeSplitDialogDefaults, computeSplitLayout, copyParagraphs, copyRuns, createClipboardHandlers, createSelectionChangeHandler, describeShortcut, expandSelectionToWord, extendSelectionTo, findNextWordStart, findPreviousWordStart, findVisualLineEnd, findVisualLineStart, findWordEnd, findWordStart, generateSelectionCSS, getClipboardImageFiles, getHighlightRectStyle, getMergedSelectionRects, getNavigationShortcutDescriptions, getSelectedText, getSelectionBoundingRect, getSelectionInfo, getSelectionRects, getWordAtCursor, handleNavigationKey, handlePasteEvent, hasActiveSelection, highlightTextRange, htmlToRuns, injectSelectionStyles, isEditorHtml, isNavigationKey, isPunctuation, isSelectionBackwards, isSelectionWithin, isWhitespace, isWordCharacter, isWordHtml, matchesShortcut, mergeAdjacentRects, mergeStyles, moveByWord, moveToLineEdge, normalizeSelectionDirection, paragraphToStyle, paragraphsToClipboardContent, parseClipboardHtml, parseNavigationAction, prefersColorSchemeDark, readDocxFileFromInput, readFromClipboard, redistributeColumnWidths, removeSelectionStyles, resolveIsDark, resolveShadingFill, runsToClipboardContent, sectionToStyle, selectRange, setSelectionPosition, subscribeSystemDark, sumColumnWidths, tableCellToStyle, textToStyle, writeToClipboard };
|
package/dist/utils/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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'),
|
|
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'),chunkQVRMX2AC_js=require('../chunk-QVRMX2AC.js'),chunk2KHWHVTA_js=require('../chunk-2KHWHVTA.js'),chunkQ2VALXEU_js=require('../chunk-Q2VALXEU.js'),chunkMZ7LW5CH_js=require('../chunk-MZ7LW5CH.js');require('../chunk-N3Y5BUKV.js');var chunkMJ5FQX7Q_js=require('../chunk-MJ5FQX7Q.js'),chunkBJSG6TEG_js=require('../chunk-BJSG6TEG.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 Qt(e){return e?/[\p{P}]/u.test(e):false}function Jt(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 Zt(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 g=n.getBoundingClientRect();Math.abs(g.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 g=Math.ceil((c+a)/2);r.setStart(e,g),r.collapse(true);let K=r.getBoundingClientRect();Math.abs(K.top-i)<2?c=g:a=g-1;}return {node:e,offset:c}}return null}function eo(){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 w(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 R(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 to(e,t){let o=E(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&w(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(R(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 oo(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function no(){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 ro(){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 io(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 lo(){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"},co={backgroundColor:"rgba(0, 120, 215, 0.4)",borderColor:"rgba(0, 120, 215, 0.6)",borderRadius:1,zIndex:0,opacity:1},ao={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 g=Math.max(r.left+r.width,i.left+i.width);r.width=g-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 so(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 uo(e,t=m){let o=t.backgroundColor;return `
|
|
2
2
|
${e}::selection,
|
|
3
3
|
${e} *::selection {
|
|
4
4
|
background-color: ${o} !important;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
background-color: ${o} !important;
|
|
11
11
|
color: inherit !important;
|
|
12
12
|
}
|
|
13
|
-
`}function
|
|
13
|
+
`}function fo(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function go(){let e=window.getSelection();return e?e.toString():""}function ho(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let o=t.getRangeAt(0);return e.contains(o.commonAncestorContainer)}function po(){let e=window.getSelection();return !e||e.rangeCount===0?null:e.getRangeAt(0).getBoundingClientRect()}function mo(e,t,o,n,r){try{let l=document.createRange();return l.setStart(t,o),l.setEnd(n,r),l}catch{return null}}function xo(e){let t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e));}function So(){let e=window.getSelection();e&&e.removeAllRanges();}function v(){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 bo(){let e=window.getSelection();if(!e||e.rangeCount===0||!v())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 f=null;function yo(e=m){A();let t=`
|
|
14
14
|
/* DOCX Editor Selection Highlighting */
|
|
15
15
|
|
|
16
16
|
/* Base selection style for all editable content */
|
|
@@ -79,4 +79,4 @@
|
|
|
79
79
|
background-color: rgba(156, 39, 176, 0.2);
|
|
80
80
|
border-bottom: 2px dashed rgba(156, 39, 176, 0.6);
|
|
81
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;
|
|
82
|
+
`;f=document.createElement("style"),f.id="docx-selection-styles",f.textContent=t,document.head.appendChild(f);}function A(){f&&(f.remove(),f=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function Co(){return f!==null||document.getElementById("docx-selection-styles")!==null}function To(e,t,o=true){return ()=>{if(!e){t([]);return}let n=o?k(e):S(e);t(n);}}async function wo(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}var D="(prefers-color-scheme: dark)";function H(){return typeof window<"u"&&typeof window.matchMedia=="function"}function Ro(){return H()?window.matchMedia(D).matches:false}function Eo(e,t){return e==="dark"||e==="system"&&t}function No(e){if(!H())return ()=>{};let t=window.matchMedia(D);e(t.matches);let o=n=>e(n.matches);return t.addEventListener("change",o),()=>t.removeEventListener("change",o)}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 chunkQVRMX2AC_js.n}});Object.defineProperty(exports,"canRenderFont",{enumerable:true,get:function(){return chunkQVRMX2AC_js.j}});Object.defineProperty(exports,"extractFontsFromDocument",{enumerable:true,get:function(){return chunkQVRMX2AC_js.s}});Object.defineProperty(exports,"getGoogleFontEquivalent",{enumerable:true,get:function(){return chunkQVRMX2AC_js.o}});Object.defineProperty(exports,"getLoadedFonts",{enumerable:true,get:function(){return chunkQVRMX2AC_js.g}});Object.defineProperty(exports,"isFontLoaded",{enumerable:true,get:function(){return chunkQVRMX2AC_js.c}});Object.defineProperty(exports,"isGoogleFontsEnabled",{enumerable:true,get:function(){return chunkQVRMX2AC_js.e}});Object.defineProperty(exports,"isLoading",{enumerable:true,get:function(){return chunkQVRMX2AC_js.f}});Object.defineProperty(exports,"loadDocumentFonts",{enumerable:true,get:function(){return chunkQVRMX2AC_js.t}});Object.defineProperty(exports,"loadFont",{enumerable:true,get:function(){return chunkQVRMX2AC_js.a}});Object.defineProperty(exports,"loadFontDefinitions",{enumerable:true,get:function(){return chunkQVRMX2AC_js.m}});Object.defineProperty(exports,"loadFontFromBuffer",{enumerable:true,get:function(){return chunkQVRMX2AC_js.k}});Object.defineProperty(exports,"loadFontFromUrl",{enumerable:true,get:function(){return chunkQVRMX2AC_js.l}});Object.defineProperty(exports,"loadFontWithMapping",{enumerable:true,get:function(){return chunkQVRMX2AC_js.p}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkQVRMX2AC_js.b}});Object.defineProperty(exports,"loadFontsWithMapping",{enumerable:true,get:function(){return chunkQVRMX2AC_js.q}});Object.defineProperty(exports,"onFontError",{enumerable:true,get:function(){return chunkQVRMX2AC_js.i}});Object.defineProperty(exports,"onFontsLoaded",{enumerable:true,get:function(){return chunkQVRMX2AC_js.h}});Object.defineProperty(exports,"preloadCommonFonts",{enumerable:true,get:function(){return chunkQVRMX2AC_js.r}});Object.defineProperty(exports,"setGoogleFontsEnabled",{enumerable:true,get:function(){return chunkQVRMX2AC_js.d}});Object.defineProperty(exports,"toArrayBuffer",{enumerable:true,get:function(){return chunkQVRMX2AC_js.u}});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 chunkQ2VALXEU_js.i}});Object.defineProperty(exports,"INTERNAL_CLIPBOARD_TYPE",{enumerable:true,get:function(){return chunkQ2VALXEU_js.h}});Object.defineProperty(exports,"borderToStyle",{enumerable:true,get:function(){return chunkQ2VALXEU_js.c}});Object.defineProperty(exports,"cleanWordHtml",{enumerable:true,get:function(){return chunkQ2VALXEU_js.u}});Object.defineProperty(exports,"copyParagraphs",{enumerable:true,get:function(){return chunkQ2VALXEU_js.l}});Object.defineProperty(exports,"copyRuns",{enumerable:true,get:function(){return chunkQ2VALXEU_js.k}});Object.defineProperty(exports,"createClipboardHandlers",{enumerable:true,get:function(){return chunkQ2VALXEU_js.w}});Object.defineProperty(exports,"getClipboardImageFiles",{enumerable:true,get:function(){return chunkQ2VALXEU_js.j}});Object.defineProperty(exports,"handlePasteEvent",{enumerable:true,get:function(){return chunkQ2VALXEU_js.q}});Object.defineProperty(exports,"htmlToRuns",{enumerable:true,get:function(){return chunkQ2VALXEU_js.v}});Object.defineProperty(exports,"isEditorHtml",{enumerable:true,get:function(){return chunkQ2VALXEU_js.t}});Object.defineProperty(exports,"isWordHtml",{enumerable:true,get:function(){return chunkQ2VALXEU_js.s}});Object.defineProperty(exports,"mergeStyles",{enumerable:true,get:function(){return chunkQ2VALXEU_js.e}});Object.defineProperty(exports,"paragraphToStyle",{enumerable:true,get:function(){return chunkQ2VALXEU_js.b}});Object.defineProperty(exports,"paragraphsToClipboardContent",{enumerable:true,get:function(){return chunkQ2VALXEU_js.n}});Object.defineProperty(exports,"parseClipboardHtml",{enumerable:true,get:function(){return chunkQ2VALXEU_js.r}});Object.defineProperty(exports,"readFromClipboard",{enumerable:true,get:function(){return chunkQ2VALXEU_js.p}});Object.defineProperty(exports,"resolveShadingFill",{enumerable:true,get:function(){return chunkQ2VALXEU_js.d}});Object.defineProperty(exports,"runsToClipboardContent",{enumerable:true,get:function(){return chunkQ2VALXEU_js.m}});Object.defineProperty(exports,"sectionToStyle",{enumerable:true,get:function(){return chunkQ2VALXEU_js.g}});Object.defineProperty(exports,"tableCellToStyle",{enumerable:true,get:function(){return chunkQ2VALXEU_js.f}});Object.defineProperty(exports,"textToStyle",{enumerable:true,get:function(){return chunkQ2VALXEU_js.a}});Object.defineProperty(exports,"writeToClipboard",{enumerable:true,get:function(){return chunkQ2VALXEU_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 chunkBJSG6TEG_js.b}});Object.defineProperty(exports,"TWIPS_PER_INCH",{enumerable:true,get:function(){return chunkBJSG6TEG_js.a}});Object.defineProperty(exports,"clamp",{enumerable:true,get:function(){return chunkBJSG6TEG_js.p}});Object.defineProperty(exports,"eighthsToPixels",{enumerable:true,get:function(){return chunkBJSG6TEG_js.n}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunkBJSG6TEG_js.f}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunkBJSG6TEG_js.h}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunkBJSG6TEG_js.q}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunkBJSG6TEG_js.k}});Object.defineProperty(exports,"halfPointsToPoints",{enumerable:true,get:function(){return chunkBJSG6TEG_js.l}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunkBJSG6TEG_js.g}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunkBJSG6TEG_js.e}});Object.defineProperty(exports,"pointsToHalfPoints",{enumerable:true,get:function(){return chunkBJSG6TEG_js.m}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunkBJSG6TEG_js.j}});Object.defineProperty(exports,"roundPixels",{enumerable:true,get:function(){return chunkBJSG6TEG_js.o}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunkBJSG6TEG_js.i}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunkBJSG6TEG_js.d}});exports.DEFAULT_SELECTION_STYLE=m;exports.HIGH_CONTRAST_SELECTION_STYLE=co;exports.NAVIGATION_SHORTCUTS=s;exports.SELECTION_CSS_VARS=ao;exports.areSelectionStylesInjected=Co;exports.clearSelection=So;exports.createSelectionChangeHandler=To;exports.describeShortcut=d;exports.expandSelectionToWord=no;exports.extendSelectionTo=p;exports.findNextWordStart=b;exports.findPreviousWordStart=y;exports.findVisualLineEnd=T;exports.findVisualLineStart=C;exports.findWordEnd=Zt;exports.findWordStart=Jt;exports.generateSelectionCSS=uo;exports.getHighlightRectStyle=so;exports.getMergedSelectionRects=k;exports.getNavigationShortcutDescriptions=lo;exports.getSelectedText=go;exports.getSelectionBoundingRect=po;exports.getSelectionInfo=eo;exports.getSelectionRects=S;exports.getWordAtCursor=ro;exports.handleNavigationKey=to;exports.hasActiveSelection=fo;exports.highlightTextRange=mo;exports.injectSelectionStyles=yo;exports.isNavigationKey=oo;exports.isPunctuation=Qt;exports.isSelectionBackwards=v;exports.isSelectionWithin=ho;exports.isWhitespace=x;exports.isWordCharacter=u;exports.matchesShortcut=io;exports.mergeAdjacentRects=N;exports.moveByWord=w;exports.moveToLineEdge=R;exports.normalizeSelectionDirection=bo;exports.parseNavigationAction=E;exports.prefersColorSchemeDark=Ro;exports.readDocxFileFromInput=wo;exports.removeSelectionStyles=A;exports.resolveIsDark=Eo;exports.selectRange=xo;exports.setSelectionPosition=h;exports.subscribeSystemDark=No;
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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 `
|
|
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{n as FONT_MAPPING,j as canRenderFont,s as extractFontsFromDocument,o as getGoogleFontEquivalent,g as getLoadedFonts,c as isFontLoaded,e as isGoogleFontsEnabled,f as isLoading,t as loadDocumentFonts,a as loadFont,m as loadFontDefinitions,k as loadFontFromBuffer,l as loadFontFromUrl,p as loadFontWithMapping,b as loadFonts,q as loadFontsWithMapping,i as onFontError,h as onFontsLoaded,r as preloadCommonFonts,d as setGoogleFontsEnabled,u as toArrayBuffer}from'../chunk-CDBKFBC2.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-PJEB3ZWG.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,p as clamp,n as eighthsToPixels,f as emuToPixels,h as emuToTwips,q as formatPx,k as halfPointsToPixels,l as halfPointsToPoints,g as pixelsToEmu,e as pixelsToTwips,m as pointsToHalfPoints,j as pointsToPixels,o as roundPixels,i as twipsToEmu,d as twipsToPixels}from'../chunk-KNY7SXPJ.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 Qt(e){return e?/[\p{P}]/u.test(e):false}function Jt(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 Zt(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 g=n.getBoundingClientRect();Math.abs(g.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 g=Math.ceil((c+a)/2);r.setStart(e,g),r.collapse(true);let K=r.getBoundingClientRect();Math.abs(K.top-i)<2?c=g:a=g-1;}return {node:e,offset:c}}return null}function eo(){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 w(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 R(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 to(e,t){let o=E(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&w(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(R(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 oo(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function no(){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 ro(){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 io(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 lo(){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"},co={backgroundColor:"rgba(0, 120, 215, 0.4)",borderColor:"rgba(0, 120, 215, 0.6)",borderRadius:1,zIndex:0,opacity:1},ao={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 g=Math.max(r.left+r.width,i.left+i.width);r.width=g-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 so(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 uo(e,t=m){let o=t.backgroundColor;return `
|
|
2
2
|
${e}::selection,
|
|
3
3
|
${e} *::selection {
|
|
4
4
|
background-color: ${o} !important;
|
|
@@ -10,7 +10,7 @@ export{d as MIN_CARD_GAP,c as SIDEBAR_DOCUMENT_SHIFT,b as SIDEBAR_PAGE_GAP,a as
|
|
|
10
10
|
background-color: ${o} !important;
|
|
11
11
|
color: inherit !important;
|
|
12
12
|
}
|
|
13
|
-
`}function
|
|
13
|
+
`}function fo(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function go(){let e=window.getSelection();return e?e.toString():""}function ho(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let o=t.getRangeAt(0);return e.contains(o.commonAncestorContainer)}function po(){let e=window.getSelection();return !e||e.rangeCount===0?null:e.getRangeAt(0).getBoundingClientRect()}function mo(e,t,o,n,r){try{let l=document.createRange();return l.setStart(t,o),l.setEnd(n,r),l}catch{return null}}function xo(e){let t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e));}function So(){let e=window.getSelection();e&&e.removeAllRanges();}function v(){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 bo(){let e=window.getSelection();if(!e||e.rangeCount===0||!v())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 f=null;function yo(e=m){A();let t=`
|
|
14
14
|
/* DOCX Editor Selection Highlighting */
|
|
15
15
|
|
|
16
16
|
/* Base selection style for all editable content */
|
|
@@ -79,4 +79,4 @@ export{d as MIN_CARD_GAP,c as SIDEBAR_DOCUMENT_SHIFT,b as SIDEBAR_PAGE_GAP,a as
|
|
|
79
79
|
background-color: rgba(156, 39, 176, 0.2);
|
|
80
80
|
border-bottom: 2px dashed rgba(156, 39, 176, 0.6);
|
|
81
81
|
}
|
|
82
|
-
`;
|
|
82
|
+
`;f=document.createElement("style"),f.id="docx-selection-styles",f.textContent=t,document.head.appendChild(f);}function A(){f&&(f.remove(),f=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function Co(){return f!==null||document.getElementById("docx-selection-styles")!==null}function To(e,t,o=true){return ()=>{if(!e){t([]);return}let n=o?k(e):S(e);t(n);}}async function wo(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}var D="(prefers-color-scheme: dark)";function H(){return typeof window<"u"&&typeof window.matchMedia=="function"}function Ro(){return H()?window.matchMedia(D).matches:false}function Eo(e,t){return e==="dark"||e==="system"&&t}function No(e){if(!H())return ()=>{};let t=window.matchMedia(D);e(t.matches);let o=n=>e(n.matches);return t.addEventListener("change",o),()=>t.removeEventListener("change",o)}export{m as DEFAULT_SELECTION_STYLE,co as HIGH_CONTRAST_SELECTION_STYLE,s as NAVIGATION_SHORTCUTS,ao as SELECTION_CSS_VARS,Co as areSelectionStylesInjected,So as clearSelection,To as createSelectionChangeHandler,d as describeShortcut,no as expandSelectionToWord,p as extendSelectionTo,b as findNextWordStart,y as findPreviousWordStart,T as findVisualLineEnd,C as findVisualLineStart,Zt as findWordEnd,Jt as findWordStart,uo as generateSelectionCSS,so as getHighlightRectStyle,k as getMergedSelectionRects,lo as getNavigationShortcutDescriptions,go as getSelectedText,po as getSelectionBoundingRect,eo as getSelectionInfo,S as getSelectionRects,ro as getWordAtCursor,to as handleNavigationKey,fo as hasActiveSelection,mo as highlightTextRange,yo as injectSelectionStyles,oo as isNavigationKey,Qt as isPunctuation,v as isSelectionBackwards,ho as isSelectionWithin,x as isWhitespace,u as isWordCharacter,io as matchesShortcut,N as mergeAdjacentRects,w as moveByWord,R as moveToLineEdge,bo as normalizeSelectionDirection,E as parseNavigationAction,Ro as prefersColorSchemeDark,wo as readDocxFileFromInput,A as removeSelectionStyles,Eo as resolveIsDark,xo as selectRange,h as setSelectionPosition,No as subscribeSystemDark};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paragraph-style preview + option resolution — shared between the React and
|
|
3
|
+
* Vue toolbars so the style-picker dropdown looks and behaves identically.
|
|
4
|
+
*
|
|
5
|
+
* Pure logic only: no i18n and no framework CSS types. The returned preview is
|
|
6
|
+
* a plain `{ fontSize, lineHeight, fontWeight?, fontStyle?, color? }` object,
|
|
7
|
+
* which is structurally assignable to both React's `CSSProperties` and Vue's
|
|
8
|
+
* inline-style record, so neither adapter needs a cast. Name localization stays
|
|
9
|
+
* in the adapters (they own the i18n `t()` boundary).
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
import { a as Style } from '../styles-Dqec8Aw6.mjs';
|
|
14
|
+
import '../formatting-DFtuRFQY.mjs';
|
|
15
|
+
import '../colors-C3vA7HUU.mjs';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Paragraph-style preview + option resolution — shared between the React and
|
|
19
|
+
* Vue toolbars so the style-picker dropdown looks and behaves identically.
|
|
20
|
+
*
|
|
21
|
+
* Pure logic only: no i18n and no framework CSS types. The returned preview is
|
|
22
|
+
* a plain `{ fontSize, lineHeight, fontWeight?, fontStyle?, color? }` object,
|
|
23
|
+
* which is structurally assignable to both React's `CSSProperties` and Vue's
|
|
24
|
+
* inline-style record, so neither adapter needs a cast. Name localization stays
|
|
25
|
+
* in the adapters (they own the i18n `t()` boundary).
|
|
26
|
+
* @packageDocumentation
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Inline preview style for a paragraph-style dropdown item.
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
interface StylePreviewProps {
|
|
35
|
+
fontSize: string;
|
|
36
|
+
lineHeight: string;
|
|
37
|
+
fontWeight?: 'bold';
|
|
38
|
+
fontStyle?: 'italic';
|
|
39
|
+
color?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A resolved paragraph-style option (document order, with extracted visual
|
|
43
|
+
* fields). Adapters add their own localized label on top of `name`.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
interface ResolvedStyleOption {
|
|
47
|
+
styleId: string;
|
|
48
|
+
name: string;
|
|
49
|
+
priority: number;
|
|
50
|
+
fontSize?: number;
|
|
51
|
+
bold?: boolean;
|
|
52
|
+
italic?: boolean;
|
|
53
|
+
color?: string;
|
|
54
|
+
}
|
|
55
|
+
/** Dropdown preview sizes (px) for well-known styles, matching Google Docs. @public */
|
|
56
|
+
declare const STYLE_PREVIEW_SIZES: Record<string, number>;
|
|
57
|
+
/** Styles rendered bold in the dropdown preview by default. @public */
|
|
58
|
+
declare const STYLE_DEFAULT_BOLD: ReadonlySet<string>;
|
|
59
|
+
/** Default preview text color (hex, no `#`) for styles that don't set one. @public */
|
|
60
|
+
declare const STYLE_DEFAULT_COLOR: Record<string, string>;
|
|
61
|
+
/** Google-Docs heading preview color. @public */
|
|
62
|
+
declare const HEADING_COLOR = "#4a6c8c";
|
|
63
|
+
/**
|
|
64
|
+
* Build the inline preview style for a style option. `fontSize` is in
|
|
65
|
+
* half-points (OOXML); known styles use {@link STYLE_PREVIEW_SIZES} instead.
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
declare function getStylePreviewProps(input: {
|
|
69
|
+
styleId: string;
|
|
70
|
+
fontSize?: number;
|
|
71
|
+
bold?: boolean;
|
|
72
|
+
italic?: boolean;
|
|
73
|
+
color?: string;
|
|
74
|
+
}): StylePreviewProps;
|
|
75
|
+
/**
|
|
76
|
+
* Filter the document's styles to the visible paragraph styles, extract their
|
|
77
|
+
* visual fields, and sort by UI priority — the list a toolbar style picker
|
|
78
|
+
* shows. Returns `[]` when there are no styles (adapters fall back to presets).
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
declare function resolveParagraphStyleOptions(styles: Style[] | undefined): ResolvedStyleOption[];
|
|
82
|
+
|
|
83
|
+
export { HEADING_COLOR, type ResolvedStyleOption, STYLE_DEFAULT_BOLD, STYLE_DEFAULT_COLOR, STYLE_PREVIEW_SIZES, type StylePreviewProps, getStylePreviewProps, resolveParagraphStyleOptions };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paragraph-style preview + option resolution — shared between the React and
|
|
3
|
+
* Vue toolbars so the style-picker dropdown looks and behaves identically.
|
|
4
|
+
*
|
|
5
|
+
* Pure logic only: no i18n and no framework CSS types. The returned preview is
|
|
6
|
+
* a plain `{ fontSize, lineHeight, fontWeight?, fontStyle?, color? }` object,
|
|
7
|
+
* which is structurally assignable to both React's `CSSProperties` and Vue's
|
|
8
|
+
* inline-style record, so neither adapter needs a cast. Name localization stays
|
|
9
|
+
* in the adapters (they own the i18n `t()` boundary).
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
import { a as Style } from '../styles-gEujs7j6.js';
|
|
14
|
+
import '../formatting-JhqWT_XM.js';
|
|
15
|
+
import '../colors-C3vA7HUU.js';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Paragraph-style preview + option resolution — shared between the React and
|
|
19
|
+
* Vue toolbars so the style-picker dropdown looks and behaves identically.
|
|
20
|
+
*
|
|
21
|
+
* Pure logic only: no i18n and no framework CSS types. The returned preview is
|
|
22
|
+
* a plain `{ fontSize, lineHeight, fontWeight?, fontStyle?, color? }` object,
|
|
23
|
+
* which is structurally assignable to both React's `CSSProperties` and Vue's
|
|
24
|
+
* inline-style record, so neither adapter needs a cast. Name localization stays
|
|
25
|
+
* in the adapters (they own the i18n `t()` boundary).
|
|
26
|
+
* @packageDocumentation
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Inline preview style for a paragraph-style dropdown item.
|
|
32
|
+
* @public
|
|
33
|
+
*/
|
|
34
|
+
interface StylePreviewProps {
|
|
35
|
+
fontSize: string;
|
|
36
|
+
lineHeight: string;
|
|
37
|
+
fontWeight?: 'bold';
|
|
38
|
+
fontStyle?: 'italic';
|
|
39
|
+
color?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A resolved paragraph-style option (document order, with extracted visual
|
|
43
|
+
* fields). Adapters add their own localized label on top of `name`.
|
|
44
|
+
* @public
|
|
45
|
+
*/
|
|
46
|
+
interface ResolvedStyleOption {
|
|
47
|
+
styleId: string;
|
|
48
|
+
name: string;
|
|
49
|
+
priority: number;
|
|
50
|
+
fontSize?: number;
|
|
51
|
+
bold?: boolean;
|
|
52
|
+
italic?: boolean;
|
|
53
|
+
color?: string;
|
|
54
|
+
}
|
|
55
|
+
/** Dropdown preview sizes (px) for well-known styles, matching Google Docs. @public */
|
|
56
|
+
declare const STYLE_PREVIEW_SIZES: Record<string, number>;
|
|
57
|
+
/** Styles rendered bold in the dropdown preview by default. @public */
|
|
58
|
+
declare const STYLE_DEFAULT_BOLD: ReadonlySet<string>;
|
|
59
|
+
/** Default preview text color (hex, no `#`) for styles that don't set one. @public */
|
|
60
|
+
declare const STYLE_DEFAULT_COLOR: Record<string, string>;
|
|
61
|
+
/** Google-Docs heading preview color. @public */
|
|
62
|
+
declare const HEADING_COLOR = "#4a6c8c";
|
|
63
|
+
/**
|
|
64
|
+
* Build the inline preview style for a style option. `fontSize` is in
|
|
65
|
+
* half-points (OOXML); known styles use {@link STYLE_PREVIEW_SIZES} instead.
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
declare function getStylePreviewProps(input: {
|
|
69
|
+
styleId: string;
|
|
70
|
+
fontSize?: number;
|
|
71
|
+
bold?: boolean;
|
|
72
|
+
italic?: boolean;
|
|
73
|
+
color?: string;
|
|
74
|
+
}): StylePreviewProps;
|
|
75
|
+
/**
|
|
76
|
+
* Filter the document's styles to the visible paragraph styles, extract their
|
|
77
|
+
* visual fields, and sort by UI priority — the list a toolbar style picker
|
|
78
|
+
* shows. Returns `[]` when there are no styles (adapters fall back to presets).
|
|
79
|
+
* @public
|
|
80
|
+
*/
|
|
81
|
+
declare function resolveParagraphStyleOptions(styles: Style[] | undefined): ResolvedStyleOption[];
|
|
82
|
+
|
|
83
|
+
export { HEADING_COLOR, type ResolvedStyleOption, STYLE_DEFAULT_BOLD, STYLE_DEFAULT_COLOR, STYLE_PREVIEW_SIZES, type StylePreviewProps, getStylePreviewProps, resolveParagraphStyleOptions };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');var n={Title:26,Subtitle:18,Heading1:24,Heading2:18,Heading3:16,Heading4:14,Heading5:13,Heading6:13,Normal:14},l=new Set(["Title","Heading1","Heading2","Heading3"]),a={Subtitle:"666666"},d="#4a6c8c";function c(t){let e=n[t.styleId],o={fontSize:e?`${e}px`:`${Math.min(Math.max(t.fontSize?t.fontSize/2:11,11),20)}px`,lineHeight:"1.3"};(t.bold??l.has(t.styleId))&&(o.fontWeight="bold"),t.italic&&(o.fontStyle="italic");let i=t.color??a[t.styleId];return i?o.color=`#${i}`:t.styleId.startsWith("Heading")&&(o.color=d),o}function s(t){return !t||t.length===0?[]:t.filter(e=>e.type==="paragraph").filter(e=>e.qFormat?true:!(e.hidden||e.semiHidden)).map(e=>({styleId:e.styleId,name:e.name||e.styleId,priority:e.uiPriority??99,fontSize:e.rPr?.fontSize,bold:e.rPr?.bold,italic:e.rPr?.italic,color:e.rPr?.color?.rgb})).sort((e,r)=>e.priority-r.priority)}exports.HEADING_COLOR=d;exports.STYLE_DEFAULT_BOLD=l;exports.STYLE_DEFAULT_COLOR=a;exports.STYLE_PREVIEW_SIZES=n;exports.getStylePreviewProps=c;exports.resolveParagraphStyleOptions=s;
|