@fluidframework/sequence 2.0.0-dev.7.4.0.217212 → 2.0.0-dev.7.4.0.221926

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.
Files changed (121) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/api-extractor.json +0 -3
  3. package/api-report/sequence.api.md +33 -25
  4. package/dist/intervalCollection.d.ts +31 -6
  5. package/dist/intervalCollection.d.ts.map +1 -1
  6. package/dist/intervalCollection.js +45 -43
  7. package/dist/intervalCollection.js.map +1 -1
  8. package/dist/intervalIndex/intervalIndex.d.ts +1 -1
  9. package/dist/intervalIndex/intervalIndex.js.map +1 -1
  10. package/dist/intervals/intervalUtils.d.ts +6 -7
  11. package/dist/intervals/intervalUtils.d.ts.map +1 -1
  12. package/dist/intervals/intervalUtils.js +2 -2
  13. package/dist/intervals/intervalUtils.js.map +1 -1
  14. package/dist/intervals/sequenceInterval.d.ts +1 -1
  15. package/dist/intervals/sequenceInterval.js +1 -1
  16. package/dist/intervals/sequenceInterval.js.map +1 -1
  17. package/dist/packageVersion.d.ts +1 -1
  18. package/dist/packageVersion.js +1 -1
  19. package/dist/packageVersion.js.map +1 -1
  20. package/dist/sequence-alpha.d.ts +1188 -106
  21. package/dist/sequence-beta.d.ts +44 -0
  22. package/dist/sequence-public.d.ts +44 -0
  23. package/dist/sequence-untrimmed.d.ts +40 -26
  24. package/dist/sequence.d.ts +2 -2
  25. package/dist/sequence.js +1 -1
  26. package/dist/sequence.js.map +1 -1
  27. package/dist/sequenceDeltaEvent.d.ts +4 -4
  28. package/dist/sequenceDeltaEvent.js +3 -3
  29. package/dist/sequenceDeltaEvent.js.map +1 -1
  30. package/dist/sequenceFactory.d.ts +1 -1
  31. package/dist/sequenceFactory.js +1 -1
  32. package/dist/sequenceFactory.js.map +1 -1
  33. package/dist/sharedIntervalCollection.d.ts +1 -1
  34. package/dist/sharedIntervalCollection.js.map +1 -1
  35. package/dist/sharedString.d.ts +3 -3
  36. package/dist/sharedString.js +1 -1
  37. package/dist/sharedString.js.map +1 -1
  38. package/lib/defaultMap.js +22 -18
  39. package/lib/defaultMap.js.map +1 -1
  40. package/lib/defaultMapInterfaces.js +2 -1
  41. package/lib/defaultMapInterfaces.js.map +1 -1
  42. package/lib/index.js +45 -10
  43. package/lib/index.js.map +1 -1
  44. package/lib/intervalCollection.d.ts +31 -6
  45. package/lib/intervalCollection.d.ts.map +1 -1
  46. package/lib/intervalCollection.js +169 -154
  47. package/lib/intervalCollection.js.map +1 -1
  48. package/lib/intervalIndex/endpointInRangeIndex.js +17 -12
  49. package/lib/intervalIndex/endpointInRangeIndex.js.map +1 -1
  50. package/lib/intervalIndex/endpointIndex.js +13 -8
  51. package/lib/intervalIndex/endpointIndex.js.map +1 -1
  52. package/lib/intervalIndex/idIntervalIndex.js +8 -4
  53. package/lib/intervalIndex/idIntervalIndex.js.map +1 -1
  54. package/lib/intervalIndex/index.js +19 -6
  55. package/lib/intervalIndex/index.js.map +1 -1
  56. package/lib/intervalIndex/intervalIndex.d.ts +1 -1
  57. package/lib/intervalIndex/intervalIndex.js +2 -1
  58. package/lib/intervalIndex/intervalIndex.js.map +1 -1
  59. package/lib/intervalIndex/intervalIndexUtils.js +8 -4
  60. package/lib/intervalIndex/intervalIndexUtils.js.map +1 -1
  61. package/lib/intervalIndex/overlappingIntervalsIndex.js +15 -10
  62. package/lib/intervalIndex/overlappingIntervalsIndex.js.map +1 -1
  63. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.js +14 -10
  64. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.js.map +1 -1
  65. package/lib/intervalIndex/sequenceIntervalIndexes.js +2 -1
  66. package/lib/intervalIndex/sequenceIntervalIndexes.js.map +1 -1
  67. package/lib/intervalIndex/startpointInRangeIndex.js +17 -12
  68. package/lib/intervalIndex/startpointInRangeIndex.js.map +1 -1
  69. package/lib/intervalTree.js +9 -4
  70. package/lib/intervalTree.js.map +1 -1
  71. package/lib/intervals/index.js +18 -3
  72. package/lib/intervals/index.js.map +1 -1
  73. package/lib/intervals/interval.js +18 -13
  74. package/lib/intervals/interval.js.map +1 -1
  75. package/lib/intervals/intervalUtils.d.ts +6 -7
  76. package/lib/intervals/intervalUtils.d.ts.map +1 -1
  77. package/lib/intervals/intervalUtils.js +20 -15
  78. package/lib/intervals/intervalUtils.js.map +1 -1
  79. package/lib/intervals/sequenceInterval.d.ts +1 -1
  80. package/lib/intervals/sequenceInterval.js +66 -60
  81. package/lib/intervals/sequenceInterval.js.map +1 -1
  82. package/lib/localValues.js +9 -4
  83. package/lib/localValues.js.map +1 -1
  84. package/lib/packageVersion.d.ts +1 -1
  85. package/lib/packageVersion.js +5 -2
  86. package/lib/packageVersion.js.map +1 -1
  87. package/lib/revertibles.js +69 -59
  88. package/lib/revertibles.js.map +1 -1
  89. package/lib/sequence-alpha.d.ts +1188 -106
  90. package/lib/sequence-beta.d.ts +44 -0
  91. package/lib/sequence-public.d.ts +44 -0
  92. package/lib/sequence-untrimmed.d.ts +40 -26
  93. package/lib/sequence.d.ts +2 -2
  94. package/lib/sequence.js +45 -40
  95. package/lib/sequence.js.map +1 -1
  96. package/lib/sequenceDeltaEvent.d.ts +4 -4
  97. package/lib/sequenceDeltaEvent.js +16 -10
  98. package/lib/sequenceDeltaEvent.js.map +1 -1
  99. package/lib/sequenceFactory.d.ts +1 -1
  100. package/lib/sequenceFactory.js +14 -10
  101. package/lib/sequenceFactory.js.map +1 -1
  102. package/lib/sharedIntervalCollection.d.ts +1 -1
  103. package/lib/sharedIntervalCollection.js +18 -13
  104. package/lib/sharedIntervalCollection.js.map +1 -1
  105. package/lib/sharedSequence.js +11 -6
  106. package/lib/sharedSequence.js.map +1 -1
  107. package/lib/sharedString.d.ts +3 -3
  108. package/lib/sharedString.js +22 -17
  109. package/lib/sharedString.js.map +1 -1
  110. package/package.json +18 -17
  111. package/sequence.test-files.tar +0 -0
  112. package/src/intervalCollection.ts +88 -55
  113. package/src/intervalIndex/intervalIndex.ts +1 -1
  114. package/src/intervals/intervalUtils.ts +6 -7
  115. package/src/intervals/sequenceInterval.ts +1 -1
  116. package/src/packageVersion.ts +1 -1
  117. package/src/sequence.ts +2 -2
  118. package/src/sequenceDeltaEvent.ts +4 -4
  119. package/src/sequenceFactory.ts +1 -1
  120. package/src/sharedIntervalCollection.ts +1 -1
  121. package/src/sharedString.ts +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # @fluidframework/sequence
