@fluidframework/sequence 2.43.0-343119 → 2.43.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/CHANGELOG.md +21 -0
- package/api-report/sequence.legacy.alpha.api.md +2 -2
- package/dist/intervalCollection.d.ts +4 -9
- package/dist/intervalCollection.d.ts.map +1 -1
- package/dist/intervalCollection.js +96 -82
- package/dist/intervalCollection.js.map +1 -1
- package/dist/intervalCollectionMap.d.ts +1 -1
- package/dist/intervalCollectionMap.d.ts.map +1 -1
- package/dist/intervalCollectionMap.js +2 -2
- package/dist/intervalCollectionMap.js.map +1 -1
- package/dist/intervalCollectionMapInterfaces.d.ts +13 -6
- package/dist/intervalCollectionMapInterfaces.d.ts.map +1 -1
- package/dist/intervalCollectionMapInterfaces.js.map +1 -1
- package/dist/intervals/intervalUtils.d.ts +4 -3
- package/dist/intervals/intervalUtils.d.ts.map +1 -1
- package/dist/intervals/intervalUtils.js +16 -3
- package/dist/intervals/intervalUtils.js.map +1 -1
- package/dist/intervals/sequenceInterval.d.ts +21 -7
- package/dist/intervals/sequenceInterval.d.ts.map +1 -1
- package/dist/intervals/sequenceInterval.js +88 -16
- package/dist/intervals/sequenceInterval.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/sequence.js +1 -1
- package/dist/sequence.js.map +1 -1
- package/lib/intervalCollection.d.ts +4 -9
- package/lib/intervalCollection.d.ts.map +1 -1
- package/lib/intervalCollection.js +98 -82
- package/lib/intervalCollection.js.map +1 -1
- package/lib/intervalCollectionMap.d.ts +1 -1
- package/lib/intervalCollectionMap.d.ts.map +1 -1
- package/lib/intervalCollectionMap.js +2 -2
- package/lib/intervalCollectionMap.js.map +1 -1
- package/lib/intervalCollectionMapInterfaces.d.ts +13 -6
- package/lib/intervalCollectionMapInterfaces.d.ts.map +1 -1
- package/lib/intervalCollectionMapInterfaces.js.map +1 -1
- package/lib/intervals/intervalUtils.d.ts +4 -3
- package/lib/intervals/intervalUtils.d.ts.map +1 -1
- package/lib/intervals/intervalUtils.js +15 -3
- package/lib/intervals/intervalUtils.js.map +1 -1
- package/lib/intervals/sequenceInterval.d.ts +21 -7
- package/lib/intervals/sequenceInterval.d.ts.map +1 -1
- package/lib/intervals/sequenceInterval.js +88 -16
- package/lib/intervals/sequenceInterval.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/sequence.js +1 -1
- package/lib/sequence.js.map +1 -1
- package/package.json +18 -18
- package/src/intervalCollection.ts +122 -142
- package/src/intervalCollectionMap.ts +6 -2
- package/src/intervalCollectionMapInterfaces.ts +15 -5
- package/src/intervals/intervalUtils.ts +31 -3
- package/src/intervals/sequenceInterval.ts +135 -72
- package/src/packageVersion.ts +1 -1
- package/src/sequence.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @fluidframework/sequence
|
|
2
2
|
|
|
3
|
+
## 2.43.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Deprecate unnecessary and internal APIs in `ISequenceIntervalCollection` and related interval types ([#24792](https://github.com/microsoft/FluidFramework/pull/24792)) [8acc59162ac](https://github.com/microsoft/FluidFramework/commit/8acc59162acb0f12f996d756111ae3cb79ea6104)
|
|
8
|
+
|
|
9
|
+
The following APIs are now deprecated and will be removed in a future release:
|
|
10
|
+
|
|
11
|
+
- `IInterval.clone`
|
|
12
|
+
- `IInterval.modify`
|
|
13
|
+
- `IInterval.union`
|
|
14
|
+
- `ISerializableInterval`
|
|
15
|
+
- `SequenceInterval.clone`
|
|
16
|
+
- `SequenceInterval.modify`
|
|
17
|
+
- `SequenceInterval.union`
|
|
18
|
+
- `SequenceInterval.serialize`
|
|
19
|
+
- `SequenceInterval.addPositionChangeListeners`
|
|
20
|
+
- `SequenceInterval.removePositionChangeListeners`
|
|
21
|
+
|
|
22
|
+
These APIs were never intended for public use. There is no migration path, and any usage is strongly discouraged, as it may result in severe errors or data corruption. Please remove any dependencies on these APIs as soon as possible.
|
|
23
|
+
|
|
3
24
|
## 2.42.0
|
|
4
25
|
|
|
5
26
|
Dependency updates only.
|
|
@@ -38,7 +38,7 @@ export interface IInterval {
|
|
|
38
38
|
compareEnd(b: IInterval): number;
|
|
39
39
|
compareStart(b: IInterval): number;
|
|
40
40
|
// @deprecated
|
|
41
|
-
modify(label: string, start: SequencePlace | undefined, end: SequencePlace | undefined, op?: ISequencedDocumentMessage, localSeq?: number,
|
|
41
|
+
modify(label: string, start: SequencePlace | undefined, end: SequencePlace | undefined, op?: ISequencedDocumentMessage, localSeq?: number, canSlideToEndpoint?: boolean): IInterval | undefined;
|
|
42
42
|
// (undocumented)
|
|
43
43
|
overlaps(b: IInterval): boolean;
|
|
44
44
|
// @deprecated
|
|
@@ -318,7 +318,7 @@ export interface SequenceInterval extends ISerializableInterval {
|
|
|
318
318
|
// (undocumented)
|
|
319
319
|
readonly intervalType: IntervalType;
|
|
320
320
|
// @deprecated
|
|
321
|
-
modify(label: string, start: SequencePlace | undefined, end: SequencePlace | undefined, op?: ISequencedDocumentMessage, localSeq?: number,
|
|
321
|
+
modify(label: string, start: SequencePlace | undefined, end: SequencePlace | undefined, op?: ISequencedDocumentMessage, localSeq?: number, canSlideToEndpoint?: boolean): SequenceInterval | undefined;
|
|
322
322
|
// (undocumented)
|
|
323
323
|
overlaps(b: SequenceInterval): boolean;
|
|
324
324
|
// (undocumented)
|
|
@@ -8,20 +8,15 @@ import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/in
|
|
|
8
8
|
import { Client, LocalReferencePosition, PropertySet, Side, SequencePlace } from "@fluidframework/merge-tree/internal";
|
|
9
9
|
import { SequenceOptions, type IIntervalCollectionTypeOperationValue, type IntervalAddLocalMetadata, type IntervalChangeLocalMetadata } from "./intervalCollectionMapInterfaces.js";
|
|
10
10
|
import { type IEndpointIndex, type IIdIntervalIndex, type ISequenceOverlappingIntervalsIndex, type SequenceIntervalIndex } from "./intervalIndex/index.js";
|
|
11
|
-
import { CompressedSerializedInterval, ISerializedInterval,
|
|
11
|
+
import { CompressedSerializedInterval, ISerializedInterval, SequenceInterval, SequenceIntervalClass, SerializedIntervalDelta } from "./intervals/index.js";
|
|
12
12
|
export type ISerializedIntervalCollectionV1 = ISerializedInterval[];
|
|
13
13
|
export interface ISerializedIntervalCollectionV2 {
|
|
14
14
|
label: string;
|
|
15
15
|
version: 2;
|
|
16
16
|
intervals: CompressedSerializedInterval[];
|
|
17
17
|
}
|
|
18
|
-
export declare function sidesFromStickiness(stickiness: IntervalStickiness): {
|
|
19
|
-
startSide: Side;
|
|
20
|
-
endSide: Side;
|
|
21
|
-
};
|
|
22
18
|
export declare function toSequencePlace(pos: number | "start" | "end", side: Side | undefined): SequencePlace;
|
|
23
19
|
export declare function toOptionalSequencePlace(pos: number | "start" | "end" | undefined, side: Side | undefined): SequencePlace | undefined;
|
|
24
|
-
export declare function computeStickinessFromSide(startPos?: number | "start" | "end" | undefined, startSide?: Side, endPos?: number | "start" | "end" | undefined, endSide?: Side): IntervalStickiness;
|
|
25
20
|
export declare class LocalIntervalCollection {
|
|
26
21
|
private readonly client;
|
|
27
22
|
private readonly label;
|
|
@@ -338,9 +333,9 @@ export declare class IntervalCollection extends TypedEventEmitter<ISequenceInter
|
|
|
338
333
|
detachIndex(index: SequenceIntervalIndex): boolean;
|
|
339
334
|
rollback(op: IIntervalCollectionTypeOperationValue, maybeMetadata: unknown): void;
|
|
340
335
|
process(op: IIntervalCollectionTypeOperationValue, local: boolean, message: ISequencedDocumentMessage, maybeMetadata: unknown): void;
|
|
341
|
-
resubmitMessage(op: IIntervalCollectionTypeOperationValue, maybeMetadata: unknown): void;
|
|
336
|
+
resubmitMessage(op: IIntervalCollectionTypeOperationValue, maybeMetadata: unknown, squash: boolean): void;
|
|
342
337
|
applyStashedOp(op: IIntervalCollectionTypeOperationValue): void;
|
|
343
|
-
private
|
|
338
|
+
private rebaseReferenceWithSegmentSlide;
|
|
344
339
|
private computeRebasedPositions;
|
|
345
340
|
attachGraph(client: Client, label: string): void;
|
|
346
341
|
/**
|
|
@@ -390,7 +385,7 @@ export declare class IntervalCollection extends TypedEventEmitter<ISequenceInter
|
|
|
390
385
|
* to a range that no longer exists, and the interval was unable to slide.
|
|
391
386
|
*
|
|
392
387
|
*/
|
|
393
|
-
rebaseLocalInterval(localOpMetadata: IntervalAddLocalMetadata | IntervalChangeLocalMetadata): SerializedIntervalDelta | undefined;
|
|
388
|
+
rebaseLocalInterval(original: SerializedIntervalDelta, localOpMetadata: IntervalAddLocalMetadata | IntervalChangeLocalMetadata, squash: boolean): SerializedIntervalDelta | undefined;
|
|
394
389
|
private getSlideToSegment;
|
|
395
390
|
private ackInterval;
|
|
396
391
|
ackAdd(serializedInterval: ISerializedInterval, local: boolean, op: ISequencedDocumentMessage, localOpMetadata: IntervalAddLocalMetadata | undefined): SequenceIntervalClass | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intervalCollection.d.ts","sourceRoot":"","sources":["../src/intervalCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,EACN,MAAM,
|
|
1
|
+
{"version":3,"file":"intervalCollection.d.ts","sourceRoot":"","sources":["../src/intervalCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,OAAO,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AoC,CAC1C,WAAW,EAAE,MAAM,GACjB,0BAA0B;IAK7B;;OAEG;IACI,qCAAqC,CAC3C,WAAW,EAAE,MAAM,GACjB,0BAA0B;IAK7B;;OAEG;IACI,sBAAsB,CAC5B,OAAO,EAAE,qBAAqB,EAAE,EAChC,eAAe,EAAE,OAAO,EACxB,KAAK,CAAC,EAAE,MAAM,EACd,GAAG,CAAC,EAAE,MAAM;IAcb;;OAEG;IACI,wBAAwB,CAC9B,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,GACjB,gBAAgB,EAAE;IAWrB;;OAEG;IACI,GAAG,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI;IAUxD;;OAEG;IACI,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;IAQlE;;OAEG;IACI,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,GAAG,SAAS;CAO9D;AASD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,qBAAqB,CAAC;CAChC;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAC1C,iBAAiB,EAAE,sBAAsB,GACvC,eAAe,GAAG,SAAS,CAM7B"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.intervalLocatorFromEndpoint = exports.IntervalCollection = exports.LocalIntervalCollection = exports.
|
|
7
|
+
exports.intervalLocatorFromEndpoint = exports.IntervalCollection = exports.LocalIntervalCollection = exports.toOptionalSequencePlace = exports.toSequencePlace = void 0;
|
|
8
8
|
/* eslint-disable no-bitwise */
|
|
9
9
|
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
10
10
|
const internal_1 = require("@fluidframework/core-utils/internal");
|
|
@@ -18,7 +18,6 @@ function sidesFromStickiness(stickiness) {
|
|
|
18
18
|
const endSide = (stickiness & index_js_2.IntervalStickiness.END) !== 0 ? internal_2.Side.Before : internal_2.Side.After;
|
|
19
19
|
return { startSide, endSide };
|
|
20
20
|
}
|
|
21
|
-
exports.sidesFromStickiness = sidesFromStickiness;
|
|
22
21
|
/**
|
|
23
22
|
* Decompress an interval after loading a summary from JSON. The exact format
|
|
24
23
|
* of this compression is unspecified and subject to change
|
|
@@ -66,17 +65,6 @@ function toOptionalSequencePlace(pos, side) {
|
|
|
66
65
|
return typeof pos === "number" && side !== undefined ? { pos, side } : pos;
|
|
67
66
|
}
|
|
68
67
|
exports.toOptionalSequencePlace = toOptionalSequencePlace;
|
|
69
|
-
function computeStickinessFromSide(startPos = -1, startSide = internal_2.Side.Before, endPos = -1, endSide = internal_2.Side.Before) {
|
|
70
|
-
let stickiness = index_js_2.IntervalStickiness.NONE;
|
|
71
|
-
if (startSide === internal_2.Side.After || startPos === "start") {
|
|
72
|
-
stickiness |= index_js_2.IntervalStickiness.START;
|
|
73
|
-
}
|
|
74
|
-
if (endSide === internal_2.Side.Before || endPos === "end") {
|
|
75
|
-
stickiness |= index_js_2.IntervalStickiness.END;
|
|
76
|
-
}
|
|
77
|
-
return stickiness;
|
|
78
|
-
}
|
|
79
|
-
exports.computeStickinessFromSide = computeStickinessFromSide;
|
|
80
68
|
class LocalIntervalCollection {
|
|
81
69
|
constructor(client, label, options,
|
|
82
70
|
/** Callback invoked each time one of the endpoints of an interval slides. */
|
|
@@ -219,15 +207,15 @@ class IntervalCollectionIterator {
|
|
|
219
207
|
function removeMetadataFromPendingChanges(localOpMetadataNode) {
|
|
220
208
|
const acked = localOpMetadataNode?.remove()
|
|
221
209
|
?.data;
|
|
222
|
-
(0, internal_1.assert)(acked !== undefined,
|
|
210
|
+
(0, internal_1.assert)(acked !== undefined, 0xbbe /* local change must exist */);
|
|
223
211
|
acked.endpointChangesNode?.remove();
|
|
224
212
|
return acked;
|
|
225
213
|
}
|
|
226
214
|
function clearEmptyPendingEntry(pendingChanges, id) {
|
|
227
215
|
const pending = pendingChanges[id];
|
|
228
|
-
(0, internal_1.assert)(pending !== undefined,
|
|
216
|
+
(0, internal_1.assert)(pending !== undefined, 0xbbf /* pending must exist for local process */);
|
|
229
217
|
if (pending.local.empty) {
|
|
230
|
-
(0, internal_1.assert)(pending.endpointChanges?.empty !== false,
|
|
218
|
+
(0, internal_1.assert)(pending.endpointChanges?.empty !== false, 0xbc0 /* endpointChanges must be empty if not pending changes */);
|
|
231
219
|
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
|
232
220
|
delete pendingChanges[id];
|
|
233
221
|
}
|
|
@@ -254,6 +242,7 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
254
242
|
if (md.type === "add" || (md.type === "change" && hasEndpointChanges(op.value))) {
|
|
255
243
|
const endpointChanges = (pending.endpointChanges ??= new internal_2.DoublyLinkedList());
|
|
256
244
|
md.endpointChangesNode = endpointChanges.push(md).last;
|
|
245
|
+
md.rebased = undefined;
|
|
257
246
|
}
|
|
258
247
|
submitDelta(op, pending.local.push(md).last);
|
|
259
248
|
};
|
|
@@ -340,7 +329,7 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
340
329
|
? removeMetadataFromPendingChanges(maybeMetadata)
|
|
341
330
|
: undefined;
|
|
342
331
|
const { opName, value } = op;
|
|
343
|
-
(0, internal_1.assert)((local === false && localOpMetadata === undefined) || opName === localOpMetadata?.type,
|
|
332
|
+
(0, internal_1.assert)((local === false && localOpMetadata === undefined) || opName === localOpMetadata?.type, 0xbc1 /* must be same type */);
|
|
344
333
|
switch (opName) {
|
|
345
334
|
case "add": {
|
|
346
335
|
this.ackAdd(value, local, message,
|
|
@@ -365,12 +354,12 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
365
354
|
clearEmptyPendingEntry(this.pending, id);
|
|
366
355
|
}
|
|
367
356
|
}
|
|
368
|
-
resubmitMessage(op, maybeMetadata) {
|
|
357
|
+
resubmitMessage(op, maybeMetadata, squash) {
|
|
369
358
|
const { opName, value } = op;
|
|
370
359
|
const localOpMetadata = removeMetadataFromPendingChanges(maybeMetadata);
|
|
371
360
|
const rebasedValue = localOpMetadata.endpointChangesNode === undefined
|
|
372
361
|
? value
|
|
373
|
-
: this.rebaseLocalInterval(localOpMetadata);
|
|
362
|
+
: this.rebaseLocalInterval(value, localOpMetadata, squash);
|
|
374
363
|
if (rebasedValue === undefined) {
|
|
375
364
|
const { id } = (0, index_js_2.getSerializedProperties)(value);
|
|
376
365
|
clearEmptyPendingEntry(this.pending, id);
|
|
@@ -408,40 +397,43 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
408
397
|
throw new Error("unknown ops should not be stashed");
|
|
409
398
|
}
|
|
410
399
|
}
|
|
411
|
-
|
|
400
|
+
rebaseReferenceWithSegmentSlide(ref, localSeq, squash) {
|
|
412
401
|
if (!this.client) {
|
|
413
402
|
throw new internal_3.LoggingError("mergeTree client must exist");
|
|
414
403
|
}
|
|
415
|
-
if (pos === "start" || pos === "end") {
|
|
416
|
-
return pos;
|
|
417
|
-
}
|
|
418
404
|
const { clientId } = this.client.getCollabWindow();
|
|
419
|
-
const
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
(0,
|
|
425
|
-
const segoff = (0, internal_2.getSlideToSegoff)({ segment, offset }, undefined, (0, internal_2.createLocalReconnectingPerspective)(this.client.getCurrentSeq(), clientId, localSeq), this.options.mergeTreeReferencesCanSlideToEndpoint);
|
|
405
|
+
const segment = ref.getSegment();
|
|
406
|
+
if (segment?.endpointType) {
|
|
407
|
+
return { segment, offset: 0 };
|
|
408
|
+
}
|
|
409
|
+
const offset = ref.getOffset();
|
|
410
|
+
const segoff = (0, internal_2.getSlideToSegoff)(segment === undefined ? undefined : { segment, offset }, ref.slidingPreference, (0, internal_2.createLocalReconnectingPerspective)(this.client.getCurrentSeq(), clientId, localSeq, squash), ref.canSlideToEndpoint);
|
|
426
411
|
// case happens when rebasing op, but concurrently entire string has been deleted
|
|
427
|
-
if (segoff
|
|
428
|
-
|
|
412
|
+
if (segoff === undefined) {
|
|
413
|
+
if (ref.canSlideToEndpoint !== true) {
|
|
414
|
+
return undefined;
|
|
415
|
+
}
|
|
416
|
+
return {
|
|
417
|
+
segment: ref.slidingPreference === internal_2.SlidingPreference.FORWARD
|
|
418
|
+
? this.client.endOfTree
|
|
419
|
+
: this.client.startOfTree,
|
|
420
|
+
offset: 0,
|
|
421
|
+
};
|
|
429
422
|
}
|
|
430
|
-
|
|
431
|
-
return this.client.findReconnectionPosition(segoff.segment, localSeq) + segoff.offset;
|
|
423
|
+
return segoff;
|
|
432
424
|
}
|
|
433
|
-
computeRebasedPositions(localOpMetadata) {
|
|
425
|
+
computeRebasedPositions(localOpMetadata, squash) {
|
|
434
426
|
(0, internal_1.assert)(this.client !== undefined, 0x550 /* Client should be defined when computing rebased position */);
|
|
435
|
-
const { localSeq,
|
|
436
|
-
const
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
rebased.start = this.rebasePositionWithSegmentSlide(start, sequenceNumber, localSeq);
|
|
427
|
+
const { localSeq, interval } = localOpMetadata;
|
|
428
|
+
const start = this.rebaseReferenceWithSegmentSlide(interval.start, localSeq, squash);
|
|
429
|
+
if (start === undefined) {
|
|
430
|
+
return "detached";
|
|
440
431
|
}
|
|
441
|
-
|
|
442
|
-
|
|
432
|
+
const end = this.rebaseReferenceWithSegmentSlide(interval.end, localSeq, squash);
|
|
433
|
+
if (end === undefined) {
|
|
434
|
+
return "detached";
|
|
443
435
|
}
|
|
444
|
-
return
|
|
436
|
+
return { start, end };
|
|
445
437
|
}
|
|
446
438
|
attachGraph(client, label) {
|
|
447
439
|
if (this.attached) {
|
|
@@ -453,11 +445,11 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
453
445
|
// Instantiate the local interval collection based on the saved intervals
|
|
454
446
|
this.client = client;
|
|
455
447
|
if (client) {
|
|
456
|
-
client.on("normalize", () => {
|
|
448
|
+
client.on("normalize", (squash) => {
|
|
457
449
|
for (const pending of Object.values(this.pending)) {
|
|
458
450
|
if (pending?.endpointChanges !== undefined) {
|
|
459
451
|
for (const local of pending.endpointChanges) {
|
|
460
|
-
local.data.rebased = this.computeRebasedPositions(local.data);
|
|
452
|
+
local.data.rebased = this.computeRebasedPositions(local.data, squash);
|
|
461
453
|
}
|
|
462
454
|
}
|
|
463
455
|
}
|
|
@@ -546,7 +538,7 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
546
538
|
}, {
|
|
547
539
|
type: "add",
|
|
548
540
|
localSeq,
|
|
549
|
-
|
|
541
|
+
interval,
|
|
550
542
|
});
|
|
551
543
|
}
|
|
552
544
|
}
|
|
@@ -636,7 +628,7 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
636
628
|
type: "change",
|
|
637
629
|
localSeq,
|
|
638
630
|
previous: interval.serialize(),
|
|
639
|
-
|
|
631
|
+
interval: newInterval ?? interval,
|
|
640
632
|
};
|
|
641
633
|
this.submitDelta({
|
|
642
634
|
opName: "change",
|
|
@@ -649,8 +641,10 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
649
641
|
}
|
|
650
642
|
if (newInterval) {
|
|
651
643
|
this.emitChange(newInterval, interval, true, false);
|
|
652
|
-
|
|
653
|
-
|
|
644
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
645
|
+
interval.start.properties.interval = undefined;
|
|
646
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
647
|
+
interval.end.properties.interval = undefined;
|
|
654
648
|
}
|
|
655
649
|
return newInterval;
|
|
656
650
|
}
|
|
@@ -733,47 +727,53 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
733
727
|
* to a range that no longer exists, and the interval was unable to slide.
|
|
734
728
|
*
|
|
735
729
|
*/
|
|
736
|
-
rebaseLocalInterval(localOpMetadata) {
|
|
737
|
-
|
|
738
|
-
if (!this.client) {
|
|
730
|
+
rebaseLocalInterval(original, localOpMetadata, squash) {
|
|
731
|
+
if (!this.client || !hasEndpointChanges(original)) {
|
|
739
732
|
// If there's no associated mergeTree client, the originally submitted op is still correct.
|
|
740
733
|
return original;
|
|
741
734
|
}
|
|
742
|
-
if (!this.attached) {
|
|
735
|
+
if (!this.attached || this.localCollection === undefined) {
|
|
743
736
|
throw new internal_3.LoggingError("attachSequence must be called");
|
|
744
737
|
}
|
|
745
|
-
const { localSeq } = localOpMetadata;
|
|
746
|
-
const { intervalType, properties, stickiness, startSide, endSide } = original;
|
|
738
|
+
const { localSeq, interval } = localOpMetadata;
|
|
747
739
|
const { id } = (0, index_js_2.getSerializedProperties)(original);
|
|
748
|
-
const
|
|
749
|
-
|
|
750
|
-
const localInterval = this.localCollection?.idIntervalIndex.getIntervalById(id);
|
|
751
|
-
const rebased = {
|
|
752
|
-
start: startRebased,
|
|
753
|
-
end: endRebased,
|
|
754
|
-
intervalType,
|
|
755
|
-
sequenceNumber: this.client?.getCurrentSeq() ?? 0,
|
|
756
|
-
properties,
|
|
757
|
-
stickiness,
|
|
758
|
-
startSide,
|
|
759
|
-
endSide,
|
|
760
|
-
};
|
|
740
|
+
const rebasedEndpoint = (localOpMetadata.rebased ??= this.computeRebasedPositions(localOpMetadata, squash));
|
|
741
|
+
const localInterval = this.localCollection.idIntervalIndex.getIntervalById(id);
|
|
761
742
|
// if the interval slid off the string, rebase the op to be a noop and delete the interval.
|
|
762
|
-
if (
|
|
763
|
-
(
|
|
764
|
-
|
|
743
|
+
if (rebasedEndpoint === "detached") {
|
|
744
|
+
if (localInterval !== undefined &&
|
|
745
|
+
(localInterval === interval || localOpMetadata.type === "add")) {
|
|
765
746
|
this.localCollection?.removeExistingInterval(localInterval);
|
|
766
747
|
}
|
|
767
748
|
return undefined;
|
|
768
749
|
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
750
|
+
const { start, end } = rebasedEndpoint;
|
|
751
|
+
if (interval.start.getSegment() !== start.segment ||
|
|
752
|
+
interval.start.getOffset() !== start.offset ||
|
|
753
|
+
interval.end.getSegment() !== end.segment ||
|
|
754
|
+
interval.end.getOffset() !== end.offset) {
|
|
755
|
+
if (localInterval === interval) {
|
|
756
|
+
this.localCollection.removeExistingInterval(localInterval);
|
|
757
|
+
}
|
|
758
|
+
const old = interval.clone();
|
|
759
|
+
interval.moveEndpointReferences(rebasedEndpoint);
|
|
760
|
+
if (localInterval === interval) {
|
|
761
|
+
this.localCollection.add(interval);
|
|
762
|
+
this.emitChange(interval, old, true, true);
|
|
763
|
+
}
|
|
764
|
+
this.client.removeLocalReferencePosition(old.start);
|
|
765
|
+
this.client.removeLocalReferencePosition(old.end);
|
|
773
766
|
}
|
|
774
|
-
return
|
|
767
|
+
return {
|
|
768
|
+
...original,
|
|
769
|
+
start: start.segment.endpointType ??
|
|
770
|
+
this.client.findReconnectionPosition(start.segment, localSeq) + start.offset,
|
|
771
|
+
end: end.segment.endpointType ??
|
|
772
|
+
this.client.findReconnectionPosition(end.segment, localSeq) + end.offset,
|
|
773
|
+
sequenceNumber: this.client?.getCurrentSeq() ?? 0,
|
|
774
|
+
};
|
|
775
775
|
}
|
|
776
|
-
getSlideToSegment(lref
|
|
776
|
+
getSlideToSegment(lref) {
|
|
777
777
|
if (!this.client) {
|
|
778
778
|
throw new internal_3.LoggingError("client does not exist");
|
|
779
779
|
}
|
|
@@ -788,15 +788,15 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
788
788
|
if (segoff.segment.localRefs?.has(lref) !== true) {
|
|
789
789
|
return undefined;
|
|
790
790
|
}
|
|
791
|
-
return (0, internal_2.getSlideToSegoff)(segoff, slidingPreference, undefined,
|
|
791
|
+
return (0, internal_2.getSlideToSegoff)(segoff, lref.slidingPreference, undefined, lref.canSlideToEndpoint);
|
|
792
792
|
}
|
|
793
793
|
ackInterval(interval, op) {
|
|
794
794
|
if (!(0, internal_2.refTypeIncludesFlag)(interval.start, internal_2.ReferenceType.StayOnRemove) &&
|
|
795
795
|
!(0, internal_2.refTypeIncludesFlag)(interval.end, internal_2.ReferenceType.StayOnRemove)) {
|
|
796
796
|
return;
|
|
797
797
|
}
|
|
798
|
-
const newStart = this.getSlideToSegment(interval.start
|
|
799
|
-
const newEnd = this.getSlideToSegment(interval.end
|
|
798
|
+
const newStart = this.getSlideToSegment(interval.start);
|
|
799
|
+
const newEnd = this.getSlideToSegment(interval.end);
|
|
800
800
|
const id = interval.getIntervalId();
|
|
801
801
|
const hasPendingChange = this.hasPendingEndpointChanges(id);
|
|
802
802
|
if (!hasPendingChange) {
|
|
@@ -820,7 +820,14 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
820
820
|
}
|
|
821
821
|
if (needsStartUpdate) {
|
|
822
822
|
const props = interval.start.properties;
|
|
823
|
-
interval.start = (0, index_js_2.createPositionReferenceFromSegoff)(
|
|
823
|
+
interval.start = (0, index_js_2.createPositionReferenceFromSegoff)({
|
|
824
|
+
client: this.client,
|
|
825
|
+
segoff: newStart,
|
|
826
|
+
refType: interval.start.refType,
|
|
827
|
+
op,
|
|
828
|
+
slidingPreference: interval.start.slidingPreference,
|
|
829
|
+
canSlideToEndpoint: interval.start.canSlideToEndpoint,
|
|
830
|
+
});
|
|
824
831
|
if (props) {
|
|
825
832
|
interval.start.addProperties(props);
|
|
826
833
|
}
|
|
@@ -832,7 +839,14 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
|
|
|
832
839
|
}
|
|
833
840
|
if (needsEndUpdate) {
|
|
834
841
|
const props = interval.end.properties;
|
|
835
|
-
interval.end = (0, index_js_2.createPositionReferenceFromSegoff)(
|
|
842
|
+
interval.end = (0, index_js_2.createPositionReferenceFromSegoff)({
|
|
843
|
+
client: this.client,
|
|
844
|
+
segoff: newEnd,
|
|
845
|
+
refType: interval.end.refType,
|
|
846
|
+
op,
|
|
847
|
+
slidingPreference: interval.end.slidingPreference,
|
|
848
|
+
canSlideToEndpoint: interval.end.canSlideToEndpoint,
|
|
849
|
+
});
|
|
836
850
|
if (props) {
|
|
837
851
|
interval.end.addProperties(props);
|
|
838
852
|
}
|