@fluidframework/sequence 2.0.0-internal.7.3.0 → 2.0.0-internal.7.4.1

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 (323) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/api-extractor-lint.json +13 -0
  3. package/api-extractor.json +8 -3
  4. package/api-report/sequence.api.md +87 -84
  5. package/dist/{defaultMap.js → defaultMap.cjs} +9 -4
  6. package/dist/defaultMap.cjs.map +1 -0
  7. package/dist/defaultMap.d.ts +3 -3
  8. package/dist/defaultMap.d.ts.map +1 -1
  9. package/dist/{defaultMapInterfaces.js → defaultMapInterfaces.cjs} +1 -1
  10. package/dist/defaultMapInterfaces.cjs.map +1 -0
  11. package/dist/defaultMapInterfaces.d.ts +11 -10
  12. package/dist/defaultMapInterfaces.d.ts.map +1 -1
  13. package/dist/{index.js → index.cjs} +11 -11
  14. package/dist/index.cjs.map +1 -0
  15. package/dist/{intervalCollection.js → intervalCollection.cjs} +53 -48
  16. package/dist/intervalCollection.cjs.map +1 -0
  17. package/dist/intervalCollection.d.ts +66 -12
  18. package/dist/intervalCollection.d.ts.map +1 -1
  19. package/dist/intervalIndex/{endpointInRangeIndex.js → endpointInRangeIndex.cjs} +4 -4
  20. package/dist/intervalIndex/endpointInRangeIndex.cjs.map +1 -0
  21. package/dist/intervalIndex/endpointInRangeIndex.d.ts +2 -2
  22. package/dist/intervalIndex/{endpointIndex.js → endpointIndex.cjs} +3 -3
  23. package/dist/intervalIndex/endpointIndex.cjs.map +1 -0
  24. package/dist/intervalIndex/endpointIndex.d.ts +2 -2
  25. package/dist/intervalIndex/{idIntervalIndex.js → idIntervalIndex.cjs} +2 -2
  26. package/dist/intervalIndex/idIntervalIndex.cjs.map +1 -0
  27. package/dist/intervalIndex/idIntervalIndex.d.ts +2 -2
  28. package/dist/intervalIndex/{index.js → index.cjs} +7 -7
  29. package/dist/intervalIndex/index.cjs.map +1 -0
  30. package/dist/intervalIndex/{intervalIndex.js → intervalIndex.cjs} +1 -1
  31. package/dist/intervalIndex/intervalIndex.cjs.map +1 -0
  32. package/dist/intervalIndex/intervalIndex.d.ts +1 -1
  33. package/dist/intervalIndex/{intervalIndexUtils.js → intervalIndexUtils.cjs} +1 -1
  34. package/dist/intervalIndex/intervalIndexUtils.cjs.map +1 -0
  35. package/dist/intervalIndex/{overlappingIntervalsIndex.js → overlappingIntervalsIndex.cjs} +5 -5
  36. package/dist/intervalIndex/overlappingIntervalsIndex.cjs.map +1 -0
  37. package/dist/intervalIndex/overlappingIntervalsIndex.d.ts +2 -2
  38. package/dist/intervalIndex/{overlappingSequenceIntervalsIndex.js → overlappingSequenceIntervalsIndex.cjs} +4 -4
  39. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.cjs.map +1 -0
  40. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.d.ts +1 -1
  41. package/dist/intervalIndex/{sequenceIntervalIndexes.js → sequenceIntervalIndexes.cjs} +1 -1
  42. package/dist/intervalIndex/sequenceIntervalIndexes.cjs.map +1 -0
  43. package/dist/intervalIndex/sequenceIntervalIndexes.d.ts +2 -1
  44. package/dist/intervalIndex/sequenceIntervalIndexes.d.ts.map +1 -1
  45. package/dist/intervalIndex/{startpointInRangeIndex.js → startpointInRangeIndex.cjs} +4 -4
  46. package/dist/intervalIndex/startpointInRangeIndex.cjs.map +1 -0
  47. package/dist/intervalIndex/startpointInRangeIndex.d.ts +2 -2
  48. package/dist/{intervalTree.js → intervalTree.cjs} +1 -1
  49. package/dist/intervalTree.cjs.map +1 -0
  50. package/dist/intervals/{index.js → index.cjs} +4 -4
  51. package/dist/intervals/index.cjs.map +1 -0
  52. package/dist/intervals/{interval.js → interval.cjs} +2 -6
  53. package/dist/intervals/interval.cjs.map +1 -0
  54. package/dist/intervals/interval.d.ts +2 -7
  55. package/dist/intervals/interval.d.ts.map +1 -1
  56. package/dist/intervals/{intervalUtils.js → intervalUtils.cjs} +4 -4
  57. package/dist/intervals/intervalUtils.cjs.map +1 -0
  58. package/dist/intervals/intervalUtils.d.ts +15 -14
  59. package/dist/intervals/intervalUtils.d.ts.map +1 -1
  60. package/dist/intervals/{sequenceInterval.js → sequenceInterval.cjs} +6 -14
  61. package/dist/intervals/sequenceInterval.cjs.map +1 -0
  62. package/dist/intervals/sequenceInterval.d.ts +3 -12
  63. package/dist/intervals/sequenceInterval.d.ts.map +1 -1
  64. package/dist/{localValues.js → localValues.cjs} +1 -1
  65. package/dist/localValues.cjs.map +1 -0
  66. package/dist/localValues.d.ts +2 -1
  67. package/dist/localValues.d.ts.map +1 -1
  68. package/dist/{packageVersion.js → packageVersion.cjs} +2 -2
  69. package/dist/packageVersion.cjs.map +1 -0
  70. package/dist/packageVersion.d.ts +1 -1
  71. package/dist/{revertibles.js → revertibles.cjs} +10 -12
  72. package/dist/revertibles.cjs.map +1 -0
  73. package/dist/revertibles.d.ts +9 -15
  74. package/dist/revertibles.d.ts.map +1 -1
  75. package/dist/sequence-alpha.d.ts +226 -507
  76. package/dist/sequence-beta.d.ts +131 -1368
  77. package/dist/sequence-public.d.ts +131 -1368
  78. package/dist/sequence-untrimmed.d.ts +121 -90
  79. package/dist/{sequence.js → sequence.cjs} +5 -5
  80. package/dist/sequence.cjs.map +1 -0
  81. package/dist/sequence.d.ts +2 -3
  82. package/dist/sequence.d.ts.map +1 -1
  83. package/dist/{sequenceDeltaEvent.js → sequenceDeltaEvent.cjs} +4 -4
  84. package/dist/sequenceDeltaEvent.cjs.map +1 -0
  85. package/dist/sequenceDeltaEvent.d.ts +4 -4
  86. package/dist/{sequenceFactory.js → sequenceFactory.cjs} +4 -4
  87. package/dist/sequenceFactory.cjs.map +1 -0
  88. package/dist/sequenceFactory.d.ts +1 -1
  89. package/dist/{sharedIntervalCollection.js → sharedIntervalCollection.cjs} +6 -6
  90. package/dist/sharedIntervalCollection.cjs.map +1 -0
  91. package/dist/sharedIntervalCollection.d.ts +3 -3
  92. package/dist/{sharedSequence.js → sharedSequence.cjs} +4 -4
  93. package/dist/sharedSequence.cjs.map +1 -0
  94. package/dist/sharedSequence.d.ts +3 -3
  95. package/dist/{sharedString.js → sharedString.cjs} +9 -6
  96. package/dist/sharedString.cjs.map +1 -0
  97. package/dist/sharedString.d.ts +8 -5
  98. package/dist/sharedString.d.ts.map +1 -1
  99. package/lib/{defaultMap.d.ts → defaultMap.d.mts} +4 -4
  100. package/lib/defaultMap.d.mts.map +1 -0
  101. package/lib/{defaultMap.js → defaultMap.mjs} +9 -4
  102. package/lib/defaultMap.mjs.map +1 -0
  103. package/lib/{defaultMapInterfaces.d.ts → defaultMapInterfaces.d.mts} +11 -10
  104. package/lib/defaultMapInterfaces.d.mts.map +1 -0
  105. package/lib/{defaultMapInterfaces.js → defaultMapInterfaces.mjs} +1 -1
  106. package/lib/defaultMapInterfaces.mjs.map +1 -0
  107. package/lib/{index.d.ts → index.d.mts} +11 -23
  108. package/lib/index.d.mts.map +1 -0
  109. package/lib/{index.js → index.mjs} +11 -11
  110. package/lib/index.mjs.map +1 -0
  111. package/lib/{intervalCollection.d.ts → intervalCollection.d.mts} +68 -14
  112. package/lib/intervalCollection.d.mts.map +1 -0
  113. package/lib/{intervalCollection.js → intervalCollection.mjs} +53 -50
  114. package/lib/intervalCollection.mjs.map +1 -0
  115. package/lib/intervalIndex/{endpointInRangeIndex.d.ts → endpointInRangeIndex.d.mts} +5 -5
  116. package/lib/intervalIndex/endpointInRangeIndex.d.mts.map +1 -0
  117. package/lib/intervalIndex/{endpointInRangeIndex.js → endpointInRangeIndex.mjs} +4 -4
  118. package/lib/intervalIndex/endpointInRangeIndex.mjs.map +1 -0
  119. package/lib/intervalIndex/{endpointIndex.d.ts → endpointIndex.d.mts} +5 -5
  120. package/lib/intervalIndex/endpointIndex.d.mts.map +1 -0
  121. package/lib/intervalIndex/{endpointIndex.js → endpointIndex.mjs} +3 -3
  122. package/lib/intervalIndex/endpointIndex.mjs.map +1 -0
  123. package/lib/intervalIndex/{idIntervalIndex.d.ts → idIntervalIndex.d.mts} +4 -4
  124. package/lib/intervalIndex/idIntervalIndex.d.mts.map +1 -0
  125. package/lib/intervalIndex/{idIntervalIndex.js → idIntervalIndex.mjs} +2 -2
  126. package/lib/intervalIndex/idIntervalIndex.mjs.map +1 -0
  127. package/lib/intervalIndex/{index.d.ts → index.d.mts} +8 -8
  128. package/lib/intervalIndex/index.d.mts.map +1 -0
  129. package/lib/intervalIndex/{index.js → index.mjs} +7 -7
  130. package/{dist/intervalIndex/index.js.map → lib/intervalIndex/index.mjs.map} +1 -1
  131. package/lib/intervalIndex/{intervalIndex.d.ts → intervalIndex.d.mts} +2 -2
  132. package/lib/intervalIndex/intervalIndex.d.mts.map +1 -0
  133. package/lib/intervalIndex/{intervalIndex.js → intervalIndex.mjs} +1 -1
  134. package/lib/intervalIndex/intervalIndex.mjs.map +1 -0
  135. package/lib/intervalIndex/{intervalIndexUtils.js → intervalIndexUtils.mjs} +1 -1
  136. package/lib/intervalIndex/intervalIndexUtils.mjs.map +1 -0
  137. package/lib/intervalIndex/{overlappingIntervalsIndex.d.ts → overlappingIntervalsIndex.d.mts} +7 -7
  138. package/lib/intervalIndex/overlappingIntervalsIndex.d.mts.map +1 -0
  139. package/lib/intervalIndex/{overlappingIntervalsIndex.js → overlappingIntervalsIndex.mjs} +5 -5
  140. package/lib/intervalIndex/overlappingIntervalsIndex.mjs.map +1 -0
  141. package/lib/intervalIndex/{overlappingSequenceIntervalsIndex.d.ts → overlappingSequenceIntervalsIndex.d.mts} +3 -3
  142. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.d.mts.map +1 -0
  143. package/lib/intervalIndex/{overlappingSequenceIntervalsIndex.js → overlappingSequenceIntervalsIndex.mjs} +4 -4
  144. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.mjs.map +1 -0
  145. package/lib/intervalIndex/{sequenceIntervalIndexes.d.ts → sequenceIntervalIndexes.d.mts} +4 -3
  146. package/lib/intervalIndex/sequenceIntervalIndexes.d.mts.map +1 -0
  147. package/lib/intervalIndex/{sequenceIntervalIndexes.js → sequenceIntervalIndexes.mjs} +1 -1
  148. package/lib/intervalIndex/sequenceIntervalIndexes.mjs.map +1 -0
  149. package/lib/intervalIndex/{startpointInRangeIndex.d.ts → startpointInRangeIndex.d.mts} +5 -5
  150. package/lib/intervalIndex/startpointInRangeIndex.d.mts.map +1 -0
  151. package/lib/intervalIndex/{startpointInRangeIndex.js → startpointInRangeIndex.mjs} +4 -4
  152. package/lib/intervalIndex/startpointInRangeIndex.mjs.map +1 -0
  153. package/lib/{intervalTree.d.ts → intervalTree.d.mts} +1 -1
  154. package/lib/intervalTree.d.mts.map +1 -0
  155. package/lib/{intervalTree.js → intervalTree.mjs} +1 -1
  156. package/lib/intervalTree.mjs.map +1 -0
  157. package/lib/intervals/{index.d.ts → index.d.mts} +3 -3
  158. package/lib/intervals/index.d.mts.map +1 -0
  159. package/lib/intervals/{index.js → index.mjs} +4 -4
  160. package/lib/intervals/{index.js.map → index.mjs.map} +1 -1
  161. package/lib/intervals/{interval.d.ts → interval.d.mts} +4 -9
  162. package/lib/intervals/interval.d.mts.map +1 -0
  163. package/lib/intervals/{interval.js → interval.mjs} +2 -6
  164. package/lib/intervals/interval.mjs.map +1 -0
  165. package/lib/intervals/{intervalUtils.d.ts → intervalUtils.d.mts} +16 -15
  166. package/lib/intervals/intervalUtils.d.mts.map +1 -0
  167. package/lib/intervals/{intervalUtils.js → intervalUtils.mjs} +4 -6
  168. package/lib/intervals/intervalUtils.mjs.map +1 -0
  169. package/lib/intervals/{sequenceInterval.d.ts → sequenceInterval.d.mts} +5 -14
  170. package/lib/intervals/sequenceInterval.d.mts.map +1 -0
  171. package/lib/intervals/{sequenceInterval.js → sequenceInterval.mjs} +6 -16
  172. package/lib/intervals/sequenceInterval.mjs.map +1 -0
  173. package/lib/{localValues.d.ts → localValues.d.mts} +3 -2
  174. package/lib/localValues.d.mts.map +1 -0
  175. package/lib/{localValues.js → localValues.mjs} +1 -1
  176. package/lib/localValues.mjs.map +1 -0
  177. package/lib/{packageVersion.d.ts → packageVersion.d.mts} +1 -1
  178. package/lib/{packageVersion.js → packageVersion.mjs} +2 -2
  179. package/lib/packageVersion.mjs.map +1 -0
  180. package/lib/{revertibles.d.ts → revertibles.d.mts} +12 -18
  181. package/lib/revertibles.d.mts.map +1 -0
  182. package/lib/{revertibles.js → revertibles.mjs} +10 -14
  183. package/lib/revertibles.mjs.map +1 -0
  184. package/lib/{sequence-public.d.ts → sequence-alpha.d.mts} +221 -422
  185. package/lib/sequence-beta.d.mts +270 -0
  186. package/lib/sequence-public.d.mts +270 -0
  187. package/lib/{sequence-untrimmed.d.ts → sequence-untrimmed.d.mts} +121 -90
  188. package/lib/{sequence.d.ts → sequence.d.mts} +6 -7
  189. package/lib/sequence.d.mts.map +1 -0
  190. package/lib/{sequence.js → sequence.mjs} +5 -6
  191. package/lib/sequence.mjs.map +1 -0
  192. package/lib/{sequenceDeltaEvent.d.ts → sequenceDeltaEvent.d.mts} +4 -4
  193. package/lib/sequenceDeltaEvent.d.mts.map +1 -0
  194. package/lib/{sequenceDeltaEvent.js → sequenceDeltaEvent.mjs} +4 -5
  195. package/lib/sequenceDeltaEvent.mjs.map +1 -0
  196. package/lib/{sequenceFactory.d.ts → sequenceFactory.d.mts} +2 -2
  197. package/lib/sequenceFactory.d.mts.map +1 -0
  198. package/lib/{sequenceFactory.js → sequenceFactory.mjs} +4 -4
  199. package/lib/sequenceFactory.mjs.map +1 -0
  200. package/lib/{sharedIntervalCollection.d.ts → sharedIntervalCollection.d.mts} +5 -5
  201. package/lib/sharedIntervalCollection.d.mts.map +1 -0
  202. package/lib/{sharedIntervalCollection.js → sharedIntervalCollection.mjs} +6 -6
  203. package/lib/sharedIntervalCollection.mjs.map +1 -0
  204. package/lib/{sharedSequence.d.ts → sharedSequence.d.mts} +4 -4
  205. package/lib/sharedSequence.d.mts.map +1 -0
  206. package/lib/{sharedSequence.js → sharedSequence.mjs} +4 -4
  207. package/lib/sharedSequence.mjs.map +1 -0
  208. package/lib/{sharedString.d.ts → sharedString.d.mts} +10 -7
  209. package/lib/sharedString.d.mts.map +1 -0
  210. package/lib/{sharedString.js → sharedString.mjs} +9 -6
  211. package/lib/sharedString.mjs.map +1 -0
  212. package/package.json +46 -29
  213. package/sequence.test-files.tar +0 -0
  214. package/src/defaultMap.ts +22 -16
  215. package/src/defaultMapInterfaces.ts +15 -12
  216. package/src/intervalCollection.ts +131 -67
  217. package/src/intervalIndex/endpointInRangeIndex.ts +2 -2
  218. package/src/intervalIndex/endpointIndex.ts +2 -2
  219. package/src/intervalIndex/idIntervalIndex.ts +2 -2
  220. package/src/intervalIndex/intervalIndex.ts +1 -1
  221. package/src/intervalIndex/overlappingIntervalsIndex.ts +2 -2
  222. package/src/intervalIndex/overlappingSequenceIntervalsIndex.ts +1 -1
  223. package/src/intervalIndex/sequenceIntervalIndexes.ts +2 -1
  224. package/src/intervalIndex/startpointInRangeIndex.ts +2 -2
  225. package/src/intervals/interval.ts +2 -7
  226. package/src/intervals/intervalUtils.ts +15 -15
  227. package/src/intervals/sequenceInterval.ts +3 -12
  228. package/src/localValues.ts +2 -1
  229. package/src/packageVersion.ts +1 -1
  230. package/src/revertibles.ts +9 -15
  231. package/src/sequence.ts +2 -3
  232. package/src/sequenceDeltaEvent.ts +4 -4
  233. package/src/sequenceFactory.ts +1 -1
  234. package/src/sharedIntervalCollection.ts +3 -3
  235. package/src/sharedSequence.ts +3 -3
  236. package/src/sharedString.ts +8 -5
  237. package/tsc-multi.test.json +10 -0
  238. package/dist/defaultMap.js.map +0 -1
  239. package/dist/defaultMapInterfaces.js.map +0 -1
  240. package/dist/index.js.map +0 -1
  241. package/dist/intervalCollection.js.map +0 -1
  242. package/dist/intervalIndex/endpointInRangeIndex.js.map +0 -1
  243. package/dist/intervalIndex/endpointIndex.js.map +0 -1
  244. package/dist/intervalIndex/idIntervalIndex.js.map +0 -1
  245. package/dist/intervalIndex/intervalIndex.js.map +0 -1
  246. package/dist/intervalIndex/intervalIndexUtils.js.map +0 -1
  247. package/dist/intervalIndex/overlappingIntervalsIndex.js.map +0 -1
  248. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.js.map +0 -1
  249. package/dist/intervalIndex/sequenceIntervalIndexes.js.map +0 -1
  250. package/dist/intervalIndex/startpointInRangeIndex.js.map +0 -1
  251. package/dist/intervalTree.js.map +0 -1
  252. package/dist/intervals/index.js.map +0 -1
  253. package/dist/intervals/interval.js.map +0 -1
  254. package/dist/intervals/intervalUtils.js.map +0 -1
  255. package/dist/intervals/sequenceInterval.js.map +0 -1
  256. package/dist/localValues.js.map +0 -1
  257. package/dist/packageVersion.js.map +0 -1
  258. package/dist/revertibles.js.map +0 -1
  259. package/dist/sequence.js.map +0 -1
  260. package/dist/sequenceDeltaEvent.js.map +0 -1
  261. package/dist/sequenceFactory.js.map +0 -1
  262. package/dist/sharedIntervalCollection.js.map +0 -1
  263. package/dist/sharedSequence.js.map +0 -1
  264. package/dist/sharedString.js.map +0 -1
  265. package/lib/defaultMap.d.ts.map +0 -1
  266. package/lib/defaultMap.js.map +0 -1
  267. package/lib/defaultMapInterfaces.d.ts.map +0 -1
  268. package/lib/defaultMapInterfaces.js.map +0 -1
  269. package/lib/index.d.ts.map +0 -1
  270. package/lib/index.js.map +0 -1
  271. package/lib/intervalCollection.d.ts.map +0 -1
  272. package/lib/intervalCollection.js.map +0 -1
  273. package/lib/intervalIndex/endpointInRangeIndex.d.ts.map +0 -1
  274. package/lib/intervalIndex/endpointInRangeIndex.js.map +0 -1
  275. package/lib/intervalIndex/endpointIndex.d.ts.map +0 -1
  276. package/lib/intervalIndex/endpointIndex.js.map +0 -1
  277. package/lib/intervalIndex/idIntervalIndex.d.ts.map +0 -1
  278. package/lib/intervalIndex/idIntervalIndex.js.map +0 -1
  279. package/lib/intervalIndex/index.d.ts.map +0 -1
  280. package/lib/intervalIndex/index.js.map +0 -1
  281. package/lib/intervalIndex/intervalIndex.d.ts.map +0 -1
  282. package/lib/intervalIndex/intervalIndex.js.map +0 -1
  283. package/lib/intervalIndex/intervalIndexUtils.js.map +0 -1
  284. package/lib/intervalIndex/overlappingIntervalsIndex.d.ts.map +0 -1
  285. package/lib/intervalIndex/overlappingIntervalsIndex.js.map +0 -1
  286. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.d.ts.map +0 -1
  287. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.js.map +0 -1
  288. package/lib/intervalIndex/sequenceIntervalIndexes.d.ts.map +0 -1
  289. package/lib/intervalIndex/sequenceIntervalIndexes.js.map +0 -1
  290. package/lib/intervalIndex/startpointInRangeIndex.d.ts.map +0 -1
  291. package/lib/intervalIndex/startpointInRangeIndex.js.map +0 -1
  292. package/lib/intervalTree.d.ts.map +0 -1
  293. package/lib/intervalTree.js.map +0 -1
  294. package/lib/intervals/index.d.ts.map +0 -1
  295. package/lib/intervals/interval.d.ts.map +0 -1
  296. package/lib/intervals/interval.js.map +0 -1
  297. package/lib/intervals/intervalUtils.d.ts.map +0 -1
  298. package/lib/intervals/intervalUtils.js.map +0 -1
  299. package/lib/intervals/sequenceInterval.d.ts.map +0 -1
  300. package/lib/intervals/sequenceInterval.js.map +0 -1
  301. package/lib/localValues.d.ts.map +0 -1
  302. package/lib/localValues.js.map +0 -1
  303. package/lib/packageVersion.js.map +0 -1
  304. package/lib/revertibles.d.ts.map +0 -1
  305. package/lib/revertibles.js.map +0 -1
  306. package/lib/sequence-alpha.d.ts +0 -1587
  307. package/lib/sequence-beta.d.ts +0 -1507
  308. package/lib/sequence.d.ts.map +0 -1
  309. package/lib/sequence.js.map +0 -1
  310. package/lib/sequenceDeltaEvent.d.ts.map +0 -1
  311. package/lib/sequenceDeltaEvent.js.map +0 -1
  312. package/lib/sequenceFactory.d.ts.map +0 -1
  313. package/lib/sequenceFactory.js.map +0 -1
  314. package/lib/sharedIntervalCollection.d.ts.map +0 -1
  315. package/lib/sharedIntervalCollection.js.map +0 -1
  316. package/lib/sharedSequence.d.ts.map +0 -1
  317. package/lib/sharedSequence.js.map +0 -1
  318. package/lib/sharedString.d.ts.map +0 -1
  319. package/lib/sharedString.js.map +0 -1
  320. package/tsconfig.esnext.json +0 -6
  321. /package/lib/intervalIndex/{intervalIndexUtils.d.ts → intervalIndexUtils.d.mts} +0 -0
  322. /package/lib/intervalIndex/{intervalIndexUtils.d.ts.map → intervalIndexUtils.d.mts.map} +0 -0
  323. /package/lib/{packageVersion.d.ts.map → packageVersion.d.mts.map} +0 -0
