@fluidframework/merge-tree 2.12.0 → 2.13.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 (285) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/MergeTreeTextHelper.d.ts.map +1 -1
  3. package/dist/MergeTreeTextHelper.js +0 -2
  4. package/dist/MergeTreeTextHelper.js.map +1 -1
  5. package/dist/attributionPolicy.d.ts.map +1 -1
  6. package/dist/attributionPolicy.js +6 -16
  7. package/dist/attributionPolicy.js.map +1 -1
  8. package/dist/client.d.ts +3 -4
  9. package/dist/client.d.ts.map +1 -1
  10. package/dist/client.js +39 -28
  11. package/dist/client.js.map +1 -1
  12. package/dist/endOfTreeSegment.d.ts +2 -1
  13. package/dist/endOfTreeSegment.d.ts.map +1 -1
  14. package/dist/endOfTreeSegment.js.map +1 -1
  15. package/dist/index.d.ts +2 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +2 -4
  18. package/dist/index.js.map +1 -1
  19. package/dist/mergeTree.d.ts +8 -7
  20. package/dist/mergeTree.d.ts.map +1 -1
  21. package/dist/mergeTree.js +190 -216
  22. package/dist/mergeTree.js.map +1 -1
  23. package/dist/mergeTreeNodeWalk.d.ts.map +1 -1
  24. package/dist/mergeTreeNodeWalk.js +3 -2
  25. package/dist/mergeTreeNodeWalk.js.map +1 -1
  26. package/dist/mergeTreeNodes.d.ts +76 -162
  27. package/dist/mergeTreeNodes.d.ts.map +1 -1
  28. package/dist/mergeTreeNodes.js +100 -112
  29. package/dist/mergeTreeNodes.js.map +1 -1
  30. package/dist/mergeTreeTracking.d.ts.map +1 -1
  31. package/dist/mergeTreeTracking.js +0 -2
  32. package/dist/mergeTreeTracking.js.map +1 -1
  33. package/dist/partialLengths.d.ts +2 -2
  34. package/dist/partialLengths.d.ts.map +1 -1
  35. package/dist/partialLengths.js +28 -26
  36. package/dist/partialLengths.js.map +1 -1
  37. package/dist/perspective.d.ts +3 -2
  38. package/dist/perspective.d.ts.map +1 -1
  39. package/dist/perspective.js +11 -4
  40. package/dist/perspective.js.map +1 -1
  41. package/dist/referencePositions.d.ts.map +1 -1
  42. package/dist/referencePositions.js +4 -1
  43. package/dist/referencePositions.js.map +1 -1
  44. package/dist/revertibles.d.ts.map +1 -1
  45. package/dist/revertibles.js +10 -11
  46. package/dist/revertibles.js.map +1 -1
  47. package/dist/segmentGroupCollection.d.ts +4 -4
  48. package/dist/segmentGroupCollection.d.ts.map +1 -1
  49. package/dist/segmentGroupCollection.js +0 -6
  50. package/dist/segmentGroupCollection.js.map +1 -1
  51. package/dist/segmentInfos.d.ts +257 -0
  52. package/dist/segmentInfos.d.ts.map +1 -0
  53. package/dist/segmentInfos.js +166 -0
  54. package/dist/segmentInfos.js.map +1 -0
  55. package/dist/snapshotLoader.d.ts.map +1 -1
  56. package/dist/snapshotLoader.js +38 -44
  57. package/dist/snapshotLoader.js.map +1 -1
  58. package/dist/snapshotV1.d.ts.map +1 -1
  59. package/dist/snapshotV1.js +9 -12
  60. package/dist/snapshotV1.js.map +1 -1
  61. package/dist/snapshotlegacy.d.ts +2 -2
  62. package/dist/snapshotlegacy.d.ts.map +1 -1
  63. package/dist/snapshotlegacy.js +5 -3
  64. package/dist/snapshotlegacy.js.map +1 -1
  65. package/dist/sortedSegmentSet.d.ts.map +1 -1
  66. package/dist/sortedSegmentSet.js +5 -8
  67. package/dist/sortedSegmentSet.js.map +1 -1
  68. package/dist/test/beastTest.spec.d.ts +0 -2
  69. package/dist/test/beastTest.spec.d.ts.map +1 -1
  70. package/dist/test/beastTest.spec.js +1 -5
  71. package/dist/test/beastTest.spec.js.map +1 -1
  72. package/dist/test/client.annotateMarker.spec.js.map +1 -1
  73. package/dist/test/client.applyMsg.spec.js +15 -12
  74. package/dist/test/client.applyMsg.spec.js.map +1 -1
  75. package/dist/test/client.attributionFarm.spec.js.map +1 -1
  76. package/dist/test/client.getPosition.spec.js +3 -2
  77. package/dist/test/client.getPosition.spec.js.map +1 -1
  78. package/dist/test/client.localReference.spec.js +6 -6
  79. package/dist/test/client.localReference.spec.js.map +1 -1
  80. package/dist/test/client.localReferenceFarm.spec.js.map +1 -1
  81. package/dist/test/client.rollback.spec.js.map +1 -1
  82. package/dist/test/dirname.cjs +0 -1
  83. package/dist/test/dirname.cjs.map +1 -1
  84. package/dist/test/index.d.ts +1 -1
  85. package/dist/test/index.d.ts.map +1 -1
  86. package/dist/test/index.js +2 -4
  87. package/dist/test/index.js.map +1 -1
  88. package/dist/test/mergeTree.annotate.spec.js +3 -0
  89. package/dist/test/mergeTree.annotate.spec.js.map +1 -1
  90. package/dist/test/mergeTree.insertingWalk.spec.js +1 -1
  91. package/dist/test/mergeTree.insertingWalk.spec.js.map +1 -1
  92. package/dist/test/mergeTree.markRangeRemoved.spec.js +2 -0
  93. package/dist/test/mergeTree.markRangeRemoved.spec.js.map +1 -1
  94. package/dist/test/mergeTree.walk.spec.js.map +1 -1
  95. package/dist/test/mergeTreeOperationRunner.d.ts.map +1 -1
  96. package/dist/test/mergeTreeOperationRunner.js +2 -3
  97. package/dist/test/mergeTreeOperationRunner.js.map +1 -1
  98. package/dist/test/obliterate.spec.js.map +1 -1
  99. package/dist/test/propertyManager.spec.js.map +1 -1
  100. package/dist/test/reconnectHelper.d.ts +2 -1
  101. package/dist/test/reconnectHelper.d.ts.map +1 -1
  102. package/dist/test/reconnectHelper.js.map +1 -1
  103. package/dist/test/resetPendingSegmentsToOp.spec.js.map +1 -1
  104. package/dist/test/revertibleFarm.spec.js.map +1 -1
  105. package/dist/test/segmentGroupCollection.spec.js +15 -3
  106. package/dist/test/segmentGroupCollection.spec.js.map +1 -1
  107. package/dist/test/snapshot.utils.d.ts +2 -2
  108. package/dist/test/snapshot.utils.d.ts.map +1 -1
  109. package/dist/test/snapshot.utils.js.map +1 -1
  110. package/dist/test/sortedSegmentSet.spec.js +4 -3
  111. package/dist/test/sortedSegmentSet.spec.js.map +1 -1
  112. package/dist/test/testClient.d.ts +8 -6
  113. package/dist/test/testClient.d.ts.map +1 -1
  114. package/dist/test/testClient.js +29 -27
  115. package/dist/test/testClient.js.map +1 -1
  116. package/dist/test/testClientLogger.d.ts.map +1 -1
  117. package/dist/test/testClientLogger.js +6 -4
  118. package/dist/test/testClientLogger.js.map +1 -1
  119. package/dist/test/testUtils.d.ts +2 -2
  120. package/dist/test/testUtils.d.ts.map +1 -1
  121. package/dist/test/testUtils.js +32 -8
  122. package/dist/test/testUtils.js.map +1 -1
  123. package/dist/test/text.d.ts +2 -2
  124. package/dist/test/text.d.ts.map +1 -1
  125. package/dist/test/text.js +12 -6
  126. package/dist/test/text.js.map +1 -1
  127. package/dist/test/tracking.spec.js.map +1 -1
  128. package/dist/test/wordUnitTests.spec.js +1 -1
  129. package/dist/test/wordUnitTests.spec.js.map +1 -1
  130. package/dist/zamboni.d.ts.map +1 -1
  131. package/dist/zamboni.js +8 -7
  132. package/dist/zamboni.js.map +1 -1
  133. package/lib/MergeTreeTextHelper.d.ts.map +1 -1
  134. package/lib/MergeTreeTextHelper.js +0 -2
  135. package/lib/MergeTreeTextHelper.js.map +1 -1
  136. package/lib/attributionPolicy.d.ts.map +1 -1
  137. package/lib/attributionPolicy.js +6 -16
  138. package/lib/attributionPolicy.js.map +1 -1
  139. package/lib/client.d.ts +3 -4
  140. package/lib/client.d.ts.map +1 -1
  141. package/lib/client.js +40 -29
  142. package/lib/client.js.map +1 -1
  143. package/lib/endOfTreeSegment.d.ts +2 -1
  144. package/lib/endOfTreeSegment.d.ts.map +1 -1
  145. package/lib/endOfTreeSegment.js.map +1 -1
  146. package/lib/index.d.ts +2 -1
  147. package/lib/index.d.ts.map +1 -1
  148. package/lib/index.js +1 -1
  149. package/lib/index.js.map +1 -1
  150. package/lib/mergeTree.d.ts +8 -7
  151. package/lib/mergeTree.d.ts.map +1 -1
  152. package/lib/mergeTree.js +177 -205
  153. package/lib/mergeTree.js.map +1 -1
  154. package/lib/mergeTreeNodeWalk.d.ts.map +1 -1
  155. package/lib/mergeTreeNodeWalk.js +3 -2
  156. package/lib/mergeTreeNodeWalk.js.map +1 -1
  157. package/lib/mergeTreeNodes.d.ts +76 -162
  158. package/lib/mergeTreeNodes.d.ts.map +1 -1
  159. package/lib/mergeTreeNodes.js +95 -108
  160. package/lib/mergeTreeNodes.js.map +1 -1
  161. package/lib/mergeTreeTracking.d.ts.map +1 -1
  162. package/lib/mergeTreeTracking.js +0 -2
  163. package/lib/mergeTreeTracking.js.map +1 -1
  164. package/lib/partialLengths.d.ts +2 -2
  165. package/lib/partialLengths.d.ts.map +1 -1
  166. package/lib/partialLengths.js +25 -23
  167. package/lib/partialLengths.js.map +1 -1
  168. package/lib/perspective.d.ts +3 -2
  169. package/lib/perspective.d.ts.map +1 -1
  170. package/lib/perspective.js +11 -4
  171. package/lib/perspective.js.map +1 -1
  172. package/lib/referencePositions.d.ts.map +1 -1
  173. package/lib/referencePositions.js +4 -1
  174. package/lib/referencePositions.js.map +1 -1
  175. package/lib/revertibles.d.ts.map +1 -1
  176. package/lib/revertibles.js +8 -9
  177. package/lib/revertibles.js.map +1 -1
  178. package/lib/segmentGroupCollection.d.ts +4 -4
  179. package/lib/segmentGroupCollection.d.ts.map +1 -1
  180. package/lib/segmentGroupCollection.js +0 -6
  181. package/lib/segmentGroupCollection.js.map +1 -1
  182. package/lib/segmentInfos.d.ts +257 -0
  183. package/lib/segmentInfos.d.ts.map +1 -0
  184. package/lib/segmentInfos.js +145 -0
  185. package/lib/segmentInfos.js.map +1 -0
  186. package/lib/snapshotLoader.d.ts.map +1 -1
  187. package/lib/snapshotLoader.js +38 -44
  188. package/lib/snapshotLoader.js.map +1 -1
  189. package/lib/snapshotV1.d.ts.map +1 -1
  190. package/lib/snapshotV1.js +9 -12
  191. package/lib/snapshotV1.js.map +1 -1
  192. package/lib/snapshotlegacy.d.ts +2 -2
  193. package/lib/snapshotlegacy.d.ts.map +1 -1
  194. package/lib/snapshotlegacy.js +5 -3
  195. package/lib/snapshotlegacy.js.map +1 -1
  196. package/lib/sortedSegmentSet.d.ts.map +1 -1
  197. package/lib/sortedSegmentSet.js +5 -8
  198. package/lib/sortedSegmentSet.js.map +1 -1
  199. package/lib/test/beastTest.spec.d.ts +0 -2
  200. package/lib/test/beastTest.spec.d.ts.map +1 -1
  201. package/lib/test/beastTest.spec.js +0 -3
  202. package/lib/test/beastTest.spec.js.map +1 -1
  203. package/lib/test/client.annotateMarker.spec.js.map +1 -1
  204. package/lib/test/client.applyMsg.spec.js +15 -12
  205. package/lib/test/client.applyMsg.spec.js.map +1 -1
  206. package/lib/test/client.attributionFarm.spec.js.map +1 -1
  207. package/lib/test/client.getPosition.spec.js +3 -2
  208. package/lib/test/client.getPosition.spec.js.map +1 -1
  209. package/lib/test/client.localReference.spec.js +1 -1
  210. package/lib/test/client.localReference.spec.js.map +1 -1
  211. package/lib/test/client.localReferenceFarm.spec.js.map +1 -1
  212. package/lib/test/client.rollback.spec.js +1 -1
  213. package/lib/test/client.rollback.spec.js.map +1 -1
  214. package/lib/test/dirname.cjs +0 -1
  215. package/lib/test/dirname.cjs.map +1 -1
  216. package/lib/test/index.d.ts +1 -1
  217. package/lib/test/index.d.ts.map +1 -1
  218. package/lib/test/index.js +1 -1
  219. package/lib/test/index.js.map +1 -1
  220. package/lib/test/mergeTree.annotate.spec.js +3 -0
  221. package/lib/test/mergeTree.annotate.spec.js.map +1 -1
  222. package/lib/test/mergeTree.insertingWalk.spec.js +2 -2
  223. package/lib/test/mergeTree.insertingWalk.spec.js.map +1 -1
  224. package/lib/test/mergeTree.markRangeRemoved.spec.js +2 -0
  225. package/lib/test/mergeTree.markRangeRemoved.spec.js.map +1 -1
  226. package/lib/test/mergeTree.walk.spec.js.map +1 -1
  227. package/lib/test/mergeTreeOperationRunner.d.ts.map +1 -1
  228. package/lib/test/mergeTreeOperationRunner.js +1 -2
  229. package/lib/test/mergeTreeOperationRunner.js.map +1 -1
  230. package/lib/test/obliterate.spec.js.map +1 -1
  231. package/lib/test/propertyManager.spec.js.map +1 -1
  232. package/lib/test/reconnectHelper.d.ts +2 -1
  233. package/lib/test/reconnectHelper.d.ts.map +1 -1
  234. package/lib/test/reconnectHelper.js.map +1 -1
  235. package/lib/test/resetPendingSegmentsToOp.spec.js.map +1 -1
  236. package/lib/test/revertibleFarm.spec.js.map +1 -1
  237. package/lib/test/segmentGroupCollection.spec.js +15 -3
  238. package/lib/test/segmentGroupCollection.spec.js.map +1 -1
  239. package/lib/test/snapshot.utils.d.ts +2 -2
  240. package/lib/test/snapshot.utils.d.ts.map +1 -1
  241. package/lib/test/snapshot.utils.js.map +1 -1
  242. package/lib/test/sortedSegmentSet.spec.js +4 -3
  243. package/lib/test/sortedSegmentSet.spec.js.map +1 -1
  244. package/lib/test/testClient.d.ts +8 -6
  245. package/lib/test/testClient.d.ts.map +1 -1
  246. package/lib/test/testClient.js +30 -28
  247. package/lib/test/testClient.js.map +1 -1
  248. package/lib/test/testClientLogger.d.ts.map +1 -1
  249. package/lib/test/testClientLogger.js +5 -3
  250. package/lib/test/testClientLogger.js.map +1 -1
  251. package/lib/test/testUtils.d.ts +2 -2
  252. package/lib/test/testUtils.d.ts.map +1 -1
  253. package/lib/test/testUtils.js +9 -8
  254. package/lib/test/testUtils.js.map +1 -1
  255. package/lib/test/text.d.ts +2 -2
  256. package/lib/test/text.d.ts.map +1 -1
  257. package/lib/test/text.js +12 -6
  258. package/lib/test/text.js.map +1 -1
  259. package/lib/test/tracking.spec.js.map +1 -1
  260. package/lib/test/wordUnitTests.spec.js +1 -1
  261. package/lib/test/wordUnitTests.spec.js.map +1 -1
  262. package/lib/zamboni.d.ts.map +1 -1
  263. package/lib/zamboni.js +7 -6
  264. package/lib/zamboni.js.map +1 -1
  265. package/package.json +17 -17
  266. package/src/MergeTreeTextHelper.ts +2 -4
  267. package/src/attributionPolicy.ts +5 -13
  268. package/src/client.ts +55 -44
  269. package/src/endOfTreeSegment.ts +3 -3
  270. package/src/index.ts +4 -6
  271. package/src/mergeTree.ts +245 -282
  272. package/src/mergeTreeNodeWalk.ts +3 -2
  273. package/src/mergeTreeNodes.ts +190 -322
  274. package/src/mergeTreeTracking.ts +0 -3
  275. package/src/partialLengths.ts +42 -27
  276. package/src/perspective.ts +27 -4
  277. package/src/referencePositions.ts +4 -1
  278. package/src/revertibles.ts +19 -13
  279. package/src/segmentGroupCollection.ts +7 -18
  280. package/src/segmentInfos.ts +377 -0
  281. package/src/snapshotLoader.ts +60 -57
  282. package/src/snapshotV1.ts +14 -16
  283. package/src/snapshotlegacy.ts +12 -17
  284. package/src/sortedSegmentSet.ts +6 -8
  285. package/src/zamboni.ts +10 -12