2
2
 
3
+ ## 2.0.0-internal.7.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - sequence: `change` and `changeProperties` are now a single method ([#18676](https://github.com/microsoft/FluidFramework/issues/18676)) [12c83d2696](https://github.com/microsoft/FluidFramework/commits/12c83d26962a1d76db6eb0ccad31fd6a7976a1af)
8
+
9
+ Instead of having two separate methods to change the endpoints of an interval and the properties, they have been combined into a
10
+ single method that will change the endpoints, properties, or both, depending on the arguments passed in. The signature
11
+ of this combined method is now updated as well.
12
+
13
+ The new way to use the change method is to call it with an interval id as the first parameter and an object containing
14
+ the desired portions of the interval to update as the second parameter. For the object parameter, the `endpoints` field
15
+ should be an object containing the new `start` and `end` values for the interval, and the `properties` field should be
16
+ an object containing the new properties for the interval. Either the `endpoints` field or the `properties` field can be
17
+ omitted, and if neither are present, `change` will return `undefined`.
18
+
19
+ The new usage of the change method is as follows:
20
+
21
+ Change interval endpoints: `change(id, { endpoints: { start: 1, end: 4 } });`
22
+
23
+ Change interval properties: `change(id { props: { a: 1 } });`
24
+
25
+ Change interval endpoints and properties: `change(id, { endpoints: { start: 1, end: 4 }, props: { a: 1 } });`
26
+
27
+ - sequence: Deprecated findOverlappingIntervals API ([#18036](https://github.com/microsoft/FluidFramework/issues/18036)) [52b864ea42](https://github.com/microsoft/FluidFramework/commits/52b864ea42759403771f2cbcb282b0ba19ce42f6)
28
+
29
+ The `findOverlappingIntervals` API from `IntervalCollection` has been deprecated. This functionality is moved to the
30
+ `OverlappingIntervalsIndex`. Users should independently attach the index to the collection and utilize the API
31
+ accordingly, for instance:
32
+
33
+ ```typescript
34
+ const overlappingIntervalsIndex = createOverlappingIntervalsIndex(sharedString);
35
+ collection.attachIndex(overlappingIntervalsIndex);
36
+ const result = overlappingIntervalsIndex.findOverlappingIntervals(start, end);
37
+ ```
38
+
39
+ - sequence: Deprecated previousInterval and nextInterval APIs ([#18060](https://github.com/microsoft/FluidFramework/issues/18060)) [05fb45d26f](https://github.com/microsoft/FluidFramework/commits/05fb45d26f3065297e219a4bce5763e25bdcffc9)
40
+
41
+ The `previousInterval` and `nextInterval` APIs from `IntervalCollection` have been deprecated. These functions are moved
42
+ to the `EndpointIndex`. Users should independently attach the index to the collection and utilize the API accordingly,
43
+ for instance:
44
+
45
+ ```typescript
46
+ const endpointIndex = createEndpointIndex(sharedString);
47
+ collection.attachIndex(endpointIndex);
48
+
49
+ const result1 = endpointIndex.previousInterval(pos);
50
+ const result2 = endpointIndex.nextInterval(pos);
51
+ ```
52
+
53
+ - sequence: Deprecated ICombiningOp, PropertiesRollback.Rewrite, and SharedString.annotateMarkerNotifyConsensus ([#18318](https://github.com/microsoft/FluidFramework/issues/18318)) [e67c2cac5f](https://github.com/microsoft/FluidFramework/commits/e67c2cac5f275fc5c875c0bc044bbb72aaf76648)
54
+
55
+ The `ICombiningOp` and its usage in various APIs has been deprecated. APIs affected include
56
+ `SharedSegmentSequence.annotateRange` and `SharedString.annotateMarker`. `SharedString.annotateMarkerNotifyConsensus`
57
+ has also been deprecated, because it is related to combining ops. This functionality had no test coverage and was
58
+ largely unused.
59
+
3
60
  ## 2.0.0-internal.7.3.0
4
61
 
5
62
  Dependency updates only.
@@ -1,9 +1,6 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
3
  "extends": "../../../common/build/build-common/api-extractor-base.json",
4
- "dtsRollup": {
5
- "enabled": true
6
- },
7
4
  "messages": {
8
5
  "extractorMessageReporting": {
9
6
  // TODO: Add missing documentation and remove this rule override
@@ -83,7 +83,7 @@ export function createOverlappingSequenceIntervalsIndex(sharedString: SharedStri
83
83
  // @internal (undocumented)
84
84
  export function createStartpointInRangeIndex(sharedString: SharedString): IStartpointInRangeIndex<SequenceInterval>;
85
85
 
86
- // @internal (undocumented)
86
+ // @alpha (undocumented)
87
87
  export type DeserializeCallback = (properties: PropertySet) => void;
88
88
 
89
89
  // @internal
@@ -117,7 +117,7 @@ export interface IIdIntervalIndex<TInterval extends ISerializableInterval> exten
117
117
  getIntervalById(id: string): TInterval | undefined;
118
118
  }
119
119
 
120
- // @internal
120
+ // @alpha
121
121
  export interface IInterval {
122
122
  // (undocumented)
123
123
  clone(): IInterval;
@@ -130,7 +130,7 @@ export interface IInterval {
130
130
  union(b: IInterval): IInterval;
131
131
  }
132
132
 
133
- // @internal
133
+ // @alpha
134
134
  export interface IIntervalCollection<TInterval extends ISerializableInterval> extends TypedEventEmitter<IIntervalCollectionEvent<TInterval>> {
135
135
  // (undocumented)
136
136
  [Symbol.iterator](): Iterator<TInterval>;
@@ -146,7 +146,14 @@ export interface IIntervalCollection<TInterval extends ISerializableInterval> ex
146
146
  // (undocumented)
147
147
  readonly attached: boolean;
148
148
  attachIndex(index: IntervalIndex<TInterval>): void;
149
+ // @deprecated
149
150
  change(id: string, start: SequencePlace, end: SequencePlace): TInterval | undefined;
151
+ change(id: string, { start, end, props }: {
152
+ start?: SequencePlace;
153
+ end?: SequencePlace;
154
+ props?: PropertySet;
155
+ }): TInterval | undefined;
156
+ // @deprecated
150
157
  changeProperties(id: string, props: PropertySet): any;
151
158
  // (undocumented)
152
159
  CreateBackwardIteratorWithEndPosition(endPosition: number): Iterator<TInterval>;
@@ -170,7 +177,7 @@ export interface IIntervalCollection<TInterval extends ISerializableInterval> ex
170
177
  removeIntervalById(id: string): TInterval | undefined;
171
178
  }
172
179
 
173
- // @internal
180
+ // @alpha
174
181
  export interface IIntervalCollectionEvent<TInterval extends ISerializableInterval> extends IEvent {
175
182
  (event: "changeInterval", listener: (interval: TInterval, previousInterval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined, slide: boolean) => void): any;
176
183
  (event: "addInterval" | "deleteInterval", listener: (interval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined) => void): any;
@@ -195,7 +202,7 @@ export interface IMapMessageLocalMetadata {
195
202
  localSeq: number;
196
203
  }
197
204
 
198
- // @internal
205
+ // @alpha
199
206
  export interface InteriorSequencePlace {
200
207
  // (undocumented)
201
208
  pos: number;
@@ -236,7 +243,7 @@ export class Interval implements ISerializableInterval {
236
243
  union(b: Interval): Interval;
237
244
  }
238
245
 
239
- // @internal
246
+ // @alpha
240
247
  export interface IntervalIndex<TInterval extends ISerializableInterval> {
241
248
  add(interval: TInterval): void;
242
249
  remove(interval: TInterval): void;
@@ -297,7 +304,7 @@ export type IntervalRevertible = {
297
304
  mergeTreeRevertible: MergeTreeDeltaRevertible;
298
305
  };
299
306
 
300
- // @internal
307
+ // @alpha
301
308
  export const IntervalStickiness: {
302
309
  readonly NONE: 0;
303
310
  readonly START: 1;
@@ -305,16 +312,17 @@ export const IntervalStickiness: {
305
312
  readonly FULL: 3;
306
313
  };
307
314
 
308
- // @internal
315
+ // @alpha
309
316
  export type IntervalStickiness = (typeof IntervalStickiness)[keyof typeof IntervalStickiness];
310
317
 
311
- // @internal (undocumented)
318
+ // @alpha (undocumented)
312
319
  export enum IntervalType {
313
320
  // @deprecated (undocumented)
314
321
  Nest = 1,
315
322
  // (undocumented)
316
323
  Simple = 0,
317
324
  SlideOnRemove = 2,
325
+ // @internal
318
326
  Transient = 4
319
327
  }
320
328
 
@@ -325,7 +333,7 @@ export interface IOverlappingIntervalsIndex<TInterval extends ISerializableInter
325
333
  gatherIterationResults(results: TInterval[], iteratesForward: boolean, start?: SequencePlace, end?: SequencePlace): void;
326
334
  }
327
335
 
328
- // @internal
336
+ // @alpha
329
337
  export interface ISequenceDeltaRange<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes> {
330
338
  operation: TOperation;
331
339
  position: number;
@@ -333,7 +341,7 @@ export interface ISequenceDeltaRange<TOperation extends MergeTreeDeltaOperationT
333
341
  segment: ISegment;
334
342
  }
335
343
 
336
- // @internal (undocumented)
344
+ // @alpha (undocumented)
337
345
  export interface ISerializableInterval extends IInterval {
338
346
  // (undocumented)
339
347
  addProperties(props: PropertySet, collaborating?: boolean, seq?: number): PropertySet | undefined;
@@ -345,7 +353,7 @@ export interface ISerializableInterval extends IInterval {
345
353
  serialize(): ISerializedInterval;
346
354
  }
347
355
 
348
- // @internal
356
+ // @alpha
349
357
  export interface ISerializedInterval {
350
358
  end: number | "start" | "end";
351
359
  // (undocumented)
@@ -359,13 +367,13 @@ export interface ISerializedInterval {
359
367
  stickiness?: IntervalStickiness;
360
368
  }
361
369
 
362
- // @internal (undocumented)
370
+ // @alpha (undocumented)
363
371
  export interface ISharedIntervalCollection<TInterval extends ISerializableInterval> {
364
372
  // (undocumented)
365
373
  getIntervalCollection(label: string): IIntervalCollection<TInterval>;
366
374
  }
367
375
 
368
- // @internal
376
+ // @alpha
369
377
  export interface ISharedSegmentSequenceEvents extends ISharedObjectEvents {
370
378
  // (undocumented)
371
379
  (event: "createIntervalCollection", listener: (label: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
@@ -375,7 +383,7 @@ export interface ISharedSegmentSequenceEvents extends ISharedObjectEvents {
375
383
  (event: "maintenance", listener: (event: SequenceMaintenanceEvent, target: IEventThisPlaceHolder) => void): any;
376
384
  }
377
385
 
378
- // @internal
386
+ // @alpha
379
387
  export interface ISharedString extends SharedSegmentSequence<SharedStringSegment> {
380
388
  insertMarker(pos: number, refType: ReferenceType, props?: PropertySet): IMergeTreeInsertMsg | undefined;
381
389
  insertText(pos: number, text: string, props?: PropertySet): void;
@@ -397,7 +405,7 @@ export interface IValueOpEmitter {
397
405
  // @internal
398
406
  export function revertSharedStringRevertibles(sharedString: SharedString, revertibles: SharedStringRevertible[]): void;
399
407
 
400
- // @internal
408
+ // @alpha
401
409
  export class SequenceDeltaEvent extends SequenceEvent<MergeTreeDeltaOperationType> {
402
410
  constructor(opArgs: IMergeTreeDeltaOpArgs, deltaArgs: IMergeTreeDeltaCallbackArgs, mergeTreeClient: Client);
403
411
  readonly isLocal: boolean;
@@ -405,7 +413,7 @@ export class SequenceDeltaEvent extends SequenceEvent<MergeTreeDeltaOperationTyp
405
413
  readonly opArgs: IMergeTreeDeltaOpArgs;
406
414
  }
407
415
 
408
- // @internal
416
+ // @alpha
409
417
  export abstract class SequenceEvent<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes> {
410
418
  constructor(deltaArgs: IMergeTreeDeltaCallbackArgs<TOperation>, mergeTreeClient: Client);
411
419
  get clientId(): string | undefined;
@@ -418,7 +426,7 @@ export abstract class SequenceEvent<TOperation extends MergeTreeDeltaOperationTy
418
426
  get ranges(): readonly Readonly<ISequenceDeltaRange<TOperation>>[];
419
427
  }
420
428
 
421
- // @internal
429
+ // @alpha
422
430
  export class SequenceInterval implements ISerializableInterval {
423
431
  constructor(client: Client,
424
432
  start: LocalReferencePosition,
@@ -472,7 +480,7 @@ export namespace SequenceIntervalIndexes {
472
480
  }
473
481
  }
474
482
 
475
- // @internal
483
+ // @alpha
476
484
  export class SequenceMaintenanceEvent extends SequenceEvent<MergeTreeMaintenanceType> {
477
485
  constructor(opArgs: IMergeTreeDeltaOpArgs | undefined, deltaArgs: IMergeTreeMaintenanceCallbackArgs, mergeTreeClient: Client);
478
486
  // (undocumented)
@@ -487,7 +495,7 @@ export interface SequenceOptions {
487
495
  mergeTreeReferencesCanSlideToEndpoint: boolean;
488
496
  }
489
497
 
490
- // @internal
498
+ // @alpha
491
499
  export type SequencePlace = number | "start" | "end" | InteriorSequencePlace;
492
500
 
493
501
  // @internal
@@ -533,7 +541,7 @@ export class SharedIntervalCollectionFactory implements IChannelFactory {
533
541
  get type(): string;
534
542
  }
535
543
 
536
- // @internal (undocumented)
544
+ // @alpha (undocumented)
537
545
  export abstract class SharedSegmentSequence<T extends ISegment> extends SharedObject<ISharedSegmentSequenceEvents> implements ISharedIntervalCollection<SequenceInterval>, MergeTreeRevertibleDriver {
538
546
  constructor(dataStoreRuntime: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes, segmentFromSpec: (spec: IJSONSegment) => ISegment);
539
547
  annotateRange(start: number, end: number, props: PropertySet, combiningOp?: ICombiningOp): void;
@@ -616,7 +624,7 @@ export class SharedSequence<T> extends SharedSegmentSequence<SubSequence<T>> {
616
624
  remove(start: number, end: number): void;
617
625
  }
618
626
 
619
- // @internal
627
+ // @alpha
620
628
  export class SharedString extends SharedSegmentSequence<SharedStringSegment> implements ISharedString {
621
629
  constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);
622
630
  annotateMarker(marker: Marker, props: PropertySet, combiningOp?: ICombiningOp): void;
@@ -648,7 +656,7 @@ export class SharedString extends SharedSegmentSequence<SharedStringSegment> imp
648
656
  searchForMarker(startPos: number, markerLabel: string, forwards?: boolean): Marker | undefined;
649
657
  }
650
658
 
651
- // @internal (undocumented)
659
+ // @alpha (undocumented)
652
660
  export class SharedStringFactory implements IChannelFactory {
653
661
  // (undocumented)
654
662
  static readonly Attributes: IChannelAttributes;
@@ -669,10 +677,10 @@ export class SharedStringFactory implements IChannelFactory {
669
677
  // @internal
670
678
  export type SharedStringRevertible = MergeTreeDeltaRevertible | IntervalRevertible;
671
679
 
672
- // @internal (undocumented)
680
+ // @alpha (undocumented)
673
681
  export type SharedStringSegment = TextSegment | Marker;
674
682
 
675
- // @internal
683
+ // @alpha
676
684
  export enum Side {
677
685
  // (undocumented)
678
686
  After = 1,
@@ -32,14 +32,14 @@ import { IEndpointIndex, IIdIntervalIndex, IOverlappingIntervalsIndex, IntervalI
32
32
  * If a SequencePlace is the endpoint of a range (e.g. start/end of an interval or search range),
33
33
  * the Side value means it is exclusive if it is nearer to the other position and inclusive if it is farther.
34
34
  * E.g. the start of a range with Side.After is exclusive of the character at the position.
35
- * @internal
35
+ * @alpha
36
36
  */
37
37
  export type SequencePlace = number | "start" | "end" | InteriorSequencePlace;
38
38
  /**
39
39
  * A sequence place that does not refer to the special endpoint segments.
40
40
  *
41
41
  * See {@link SequencePlace} for additional context.
42
- * @internal
42
+ * @alpha
43
43
  */
44
44
  export interface InteriorSequencePlace {
45
45
  pos: number;
@@ -49,7 +49,7 @@ export interface InteriorSequencePlace {
49
49
  * Defines a side relative to a character in a sequence.
50
50
  *
51
51
  * @remarks See {@link SequencePlace} for additional context on usage.
52
- * @internal
52
+ * @alpha
53
53
  */
54
54
  export declare enum Side {
55
55
  Before = 0,
@@ -128,7 +128,7 @@ export declare class IntervalCollectionValueType implements IValueType<IntervalC
128
128
  }
129
129
  export declare function makeOpsMap<T extends ISerializableInterval>(): Map<IntervalOpType, IValueOperation<IntervalCollection<T>>>;
130
130
  /**
131
- * @internal
131
+ * @alpha
132
132
  */
133
133
  export type DeserializeCallback = (properties: PropertySet) => void;
134
134
  declare class IntervalCollectionIterator<TInterval extends ISerializableInterval> implements Iterator<TInterval> {
@@ -139,7 +139,7 @@ declare class IntervalCollectionIterator<TInterval extends ISerializableInterval
139
139
  }
140
140
  /**
141
141
  * Change events emitted by `IntervalCollection`s
142
- * @internal
142
+ * @alpha
143
143
  */
144
144
  export interface IIntervalCollectionEvent<TInterval extends ISerializableInterval> extends IEvent {
145
145
  /**
@@ -176,7 +176,7 @@ export interface IIntervalCollectionEvent<TInterval extends ISerializableInterva
176
176
  /**
177
177
  * Collection of intervals that supports addition, modification, removal, and efficient spatial querying.
178
178
  * Changes to this collection will be incur updates on collaborating clients (i.e. they are not local-only).
179
- * @internal
179
+ * @alpha
180
180
  */
181
181
  export interface IIntervalCollection<TInterval extends ISerializableInterval> extends TypedEventEmitter<IIntervalCollectionEvent<TInterval>> {
182
182
  readonly attached: boolean;
@@ -298,6 +298,7 @@ export interface IIntervalCollection<TInterval extends ISerializableInterval> ex
298
298
  removeIntervalById(id: string): TInterval | undefined;
299
299
  /**
300
300
  * Changes the properties on an existing interval.
301
+ * @deprecated - call change with the id and and object containing the new properties
301
302
  * @param id - Id of the interval whose properties should be changed
302
303
  * @param props - Property set to apply to the interval. Shallow merging is used between any existing properties
303
304
  * and `prop`, i.e. the interval will end up with a property object equivalent to `{ ...oldProps, ...props }`.
@@ -305,12 +306,26 @@ export interface IIntervalCollection<TInterval extends ISerializableInterval> ex
305
306
  changeProperties(id: string, props: PropertySet): any;
306
307
  /**
307
308
  * Changes the endpoints of an existing interval.
309
+ * @deprecated - call change with the start and end parameters encapsulated in an object
308
310
  * @param id - Id of the interval to change
309
311
  * @param start - New start value. To leave the endpoint unchanged, pass the current value.
310
312
  * @param end - New end value. To leave the endpoint unchanged, pass the current value.
311
313
  * @returns the interval that was changed, if it existed in the collection.
312
314
  */
313
315
  change(id: string, start: SequencePlace, end: SequencePlace): TInterval | undefined;
316
+ /**
317
+ * Changes the endpoints, properties, or both of an existing interval.
318
+ * @param id - Id of the Interval to change
319
+ * @returns the interval that was changed, if it existed in the collection.
320
+ * Pass the desired new start position, end position, and/or properties in an object. Start and end positions must be changed
321
+ * simultaneously - they must either both be specified or both undefined. To only change the properties, leave both endpoints
322
+ * undefined. To only change the endpoints, leave the properties undefined.
323
+ */
324
+ change(id: string, { start, end, props }: {
325
+ start?: SequencePlace;
326
+ end?: SequencePlace;
327
+ props?: PropertySet;
328
+ }): TInterval | undefined;
314
329
  attachDeserializer(onDeserialize: DeserializeCallback): void;
315
330
  /**
316
331
  * @returns an iterator over all intervals in this collection.
@@ -440,12 +455,22 @@ export declare class IntervalCollection<TInterval extends ISerializableInterval>
440
455
  removeIntervalById(id: string): TInterval | undefined;
441
456
  /**
442
457
  * {@inheritdoc IIntervalCollection.changeProperties}
458
+ * @deprecated - call change with the id and an object containing the new props values
443
459
  */
444
460
  changeProperties(id: string, props: PropertySet): void;
445
461
  /**
446
462
  * {@inheritdoc IIntervalCollection.change}
463
+ * @deprecated - call change with the id and an object containing the new start, end, and/or props values
447
464
  */
448
465
  change(id: string, start: SequencePlace, end: SequencePlace): TInterval | undefined;
466
+ /**
467
+ * {@inheritdoc IIntervalCollection.change}
468
+ */
469
+ change(id: string, { start, end, props }: {
470
+ start?: SequencePlace;
471
+ end?: SequencePlace;
472
+ props?: PropertySet;
473
+ }): TInterval | undefined;
449
474
  private get isCollaborating();
450
475
  private addPendingChange;
451
476
  private addPendingChangeHelper;
@@ -1 +1 @@
1
- {"version":3,"file":"intervalCollection.d.ts","sourceRoot":"","sources":["../src/intervalCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAEN,MAAM,EAKN,WAAW,EACX,sBAAsB,EAQtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,OAAO,EACN,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,eAAe,EACf,UAAU,EACV,eAAe,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,4BAA4B,EAC5B,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EAMvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEN,cAAc,EACd,gBAAgB,EAChB,0BAA0B,EAC1B,aAAa,EAGb,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,qBAAqB,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,IAAI,CAAC;CACX;AAED;;;;;GAKG;AACH,oBAAY,IAAI;IACf,MAAM,IA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pB,eAAe,EAAE,OAAO,EACxB,KAAK,CAAC,EAAE,MAAM,EACd,GAAG,CAAC,EAAE,MAAM;IAcb;;OAEG;IACI,wBAAwB,CAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE;IAWxF;;OAEG;IACI,GAAG,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,IAAI;IAU5C;;OAEG;IACI,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;IAQ3D;;OAEG;IACI,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS;CAOvD;AASD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAC1C,iBAAiB,EAAE,sBAAsB,GACvC,eAAe,GAAG,SAAS,CAM7B"}
@@ -18,7 +18,7 @@ const intervalIndex_1 = require("./intervalIndex");
18
18
  * Defines a side relative to a character in a sequence.
19
19
  *
20
20
  * @remarks See {@link SequencePlace} for additional context on usage.
21
- * @internal
21
+ * @alpha
22
22
  */
23
23
  var Side;
24
24
  (function (Side) {
@@ -664,58 +664,54 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
664
664
  }
665
665
  /**
666
666
  * {@inheritdoc IIntervalCollection.changeProperties}
667
+ * @deprecated - call change with the id and an object containing the new props values
667
668
  */
668
669
  changeProperties(id, props) {
669
- if (!this.attached) {
670
- throw new telemetry_utils_1.LoggingError("Attach must be called before accessing intervals");
671
- }
672
- if (typeof id !== "string") {
673
- throw new telemetry_utils_1.LoggingError("Change API requires an ID that is a string");
674
- }
675
- if (!props) {
676
- throw new telemetry_utils_1.LoggingError("changeProperties should be called with a property set");
677
- }
678
- // prevent the overwriting of an interval label, it should remain unchanged
679
- // once it has been inserted into the collection.
680
- if (props[merge_tree_1.reservedRangeLabelsKey] !== undefined) {
681
- throw new telemetry_utils_1.LoggingError("The label property should not be modified once inserted to the collection");
670
+ this.change(id, { props });
671
+ }
672
+ change(arg1, arg2, arg3) {
673
+ const id = arg1;
674
+ let start;
675
+ let end;
676
+ let props;
677
+ if (isSequencePlace(arg2)) {
678
+ start = arg2;
679
+ end = arg3;
682
680
  }
683
- const interval = this.getIntervalById(id);
684
- if (interval) {
685
- const deltaProps = interval.addProperties(props, true, this.isCollaborating ? merge_tree_1.UnassignedSequenceNumber : merge_tree_1.UniversalSequenceNumber);
686
- const serializedInterval = interval.serialize();
687
- // Emit a change op that will only change properties. Add the ID to
688
- // the property bag provided by the caller.
689
- serializedInterval.start = undefined;
690
- serializedInterval.end = undefined;
691
- serializedInterval.properties = props;
692
- serializedInterval.properties[reservedIntervalIdKey] = interval.getIntervalId();
693
- const localSeq = this.getNextLocalSeq();
694
- this.localSeqToSerializedInterval.set(localSeq, serializedInterval);
695
- this.emitter.emit("change", undefined, serializedInterval, { localSeq });
696
- this.emit("propertyChanged", interval, deltaProps, true, undefined);
681
+ else {
682
+ start = arg2.start;
683
+ end = arg2.end;
684
+ props = arg2.props;
697
685
  }
698
- }
699
- /**
700
- * {@inheritdoc IIntervalCollection.change}
701
- */
702
- change(id, start, end) {
703
686
  if (!this.localCollection) {
704
687
  throw new telemetry_utils_1.LoggingError("Attach must be called before accessing intervals");
705
688
  }
706
689
  // Force id to be a string.
707
690
  if (typeof id !== "string") {
708
- throw new telemetry_utils_1.LoggingError("Change API requires an ID that is a string");
691
+ throw new telemetry_utils_1.UsageError("Change API requires an ID that is a string");
692
+ }
693
+ // Ensure that both start and end are defined or both are undefined.
694
+ if ((start === undefined) !== (end === undefined)) {
695
+ throw new telemetry_utils_1.UsageError("Change API requires both start and end to be defined or undefined");
696
+ }
697
+ // prevent the overwriting of an interval label, it should remain unchanged
698
+ // once it has been inserted into the collection.
699
+ if (props?.[merge_tree_1.reservedRangeLabelsKey] !== undefined) {
700
+ throw new telemetry_utils_1.UsageError("The label property should not be modified once inserted to the collection");
709
701
  }
710
702
  const interval = this.getIntervalById(id);
711
703
  if (interval) {
712
- const newInterval = this.localCollection.changeInterval(interval, start, end);
713
- if (!newInterval) {
714
- return undefined;
704
+ let deltaProps;
705
+ let newInterval;
706
+ if (props !== undefined) {
707
+ deltaProps = interval.addProperties(props, true, this.isCollaborating ? merge_tree_1.UnassignedSequenceNumber : merge_tree_1.UniversalSequenceNumber);
715
708
  }
716
- if (!this.isCollaborating && newInterval instanceof intervals_1.SequenceInterval) {
717
- setSlideOnRemove(newInterval.start);
718
- setSlideOnRemove(newInterval.end);
709
+ if (start !== undefined && end !== undefined) {
710
+ newInterval = this.localCollection.changeInterval(interval, start, end);
711
+ if (!this.isCollaborating && newInterval instanceof intervals_1.SequenceInterval) {
712
+ setSlideOnRemove(newInterval.start);
713
+ setSlideOnRemove(newInterval.end);
714
+ }
719
715
  }
720
716
  const serializedInterval = interval.serialize();
721
717
  const { startPos, startSide, endPos, endSide } = endpointPosAndSide(start, end);
@@ -725,15 +721,21 @@ class IntervalCollection extends client_utils_1.TypedEventEmitter {
725
721
  serializedInterval.startSide = startSide;
726
722
  serializedInterval.endSide = endSide;
727
723
  serializedInterval.stickiness = stickiness;
728
- // Emit a property bag containing only the ID, as we don't intend for this op to change any properties.
724
+ // Emit a property bag containing the ID and the other (if any) properties changed
729
725
  serializedInterval.properties = {
730
726
  [reservedIntervalIdKey]: interval.getIntervalId(),
727
+ ...props,
731
728
  };
732
729
  const localSeq = this.getNextLocalSeq();
733
730
  this.localSeqToSerializedInterval.set(localSeq, serializedInterval);
734
731
  this.emitter.emit("change", undefined, serializedInterval, { localSeq });
735
- this.addPendingChange(id, serializedInterval);
736
- this.emitChange(newInterval, interval, true, false);
732
+ if (deltaProps !== undefined) {
733
+ this.emit("propertyChanged", interval, deltaProps, true, undefined);
734
+ }
735
+ if (newInterval) {
736
+ this.addPendingChange(id, serializedInterval);
737
+ this.emitChange(newInterval, interval, true, false);
738
+ }
737
739
  return newInterval;
738
740
  }
739
741
  // No interval to change