@@ -42,7 +42,9 @@ import { LocalReferencePosition } from '@fluidframework/merge-tree';
42
42
  import { Marker } from '@fluidframework/merge-tree';
43
43
  import { MergeTreeDeltaOperationType } from '@fluidframework/merge-tree';
44
44
  import { MergeTreeDeltaOperationTypes } from '@fluidframework/merge-tree';
45
+ import { MergeTreeDeltaRevertible } from '@fluidframework/merge-tree';
45
46
  import { MergeTreeMaintenanceType } from '@fluidframework/merge-tree';
47
+ import { MergeTreeRevertibleDriver } from '@fluidframework/merge-tree';
46
48
  import { PropertiesManager } from '@fluidframework/merge-tree';
47
49
  import { PropertySet } from '@fluidframework/merge-tree';
48
50
  import { RangeStackMap } from '@fluidframework/merge-tree';
@@ -53,6 +55,7 @@ import { SharedObject } from '@fluidframework/shared-object-base';
53
55
  import { SlidingPreference } from '@fluidframework/merge-tree';
54
56
  import { SummarySerializer } from '@fluidframework/shared-object-base';
55
57
  import { TextSegment } from '@fluidframework/merge-tree';
58
+ import { TypedEventEmitter } from '@fluid-internal/client-utils';
56
59
 
