@stll/docx-core 0.37.0 → 0.39.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.
@@ -1,8 +1,5 @@
1
- import { $r as TextFormatting, Cn as Section, Gr as TableFormatting, H as BreakContent, I as BlockContent, Jn as TableRow, Mr as NumberingInstance, Rn as TabContent, Rr as ParagraphFormatting, Sr as AbstractNumbering, W as Comment, Wr as TableCellFormatting, Xr as TableRowFormatting, _n as Run, _t as HeaderFooter, a as DocumentSettings, an as ParagraphPropertyChange, b as StyleDefinitions, et as DocumentBody, g as Relationship, h as MediaFile, i as Document, jr as NumberingDefinitions, l as ExhaustiveFields, mt as Footnote, nn as ParagraphContent, ot as Endnote, rn as ParagraphMarkChange, s as DocxPackage, tn as Paragraph, vi as HeadingOutlineLevel, vn as RunContent, vt as HeaderFooterType, wn as SectionProperties, xt as INSERTION_SEAM_POLICIES, zn as Table } from "../document-wNmygRXS.js";
1
+ import { C as Relationship, D as StyleDefinitions, Dn as Run, Dt as HeaderFooter, Hr as NumberingInstance, Jn as TabContent, Jr as ParagraphFormatting, K as BlockContent, Mr as AbstractNumbering, Nn as Section, Oi as HeadingOutlineLevel, On as RunContent, Ot as HeaderFooterType, Pn as SectionProperties, Q as BreakContent, S as MediaFile, Vr as NumberingDefinitions, Y as BookmarkEnd, Yn as Table, a as DocumentSettings, dn as Paragraph, ei as TableCellFormatting, et as Comment, fn as ParagraphContent, g as ExhaustiveFields, gt as Endnote, hn as ParagraphPropertyChange, i as Document, ir as TableRow, jt as INSERTION_SEAM_POLICIES, li as TextFormatting, oi as TableRowFormatting, pn as ParagraphMarkChange, s as DocxPackage, ti as TableFormatting, ut as DocumentBody, wt as Footnote } from "../document-BkGU2ctn.js";
2
2
  import { Result } from "better-result";
3
- //#region src/ops/noteMarks.d.ts
4
- declare const noteUsesCustomMark: (document: Document, note: Footnote | Endnote) => boolean;
5
- //#endregion
6
3
  //#region src/ops/types.d.ts
7
4
  /** JSON-safe map presence, including an explicitly undefined section map. */
