@fluidframework/sequence 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.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 +23 -0
- package/README.md +1 -1
- package/api-report/sequence.api.md +32 -32
- package/beta.d.ts +11 -0
- package/dist/{localValues.d.ts → IntervalCollectionValues.d.ts} +13 -12
- package/dist/IntervalCollectionValues.d.ts.map +1 -0
- package/dist/{localValues.js → IntervalCollectionValues.js} +6 -6
- package/dist/IntervalCollectionValues.js.map +1 -0
- package/dist/beta.d.ts +12 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/intervalCollection.d.ts +10 -10
- package/dist/intervalCollection.d.ts.map +1 -1
- package/dist/intervalCollection.js +103 -99
- package/dist/intervalCollection.js.map +1 -1
- package/dist/{defaultMap.d.ts → intervalCollectionMap.d.ts} +11 -44
- package/dist/intervalCollectionMap.d.ts.map +1 -0
- package/dist/{defaultMap.js → intervalCollectionMap.js} +15 -70
- package/dist/intervalCollectionMap.js.map +1 -0
- package/dist/{defaultMapInterfaces.d.ts → intervalCollectionMapInterfaces.d.ts} +17 -16
- package/dist/intervalCollectionMapInterfaces.d.ts.map +1 -0
- package/dist/{defaultMapInterfaces.js → intervalCollectionMapInterfaces.js} +1 -1
- package/dist/intervalCollectionMapInterfaces.js.map +1 -0
- package/dist/intervalIndex/endpointInRangeIndex.d.ts +1 -1
- package/dist/intervalIndex/endpointInRangeIndex.d.ts.map +1 -1
- package/dist/intervalIndex/endpointInRangeIndex.js +3 -3
- package/dist/intervalIndex/endpointInRangeIndex.js.map +1 -1
- package/dist/intervalIndex/endpointIndex.d.ts +1 -1
- package/dist/intervalIndex/endpointIndex.d.ts.map +1 -1
- package/dist/intervalIndex/endpointIndex.js +3 -3
- package/dist/intervalIndex/endpointIndex.js.map +1 -1
- package/dist/intervalIndex/idIntervalIndex.d.ts.map +1 -1
- package/dist/intervalIndex/idIntervalIndex.js +3 -3
- package/dist/intervalIndex/idIntervalIndex.js.map +1 -1
- package/dist/intervalIndex/overlappingIntervalsIndex.d.ts +3 -3
- package/dist/intervalIndex/overlappingIntervalsIndex.d.ts.map +1 -1
- package/dist/intervalIndex/overlappingIntervalsIndex.js +2 -3
- package/dist/intervalIndex/overlappingIntervalsIndex.js.map +1 -1
- package/dist/intervalIndex/overlappingSequenceIntervalsIndex.d.ts.map +1 -1
- package/dist/intervalIndex/overlappingSequenceIntervalsIndex.js +6 -6
- package/dist/intervalIndex/overlappingSequenceIntervalsIndex.js.map +1 -1
- package/dist/intervalIndex/sequenceIntervalIndexes.d.ts +1 -1
- package/dist/intervalIndex/sequenceIntervalIndexes.d.ts.map +1 -1
- package/dist/intervalIndex/sequenceIntervalIndexes.js.map +1 -1
- package/dist/intervalIndex/startpointInRangeIndex.d.ts +1 -1
- package/dist/intervalIndex/startpointInRangeIndex.d.ts.map +1 -1
- package/dist/intervalIndex/startpointInRangeIndex.js +3 -3
- package/dist/intervalIndex/startpointInRangeIndex.js.map +1 -1
- package/dist/intervalTree.d.ts +1 -1
- package/dist/intervalTree.d.ts.map +1 -1
- package/dist/intervalTree.js +2 -2
- package/dist/intervalTree.js.map +1 -1
- package/dist/intervals/interval.d.ts +1 -1
- package/dist/intervals/interval.d.ts.map +1 -1
- package/dist/intervals/interval.js +10 -10
- package/dist/intervals/interval.js.map +1 -1
- package/dist/intervals/intervalUtils.d.ts +1 -1
- package/dist/intervals/intervalUtils.d.ts.map +1 -1
- package/dist/intervals/intervalUtils.js +5 -5
- package/dist/intervals/intervalUtils.js.map +1 -1
- package/dist/intervals/sequenceInterval.d.ts +1 -1
- package/dist/intervals/sequenceInterval.d.ts.map +1 -1
- package/dist/intervals/sequenceInterval.js +34 -34
- package/dist/intervals/sequenceInterval.js.map +1 -1
- package/dist/legacy.d.ts +61 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/public.d.ts +12 -0
- package/dist/revertibles.d.ts +2 -2
- package/dist/revertibles.d.ts.map +1 -1
- package/dist/revertibles.js +34 -34
- package/dist/revertibles.js.map +1 -1
- package/dist/sequence.d.ts +7 -6
- package/dist/sequence.d.ts.map +1 -1
- package/dist/sequence.js +34 -34
- package/dist/sequence.js.map +1 -1
- package/dist/sequenceDeltaEvent.d.ts +1 -1
- package/dist/sequenceDeltaEvent.d.ts.map +1 -1
- package/dist/sequenceDeltaEvent.js +4 -4
- package/dist/sequenceDeltaEvent.js.map +1 -1
- package/dist/sequenceFactory.d.ts +1 -1
- package/dist/sequenceFactory.d.ts.map +1 -1
- package/dist/sequenceFactory.js +3 -3
- package/dist/sequenceFactory.js.map +1 -1
- package/dist/sharedIntervalCollection.d.ts +4 -3
- package/dist/sharedIntervalCollection.d.ts.map +1 -1
- package/dist/sharedIntervalCollection.js +5 -5
- package/dist/sharedIntervalCollection.js.map +1 -1
- package/dist/sharedSequence.d.ts +3 -2
- package/dist/sharedSequence.d.ts.map +1 -1
- package/dist/sharedSequence.js +4 -4
- package/dist/sharedSequence.js.map +1 -1
- package/dist/sharedString.d.ts +2 -2
- package/dist/sharedString.d.ts.map +1 -1
- package/dist/sharedString.js +9 -9
- package/dist/sharedString.js.map +1 -1
- package/internal.d.ts +11 -0
- package/legacy.d.ts +11 -0
- package/lib/{localValues.d.ts → IntervalCollectionValues.d.ts} +13 -12
- package/lib/IntervalCollectionValues.d.ts.map +1 -0
- package/lib/{localValues.js → IntervalCollectionValues.js} +3 -3
- package/lib/IntervalCollectionValues.js.map +1 -0
- package/lib/beta.d.ts +12 -0
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/intervalCollection.d.ts +10 -10
- package/lib/intervalCollection.d.ts.map +1 -1
- package/lib/intervalCollection.js +8 -4
- package/lib/intervalCollection.js.map +1 -1
- package/lib/{defaultMap.d.ts → intervalCollectionMap.d.ts} +11 -44
- package/lib/intervalCollectionMap.d.ts.map +1 -0
- package/lib/{defaultMap.js → intervalCollectionMap.js} +8 -63
- package/lib/intervalCollectionMap.js.map +1 -0
- package/lib/{defaultMapInterfaces.d.ts → intervalCollectionMapInterfaces.d.ts} +17 -16
- package/lib/intervalCollectionMapInterfaces.d.ts.map +1 -0
- package/lib/{defaultMapInterfaces.js → intervalCollectionMapInterfaces.js} +1 -1
- package/lib/intervalCollectionMapInterfaces.js.map +1 -0
- package/lib/intervalIndex/endpointInRangeIndex.d.ts +1 -1
- package/lib/intervalIndex/endpointInRangeIndex.d.ts.map +1 -1
- package/lib/intervalIndex/endpointInRangeIndex.js +1 -1
- package/lib/intervalIndex/endpointInRangeIndex.js.map +1 -1
- package/lib/intervalIndex/endpointIndex.d.ts +1 -1
- package/lib/intervalIndex/endpointIndex.d.ts.map +1 -1
- package/lib/intervalIndex/endpointIndex.js +1 -1
- package/lib/intervalIndex/endpointIndex.js.map +1 -1
- package/lib/intervalIndex/idIntervalIndex.d.ts.map +1 -1
- package/lib/intervalIndex/idIntervalIndex.js +1 -1
- package/lib/intervalIndex/idIntervalIndex.js.map +1 -1
- package/lib/intervalIndex/overlappingIntervalsIndex.d.ts +3 -3
- package/lib/intervalIndex/overlappingIntervalsIndex.d.ts.map +1 -1
- package/lib/intervalIndex/overlappingIntervalsIndex.js +2 -3
- package/lib/intervalIndex/overlappingIntervalsIndex.js.map +1 -1
- package/lib/intervalIndex/overlappingSequenceIntervalsIndex.d.ts.map +1 -1
- package/lib/intervalIndex/overlappingSequenceIntervalsIndex.js +2 -2
- package/lib/intervalIndex/overlappingSequenceIntervalsIndex.js.map +1 -1
- package/lib/intervalIndex/sequenceIntervalIndexes.d.ts +1 -1
- package/lib/intervalIndex/sequenceIntervalIndexes.d.ts.map +1 -1
- package/lib/intervalIndex/sequenceIntervalIndexes.js.map +1 -1
- package/lib/intervalIndex/startpointInRangeIndex.d.ts +1 -1
- package/lib/intervalIndex/startpointInRangeIndex.d.ts.map +1 -1
- package/lib/intervalIndex/startpointInRangeIndex.js +1 -1
- package/lib/intervalIndex/startpointInRangeIndex.js.map +1 -1
- package/lib/intervalTree.d.ts +1 -1
- package/lib/intervalTree.d.ts.map +1 -1
- package/lib/intervalTree.js +1 -1
- package/lib/intervalTree.js.map +1 -1
- package/lib/intervals/interval.d.ts +1 -1
- package/lib/intervals/interval.d.ts.map +1 -1
- package/lib/intervals/interval.js +3 -3
- package/lib/intervals/interval.js.map +1 -1
- package/lib/intervals/intervalUtils.d.ts +1 -1
- package/lib/intervals/intervalUtils.d.ts.map +1 -1
- package/lib/intervals/intervalUtils.js +1 -1
- package/lib/intervals/intervalUtils.js.map +1 -1
- package/lib/intervals/sequenceInterval.d.ts +1 -1
- package/lib/intervals/sequenceInterval.d.ts.map +1 -1
- package/lib/intervals/sequenceInterval.js +3 -3
- package/lib/intervals/sequenceInterval.js.map +1 -1
- package/lib/legacy.d.ts +61 -0
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/public.d.ts +12 -0
- package/lib/revertibles.d.ts +2 -2
- package/lib/revertibles.d.ts.map +1 -1
- package/lib/revertibles.js +3 -4
- package/lib/revertibles.js.map +1 -1
- package/lib/sequence.d.ts +7 -6
- package/lib/sequence.d.ts.map +1 -1
- package/lib/sequence.js +11 -12
- package/lib/sequence.js.map +1 -1
- package/lib/sequenceDeltaEvent.d.ts +1 -1
- package/lib/sequenceDeltaEvent.d.ts.map +1 -1
- package/lib/sequenceDeltaEvent.js +3 -4
- package/lib/sequenceDeltaEvent.js.map +1 -1
- package/lib/sequenceFactory.d.ts +1 -1
- package/lib/sequenceFactory.d.ts.map +1 -1
- package/lib/sequenceFactory.js +1 -1
- package/lib/sequenceFactory.js.map +1 -1
- package/lib/sharedIntervalCollection.d.ts +4 -3
- package/lib/sharedIntervalCollection.d.ts.map +1 -1
- package/lib/sharedIntervalCollection.js +4 -4
- package/lib/sharedIntervalCollection.js.map +1 -1
- package/lib/sharedSequence.d.ts +3 -2
- package/lib/sharedSequence.d.ts.map +1 -1
- package/lib/sharedSequence.js +2 -2
- package/lib/sharedSequence.js.map +1 -1
- package/lib/sharedString.d.ts +2 -2
- package/lib/sharedString.d.ts.map +1 -1
- package/lib/sharedString.js +1 -1
- package/lib/sharedString.js.map +1 -1
- package/package.json +41 -58
- package/src/{localValues.ts → IntervalCollectionValues.ts} +26 -18
- package/src/index.ts +2 -2
- package/src/intervalCollection.ts +46 -47
- package/src/{defaultMap.ts → intervalCollectionMap.ts} +42 -105
- package/src/{defaultMapInterfaces.ts → intervalCollectionMapInterfaces.ts} +26 -16
- package/src/intervalIndex/endpointInRangeIndex.ts +4 -1
- package/src/intervalIndex/endpointIndex.ts +4 -1
- package/src/intervalIndex/idIntervalIndex.ts +4 -2
- package/src/intervalIndex/overlappingIntervalsIndex.ts +8 -5
- package/src/intervalIndex/overlappingSequenceIntervalsIndex.ts +6 -3
- package/src/intervalIndex/sequenceIntervalIndexes.ts +3 -1
- package/src/intervalIndex/startpointInRangeIndex.ts +4 -1
- package/src/intervalTree.ts +4 -3
- package/src/intervals/interval.ts +6 -3
- package/src/intervals/intervalUtils.ts +4 -2
- package/src/intervals/sequenceInterval.ts +5 -3
- package/src/packageVersion.ts +1 -1
- package/src/revertibles.ts +10 -10
- package/src/sequence.ts +24 -31
- package/src/sequenceDeltaEvent.ts +3 -4
- package/src/sequenceFactory.ts +4 -3
- package/src/sharedIntervalCollection.ts +12 -18
- package/src/sharedSequence.ts +9 -6
- package/src/sharedString.ts +4 -3
- package/api-extractor-cjs.json +0 -8
- package/dist/defaultMap.d.ts.map +0 -1
- package/dist/defaultMap.js.map +0 -1
- package/dist/defaultMapInterfaces.d.ts.map +0 -1
- package/dist/defaultMapInterfaces.js.map +0 -1
- package/dist/localValues.d.ts.map +0 -1
- package/dist/localValues.js.map +0 -1
- package/dist/sequence-alpha.d.ts +0 -1432
- package/dist/sequence-beta.d.ts +0 -246
- package/dist/sequence-public.d.ts +0 -246
- package/dist/sequence-untrimmed.d.ts +0 -1820
- package/lib/defaultMap.d.ts.map +0 -1
- package/lib/defaultMap.js.map +0 -1
- package/lib/defaultMapInterfaces.d.ts.map +0 -1
- package/lib/defaultMapInterfaces.js.map +0 -1
- package/lib/localValues.d.ts.map +0 -1
- package/lib/localValues.js.map +0 -1
- package/lib/sequence-alpha.d.ts +0 -1432
- package/lib/sequence-beta.d.ts +0 -246
- package/lib/sequence-public.d.ts +0 -246
- package/lib/sequence-untrimmed.d.ts +0 -1820
- package/lib/test/collections.intervalTree.js +0 -73
- package/lib/test/collections.intervalTree.js.map +0 -1
- package/lib/test/createSnapshotFiles.js +0 -15
- package/lib/test/createSnapshotFiles.js.map +0 -1
- package/lib/test/dirname.cjs +0 -16
- package/lib/test/dirname.cjs.map +0 -1
- package/lib/test/endpointInRangeIndex.spec.js +0 -182
- package/lib/test/endpointInRangeIndex.spec.js.map +0 -1
- package/lib/test/fuzz/fuzzUtils.js +0 -250
- package/lib/test/fuzz/fuzzUtils.js.map +0 -1
- package/lib/test/fuzz/intervalCollection.fuzz.spec.js +0 -200
- package/lib/test/fuzz/intervalCollection.fuzz.spec.js.map +0 -1
- package/lib/test/fuzz/intervalRevertibles.fuzz.spec.js +0 -129
- package/lib/test/fuzz/intervalRevertibles.fuzz.spec.js.map +0 -1
- package/lib/test/fuzz/sharedString.fuzz.spec.js +0 -91
- package/lib/test/fuzz/sharedString.fuzz.spec.js.map +0 -1
- package/lib/test/generateSharedStrings.js +0 -138
- package/lib/test/generateSharedStrings.js.map +0 -1
- package/lib/test/intervalCollection.detached.spec.js +0 -126
- package/lib/test/intervalCollection.detached.spec.js.map +0 -1
- package/lib/test/intervalCollection.events.spec.js +0 -491
- package/lib/test/intervalCollection.events.spec.js.map +0 -1
- package/lib/test/intervalCollection.perf.spec.js +0 -88
- package/lib/test/intervalCollection.perf.spec.js.map +0 -1
- package/lib/test/intervalCollection.snapshot.spec.js +0 -171
- package/lib/test/intervalCollection.snapshot.spec.js.map +0 -1
- package/lib/test/intervalCollection.spec.js +0 -1660
- package/lib/test/intervalCollection.spec.js.map +0 -1
- package/lib/test/intervalIndexTestUtils.js +0 -49
- package/lib/test/intervalIndexTestUtils.js.map +0 -1
- package/lib/test/intervalRebasing.spec.js +0 -589
- package/lib/test/intervalRebasing.spec.js.map +0 -1
- package/lib/test/intervalStashedOps.spec.js +0 -142
- package/lib/test/intervalStashedOps.spec.js.map +0 -1
- package/lib/test/intervalTestUtils.js +0 -81
- package/lib/test/intervalTestUtils.js.map +0 -1
- package/lib/test/marshalling.spec.js +0 -55
- package/lib/test/marshalling.spec.js.map +0 -1
- package/lib/test/memory/sharedSequence.spec.js +0 -82
- package/lib/test/memory/sharedSequence.spec.js.map +0 -1
- package/lib/test/memory/sharedString.spec.js +0 -134
- package/lib/test/memory/sharedString.spec.js.map +0 -1
- package/lib/test/overlappingSequenceIntervalsIndex.spec.js +0 -348
- package/lib/test/overlappingSequenceIntervalsIndex.spec.js.map +0 -1
- package/lib/test/partialLoad.spec.js +0 -211
- package/lib/test/partialLoad.spec.js.map +0 -1
- package/lib/test/rebasing.spec.js +0 -81
- package/lib/test/rebasing.spec.js.map +0 -1
- package/lib/test/reentrancy.spec.js +0 -174
- package/lib/test/reentrancy.spec.js.map +0 -1
- package/lib/test/revertibles.spec.js +0 -971
- package/lib/test/revertibles.spec.js.map +0 -1
- package/lib/test/sequenceDeltaEvent.spec.js +0 -2144
- package/lib/test/sequenceDeltaEvent.spec.js.map +0 -1
- package/lib/test/sharedIntervalCollection.spec.js +0 -159
- package/lib/test/sharedIntervalCollection.spec.js.map +0 -1
- package/lib/test/sharedString.spec.js +0 -532
- package/lib/test/sharedString.spec.js.map +0 -1
- package/lib/test/snapshotEmptyProps.spec.js +0 -45
- package/lib/test/snapshotEmptyProps.spec.js.map +0 -1
- package/lib/test/snapshotVersion.spec.js +0 -149
- package/lib/test/snapshotVersion.spec.js.map +0 -1
- package/lib/test/startpointInRangeIndex.spec.js +0 -182
- package/lib/test/startpointInRangeIndex.spec.js.map +0 -1
- package/lib/test/subSequence.spec.js +0 -92
- package/lib/test/subSequence.spec.js.map +0 -1
- package/lib/test/types/validateSequencePrevious.generated.js +0 -162
- package/lib/test/types/validateSequencePrevious.generated.js.map +0 -1
- package/lib/test/v1IntervalCollectionHelpers.js +0 -93
- package/lib/test/v1IntervalCollectionHelpers.js.map +0 -1
- /package/{dist → lib}/tsdoc-metadata.json +0 -0
|
@@ -3,40 +3,45 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
7
|
import { IFluidHandle } from "@fluidframework/core-interfaces";
|
|
8
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
9
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
8
|
-
import { IFluidSerializer
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
import {
|
|
10
|
+
import { IFluidSerializer } from "@fluidframework/shared-object-base";
|
|
11
|
+
import { ValueType } from "@fluidframework/shared-object-base/internal";
|
|
12
|
+
|
|
13
|
+
import { IntervalCollectionTypeLocalValue, makeSerializable } from "./IntervalCollectionValues.js";
|
|
14
|
+
import {
|
|
15
|
+
type IntervalCollection,
|
|
16
|
+
reservedIntervalIdKey,
|
|
17
|
+
toOptionalSequencePlace,
|
|
18
|
+
toSequencePlace,
|
|
19
|
+
} from "./intervalCollection.js";
|
|
12
20
|
import {
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
IIntervalCollectionType,
|
|
22
|
+
IIntervalCollectionTypeOperationValue,
|
|
23
|
+
IMapMessageLocalMetadata,
|
|
24
|
+
ISerializableIntervalCollection,
|
|
25
|
+
ISharedDefaultMapEvents,
|
|
15
26
|
IValueChanged,
|
|
16
27
|
// eslint-disable-next-line import/no-deprecated
|
|
17
28
|
IValueOpEmitter,
|
|
18
|
-
IValueType,
|
|
19
|
-
ISharedDefaultMapEvents,
|
|
20
|
-
IMapMessageLocalMetadata,
|
|
21
29
|
SequenceOptions,
|
|
22
|
-
|
|
23
|
-
} from "./defaultMapInterfaces.js";
|
|
24
|
-
import { SerializedIntervalDelta, IntervalDeltaOpType } from "./intervals/index.js";
|
|
30
|
+
} from "./intervalCollectionMapInterfaces.js";
|
|
25
31
|
import {
|
|
26
|
-
type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} from "./intervalCollection.js";
|
|
32
|
+
type ISerializableInterval,
|
|
33
|
+
IntervalDeltaOpType,
|
|
34
|
+
SerializedIntervalDelta,
|
|
35
|
+
} from "./intervals/index.js";
|
|
31
36
|
|
|
32
37
|
function isMapOperation(op: unknown): op is IMapOperation {
|
|
33
38
|
return typeof op === "object" && op !== null && "type" in op && op.type === "act";
|
|
34
39
|
}
|
|
35
40
|
|
|
36
41
|
/**
|
|
37
|
-
*
|
|
42
|
+
* Description of a map delta operation
|
|
38
43
|
*/
|
|
39
|
-
export interface
|
|
44
|
+
export interface IMapOperation {
|
|
40
45
|
/**
|
|
41
46
|
* String identifier of the operation type.
|
|
42
47
|
*/
|
|
@@ -50,24 +55,14 @@ export interface IMapValueTypeOperation {
|
|
|
50
55
|
/**
|
|
51
56
|
* Value of the operation, specific to the value type.
|
|
52
57
|
*/
|
|
53
|
-
value:
|
|
58
|
+
value: IIntervalCollectionTypeOperationValue;
|
|
54
59
|
}
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Description of a map delta operation
|
|
58
|
-
*/
|
|
59
|
-
export type IMapOperation = IMapValueTypeOperation;
|
|
60
|
-
|
|
61
60
|
/**
|
|
62
61
|
* Defines the in-memory object structure to be used for the conversion to/from serialized.
|
|
63
62
|
* Directly used in JSON.stringify, direct result from JSON.parse
|
|
64
63
|
*/
|
|
65
64
|
export interface IMapDataObjectSerializable {
|
|
66
|
-
[key: string]:
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface IMapDataObjectSerialized {
|
|
70
|
-
[key: string]: ISerializedValue;
|
|
65
|
+
[key: string]: ISerializableIntervalCollection;
|
|
71
66
|
}
|
|
72
67
|
|
|
73
68
|
/**
|
|
@@ -77,7 +72,7 @@ export interface IMapDataObjectSerialized {
|
|
|
77
72
|
* Creation of values is implicit on access (either via `get` or a remote op application referring to
|
|
78
73
|
* a collection that wasn't previously known)
|
|
79
74
|
*/
|
|
80
|
-
export class
|
|
75
|
+
export class IntervalCollectionMap<T extends ISerializableInterval> {
|
|
81
76
|
/**
|
|
82
77
|
* The number of key/value pairs stored in the map.
|
|
83
78
|
*/
|
|
@@ -90,7 +85,7 @@ export class DefaultMap<T extends IntervalCollection<any> = IntervalCollection<a
|
|
|
90
85
|
*/
|
|
91
86
|
private readonly messageHandler = {
|
|
92
87
|
process: (
|
|
93
|
-
op:
|
|
88
|
+
op: IMapOperation,
|
|
94
89
|
local: boolean,
|
|
95
90
|
message: ISequencedDocumentMessage,
|
|
96
91
|
localOpMetadata: IMapMessageLocalMetadata,
|
|
@@ -103,10 +98,10 @@ export class DefaultMap<T extends IntervalCollection<any> = IntervalCollection<a
|
|
|
103
98
|
const event: IValueChanged = { key: op.key, previousValue };
|
|
104
99
|
this.eventEmitter.emit("valueChanged", event, local, message, this.eventEmitter);
|
|
105
100
|
},
|
|
106
|
-
submit: (op:
|
|
101
|
+
submit: (op: IMapOperation, localOpMetadata: IMapMessageLocalMetadata) => {
|
|
107
102
|
this.submitMessage(op, localOpMetadata);
|
|
108
103
|
},
|
|
109
|
-
resubmit: (op:
|
|
104
|
+
resubmit: (op: IMapOperation, localOpMetadata: IMapMessageLocalMetadata) => {
|
|
110
105
|
const localValue = this.data.get(op.key);
|
|
111
106
|
|
|
112
107
|
assert(localValue !== undefined, 0x3f8 /* Local value expected on resubmission */);
|
|
@@ -123,7 +118,7 @@ export class DefaultMap<T extends IntervalCollection<any> = IntervalCollection<a
|
|
|
123
118
|
/**
|
|
124
119
|
* The in-memory data the map is storing.
|
|
125
120
|
*/
|
|
126
|
-
private readonly data = new Map<string,
|
|
121
|
+
private readonly data = new Map<string, IntervalCollectionTypeLocalValue<T>>();
|
|
127
122
|
|
|
128
123
|
/**
|
|
129
124
|
* Create a new default map.
|
|
@@ -137,10 +132,10 @@ export class DefaultMap<T extends IntervalCollection<any> = IntervalCollection<a
|
|
|
137
132
|
private readonly serializer: IFluidSerializer,
|
|
138
133
|
private readonly handle: IFluidHandle,
|
|
139
134
|
private readonly submitMessage: (
|
|
140
|
-
op:
|
|
135
|
+
op: IMapOperation,
|
|
141
136
|
localOpMetadata: IMapMessageLocalMetadata,
|
|
142
137
|
) => void,
|
|
143
|
-
private readonly type:
|
|
138
|
+
private readonly type: IIntervalCollectionType<T>,
|
|
144
139
|
private readonly options?: Partial<SequenceOptions>,
|
|
145
140
|
public readonly eventEmitter = new TypedEventEmitter<ISharedDefaultMapEvents>(),
|
|
146
141
|
) {}
|
|
@@ -153,26 +148,6 @@ export class DefaultMap<T extends IntervalCollection<any> = IntervalCollection<a
|
|
|
153
148
|
return this.data.keys();
|
|
154
149
|
}
|
|
155
150
|
|
|
156
|
-
/**
|
|
157
|
-
* Get an iterator over the entries in this map.
|
|
158
|
-
* @returns The iterator
|
|
159
|
-
*/
|
|
160
|
-
public entries(): IterableIterator<[string, any]> {
|
|
161
|
-
const localEntriesIterator = this.data.entries();
|
|
162
|
-
const iterator = {
|
|
163
|
-
next(): IteratorResult<[string, any]> {
|
|
164
|
-
const nextVal = localEntriesIterator.next();
|
|
165
|
-
return nextVal.done
|
|
166
|
-
? { value: undefined, done: true }
|
|
167
|
-
: { value: [nextVal.value[0], nextVal.value[1].value], done: false }; // Unpack the stored value
|
|
168
|
-
},
|
|
169
|
-
[Symbol.iterator]() {
|
|
170
|
-
return this;
|
|
171
|
-
},
|
|
172
|
-
};
|
|
173
|
-
return iterator;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
151
|
/**
|
|
177
152
|
* Get an iterator over the values in this map.
|
|
178
153
|
* @returns The iterator
|
|
@@ -192,56 +167,15 @@ export class DefaultMap<T extends IntervalCollection<any> = IntervalCollection<a
|
|
|
192
167
|
};
|
|
193
168
|
return iterator;
|
|
194
169
|
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Get an iterator over the entries in this map.
|
|
198
|
-
* @returns The iterator
|
|
199
|
-
*/
|
|
200
|
-
public [Symbol.iterator](): IterableIterator<[string, any]> {
|
|
201
|
-
return this.entries();
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Executes the given callback on each entry in the map.
|
|
206
|
-
* @param callbackFn - Callback function
|
|
207
|
-
*/
|
|
208
|
-
public forEach(callbackFn: (value: any, key: string, map: Map<string, any>) => void): void {
|
|
209
|
-
this.data.forEach((localValue, key, m) => {
|
|
210
|
-
callbackFn(localValue.value, key, m);
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
|
|
214
170
|
/**
|
|
215
171
|
* {@inheritDoc ISharedMap.get}
|
|
216
172
|
*/
|
|
217
|
-
public get(key: string): T {
|
|
173
|
+
public get(key: string): IntervalCollection<T> {
|
|
218
174
|
const localValue = this.data.get(key) ?? this.createCore(key, true);
|
|
219
175
|
|
|
220
176
|
return localValue.value;
|
|
221
177
|
}
|
|
222
178
|
|
|
223
|
-
/**
|
|
224
|
-
* Check if a key exists in the map.
|
|
225
|
-
* @param key - The key to check
|
|
226
|
-
* @returns True if the key exists, false otherwise
|
|
227
|
-
*/
|
|
228
|
-
public has(key: string): boolean {
|
|
229
|
-
return this.data.has(key);
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
* Serializes the data stored in the shared map to a JSON string
|
|
234
|
-
* @param serializer - The serializer to use to serialize handles in its values.
|
|
235
|
-
* @returns A JSON string containing serialized map data
|
|
236
|
-
*/
|
|
237
|
-
public getSerializedStorage(serializer: IFluidSerializer): IMapDataObjectSerialized {
|
|
238
|
-
const serializableMapData: IMapDataObjectSerialized = {};
|
|
239
|
-
this.data.forEach((localValue, key) => {
|
|
240
|
-
serializableMapData[key] = localValue.makeSerialized(serializer, this.handle);
|
|
241
|
-
});
|
|
242
|
-
return serializableMapData;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
179
|
public getSerializableStorage(serializer: IFluidSerializer): IMapDataObjectSerializable {
|
|
246
180
|
const serializableMapData: IMapDataObjectSerializable = {};
|
|
247
181
|
this.data.forEach((localValue, key) => {
|
|
@@ -373,8 +307,8 @@ export class DefaultMap<T extends IntervalCollection<any> = IntervalCollection<a
|
|
|
373
307
|
* @param key - The key being initialized
|
|
374
308
|
* @param local - Whether the message originated from the local client
|
|
375
309
|
*/
|
|
376
|
-
private createCore(key: string, local: boolean):
|
|
377
|
-
const localValue = new
|
|
310
|
+
private createCore(key: string, local: boolean): IntervalCollectionTypeLocalValue<T> {
|
|
311
|
+
const localValue = new IntervalCollectionTypeLocalValue(
|
|
378
312
|
this.type.factory.load(this.makeMapValueOpEmitter(key), undefined, this.options),
|
|
379
313
|
this.type,
|
|
380
314
|
);
|
|
@@ -395,7 +329,10 @@ export class DefaultMap<T extends IntervalCollection<any> = IntervalCollection<a
|
|
|
395
329
|
* @param serializable - The remote information that we can convert into a real object
|
|
396
330
|
* @returns The local value that was produced
|
|
397
331
|
*/
|
|
398
|
-
private makeLocal(
|
|
332
|
+
private makeLocal(
|
|
333
|
+
key: string,
|
|
334
|
+
serializable: ISerializableIntervalCollection,
|
|
335
|
+
): IntervalCollectionTypeLocalValue<T> {
|
|
399
336
|
assert(
|
|
400
337
|
serializable.type !== ValueType[ValueType.Plain] &&
|
|
401
338
|
serializable.type !== ValueType[ValueType.Shared],
|
|
@@ -407,7 +344,7 @@ export class DefaultMap<T extends IntervalCollection<any> = IntervalCollection<a
|
|
|
407
344
|
serializable.value,
|
|
408
345
|
this.options,
|
|
409
346
|
);
|
|
410
|
-
return new
|
|
347
|
+
return new IntervalCollectionTypeLocalValue(localValue, this.type);
|
|
411
348
|
}
|
|
412
349
|
|
|
413
350
|
/**
|
|
@@ -424,7 +361,7 @@ export class DefaultMap<T extends IntervalCollection<any> = IntervalCollection<a
|
|
|
424
361
|
params: SerializedIntervalDelta,
|
|
425
362
|
localOpMetadata: IMapMessageLocalMetadata,
|
|
426
363
|
): void => {
|
|
427
|
-
const op:
|
|
364
|
+
const op: IMapOperation = {
|
|
428
365
|
key,
|
|
429
366
|
type: "act",
|
|
430
367
|
value: {
|
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import { IEventThisPlaceHolder } from "@fluidframework/core-interfaces";
|
|
6
7
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
7
8
|
import { ISharedObjectEvents } from "@fluidframework/shared-object-base";
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
import type { IntervalCollection } from "./intervalCollection.js";
|
|
9
11
|
import {
|
|
12
|
+
type ISerializableInterval,
|
|
10
13
|
ISerializedInterval,
|
|
14
|
+
IntervalDeltaOpType,
|
|
11
15
|
IntervalOpType,
|
|
12
16
|
SerializedIntervalDelta,
|
|
13
|
-
IntervalDeltaOpType,
|
|
14
17
|
} from "./intervals/index.js";
|
|
15
18
|
|
|
16
19
|
/**
|
|
@@ -92,7 +95,7 @@ export interface SequenceOptions {
|
|
|
92
95
|
* A value factory is used to serialize/deserialize value types to a map
|
|
93
96
|
* @alpha
|
|
94
97
|
*/
|
|
95
|
-
export interface
|
|
98
|
+
export interface IIntervalCollectionFactory<T extends ISerializableInterval> {
|
|
96
99
|
/**
|
|
97
100
|
* Create a new value type. Used both in creation of new value types, as well as in loading existing ones
|
|
98
101
|
* from remote.
|
|
@@ -100,7 +103,11 @@ export interface IValueFactory<T> {
|
|
|
100
103
|
* @param raw - Initialization parameters as defined by the value type
|
|
101
104
|
* @returns The new value type
|
|
102
105
|
*/
|
|
103
|
-
load(
|
|
106
|
+
load(
|
|
107
|
+
emitter: IValueOpEmitter,
|
|
108
|
+
raw: any,
|
|
109
|
+
options?: Partial<SequenceOptions>,
|
|
110
|
+
): IntervalCollection<T>;
|
|
104
111
|
|
|
105
112
|
/**
|
|
106
113
|
* Given a value type, provides a JSONable form of its data to be used for snapshotting. This data must be
|
|
@@ -108,14 +115,14 @@ export interface IValueFactory<T> {
|
|
|
108
115
|
* @param value - The value type to serialize
|
|
109
116
|
* @returns The JSONable form of the value type
|
|
110
117
|
*/
|
|
111
|
-
store(value: T): any;
|
|
118
|
+
store(value: IntervalCollection<T>): any;
|
|
112
119
|
}
|
|
113
120
|
|
|
114
121
|
/**
|
|
115
122
|
* Defines an operation that a value type is able to handle.
|
|
116
123
|
* @alpha
|
|
117
124
|
*/
|
|
118
|
-
export interface
|
|
125
|
+
export interface IIntervalCollectionOperation<T extends ISerializableInterval> {
|
|
119
126
|
/**
|
|
120
127
|
* Performs the actual processing on the incoming operation.
|
|
121
128
|
* @param value - The current value stored at the given key, which should be the value type
|
|
@@ -125,7 +132,7 @@ export interface IValueOperation<T> {
|
|
|
125
132
|
* @param localOpMetadata - any local metadata submitted by `IValueOpEmitter.emit`.
|
|
126
133
|
*/
|
|
127
134
|
process(
|
|
128
|
-
value: T
|
|
135
|
+
value: IntervalCollection<T>,
|
|
129
136
|
params: ISerializedInterval,
|
|
130
137
|
local: boolean,
|
|
131
138
|
message: ISequencedDocumentMessage | undefined,
|
|
@@ -141,18 +148,21 @@ export interface IValueOperation<T> {
|
|
|
141
148
|
* @returns A rebased version of the op and any local metadata that should be submitted with it.
|
|
142
149
|
*/
|
|
143
150
|
rebase(
|
|
144
|
-
value: T
|
|
145
|
-
op:
|
|
151
|
+
value: IntervalCollection<T>,
|
|
152
|
+
op: IIntervalCollectionTypeOperationValue,
|
|
146
153
|
localOpMetadata: IMapMessageLocalMetadata,
|
|
147
154
|
):
|
|
148
|
-
| {
|
|
155
|
+
| {
|
|
156
|
+
rebasedOp: IIntervalCollectionTypeOperationValue;
|
|
157
|
+
rebasedLocalOpMetadata: IMapMessageLocalMetadata;
|
|
158
|
+
}
|
|
149
159
|
| undefined;
|
|
150
160
|
}
|
|
151
161
|
|
|
152
162
|
/**
|
|
153
163
|
* Defines a value type that can be registered on a container type.
|
|
154
164
|
*/
|
|
155
|
-
export interface
|
|
165
|
+
export interface IIntervalCollectionType<T extends ISerializableInterval> {
|
|
156
166
|
/**
|
|
157
167
|
* Name of the value type.
|
|
158
168
|
*/
|
|
@@ -161,12 +171,12 @@ export interface IValueType<T> {
|
|
|
161
171
|
/**
|
|
162
172
|
* Factory method used to convert to/from a JSON form of the type.
|
|
163
173
|
*/
|
|
164
|
-
factory:
|
|
174
|
+
factory: IIntervalCollectionFactory<T>;
|
|
165
175
|
|
|
166
176
|
/**
|
|
167
177
|
* Operations that can be applied to the value type.
|
|
168
178
|
*/
|
|
169
|
-
ops: Map<IntervalOpType,
|
|
179
|
+
ops: Map<IntervalOpType, IIntervalCollectionOperation<T>>;
|
|
170
180
|
}
|
|
171
181
|
|
|
172
182
|
export interface ISharedDefaultMapEvents extends ISharedObjectEvents {
|
|
@@ -187,7 +197,7 @@ export interface ISharedDefaultMapEvents extends ISharedObjectEvents {
|
|
|
187
197
|
* The DefaultMap implementation for sequence has been specialized to only support a single ValueType, which serializes
|
|
188
198
|
* and deserializes via .store() and .load().
|
|
189
199
|
*/
|
|
190
|
-
export interface
|
|
200
|
+
export interface ISerializableIntervalCollection {
|
|
191
201
|
/**
|
|
192
202
|
* A type annotation to help indicate how the value serializes.
|
|
193
203
|
*/
|
|
@@ -199,7 +209,7 @@ export interface ISerializableValue {
|
|
|
199
209
|
value: any;
|
|
200
210
|
}
|
|
201
211
|
|
|
202
|
-
export interface
|
|
212
|
+
export interface ISerializedIntervalCollection {
|
|
203
213
|
/**
|
|
204
214
|
* A type annotation to help indicate how the value serializes.
|
|
205
215
|
*/
|
|
@@ -220,7 +230,7 @@ export interface ISerializedValue {
|
|
|
220
230
|
* it just describes an operation to be applied to an already-in-memory value.
|
|
221
231
|
* @alpha
|
|
222
232
|
*/
|
|
223
|
-
export interface
|
|
233
|
+
export interface IIntervalCollectionTypeOperationValue {
|
|
224
234
|
/**
|
|
225
235
|
* The name of the operation.
|
|
226
236
|
*/
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
/* eslint-disable import/no-deprecated */
|
|
6
7
|
|
|
7
|
-
import { Client, PropertyAction, RedBlackTree } from "@fluidframework/merge-tree";
|
|
8
|
+
import { Client, PropertyAction, RedBlackTree } from "@fluidframework/merge-tree/internal";
|
|
9
|
+
|
|
8
10
|
import {
|
|
9
11
|
IIntervalHelpers,
|
|
10
12
|
ISerializableInterval,
|
|
@@ -13,6 +15,7 @@ import {
|
|
|
13
15
|
sequenceIntervalHelpers,
|
|
14
16
|
} from "../intervals/index.js";
|
|
15
17
|
import { SharedString } from "../sharedString.js";
|
|
18
|
+
|
|
16
19
|
import { IntervalIndex } from "./intervalIndex.js";
|
|
17
20
|
import { HasComparisonOverride, compareOverrideables, forceCompare } from "./intervalIndexUtils.js";
|
|
18
21
|
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
/* eslint-disable import/no-deprecated */
|
|
6
7
|
|
|
7
|
-
import { Client, RedBlackTree } from "@fluidframework/merge-tree";
|
|
8
|
+
import { Client, RedBlackTree } from "@fluidframework/merge-tree/internal";
|
|
9
|
+
|
|
8
10
|
import {
|
|
9
11
|
IIntervalHelpers,
|
|
10
12
|
ISerializableInterval,
|
|
@@ -13,6 +15,7 @@ import {
|
|
|
13
15
|
sequenceIntervalHelpers,
|
|
14
16
|
} from "../intervals/index.js";
|
|
15
17
|
import { SharedString } from "../sharedString.js";
|
|
18
|
+
|
|
16
19
|
import { IntervalIndex } from "./intervalIndex.js";
|
|
17
20
|
|
|
18
21
|
/**
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { assert } from "@fluidframework/core-utils";
|
|
7
|
-
|
|
6
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
|
+
|
|
8
8
|
import { reservedIntervalIdKey } from "../intervalCollection.js";
|
|
9
|
+
import { ISerializableInterval } from "../intervals/index.js";
|
|
10
|
+
|
|
9
11
|
import { IntervalIndex } from "./intervalIndex.js";
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -2,19 +2,22 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
/* eslint-disable import/no-deprecated */
|
|
6
7
|
|
|
7
|
-
import { Client } from "@fluidframework/merge-tree";
|
|
8
|
+
import { Client } from "@fluidframework/merge-tree/internal";
|
|
9
|
+
|
|
10
|
+
import { SequencePlace, endpointPosAndSide } from "../intervalCollection.js";
|
|
11
|
+
import { IntervalNode, IntervalTree } from "../intervalTree.js";
|
|
8
12
|
import {
|
|
9
|
-
IntervalType,
|
|
10
13
|
IIntervalHelpers,
|
|
11
14
|
ISerializableInterval,
|
|
12
|
-
|
|
15
|
+
IntervalType,
|
|
13
16
|
SequenceInterval,
|
|
17
|
+
sequenceIntervalHelpers,
|
|
14
18
|
} from "../intervals/index.js";
|
|
15
|
-
import { IntervalNode, IntervalTree } from "../intervalTree.js";
|
|
16
19
|
import { SharedString } from "../sharedString.js";
|
|
17
|
-
|
|
20
|
+
|
|
18
21
|
import { IntervalIndex } from "./intervalIndex.js";
|
|
19
22
|
|
|
20
23
|
/**
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
/* eslint-disable import/no-deprecated */
|
|
6
7
|
|
|
7
8
|
import {
|
|
@@ -10,16 +11,18 @@ import {
|
|
|
10
11
|
ReferenceType,
|
|
11
12
|
compareReferencePositions,
|
|
12
13
|
reservedRangeLabelsKey,
|
|
13
|
-
} from "@fluidframework/merge-tree";
|
|
14
|
+
} from "@fluidframework/merge-tree/internal";
|
|
15
|
+
|
|
14
16
|
import {
|
|
15
|
-
sequenceIntervalHelpers,
|
|
16
17
|
IntervalType,
|
|
17
18
|
SequenceInterval,
|
|
18
19
|
createPositionReferenceFromSegoff,
|
|
20
|
+
sequenceIntervalHelpers,
|
|
19
21
|
} from "../intervals/index.js";
|
|
20
22
|
import { SharedString } from "../sharedString.js";
|
|
21
|
-
|
|
23
|
+
|
|
22
24
|
import { OverlappingIntervalsIndex } from "./overlappingIntervalsIndex.js";
|
|
25
|
+
import { SequenceIntervalIndexes } from "./sequenceIntervalIndexes.js";
|
|
23
26
|
|
|
24
27
|
/**
|
|
25
28
|
* @public
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ISegment } from "@fluidframework/merge-tree";
|
|
6
|
+
import { ISegment } from "@fluidframework/merge-tree/internal";
|
|
7
|
+
|
|
7
8
|
import { SequenceInterval } from "../intervals/index.js";
|
|
9
|
+
|
|
8
10
|
import { IOverlappingIntervalsIndex } from "./overlappingIntervalsIndex.js";
|
|
9
11
|
|
|
10
12
|
/**
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
/* eslint-disable import/no-deprecated */
|
|
6
7
|
|
|
7
|
-
import { Client, PropertyAction, RedBlackTree } from "@fluidframework/merge-tree";
|
|
8
|
+
import { Client, PropertyAction, RedBlackTree } from "@fluidframework/merge-tree/internal";
|
|
9
|
+
|
|
8
10
|
import {
|
|
9
11
|
IIntervalHelpers,
|
|
10
12
|
ISerializableInterval,
|
|
@@ -13,6 +15,7 @@ import {
|
|
|
13
15
|
sequenceIntervalHelpers,
|
|
14
16
|
} from "../intervals/index.js";
|
|
15
17
|
import { SharedString } from "../sharedString.js";
|
|
18
|
+
|
|
16
19
|
import { IntervalIndex } from "./intervalIndex.js";
|
|
17
20
|
import { HasComparisonOverride, compareOverrideables, forceCompare } from "./intervalIndexUtils.js";
|
|
18
21
|
|
package/src/intervalTree.ts
CHANGED
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import {
|
|
7
|
-
RBNode,
|
|
8
7
|
IRBAugmentation,
|
|
9
8
|
IRBMatcher,
|
|
10
|
-
|
|
9
|
+
RBNode,
|
|
11
10
|
RBNodeActions,
|
|
12
|
-
|
|
11
|
+
RedBlackTree,
|
|
12
|
+
} from "@fluidframework/merge-tree/internal";
|
|
13
|
+
|
|
13
14
|
import { IInterval } from "./intervals/index.js";
|
|
14
15
|
|
|
15
16
|
export interface AugmentedIntervalNode {
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
|
|
5
6
|
/* eslint-disable import/no-deprecated */
|
|
6
7
|
|
|
8
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
9
|
import {
|
|
8
10
|
PropertiesManager,
|
|
9
11
|
PropertySet,
|
|
10
12
|
createMap,
|
|
11
13
|
reservedRangeLabelsKey,
|
|
12
|
-
} from "@fluidframework/merge-tree";
|
|
14
|
+
} from "@fluidframework/merge-tree/internal";
|
|
13
15
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
+
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
17
|
+
|
|
16
18
|
import { SequencePlace, reservedIntervalIdKey } from "../intervalCollection.js";
|
|
19
|
+
|
|
17
20
|
import { IIntervalHelpers, ISerializableInterval, ISerializedInterval } from "./intervalUtils.js";
|
|
18
21
|
|
|
19
22
|
/**
|
|
@@ -6,12 +6,14 @@
|
|
|
6
6
|
/* eslint-disable no-bitwise */
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
+
// eslint-disable-next-line import/no-deprecated
|
|
9
10
|
Client,
|
|
10
11
|
PropertiesManager,
|
|
11
12
|
PropertySet,
|
|
12
13
|
SlidingPreference,
|
|
13
|
-
} from "@fluidframework/merge-tree";
|
|
14
|
+
} from "@fluidframework/merge-tree/internal";
|
|
14
15
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
16
|
+
|
|
15
17
|
import { SequencePlace, Side } from "../intervalCollection.js";
|
|
16
18
|
|
|
17
19
|
/**
|
|
@@ -231,7 +233,7 @@ export interface IIntervalHelpers<TInterval extends ISerializableInterval> {
|
|
|
231
233
|
label: string,
|
|
232
234
|
start: SequencePlace | undefined,
|
|
233
235
|
end: SequencePlace | undefined,
|
|
234
|
-
|
|
236
|
+
// eslint-disable-next-line import/no-deprecated
|
|
235
237
|
client: Client | undefined,
|
|
236
238
|
intervalType: IntervalType,
|
|
237
239
|
op?: ISequencedDocumentMessage,
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
/* eslint-disable no-bitwise */
|
|
7
7
|
/* eslint-disable import/no-deprecated */
|
|
8
8
|
|
|
9
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
9
10
|
import {
|
|
10
11
|
Client,
|
|
11
12
|
ISegment,
|
|
@@ -22,10 +23,10 @@ import {
|
|
|
22
23
|
minReferencePosition,
|
|
23
24
|
refTypeIncludesFlag,
|
|
24
25
|
reservedRangeLabelsKey,
|
|
25
|
-
} from "@fluidframework/merge-tree";
|
|
26
|
-
import { assert } from "@fluidframework/core-utils";
|
|
26
|
+
} from "@fluidframework/merge-tree/internal";
|
|
27
27
|
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
|
|
28
|
-
import { UsageError } from "@fluidframework/telemetry-utils";
|
|
28
|
+
import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
29
|
+
|
|
29
30
|
import {
|
|
30
31
|
SequencePlace,
|
|
31
32
|
Side,
|
|
@@ -34,6 +35,7 @@ import {
|
|
|
34
35
|
reservedIntervalIdKey,
|
|
35
36
|
sidesFromStickiness,
|
|
36
37
|
} from "../intervalCollection.js";
|
|
38
|
+
|
|
37
39
|
import {
|
|
38
40
|
IIntervalHelpers,
|
|
39
41
|
ISerializableInterval,
|
package/src/packageVersion.ts
CHANGED