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

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 (168) hide show
  1. package/api-extractor-lint.json +13 -0
  2. package/api-report/sequence.api.md +68 -78
  3. package/dist/defaultMapInterfaces.d.ts +1 -2
  4. package/dist/defaultMapInterfaces.d.ts.map +1 -1
  5. package/dist/defaultMapInterfaces.js.map +1 -1
  6. package/dist/intervalCollection.d.ts +8 -8
  7. package/dist/intervalCollection.js +2 -2
  8. package/dist/intervalCollection.js.map +1 -1
  9. package/dist/intervalIndex/endpointInRangeIndex.d.ts +2 -2
  10. package/dist/intervalIndex/endpointInRangeIndex.js +1 -1
  11. package/dist/intervalIndex/endpointInRangeIndex.js.map +1 -1
  12. package/dist/intervalIndex/endpointIndex.d.ts +2 -2
  13. package/dist/intervalIndex/endpointIndex.js +1 -1
  14. package/dist/intervalIndex/endpointIndex.js.map +1 -1
  15. package/dist/intervalIndex/idIntervalIndex.d.ts +2 -2
  16. package/dist/intervalIndex/idIntervalIndex.js +1 -1
  17. package/dist/intervalIndex/idIntervalIndex.js.map +1 -1
  18. package/dist/intervalIndex/intervalIndex.d.ts +1 -1
  19. package/dist/intervalIndex/intervalIndex.js.map +1 -1
  20. package/dist/intervalIndex/overlappingIntervalsIndex.d.ts +2 -2
  21. package/dist/intervalIndex/overlappingIntervalsIndex.js +1 -1
  22. package/dist/intervalIndex/overlappingIntervalsIndex.js.map +1 -1
  23. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.d.ts +1 -1
  24. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.js +1 -1
  25. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.js.map +1 -1
  26. package/dist/intervalIndex/sequenceIntervalIndexes.d.ts +2 -1
  27. package/dist/intervalIndex/sequenceIntervalIndexes.d.ts.map +1 -1
  28. package/dist/intervalIndex/sequenceIntervalIndexes.js.map +1 -1
  29. package/dist/intervalIndex/startpointInRangeIndex.d.ts +2 -2
  30. package/dist/intervalIndex/startpointInRangeIndex.js +1 -1
  31. package/dist/intervalIndex/startpointInRangeIndex.js.map +1 -1
  32. package/dist/intervals/interval.d.ts +2 -7
  33. package/dist/intervals/interval.d.ts.map +1 -1
  34. package/dist/intervals/interval.js +1 -5
  35. package/dist/intervals/interval.js.map +1 -1
  36. package/dist/intervals/intervalUtils.d.ts +9 -11
  37. package/dist/intervals/intervalUtils.d.ts.map +1 -1
  38. package/dist/intervals/intervalUtils.js +2 -2
  39. package/dist/intervals/intervalUtils.js.map +1 -1
  40. package/dist/intervals/sequenceInterval.d.ts +3 -12
  41. package/dist/intervals/sequenceInterval.d.ts.map +1 -1
  42. package/dist/intervals/sequenceInterval.js +3 -11
  43. package/dist/intervals/sequenceInterval.js.map +1 -1
  44. package/dist/packageVersion.d.ts +1 -1
  45. package/dist/packageVersion.js +1 -1
  46. package/dist/packageVersion.js.map +1 -1
  47. package/dist/revertibles.d.ts +9 -13
  48. package/dist/revertibles.d.ts.map +1 -1
  49. package/dist/revertibles.js +7 -9
  50. package/dist/revertibles.js.map +1 -1
  51. package/dist/sequence-alpha.d.ts +137 -1538
  52. package/dist/sequence-beta.d.ts +128 -1442
  53. package/dist/sequence-public.d.ts +128 -1442
  54. package/dist/sequence-untrimmed.d.ts +63 -85
  55. package/dist/sequence.d.ts +2 -3
  56. package/dist/sequence.d.ts.map +1 -1
  57. package/dist/sequence.js +1 -1
  58. package/dist/sequence.js.map +1 -1
  59. package/dist/sequenceDeltaEvent.d.ts +4 -4
  60. package/dist/sequenceDeltaEvent.js +3 -3
  61. package/dist/sequenceDeltaEvent.js.map +1 -1
  62. package/dist/sequenceFactory.d.ts +1 -1
  63. package/dist/sequenceFactory.js +1 -1
  64. package/dist/sequenceFactory.js.map +1 -1
  65. package/dist/sharedIntervalCollection.d.ts +3 -3
  66. package/dist/sharedIntervalCollection.js +2 -2
  67. package/dist/sharedIntervalCollection.js.map +1 -1
  68. package/dist/sharedSequence.d.ts +3 -3
  69. package/dist/sharedSequence.js +2 -2
  70. package/dist/sharedSequence.js.map +1 -1
  71. package/dist/sharedString.d.ts +4 -5
  72. package/dist/sharedString.d.ts.map +1 -1
  73. package/dist/sharedString.js +2 -3
  74. package/dist/sharedString.js.map +1 -1
  75. package/lib/defaultMapInterfaces.d.ts +1 -2
  76. package/lib/defaultMapInterfaces.d.ts.map +1 -1
  77. package/lib/defaultMapInterfaces.js.map +1 -1
  78. package/lib/intervalCollection.d.ts +8 -8
  79. package/lib/intervalCollection.js +2 -2
  80. package/lib/intervalCollection.js.map +1 -1
  81. package/lib/intervalIndex/endpointInRangeIndex.d.ts +2 -2
  82. package/lib/intervalIndex/endpointInRangeIndex.js +1 -1
  83. package/lib/intervalIndex/endpointInRangeIndex.js.map +1 -1
  84. package/lib/intervalIndex/endpointIndex.d.ts +2 -2
  85. package/lib/intervalIndex/endpointIndex.js +1 -1
  86. package/lib/intervalIndex/endpointIndex.js.map +1 -1
  87. package/lib/intervalIndex/idIntervalIndex.d.ts +2 -2
  88. package/lib/intervalIndex/idIntervalIndex.js +1 -1
  89. package/lib/intervalIndex/idIntervalIndex.js.map +1 -1
  90. package/lib/intervalIndex/intervalIndex.d.ts +1 -1
  91. package/lib/intervalIndex/intervalIndex.js.map +1 -1
  92. package/lib/intervalIndex/overlappingIntervalsIndex.d.ts +2 -2
  93. package/lib/intervalIndex/overlappingIntervalsIndex.js +1 -1
  94. package/lib/intervalIndex/overlappingIntervalsIndex.js.map +1 -1
  95. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.d.ts +1 -1
  96. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.js +1 -1
  97. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.js.map +1 -1
  98. package/lib/intervalIndex/sequenceIntervalIndexes.d.ts +2 -1
  99. package/lib/intervalIndex/sequenceIntervalIndexes.d.ts.map +1 -1
  100. package/lib/intervalIndex/sequenceIntervalIndexes.js.map +1 -1
  101. package/lib/intervalIndex/startpointInRangeIndex.d.ts +2 -2
  102. package/lib/intervalIndex/startpointInRangeIndex.js +1 -1
  103. package/lib/intervalIndex/startpointInRangeIndex.js.map +1 -1
  104. package/lib/intervals/interval.d.ts +2 -7
  105. package/lib/intervals/interval.d.ts.map +1 -1
  106. package/lib/intervals/interval.js +1 -5
  107. package/lib/intervals/interval.js.map +1 -1
  108. package/lib/intervals/intervalUtils.d.ts +9 -11
  109. package/lib/intervals/intervalUtils.d.ts.map +1 -1
  110. package/lib/intervals/intervalUtils.js +2 -2
  111. package/lib/intervals/intervalUtils.js.map +1 -1
  112. package/lib/intervals/sequenceInterval.d.ts +3 -12
  113. package/lib/intervals/sequenceInterval.d.ts.map +1 -1
  114. package/lib/intervals/sequenceInterval.js +3 -11
  115. package/lib/intervals/sequenceInterval.js.map +1 -1
  116. package/lib/packageVersion.d.ts +1 -1
  117. package/lib/packageVersion.js +1 -1
  118. package/lib/packageVersion.js.map +1 -1
  119. package/lib/revertibles.d.ts +9 -13
  120. package/lib/revertibles.d.ts.map +1 -1
  121. package/lib/revertibles.js +7 -9
  122. package/lib/revertibles.js.map +1 -1
  123. package/lib/sequence-alpha.d.ts +137 -1538
  124. package/lib/sequence-beta.d.ts +128 -1442
  125. package/lib/sequence-public.d.ts +128 -1442
  126. package/lib/sequence-untrimmed.d.ts +63 -85
  127. package/lib/sequence.d.ts +2 -3
  128. package/lib/sequence.d.ts.map +1 -1
  129. package/lib/sequence.js +1 -1
  130. package/lib/sequence.js.map +1 -1
  131. package/lib/sequenceDeltaEvent.d.ts +4 -4
  132. package/lib/sequenceDeltaEvent.js +3 -3
  133. package/lib/sequenceDeltaEvent.js.map +1 -1
  134. package/lib/sequenceFactory.d.ts +1 -1
  135. package/lib/sequenceFactory.js +1 -1
  136. package/lib/sequenceFactory.js.map +1 -1
  137. package/lib/sharedIntervalCollection.d.ts +3 -3
  138. package/lib/sharedIntervalCollection.js +2 -2
  139. package/lib/sharedIntervalCollection.js.map +1 -1
  140. package/lib/sharedSequence.d.ts +3 -3
  141. package/lib/sharedSequence.js +2 -2
  142. package/lib/sharedSequence.js.map +1 -1
  143. package/lib/sharedString.d.ts +4 -5
  144. package/lib/sharedString.d.ts.map +1 -1
  145. package/lib/sharedString.js +2 -3
  146. package/lib/sharedString.js.map +1 -1
  147. package/package.json +16 -15
  148. package/src/defaultMapInterfaces.ts +1 -2
  149. package/src/intervalCollection.ts +8 -8
  150. package/src/intervalIndex/endpointInRangeIndex.ts +2 -2
  151. package/src/intervalIndex/endpointIndex.ts +2 -2
  152. package/src/intervalIndex/idIntervalIndex.ts +2 -2
  153. package/src/intervalIndex/intervalIndex.ts +1 -1
  154. package/src/intervalIndex/overlappingIntervalsIndex.ts +2 -2
  155. package/src/intervalIndex/overlappingSequenceIntervalsIndex.ts +1 -1
  156. package/src/intervalIndex/sequenceIntervalIndexes.ts +2 -1
  157. package/src/intervalIndex/startpointInRangeIndex.ts +2 -2
  158. package/src/intervals/interval.ts +2 -7
  159. package/src/intervals/intervalUtils.ts +9 -11
  160. package/src/intervals/sequenceInterval.ts +3 -12
  161. package/src/packageVersion.ts +1 -1
  162. package/src/revertibles.ts +9 -13
  163. package/src/sequence.ts +2 -3
  164. package/src/sequenceDeltaEvent.ts +4 -4
  165. package/src/sequenceFactory.ts +1 -1
  166. package/src/sharedIntervalCollection.ts +3 -3
  167. package/src/sharedSequence.ts +3 -3
  168. package/src/sharedString.ts +4 -5