@@ -1 +1 @@
1
- {"version":3,"file":"mergeTreeNodeWalk.d.ts","sourceRoot":"","sources":["../src/mergeTreeNodeWalk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAErF,eAAO,MAAM,UAAU;;CAEb,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC;AAEpD,eAAO,MAAM,UAAU;;;;CAKb,CAAC;AAGX,MAAM,MAAM,UAAU,GACnB,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,GAC5C,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAE7B;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CACjC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,UAAU,EAC7C,kBAAkB,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,UAAU,EACtD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,EACtC,OAAO,GAAE,OAAc,GACrB,OAAO,CAyET;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC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H,wBAAgB,gBAAgB,CAC/B,SAAS,EAAE,UAAU,EACrB,UAAU,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,OAAO,GAAG,SAAS,GACpD,OAAO,CAcT;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAChC,SAAS,EAAE,UAAU,EACrB,UAAU,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,OAAO,GAAG,SAAS,GACpD,OAAO,CAeT;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CACnC,UAAU,EAAE,UAAU,EACtB,UAAU,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,GAAG,SAAS,GAAG,IAAI,GAC/D,OAAO,CAqBT"}
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import { isMergeNodeInfo } from "./segmentInfos.js";
5
6
  export const LeafAction = {
6
7
  Exit: false,
7
8
  };
@@ -96,7 +97,7 @@ export function depthFirstNodeWalk(startBlock, startChild, downAction, leafActio
96
97
  * All segments past `node` are visited, regardless of their visibility.
97
98
  */
98
99
  export function forwardExcursion(startNode, leafAction) {
99
- if (startNode.parent === undefined) {
100
+ if (!isMergeNodeInfo(startNode)) {
100
101
  return true;
101
102
  }
102
103
  return depthFirstNodeWalk(startNode.parent,
@@ -110,7 +111,7 @@ export function forwardExcursion(startNode, leafAction) {
110
111
  * All segments past `node` are visited, regardless of their visibility.
111
112
  */
112
113
  export function backwardExcursion(startNode, leafAction) {
113
- if (startNode.parent === undefined) {
114
+ if (!isMergeNodeInfo(startNode)) {
114
115
  return true;
115
116
  }
116
117
  return depthFirstNodeWalk(startNode.parent,
@@ -1 +1 @@
1
- {"version":3,"file":"mergeTreeNodeWalk.js","sourceRoot":"","sources":["../src/mergeTreeNodeWalk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,IAAI,EAAE,KAAK;CAC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M,EAAE,CAAC;QACvE,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;IAED,OAAO,kBAAkB,CACxB,UAAU,EACV,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EACtB,SAAS,CAAC,IAAI,KAAK,CAAC;QACnB,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,CAAC,IAAI,EAAqB,EAAE,CAC5B,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EACrE,UAAU,CACV,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ISegmentLeaf, type MergeBlock, IMergeNode } from \"./mergeTreeNodes.js\";\n\nexport const LeafAction = {\n\tExit: false,\n} as const;\n\nexport type LeafAction = boolean | undefined | void;\n\nexport const NodeAction = {\n\tContinue: undefined,\n\t// exit is false to unify with leafActionOverride\n\tExit: LeafAction.Exit,\n\tSkip: 2,\n} as const;\n\n// we exclude true from, as we only want one continue value, undefined\nexport type NodeAction =\n\t| (typeof NodeAction)[keyof typeof NodeAction]\n\t| Exclude<LeafAction, true>;\n\n/**\n * Does a depth first walk of the tree from the specific start.\n *\n * @param startBlock - The block of the tree to start the walk from\n * @param startChild - The child of that block to start from\n * @param downAction - Called as we walk down the tree to the leaves.\n * @param leafActionOverride - Overrides downAction for leaves, generally used without downAction\n * @param upAction - Called after all the children of a block are walked.\n * @param forward - whether to walk forward or backward\n * @returns true if we naturally exit, false if exiting due to Exit action result\n */\nexport function depthFirstNodeWalk(\n\tstartBlock: MergeBlock,\n\tstartChild: IMergeNode | undefined,\n\tdownAction?: (node: IMergeNode) => NodeAction,\n\tleafActionOverride?: (seg: ISegmentLeaf) => LeafAction,\n\tupAction?: (block: MergeBlock) => void,\n\tforward: boolean = true,\n): boolean {\n\tconst increment = forward ? 1 : -1;\n\tconst leafAction = leafActionOverride ?? downAction;\n\tif (leafAction === undefined) {\n\t\treturn true;\n\t}\n\n\tlet block = startBlock;\n\tlet childCount = block.childCount;\n\tlet start: IMergeNode | undefined = startChild;\n\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// go down to the leaf level\n\t\tlet blockResult: NodeAction;\n\t\twhile (start?.isLeaf() === false) {\n\t\t\t// cast is safe due to isLeaf === false in while above\n\t\t\tblock = start as MergeBlock;\n\t\t\tchildCount = block.childCount;\n\t\t\tblockResult = downAction?.(block);\n\t\t\t// setting start undefined will skip the leaf walk\n\t\t\t// so if the block result isn't continue, set it\n\t\t\t// undefined\n\t\t\tstart =\n\t\t\t\tblockResult === NodeAction.Continue\n\t\t\t\t\t? block.children[forward ? 0 : childCount - 1]\n\t\t\t\t\t: undefined;\n\t\t}\n\n\t\tlet exit = blockResult === NodeAction.Exit;\n\n\t\t// walk the leaves if we reached them\n\t\tif (start !== undefined) {\n\t\t\tfor (let i = start.index; i !== -1 && i !== childCount; i += increment) {\n\t\t\t\t// the above loop ensures start is a leaf or undefined, so all children\n\t\t\t\t// will be leaves if start exits, so the cast is safe\n\t\t\t\tif (leafAction(block.children[i] as ISegmentLeaf) === LeafAction.Exit) {\n\t\t\t\t\texit = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if there is no upAction, we don't need to walk up before exiting\n\t\tif (upAction === undefined && exit) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// since we already enumerated the children\n\t\t// we walk up to the next level until there is a sibling\n\t\t// or all the way up if exit is true\n\t\tlet nextIndex = -1;\n\t\tdo {\n\t\t\t// if the blockAction was exit or skip\n\t\t\t// we shouldn't process that block again,\n\t\t\t// if there are subsequent parents while walking up\n\t\t\t// we will process those.\n\t\t\tif (blockResult === NodeAction.Continue) {\n\t\t\t\tupAction?.(block);\n\t\t\t} else {\n\t\t\t\tblockResult = NodeAction.Continue;\n\t\t\t}\n\t\t\tif (block.parent === undefined) {\n\t\t\t\treturn !exit;\n\t\t\t}\n\t\t\tstart = block;\n\t\t\tblock = block.parent;\n\t\t\tchildCount = block.childCount;\n\t\t\tnextIndex = start.index + increment;\n\t\t} while (exit || nextIndex === -1 || nextIndex === childCount);\n\t\t// the above loop ensured that siblings are possible\n\t\tstart = block.children[nextIndex];\n\t}\n}\n\n/**\n * Visit segments starting from node's right/far/forward siblings, then up to node's parent.\n * All segments past `node` are visited, regardless of their visibility.\n */\nexport function forwardExcursion(\n\tstartNode: IMergeNode,\n\tleafAction: (seg: ISegmentLeaf) => boolean | undefined,\n): boolean {\n\tif (startNode.parent === undefined) {\n\t\treturn true;\n\t}\n\n\treturn depthFirstNodeWalk(\n\t\tstartNode.parent,\n\t\t// this will either be the sibling, or undefined\n\t\t// either is fine, and will result in skipping\n\t\t// the startNode only\n\t\tstartNode.parent.children[startNode.index + 1],\n\t\tundefined /* downAction */,\n\t\tleafAction,\n\t);\n}\n\n/**\n * Visit segments starting from node's left/near/backwards siblings, then up to node's parent.\n * All segments past `node` are visited, regardless of their visibility.\n */\nexport function backwardExcursion(\n\tstartNode: IMergeNode,\n\tleafAction: (seg: ISegmentLeaf) => boolean | undefined,\n): boolean {\n\tif (startNode.parent === undefined) {\n\t\treturn true;\n\t}\n\treturn depthFirstNodeWalk(\n\t\tstartNode.parent,\n\t\t// this will either be the sibling, or undefined\n\t\t// either is fine, and will result in skipping\n\t\t// the startNode only\n\t\tstartNode.parent.children[startNode.index - 1],\n\t\tundefined /* downAction */,\n\t\tleafAction,\n\t\tundefined /* upAction */,\n\t\tfalse /* forward */,\n\t);\n}\n\n/**\n * Walks all segments below the specific start block\n * @param startBlock - The block to start the walk at\n * @param leafAction - The action to perform on the leaves\n * @returns true if we naturally exit, false if exiting due to leaf action result\n */\nexport function walkAllChildSegments(\n\tstartBlock: MergeBlock,\n\tleafAction: (segment: ISegmentLeaf) => boolean | undefined | void,\n): boolean {\n\tif (startBlock.childCount === 0) {\n\t\treturn true;\n\t}\n\n\t// undefined shouldn't actually be added, but this allows subsequent check for `node.parent` to typecheck\n\t// without further runtime work.\n\tconst ancestors = new Set<MergeBlock | undefined>();\n\tfor (let cur = startBlock.parent; cur !== undefined; cur = cur.parent) {\n\t\tancestors.add(cur);\n\t}\n\n\treturn depthFirstNodeWalk(\n\t\tstartBlock,\n\t\tstartBlock.children[0],\n\t\tancestors.size === 0\n\t\t\t? undefined\n\t\t\t: (node): false | undefined =>\n\t\t\t\t\tancestors.has(node.parent) ? NodeAction.Exit : NodeAction.Continue,\n\t\tleafAction,\n\t);\n}\n"]}
1
+ {"version":3,"file":"mergeTreeNodeWalk.js","sourceRoot":"","sources":["../src/mergeTreeNodeWalk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,IAAI,EAAE,KAAK;CACF,CAAC;AAIX,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,QAAQ,EAAE,SAAS;IACnB,iDAAiD;IACjD,IAAI,EAAE,UAAU,CAAC,IAAI;IACrB,IAAI,EAAE,CAAC;CACE,CAAC;AAOX;;;;;;;;;;GAUG;AACH,MAAM,UAAU,kBAAkB,CACjC,UAAsB,EACtB,UAAkC,EAClC,UAA6C,EAC7C,kBAAsD,EACtD,QAAsC,EACtC,UAAmB,IAAI;IAEvB,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,kBAAkB,IAAI,UAAU,CAAC;IACpD,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,KAAK,GAAG,UAAU,CAAC;IACvB,IAAI,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;IAClC,IAAI,KAAK,GAA2B,UAAU,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BAAkB,CACxB,SAAS,CAAC,MAAM;IAChB,gDAAgD;IAChD,8CAA8C;IAC9C,qBAAqB;IACrB,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,GAAG,CAAC,CAAC,EAC9C,SAAS,CAAC,gBAAgB,EAC1B,UAAU,EACV,SAAS,CAAC,cAAc,EACxB,KAAK,CAAC,aAAa,CACnB,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CACnC,UAAsB,EACtB,UAAiE;IAEjE,IAAI,UAAU,CAAC,UAAU,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC;IACb,CAAC;IAED,yGAAyG;IACzG,gCAAgC;IAChC,MAAM,SAAS,GAAG,IAAI,GAAG,EAA0B,CAAC;IACpD,KAAK,IAAI,GAAG,GAAG,UAAU,CAAC,MAAM,EAAE,GAAG,KAAK,SAAS,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;QACvE,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;IAED,OAAO,kBAAkB,CACxB,UAAU,EACV,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,EACtB,SAAS,CAAC,IAAI,KAAK,CAAC;QACnB,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,CAAC,IAAI,EAAqB,EAAE,CAC5B,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EACrE,UAAU,CACV,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ISegmentLeaf, type MergeBlock, IMergeNode } from \"./mergeTreeNodes.js\";\nimport { isMergeNodeInfo } from \"./segmentInfos.js\";\n\nexport const LeafAction = {\n\tExit: false,\n} as const;\n\nexport type LeafAction = boolean | undefined | void;\n\nexport const NodeAction = {\n\tContinue: undefined,\n\t// exit is false to unify with leafActionOverride\n\tExit: LeafAction.Exit,\n\tSkip: 2,\n} as const;\n\n// we exclude true from, as we only want one continue value, undefined\nexport type NodeAction =\n\t| (typeof NodeAction)[keyof typeof NodeAction]\n\t| Exclude<LeafAction, true>;\n\n/**\n * Does a depth first walk of the tree from the specific start.\n *\n * @param startBlock - The block of the tree to start the walk from\n * @param startChild - The child of that block to start from\n * @param downAction - Called as we walk down the tree to the leaves.\n * @param leafActionOverride - Overrides downAction for leaves, generally used without downAction\n * @param upAction - Called after all the children of a block are walked.\n * @param forward - whether to walk forward or backward\n * @returns true if we naturally exit, false if exiting due to Exit action result\n */\nexport function depthFirstNodeWalk(\n\tstartBlock: MergeBlock,\n\tstartChild: IMergeNode | undefined,\n\tdownAction?: (node: IMergeNode) => NodeAction,\n\tleafActionOverride?: (seg: ISegmentLeaf) => LeafAction,\n\tupAction?: (block: MergeBlock) => void,\n\tforward: boolean = true,\n): boolean {\n\tconst increment = forward ? 1 : -1;\n\tconst leafAction = leafActionOverride ?? downAction;\n\tif (leafAction === undefined) {\n\t\treturn true;\n\t}\n\n\tlet block = startBlock;\n\tlet childCount = block.childCount;\n\tlet start: IMergeNode | undefined = startChild;\n\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// go down to the leaf level\n\t\tlet blockResult: NodeAction;\n\t\twhile (start?.isLeaf() === false) {\n\t\t\t// cast is safe due to isLeaf === false in while above\n\t\t\tblock = start as MergeBlock;\n\t\t\tchildCount = block.childCount;\n\t\t\tblockResult = downAction?.(block);\n\t\t\t// setting start undefined will skip the leaf walk\n\t\t\t// so if the block result isn't continue, set it\n\t\t\t// undefined\n\t\t\tstart =\n\t\t\t\tblockResult === NodeAction.Continue\n\t\t\t\t\t? block.children[forward ? 0 : childCount - 1]\n\t\t\t\t\t: undefined;\n\t\t}\n\n\t\tlet exit = blockResult === NodeAction.Exit;\n\n\t\t// walk the leaves if we reached them\n\t\tif (start !== undefined) {\n\t\t\tfor (let i = start.index; i !== -1 && i !== childCount; i += increment) {\n\t\t\t\t// the above loop ensures start is a leaf or undefined, so all children\n\t\t\t\t// will be leaves if start exits, so the cast is safe\n\t\t\t\tif (leafAction(block.children[i] as ISegmentLeaf) === LeafAction.Exit) {\n\t\t\t\t\texit = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// if there is no upAction, we don't need to walk up before exiting\n\t\tif (upAction === undefined && exit) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// since we already enumerated the children\n\t\t// we walk up to the next level until there is a sibling\n\t\t// or all the way up if exit is true\n\t\tlet nextIndex = -1;\n\t\tdo {\n\t\t\t// if the blockAction was exit or skip\n\t\t\t// we shouldn't process that block again,\n\t\t\t// if there are subsequent parents while walking up\n\t\t\t// we will process those.\n\t\t\tif (blockResult === NodeAction.Continue) {\n\t\t\t\tupAction?.(block);\n\t\t\t} else {\n\t\t\t\tblockResult = NodeAction.Continue;\n\t\t\t}\n\t\t\tif (block.parent === undefined) {\n\t\t\t\treturn !exit;\n\t\t\t}\n\t\t\tstart = block;\n\t\t\tblock = block.parent;\n\t\t\tchildCount = block.childCount;\n\t\t\tnextIndex = start.index + increment;\n\t\t} while (exit || nextIndex === -1 || nextIndex === childCount);\n\t\t// the above loop ensured that siblings are possible\n\t\tstart = block.children[nextIndex];\n\t}\n}\n\n/**\n * Visit segments starting from node's right/far/forward siblings, then up to node's parent.\n * All segments past `node` are visited, regardless of their visibility.\n */\nexport function forwardExcursion(\n\tstartNode: IMergeNode,\n\tleafAction: (seg: ISegmentLeaf) => boolean | undefined,\n): boolean {\n\tif (!isMergeNodeInfo(startNode)) {\n\t\treturn true;\n\t}\n\n\treturn depthFirstNodeWalk(\n\t\tstartNode.parent,\n\t\t// this will either be the sibling, or undefined\n\t\t// either is fine, and will result in skipping\n\t\t// the startNode only\n\t\tstartNode.parent.children[startNode.index + 1],\n\t\tundefined /* downAction */,\n\t\tleafAction,\n\t);\n}\n\n/**\n * Visit segments starting from node's left/near/backwards siblings, then up to node's parent.\n * All segments past `node` are visited, regardless of their visibility.\n */\nexport function backwardExcursion(\n\tstartNode: IMergeNode,\n\tleafAction: (seg: ISegmentLeaf) => boolean | undefined,\n): boolean {\n\tif (!isMergeNodeInfo(startNode)) {\n\t\treturn true;\n\t}\n\treturn depthFirstNodeWalk(\n\t\tstartNode.parent,\n\t\t// this will either be the sibling, or undefined\n\t\t// either is fine, and will result in skipping\n\t\t// the startNode only\n\t\tstartNode.parent.children[startNode.index - 1],\n\t\tundefined /* downAction */,\n\t\tleafAction,\n\t\tundefined /* upAction */,\n\t\tfalse /* forward */,\n\t);\n}\n\n/**\n * Walks all segments below the specific start block\n * @param startBlock - The block to start the walk at\n * @param leafAction - The action to perform on the leaves\n * @returns true if we naturally exit, false if exiting due to leaf action result\n */\nexport function walkAllChildSegments(\n\tstartBlock: MergeBlock,\n\tleafAction: (segment: ISegmentLeaf) => boolean | undefined | void,\n): boolean {\n\tif (startBlock.childCount === 0) {\n\t\treturn true;\n\t}\n\n\t// undefined shouldn't actually be added, but this allows subsequent check for `node.parent` to typecheck\n\t// without further runtime work.\n\tconst ancestors = new Set<MergeBlock | undefined>();\n\tfor (let cur = startBlock.parent; cur !== undefined; cur = cur.parent) {\n\t\tancestors.add(cur);\n\t}\n\n\treturn depthFirstNodeWalk(\n\t\tstartBlock,\n\t\tstartBlock.children[0],\n\t\tancestors.size === 0\n\t\t\t? undefined\n\t\t\t: (node): false | undefined =>\n\t\t\t\t\tancestors.has(node.parent) ? NodeAction.Exit : NodeAction.Continue,\n\t\tleafAction,\n\t);\n}\n"]}
@@ -11,6 +11,7 @@ import type { PartialSequenceLengths } from "./partialLengths.js";
11
11
  import { PropertySet, type MapLike } from "./properties.js";
12
12
  import { ReferencePosition } from "./referencePositions.js";
13
13
  import { SegmentGroupCollection } from "./segmentGroupCollection.js";
14
+ import { type IInsertionInfo, type IMergeNodeInfo, type IMoveInfo, type IRemovalInfo, type SegmentWithInfo } from "./segmentInfos.js";
14
15
  import { PropertiesManager } from "./segmentPropertiesManager.js";
15
16
  /**
16
17
  * Common properties for a node in a merge tree.
@@ -35,12 +36,15 @@ export interface IMergeNodeCommon {
35
36
  * like sequence and matrix.
36
37
  *
37
38
  * We use tiered interface to control visibility of segment properties.
38
- * This sits between ISegment and ISegmentLeaf. It should only expose
39
+ * This sits between ISegment and ISegmentPrivate. It should only expose
39
40
  * things tagged internal.
40
41
  *
42
+ * Everything added here beyond ISegment should be optional to keep the ability
43
+ * to implicitly convert between the tiered interfaces.
44
+ *
41
45
  * @internal
42
46
  */
43
- export type ISegmentInternal = Omit<ISegment, keyof IRemovalInfo | keyof IMoveInfo> & Partial<IMergeNodeCommon> & Partial<IRemovalInfo> & Partial<IMoveInfo> & {
47
+ export type ISegmentInternal = Omit<ISegment, keyof IRemovalInfo | keyof IMoveInfo> & {
44
48
  localRefs?: LocalReferenceCollection;
45
49
  };
46
50
  /**
@@ -48,11 +52,14 @@ export type ISegmentInternal = Omit<ISegment, keyof IRemovalInfo | keyof IMoveIn
48
52
  * This is the lowest interface and is not exported, it site below ISegment and ISegmentInternal.
49
53
  * It should only expose unexported things.
50
54
  *
55
+ * Everything added here beyond ISegmentInternal should be optional to keep the ability
56
+ * to implicitly convert between the tiered interfaces.
57
+ *
51
58
  * someday we may split tree leaves from segments, but for now they are the same
52
59
  * this is just a convenience type that makes it clear that we need something that is both a segment and a leaf node
53
60
  */
54
- export type ISegmentLeaf = ISegmentInternal & {
55
- parent?: MergeBlock;
61
+ export type ISegmentPrivate = ISegmentInternal & // eslint-disable-next-line import/no-deprecated
62
+ Partial<IInsertionInfo & IMergeNodeInfo> & {
56
63
  segmentGroups?: SegmentGroupCollection;
57
64
  propertyManager?: PropertiesManager;
58
65
  /**
@@ -61,100 +68,59 @@ export type ISegmentLeaf = ISegmentInternal & {
61
68
  * then the segment is not obliterated because it is aware of the latest obliteration.
62
69
  */
63
70
  prevObliterateByInserter?: ObliterateInfo;
71
+ /**
72
+ * Whether or not this segment is a special segment denoting the start or
73
+ * end of the tree
74
+ *
75
+ * Endpoint segments are imaginary segments positioned immediately before or
76
+ * after the tree. These segments cannot be referenced by regular operations
77
+ * and exist primarily as a bucket for local references to slide onto during
78
+ * deletion of regular segments.
79
+ */
80
+ readonly endpointType?: "start" | "end";
64
81
  };
65
- export type IMergeNode = MergeBlock | ISegmentLeaf;
66
82
  /**
67
- * Contains removal information associated to an {@link ISegment}.
68
- * @legacy
69
- * @alpha
70
- * @deprecated - This interface will be removed in 2.20 with no replacement.
83
+ * Segment leafs are segments that have both IMergeNodeInfo and IInsertionInfo. This means they
84
+ * are inserted at a position, and bound via their parent MergeBlock to the merge tree. MergeBlocks'
85
+ * children are either a segment leaf, or another merge block for interior nodes of the tree. When working
86
+ * within the tree it is generally unnecessary to use type coercions methods common to the infos, and segment
87
+ * leafs, as the children of MergeBlocks are already well typed. However, when segments come from outside the
88
+ * merge tree, like via client's public methods, it becomes necessary to use the type coercions methods
89
+ * to ensure the passed in segment objects are correctly bound to the merge tree.
71
90
  */
72
- export interface IRemovalInfo {
73
- /**
74
- * Local seq at which this segment was removed, if the removal is yet-to-be acked.
75
- */
76
- localRemovedSeq?: number;
77
- /**
78
- * Seq at which this segment was removed.
79
- */
80
- removedSeq: number;
81
- /**
82
- * List of client IDs that have removed this segment.
83
- * The client that actually removed the segment (i.e. whose removal op was sequenced first) is stored as the first
84
- * client in this list. Other clients in the list have all issued concurrent ops to remove the segment.
85
- * @remarks When this list has length \> 1, this is referred to as the "overlapping remove" case.
86
- */
87
- removedClientIds: number[];
88
- }
91
+ export type ISegmentLeaf = SegmentWithInfo<IMergeNodeInfo & IInsertionInfo>;
92
+ /**
93
+ * A type-guard which determines if the segment has segment leaf, and
94
+ * returns true if it does, along with applying strong typing.
95
+ * @param nodeLike - The segment-like object to check.
96
+ * @returns True if the segment is a segment leaf, otherwise false.
97
+ */
98
+ export declare const isSegmentLeaf: (segmentLike: unknown) => segmentLike is ISegmentLeaf;
89
99
  /**
90
- * Returns the removal information for a segment.
100
+ * Converts a segment-like object to a segment leaf object if possible.
91
101
  *
92
- * @internal
102
+ * @param segmentLike - The segment-like object to convert.
103
+ * @returns The segment leaf if the conversion is possible, otherwise undefined.
93
104
  */
94
- export declare function toRemovalInfo(maybe: Partial<IRemovalInfo> | undefined): IRemovalInfo | undefined;
105
+ export declare const toSegmentLeaf: (segmentLike: unknown) => ISegmentLeaf | undefined;
95
106
  /**
96
- * Tracks information about when and where this segment was moved to.
107
+ * Asserts that the segment is a segment leaf. Usage of this function should not produce a user facing error.
97
108
  *
98
- * Note that merge-tree does not currently support moving and only supports
99
- * obliterate. The fields below include "move" in their names to avoid renaming
100
- * in the future, when moves _are_ supported.
101
- * @legacy
102
- * @alpha
103
- * @deprecated - This interface will be removed in 2.20 with no replacement.
109
+ * @param segmentLike - The segment-like object to check.
110
+ * @throws Will throw an error if the segment is not a segment leaf.
104
111
  */
105
- export interface IMoveInfo {
106
- /**
107
- * Local seq at which this segment was moved if the move is yet-to-be
108
- * acked.
109
- */
110
- localMovedSeq?: number;
111
- /**
112
- * The first seq at which this segment was moved.
113
- */
114
- movedSeq: number;
115
- /**
116
- * All seqs at which this segment was moved. In the case of overlapping,
117
- * concurrent moves this array will contain multiple seqs.
118
- *
119
- * The seq at `movedSeqs[i]` corresponds to the client id at `movedClientIds[i]`.
120
- *
121
- * The first element corresponds to the seq of the first move
122
- */
123
- movedSeqs: number[];
124
- /**
125
- * A reference to the inserted destination segment corresponding to this
126
- * segment's move.
127
- *
128
- * If undefined, the move was an obliterate.
129
- *
130
- * Currently this field is unused, as we only support obliterate operations
131
- */
132
- moveDst?: ReferencePosition;
133
- /**
134
- * List of client IDs that have moved this segment.
135
- *
136
- * The client that actually moved the segment (i.e. whose move op was sequenced
137
- * first) is stored as the first client in this list. Other clients in the
138
- * list have all issued concurrent ops to move the segment.
139
- */
140
- movedClientIds: number[];
141
- /**
142
- * If this segment was inserted into a concurrently moved range and
143
- * the move op was sequenced before the insertion op. In this case,
144
- * the segment is visible only to the inserting client
145
- *
146
- * `wasMovedOnInsert` only applies for acked obliterates. That is, if
147
- * a segment inserted by a remote client is moved on insertion by a local
148
- * and unacked obliterate, we do not consider it as having been moved
149
- * on insert
150
- *
151
- * If a segment is moved on insertion, its length is only ever visible to
152
- * the client that inserted the segment. This is relevant in partial length
153
- * calculations
154
- */
155
- wasMovedOnInsert: boolean;
156
- }
157
- export declare function toMoveInfo(maybe: Partial<IMoveInfo> | undefined): IMoveInfo | undefined;
112
+ export declare const assertSegmentLeaf: (segmentLike: unknown) => asserts segmentLike is ISegmentLeaf;
113
+ /**
114
+ * This type is used for building MergeBlocks from segments and other MergeBlocks. We need this
115
+ * type as segments may not yet be bound to the tree, so lack merge node info which is required for
116
+ * segment leafs.
117
+ */
118
+ export type IMergeNodeBuilder = MergeBlock | SegmentWithInfo<IInsertionInfo>;
119
+ /**
120
+ * This type is used by MergeBlocks to define their children, which are either segments or other
121
+ * MergeBlocks.
122
+ */
123
+ export type IMergeNode = MergeBlock | ISegmentLeaf;
158
124
  /**
159
125
  * A segment representing a portion of the merge tree.
160
126
  * Segments are leaf nodes of the merge tree and contain data.
@@ -205,18 +171,6 @@ export interface ISegment {
205
171
  * @deprecated - This property will be removed in 2.20 with no replacement.
206
172
  */
207
173
  localSeq?: number;
208
- /**
209
- * Local seq at which this segment was removed. If this is defined, `removedSeq` will initially be set to
210
- * UnassignedSequenceNumber. However, if another client concurrently removes the same segment, `removedSeq`
211
- * will be updated to the seq at which that client removed this segment.
212
- *
213
- * Like {@link ISegment.localSeq}, this field is cleared once the local removal of the segment is acked.
214
- *
215
- * @privateRemarks
216
- * See {@link CollaborationWindow.localSeq} for more information on the semantics of localSeq.
217
- * @deprecated - This property will be removed in 2.20 with no replacement.
218
- */
219
- localRemovedSeq?: number;
220
174
  /**
221
175
  * Seq at which this segment was inserted.
222
176
  * If undefined, it is assumed the segment was inserted prior to the collab window's minimum sequence number.
@@ -253,6 +207,18 @@ export interface ISegment {
253
207
  * @deprecated - This property will be removed in 2.20 with no replacement.
254
208
  */
255
209
  ordinal: string;
210
+ /**
211
+ * Local seq at which this segment was removed. If this is defined, `removedSeq` will initially be set to
212
+ * UnassignedSequenceNumber. However, if another client concurrently removes the same segment, `removedSeq`
213
+ * will be updated to the seq at which that client removed this segment.
214
+ *
215
+ * Like {@link ISegment.localSeq}, this field is cleared once the local removal of the segment is acked.
216
+ *
217
+ * @privateRemarks
218
+ * See {@link CollaborationWindow.localSeq} for more information on the semantics of localSeq.
219
+ * @deprecated - This property will be removed in 2.20 with no replacement.
220
+ */
221
+ localRemovedSeq?: number;
256
222
  /**
257
223
  * {@inheritDoc @fluidframework/merge-tree#IRemovalInfo.removedSeq}
258
224
  * @deprecated - This property will be removed in 2.20 with no replacement.
@@ -300,12 +266,6 @@ export interface ISegment {
300
266
  * @alpha
301
267
  */
302
268
  export declare function segmentIsRemoved(segment: ISegment): boolean;
303
- /**
304
- * @internal
305
- */
306
- export interface IMarkerModifiedAction {
307
- (marker: Marker): void;
308
- }
309
269
  /**
310
270
  * @legacy
311
271
  * @alpha
@@ -313,46 +273,15 @@ export interface IMarkerModifiedAction {
313
273
  export interface ISegmentAction<TClientData> {
314
274
  (segment: ISegment, pos: number, refSeq: number, clientId: number, start: number, end: number, accum: TClientData): boolean;
315
275
  }
316
- /**
317
- * @internal
318
- */
319
276
  export interface ISegmentChanges {
320
- next?: ISegmentInternal;
321
- replaceCurrent?: ISegmentInternal;
277
+ next?: SegmentWithInfo<IInsertionInfo>;
278
+ replaceCurrent?: SegmentWithInfo<IInsertionInfo>;
322
279
  }
323
- /**
324
- * @internal
325
- */
326
- export interface BlockAction<TClientData> {
327
- (block: MergeBlock, pos: number, refSeq: number, clientId: number, start: number | undefined, end: number | undefined, accum: TClientData): boolean;
328
- }
329
- /**
330
- * @internal
331
- */
332
- export interface NodeAction<TClientData> {
333
- (node: IMergeNode, pos: number, refSeq: number, clientId: number, start: number | undefined, end: number | undefined, clientData: TClientData): boolean;
334
- }
335
- /**
336
- * @internal
337
- */
338
280
  export interface InsertContext {
339
- candidateSegment?: ISegmentInternal;
340
- leaf: (segment: ISegmentInternal | undefined, pos: number, ic: InsertContext) => ISegmentChanges;
281
+ candidateSegment?: SegmentWithInfo<IInsertionInfo>;
282
+ leaf: (segment: ISegmentLeaf | undefined, pos: number, ic: InsertContext) => ISegmentChanges;
341
283
  continuePredicate?: (continueFromBlock: MergeBlock) => boolean;
342
284
  }
343
- /**
344
- * @internal
345
- */
346
- export interface SegmentActions<TClientData> {
347
- leaf?: ISegmentAction<TClientData>;
348
- shift?: NodeAction<TClientData>;
349
- contains?: NodeAction<TClientData>;
350
- pre?: BlockAction<TClientData>;
351
- post?: BlockAction<TClientData>;
352
- }
353
- /**
354
- * @internal
355
- */
356
285
  export interface ObliterateInfo {
357
286
  start: LocalReferencePosition;
358
287
  end: LocalReferencePosition;
@@ -362,11 +291,8 @@ export interface ObliterateInfo {
362
291
  localSeq: number | undefined;
363
292
  segmentGroup: SegmentGroup | undefined;
364
293
  }
365
- /**
366
- * @internal
367
- */
368
- export interface SegmentGroup<S extends ISegmentInternal = ISegmentInternal> {
369
- segments: S[];
294
+ export interface SegmentGroup {
295
+ segments: ISegmentLeaf[];
370
296
  previousProps?: PropertySet[];
371
297
  localSeq?: number;
372
298
  refSeq: number;
@@ -377,13 +303,9 @@ export interface SegmentGroup<S extends ISegmentInternal = ISegmentInternal> {
377
303
  * the MergeTree always inserts first, then checks for overflow and splits if the child count equals
378
304
  * `MaxNodesInBlock`. (i.e., `MaxNodesInBlock` contains 1 extra slot for temporary storage to
379
305
  * facilitate splits.)
380
- * @internal
381
306
  */
382
307
  export declare const MaxNodesInBlock = 8;
383
- /**
384
- * @internal
385
- */
386
- export declare class MergeBlock implements IMergeNodeCommon {
308
+ export declare class MergeBlock implements Partial<IMergeNodeInfo> {
387
309
  childCount: number;
388
310
  children: IMergeNode[];
389
311
  needsScour?: boolean;
@@ -415,8 +337,8 @@ export declare class MergeBlock implements IMergeNodeCommon {
415
337
  partialLengths?: PartialSequenceLengths;
416
338
  constructor(childCount: number);
417
339
  setOrdinal(child: IMergeNode, index: number): void;
418
- assignChild(child: IMergeNode, index: number, updateOrdinal?: boolean): void;
419
340
  }
341
+ export declare function assignChild<C extends IMergeNodeBuilder>(parent: MergeBlock, child: C, index: number, updateOrdinal?: boolean): asserts child is C & IMergeNodeInfo;
420
342
  export declare function seqLTE(seq: number, minOrRefSeq: number): boolean;
421
343
  /**
422
344
  * @legacy
@@ -587,7 +509,7 @@ export declare class CollaborationWindow {
587
509
  * { localSeq: 1, seq: UnassignedSequenceNumber, text: "C" },
588
510
  * ]
589
511
  * ```
590
- * (note that {@link ISegment.localSeq} tracks the localSeq at which a segment was inserted)
512
+ * (note that localSeq tracks the localSeq at which a segment was inserted)
591
513
  *
592
514
  * Suppose the client then disconnects and reconnects before any of its insertions are acked. The reconnect flow will necessitate
593
515
  * that the client regenerates and resubmits ops based on its current segment state as well as the original op that was sent.
@@ -639,12 +561,4 @@ export declare const compareNumbers: (a: number, b: number) => number;
639
561
  * Compares two strings.
640
562
  */
641
563
  export declare const compareStrings: (a: string, b: string) => number;
642
- /**
643
- * Get a human-readable string for a given {@link Marker}.
644
- *
645
- * @remarks This function is intended for debugging only. The exact format of
646
- * this string should not be relied upon between versions.
647
- * @internal
648
- */
649
- export declare function debugMarkerToString(marker: Marker): string;
650
564
  //# sourceMappingURL=mergeTreeNodes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mergeTreeNodes.d.ts","sourceRoot":"","sources":["../src/mergeTreeNodes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAOpE,OAAO,EAAE,wBAAwB,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC5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