57
60
  /* Excluded from this release type: appendAddIntervalToRevertibles */
58
61
 
@@ -64,103 +67,36 @@ import { TextSegment } from '@fluidframework/merge-tree';
64
67
 
65
68
  /* Excluded from this release type: appendSharedStringDeltaToRevertibles */
66
69
 
67
- /**
68
- * @public
69
- */
70
- export declare function createEndpointIndex(sharedString: SharedString): IEndpointIndex<SequenceInterval>;
70
+ /* Excluded from this release type: createEndpointIndex */
71
71
 
72
- /**
73
- * @public
74
- */
75
- export declare function createEndpointInRangeIndex(sharedString: SharedString): IEndpointInRangeIndex<SequenceInterval>;
72
+ /* Excluded from this release type: createEndpointInRangeIndex */
76
73
 
77
- /**
78
- * @public
79
- */
80
- export declare function createIdIntervalIndex<TInterval extends ISerializableInterval>(): IIdIntervalIndex<TInterval>;
74
+ /* Excluded from this release type: createIdIntervalIndex */
81
75
 
82
- /**
83
- * @public
84
- */
85
- export declare function createOverlappingIntervalsIndex(sharedString: SharedString): IOverlappingIntervalsIndex<SequenceInterval>;
76
+ /* Excluded from this release type: createOverlappingIntervalsIndex */
86
77
 
