@eigenpal/docx-editor-core 1.5.0 → 1.6.1
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 +4 -4
- package/dist/agent/index.d.ts +4 -4
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-3HLRRK6N.mjs +2 -0
- package/dist/{chunk-COV4LHQ7.js → chunk-4272FQ2E.js} +1 -1
- package/dist/chunk-47SKD7QB.mjs +4 -0
- package/dist/chunk-4DCTKHS5.js +1 -0
- package/dist/{chunk-3SJQRYO7.js → chunk-4HNEXEGS.js} +1 -1
- package/dist/chunk-4U2S3WV2.js +1 -0
- package/dist/{chunk-3HENAL6V.mjs → chunk-5EP47PMQ.mjs} +1 -1
- package/dist/{chunk-T4O4PFJD.mjs → chunk-6ENZQGYR.mjs} +1 -1
- package/dist/chunk-7EU6E64E.mjs +1 -0
- package/dist/chunk-A7C3DGQA.mjs +1 -0
- package/dist/chunk-B6FA4MJ5.mjs +1 -0
- package/dist/chunk-BJSG6TEG.js +1 -0
- package/dist/chunk-BMP2OSXE.js +1 -0
- package/dist/{chunk-NPFFCPZ6.js → chunk-DEQFU56O.js} +1 -1
- package/dist/chunk-DFDL337G.js +4 -0
- package/dist/chunk-DKUHG27E.js +1 -0
- package/dist/{chunk-WWVIVYX6.mjs → chunk-DU5TWD2W.mjs} +1 -1
- package/dist/chunk-DUVSDFRG.js +2 -0
- package/dist/{chunk-TV6JLFY5.js → chunk-DUXHJ6QP.js} +1 -1
- package/dist/{chunk-TE2AF7FM.js → chunk-FETIBXTH.js} +1 -1
- package/dist/chunk-GLPOVLZD.mjs +1 -0
- package/dist/{chunk-M7KTKPGO.mjs → chunk-HEJJXAXN.mjs} +1 -1
- package/dist/chunk-HQ76VZAN.mjs +1 -0
- package/dist/{chunk-WYFK4QOF.mjs → chunk-ICNIAAH7.mjs} +1 -1
- package/dist/{chunk-5WINQXA3.js → chunk-ILPNMG7Q.js} +1 -1
- package/dist/{chunk-TDYWEVAE.js → chunk-K7NSOCSY.js} +1 -1
- package/dist/{chunk-6KM4VW4L.js → chunk-KEDY4GFG.js} +3 -3
- package/dist/chunk-KNY7SXPJ.mjs +1 -0
- package/dist/{chunk-SKBHY5MK.mjs → chunk-KPWWI5UW.mjs} +1 -1
- package/dist/chunk-LVUL7O27.js +1 -0
- package/dist/{chunk-O2643IUW.js → chunk-LW5OFHSW.js} +2 -2
- package/dist/chunk-MWOHCSZE.js +1 -0
- package/dist/chunk-NKIDBERV.js +1 -0
- package/dist/chunk-NN2EJIO7.mjs +1 -0
- package/dist/{chunk-QUM4DFRE.mjs → chunk-O4RCQNUW.mjs} +1 -1
- package/dist/chunk-O5L4BZCZ.mjs +1 -0
- package/dist/chunk-OSTMAXZZ.mjs +1 -0
- package/dist/{chunk-PYDX4MOT.mjs → chunk-OWGY46IW.mjs} +1 -1
- package/dist/chunk-PGWY6UFK.js +1 -0
- package/dist/chunk-PJEB3ZWG.mjs +3 -0
- package/dist/{chunk-GB7RICH6.js → chunk-PM4KDJJ2.js} +1 -1
- package/dist/chunk-Q2VALXEU.js +3 -0
- package/dist/chunk-QCPISGPW.mjs +1 -0
- package/dist/{chunk-CBKJOPOW.mjs → chunk-QRBFMR7Z.mjs} +1 -1
- package/dist/chunk-RRJKF2XI.mjs +1 -0
- package/dist/chunk-SHZOAUHB.mjs +1 -0
- package/dist/chunk-TT3ILFZC.js +1 -0
- package/dist/chunk-TXAB4I4M.mjs +2 -0
- package/dist/chunk-UC7JW66O.mjs +1 -0
- package/dist/chunk-VMBCUUZM.mjs +1 -0
- package/dist/chunk-WTIN6QHX.js +1 -0
- package/dist/{chunk-P7HWOJC5.js → chunk-WVY2UXAK.js} +1 -1
- package/dist/chunk-XCTYXYEU.js +1 -0
- package/dist/{chunk-WXSGCEBZ.js → chunk-XCXQWCV2.js} +1 -1
- package/dist/{chunk-M3UL6EUU.mjs → chunk-YSBX4LFA.mjs} +2 -2
- package/dist/chunk-YUHOVME2.js +1 -0
- package/dist/{content-BlWiORm-.d.mts → content-BEFz1zcs.d.mts} +2 -2
- package/dist/{content-eG_Rtl0l.d.ts → content-DNcMlHU0.d.ts} +2 -2
- package/dist/{contentControlValues-CO7pUqOf.d.ts → contentControlValues-2pV4M4kG.d.ts} +1 -1
- package/dist/{contentControlValues-DfYN9BZ8.d.mts → contentControlValues-CKWIIkkr.d.mts} +1 -1
- package/dist/core-plugins.d.mts +2 -2
- package/dist/core-plugins.d.ts +2 -2
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +7 -7
- package/dist/core.d.ts +7 -7
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/docx/index.d.mts +2 -2
- package/dist/docx/index.d.ts +2 -2
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +2 -2
- package/dist/docx/parser.d.ts +2 -2
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +2 -2
- package/dist/docx/rezip.d.ts +2 -2
- package/dist/docx/serializer/index.d.mts +3 -3
- package/dist/docx/serializer/index.d.ts +3 -3
- package/dist/editor/index.d.mts +2 -2
- package/dist/editor/index.d.ts +2 -2
- 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-C6VvBUVB.d.ts → fontLoader-CH12AtFF.d.ts} +1 -1
- package/dist/{fontLoader-3MFD_Hj2.d.mts → fontLoader-D3X2Qgb_.d.mts} +1 -1
- package/dist/{headerFooterLayout-bdHWlU6g.d.ts → headerFooterLayout-BdGTU0IA.d.ts} +31 -16
- package/dist/{headerFooterLayout-DJb-dV7X.d.mts → headerFooterLayout-D5-u-IsD.d.mts} +31 -16
- package/dist/headless.d.mts +5 -5
- package/dist/headless.d.ts +5 -5
- 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 +67 -5
- package/dist/layout-bridge/index.d.ts +67 -5
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +2 -2
- package/dist/layout-bridge/measuring/index.d.ts +2 -2
- 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 +2 -2
- package/dist/layout-bridge/toFlowBlocks.d.ts +2 -2
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +2 -2
- package/dist/layout-engine/index.d.ts +2 -2
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +2 -2
- package/dist/layout-engine/types.d.ts +2 -2
- package/dist/layout-painter/index.d.mts +3 -3
- package/dist/layout-painter/index.d.ts +3 -3
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +3 -3
- package/dist/layout-painter/renderPage.d.ts +3 -3
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/managers/AutoSaveManager.d.mts +2 -2
- package/dist/managers/AutoSaveManager.d.ts +2 -2
- package/dist/managers/TableSelectionManager.d.mts +2 -2
- package/dist/managers/TableSelectionManager.d.ts +2 -2
- package/dist/managers/types.d.mts +2 -2
- package/dist/managers/types.d.ts +2 -2
- package/dist/mcp-cli.mjs +22 -22
- package/dist/mcp.d.mts +2 -2
- package/dist/mcp.d.ts +2 -2
- package/dist/mcp.js +7 -7
- package/dist/mcp.mjs +1 -1
- package/dist/{nodes-RfTS-NSv.d.mts → nodes-5w_QaI3g.d.mts} +13 -1
- package/dist/{nodes-BJef4KFW.d.ts → nodes-qQdZtu3Z.d.ts} +13 -1
- package/dist/prosemirror/applyFormatting.d.mts +34 -4
- package/dist/prosemirror/applyFormatting.d.ts +34 -4
- package/dist/prosemirror/applyFormatting.js +1 -1
- package/dist/prosemirror/applyFormatting.mjs +1 -1
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.d.mts +2 -1
- package/dist/prosemirror/commands/index.d.ts +2 -1
- package/dist/prosemirror/commands/index.js +1 -1
- package/dist/prosemirror/commands/index.mjs +1 -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 +2 -2
- package/dist/prosemirror/commentIdAllocator.d.ts +2 -2
- package/dist/prosemirror/commentOps.d.mts +2 -2
- package/dist/prosemirror/commentOps.d.ts +2 -2
- package/dist/prosemirror/conversion/fromProseDoc.d.mts +2 -2
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +2 -2
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +2 -2
- package/dist/prosemirror/conversion/index.d.ts +2 -2
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/index.d.mts +4 -4
- package/dist/prosemirror/index.d.ts +4 -4
- package/dist/prosemirror/index.js +2 -2
- package/dist/prosemirror/index.mjs +2 -2
- package/dist/prosemirror/plugins/index.d.mts +2 -2
- package/dist/prosemirror/plugins/index.d.ts +2 -2
- package/dist/prosemirror/plugins/index.js +1 -1
- package/dist/prosemirror/plugins/index.mjs +1 -1
- package/dist/prosemirror/queries.d.mts +2 -2
- package/dist/prosemirror/queries.d.ts +2 -2
- package/dist/prosemirror/schema/index.d.mts +3 -3
- package/dist/prosemirror/schema/index.d.ts +3 -3
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +2 -2
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +2 -2
- package/dist/{sectionPropertiesSerializer-S8J1V9mb.d.ts → sectionPropertiesSerializer-BJSNK-Wl.d.ts} +1 -1
- package/dist/{sectionPropertiesSerializer-C8XCmzE4.d.mts → sectionPropertiesSerializer-DI3OIQ1j.d.mts} +1 -1
- package/dist/types/content.d.mts +2 -2
- package/dist/types/content.d.ts +2 -2
- package/dist/types/content.js +1 -1
- package/dist/types/content.mjs +1 -1
- package/dist/types/document.d.mts +3 -3
- package/dist/types/document.d.ts +3 -3
- 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 +2 -2
- package/dist/utils/comments.d.ts +2 -2
- package/dist/utils/index.d.mts +37 -4
- package/dist/utils/index.d.ts +37 -4
- 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-CN9_pUR_.d.mts → variableDetector-7xBsshP0.d.mts} +1 -1
- package/dist/{variableDetector-o4Rb2Csy.d.ts → variableDetector-Bv5Tm0D-.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 +17 -1
- package/dist/chunk-4Q2IP5FW.js +0 -1
- package/dist/chunk-4RQAAKQI.mjs +0 -1
- package/dist/chunk-5HA66FH4.mjs +0 -1
- package/dist/chunk-7OW3VCZE.mjs +0 -1
- package/dist/chunk-AA6D2C6R.js +0 -4
- package/dist/chunk-AMJNIGO2.mjs +0 -2
- package/dist/chunk-BHBOAP6Z.js +0 -3
- package/dist/chunk-BTSL4AYY.js +0 -1
- package/dist/chunk-C45EFOVP.js +0 -1
- package/dist/chunk-CUY2THAO.mjs +0 -1
- package/dist/chunk-DKKTY56Q.js +0 -1
- package/dist/chunk-DZ3FN3JI.js +0 -2
- package/dist/chunk-ENIWJBS7.mjs +0 -2
- package/dist/chunk-EZNVVB63.mjs +0 -1
- package/dist/chunk-GKAXYZCE.mjs +0 -1
- package/dist/chunk-IGYHDSM7.mjs +0 -1
- package/dist/chunk-L6ZRNW7Y.mjs +0 -1
- package/dist/chunk-LJ2TB6CY.js +0 -1
- package/dist/chunk-MOKKS75W.mjs +0 -3
- package/dist/chunk-ND33YQGU.js +0 -1
- package/dist/chunk-QXSDGNJ4.js +0 -1
- package/dist/chunk-RT52EYG3.mjs +0 -4
- package/dist/chunk-SHYNWAW6.mjs +0 -1
- package/dist/chunk-SNTAAXXA.mjs +0 -1
- package/dist/chunk-TAQTZAVZ.js +0 -1
- package/dist/chunk-UKMKGIME.js +0 -1
- package/dist/chunk-UXPY65AC.js +0 -1
- package/dist/chunk-VOCHZNOF.mjs +0 -1
- package/dist/chunk-VW22RZ6C.mjs +0 -1
- package/dist/chunk-WQRWRWSK.js +0 -1
- package/dist/chunk-YHXVNJK5.mjs +0 -1
- package/dist/chunk-ZETEPB7I.js +0 -1
- package/dist/executor-DZAMMQ35.js +0 -1
- package/dist/executor-ZCJRLT3Z.mjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Document } from './types/document.mjs';
|
|
2
|
-
import { D as DocumentBody, B as BlockContent, S as SectionProperties } from './content-
|
|
2
|
+
import { D as DocumentBody, B as BlockContent, S as SectionProperties } from './content-BEFz1zcs.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Document Serializer - Serialize complete document.xml
|
package/dist/types/content.d.mts
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export { B as BlockContent,
|
|
16
|
-
export { P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-
|
|
15
|
+
export { B as BlockContent, v as BlockSdt, y as BookmarkEnd, z as BookmarkStart, w as BreakContent, A as Column, C as Comment, f as CommentRangeEnd, g as CommentRangeStart, G as ComplexField, h as Deletion, D as DocumentBody, J as DrawingContent, E as Endnote, K as EndnotePosition, L as EndnoteProperties, N as Field, O as FieldCharContent, Q as FieldType, U as FooterReference, F as Footnote, V as FootnotePosition, W as FootnoteProperties, x as HeaderFooter, X as HeaderFooterType, Y as HeaderReference, H as Hyperlink, I as Image, Z as ImageCrop, _ as ImagePadding, $ as ImagePosition, a0 as ImageSize, a1 as ImageTransform, a2 as ImageWrap, a3 as InlineSdt, i as Insertion, a4 as InstrTextContent, a5 as LineNumberRestart, a6 as MathEquation, M as MoveFrom, a7 as MoveFromRangeEnd, a8 as MoveFromRangeStart, j as MoveTo, a9 as MoveToRangeEnd, aa as MoveToRangeStart, ab as NoBreakHyphenContent, ac as NoteNumberRestart, ad as NoteRefMarkContent, ae as NoteReferenceContent, af as PageOrientation, P as Paragraph, k as ParagraphContent, b as ParagraphPropertyChange, ag as PropertyChangeInfo, l as Run, m as RunContent, R as RunPropertyChange, u as SdtDataBinding, t as SdtProperties, s as SdtType, ah as Section, S as SectionProperties, ai as SectionStart, aj as SeparatorContent, ak as Shape, al as ShapeContent, am as ShapeFill, an as ShapeOutline, ao as ShapeTextBody, ap as ShapeType, aq as SimpleField, ar as SoftHyphenContent, as as SymbolContent, at as TabContent, T as Table, n as TableCell, d as TableCellPropertyChange, c as TablePropertyChange, o as TableRow, e as TableRowPropertyChange, au as TableStructuralChangeInfo, av as TextBox, p as TextContent, q as TrackedChangeInfo, r as TrackedRunChange, aw as VerticalAlign } from '../content-BEFz1zcs.mjs';
|
|
16
|
+
export { D as DEFAULT_WATERMARK_PRESETS, P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-D90356ZM.mjs';
|
|
17
17
|
import '../formatting-DFtuRFQY.mjs';
|
|
18
18
|
import '../colors-C3vA7HUU.mjs';
|
|
19
19
|
import '../docx/wrapTypes.mjs';
|
package/dist/types/content.d.ts
CHANGED
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* @packageDocumentation
|
|
13
13
|
* @public
|
|
14
14
|
*/
|
|
15
|
-
export { B as BlockContent,
|
|
16
|
-
export { P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-
|
|
15
|
+
export { B as BlockContent, v as BlockSdt, y as BookmarkEnd, z as BookmarkStart, w as BreakContent, A as Column, C as Comment, f as CommentRangeEnd, g as CommentRangeStart, G as ComplexField, h as Deletion, D as DocumentBody, J as DrawingContent, E as Endnote, K as EndnotePosition, L as EndnoteProperties, N as Field, O as FieldCharContent, Q as FieldType, U as FooterReference, F as Footnote, V as FootnotePosition, W as FootnoteProperties, x as HeaderFooter, X as HeaderFooterType, Y as HeaderReference, H as Hyperlink, I as Image, Z as ImageCrop, _ as ImagePadding, $ as ImagePosition, a0 as ImageSize, a1 as ImageTransform, a2 as ImageWrap, a3 as InlineSdt, i as Insertion, a4 as InstrTextContent, a5 as LineNumberRestart, a6 as MathEquation, M as MoveFrom, a7 as MoveFromRangeEnd, a8 as MoveFromRangeStart, j as MoveTo, a9 as MoveToRangeEnd, aa as MoveToRangeStart, ab as NoBreakHyphenContent, ac as NoteNumberRestart, ad as NoteRefMarkContent, ae as NoteReferenceContent, af as PageOrientation, P as Paragraph, k as ParagraphContent, b as ParagraphPropertyChange, ag as PropertyChangeInfo, l as Run, m as RunContent, R as RunPropertyChange, u as SdtDataBinding, t as SdtProperties, s as SdtType, ah as Section, S as SectionProperties, ai as SectionStart, aj as SeparatorContent, ak as Shape, al as ShapeContent, am as ShapeFill, an as ShapeOutline, ao as ShapeTextBody, ap as ShapeType, aq as SimpleField, ar as SoftHyphenContent, as as SymbolContent, at as TabContent, T as Table, n as TableCell, d as TableCellPropertyChange, c as TablePropertyChange, o as TableRow, e as TableRowPropertyChange, au as TableStructuralChangeInfo, av as TextBox, p as TextContent, q as TrackedChangeInfo, r as TrackedRunChange, aw as VerticalAlign } from '../content-DNcMlHU0.js';
|
|
16
|
+
export { D as DEFAULT_WATERMARK_PRESETS, P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-D90356ZM.js';
|
|
17
17
|
import '../formatting-JhqWT_XM.js';
|
|
18
18
|
import '../colors-C3vA7HUU.js';
|
|
19
19
|
import '../docx/wrapTypes.js';
|
package/dist/types/content.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkLVUL7O27_js=require('../chunk-LVUL7O27.js');require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"DEFAULT_WATERMARK_PRESETS",{enumerable:true,get:function(){return chunkLVUL7O27_js.a}});Object.defineProperty(exports,"pictureWatermarkDisplayEmu",{enumerable:true,get:function(){return chunkLVUL7O27_js.b}});
|
package/dist/types/content.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as pictureWatermarkDisplayEmu}from'../chunk-
|
|
1
|
+
export{a as DEFAULT_WATERMARK_PRESETS,b as pictureWatermarkDisplayEmu}from'../chunk-UC7JW66O.mjs';import'../chunk-QYUPLKLP.mjs';
|
|
@@ -17,9 +17,9 @@ export { B as BorderSpec, C as ColorValue, S as ShadingProperties, T as ThemeCol
|
|
|
17
17
|
export { C as CellMargins, g as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, d as ParagraphAlignment, P as ParagraphFormatting, h as TabLeader, e as TabStop, i as TabStopAlignment, j as TableBorders, c as TableCellFormatting, a as TableFormatting, f as TableLook, k as TableMeasurement, b as TableRowFormatting, l as TableWidthType, m as TextEffect, T as TextFormatting, U as UnderlineStyle } from '../formatting-DFtuRFQY.mjs';
|
|
18
18
|
import { a as NumberingDefinitions } from '../lists-CyGxd5Y2.mjs';
|
|
19
19
|
export { A as AbstractNumbering, d as LevelSuffix, L as ListLevel, c as ListRendering, N as NumberFormat, b as NumberingInstance } from '../lists-CyGxd5Y2.mjs';
|
|
20
|
-
import { D as DocumentBody, F as Footnote, E as Endnote,
|
|
21
|
-
export { B as BlockContent,
|
|
22
|
-
export { P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-
|
|
20
|
+
import { D as DocumentBody, F as Footnote, E as Endnote, x as HeaderFooter } from '../content-BEFz1zcs.mjs';
|
|
21
|
+
export { B as BlockContent, v as BlockSdt, y as BookmarkEnd, z as BookmarkStart, w as BreakContent, A as Column, C as Comment, f as CommentRangeEnd, g as CommentRangeStart, G as ComplexField, h as Deletion, J as DrawingContent, K as EndnotePosition, L as EndnoteProperties, N as Field, O as FieldCharContent, Q as FieldType, U as FooterReference, V as FootnotePosition, W as FootnoteProperties, X as HeaderFooterType, Y as HeaderReference, H as Hyperlink, I as Image, Z as ImageCrop, _ as ImagePadding, $ as ImagePosition, a0 as ImageSize, a1 as ImageTransform, a2 as ImageWrap, a3 as InlineSdt, i as Insertion, a4 as InstrTextContent, a5 as LineNumberRestart, a6 as MathEquation, M as MoveFrom, a7 as MoveFromRangeEnd, a8 as MoveFromRangeStart, j as MoveTo, a9 as MoveToRangeEnd, aa as MoveToRangeStart, ab as NoBreakHyphenContent, ac as NoteNumberRestart, ad as NoteRefMarkContent, ae as NoteReferenceContent, af as PageOrientation, P as Paragraph, k as ParagraphContent, b as ParagraphPropertyChange, ag as PropertyChangeInfo, l as Run, m as RunContent, R as RunPropertyChange, u as SdtDataBinding, t as SdtProperties, s as SdtType, ah as Section, S as SectionProperties, ai as SectionStart, aj as SeparatorContent, ak as Shape, al as ShapeContent, am as ShapeFill, an as ShapeOutline, ao as ShapeTextBody, ap as ShapeType, aq as SimpleField, ar as SoftHyphenContent, as as SymbolContent, at as TabContent, T as Table, n as TableCell, d as TableCellPropertyChange, c as TablePropertyChange, o as TableRow, e as TableRowPropertyChange, au as TableStructuralChangeInfo, av as TextBox, p as TextContent, q as TrackedChangeInfo, r as TrackedRunChange, aw as VerticalAlign } from '../content-BEFz1zcs.mjs';
|
|
22
|
+
export { D as DEFAULT_WATERMARK_PRESETS, P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-D90356ZM.mjs';
|
|
23
23
|
import { S as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-Dqec8Aw6.mjs';
|
|
24
24
|
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, a as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-Dqec8Aw6.mjs';
|
|
25
25
|
import '../docx/wrapTypes.mjs';
|
package/dist/types/document.d.ts
CHANGED
|
@@ -17,9 +17,9 @@ export { B as BorderSpec, C as ColorValue, S as ShadingProperties, T as ThemeCol
|
|
|
17
17
|
export { C as CellMargins, g as ConditionalFormatStyle, E as EmphasisMark, F as FloatingTableProperties, L as LineSpacingRule, d as ParagraphAlignment, P as ParagraphFormatting, h as TabLeader, e as TabStop, i as TabStopAlignment, j as TableBorders, c as TableCellFormatting, a as TableFormatting, f as TableLook, k as TableMeasurement, b as TableRowFormatting, l as TableWidthType, m as TextEffect, T as TextFormatting, U as UnderlineStyle } from '../formatting-JhqWT_XM.js';
|
|
18
18
|
import { a as NumberingDefinitions } from '../lists-Bn29SzeS.js';
|
|
19
19
|
export { A as AbstractNumbering, d as LevelSuffix, L as ListLevel, c as ListRendering, N as NumberFormat, b as NumberingInstance } from '../lists-Bn29SzeS.js';
|
|
20
|
-
import { D as DocumentBody, F as Footnote, E as Endnote,
|
|
21
|
-
export { B as BlockContent,
|
|
22
|
-
export { P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-
|
|
20
|
+
import { D as DocumentBody, F as Footnote, E as Endnote, x as HeaderFooter } from '../content-DNcMlHU0.js';
|
|
21
|
+
export { B as BlockContent, v as BlockSdt, y as BookmarkEnd, z as BookmarkStart, w as BreakContent, A as Column, C as Comment, f as CommentRangeEnd, g as CommentRangeStart, G as ComplexField, h as Deletion, J as DrawingContent, K as EndnotePosition, L as EndnoteProperties, N as Field, O as FieldCharContent, Q as FieldType, U as FooterReference, V as FootnotePosition, W as FootnoteProperties, X as HeaderFooterType, Y as HeaderReference, H as Hyperlink, I as Image, Z as ImageCrop, _ as ImagePadding, $ as ImagePosition, a0 as ImageSize, a1 as ImageTransform, a2 as ImageWrap, a3 as InlineSdt, i as Insertion, a4 as InstrTextContent, a5 as LineNumberRestart, a6 as MathEquation, M as MoveFrom, a7 as MoveFromRangeEnd, a8 as MoveFromRangeStart, j as MoveTo, a9 as MoveToRangeEnd, aa as MoveToRangeStart, ab as NoBreakHyphenContent, ac as NoteNumberRestart, ad as NoteRefMarkContent, ae as NoteReferenceContent, af as PageOrientation, P as Paragraph, k as ParagraphContent, b as ParagraphPropertyChange, ag as PropertyChangeInfo, l as Run, m as RunContent, R as RunPropertyChange, u as SdtDataBinding, t as SdtProperties, s as SdtType, ah as Section, S as SectionProperties, ai as SectionStart, aj as SeparatorContent, ak as Shape, al as ShapeContent, am as ShapeFill, an as ShapeOutline, ao as ShapeTextBody, ap as ShapeType, aq as SimpleField, ar as SoftHyphenContent, as as SymbolContent, at as TabContent, T as Table, n as TableCell, d as TableCellPropertyChange, c as TablePropertyChange, o as TableRow, e as TableRowPropertyChange, au as TableStructuralChangeInfo, av as TextBox, p as TextContent, q as TrackedChangeInfo, r as TrackedRunChange, aw as VerticalAlign } from '../content-DNcMlHU0.js';
|
|
22
|
+
export { D as DEFAULT_WATERMARK_PRESETS, P as PictureWatermark, T as TextWatermark, W as Watermark, p as pictureWatermarkDisplayEmu } from '../watermark-D90356ZM.js';
|
|
23
23
|
import { S as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-gEujs7j6.js';
|
|
24
24
|
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, a as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-gEujs7j6.js';
|
|
25
25
|
import '../docx/wrapTypes.js';
|
package/dist/types/document.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkLVUL7O27_js=require('../chunk-LVUL7O27.js');require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"DEFAULT_WATERMARK_PRESETS",{enumerable:true,get:function(){return chunkLVUL7O27_js.a}});Object.defineProperty(exports,"pictureWatermarkDisplayEmu",{enumerable:true,get:function(){return chunkLVUL7O27_js.b}});
|
package/dist/types/document.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as pictureWatermarkDisplayEmu}from'../chunk-
|
|
1
|
+
export{a as DEFAULT_WATERMARK_PRESETS,b as pictureWatermarkDisplayEmu}from'../chunk-UC7JW66O.mjs';import'../chunk-QYUPLKLP.mjs';
|
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,12 +8,12 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { P as Paragraph } from '../content-
|
|
11
|
+
import { P as Paragraph } from '../content-BEFz1zcs.mjs';
|
|
12
12
|
import '../formatting-DFtuRFQY.mjs';
|
|
13
13
|
import '../colors-C3vA7HUU.mjs';
|
|
14
14
|
import '../docx/wrapTypes.mjs';
|
|
15
15
|
import '../lists-CyGxd5Y2.mjs';
|
|
16
|
-
import '../watermark-
|
|
16
|
+
import '../watermark-D90356ZM.mjs';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Framework-agnostic comment + tracked-change helpers shared by the
|
package/dist/utils/comments.d.ts
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { P as Paragraph } from '../content-
|
|
11
|
+
import { P as Paragraph } from '../content-DNcMlHU0.js';
|
|
12
12
|
import '../formatting-JhqWT_XM.js';
|
|
13
13
|
import '../colors-C3vA7HUU.js';
|
|
14
14
|
import '../docx/wrapTypes.js';
|
|
15
15
|
import '../lists-Bn29SzeS.js';
|
|
16
|
-
import '../watermark-
|
|
16
|
+
import '../watermark-D90356ZM.js';
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* Framework-agnostic comment + tracked-change helpers shared by the
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
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
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 {
|
|
12
|
+
import { l as Run, P as Paragraph } from '../content-BEFz1zcs.mjs';
|
|
13
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, 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-
|
|
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-D3X2Qgb_.mjs';
|
|
16
16
|
import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.mjs';
|
|
17
17
|
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-DFtuRFQY.mjs';
|
|
18
18
|
export { HeadingInfo, collectHeadings } from './headingCollector.mjs';
|
|
@@ -20,7 +20,7 @@ export { WordSelectionResult, createDoubleClickWordSelector, createTripleClickPa
|
|
|
20
20
|
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH } from './sidebarConstants.mjs';
|
|
21
21
|
import '../types/document.mjs';
|
|
22
22
|
import '../lists-CyGxd5Y2.mjs';
|
|
23
|
-
import '../watermark-
|
|
23
|
+
import '../watermark-D90356ZM.mjs';
|
|
24
24
|
import '../docx/wrapTypes.mjs';
|
|
25
25
|
import 'prosemirror-model';
|
|
26
26
|
|
|
@@ -709,4 +709,37 @@ interface ReadDocxFileResult {
|
|
|
709
709
|
*/
|
|
710
710
|
declare function readDocxFileFromInput(event: Event): Promise<ReadDocxFileResult | null>;
|
|
711
711
|
|
|
712
|
-
|
|
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
|
@@ -9,10 +9,10 @@
|
|
|
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
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 {
|
|
12
|
+
import { l as Run, P as Paragraph } from '../content-DNcMlHU0.js';
|
|
13
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, 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-
|
|
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-CH12AtFF.js';
|
|
16
16
|
import { B as BorderSpec, S as ShadingProperties } from '../colors-C3vA7HUU.js';
|
|
17
17
|
import { P as ParagraphFormatting, T as TextFormatting } from '../formatting-JhqWT_XM.js';
|
|
18
18
|
export { HeadingInfo, collectHeadings } from './headingCollector.js';
|
|
@@ -20,7 +20,7 @@ export { WordSelectionResult, createDoubleClickWordSelector, createTripleClickPa
|
|
|
20
20
|
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH } from './sidebarConstants.js';
|
|
21
21
|
import '../types/document.js';
|
|
22
22
|
import '../lists-Bn29SzeS.js';
|
|
23
|
-
import '../watermark-
|
|
23
|
+
import '../watermark-D90356ZM.js';
|
|
24
24
|
import '../docx/wrapTypes.js';
|
|
25
25
|
import 'prosemirror-model';
|
|
26
26
|
|
|
@@ -709,4 +709,37 @@ interface ReadDocxFileResult {
|
|
|
709
709
|
*/
|
|
710
710
|
declare function readDocxFileFromInput(event: Event): Promise<ReadDocxFileResult | null>;
|
|
711
711
|
|
|
712
|
-
|
|
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'),chunkQVRMX2AC_js=require('../chunk-QVRMX2AC.js'),chunk2KHWHVTA_js=require('../chunk-2KHWHVTA.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 bo(){return g!==null||document.getElementById("docx-selection-styles")!==null}function yo(e,t,o=true){return ()=>{if(!e){t([]);return}let n=o?k(e):S(e);t(n);}}async function Co(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 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 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=io;exports.NAVIGATION_SHORTCUTS=s;exports.SELECTION_CSS_VARS=lo;exports.areSelectionStylesInjected=bo;exports.clearSelection=mo;exports.createSelectionChangeHandler=yo;exports.describeShortcut=d;exports.expandSelectionToWord=to;exports.extendSelectionTo=p;exports.findNextWordStart=b;exports.findPreviousWordStart=y;exports.findVisualLineEnd=T;exports.findVisualLineStart=C;exports.findWordEnd=Jt;exports.findWordStart=qt;exports.generateSelectionCSS=ao;exports.getHighlightRectStyle=co;exports.getMergedSelectionRects=k;exports.getNavigationShortcutDescriptions=ro;exports.getSelectedText=uo;exports.getSelectionBoundingRect=fo;exports.getSelectionInfo=Qt;exports.getSelectionRects=S;exports.getWordAtCursor=oo;exports.handleNavigationKey=Zt;exports.hasActiveSelection=so;exports.highlightTextRange=ho;exports.injectSelectionStyles=So;exports.isNavigationKey=eo;exports.isPunctuation=Yt;exports.isSelectionBackwards=A;exports.isSelectionWithin=go;exports.isWhitespace=x;exports.isWordCharacter=u;exports.matchesShortcut=no;exports.mergeAdjacentRects=N;exports.moveByWord=R;exports.moveToLineEdge=w;exports.normalizeSelectionDirection=xo;exports.parseNavigationAction=E;exports.readDocxFileFromInput=Co;exports.removeSelectionStyles=v;exports.selectRange=po;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{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-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 Yt(e){return e?/[\p{P}]/u.test(e):false}function qt(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 Jt(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 Zt(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 eo(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function to(){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 oo(){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 no(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 ro(){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"},io={backgroundColor:"rgba(0, 120, 215, 0.4)",borderColor:"rgba(0, 120, 215, 0.6)",borderRadius:1,zIndex:0,opacity:1},lo={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 co(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 ao(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};
|