@fluidframework/sequence 2.0.0-rc.1.0.3 → 2.0.0-rc.2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (379) hide show
  1. package/{.eslintrc.js → .eslintrc.cjs} +4 -1
  2. package/{.mocharc.js → .mocharc.cjs} +1 -1
  3. package/CHANGELOG.md +8 -0
  4. package/README.md +2 -2
  5. package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
  6. package/api-extractor.json +1 -1
  7. package/api-report/sequence.api.md +15 -27
  8. package/dist/defaultMap.d.ts +10 -16
  9. package/dist/defaultMap.d.ts.map +1 -1
  10. package/dist/defaultMap.js +73 -70
  11. package/dist/defaultMap.js.map +1 -1
  12. package/dist/defaultMapInterfaces.d.ts +1 -8
  13. package/dist/defaultMapInterfaces.d.ts.map +1 -1
  14. package/dist/defaultMapInterfaces.js.map +1 -1
  15. package/dist/index.d.ts +11 -11
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +42 -42
  18. package/dist/index.js.map +1 -1
  19. package/dist/intervalCollection.d.ts +21 -15
  20. package/dist/intervalCollection.d.ts.map +1 -1
  21. package/dist/intervalCollection.js +59 -110
  22. package/dist/intervalCollection.js.map +1 -1
  23. package/dist/intervalIndex/endpointInRangeIndex.d.ts +3 -3
  24. package/dist/intervalIndex/endpointInRangeIndex.d.ts.map +1 -1
  25. package/dist/intervalIndex/endpointInRangeIndex.js +8 -8
  26. package/dist/intervalIndex/endpointInRangeIndex.js.map +1 -1
  27. package/dist/intervalIndex/endpointIndex.d.ts +3 -3
  28. package/dist/intervalIndex/endpointIndex.d.ts.map +1 -1
  29. package/dist/intervalIndex/endpointIndex.js +4 -4
  30. package/dist/intervalIndex/endpointIndex.js.map +1 -1
  31. package/dist/intervalIndex/idIntervalIndex.d.ts +2 -2
  32. package/dist/intervalIndex/idIntervalIndex.d.ts.map +1 -1
  33. package/dist/intervalIndex/idIntervalIndex.js +2 -2
  34. package/dist/intervalIndex/idIntervalIndex.js.map +1 -1
  35. package/dist/intervalIndex/index.d.ts +8 -8
  36. package/dist/intervalIndex/index.d.ts.map +1 -1
  37. package/dist/intervalIndex/index.js +16 -16
  38. package/dist/intervalIndex/index.js.map +1 -1
  39. package/dist/intervalIndex/intervalIndex.d.ts +1 -1
  40. package/dist/intervalIndex/intervalIndex.d.ts.map +1 -1
  41. package/dist/intervalIndex/intervalIndex.js.map +1 -1
  42. package/dist/intervalIndex/overlappingIntervalsIndex.d.ts +7 -10
  43. package/dist/intervalIndex/overlappingIntervalsIndex.d.ts.map +1 -1
  44. package/dist/intervalIndex/overlappingIntervalsIndex.js +12 -13
  45. package/dist/intervalIndex/overlappingIntervalsIndex.js.map +1 -1
  46. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.d.ts +2 -2
  47. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.d.ts.map +1 -1
  48. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.js +7 -7
  49. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.js.map +1 -1
  50. package/dist/intervalIndex/sequenceIntervalIndexes.d.ts +2 -2
  51. package/dist/intervalIndex/sequenceIntervalIndexes.d.ts.map +1 -1
  52. package/dist/intervalIndex/sequenceIntervalIndexes.js.map +1 -1
  53. package/dist/intervalIndex/startpointInRangeIndex.d.ts +3 -3
  54. package/dist/intervalIndex/startpointInRangeIndex.d.ts.map +1 -1
  55. package/dist/intervalIndex/startpointInRangeIndex.js +8 -8
  56. package/dist/intervalIndex/startpointInRangeIndex.js.map +1 -1
  57. package/dist/intervalTree.d.ts +1 -1
  58. package/dist/intervalTree.d.ts.map +1 -1
  59. package/dist/intervalTree.js.map +1 -1
  60. package/dist/intervals/index.d.ts +3 -3
  61. package/dist/intervals/index.d.ts.map +1 -1
  62. package/dist/intervals/index.js +16 -16
  63. package/dist/intervals/index.js.map +1 -1
  64. package/dist/intervals/interval.d.ts +2 -2
  65. package/dist/intervals/interval.d.ts.map +1 -1
  66. package/dist/intervals/interval.js +2 -2
  67. package/dist/intervals/interval.js.map +1 -1
  68. package/dist/intervals/intervalUtils.d.ts +3 -3
  69. package/dist/intervals/intervalUtils.d.ts.map +1 -1
  70. package/dist/intervals/intervalUtils.js +1 -1
  71. package/dist/intervals/intervalUtils.js.map +1 -1
  72. package/dist/intervals/sequenceInterval.d.ts +2 -2
  73. package/dist/intervals/sequenceInterval.d.ts.map +1 -1
  74. package/dist/intervals/sequenceInterval.js +22 -23
  75. package/dist/intervals/sequenceInterval.js.map +1 -1
  76. package/dist/localValues.d.ts +2 -2
  77. package/dist/localValues.d.ts.map +1 -1
  78. package/dist/localValues.js.map +1 -1
  79. package/dist/package.json +3 -0
  80. package/dist/packageVersion.d.ts +1 -1
  81. package/dist/packageVersion.js +1 -1
  82. package/dist/packageVersion.js.map +1 -1
  83. package/dist/revertibles.d.ts +12 -12
  84. package/dist/revertibles.d.ts.map +1 -1
  85. package/dist/revertibles.js +26 -26
  86. package/dist/revertibles.js.map +1 -1
  87. package/dist/sequence-alpha.d.ts +172 -13
  88. package/dist/sequence-beta.d.ts +2 -0
  89. package/dist/sequence-public.d.ts +2 -0
  90. package/dist/sequence-untrimmed.d.ts +73 -14
  91. package/dist/sequence.d.ts +48 -5
  92. package/dist/sequence.d.ts.map +1 -1
  93. package/dist/sequence.js +103 -29
  94. package/dist/sequence.js.map +1 -1
  95. package/dist/sequenceFactory.d.ts +4 -1
  96. package/dist/sequenceFactory.d.ts.map +1 -1
  97. package/dist/sequenceFactory.js +8 -5
  98. package/dist/sequenceFactory.js.map +1 -1
  99. package/dist/sharedIntervalCollection.d.ts +2 -2
  100. package/dist/sharedIntervalCollection.d.ts.map +1 -1
  101. package/dist/sharedIntervalCollection.js +5 -5
  102. package/dist/sharedIntervalCollection.js.map +1 -1
  103. package/dist/sharedSequence.d.ts +1 -1
  104. package/dist/sharedSequence.d.ts.map +1 -1
  105. package/dist/sharedSequence.js +2 -2
  106. package/dist/sharedSequence.js.map +1 -1
  107. package/dist/sharedString.d.ts +2 -2
  108. package/dist/sharedString.d.ts.map +1 -1
  109. package/dist/sharedString.js +6 -6
  110. package/dist/sharedString.js.map +1 -1
  111. package/dist/tsdoc-metadata.json +1 -1
  112. package/lib/{defaultMap.d.mts → defaultMap.d.ts} +11 -17
  113. package/lib/defaultMap.d.ts.map +1 -0
  114. package/lib/{defaultMap.mjs → defaultMap.js} +72 -69
  115. package/lib/defaultMap.js.map +1 -0
  116. package/lib/{defaultMapInterfaces.d.mts → defaultMapInterfaces.d.ts} +2 -9
  117. package/lib/defaultMapInterfaces.d.ts.map +1 -0
  118. package/lib/{defaultMapInterfaces.mjs → defaultMapInterfaces.js} +1 -1
  119. package/lib/defaultMapInterfaces.js.map +1 -0
  120. package/lib/{index.d.mts → index.d.ts} +24 -12
  121. package/lib/index.d.ts.map +1 -0
  122. package/lib/{index.mjs → index.js} +11 -11
  123. package/lib/index.js.map +1 -0
  124. package/lib/{intervalCollection.d.mts → intervalCollection.d.ts} +22 -16
  125. package/lib/intervalCollection.d.ts.map +1 -0
  126. package/lib/{intervalCollection.mjs → intervalCollection.js} +23 -74
  127. package/lib/intervalCollection.js.map +1 -0
  128. package/lib/intervalIndex/{endpointInRangeIndex.d.mts → endpointInRangeIndex.d.ts} +4 -4
  129. package/lib/intervalIndex/endpointInRangeIndex.d.ts.map +1 -0
  130. package/lib/intervalIndex/{endpointInRangeIndex.mjs → endpointInRangeIndex.js} +3 -3
  131. package/lib/intervalIndex/endpointInRangeIndex.js.map +1 -0
  132. package/lib/intervalIndex/{endpointIndex.d.mts → endpointIndex.d.ts} +4 -4
  133. package/lib/intervalIndex/endpointIndex.d.ts.map +1 -0
  134. package/lib/intervalIndex/{endpointIndex.mjs → endpointIndex.js} +2 -2
  135. package/lib/intervalIndex/endpointIndex.js.map +1 -0
  136. package/lib/intervalIndex/{idIntervalIndex.d.mts → idIntervalIndex.d.ts} +3 -3
  137. package/lib/intervalIndex/idIntervalIndex.d.ts.map +1 -0
  138. package/lib/intervalIndex/{idIntervalIndex.mjs → idIntervalIndex.js} +2 -2
  139. package/lib/intervalIndex/idIntervalIndex.js.map +1 -0
  140. package/lib/intervalIndex/{index.d.mts → index.d.ts} +9 -9
  141. package/lib/intervalIndex/index.d.ts.map +1 -0
  142. package/lib/intervalIndex/{index.mjs → index.js} +7 -7
  143. package/lib/intervalIndex/index.js.map +1 -0
  144. package/lib/intervalIndex/{intervalIndex.d.mts → intervalIndex.d.ts} +2 -2
  145. package/lib/intervalIndex/intervalIndex.d.ts.map +1 -0
  146. package/lib/intervalIndex/{intervalIndex.mjs → intervalIndex.js} +1 -1
  147. package/lib/intervalIndex/intervalIndex.js.map +1 -0
  148. package/lib/intervalIndex/{intervalIndexUtils.d.mts → intervalIndexUtils.d.ts} +1 -1
  149. package/lib/intervalIndex/intervalIndexUtils.d.ts.map +1 -0
  150. package/lib/intervalIndex/{intervalIndexUtils.mjs → intervalIndexUtils.js} +1 -1
  151. package/lib/intervalIndex/intervalIndexUtils.js.map +1 -0
  152. package/lib/intervalIndex/{overlappingIntervalsIndex.d.mts → overlappingIntervalsIndex.d.ts} +8 -11
  153. package/lib/intervalIndex/overlappingIntervalsIndex.d.ts.map +1 -0
  154. package/lib/intervalIndex/{overlappingIntervalsIndex.mjs → overlappingIntervalsIndex.js} +8 -9
  155. package/lib/intervalIndex/overlappingIntervalsIndex.js.map +1 -0
  156. package/lib/intervalIndex/{overlappingSequenceIntervalsIndex.d.mts → overlappingSequenceIntervalsIndex.d.ts} +3 -3
  157. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.d.ts.map +1 -0
  158. package/lib/intervalIndex/{overlappingSequenceIntervalsIndex.mjs → overlappingSequenceIntervalsIndex.js} +3 -3
  159. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.js.map +1 -0
  160. package/lib/intervalIndex/{sequenceIntervalIndexes.d.mts → sequenceIntervalIndexes.d.ts} +3 -3
  161. package/lib/intervalIndex/sequenceIntervalIndexes.d.ts.map +1 -0
  162. package/lib/intervalIndex/{sequenceIntervalIndexes.mjs → sequenceIntervalIndexes.js} +1 -1
  163. package/lib/intervalIndex/sequenceIntervalIndexes.js.map +1 -0
  164. package/lib/intervalIndex/{startpointInRangeIndex.d.mts → startpointInRangeIndex.d.ts} +4 -4
  165. package/lib/intervalIndex/startpointInRangeIndex.d.ts.map +1 -0
  166. package/lib/intervalIndex/{startpointInRangeIndex.mjs → startpointInRangeIndex.js} +3 -3
  167. package/lib/intervalIndex/startpointInRangeIndex.js.map +1 -0
  168. package/lib/{intervalTree.d.mts → intervalTree.d.ts} +2 -2
  169. package/lib/intervalTree.d.ts.map +1 -0
  170. package/lib/{intervalTree.mjs → intervalTree.js} +1 -1
  171. package/lib/intervalTree.js.map +1 -0
  172. package/lib/intervals/{index.d.mts → index.d.ts} +4 -4
  173. package/lib/intervals/index.d.ts.map +1 -0
  174. package/lib/intervals/{index.mjs → index.js} +4 -4
  175. package/lib/intervals/index.js.map +1 -0
  176. package/lib/intervals/{interval.d.mts → interval.d.ts} +3 -3
  177. package/lib/intervals/{interval.d.mts.map → interval.d.ts.map} +1 -1
  178. package/lib/intervals/{interval.mjs → interval.js} +2 -2
  179. package/lib/intervals/interval.js.map +1 -0
  180. package/lib/intervals/{intervalUtils.d.mts → intervalUtils.d.ts} +4 -4
  181. package/lib/intervals/intervalUtils.d.ts.map +1 -0
  182. package/lib/intervals/{intervalUtils.mjs → intervalUtils.js} +3 -2
  183. package/lib/intervals/intervalUtils.js.map +1 -0
  184. package/lib/intervals/{sequenceInterval.d.mts → sequenceInterval.d.ts} +3 -3
  185. package/lib/intervals/sequenceInterval.d.ts.map +1 -0
  186. package/lib/intervals/{sequenceInterval.mjs → sequenceInterval.js} +5 -4
  187. package/lib/intervals/{sequenceInterval.mjs.map → sequenceInterval.js.map} +1 -1
  188. package/lib/{localValues.d.mts → localValues.d.ts} +3 -3
  189. package/lib/{localValues.d.mts.map → localValues.d.ts.map} +1 -1
  190. package/lib/{localValues.mjs → localValues.js} +1 -1
  191. package/lib/localValues.js.map +1 -0
  192. package/lib/{packageVersion.d.mts → packageVersion.d.ts} +2 -2
  193. package/lib/packageVersion.d.ts.map +1 -0
  194. package/lib/{packageVersion.mjs → packageVersion.js} +2 -2
  195. package/lib/packageVersion.js.map +1 -0
  196. package/lib/{revertibles.d.mts → revertibles.d.ts} +13 -13
  197. package/lib/revertibles.d.ts.map +1 -0
  198. package/lib/{revertibles.mjs → revertibles.js} +11 -10
  199. package/lib/revertibles.js.map +1 -0
  200. package/lib/{sequence-alpha.d.mts → sequence-alpha.d.ts} +185 -13
  201. package/lib/{sequence-public.d.mts → sequence-beta.d.ts} +15 -0
  202. package/lib/{sequence-beta.d.mts → sequence-public.d.ts} +15 -0
  203. package/lib/{sequence-untrimmed.d.mts → sequence-untrimmed.d.ts} +86 -14
  204. package/lib/{sequence.d.mts → sequence.d.ts} +49 -6
  205. package/lib/sequence.d.ts.map +1 -0
  206. package/lib/{sequence.mjs → sequence.js} +100 -29
  207. package/lib/sequence.js.map +1 -0
  208. package/lib/{sequenceDeltaEvent.d.mts → sequenceDeltaEvent.d.ts} +1 -1
  209. package/lib/sequenceDeltaEvent.d.ts.map +1 -0
  210. package/lib/{sequenceDeltaEvent.mjs → sequenceDeltaEvent.js} +1 -1
  211. package/lib/sequenceDeltaEvent.js.map +1 -0
  212. package/lib/{sequenceFactory.d.mts → sequenceFactory.d.ts} +5 -2
  213. package/lib/sequenceFactory.d.ts.map +1 -0
  214. package/lib/{sequenceFactory.mjs → sequenceFactory.js} +6 -3
  215. package/lib/sequenceFactory.js.map +1 -0
  216. package/lib/{sharedIntervalCollection.d.mts → sharedIntervalCollection.d.ts} +3 -3
  217. package/lib/sharedIntervalCollection.d.ts.map +1 -0
  218. package/lib/{sharedIntervalCollection.mjs → sharedIntervalCollection.js} +4 -4
  219. package/lib/sharedIntervalCollection.js.map +1 -0
  220. package/lib/{sharedSequence.d.mts → sharedSequence.d.ts} +2 -2
  221. package/lib/sharedSequence.d.ts.map +1 -0
  222. package/lib/{sharedSequence.mjs → sharedSequence.js} +2 -2
  223. package/lib/sharedSequence.js.map +1 -0
  224. package/lib/{sharedString.d.mts → sharedString.d.ts} +3 -3
  225. package/lib/sharedString.d.ts.map +1 -0
  226. package/lib/{sharedString.mjs → sharedString.js} +3 -3
  227. package/lib/sharedString.js.map +1 -0
  228. package/lib/test/collections.intervalTree.js +73 -0
  229. package/lib/test/collections.intervalTree.js.map +1 -0
  230. package/lib/test/createSnapshotFiles.js +15 -0
  231. package/lib/test/createSnapshotFiles.js.map +1 -0
  232. package/lib/test/dirname.cjs +16 -0
  233. package/lib/test/dirname.cjs.map +1 -0
  234. package/lib/test/endpointInRangeIndex.spec.js +182 -0
  235. package/lib/test/endpointInRangeIndex.spec.js.map +1 -0
  236. package/lib/test/fuzz/fuzzUtils.js +250 -0
  237. package/lib/test/fuzz/fuzzUtils.js.map +1 -0
  238. package/lib/test/fuzz/intervalCollection.fuzz.spec.js +200 -0
  239. package/lib/test/fuzz/intervalCollection.fuzz.spec.js.map +1 -0
  240. package/lib/test/fuzz/intervalRevertibles.fuzz.spec.js +129 -0
  241. package/lib/test/fuzz/intervalRevertibles.fuzz.spec.js.map +1 -0
  242. package/lib/test/fuzz/sharedString.fuzz.spec.js +91 -0
  243. package/lib/test/fuzz/sharedString.fuzz.spec.js.map +1 -0
  244. package/lib/test/generateSharedStrings.js +138 -0
  245. package/lib/test/generateSharedStrings.js.map +1 -0
  246. package/lib/test/intervalCollection.detached.spec.js +126 -0
  247. package/lib/test/intervalCollection.detached.spec.js.map +1 -0
  248. package/lib/test/intervalCollection.events.spec.js +491 -0
  249. package/lib/test/intervalCollection.events.spec.js.map +1 -0
  250. package/lib/test/intervalCollection.perf.spec.js +88 -0
  251. package/lib/test/intervalCollection.perf.spec.js.map +1 -0
  252. package/lib/test/intervalCollection.snapshot.spec.js +171 -0
  253. package/lib/test/intervalCollection.snapshot.spec.js.map +1 -0
  254. package/lib/test/intervalCollection.spec.js +1660 -0
  255. package/lib/test/intervalCollection.spec.js.map +1 -0
  256. package/lib/test/intervalIndexTestUtils.js +49 -0
  257. package/lib/test/intervalIndexTestUtils.js.map +1 -0
  258. package/lib/test/intervalRebasing.spec.js +589 -0
  259. package/lib/test/intervalRebasing.spec.js.map +1 -0
  260. package/lib/test/intervalStashedOps.spec.js +142 -0
  261. package/lib/test/intervalStashedOps.spec.js.map +1 -0
  262. package/lib/test/intervalTestUtils.js +81 -0
  263. package/lib/test/intervalTestUtils.js.map +1 -0
  264. package/lib/test/marshalling.spec.js +55 -0
  265. package/lib/test/marshalling.spec.js.map +1 -0
  266. package/lib/test/memory/sharedSequence.spec.js +82 -0
  267. package/lib/test/memory/sharedSequence.spec.js.map +1 -0
  268. package/lib/test/memory/sharedString.spec.js +134 -0
  269. package/lib/test/memory/sharedString.spec.js.map +1 -0
  270. package/lib/test/overlappingSequenceIntervalsIndex.spec.js +348 -0
  271. package/lib/test/overlappingSequenceIntervalsIndex.spec.js.map +1 -0
  272. package/lib/test/partialLoad.spec.js +211 -0
  273. package/lib/test/partialLoad.spec.js.map +1 -0
  274. package/lib/test/rebasing.spec.js +81 -0
  275. package/lib/test/rebasing.spec.js.map +1 -0
  276. package/lib/test/reentrancy.spec.js +174 -0
  277. package/lib/test/reentrancy.spec.js.map +1 -0
  278. package/lib/test/revertibles.spec.js +971 -0
  279. package/lib/test/revertibles.spec.js.map +1 -0
  280. package/lib/test/sequenceDeltaEvent.spec.js +2144 -0
  281. package/lib/test/sequenceDeltaEvent.spec.js.map +1 -0
  282. package/lib/test/sharedIntervalCollection.spec.js +159 -0
  283. package/lib/test/sharedIntervalCollection.spec.js.map +1 -0
  284. package/lib/test/sharedString.spec.js +532 -0
  285. package/lib/test/sharedString.spec.js.map +1 -0
  286. package/lib/test/snapshotEmptyProps.spec.js +45 -0
  287. package/lib/test/snapshotEmptyProps.spec.js.map +1 -0
  288. package/lib/test/snapshotVersion.spec.js +149 -0
  289. package/lib/test/snapshotVersion.spec.js.map +1 -0
  290. package/lib/test/startpointInRangeIndex.spec.js +182 -0
  291. package/lib/test/startpointInRangeIndex.spec.js.map +1 -0
  292. package/lib/test/subSequence.spec.js +92 -0
  293. package/lib/test/subSequence.spec.js.map +1 -0
  294. package/lib/test/types/validateSequencePrevious.generated.js +162 -0
  295. package/lib/test/types/validateSequencePrevious.generated.js.map +1 -0
  296. package/lib/test/v1IntervalCollectionHelpers.js +93 -0
  297. package/lib/test/v1IntervalCollectionHelpers.js.map +1 -0
  298. package/package.json +66 -60
  299. package/src/defaultMap.ts +97 -123
  300. package/src/defaultMapInterfaces.ts +1 -9
  301. package/src/index.ts +15 -11
  302. package/src/intervalCollection.ts +57 -84
  303. package/src/intervalIndex/endpointInRangeIndex.ts +4 -4
  304. package/src/intervalIndex/endpointIndex.ts +3 -3
  305. package/src/intervalIndex/idIntervalIndex.ts +3 -4
  306. package/src/intervalIndex/index.ts +8 -8
  307. package/src/intervalIndex/intervalIndex.ts +1 -1
  308. package/src/intervalIndex/overlappingIntervalsIndex.ts +10 -11
  309. package/src/intervalIndex/overlappingSequenceIntervalsIndex.ts +4 -4
  310. package/src/intervalIndex/sequenceIntervalIndexes.ts +2 -2
  311. package/src/intervalIndex/startpointInRangeIndex.ts +4 -4
  312. package/src/intervalTree.ts +1 -1
  313. package/src/intervals/index.ts +3 -3
  314. package/src/intervals/interval.ts +2 -4
  315. package/src/intervals/intervalUtils.ts +3 -3
  316. package/src/intervals/sequenceInterval.ts +3 -4
  317. package/src/localValues.ts +2 -2
  318. package/src/packageVersion.ts +1 -1
  319. package/src/revertibles.ts +13 -13
  320. package/src/sequence.ts +126 -44
  321. package/src/sequenceFactory.ts +5 -2
  322. package/src/sharedIntervalCollection.ts +5 -5
  323. package/src/sharedSequence.ts +1 -1
  324. package/src/sharedString.ts +2 -2
  325. package/tsconfig.cjs.json +7 -0
  326. package/tsconfig.json +2 -5
  327. package/lib/defaultMap.d.mts.map +0 -1
  328. package/lib/defaultMap.mjs.map +0 -1
  329. package/lib/defaultMapInterfaces.d.mts.map +0 -1
  330. package/lib/defaultMapInterfaces.mjs.map +0 -1
  331. package/lib/index.d.mts.map +0 -1
  332. package/lib/index.mjs.map +0 -1
  333. package/lib/intervalCollection.d.mts.map +0 -1
  334. package/lib/intervalCollection.mjs.map +0 -1
  335. package/lib/intervalIndex/endpointInRangeIndex.d.mts.map +0 -1
  336. package/lib/intervalIndex/endpointInRangeIndex.mjs.map +0 -1
  337. package/lib/intervalIndex/endpointIndex.d.mts.map +0 -1
  338. package/lib/intervalIndex/endpointIndex.mjs.map +0 -1
  339. package/lib/intervalIndex/idIntervalIndex.d.mts.map +0 -1
  340. package/lib/intervalIndex/idIntervalIndex.mjs.map +0 -1
  341. package/lib/intervalIndex/index.d.mts.map +0 -1
  342. package/lib/intervalIndex/index.mjs.map +0 -1
  343. package/lib/intervalIndex/intervalIndex.d.mts.map +0 -1
  344. package/lib/intervalIndex/intervalIndex.mjs.map +0 -1
  345. package/lib/intervalIndex/intervalIndexUtils.d.mts.map +0 -1
  346. package/lib/intervalIndex/intervalIndexUtils.mjs.map +0 -1
  347. package/lib/intervalIndex/overlappingIntervalsIndex.d.mts.map +0 -1
  348. package/lib/intervalIndex/overlappingIntervalsIndex.mjs.map +0 -1
  349. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.d.mts.map +0 -1
  350. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.mjs.map +0 -1
  351. package/lib/intervalIndex/sequenceIntervalIndexes.d.mts.map +0 -1
  352. package/lib/intervalIndex/sequenceIntervalIndexes.mjs.map +0 -1
  353. package/lib/intervalIndex/startpointInRangeIndex.d.mts.map +0 -1
  354. package/lib/intervalIndex/startpointInRangeIndex.mjs.map +0 -1
  355. package/lib/intervalTree.d.mts.map +0 -1
  356. package/lib/intervalTree.mjs.map +0 -1
  357. package/lib/intervals/index.d.mts.map +0 -1
  358. package/lib/intervals/index.mjs.map +0 -1
  359. package/lib/intervals/interval.mjs.map +0 -1
  360. package/lib/intervals/intervalUtils.d.mts.map +0 -1
  361. package/lib/intervals/intervalUtils.mjs.map +0 -1
  362. package/lib/intervals/sequenceInterval.d.mts.map +0 -1
  363. package/lib/localValues.mjs.map +0 -1
  364. package/lib/packageVersion.d.mts.map +0 -1
  365. package/lib/packageVersion.mjs.map +0 -1
  366. package/lib/revertibles.d.mts.map +0 -1
  367. package/lib/revertibles.mjs.map +0 -1
  368. package/lib/sequence.d.mts.map +0 -1
  369. package/lib/sequence.mjs.map +0 -1
  370. package/lib/sequenceDeltaEvent.d.mts.map +0 -1
  371. package/lib/sequenceDeltaEvent.mjs.map +0 -1
  372. package/lib/sequenceFactory.d.mts.map +0 -1
  373. package/lib/sequenceFactory.mjs.map +0 -1
  374. package/lib/sharedIntervalCollection.d.mts.map +0 -1
  375. package/lib/sharedIntervalCollection.mjs.map +0 -1
  376. package/lib/sharedSequence.d.mts.map +0 -1
  377. package/lib/sharedSequence.mjs.map +0 -1
  378. package/lib/sharedString.d.mts.map +0 -1
  379. package/lib/sharedString.mjs.map +0 -1
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/sequence";
9
- export const pkgVersion = "2.0.0-rc.1.0.3";
9
+ export const pkgVersion = "2.0.0-rc.2.0.0";
@@ -23,14 +23,14 @@ import {
23
23
  getSlideToSegoff,
24
24
  SlidingPreference,
25
25
  } from "@fluidframework/merge-tree";