87
- /**
88
- * @public
89
- */
90
- export declare function createOverlappingSequenceIntervalsIndex(sharedString: SharedString): SequenceIntervalIndexes.Overlapping;
78
+ /* Excluded from this release type: createOverlappingSequenceIntervalsIndex */
91
79
 
92
- /**
93
- * @public
94
- */
95
- export declare function createStartpointInRangeIndex(sharedString: SharedString): IStartpointInRangeIndex<SequenceInterval>;
80
+ /* Excluded from this release type: createStartpointInRangeIndex */
96
81
 
97
82
  /**
98
- * @public
83
+ * @alpha
99
84
  */
100
85
  export declare type DeserializeCallback = (properties: PropertySet) => void;
101
86
 
102
87
  /* Excluded from this release type: discardSharedStringRevertibles */
103
88
 
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
- };
89
+ /* Excluded from this release type: getTextAndMarkers */
123
90
 
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
- }
91
+ /* Excluded from this release type: IEndpointIndex */
139
92
 
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
- }
93
+ /* Excluded from this release type: IEndpointInRangeIndex */
152
94
 
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
- }
95
+ /* Excluded from this release type: IIdIntervalIndex */
160
96
 
161
97
  /**
162
98
  * Basic interval abstraction
163
- * @public
99
+ * @alpha
164
100
  */
165
101
  export declare interface IInterval {
166
102
  /**
@@ -187,19 +123,27 @@ export declare interface IInterval {
187
123
  * @param b - Interval to compare against
188
124
  */
189
125
  compareEnd(b: IInterval): number;
190
- /* Excluded from this release type: modify */
126
+ /**
127
+ * Modifies one or more of the endpoints of this interval, returning a new interval representing the result.
128
+ */
129
+ modify(label: string, start: SequencePlace | undefined, end: SequencePlace | undefined, op?: ISequencedDocumentMessage, localSeq?: number, useNewSlidingBehavior?: boolean): IInterval | undefined;
191
130
  /**
192
131
  * @returns whether this interval overlaps with `b`.
193
132
  * Intervals are considered to overlap if their intersection is non-empty.
194
133
  */
195
134
  overlaps(b: IInterval): boolean;
196
- /* Excluded from this release type: union */
135
+ /**
136
+ * Unions this interval with `b`, returning a new interval.
137
+ * The union operates as a convex hull, i.e. if the two intervals are disjoint, the return value includes
138
+ * intermediate values between the two intervals.
139
+ */
140
+ union(b: IInterval): IInterval;
197
141
  }
198
142
 
199
143
  /**
200
144
  * Collection of intervals that supports addition, modification, removal, and efficient spatial querying.
201
145
  * Changes to this collection will be incur updates on collaborating clients (i.e. they are not local-only).
202
- * @public
146
+ * @alpha
203
147
  */
204
148
  export declare interface IIntervalCollection<TInterval extends ISerializableInterval> extends TypedEventEmitter<IIntervalCollectionEvent<TInterval>> {
205
149
  readonly attached: boolean;
@@ -321,6 +265,7 @@ export declare interface IIntervalCollection<TInterval extends ISerializableInte
321
265
  removeIntervalById(id: string): TInterval | undefined;
322
266
  /**
323
267
  * Changes the properties on an existing interval.
268
+ * @deprecated - call change with the id and and object containing the new properties
324
269
  * @param id - Id of the interval whose properties should be changed
325
270
  * @param props - Property set to apply to the interval. Shallow merging is used between any existing properties
326
271
  * and `prop`, i.e. the interval will end up with a property object equivalent to `{ ...oldProps, ...props }`.
@@ -328,12 +273,26 @@ export declare interface IIntervalCollection<TInterval extends ISerializableInte
328
273
  changeProperties(id: string, props: PropertySet): any;
329
274
  /**
330
275
  * Changes the endpoints of an existing interval.
276
+ * @deprecated - call change with the start and end parameters encapsulated in an object
331
277
  * @param id - Id of the interval to change
332
278
  * @param start - New start value. To leave the endpoint unchanged, pass the current value.
333
279
  * @param end - New end value. To leave the endpoint unchanged, pass the current value.
334
280
  * @returns the interval that was changed, if it existed in the collection.
335
281
  */
336
282
  change(id: string, start: SequencePlace, end: SequencePlace): TInterval | undefined;
283
+ /**
284
+ * Changes the endpoints, properties, or both of an existing interval.
285
+ * @param id - Id of the Interval to change
286
+ * @returns the interval that was changed, if it existed in the collection.
287
+ * Pass the desired new start position, end position, and/or properties in an object. Start and end positions must be changed
288
+ * simultaneously - they must either both be specified or both undefined. To only change the properties, leave both endpoints
289
+ * undefined. To only change the endpoints, leave the properties undefined.
290
+ */
291
+ change(id: string, { start, end, props }: {
292
+ start?: SequencePlace;
293
+ end?: SequencePlace;
294
+ props?: PropertySet;
295
+ }): TInterval | undefined;
337
296
  attachDeserializer(onDeserialize: DeserializeCallback): void;
338
297
  /**
339
298
  * @returns an iterator over all intervals in this collection.
@@ -365,6 +324,14 @@ export declare interface IIntervalCollection<TInterval extends ISerializableInte
365
324
  */
366
325
  gatherIterationResults(results: TInterval[], iteratesForward: boolean, start?: number, end?: number): void;
367
326
  /**
327
+ * @deprecated - Users must manually attach the corresponding interval index to utilize this functionality, for instance:
328
+ *
329
+ * ```typescript
330
+ * const overlappingIntervalsIndex = createOverlappingIntervalsIndex(sharedString);
331
+ * collection.attachIndex(overlappingIntervalsIndex)
332
+ * const result = overlappingIntervalsIndex.findOverlappingIntervals(start, end);
333
+ * ```
334
+ *
368
335
  * @returns an array of all intervals in this collection that overlap with the interval
369
336
  * `[startPosition, endPosition]`.
370
337
  */
@@ -373,13 +340,34 @@ export declare interface IIntervalCollection<TInterval extends ISerializableInte
373
340
  * Applies a function to each interval in this collection.
374
341
  */
375
342
  map(fn: (interval: TInterval) => void): void;
343
+ /**
344
+ * @deprecated - due to the forthcoming change where the endpointIndex will no longer be
345
+ * automatically added to the collection. Users are advised to independently attach the
346
+ * index to the collection and utilize the API accordingly, for instance:
347
+ * ```typescript
348
+ * const endpointIndex = createEndpointIndex(sharedString);
349
+ * collection.attachIndex(endpointIndex);
350
+ * const result1 = endpointIndex.previousInterval(pos);
351
+ * ```
352
+ * If an index is used repeatedly, applications should generally attach it once and store it in memory.
353
+ */
376
354
  previousInterval(pos: number): TInterval | undefined;
355
+ /**
356
+ * @deprecated - due to the forthcoming change where the endpointIndex will no longer be
357
+ * automatically added to the collection. Users are advised to independently attach the
358
+ * index to the collection and utilize the API accordingly, for instance:
359
+ * ```typescript
360
+ * const endpointIndex = createEndpointIndex(sharedString);
361
+ * collection.attachIndex(endpointIndex);
362
+ * const result2 = endpointIndex.nextInterval(pos);
363
+ * ```
364
+ */
377
365
  nextInterval(pos: number): TInterval | undefined;
378
366
  }