@@ -11,48 +11,7 @@
11
11
  * @packageDocumentation
12
12
  */
13
13
 
14
- import { BaseSegment } from '@fluidframework/merge-tree';
15
- import { Client } from '@fluidframework/merge-tree';
16
- import { Deferred } from '@fluidframework/core-utils';
17
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
18
- import { IChannelFactory } from '@fluidframework/datastore-definitions';
19
- import { IChannelServices } from '@fluidframework/datastore-definitions';
20
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
21
- import { ICombiningOp } from '@fluidframework/merge-tree';
22
- import { IEvent } from '@fluidframework/core-interfaces';
23
- import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
24
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
25
- import { IFluidSerializer } from '@fluidframework/shared-object-base';
26
- import { IJSONSegment } from '@fluidframework/merge-tree';
27
- import { IMergeTreeDeltaCallbackArgs } from '@fluidframework/merge-tree';
28
- import { IMergeTreeDeltaOpArgs } from '@fluidframework/merge-tree';
29
- import { IMergeTreeGroupMsg } from '@fluidframework/merge-tree';
30
- import { IMergeTreeInsertMsg } from '@fluidframework/merge-tree';
31
- import { IMergeTreeMaintenanceCallbackArgs } from '@fluidframework/merge-tree';
32
- import { IMergeTreeOp } from '@fluidframework/merge-tree';
33
- import { IMergeTreeRemoveMsg } from '@fluidframework/merge-tree';
34
- import { IRelativePosition } from '@fluidframework/merge-tree';
35
- import { ISegment } from '@fluidframework/merge-tree';
36
- import { ISegmentAction } from '@fluidframework/merge-tree';
37
14
  import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
38
- import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
39
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
40
- import { ITelemetryContext } from '@fluidframework/runtime-definitions';
41
- import { LocalReferencePosition } from '@fluidframework/merge-tree';
42
- import { Marker } from '@fluidframework/merge-tree';
43
- import { MergeTreeDeltaOperationType } from '@fluidframework/merge-tree';
44
- import { MergeTreeDeltaOperationTypes } from '@fluidframework/merge-tree';
45
- import { MergeTreeMaintenanceType } from '@fluidframework/merge-tree';
46
- import { PropertiesManager } from '@fluidframework/merge-tree';
47
- import { PropertySet } from '@fluidframework/merge-tree';
48
- import { RangeStackMap } from '@fluidframework/merge-tree';
49
- import { ReferencePosition } from '@fluidframework/merge-tree';
50
- import { ReferenceType } from '@fluidframework/merge-tree';
51
- import { Serializable } from '@fluidframework/datastore-definitions';
52
- import { SharedObject } from '@fluidframework/shared-object-base';
53
- import { SlidingPreference } from '@fluidframework/merge-tree';
54
- import { SummarySerializer } from '@fluidframework/shared-object-base';
55
- import { TextSegment } from '@fluidframework/merge-tree';
56
15
 
57
16
  /* Excluded from this release type: appendAddIntervalToRevertibles */
58
17
 
@@ -64,537 +23,91 @@ import { TextSegment } from '@fluidframework/merge-tree';
64
23
 
65
24
  /* Excluded from this release type: appendSharedStringDeltaToRevertibles */
66
25
 
67
- /**
68
- * @public
69
- */
70
- export declare function createEndpointIndex(sharedString: SharedString): IEndpointIndex<SequenceInterval>;
26
+ /* Excluded from this release type: BaseSegment */
71
27
 
72
- /**
73
- * @public
74
- */
75
- export declare function createEndpointInRangeIndex(sharedString: SharedString): IEndpointInRangeIndex<SequenceInterval>;
28
+ /* Excluded from this release type: Client */
76
29
 
77
- /**
78
- * @public
79
- */
80
- export declare function createIdIntervalIndex<TInterval extends ISerializableInterval>(): IIdIntervalIndex<TInterval>;
30
+ /* Excluded from this release type: createEndpointIndex */
81
31
 
82
- /**
83
- * @public
84
- */
85
- export declare function createOverlappingIntervalsIndex(sharedString: SharedString): IOverlappingIntervalsIndex<SequenceInterval>;
32
+ /* Excluded from this release type: createEndpointInRangeIndex */
86
33
 
87
- /**
88
- * @public
89
- */
90
- export declare function createOverlappingSequenceIntervalsIndex(sharedString: SharedString): SequenceIntervalIndexes.Overlapping;
34
+ /* Excluded from this release type: createIdIntervalIndex */
91
35
 
92
- /**
93
- * @public
94
- */
95
- export declare function createStartpointInRangeIndex(sharedString: SharedString): IStartpointInRangeIndex<SequenceInterval>;
36
+ /* Excluded from this release type: createOverlappingIntervalsIndex */
96
37
 
97
- /**
98
- * @public
99
- */
100
- export declare type DeserializeCallback = (properties: PropertySet) => void;
38
+ /* Excluded from this release type: createOverlappingSequenceIntervalsIndex */
39
+
40
+ /* Excluded from this release type: createStartpointInRangeIndex */
41
+
42
+ /* Excluded from this release type: Deferred */
43
+
44
+ /* Excluded from this release type: DeserializeCallback */
101
45
 
102
46
  /* Excluded from this release type: discardSharedStringRevertibles */
103
47
 
104
- /**
105
- * Splits the text into regions ending with markers with the given `label`.
106
- * @param sharedString - String to retrieve text and markers from
107
- * @param label - label to split on
108
- * @returns Two parallel lists of text and markers, split by markers with the provided `label`.
109
- * For example:
110
- * ```typescript
111
- * // Say sharedstring has contents "hello<paragraph marker 1>world<paragraph marker 2>missing".
112
- * const { parallelText, parallelMarkers } = getTextAndMarkers(sharedString, "paragraph");
113
- * // parallelText === ["hello", "world"]
114
- * // parallelMarkers === [<paragraph marker 1 object>, <paragraph marker 2 object>]
115
- * // Note parallelText does not include "missing".
116
- * ```
117
- * @public
118
- */
119
- export declare function getTextAndMarkers(sharedString: SharedString, label: string, start?: number, end?: number): {
120
- parallelText: string[];
121
- parallelMarkers: Marker[];
122
- };
48
+ /* Excluded from this release type: getTextAndMarkers */
123
49
 
124
- /**
125
- * @public
126
- */
127
- export declare interface IEndpointIndex<TInterval extends ISerializableInterval> extends IntervalIndex<TInterval> {
128
- /**
129
- * @returns the previous interval based on the given position number.
130
- * If no such interval exists in this index, returns `undefined`
131
- */
132
- previousInterval(pos: number): TInterval | undefined;
133
- /**
134
- * @returns the next interval based on the given position number.
135
- * If no such interval exists in this index, returns `undefined`
136
- */
137
- nextInterval(pos: number): TInterval | undefined;
138
- }
50
+ /* Excluded from this release type: IChannelAttributes */
139
51
 
140
- /**
141
- * Collection of intervals.
142
- *
143
- * Provide additional APIs to support efficiently querying a collection of intervals whose endpoints fall within a specified range.
144
- * @public
145
- */
146
- export declare interface IEndpointInRangeIndex<TInterval extends ISerializableInterval> extends IntervalIndex<TInterval> {
147
- /**
148
- * @returns an array of all intervals contained in this collection whose endpoints locate in the range [start, end] (includes both ends)
149
- */
150
- findIntervalsWithEndpointInRange(start: number, end: number): TInterval[];
151
- }
52
+ /* Excluded from this release type: IChannelFactory */
152
53
 
153
- /**
154
- * @public
155
- */
156
- export declare interface IIdIntervalIndex<TInterval extends ISerializableInterval> extends IntervalIndex<TInterval>, Iterable<TInterval> {
157
- getIntervalById(id: string): TInterval | undefined;
158
- [Symbol.iterator](): Iterator<TInterval>;
159
- }
54
+ /* Excluded from this release type: IChannelServices */
160
55
 
161
- /**
162
- * Basic interval abstraction
163
- * @public
164
- */
165
- export declare interface IInterval {
166
- /**
167
- * @returns a new interval object with identical semantics.
168
- */
169
- clone(): IInterval;
170
- /**
171
- * Compares this interval to `b` with standard comparator semantics:
172
- * - returns -1 if this is less than `b`
173
- * - returns 1 if this is greater than `b`
174
- * - returns 0 if this is equivalent to `b`
175
- * @param b - Interval to compare against
176
- */
177
- compare(b: IInterval): number;
178
- /**
179
- * Compares the start endpoint of this interval to `b`'s start endpoint.
180
- * Standard comparator semantics apply.
181
- * @param b - Interval to compare against
182
- */
183
- compareStart(b: IInterval): number;
184
- /**
185
- * Compares the end endpoint of this interval to `b`'s end endpoint.
186
- * Standard comparator semantics apply.
187
- * @param b - Interval to compare against
188
- */
189
- compareEnd(b: IInterval): number;
190
- /* Excluded from this release type: modify */
191
- /**
192
- * @returns whether this interval overlaps with `b`.
193
- * Intervals are considered to overlap if their intersection is non-empty.
194
- */
195
- overlaps(b: IInterval): boolean;
196
- /* Excluded from this release type: union */
197
- }
56
+ /* Excluded from this release type: IChannelStorageService */
198
57
 