8
5
  type SectionMapState = {
@@ -57,12 +54,12 @@ type SectionViewChange = {
57
54
  * and paragraph operations, and the review operations `setParagraphReview`,
58
55
  * `replaceInline` and `resolveRevision`.
59
56
  */
60
- declare const DOCUMENT_OP_SCHEMA_VERSION = 10;
57
+ export declare const DOCUMENT_OP_SCHEMA_VERSION = 10;
61
58
  /**
62
59
  * The main story has a fixed address; other editable parts use their stable
63
60
  * relationship id or note id. Comment bodies are not yet editable stories.
64
61
  */
65
- declare const OP_STORIES: Readonly<{
62
+ export declare const OP_STORIES: Readonly<{
66
63
  readonly MAIN: "main";
67
64
  }>;
68
65
  /** The stable identity of an independently editable package story. */
@@ -108,7 +105,7 @@ type ParagraphPropsPatch = FormattingPatch<ParagraphFormatting>;
108
105
  * empty set. The two state the same thing; the choice is how an inverse
109
106
  * gives back a record in the spelling it had.
110
107
  */
111
- declare const EMPTY_PROPERTY_SETS: Readonly<{
108
+ export declare const EMPTY_PROPERTY_SETS: Readonly<{
112
109
  readonly OMIT: "omit";
113
110
  readonly KEEP: "keep";
114
111
  }>;
@@ -118,7 +115,7 @@ type EmptyPropertySet = (typeof EMPTY_PROPERTY_SETS)[keyof typeof EMPTY_PROPERTY
118
115
  * Inserted text takes the properties of the run it joins: the run holding the
119
116
  * unit before the position, or the one after it at the start of a paragraph.
120
117
  */
121
- declare const INHERIT_RUN_PROPS = "inherit";
118
+ export declare const INHERIT_RUN_PROPS = "inherit";
122
119
  /** The run properties inserted text carries. */
123
120
  type InsertedRunProps = typeof INHERIT_RUN_PROPS | TextFormatting;
124
121
  /**
@@ -173,7 +170,7 @@ declare const SECTION_BOUNDARY_POLICIES: Readonly<{
173
170
  readonly REPLACE: "replace";
174
171
  }>;
175
172
  /** The operation kinds of schema version 10. */
176
- declare const DOCUMENT_OP_TYPES: Readonly<{
173
+ export declare const DOCUMENT_OP_TYPES: Readonly<{
177
174
  readonly CREATE_COMMENT: "createComment";
178
175
  readonly UPDATE_COMMENT_CONTENT: "updateCommentContent";
179
176
  readonly SET_COMMENT_RESOLUTION: "setCommentResolution";
@@ -322,7 +319,7 @@ type JoinInlineOp = {
322
319
  depth: number;
323
320
  };
324
321
  /** Whether a tracked run patch appends an independently rejectable review. */
325
- declare const PROPERTY_REVIEW_POLICIES: Readonly<{
322
+ export declare const PROPERTY_REVIEW_POLICIES: Readonly<{
326
323
  readonly APPEND: "append";
327
324
  }>;
328
325
  /**
@@ -384,9 +381,9 @@ type SetParagraphPropsOp = {
384
381
  * (`w:pPr/w:rPr`) rather than to the paragraph properties a `w:pPrChange`
385
382
  * records.
386
383
  */
387
- declare const PARAGRAPH_MARK_FORMATTING_KEYS: readonly ["runProperties", "runInWithNext"];
384
+ export declare const PARAGRAPH_MARK_FORMATTING_KEYS: readonly ["runProperties", "runInWithNext"];
388
385
  /** Which half of a split, or of a join, a rule applies to. */
389
- declare const SPLIT_HALVES: Readonly<{
386
+ export declare const SPLIT_HALVES: Readonly<{
390
387
  readonly FIRST: "first";
391
388
  readonly SECOND: "second";
392
389
  }>;
@@ -573,7 +570,7 @@ type ReplaceInlineOp = {
573
570
  content: readonly ParagraphContent[];
574
571
  };
575
572
  /** What resolving a tracked change does with it. */
576
- declare const REVISION_DECISIONS: Readonly<{
573
+ export declare const REVISION_DECISIONS: Readonly<{
577
574
  readonly ACCEPT: "accept";
578
575
  readonly REJECT: "reject";
579
576
  }>;
@@ -811,11 +808,15 @@ type AddNoteOp = {
811
808
  type: typeof DOCUMENT_OP_TYPES.ADD_NOTE;
812
809
  at: TextPosition;
813
810
  note: Footnote | Endnote;
811
+ revision?: RevisionStamp;
812
+ newIds?: NewIds;
814
813
  };
815
814
  type RemoveNoteOp = {
816
815
  type: typeof DOCUMENT_OP_TYPES.REMOVE_NOTE;
817
816
  at: TextPosition;
818
817
  story: NoteStory;
818
+ revision?: RevisionStamp;
819
+ newIds?: NewIds;
819
820
  };
820
821
  type SetSectionPropsOp = {
821
822
  type: typeof DOCUMENT_OP_TYPES.SET_SECTION_PROPS;
@@ -999,7 +1000,7 @@ type DocumentOpEnvelope = {
999
1000
  op: DocumentOp;
1000
1001
  };
1001
1002
  /** An operation in the envelope it is journaled and sent in. */
1002
- declare const toOpEnvelope: (op: DocumentOp) => DocumentOpEnvelope;
1003
+ export declare const toOpEnvelope: (op: DocumentOp) => DocumentOpEnvelope;
1003
1004
  /** The blocks an operation changed, by id. */
1004
1005
  type TouchedBlocks = {
1005
1006
  modified: readonly string[];
@@ -1016,14 +1017,14 @@ type DocumentEdit = {
1016
1017
  touched: TouchedBlocks;
1017
1018
  };
1018
1019
  /** Edits made in turn, starting from `document`, as one edit. */
1019
- declare const combineEdits: (document: Document, edits: readonly DocumentEdit[]) => DocumentEdit;
1020
+ export declare const combineEdits: (document: Document, edits: readonly DocumentEdit[]) => DocumentEdit;
1020
1021
  //#endregion
1021
1022
  //#region src/ops/refusal.d.ts
1022
1023
  /**
1023
1024
  * Why an operation was not applied. A refused operation changes nothing: the
1024
1025
  * document it was applied to is returned as it was.
1025
1026
  */
1026
- declare const DOCUMENT_OP_REFUSAL_REASONS: Readonly<{
1027
+ export declare const DOCUMENT_OP_REFUSAL_REASONS: Readonly<{
1027
1028
  /** The journal envelope uses a schema this reader does not implement. */
1028
1029
  readonly UNSUPPORTED_SCHEMA: "unsupportedSchema";
1029
1030
  /** No paragraph in the story carries the id. */
@@ -1121,33 +1122,12 @@ declare const DOCUMENT_OP_REFUSAL_REASONS: Readonly<{
1121
1122
  type DocumentOpRefusalReason = (typeof DOCUMENT_OP_REFUSAL_REASONS)[keyof typeof DOCUMENT_OP_REFUSAL_REASONS];
1122
1123
  declare const DocumentOpRefusal_base: import("better-result").TaggedErrorClass<"DocumentOpRefusal">;
1123
1124
  /** An operation the document cannot take as stated. */
1124
- declare class DocumentOpRefusal extends DocumentOpRefusal_base<{
1125
+ export declare class DocumentOpRefusal extends DocumentOpRefusal_base<{
1125
1126
  message: string;
1126
1127
  reason: DocumentOpRefusalReason;
1127
1128
  opType: DocumentOpType | undefined;
1128
1129
  }> {}
1129
1130
  //#endregion
1130
- //#region src/ops/storyLifecycle.d.ts
1131
- declare const sectionPropertiesAt: (document: Document, sectionIndex: number) => SectionProperties | undefined;
1132
- //#endregion
1133
- //#region src/ops/stories.d.ts
1134
- declare const sameStory: (left: OpStory, right: OpStory) => boolean;
1135
- declare const findStoryBody: (document: Document, story: OpStory) => DocumentBody | undefined;
1136
- declare const storyBody: (document: Document, story: OpStory) => DocumentBody;
1137
- declare const documentStories: (document: Document) => OpStory[];
1138
- //#endregion
1139
- //#region src/ops/blocks.d.ts
1140
- /**
1141
- * A body holding other blocks, its section view derived from them. A view
1142
- * that does not line up with the blocks (a different section count) is left
1143
- * for {@link sectionsInStep} to report.
1144
- */
1145
- declare const withBodyContent: (body: DocumentBody, content: BlockContent[]) => DocumentBody;
1146
- //#endregion
1147
- //#region src/ops/wire.d.ts
1148
- /** Capture own undefined fields before an operation enters its JSON journal. */
1149
- declare const captureDocumentOp: (op: DocumentOp) => DocumentOp;
1150
- //#endregion
1151
1131
  //#region src/ops/leaves.d.ts
1152
1132
  /** A place between two leaves. */
1153
1133
  type Gap = {
@@ -1156,22 +1136,276 @@ type Gap = {
1156
1136
  };
1157
1137
  /** A node of a paragraph's content tree: a paragraph child or a run child. */
1158
1138
  type InlineNode = ParagraphContent | RunContent;
1139
+ /** Comment anchors are preserved by planned deletion and cannot be wrapped. */
1140
+ declare const COMMENT_ANCHOR_TYPES: {
1141
+ readonly commentRangeStart: true;
1142
+ readonly commentRangeEnd: true;
1143
+ readonly commentReference: true;
1144
+ };
1145
+ type CommentAnchorCarrier = Extract<InlineNode, {
1146
+ type: keyof typeof COMMENT_ANCHOR_TYPES;
1147
+ }>;
1148
+ /** Whether a leaf carries an anchor rather than content covered by its range. */
1149
+ export declare const isCommentAnchorCarrierType: (type: string) => boolean;
1159
1150
  /** The zero-width leaves at an offset, in document order. */
1160
- declare const zeroWidthLeavesAt: (items: readonly InlineNode[], offset: number) => InlineNode[];
1151
+ export declare const zeroWidthLeavesAt: (items: readonly InlineNode[], offset: number) => InlineNode[];
1161
1152
  /**
1162
1153
  * The gap an insertion defaults to: before the first zero-width leaf at the
1163
1154
  * offset that opens a range, so a marker opening there stays with what
1164
1155
  * follows it and every other one with what precedes it.
1165
1156
  */
1166
- declare const defaultInsertionGap: (items: readonly InlineNode[], offset: number) => Gap;
1157
+ export declare const defaultInsertionGap: (items: readonly InlineNode[], offset: number) => Gap;
1167
1158
  /** Source leaf coordinates without the ancestry needed by edit planning. */
1168
- declare const inlineLeafSpans: (items: readonly InlineNode[]) => {
1159
+ export declare const inlineLeafSpans: (items: readonly InlineNode[]) => {
1169
1160
  node: InlineNode;
1170
1161
  before: Gap;
1171
1162
  after: Gap;
1172
1163
  }[];
1173
1164
  /** Gaps in document order: by offset, then by the zero-width leaves before them. */
1174
- declare const compareGaps: (left: Gap, right: Gap) => number;
1165
+ export declare const compareGaps: (left: Gap, right: Gap) => number;
1166
+ //#endregion
1167
+ //#region src/ops/comments.d.ts
1168
+ type CommentExhaustionInput = {
1169
+ type: "document";
1170
+ document: Document;
1171
+ id: number;
1172
+ } | {
1173
+ type: "coverage";
1174
+ anchorKind: Comment["anchorKind"];
1175
+ survivingNonCarrierContent: boolean;
1176
+ };
1177
+ /** Whether a statically ranged comment currently covers no document content. */
1178
+ export declare const isCommentExhausted: (input: CommentExhaustionInput) => boolean;
1179
+ /** Comment definitions whose root remains covered or projected, with replies. */
1180
+ export declare const survivingComments: (document: Document, projectedRootIds?: ReadonlySet<number>) => Comment[];
1181
+ /** Remove each supplied root and its recursive replies, preserving input order. */
1182
+ export declare const withoutCommentThreads: (comments: readonly Comment[], removedRootIds: ReadonlySet<number>) => Comment[];
1183
+ /**
1184
+ * Shared loaded-comment activation contract; legacy parentId revision associations stay explicit.
1185
+ * `allowedOrphans` names unanchored root comments the caller accepts ("all" for a loaded package).
1186
+ */
1187
+ export declare const commentDocumentIssue: (document: Document, allowedOrphans?: ReadonlySet<number> | "all") => string | undefined;
1188
+ /** Allocate from the package's annotation domains without a hidden mutable counter. */
1189
+ export declare const freshCommentId: (document: Document) => Result<number, DocumentOpRefusal>;
1190
+ /** Reconcile modeled comment and numbering parts with their document relationships. */
1191
+ export declare const reconcileDocumentPartRelationships: (document: Document) => Document;
1192
+ //#endregion
1193
+ //#region src/ops/copyOriginAncestors.d.ts
1194
+ type CopyOriginAncestorList = NonNullable<BookmarkEnd["copyOriginAncestors"]>;
1195
+ export declare const isCopyOriginAncestors: (value: unknown) => value is CopyOriginAncestorList;
1196
+ export declare const shiftCopyOriginAncestors: (origins: CopyOriginAncestorList | undefined, insertedOrdinal: number) => CopyOriginAncestorList | undefined;
1197
+ export declare const addCopyOriginAncestor: (origins: CopyOriginAncestorList | undefined, addedOrdinal: number) => CopyOriginAncestorList | undefined;
1198
+ export declare const acceptCopyOriginAncestors: (origins: CopyOriginAncestorList | undefined, acceptedOrdinal: number) => CopyOriginAncestorList | undefined;
1199
+ type RejectedCopyOriginAncestors = {
1200
+ type: "drop";
1201
+ } | {
1202
+ type: "retain";
1203
+ copyOriginAncestors?: CopyOriginAncestorList;
1204
+ };
1205
+ export declare const rejectCopyOriginAncestors: (origins: CopyOriginAncestorList | undefined, removedAddedAncestors: number) => RejectedCopyOriginAncestors;
1206
+ //#endregion
1207
+ //#region src/ops/noteMarks.d.ts
1208
+ export declare const noteUsesCustomMark: (document: Document, note: Footnote | Endnote) => boolean;
1209
+ //#endregion
1210
+ //#region src/ops/storyLifecycle.d.ts
1211
+ export declare const sectionPropertiesAt: (document: Document, sectionIndex: number) => SectionProperties | undefined;
1212
+ //#endregion
1213
+ //#region src/ops/stories.d.ts
1214
+ export declare const sameStory: (left: OpStory, right: OpStory) => boolean;
1215
+ export declare const findStoryBody: (document: Document, story: OpStory) => DocumentBody | undefined;
1216
+ export declare const storyBody: (document: Document, story: OpStory) => DocumentBody;
1217
+ export declare const documentStories: (document: Document) => OpStory[];
1218
+ //#endregion
1219
+ //#region src/ops/blocks.d.ts
1220
+ /**
1221
+ * A body holding other blocks, its section view derived from them. A view
1222
+ * that does not line up with the blocks (a different section count) is left
1223
+ * for {@link sectionsInStep} to report.
1224
+ */
1225
+ export declare const withBodyContent: (body: DocumentBody, content: BlockContent[]) => DocumentBody;
1226
+ //#endregion
1227
+ //#region src/ops/offsets.d.ts
1228
+ /**
1229
+ * The zero-width items a paragraph can hold, and whether each is content its
1230
+ * mark must not take away. None is. A range boundary is a position, not
1231
+ * content: a paragraph that goes leaves it where the paragraph was
1232
+ * (`paragraphRemains` in `rangeBoundaries.ts`), so it keeps no blank
1233
+ * paragraph standing. A comment reference remains one logical offset unit,
1234
+ * but moves as an anchor when its paragraph goes. A cached page break and a
1235
+ * note's own marker mark nothing a reader placed.
1236
+ */
1237
+ declare const ZERO_WIDTH_ITEMS_HOLD_CONTENT: {
1238
+ readonly commentReference: false;
1239
+ readonly bookmarkStart: false;
1240
+ readonly bookmarkEnd: false;
1241
+ readonly commentRangeStart: false;
1242
+ readonly commentRangeEnd: false;
1243
+ readonly moveFromRangeStart: false;
1244
+ readonly moveFromRangeEnd: false;
1245
+ readonly moveToRangeStart: false;
1246
+ readonly moveToRangeEnd: false;
1247
+ readonly renderedPageBreak: false;
1248
+ readonly noteMarker: false;
1249
+ };
1250
+ /** A zero-width item the paragraph-content rule classifies. */
1251
+ type ZeroWidthItem = keyof typeof ZERO_WIDTH_ITEMS_HOLD_CONTENT;
1252
+ declare const paragraphContentBrand: unique symbol;
1253
+ /**
1254
+ * Whether a paragraph holds content its mark must not take away. Only
1255
+ * {@link paragraphContentVerdict} makes one, so every paragraph-mark outcome,
1256
+ * in the engine and in the editor, is decided by the same rule.
1257
+ */
1258
+ type ParagraphContentVerdict = boolean & {
1259
+ readonly [paragraphContentBrand]: true;
1260
+ };
1261
+ /** The one paragraph-content rule: any width, or a zero-width item that is content. */
1262
+ export declare const paragraphContentVerdict: ({ width, zeroWidthItems }: {
1263
+ width: number;
1264
+ zeroWidthItems: Iterable<ZeroWidthItem>;
1265
+ }) => ParagraphContentVerdict;
1266
+ /** The number of logical units in a paragraph: its largest valid offset. */
1267
+ export declare const paragraphLength: (paragraph: Paragraph) => number;
1268
+ /** The character a unit that is not run text stands for in {@link paragraphLogicalText}. */
1269
+ export declare const OBJECT_REPLACEMENT_CHARACTER = "";
1270
+ /**
1271
+ * The paragraph's offset space as a string: run text as it stands and
1272
+ * {@link OBJECT_REPLACEMENT_CHARACTER} for every other unit, so index `i` of
1273
+ * the string is unit `i` of the paragraph.
1274
+ */
1275
+ export declare const paragraphLogicalText: (paragraph: Paragraph) => string;
1276
+ //#endregion
1277
+ //#region src/ops/blockDeletion.d.ts
1278
+ /** The single structural outcome of resolving a paragraph mark. */
1279
+ export declare const paragraphMarkOutcome: ({ follows, holdsContent, markWasAdded, containerStillEndsWithParagraph, followingTableCanReceiveRunIn, needsFollowingCommentHost, tableRemovalIsTrackable, removedSectionProperties, precedingSectionOwner, followingHasSectionProperties }: {
1280
+ follows: "paragraph" | "table" | "nothing";
1281
+ /** From {@link paragraphHoldsContent} or the editor's view of the same rule, never re-derived. */
1282
+ holdsContent: ParagraphContentVerdict;
1283
+ markWasAdded: boolean;
1284
+ /**
1285
+ * Read only when nothing follows: whether the block BEFORE this paragraph,
1286
+ * which becomes the container's last block once this one is removed, is a
1287
+ * paragraph. Never the container's current last child, which is this one.
1288
+ */
1289
+ containerStillEndsWithParagraph: boolean;
1290
+ followingTableCanReceiveRunIn: boolean;
1291
+ needsFollowingCommentHost?: boolean;
1292
+ tableRemovalIsTrackable?: boolean;
1293
+ removedSectionProperties?: boolean;
1294
+ precedingSectionOwner?: "unavailable" | "available" | "same" | "occupied";
1295
+ followingHasSectionProperties?: boolean;
1296
+ }) => ({
1297
+ kind: "join";
1298
+ } & SectionTransfer) | ({
1299
+ kind: "remove";
1300
+ } & SectionTransfer) | ({
1301
+ kind: "run-in";
1302
+ } & SectionTransfer) | ({
1303
+ kind: "keep";
1304
+ } & SectionTransfer) | ({
1305
+ kind: "refuse";
1306
+ reason: "untrackable";
1307
+ } & SectionTransfer);
1308
+ type SectionTransfer = {
1309
+ sectionDestination: "none" | "preceding" | "following";
1310
+ };
1311
+ //#endregion
1312
+ //#region src/ops/rangeBoundaries.d.ts
1313
+ declare const BOUNDARY_SIDES: {
1314
+ readonly bookmarkStart: {
1315
+ readonly family: "bookmark";
1316
+ readonly side: "start";
1317
+ };
1318
+ readonly bookmarkEnd: {
1319
+ readonly family: "bookmark";
1320
+ readonly side: "end";
1321
+ };
1322
+ readonly commentRangeStart: {
1323
+ readonly family: "comment";
1324
+ readonly side: "start";
1325
+ };
1326
+ readonly commentRangeEnd: {
1327
+ readonly family: "comment";
1328
+ readonly side: "end";
1329
+ };
1330
+ readonly moveFromRangeStart: {
1331
+ readonly family: "moveFrom";
1332
+ readonly side: "start";
1333
+ };
1334
+ readonly moveFromRangeEnd: {
1335
+ readonly family: "moveFrom";
1336
+ readonly side: "end";
1337
+ };
1338
+ readonly moveToRangeStart: {
1339
+ readonly family: "moveTo";
1340
+ readonly side: "start";
1341
+ };
1342
+ readonly moveToRangeEnd: {
1343
+ readonly family: "moveTo";
1344
+ readonly side: "end";
1345
+ };
1346
+ };
1347
+ type BoundaryType = keyof typeof BOUNDARY_SIDES;
1348
+ type Boundary = Extract<InlineNode, {
1349
+ type: BoundaryType;
1350
+ }>;
1351
+ type CommentAnchor$1 = CommentAnchorCarrier;
1352
+ /** A boundary a block list holds between its blocks. */
1353
+ type BlockBoundary = Exclude<Boundary, CommentAnchor$1>;
1354
+ /**
1355
+ * What a paragraph that goes whole leaves where it was: every bookmark and
1356
+ * move range boundary it holds, at any depth, as blocks in its place, and its
1357
+ * comment anchors for the nearest paragraph that stays to take. When a
1358
+ * comment needs that host, every carrier travels there together in source
1359
+ * order. A comment with both anchors there becomes a point there, so the
1360
+ * comment and its anchor survive the paragraph.
1361
+ */
1362
+ export declare const paragraphRemains: (content: readonly InlineNode[]) => {
1363
+ all: (Boundary | CommentAnchor$1)[];
1364
+ blocks: BlockBoundary[];
1365
+ comments: CommentAnchor$1[];
1366
+ placement: "blocks" | "previous";
1367
+ };
1368
+ /** One range boundary in document order, as {@link planWellFormedRanges} reads it. */
1369
+ type BoundaryOccurrence = {
1370
+ /** The marker's element and id: what two copies of one boundary share. */
1371
+ boundary: string;
1372
+ /** The range it belongs to: its family and id. */
1373
+ range: string;
1374
+ side: "start" | "end";
1375
+ /** Whether a rejection kept it from removed content. */
1376
+ kept: boolean;
1377
+ /**
1378
+ * The date of the revision a kept boundary came from. Of a kept start and
1379
+ * end out of order, the one kept from the later revision moves: that edit
1380
+ * put it out of order, and the earlier one stays where it was.
1381
+ */
1382
+ keptFrom?: string;
1383
+ };
1384
+ /** What makes kept boundaries' ranges well-formed, by index into the occurrences. */
1385
+ type WellFormedRangePlan = {
1386
+ dropped: number[];
1387
+ /** Each kept boundary that moves to just before or after the other end of its range. */
1388
+ moved: {
1389
+ moving: number;
1390
+ anchor: number;
1391
+ side: "before" | "after";
1392
+ }[];
1393
+ };
1394
+ /**
1395
+ * The one rule that makes every range a rejection kept boundaries of
1396
+ * well-formed, for the engine's model and the editor's document alike. A
1397
+ * kept copy of a boundary the story still holds is no boundary of its own and
1398
+ * goes (of several kept copies, the first stays); then, where such a range's
1399
+ * end comes before its start, the half the rejection kept closes on the
1400
+ * other: a kept end moves to just after the start, or else a kept start to
1401
+ * just before the end. A boundary that was standing never moves, and a range
1402
+ * still with more than one start or end is left as it is.
1403
+ */
1404
+ export declare const planWellFormedRanges: (occurrences: readonly BoundaryOccurrence[]) => WellFormedRangePlan;
1405
+ //#endregion
1406
+ //#region src/ops/wire.d.ts
1407
+ /** Capture own undefined fields before an operation enters its JSON journal. */
1408
+ export declare const captureDocumentOp: (op: DocumentOp) => DocumentOp;
1175
1409
  //#endregion
1176
1410
  //#region src/ops/hyperlinkIntent.d.ts
1177
1411
  type HyperlinkEditorIntent = {
@@ -1289,7 +1523,7 @@ type CompiledEditorIntent = {
1289
1523
  /** A split's paragraph identity is allocated with its other fresh identities. */
1290
1524
  type EditorIntentAllocation = EditorIntent | SplitParagraphIntent;
1291
1525
  /** Cache only immutable document versions; never retain a retired version strongly. */
1292
- declare const createEditorIntentIdAllocator: () => (document: Document, intent: EditorIntentAllocation) => {
1526
+ export declare const createEditorIntentIdAllocator: () => (document: Document, intent: EditorIntentAllocation) => {
1293
1527
  revisionId: number;
1294
1528
  newBlockId: string;
1295
1529
  newIds: {
@@ -1298,25 +1532,25 @@ declare const createEditorIntentIdAllocator: () => (document: Document, intent:
1298
1532
  };
1299
1533
  };
1300
1534
  /** Accepted-view text without changing the canonical paragraph or its offset space. */
1301
- declare const paragraphVisibleText: (paragraph: Paragraph) => string;
1535
+ export declare const paragraphVisibleText: (paragraph: Paragraph) => string;
1302
1536
  /**
1303
1537
  * Right-affine translation: a visible gap follows retained deleted content at
1304
1538
  * that gap, so a new insertion never lands inside a deletion wrapper.
1305
1539
  * Invalid offsets remain invalid for the operation boundary to diagnose.
1306
1540
  */
1307
- declare const physicalOffsetAtVisibleOffset: (paragraph: Paragraph, offset: number) => number;
1541
+ export declare const physicalOffsetAtVisibleOffset: (paragraph: Paragraph, offset: number) => number;
1308
1542
  /** Deleted paragraph marks concatenate physical paragraphs in the editing view. */
1309
- declare const editorParagraphGroups: (document: Document, story: OpStory) => {
1543
+ export declare const editorParagraphGroups: (document: Document, story: OpStory) => {
1310
1544
  blockId: string;
1311
1545
  paragraphs: Paragraph[];
1312
1546
  text: string;
1313
1547
  }[];
1314
1548
  /** One logical paragraph and visible offset for a physical canonical address. */
1315
- declare const editorPositionAtPhysicalPosition: (document: Document, at: TextPosition) => TextPosition;
1549
+ export declare const editorPositionAtPhysicalPosition: (document: Document, at: TextPosition) => TextPosition;
1316
1550
  /** Translate an editing-view paragraph gap to its physical canonical address. */
1317
- declare const physicalPositionAtEditorOffset: (document: Document, at: TextPosition) => TextPosition;
1551
+ export declare const physicalPositionAtEditorOffset: (document: Document, at: TextPosition) => TextPosition;
1318
1552
  /** Compile one batch; the caller applies it atomically and journals its exact inverse. */
1319
- declare const compileEditorIntent: (document: Document, { intent, mode, firstBlockId }: CompileEditorIntentOptions) => Result<CompiledEditorIntent, DocumentOpRefusal>;
1553
+ export declare const compileEditorIntent: (document: Document, { intent, mode, firstBlockId }: CompileEditorIntentOptions) => Result<CompiledEditorIntent, DocumentOpRefusal>;
1320
1554
  //#endregion
1321
1555
  //#region src/ops/tocIntent.d.ts
1322
1556
  type TocHeading = {
@@ -1335,7 +1569,7 @@ type GenerateTOCIntent = {
1335
1569
  tabPosition: number;
1336
1570
  };
1337
1571
  /** Map original endpoints through the bookmark wrappers emitted by TOC compilation. */
1338
- declare const mapTocBookmarkPosition: (position: TextPosition, ops: readonly DocumentOp[]) => TextPosition;
1572
+ export declare const mapTocBookmarkPosition: (position: TextPosition, ops: readonly DocumentOp[]) => TextPosition;
1339
1573
  //#endregion
1340
1574
  //#region src/ops/packageResources.d.ts
1341
1575
  type PackageResourcesOpOptions = {
@@ -1343,7 +1577,7 @@ type PackageResourcesOpOptions = {
1343
1577
  after: Document;
1344
1578
  };
1345
1579
  /** Describe the package resource difference as one operation carrying only changed entries. */
1346
- declare const packageResourcesOpOf: ({ before, after }: PackageResourcesOpOptions) => SetPackageResourcesOp;
1580
+ export declare const packageResourcesOpOf: ({ before, after }: PackageResourcesOpOptions) => SetPackageResourcesOp;
1347
1581
  //#endregion
1348
1582
  //#region src/ops/paragraphPropertySnapshot.d.ts
1349
1583
  type RegisterParagraphPropertySnapshotOptions = {
@@ -1351,7 +1585,7 @@ type RegisterParagraphPropertySnapshotOptions = {
1351
1585
  snapshot: ParagraphFormatting | undefined;
1352
1586
  };
1353
1587
  /** Bind effective formatting to the authored properties a review must record. */
1354
- declare const registerParagraphPropertySnapshot: ({ paragraph, snapshot }: RegisterParagraphPropertySnapshotOptions) => void;
1588
+ export declare const registerParagraphPropertySnapshot: ({ paragraph, snapshot }: RegisterParagraphPropertySnapshotOptions) => void;
1355
1589
  //#endregion
1356
1590
  //#region src/ops/apply.d.ts
1357
1591
  /** A document an operation produced, the operations that undo it, and what it changed. */
@@ -1368,9 +1602,9 @@ type AppliedDocumentOp = {
1368
1602
  revisions: readonly number[];
1369
1603
  };
1370
1604
  /** Apply one operation to a document that meets the seed contract. */
1371
- declare const applyDocumentOp: (document: Document, input: DocumentOp) => Result<AppliedDocumentOp, DocumentOpRefusal>;
1605
+ export declare const applyDocumentOp: (document: Document, input: DocumentOp) => Result<AppliedDocumentOp, DocumentOpRefusal>;
1372
1606
  /** Apply a journal envelope only when its schema matches this reader. */
1373
- declare const applyDocumentOpEnvelope: (document: Document, envelope: {
1607
+ export declare const applyDocumentOpEnvelope: (document: Document, envelope: {
1374
1608
  schema: number;
1375
1609
  op: DocumentOp;
1376
1610
  }) => Result<AppliedDocumentOp, DocumentOpRefusal>;
@@ -1379,7 +1613,7 @@ declare const applyDocumentOpEnvelope: (document: Document, envelope: {
1379
1613
  * the document is unchanged. The inverse undoes the whole list, and
1380
1614
  * `revisions` lists each operation's in turn.
1381
1615
  */
1382
- declare const applyDocumentOps: (document: Document, ops: readonly DocumentOp[]) => Result<AppliedDocumentOp, DocumentOpRefusal>;
1616
+ export declare const applyDocumentOps: (document: Document, ops: readonly DocumentOp[]) => Result<AppliedDocumentOp, DocumentOpRefusal>;
1383
1617
  //#endregion
1384
1618
  //#region src/ops/runMerge.d.ts
1385
1619
  /**
@@ -1397,12 +1631,12 @@ type ComparedTextFormatting = ExhaustiveFields<TextFormatting, ComparedTextForma
1397
1631
  * Uses deep comparison of all properties to determine if runs
1398
1632
  * can be merged without losing formatting information.
1399
1633
  */
1400
- declare function formattingEquals(a: ComparedTextFormatting | undefined, b: ComparedTextFormatting | undefined): boolean;
1634
+ export declare function formattingEquals(a: ComparedTextFormatting | undefined, b: ComparedTextFormatting | undefined): boolean;
1401
1635
  /**
1402
1636
  * Check if a run contains only text content
1403
1637
  * (runs with special content like images, fields, etc. should not be merged)
1404
1638
  */
1405
- declare function isTextOnlyRun(run: Run): boolean;
1639
+ export declare function isTextOnlyRun(run: Run): boolean;
1406
1640
  /**
1407
1641
  * Every `Run` field, named by what a merge does with it.
1408
1642
  *
@@ -1433,59 +1667,49 @@ type MergeDecidedRun = ExhaustiveFields<Run, MergeDecidedRunField>;
1433
1667
  * of them discards the loser's copy, which is how both runs' `w:rsid*` used to
1434
1668
  * vanish at parse time — before the editor, before any gate could see it.
1435
1669
  */
1436
- declare function runsMergeable(a: MergeDecidedRun, b: MergeDecidedRun): boolean;
1670
+ export declare function runsMergeable(a: MergeDecidedRun, b: MergeDecidedRun): boolean;
1437
1671
  /**
1438
1672
  * Merge the content of two runs into a single content array
1439
1673
  */
1440
- declare function mergeRunContent(content1: RunContent[], content2: RunContent[]): RunContent[];
1674
+ export declare function mergeRunContent(content1: RunContent[], content2: RunContent[]): RunContent[];
1441
1675
  //#endregion
1442
1676
  //#region src/ops/contract.d.ts
1443
1677
  declare const DocumentOpsContractError_base: import("better-result").TaggedErrorClass<"DocumentOpsContractError">;
1444
1678
  /** A document that does not meet the seed contract. */
1445
- declare class DocumentOpsContractError extends DocumentOpsContractError_base<{
1679
+ export declare class DocumentOpsContractError extends DocumentOpsContractError_base<{
1446
1680
  message: string;
1447
1681
  reason: DocumentOpRefusalReason;
1448
1682
  }> {}
1449
1683
  /** Check a document against the seed contract. */
1450
- declare const validateOpsDocument: (document: Document) => Result<Document, DocumentOpsContractError>;
1684
+ export declare const validateOpsDocument: (document: Document) => Result<Document, DocumentOpsContractError>;
1451
1685
  /**
1452
1686
  * The document with every empty run and empty text node of each editable story
1453
1687
  * removed, and its section view derived again. Nothing else changes.
1454
1688
  */
1455
- declare const normalizeForOps: (document: Document) => Document;
1456
- //#endregion
1457
- //#region src/ops/offsets.d.ts
1458
- /** The number of logical units in a paragraph: its largest valid offset. */
1459
- declare const paragraphLength: (paragraph: Paragraph) => number;
1460
- /** The character a unit that is not run text stands for in {@link paragraphLogicalText}. */
1461
- declare const OBJECT_REPLACEMENT_CHARACTER = "";
1462
- /**
1463
- * The paragraph's offset space as a string: run text as it stands and
1464
- * {@link OBJECT_REPLACEMENT_CHARACTER} for every other unit, so index `i` of
1465
- * the string is unit `i` of the paragraph.
1466
- */
1467
- declare const paragraphLogicalText: (paragraph: Paragraph) => string;
1689
+ export declare const normalizeForOps: (document: Document) => Document;
1468
1690
  //#endregion
1469
1691
  //#region src/ops/ids.d.ts
1692
+ /** Every `paraId` of every paragraph in a value, nested ones included, in document order. */
1693
+ export declare const paragraphIdsIn: (value: unknown) => string[];
1470
1694
  /** Every paragraph id of a package, each story walked once. */
1471
- declare const packageParagraphIds: (pkg: DocxPackage) => string[];
1695
+ export declare const packageParagraphIds: (pkg: DocxPackage) => string[];
1472
1696
  /**
1473
1697
  * The key two spellings of one id share. `ST_LongHexNumber` is hex, so
1474
1698
  * `0000abcd` and `0000ABCD` are the same id; every lookup and comparison of
1475
1699
  * paragraph ids goes through this.
1476
1700
  */
1477
- declare const idKey: (id: string) => string;
1701
+ export declare const idKey: (id: string) => string;
1478
1702
  //#endregion
1479
1703
  //#region src/ops/plan.d.ts
1480
1704
  /** Package-aware explicit pools for every semantic comment anchor cut, including replies. */
1481
- declare const allocateCommentAnchorIds: (document: Document, op: CreateCommentOp) => Result<NewIds, DocumentOpRefusal>;
1705
+ export declare const allocateCommentAnchorIds: (document: Document, op: CreateCommentOp) => Result<NewIds, DocumentOpRefusal>;
1482
1706
  /**
1483
1707
  * How many `newIds.revision` entries an operation takes on a document,
1484
1708
  * besides its stamp's id: the length of the shortest list of unused ids it
1485
1709
  * applies with. Content-control ids are supplied freely while counting. The
1486
1710
  * refusal is the one the operation meets whatever ids it is given.
1487
1711
  */
1488
- declare const revisionIdDemand: (document: Document, op: DocumentOp) => Result<number, DocumentOpRefusal>;
1712
+ export declare const revisionIdDemand: (document: Document, op: DocumentOp) => Result<number, DocumentOpRefusal>;
1489
1713
  /** The range a tracked deletion covers, its stamp, and the ids its later pieces take. */
1490
1714
  type PlanTrackedDeletionOptions = {
1491
1715
  from: TextPosition;
@@ -1500,7 +1724,7 @@ type PlanTrackedDeletionOptions = {
1500
1724
  * Inline ranges run in reverse order, then joins run from last to first.
1501
1725
  * All physical revision ids come from one pool for the complete batch.
1502
1726
  */
1503
- declare const planTrackedDeletion: (document: Document, options: PlanTrackedDeletionOptions) => Result<DocumentOp[], DocumentOpRefusal>;
1727
+ export declare const planTrackedDeletion: (document: Document, options: PlanTrackedDeletionOptions) => Result<DocumentOp[], DocumentOpRefusal>;
1504
1728
  //#endregion
1505
1729
  //#region src/ops/rangeReplacement.d.ts
1506
1730
  /**
@@ -1527,7 +1751,7 @@ type PlanTrackedReplaceOptions = PlanTrackedDeletionOptions & {
1527
1751
  * deletion followed by the replacement fragment as tracked insertions.
1528
1752
  * All physical revision ids come from one pool for the complete batch.
1529
1753
  */
1530
- declare const planTrackedReplace: (document: Document, options: PlanTrackedReplaceOptions) => Result<DocumentOp[], DocumentOpRefusal>;
1754
+ export declare const planTrackedReplace: (document: Document, options: PlanTrackedReplaceOptions) => Result<DocumentOp[], DocumentOpRefusal>;
1531
1755
  //#endregion
1532
1756
  //#region src/ops/sequencing/envelope.d.ts
1533
1757
  /** A batch applies atomically, in array order, against its stated revision. */
@@ -1559,7 +1783,7 @@ type SequencedBatch = DocumentBatch & {
1559
1783
  revision: number;
1560
1784
  effects?: readonly SequencedOpEffect[];
1561
1785
  };
1562
- declare const BATCH_REJECTION_REASONS: {
1786
+ export declare const BATCH_REJECTION_REASONS: {
1563
1787
  readonly INVALID_BATCH: "invalidBatch";
1564
1788
  readonly UNSUPPORTED_SCHEMA: "unsupportedSchema";
1565
1789
  readonly UNSUPPORTED_PAIR: "unsupportedPair";
@@ -1570,29 +1794,29 @@ declare const BATCH_REJECTION_REASONS: {
1570
1794
  };
1571
1795
  type BatchRejectionReason = (typeof BATCH_REJECTION_REASONS)[keyof typeof BATCH_REJECTION_REASONS];
1572
1796
  declare const BatchRejection_base: import("better-result").TaggedErrorClass<"BatchRejection">;
1573
- declare class BatchRejection extends BatchRejection_base<{
1797
+ export declare class BatchRejection extends BatchRejection_base<{
1574
1798
  message: string;
1575
1799
  reason: BatchRejectionReason;
1576
1800
  opId?: string;
1577
1801
  opType?: DocumentOpType;
1578
1802
  overType?: DocumentOpType;
1579
1803
  }> {}
1580
- declare const BATCH_WIRE_OP_TYPES: readonly string[];
1804
+ export declare const BATCH_WIRE_OP_TYPES: readonly string[];
1581
1805
  /** Bound recursion and refuse values except JSON data and absent object fields. */
1582
- declare const MAX_BATCH_WIRE_BYTES: number;
1806
+ export declare const MAX_BATCH_WIRE_BYTES: number;
1583
1807
  /** Decode a JSON-shaped batch, refusing unsupported payloads before apply. */
1584
- declare const validateDocumentBatch: (value: unknown) => Result<DocumentBatch, BatchRejection>;
1808
+ export declare const validateDocumentBatch: (value: unknown) => Result<DocumentBatch, BatchRejection>;
1585
1809
  /** Validate an assigned revision and any document-dependent effect metadata. */
1586
- declare const validateSequencedBatch: (value: unknown) => Result<SequencedBatch, BatchRejection>;
1810
+ export declare const validateSequencedBatch: (value: unknown) => Result<SequencedBatch, BatchRejection>;
1587
1811
  /** Parse the wire representation without propagating parser exceptions. */
1588
- declare const parseDocumentBatch: (json: string) => Result<DocumentBatch, BatchRejection>;
1812
+ export declare const parseDocumentBatch: (json: string) => Result<DocumentBatch, BatchRejection>;
1589
1813
  //#endregion
1590
1814
  //#region src/ops/sequencing/transform.d.ts
1591
1815
  type TransformOptions = {
1592
1816
  order?: "before" | "after";
1593
1817
  };
1594
1818
  /** Rebase an atomic batch over an ordered journal tail. */
1595
- declare const transformBatch: (batch: DocumentBatch, over: readonly SequencedBatch[], options?: TransformOptions) => Result<DocumentBatch, BatchRejection>;
1819
+ export declare const transformBatch: (batch: DocumentBatch, over: readonly SequencedBatch[], options?: TransformOptions) => Result<DocumentBatch, BatchRejection>;
1596
1820
  //#endregion
1597
1821
  //#region src/ops/sequencing/sequencer.d.ts
1598
1822
  type BatchAck = {
@@ -1608,7 +1832,7 @@ type BatchReject = {
1608
1832
  };
1609
1833
  type BatchSubmission = BatchAck | BatchReject;
1610
1834
  /** Deterministic append-only authority; the caller supplies delivery and storage. */
1611
- declare const createSequencer: (document: Document) => {
1835
+ export declare const createSequencer: (document: Document) => {
1612
1836
  submit: (batch: DocumentBatch) => BatchSubmission;
1613
1837
  readonly document: Document;
1614
1838
  readonly headRev: number;
@@ -1622,7 +1846,7 @@ type ClientNotice = {
1622
1846
  ops: readonly DocumentOp[];
1623
1847
  };
1624
1848
  /** Optimistic state with ordered authoritative replay and one causal submission in flight. */
1625
- declare const createClient: (document: Document) => {
1849
+ export declare const createClient: (document: Document) => {
1626
1850
  enqueue: (batch: DocumentBatch) => Result<DocumentBatch, BatchRejection>;
1627
1851
  nextSubmission: () => DocumentBatch | undefined;
1628
1852
  receiveAck: (ack: BatchAck) => void;
@@ -1634,13 +1858,64 @@ declare const createClient: (document: Document) => {
1634
1858
  readonly notices: readonly ClientNotice[];
1635
1859
  };
1636
1860
  //#endregion
1637
- //#region src/ops/comments.d.ts
1861
+ //#region src/ops/batchOrder.d.ts
1638
1862
  /**
1639
- * Shared loaded-comment activation contract; legacy parentId revision associations stay explicit.
1640
- * `allowedOrphans` names unanchored root comments the caller accepts ("all" for a loaded package).
1863
+ * The execution coordinates of an operation resolved against a batch's
1864
+ * pre-state. Positions and table coordinates are ordered from right to left;
1865
+ * equal content coordinates use an explicit rank, then reverse input order.
1866
+ * Annotations run before moving edits, while table-shape and column edits run
1867
+ * after ordinary content edits. Table mutations in nested tables still run
1868
+ * right to left before the phase order is applied within the same table.
1641
1869
  */
1642
- declare const commentDocumentIssue: (document: Document, allowedOrphans?: ReadonlySet<number> | "all") => string | undefined;
1643
- /** Allocate from the package's annotation domains without a hidden mutable counter. */
1644
- declare const freshCommentId: (document: Document) => Result<number, DocumentOpRefusal>;
1870
+ type BatchOrderAddress = {
1871
+ type: "annotation";
1872
+ position: number;
1873
+ inputIndex: number;
1874
+ } | {
1875
+ type: "content";
1876
+ position: number;
1877
+ rank: number;
1878
+ inputIndex: number;
1879
+ } | {
1880
+ type: "cell";
1881
+ tablePosition: number;
1882
+ bottom: number;
1883
+ right: number;
1884
+ inputIndex: number;
1885
+ } | {
1886
+ type: "column";
1887
+ tablePosition: number;
1888
+ columnIndex: number;
1889
+ insertion: boolean;
1890
+ inputIndex: number;
1891
+ };
1892
+ type ContentRankOperation = {
1893
+ type: string;
1894
+ position?: unknown;
1895
+ };
1896
+ /**
1897
+ * Rank content operations at one pre-batch target. A tracked split deletion
1898
+ * must retract the inserted paragraph before a table is placed after it;
1899
+ * ordinary edits stay between those two exceptional operations.
1900
+ */
1901
+ export declare const contentRank: (operation: ContentRankOperation, target: {
1902
+ hasDeletedSplit: boolean;
1903
+ }) => number;
1904
+ /** Compare two pre-batch addresses in the documented batch execution order. */
1905
+ export declare const compareBatchOrder: (left: BatchOrderAddress, right: BatchOrderAddress) => number;
1906
+ /** Order operations once from addresses captured before the batch changes the document. */
1907
+ export declare const orderBatchOperations: <T>(operations: readonly T[], addressOf: (operation: T) => BatchOrderAddress) => T[];
1908
+ /**
1909
+ * Partition an ordered batch into execution runs. Insertions at the same
1910
+ * position share a run; every other operation remains a singleton.
1911
+ *
1912
+ * An operation that `keepsGap` admits (one that writes properties and places
1913
+ * nothing in the gap) does not end a run: an equal-gap insertion after it
1914
+ * still joins the run, which runs before it. Otherwise a property write tied
1915
+ * between two insertions at one gap would split them, and they would inherit
1916
+ * their anchor's properties from different moments while landing in one
1917
+ * requested sequence, which no series of single edits produces.
1918
+ */
1919
+ export declare const groupInsertionRuns: <T>(operations: readonly T[], insertionPositionOf: (operation: T) => number | null, keepsGap?: (operation: T) => boolean) => T[][];
1645
1920
  //#endregion
1646
- export { type AddNoteOp, type AppliedDocumentOp, BATCH_REJECTION_REASONS, BATCH_WIRE_OP_TYPES, BatchRejection, type BatchRejectionReason, type BlockInsertionPoint, type CommentAnchor, type CommentState, type CreateCommentOp, type CreateHeaderFooterOp, type CreateNumberingInstanceOp, DOCUMENT_OP_REFUSAL_REASONS, DOCUMENT_OP_SCHEMA_VERSION, DOCUMENT_OP_TYPES, type DeleteBlocksOp, type DeleteColumnOp, type DeleteCommentOp, type DeleteNumberingInstanceOp, type DeleteRangeOp, type DeleteRowOp, type DeleteTableOp, type DocumentBatch, type DocumentOp, type DocumentOpEnvelope, DocumentOpRefusal, type DocumentOpRefusalReason, type DocumentOpType, DocumentOpsContractError, EMPTY_PROPERTY_SETS, type EditorIntent, type EditorIntentMode, type EmptyPropertySet, type FormattingPatch, type HeaderFooterStory, INHERIT_RUN_PROPS, type InlineSlice, type InsertBlocksOp, type InsertColumnOp, type InsertContentOp, type InsertRowOp, type InsertTableOp, type InsertTextOp, type InsertedRunProps, type JoinBlocksOp, type JoinInlineOp, MAX_BATCH_WIRE_BYTES, type MergeCellsOp, type NewIds, type NoteStory, type NumberingPartState, OBJECT_REPLACEMENT_CHARACTER, OP_STORIES, type OpStory, PARAGRAPH_MARK_FORMATTING_KEYS, PROPERTY_REVIEW_POLICIES, type PackageResourceEntry, type PackageResourceEntryChange, type PackageResourceMapChange, type PackageResourceMedia, type PackageResourcePart, type PackageResources, type ParagraphPropsPatch, type ParagraphReviewFields, type PlanTrackedDeletionOptions, type PlanTrackedReplaceOptions, REVISION_DECISIONS, type RemoveHeaderFooterOp, type RemoveNoteOp, type ReplaceBlocksOp, type ReplaceInlineOp, type ResolveRevisionOp, type RestoreCommentStateOp, type RestoreStoryPartsOp, type RevisionDecision, type RevisionStamp, type RunPropsPatch, SPLIT_HALVES, type SectionEndpoint, type SectionMapState, type SectionPropertiesState, type SectionViewEntry, type SectionViewState, type SequencedBatch, type SetCellPropsOp, type SetCommentResolutionOp, type SetContainerBlocksOp, type SetPackageResourcesOp, type SetParagraphPropsOp, type SetParagraphReviewOp, type SetRowPropsOp, type SetRunPropsOp, type SetSectionEndpointOp, type SetSectionPropsOp, type SetTableGridOp, type SetTableOp, type SetTablePropsOp, type SetTableRowsOp, type SplitBlockOp, type SplitCellOp, type SplitHalf, type SplitInlineOp, type SplitParagraphFields, type TableEditOp, type TableIntentOperation, type TextPosition, type TouchedBlocks, type UpdateCommentContentOp, allocateCommentAnchorIds, applyDocumentOp, applyDocumentOpEnvelope, applyDocumentOps, captureDocumentOp, combineEdits, commentDocumentIssue, compareGaps, compileEditorIntent, createClient, createEditorIntentIdAllocator, createSequencer, defaultInsertionGap, documentStories, editorParagraphGroups, editorPositionAtPhysicalPosition, findStoryBody, formattingEquals, freshCommentId, idKey, inlineLeafSpans, isTextOnlyRun, mapTocBookmarkPosition, mergeRunContent, normalizeForOps, noteUsesCustomMark, packageParagraphIds, packageResourcesOpOf, paragraphLength, paragraphLogicalText, paragraphVisibleText, parseDocumentBatch, physicalOffsetAtVisibleOffset, physicalPositionAtEditorOffset, planTrackedDeletion, planTrackedReplace, registerParagraphPropertySnapshot, revisionIdDemand, runsMergeable, sameStory, sectionPropertiesAt, storyBody, toOpEnvelope, transformBatch, validateDocumentBatch, validateOpsDocument, validateSequencedBatch, withBodyContent, zeroWidthLeavesAt };
1921
+ export type { AddNoteOp, AppliedDocumentOp, BatchOrderAddress, BatchRejectionReason, BlockInsertionPoint, BoundaryOccurrence, CommentAnchor, CommentExhaustionInput, CommentState, CopyOriginAncestorList, CreateCommentOp, CreateHeaderFooterOp, CreateNumberingInstanceOp, DeleteBlocksOp, DeleteColumnOp, DeleteCommentOp, DeleteNumberingInstanceOp, DeleteRangeOp, DeleteRowOp, DeleteTableOp, DocumentBatch, DocumentOp, DocumentOpEnvelope, DocumentOpRefusalReason, DocumentOpType, EditorIntent, EditorIntentMode, EmptyPropertySet, FormattingPatch, HeaderFooterStory, InlineSlice, InsertBlocksOp, InsertColumnOp, InsertContentOp, InsertRowOp, InsertTableOp, InsertTextOp, InsertedRunProps, JoinBlocksOp, JoinInlineOp, MergeCellsOp, NewIds, NoteStory, NumberingPartState, OpStory, PackageResourceEntry, PackageResourceEntryChange, PackageResourceMapChange, PackageResourceMedia, PackageResourcePart, PackageResources, ParagraphContentVerdict, ParagraphPropsPatch, ParagraphReviewFields, PlanTrackedDeletionOptions, PlanTrackedReplaceOptions, RemoveHeaderFooterOp, RemoveNoteOp, ReplaceBlocksOp, ReplaceInlineOp, ResolveRevisionOp, RestoreCommentStateOp, RestoreStoryPartsOp, RevisionDecision, RevisionStamp, RunPropsPatch, SectionEndpoint, SectionMapState, SectionPropertiesState, SectionViewEntry, SectionViewState, SequencedBatch, SetCellPropsOp, SetCommentResolutionOp, SetContainerBlocksOp, SetPackageResourcesOp, SetParagraphPropsOp, SetParagraphReviewOp, SetRowPropsOp, SetRunPropsOp, SetSectionEndpointOp, SetSectionPropsOp, SetTableGridOp, SetTableOp, SetTablePropsOp, SetTableRowsOp, SplitBlockOp, SplitCellOp, SplitHalf, SplitInlineOp, SplitParagraphFields, TableEditOp, TableIntentOperation, TextPosition, TouchedBlocks, UpdateCommentContentOp, WellFormedRangePlan, ZeroWidthItem };