@docx-editor.dev/core 2.0.1 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -33
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +2 -2
- package/dist/automation.d.ts +2 -2
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +14 -8
- package/dist/binding.d.ts +14 -8
- package/dist/binding.js +1 -1
- package/dist/chunk-2DTQDAN7.js +2 -0
- package/dist/chunk-3JKQE4QJ.cjs +2 -0
- package/dist/chunk-4WWEDTTE.js +2 -0
- package/dist/chunk-6WIIHJFY.js +1 -0
- package/dist/chunk-7VQ7YLW3.cjs +1 -0
- package/dist/chunk-BS554B6D.cjs +2 -0
- package/dist/chunk-BZK64YU3.cjs +10 -0
- package/dist/chunk-F2VQQW5R.cjs +12 -0
- package/dist/chunk-GQQOL4PV.js +1 -0
- package/dist/chunk-JQFDLZXQ.cjs +2 -0
- package/dist/chunk-O2WQY7IT.cjs +5 -0
- package/dist/chunk-PC76F2HR.cjs +1 -0
- package/dist/chunk-QRAUDDVY.js +2 -0
- package/dist/chunk-RKNH4ZFT.js +12 -0
- package/dist/chunk-STCITBJK.js +12 -0
- package/dist/chunk-TBBXCC7D.js +5 -0
- package/dist/chunk-TSXT537P.cjs +12 -0
- package/dist/chunk-Y7TA7TPF.js +10 -0
- package/dist/contracts/editor.d.cts +6 -6
- package/dist/contracts/editor.d.ts +6 -6
- package/dist/contracts/interaction.d.cts +6 -6
- package/dist/contracts/interaction.d.ts +6 -6
- package/dist/contracts/modules.cjs +1 -1
- package/dist/contracts/modules.d.cts +30 -3
- package/dist/contracts/modules.d.ts +30 -3
- package/dist/contracts/modules.js +1 -1
- package/dist/{tree-package-store-DOKMtCnh.d.cts → custom-node-writes-YqISlSRl.d.cts} +181 -4
- package/dist/{tree-package-store-D5S7VKs5.d.ts → custom-node-writes-ttKuYd0M.d.ts} +181 -4
- package/dist/{editor-D0UDock4.d.cts → editor-B93PggnR.d.cts} +24 -5
- package/dist/{editor-C1QRi1v4.d.ts → editor-CFsSrxGR.d.ts} +24 -5
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1368 -279
- package/dist/editor.d.cts +19 -19
- package/dist/editor.d.ts +19 -19
- package/dist/editor.js +1 -1
- package/dist/{image-resources-BJnTpG66.d.ts → image-resources-C_YnqPhn.d.ts} +19 -11
- package/dist/{image-resources-BpIydXtU.d.cts → image-resources-DwpNnTg3.d.cts} +19 -11
- package/dist/{index-CrW-IxXt.d.cts → index-DQhDm4o0.d.cts} +34 -13
- package/dist/{index-ZqBEOrTV.d.ts → index-DTbKoFJL.d.ts} +34 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +869 -819
- package/dist/layout.d.ts +869 -819
- package/dist/layout.js +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +4 -4
- package/dist/output.d.ts +4 -4
- package/dist/output.js +1 -1
- package/dist/{protocol-oxHaWmt4.d.ts → protocol-BWVA3Q1p.d.ts} +56 -2
- package/dist/{protocol-CAkOBBGE.d.cts → protocol-FAz_nPm_.d.cts} +56 -2
- package/dist/review-reads-CsoXSvUg.d.ts +401 -0
- package/dist/review-reads-qW0jvdF1.d.cts +401 -0
- package/dist/{review-support-DS8DYX2a.d.cts → review-support-D64Wu236.d.cts} +37 -5
- package/dist/{review-support-Fy3vdIea.d.ts → review-support-nsLXC9jf.d.ts} +37 -5
- package/dist/{semantic-cell-selection-DsmHmLJ5.d.ts → semantic-cell-selection-D_8RbPII.d.ts} +2 -2
- package/dist/{semantic-cell-selection-CZjBSmMv.d.cts → semantic-cell-selection-DwLB71fF.d.cts} +2 -2
- package/dist/{semantic-interaction-Dy-dCUFF.d.ts → semantic-interaction-CXH2wFqi.d.ts} +1 -1
- package/dist/{semantic-interaction-D-Dszxrn.d.cts → semantic-interaction-DqcEonqD.d.cts} +1 -1
- package/dist/{semantic-paint-drawings-BA3z9jl8.d.ts → semantic-paint-drawings-B5Wk2so5.d.ts} +1 -1
- package/dist/{semantic-paint-drawings-D7qbB0E2.d.cts → semantic-paint-drawings-x8g44lD_.d.cts} +1 -1
- package/dist/{semantic-records-CJR3BvHs.d.cts → semantic-records-COVFW5aS.d.cts} +77 -4
- package/dist/{semantic-records-CWodBJsz.d.ts → semantic-records-zTC0_1zi.d.ts} +77 -4
- package/dist/{shaped-measurer-CNIT_svZ.d.cts → shaped-measurer-AFnFxoot.d.cts} +1 -1
- package/dist/{shaped-measurer-B-TAtcQU.d.ts → shaped-measurer-CZXL-a6v.d.ts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +223 -317
- package/dist/store.d.ts +223 -317
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-CwOeiaQ8.d.ts → tree-op-types-DWLCllG7.d.ts} +80 -25
- package/dist/{tree-op-types-DMiW6nIH.d.cts → tree-op-types-UOXlRUqQ.d.cts} +80 -25
- package/dist/{tree-session-CiUel5Kz.d.ts → tree-session-BtVFXsF6.d.ts} +45 -7
- package/dist/{tree-session-D47_imvR.d.cts → tree-session-DxIOHUOD.d.cts} +45 -7
- package/dist/{tree-store-CxifqwIv.d.cts → tree-store-B1lEkdXc.d.cts} +1 -1
- package/dist/{tree-store-hLtjeyWE.d.ts → tree-store-BscFPB7x.d.ts} +1 -1
- package/package.json +10 -5
- package/dist/chunk-5KSCB2OZ.js +0 -2
- package/dist/chunk-BSC44TIT.js +0 -5
- package/dist/chunk-DLPL5DAG.js +0 -12
- package/dist/chunk-DOEIARE2.js +0 -2
- package/dist/chunk-G7YCQBZE.cjs +0 -5
- package/dist/chunk-HR7K3W6A.js +0 -1
- package/dist/chunk-HVAV2JSN.js +0 -11
- package/dist/chunk-MYH2HCUJ.cjs +0 -2
- package/dist/chunk-NSM75TN6.cjs +0 -1
- package/dist/chunk-PHDVKUWZ.js +0 -1
- package/dist/chunk-QADYGK5L.cjs +0 -12
- package/dist/chunk-RNBHTPW7.js +0 -10
- package/dist/chunk-UD2ZXLFI.cjs +0 -2
- package/dist/chunk-VYAVK2AH.cjs +0 -1
- package/dist/chunk-YUK46A2N.cjs +0 -11
- package/dist/chunk-ZMIX42J7.cjs +0 -10
- package/dist/chunk-ZT55Q52J.cjs +0 -2
- package/dist/chunk-ZUALAR4M.js +0 -2
- package/dist/note-properties-CnmCoory.d.cts +0 -68
- package/dist/note-properties-m75hmP70.d.ts +0 -68
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.cjs';
|
|
2
|
-
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-support-
|
|
3
|
-
export { A as AuthoredNoteNumbering, C as CanResult, p as DocumentChange, q as DocumentEditingMode, r as DocumentHandle, D as DocumentSource, l as Editor, a as EditorCommand, t as EditorCommandShape, u as EditorCommands, w as EditorError, x as EditorEvents, E as EditorFontError, y as EditorFontErrorCode, z as EditorHeaderFooterCommands, B as EditorNoteCommands, G as EditorPosition, H as EditorQueries, J as EditorQuery, K as EditorQueryResults, L as EditorScope, M as EditorSelection, N as EditorSnapshot, F as FontConfiguration, k as FontFaceRequest, i as FontSource, j as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, b as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, Z as NotePropertiesSide, _ as NotePropertiesState, $ as PageSetup, a0 as ResolvedNoteNumbering, a1 as ReviewCommentPlacement, a2 as ReviewCustomPlacement, a3 as ReviewItemPlacement, a4 as ReviewItemPlacementBase, a5 as ReviewItemQuery, a6 as ReviewRevisionPlacement, S as SelectedImageState, a7 as SemanticIdentity, a8 as SemanticTarget, T as TableBorderEdgeTarget, m as TableBorderSpec, n as TableBorderStyle, a9 as TableBorderTarget, aa as TableCellVerticalAlignment, ab as TableColumnDividerResizeTarget, ac as TableColumnOccurrenceTarget, o as TableContext, ad as TableRightEdgeResizeTarget, ae as TableRowOccurrenceTarget, af as TextMatch, V as ViewScope } from '../editor-
|
|
4
|
-
export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-
|
|
2
|
+
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-support-D64Wu236.cjs';
|
|
3
|
+
export { A as AuthoredNoteNumbering, C as CanResult, p as DocumentChange, q as DocumentEditingMode, r as DocumentHandle, D as DocumentSource, l as Editor, a as EditorCommand, t as EditorCommandShape, u as EditorCommands, w as EditorError, x as EditorEvents, E as EditorFontError, y as EditorFontErrorCode, z as EditorHeaderFooterCommands, B as EditorNoteCommands, G as EditorPosition, H as EditorQueries, J as EditorQuery, K as EditorQueryResults, L as EditorScope, M as EditorSelection, N as EditorSnapshot, F as FontConfiguration, k as FontFaceRequest, i as FontSource, j as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, b as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, Z as NotePropertiesSide, _ as NotePropertiesState, $ as PageSetup, a0 as ResolvedNoteNumbering, a1 as ReviewCommentPlacement, a2 as ReviewCustomPlacement, a3 as ReviewItemPlacement, a4 as ReviewItemPlacementBase, a5 as ReviewItemQuery, a6 as ReviewRevisionPlacement, S as SelectedImageState, a7 as SemanticIdentity, a8 as SemanticTarget, T as TableBorderEdgeTarget, m as TableBorderSpec, n as TableBorderStyle, a9 as TableBorderTarget, aa as TableCellVerticalAlignment, ab as TableColumnDividerResizeTarget, ac as TableColumnOccurrenceTarget, o as TableContext, ad as TableRightEdgeResizeTarget, ae as TableRowOccurrenceTarget, af as TextMatch, V as ViewScope } from '../editor-B93PggnR.cjs';
|
|
4
|
+
export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-DqcEonqD.cjs';
|
|
5
5
|
export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.cjs';
|
|
6
|
-
export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-
|
|
7
|
-
export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-
|
|
6
|
+
export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-UOXlRUqQ.cjs';
|
|
7
|
+
export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-DwpNnTg3.cjs';
|
|
8
8
|
import '../ooxml-tree-BU0e3DVi.cjs';
|
|
9
|
-
import '../semantic-records-
|
|
9
|
+
import '../semantic-records-COVFW5aS.cjs';
|
|
10
10
|
import '../revision-projection-72ZApe-g.cjs';
|
|
11
11
|
import '../ooxml-package-CR5us6ad.cjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { ContentControlSummary, DocEdits, DocQueries, DocQueryResults, ParagraphSummary } from './document.js';
|
|
2
|
-
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-support-
|
|
3
|
-
export { A as AuthoredNoteNumbering, C as CanResult, p as DocumentChange, q as DocumentEditingMode, r as DocumentHandle, D as DocumentSource, l as Editor, a as EditorCommand, t as EditorCommandShape, u as EditorCommands, w as EditorError, x as EditorEvents, E as EditorFontError, y as EditorFontErrorCode, z as EditorHeaderFooterCommands, B as EditorNoteCommands, G as EditorPosition, H as EditorQueries, J as EditorQuery, K as EditorQueryResults, L as EditorScope, M as EditorSelection, N as EditorSnapshot, F as FontConfiguration, k as FontFaceRequest, i as FontSource, j as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, b as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, Z as NotePropertiesSide, _ as NotePropertiesState, $ as PageSetup, a0 as ResolvedNoteNumbering, a1 as ReviewCommentPlacement, a2 as ReviewCustomPlacement, a3 as ReviewItemPlacement, a4 as ReviewItemPlacementBase, a5 as ReviewItemQuery, a6 as ReviewRevisionPlacement, S as SelectedImageState, a7 as SemanticIdentity, a8 as SemanticTarget, T as TableBorderEdgeTarget, m as TableBorderSpec, n as TableBorderStyle, a9 as TableBorderTarget, aa as TableCellVerticalAlignment, ab as TableColumnDividerResizeTarget, ac as TableColumnOccurrenceTarget, o as TableContext, ad as TableRightEdgeResizeTarget, ae as TableRowOccurrenceTarget, af as TextMatch, V as ViewScope } from '../editor-
|
|
4
|
-
export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-
|
|
2
|
+
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, a as ReviewItem, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind } from '../review-support-nsLXC9jf.js';
|
|
3
|
+
export { A as AuthoredNoteNumbering, C as CanResult, p as DocumentChange, q as DocumentEditingMode, r as DocumentHandle, D as DocumentSource, l as Editor, a as EditorCommand, t as EditorCommandShape, u as EditorCommands, w as EditorError, x as EditorEvents, E as EditorFontError, y as EditorFontErrorCode, z as EditorHeaderFooterCommands, B as EditorNoteCommands, G as EditorPosition, H as EditorQueries, J as EditorQuery, K as EditorQueryResults, L as EditorScope, M as EditorSelection, N as EditorSnapshot, F as FontConfiguration, k as FontFaceRequest, i as FontSource, j as FontSourceSubstitution, O as FurnitureVariant, P as HeaderFooterSlotArgs, Q as HeaderFooterState, R as HyperlinkInfo, I as ImageContext, b as ImageCropPercent, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, Y as NoteKind, Z as NotePropertiesSide, _ as NotePropertiesState, $ as PageSetup, a0 as ResolvedNoteNumbering, a1 as ReviewCommentPlacement, a2 as ReviewCustomPlacement, a3 as ReviewItemPlacement, a4 as ReviewItemPlacementBase, a5 as ReviewItemQuery, a6 as ReviewRevisionPlacement, S as SelectedImageState, a7 as SemanticIdentity, a8 as SemanticTarget, T as TableBorderEdgeTarget, m as TableBorderSpec, n as TableBorderStyle, a9 as TableBorderTarget, aa as TableCellVerticalAlignment, ab as TableColumnDividerResizeTarget, ac as TableColumnOccurrenceTarget, o as TableContext, ad as TableRightEdgeResizeTarget, ae as TableRowOccurrenceTarget, af as TextMatch, V as ViewScope } from '../editor-CFsSrxGR.js';
|
|
4
|
+
export { S as SemanticPosition, a as SemanticSelection } from '../semantic-interaction-CXH2wFqi.js';
|
|
5
5
|
export { Block, ColorValue, ContainerRef, ContentControl, ContentControlFilter, ContentControlType, DocAnchor, DocAnchorRange, DocComment, DocLocation, DocRange, DocTarget, DocumentBody, DocxDocument, DocxDocumentJSON, ExecErrorCode, ExecResult, Extent, FontDefinition, HeaderFooterSet, IndentFormatting, NumberingRef, PageMargins, Paragraph, Point, Rect, Revision, RevisionType, Run, RunFormatting, Section, SectionProperties, StyleDefinition, StyleDefinitions, Table, TableCell, TableRow, Theme, ThemeColorScheme, Unsubscribe, Watermark } from './types.js';
|
|
6
|
-
export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-
|
|
7
|
-
export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-
|
|
6
|
+
export { f as DrawingHorizontalReferenceFrame, c as DrawingKind, e as DrawingLocks, d as DrawingPositionInput, g as DrawingVerticalReferenceFrame, b as ImageWrapTarget, R as RevisionAddress } from '../tree-op-types-DWLCllG7.js';
|
|
7
|
+
export { I as ImageResourceState, P as PreservedImageMime, R as RenderableImageMime, S as SupportedImageMime, V as ValidatedImageBytesHandle, a as VectorImageMime } from '../image-resources-C_YnqPhn.js';
|
|
8
8
|
import '../ooxml-tree-BU0e3DVi.js';
|
|
9
|
-
import '../semantic-records-
|
|
9
|
+
import '../semantic-records-zTC0_1zi.js';
|
|
10
10
|
import '../revision-projection-DHAkcD_L.js';
|
|
11
11
|
import '../ooxml-package-D_CtywTW.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { L as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a7 as SemanticIdentity, a8 as SemanticTarget, V as ViewScope } from '../editor-
|
|
1
|
+
export { L as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a7 as SemanticIdentity, a8 as SemanticTarget, V as ViewScope } from '../editor-B93PggnR.cjs';
|
|
2
2
|
import './document.cjs';
|
|
3
3
|
import './types.cjs';
|
|
4
|
-
import '../review-support-
|
|
4
|
+
import '../review-support-D64Wu236.cjs';
|
|
5
5
|
import '../ooxml-tree-BU0e3DVi.cjs';
|
|
6
|
-
import '../tree-op-types-
|
|
7
|
-
import '../semantic-interaction-
|
|
8
|
-
import '../semantic-records-
|
|
9
|
-
import '../image-resources-
|
|
6
|
+
import '../tree-op-types-UOXlRUqQ.cjs';
|
|
7
|
+
import '../semantic-interaction-DqcEonqD.cjs';
|
|
8
|
+
import '../semantic-records-COVFW5aS.cjs';
|
|
9
|
+
import '../image-resources-DwpNnTg3.cjs';
|
|
10
10
|
import '../ooxml-package-CR5us6ad.cjs';
|
|
11
11
|
import '../revision-projection-72ZApe-g.cjs';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { L as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a7 as SemanticIdentity, a8 as SemanticTarget, V as ViewScope } from '../editor-
|
|
1
|
+
export { L as EditorScope, U as InteractionAffinity, W as InteractionOutcome, X as InteractionOutcomeCode, a7 as SemanticIdentity, a8 as SemanticTarget, V as ViewScope } from '../editor-CFsSrxGR.js';
|
|
2
2
|
import './document.js';
|
|
3
3
|
import './types.js';
|
|
4
|
-
import '../review-support-
|
|
4
|
+
import '../review-support-nsLXC9jf.js';
|
|
5
5
|
import '../ooxml-tree-BU0e3DVi.js';
|
|
6
|
-
import '../tree-op-types-
|
|
7
|
-
import '../semantic-interaction-
|
|
8
|
-
import '../semantic-records-
|
|
9
|
-
import '../image-resources-
|
|
6
|
+
import '../tree-op-types-DWLCllG7.js';
|
|
7
|
+
import '../semantic-interaction-CXH2wFqi.js';
|
|
8
|
+
import '../semantic-records-zTC0_1zi.js';
|
|
9
|
+
import '../image-resources-C_YnqPhn.js';
|
|
10
10
|
import '../ooxml-package-D_CtywTW.js';
|
|
11
11
|
import '../revision-projection-DHAkcD_L.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunk7VQ7YLW3_cjs=require('../chunk-7VQ7YLW3.cjs');Object.defineProperty(exports,"resolveEditorModules",{enumerable:true,get:function(){return chunk7VQ7YLW3_cjs.a}});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { e as OoxmlPart } from '../ooxml-tree-BU0e3DVi.cjs';
|
|
2
|
-
export { R as RevisionAddress } from '../tree-op-types-
|
|
2
|
+
export { R as RevisionAddress } from '../tree-op-types-UOXlRUqQ.cjs';
|
|
3
3
|
import { R as RevisionDisplayMode } from '../revision-projection-72ZApe-g.cjs';
|
|
4
|
-
import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-
|
|
5
|
-
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-
|
|
4
|
+
import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-D64Wu236.cjs';
|
|
5
|
+
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-D64Wu236.cjs';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* `@docx-editor.dev/core/contracts/modules` — the `EditorModule` seam.
|
|
@@ -74,6 +74,29 @@ interface EditorModule {
|
|
|
74
74
|
* the custom-nodes lane; the registry carries them opaquely until then.
|
|
75
75
|
*/
|
|
76
76
|
readonly customNodes?: readonly unknown[];
|
|
77
|
+
/**
|
|
78
|
+
* customXml payload namespaces this module OWNS, swept for orphans when a document opens.
|
|
79
|
+
*
|
|
80
|
+
* A payload lives in a customXml data part, and Word will not delete one when a user deletes
|
|
81
|
+
* the control bound to it — nothing in OOXML asks it to. So a document can arrive holding
|
|
82
|
+
* payloads for chips that no longer exist, and reconciling against what the story actually
|
|
83
|
+
* binds is the only thing that collects them.
|
|
84
|
+
*
|
|
85
|
+
* The claim is what keeps the sweep off other people's stores: Word's own Cover Page
|
|
86
|
+
* Properties store rides in most templates, and a sweep that walked every customXml part
|
|
87
|
+
* would be deleting from it on the strength of a name collision. A namespace no module names
|
|
88
|
+
* is never touched.
|
|
89
|
+
*/
|
|
90
|
+
readonly customNodePayloadNamespaces?: readonly string[];
|
|
91
|
+
/**
|
|
92
|
+
* Told when the recognition pass finds something wrong with a node in THIS editor's document.
|
|
93
|
+
*
|
|
94
|
+
* Carried per module rather than kept by the capability package, so two editors on one page
|
|
95
|
+
* hear only their own documents and a detached editor's listener goes with it. The shape is
|
|
96
|
+
* opaque here for the same reason `customNodes` is: what a diagnostic means belongs to the
|
|
97
|
+
* package that raised it.
|
|
98
|
+
*/
|
|
99
|
+
readonly onCustomNodeDiagnostic?: (diagnostic: unknown) => void;
|
|
77
100
|
}
|
|
78
101
|
/**
|
|
79
102
|
* The resolved registry the editor instance holds: at most one review
|
|
@@ -83,6 +106,10 @@ interface EditorModule {
|
|
|
83
106
|
interface EditorModuleRegistry {
|
|
84
107
|
readonly review: ReviewModuleContribution | null;
|
|
85
108
|
readonly customNodes: readonly unknown[];
|
|
109
|
+
/** Every claimed payload namespace, deduplicated, in registration order. */
|
|
110
|
+
readonly customNodePayloadNamespaces: readonly string[];
|
|
111
|
+
/** Every registered diagnostic listener, in registration order. */
|
|
112
|
+
readonly customNodeDiagnostics: readonly ((diagnostic: unknown) => void)[];
|
|
86
113
|
}
|
|
87
114
|
/** Resolve construction-time modules into the registry the instance dispatches over. */
|
|
88
115
|
declare function resolveEditorModules(modules: readonly EditorModule[] | undefined): EditorModuleRegistry;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { e as OoxmlPart } from '../ooxml-tree-BU0e3DVi.js';
|
|
2
|
-
export { R as RevisionAddress } from '../tree-op-types-
|
|
2
|
+
export { R as RevisionAddress } from '../tree-op-types-DWLCllG7.js';
|
|
3
3
|
import { R as RevisionDisplayMode } from '../revision-projection-DHAkcD_L.js';
|
|
4
|
-
import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-
|
|
5
|
-
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-
|
|
4
|
+
import { R as ReviewModelInput, a as ReviewItem, b as ReviewRevisionItem } from '../review-support-nsLXC9jf.js';
|
|
5
|
+
export { C as CommentRecord, c as ReviewCommentItem, d as ReviewCustomItem, e as ReviewPosition, f as ReviewRange, g as ReviewRevisionKind } from '../review-support-nsLXC9jf.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* `@docx-editor.dev/core/contracts/modules` — the `EditorModule` seam.
|
|
@@ -74,6 +74,29 @@ interface EditorModule {
|
|
|
74
74
|
* the custom-nodes lane; the registry carries them opaquely until then.
|
|
75
75
|
*/
|
|
76
76
|
readonly customNodes?: readonly unknown[];
|
|
77
|
+
/**
|
|
78
|
+
* customXml payload namespaces this module OWNS, swept for orphans when a document opens.
|
|
79
|
+
*
|
|
80
|
+
* A payload lives in a customXml data part, and Word will not delete one when a user deletes
|
|
81
|
+
* the control bound to it — nothing in OOXML asks it to. So a document can arrive holding
|
|
82
|
+
* payloads for chips that no longer exist, and reconciling against what the story actually
|
|
83
|
+
* binds is the only thing that collects them.
|
|
84
|
+
*
|
|
85
|
+
* The claim is what keeps the sweep off other people's stores: Word's own Cover Page
|
|
86
|
+
* Properties store rides in most templates, and a sweep that walked every customXml part
|
|
87
|
+
* would be deleting from it on the strength of a name collision. A namespace no module names
|
|
88
|
+
* is never touched.
|
|
89
|
+
*/
|
|
90
|
+
readonly customNodePayloadNamespaces?: readonly string[];
|
|
91
|
+
/**
|
|
92
|
+
* Told when the recognition pass finds something wrong with a node in THIS editor's document.
|
|
93
|
+
*
|
|
94
|
+
* Carried per module rather than kept by the capability package, so two editors on one page
|
|
95
|
+
* hear only their own documents and a detached editor's listener goes with it. The shape is
|
|
96
|
+
* opaque here for the same reason `customNodes` is: what a diagnostic means belongs to the
|
|
97
|
+
* package that raised it.
|
|
98
|
+
*/
|
|
99
|
+
readonly onCustomNodeDiagnostic?: (diagnostic: unknown) => void;
|
|
77
100
|
}
|
|
78
101
|
/**
|
|
79
102
|
* The resolved registry the editor instance holds: at most one review
|
|
@@ -83,6 +106,10 @@ interface EditorModule {
|
|
|
83
106
|
interface EditorModuleRegistry {
|
|
84
107
|
readonly review: ReviewModuleContribution | null;
|
|
85
108
|
readonly customNodes: readonly unknown[];
|
|
109
|
+
/** Every claimed payload namespace, deduplicated, in registration order. */
|
|
110
|
+
readonly customNodePayloadNamespaces: readonly string[];
|
|
111
|
+
/** Every registered diagnostic listener, in registration order. */
|
|
112
|
+
readonly customNodeDiagnostics: readonly ((diagnostic: unknown) => void)[];
|
|
86
113
|
}
|
|
87
114
|
/** Resolve construction-time modules into the registry the instance dispatches over. */
|
|
88
115
|
declare function resolveEditorModules(modules: readonly EditorModule[] | undefined): EditorModuleRegistry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as resolveEditorModules}from'../chunk-
|
|
1
|
+
export{a as resolveEditorModules}from'../chunk-GQQOL4PV.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { e as OoxmlPart, O as OoxmlNode } from './ooxml-tree-BU0e3DVi.cjs';
|
|
2
2
|
import { O as OoxmlPackage } from './ooxml-package-CR5us6ad.cjs';
|
|
3
|
-
import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-
|
|
4
|
-
import { m as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-
|
|
3
|
+
import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-DwpNnTg3.cjs';
|
|
4
|
+
import { m as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-UOXlRUqQ.cjs';
|
|
5
5
|
import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-CgEOSw3i.cjs';
|
|
6
6
|
import { N as NoteKind } from './note-nodes-C6DLxlvj.cjs';
|
|
7
|
-
import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-
|
|
7
|
+
import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-B1lEkdXc.cjs';
|
|
8
8
|
|
|
9
9
|
/** A freshly allocated drawing property id, or the reason one could not be minted. */
|
|
10
10
|
type DrawingPropertyIdResult = {
|
|
@@ -705,4 +705,181 @@ declare class TreePackageStore {
|
|
|
705
705
|
private publishSynthetic;
|
|
706
706
|
}
|
|
707
707
|
|
|
708
|
-
|
|
708
|
+
/**
|
|
709
|
+
* The payload half of an insert: which store, which node, and what it holds.
|
|
710
|
+
*
|
|
711
|
+
* `data` is opaque here. The lane that owns a schema is the one that declared it, and a store
|
|
712
|
+
* that parsed payloads would be a second opinion about what a host's node means.
|
|
713
|
+
*/
|
|
714
|
+
interface CustomNodePayloadWrite {
|
|
715
|
+
/** Namespace of the store's root element — what identifies one store among several. */
|
|
716
|
+
readonly namespaceUri: string;
|
|
717
|
+
/** Local name of that root. An NCName; anything else refuses. */
|
|
718
|
+
readonly rootLocalName: string;
|
|
719
|
+
/** The node's own id, which the binding's xpath quotes. */
|
|
720
|
+
readonly nodeId: string;
|
|
721
|
+
/** The text the control shows. Word paints this from the store, so an empty one is an empty chip. */
|
|
722
|
+
readonly label: string;
|
|
723
|
+
/** The payload, serialized. JSON by convention; never parsed here. */
|
|
724
|
+
readonly data: string;
|
|
725
|
+
}
|
|
726
|
+
/** Where the control goes, what it says, and the payload it carries. */
|
|
727
|
+
interface InsertCustomNodeWrite {
|
|
728
|
+
readonly paragraphId: string;
|
|
729
|
+
readonly offset: number;
|
|
730
|
+
/**
|
|
731
|
+
* Wrap rather than insert: the text from `offset` to here is removed first.
|
|
732
|
+
*
|
|
733
|
+
* The node's label REPLACES the words it covered, because that is what turning a stretch of a
|
|
734
|
+
* sentence into a citation means. Removed inside the same transaction, so a refused insert
|
|
735
|
+
* leaves the text where it was.
|
|
736
|
+
*/
|
|
737
|
+
readonly replaceUntil?: number;
|
|
738
|
+
/**
|
|
739
|
+
* Rewrite an existing control: it and the payload it bound go first, in this transaction.
|
|
740
|
+
*
|
|
741
|
+
* An UPDATE is remove-and-reinsert, because the tag codec has no in-place rewrite and
|
|
742
|
+
* pretending it did would put a second write path beside this one. Doing both halves here is
|
|
743
|
+
* what keeps it one undo step, and what stops an update from leaving a label and a payload
|
|
744
|
+
* that disagree.
|
|
745
|
+
*/
|
|
746
|
+
readonly replaceControlId?: string;
|
|
747
|
+
readonly tag: string;
|
|
748
|
+
readonly text: string;
|
|
749
|
+
readonly alias?: string;
|
|
750
|
+
/** Defaults to none. Callers that want Word's own "cannot type into it" pass `contentLocked`. */
|
|
751
|
+
readonly lock?: 'sdtLocked' | 'sdtContentLocked' | 'contentLocked';
|
|
752
|
+
/** Omitted authors an ordinary tagged control with no store — the pre-payload behaviour. */
|
|
753
|
+
readonly payload?: CustomNodePayloadWrite;
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Why a payload write was refused.
|
|
757
|
+
*
|
|
758
|
+
* The tree rejections pass through unchanged, so a locked paragraph refuses a bound insert for
|
|
759
|
+
* the same named reason it refuses a plain one. The three added here are the payload's own.
|
|
760
|
+
*/
|
|
761
|
+
type CustomNodeWriteRejection = TreeOpRejection
|
|
762
|
+
/** The id, root name or namespace cannot be spelled in an XPath, so no binding could name it. */
|
|
763
|
+
| 'unaddressable-payload'
|
|
764
|
+
/** The store could not be authored — see `withCustomXmlDataPart` for every way that happens. */
|
|
765
|
+
| 'store-not-authored'
|
|
766
|
+
/** The payload or the label is past the cap. */
|
|
767
|
+
| 'payload-too-large';
|
|
768
|
+
type CustomNodeWriteResult = {
|
|
769
|
+
readonly ok: true;
|
|
770
|
+
readonly change: TreeModelChange | null;
|
|
771
|
+
/**
|
|
772
|
+
* The control this write authored, when it authored one. A rewrite replaces the control
|
|
773
|
+
* rather than editing it, so the id the caller passed in names nothing afterwards.
|
|
774
|
+
*/
|
|
775
|
+
readonly nodeId?: string;
|
|
776
|
+
} | {
|
|
777
|
+
readonly ok: false;
|
|
778
|
+
readonly reason: CustomNodeWriteRejection;
|
|
779
|
+
readonly detail?: string;
|
|
780
|
+
};
|
|
781
|
+
/**
|
|
782
|
+
* The largest payload one node may carry, in UTF-16 code units.
|
|
783
|
+
*
|
|
784
|
+
* Same figure as the read side's (`parseCustomNodeData`) and for the same reason: far past any
|
|
785
|
+
* legitimate chip, far short of anything that hurts. Checked on the WRITE too, so a document
|
|
786
|
+
* cannot be authored here holding a payload the reader will later refuse to parse.
|
|
787
|
+
*/
|
|
788
|
+
declare const MAX_CUSTOM_NODE_PAYLOAD_LENGTH: number;
|
|
789
|
+
/** The longest label a binding may paint. Word renders it as the control's whole content. */
|
|
790
|
+
declare const MAX_CUSTOM_NODE_LABEL_LENGTH = 4096;
|
|
791
|
+
/**
|
|
792
|
+
* Insert one custom node, with its payload, as a single transaction.
|
|
793
|
+
*
|
|
794
|
+
* Answers the store transaction's own change so the caller can publish it — a payload write is a
|
|
795
|
+
* package write reaching through a story store, exactly as a comment is, and the coordinator
|
|
796
|
+
* needs the change to know which paragraphs went dirty.
|
|
797
|
+
*/
|
|
798
|
+
declare function insertCustomNodeWrite(store: TreeDocumentStore, write: InsertCustomNodeWrite,
|
|
799
|
+
/**
|
|
800
|
+
* The part the customXml store hangs off, defaulting to the story being written.
|
|
801
|
+
*
|
|
802
|
+
* A chip in a header is written against the HEADER store, but Word enumerates the data
|
|
803
|
+
* store from the main document part — a store authored off a header is one Word never
|
|
804
|
+
* sees. So the caller passes the main part while the control itself lands in the story.
|
|
805
|
+
*/
|
|
806
|
+
dataOwnerPartName?: string): CustomNodeWriteResult;
|
|
807
|
+
/**
|
|
808
|
+
* Remove a control and, in the same transaction, the payload it bound.
|
|
809
|
+
*
|
|
810
|
+
* The sweep would collect the node eventually — that is what makes deletion in Word survivable —
|
|
811
|
+
* but "eventually" is the next open, and a document saved in between carries a payload for a
|
|
812
|
+
* chip that is gone. Doing it here means the ordinary case is exact and the sweep is a backstop.
|
|
813
|
+
*/
|
|
814
|
+
declare function removeCustomNodeWrite(store: TreeDocumentStore, controlNodeId: string): CustomNodeWriteResult;
|
|
815
|
+
/**
|
|
816
|
+
* What one sweep collected, or why it collected nothing.
|
|
817
|
+
*
|
|
818
|
+
* `ok: false` is NOT "the document was already tidy" — that is `ok: true` with an empty
|
|
819
|
+
* `removed`. It means a store this sweep was asked to tidy refused the rewrite, which a caller
|
|
820
|
+
* that keeps saving into the same document should know about rather than silently retry forever.
|
|
821
|
+
*/
|
|
822
|
+
type CustomNodeSweepResult = {
|
|
823
|
+
readonly ok: true;
|
|
824
|
+
readonly pkg: OoxmlPackage;
|
|
825
|
+
/** Node ids removed, across every store swept. Empty means there were no orphans. */
|
|
826
|
+
readonly removed: readonly string[];
|
|
827
|
+
} | {
|
|
828
|
+
readonly ok: false;
|
|
829
|
+
readonly reason: string;
|
|
830
|
+
};
|
|
831
|
+
/**
|
|
832
|
+
* Drop every payload no control binds, in the stores whose namespaces a host claims.
|
|
833
|
+
*
|
|
834
|
+
* ON OPEN, NOT ON SAVE. A chip cut to the clipboard is unbound for as long as it sits there, so a
|
|
835
|
+
* save mid-cut would destroy the payload the user is about to paste. On open the only unbound
|
|
836
|
+
* nodes are ones a control genuinely lost — deleted here, or deleted in Word, which is the case
|
|
837
|
+
* nothing else can collect.
|
|
838
|
+
*
|
|
839
|
+
* `namespaces` is the claim, and it is what keeps this off other people's stores: Word's own Cover
|
|
840
|
+
* Page Properties store rides in most templates, and a sweep that walked every customXml part
|
|
841
|
+
* would be deleting from it on the strength of a name collision.
|
|
842
|
+
*/
|
|
843
|
+
declare function sweepCustomNodePayloads(pkg: OoxmlPackage, storyPartName: string, namespaces: readonly string[]): CustomNodeSweepResult;
|
|
844
|
+
/** One control's payload, as the store holds it. Both strings are untrusted file input. */
|
|
845
|
+
interface CustomNodePayloadRead {
|
|
846
|
+
/** The store node's own id. */
|
|
847
|
+
readonly nodeId: string;
|
|
848
|
+
/** The text Word paints the control from. */
|
|
849
|
+
readonly label: string;
|
|
850
|
+
/** The payload as authored. JSON by convention, unparsed here. */
|
|
851
|
+
readonly data: string;
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* The payload every control in a story binds to, keyed by the CONTROL's canonical node id.
|
|
855
|
+
*
|
|
856
|
+
* Keyed by the control rather than by the store node because that is the question a reader
|
|
857
|
+
* actually has — "what does this chip carry" — and because two stores may each hold a `cx1`.
|
|
858
|
+
* Resolved here rather than by a capability package: the stores are package parts, and a
|
|
859
|
+
* derivation that only gets story parts has no way to reach them.
|
|
860
|
+
*
|
|
861
|
+
* Every store the story relates to, so a document carrying two definitions' payloads answers
|
|
862
|
+
* for both without anyone naming a namespace.
|
|
863
|
+
*/
|
|
864
|
+
declare function customNodePayloadsByControl(pkg: OoxmlPackage, storyPartName: string): ReadonlyMap<string, CustomNodePayloadRead>;
|
|
865
|
+
/** Every payload one store holds, for a caller resolving a control's `data`. */
|
|
866
|
+
declare function customNodePayloadsOf(pkg: OoxmlPackage, storyPartName: string, namespaceUri: string): ReadonlyMap<string, {
|
|
867
|
+
readonly label: string;
|
|
868
|
+
readonly data: string;
|
|
869
|
+
}>;
|
|
870
|
+
/**
|
|
871
|
+
* What the session answers for a sweep: the ids collected, or the reason none were.
|
|
872
|
+
*
|
|
873
|
+
* Narrower than {@link CustomNodeSweepResult}, which also carries the rewritten package — the
|
|
874
|
+
* session has already installed that, and handing it back would invite a caller to install it
|
|
875
|
+
* twice.
|
|
876
|
+
*/
|
|
877
|
+
type CustomNodeSweepOutcome = {
|
|
878
|
+
readonly ok: true;
|
|
879
|
+
readonly removed: readonly string[];
|
|
880
|
+
} | {
|
|
881
|
+
readonly ok: false;
|
|
882
|
+
readonly reason: string;
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
export { customNodePayloadsByControl as $, type ApplyImagePropertiesInput as A, type BookmarkIndex as B, type CustomNodeWriteResult as C, type DocumentTrackingSettings as D, type EmbeddedFont as E, type FontStyleKey as F, type NoteReferenceScanBudget as G, type HeaderFooterLifecycleImpact as H, type InsertCustomNodeWrite as I, type ReadEmbeddedFontsOptions as J, type StoryResolveResult as K, type ListKind as L, MAX_CUSTOM_NODE_LABEL_LENGTH as M, NO_TRACKING_SETTINGS as N, type TreePackageStoreOptions as O, type PackageTransactResult as P, allocateDrawingPropertyId as Q, type ReplaceImageOptions as R, type StoryScope as S, TreePackageStore as T, applyHeaderFooterLifecycleOp as U, applyNoteLifecycleOp as V, buildBookmarkIndex as W, cascadeDeletedNoteReferences as X, collectNoteReferences as Y, collectPackageNoteReferences as Z, createNoteReferenceScanBudget as _, type StoryTargetRejection as a, customNodePayloadsOf as a0, deobfuscateFont as a1, diagnoseNoteReferences as a2, ensureListDefinition as a3, ensureNumberingLevel as a4, insertCustomNodeWrite as a5, isHeaderFooterLifecycleOp as a6, isNoteLifecycleOp as a7, normalNoteIds as a8, notesPartHasId as a9, readEmbeddedFonts as aa, readTrackingSettings as ab, removeCustomNodeWrite as ac, resolveNotesPart as ad, sweepCustomNodePayloads as ae, withBinaryPart as af, withEmbeddedImage as ag, withoutUnreferencedImagePart as ah, type CustomNodeSweepOutcome as b, type InsertImageInput as c, type ImageIntentResult as d, type BookmarkAnchor as e, type CascadeDeletedNoteReferencesOptions as f, type CustomNodePayloadRead as g, type CustomNodePayloadWrite as h, type CustomNodeSweepResult as i, type CustomNodeWriteRejection as j, DEFAULT_MAX_EDITABLE_STORY_PARTS as k, type DrawingPropertyIdResult as l, type HeaderFooterLifecycleOp as m, type HeaderFooterLifecycleRejection as n, type HeaderFooterLifecycleResult as o, MAX_CUSTOM_NODE_PAYLOAD_LENGTH as p, MAX_NOTE_REFERENCE_PARTS as q, MAX_NOTE_REFERENCE_SCAN as r, type NoteDiagnostic as s, type NoteDiagnosticCode as t, type NoteLifecycleImpact as u, type NoteLifecycleOp as v, type NoteLifecycleOptions as w, type NoteLifecycleRejection as x, type NoteLifecycleResult as y, type NoteReferenceHit as z };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { e as OoxmlPart, O as OoxmlNode } from './ooxml-tree-BU0e3DVi.js';
|
|
2
2
|
import { O as OoxmlPackage } from './ooxml-package-D_CtywTW.js';
|
|
3
|
-
import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-
|
|
4
|
-
import { m as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-
|
|
3
|
+
import { S as SupportedImageMime, b as ImageDecodePort } from './image-resources-C_YnqPhn.js';
|
|
4
|
+
import { m as DrawingTreeDocOp, a as TreeOpRejection, T as TreeDocOp } from './tree-op-types-DWLCllG7.js';
|
|
5
5
|
import { c as HeaderFooterKind, H as HeaderFooterVariant } from './hf-references-BdjsQNE_.js';
|
|
6
6
|
import { N as NoteKind } from './note-nodes-BPSTVDMr.js';
|
|
7
|
-
import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-
|
|
7
|
+
import { T as TreeModelChange, a as TreeStoryRef, b as TreeDocumentStore, c as TransactionContext, d as TransactOptions, S as SelectionMark, e as TreeDocumentCheckpoint } from './tree-store-BscFPB7x.js';
|
|
8
8
|
|
|
9
9
|
/** A freshly allocated drawing property id, or the reason one could not be minted. */
|
|
10
10
|
type DrawingPropertyIdResult = {
|
|
@@ -705,4 +705,181 @@ declare class TreePackageStore {
|
|
|
705
705
|
private publishSynthetic;
|
|
706
706
|
}
|
|
707
707
|
|
|
708
|
-
|
|
708
|
+
/**
|
|
709
|
+
* The payload half of an insert: which store, which node, and what it holds.
|
|
710
|
+
*
|
|
711
|
+
* `data` is opaque here. The lane that owns a schema is the one that declared it, and a store
|
|
712
|
+
* that parsed payloads would be a second opinion about what a host's node means.
|
|
713
|
+
*/
|
|
714
|
+
interface CustomNodePayloadWrite {
|
|
715
|
+
/** Namespace of the store's root element — what identifies one store among several. */
|
|
716
|
+
readonly namespaceUri: string;
|
|
717
|
+
/** Local name of that root. An NCName; anything else refuses. */
|
|
718
|
+
readonly rootLocalName: string;
|
|
719
|
+
/** The node's own id, which the binding's xpath quotes. */
|
|
720
|
+
readonly nodeId: string;
|
|
721
|
+
/** The text the control shows. Word paints this from the store, so an empty one is an empty chip. */
|
|
722
|
+
readonly label: string;
|
|
723
|
+
/** The payload, serialized. JSON by convention; never parsed here. */
|
|
724
|
+
readonly data: string;
|
|
725
|
+
}
|
|
726
|
+
/** Where the control goes, what it says, and the payload it carries. */
|
|
727
|
+
interface InsertCustomNodeWrite {
|
|
728
|
+
readonly paragraphId: string;
|
|
729
|
+
readonly offset: number;
|
|
730
|
+
/**
|
|
731
|
+
* Wrap rather than insert: the text from `offset` to here is removed first.
|
|
732
|
+
*
|
|
733
|
+
* The node's label REPLACES the words it covered, because that is what turning a stretch of a
|
|
734
|
+
* sentence into a citation means. Removed inside the same transaction, so a refused insert
|
|
735
|
+
* leaves the text where it was.
|
|
736
|
+
*/
|
|
737
|
+
readonly replaceUntil?: number;
|
|
738
|
+
/**
|
|
739
|
+
* Rewrite an existing control: it and the payload it bound go first, in this transaction.
|
|
740
|
+
*
|
|
741
|
+
* An UPDATE is remove-and-reinsert, because the tag codec has no in-place rewrite and
|
|
742
|
+
* pretending it did would put a second write path beside this one. Doing both halves here is
|
|
743
|
+
* what keeps it one undo step, and what stops an update from leaving a label and a payload
|
|
744
|
+
* that disagree.
|
|
745
|
+
*/
|
|
746
|
+
readonly replaceControlId?: string;
|
|
747
|
+
readonly tag: string;
|
|
748
|
+
readonly text: string;
|
|
749
|
+
readonly alias?: string;
|
|
750
|
+
/** Defaults to none. Callers that want Word's own "cannot type into it" pass `contentLocked`. */
|
|
751
|
+
readonly lock?: 'sdtLocked' | 'sdtContentLocked' | 'contentLocked';
|
|
752
|
+
/** Omitted authors an ordinary tagged control with no store — the pre-payload behaviour. */
|
|
753
|
+
readonly payload?: CustomNodePayloadWrite;
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Why a payload write was refused.
|
|
757
|
+
*
|
|
758
|
+
* The tree rejections pass through unchanged, so a locked paragraph refuses a bound insert for
|
|
759
|
+
* the same named reason it refuses a plain one. The three added here are the payload's own.
|
|
760
|
+
*/
|
|
761
|
+
type CustomNodeWriteRejection = TreeOpRejection
|
|
762
|
+
/** The id, root name or namespace cannot be spelled in an XPath, so no binding could name it. */
|
|
763
|
+
| 'unaddressable-payload'
|
|
764
|
+
/** The store could not be authored — see `withCustomXmlDataPart` for every way that happens. */
|
|
765
|
+
| 'store-not-authored'
|
|
766
|
+
/** The payload or the label is past the cap. */
|
|
767
|
+
| 'payload-too-large';
|
|
768
|
+
type CustomNodeWriteResult = {
|
|
769
|
+
readonly ok: true;
|
|
770
|
+
readonly change: TreeModelChange | null;
|
|
771
|
+
/**
|
|
772
|
+
* The control this write authored, when it authored one. A rewrite replaces the control
|
|
773
|
+
* rather than editing it, so the id the caller passed in names nothing afterwards.
|
|
774
|
+
*/
|
|
775
|
+
readonly nodeId?: string;
|
|
776
|
+
} | {
|
|
777
|
+
readonly ok: false;
|
|
778
|
+
readonly reason: CustomNodeWriteRejection;
|
|
779
|
+
readonly detail?: string;
|
|
780
|
+
};
|
|
781
|
+
/**
|
|
782
|
+
* The largest payload one node may carry, in UTF-16 code units.
|
|
783
|
+
*
|
|
784
|
+
* Same figure as the read side's (`parseCustomNodeData`) and for the same reason: far past any
|
|
785
|
+
* legitimate chip, far short of anything that hurts. Checked on the WRITE too, so a document
|
|
786
|
+
* cannot be authored here holding a payload the reader will later refuse to parse.
|
|
787
|
+
*/
|
|
788
|
+
declare const MAX_CUSTOM_NODE_PAYLOAD_LENGTH: number;
|
|
789
|
+
/** The longest label a binding may paint. Word renders it as the control's whole content. */
|
|
790
|
+
declare const MAX_CUSTOM_NODE_LABEL_LENGTH = 4096;
|
|
791
|
+
/**
|
|
792
|
+
* Insert one custom node, with its payload, as a single transaction.
|
|
793
|
+
*
|
|
794
|
+
* Answers the store transaction's own change so the caller can publish it — a payload write is a
|
|
795
|
+
* package write reaching through a story store, exactly as a comment is, and the coordinator
|
|
796
|
+
* needs the change to know which paragraphs went dirty.
|
|
797
|
+
*/
|
|
798
|
+
declare function insertCustomNodeWrite(store: TreeDocumentStore, write: InsertCustomNodeWrite,
|
|
799
|
+
/**
|
|
800
|
+
* The part the customXml store hangs off, defaulting to the story being written.
|
|
801
|
+
*
|
|
802
|
+
* A chip in a header is written against the HEADER store, but Word enumerates the data
|
|
803
|
+
* store from the main document part — a store authored off a header is one Word never
|
|
804
|
+
* sees. So the caller passes the main part while the control itself lands in the story.
|
|
805
|
+
*/
|
|
806
|
+
dataOwnerPartName?: string): CustomNodeWriteResult;
|
|
807
|
+
/**
|
|
808
|
+
* Remove a control and, in the same transaction, the payload it bound.
|
|
809
|
+
*
|
|
810
|
+
* The sweep would collect the node eventually — that is what makes deletion in Word survivable —
|
|
811
|
+
* but "eventually" is the next open, and a document saved in between carries a payload for a
|
|
812
|
+
* chip that is gone. Doing it here means the ordinary case is exact and the sweep is a backstop.
|
|
813
|
+
*/
|
|
814
|
+
declare function removeCustomNodeWrite(store: TreeDocumentStore, controlNodeId: string): CustomNodeWriteResult;
|
|
815
|
+
/**
|
|
816
|
+
* What one sweep collected, or why it collected nothing.
|
|
817
|
+
*
|
|
818
|
+
* `ok: false` is NOT "the document was already tidy" — that is `ok: true` with an empty
|
|
819
|
+
* `removed`. It means a store this sweep was asked to tidy refused the rewrite, which a caller
|
|
820
|
+
* that keeps saving into the same document should know about rather than silently retry forever.
|
|
821
|
+
*/
|
|
822
|
+
type CustomNodeSweepResult = {
|
|
823
|
+
readonly ok: true;
|
|
824
|
+
readonly pkg: OoxmlPackage;
|
|
825
|
+
/** Node ids removed, across every store swept. Empty means there were no orphans. */
|
|
826
|
+
readonly removed: readonly string[];
|
|
827
|
+
} | {
|
|
828
|
+
readonly ok: false;
|
|
829
|
+
readonly reason: string;
|
|
830
|
+
};
|
|
831
|
+
/**
|
|
832
|
+
* Drop every payload no control binds, in the stores whose namespaces a host claims.
|
|
833
|
+
*
|
|
834
|
+
* ON OPEN, NOT ON SAVE. A chip cut to the clipboard is unbound for as long as it sits there, so a
|
|
835
|
+
* save mid-cut would destroy the payload the user is about to paste. On open the only unbound
|
|
836
|
+
* nodes are ones a control genuinely lost — deleted here, or deleted in Word, which is the case
|
|
837
|
+
* nothing else can collect.
|
|
838
|
+
*
|
|
839
|
+
* `namespaces` is the claim, and it is what keeps this off other people's stores: Word's own Cover
|
|
840
|
+
* Page Properties store rides in most templates, and a sweep that walked every customXml part
|
|
841
|
+
* would be deleting from it on the strength of a name collision.
|
|
842
|
+
*/
|
|
843
|
+
declare function sweepCustomNodePayloads(pkg: OoxmlPackage, storyPartName: string, namespaces: readonly string[]): CustomNodeSweepResult;
|
|
844
|
+
/** One control's payload, as the store holds it. Both strings are untrusted file input. */
|
|
845
|
+
interface CustomNodePayloadRead {
|
|
846
|
+
/** The store node's own id. */
|
|
847
|
+
readonly nodeId: string;
|
|
848
|
+
/** The text Word paints the control from. */
|
|
849
|
+
readonly label: string;
|
|
850
|
+
/** The payload as authored. JSON by convention, unparsed here. */
|
|
851
|
+
readonly data: string;
|
|
852
|
+
}
|
|
853
|
+
/**
|
|
854
|
+
* The payload every control in a story binds to, keyed by the CONTROL's canonical node id.
|
|
855
|
+
*
|
|
856
|
+
* Keyed by the control rather than by the store node because that is the question a reader
|
|
857
|
+
* actually has — "what does this chip carry" — and because two stores may each hold a `cx1`.
|
|
858
|
+
* Resolved here rather than by a capability package: the stores are package parts, and a
|
|
859
|
+
* derivation that only gets story parts has no way to reach them.
|
|
860
|
+
*
|
|
861
|
+
* Every store the story relates to, so a document carrying two definitions' payloads answers
|
|
862
|
+
* for both without anyone naming a namespace.
|
|
863
|
+
*/
|
|
864
|
+
declare function customNodePayloadsByControl(pkg: OoxmlPackage, storyPartName: string): ReadonlyMap<string, CustomNodePayloadRead>;
|
|
865
|
+
/** Every payload one store holds, for a caller resolving a control's `data`. */
|
|
866
|
+
declare function customNodePayloadsOf(pkg: OoxmlPackage, storyPartName: string, namespaceUri: string): ReadonlyMap<string, {
|
|
867
|
+
readonly label: string;
|
|
868
|
+
readonly data: string;
|
|
869
|
+
}>;
|
|
870
|
+
/**
|
|
871
|
+
* What the session answers for a sweep: the ids collected, or the reason none were.
|
|
872
|
+
*
|
|
873
|
+
* Narrower than {@link CustomNodeSweepResult}, which also carries the rewritten package — the
|
|
874
|
+
* session has already installed that, and handing it back would invite a caller to install it
|
|
875
|
+
* twice.
|
|
876
|
+
*/
|
|
877
|
+
type CustomNodeSweepOutcome = {
|
|
878
|
+
readonly ok: true;
|
|
879
|
+
readonly removed: readonly string[];
|
|
880
|
+
} | {
|
|
881
|
+
readonly ok: false;
|
|
882
|
+
readonly reason: string;
|
|
883
|
+
};
|
|
884
|
+
|
|
885
|
+
export { customNodePayloadsByControl as $, type ApplyImagePropertiesInput as A, type BookmarkIndex as B, type CustomNodeWriteResult as C, type DocumentTrackingSettings as D, type EmbeddedFont as E, type FontStyleKey as F, type NoteReferenceScanBudget as G, type HeaderFooterLifecycleImpact as H, type InsertCustomNodeWrite as I, type ReadEmbeddedFontsOptions as J, type StoryResolveResult as K, type ListKind as L, MAX_CUSTOM_NODE_LABEL_LENGTH as M, NO_TRACKING_SETTINGS as N, type TreePackageStoreOptions as O, type PackageTransactResult as P, allocateDrawingPropertyId as Q, type ReplaceImageOptions as R, type StoryScope as S, TreePackageStore as T, applyHeaderFooterLifecycleOp as U, applyNoteLifecycleOp as V, buildBookmarkIndex as W, cascadeDeletedNoteReferences as X, collectNoteReferences as Y, collectPackageNoteReferences as Z, createNoteReferenceScanBudget as _, type StoryTargetRejection as a, customNodePayloadsOf as a0, deobfuscateFont as a1, diagnoseNoteReferences as a2, ensureListDefinition as a3, ensureNumberingLevel as a4, insertCustomNodeWrite as a5, isHeaderFooterLifecycleOp as a6, isNoteLifecycleOp as a7, normalNoteIds as a8, notesPartHasId as a9, readEmbeddedFonts as aa, readTrackingSettings as ab, removeCustomNodeWrite as ac, resolveNotesPart as ad, sweepCustomNodePayloads as ae, withBinaryPart as af, withEmbeddedImage as ag, withoutUnreferencedImagePart as ah, type CustomNodeSweepOutcome as b, type InsertImageInput as c, type ImageIntentResult as d, type BookmarkAnchor as e, type CascadeDeletedNoteReferencesOptions as f, type CustomNodePayloadRead as g, type CustomNodePayloadWrite as h, type CustomNodeSweepResult as i, type CustomNodeWriteRejection as j, DEFAULT_MAX_EDITABLE_STORY_PARTS as k, type DrawingPropertyIdResult as l, type HeaderFooterLifecycleOp as m, type HeaderFooterLifecycleRejection as n, type HeaderFooterLifecycleResult as o, MAX_CUSTOM_NODE_PAYLOAD_LENGTH as p, MAX_NOTE_REFERENCE_PARTS as q, MAX_NOTE_REFERENCE_SCAN as r, type NoteDiagnostic as s, type NoteDiagnosticCode as t, type NoteLifecycleImpact as u, type NoteLifecycleOp as v, type NoteLifecycleOptions as w, type NoteLifecycleRejection as x, type NoteLifecycleResult as y, type NoteReferenceHit as z };
|