@docx-editor.dev/editor-api 2.32.0 → 2.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/OFFICE_JS_GUIDE.md +1 -1
- package/dist/browser.d.mts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +1 -1
- package/dist/browser.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{server-BB94GFr9.d.mts → server-CDfqcHfQ.d.mts} +52 -24
- package/dist/{server-BB94GFr9.d.ts → server-CDfqcHfQ.d.ts} +52 -24
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutomationHandle, AutomationSpan, AutomationOperation, AutomationValue, AutomationSpanRef, RevisionBatchResult, RevisionAuthorResult, DiagnosticCode, HistoryGroup, AutomationHost, AutomationCapabilities, AutomationPaginationOptions, ByteSizeBucket, DocumentOpenDiagnosticCode, DocumentPartKind, DiagnosticErrorName, EditDiagnosticCode } from '@docx-editor.dev/core/automation';
|
|
1
|
+
import { AutomationHandle, AutomationSpan, AutomationOperation, AutomationValue, AutomationSpanRef, RevisionBatchResult, RevisionAuthorResult, DiagnosticCode, HistoryGroup, AutomationHost, AutomationCapabilities, AutomationPaginationOptions, ByteSizeBucket, DocumentOpenDiagnosticCode, DocumentPartKind, DiagnosticErrorName, EditDiagnosticCode, ReviewDiagnosticCode, ReviewOperation } from '@docx-editor.dev/core/automation';
|
|
2
2
|
import { CollaborationModuleContribution } from '@docx-editor.dev/core/collaboration';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -989,10 +989,11 @@ declare class ClientResult<T> {
|
|
|
989
989
|
* Word's own names for a kind of change.
|
|
990
990
|
*
|
|
991
991
|
* The WHOLE upstream vocabulary, because a declaration says what a caller may be handed and a caller
|
|
992
|
-
* switching on it should not have to be told which subset this engine happens to produce.
|
|
993
|
-
* these
|
|
994
|
-
*
|
|
995
|
-
* from `items`; collection-wide decisions still resolve every
|
|
992
|
+
* switching on it should not have to be told which subset this engine happens to produce. Nine of
|
|
993
|
+
* these occur as published objects: Insert, Delete, Property, MovedFrom, MovedTo, CellInsertion,
|
|
994
|
+
* CellDeletion, CellMerge and ParagraphNumber. A structural card with no single type, such as
|
|
995
|
+
* table grid history, is omitted from `items`; collection-wide decisions still resolve every
|
|
996
|
+
* store-resolvable revision. See
|
|
996
997
|
* `compat/manifest.json`.
|
|
997
998
|
*/
|
|
998
999
|
type RevisionType = 'None' | 'Insert' | 'Delete' | 'Property' | 'ParagraphNumber' | 'DisplayField' | 'Reconcile' | 'Conflict' | 'Style' | 'Replace' | 'ParagraphProperty' | 'TableProperty' | 'SectionProperty' | 'StyleDefinition' | 'MovedFrom' | 'MovedTo' | 'CellInsertion' | 'CellDeletion' | 'CellMerge' | 'CellSplit' | 'ConflictInsert' | 'ConflictDelete';
|
|
@@ -1134,11 +1135,12 @@ declare class CommentCollection extends HandleCollection<Comment> {
|
|
|
1134
1135
|
protected promised(label: string, nullable: boolean): Comment & PromisedItem;
|
|
1135
1136
|
}
|
|
1136
1137
|
/**
|
|
1137
|
-
* One tracked change
|
|
1138
|
+
* One tracked change.
|
|
1138
1139
|
*
|
|
1139
|
-
*
|
|
1140
|
-
*
|
|
1141
|
-
* `type`. That listing is not the collection decision set: see
|
|
1140
|
+
* A row is listed as `Insert` or `Delete`, and a cell or tracked numbering by its own type. A
|
|
1141
|
+
* structural card with no single type, such as table grid history, is omitted rather than
|
|
1142
|
+
* shipped with an unpublishable `type`. That listing is not the collection decision set: see
|
|
1143
|
+
* {@link RevisionCollection}.
|
|
1142
1144
|
*
|
|
1143
1145
|
* @public
|
|
1144
1146
|
*/
|
|
@@ -1159,10 +1161,19 @@ declare class Revision extends ModelObject implements PromisedItem {
|
|
|
1159
1161
|
get date(): Date | null;
|
|
1160
1162
|
/** What kind of change it is, by Word's own name for it. */
|
|
1161
1163
|
get type(): RevisionType;
|
|
1162
|
-
/** The words the change covers. */
|
|
1164
|
+
/** The words the change covers. Each read returns the same proxy, so a load on it is kept. */
|
|
1163
1165
|
get range(): Range;
|
|
1164
1166
|
/**
|
|
1165
|
-
* Keep the change,
|
|
1167
|
+
* Keep the change, in one transaction, with every part of it: both halves of a move or a cell
|
|
1168
|
+
* merge, and the changes inside content it removes, such as another author's insertion in a
|
|
1169
|
+
* deleted row. Rejecting a formatting change restores the earlier properties, so another
|
|
1170
|
+
* author's change inside the replaced properties, such as tracked numbering, goes with it.
|
|
1171
|
+
*
|
|
1172
|
+
* After a sync resolves this change, another call on the same object fails with
|
|
1173
|
+
* `InvalidObjectPath`, because the change is gone. Within one sync, a decision on a change an
|
|
1174
|
+
* earlier decision removed is skipped. Read `debugInfo.innerError.code` on a refusal, such as
|
|
1175
|
+
* `review.retained-structure` for a row that must stay to keep a nested table, or
|
|
1176
|
+
* `review.locked-content` and `review.bound-content` for a change a content control keeps.
|
|
1166
1177
|
*
|
|
1167
1178
|
* In a React or Vue host with the review module, use `useReview().accept` from
|
|
1168
1179
|
* `@docx-editor.dev/pro/react` or `@docx-editor.dev/pro/vue` for a review UI.
|
|
@@ -1171,7 +1182,7 @@ declare class Revision extends ModelObject implements PromisedItem {
|
|
|
1171
1182
|
*/
|
|
1172
1183
|
accept(): void;
|
|
1173
1184
|
/**
|
|
1174
|
-
* Undo the change, likewise in one transaction.
|
|
1185
|
+
* Undo the change, likewise in one transaction and with the same rules as {@link Revision.accept}.
|
|
1175
1186
|
*
|
|
1176
1187
|
* In a React or Vue host with the review module, use `useReview().reject` for a review UI.
|
|
1177
1188
|
*/
|
|
@@ -1202,9 +1213,9 @@ interface RevisionAuthorOptions {
|
|
|
1202
1213
|
/**
|
|
1203
1214
|
* The tracked changes on a document, story or range, as of the batch that loaded them.
|
|
1204
1215
|
*
|
|
1205
|
-
* `items` omits structural
|
|
1216
|
+
* `items` omits a structural card with no single revision type; see {@link Revision}.
|
|
1206
1217
|
* On a story's collection, `acceptAll` / `rejectAll` still resolve every store-resolvable
|
|
1207
|
-
* revision in the story and refuse atomically if any
|
|
1218
|
+
* revision in the story and refuse atomically if any read-only or otherwise unsupported
|
|
1208
1219
|
* revision remains. On {@link Range.revisions} and `getReviewItemRevisions`, they resolve the
|
|
1209
1220
|
* changes the range overlaps or the key names, and `resolve` and `setAuthor` refuse with
|
|
1210
1221
|
* `NotSupported`.
|
|
@@ -1214,7 +1225,7 @@ interface RevisionAuthorOptions {
|
|
|
1214
1225
|
declare class RevisionCollection extends HandleCollection<Revision> {
|
|
1215
1226
|
#private;
|
|
1216
1227
|
/** @internal The pending decisions of one story. */
|
|
1217
|
-
static of(context: RequestContext, label: string, owner: ObjectPath, body: AutomationHandle): RevisionCollection;
|
|
1228
|
+
static of(context: RequestContext, label: string, owner: ObjectPath, body: () => AutomationHandle): RevisionCollection;
|
|
1218
1229
|
/** @internal The pending decisions a range overlaps, read from the range at plan time. */
|
|
1219
1230
|
static inSpan(context: RequestContext, label: string, owner: ObjectPath, span: () => AutomationSpanRef): RevisionCollection;
|
|
1220
1231
|
/** @internal The pending decisions one review-queue key names. */
|
|
@@ -1223,10 +1234,11 @@ declare class RevisionCollection extends HandleCollection<Revision> {
|
|
|
1223
1234
|
/**
|
|
1224
1235
|
* Keep every change in this story, as ONE decision and one undo unit.
|
|
1225
1236
|
*
|
|
1226
|
-
* Resolves every store-resolvable revision in the story, including
|
|
1227
|
-
*
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1237
|
+
* Resolves every store-resolvable revision in the story, including history omitted from
|
|
1238
|
+
* `items`. Refuses the sync outright where any read-only or otherwise unsupported revision
|
|
1239
|
+
* remains, a row must stay to keep a nested table (`review.retained-structure`), or a content
|
|
1240
|
+
* control keeps a change (`review.locked-content`, `review.bound-content`), rather
|
|
1241
|
+
* than reporting the story as reviewed while pending changes remain.
|
|
1230
1242
|
*
|
|
1231
1243
|
* On a collection from {@link Range.revisions}, resolves every change the range overlaps at
|
|
1232
1244
|
* sync time, structural changes absent from `items` included. A change the range covers in
|
|
@@ -1241,7 +1253,10 @@ declare class RevisionCollection extends HandleCollection<Revision> {
|
|
|
1241
1253
|
rejectAll(): void;
|
|
1242
1254
|
/**
|
|
1243
1255
|
* Resolve eligible revisions in this story and report skipped decisions after sync.
|
|
1244
|
-
* Omit revisions to include unsupported and
|
|
1256
|
+
* Omit revisions to include unsupported decisions and history absent from items. Named
|
|
1257
|
+
* revisions resolve as single `accept()` or `reject()` calls on them would, except that a
|
|
1258
|
+
* row kept for a nested table is reported as `retained-structure` while the other named
|
|
1259
|
+
* changes resolve, where a single call refuses whole.
|
|
1245
1260
|
* Pass an empty array to select nothing. Duplicate objects resolve once; stale targets
|
|
1246
1261
|
* are reported as unknown-revision. This must be the only write in its sync batch.
|
|
1247
1262
|
* Unlike acceptAll/rejectAll, unsupported decisions do not block independent changes.
|
|
@@ -1253,7 +1268,8 @@ declare class RevisionCollection extends HandleCollection<Revision> {
|
|
|
1253
1268
|
* const result = context.document.revisions.resolve('accept');
|
|
1254
1269
|
* await context.sync();
|
|
1255
1270
|
* console.log(result.value.resolved.length, result.value.remaining);
|
|
1256
|
-
* for (const skipped of result.value.skipped)
|
|
1271
|
+
* for (const skipped of result.value.skipped)
|
|
1272
|
+
* console.log(skipped.reason, skipped.detail ?? '');
|
|
1257
1273
|
* ```
|
|
1258
1274
|
*/
|
|
1259
1275
|
resolve(action: 'accept' | 'reject', revisions?: readonly Revision[]): ClientResult<RevisionBatchResult>;
|
|
@@ -2539,8 +2555,8 @@ declare class Document extends ModelObject {
|
|
|
2539
2555
|
/**
|
|
2540
2556
|
* The tracked changes of the main-body story that this API can publish as typed objects.
|
|
2541
2557
|
*
|
|
2542
|
-
*
|
|
2543
|
-
*
|
|
2558
|
+
* A structural card with no single revision type is omitted from `items`, and so are property
|
|
2559
|
+
* changes that leave the resolved formatting unchanged.
|
|
2544
2560
|
* `acceptAll` / `rejectAll` still resolve every store-resolvable revision in the main body
|
|
2545
2561
|
* and refuse atomically if any `readOnly` or otherwise unsupported revision remains. Header,
|
|
2546
2562
|
* footer, and note revisions live on those stories' own `Body.revisions` collections.
|
|
@@ -3636,7 +3652,7 @@ declare class Body extends ModelObject {
|
|
|
3636
3652
|
*
|
|
3637
3653
|
* DocxEditor's own accessor: upstream reaches revisions from the document, and this story-scoped
|
|
3638
3654
|
* collection is what makes a header's, footer's, or note's changes reachable at all. Recorded in
|
|
3639
|
-
* `compat/manifest.json`. `items` may omit structural
|
|
3655
|
+
* `compat/manifest.json`. `items` may omit a structural card with no single type; collection-wide decisions still
|
|
3640
3656
|
* resolve every store-resolvable revision in this story.
|
|
3641
3657
|
*/
|
|
3642
3658
|
get revisions(): RevisionCollection;
|
|
@@ -3812,6 +3828,18 @@ type RuntimeDiagnostic = {
|
|
|
3812
3828
|
readonly errorName?: DiagnosticErrorName;
|
|
3813
3829
|
/** `automation` when `cause` is `exception`. */
|
|
3814
3830
|
readonly stage?: 'automation';
|
|
3831
|
+
} | {
|
|
3832
|
+
/** A tracked-change decision the batch refused, with why and in what structure. */
|
|
3833
|
+
readonly kind: 'review.skipped';
|
|
3834
|
+
readonly code: ReviewDiagnosticCode;
|
|
3835
|
+
/** Always 1: a refused batch is one decision. */
|
|
3836
|
+
readonly count: number;
|
|
3837
|
+
readonly operation?: ReviewOperation;
|
|
3838
|
+
/**
|
|
3839
|
+
* The structure behind the skip, such as `paired-change` for the other half of a move,
|
|
3840
|
+
* or `nested-table` for a row kept for its nested table. See `diagnosticCauses()`.
|
|
3841
|
+
*/
|
|
3842
|
+
readonly cause?: string;
|
|
3815
3843
|
});
|
|
3816
3844
|
|
|
3817
3845
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AutomationHandle, AutomationSpan, AutomationOperation, AutomationValue, AutomationSpanRef, RevisionBatchResult, RevisionAuthorResult, DiagnosticCode, HistoryGroup, AutomationHost, AutomationCapabilities, AutomationPaginationOptions, ByteSizeBucket, DocumentOpenDiagnosticCode, DocumentPartKind, DiagnosticErrorName, EditDiagnosticCode } from '@docx-editor.dev/core/automation';
|
|
1
|
+
import { AutomationHandle, AutomationSpan, AutomationOperation, AutomationValue, AutomationSpanRef, RevisionBatchResult, RevisionAuthorResult, DiagnosticCode, HistoryGroup, AutomationHost, AutomationCapabilities, AutomationPaginationOptions, ByteSizeBucket, DocumentOpenDiagnosticCode, DocumentPartKind, DiagnosticErrorName, EditDiagnosticCode, ReviewDiagnosticCode, ReviewOperation } from '@docx-editor.dev/core/automation';
|
|
2
2
|
import { CollaborationModuleContribution } from '@docx-editor.dev/core/collaboration';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -989,10 +989,11 @@ declare class ClientResult<T> {
|
|
|
989
989
|
* Word's own names for a kind of change.
|
|
990
990
|
*
|
|
991
991
|
* The WHOLE upstream vocabulary, because a declaration says what a caller may be handed and a caller
|
|
992
|
-
* switching on it should not have to be told which subset this engine happens to produce.
|
|
993
|
-
* these
|
|
994
|
-
*
|
|
995
|
-
* from `items`; collection-wide decisions still resolve every
|
|
992
|
+
* switching on it should not have to be told which subset this engine happens to produce. Nine of
|
|
993
|
+
* these occur as published objects: Insert, Delete, Property, MovedFrom, MovedTo, CellInsertion,
|
|
994
|
+
* CellDeletion, CellMerge and ParagraphNumber. A structural card with no single type, such as
|
|
995
|
+
* table grid history, is omitted from `items`; collection-wide decisions still resolve every
|
|
996
|
+
* store-resolvable revision. See
|
|
996
997
|
* `compat/manifest.json`.
|
|
997
998
|
*/
|
|
998
999
|
type RevisionType = 'None' | 'Insert' | 'Delete' | 'Property' | 'ParagraphNumber' | 'DisplayField' | 'Reconcile' | 'Conflict' | 'Style' | 'Replace' | 'ParagraphProperty' | 'TableProperty' | 'SectionProperty' | 'StyleDefinition' | 'MovedFrom' | 'MovedTo' | 'CellInsertion' | 'CellDeletion' | 'CellMerge' | 'CellSplit' | 'ConflictInsert' | 'ConflictDelete';
|
|
@@ -1134,11 +1135,12 @@ declare class CommentCollection extends HandleCollection<Comment> {
|
|
|
1134
1135
|
protected promised(label: string, nullable: boolean): Comment & PromisedItem;
|
|
1135
1136
|
}
|
|
1136
1137
|
/**
|
|
1137
|
-
* One tracked change
|
|
1138
|
+
* One tracked change.
|
|
1138
1139
|
*
|
|
1139
|
-
*
|
|
1140
|
-
*
|
|
1141
|
-
* `type`. That listing is not the collection decision set: see
|
|
1140
|
+
* A row is listed as `Insert` or `Delete`, and a cell or tracked numbering by its own type. A
|
|
1141
|
+
* structural card with no single type, such as table grid history, is omitted rather than
|
|
1142
|
+
* shipped with an unpublishable `type`. That listing is not the collection decision set: see
|
|
1143
|
+
* {@link RevisionCollection}.
|
|
1142
1144
|
*
|
|
1143
1145
|
* @public
|
|
1144
1146
|
*/
|
|
@@ -1159,10 +1161,19 @@ declare class Revision extends ModelObject implements PromisedItem {
|
|
|
1159
1161
|
get date(): Date | null;
|
|
1160
1162
|
/** What kind of change it is, by Word's own name for it. */
|
|
1161
1163
|
get type(): RevisionType;
|
|
1162
|
-
/** The words the change covers. */
|
|
1164
|
+
/** The words the change covers. Each read returns the same proxy, so a load on it is kept. */
|
|
1163
1165
|
get range(): Range;
|
|
1164
1166
|
/**
|
|
1165
|
-
* Keep the change,
|
|
1167
|
+
* Keep the change, in one transaction, with every part of it: both halves of a move or a cell
|
|
1168
|
+
* merge, and the changes inside content it removes, such as another author's insertion in a
|
|
1169
|
+
* deleted row. Rejecting a formatting change restores the earlier properties, so another
|
|
1170
|
+
* author's change inside the replaced properties, such as tracked numbering, goes with it.
|
|
1171
|
+
*
|
|
1172
|
+
* After a sync resolves this change, another call on the same object fails with
|
|
1173
|
+
* `InvalidObjectPath`, because the change is gone. Within one sync, a decision on a change an
|
|
1174
|
+
* earlier decision removed is skipped. Read `debugInfo.innerError.code` on a refusal, such as
|
|
1175
|
+
* `review.retained-structure` for a row that must stay to keep a nested table, or
|
|
1176
|
+
* `review.locked-content` and `review.bound-content` for a change a content control keeps.
|
|
1166
1177
|
*
|
|
1167
1178
|
* In a React or Vue host with the review module, use `useReview().accept` from
|
|
1168
1179
|
* `@docx-editor.dev/pro/react` or `@docx-editor.dev/pro/vue` for a review UI.
|
|
@@ -1171,7 +1182,7 @@ declare class Revision extends ModelObject implements PromisedItem {
|
|
|
1171
1182
|
*/
|
|
1172
1183
|
accept(): void;
|
|
1173
1184
|
/**
|
|
1174
|
-
* Undo the change, likewise in one transaction.
|
|
1185
|
+
* Undo the change, likewise in one transaction and with the same rules as {@link Revision.accept}.
|
|
1175
1186
|
*
|
|
1176
1187
|
* In a React or Vue host with the review module, use `useReview().reject` for a review UI.
|
|
1177
1188
|
*/
|
|
@@ -1202,9 +1213,9 @@ interface RevisionAuthorOptions {
|
|
|
1202
1213
|
/**
|
|
1203
1214
|
* The tracked changes on a document, story or range, as of the batch that loaded them.
|
|
1204
1215
|
*
|
|
1205
|
-
* `items` omits structural
|
|
1216
|
+
* `items` omits a structural card with no single revision type; see {@link Revision}.
|
|
1206
1217
|
* On a story's collection, `acceptAll` / `rejectAll` still resolve every store-resolvable
|
|
1207
|
-
* revision in the story and refuse atomically if any
|
|
1218
|
+
* revision in the story and refuse atomically if any read-only or otherwise unsupported
|
|
1208
1219
|
* revision remains. On {@link Range.revisions} and `getReviewItemRevisions`, they resolve the
|
|
1209
1220
|
* changes the range overlaps or the key names, and `resolve` and `setAuthor` refuse with
|
|
1210
1221
|
* `NotSupported`.
|
|
@@ -1214,7 +1225,7 @@ interface RevisionAuthorOptions {
|
|
|
1214
1225
|
declare class RevisionCollection extends HandleCollection<Revision> {
|
|
1215
1226
|
#private;
|
|
1216
1227
|
/** @internal The pending decisions of one story. */
|
|
1217
|
-
static of(context: RequestContext, label: string, owner: ObjectPath, body: AutomationHandle): RevisionCollection;
|
|
1228
|
+
static of(context: RequestContext, label: string, owner: ObjectPath, body: () => AutomationHandle): RevisionCollection;
|
|
1218
1229
|
/** @internal The pending decisions a range overlaps, read from the range at plan time. */
|
|
1219
1230
|
static inSpan(context: RequestContext, label: string, owner: ObjectPath, span: () => AutomationSpanRef): RevisionCollection;
|
|
1220
1231
|
/** @internal The pending decisions one review-queue key names. */
|
|
@@ -1223,10 +1234,11 @@ declare class RevisionCollection extends HandleCollection<Revision> {
|
|
|
1223
1234
|
/**
|
|
1224
1235
|
* Keep every change in this story, as ONE decision and one undo unit.
|
|
1225
1236
|
*
|
|
1226
|
-
* Resolves every store-resolvable revision in the story, including
|
|
1227
|
-
*
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1237
|
+
* Resolves every store-resolvable revision in the story, including history omitted from
|
|
1238
|
+
* `items`. Refuses the sync outright where any read-only or otherwise unsupported revision
|
|
1239
|
+
* remains, a row must stay to keep a nested table (`review.retained-structure`), or a content
|
|
1240
|
+
* control keeps a change (`review.locked-content`, `review.bound-content`), rather
|
|
1241
|
+
* than reporting the story as reviewed while pending changes remain.
|
|
1230
1242
|
*
|
|
1231
1243
|
* On a collection from {@link Range.revisions}, resolves every change the range overlaps at
|
|
1232
1244
|
* sync time, structural changes absent from `items` included. A change the range covers in
|
|
@@ -1241,7 +1253,10 @@ declare class RevisionCollection extends HandleCollection<Revision> {
|
|
|
1241
1253
|
rejectAll(): void;
|
|
1242
1254
|
/**
|
|
1243
1255
|
* Resolve eligible revisions in this story and report skipped decisions after sync.
|
|
1244
|
-
* Omit revisions to include unsupported and
|
|
1256
|
+
* Omit revisions to include unsupported decisions and history absent from items. Named
|
|
1257
|
+
* revisions resolve as single `accept()` or `reject()` calls on them would, except that a
|
|
1258
|
+
* row kept for a nested table is reported as `retained-structure` while the other named
|
|
1259
|
+
* changes resolve, where a single call refuses whole.
|
|
1245
1260
|
* Pass an empty array to select nothing. Duplicate objects resolve once; stale targets
|
|
1246
1261
|
* are reported as unknown-revision. This must be the only write in its sync batch.
|
|
1247
1262
|
* Unlike acceptAll/rejectAll, unsupported decisions do not block independent changes.
|
|
@@ -1253,7 +1268,8 @@ declare class RevisionCollection extends HandleCollection<Revision> {
|
|
|
1253
1268
|
* const result = context.document.revisions.resolve('accept');
|
|
1254
1269
|
* await context.sync();
|
|
1255
1270
|
* console.log(result.value.resolved.length, result.value.remaining);
|
|
1256
|
-
* for (const skipped of result.value.skipped)
|
|
1271
|
+
* for (const skipped of result.value.skipped)
|
|
1272
|
+
* console.log(skipped.reason, skipped.detail ?? '');
|
|
1257
1273
|
* ```
|
|
1258
1274
|
*/
|
|
1259
1275
|
resolve(action: 'accept' | 'reject', revisions?: readonly Revision[]): ClientResult<RevisionBatchResult>;
|
|
@@ -2539,8 +2555,8 @@ declare class Document extends ModelObject {
|
|
|
2539
2555
|
/**
|
|
2540
2556
|
* The tracked changes of the main-body story that this API can publish as typed objects.
|
|
2541
2557
|
*
|
|
2542
|
-
*
|
|
2543
|
-
*
|
|
2558
|
+
* A structural card with no single revision type is omitted from `items`, and so are property
|
|
2559
|
+
* changes that leave the resolved formatting unchanged.
|
|
2544
2560
|
* `acceptAll` / `rejectAll` still resolve every store-resolvable revision in the main body
|
|
2545
2561
|
* and refuse atomically if any `readOnly` or otherwise unsupported revision remains. Header,
|
|
2546
2562
|
* footer, and note revisions live on those stories' own `Body.revisions` collections.
|
|
@@ -3636,7 +3652,7 @@ declare class Body extends ModelObject {
|
|
|
3636
3652
|
*
|
|
3637
3653
|
* DocxEditor's own accessor: upstream reaches revisions from the document, and this story-scoped
|
|
3638
3654
|
* collection is what makes a header's, footer's, or note's changes reachable at all. Recorded in
|
|
3639
|
-
* `compat/manifest.json`. `items` may omit structural
|
|
3655
|
+
* `compat/manifest.json`. `items` may omit a structural card with no single type; collection-wide decisions still
|
|
3640
3656
|
* resolve every store-resolvable revision in this story.
|
|
3641
3657
|
*/
|
|
3642
3658
|
get revisions(): RevisionCollection;
|
|
@@ -3812,6 +3828,18 @@ type RuntimeDiagnostic = {
|
|
|
3812
3828
|
readonly errorName?: DiagnosticErrorName;
|
|
3813
3829
|
/** `automation` when `cause` is `exception`. */
|
|
3814
3830
|
readonly stage?: 'automation';
|
|
3831
|
+
} | {
|
|
3832
|
+
/** A tracked-change decision the batch refused, with why and in what structure. */
|
|
3833
|
+
readonly kind: 'review.skipped';
|
|
3834
|
+
readonly code: ReviewDiagnosticCode;
|
|
3835
|
+
/** Always 1: a refused batch is one decision. */
|
|
3836
|
+
readonly count: number;
|
|
3837
|
+
readonly operation?: ReviewOperation;
|
|
3838
|
+
/**
|
|
3839
|
+
* The structure behind the skip, such as `paired-change` for the other half of a move,
|
|
3840
|
+
* or `nested-table` for a row kept for its nested table. See `diagnosticCauses()`.
|
|
3841
|
+
*/
|
|
3842
|
+
readonly cause?: string;
|
|
3815
3843
|
});
|
|
3816
3844
|
|
|
3817
3845
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docx-editor.dev/editor-api",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.33.0",
|
|
4
4
|
"description": "Document automation for DOCX: a batching object model that drives a document from a server or from an editor already open in a page",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"engines": {
|
|
@@ -92,6 +92,6 @@
|
|
|
92
92
|
"access": "public"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@docx-editor.dev/core": "~2.
|
|
95
|
+
"@docx-editor.dev/core": "~2.33.0"
|
|
96
96
|
}
|
|
97
97
|
}
|