199
- /**
200
- * Collection of intervals that supports addition, modification, removal, and efficient spatial querying.
201
- * Changes to this collection will be incur updates on collaborating clients (i.e. they are not local-only).
202
- * @public
203
- */
204
- export declare interface IIntervalCollection<TInterval extends ISerializableInterval> extends TypedEventEmitter<IIntervalCollectionEvent<TInterval>> {
205
- readonly attached: boolean;
206
- /**
207
- * Attaches an index to this collection.
208
- * All intervals which are part of this collection will be added to the index, and the index will automatically
209
- * be updated when this collection updates due to local or remote changes.
210
- *
211
- * @remarks After attaching an index to an interval collection, applications should typically store this
212
- * index somewhere in their in-memory data model for future reference and querying.
213
- */
214
- attachIndex(index: IntervalIndex<TInterval>): void;
215
- /**
216
- * Detaches an index from this collection.
217
- * All intervals which are part of this collection will be removed from the index, and updates to this collection
218
- * due to local or remote changes will no longer incur updates to the index.
219
- *
220
- * @returns `false` if the target index cannot be found in the indexes, otherwise remove all intervals in the index and return `true`.
221
- */
222
- detachIndex(index: IntervalIndex<TInterval>): boolean;
223
- /**
224
- * @returns the interval in this collection that has the provided `id`.
225
- * If no interval in the collection has this `id`, returns `undefined`.
226
- */
227
- getIntervalById(id: string): TInterval | undefined;
228
- /**
229
- * Creates a new interval and add it to the collection.
230
- * @deprecated call IntervalCollection.add without specifying an intervalType
231
- * @param start - interval start position (inclusive)
232
- * @param end - interval end position (exclusive)
233
- * @param intervalType - type of the interval. All intervals are SlideOnRemove. Intervals may not be Transient.
234
- * @param props - properties of the interval
235
- * @returns The created interval
236
- * @remarks See documentation on {@link SequenceInterval} for comments on
237
- * interval endpoint semantics: there are subtleties with how the current
238
- * half-open behavior is represented.
239
- *
240
- * Note that intervals may behave unexpectedly if the entire contents
241
- * of the string are deleted. In this case, it is possible for one endpoint
242
- * of the interval to become detached, while the other remains on the string.
243
- *
244
- * By adjusting the `side` and `pos` values of the `start` and `end` parameters,
245
- * it is possible to control whether the interval expands to include content
246
- * inserted at its start or end.
247
- *
248
- * See {@link SequencePlace} for more details on the model.
249
- *
250
- * @example
251
- *
252
- * Given the string "ABCD":
253
- *
254
- *```typescript
255
- * // Refers to "BC". If any content is inserted before B or after C, this
256
- * // interval will include that content
257
- * //
258
- * // Picture:
259
- * // \{start\} - A[- B - C -]D - \{end\}
260
- * // \{start\} - A - B - C - D - \{end\}
261
- * collection.add(\{ pos: 0, side: Side.After \}, \{ pos: 3, side: Side.Before \}, IntervalType.SlideOnRemove);
262
- * // Equivalent to specifying the same positions and Side.Before.
263
- * // Refers to "ABC". Content inserted after C will be included in the
264
- * // interval, but content inserted before A will not.
265
- * // \{start\} -[A - B - C -]D - \{end\}
266
- * // \{start\} - A - B - C - D - \{end\}
267
- * collection.add(0, 3, IntervalType.SlideOnRemove);
268
- *```
269
- *
270
- * In the case of the first example, if text is deleted,
271
- *
272
- * ```typescript
273
- * // Delete the character "B"
274
- * string.removeRange(1, 2);
275
- * ```
276
- *
277
- * The start point of the interval will slide to the position immediately
278
- * before "C", and the same will be true.
279
- *
280
- * ```
281
- * \{start\} - A[- C -]D - \{end\}
282
- * ```
283
- *
284
- * In this case, text inserted immediately before "C" would be included in
285
- * the interval.
286
- *
287
- * ```typescript
288
- * string.insertText(1, "EFG");
289
- * ```
290
- *
291
- * With the string now being,
292
- *
293
- * ```
294
- * \{start\} - A[- E - F - G - C -]D - \{end\}
295
- * ```
296
- *
297
- * @privateRemarks TODO: ADO:5205 the above comment regarding behavior in
298
- * the case that the entire interval has been deleted should be resolved at
299
- * the same time as this ticket
300
- */
301
- add(start: SequencePlace, end: SequencePlace, intervalType: IntervalType, props?: PropertySet): TInterval;
302
- /**
303
- * Creates a new interval and add it to the collection.
304
- * @param start - interval start position (inclusive)
305
- * @param end - interval end position (exclusive)
306
- * @param props - properties of the interval
307
- * @returns - the created interval
308
- * @remarks - See documentation on {@link SequenceInterval} for comments on interval endpoint semantics: there are subtleties
309
- * with how the current half-open behavior is represented.
310
- */
311
- add({ start, end, props, }: {
312
- start: SequencePlace;
313
- end: SequencePlace;
314
- props?: PropertySet;
315
- }): TInterval;
316
- /**
317
- * Removes an interval from the collection.
318
- * @param id - Id of the interval to remove
319
- * @returns the removed interval
320
- */
321
- removeIntervalById(id: string): TInterval | undefined;
322
- /**
323
- * Changes the properties on an existing interval.
324
- * @param id - Id of the interval whose properties should be changed
325
- * @param props - Property set to apply to the interval. Shallow merging is used between any existing properties
326
- * and `prop`, i.e. the interval will end up with a property object equivalent to `{ ...oldProps, ...props }`.
327
- */
328
- changeProperties(id: string, props: PropertySet): any;
329
- /**
330
- * Changes the endpoints of an existing interval.
331
- * @param id - Id of the interval to change
332
- * @param start - New start value. To leave the endpoint unchanged, pass the current value.
333
- * @param end - New end value. To leave the endpoint unchanged, pass the current value.
334
- * @returns the interval that was changed, if it existed in the collection.
335
- */
336
- change(id: string, start: SequencePlace, end: SequencePlace): TInterval | undefined;
337
- attachDeserializer(onDeserialize: DeserializeCallback): void;
338
- /**
339
- * @returns an iterator over all intervals in this collection.
340
- */
341
- [Symbol.iterator](): Iterator<TInterval>;
342
- /**
343
- * @returns a forward iterator over all intervals in this collection with start point equal to `startPosition`.
344
- */
345
- CreateForwardIteratorWithStartPosition(startPosition: number): Iterator<TInterval>;
346
- /**
347
- * @returns a backward iterator over all intervals in this collection with start point equal to `startPosition`.
348
- */
349
- CreateBackwardIteratorWithStartPosition(startPosition: number): Iterator<TInterval>;
350
- /**
351
- * @returns a forward iterator over all intervals in this collection with end point equal to `endPosition`.
352
- */
353
- CreateForwardIteratorWithEndPosition(endPosition: number): Iterator<TInterval>;
354
- /**
355
- * @returns a backward iterator over all intervals in this collection with end point equal to `endPosition`.
356
- */
357
- CreateBackwardIteratorWithEndPosition(endPosition: number): Iterator<TInterval>;
358
- /**
359
- * Gathers iteration results that optionally match a start/end criteria into the provided array.
360
- * @param results - Array to gather the results into. In lieu of a return value, this array will be populated with
361
- * intervals matching the query upon edit.
362
- * @param iteratesForward - whether or not iteration should be in the forward direction
363
- * @param start - If provided, only match intervals whose start point is equal to `start`.
364
- * @param end - If provided, only match intervals whose end point is equal to `end`.
365
- */
366
- gatherIterationResults(results: TInterval[], iteratesForward: boolean, start?: number, end?: number): void;
367
- /**
368
- * @deprecated - Users must manually attach the corresponding interval index to utilize this functionality, for instance:
369
- *
370
- * ```typescript
371
- * const overlappingIntervalsIndex = createOverlappingIntervalsIndex(sharedString);
372
- * collection.attachIndex(overlappingIntervalsIndex)
373
- * const result = overlappingIntervalsIndex.findOverlappingIntervals(start, end);
374
- * ```
375
- *
376
- * @returns an array of all intervals in this collection that overlap with the interval
377
- * `[startPosition, endPosition]`.
378
- */
379
- findOverlappingIntervals(startPosition: number, endPosition: number): TInterval[];
380
- /**
381
- * Applies a function to each interval in this collection.
382
- */
383
- map(fn: (interval: TInterval) => void): void;
384
- /**
385
- * @deprecated - due to the forthcoming change where the endpointIndex will no longer be
386
- * automatically added to the collection. Users are advised to independently attach the
387
- * index to the collection and utilize the API accordingly, for instance:
388
- * ```typescript
389
- * const endpointIndex = createEndpointIndex(sharedString);
390
- * collection.attachIndex(endpointIndex);
391
- * const result1 = endpointIndex.previousInterval(pos);
392
- * ```
393
- * If an index is used repeatedly, applications should generally attach it once and store it in memory.
394
- */
395
- previousInterval(pos: number): TInterval | undefined;
396
- /**
397
- * @deprecated - due to the forthcoming change where the endpointIndex will no longer be
398
- * automatically added to the collection. Users are advised to independently attach the
399
- * index to the collection and utilize the API accordingly, for instance:
400
- * ```typescript
401
- * const endpointIndex = createEndpointIndex(sharedString);
402
- * collection.attachIndex(endpointIndex);
403
- * const result2 = endpointIndex.nextInterval(pos);
404
- * ```
405
- */
406
- nextInterval(pos: number): TInterval | undefined;
407
- }
58
+ /* Excluded from this release type: ICombiningOp */
408
59
 