26
- import { InteriorSequencePlace, Side } from "./intervalCollection";
27
- import { IntervalOpType, SequenceInterval } from "./intervals";
28
- import { SharedString, SharedStringSegment } from "./sharedString";
29
- import { ISequenceDeltaRange, SequenceDeltaEvent } from "./sequenceDeltaEvent";
26
+ import { InteriorSequencePlace, Side } from "./intervalCollection.js";
27
+ import { IntervalOpType, SequenceInterval } from "./intervals/index.js";
28
+ import { SharedString, SharedStringSegment } from "./sharedString.js";
29
+ import { ISequenceDeltaRange, SequenceDeltaEvent } from "./sequenceDeltaEvent.js";
30
30
 
31
31
  /**
32
32
  * Data for undoing edits on SharedStrings and Intervals.
33
- * @internal
33
+ * @alpha
34
34
  */
35
35
  export type SharedStringRevertible = MergeTreeDeltaRevertible | IntervalRevertible;
36
36
 
@@ -38,7 +38,7 @@ const idMap = new Map<string, string>();
38
38
 
39
39
  /**
40
40
  * Data for undoing edits affecting Intervals.
41
- * @internal
41
+ * @alpha
42
42
  */
43
43
  export type IntervalRevertible =
44
44
  | {
@@ -92,7 +92,7 @@ function getUpdatedId(intervalId: string): string {
92
92
 
93
93
  /**
94
94
  * Create revertibles for adding an interval
95
- * @internal
95
+ * @alpha
96
96
  */
97
97
  export function appendAddIntervalToRevertibles(
98
98
  interval: SequenceInterval,
@@ -108,7 +108,7 @@ export function appendAddIntervalToRevertibles(
108
108
 
109
109
  /**
110
110
  * Create revertibles for deleting an interval
111
- * @internal
111
+ * @alpha
112
112
  */
113
113
  export function appendDeleteIntervalToRevertibles(
114
114
  string: SharedString,
@@ -160,7 +160,7 @@ export function appendDeleteIntervalToRevertibles(
160
160
 
161
161
  /**
162
162
  * Create revertibles for moving endpoints of an interval
163
- * @internal
163
+ * @alpha
164
164
  */
165
165
  export function appendChangeIntervalToRevertibles(
166
166
  string: SharedString,
@@ -210,7 +210,7 @@ export function appendChangeIntervalToRevertibles(
210
210
 
211
211
  /**
212
212
  * Create revertibles for changing properties of an interval
213
- * @internal
213
+ * @alpha
214
214
  */
215
215
  export function appendIntervalPropertyChangedToRevertibles(
216
216
  interval: SequenceInterval,
@@ -270,7 +270,7 @@ function addIfRevertibleRef(
270
270
  /**
271
271
  * Create revertibles for SharedStringDeltas, handling indirectly modified intervals
272
272
  * (e.g. reverting remove of a range that contains an interval will move the interval back)
273
- * @internal
273
+ * @alpha
274
274
  */
275
275
  export function appendSharedStringDeltaToRevertibles(
276
276
  string: SharedString,
@@ -363,7 +363,7 @@ export function appendSharedStringDeltaToRevertibles(
363
363
 
364
364
  /**
365
365
  * Clean up resources held by revertibles that are no longer needed.
366
- * @internal
366
+ * @alpha
367
367
  */
368
368
  export function discardSharedStringRevertibles(
369
369
  sharedString: SharedString,
@@ -654,7 +654,7 @@ function revertLocalSequenceRemove(
654
654
 
655
655
  /**
656
656
  * Invoke revertibles to reverse prior edits
657
- * @internal
657
+ * @alpha
658
658
  */
659
659
  export function revertSharedStringRevertibles(
660
660
  sharedString: SharedString,
package/src/sequence.ts CHANGED
@@ -3,6 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import Deque from "double-ended-queue";
6
7
  import { assert, Deferred } from "@fluidframework/core-utils";
7
8
  import { bufferToString } from "@fluid-internal/client-utils";
8
9
  import { LoggingError, createChildLogger } from "@fluidframework/telemetry-utils";
@@ -44,23 +45,21 @@ import {
44
45
  import { ObjectStoragePartition, SummaryTreeBuilder } from "@fluidframework/runtime-utils";
45
46
  import {
46
47
  IFluidSerializer,
47
- makeHandlesSerializable,
48
- parseHandles,
49
48
  SharedObject,
50
49
  ISharedObjectEvents,
51
50
  } from "@fluidframework/shared-object-base";
52
51
  import { IEventThisPlaceHolder } from "@fluidframework/core-interfaces";
53
52
  import { ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions";
54
- import { DefaultMap, IMapOperation } from "./defaultMap";
55
- import { IMapMessageLocalMetadata, IValueChanged } from "./defaultMapInterfaces";
56
- import { SequenceInterval } from "./intervals";
53
+ import { DefaultMap, IMapOperation } from "./defaultMap.js";
54
+ import { IMapMessageLocalMetadata, IValueChanged } from "./defaultMapInterfaces.js";
55
+ import { SequenceInterval } from "./intervals/index.js";
57
56
  import {
58
57
  IIntervalCollection,
59
58
  IntervalCollection,
60
59
  SequenceIntervalCollectionValueType,
61
- } from "./intervalCollection";
62
- import { SequenceDeltaEvent, SequenceMaintenanceEvent } from "./sequenceDeltaEvent";
63
- import { ISharedIntervalCollection } from "./sharedIntervalCollection";
60
+ } from "./intervalCollection.js";
61
+ import { SequenceDeltaEvent, SequenceMaintenanceEvent } from "./sequenceDeltaEvent.js";
62
+ import { ISharedIntervalCollection } from "./sharedIntervalCollection.js";
64
63
 
65
64
  const snapshotFileName = "header";
66
65
  const contentPath = "content";
@@ -212,6 +211,40 @@ export abstract class SharedSegmentSequence<T extends ISegment>
212
211
  return ops;
213
212
  }
214
213
 
214
+ /**
215
+ * Note: this field only provides a lower-bound on the reference sequence numbers for in-flight ops.
216
+ * The exact reason isn't understood, but some e2e tests suggest that the runtime may sometimes process
217
+ * incoming leave/join ops before putting an op that this DDS submits over the wire.
218
+ *
219
+ * E.g. SharedString submits an op while deltaManager has lastSequenceNumber = 10, but before the runtime
220
+ * puts this op over the wire, it processes a client join/leave op with sequence number 11, so the referenceSequenceNumber
221
+ * on the SharedString op is 11.
222
+ *
223
+ * The reference sequence numbers placed in this queue are also not accurate for stashed ops due to how the applyStashedOp
224
+ * flow works at the runtime level. This is a legitimate bug, and AB#6602 tracks one way to fix it (stop reaching all the way
225
+ * to deltaManager's lastSequenceNumber to obtain refSeq, instead leveraging some analogous notion on the container or datastore
226
+ * runtime).
227
+ */
228
+ private readonly inFlightRefSeqs = new Deque<number>();
229
+
230
+ private ongoingResubmitRefSeq: number | undefined;
231
+
232
+ /**
233
+ * Gets the reference sequence number (i.e. sequence number of the runtime's last processed op) for an op submitted
234
+ * in the current context.
235
+ *
236
+ * This value can be optionally overridden using `useResubmitRefSeq`.
237
+ * IntervalCollection's resubmit logic currently relies on preserving merge information from when the op was originally submitted,
238
+ * even if the op is resubmitted more than once. Thus during resubmit, `inFlightRefSeqs` gets populated with the
239
+ * original refSeq rather than the refSeq at the time of reconnection.
240
+ *
241
+ * @remarks - In some not fully understood cases, the runtime may process incoming ops before putting an op that this
242
+ * DDS submits over the wire. See `inFlightRefSeqs` for more details.
243
+ */
244
+ private get currentRefSeq() {
245
+ return this.ongoingResubmitRefSeq ?? this.runtime.deltaManager.lastSequenceNumber;
246
+ }
247
+
215
248
  // eslint-disable-next-line import/no-deprecated
216
249
  protected client: Client;
217
250
  /** `Deferred` that triggers once the object is loaded */
@@ -233,6 +266,7 @@ export abstract class SharedSegmentSequence<T extends ISegment>
233
266
  ) {
234
267
  super(id, dataStoreRuntime, attributes, "fluid_sequence_");
235
268
 
269
+ const getMinInFlightRefSeq = () => this.inFlightRefSeqs.get(0);
236
270
  this.guardReentrancy =
237
271
  dataStoreRuntime.options.sharedStringPreventReentrancy ?? true
238
272
  ? ensureNoReentrancy
@@ -258,11 +292,12 @@ export abstract class SharedSegmentSequence<T extends ISegment>
258
292
  namespace: "SharedSegmentSequence.MergeTreeClient",
259
293
  }),
260
294
  dataStoreRuntime.options,
295
+ getMinInFlightRefSeq,
261
296
  );
262
297
 
263
298
  this.client.prependListener("delta", (opArgs, deltaArgs) => {
264
299
  const event = new SequenceDeltaEvent(opArgs, deltaArgs, this.client);
265
- if (opArgs.stashed !== true && event.isLocal) {
300
+ if (event.isLocal) {
266
301
  this.submitSequenceMessage(opArgs.op);
267
302
  }
268
303
  this.emit("sequenceDelta", event, this);
@@ -275,7 +310,14 @@ export abstract class SharedSegmentSequence<T extends ISegment>
275
310
  this.intervalCollections = new DefaultMap(
276
311
  this.serializer,
277
312
  this.handle,
278
- (op, localOpMetadata) => this.submitLocalMessage(op, localOpMetadata),
313
+ (op, localOpMetadata) => {
314
+ if (!this.isAttached()) {
315
+ return;
316
+ }
317
+
318
+ this.inFlightRefSeqs.push(this.currentRefSeq);
319
+ this.submitLocalMessage(op, localOpMetadata);
320
+ },
279
321
  new SequenceIntervalCollectionValueType(),
280
322
  dataStoreRuntime.options,
281
323
  );
@@ -385,6 +427,11 @@ export abstract class SharedSegmentSequence<T extends ISegment>
385
427
 
386
428
  /**
387
429
  * Resolves a `ReferencePosition` into a character position using this client's perspective.
430
+ *
431
+ * Reference positions that point to a character that has been removed will
432
+ * always return the position of the nearest non-removed character, regardless
433
+ * of `ReferenceType`. To handle this case specifically, one may wish
434
+ * to look at the segment returned by `ReferencePosition.getSegment`.
388
435
  */
389
436
  public localReferencePositionToPosition(lref: ReferencePosition): number {
390
437
  return this.client.localReferencePositionToPosition(lref);
@@ -427,7 +474,9 @@ export abstract class SharedSegmentSequence<T extends ISegment>
427
474
  if (!this.isAttached()) {
428
475
  return;
429
476
  }
430
- const translated = makeHandlesSerializable(message, this.serializer, this.handle);
477
+
478
+ this.inFlightRefSeqs.push(this.currentRefSeq);
479
+
431
480
  const metadata = this.client.peekPendingSegmentGroups(
432
481
  message.type === MergeTreeDeltaType.GROUP ? message.ops.length : 1,
433
482
  );
@@ -436,9 +485,9 @@ export abstract class SharedSegmentSequence<T extends ISegment>
436
485
  // local ops until loading is complete, and then
437
486
  // they will be present
438
487
  if (!this.loadedDeferred.isCompleted) {
439
- this.loadedDeferredOutgoingOps.push(metadata ? [translated, metadata] : translated);
488
+ this.loadedDeferredOutgoingOps.push(metadata ? [message, metadata] : (message as any));
440
489
  } else {
441
- this.submitLocalMessage(translated, metadata);
490
+ this.submitLocalMessage(message, metadata);
442
491
  }
443
492
  }
444
493
 
@@ -571,11 +620,12 @@ export abstract class SharedSegmentSequence<T extends ISegment>
571
620
  const insertIndex: number = Math.max(start, end);
572
621
 
573
622
  // Insert first, so local references can slide to the inserted seg if any
574
- const insert = this.client.insertSegmentLocal(insertIndex, segment);
575
- if (insert) {
576
- if (start < end) {
577
- this.client.removeRangeLocal(start, end);
578
- }
623
+ const insert = this.guardReentrancy(() =>
624
+ this.client.insertSegmentLocal(insertIndex, segment),
625
+ );
626
+
627
+ if (insert && start < end) {
628
+ this.removeRange(start, end);
579
629
  }
580
630
  }
581
631
 
@@ -596,19 +646,26 @@ export abstract class SharedSegmentSequence<T extends ISegment>
596
646
  * {@inheritDoc @fluidframework/shared-object-base#SharedObject.reSubmitCore}
597
647
  */
598
648
  protected reSubmitCore(content: any, localOpMetadata: unknown) {
599
- if (
600
- !this.intervalCollections.tryResubmitMessage(
601
- content,
602
- localOpMetadata as IMapMessageLocalMetadata,
603
- )
604
- ) {
605
- this.submitSequenceMessage(
606
- this.client.regeneratePendingOp(
607
- content as IMergeTreeOp,
608
- localOpMetadata as SegmentGroup | SegmentGroup[],
609
- ),
610
- );
611
- }
649
+ const originalRefSeq = this.inFlightRefSeqs.shift();
650
+ assert(
651
+ originalRefSeq !== undefined,
652
+ 0x8bb /* Expected a recorded refSeq when resubmitting an op */,
653
+ );
654
+ this.useResubmitRefSeq(originalRefSeq, () => {
655
+ if (
656
+ !this.intervalCollections.tryResubmitMessage(
657
+ content,
658
+ localOpMetadata as IMapMessageLocalMetadata,
659
+ )
660
+ ) {
661
+ this.submitSequenceMessage(
662
+ this.client.regeneratePendingOp(
663
+ content as IMergeTreeOp,
664
+ localOpMetadata as SegmentGroup | SegmentGroup[],
665
+ ),
666
+ );
667
+ }
668
+ });
612
669
  }
613
670
 
614
671
  /**
@@ -665,7 +722,7 @@ export abstract class SharedSegmentSequence<T extends ISegment>
665
722
  .catch((error) => {
666
723
  this.loadFinished(error);
667
724
  });
668
- if (this.dataStoreRuntime.options?.sequenceInitializeFromHeaderOnly !== true) {
725
+ if (this.dataStoreRuntime.options.sequenceInitializeFromHeaderOnly !== true) {
669
726
  // if we not doing partial load, await the catch up ops,
670
727
  // and the finalization of the load
671
728
  await loadCatchUpOps;
@@ -683,6 +740,18 @@ export abstract class SharedSegmentSequence<T extends ISegment>
683
740
  local: boolean,
684
741
  localOpMetadata: unknown,
685
742
  ) {
743
+ if (local) {
744
+ const recordedRefSeq = this.inFlightRefSeqs.shift();
745
+ assert(recordedRefSeq !== undefined, 0x8bc /* No pending recorded refSeq found */);
746
+ // TODO: AB#7076: Some equivalent assert should be enabled. This fails some e2e stashed op tests because
747
+ // the deltaManager may have seen more messages than the runtime has processed while amidst the stashed op
748
+ // flow, so e.g. when `applyStashedOp` is called and the DDS is put in a state where it expects an ack for
749
+ // one of its messages, the delta manager has actually already seen subsequent messages from collaborators
750
+ // which the in-flight message is concurrent to.
751
+ // See "handles stashed ops created on top of sequenced local ops" for one such test case.
752
+ // assert(recordedRefSeq <= message.referenceSequenceNumber, "RefSeq mismatch");
753
+ }
754
+
686
755
  // if loading isn't complete, we need to cache all
687
756
  // incoming ops to be applied after loading is complete
688
757
  if (this.deferIncomingOps) {
@@ -729,13 +798,10 @@ export abstract class SharedSegmentSequence<T extends ISegment>
729
798
  /**
730
799
  * {@inheritDoc @fluidframework/shared-object-base#SharedObjectCore.applyStashedOp}
731
800
  */
732
- protected applyStashedOp(content: any): unknown {
733
- const parsedContent = parseHandles(content, this.serializer);
734
- const metadata =
735
- this.intervalCollections.tryGetStashedOpLocalMetadata(parsedContent) ??
736
- this.client.applyStashedOp(parsedContent);
737
- assert(!!metadata, 0x87d /* Metadata is undefined */);
738
- return metadata;
801
+ protected applyStashedOp(content: any): void {
802
+ if (!this.intervalCollections.tryApplyStashedOp(content)) {
803
+ this.client.applyStashedOp(content);
804
+ }
739
805
  }
740
806
 
741
807
  private summarizeMergeTree(serializer: IFluidSerializer): ISummaryTreeWithStats {
@@ -760,16 +826,18 @@ export abstract class SharedSegmentSequence<T extends ISegment>
760
826
  );
761
827
  }
762
828
 
763
- private processMergeTreeMsg(rawMessage: ISequencedDocumentMessage, local?: boolean) {
764
- const message = parseHandles(rawMessage, this.serializer);
765
-
829
+ /**
830
+ *
831
+ * @param message - Message with decoded and hydrated handles
832
+ */
833
+ private processMergeTreeMsg(message: ISequencedDocumentMessage, local?: boolean) {
766
834
  const ops: IMergeTreeDeltaOp[] = [];
767
835
  function transformOps(event: SequenceDeltaEvent) {
768
836
  ops.push(...SharedSegmentSequence.createOpsFromDelta(event));
769
837
  }
770
838
  const needsTransformation = message.referenceSequenceNumber !== message.sequenceNumber - 1;
771
839
  let stashMessage: Readonly<ISequencedDocumentMessage> = message;
772
- if (this.runtime.options?.newMergeTreeSnapshotFormat !== true) {
840
+ if (this.runtime.options.newMergeTreeSnapshotFormat !== true) {
773
841
  if (needsTransformation) {
774
842
  this.on("sequenceDelta", transformOps);
775
843
  }
@@ -777,7 +845,7 @@ export abstract class SharedSegmentSequence<T extends ISegment>
777
845
 
778
846
  this.client.applyMsg(message, local);
779
847
 
780
- if (this.runtime.options?.newMergeTreeSnapshotFormat !== true) {
848
+ if (this.runtime.options.newMergeTreeSnapshotFormat !== true) {
781
849
  if (needsTransformation) {
782
850
  this.removeListener("sequenceDelta", transformOps);
783
851
  // shallow clone the message as we only overwrite top level properties,
@@ -866,6 +934,20 @@ export abstract class SharedSegmentSequence<T extends ISegment>
866
934
  intervalCollection.attachGraph(this.client, key);
867
935
  }
868
936
  }
937
+
938
+ /**
939
+ * Overrides the "currently applicable reference sequence number" for the duration of the callback.
940
+ * See remarks on `currentRefSeq` for more context.
941
+ */
942
+ private useResubmitRefSeq(refSeq: number, callback: () => void) {
943
+ const previousResubmitRefSeq = this.ongoingResubmitRefSeq;
944
+ this.ongoingResubmitRefSeq = refSeq;
945
+ try {
946
+ callback();
947
+ } finally {
948
+ this.ongoingResubmitRefSeq = previousResubmitRefSeq;
949
+ }
950
+ }
869
951
  }
870
952
 
871
953
  function createReentrancyDetector(
@@ -10,8 +10,8 @@ import {
10
10
  IChannelFactory,
11
11
  } from "@fluidframework/datastore-definitions";
12
12
  import { Marker, TextSegment } from "@fluidframework/merge-tree";
13
- import { pkgVersion } from "./packageVersion";
14
- import { SharedString, SharedStringSegment } from "./sharedString";
13
+ import { pkgVersion } from "./packageVersion.js";
14
+ import { SharedString, SharedStringSegment } from "./sharedString.js";
15
15
 
16
16
  /**
17
17
  * @alpha
@@ -63,6 +63,9 @@ export class SharedStringFactory implements IChannelFactory {
63
63
  return sharedString;
64
64
  }
65
65
 
66
+ /**
67
+ * {@inheritDoc @fluidframework/datastore-definitions#IChannelFactory.create}
68
+ */
66
69
  public create(document: IFluidDataStoreRuntime, id: string): SharedString {
67
70
  const sharedString = new SharedString(document, id, this.attributes);
68
71
  sharedString.initializeLocal();
@@ -18,15 +18,15 @@ import {
18
18
  IFluidSerializer,
19
19
  SharedObject,
20
20
  } from "@fluidframework/shared-object-base";
21
- import { Interval, ISerializableInterval } from "./intervals";
21
+ import { Interval, ISerializableInterval } from "./intervals/index.js";
22
22
  import {
23
23
  IntervalCollection,
24
24
  IIntervalCollection,
25
25
  IntervalCollectionValueType,
26
- } from "./intervalCollection";
27
- import { DefaultMap, IMapOperation } from "./defaultMap";
28
- import { pkgVersion } from "./packageVersion";
29
- import { IMapMessageLocalMetadata } from "./defaultMapInterfaces";
26
+ } from "./intervalCollection.js";
27
+ import { DefaultMap, IMapOperation } from "./defaultMap.js";
28
+ import { pkgVersion } from "./packageVersion.js";
29
+ import { IMapMessageLocalMetadata } from "./defaultMapInterfaces.js";
30
30
 
31
31
  const snapshotFileName = "header";
32
32
 
@@ -10,7 +10,7 @@ import {
10
10
  IFluidDataStoreRuntime,
11
11
  Serializable,
12
12
  } from "@fluidframework/datastore-definitions";
13
- import { SharedSegmentSequence } from "./sequence";
13
+ import { SharedSegmentSequence } from "./sequence.js";
14
14
 
15
15
  const MaxRun = 128;
16
16
 
@@ -15,8 +15,8 @@ import {
15
15
  TextSegment,
16
16
  } from "@fluidframework/merge-tree";
17
17
  import { IFluidDataStoreRuntime, IChannelAttributes } from "@fluidframework/datastore-definitions";
18
- import { SharedSegmentSequence } from "./sequence";
19
- import { SharedStringFactory } from "./sequenceFactory";
18
+ import { SharedSegmentSequence } from "./sequence.js";
19
+ import { SharedStringFactory } from "./sequenceFactory.js";
20
20
 
21
21
  /**
22
22
  * Fluid object interface describing access methods on a SharedString
@@ -0,0 +1,7 @@
1
+ {
2
+ // This config must be used in a "type": "commonjs" environment. (Use fluid-tsc commonjs.)
3
+ "extends": "./tsconfig.json",
4
+ "compilerOptions": {
5
+ "outDir": "./dist",
6
+ },
7
+ }
package/tsconfig.json CHANGED
@@ -1,13 +1,10 @@
1
1
  {
2
- "extends": [
3
- "../../../common/build/build-common/tsconfig.base.json",
4
- "../../../common/build/build-common/tsconfig.cjs.json",
5
- ],
2
+ "extends": "../../../common/build/build-common/tsconfig.node16.json",
6
3
  "include": ["src/**/*"],
7
4
  "exclude": ["src/test/**/*"],
8
5
  "compilerOptions": {
9
6
  "rootDir": "./src",
10
- "outDir": "./dist",
7
+ "outDir": "./lib",
11
8
  "noImplicitAny": true,
12
9
  },
13
10
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultMap.d.mts","sourceRoot":"","sources":["../src/defaultMap.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,YAAY,EAAE,MAAM,iCAAiC;OACvD,EAAE,yBAAyB,EAAE,MAAM,sCAAsC;OACzE,EACN,gBAAgB,EAIhB,MAAM,oCAAoC;OACpC,EAAE,iBAAiB,EAAE,MAAM,8BAA8B;OAGzD,EACN,kBAAkB,EAClB,gBAAgB,EAIhB,UAAU,EACV,uBAAuB,EACvB,wBAAwB,EACxB,eAAe,EACf,wBAAwB,EACxB;AAoCD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;OAGG;IACH,KAAK,EAAE,wBAAwB,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAAC;AAEnD;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IAC1C,CAAC,GAAG,EAAE,MAAM,GAAG,kBAAkB,CAAC;CAClC;AAED,MAAM,WAAW,wBAAwB;IACxC,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC;CAChC;AAED;;;;;;GAMG;AACH,qBAAa,UAAU,CAAC,CAAC;IA2BvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAI9B,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC;aACT,YAAY;IAlC7B;;OAEG;IACH,IAAW,IAAI,IAAI,MAAM,CAExB;IAED;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAsD;IAEtF;;OAEG;IACH,OAAO,CAAC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M,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAEvF,MAAM,EAAE,GAA2B;gBAClC,GAAG;gBACH,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE;oBACN,MAAM;oBACN,KAAK,EAAE,gBAAgB;iBACvB;aACD,CAAC;YAEF,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,eAAe,CAAC,CAAC;YAExC,MAAM,KAAK,GAAkB,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC;YACpD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,YAAY,CAAC,CAAC;QAC9E,CAAC,CAAC;QAEF,OAAO,EAAE,IAAI,EAAE,CAAC;IACjB,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIFluidSerializer,\n\tmakeHandlesSerializable,\n\tparseHandles,\n\tValueType,\n} from \"@fluidframework/shared-object-base\";\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils\";\nimport { makeSerializable, ValueTypeLocalValue } from \"./localValues\";\nimport {\n\tISerializableValue,\n\tISerializedValue,\n\tIValueChanged,\n\t// eslint-disable-next-line import/no-deprecated\n\tIValueOpEmitter,\n\tIValueType,\n\tISharedDefaultMapEvents,\n\tIMapMessageLocalMetadata,\n\tSequenceOptions,\n\tIValueTypeOperationValue,\n} from \"./defaultMapInterfaces\";\nimport { SerializedIntervalDelta, IntervalDeltaOpType } from \"./intervals\";\n\nfunction isMapOperation(op: unknown): op is IMapOperation {\n\treturn typeof op === \"object\" && op !== null && \"type\" in op && op.type === \"act\";\n}\n/**\n * Defines the means to process and submit a given op on a map.\n */\ninterface IMapMessageHandler {\n\t/**\n\t * Apply the given operation.\n\t * @param op - The map operation to apply\n\t * @param local - Whether the message originated from the local client\n\t * @param message - The full message. Not provided for stashed ops.\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t */\n\tprocess(\n\t\top: IMapOperation,\n\t\tlocal: boolean,\n\t\tmessage: ISequencedDocumentMessage | undefined,\n\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t): void;\n\n\t/**\n\t * Communicate the operation to remote clients.\n\t * @param op - The map operation to submit\n\t */\n\tsubmit(op: IMapOperation, localOpMetadata: IMapMessageLocalMetadata): void;\n\n\tresubmit(op: IMapOperation, localOpMetadata: IMapMessageLocalMetadata): void;\n\n\tgetStashedOpLocalMetadata(op: IMapOperation): IMapMessageLocalMetadata;\n}\n\n/**\n * Describes an operation specific to a value type.\n */\nexport interface IMapValueTypeOperation {\n\t/**\n\t * String identifier of the operation type.\n\t */\n\ttype: \"act\";\n\n\t/**\n\t * Map key being modified.\n\t */\n\tkey: string;\n\n\t/**\n\t * Value of the operation, specific to the value type.\n\t * @alpha\n\t */\n\tvalue: IValueTypeOperationValue;\n}\n\n/**\n * Description of a map delta operation\n */\nexport type IMapOperation = IMapValueTypeOperation;\n\n/**\n * Defines the in-memory object structure to be used for the conversion to/from serialized.\n * Directly used in JSON.stringify, direct result from JSON.parse\n */\nexport interface IMapDataObjectSerializable {\n\t[key: string]: ISerializableValue;\n}\n\nexport interface IMapDataObjectSerialized {\n\t[key: string]: ISerializedValue;\n}\n\n/**\n * A DefaultMap is a map-like distributed data structure, supporting operations on values stored by\n * string key locations.\n *\n * Creation of values is implicit on access (either via `get` or a remote op application referring to\n * a collection that wasn't previously known)\n */\nexport class DefaultMap<T> {\n\t/**\n\t * The number of key/value pairs stored in the map.\n\t */\n\tpublic get size(): number {\n\t\treturn this.data.size;\n\t}\n\n\t/**\n\t * Mapping of op types to message handlers.\n\t */\n\tprivate readonly messageHandlers: ReadonlyMap<string, IMapMessageHandler> = new Map();\n\n\t/**\n\t * The in-memory data the map is storing.\n\t */\n\tprivate readonly data = new Map<string, ValueTypeLocalValue<T>>();\n\n\t/**\n\t * Create a new default map.\n\t * @param serializer - The serializer to serialize / parse handles\n\t * @param handle - The handle of the shared object using the kernel\n\t * @param submitMessage - A callback to submit a message through the shared object\n\t * @param type - The value type to create at values of this map\n\t * @param eventEmitter - The object that will emit map events\n\t */\n\tconstructor(\n\t\tprivate readonly serializer: IFluidSerializer,\n\t\tprivate readonly handle: IFluidHandle,\n\t\tprivate readonly submitMessage: (\n\t\t\top: IMapValueTypeOperation,\n\t\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t\t) => void,\n\t\tprivate readonly type: IValueType<T>,\n\t\tprivate readonly options?: Partial<SequenceOptions>,\n\t\tpublic readonly eventEmitter = new TypedEventEmitter<ISharedDefaultMapEvents>(),\n\t) {\n\t\tthis.messageHandlers = this.getMessageHandlers();\n\t}\n\n\t/**\n\t * Get an iterator over the keys in this map.\n\t * @returns The iterator\n\t */\n\tpublic keys(): IterableIterator<string> {\n\t\treturn this.data.keys();\n\t}\n\n\t/**\n\t * Get an iterator over the entries in this map.\n\t * @returns The iterator\n\t */\n\tpublic entries(): IterableIterator<[string, any]> {\n\t\tconst localEntriesIterator = this.data.entries();\n\t\tconst iterator = {\n\t\t\tnext(): IteratorResult<[string, any]> {\n\t\t\t\tconst nextVal = localEntriesIterator.next();\n\t\t\t\treturn nextVal.done\n\t\t\t\t\t? { value: undefined, done: true }\n\t\t\t\t\t: { value: [nextVal.value[0], nextVal.value[1].value], done: false }; // Unpack the stored value\n\t\t\t},\n\t\t\t[Symbol.iterator]() {\n\t\t\t\treturn this;\n\t\t\t},\n\t\t};\n\t\treturn iterator;\n\t}\n\n\t/**\n\t * Get an iterator over the values in this map.\n\t * @returns The iterator\n\t */\n\tpublic values(): IterableIterator<any> {\n\t\tconst localValuesIterator = this.data.values();\n\t\tconst iterator = {\n\t\t\tnext(): IteratorResult<any> {\n\t\t\t\tconst nextVal = localValuesIterator.next();\n\t\t\t\treturn nextVal.done\n\t\t\t\t\t? { value: undefined, done: true }\n\t\t\t\t\t: { value: nextVal.value.value, done: false }; // Unpack the stored value\n\t\t\t},\n\t\t\t[Symbol.iterator]() {\n\t\t\t\treturn this;\n\t\t\t},\n\t\t};\n\t\treturn iterator;\n\t}\n\n\t/**\n\t * Get an iterator over the entries in this map.\n\t * @returns The iterator\n\t */\n\tpublic [Symbol.iterator](): IterableIterator<[string, any]> {\n\t\treturn this.entries();\n\t}\n\n\t/**\n\t * Executes the given callback on each entry in the map.\n\t * @param callbackFn - Callback function\n\t */\n\tpublic forEach(callbackFn: (value: any, key: string, map: Map<string, any>) => void): void {\n\t\tthis.data.forEach((localValue, key, m) => {\n\t\t\tcallbackFn(localValue.value, key, m);\n\t\t});\n\t}\n\n\t/**\n\t * {@inheritDoc ISharedMap.get}\n\t */\n\tpublic get(key: string): T {\n\t\tconst localValue = this.data.get(key) ?? this.createCore(key, true);\n\n\t\treturn localValue.value;\n\t}\n\n\t/**\n\t * Check if a key exists in the map.\n\t * @param key - The key to check\n\t * @returns True if the key exists, false otherwise\n\t */\n\tpublic has(key: string): boolean {\n\t\treturn this.data.has(key);\n\t}\n\n\t/**\n\t * Serializes the data stored in the shared map to a JSON string\n\t * @param serializer - The serializer to use to serialize handles in its values.\n\t * @returns A JSON string containing serialized map data\n\t */\n\tpublic getSerializedStorage(serializer: IFluidSerializer): IMapDataObjectSerialized {\n\t\tconst serializableMapData: IMapDataObjectSerialized = {};\n\t\tthis.data.forEach((localValue, key) => {\n\t\t\tserializableMapData[key] = localValue.makeSerialized(serializer, this.handle);\n\t\t});\n\t\treturn serializableMapData;\n\t}\n\n\tpublic getSerializableStorage(serializer: IFluidSerializer): IMapDataObjectSerializable {\n\t\tconst serializableMapData: IMapDataObjectSerializable = {};\n\t\tthis.data.forEach((localValue, key) => {\n\t\t\tserializableMapData[key] = makeSerializable(localValue, serializer, this.handle);\n\t\t});\n\t\treturn serializableMapData;\n\t}\n\n\tpublic serialize(serializer: IFluidSerializer): string {\n\t\treturn JSON.stringify(this.getSerializableStorage(serializer));\n\t}\n\n\t/**\n\t * Populate the kernel with the given map data.\n\t * @param data - A JSON string containing serialized map data\n\t */\n\tpublic populateFromSerializable(json: IMapDataObjectSerializable): void {\n\t\tfor (const [key, serializable] of Object.entries(json)) {\n\t\t\t// Back-compat: legacy documents may have handles to an intervalCollection map kernel.\n\t\t\t// These collections should be empty, and ValueTypes are no longer supported.\n\t\t\tif (\n\t\t\t\tserializable.type === ValueType[ValueType.Plain] ||\n\t\t\t\tserializable.type === ValueType[ValueType.Shared]\n\t\t\t) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Back-compat: Sequence previously arbitrarily prefixed all interval collection keys with\n\t\t\t// \"intervalCollections/\". This would burden users trying to iterate the collection and\n\t\t\t// access its value, as well as those trying to match a create message to its underlying\n\t\t\t// collection. See https://github.com/microsoft/FluidFramework/issues/10557 for more context.\n\t\t\tconst normalizedKey = key.startsWith(\"intervalCollections/\") ? key.substring(20) : key;\n\n\t\t\tconst localValue = {\n\t\t\t\tkey: normalizedKey,\n\t\t\t\tvalue: this.makeLocal(key, serializable),\n\t\t\t};\n\n\t\t\tthis.data.set(localValue.key, localValue.value);\n\t\t}\n\t}\n\n\tpublic populate(json: string): void {\n\t\tthis.populateFromSerializable(JSON.parse(json) as IMapDataObjectSerializable);\n\t}\n\n\t/**\n\t * Submit the given op if a handler is registered.\n\t * @param op - The operation to attempt to submit\n\t * @param localOpMetadata - The local metadata associated with the op. This is kept locally by the runtime\n\t * and not sent to the server. This will be sent back when this message is received back from the server. This is\n\t * also sent if we are asked to resubmit the message.\n\t * @returns True if the operation was submitted, false otherwise.\n\t */\n\tpublic tryResubmitMessage(\n\t\top: IMapOperation,\n\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t): boolean {\n\t\tconst type: string = op.type;\n\t\tconst handler = this.messageHandlers.get(type);\n\t\tif (handler !== undefined) {\n\t\t\thandler.resubmit(op, localOpMetadata);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\tpublic tryGetStashedOpLocalMetadata(op: unknown): IMapMessageLocalMetadata | undefined {\n\t\tif (isMapOperation(op) && this.messageHandlers.has(op.type)) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\treturn this.messageHandlers.get(op.type)!.getStashedOpLocalMetadata(op);\n\t\t}\n\t\treturn undefined;\n\t}\n\n\t/**\n\t * Process the given op if a handler is registered.\n\t * @param message - The message to process\n\t * @param local - Whether the message originated from the local client\n\t * @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.\n\t * For messages from a remote client, this will be undefined.\n\t * @returns True if the operation was processed, false otherwise.\n\t */\n\tpublic tryProcessMessage(\n\t\top: IMapOperation,\n\t\tlocal: boolean,\n\t\tmessage: ISequencedDocumentMessage | undefined,\n\t\tlocalOpMetadata: unknown,\n\t): boolean {\n\t\tconst handler = this.messageHandlers.get(op.type);\n\t\tif (handler !== undefined) {\n\t\t\thandler.process(op, local, message, localOpMetadata as IMapMessageLocalMetadata);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\n\t/**\n\t * Initializes a default ValueType at the provided key.\n\t * Should be used when a map operation incurs creation.\n\t * @param key - The key being initialized\n\t * @param local - Whether the message originated from the local client\n\t */\n\tprivate createCore(key: string, local: boolean): ValueTypeLocalValue<T> {\n\t\tconst localValue = new ValueTypeLocalValue(\n\t\t\tthis.type.factory.load(this.makeMapValueOpEmitter(key), undefined, this.options),\n\t\t\tthis.type,\n\t\t);\n\t\tconst previousValue = this.data.get(key);\n\t\tthis.data.set(key, localValue);\n\t\tconst event: IValueChanged = { key, previousValue };\n\t\tthis.eventEmitter.emit(\"create\", event, local, this.eventEmitter);\n\t\treturn localValue;\n\t}\n\n\t/**\n\t * The remote ISerializableValue we're receiving (either as a result of a load or an incoming set op) will\n\t * have the information we need to create a real object, but will not be the real object yet. For example,\n\t * we might know it's a map and the map's ID but not have the actual map or its data yet. makeLocal's\n\t * job is to convert that information into a real object for local usage.\n\t * @param key - The key that the caller intends to store the local value into (used for ops later). But\n\t * doesn't actually store the local value into that key. So better not lie!\n\t * @param serializable - The remote information that we can convert into a real object\n\t * @returns The local value that was produced\n\t */\n\tprivate makeLocal(key: string, serializable: ISerializableValue): ValueTypeLocalValue<T> {\n\t\tassert(\n\t\t\tserializable.type !== ValueType[ValueType.Plain] &&\n\t\t\t\tserializable.type !== ValueType[ValueType.Shared],\n\t\t\t0x2e1 /* \"Support for plain value types removed.\" */,\n\t\t);\n\n\t\tserializable.value = parseHandles(serializable.value, this.serializer);\n\t\tconst localValue = this.type.factory.load(\n\t\t\tthis.makeMapValueOpEmitter(key),\n\t\t\tserializable.value,\n\t\t\tthis.options,\n\t\t);\n\t\treturn new ValueTypeLocalValue(localValue, this.type);\n\t}\n\n\t/**\n\t * Get the message handlers for the map.\n\t * @returns A map of string op names to IMapMessageHandlers for those ops\n\t */\n\tprivate getMessageHandlers() {\n\t\tconst messageHandlers = new Map<string, IMapMessageHandler>();\n\t\t// Ops with type \"act\" describe actions taken by custom value type handlers of whatever item is\n\t\t// being addressed. These custom handlers can be retrieved from the ValueTypeLocalValue which has\n\t\t// stashed its valueType (and therefore its handlers). We also emit a valueChanged for anyone\n\t\t// watching for manipulations of that item.\n\t\tmessageHandlers.set(\"act\", {\n\t\t\tprocess: (op: IMapValueTypeOperation, local, message, localOpMetadata) => {\n\t\t\t\tconst localValue = this.data.get(op.key) ?? this.createCore(op.key, local);\n\t\t\t\tconst handler = localValue.getOpHandler(op.value.opName);\n\t\t\t\tconst previousValue = localValue.value;\n\t\t\t\tconst translatedValue = parseHandles(op.value.value, this.serializer);\n\t\t\t\thandler.process(previousValue, translatedValue, local, message, localOpMetadata);\n\t\t\t\tconst event: IValueChanged = { key: op.key, previousValue };\n\t\t\t\tthis.eventEmitter.emit(\"valueChanged\", event, local, message, this.eventEmitter);\n\t\t\t},\n\t\t\tsubmit: (op: IMapValueTypeOperation, localOpMetadata: IMapMessageLocalMetadata) => {\n\t\t\t\tthis.submitMessage(op, localOpMetadata);\n\t\t\t},\n\t\t\tresubmit: (op: IMapValueTypeOperation, localOpMetadata: IMapMessageLocalMetadata) => {\n\t\t\t\tconst localValue = this.data.get(op.key);\n\n\t\t\t\tassert(localValue !== undefined, 0x3f8 /* Local value expected on resubmission */);\n\n\t\t\t\tconst handler = localValue.getOpHandler(op.value.opName);\n\t\t\t\tconst rebased = handler.rebase(localValue.value, op.value, localOpMetadata);\n\t\t\t\tif (rebased !== undefined) {\n\t\t\t\t\tconst { rebasedOp, rebasedLocalOpMetadata } = rebased;\n\t\t\t\t\tthis.submitMessage({ ...op, value: rebasedOp }, rebasedLocalOpMetadata);\n\t\t\t\t}\n\t\t\t},\n\t\t\tgetStashedOpLocalMetadata: (op: IMapValueTypeOperation): IMapMessageLocalMetadata => {\n\t\t\t\tconst localValue = this.data.get(op.key) ?? this.createCore(op.key, true);\n\t\t\t\tassert(\n\t\t\t\t\tlocalValue !== undefined,\n\t\t\t\t\t0x879 /* Local value expected on applying stashed op */,\n\t\t\t\t);\n\t\t\t\tconst handler = localValue.getOpHandler(op.value.opName);\n\t\t\t\treturn handler.applyStashedOp(localValue.value, op.value);\n\t\t\t},\n\t\t});\n\n\t\treturn messageHandlers;\n\t}\n\n\t/**\n\t * Create an emitter for a value type to emit ops from the given key.\n\t * @alpha\n\t * @param key - The key of the map that the value type will be stored on\n\t * @returns A value op emitter for the given key\n\t */\n\t// eslint-disable-next-line import/no-deprecated\n\tprivate makeMapValueOpEmitter(key: string): IValueOpEmitter {\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tconst emit: IValueOpEmitter[\"emit\"] = (\n\t\t\topName: IntervalDeltaOpType,\n\t\t\tpreviousValue: unknown,\n\t\t\tparams: SerializedIntervalDelta,\n\t\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t\t): void => {\n\t\t\tconst translatedParams = makeHandlesSerializable(params, this.serializer, this.handle);\n\n\t\t\tconst op: IMapValueTypeOperation = {\n\t\t\t\tkey,\n\t\t\t\ttype: \"act\",\n\t\t\t\tvalue: {\n\t\t\t\t\topName,\n\t\t\t\t\tvalue: translatedParams,\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tthis.submitMessage(op, localOpMetadata);\n\n\t\t\tconst event: IValueChanged = { key, previousValue };\n\t\t\tthis.eventEmitter.emit(\"valueChanged\", event, true, null, this.eventEmitter);\n\t\t};\n\n\t\treturn { emit };\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultMapInterfaces.d.mts","sourceRoot":"","sources":["../src/defaultMapInterfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAEI,EAAE,yBAAyB,EAAE,MAAM,sCAAsC;OACzE,EAAE,mBAAmB,EAAE,MAAM,oCAAoC;OACjE,EAAE,qBAAqB,EAAE,MAAM,iCAAiC;OAChE,EACN,mBAAmB,EACnB,cAAc,EACd,uBAAuB,EACvB,mBAAmB,EACnB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,aAAa,EAAE,GAAG,CAAC;CACnB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;;;OAMG;IACH,IAAI,CACH,MAAM,EAAE,cAAc,EACtB,aAAa,EAAE,SAAS,EACxB,MAAM,EAAE,uBAAuB,EAC/B,eAAe,EAAE,wBAAwB,GACvC,IAAI,CAAC;CACR;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B;;;;;;;;;;;;OAYG;IACH,yBAAyB,EAAE,OAAO,CAAC;IACnC;;;;;;;;OAQG;IACH,qCAAqC,EAAE,OAAO,CAAC;IAC/C,CAAC,GAAG,EAAE,MAAM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E,OAAO,EAAE,MAAM,EAAE,qBAAqB,KAAK,IAAI,GACvF,IAAI,CAAC;CACR;AAED;;;;;;;;;;GAUG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,GAAG,CAAC;CACX;AAED,MAAM,WAAW,gBAAgB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,wBAAwB;IACxC;;OAEG;IACH,MAAM,EAAE,mBAAmB,CAAC;IAE5B;;OAEG;IACH,KAAK,EAAE,uBAAuB,CAAC;CAC/B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"defaultMapInterfaces.mjs","sourceRoot":"","sources":["../src/defaultMapInterfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { ISharedObjectEvents } from \"@fluidframework/shared-object-base\";\nimport { IEventThisPlaceHolder } from \"@fluidframework/core-interfaces\";\nimport {\n\tISerializedInterval,\n\tIntervalOpType,\n\tSerializedIntervalDelta,\n\tIntervalDeltaOpType,\n} from \"./intervals\";\n\n/**\n * Type of \"valueChanged\" event parameter.\n */\nexport interface IValueChanged {\n\t/**\n\t * The key storing the value that changed.\n\t */\n\tkey: string;\n\n\t/**\n\t * The value that was stored at the key prior to the change.\n\t */\n\tpreviousValue: any;\n}\n\n/**\n * Value types are given an IValueOpEmitter to emit their ops through the container type that holds them.\n * @internal\n * @deprecated - will be remove from public api as there is no public used of this type\n */\nexport interface IValueOpEmitter {\n\t/**\n\t * Called by the value type to emit a value type operation through the container type holding it.\n\t * @param opName - Name of the emitted operation\n\t * @param previousValue - JSONable previous value as defined by the value type @deprecated unused\n\t * @param params - JSONable params for the operation as defined by the value type\n\t * @param localOpMetadata - JSONable local metadata which should be submitted with the op\n\t */\n\temit(\n\t\topName: IntervalOpType,\n\t\tpreviousValue: undefined,\n\t\tparams: SerializedIntervalDelta,\n\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t): void;\n}\n\n/**\n * @internal\n */\nexport interface IMapMessageLocalMetadata {\n\tlocalSeq: number;\n}\n\n/**\n * Optional flags that configure options for sequence DDSs\n * @internal\n */\nexport interface SequenceOptions {\n\t/**\n\t * Enable the ability to use interval APIs that rely on positions before and\n\t * after individual characters, referred to as \"sides\". See {@link SequencePlace}\n\t * for additional context.\n\t *\n\t * This flag must be enabled to pass instances of {@link SequencePlace} to\n\t * any IIntervalCollection API.\n\t *\n\t * Also see the feature flag `mergeTreeReferencesCanSlideToEndpoint` to allow\n\t * endpoints to slide to the special endpoint segments.\n\t *\n\t * The default value is false.\n\t */\n\tintervalStickinessEnabled: boolean;\n\t/**\n\t * Enable the ability for interval endpoints to slide to the special endpoint\n\t * segments that exist before and after the bounds of the string. This is\n\t * primarily useful for workflows involving interval stickiness, and it is\n\t * suggested to enable both this flag and `intervalStickinessEnabled` at the\n\t * same time.\n\t *\n\t * The default value is false.\n\t */\n\tmergeTreeReferencesCanSlideToEndpoint: boolean;\n\t[key: string]: boolean;\n}\n\n/**\n * A value factory is used to serialize/deserialize value types to a map\n * @alpha\n */\nexport interface IValueFactory<T> {\n\t/**\n\t * Create a new value type. Used both in creation of new value types, as well as in loading existing ones\n\t * from remote.\n\t * @param emitter - Emitter object that the created value type will use to emit operations\n\t * @param raw - Initialization parameters as defined by the value type\n\t * @returns The new value type\n\t * @alpha\n\t */\n\tload(emitter: IValueOpEmitter, raw: any, options?: Partial<SequenceOptions>): T;\n\n\t/**\n\t * Given a value type, provides a JSONable form of its data to be used for snapshotting. This data must be\n\t * loadable using the load method of its factory.\n\t * @param value - The value type to serialize\n\t * @returns The JSONable form of the value type\n\t * @alpha\n\t */\n\tstore(value: T): any;\n}\n\n/**\n * Defines an operation that a value type is able to handle.\n * @alpha\n */\nexport interface IValueOperation<T> {\n\t/**\n\t * Performs the actual processing on the incoming operation.\n\t * @param value - The current value stored at the given key, which should be the value type\n\t * @param params - The params on the incoming operation\n\t * @param local - Whether the operation originated from this client\n\t * @param message - The operation itself\n\t * @param localOpMetadata - any local metadata submitted by `IValueOpEmitter.emit`.\n\t * @alpha\n\t */\n\tprocess(\n\t\tvalue: T,\n\t\tparams: ISerializedInterval,\n\t\tlocal: boolean,\n\t\tmessage: ISequencedDocumentMessage | undefined,\n\t\tlocalOpMetadata: IMapMessageLocalMetadata | undefined,\n\t): void;\n\n\t/**\n\t * Rebases an `op` on `value` from its original perspective (ref/local seq) to the current\n\t * perspective. Should be invoked on reconnection.\n\t * @param value - The current value stored at the given key, which should be the value type.\n\t * @param op - The op to be rebased.\n\t * @param localOpMetadata - Any local metadata that was originally submitted with the op.\n\t * @returns A rebased version of the op and any local metadata that should be submitted with it.\n\t */\n\trebase(\n\t\tvalue: T,\n\t\top: IValueTypeOperationValue,\n\t\tlocalOpMetadata: IMapMessageLocalMetadata,\n\t):\n\t\t| { rebasedOp: IValueTypeOperationValue; rebasedLocalOpMetadata: IMapMessageLocalMetadata }\n\t\t| undefined;\n\n\tapplyStashedOp(value: T, op: IValueTypeOperationValue): IMapMessageLocalMetadata;\n}\n\n/**\n * Defines a value type that can be registered on a container type.\n */\nexport interface IValueType<T> {\n\t/**\n\t * Name of the value type.\n\t * @alpha\n\t */\n\tname: string;\n\n\t/**\n\t * Factory method used to convert to/from a JSON form of the type.\n\t * @alpha\n\t */\n\tfactory: IValueFactory<T>;\n\n\t/**\n\t * Operations that can be applied to the value type.\n\t * @alpha\n\t */\n\tops: Map<IntervalOpType, IValueOperation<T>>;\n}\n\nexport interface ISharedDefaultMapEvents extends ISharedObjectEvents {\n\t(\n\t\tevent: \"valueChanged\" | \"create\",\n\t\tlistener: (changed: IValueChanged, local: boolean, target: IEventThisPlaceHolder) => void,\n\t): void;\n}\n\n/**\n * The _ready-for-serialization_ format of values contained in DDS contents. This allows us to use\n * ISerializableValue.type to understand whether they're storing a Plain JS object, a SharedObject, or a value type.\n * Note that the in-memory equivalent of ISerializableValue is ILocalValue (similarly holding a type, but with\n * the _in-memory representation_ of the value instead). An ISerializableValue is what gets passed to\n * JSON.stringify and comes out of JSON.parse. This format is used both for snapshots (loadCore/populate)\n * and ops (set).\n *\n * The DefaultMap implementation for sequence has been specialized to only support a single ValueType, which serializes\n * and deserializes via .store() and .load().\n */\nexport interface ISerializableValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * The JSONable representation of the value.\n\t */\n\tvalue: any;\n}\n\nexport interface ISerializedValue {\n\t/**\n\t * A type annotation to help indicate how the value serializes.\n\t */\n\ttype: string;\n\n\t/**\n\t * String representation of the value.\n\t */\n\tvalue: string | undefined;\n}\n\n/**\n * ValueTypes handle ops slightly differently from SharedObjects or plain JS objects. Since the Map/Directory doesn't\n * know how to handle the ValueType's ops, those ops are instead passed along to the ValueType for processing.\n * IValueTypeOperationValue is that passed-along op. The opName on it is the ValueType-specific operation and the\n * value is whatever params the ValueType needs to complete that operation. Similar to ISerializableValue, it is\n * serializable via JSON.stringify/parse but differs in that it has no equivalency with an in-memory value - rather\n * it just describes an operation to be applied to an already-in-memory value.\n * @alpha\n */\nexport interface IValueTypeOperationValue {\n\t/**\n\t * The name of the operation.\n\t */\n\topName: IntervalDeltaOpType;\n\n\t/**\n\t * The payload that is submitted along with the operation.\n\t */\n\tvalue: SerializedIntervalDelta;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAcI,EAAE,wBAAwB,EAAE,eAAe,EAAE,eAAe,EAAE;OAC9D,EACN,SAAS,EACT,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,GACvB;OACM,EACN,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,2BAA2B,EAC3B,IAAI,EACJ,qBAAqB,EACrB,aAAa,GACb;OACM,EACN,aAAa,EACb,uBAAuB,EACvB,0BAA0B,EAC1B,+BAA+B,EAC/B,uCAAuC,EACvC,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,4BAA4B,EAC5B,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,mBAAmB,GACnB;OACM,EACN,8BAA8B,EAC9B,iCAAiC,EACjC,iCAAiC,EACjC,0CAA0C,EAC1C,oCAAoC,EACpC,8BAA8B,EAC9B,kBAAkB,EAClB,6BAA6B,EAC7B,sBAAsB,GACtB;OACM,EAAE,4BAA4B,EAAE,qBAAqB,EAAE;OACvD,EACN,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,wBAAwB,GACxB;OACM,EAAE,mBAAmB,EAAE;OACvB,EACN,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,mBAAmB,GACnB;OACM,EACN,yBAAyB,EACzB,wBAAwB,EACxB,+BAA+B,GAC/B;OACM,EAAE,eAAe,EAAE,cAAc,EAAE,WAAW,EAAE;OAEhD,EACN,QAAQ,EACR,MAAM,EACN,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,EACb,sBAAsB,GACtB,MAAM,4BAA4B"}
package/lib/index.mjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAeI,EAEN,QAAQ,EACR,cAAc,EACd,YAAY,EAGZ,gBAAgB,EAEhB,kBAAkB,EAElB,uBAAuB,GACvB;OACM,EAKN,2BAA2B,EAC3B,IAAI,GAGJ;OACM,EAIN,+BAA+B,EAC/B,uCAAuC,EAGvC,0BAA0B,EAC1B,4BAA4B,EAE5B,qBAAqB,EAErB,mBAAmB,GACnB;OACM,EACN,8BAA8B,EAC9B,iCAAiC,EACjC,iCAAiC,EACjC,0CAA0C,EAC1C,oCAAoC,EACpC,8BAA8B,EAE9B,6BAA6B,GAE7B;OACM,EAAgC,qBAAqB,EAAE;OACvD,EAEN,kBAAkB,EAClB,aAAa,EACb,wBAAwB,GACxB;OACM,EAAE,mBAAmB,EAAE;OACvB,EACN,iBAAiB,EAEjB,YAAY,GAEZ;OACM,EAEN,wBAAwB,EACxB,+BAA+B,GAC/B;OACM,EAAmB,cAAc,EAAE,WAAW,EAAE;OAEhD,EAEN,MAAM,EACN,WAAW,EAEX,aAAa,EAGb,WAAW,EACX,kBAAkB,EAClB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,aAAa,GAEb,MAAM,4BAA4B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Supports distributed data structures which are list-like.\n *\n * This library's main export is {@link SharedString}, a DDS for storing and simultaneously editing a sequence of\n * text.\n *\n * See the package's README for a high-level introduction to `SharedString`'s feature set.\n * @remarks Note that SharedString is a sequence DDS but it has additional specialized features and behaviors for\n * working with text.\n *\n * @packageDocumentation\n */\nexport { IMapMessageLocalMetadata, IValueOpEmitter, SequenceOptions } from \"./defaultMapInterfaces\";\nexport {\n\tIInterval,\n\tInterval,\n\tIntervalOpType,\n\tIntervalType,\n\tISerializableInterval,\n\tISerializedInterval,\n\tSequenceInterval,\n\tSerializedIntervalDelta,\n\tIntervalStickiness,\n\tIIntervalHelpers,\n\tsequenceIntervalHelpers,\n} from \"./intervals\";\nexport {\n\tDeserializeCallback,\n\tIIntervalCollectionEvent,\n\tIIntervalCollection,\n\tIntervalLocator,\n\tintervalLocatorFromEndpoint,\n\tSide,\n\tInteriorSequencePlace,\n\tSequencePlace,\n} from \"./intervalCollection\";\nexport {\n\tIntervalIndex,\n\tSequenceIntervalIndexes,\n\tIOverlappingIntervalsIndex,\n\tcreateOverlappingIntervalsIndex,\n\tcreateOverlappingSequenceIntervalsIndex,\n\tIEndpointInRangeIndex,\n\tIStartpointInRangeIndex,\n\tcreateEndpointInRangeIndex,\n\tcreateStartpointInRangeIndex,\n\tIIdIntervalIndex,\n\tcreateIdIntervalIndex,\n\tIEndpointIndex,\n\tcreateEndpointIndex,\n} from \"./intervalIndex\";\nexport {\n\tappendAddIntervalToRevertibles,\n\tappendChangeIntervalToRevertibles,\n\tappendDeleteIntervalToRevertibles,\n\tappendIntervalPropertyChangedToRevertibles,\n\tappendSharedStringDeltaToRevertibles,\n\tdiscardSharedStringRevertibles,\n\tIntervalRevertible,\n\trevertSharedStringRevertibles,\n\tSharedStringRevertible,\n} from \"./revertibles\";\nexport { ISharedSegmentSequenceEvents, SharedSegmentSequence } from \"./sequence\";\nexport {\n\tISequenceDeltaRange,\n\tSequenceDeltaEvent,\n\tSequenceEvent,\n\tSequenceMaintenanceEvent,\n} from \"./sequenceDeltaEvent\";\nexport { SharedStringFactory } from \"./sequenceFactory\";\nexport {\n\tgetTextAndMarkers,\n\tISharedString,\n\tSharedString,\n\tSharedStringSegment,\n} from \"./sharedString\";\nexport {\n\tISharedIntervalCollection,\n\tSharedIntervalCollection,\n\tSharedIntervalCollectionFactory,\n} from \"./sharedIntervalCollection\";\nexport { IJSONRunSegment, SharedSequence, SubSequence } from \"./sharedSequence\";\n\nexport {\n\tISegment,\n\tMarker,\n\tBaseSegment,\n\tReferencePosition,\n\tReferenceType,\n\tPropertySet,\n\tMapLike,\n\tTextSegment,\n\tMergeTreeDeltaType,\n\treservedMarkerIdKey,\n\treservedTileLabelsKey,\n\treservedRangeLabelsKey,\n\tTrackingGroup,\n\tLocalReferencePosition,\n} from \"@fluidframework/merge-tree\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"intervalCollection.d.mts","sourceRoot":"","sources":["../src/intervalCollection.ts"],"names":[],"mappings":"AAAA;;;GAGG;OAKI,EAAE,iBAAiB,EAAE,MAAM,8BAA8B;OAEzD,EAAE,MAAM,EAAE,MAAM,iCAAiC;OACjD,EAEN,MAAM,EAKN,WAAW,EACX,sBAAsB,EAQtB,MAAM,4BAA4B;OAC5B,EAAE,yBAAyB,EAAE,MAAM,sCAAsC;OAGzE,EACN,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,eAAe,EACf,UAAU,EACV,wBAAwB,EACxB,eAAe,EACf;OACM,EACN,4BAA4B,EAC5B,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EAOvB;OACM,EAEN,cAAc,EACd,gBAAgB,EAChB,0BAA0B,EAC1B,aAAa,EAGb;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,qBAAqB,CAAC;AAE7E;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,IAAI,CAAC;CACX;AAED;;;;;GAKG;AACH,oBAAY,IAAI;IACf,MAAM,IAAI;IACV,KAAK,IAAI;CACT;AAID,MAAM,WAAW,+BAA+B;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,CAAC;IACX,SAAS,EAAE,4BAA4B,EAAE,CAAC;CAC1C;AAED,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,kBAAkB;;;EAKjE;AAiDD,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,aAAa,GAAG,SAAS,EAChC,GAAG,EAAE,aAAa,GAAG,SAAS;;;;;EAiB9B;AAaD,wBAAgB,yBAAyB,CACxC,QAAQ,GAA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