@fluidframework/sequence 2.0.0-internal.1.1.3 → 2.0.0-internal.1.2.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/README.md +19 -18
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/intervalCollection.d.ts +5 -5
- package/dist/intervalCollection.d.ts.map +1 -1
- package/dist/intervalCollection.js +8 -12
- package/dist/intervalCollection.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/sequence.d.ts +8 -5
- package/dist/sequence.d.ts.map +1 -1
- package/dist/sequence.js +7 -4
- package/dist/sequence.js.map +1 -1
- package/dist/sharedIntervalCollection.d.ts +5 -5
- package/dist/sharedIntervalCollection.js +5 -5
- package/dist/sharedIntervalCollection.js.map +1 -1
- package/dist/sharedString.d.ts +2 -2
- package/dist/sharedString.js +2 -2
- package/dist/sharedString.js.map +1 -1
- package/dist/sparsematrix.d.ts +28 -15
- package/dist/sparsematrix.d.ts.map +1 -1
- package/dist/sparsematrix.js +24 -13
- package/dist/sparsematrix.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/intervalCollection.d.ts +5 -5
- package/lib/intervalCollection.d.ts.map +1 -1
- package/lib/intervalCollection.js +8 -12
- package/lib/intervalCollection.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/sequence.d.ts +8 -5
- package/lib/sequence.d.ts.map +1 -1
- package/lib/sequence.js +7 -4
- package/lib/sequence.js.map +1 -1
- package/lib/sharedIntervalCollection.d.ts +5 -5
- package/lib/sharedIntervalCollection.js +5 -5
- package/lib/sharedIntervalCollection.js.map +1 -1
- package/lib/sharedString.d.ts +2 -2
- package/lib/sharedString.js +2 -2
- package/lib/sharedString.js.map +1 -1
- package/lib/sparsematrix.d.ts +28 -15
- package/lib/sparsematrix.d.ts.map +1 -1
- package/lib/sparsematrix.js +24 -13
- package/lib/sparsematrix.js.map +1 -1
- package/package.json +18 -18
- package/src/index.ts +1 -1
- package/src/intervalCollection.ts +10 -11
- package/src/packageVersion.ts +1 -1
- package/src/sequence.ts +8 -5
- package/src/sharedIntervalCollection.ts +5 -5
- package/src/sharedString.ts +2 -2
- package/src/sparsematrix.ts +48 -35
package/README.md
CHANGED
|
@@ -156,7 +156,7 @@ specified range. Setting a property key to null will remove that property from t
|
|
|
156
156
|
### Sequence delta event
|
|
157
157
|
|
|
158
158
|
Whenever an operation is performed on a sequence a *sequenceDelta* event will be raised. This event provides the ranges
|
|
159
|
-
affected by the operation, the type of the operation, and the properties that were
|
|
159
|
+
affected by the operation, the type of the operation, and the properties that were changed by the operation.
|
|
160
160
|
|
|
161
161
|
```typescript
|
|
162
162
|
sharedString.on("sequenceDelta", ({ deltaOperation, ranges, isLocal }) => {
|
|
@@ -375,6 +375,24 @@ The following example illustrates these properties and highlights the major APIs
|
|
|
375
375
|
comments.removeIntervalById(comment.getIntervalId());
|
|
376
376
|
```
|
|
377
377
|
|
|
378
|
+
## SharedString
|
|
379
|
+
|
|
380
|
+
SharedString is a specialized data structure for handling collaborative text. It is based on a more general
|
|
381
|
+
Sequence data structure but has additional features that make working with text easier.
|
|
382
|
+
|
|
383
|
+
In addition to text, a SharedString can also contain markers.
|
|
384
|
+
Markers can be used to store metadata at positions within the text, like a reference to an image or Fluid object that should be rendered with the text.
|
|
385
|
+
|
|
386
|
+
Both markers and text are stored as segments in the SharedString.
|
|
387
|
+
Text segments will be split and merged when modifications are made to the SharedString and will therefore have variable length
|
|
388
|
+
matching the length of the text content they contain.
|
|
389
|
+
Marker segments are never split or merged, and always have a length of 1.
|
|
390
|
+
|
|
391
|
+
The length of the SharedString will be the combined length of all the text and marker segments.
|
|
392
|
+
Just like with other sequences, when talking about positions in a SharedString we use the terms near and far.
|
|
393
|
+
The nearest position in a SharedString is 0, and the farthest position is its length.
|
|
394
|
+
When comparing two positions the nearer positions is closer to 0, and the farther position is closer to the length.
|
|
395
|
+
|
|
378
396
|
### Intervals vs. markers
|
|
379
397
|
|
|
380
398
|
Interval endpoints and markers both implement *ReferencePosition* and seem to serve a similar function so it's not obvious how they differ and why you would choose one or the other.
|
|
@@ -394,23 +412,6 @@ Using the interval collection API has two main benefits:
|
|
|
394
412
|
If the ops were submitted using standard insert and delete APIs instead, there would be some potential for data loss if the delete
|
|
395
413
|
operation ended up acknowledged by the server but the insert operation did not.
|
|
396
414
|
|
|
397
|
-
## SharedString
|
|
398
|
-
|
|
399
|
-
The SharedString is a specialized data structure for handling collaborative text. It is based on a more general
|
|
400
|
-
Sequence data structure but has additional features that make working with text easier.
|
|
401
|
-
|
|
402
|
-
In addition to text, a SharedString can also contain markers. Markers can be used to store metadata at positions within
|
|
403
|
-
the text, like the details of an image or Fluid object that should be rendered with the text.
|
|
404
|
-
|
|
405
|
-
Both markers and text are stored as segments in the SharedString. Text segments will be split and merged when
|
|
406
|
-
modifications are made to the SharedString and will therefore have variable length matching the length of the text
|
|
407
|
-
content they contain. Marker segments are never split or merged, and always have a length of 1.
|
|
408
|
-
|
|
409
|
-
The length of the SharedString will be the combined length of all the text and marker segments. Just like with other
|
|
410
|
-
sequences, when talking about positions in a SharedString we use the terms near and far. The nearest position in a
|
|
411
|
-
SharedString is 0, and the farthest position is its length. When comparing two positions the nearer positions is closer
|
|
412
|
-
to 0, and the farther position is closer to the length.
|
|
413
|
-
|
|
414
415
|
### Examples
|
|
415
416
|
|
|
416
417
|
- Rich Text Editor Implementations
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Supports distributed data structures which are list-like.
|
|
7
7
|
*
|
|
8
|
-
* This
|
|
8
|
+
* This library's main export is {@link SharedSequence}, a DDS for storing and simultaneously editing a sequence of
|
|
9
9
|
* text.
|
|
10
10
|
*
|
|
11
11
|
* @remarks Note that SharedString is a sequence DDS but it has additional specialized features and behaviors for
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ exports.SequenceInterval = exports.IntervalType = exports.intervalLocatorFromEnd
|
|
|
18
18
|
/**
|
|
19
19
|
* Supports distributed data structures which are list-like.
|
|
20
20
|
*
|
|
21
|
-
* This
|
|
21
|
+
* This library's main export is {@link SharedSequence}, a DDS for storing and simultaneously editing a sequence of
|
|
22
22
|
* text.
|
|
23
23
|
*
|
|
24
24
|
* @remarks Note that SharedString is a sequence DDS but it has additional specialized features and behaviors for
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;AAEH;;;;;;;;;;GAUG;AAEH,2DAe8B;AAX1B,8GAAA,QAAQ,OAAA;AACR,wHAAA,kBAAkB,OAAA;AAClB,gIAAA,0BAA0B,OAAA;AAE1B,iIAAA,2BAA2B,OAAA;AAC3B,kHAAA,YAAY,OAAA;AAGZ,sHAAA,gBAAgB,OAAA;AAQpB,iDAA+B;AAC/B,6CAA2B;AAC3B,oDAAkC;AAClC,uDAAqC;AACrC,mDAAiC;AACjC,yDAAuC;AACvC,yDAAuC;AACvC,iDAA+B;AAC/B,6DAA2C","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Supports distributed data structures which are list-like.\n *\n * This
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;AAEH;;;;;;;;;;GAUG;AAEH,2DAe8B;AAX1B,8GAAA,QAAQ,OAAA;AACR,wHAAA,kBAAkB,OAAA;AAClB,gIAAA,0BAA0B,OAAA;AAE1B,iIAAA,2BAA2B,OAAA;AAC3B,kHAAA,YAAY,OAAA;AAGZ,sHAAA,gBAAgB,OAAA;AAQpB,iDAA+B;AAC/B,6CAA2B;AAC3B,oDAAkC;AAClC,uDAAqC;AACrC,mDAAiC;AACjC,yDAAuC;AACvC,yDAAuC;AACvC,iDAA+B;AAC/B,6DAA2C","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Supports distributed data structures which are list-like.\n *\n * This library's main export is {@link SharedSequence}, a DDS for storing and simultaneously editing a sequence of\n * text.\n *\n * @remarks Note that SharedString is a sequence DDS but it has additional specialized features and behaviors for\n * working with text.\n *\n * @packageDocumentation\n */\n\nexport {\n DeserializeCallback,\n IIntervalCollectionEvent,\n IIntervalHelpers,\n Interval,\n IntervalCollection,\n IntervalCollectionIterator,\n IntervalLocator,\n intervalLocatorFromEndpoint,\n IntervalType,\n ISerializableInterval,\n ISerializedInterval,\n SequenceInterval,\n ISerializedIntervalCollectionV2,\n CompressedSerializedInterval,\n} from \"./intervalCollection\";\nexport {\n IMapMessageLocalMetadata,\n IValueOpEmitter,\n} from \"./defaultMapInterfaces\";\nexport * from \"./sharedString\";\nexport * from \"./sequence\";\nexport * from \"./sequenceFactory\";\nexport * from \"./sequenceDeltaEvent\";\nexport * from \"./sharedSequence\";\nexport * from \"./sharedObjectSequence\";\nexport * from \"./sharedNumberSequence\";\nexport * from \"./sparsematrix\";\nexport * from \"./sharedIntervalCollection\";\n"]}
|
|
@@ -18,8 +18,8 @@ export declare enum IntervalType {
|
|
|
18
18
|
*/
|
|
19
19
|
SlideOnRemove = 2,
|
|
20
20
|
/**
|
|
21
|
-
* @internal
|
|
22
21
|
* A temporary interval, used internally
|
|
22
|
+
* @internal
|
|
23
23
|
*/
|
|
24
24
|
Transient = 4
|
|
25
25
|
}
|
|
@@ -99,13 +99,13 @@ export declare class SequenceInterval implements ISerializableInterval {
|
|
|
99
99
|
constructor(client: Client, start: LocalReferencePosition, end: LocalReferencePosition, intervalType: IntervalType, props?: PropertySet);
|
|
100
100
|
private callbacks?;
|
|
101
101
|
/**
|
|
102
|
-
* @internal
|
|
103
102
|
* Subscribes to position change events on this interval if there are no current listeners.
|
|
103
|
+
* @internal
|
|
104
104
|
*/
|
|
105
105
|
addPositionChangeListeners(beforePositionChange: () => void, afterPositionChange: () => void): void;
|
|
106
106
|
/**
|
|
107
|
-
* @internal
|
|
108
107
|
* Removes the currently subscribed position change listeners.
|
|
108
|
+
* @internal
|
|
109
109
|
*/
|
|
110
110
|
removePositionChangeListeners(): void;
|
|
111
111
|
serialize(client: Client): ISerializedInterval;
|
|
@@ -251,11 +251,11 @@ export declare class IntervalCollection<TInterval extends ISerializableInterval>
|
|
|
251
251
|
addConflictResolver(conflictResolver: IntervalConflictResolver<TInterval>): void;
|
|
252
252
|
attachDeserializer(onDeserialize: DeserializeCallback): void;
|
|
253
253
|
/**
|
|
254
|
-
* @internal
|
|
255
|
-
*
|
|
256
254
|
* Returns new interval after rebasing. If undefined, the interval was
|
|
257
255
|
* deleted as a result of rebasing. This can occur if the interval applies
|
|
258
256
|
* to a range that no longer exists, and the interval was unable to slide.
|
|
257
|
+
*
|
|
258
|
+
* @internal
|
|
259
259
|
*/
|
|
260
260
|
rebaseLocalInterval(opName: string, serializedInterval: ISerializedInterval, localSeq: number): ISerializedInterval | undefined;
|
|
261
261
|
private getSlideToSegment;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intervalCollection.d.ts","sourceRoot":"","sources":["../src/intervalCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAU,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAE5D,OAAO,EAEH,MAAM,EAIN,YAAY,EACZ,SAAS,EACT,wBAAwB,EAMxB,iBAAiB,EACjB,WAAW,EAEX,sBAAsB,EAQzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB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 +35,8 @@ var IntervalType;
|
|
|
35
35
|
*/
|
|
36
36
|
IntervalType[IntervalType["SlideOnRemove"] = 2] = "SlideOnRemove";
|
|
37
37
|
/**
|
|
38
|
-
* @internal
|
|
39
38
|
* A temporary interval, used internally
|
|
39
|
+
* @internal
|
|
40
40
|
*/
|
|
41
41
|
IntervalType[IntervalType["Transient"] = 4] = "Transient";
|
|
42
42
|
})(IntervalType = exports.IntervalType || (exports.IntervalType = {}));
|
|
@@ -194,8 +194,8 @@ class SequenceInterval {
|
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
197
|
-
* @internal
|
|
198
197
|
* Subscribes to position change events on this interval if there are no current listeners.
|
|
198
|
+
* @internal
|
|
199
199
|
*/
|
|
200
200
|
addPositionChangeListeners(beforePositionChange, afterPositionChange) {
|
|
201
201
|
var _a, _b;
|
|
@@ -212,8 +212,8 @@ class SequenceInterval {
|
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
/**
|
|
215
|
-
* @internal
|
|
216
215
|
* Removes the currently subscribed position change listeners.
|
|
216
|
+
* @internal
|
|
217
217
|
*/
|
|
218
218
|
removePositionChangeListeners() {
|
|
219
219
|
if (this.callbacks) {
|
|
@@ -791,13 +791,9 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
|
|
|
791
791
|
this.emitter = emitter;
|
|
792
792
|
this.pendingChangesStart = new Map();
|
|
793
793
|
this.pendingChangesEnd = new Map();
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
else {
|
|
798
|
-
this.savedSerializedIntervals =
|
|
799
|
-
serializedIntervals.intervals.map((i) => decompressInterval(i, serializedIntervals.label));
|
|
800
|
-
}
|
|
794
|
+
this.savedSerializedIntervals = Array.isArray(serializedIntervals)
|
|
795
|
+
? serializedIntervals
|
|
796
|
+
: serializedIntervals.intervals.map((i) => decompressInterval(i, serializedIntervals.label));
|
|
801
797
|
}
|
|
802
798
|
get attached() {
|
|
803
799
|
return !!this.localCollection;
|
|
@@ -1067,11 +1063,11 @@ class IntervalCollection extends common_utils_1.TypedEventEmitter {
|
|
|
1067
1063
|
});
|
|
1068
1064
|
}
|
|
1069
1065
|
/**
|
|
1070
|
-
* @internal
|
|
1071
|
-
*
|
|
1072
1066
|
* Returns new interval after rebasing. If undefined, the interval was
|
|
1073
1067
|
* deleted as a result of rebasing. This can occur if the interval applies
|
|
1074
1068
|
* to a range that no longer exists, and the interval was unable to slide.
|
|
1069
|
+
*
|
|
1070
|
+
* @internal
|
|
1075
1071
|
*/
|
|
1076
1072
|
rebaseLocalInterval(opName, serializedInterval, localSeq) {
|
|
1077
1073
|
var _a, _b;
|