409
- /**
410
- * Change events emitted by `IntervalCollection`s
411
- * @public
412
- */
413
- export declare interface IIntervalCollectionEvent<TInterval extends ISerializableInterval> extends IEvent {
414
- /**
415
- * This event is invoked whenever the endpoints of an interval may have changed.
416
- * This can happen on:
417
- * - local endpoint modification
418
- * - ack of a remote endpoint modification
419
- * - position change due to segment sliding (slides due to mergeTree segment deletion will always appear local)
420
- * The `interval` argument reflects the new values.
421
- * `previousInterval` contains transient `ReferencePosition`s at the same location as the interval's original
422
- * endpoints. These references should be used for position information only.
423
- * `local` reflects whether the change originated locally.
424
- * `op` is defined if and only if the server has acked this change.
425
- * `slide` is true if the change is due to sliding on removal of position
426
- */
427
- (event: "changeInterval", listener: (interval: TInterval, previousInterval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined, slide: boolean) => void): any;
428
- /**
429
- * This event is invoked whenever an interval is added or removed from the collection.
430
- * `local` reflects whether the change originated locally.
431
- * `op` is defined if and only if the server has acked this change.
432
- */
433
- (event: "addInterval" | "deleteInterval", listener: (interval: TInterval, local: boolean, op: ISequencedDocumentMessage | undefined) => void): any;
434
- /**
435
- * This event is invoked whenever an interval's properties have changed.
436
- * `interval` reflects the state of the updated properties.
437
- * `propertyDeltas` is a map-like whose keys contain all values that were changed, and whose
438
- * values contain all previous values of the property set.
439
- * This object can be used directly in a call to `changeProperties` to revert the property change if desired.
440
- * `local` reflects whether the change originated locally.
441
- * `op` is defined if and only if the server has acked this change.
442
- */
443
- (event: "propertyChanged", listener: (interval: TInterval, propertyDeltas: PropertySet, local: boolean, op: ISequencedDocumentMessage | undefined) => void): any;
444
- }
60
+ /* Excluded from this release type: IEndpointIndex */
445
61
 
446
- /**
447
- * @sealed
448
- * @deprecated The methods within have substitutions
449
- * @public
450
- */
451
- export declare interface IIntervalHelpers<TInterval extends ISerializableInterval> {
452
- /**
453
- *
454
- * @param label - label of the interval collection this interval is being added to. This parameter is
455
- * irrelevant for transient intervals.
456
- * @param start - numerical start position of the interval
457
- * @param end - numerical end position of the interval
458
- * @param client - client creating the interval
459
- * @param intervalType - Type of interval to create. Default is SlideOnRemove
460
- * @param op - If this create came from a remote client, op that created it. Default is undefined (i.e. local)
461
- * @param fromSnapshot - If this create came from loading a snapshot. Default is false.
462
- * @param startSide - The side on which the start position lays. See
463
- * {@link SequencePlace} for additional context
464
- * @param endSide - The side on which the end position lays. See
465
- * {@link SequencePlace} for additional context
466
- */
467
- create(label: string, start: SequencePlace | undefined, end: SequencePlace | undefined, client: Client | undefined, intervalType: IntervalType, op?: ISequencedDocumentMessage, fromSnapshot?: boolean, useNewSlidingBehavior?: boolean): TInterval;
468
- }
62
+ /* Excluded from this release type: IEndpointInRangeIndex */
469
63
 
470
- /**
471
- * @deprecated IJSONRunSegment will be removed in a upcoming release. It has been moved to the fluid-experimental/sequence-deprecated package
472
- * @public
473
- */
474
- export declare interface IJSONRunSegment<T> extends IJSONSegment {
475
- items: Serializable<T>[];
476
- }
64
+ /* Excluded from this release type: IEvent */
65
+
66
+ /* Excluded from this release type: IEventThisPlaceHolder */
67
+
68
+ /* Excluded from this release type: IFluidDataStoreRuntime */
69
+
70
+ /* Excluded from this release type: IFluidSerializer */
71
+
72
+ /* Excluded from this release type: IIdIntervalIndex */
73
+
74
+ /* Excluded from this release type: IInterval */
75
+
76
+ /* Excluded from this release type: IIntervalCollection */
77
+
78
+ /* Excluded from this release type: IIntervalCollectionEvent */
79
+
80
+ /* Excluded from this release type: IIntervalHelpers */
81
+
82
+ /* Excluded from this release type: IJSONRunSegment */
83
+
84
+ /* Excluded from this release type: IJSONSegment */
477
85
 
478
86
  /* Excluded from this release type: IMapMessageLocalMetadata */
479
87
 
480
- /**
481
- * A sequence place that does not refer to the special endpoint segments.
482
- *
483
- * See {@link SequencePlace} for additional context.
484
- * @public
485
- */
486
- export declare interface InteriorSequencePlace {
487
- pos: number;
488
- side: Side;
489
- }
88
+ /* Excluded from this release type: IMergeTreeDeltaCallbackArgs */
490
89
 
491
- /**
492
- * Serializable interval whose endpoints are plain-old numbers.
493
- * @public
494
- */
495
- export declare class Interval implements ISerializableInterval {
496
- start: number;
497
- end: number;
498
- /**
499
- * {@inheritDoc ISerializableInterval.properties}
500
- */
501
- properties: PropertySet;
502
- /* Excluded from this release type: auxProps */
503
- /* Excluded from this release type: propertyManager */
504
- constructor(start: number, end: number, props?: PropertySet);
505
- /**
506
- * {@inheritDoc ISerializableInterval.getIntervalId}
507
- */
508
- getIntervalId(): string;
509
- /**
510
- * @returns an array containing any auxiliary property sets added with `addPropertySet`.
511
- */
512
- getAdditionalPropertySets(): PropertySet[];
513
- /**
514
- * Adds an auxiliary set of properties to this interval.
515
- * These properties can be recovered using `getAdditionalPropertySets`
516
- * @param props - set of properties to add
517
- * @remarks This gets called as part of the default conflict resolver for `IIntervalCollection<Interval>`
518
- * (i.e. non-sequence-based interval collections). However, the additional properties don't get serialized.
519
- * This functionality seems half-baked.
520
- */
521
- addPropertySet(props: PropertySet): void;
522
- /* Excluded from this release type: serialize */
523
- /**
524
- * {@inheritDoc IInterval.clone}
525
- */
526
- clone(): Interval;
527
- /**
528
- * {@inheritDoc IInterval.compare}
529
- */
530
- compare(b: Interval): number;
531
- /**
532
- * {@inheritDoc IInterval.compareStart}
533
- */
534
- compareStart(b: Interval): number;
535
- /**
536
- * {@inheritDoc IInterval.compareEnd}
537
- */
538
- compareEnd(b: Interval): number;
539
- /**
540
- * {@inheritDoc IInterval.overlaps}
541
- */
542
- overlaps(b: Interval): boolean;
543
- /* Excluded from this release type: union */
544
- getProperties(): PropertySet;
545
- /* Excluded from this release type: addProperties */
546
- /* Excluded from this release type: modify */
547
- private initializeProperties;
548
- }
90
+ /* Excluded from this release type: IMergeTreeDeltaOpArgs */
549
91
 
550
- /**
551
- * Collection of intervals.
552
- *
553
- * Implementers of this interface will typically implement additional APIs to support efficiently querying a collection
554
- * of intervals in some manner, for example:
555
- * - "find all intervals with start endpoint between these two points"
556
- * - "find all intervals which overlap this range"
557
- * etc.
558
- * @public
559
- */
560
- export declare interface IntervalIndex<TInterval extends ISerializableInterval> {
561
- /**
562
- * Adds an interval to the index.
563
- * @remarks Application code should never need to invoke this method on their index for production scenarios:
564
- * Fluid handles adding and removing intervals from an index in response to sequence or interval changes.
565
- */
566
- add(interval: TInterval): void;
567
- /**
568
- * Removes an interval from the index.
569
- * @remarks Application code should never need to invoke this method on their index for production scenarios:
570
- * Fluid handles adding and removing intervals from an index in response to sequence or interval changes.
571
- */
572
- remove(interval: TInterval): void;
573
- }
92
+ /* Excluded from this release type: IMergeTreeGroupMsg */
574
93
 
575
- /**
576
- * Information that identifies an interval within a `Sequence`.
577
- * @public
578
- */
579
- export declare interface IntervalLocator {
580
- /**
581
- * Label for the collection the interval is a part of
582
- */
583
- label: string;
584
- /**
585
- * Interval within that collection
586
- */
587
- interval: SequenceInterval;
588
- }
94
+ /* Excluded from this release type: IMergeTreeInsertMsg */
589
95
 
590
- /**
591
- * Returns an object that can be used to find the interval a given LocalReferencePosition belongs to.
592
- * @returns undefined if the reference position is not the endpoint of any interval (e.g. it was created
593
- * on the merge tree directly by app code), otherwise an {@link IntervalLocator} for the interval this
594
- * endpoint is a part of.
595
- * @public
596
- */
597
- export declare function intervalLocatorFromEndpoint(potentialEndpoint: LocalReferencePosition): IntervalLocator | undefined;
96
+ /* Excluded from this release type: IMergeTreeMaintenanceCallbackArgs */
97
+
98
+ /* Excluded from this release type: IMergeTreeOp */
99
+
100
+ /* Excluded from this release type: IMergeTreeRemoveMsg */
101
+
102
+ /* Excluded from this release type: InteriorSequencePlace */
103
+
104
+ /* Excluded from this release type: Interval */
105
+
106
+ /* Excluded from this release type: IntervalIndex */
107
+
108
+ /* Excluded from this release type: IntervalLocator */
109
+
110
+ /* Excluded from this release type: intervalLocatorFromEndpoint */
598
111
 
599
112
  /* Excluded from this release type: IntervalOpType */
600
113
 
