@eigenpal/docx-editor-core 1.0.3 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +13 -16
- package/dist/agent/index.d.mts +42 -7
- package/dist/agent/index.d.ts +42 -7
- package/dist/agent/index.js +1 -1
- package/dist/agent/index.mjs +1 -1
- package/dist/chunk-2EQGBVPV.js +2 -0
- package/dist/chunk-2XP6GLA4.mjs +1 -0
- package/dist/chunk-44FHVKSI.js +1 -0
- package/dist/{chunk-2IE6UDHJ.mjs → chunk-44JKHPGF.mjs} +1 -1
- package/dist/{chunk-ABBG4WD2.js → chunk-4QEETB7U.js} +2 -2
- package/dist/chunk-53VKL6CG.js +1 -0
- package/dist/chunk-5BLQHXWK.mjs +1 -0
- package/dist/chunk-5M7TI6TV.js +1 -0
- package/dist/chunk-6JKM7TWJ.mjs +1 -0
- package/dist/{chunk-EQVNAHL7.mjs → chunk-6Y6LON6Y.mjs} +1 -1
- package/dist/{chunk-QVEAQOMR.mjs → chunk-6ZXL3EIP.mjs} +1 -1
- package/dist/{chunk-GHQS3I2W.mjs → chunk-7BVHKWEW.mjs} +1 -1
- package/dist/chunk-7HANRHHL.js +1 -0
- package/dist/chunk-7LRR7RKE.mjs +15 -0
- package/dist/chunk-7OW3VCZE.mjs +1 -0
- package/dist/chunk-7ZN4WI5N.mjs +4 -0
- package/dist/chunk-AMB6Y77B.js +1 -0
- package/dist/{chunk-3JXR6YU4.mjs → chunk-BOOHU5EW.mjs} +1 -1
- package/dist/{chunk-XBHF5Q2F.js → chunk-BXWOLARZ.js} +1 -1
- package/dist/chunk-C45EFOVP.js +1 -0
- package/dist/chunk-CCPBNE2F.mjs +2 -0
- package/dist/{chunk-XWQB6APW.mjs → chunk-D62KS7QG.mjs} +1 -1
- package/dist/chunk-DI6CRWSW.mjs +1 -0
- package/dist/chunk-DTTWBKGN.mjs +0 -0
- package/dist/chunk-DV6GWBUJ.js +2 -0
- package/dist/{chunk-EPX7BBJD.js → chunk-E4JMCA5X.js} +2 -2
- package/dist/chunk-EQAORQC3.mjs +1 -0
- package/dist/chunk-FO6IX2DB.js +6 -0
- package/dist/chunk-FW23IMBF.mjs +1 -0
- package/dist/chunk-FYKRDDKG.js +1 -0
- package/dist/chunk-GSKMHXHG.js +1 -0
- package/dist/chunk-GUQFNJHE.mjs +1 -0
- package/dist/{chunk-D536HC5M.js → chunk-HQPWFUP5.js} +1 -1
- package/dist/chunk-ICE6NC3S.mjs +1 -0
- package/dist/chunk-IFUED5ZS.mjs +1 -0
- package/dist/chunk-ISKTBM4L.js +1 -0
- package/dist/chunk-IYKBX24M.js +1 -0
- package/dist/chunk-KOEWROYV.mjs +6 -0
- package/dist/chunk-KRN6YSR2.mjs +1 -0
- package/dist/chunk-KZXZWGFX.mjs +1 -0
- package/dist/chunk-L24C5TEX.mjs +1 -0
- package/dist/chunk-L72YAV5N.js +3 -0
- package/dist/chunk-LK6I3HMH.mjs +0 -0
- package/dist/{chunk-XBIKSAH6.js → chunk-LTHT4A4S.js} +1 -1
- package/dist/chunk-LWH66Q7Q.js +1 -0
- package/dist/chunk-MERJFGEP.mjs +59 -0
- package/dist/chunk-MJ6XZFVD.mjs +1 -0
- package/dist/chunk-MNOHUTKE.js +15 -0
- package/dist/chunk-MP4QSEO2.mjs +1 -0
- package/dist/{chunk-HL5PQT3A.mjs → chunk-OEXVWIHW.mjs} +1 -1
- package/dist/chunk-PVAVS3IU.js +1 -0
- package/dist/chunk-QEACB5VG.js +1 -0
- package/dist/{chunk-EV6W6KXG.mjs → chunk-QKLY4F2J.mjs} +1 -1
- package/dist/chunk-QYF7BRG3.js +2 -0
- package/dist/chunk-ROG4MNOR.js +4 -0
- package/dist/{chunk-D5E5TA74.js → chunk-RORPREG3.js} +1 -1
- package/dist/chunk-SORYYVJ7.js +1 -0
- package/dist/chunk-SZIOF5SG.js +59 -0
- package/dist/{chunk-SAFW7UQZ.js → chunk-THLJYXFB.js} +1 -1
- package/dist/chunk-TUIEV7Q7.js +1 -0
- package/dist/{chunk-Z4SJCSTS.js → chunk-U4WUDHDK.js} +1 -1
- package/dist/chunk-U4XMGWF7.js +1 -0
- package/dist/chunk-U67MWOPZ.mjs +1 -0
- package/dist/chunk-VMRUBLPI.js +1 -0
- package/dist/chunk-WLDI6N3B.mjs +3 -0
- package/dist/chunk-WLHNIXWC.mjs +2 -0
- package/dist/chunk-WVERBZZU.js +1 -0
- package/dist/chunk-XCKTBNKN.js +1 -0
- package/dist/chunk-XPV6VILW.mjs +1 -0
- package/dist/chunk-Z5MJYQSD.mjs +1 -0
- package/dist/chunk-ZBFNOJGY.js +1 -0
- package/dist/chunk-ZX26QZJ5.mjs +1 -0
- package/dist/content-CE-ZdMwG.d.mts +1418 -0
- package/dist/content-CYXJ2tfQ.d.ts +1418 -0
- package/dist/contentControlValues-DAwTWfgR.d.mts +187 -0
- package/dist/contentControlValues-gyVPsi6m.d.ts +187 -0
- package/dist/core-plugins.d.mts +1 -2
- package/dist/core-plugins.d.ts +1 -2
- package/dist/core-plugins.js +1 -1
- package/dist/core-plugins.mjs +1 -1
- package/dist/core.d.mts +6 -7
- package/dist/core.d.ts +6 -7
- package/dist/core.js +1 -1
- package/dist/core.mjs +1 -1
- package/dist/{documentSerializer-C1ueey5d.d.mts → documentSerializer-Bghq9rFI.d.mts} +1 -1
- package/dist/{documentSerializer-Chn7J1WG.d.ts → documentSerializer-C4lFC60P.d.ts} +1 -1
- package/dist/documentStyles-D87dxl18.d.mts +34 -0
- package/dist/documentStyles-DToJv9co.d.ts +34 -0
- package/dist/docx/index.d.mts +1 -2
- package/dist/docx/index.d.ts +1 -2
- package/dist/docx/index.js +1 -1
- package/dist/docx/index.mjs +1 -1
- package/dist/docx/parser.d.mts +1 -2
- package/dist/docx/parser.d.ts +1 -2
- package/dist/docx/parser.js +1 -1
- package/dist/docx/parser.mjs +1 -1
- package/dist/docx/rezip.d.mts +1 -2
- package/dist/docx/rezip.d.ts +1 -2
- package/dist/docx/rezip.js +1 -1
- package/dist/docx/rezip.mjs +1 -1
- package/dist/docx/serializer/index.d.mts +2 -3
- package/dist/docx/serializer/index.d.ts +2 -3
- package/dist/docx/serializer/index.js +1 -1
- package/dist/docx/serializer/index.mjs +1 -1
- package/dist/{fontLoader-QPwbcX5j.d.ts → fontLoader-Cm02v7PO.d.ts} +63 -3
- package/dist/{fontLoader-BOt95Jtf.d.mts → fontLoader-Z7pqeNvZ.d.mts} +63 -3
- package/dist/{headerFooterLayout-B5LyDpSM.d.ts → headerFooterLayout-Bd58Tum3.d.ts} +74 -2
- package/dist/{headerFooterLayout-DVFcJ832.d.mts → headerFooterLayout-CuIJiIzi.d.mts} +74 -2
- package/dist/headless.d.mts +7 -6
- package/dist/headless.d.ts +7 -6
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/layout-bridge/index.d.mts +4 -4
- package/dist/layout-bridge/index.d.ts +4 -4
- package/dist/layout-bridge/index.js +1 -1
- package/dist/layout-bridge/index.mjs +1 -1
- package/dist/layout-bridge/measuring/index.d.mts +4 -0
- package/dist/layout-bridge/measuring/index.d.ts +4 -0
- 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 -1
- package/dist/layout-bridge/toFlowBlocks.d.ts +2 -1
- package/dist/layout-bridge/toFlowBlocks.js +1 -1
- package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
- package/dist/layout-engine/index.d.mts +4 -1
- package/dist/layout-engine/index.d.ts +4 -1
- package/dist/layout-engine/index.js +1 -1
- package/dist/layout-engine/index.mjs +1 -1
- package/dist/layout-engine/types.d.mts +74 -1
- package/dist/layout-engine/types.d.ts +74 -1
- package/dist/layout-painter/index.d.mts +4 -4
- package/dist/layout-painter/index.d.ts +4 -4
- package/dist/layout-painter/index.js +1 -1
- package/dist/layout-painter/index.mjs +1 -1
- package/dist/layout-painter/renderPage.d.mts +27 -4
- package/dist/layout-painter/renderPage.d.ts +27 -4
- package/dist/layout-painter/renderPage.js +1 -1
- package/dist/layout-painter/renderPage.mjs +1 -1
- package/dist/managers/AutoSaveManager.d.mts +1 -2
- package/dist/managers/AutoSaveManager.d.ts +1 -2
- package/dist/managers/TableSelectionManager.d.mts +1 -2
- package/dist/managers/TableSelectionManager.d.ts +1 -2
- package/dist/managers/types.d.mts +1 -2
- package/dist/managers/types.d.ts +1 -2
- package/dist/mcp-cli.mjs +23 -22
- package/dist/mcp.d.mts +1 -2
- package/dist/mcp.d.ts +1 -2
- package/dist/mcp.js +3 -3
- package/dist/mcp.mjs +1 -1
- package/dist/{nodes-D7PTUJ2N.d.ts → nodes-BNkRKBBX.d.ts} +64 -3
- package/dist/{nodes-CL8M0L-a.d.mts → nodes-Bz-UHhLE.d.mts} +64 -3
- package/dist/prosemirror/commands/formatting.js +1 -1
- package/dist/prosemirror/commands/formatting.mjs +1 -1
- package/dist/prosemirror/commands/index.d.mts +80 -6
- package/dist/prosemirror/commands/index.d.ts +80 -6
- 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/conversion/fromProseDoc.d.mts +2 -3
- package/dist/prosemirror/conversion/fromProseDoc.d.ts +2 -3
- package/dist/prosemirror/conversion/fromProseDoc.js +1 -1
- package/dist/prosemirror/conversion/fromProseDoc.mjs +1 -1
- package/dist/prosemirror/conversion/index.d.mts +3 -4
- package/dist/prosemirror/conversion/index.d.ts +3 -4
- package/dist/prosemirror/conversion/index.js +1 -1
- package/dist/prosemirror/conversion/index.mjs +1 -1
- package/dist/prosemirror/editor.css +302 -95
- package/dist/prosemirror/extensions/index.js +1 -1
- package/dist/prosemirror/extensions/index.mjs +1 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.js +1 -1
- package/dist/prosemirror/extensions/nodes/TableExtension.mjs +1 -1
- package/dist/prosemirror/index.d.mts +94 -7
- package/dist/prosemirror/index.d.ts +94 -7
- package/dist/prosemirror/index.js +3 -1
- package/dist/prosemirror/index.mjs +3 -1
- package/dist/prosemirror/plugins/index.d.mts +124 -17
- package/dist/prosemirror/plugins/index.d.ts +124 -17
- package/dist/prosemirror/plugins/index.js +1 -1
- package/dist/prosemirror/plugins/index.mjs +1 -1
- package/dist/prosemirror/schema/index.d.mts +3 -4
- package/dist/prosemirror/schema/index.d.ts +3 -4
- package/dist/prosemirror/schema/index.js +1 -1
- package/dist/prosemirror/schema/index.mjs +1 -1
- package/dist/prosemirror/styles/index.d.mts +9 -0
- package/dist/prosemirror/styles/index.d.ts +9 -0
- package/dist/prosemirror/styles/index.js +1 -1
- package/dist/prosemirror/styles/index.mjs +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.d.mts +44 -22
- package/dist/prosemirror/utils/extractTrackedChanges.d.ts +44 -22
- package/dist/prosemirror/utils/extractTrackedChanges.js +1 -1
- package/dist/prosemirror/utils/extractTrackedChanges.mjs +1 -1
- package/dist/types/content.d.mts +4 -1167
- package/dist/types/content.d.ts +4 -1167
- package/dist/types/document.d.mts +2 -4
- package/dist/types/document.d.ts +2 -4
- package/dist/utils/comments.d.mts +78 -5
- package/dist/utils/comments.d.ts +78 -5
- package/dist/utils/comments.js +1 -1
- package/dist/utils/comments.mjs +1 -1
- package/dist/utils/highlightColors.js +1 -1
- package/dist/utils/highlightColors.mjs +1 -1
- package/dist/utils/index.d.mts +2 -3
- package/dist/utils/index.d.ts +2 -3
- package/dist/utils/index.js +3 -3
- package/dist/utils/index.mjs +3 -3
- package/dist/{variableDetector-CAdt8yOr.d.mts → variableDetector-C7BLz9sJ.d.mts} +1 -1
- package/dist/{variableDetector-W4XEN9YC.d.ts → variableDetector-HPZbJ_gw.d.ts} +1 -1
- package/package.json +3 -3
- package/dist/chunk-3AZWLVLC.js +0 -1
- package/dist/chunk-3NLVHZMT.js +0 -59
- package/dist/chunk-5SU4HPQS.mjs +0 -1
- package/dist/chunk-7PX32GLB.mjs +0 -1
- package/dist/chunk-AHXPHBMT.js +0 -1
- package/dist/chunk-B6LYBJ4H.mjs +0 -1
- package/dist/chunk-BFB4PRS4.mjs +0 -1
- package/dist/chunk-BRHHK4MG.mjs +0 -2
- package/dist/chunk-CP5OSG5Z.mjs +0 -1
- package/dist/chunk-CUXXRGPQ.mjs +0 -1
- package/dist/chunk-D4RPOJC7.js +0 -1
- package/dist/chunk-FWTP7BN7.mjs +0 -4
- package/dist/chunk-G7AKYAKU.mjs +0 -1
- package/dist/chunk-HAAMO2Z2.mjs +0 -1
- package/dist/chunk-ILJUDEZ5.mjs +0 -1
- package/dist/chunk-IN6IYQ2X.js +0 -1
- package/dist/chunk-IO6HZ7KR.js +0 -2
- package/dist/chunk-IP2VXNWG.js +0 -1
- package/dist/chunk-KBU6QQFU.js +0 -9
- package/dist/chunk-LBKMYD3M.mjs +0 -1
- package/dist/chunk-LDKESXXK.mjs +0 -3
- package/dist/chunk-MZOVDLYL.js +0 -1
- package/dist/chunk-N3EIZN65.js +0 -1
- package/dist/chunk-NBLJPT54.mjs +0 -1
- package/dist/chunk-NERY274X.js +0 -1
- package/dist/chunk-NNQWQOC5.mjs +0 -1
- package/dist/chunk-NO5LW2DQ.mjs +0 -1
- package/dist/chunk-OCAX2KJQ.js +0 -4
- package/dist/chunk-OTDF6PZK.js +0 -1
- package/dist/chunk-P3AXSRLG.mjs +0 -1
- package/dist/chunk-Q4CKLXWA.js +0 -1
- package/dist/chunk-QMLIXLZJ.mjs +0 -4
- package/dist/chunk-QXHL67FG.mjs +0 -1
- package/dist/chunk-TGPS3SRR.mjs +0 -1
- package/dist/chunk-TMISJEGL.js +0 -1
- package/dist/chunk-TRJWRZZD.js +0 -1
- package/dist/chunk-TRQN2SFW.mjs +0 -59
- package/dist/chunk-UGXSKZVM.js +0 -1
- package/dist/chunk-V435QKZB.js +0 -3
- package/dist/chunk-V6SWUCTS.js +0 -2
- package/dist/chunk-VQWZHPWI.mjs +0 -1
- package/dist/chunk-X3NB7STJ.js +0 -1
- package/dist/chunk-XOH7YAYL.js +0 -1
- package/dist/chunk-Y5HZAMND.mjs +0 -9
- package/dist/chunk-Y7I5QDCN.mjs +0 -1
- package/dist/chunk-YCDB5TA6.js +0 -4
- package/dist/chunk-YE357WVA.js +0 -1
- package/dist/chunk-YVYB4YCI.js +0 -1
- package/dist/lists-CvG_iVK3.d.mts +0 -148
- package/dist/lists-UTp_tk7B.d.ts +0 -148
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { B as BorderSpec, C as ColorValue, S as ShadingProperties, T as ThemeColorSlot } from '../colors-C3vA7HUU.mjs';
|
|
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-BH4hcZiq.mjs';
|
|
18
|
-
import { N as NumberingDefinitions } from '../
|
|
19
|
-
export { A as AbstractNumbering, b as LevelSuffix, L as ListLevel,
|
|
20
|
-
import { DocumentBody, Footnote, Endnote, HeaderFooter } from './content.mjs';
|
|
21
|
-
export { BlockContent, BlockSdt, BookmarkEnd, BookmarkStart, BreakContent, Column, Comment, CommentRangeEnd, CommentRangeStart, ComplexField, Deletion, DrawingContent, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FooterReference, FootnotePosition, FootnoteProperties, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InlineSdt, Insertion, InstrTextContent, LineNumberRestart, MathEquation, MoveFrom, MoveFromRangeEnd, MoveFromRangeStart, MoveTo, MoveToRangeEnd, MoveToRangeStart, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, PageOrientation, Paragraph, ParagraphContent, ParagraphPropertyChange, PropertyChangeInfo, Run, RunContent, RunPropertyChange, SdtProperties, SdtType, Section, SectionProperties, SectionStart, Shape, ShapeContent, ShapeFill, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, SymbolContent, TabContent, Table, TableCell, TableCellPropertyChange, TablePropertyChange, TableRow, TableRowPropertyChange, TableStructuralChangeInfo, TextBox, TextContent, TrackedChangeInfo, TrackedRunChange, VerticalAlign } from './content.mjs';
|
|
18
|
+
import { c as DocumentBody, N as NumberingDefinitions, F as Footnote, E as Endnote, y as HeaderFooter } from '../content-CE-ZdMwG.mjs';
|
|
19
|
+
export { A as AbstractNumbering, B as BlockContent, w as BlockSdt, z as BookmarkEnd, G as BookmarkStart, x as BreakContent, J as Column, C as Comment, a as CommentRangeEnd, b as CommentRangeStart, K as ComplexField, D as Deletion, O as DrawingContent, Q as EndnotePosition, U as EndnoteProperties, V as Field, W as FieldCharContent, X as FieldType, Y as FooterReference, Z as FootnotePosition, _ as FootnoteProperties, $ as HeaderFooterType, a0 as HeaderReference, H as Hyperlink, I as Image, a1 as ImageCrop, a2 as ImagePadding, a3 as ImagePosition, a4 as ImageSize, a5 as ImageTransform, a6 as ImageWrap, a7 as InlineSdt, d as Insertion, a8 as InstrTextContent, a9 as LevelSuffix, aa as LineNumberRestart, L as ListLevel, ab as ListRendering, ac as MathEquation, M as MoveFrom, ad as MoveFromRangeEnd, ae as MoveFromRangeStart, e as MoveTo, af as MoveToRangeEnd, ag as MoveToRangeStart, ah as NoBreakHyphenContent, ai as NoteNumberRestart, aj as NoteReferenceContent, o as NumberFormat, ak as NumberingInstance, al as PageOrientation, P as Paragraph, f as ParagraphContent, p as ParagraphPropertyChange, am as PropertyChangeInfo, R as Run, g as RunContent, an as RunPropertyChange, v as SdtDataBinding, u as SdtProperties, t as SdtType, ao as Section, S as SectionProperties, ap as SectionStart, aq as Shape, ar as ShapeContent, as as ShapeFill, at as ShapeOutline, au as ShapeTextBody, av as ShapeType, aw as SimpleField, ax as SoftHyphenContent, ay as SymbolContent, az as TabContent, T as Table, h as TableCell, r as TableCellPropertyChange, q as TablePropertyChange, i as TableRow, s as TableRowPropertyChange, aA as TableStructuralChangeInfo, aB as TextBox, j as TextContent, k as TrackedChangeInfo, l as TrackedRunChange, aC as VerticalAlign } from '../content-CE-ZdMwG.mjs';
|
|
22
20
|
import { a as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-EI2lxeEN.mjs';
|
|
23
21
|
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, S as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-EI2lxeEN.mjs';
|
|
24
22
|
import '../docx/wrapTypes.mjs';
|
package/dist/types/document.d.ts
CHANGED
|
@@ -15,10 +15,8 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { B as BorderSpec, C as ColorValue, S as ShadingProperties, T as ThemeColorSlot } from '../colors-C3vA7HUU.js';
|
|
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-_OXU8gLB.js';
|
|
18
|
-
import { N as NumberingDefinitions } from '../
|
|
19
|
-
export { A as AbstractNumbering, b as LevelSuffix, L as ListLevel,
|
|
20
|
-
import { DocumentBody, Footnote, Endnote, HeaderFooter } from './content.js';
|
|
21
|
-
export { BlockContent, BlockSdt, BookmarkEnd, BookmarkStart, BreakContent, Column, Comment, CommentRangeEnd, CommentRangeStart, ComplexField, Deletion, DrawingContent, EndnotePosition, EndnoteProperties, Field, FieldCharContent, FieldType, FooterReference, FootnotePosition, FootnoteProperties, HeaderFooterType, HeaderReference, Hyperlink, Image, ImageCrop, ImagePadding, ImagePosition, ImageSize, ImageTransform, ImageWrap, InlineSdt, Insertion, InstrTextContent, LineNumberRestart, MathEquation, MoveFrom, MoveFromRangeEnd, MoveFromRangeStart, MoveTo, MoveToRangeEnd, MoveToRangeStart, NoBreakHyphenContent, NoteNumberRestart, NoteReferenceContent, PageOrientation, Paragraph, ParagraphContent, ParagraphPropertyChange, PropertyChangeInfo, Run, RunContent, RunPropertyChange, SdtProperties, SdtType, Section, SectionProperties, SectionStart, Shape, ShapeContent, ShapeFill, ShapeOutline, ShapeTextBody, ShapeType, SimpleField, SoftHyphenContent, SymbolContent, TabContent, Table, TableCell, TableCellPropertyChange, TablePropertyChange, TableRow, TableRowPropertyChange, TableStructuralChangeInfo, TextBox, TextContent, TrackedChangeInfo, TrackedRunChange, VerticalAlign } from './content.js';
|
|
18
|
+
import { c as DocumentBody, N as NumberingDefinitions, F as Footnote, E as Endnote, y as HeaderFooter } from '../content-CYXJ2tfQ.js';
|
|
19
|
+
export { A as AbstractNumbering, B as BlockContent, w as BlockSdt, z as BookmarkEnd, G as BookmarkStart, x as BreakContent, J as Column, C as Comment, a as CommentRangeEnd, b as CommentRangeStart, K as ComplexField, D as Deletion, O as DrawingContent, Q as EndnotePosition, U as EndnoteProperties, V as Field, W as FieldCharContent, X as FieldType, Y as FooterReference, Z as FootnotePosition, _ as FootnoteProperties, $ as HeaderFooterType, a0 as HeaderReference, H as Hyperlink, I as Image, a1 as ImageCrop, a2 as ImagePadding, a3 as ImagePosition, a4 as ImageSize, a5 as ImageTransform, a6 as ImageWrap, a7 as InlineSdt, d as Insertion, a8 as InstrTextContent, a9 as LevelSuffix, aa as LineNumberRestart, L as ListLevel, ab as ListRendering, ac as MathEquation, M as MoveFrom, ad as MoveFromRangeEnd, ae as MoveFromRangeStart, e as MoveTo, af as MoveToRangeEnd, ag as MoveToRangeStart, ah as NoBreakHyphenContent, ai as NoteNumberRestart, aj as NoteReferenceContent, o as NumberFormat, ak as NumberingInstance, al as PageOrientation, P as Paragraph, f as ParagraphContent, p as ParagraphPropertyChange, am as PropertyChangeInfo, R as Run, g as RunContent, an as RunPropertyChange, v as SdtDataBinding, u as SdtProperties, t as SdtType, ao as Section, S as SectionProperties, ap as SectionStart, aq as Shape, ar as ShapeContent, as as ShapeFill, at as ShapeOutline, au as ShapeTextBody, av as ShapeType, aw as SimpleField, ax as SoftHyphenContent, ay as SymbolContent, az as TabContent, T as Table, h as TableCell, r as TableCellPropertyChange, q as TablePropertyChange, i as TableRow, s as TableRowPropertyChange, aA as TableStructuralChangeInfo, aB as TextBox, j as TextContent, k as TrackedChangeInfo, l as TrackedRunChange, aC as VerticalAlign } from '../content-CYXJ2tfQ.js';
|
|
22
20
|
import { a as StyleDefinitions, T as Theme, F as FontTable, b as RelationshipMap, M as MediaFile } from '../styles-BBv7doYK.js';
|
|
23
21
|
export { D as DocDefaults, c as FontInfo, R as Relationship, d as RelationshipType, S as Style, e as StyleType, f as ThemeColorScheme, g as ThemeFont, h as ThemeFontScheme } from '../styles-BBv7doYK.js';
|
|
24
22
|
import '../docx/wrapTypes.js';
|
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { Paragraph } from '../
|
|
11
|
+
import { P as Paragraph } from '../content-CE-ZdMwG.mjs';
|
|
12
12
|
import '../formatting-BH4hcZiq.mjs';
|
|
13
13
|
import '../colors-C3vA7HUU.mjs';
|
|
14
14
|
import '../docx/wrapTypes.mjs';
|
|
15
|
-
import '../lists-CvG_iVK3.mjs';
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Framework-agnostic comment + tracked-change helpers shared by the
|
|
@@ -31,18 +30,92 @@ declare function formatDate(dateStr?: string): string;
|
|
|
31
30
|
declare function getInitials(name: string): string;
|
|
32
31
|
declare function getAvatarColor(name: string): string;
|
|
33
32
|
declare function truncateText(text: string, maxLength?: number): string;
|
|
33
|
+
/**
|
|
34
|
+
* One tracked change surfaced by `extractTrackedChanges`. Each entry
|
|
35
|
+
* groups all sites of one revision into a single row that the sidebar
|
|
36
|
+
* renders as one card. Resolve via {@link acceptChangeById} /
|
|
37
|
+
* {@link rejectChangeById} for any type — the by-id resolver walks
|
|
38
|
+
* every site sharing the id so coalesced edits clear in one click.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
34
42
|
interface TrackedChangeEntry {
|
|
35
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Revision shape. Inline shapes (`insertion`, `deletion`, `replacement`)
|
|
45
|
+
* wrap text runs; the rest are structural revisions on node attrs.
|
|
46
|
+
*
|
|
47
|
+
* - `insertion` — text was added (`<w:ins>`).
|
|
48
|
+
* - `deletion` — text was struck through but not removed (`<w:del>`).
|
|
49
|
+
* - `replacement` — a deletion + insertion by the same author at the
|
|
50
|
+
* same position+time; sidebar shows one combined card. `deletedText`
|
|
51
|
+
* and `insertionRevisionId` are set on this variant.
|
|
52
|
+
* - `paragraphMarkInsertion` / `paragraphMarkDeletion` — Enter /
|
|
53
|
+
* Backspace produced a tracked paragraph break (`<w:pPr><w:rPr><w:ins/>` /
|
|
54
|
+
* `<w:del/>`).
|
|
55
|
+
* - `paragraphPropertiesChanged` — formatting (alignment, spacing,
|
|
56
|
+
* etc.) on the paragraph was changed (`<w:pPrChange>`).
|
|
57
|
+
* - `rowInserted` / `rowDeleted` / `rowPropertiesChanged` — table
|
|
58
|
+
* row authored / removed / formatted (`<w:trPr><w:ins/>` / `<w:del/>`
|
|
59
|
+
* / `<w:trPrChange>`).
|
|
60
|
+
* - `cellInserted` / `cellDeleted` / `cellMerged` /
|
|
61
|
+
* `cellPropertiesChanged` — per-cell revisions
|
|
62
|
+
* (`<w:cellIns>` / `<w:cellDel>` / `<w:cellMerge>` / `<w:tcPrChange>`).
|
|
63
|
+
* - `tablePropertiesChanged` — table-level formatting
|
|
64
|
+
* (`<w:tblPrChange>`).
|
|
65
|
+
*/
|
|
66
|
+
type: 'insertion' | 'deletion' | 'replacement' | 'paragraphMarkInsertion' | 'paragraphMarkDeletion' | 'paragraphPropertiesChanged' | 'rowInserted' | 'rowDeleted' | 'rowPropertiesChanged' | 'cellInserted' | 'cellDeleted' | 'cellMerged' | 'cellPropertiesChanged' | 'tableInserted' | 'tableDeleted' | 'tablePropertiesChanged';
|
|
67
|
+
/**
|
|
68
|
+
* Affected text. For inline types this is the run's text; for
|
|
69
|
+
* structural types it's the surrounding paragraph / cell content
|
|
70
|
+
* (truncated by the sidebar before display).
|
|
71
|
+
*/
|
|
36
72
|
text: string;
|
|
37
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Only set when `type === 'replacement'` — the text the user removed.
|
|
75
|
+
* The inserted text lives in {@link TrackedChangeEntry.text}.
|
|
76
|
+
*/
|
|
38
77
|
deletedText?: string;
|
|
78
|
+
/** Author that minted the revision (`w:author`). */
|
|
39
79
|
author: string;
|
|
80
|
+
/** ISO timestamp the revision was minted (`w:date`). May be undefined for legacy imports. */
|
|
40
81
|
date?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Document position where the revision starts. For inline types this
|
|
84
|
+
* is the start of the marked text run; for structural types it's the
|
|
85
|
+
* containing paragraph / row / cell / table node's start position.
|
|
86
|
+
* Used by the sidebar to anchor the card at the correct vertical
|
|
87
|
+
* offset.
|
|
88
|
+
*/
|
|
41
89
|
from: number;
|
|
90
|
+
/**
|
|
91
|
+
* Document position where the revision ends. For inline coalesced
|
|
92
|
+
* runs that span multiple paragraphs, this is the END position of the
|
|
93
|
+
* LAST run in the group; the intervening structural positions are not
|
|
94
|
+
* preserved.
|
|
95
|
+
*/
|
|
42
96
|
to: number;
|
|
97
|
+
/**
|
|
98
|
+
* The `w:id` of the revision. Pass to
|
|
99
|
+
* {@link acceptChangeById} / {@link rejectChangeById} to resolve every
|
|
100
|
+
* site sharing this id — including pPrIns paragraph attrs and
|
|
101
|
+
* subsequent typed runs in the same editing session.
|
|
102
|
+
*/
|
|
43
103
|
revisionId: number;
|
|
44
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Only set when `type === 'replacement'` — the insertion half carries
|
|
106
|
+
* a DIFFERENT `w:id` from the deletion (sharing would trip the OOXML
|
|
107
|
+
* move-pair serializer). Card Accept handlers dispatch BOTH ids to
|
|
108
|
+
* clear the deletion and the insertion + any coalesced paragraph-marks.
|
|
109
|
+
*/
|
|
45
110
|
insertionRevisionId?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Extra `w:id`s that map to the same logical revision as this card.
|
|
113
|
+
* Populated when the extractor coalesces a burst of distinct ids by
|
|
114
|
+
* (author, date) — e.g. a foreign document where the source editor
|
|
115
|
+
* minted a fresh id per atomic edit. Accept/reject handlers must
|
|
116
|
+
* resolve every id in this list in addition to {@link revisionId}.
|
|
117
|
+
*/
|
|
118
|
+
coalescedRevisionIds?: number[];
|
|
46
119
|
}
|
|
47
120
|
|
|
48
121
|
export { type TrackedChangeEntry, formatDate, getAvatarColor, getCommentText, getInitials, truncateText };
|
package/dist/utils/comments.d.ts
CHANGED
|
@@ -8,11 +8,10 @@
|
|
|
8
8
|
* @packageDocumentation
|
|
9
9
|
* @public
|
|
10
10
|
*/
|
|
11
|
-
import { Paragraph } from '../
|
|
11
|
+
import { P as Paragraph } from '../content-CYXJ2tfQ.js';
|
|
12
12
|
import '../formatting-_OXU8gLB.js';
|
|
13
13
|
import '../colors-C3vA7HUU.js';
|
|
14
14
|
import '../docx/wrapTypes.js';
|
|
15
|
-
import '../lists-UTp_tk7B.js';
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* Framework-agnostic comment + tracked-change helpers shared by the
|
|
@@ -31,18 +30,92 @@ declare function formatDate(dateStr?: string): string;
|
|
|
31
30
|
declare function getInitials(name: string): string;
|
|
32
31
|
declare function getAvatarColor(name: string): string;
|
|
33
32
|
declare function truncateText(text: string, maxLength?: number): string;
|
|
33
|
+
/**
|
|
34
|
+
* One tracked change surfaced by `extractTrackedChanges`. Each entry
|
|
35
|
+
* groups all sites of one revision into a single row that the sidebar
|
|
36
|
+
* renders as one card. Resolve via {@link acceptChangeById} /
|
|
37
|
+
* {@link rejectChangeById} for any type — the by-id resolver walks
|
|
38
|
+
* every site sharing the id so coalesced edits clear in one click.
|
|
39
|
+
*
|
|
40
|
+
* @public
|
|
41
|
+
*/
|
|
34
42
|
interface TrackedChangeEntry {
|
|
35
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Revision shape. Inline shapes (`insertion`, `deletion`, `replacement`)
|
|
45
|
+
* wrap text runs; the rest are structural revisions on node attrs.
|
|
46
|
+
*
|
|
47
|
+
* - `insertion` — text was added (`<w:ins>`).
|
|
48
|
+
* - `deletion` — text was struck through but not removed (`<w:del>`).
|
|
49
|
+
* - `replacement` — a deletion + insertion by the same author at the
|
|
50
|
+
* same position+time; sidebar shows one combined card. `deletedText`
|
|
51
|
+
* and `insertionRevisionId` are set on this variant.
|
|
52
|
+
* - `paragraphMarkInsertion` / `paragraphMarkDeletion` — Enter /
|
|
53
|
+
* Backspace produced a tracked paragraph break (`<w:pPr><w:rPr><w:ins/>` /
|
|
54
|
+
* `<w:del/>`).
|
|
55
|
+
* - `paragraphPropertiesChanged` — formatting (alignment, spacing,
|
|
56
|
+
* etc.) on the paragraph was changed (`<w:pPrChange>`).
|
|
57
|
+
* - `rowInserted` / `rowDeleted` / `rowPropertiesChanged` — table
|
|
58
|
+
* row authored / removed / formatted (`<w:trPr><w:ins/>` / `<w:del/>`
|
|
59
|
+
* / `<w:trPrChange>`).
|
|
60
|
+
* - `cellInserted` / `cellDeleted` / `cellMerged` /
|
|
61
|
+
* `cellPropertiesChanged` — per-cell revisions
|
|
62
|
+
* (`<w:cellIns>` / `<w:cellDel>` / `<w:cellMerge>` / `<w:tcPrChange>`).
|
|
63
|
+
* - `tablePropertiesChanged` — table-level formatting
|
|
64
|
+
* (`<w:tblPrChange>`).
|
|
65
|
+
*/
|
|
66
|
+
type: 'insertion' | 'deletion' | 'replacement' | 'paragraphMarkInsertion' | 'paragraphMarkDeletion' | 'paragraphPropertiesChanged' | 'rowInserted' | 'rowDeleted' | 'rowPropertiesChanged' | 'cellInserted' | 'cellDeleted' | 'cellMerged' | 'cellPropertiesChanged' | 'tableInserted' | 'tableDeleted' | 'tablePropertiesChanged';
|
|
67
|
+
/**
|
|
68
|
+
* Affected text. For inline types this is the run's text; for
|
|
69
|
+
* structural types it's the surrounding paragraph / cell content
|
|
70
|
+
* (truncated by the sidebar before display).
|
|
71
|
+
*/
|
|
36
72
|
text: string;
|
|
37
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Only set when `type === 'replacement'` — the text the user removed.
|
|
75
|
+
* The inserted text lives in {@link TrackedChangeEntry.text}.
|
|
76
|
+
*/
|
|
38
77
|
deletedText?: string;
|
|
78
|
+
/** Author that minted the revision (`w:author`). */
|
|
39
79
|
author: string;
|
|
80
|
+
/** ISO timestamp the revision was minted (`w:date`). May be undefined for legacy imports. */
|
|
40
81
|
date?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Document position where the revision starts. For inline types this
|
|
84
|
+
* is the start of the marked text run; for structural types it's the
|
|
85
|
+
* containing paragraph / row / cell / table node's start position.
|
|
86
|
+
* Used by the sidebar to anchor the card at the correct vertical
|
|
87
|
+
* offset.
|
|
88
|
+
*/
|
|
41
89
|
from: number;
|
|
90
|
+
/**
|
|
91
|
+
* Document position where the revision ends. For inline coalesced
|
|
92
|
+
* runs that span multiple paragraphs, this is the END position of the
|
|
93
|
+
* LAST run in the group; the intervening structural positions are not
|
|
94
|
+
* preserved.
|
|
95
|
+
*/
|
|
42
96
|
to: number;
|
|
97
|
+
/**
|
|
98
|
+
* The `w:id` of the revision. Pass to
|
|
99
|
+
* {@link acceptChangeById} / {@link rejectChangeById} to resolve every
|
|
100
|
+
* site sharing this id — including pPrIns paragraph attrs and
|
|
101
|
+
* subsequent typed runs in the same editing session.
|
|
102
|
+
*/
|
|
43
103
|
revisionId: number;
|
|
44
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* Only set when `type === 'replacement'` — the insertion half carries
|
|
106
|
+
* a DIFFERENT `w:id` from the deletion (sharing would trip the OOXML
|
|
107
|
+
* move-pair serializer). Card Accept handlers dispatch BOTH ids to
|
|
108
|
+
* clear the deletion and the insertion + any coalesced paragraph-marks.
|
|
109
|
+
*/
|
|
45
110
|
insertionRevisionId?: number;
|
|
111
|
+
/**
|
|
112
|
+
* Extra `w:id`s that map to the same logical revision as this card.
|
|
113
|
+
* Populated when the extractor coalesces a burst of distinct ids by
|
|
114
|
+
* (author, date) — e.g. a foreign document where the source editor
|
|
115
|
+
* minted a fresh id per atomic edit. Accept/reject handlers must
|
|
116
|
+
* resolve every id in this list in addition to {@link revisionId}.
|
|
117
|
+
*/
|
|
118
|
+
coalescedRevisionIds?: number[];
|
|
46
119
|
}
|
|
47
120
|
|
|
48
121
|
export { type TrackedChangeEntry, formatDate, getAvatarColor, getCommentText, getInitials, truncateText };
|
package/dist/utils/comments.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';require('../chunk-DC7S76ZX.js');function i(
|
|
1
|
+
'use strict';require('../chunk-DC7S76ZX.js');function i(e){return e?.length?e.flatMap(r=>r.content.filter(t=>t.type==="run").flatMap(t=>"content"in t?t.content:[]).filter(t=>t.type==="text").map(t=>"text"in t?t.text:"")).join(""):""}function o(e){return e?new Date(e).toLocaleString(void 0,{hour:"numeric",minute:"2-digit",month:"short",day:"numeric"}):""}function a(e){return e.split(/\s+/).map(r=>r[0]).join("").toUpperCase().slice(0,2)}var n=["#6DCCB1","#79AAD9","#EE789D","#A987D1","#E6A85F","#F2CC8F","#68B3A2","#B07AA1","#59A14F","#FF9DA7","#E15759","#76B7B2"];function s(e){let r=0;for(let t=0;t<e.length;t++)r=e.charCodeAt(t)+((r<<5)-r);return n[Math.abs(r)%n.length]}function l(e,r=50){return e.length>r?e.slice(0,r)+"...":e}exports.formatDate=o;exports.getAvatarColor=s;exports.getCommentText=i;exports.getInitials=a;exports.truncateText=l;
|
package/dist/utils/comments.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import'../chunk-QYUPLKLP.mjs';function i(
|
|
1
|
+
import'../chunk-QYUPLKLP.mjs';function i(e){return e?.length?e.flatMap(r=>r.content.filter(t=>t.type==="run").flatMap(t=>"content"in t?t.content:[]).filter(t=>t.type==="text").map(t=>"text"in t?t.text:"")).join(""):""}function o(e){return e?new Date(e).toLocaleString(void 0,{hour:"numeric",minute:"2-digit",month:"short",day:"numeric"}):""}function a(e){return e.split(/\s+/).map(r=>r[0]).join("").toUpperCase().slice(0,2)}var n=["#6DCCB1","#79AAD9","#EE789D","#A987D1","#E6A85F","#F2CC8F","#68B3A2","#B07AA1","#59A14F","#FF9DA7","#E15759","#76B7B2"];function s(e){let r=0;for(let t=0;t<e.length;t++)r=e.charCodeAt(t)+((r<<5)-r);return n[Math.abs(r)%n.length]}function l(e,r=50){return e.length>r?e.slice(0,r)+"...":e}export{o as formatDate,s as getAvatarColor,i as getCommentText,a as getInitials,l as truncateText};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';require('../chunk-DC7S76ZX.js');
|
|
1
|
+
'use strict';var chunkQEACB5VG_js=require('../chunk-QEACB5VG.js');require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"HIGHLIGHT_HEX_TO_NAME",{enumerable:true,get:function(){return chunkQEACB5VG_js.a}});Object.defineProperty(exports,"mapHexToHighlightName",{enumerable:true,get:function(){return chunkQEACB5VG_js.b}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{a as HIGHLIGHT_HEX_TO_NAME,b as mapHexToHighlightName}from'../chunk-XPV6VILW.mjs';import'../chunk-QYUPLKLP.mjs';
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -9,17 +9,16 @@
|
|
|
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-C6DtsoFI.mjs';
|
|
12
|
-
import { Run, Paragraph } from '../
|
|
12
|
+
import { R as Run, P as Paragraph } from '../content-CE-ZdMwG.mjs';
|
|
13
13
|
import { T as Theme } from '../styles-EI2lxeEN.mjs';
|
|
14
14
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.mjs';
|
|
15
|
-
export { F as FONT_MAPPING, 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,
|
|
15
|
+
export { F as FONT_MAPPING, z 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, A as extractFontsFromDocument, i as findPageBreaks, B 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 isLineBreak, q as isLoading, s as isPageBreak, C as loadDocumentFonts, t as loadFont, D as loadFontDefinitions, u as loadFontFromBuffer, E as loadFontFromUrl, G as loadFontWithMapping, v as loadFonts, H as loadFontsWithMapping, J as onFontError, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from '../fontLoader-Z7pqeNvZ.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-BH4hcZiq.mjs';
|
|
18
18
|
export { HeadingInfo, collectHeadings } from './headingCollector.mjs';
|
|
19
19
|
export { WordSelectionResult, createDoubleClickWordSelector, createTripleClickParagraphSelector, expandSelectionToWordBoundaries, findWordAt, findWordBoundaries, getWordAt, handleClickForMultiClick, selectParagraphAtCursor, selectWordAtCursor, selectWordInTextNode } from './textSelection.mjs';
|
|
20
20
|
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH } from './sidebarConstants.mjs';
|
|
21
21
|
import '../types/document.mjs';
|
|
22
|
-
import '../lists-CvG_iVK3.mjs';
|
|
23
22
|
import '../docx/wrapTypes.mjs';
|
|
24
23
|
import 'prosemirror-model';
|
|
25
24
|
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -9,17 +9,16 @@
|
|
|
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-BZ_yScf4.js';
|
|
12
|
-
import { Run, Paragraph } from '../
|
|
12
|
+
import { R as Run, P as Paragraph } from '../content-CYXJ2tfQ.js';
|
|
13
13
|
import { T as Theme } from '../styles-BBv7doYK.js';
|
|
14
14
|
export { D as DocxInput, t as toArrayBuffer } from '../docxInput-DTbCa48g.js';
|
|
15
|
-
export { F as FONT_MAPPING, 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,
|
|
15
|
+
export { F as FONT_MAPPING, z 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, A as extractFontsFromDocument, i as findPageBreaks, B 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 isLineBreak, q as isLoading, s as isPageBreak, C as loadDocumentFonts, t as loadFont, D as loadFontDefinitions, u as loadFontFromBuffer, E as loadFontFromUrl, G as loadFontWithMapping, v as loadFonts, H as loadFontsWithMapping, J as onFontError, w as onFontsLoaded, x as preloadCommonFonts, y as removePageBreak } from '../fontLoader-Cm02v7PO.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-_OXU8gLB.js';
|
|
18
18
|
export { HeadingInfo, collectHeadings } from './headingCollector.js';
|
|
19
19
|
export { WordSelectionResult, createDoubleClickWordSelector, createTripleClickParagraphSelector, expandSelectionToWordBoundaries, findWordAt, findWordBoundaries, getWordAt, handleClickForMultiClick, selectParagraphAtCursor, selectWordAtCursor, selectWordInTextNode } from './textSelection.js';
|
|
20
20
|
export { MIN_CARD_GAP, SIDEBAR_DOCUMENT_SHIFT, SIDEBAR_PAGE_GAP, SIDEBAR_WIDTH } from './sidebarConstants.js';
|
|
21
21
|
import '../types/document.js';
|
|
22
|
-
import '../lists-UTp_tk7B.js';
|
|
23
22
|
import '../docx/wrapTypes.js';
|
|
24
23
|
import 'prosemirror-model';
|
|
25
24
|
|
package/dist/utils/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var chunkAAPBAMD7_js=require('../chunk-AAPBAMD7.js'),chunkWLKRUBY4_js=require('../chunk-WLKRUBY4.js'),chunkKESNGXGO_js=require('../chunk-KESNGXGO.js'),chunkNXLJVVVE_js=require('../chunk-NXLJVVVE.js'),chunkESI4BSBF_js=require('../chunk-ESI4BSBF.js'),
|
|
1
|
+
'use strict';var chunkAAPBAMD7_js=require('../chunk-AAPBAMD7.js'),chunkWLKRUBY4_js=require('../chunk-WLKRUBY4.js'),chunkKESNGXGO_js=require('../chunk-KESNGXGO.js'),chunkNXLJVVVE_js=require('../chunk-NXLJVVVE.js'),chunkESI4BSBF_js=require('../chunk-ESI4BSBF.js'),chunkMNOHUTKE_js=require('../chunk-MNOHUTKE.js'),chunk2KHWHVTA_js=require('../chunk-2KHWHVTA.js'),chunkBHBOAP6Z_js=require('../chunk-BHBOAP6Z.js'),chunkMZ7LW5CH_js=require('../chunk-MZ7LW5CH.js');require('../chunk-N3Y5BUKV.js');var chunkMJ5FQX7Q_js=require('../chunk-MJ5FQX7Q.js'),chunk4Q2IP5FW_js=require('../chunk-4Q2IP5FW.js');require('../chunk-DC7S76ZX.js');function u(e){return e?/[\p{L}\p{N}_]/u.test(e):false}function x(e){return e?/\s/.test(e):false}function jt(e){return e?/[\p{P}]/u.test(e):false}function Vt(e,t){if(t<=0)return 0;t>e.length&&(t=e.length);let o=t;for(;o>0&&x(e[o-1]);)o--;if(o===0)return 0;for(;o>0&&u(e[o-1]);)o--;return o}function Yt(e,t){if(t>=e.length)return e.length;t<0&&(t=0);let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&x(e[o]);)o++;return o}function b(e,t){if(t>=e.length)return e.length;let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&!u(e[o]);)o++;return o}function y(e,t){if(t<=0)return 0;let o=t;for(;o>0&&!u(e[o-1]);)o--;for(;o>0&&u(e[o-1]);)o--;return o}function C(e,t){if(!window.getSelection())return null;let n=document.createRange();if(e.nodeType===Node.TEXT_NODE){n.setStart(e,Math.min(t,e.textContent?.length||0)),n.collapse(true);let l=n.getBoundingClientRect().top,i=0,c=t;for(;i<c;){let a=Math.floor((i+c)/2);n.setStart(e,a),n.collapse(true);let f=n.getBoundingClientRect();Math.abs(f.top-l)<2?c=a:i=a+1;}return {node:e,offset:i}}return null}function T(e,t){if(!window.getSelection())return null;let n=e.textContent?.length||0,r=document.createRange();if(e.nodeType===Node.TEXT_NODE){r.setStart(e,Math.min(t,n)),r.collapse(true);let i=r.getBoundingClientRect().top,c=t,a=n;for(;c<a;){let f=Math.ceil((c+a)/2);r.setStart(e,f),r.collapse(true);let D=r.getBoundingClientRect();Math.abs(D.top-i)<2?c=f:a=f-1;}return {node:e,offset:c}}return null}function qt(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0);return {node:t.startContainer,offset:t.startOffset,anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,text:e.toString()}}function h(e,t){let o=window.getSelection();if(!o)return;let n=document.createRange(),r=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;n.setStart(e,Math.min(t,r)),n.collapse(true),o.removeAllRanges(),o.addRange(n);}function p(e,t){let o=window.getSelection();if(!(!o||!o.anchorNode))try{o.extend(e,Math.min(t,e.textContent?.length||0));}catch{let n=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;o.setBaseAndExtent(o.anchorNode,o.anchorOffset,e,Math.min(t,n));}}function R(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n||n.nodeType!==Node.TEXT_NODE)return false;let r=n.textContent||"",l=o.focusOffset,i;return e==="left"?i=y(r,l):i=b(r,l),t?p(n,i):h(n,i),true}function w(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n)return false;if(n.nodeType===Node.TEXT_NODE){let i=e==="start"?C(n,o.focusOffset):T(n,o.focusOffset);if(i)return t?p(i.node,i.offset):h(i.node,i.offset),true}let r=n.textContent||"",l=e==="start"?0:r.length;return t?p(n,l):h(n,l),true}function E(e){let{key:t,ctrlKey:o,metaKey:n,shiftKey:r,altKey:l}=e,i=o||n;switch(t){case "ArrowLeft":if(i)return {direction:"left",unit:"word",extend:r};break;case "ArrowRight":if(i)return {direction:"right",unit:"word",extend:r};break;case "Home":return i?{direction:"left",unit:"document",extend:r}:{direction:"left",unit:"line",extend:r};case "End":return i?{direction:"right",unit:"document",extend:r}:{direction:"right",unit:"line",extend:r}}return null}function Jt(e,t){let o=E(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&R(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(w(n,o.extend))return e.preventDefault(),true;break;case "document":if(o.direction==="left"&&t?.onDocumentStart)return e.preventDefault(),t.onDocumentStart(),true;if(o.direction==="right"&&t?.onDocumentEnd)return e.preventDefault(),t.onDocumentEnd(),true;break}return false}function Qt(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function Zt(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return false;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;if(r===l)return false;let i=document.createRange();return i.setStart(t,r),i.setEnd(t,l),e.removeAllRanges(),e.addRange(i),true}function eo(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;return r===l?null:o.slice(r,l)}function to(e,t){let o=e.ctrlKey||e.metaKey,n=t.ctrlKey||t.metaKey;return e.key.toLowerCase()===t.key.toLowerCase()&&o===!!n&&e.shiftKey===!!t.shiftKey&&e.altKey===!!t.altKey}var s={wordLeft:{key:"ArrowLeft",ctrlKey:true},wordRight:{key:"ArrowRight",ctrlKey:true},selectWordLeft:{key:"ArrowLeft",ctrlKey:true,shiftKey:true},selectWordRight:{key:"ArrowRight",ctrlKey:true,shiftKey:true},lineStart:{key:"Home"},lineEnd:{key:"End"},selectToLineStart:{key:"Home",shiftKey:true},selectToLineEnd:{key:"End",shiftKey:true},documentStart:{key:"Home",ctrlKey:true},documentEnd:{key:"End",ctrlKey:true},selectToDocumentStart:{key:"Home",ctrlKey:true,shiftKey:true},selectToDocumentEnd:{key:"End",ctrlKey:true,shiftKey:true}};function d(e){let t=[];if(e.ctrlKey||e.metaKey){let n=typeof navigator<"u"&&/Mac/i.test(navigator.platform);t.push(n?"\u2318":"Ctrl");}e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let o=e.key;return o==="ArrowLeft"?o="\u2190":o==="ArrowRight"?o="\u2192":o==="ArrowUp"?o="\u2191":o==="ArrowDown"&&(o="\u2193"),t.push(o),t.join("+")}function oo(){return [{action:"Move by word (left)",shortcut:d(s.wordLeft)},{action:"Move by word (right)",shortcut:d(s.wordRight)},{action:"Select word (left)",shortcut:d(s.selectWordLeft)},{action:"Select word (right)",shortcut:d(s.selectWordRight)},{action:"Go to line start",shortcut:d(s.lineStart)},{action:"Go to line end",shortcut:d(s.lineEnd)},{action:"Select to line start",shortcut:d(s.selectToLineStart)},{action:"Select to line end",shortcut:d(s.selectToLineEnd)},{action:"Go to document start",shortcut:d(s.documentStart)},{action:"Go to document end",shortcut:d(s.documentEnd)},{action:"Select to document start",shortcut:d(s.selectToDocumentStart)},{action:"Select to document end",shortcut:d(s.selectToDocumentEnd)}]}var m={backgroundColor:"rgba(26, 115, 232, 0.3)",borderRadius:0,zIndex:0,opacity:1,mixBlendMode:"multiply"},no={backgroundColor:"rgba(0, 120, 215, 0.4)",borderColor:"rgba(0, 120, 215, 0.6)",borderRadius:1,zIndex:0,opacity:1},ro={backgroundColor:"--docx-selection-bg",borderColor:"--docx-selection-border",textColor:"--docx-selection-text"};function S(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return [];let o=t.getRangeAt(0);if(e&&!e.contains(o.commonAncestorContainer))return [];let n=o.getClientRects(),r=[],l=0,i=0;if(e){let c=e.getBoundingClientRect();l=c.left+e.scrollLeft,i=c.top+e.scrollTop;}for(let c=0;c<n.length;c++){let a=n[c];a.width===0&&a.height===0||r.push({left:a.left-l,top:a.top-i,width:a.width,height:a.height});}return r}function N(e,t=2){if(e.length<=1)return e;let o=[...e].sort((l,i)=>Math.abs(l.top-i.top)<t?l.left-i.left:l.top-i.top),n=[],r={...o[0]};for(let l=1;l<o.length;l++){let i=o[l],c=Math.abs(i.top-r.top)<t,a=i.left<=r.left+r.width+t;if(c&&a){let f=Math.max(r.left+r.width,i.left+i.width);r.width=f-r.left,r.height=Math.max(r.height,i.height);}else n.push(r),r={...i};}return n.push(r),n}function k(e){let t=S(e);return N(t)}function io(e,t=m){return {position:"absolute",left:`${e.left}px`,top:`${e.top}px`,width:`${e.width}px`,height:`${e.height}px`,backgroundColor:t.backgroundColor,borderRadius:t.borderRadius?`${t.borderRadius}px`:void 0,border:t.borderColor?`1px solid ${t.borderColor}`:void 0,zIndex:t.zIndex??0,opacity:t.opacity??1,mixBlendMode:t.mixBlendMode,pointerEvents:"none",userSelect:"none"}}function lo(e,t=m){let o=t.backgroundColor;return `
|
|
2
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 co(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function ao(){let e=window.getSelection();return e?e.toString():""}function so(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let o=t.getRangeAt(0);return e.contains(o.commonAncestorContainer)}function uo(){let e=window.getSelection();return !e||e.rangeCount===0?null:e.getRangeAt(0).getBoundingClientRect()}function go(e,t,o,n,r){try{let l=document.createRange();return l.setStart(t,o),l.setEnd(n,r),l}catch{return null}}function fo(e){let t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e));}function ho(){let e=window.getSelection();e&&e.removeAllRanges();}function A(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.anchorNode,o=e.focusNode;return !t||!o?false:t===o?e.focusOffset<e.anchorOffset:(t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING)!==0}function po(){let e=window.getSelection();if(!e||e.rangeCount===0||!A())return;let t=e.getRangeAt(0),o=document.createRange();o.setStart(t.startContainer,t.startOffset),o.setEnd(t.endContainer,t.endOffset),e.removeAllRanges(),e.addRange(o);}var g=null;function mo(e=m){v();let t=`
|
|
14
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 ho(){return g!==null||document.getElementById("docx-selection-styles")!==null}function po(e,t,o=true){return ()=>{if(!e){t([]);return}let n=o?k(e):S(e);t(n);}}async function mo(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 chunkKBU6QQFU_js.i}});Object.defineProperty(exports,"canRenderFont",{enumerable:true,get:function(){return chunkKBU6QQFU_js.g}});Object.defineProperty(exports,"extractFontsFromDocument",{enumerable:true,get:function(){return chunkKBU6QQFU_js.n}});Object.defineProperty(exports,"getGoogleFontEquivalent",{enumerable:true,get:function(){return chunkKBU6QQFU_js.j}});Object.defineProperty(exports,"getLoadedFonts",{enumerable:true,get:function(){return chunkKBU6QQFU_js.e}});Object.defineProperty(exports,"isFontLoaded",{enumerable:true,get:function(){return chunkKBU6QQFU_js.c}});Object.defineProperty(exports,"isLoading",{enumerable:true,get:function(){return chunkKBU6QQFU_js.d}});Object.defineProperty(exports,"loadDocumentFonts",{enumerable:true,get:function(){return chunkKBU6QQFU_js.o}});Object.defineProperty(exports,"loadFont",{enumerable:true,get:function(){return chunkKBU6QQFU_js.a}});Object.defineProperty(exports,"loadFontFromBuffer",{enumerable:true,get:function(){return chunkKBU6QQFU_js.h}});Object.defineProperty(exports,"loadFontWithMapping",{enumerable:true,get:function(){return chunkKBU6QQFU_js.k}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkKBU6QQFU_js.b}});Object.defineProperty(exports,"loadFontsWithMapping",{enumerable:true,get:function(){return chunkKBU6QQFU_js.l}});Object.defineProperty(exports,"onFontsLoaded",{enumerable:true,get:function(){return chunkKBU6QQFU_js.f}});Object.defineProperty(exports,"preloadCommonFonts",{enumerable:true,get:function(){return chunkKBU6QQFU_js.m}});Object.defineProperty(exports,"toArrayBuffer",{enumerable:true,get:function(){return chunkKBU6QQFU_js.p}});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=eo;exports.NAVIGATION_SHORTCUTS=s;exports.SELECTION_CSS_VARS=to;exports.areSelectionStylesInjected=ho;exports.clearSelection=uo;exports.createSelectionChangeHandler=po;exports.describeShortcut=d;exports.expandSelectionToWord=qt;exports.extendSelectionTo=p;exports.findNextWordStart=b;exports.findPreviousWordStart=y;exports.findVisualLineEnd=T;exports.findVisualLineStart=C;exports.findWordEnd=Xt;exports.findWordStart=Ut;exports.generateSelectionCSS=no;exports.getHighlightRectStyle=oo;exports.getMergedSelectionRects=k;exports.getNavigationShortcutDescriptions=Zt;exports.getSelectedText=io;exports.getSelectionBoundingRect=co;exports.getSelectionInfo=jt;exports.getSelectionRects=S;exports.getWordAtCursor=Jt;exports.handleNavigationKey=Vt;exports.hasActiveSelection=ro;exports.highlightTextRange=ao;exports.injectSelectionStyles=fo;exports.isNavigationKey=Yt;exports.isPunctuation=Gt;exports.isSelectionBackwards=A;exports.isSelectionWithin=lo;exports.isWhitespace=x;exports.isWordCharacter=u;exports.matchesShortcut=Qt;exports.mergeAdjacentRects=N;exports.moveByWord=R;exports.moveToLineEdge=w;exports.normalizeSelectionDirection=go;exports.parseNavigationAction=E;exports.readDocxFileFromInput=mo;exports.removeSelectionStyles=v;exports.selectRange=so;exports.setSelectionPosition=h;
|
|
82
|
+
`;g=document.createElement("style"),g.id="docx-selection-styles",g.textContent=t,document.head.appendChild(g);}function v(){g&&(g.remove(),g=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function xo(){return g!==null||document.getElementById("docx-selection-styles")!==null}function So(e,t,o=true){return ()=>{if(!e){t([]);return}let n=o?k(e):S(e);t(n);}}async function bo(e){let t=e.target;if(!t||!t.files)return null;let o=t.files[0];return t.value="",o?{buffer:await o.arrayBuffer(),name:o.name.replace(/\.docx$/i,"")}:null}Object.defineProperty(exports,"MIN_CARD_GAP",{enumerable:true,get:function(){return chunkAAPBAMD7_js.d}});Object.defineProperty(exports,"SIDEBAR_DOCUMENT_SHIFT",{enumerable:true,get:function(){return chunkAAPBAMD7_js.c}});Object.defineProperty(exports,"SIDEBAR_PAGE_GAP",{enumerable:true,get:function(){return chunkAAPBAMD7_js.b}});Object.defineProperty(exports,"SIDEBAR_WIDTH",{enumerable:true,get:function(){return chunkAAPBAMD7_js.a}});Object.defineProperty(exports,"createDoubleClickWordSelector",{enumerable:true,get:function(){return chunkWLKRUBY4_js.k}});Object.defineProperty(exports,"createTripleClickParagraphSelector",{enumerable:true,get:function(){return chunkWLKRUBY4_js.l}});Object.defineProperty(exports,"expandSelectionToWordBoundaries",{enumerable:true,get:function(){return chunkWLKRUBY4_js.h}});Object.defineProperty(exports,"findWordAt",{enumerable:true,get:function(){return chunkWLKRUBY4_js.e}});Object.defineProperty(exports,"findWordBoundaries",{enumerable:true,get:function(){return chunkWLKRUBY4_js.c}});Object.defineProperty(exports,"getWordAt",{enumerable:true,get:function(){return chunkWLKRUBY4_js.d}});Object.defineProperty(exports,"handleClickForMultiClick",{enumerable:true,get:function(){return chunkWLKRUBY4_js.j}});Object.defineProperty(exports,"selectParagraphAtCursor",{enumerable:true,get:function(){return chunkWLKRUBY4_js.i}});Object.defineProperty(exports,"selectWordAtCursor",{enumerable:true,get:function(){return chunkWLKRUBY4_js.f}});Object.defineProperty(exports,"selectWordInTextNode",{enumerable:true,get:function(){return chunkWLKRUBY4_js.g}});Object.defineProperty(exports,"countPageBreaks",{enumerable:true,get:function(){return chunkKESNGXGO_js.n}});Object.defineProperty(exports,"createColumnBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.b}});Object.defineProperty(exports,"createHorizontalRule",{enumerable:true,get:function(){return chunkKESNGXGO_js.g}});Object.defineProperty(exports,"createLineBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.c}});Object.defineProperty(exports,"createPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.a}});Object.defineProperty(exports,"createPageBreakParagraph",{enumerable:true,get:function(){return chunkKESNGXGO_js.e}});Object.defineProperty(exports,"createPageBreakRun",{enumerable:true,get:function(){return chunkKESNGXGO_js.d}});Object.defineProperty(exports,"findPageBreaks",{enumerable:true,get:function(){return chunkKESNGXGO_js.o}});Object.defineProperty(exports,"hasPageBreakBefore",{enumerable:true,get:function(){return chunkKESNGXGO_js.m}});Object.defineProperty(exports,"insertHorizontalRule",{enumerable:true,get:function(){return chunkKESNGXGO_js.h}});Object.defineProperty(exports,"insertPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.f}});Object.defineProperty(exports,"isBreakContent",{enumerable:true,get:function(){return chunkKESNGXGO_js.l}});Object.defineProperty(exports,"isColumnBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.j}});Object.defineProperty(exports,"isLineBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.k}});Object.defineProperty(exports,"isPageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.i}});Object.defineProperty(exports,"removePageBreak",{enumerable:true,get:function(){return chunkKESNGXGO_js.p}});Object.defineProperty(exports,"createDocumentWithText",{enumerable:true,get:function(){return chunkNXLJVVVE_js.b}});Object.defineProperty(exports,"createEmptyDocument",{enumerable:true,get:function(){return chunkNXLJVVVE_js.a}});Object.defineProperty(exports,"createTemplateProcessor",{enumerable:true,get:function(){return chunkESI4BSBF_js.j}});Object.defineProperty(exports,"getMissingVariables",{enumerable:true,get:function(){return chunkESI4BSBF_js.g}});Object.defineProperty(exports,"getTemplateTags",{enumerable:true,get:function(){return chunkESI4BSBF_js.e}});Object.defineProperty(exports,"previewTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.h}});Object.defineProperty(exports,"processTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.a}});Object.defineProperty(exports,"processTemplateAdvanced",{enumerable:true,get:function(){return chunkESI4BSBF_js.i}});Object.defineProperty(exports,"processTemplateAndDownload",{enumerable:true,get:function(){return chunkESI4BSBF_js.d}});Object.defineProperty(exports,"processTemplateAsBlob",{enumerable:true,get:function(){return chunkESI4BSBF_js.c}});Object.defineProperty(exports,"processTemplateDetailed",{enumerable:true,get:function(){return chunkESI4BSBF_js.b}});Object.defineProperty(exports,"validateTemplate",{enumerable:true,get:function(){return chunkESI4BSBF_js.f}});Object.defineProperty(exports,"FONT_MAPPING",{enumerable:true,get:function(){return chunkMNOHUTKE_js.l}});Object.defineProperty(exports,"canRenderFont",{enumerable:true,get:function(){return chunkMNOHUTKE_js.h}});Object.defineProperty(exports,"extractFontsFromDocument",{enumerable:true,get:function(){return chunkMNOHUTKE_js.q}});Object.defineProperty(exports,"getGoogleFontEquivalent",{enumerable:true,get:function(){return chunkMNOHUTKE_js.m}});Object.defineProperty(exports,"getLoadedFonts",{enumerable:true,get:function(){return chunkMNOHUTKE_js.e}});Object.defineProperty(exports,"isFontLoaded",{enumerable:true,get:function(){return chunkMNOHUTKE_js.c}});Object.defineProperty(exports,"isLoading",{enumerable:true,get:function(){return chunkMNOHUTKE_js.d}});Object.defineProperty(exports,"loadDocumentFonts",{enumerable:true,get:function(){return chunkMNOHUTKE_js.r}});Object.defineProperty(exports,"loadFont",{enumerable:true,get:function(){return chunkMNOHUTKE_js.a}});Object.defineProperty(exports,"loadFontDefinitions",{enumerable:true,get:function(){return chunkMNOHUTKE_js.k}});Object.defineProperty(exports,"loadFontFromBuffer",{enumerable:true,get:function(){return chunkMNOHUTKE_js.i}});Object.defineProperty(exports,"loadFontFromUrl",{enumerable:true,get:function(){return chunkMNOHUTKE_js.j}});Object.defineProperty(exports,"loadFontWithMapping",{enumerable:true,get:function(){return chunkMNOHUTKE_js.n}});Object.defineProperty(exports,"loadFonts",{enumerable:true,get:function(){return chunkMNOHUTKE_js.b}});Object.defineProperty(exports,"loadFontsWithMapping",{enumerable:true,get:function(){return chunkMNOHUTKE_js.o}});Object.defineProperty(exports,"onFontError",{enumerable:true,get:function(){return chunkMNOHUTKE_js.g}});Object.defineProperty(exports,"onFontsLoaded",{enumerable:true,get:function(){return chunkMNOHUTKE_js.f}});Object.defineProperty(exports,"preloadCommonFonts",{enumerable:true,get:function(){return chunkMNOHUTKE_js.p}});Object.defineProperty(exports,"toArrayBuffer",{enumerable:true,get:function(){return chunkMNOHUTKE_js.s}});Object.defineProperty(exports,"buildAnchorMaps",{enumerable:true,get:function(){return chunk2KHWHVTA_js.d}});Object.defineProperty(exports,"computeSplitDialogDefaults",{enumerable:true,get:function(){return chunk2KHWHVTA_js.e}});Object.defineProperty(exports,"computeSplitLayout",{enumerable:true,get:function(){return chunk2KHWHVTA_js.c}});Object.defineProperty(exports,"redistributeColumnWidths",{enumerable:true,get:function(){return chunk2KHWHVTA_js.b}});Object.defineProperty(exports,"sumColumnWidths",{enumerable:true,get:function(){return chunk2KHWHVTA_js.a}});Object.defineProperty(exports,"CLIPBOARD_TYPES",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.i}});Object.defineProperty(exports,"INTERNAL_CLIPBOARD_TYPE",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.h}});Object.defineProperty(exports,"borderToStyle",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.c}});Object.defineProperty(exports,"cleanWordHtml",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.u}});Object.defineProperty(exports,"copyParagraphs",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.l}});Object.defineProperty(exports,"copyRuns",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.k}});Object.defineProperty(exports,"createClipboardHandlers",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.w}});Object.defineProperty(exports,"getClipboardImageFiles",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.j}});Object.defineProperty(exports,"handlePasteEvent",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.q}});Object.defineProperty(exports,"htmlToRuns",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.v}});Object.defineProperty(exports,"isEditorHtml",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.t}});Object.defineProperty(exports,"isWordHtml",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.s}});Object.defineProperty(exports,"mergeStyles",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.e}});Object.defineProperty(exports,"paragraphToStyle",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.b}});Object.defineProperty(exports,"paragraphsToClipboardContent",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.n}});Object.defineProperty(exports,"parseClipboardHtml",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.r}});Object.defineProperty(exports,"readFromClipboard",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.p}});Object.defineProperty(exports,"resolveShadingFill",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.d}});Object.defineProperty(exports,"runsToClipboardContent",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.m}});Object.defineProperty(exports,"sectionToStyle",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.g}});Object.defineProperty(exports,"tableCellToStyle",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.f}});Object.defineProperty(exports,"textToStyle",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.a}});Object.defineProperty(exports,"writeToClipboard",{enumerable:true,get:function(){return chunkBHBOAP6Z_js.o}});Object.defineProperty(exports,"collectHeadings",{enumerable:true,get:function(){return chunkMZ7LW5CH_js.a}});Object.defineProperty(exports,"blendColors",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.m}});Object.defineProperty(exports,"colorsEqual",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.r}});Object.defineProperty(exports,"createRgbColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.j}});Object.defineProperty(exports,"createThemeColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.i}});Object.defineProperty(exports,"darkenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.k}});Object.defineProperty(exports,"ensureHexPrefix",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.n}});Object.defineProperty(exports,"generateThemeTintShadeMatrix",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.q}});Object.defineProperty(exports,"getContrastingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.g}});Object.defineProperty(exports,"getThemeTintShadeHex",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.p}});Object.defineProperty(exports,"isBlack",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.e}});Object.defineProperty(exports,"isWhite",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.f}});Object.defineProperty(exports,"lightenColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.l}});Object.defineProperty(exports,"parseColorString",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.h}});Object.defineProperty(exports,"resolveColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.a}});Object.defineProperty(exports,"resolveColorToHex",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.b}});Object.defineProperty(exports,"resolveHighlightColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.c}});Object.defineProperty(exports,"resolveHighlightToCss",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.o}});Object.defineProperty(exports,"resolveShadingColor",{enumerable:true,get:function(){return chunkMJ5FQX7Q_js.d}});Object.defineProperty(exports,"PIXELS_PER_INCH",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.b}});Object.defineProperty(exports,"TWIPS_PER_INCH",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.a}});Object.defineProperty(exports,"clamp",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.o}});Object.defineProperty(exports,"eighthsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.m}});Object.defineProperty(exports,"emuToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.e}});Object.defineProperty(exports,"emuToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.g}});Object.defineProperty(exports,"formatPx",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.p}});Object.defineProperty(exports,"halfPointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.j}});Object.defineProperty(exports,"halfPointsToPoints",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.k}});Object.defineProperty(exports,"pixelsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.f}});Object.defineProperty(exports,"pixelsToTwips",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.d}});Object.defineProperty(exports,"pointsToHalfPoints",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.l}});Object.defineProperty(exports,"pointsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.i}});Object.defineProperty(exports,"roundPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.n}});Object.defineProperty(exports,"twipsToEmu",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.h}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunk4Q2IP5FW_js.c}});exports.DEFAULT_SELECTION_STYLE=m;exports.HIGH_CONTRAST_SELECTION_STYLE=no;exports.NAVIGATION_SHORTCUTS=s;exports.SELECTION_CSS_VARS=ro;exports.areSelectionStylesInjected=xo;exports.clearSelection=ho;exports.createSelectionChangeHandler=So;exports.describeShortcut=d;exports.expandSelectionToWord=Zt;exports.extendSelectionTo=p;exports.findNextWordStart=b;exports.findPreviousWordStart=y;exports.findVisualLineEnd=T;exports.findVisualLineStart=C;exports.findWordEnd=Yt;exports.findWordStart=Vt;exports.generateSelectionCSS=lo;exports.getHighlightRectStyle=io;exports.getMergedSelectionRects=k;exports.getNavigationShortcutDescriptions=oo;exports.getSelectedText=ao;exports.getSelectionBoundingRect=uo;exports.getSelectionInfo=qt;exports.getSelectionRects=S;exports.getWordAtCursor=eo;exports.handleNavigationKey=Jt;exports.hasActiveSelection=co;exports.highlightTextRange=go;exports.injectSelectionStyles=mo;exports.isNavigationKey=Qt;exports.isPunctuation=jt;exports.isSelectionBackwards=A;exports.isSelectionWithin=so;exports.isWhitespace=x;exports.isWordCharacter=u;exports.matchesShortcut=to;exports.mergeAdjacentRects=N;exports.moveByWord=R;exports.moveToLineEdge=w;exports.normalizeSelectionDirection=po;exports.parseNavigationAction=E;exports.readDocxFileFromInput=bo;exports.removeSelectionStyles=v;exports.selectRange=fo;exports.setSelectionPosition=h;
|
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{i as FONT_MAPPING,g as canRenderFont,n as extractFontsFromDocument,j as getGoogleFontEquivalent,e as getLoadedFonts,c as isFontLoaded,d as isLoading,o as loadDocumentFonts,a as loadFont,h as loadFontFromBuffer,k as loadFontWithMapping,b as loadFonts,l as loadFontsWithMapping,f as onFontsLoaded,m as preloadCommonFonts,p as toArrayBuffer}from'../chunk-Y5HZAMND.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 Gt(e){return e?/[\p{P}]/u.test(e):false}function Ut(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 Xt(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 jt(){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 Vt(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 Yt(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function qt(){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 Jt(){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 Qt(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 Zt(){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"},eo={backgroundColor:"rgba(0, 120, 215, 0.4)",borderColor:"rgba(0, 120, 215, 0.6)",borderRadius:1,zIndex:0,opacity:1},to={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 oo(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 no(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{l as FONT_MAPPING,h as canRenderFont,q as extractFontsFromDocument,m as getGoogleFontEquivalent,e as getLoadedFonts,c as isFontLoaded,d as isLoading,r as loadDocumentFonts,a as loadFont,k as loadFontDefinitions,i as loadFontFromBuffer,j as loadFontFromUrl,n as loadFontWithMapping,b as loadFonts,o as loadFontsWithMapping,g as onFontError,f as onFontsLoaded,p as preloadCommonFonts,s as toArrayBuffer}from'../chunk-7LRR7RKE.mjs';export{d as buildAnchorMaps,e as computeSplitDialogDefaults,c as computeSplitLayout,b as redistributeColumnWidths,a as sumColumnWidths}from'../chunk-KQTB5Y7P.mjs';export{i as CLIPBOARD_TYPES,h as INTERNAL_CLIPBOARD_TYPE,c as borderToStyle,u as cleanWordHtml,l as copyParagraphs,k as copyRuns,w as createClipboardHandlers,j as getClipboardImageFiles,q as handlePasteEvent,v as htmlToRuns,t as isEditorHtml,s as isWordHtml,e as mergeStyles,b as paragraphToStyle,n as paragraphsToClipboardContent,r as parseClipboardHtml,p as readFromClipboard,d as resolveShadingFill,m as runsToClipboardContent,g as sectionToStyle,f as tableCellToStyle,a as textToStyle,o as writeToClipboard}from'../chunk-MOKKS75W.mjs';export{a as collectHeadings}from'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';export{m as blendColors,r as colorsEqual,j as createRgbColor,i as createThemeColor,k as darkenColor,n as ensureHexPrefix,q as generateThemeTintShadeMatrix,g as getContrastingColor,p as getThemeTintShadeHex,e as isBlack,f as isWhite,l as lightenColor,h as parseColorString,a as resolveColor,b as resolveColorToHex,c as resolveHighlightColor,o as resolveHighlightToCss,d as resolveShadingColor}from'../chunk-67LVRQIR.mjs';export{b as PIXELS_PER_INCH,a as TWIPS_PER_INCH,o as clamp,m as eighthsToPixels,e as emuToPixels,g as emuToTwips,p as formatPx,j as halfPointsToPixels,k as halfPointsToPoints,f as pixelsToEmu,d as pixelsToTwips,l as pointsToHalfPoints,i as pointsToPixels,n as roundPixels,h as twipsToEmu,c as twipsToPixels}from'../chunk-VW22RZ6C.mjs';import'../chunk-QYUPLKLP.mjs';function u(e){return e?/[\p{L}\p{N}_]/u.test(e):false}function x(e){return e?/\s/.test(e):false}function jt(e){return e?/[\p{P}]/u.test(e):false}function Vt(e,t){if(t<=0)return 0;t>e.length&&(t=e.length);let o=t;for(;o>0&&x(e[o-1]);)o--;if(o===0)return 0;for(;o>0&&u(e[o-1]);)o--;return o}function Yt(e,t){if(t>=e.length)return e.length;t<0&&(t=0);let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&x(e[o]);)o++;return o}function b(e,t){if(t>=e.length)return e.length;let o=t;for(;o<e.length&&u(e[o]);)o++;for(;o<e.length&&!u(e[o]);)o++;return o}function y(e,t){if(t<=0)return 0;let o=t;for(;o>0&&!u(e[o-1]);)o--;for(;o>0&&u(e[o-1]);)o--;return o}function C(e,t){if(!window.getSelection())return null;let n=document.createRange();if(e.nodeType===Node.TEXT_NODE){n.setStart(e,Math.min(t,e.textContent?.length||0)),n.collapse(true);let l=n.getBoundingClientRect().top,i=0,c=t;for(;i<c;){let a=Math.floor((i+c)/2);n.setStart(e,a),n.collapse(true);let f=n.getBoundingClientRect();Math.abs(f.top-l)<2?c=a:i=a+1;}return {node:e,offset:i}}return null}function T(e,t){if(!window.getSelection())return null;let n=e.textContent?.length||0,r=document.createRange();if(e.nodeType===Node.TEXT_NODE){r.setStart(e,Math.min(t,n)),r.collapse(true);let i=r.getBoundingClientRect().top,c=t,a=n;for(;c<a;){let f=Math.ceil((c+a)/2);r.setStart(e,f),r.collapse(true);let D=r.getBoundingClientRect();Math.abs(D.top-i)<2?c=f:a=f-1;}return {node:e,offset:c}}return null}function qt(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.getRangeAt(0);return {node:t.startContainer,offset:t.startOffset,anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset,isCollapsed:e.isCollapsed,text:e.toString()}}function h(e,t){let o=window.getSelection();if(!o)return;let n=document.createRange(),r=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;n.setStart(e,Math.min(t,r)),n.collapse(true),o.removeAllRanges(),o.addRange(n);}function p(e,t){let o=window.getSelection();if(!(!o||!o.anchorNode))try{o.extend(e,Math.min(t,e.textContent?.length||0));}catch{let n=e.nodeType===Node.TEXT_NODE?e.textContent?.length||0:e.childNodes.length;o.setBaseAndExtent(o.anchorNode,o.anchorOffset,e,Math.min(t,n));}}function R(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n||n.nodeType!==Node.TEXT_NODE)return false;let r=n.textContent||"",l=o.focusOffset,i;return e==="left"?i=y(r,l):i=b(r,l),t?p(n,i):h(n,i),true}function w(e,t=false){let o=window.getSelection();if(!o||o.rangeCount===0)return false;let n=o.focusNode;if(!n)return false;if(n.nodeType===Node.TEXT_NODE){let i=e==="start"?C(n,o.focusOffset):T(n,o.focusOffset);if(i)return t?p(i.node,i.offset):h(i.node,i.offset),true}let r=n.textContent||"",l=e==="start"?0:r.length;return t?p(n,l):h(n,l),true}function E(e){let{key:t,ctrlKey:o,metaKey:n,shiftKey:r,altKey:l}=e,i=o||n;switch(t){case "ArrowLeft":if(i)return {direction:"left",unit:"word",extend:r};break;case "ArrowRight":if(i)return {direction:"right",unit:"word",extend:r};break;case "Home":return i?{direction:"left",unit:"document",extend:r}:{direction:"left",unit:"line",extend:r};case "End":return i?{direction:"right",unit:"document",extend:r}:{direction:"right",unit:"line",extend:r}}return null}function Jt(e,t){let o=E(e);if(!o)return false;switch(o.unit){case "word":if((o.direction==="left"||o.direction==="right")&&R(o.direction,o.extend))return e.preventDefault(),true;break;case "line":let n=o.direction==="left"?"start":"end";if(w(n,o.extend))return e.preventDefault(),true;break;case "document":if(o.direction==="left"&&t?.onDocumentStart)return e.preventDefault(),t.onDocumentStart(),true;if(o.direction==="right"&&t?.onDocumentEnd)return e.preventDefault(),t.onDocumentEnd(),true;break}return false}function Qt(e){let{key:t,ctrlKey:o,metaKey:n}=e;return !!((o||n)&&(t==="ArrowLeft"||t==="ArrowRight")||t==="Home"||t==="End")}function Zt(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return false;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;if(r===l)return false;let i=document.createRange();return i.setStart(t,r),i.setEnd(t,l),e.removeAllRanges(),e.addRange(i),true}function eo(){let e=window.getSelection();if(!e||e.rangeCount===0)return null;let t=e.focusNode;if(!t||t.nodeType!==Node.TEXT_NODE)return null;let o=t.textContent||"",n=e.focusOffset,r=n,l=n;for(;r>0&&u(o[r-1]);)r--;for(;l<o.length&&u(o[l]);)l++;return r===l?null:o.slice(r,l)}function to(e,t){let o=e.ctrlKey||e.metaKey,n=t.ctrlKey||t.metaKey;return e.key.toLowerCase()===t.key.toLowerCase()&&o===!!n&&e.shiftKey===!!t.shiftKey&&e.altKey===!!t.altKey}var s={wordLeft:{key:"ArrowLeft",ctrlKey:true},wordRight:{key:"ArrowRight",ctrlKey:true},selectWordLeft:{key:"ArrowLeft",ctrlKey:true,shiftKey:true},selectWordRight:{key:"ArrowRight",ctrlKey:true,shiftKey:true},lineStart:{key:"Home"},lineEnd:{key:"End"},selectToLineStart:{key:"Home",shiftKey:true},selectToLineEnd:{key:"End",shiftKey:true},documentStart:{key:"Home",ctrlKey:true},documentEnd:{key:"End",ctrlKey:true},selectToDocumentStart:{key:"Home",ctrlKey:true,shiftKey:true},selectToDocumentEnd:{key:"End",ctrlKey:true,shiftKey:true}};function d(e){let t=[];if(e.ctrlKey||e.metaKey){let n=typeof navigator<"u"&&/Mac/i.test(navigator.platform);t.push(n?"\u2318":"Ctrl");}e.shiftKey&&t.push("Shift"),e.altKey&&t.push("Alt");let o=e.key;return o==="ArrowLeft"?o="\u2190":o==="ArrowRight"?o="\u2192":o==="ArrowUp"?o="\u2191":o==="ArrowDown"&&(o="\u2193"),t.push(o),t.join("+")}function oo(){return [{action:"Move by word (left)",shortcut:d(s.wordLeft)},{action:"Move by word (right)",shortcut:d(s.wordRight)},{action:"Select word (left)",shortcut:d(s.selectWordLeft)},{action:"Select word (right)",shortcut:d(s.selectWordRight)},{action:"Go to line start",shortcut:d(s.lineStart)},{action:"Go to line end",shortcut:d(s.lineEnd)},{action:"Select to line start",shortcut:d(s.selectToLineStart)},{action:"Select to line end",shortcut:d(s.selectToLineEnd)},{action:"Go to document start",shortcut:d(s.documentStart)},{action:"Go to document end",shortcut:d(s.documentEnd)},{action:"Select to document start",shortcut:d(s.selectToDocumentStart)},{action:"Select to document end",shortcut:d(s.selectToDocumentEnd)}]}var m={backgroundColor:"rgba(26, 115, 232, 0.3)",borderRadius:0,zIndex:0,opacity:1,mixBlendMode:"multiply"},no={backgroundColor:"rgba(0, 120, 215, 0.4)",borderColor:"rgba(0, 120, 215, 0.6)",borderRadius:1,zIndex:0,opacity:1},ro={backgroundColor:"--docx-selection-bg",borderColor:"--docx-selection-border",textColor:"--docx-selection-text"};function S(e){let t=window.getSelection();if(!t||t.rangeCount===0||t.isCollapsed)return [];let o=t.getRangeAt(0);if(e&&!e.contains(o.commonAncestorContainer))return [];let n=o.getClientRects(),r=[],l=0,i=0;if(e){let c=e.getBoundingClientRect();l=c.left+e.scrollLeft,i=c.top+e.scrollTop;}for(let c=0;c<n.length;c++){let a=n[c];a.width===0&&a.height===0||r.push({left:a.left-l,top:a.top-i,width:a.width,height:a.height});}return r}function N(e,t=2){if(e.length<=1)return e;let o=[...e].sort((l,i)=>Math.abs(l.top-i.top)<t?l.left-i.left:l.top-i.top),n=[],r={...o[0]};for(let l=1;l<o.length;l++){let i=o[l],c=Math.abs(i.top-r.top)<t,a=i.left<=r.left+r.width+t;if(c&&a){let f=Math.max(r.left+r.width,i.left+i.width);r.width=f-r.left,r.height=Math.max(r.height,i.height);}else n.push(r),r={...i};}return n.push(r),n}function k(e){let t=S(e);return N(t)}function io(e,t=m){return {position:"absolute",left:`${e.left}px`,top:`${e.top}px`,width:`${e.width}px`,height:`${e.height}px`,backgroundColor:t.backgroundColor,borderRadius:t.borderRadius?`${t.borderRadius}px`:void 0,border:t.borderColor?`1px solid ${t.borderColor}`:void 0,zIndex:t.zIndex??0,opacity:t.opacity??1,mixBlendMode:t.mixBlendMode,pointerEvents:"none",userSelect:"none"}}function lo(e,t=m){let o=t.backgroundColor;return `
|
|
2
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 co(){let e=window.getSelection();return e!==null&&!e.isCollapsed&&e.rangeCount>0}function ao(){let e=window.getSelection();return e?e.toString():""}function so(e){let t=window.getSelection();if(!t||t.rangeCount===0)return false;let o=t.getRangeAt(0);return e.contains(o.commonAncestorContainer)}function uo(){let e=window.getSelection();return !e||e.rangeCount===0?null:e.getRangeAt(0).getBoundingClientRect()}function go(e,t,o,n,r){try{let l=document.createRange();return l.setStart(t,o),l.setEnd(n,r),l}catch{return null}}function fo(e){let t=window.getSelection();t&&(t.removeAllRanges(),t.addRange(e));}function ho(){let e=window.getSelection();e&&e.removeAllRanges();}function A(){let e=window.getSelection();if(!e||e.rangeCount===0)return false;let t=e.anchorNode,o=e.focusNode;return !t||!o?false:t===o?e.focusOffset<e.anchorOffset:(t.compareDocumentPosition(o)&Node.DOCUMENT_POSITION_PRECEDING)!==0}function po(){let e=window.getSelection();if(!e||e.rangeCount===0||!A())return;let t=e.getRangeAt(0),o=document.createRange();o.setStart(t.startContainer,t.startOffset),o.setEnd(t.endContainer,t.endOffset),e.removeAllRanges(),e.addRange(o);}var g=null;function mo(e=m){v();let t=`
|
|
14
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
|
-
`;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
|
|
82
|
+
`;g=document.createElement("style"),g.id="docx-selection-styles",g.textContent=t,document.head.appendChild(g);}function v(){g&&(g.remove(),g=null);let e=document.getElementById("docx-selection-styles");e&&e.remove();}function xo(){return g!==null||document.getElementById("docx-selection-styles")!==null}function So(e,t,o=true){return ()=>{if(!e){t([]);return}let n=o?k(e):S(e);t(n);}}async function bo(e){let t=e.target;if(!t||!t.files)return null;let o=t.files[0];return t.value="",o?{buffer:await o.arrayBuffer(),name:o.name.replace(/\.docx$/i,"")}:null}export{m as DEFAULT_SELECTION_STYLE,no as HIGH_CONTRAST_SELECTION_STYLE,s as NAVIGATION_SHORTCUTS,ro as SELECTION_CSS_VARS,xo as areSelectionStylesInjected,ho as clearSelection,So as createSelectionChangeHandler,d as describeShortcut,Zt as expandSelectionToWord,p as extendSelectionTo,b as findNextWordStart,y as findPreviousWordStart,T as findVisualLineEnd,C as findVisualLineStart,Yt as findWordEnd,Vt as findWordStart,lo as generateSelectionCSS,io as getHighlightRectStyle,k as getMergedSelectionRects,oo as getNavigationShortcutDescriptions,ao as getSelectedText,uo as getSelectionBoundingRect,qt as getSelectionInfo,S as getSelectionRects,eo as getWordAtCursor,Jt as handleNavigationKey,co as hasActiveSelection,go as highlightTextRange,mo as injectSelectionStyles,Qt as isNavigationKey,jt as isPunctuation,A as isSelectionBackwards,so as isSelectionWithin,x as isWhitespace,u as isWordCharacter,to as matchesShortcut,N as mergeAdjacentRects,R as moveByWord,w as moveToLineEdge,po as normalizeSelectionDirection,E as parseNavigationAction,bo as readDocxFileFromInput,v as removeSelectionStyles,fo as selectRange,h as setSelectionPosition};
|