379
367
 
380
368
  /**
381
369
  * Change events emitted by `IntervalCollection`s
382
- * @public
370
+ * @alpha
383
371
  */
384
372
  export declare interface IIntervalCollectionEvent<TInterval extends ISerializableInterval> extends IEvent {
385
373
  /**
@@ -414,37 +402,9 @@ export declare interface IIntervalCollectionEvent<TInterval extends ISerializabl
414
402
  (event: "propertyChanged", listener: (interval: TInterval, propertyDeltas: PropertySet, local: boolean, op: ISequencedDocumentMessage | undefined) => void): any;
415
403
  }
416
404
 
417
- /**
418
- * @sealed
419
- * @deprecated The methods within have substitutions
420
- * @public
421
- */
422
- export declare interface IIntervalHelpers<TInterval extends ISerializableInterval> {
423
- /**
424
- *
425
- * @param label - label of the interval collection this interval is being added to. This parameter is
426
- * irrelevant for transient intervals.
427
- * @param start - numerical start position of the interval
428
- * @param end - numerical end position of the interval
429
- * @param client - client creating the interval
430
- * @param intervalType - Type of interval to create. Default is SlideOnRemove
431
- * @param op - If this create came from a remote client, op that created it. Default is undefined (i.e. local)
432
- * @param fromSnapshot - If this create came from loading a snapshot. Default is false.
433
- * @param startSide - The side on which the start position lays. See
434
- * {@link SequencePlace} for additional context
435
- * @param endSide - The side on which the end position lays. See
436
- * {@link SequencePlace} for additional context
437
- */
438
- create(label: string, start: SequencePlace | undefined, end: SequencePlace | undefined, client: Client | undefined, intervalType: IntervalType, op?: ISequencedDocumentMessage, fromSnapshot?: boolean, useNewSlidingBehavior?: boolean): TInterval;
439
- }
405
+ /* Excluded from this release type: IIntervalHelpers */
440
406
 
441
- /**
442
- * @deprecated IJSONRunSegment will be removed in a upcoming release. It has been moved to the fluid-experimental/sequence-deprecated package
443
- * @public
444
- */
445
- export declare interface IJSONRunSegment<T> extends IJSONSegment {
446
- items: Serializable<T>[];
447
- }
407
+ /* Excluded from this release type: IJSONRunSegment */
448
408
 
449
409
  /* Excluded from this release type: IMapMessageLocalMetadata */
450
410
 
@@ -452,71 +412,14 @@ export declare interface IJSONRunSegment<T> extends IJSONSegment {
452
412
  * A sequence place that does not refer to the special endpoint segments.
453
413
  *
454
414
  * See {@link SequencePlace} for additional context.
455
- * @public
415
+ * @alpha
456
416
  */
457
417
  export declare interface InteriorSequencePlace {
458
418
  pos: number;
459
419
  side: Side;
460
420
  }
461
421
 
462
- /**
463
- * Serializable interval whose endpoints are plain-old numbers.
464
- * @public
465
- */
466
- export declare class Interval implements ISerializableInterval {
467
- start: number;
468
- end: number;
469
- /**
470
- * {@inheritDoc ISerializableInterval.properties}
471
- */
472
- properties: PropertySet;
473
- /* Excluded from this release type: auxProps */
474
- /* Excluded from this release type: propertyManager */
475
- constructor(start: number, end: number, props?: PropertySet);
476
- /**
477
- * {@inheritDoc ISerializableInterval.getIntervalId}
478
- */
479
- getIntervalId(): string;
480
- /**
481
- * @returns an array containing any auxiliary property sets added with `addPropertySet`.
482
- */
483
- getAdditionalPropertySets(): PropertySet[];
484
- /**
485
- * Adds an auxiliary set of properties to this interval.
486
- * These properties can be recovered using `getAdditionalPropertySets`
487
- * @param props - set of properties to add
488
- * @remarks This gets called as part of the default conflict resolver for `IIntervalCollection<Interval>`
489
- * (i.e. non-sequence-based interval collections). However, the additional properties don't get serialized.
490
- * This functionality seems half-baked.
491
- */
492
- addPropertySet(props: PropertySet): void;
493
- /* Excluded from this release type: serialize */
494
- /**
495
- * {@inheritDoc IInterval.clone}
496
- */
497
- clone(): Interval;
498
- /**
499
- * {@inheritDoc IInterval.compare}
500
- */
501
- compare(b: Interval): number;
502
- /**
503
- * {@inheritDoc IInterval.compareStart}
504
- */
505
- compareStart(b: Interval): number;
506
- /**
507
- * {@inheritDoc IInterval.compareEnd}
508
- */
509
- compareEnd(b: Interval): number;
510
- /**
511
- * {@inheritDoc IInterval.overlaps}
512
- */
513
- overlaps(b: Interval): boolean;
514
- /* Excluded from this release type: union */
515
- getProperties(): PropertySet;
516
- /* Excluded from this release type: addProperties */
517
- /* Excluded from this release type: modify */
518
- private initializeProperties;
519
- }
422
+ /* Excluded from this release type: Interval */
520
423
 
521
424
  /**
522
425
  * Collection of intervals.
@@ -526,7 +429,7 @@ export declare class Interval implements ISerializableInterval {
526
429
  * - "find all intervals with start endpoint between these two points"
527
430
  * - "find all intervals which overlap this range"
528
431
  * etc.
529
- * @public
432
+ * @alpha
530
433
  */
531
434
  export declare interface IntervalIndex<TInterval extends ISerializableInterval> {
532
435
  /**
@@ -543,38 +446,56 @@ export declare interface IntervalIndex<TInterval extends ISerializableInterval>
543
446
  remove(interval: TInterval): void;
544
447
  }
545
448
 
449
+ /* Excluded from this release type: IntervalLocator */
450
+
451
+ /* Excluded from this release type: intervalLocatorFromEndpoint */
452
+
453
+ /* Excluded from this release type: IntervalOpType */
454
+
455
+ /* Excluded from this release type: IntervalRevertible */
456
+
546
457
  /**
547
- * Information that identifies an interval within a `Sequence`.
548
- * @public
458
+ * Determines how an interval should expand when segments are inserted adjacent
459
+ * to the range it spans
460
+ *
461
+ * Note that interval stickiness is currently an experimental feature and must
462
+ * be explicitly enabled with the `intervalStickinessEnabled` flag
463
+ *
464
+ * @alpha
549
465
  */
550
- export declare interface IntervalLocator {
466
+ export declare const IntervalStickiness: {
551
467
  /**
552
- * Label for the collection the interval is a part of
468
+ * Interval does not expand to include adjacent segments
553
469
  */
554
- label: string;
470
+ readonly NONE: 0;
555
471
  /**
556
- * Interval within that collection
472
+ * Interval expands to include segments inserted adjacent to the start
557
473
  */
558
- interval: SequenceInterval;
559
- }
474
+ readonly START: 1;
475
+ /**
476
+ * Interval expands to include segments inserted adjacent to the end
477
+ *
478
+ * This is the default stickiness
479
+ */
480
+ readonly END: 2;
481
+ /**
482
+ * Interval expands to include all segments inserted adjacent to it
483
+ */
484
+ readonly FULL: 3;
485
+ };
560
486
 
561
487
  /**
562
- * Returns an object that can be used to find the interval a given LocalReferencePosition belongs to.
563
- * @returns undefined if the reference position is not the endpoint of any interval (e.g. it was created
564
- * on the merge tree directly by app code), otherwise an {@link IntervalLocator} for the interval this
565
- * endpoint is a part of.
566
- * @public
488
+ * Determines how an interval should expand when segments are inserted adjacent
489
+ * to the range it spans
490
+ *
491
+ * Note that interval stickiness is currently an experimental feature and must
492
+ * be explicitly enabled with the `intervalStickinessEnabled` flag
493
+ * @alpha
567
494
  */
568
- export declare function intervalLocatorFromEndpoint(potentialEndpoint: LocalReferencePosition): IntervalLocator | undefined;
569
-
570
- /* Excluded from this release type: IntervalOpType */
571
-
572
- /* Excluded from this release type: IntervalRevertible */
573
-
574
- /* Excluded from this release type: IntervalStickiness */
495
+ export declare type IntervalStickiness = (typeof IntervalStickiness)[keyof typeof IntervalStickiness];
575
496
 
576
497
  /**
577
- * @public
498
+ * @alpha
578
499
  */
579
500
  export declare enum IntervalType {
580
501
  Simple = 0,
@@ -592,24 +513,11 @@ export declare enum IntervalType {
592
513
  /* Excluded from this release type: Transient */
593
514
  }
594
515
 
595
- /**
596
- * @public
597
- */
598
- export declare interface IOverlappingIntervalsIndex<TInterval extends ISerializableInterval> extends IntervalIndex<TInterval> {
599
- /**
600
- * @returns an array of all intervals contained in this collection that overlap the range
601
- * `[start end]`.
602
- */
603
- findOverlappingIntervals(start: SequencePlace, end: SequencePlace): TInterval[];
604
- /**
605
- * Gathers the interval results based on specified parameters.
606
- */
607
- gatherIterationResults(results: TInterval[], iteratesForward: boolean, start?: SequencePlace, end?: SequencePlace): void;
608
- }
516
+ /* Excluded from this release type: IOverlappingIntervalsIndex */
609
517
 
610
518
  /**
611
519
  * A range that has changed corresponding to a segment modification.
612
- * @public
520
+ * @alpha
613
521
  */
614
522
  export declare interface ISequenceDeltaRange<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes> {
615
523
  /**
@@ -644,14 +552,17 @@ export declare interface ISequenceDeltaRange<TOperation extends MergeTreeDeltaOp
644
552
  }
645
553
 
646
554
  /**
647
- * @public
555
+ * @alpha
648
556
  */
649
557
  export declare interface ISerializableInterval extends IInterval {
650
558
  /** Serializable bag of properties associated with the interval. */
651
559
  properties: PropertySet;
652
- /* Excluded from this release type: propertyManager */
653
- /* Excluded from this release type: serialize */
654
- /* Excluded from this release type: addProperties */
560
+ /***/
561
+ propertyManager: PropertiesManager;
562
+ /***/
563
+ serialize(): ISerializedInterval;
564
+ /***/
565
+ addProperties(props: PropertySet, collaborating?: boolean, seq?: number): PropertySet | undefined;
655
566
  /**
656
567
  * Gets the id associated with this interval.
657
568
  * When the interval is used as part of an interval collection, this id can be used to modify or remove the
@@ -662,10 +573,38 @@ export declare interface ISerializableInterval extends IInterval {
662
573
  getIntervalId(): string | undefined;
663
574
  }
664
575
 
665
- /* Excluded from this release type: ISerializedInterval */
576
+ /**
577
+ * Serialized object representation of an interval.
578
+ * This representation is used for ops that create or change intervals.
579
+ * @alpha
580
+ */
581
+ export declare interface ISerializedInterval {
582
+ /**
583
+ * Sequence number at which `start` and `end` should be interpreted
584
+ *
585
+ * @remarks It's unclear that this is necessary to store here.
586
+ * This should just be the refSeq on the op that modified the interval, which should be available via other means.
587
+ * At the time of writing, it's not plumbed through to the reconnect/rebase code, however, which does need it.
588
+ */
589
+ sequenceNumber: number;
590
+ /** Start position of the interval */
591
+ start: number | "start" | "end";
592
+ /** End position of the interval */
593
+ end: number | "start" | "end";
594
+ /** Interval type to create */
595
+ intervalType: IntervalType;
596
+ /**
597
+ * The stickiness of this interval
598
+ */
599
+ stickiness?: IntervalStickiness;
600
+ startSide?: Side;
601
+ endSide?: Side;
602
+ /** Any properties the interval has */
603
+ properties?: PropertySet;
604
+ }
666
605
 
667
606
  /**
668
- * @public
607
+ * @alpha
669
608
  */
670
609
  export declare interface ISharedIntervalCollection<TInterval extends ISerializableInterval> {
671
610
  getIntervalCollection(label: string): IIntervalCollection<TInterval>;
@@ -703,7 +642,7 @@ export declare interface ISharedIntervalCollection<TInterval extends ISerializab
703
642
  * - `event` - Various information on the segments that were modified.
704
643
  *
705
644
  * - `target` - The sequence itself.
706
- * @public
645
+ * @alpha
707
646
  */
708
647
  export declare interface ISharedSegmentSequenceEvents extends ISharedObjectEvents {
709
648
  (event: "createIntervalCollection", listener: (label: string, local: boolean, target: IEventThisPlaceHolder) => void): any;
@@ -713,7 +652,7 @@ export declare interface ISharedSegmentSequenceEvents extends ISharedObjectEvent
713
652
 
714
653
  /**
715
654
  * Fluid object interface describing access methods on a SharedString
716
- * @public
655
+ * @alpha
717
656
  */
718
657
  export declare interface ISharedString extends SharedSegmentSequence<SharedStringSegment> {
719
658
  /**
@@ -736,25 +675,12 @@ export declare interface ISharedString extends SharedSegmentSequence<SharedStrin
736
675
  posFromRelativePos(relativePos: IRelativePosition): number;
737
676
  }
738
677
 
739
- /**
740
- * Collection of intervals.
741
- *
742
- * Provide additional APIs to support efficiently querying a collection of intervals whose startpoints fall within a specified range.
743
- * @public
744
- */
745
- export declare interface IStartpointInRangeIndex<TInterval extends ISerializableInterval> extends IntervalIndex<TInterval> {
746
- /**
747
- * @returns an array of all intervals contained in this collection whose startpoints locate in the range [start, end] (includes both ends)
748
- */
749
- findIntervalsWithStartpointInRange(start: number, end: number): TInterval[];
750
- }
678
+ /* Excluded from this release type: IStartpointInRangeIndex */
751
679
 
752
680
  /* Excluded from this release type: IValueOpEmitter */
753
681
 
754
682
  /* Excluded from this release type: MergeTreeDeltaRevertible */
755
683
 
756
- /* Excluded from this release type: MergeTreeRevertibleDriver */
757
-
758
684
  /* Excluded from this release type: revertSharedStringRevertibles */
759
685
 
760
686
  /**
@@ -767,7 +693,7 @@ export declare interface IStartpointInRangeIndex<TInterval extends ISerializable
767
693
  * For group ops, each op will get its own event, and the group op property will be set on the op args.
768
694
  *
769
695
  * Ops may get multiple events. For instance, an insert-replace will get a remove then an insert event.
770
- * @public
696
+ * @alpha
771
697
  */
772
698
  export declare class SequenceDeltaEvent extends SequenceEvent<MergeTreeDeltaOperationType> {
773
699
  readonly opArgs: IMergeTreeDeltaOpArgs;
@@ -784,7 +710,7 @@ export declare class SequenceDeltaEvent extends SequenceEvent<MergeTreeDeltaOper
784
710
  * The properties of this object and its sub-objects represent the state of the sequence at the
785
711
  * point in time at which the operation was applied.
786
712
  * They will not take into any future modifications performed to the underlying sequence and merge tree.
787
- * @public
713
+ * @alpha
788
714
  */
789
715
  export declare abstract class SequenceEvent<TOperation extends MergeTreeDeltaOperationTypes = MergeTreeDeltaOperationTypes> {
790
716
  readonly deltaArgs: IMergeTreeDeltaCallbackArgs<TOperation>;
@@ -839,7 +765,7 @@ export declare abstract class SequenceEvent<TOperation extends MergeTreeDeltaOpe
839
765
  * `mergeTreeReferencesCanSlideToEndpoint` feature flag set to true, the endpoints
840
766
  * of the interval that are exclusive will have the ability to slide to these
841
767
  * special endpoint segments.
842
- * @public
768
+ * @alpha
843
769
  */
844
770
  export declare class SequenceInterval implements ISerializableInterval {
845
771
  private readonly client;
@@ -860,8 +786,12 @@ export declare class SequenceInterval implements ISerializableInterval {
860
786
  * {@inheritDoc ISerializableInterval.properties}
861
787
  */
862
788
  properties: PropertySet;
863
- /* Excluded from this release type: propertyManager */
864
- /* Excluded from this release type: stickiness */
789
+ /**
790
+ * {@inheritDoc ISerializableInterval.propertyManager}
791
+ */
792
+ propertyManager: PropertiesManager;
793
+ /***/
794
+ get stickiness(): IntervalStickiness;
865
795
  constructor(client: Client,
866
796
  /**
867
797
  * Start endpoint of this interval.
@@ -874,9 +804,18 @@ export declare class SequenceInterval implements ISerializableInterval {
874
804
  */
875
805
  end: LocalReferencePosition, intervalType: IntervalType, props?: PropertySet, startSide?: Side, endSide?: Side);
876
806
  private callbacks?;
877
- /* Excluded from this release type: addPositionChangeListeners */
878
- /* Excluded from this release type: removePositionChangeListeners */
879
- /* Excluded from this release type: serialize */
807
+ /**
808
+ * Subscribes to position change events on this interval if there are no current listeners.
809
+ */
810
+ addPositionChangeListeners(beforePositionChange: () => void, afterPositionChange: () => void): void;
811
+ /**
812
+ * Removes the currently subscribed position change listeners.
813
+ */
814
+ removePositionChangeListeners(): void;
815
+ /**
816
+ * {@inheritDoc ISerializableInterval.serialize}
817
+ */
818
+ serialize(): ISerializedInterval;
880
819
  /**
881
820
  * {@inheritDoc IInterval.clone}
882
821
  */
@@ -901,48 +840,28 @@ export declare class SequenceInterval implements ISerializableInterval {
901
840
  * {@inheritDoc ISerializableInterval.getIntervalId}
902
841
  */
903
842
  getIntervalId(): string;
904
- /* Excluded from this release type: union */
905
- /* Excluded from this release type: addProperties */
843
+ /**
844
+ * {@inheritDoc IInterval.union}
845
+ */
846
+ union(b: SequenceInterval): SequenceInterval;
847
+ /**
848
+ * {@inheritDoc ISerializableInterval.addProperties}
849
+ */
850
+ addProperties(newProps: PropertySet, collab?: boolean, seq?: number, op?: ICombiningOp): PropertySet | undefined;
906
851
  /**
907
852
  * @returns whether this interval overlaps two numerical positions.
908
853
  */
909
854
  overlapsPos(bstart: number, bend: number): boolean;
910
- /* Excluded from this release type: modify */
855
+ /**
856
+ * {@inheritDoc IInterval.modify}
857
+ */
858
+ modify(label: string, start: SequencePlace | undefined, end: SequencePlace | undefined, op?: ISequencedDocumentMessage, localSeq?: number, useNewSlidingBehavior?: boolean): SequenceInterval;
911
859
  private initializeProperties;
912
860
  }
913
861
 
914
- /**
915
- * @deprecated The methods within have substitutions
916
- * @public
917
- */
918
- export declare const sequenceIntervalHelpers: IIntervalHelpers<SequenceInterval>;
862
+ /* Excluded from this release type: sequenceIntervalHelpers */
919
863
 
920
- /**
921
- * This namespace contains specialiazations of indexes which support spatial queries
922
- * specifically for `SequenceInterval`s.
923
- * @public
924
- */
925
- export declare namespace SequenceIntervalIndexes {
926
- /**
927
- * Collection of intervals.
928
- *
929
- * Provides additional APIs to support efficiently querying a collection of intervals based on segments and offset.
930
- */
931
- export interface Overlapping extends IOverlappingIntervalsIndex<SequenceInterval> {
932
- /**
933
- * Finds overlapping intervals within the specified range.
934
- *
935
- * @returns an array of all intervals that overlap with the specified SegOff range (includes both ends)
936
- */
937
- findOverlappingIntervalsBySegoff(startSegoff: {
938
- segment: ISegment | undefined;
939
- offset: number | undefined;
940
- }, endSegoff: {
941
- segment: ISegment | undefined;
942
- offset: number | undefined;
943
- }): Iterable<SequenceInterval>;
944
- }
945
- }
864
+ /* Excluded from this release type: SequenceIntervalIndexes */
946
865
 
947
866
  /**
948
867
  * The event object returned on maintenance events.
@@ -950,44 +869,14 @@ export declare namespace SequenceIntervalIndexes {
950
869
  * The properties of this object and its sub-objects represent the state of the sequence at the
951
870
  * point in time at which the operation was applied.
952
871
  * They will not take into consideration any future modifications performed to the underlying sequence and merge tree.
953
- * @public
872
+ * @alpha
954
873
  */
955
874
  export declare class SequenceMaintenanceEvent extends SequenceEvent<MergeTreeMaintenanceType> {
956
875
  readonly opArgs: IMergeTreeDeltaOpArgs | undefined;
957
876
  constructor(opArgs: IMergeTreeDeltaOpArgs | undefined, deltaArgs: IMergeTreeMaintenanceCallbackArgs, mergeTreeClient: Client);
958
877
  }
959
878
 
960
- /**
961
- * Optional flags that configure options for sequence DDSs
962
- * @public
963
- */
964
- export declare interface SequenceOptions {
965
- /**
966
- * Enable the ability to use interval APIs that rely on positions before and
967
- * after individual characters, referred to as "sides". See {@link SequencePlace}
968
- * for additional context.
969
- *
970
- * This flag must be enabled to pass instances of {@link SequencePlace} to
971
- * any IIntervalCollection API.
972
- *
973
- * Also see the feature flag `mergeTreeReferencesCanSlideToEndpoint` to allow
974
- * endpoints to slide to the special endpoint segments.
975
- *
976
- * The default value is false.
977
- */
978
- intervalStickinessEnabled: boolean;
979
- /**
980
- * Enable the ability for interval endpoints to slide to the special endpoint
981
- * segments that exist before and after the bounds of the string. This is
982
- * primarily useful for workflows involving interval stickiness, and it is
983
- * suggested to enable both this flag and `intervalStickinessEnabled` at the
984
- * same time.
985
- *
986
- * The default value is false.
987
- */
988
- mergeTreeReferencesCanSlideToEndpoint: boolean;
989
- [key: string]: boolean;
990
- }
879
+ /* Excluded from this release type: SequenceOptions */
991
880
 
992
881
  /**
993
882
  * Defines a position and side relative to a character in a sequence.
@@ -1012,81 +901,37 @@ export declare interface SequenceOptions {
1012
901
  * If a SequencePlace is the endpoint of a range (e.g. start/end of an interval or search range),
1013
902
  * the Side value means it is exclusive if it is nearer to the other position and inclusive if it is farther.
1014
903
  * E.g. the start of a range with Side.After is exclusive of the character at the position.
1015
- * @public
904
+ * @alpha
1016
905
  */
1017
906
  export declare type SequencePlace = number | "start" | "end" | InteriorSequencePlace;
1018
907
 
1019
908
  /* Excluded from this release type: SerializedIntervalDelta */
1020
909
 
1021
- /**
1022
- * @deprecated `SharedIntervalCollection` is not maintained and is planned to be removed.
1023
- * @public
1024
- */
1025
- export declare class SharedIntervalCollection extends SharedObject implements ISharedIntervalCollection<Interval> {
1026
- /**
1027
- * Create a SharedIntervalCollection
1028
- *
1029
- * @param runtime - data store runtime the new shared map belongs to
1030
- * @param id - optional name of the shared map
1031
- * @returns newly create shared map (but not attached yet)
1032
- */
1033
- static create(runtime: IFluidDataStoreRuntime, id?: string): SharedIntervalCollection;
1034
- /**
1035
- * Get a factory for SharedIntervalCollection to register with the data store.
1036
- *
1037
- * @returns a factory that creates and load SharedIntervalCollection
1038
- */
1039
- static getFactory(): IChannelFactory;
1040
- readonly [Symbol.toStringTag]: string;
1041
- private readonly intervalCollections;
1042
- /**
1043
- * Constructs a new shared SharedIntervalCollection. If the object is non-local an id and service interfaces will
1044
- * be provided
1045
- */
1046
- constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
1047
- getIntervalCollection(label: string): IIntervalCollection<Interval>;
1048
- protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
1049
- protected reSubmitCore(content: any, localOpMetadata: unknown): void;
1050
- protected onDisconnect(): void;
1051
- /**
1052
- * {@inheritDoc @fluidframework/shared-object-base#SharedObject.loadCore}
1053
- */
1054
- protected loadCore(storage: IChannelStorageService): Promise<void>;
1055
- protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
1056
- /**
1057
- * Creates the full path of the intervalCollection label
1058
- * @param label - the incoming label
1059
- */
1060
- protected getIntervalCollectionPath(label: string): string;
1061
- protected applyStashedOp(): void;
1062
- }
910
+ /* Excluded from this release type: SharedIntervalCollection */
1063
911
 
1064
- /**
1065
- * The factory that defines the SharedIntervalCollection.
1066
- * @deprecated `SharedIntervalCollection` is not maintained and is planned to be removed.
1067
- * @public
1068
- */
1069
- export declare class SharedIntervalCollectionFactory implements IChannelFactory {
1070
- static readonly Type = "https://graph.microsoft.com/types/sharedIntervalCollection";
1071
- static readonly Attributes: IChannelAttributes;
1072
- get type(): string;
1073
- get attributes(): IChannelAttributes;
1074
- /**
1075
- * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.load}
1076
- */
1077
- load(runtime: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<SharedIntervalCollection>;
1078
- create(runtime: IFluidDataStoreRuntime, id: string): SharedIntervalCollection;
1079
- }
912
+ /* Excluded from this release type: SharedIntervalCollectionFactory */
1080
913
 
1081
914
  /**
1082
- * @public
915
+ * @alpha
1083
916
  */
1084
917
  export declare abstract class SharedSegmentSequence<T extends ISegment> extends SharedObject<ISharedSegmentSequenceEvents> implements ISharedIntervalCollection<SequenceInterval>, MergeTreeRevertibleDriver {
1085
918
  private readonly dataStoreRuntime;
1086
919
  id: string;
1087
920
  readonly segmentFromSpec: (spec: IJSONSegment) => ISegment;
1088
921
  get loaded(): Promise<void>;
1089
- /* Excluded from this release type: guardReentrancy */
922
+ /**
923
+ * This is a safeguard to avoid problematic reentrancy of local ops. This type of scenario occurs if the user of SharedString subscribes
924
+ * to the `sequenceDelta` event and uses the callback for a local op to submit further local ops.
925
+ * Historically (before 2.0.0-internal.6.1.0), doing so would result in eventual consistency issues or a corrupted document.
926
+ * These issues were fixed in #16815 which makes such reentrancy no different from applying the ops in order but not from within the change events,
927
+ * but there is still little test coverage for reentrant scenarios.
928
+ * Additionally, applications submitting ops from inside change events need to take extreme care that their data models also support reentrancy.
929
+ * Since this is likely not the case, by default SharedString throws when encountering reentrant ops.
930
+ *
931
+ * An application using SharedString which explicitly wants to opt in to allowing reentrancy anyway can set `sharedStringPreventReentrancy`
932
+ * on the data store options to `false`.
933
+ */
934
+ protected guardReentrancy: <TRet>(callback: () => TRet) => TRet;
1090
935
  private static createOpsFromDelta;
1091
936
  protected client: Client;
1092
937
  /** `Deferred` that triggers once the object is loaded */
@@ -1293,36 +1138,7 @@ export declare abstract class SharedSegmentSequence<T extends ISegment> extends
1293
1138
  private initializeIntervalCollections;
1294
1139
  }
1295
1140
 
1296
- /**
1297
- * @deprecated SharedSequence will be removed in a upcoming release. It has been moved to the fluid-experimental/sequence-deprecated package
1298
- * @public
1299
- */
1300
- export declare class SharedSequence<T> extends SharedSegmentSequence<SubSequence<T>> {
1301
- id: string;
1302
- constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes, specToSegment: (spec: IJSONSegment) => ISegment);
1303
- /**
1304
- * @param pos - The position to insert the items at.
1305
- * @param items - The items to insert.
1306
- * @param props - Optional. Properties to set on the inserted items.
1307
- */
1308
- insert(pos: number, items: Serializable<T>[], props?: PropertySet): void;
1309
- /**
1310
- * @param start - The inclusive start of the range to remove
1311
- * @param end - The exclusive end of the range to remove
1312
- */
1313
- remove(start: number, end: number): void;
1314
- /**
1315
- * Returns the total count of items in the sequence
1316
- */
1317
- getItemCount(): number;
1318
- /**
1319
- * Gets the items in the specified range
1320
- *
1321
- * @param start - The inclusive start of the range
1322
- * @param end - The exclusive end of the range
1323
- */
1324
- getItems(start: number, end?: number): Serializable<T>[];
1325
- }
1141
+ /* Excluded from this release type: SharedSequence */
1326
1142
 
1327
1143
  /**
1328
1144
  * The Shared String is a specialized data structure for handling collaborative
@@ -1332,8 +1148,7 @@ export declare class SharedSequence<T> extends SharedSegmentSequence<SubSequence
1332
1148
  * In addition to text, a Shared String can also contain markers. Markers can be
1333
1149
  * used to store metadata at positions within the text, like the details of an
1334
1150
  * image or Fluid object that should be rendered with the text.
1335
- *
1336
- * @public
1151
+ * @alpha
1337
1152
  */
1338
1153
  export declare class SharedString extends SharedSegmentSequence<SharedStringSegment> implements ISharedString {
1339
1154
  id: string;
@@ -1394,6 +1209,10 @@ export declare class SharedString extends SharedSegmentSequence<SharedStringSegm
1394
1209
  * @param marker - The marker to annotate
1395
1210
  * @param props - The properties to annotate the marker with
1396
1211
  * @param consensusCallback - The callback called when consensus is reached
1212
+ *
1213
+ * @deprecated We no longer intend to support this functionality and it will
1214
+ * be removed in a future release. There is no replacement for this
1215
+ * functionality.
1397
1216
  */
1398
1217
  annotateMarkerNotifyConsensus(marker: Marker, props: PropertySet, callback: (m: Marker) => void): void;
1399
1218
  /**
@@ -1449,7 +1268,7 @@ export declare class SharedString extends SharedSegmentSequence<SharedStringSegm
1449
1268
  }
1450
1269
 
1451
1270
  /**
1452
- * @public
1271
+ * @alpha
1453
1272
  */
1454
1273
  export declare class SharedStringFactory implements IChannelFactory {
1455
1274
  static Type: string;
@@ -1467,7 +1286,7 @@ export declare class SharedStringFactory implements IChannelFactory {
1467
1286
  /* Excluded from this release type: SharedStringRevertible */
1468
1287
 
1469
1288
  /**
1470
- * @public
1289
+ * @alpha
1471
1290
  */
1472
1291
  export declare type SharedStringSegment = TextSegment | Marker;
1473
1292
 
@@ -1475,33 +1294,13 @@ export declare type SharedStringSegment = TextSegment | Marker;
1475
1294
  * Defines a side relative to a character in a sequence.
1476
1295
  *
1477
1296
  * @remarks See {@link SequencePlace} for additional context on usage.
1478
- * @public
1297
+ * @alpha
1479
1298
  */
1480
1299
  export declare enum Side {
1481
1300
  Before = 0,
1482
1301
  After = 1
1483
1302
  }
1484
1303
 
1485
- /**
1486
- * @deprecated SubSequence will be removed in a upcoming release. It has been moved to the fluid-experimental/sequence-deprecated package
1487
- * @public
1488
- */
1489
- export declare class SubSequence<T> extends BaseSegment {
1490
- items: Serializable<T>[];
1491
- static readonly typeString: string;
1492
- static is(segment: ISegment): segment is SubSequence<any>;
1493
- static fromJSONObject<U>(spec: Serializable): SubSequence<U> | undefined;
1494
- readonly type: string;
1495
- constructor(items: Serializable<T>[]);
1496
- toJSONObject(): IJSONRunSegment<T>;
1497
- clone(start?: number, end?: number): SubSequence<T>;
1498
- canAppend(segment: ISegment): boolean;
1499
- toString(): string;
1500
- append(segment: ISegment): void;
1501
- removeRange(start: number, end: number): boolean;
1502
- protected createSplitSegmentAt(pos: number): SubSequence<T> | undefined;
1503
- }
1504
-
1505
- /* Excluded from this release type: TypedEventEmitter */
1304
+ /* Excluded from this release type: SubSequence */
1506
1305
 
1507
1306
  export { }