superdoc 2.25.0-next.2 → 2.25.0-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/collaboration-upgrade-engine.cjs +1 -1
- package/dist/collaboration-upgrade-engine.es.js +1 -1
- package/dist/document-api/src/comments/comments.types.d.ts +2 -0
- package/dist/document-api/src/content-controls/content-controls.types.d.ts +4 -2
- package/dist/document-api/src/hyperlinks/hyperlinks.types.d.ts +9 -2
- package/dist/document-api/src/images/images.types.d.ts +3 -3
- package/dist/document-api/src/lists/lists.types.d.ts +11 -11
- package/dist/document-api/src/receipt-bridge.d.ts +3 -0
- package/dist/document-api/src/types/blocks.types.d.ts +2 -2
- package/dist/document-api/src/types/mutation-plan.types.d.ts +2 -2
- package/dist/document-api/src/types/receipt.d.ts +12 -0
- package/dist/document-api/src/types/sd-contract.d.ts +3 -0
- package/dist/document-api/src/types/track-changes.types.d.ts +8 -0
- package/dist/superdoc.cjs +2 -2
- package/dist/superdoc.es.js +2 -2
- package/dist-cdn/superdoc.min.js +3 -3
- package/package.json +2 -2
|
@@ -19,7 +19,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
19
19
|
var PRIVATE_ENGINE_INFO = (0, _superdoc_docx_engine_collaboration_upgrade_engine.getCollaborationUpgradeEngineInfo)();
|
|
20
20
|
var ENGINE_INFO = Object.freeze({
|
|
21
21
|
...PRIVATE_ENGINE_INFO,
|
|
22
|
-
superdocVersion: "2.25.0-next.
|
|
22
|
+
superdocVersion: "2.25.0-next.3",
|
|
23
23
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
24
24
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
25
25
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -18,7 +18,7 @@ var COLLABORATION_UPGRADE_ENGINE_MINIMUM_NODE_MAJOR = 20;
|
|
|
18
18
|
var PRIVATE_ENGINE_INFO = getCollaborationUpgradeEngineInfo$1();
|
|
19
19
|
var ENGINE_INFO = Object.freeze({
|
|
20
20
|
...PRIVATE_ENGINE_INFO,
|
|
21
|
-
superdocVersion: "2.25.0-next.
|
|
21
|
+
superdocVersion: "2.25.0-next.3",
|
|
22
22
|
roomSchemaVersion: Object.freeze({ ...PRIVATE_ENGINE_INFO.roomSchemaVersion }),
|
|
23
23
|
supportedBundleVersions: SUPPORTED_COLLABORATION_UPGRADE_BUNDLE_VERSIONS,
|
|
24
24
|
supportedV1ReaderContractVersions: SUPPORTED_V1_READER_CONTRACT_VERSIONS
|
|
@@ -216,6 +216,8 @@ export interface CommentsListQuery {
|
|
|
216
216
|
*/
|
|
217
217
|
export interface CommentDomain {
|
|
218
218
|
address: CommentAddress;
|
|
219
|
+
/** Canonical comment id alias returned by native runtimes. */
|
|
220
|
+
commentId?: string;
|
|
219
221
|
/** See {@link CommentInfo.externalId}. */
|
|
220
222
|
externalId?: string;
|
|
221
223
|
/** See {@link CommentInfo.metadata}. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BlockNodeAddress, NodeKind } from '../types/base.js';
|
|
2
2
|
import { SelectionTarget } from '../types/address.js';
|
|
3
3
|
import { SDFragment } from '../types/fragment.js';
|
|
4
|
-
import { ReceiptFailure, ReceiptInsert } from '../types/receipt.js';
|
|
4
|
+
import { ReceiptFailure, ReceiptInsert, ReceiptSuccess } from '../types/receipt.js';
|
|
5
5
|
import { StoryLocator } from '../types/story.types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Semantic SDT subtype derived from `w:sdtPr` children.
|
|
@@ -154,11 +154,13 @@ export interface ContentControlInfo {
|
|
|
154
154
|
/** Authoritative structural emptiness when the adapter can determine it. */
|
|
155
155
|
isEmpty?: boolean;
|
|
156
156
|
}
|
|
157
|
-
export interface ContentControlMutationSuccess {
|
|
157
|
+
export interface ContentControlMutationSuccess extends ReceiptSuccess {
|
|
158
158
|
success: true;
|
|
159
159
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
160
160
|
contentControl: ContentControlTarget;
|
|
161
161
|
updatedRef?: ContentControlTarget;
|
|
162
|
+
/** Identity of the block created by an adjacent-content insertion. */
|
|
163
|
+
createdBlockId?: string;
|
|
162
164
|
affectedStories?: StoryLocator[];
|
|
163
165
|
trackedChangeRefs?: ReceiptInsert[];
|
|
164
166
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BlockNodeAddress, InlineNodeAddress } from '../types/base.js';
|
|
2
2
|
import { TextAddress } from '../types/address.js';
|
|
3
3
|
import { DiscoveryOutput } from '../types/discovery.js';
|
|
4
|
-
import { ReceiptFailure } from '../types/receipt.js';
|
|
4
|
+
import { ReceiptFailure, ReceiptSuccess } from '../types/receipt.js';
|
|
5
5
|
/** Narrowed inline address for hyperlink targets. */
|
|
6
6
|
export type HyperlinkTarget = InlineNodeAddress & {
|
|
7
7
|
nodeType: 'hyperlink';
|
|
@@ -74,10 +74,17 @@ export interface HyperlinkInfo {
|
|
|
74
74
|
properties: HyperlinkReadProperties;
|
|
75
75
|
text?: string;
|
|
76
76
|
}
|
|
77
|
-
export interface HyperlinkMutationSuccess {
|
|
77
|
+
export interface HyperlinkMutationSuccess extends ReceiptSuccess {
|
|
78
78
|
success: true;
|
|
79
79
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
80
80
|
hyperlink: HyperlinkTarget;
|
|
81
|
+
/** Legacy native identifier for the mutated hyperlink, null after removal. */
|
|
82
|
+
hyperlinkNodeId?: string | null;
|
|
83
|
+
/** Package parts created or modified by the mutation. */
|
|
84
|
+
partsCreated?: readonly string[];
|
|
85
|
+
partsModified?: readonly string[];
|
|
86
|
+
/** Relationship identity created for an external destination, when present. */
|
|
87
|
+
createdRId?: string;
|
|
81
88
|
}
|
|
82
89
|
export interface HyperlinkMutationFailure {
|
|
83
90
|
success: false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlockNodeAddress } from '../types/index.js';
|
|
2
|
-
import { ReceiptInsert } from '../types/receipt.js';
|
|
2
|
+
import { ReceiptInsert, ReceiptSuccess } from '../types/receipt.js';
|
|
3
3
|
import { StoryLocator } from '../types/story.types.js';
|
|
4
4
|
import { ContentControlTarget } from '../content-controls/content-controls.types.js';
|
|
5
5
|
import { ImageProperties, ImageWrapType, ImageWrapSide, ImageMarginOffset, ImageSize, ImageCropInfo } from '../types/media.types.js';
|
|
@@ -186,7 +186,7 @@ export interface SetZOrderInput {
|
|
|
186
186
|
imageId: string;
|
|
187
187
|
zOrder: ImageZOrderInput;
|
|
188
188
|
}
|
|
189
|
-
export interface CreateImageSuccessResult {
|
|
189
|
+
export interface CreateImageSuccessResult extends ReceiptSuccess {
|
|
190
190
|
success: true;
|
|
191
191
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
192
192
|
image: ImageAddress;
|
|
@@ -206,7 +206,7 @@ export interface ImagesListResult {
|
|
|
206
206
|
total: number;
|
|
207
207
|
items: ImageSummary[];
|
|
208
208
|
}
|
|
209
|
-
export interface ImagesMutationSuccessResult {
|
|
209
|
+
export interface ImagesMutationSuccessResult extends ReceiptSuccess {
|
|
210
210
|
success: true;
|
|
211
211
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
212
212
|
image: ImageAddress;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AffectedRefRemapping, BlockNodeType, ReceiptFailure, ReceiptInsert, StoryLocator, TextAddress, TextRangeShift } from '../types/index.js';
|
|
1
|
+
import { AffectedRefRemapping, BlockNodeType, ReceiptFailure, ReceiptInsert, ReceiptSuccess, StoryLocator, TextAddress, TextRangeShift } from '../types/index.js';
|
|
2
2
|
import { DiscoveryOutput } from '../types/discovery.js';
|
|
3
3
|
export type ListItemAddress = {
|
|
4
4
|
kind: 'block';
|
|
@@ -356,14 +356,14 @@ export interface ListsCaptureTemplateSuccessResult {
|
|
|
356
356
|
template: ListTemplate;
|
|
357
357
|
}
|
|
358
358
|
export type ListsCaptureTemplateResult = ListsCaptureTemplateSuccessResult | ListsFailureResult;
|
|
359
|
-
export interface ListsInsertSuccessResult {
|
|
359
|
+
export interface ListsInsertSuccessResult extends ReceiptSuccess {
|
|
360
360
|
success: true;
|
|
361
361
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
362
362
|
item: ListItemAddress;
|
|
363
363
|
insertionPoint: TextAddress;
|
|
364
364
|
trackedChangeRefs?: ReceiptInsert[];
|
|
365
365
|
}
|
|
366
|
-
export interface ListsMutateItemSuccessResult {
|
|
366
|
+
export interface ListsMutateItemSuccessResult extends ReceiptSuccess {
|
|
367
367
|
success: true;
|
|
368
368
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
369
369
|
item: ListItemAddress;
|
|
@@ -375,38 +375,38 @@ export interface ListsMutateItemSuccessResult {
|
|
|
375
375
|
txId?: string;
|
|
376
376
|
changed?: boolean;
|
|
377
377
|
}
|
|
378
|
-
export interface ListsCreateSuccessResult {
|
|
378
|
+
export interface ListsCreateSuccessResult extends ReceiptSuccess {
|
|
379
379
|
success: true;
|
|
380
380
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
381
381
|
listId: string;
|
|
382
382
|
item: ListItemAddress;
|
|
383
383
|
}
|
|
384
|
-
export interface ListsJoinSuccessResult {
|
|
384
|
+
export interface ListsJoinSuccessResult extends ReceiptSuccess {
|
|
385
385
|
success: true;
|
|
386
386
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
387
387
|
listId: string;
|
|
388
388
|
}
|
|
389
|
-
export interface ListsSeparateSuccessResult {
|
|
389
|
+
export interface ListsSeparateSuccessResult extends ReceiptSuccess {
|
|
390
390
|
success: true;
|
|
391
391
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
392
392
|
listId: string;
|
|
393
393
|
numId: number;
|
|
394
394
|
}
|
|
395
|
-
export interface ListsMergeSuccessResult {
|
|
395
|
+
export interface ListsMergeSuccessResult extends ReceiptSuccess {
|
|
396
396
|
success: true;
|
|
397
397
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
398
398
|
listId: string;
|
|
399
399
|
absorbedCount: number;
|
|
400
400
|
removedEmptyBlocks: number;
|
|
401
401
|
}
|
|
402
|
-
export interface ListsSplitSuccessResult {
|
|
402
|
+
export interface ListsSplitSuccessResult extends ReceiptSuccess {
|
|
403
403
|
success: true;
|
|
404
404
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
405
405
|
listId: string;
|
|
406
406
|
numId: number;
|
|
407
407
|
restartedAt: number | null;
|
|
408
408
|
}
|
|
409
|
-
export interface ListsDetachSuccessResult {
|
|
409
|
+
export interface ListsDetachSuccessResult extends ReceiptSuccess {
|
|
410
410
|
success: true;
|
|
411
411
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
412
412
|
paragraph: {
|
|
@@ -415,7 +415,7 @@ export interface ListsDetachSuccessResult {
|
|
|
415
415
|
nodeId: string;
|
|
416
416
|
};
|
|
417
417
|
}
|
|
418
|
-
export interface ListsConvertToTextSuccessResult {
|
|
418
|
+
export interface ListsConvertToTextSuccessResult extends ReceiptSuccess {
|
|
419
419
|
success: true;
|
|
420
420
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
421
421
|
paragraph: {
|
|
@@ -447,7 +447,7 @@ export type ListsMergeResult = ListsMergeSuccessResult | ListsFailureResult;
|
|
|
447
447
|
export type ListsSplitResult = ListsSplitSuccessResult | ListsFailureResult;
|
|
448
448
|
export type ListsDetachResult = ListsDetachSuccessResult | ListsFailureResult;
|
|
449
449
|
export type ListsConvertToTextResult = ListsConvertToTextSuccessResult | ListsFailureResult;
|
|
450
|
-
export interface ListsDeleteSuccessResult {
|
|
450
|
+
export interface ListsDeleteSuccessResult extends ReceiptSuccess {
|
|
451
451
|
success: true;
|
|
452
452
|
appliedChangeMode?: 'direct' | 'tracked';
|
|
453
453
|
/** Number of list items removed. */
|
|
@@ -8,6 +8,9 @@ export interface MutationReceiptBridgeContext {
|
|
|
8
8
|
}
|
|
9
9
|
interface CanonicalSuccessMetadata {
|
|
10
10
|
appliedChangeMode?: ReceiptSuccess['appliedChangeMode'];
|
|
11
|
+
changed?: ReceiptSuccess['changed'];
|
|
12
|
+
trackedChangeRefs?: ReceiptSuccess['trackedChangeRefs'];
|
|
13
|
+
trackedChangeCount?: ReceiptSuccess['trackedChangeCount'];
|
|
11
14
|
id?: ReceiptSuccess['id'];
|
|
12
15
|
inserted?: ReceiptSuccess['inserted'];
|
|
13
16
|
updated?: ReceiptSuccess['updated'];
|
|
@@ -144,7 +144,7 @@ export interface BlocksSplitInput {
|
|
|
144
144
|
/** Include deleted tracked text in the offset ruler. Defaults to `visible`. */
|
|
145
145
|
coordinateSpace?: 'visible' | 'tracked';
|
|
146
146
|
}
|
|
147
|
-
export interface BlocksSplitSuccessResult {
|
|
147
|
+
export interface BlocksSplitSuccessResult extends Omit<ReceiptSuccess, 'inserted'> {
|
|
148
148
|
success: true;
|
|
149
149
|
appliedChangeMode?: ReceiptSuccess['appliedChangeMode'];
|
|
150
150
|
/** Address of the new paragraph created by the split (the tail). */
|
|
@@ -173,7 +173,7 @@ export interface BlocksMergeInput {
|
|
|
173
173
|
/** Paragraph immediately after `first` in the same story. */
|
|
174
174
|
second: BlockNodeAddress;
|
|
175
175
|
}
|
|
176
|
-
export interface BlocksMergeSuccessResult {
|
|
176
|
+
export interface BlocksMergeSuccessResult extends Omit<ReceiptSuccess, 'removed'> {
|
|
177
177
|
success: true;
|
|
178
178
|
appliedChangeMode?: ReceiptSuccess['appliedChangeMode'];
|
|
179
179
|
/** Address of the paragraph that was removed (the second paragraph). */
|
|
@@ -5,7 +5,7 @@ import { InsertStylePolicy, StylePolicy } from './style-policy.types.js';
|
|
|
5
5
|
import { InlineRunPatch } from '../format/inline-run-patch.js';
|
|
6
6
|
import { SDFragment } from './fragment.js';
|
|
7
7
|
import { Placement, NestingPolicy } from './placement.js';
|
|
8
|
-
import { AffectedRef } from './receipt.js';
|
|
8
|
+
import { AffectedRef, ReceiptSuccess } from './receipt.js';
|
|
9
9
|
import { ChangeMode } from '../write/write.js';
|
|
10
10
|
import { StoryLocator } from './story.types.js';
|
|
11
11
|
export type SelectWhere = {
|
|
@@ -241,7 +241,7 @@ export type StepOutcome = {
|
|
|
241
241
|
trackedChangeIds?: string[];
|
|
242
242
|
data: StepOutcomeData;
|
|
243
243
|
};
|
|
244
|
-
export type PlanReceipt = {
|
|
244
|
+
export type PlanReceipt = ReceiptSuccess & {
|
|
245
245
|
success: true;
|
|
246
246
|
/** Effective mode when every committed step used the same mode. */
|
|
247
247
|
appliedChangeMode?: ChangeMode;
|
|
@@ -110,6 +110,12 @@ export interface ReceiptEffects {
|
|
|
110
110
|
}
|
|
111
111
|
export type ReceiptSuccess = {
|
|
112
112
|
success: true;
|
|
113
|
+
/** Whether a successful request changed the document; false represents a no-op commit. */
|
|
114
|
+
changed?: boolean;
|
|
115
|
+
/** Tracked changes authored by this mutation. */
|
|
116
|
+
trackedChangeRefs?: ReceiptInsert[];
|
|
117
|
+
/** Number of tracked changes authored by this mutation. */
|
|
118
|
+
trackedChangeCount?: number;
|
|
113
119
|
/**
|
|
114
120
|
* Mode in which this call's document content was committed. An edit folded
|
|
115
121
|
* into the author's existing insertion is tracked; auxiliary style and
|
|
@@ -202,6 +208,12 @@ export type TextMutationResolution = {
|
|
|
202
208
|
};
|
|
203
209
|
export type TextMutationReceipt = (ReceiptSuccess & {
|
|
204
210
|
resolution: TextMutationResolution;
|
|
211
|
+
/** Per-edit tracked-change results for atomic multi-edit mutations. */
|
|
212
|
+
trackedChangeOutcomes?: {
|
|
213
|
+
editIndex: number;
|
|
214
|
+
trackedChangeCount: number;
|
|
215
|
+
trackedChangeRefs: ReceiptInsert[];
|
|
216
|
+
}[];
|
|
205
217
|
}) | (ReceiptFailureResult & {
|
|
206
218
|
resolution: TextMutationResolution;
|
|
207
219
|
});
|
|
@@ -32,6 +32,9 @@ export interface SDMutationReceipt {
|
|
|
32
32
|
before: string;
|
|
33
33
|
after: string;
|
|
34
34
|
};
|
|
35
|
+
changed?: ReceiptSuccess['changed'];
|
|
36
|
+
trackedChangeRefs?: ReceiptSuccess['trackedChangeRefs'];
|
|
37
|
+
trackedChangeCount?: ReceiptSuccess['trackedChangeCount'];
|
|
35
38
|
id?: ReceiptSuccess['id'];
|
|
36
39
|
inserted?: ReceiptSuccess['inserted'];
|
|
37
40
|
updated?: ReceiptSuccess['updated'];
|
|
@@ -351,9 +351,17 @@ export interface TrackChangeStructuralDescriptor {
|
|
|
351
351
|
export type TrackChangeTarget = {
|
|
352
352
|
kind: 'text';
|
|
353
353
|
address: TrackedChangeAddress;
|
|
354
|
+
/** Resolved text geometry when available. */
|
|
355
|
+
segments?: TextTarget['segments'];
|
|
356
|
+
/** Story containing the resolved geometry. */
|
|
357
|
+
story?: TextTarget['story'];
|
|
354
358
|
} | {
|
|
355
359
|
kind: 'replacement';
|
|
356
360
|
address: TrackedChangeAddress;
|
|
361
|
+
/** Resolved text geometry when available. */
|
|
362
|
+
segments?: TextTarget['segments'];
|
|
363
|
+
/** Story containing the resolved geometry. */
|
|
364
|
+
story?: TextTarget['story'];
|
|
357
365
|
} | {
|
|
358
366
|
kind: 'formatting';
|
|
359
367
|
address: TrackedChangeAddress;
|
package/dist/superdoc.cjs
CHANGED
|
@@ -304,7 +304,7 @@ var awarenessStatesToArray = (context, states) => {
|
|
|
304
304
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
305
305
|
function getSuperdocVersion() {
|
|
306
306
|
try {
|
|
307
|
-
return "2.25.0-next.
|
|
307
|
+
return "2.25.0-next.3";
|
|
308
308
|
} catch {
|
|
309
309
|
return "unknown";
|
|
310
310
|
}
|
|
@@ -46649,7 +46649,7 @@ var SuperDoc = class extends require_eventemitter3.import_eventemitter3.default
|
|
|
46649
46649
|
}
|
|
46650
46650
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46651
46651
|
this.colorIndex = 0;
|
|
46652
|
-
this.version = "2.25.0-next.
|
|
46652
|
+
this.version = "2.25.0-next.3";
|
|
46653
46653
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46654
46654
|
this.superdocId = config.superdocId || require_uuid.v4();
|
|
46655
46655
|
this.colors = this.config.colors ?? [];
|
package/dist/superdoc.es.js
CHANGED
|
@@ -302,7 +302,7 @@ var awarenessStatesToArray = (context, states) => {
|
|
|
302
302
|
var DEFAULT_ENDPOINT = "https://ingest.superdoc.dev/v1/collect";
|
|
303
303
|
function getSuperdocVersion() {
|
|
304
304
|
try {
|
|
305
|
-
return "2.25.0-next.
|
|
305
|
+
return "2.25.0-next.3";
|
|
306
306
|
} catch {
|
|
307
307
|
return "unknown";
|
|
308
308
|
}
|
|
@@ -46578,7 +46578,7 @@ var SuperDoc = class extends import_eventemitter3.default {
|
|
|
46578
46578
|
}
|
|
46579
46579
|
this.userColorMap = /* @__PURE__ */ new Map();
|
|
46580
46580
|
this.colorIndex = 0;
|
|
46581
|
-
this.version = "2.25.0-next.
|
|
46581
|
+
this.version = "2.25.0-next.3";
|
|
46582
46582
|
this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
|
|
46583
46583
|
this.superdocId = config.superdocId || v4();
|
|
46584
46584
|
this.colors = this.config.colors ?? [];
|