@@ -602,938 +115,111 @@ export declare function intervalLocatorFromEndpoint(potentialEndpoint: LocalRefe
602
115
 
603
116
  /* Excluded from this release type: IntervalStickiness */
604
117
 
605
- /**
606
- * @public
607
- */
608
- export declare enum IntervalType {
609
- Simple = 0,
610
- /**
611
- * @deprecated this functionality is no longer supported and will be removed
612
- */
613
- Nest = 1,
614
- /**
615
- * SlideOnRemove indicates that the ends of the interval will slide if the segment
616
- * they reference is removed and acked.
617
- * See `packages\dds\merge-tree\docs\REFERENCEPOSITIONS.md` for details
618
- * SlideOnRemove is the default interval behavior and does not need to be specified.
619
- */
620
- SlideOnRemove = 2,
621
- /* Excluded from this release type: Transient */
622
- }
118
+ /* Excluded from this release type: IntervalType */
623
119
 
624
- /**
625
- * @public
626
- */
627
- export declare interface IOverlappingIntervalsIndex<TInterval extends ISerializableInterval> extends IntervalIndex<TInterval> {
628
- /**
629
- * @returns an array of all intervals contained in this collection that overlap the range
630
- * `[start end]`.
631
- */
632
- findOverlappingIntervals(start: SequencePlace, end: SequencePlace): TInterval[];
633
- /**
634
- * Gathers the interval results based on specified parameters.
635
- */
636
- gatherIterationResults(results: TInterval[], iteratesForward: boolean, start?: SequencePlace, end?: SequencePlace): void;
637
- }
120
+ /* Excluded from this release type: IOverlappingIntervalsIndex */
638
121
 
639
- /**
640
- * A range that has changed corresponding to a segment modification.
641
- * @public
642
- */
643
- export declare interface ISequenceDeltaRange<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes> {
644
- /**
645
- * The type of operation that changed this range.
646
- *
647
- * @remarks Consuming code should typically compare this to the enum values defined in
648
- * `MergeTreeDeltaOperationTypes`.
649
- */
650
- operation: TOperation;
651
- /**
652
- * The index of the start of the range.
653
- */
654
- position: number;
655
- /**
656
- * The segment that corresponds to the range.
657
- */
658
- segment: ISegment;
659
- /**
660
- * Deltas object which contains all modified properties with their previous values.
661
- * Since `undefined` doesn't survive a round-trip through JSON serialization, the old value being absent
662
- * is instead encoded with `null`.
663
- *
664
- * @remarks This object is motivated by undo/redo scenarios, and provides a convenient "inverse op" to apply to
665
- * undo a property change.
666
- *
667
- * @example
668
- *
669
- * If a segment initially had properties `{ foo: "1", bar: 2 }` and it was annotated with
670
- * `{ foo: 3, baz: 5 }`, the corresponding event would have a `propertyDeltas` of `{ foo: "1", baz: null }`.
671
- */
672
- propertyDeltas: PropertySet;
673
- }
122
+ /* Excluded from this release type: IRelativePosition */
674
123
 
675
- /**
676
- * @public
677
- */
678
- export declare interface ISerializableInterval extends IInterval {
679
- /** Serializable bag of properties associated with the interval. */
680
- properties: PropertySet;
681
- /* Excluded from this release type: propertyManager */
682
- /* Excluded from this release type: serialize */
683
- /* Excluded from this release type: addProperties */
684
- /**
685
- * Gets the id associated with this interval.
686
- * When the interval is used as part of an interval collection, this id can be used to modify or remove the
687
- * interval.
688
- * @remarks This signature includes `undefined` strictly for backwards-compatibility reasons, as older versions
689
- * of Fluid didn't always write interval ids.
690
- */
691
- getIntervalId(): string | undefined;
692
- }
124
+ /* Excluded from this release type: ISegment */
125
+
126
+ /* Excluded from this release type: ISegmentAction */
127
+
128
+ /* Excluded from this release type: ISequenceDeltaRange */
129
+
130
+ /* Excluded from this release type: ISerializableInterval */
693
131
 
694
132
  /* Excluded from this release type: ISerializedInterval */
695
133
 
696
- /**
697
- * @public
698
- */
699
- export declare interface ISharedIntervalCollection<TInterval extends ISerializableInterval> {
700
- getIntervalCollection(label: string): IIntervalCollection<TInterval>;
701
- }
134
+ /* Excluded from this release type: ISharedIntervalCollection */
702
135
 
703
- /**
704
- * Events emitted in response to changes to the sequence data.
705
- *
706
- * @remarks
707
- *
708
- * The following is the list of events emitted.
709
- *
710
- * ### "sequenceDelta"
711
- *
712
- * The sequenceDelta event is emitted when segments are inserted, annotated, or removed.
713
- *
714
- * #### Listener signature
715
- *
716
- * ```typescript
717
- * (event: SequenceDeltaEvent, target: IEventThisPlaceHolder) => void
718
- * ```
719
- * - `event` - Various information on the segments that were modified.
720
- *
721
- * - `target` - The sequence itself.
722
- *
723
- * ### "maintenance"
724
- *
725
- * The maintenance event is emitted when segments are modified during merge-tree maintenance.
726
- *
727
- * #### Listener signature
728
- *
729
- * ```typescript
730
- * (event: SequenceMaintenanceEvent, target: IEventThisPlaceHolder) => void
731
- * ```
732
- * - `event` - Various information on the segments that were modified.
733
- *
734
- * - `target` - The sequence itself.
735
- * @public
736
- */
737
- export declare interface ISharedSegmentSequenceEvents extends ISharedObjectEvents {
738
- (event: "createIntervalCollection", listener: (label: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
739
- (event: "sequenceDelta", listener: (event: SequenceDeltaEvent, target: IEventThisPlaceHolder) => void): any;
740
- (event: "maintenance", listener: (event: SequenceMaintenanceEvent, target: IEventThisPlaceHolder) => void): any;
741
- }
136
+ /* Excluded from this release type: ISharedObjectEvents */
742
137
 
743
- /**
744
- * Fluid object interface describing access methods on a SharedString
745
- * @public
746
- */
747
- export declare interface ISharedString extends SharedSegmentSequence<SharedStringSegment> {
748
- /**
749
- * Inserts the text at the position.
750
- * @param pos - The position to insert the text at
751
- * @param text - The text to insert
752
- * @param props - The properties of the text
753
- */
754
- insertText(pos: number, text: string, props?: PropertySet): void;
755
- /**
756
- * Inserts a marker at the position.
757
- * @param pos - The position to insert the marker at
758
- * @param refType - The reference type of the marker
759
- * @param props - The properties of the marker
760
- */
761
- insertMarker(pos: number, refType: ReferenceType, props?: PropertySet): IMergeTreeInsertMsg | undefined;
762
- /**
763
- * {@inheritDoc SharedSegmentSequence.posFromRelativePos}
764
- */
765
- posFromRelativePos(relativePos: IRelativePosition): number;
766
- }
138
+ /* Excluded from this release type: ISharedSegmentSequenceEvents */
767
139
 
768
- /**
769
- * Collection of intervals.
770
- *
771
- * Provide additional APIs to support efficiently querying a collection of intervals whose startpoints fall within a specified range.
772
- * @public
773
- */
774
- export declare interface IStartpointInRangeIndex<TInterval extends ISerializableInterval> extends IntervalIndex<TInterval> {
775
- /**
776
- * @returns an array of all intervals contained in this collection whose startpoints locate in the range [start, end] (includes both ends)
777
- */
778
- findIntervalsWithStartpointInRange(start: number, end: number): TInterval[];
779
- }
140
+ /* Excluded from this release type: ISharedString */
141
+
142
+ /* Excluded from this release type: IStartpointInRangeIndex */
143
+
144
+ /* Excluded from this release type: ISummaryTreeWithStats */
145
+
146
+ /* Excluded from this release type: ITelemetryContext */
780
147
 
781
148
  /* Excluded from this release type: IValueOpEmitter */
782
149
 
150
+ /* Excluded from this release type: LocalReferencePosition */
151
+
152
+ /* Excluded from this release type: Marker */
153
+
154
+ /* Excluded from this release type: MergeTreeDeltaOperationType */
155
+
156
+ /* Excluded from this release type: MergeTreeDeltaOperationTypes */
157
+
783
158
  /* Excluded from this release type: MergeTreeDeltaRevertible */
784
159
 
160
+ /* Excluded from this release type: MergeTreeMaintenanceType */
161
+
785
162
  /* Excluded from this release type: MergeTreeRevertibleDriver */
786
163
 
164
+ /* Excluded from this release type: PropertiesManager */
165
+
166
+ /* Excluded from this release type: PropertySet */
167
+
168
+ /* Excluded from this release type: RangeStackMap */
169
+
170
+ /* Excluded from this release type: ReferencePosition */
171
+
172
+ /* Excluded from this release type: ReferenceType */
173
+
787
174
  /* Excluded from this release type: revertSharedStringRevertibles */
788
175
 
789
- /**
790
- * The event object returned on sequenceDelta events.
791
- *
792
- * The properties of this object and its sub-objects represent the state of the sequence at the
793
- * point in time at which the operation was applied.
794
- * They will not take into consideration any future modifications performed to the underlying sequence and merge tree.
795
- *
796
- * For group ops, each op will get its own event, and the group op property will be set on the op args.
797
- *
798
- * Ops may get multiple events. For instance, an insert-replace will get a remove then an insert event.
799
- * @public
800
- */
801
- export declare class SequenceDeltaEvent extends SequenceEvent<MergeTreeDeltaOperationType> {
802
- readonly opArgs: IMergeTreeDeltaOpArgs;
803
- /**
804
- * Whether the event was caused by a locally-made change.
805
- */
806
- readonly isLocal: boolean;
807
- constructor(opArgs: IMergeTreeDeltaOpArgs, deltaArgs: IMergeTreeDeltaCallbackArgs, mergeTreeClient: Client);
808
- }
176
+ /* Excluded from this release type: SequenceDeltaEvent */
809
177
 
810
- /**
811
- * Base class for SequenceDeltaEvent and SequenceMaintenanceEvent.
812
- *
813
- * The properties of this object and its sub-objects represent the state of the sequence at the
814
- * point in time at which the operation was applied.
815
- * They will not take into any future modifications performed to the underlying sequence and merge tree.
816
- * @public
817
- */
818
- export declare abstract class SequenceEvent<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes> {
819
- readonly deltaArgs: IMergeTreeDeltaCallbackArgs<TOperation>;
820
- private readonly mergeTreeClient;
821
- readonly deltaOperation: TOperation;
822
- private readonly sortedRanges;
823
- private readonly pFirst;
824
- private readonly pLast;
825
- constructor(deltaArgs: IMergeTreeDeltaCallbackArgs<TOperation>, mergeTreeClient: Client);
826
- /**
827
- * The in-order ranges affected by this delta.
828
- * These may not be continuous.
829
- */
830
- get ranges(): readonly Readonly<ISequenceDeltaRange<TOperation>>[];
831
- /**
832
- * The client id of the client that made the change which caused the delta event
833
- */
834
- get clientId(): string | undefined;
835
- /**
836
- * The first of the modified ranges.
837
- */
838
- get first(): Readonly<ISequenceDeltaRange<TOperation>>;
839
- /**
840
- * The last of the modified ranges.
841
- */
842
- get last(): Readonly<ISequenceDeltaRange<TOperation>>;
843
- }
178
+ /* Excluded from this release type: SequenceEvent */
844
179
 
845
- /**
846
- * Interval implementation whose ends are associated with positions in a mutatable sequence.
847
- * As such, when content is inserted into the middle of the interval, the interval expands to
848
- * include that content.
849
- *
850
- * @remarks The endpoints' positions should be treated exclusively to get
851
- * reasonable behavior. E.g., an interval referring to "hello" in "hello world"
852
- * should have a start position of 0 and an end position of 5.
853
- *
854
- * To see why, consider what happens if "llo wor" is removed from the string to make "held".
855
- * The interval's startpoint remains on the "h" (it isn't altered), but the interval's endpoint
856
- * slides forward to the next unremoved position, which is the "l" in "held".
857
- * Users would generally expect the interval to now refer to "he" (as it is the subset of content
858
- * remaining after the removal), hence the "l" should be excluded.
859
- * If the interval endpoint was treated inclusively, the interval would now refer to "hel", which
860
- * is undesirable.
861
- *
862
- * Since the endpoints of an interval are treated exclusively but cannot be greater
863
- * than or equal to the length of the associated sequence, there exist special
864
- * endpoint segments, "start" and "end", which represent the position immediately
865
- * before or immediately after the string respectively.
866
- *
867
- * If a `SequenceInterval` is created on a sequence with the
868
- * `mergeTreeReferencesCanSlideToEndpoint` feature flag set to true, the endpoints
869
- * of the interval that are exclusive will have the ability to slide to these
870
- * special endpoint segments.
871
- * @public
872
- */
873
- export declare class SequenceInterval implements ISerializableInterval {
874
- private readonly client;
875
- /**
876
- * Start endpoint of this interval.
877
- * @remarks This endpoint can be resolved into a character position using the SharedString it's a part of.
878
- */
879
- start: LocalReferencePosition;
880
- /**
881
- * End endpoint of this interval.
882
- * @remarks This endpoint can be resolved into a character position using the SharedString it's a part of.
883
- */
884
- end: LocalReferencePosition;
885
- intervalType: IntervalType;
886
- readonly startSide: Side;
887
- readonly endSide: Side;
888
- /**
889
- * {@inheritDoc ISerializableInterval.properties}
890
- */
891
- properties: PropertySet;
892
- /* Excluded from this release type: propertyManager */
893
- /* Excluded from this release type: stickiness */
894
- constructor(client: Client,
895
- /**
896
- * Start endpoint of this interval.
897
- * @remarks This endpoint can be resolved into a character position using the SharedString it's a part of.
898
- */
899
- start: LocalReferencePosition,
900
- /**
901
- * End endpoint of this interval.
902
- * @remarks This endpoint can be resolved into a character position using the SharedString it's a part of.
903
- */
904
- end: LocalReferencePosition, intervalType: IntervalType, props?: PropertySet, startSide?: Side, endSide?: Side);
905
- private callbacks?;
906
- /* Excluded from this release type: addPositionChangeListeners */
907
- /* Excluded from this release type: removePositionChangeListeners */
908
- /* Excluded from this release type: serialize */
909
- /**
910
- * {@inheritDoc IInterval.clone}
911
- */
912
- clone(): SequenceInterval;
913
- /**
914
- * {@inheritDoc IInterval.compare}
915
- */
916
- compare(b: SequenceInterval): number;
917
- /**
918
- * {@inheritDoc IInterval.compareStart}
919
- */
920
- compareStart(b: SequenceInterval): number;
921
- /**
922
- * {@inheritDoc IInterval.compareEnd}
923
- */
924
- compareEnd(b: SequenceInterval): number;
925
- /**
926
- * {@inheritDoc IInterval.overlaps}
927
- */
928
- overlaps(b: SequenceInterval): boolean;
929
- /**
930
- * {@inheritDoc ISerializableInterval.getIntervalId}
931
- */
932
- getIntervalId(): string;
933
- /* Excluded from this release type: union */
934
- /* Excluded from this release type: addProperties */
935
- /**
936
- * @returns whether this interval overlaps two numerical positions.
937
- */
938
- overlapsPos(bstart: number, bend: number): boolean;
939
- /* Excluded from this release type: modify */
940
- private initializeProperties;
941
- }
180
+ /* Excluded from this release type: SequenceInterval */
942
181
 
943
- /**
944
- * @deprecated The methods within have substitutions
945
- * @public
946
- */
947
- export declare const sequenceIntervalHelpers: IIntervalHelpers<SequenceInterval>;
182
+ /* Excluded from this release type: sequenceIntervalHelpers */
948
183
 
949
- /**
950
- * This namespace contains specialiazations of indexes which support spatial queries
951
- * specifically for `SequenceInterval`s.
952
- * @public
953
- */
954
- export declare namespace SequenceIntervalIndexes {
955
- /**
956
- * Collection of intervals.
957
- *
958
- * Provides additional APIs to support efficiently querying a collection of intervals based on segments and offset.
959
- */
960
- export interface Overlapping extends IOverlappingIntervalsIndex<SequenceInterval> {
961
- /**
962
- * Finds overlapping intervals within the specified range.
963
- *
964
- * @returns an array of all intervals that overlap with the specified SegOff range (includes both ends)
965
- */
966
- findOverlappingIntervalsBySegoff(startSegoff: {
967
- segment: ISegment | undefined;
968
- offset: number | undefined;
969
- }, endSegoff: {
970
- segment: ISegment | undefined;
971
- offset: number | undefined;
972
- }): Iterable<SequenceInterval>;
973
- }
974
- }
184
+ /* Excluded from this release type: SequenceIntervalIndexes */
975
185
 
976
- /**
977
- * The event object returned on maintenance events.
978
- *
979
- * The properties of this object and its sub-objects represent the state of the sequence at the
980
- * point in time at which the operation was applied.
981
- * They will not take into consideration any future modifications performed to the underlying sequence and merge tree.
982
- * @public
983
- */
984
- export declare class SequenceMaintenanceEvent extends SequenceEvent<MergeTreeMaintenanceType> {
985
- readonly opArgs: IMergeTreeDeltaOpArgs | undefined;
986
- constructor(opArgs: IMergeTreeDeltaOpArgs | undefined, deltaArgs: IMergeTreeMaintenanceCallbackArgs, mergeTreeClient: Client);
987
- }
186
+ /* Excluded from this release type: SequenceMaintenanceEvent */
988
187
 
989
- /**
990
- * Optional flags that configure options for sequence DDSs
991
- * @public
992
- */
993
- export declare interface SequenceOptions {
994
- /**
995
- * Enable the ability to use interval APIs that rely on positions before and
996
- * after individual characters, referred to as "sides". See {@link SequencePlace}
997
- * for additional context.
998
- *
999
- * This flag must be enabled to pass instances of {@link SequencePlace} to
1000
- * any IIntervalCollection API.
1001
- *
1002
- * Also see the feature flag `mergeTreeReferencesCanSlideToEndpoint` to allow
1003
- * endpoints to slide to the special endpoint segments.
1004
- *
1005
- * The default value is false.
1006
- */
1007
- intervalStickinessEnabled: boolean;
1008
- /**
1009
- * Enable the ability for interval endpoints to slide to the special endpoint
1010
- * segments that exist before and after the bounds of the string. This is
1011
- * primarily useful for workflows involving interval stickiness, and it is
1012
- * suggested to enable both this flag and `intervalStickinessEnabled` at the
1013
- * same time.
1014
- *
1015
- * The default value is false.
1016
- */
1017
- mergeTreeReferencesCanSlideToEndpoint: boolean;
1018
- [key: string]: boolean;
1019
- }
188
+ /* Excluded from this release type: SequenceOptions */
1020
189
 
1021
- /**
1022
- * Defines a position and side relative to a character in a sequence.
1023
- *
1024
- * For this purpose, sequences look like:
1025
- *
1026
- * `{start} - {character 0} - {character 1} - ... - {character N} - {end}`
1027
- *
1028
- * Each `{value}` in the diagram is a character within a sequence.
1029
- * Each `-` in the above diagram is a position where text could be inserted.
1030
- * Each position between a `{value}` and a `-` is a `SequencePlace`.
1031
- *
1032
- * The special endpoints `{start}` and `{end}` refer to positions outside the
1033
- * contents of the string.
1034
- *
1035
- * This gives us 2N + 2 possible positions to refer to within a string, where N
1036
- * is the number of characters.
1037
- *
1038
- * If the position is specified with a bare number, the side defaults to
1039
- * `Side.Before`.
1040
- *
1041
- * If a SequencePlace is the endpoint of a range (e.g. start/end of an interval or search range),
1042
- * the Side value means it is exclusive if it is nearer to the other position and inclusive if it is farther.
1043
- * E.g. the start of a range with Side.After is exclusive of the character at the position.
1044
- * @public
1045
- */
1046
- export declare type SequencePlace = number | "start" | "end" | InteriorSequencePlace;
190
+ /* Excluded from this release type: SequencePlace */
191
+
192
+ /* Excluded from this release type: Serializable */
1047
193
 
1048
194
  /* Excluded from this release type: SerializedIntervalDelta */
1049
195
 
1050
- /**
1051
- * @deprecated `SharedIntervalCollection` is not maintained and is planned to be removed.
1052
- * @public
1053
- */
1054
- export declare class SharedIntervalCollection extends SharedObject implements ISharedIntervalCollection<Interval> {
1055
- /**
1056
- * Create a SharedIntervalCollection
1057
- *
1058
- * @param runtime - data store runtime the new shared map belongs to
1059
- * @param id - optional name of the shared map
1060
- * @returns newly create shared map (but not attached yet)
1061
- */
1062
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedIntervalCollection;
1063
- /**
1064
- * Get a factory for SharedIntervalCollection to register with the data store.
1065
- *
1066
- * @returns a factory that creates and load SharedIntervalCollection
1067
- */
1068
- static getFactory(): IChannelFactory;
1069
- readonly [Symbol.toStringTag]: string;
1070
- private readonly intervalCollections;
1071
- /**
1072
- * Constructs a new shared SharedIntervalCollection. If the object is non-local an id and service interfaces will
1073
- * be provided
1074
- */
1075
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
1076
- getIntervalCollection(label: string): IIntervalCollection<Interval>;
1077
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
1078
- protected reSubmitCore(content: any, localOpMetadata: unknown): void;
1079
- protected onDisconnect(): void;
1080
- /**
1081
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
1082
- */
1083
- protected loadCore(storage: IChannelStorageService): Promise<void>;
1084
- protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
1085
- /**
1086
- * Creates the full path of the intervalCollection label
1087
- * @param label - the incoming label
1088
- */
1089
- protected getIntervalCollectionPath(label: string): string;
1090
- protected applyStashedOp(): void;
1091
- }
196
+ /* Excluded from this release type: SharedIntervalCollection */
1092
197
 
1093
- /**
1094
- * The factory that defines the SharedIntervalCollection.
1095
- * @deprecated `SharedIntervalCollection` is not maintained and is planned to be removed.
1096
- * @public
1097
- */
1098
- export declare class SharedIntervalCollectionFactory implements IChannelFactory {
1099
- static readonly Type = "https://graph.microsoft.com/types/sharedIntervalCollection";
1100
- static readonly Attributes: IChannelAttributes;
1101
- get type(): string;
1102
- get attributes(): IChannelAttributes;
1103
- /**
1104
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
1105
- */
1106
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<SharedIntervalCollection>;
1107
- create(runtime: IFluidDataStoreRuntime, id: string): SharedIntervalCollection;
1108
- }
198
+ /* Excluded from this release type: SharedIntervalCollectionFactory */
1109
199
 
1110
- /**
1111
- * @public
1112
- */
1113
- export declare abstract class SharedSegmentSequence<T extends ISegment> extends SharedObject<ISharedSegmentSequenceEvents> implements ISharedIntervalCollection<SequenceInterval>, MergeTreeRevertibleDriver {
1114
- private readonly dataStoreRuntime;
1115
- id: string;
1116
- readonly segmentFromSpec: (spec: IJSONSegment) => ISegment;
1117
- get loaded(): Promise<void>;
1118
- /* Excluded from this release type: guardReentrancy */
1119
- private static createOpsFromDelta;
1120
- protected client: Client;
1121
- /** `Deferred` that triggers once the object is loaded */
1122
- protected loadedDeferred: Deferred<void>;
1123
- private readonly loadedDeferredOutgoingOps;
1124
- private deferIncomingOps;
1125
- private readonly loadedDeferredIncomingOps;
1126
- private messagesSinceMSNChange;
1127
- private readonly intervalCollections;
1128
- constructor(dataStoreRuntime: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes, segmentFromSpec: (spec: IJSONSegment) => ISegment);
1129
- /**
1130
- * @param start - The inclusive start of the range to remove
1131
- * @param end - The exclusive end of the range to remove
1132
- */
1133
- removeRange(start: number, end: number): IMergeTreeRemoveMsg;
1134
- /**
1135
- * @deprecated The ability to create group ops will be removed in an upcoming release, as group ops are redundant with the native batching capabilities of the runtime
1136
- */
1137
- groupOperation(groupOp: IMergeTreeGroupMsg): void;
1138
- /**
1139
- * Finds the segment information (i.e. segment + offset) corresponding to a character position in the SharedString.
1140
- * If the position is past the end of the string, `segment` and `offset` on the returned object may be undefined.
1141
- * @param pos - Character position (index) into the current local view of the SharedString.
1142
- */
1143
- getContainingSegment(pos: number): {
1144
- segment: T | undefined;
1145
- offset: number | undefined;
1146
- };
1147
- /**
1148
- * Returns the length of the current sequence for the client
1149
- */
1150
- getLength(): number;
1151
- /**
1152
- * Returns the current position of a segment, and -1 if the segment
1153
- * does not exist in this sequence
1154
- * @param segment - The segment to get the position of
1155
- */
1156
- getPosition(segment: ISegment): number;
1157
- /**
1158
- * Annotates the range with the provided properties
1159
- *
1160
- * @param start - The inclusive start position of the range to annotate
1161
- * @param end - The exclusive end position of the range to annotate
1162
- * @param props - The properties to annotate the range with
1163
- * @param combiningOp - Optional. Specifies how to combine values for the property, such as "incr" for increment.
1164
- *
1165
- */
1166
- annotateRange(start: number, end: number, props: PropertySet, combiningOp?: ICombiningOp): void;
1167
- getPropertiesAtPosition(pos: number): PropertySet | undefined;
1168
- getRangeExtentsOfPosition(pos: number): {
1169
- posStart: number | undefined;
1170
- posAfterEnd: number | undefined;
1171
- };
1172
- /**
1173
- * Creates a `LocalReferencePosition` on this SharedString. If the refType does not include
1174
- * ReferenceType.Transient, the returned reference will be added to the localRefs on the provided segment.
1175
- * @param segment - Segment to add the local reference on
1176
- * @param offset - Offset on the segment at which to place the local reference
1177
- * @param refType - ReferenceType for the created local reference
1178
- * @param properties - PropertySet to place on the created local reference
1179
- */
1180
- createLocalReferencePosition(segment: T, offset: number, refType: ReferenceType, properties: PropertySet | undefined, slidingPreference?: SlidingPreference, canSlideToEndpoint?: boolean): LocalReferencePosition;
1181
- /**
1182
- * Resolves a `ReferencePosition` into a character position using this client's perspective.
1183
- */
1184
- localReferencePositionToPosition(lref: ReferencePosition): number;
1185
- /**
1186
- * Removes a `LocalReferencePosition` from this SharedString.
1187
- */
1188
- removeLocalReferencePosition(lref: LocalReferencePosition): LocalReferencePosition | undefined;
1189
- /**
1190
- * Resolves a remote client's position against the local sequence
1191
- * and returns the remote client's position relative to the local
1192
- * sequence. The client ref seq must be above the minimum sequence number
1193
- * or the return value will be undefined.
1194
- * Generally this method is used in conjunction with signals which provide
1195
- * point in time values for the below parameters, and is useful for things
1196
- * like displaying user position. It should not be used with persisted values
1197
- * as persisted values will quickly become invalid as the remoteClientRefSeq
1198
- * moves below the minimum sequence number
1199
- * @param remoteClientPosition - The remote client's position to resolve
1200
- * @param remoteClientRefSeq - The reference sequence number of the remote client
1201
- * @param remoteClientId - The client id of the remote client
1202
- */
1203
- resolveRemoteClientPosition(remoteClientPosition: number, remoteClientRefSeq: number, remoteClientId: string): number | undefined;
1204
- /**
1205
- * @deprecated This method will no longer be public in an upcoming release as it is not safe to use outside of this class
1206
- */
1207
- submitSequenceMessage(message: IMergeTreeOp): void;
1208
- /**
1209
- * Given a position specified relative to a marker id, lookup the marker
1210
- * and convert the position to a character position.
1211
- * @param relativePos - Id of marker (may be indirect) and whether position is before or after marker.
1212
- */
1213
- posFromRelativePos(relativePos: IRelativePosition): number;
1214
- /**
1215
- * Walk the underlying segments of the sequence.
1216
- * The walked segments may extend beyond the range
1217
- * if the segments cross the ranges start or end boundaries.
1218
- * Set split range to true to ensure only segments within the
1219
- * range are walked.
1220
- *
1221
- * @param handler - The function to handle each segment
1222
- * @param start - Optional. The start of range walk.
1223
- * @param end - Optional. The end of range walk
1224
- * @param accum - Optional. An object that will be passed to the handler for accumulation
1225
- * @param splitRange - Optional. Splits boundary segments on the range boundaries
1226
- */
1227
- walkSegments<TClientData>(handler: ISegmentAction<TClientData>, start?: number, end?: number, accum?: TClientData, splitRange?: boolean): void;
1228
- /**
1229
- * @deprecated this functionality is no longer supported and will be removed
1230
- */
1231
- getStackContext(startPos: number, rangeLabels: string[]): RangeStackMap;
1232
- /**
1233
- * @returns The most recent sequence number which has been acked by the server and processed by this
1234
- * SharedSegmentSequence.
1235
- */
1236
- getCurrentSeq(): number;
1237
- /**
1238
- * Inserts a segment directly before a `ReferencePosition`.
1239
- * @param refPos - The reference position to insert the segment at
1240
- * @param segment - The segment to insert
1241
- */
1242
- insertAtReferencePosition(pos: ReferencePosition, segment: T): void;
1243
- /**
1244
- * Inserts a segment
1245
- * @param start - The position to insert the segment at
1246
- * @param spec - The segment to inserts spec
1247
- */
1248
- insertFromSpec(pos: number, spec: IJSONSegment): void;
1249
- /**
1250
- * Retrieves the interval collection keyed on `label`. If no such interval collection exists,
1251
- * creates one.
1252
- */
1253
- getIntervalCollection(label: string): IIntervalCollection<SequenceInterval>;
1254
- /**
1255
- * @returns An iterable object that enumerates the IntervalCollection labels.
1256
- *
1257
- * @example
1258
- *
1259
- * ```typescript
1260
- * const iter = this.getIntervalCollectionKeys();
1261
- * for (key of iter)
1262
- * const collection = this.getIntervalCollection(key);
1263
- * ...
1264
- * ```
1265
- */
1266
- getIntervalCollectionLabels(): IterableIterator<string>;
1267
- /**
1268
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.summarizeCore}
1269
- */
1270
- protected summarizeCore(serializer: IFluidSerializer, telemetryContext?: ITelemetryContext): ISummaryTreeWithStats;
1271
- /**
1272
- * Runs serializer over the GC data for this SharedMatrix.
1273
- * All the IFluidHandle's represent routes to other objects.
1274
- */
1275
- protected processGCDataCore(serializer: SummarySerializer): void;
1276
- /**
1277
- * Replace the range specified from start to end with the provided segment
1278
- * This is done by inserting the segment at the end of the range, followed
1279
- * by removing the contents of the range
1280
- * For a zero or reverse range (start \>= end), insert at end do not remove anything
1281
- * @param start - The start of the range to replace
1282
- * @param end - The end of the range to replace
1283
- * @param segment - The segment that will replace the range
1284
- */
1285
- protected replaceRange(start: number, end: number, segment: ISegment): void;
1286
- /**
1287
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onConnect}
1288
- */
1289
- protected onConnect(): void;
1290
- /**
1291
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.onDisconnect}
1292
- */
1293
- protected onDisconnect(): void;
1294
- /**
1295
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.reSubmitCore}
1296
- */
1297
- protected reSubmitCore(content: any, localOpMetadata: unknown): void;
1298
- /**
1299
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
1300
- */
1301
- protected loadCore(storage: IChannelStorageService): Promise<void>;
1302
- /**
1303
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.processCore}
1304
- */
1305
- protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
1306
- /**
1307
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.didAttach}
1308
- */
1309
- protected didAttach(): void;
1310
- /**
1311
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.initializeLocalCore}
1312
- */
1313
- protected initializeLocalCore(): void;
1314
- /**
1315
- * {@inheritDoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}
1316
- */
1317
- protected applyStashedOp(content: any): unknown;
1318
- private summarizeMergeTree;
1319
- private processMergeTreeMsg;
1320
- private processMinSequenceNumberChanged;
1321
- private loadFinished;
1322
- private initializeIntervalCollections;
1323
- }
200
+ /* Excluded from this release type: SharedObject */
1324
201
 
1325
- /**
1326
- * @deprecated SharedSequence will be removed in a upcoming release. It has been moved to the fluid-experimental/sequence-deprecated package
1327
- * @public
1328
- */
1329
- export declare class SharedSequence<T> extends SharedSegmentSequence<SubSequence<T>> {
1330
- id: string;
1331
- constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes, specToSegment: (spec: IJSONSegment) => ISegment);
1332
- /**
1333
- * @param pos - The position to insert the items at.
1334
- * @param items - The items to insert.
1335
- * @param props - Optional. Properties to set on the inserted items.
1336
- */
1337
- insert(pos: number, items: Serializable<T>[], props?: PropertySet): void;
1338
- /**
1339
- * @param start - The inclusive start of the range to remove
1340
- * @param end - The exclusive end of the range to remove
1341
- */
1342
- remove(start: number, end: number): void;
1343
- /**
1344
- * Returns the total count of items in the sequence
1345
- */
1346
- getItemCount(): number;
1347
- /**
1348
- * Gets the items in the specified range
1349
- *
1350
- * @param start - The inclusive start of the range
1351
- * @param end - The exclusive end of the range
1352
- */
1353
- getItems(start: number, end?: number): Serializable<T>[];
1354
- }
202
+ /* Excluded from this release type: SharedSegmentSequence */
1355
203
 
1356
- /**
1357
- * The Shared String is a specialized data structure for handling collaborative
1358
- * text. It is based on a more general Sequence data structure but has
1359
- * additional features that make working with text easier.
1360
- *
1361
- * In addition to text, a Shared String can also contain markers. Markers can be
1362
- * used to store metadata at positions within the text, like the details of an
1363
- * image or Fluid object that should be rendered with the text.
1364
- *
1365
- * @public
1366
- */
1367
- export declare class SharedString extends SharedSegmentSequence<SharedStringSegment> implements ISharedString {
1368
- id: string;
1369
- /**
1370
- * Create a new shared string.
1371
- * @param runtime - data store runtime the new shared string belongs to
1372
- * @param id - optional name of the shared string
1373
- * @returns newly create shared string (but not attached yet)
1374
- */
1375
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedString;
1376
- /**
1377
- * Get a factory for SharedString to register with the data store.
1378
- * @returns a factory that creates and load SharedString
1379
- */
1380
- static getFactory(): SharedStringFactory;
1381
- get ISharedString(): ISharedString;
1382
- private readonly mergeTreeTextHelper;
1383
- constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);
1384
- /**
1385
- * Inserts a marker at a relative position.
1386
- * @param relativePos1 - The relative position to insert the marker at
1387
- * @param refType - The reference type of the marker
1388
- * @param props - The properties of the marker
1389
- */
1390
- insertMarkerRelative(relativePos1: IRelativePosition, refType: ReferenceType, props?: PropertySet): void;
1391
- /**
1392
- * {@inheritDoc ISharedString.insertMarker}
1393
- */
1394
- insertMarker(pos: number, refType: ReferenceType, props?: PropertySet): IMergeTreeInsertMsg | undefined;
1395
- /**
1396
- * Inserts the text at the position.
1397
- * @param relativePos1 - The relative position to insert the text at
1398
- * @param text - The text to insert
1399
- * @param props - The properties of text
1400
- */
1401
- insertTextRelative(relativePos1: IRelativePosition, text: string, props?: PropertySet): void;
1402
- /**
1403
- * {@inheritDoc ISharedString.insertText}
1404
- */
1405
- insertText(pos: number, text: string, props?: PropertySet): void;
1406
- /**
1407
- * Replaces a range with the provided text.
1408
- * @param start - The inclusive start of the range to replace
1409
- * @param end - The exclusive end of the range to replace
1410
- * @param text - The text to replace the range with
1411
- * @param props - Optional. The properties of the replacement text
1412
- */
1413
- replaceText(start: number, end: number, text: string, props?: PropertySet): void;
1414
- /**
1415
- * Removes the text in the given range.
1416
- * @param start - The inclusive start of the range to remove
1417
- * @param end - The exclusive end of the range to replace
1418
- * @returns the message sent.
1419
- */
1420
- removeText(start: number, end: number): IMergeTreeRemoveMsg;
1421
- /**
1422
- * Annotates the marker with the provided properties and calls the callback on consensus.
1423
- * @param marker - The marker to annotate
1424
- * @param props - The properties to annotate the marker with
1425
- * @param consensusCallback - The callback called when consensus is reached
1426
- *
1427
- * @deprecated We no longer intend to support this functionality and it will
1428
- * be removed in a future release. There is no replacement for this
1429
- * functionality.
1430
- */
1431
- annotateMarkerNotifyConsensus(marker: Marker, props: PropertySet, callback: (m: Marker) => void): void;
1432
- /**
1433
- * Annotates the marker with the provided properties.
1434
- * @param marker - The marker to annotate
1435
- * @param props - The properties to annotate the marker with
1436
- * @param combiningOp - Optional. Specifies how to combine values for the property, such as "incr" for increment.
1437
- */
1438
- annotateMarker(marker: Marker, props: PropertySet, combiningOp?: ICombiningOp): void;
1439
- /**
1440
- * Finds the nearest reference with ReferenceType.Tile to `startPos` in the direction dictated by `tilePrecedesPos`.
1441
- * Note that Markers receive `ReferenceType.Tile` by default.
1442
- * @deprecated Use `searchForMarker` instead.
1443
- * @param startPos - Position at which to start the search
1444
- * @param clientId - clientId dictating the perspective to search from
1445
- * @param tileLabel - Label of the tile to search for
1446
- * @param preceding - Whether the desired tile comes before (true) or after (false) `startPos`
1447
- */
1448
- findTile(startPos: number | undefined, tileLabel: string, preceding?: boolean): {
1449
- tile: ReferencePosition;
1450
- pos: number;
1451
- } | undefined;
1452
- /**
1453
- * Searches a string for the nearest marker in either direction to a given start position.
1454
- * The search will include the start position, so markers at the start position are valid
1455
- * results of the search.
1456
- * @param startPos - Position at which to start the search
1457
- * @param markerLabel - Label of the marker to search for
1458
- * @param forwards - Whether the desired marker comes before (false) or after (true) `startPos`
1459
- */
1460
- searchForMarker(startPos: number, markerLabel: string, forwards?: boolean): Marker | undefined;
1461
- /**
1462
- * Retrieve text from the SharedString in string format.
1463
- * @param start - The starting index of the text to retrieve, or 0 if omitted.
1464
- * @param end - The ending index of the text to retrieve, or the end of the string if omitted
1465
- * @returns The requested text content as a string.
1466
- */
1467
- getText(start?: number, end?: number): string;
1468
- /**
1469
- * Adds spaces for markers and handles, so that position calculations account for them.
1470
- */
1471
- getTextWithPlaceholders(start?: number, end?: number): string;
1472
- getTextRangeWithMarkers(start: number, end: number): string;
1473
- /**
1474
- * Looks up and returns a `Marker` using its id. Returns `undefined` if there is no marker with the provided
1475
- * id in this `SharedString`.
1476
- */
1477
- getMarkerFromId(id: string): ISegment | undefined;
1478
- /**
1479
- * Revert an op
1480
- */
1481
- protected rollback(content: any, localOpMetadata: unknown): void;
1482
- }
204
+ /* Excluded from this release type: SharedSequence */
1483
205
 
1484
- /**
1485
- * @public
1486
- */
1487
- export declare class SharedStringFactory implements IChannelFactory {
1488
- static Type: string;
1489
- static readonly Attributes: IChannelAttributes;
1490
- static segmentFromSpec(spec: any): SharedStringSegment;
1491
- get type(): string;
1492
- get attributes(): IChannelAttributes;
1493
- /**
1494
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
1495
- */
1496
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<SharedString>;
1497
- create(document: IFluidDataStoreRuntime, id: string): SharedString;
1498
- }
206
+ /* Excluded from this release type: SharedString */
207
+
208
+ /* Excluded from this release type: SharedStringFactory */
1499
209
 
1500
210
  /* Excluded from this release type: SharedStringRevertible */
1501
211
 
1502
- /**
1503
- * @public
1504
- */
1505
- export declare type SharedStringSegment = TextSegment | Marker;
212
+ /* Excluded from this release type: SharedStringSegment */
1506
213
 
1507
- /**
1508
- * Defines a side relative to a character in a sequence.
1509
- *
1510
- * @remarks See {@link SequencePlace} for additional context on usage.
1511
- * @public
1512
- */
1513
- export declare enum Side {
1514
- Before = 0,
1515
- After = 1
1516
- }
214
+ /* Excluded from this release type: Side */
1517
215
 
1518
- /**
1519
- * @deprecated SubSequence will be removed in a upcoming release. It has been moved to the fluid-experimental/sequence-deprecated package
1520
- * @public
1521
- */
1522
- export declare class SubSequence<T> extends BaseSegment {
1523
- items: Serializable<T>[];
1524
- static readonly typeString: string;
1525
- static is(segment: ISegment): segment is SubSequence<any>;
1526
- static fromJSONObject<U>(spec: Serializable): SubSequence<U> | undefined;
1527
- readonly type: string;
1528
- constructor(items: Serializable<T>[]);
1529
- toJSONObject(): IJSONRunSegment<T>;
1530
- clone(start?: number, end?: number): SubSequence<T>;
1531
- canAppend(segment: ISegment): boolean;
1532
- toString(): string;
1533
- append(segment: ISegment): void;
1534
- removeRange(start: number, end: number): boolean;
1535
- protected createSplitSegmentAt(pos: number): SubSequence<T> | undefined;
1536
- }
216
+ /* Excluded from this release type: SlidingPreference */
217
+
218
+ /* Excluded from this release type: SubSequence */
219
+
220
+ /* Excluded from this release type: SummarySerializer */
221
+
222
+ /* Excluded from this release type: TextSegment */
1537
223
 
1538
224
  /* Excluded from this release type: TypedEventEmitter */
1539
225