@fluidframework/tree 2.74.0-368706 → 2.74.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 (1030) hide show
  1. package/.vscode/settings.json +2 -0
  2. package/CHANGELOG.md +11 -0
  3. package/api-report/tree.alpha.api.md +19 -15
  4. package/assertTagging.config.mjs +1 -1
  5. package/dist/alpha.d.ts +3 -0
  6. package/dist/codec/codec.d.ts +32 -17
  7. package/dist/codec/codec.d.ts.map +1 -1
  8. package/dist/codec/codec.js +40 -24
  9. package/dist/codec/codec.js.map +1 -1
  10. package/dist/core/change-family/changeFamily.d.ts +1 -4
  11. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  12. package/dist/core/change-family/changeFamily.js.map +1 -1
  13. package/dist/core/change-family/index.d.ts +1 -1
  14. package/dist/core/change-family/index.d.ts.map +1 -1
  15. package/dist/core/change-family/index.js.map +1 -1
  16. package/dist/core/index.d.ts +3 -3
  17. package/dist/core/index.d.ts.map +1 -1
  18. package/dist/core/index.js +4 -6
  19. package/dist/core/index.js.map +1 -1
  20. package/dist/core/rebase/changeRebaser.d.ts +1 -6
  21. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  22. package/dist/core/rebase/changeRebaser.js.map +1 -1
  23. package/dist/core/rebase/index.d.ts +1 -1
  24. package/dist/core/rebase/index.d.ts.map +1 -1
  25. package/dist/core/rebase/index.js +1 -2
  26. package/dist/core/rebase/index.js.map +1 -1
  27. package/dist/core/rebase/types.d.ts +21 -3
  28. package/dist/core/rebase/types.d.ts.map +1 -1
  29. package/dist/core/rebase/types.js +1 -5
  30. package/dist/core/rebase/types.js.map +1 -1
  31. package/dist/core/rebase/utils.d.ts.map +1 -1
  32. package/dist/core/rebase/utils.js +7 -25
  33. package/dist/core/rebase/utils.js.map +1 -1
  34. package/dist/core/schema-stored/schema.d.ts +4 -7
  35. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  36. package/dist/core/schema-stored/schema.js +2 -2
  37. package/dist/core/schema-stored/schema.js.map +1 -1
  38. package/dist/core/tree/detachedFieldIndex.d.ts +0 -6
  39. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  40. package/dist/core/tree/detachedFieldIndex.js +0 -9
  41. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  42. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +4 -4
  43. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  44. package/dist/core/tree/detachedFieldIndexFormatCommon.js +2 -2
  45. package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  46. package/dist/core/tree/index.d.ts +1 -1
  47. package/dist/core/tree/index.d.ts.map +1 -1
  48. package/dist/core/tree/index.js +3 -4
  49. package/dist/core/tree/index.js.map +1 -1
  50. package/dist/core/tree/pathTree.d.ts +3 -11
  51. package/dist/core/tree/pathTree.d.ts.map +1 -1
  52. package/dist/core/tree/pathTree.js +2 -14
  53. package/dist/core/tree/pathTree.js.map +1 -1
  54. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  55. package/dist/feature-libraries/chunked-forest/basicChunk.js +0 -7
  56. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  57. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  58. package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -4
  59. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  60. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  61. package/dist/feature-libraries/chunked-forest/codec/codecs.js +2 -2
  62. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  63. package/dist/feature-libraries/chunked-forest/codec/format.d.ts +5 -5
  64. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  65. package/dist/feature-libraries/chunked-forest/codec/format.js +4 -4
  66. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  67. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +42 -90
  68. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  69. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +69 -234
  70. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  71. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -1
  72. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  73. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +2 -11
  74. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  75. package/dist/feature-libraries/default-schema/index.d.ts +1 -2
  76. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  77. package/dist/feature-libraries/default-schema/index.js +2 -4
  78. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  79. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
  80. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  81. package/dist/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
  82. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  83. package/dist/feature-libraries/deltaUtils.d.ts +0 -1
  84. package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
  85. package/dist/feature-libraries/deltaUtils.js +1 -6
  86. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  87. package/dist/feature-libraries/flex-tree/context.d.ts +0 -9
  88. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  89. package/dist/feature-libraries/flex-tree/context.js +0 -6
  90. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  91. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  92. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  93. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  94. package/dist/feature-libraries/flex-tree/lazyField.d.ts +7 -8
  95. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  96. package/dist/feature-libraries/flex-tree/lazyField.js +8 -37
  97. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  98. package/dist/feature-libraries/forest-summary/codec.d.ts +8 -2
  99. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  100. package/dist/feature-libraries/forest-summary/codec.js +13 -11
  101. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  102. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -2
  103. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  104. package/dist/feature-libraries/forest-summary/forestSummarizer.js +18 -9
  105. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  106. package/dist/feature-libraries/forest-summary/formatCommon.d.ts +61 -0
  107. package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -0
  108. package/dist/feature-libraries/forest-summary/{format.js → formatCommon.js} +9 -6
  109. package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -0
  110. package/dist/feature-libraries/forest-summary/{format.d.ts → formatV1.d.ts} +6 -14
  111. package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -0
  112. package/dist/feature-libraries/forest-summary/formatV1.js +11 -0
  113. package/dist/feature-libraries/forest-summary/formatV1.js.map +1 -0
  114. package/dist/feature-libraries/forest-summary/formatV2.d.ts +51 -0
  115. package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -0
  116. package/dist/feature-libraries/forest-summary/formatV2.js +11 -0
  117. package/dist/feature-libraries/forest-summary/formatV2.js.map +1 -0
  118. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +7 -15
  119. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  120. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +11 -20
  121. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  122. package/dist/feature-libraries/forest-summary/index.d.ts +1 -2
  123. package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
  124. package/dist/feature-libraries/forest-summary/index.js +3 -5
  125. package/dist/feature-libraries/forest-summary/index.js.map +1 -1
  126. package/dist/feature-libraries/forest-summary/summaryFormatCommon.d.ts +35 -0
  127. package/dist/feature-libraries/forest-summary/summaryFormatCommon.d.ts.map +1 -0
  128. package/dist/feature-libraries/forest-summary/summaryFormatCommon.js +43 -0
  129. package/dist/feature-libraries/forest-summary/summaryFormatCommon.js.map +1 -0
  130. package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts +11 -0
  131. package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts.map +1 -0
  132. package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.js +14 -0
  133. package/dist/feature-libraries/forest-summary/summaryFormatV1ToV2.js.map +1 -0
  134. package/dist/feature-libraries/forest-summary/summaryFormatV3.d.ts +18 -0
  135. package/dist/feature-libraries/forest-summary/summaryFormatV3.d.ts.map +1 -0
  136. package/dist/feature-libraries/forest-summary/summaryFormatV3.js +21 -0
  137. package/dist/feature-libraries/forest-summary/summaryFormatV3.js.map +1 -0
  138. package/dist/feature-libraries/forest-summary/summaryTypes.d.ts +7 -37
  139. package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
  140. package/dist/feature-libraries/forest-summary/summaryTypes.js +23 -45
  141. package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
  142. package/dist/feature-libraries/index.d.ts +3 -3
  143. package/dist/feature-libraries/index.d.ts.map +1 -1
  144. package/dist/feature-libraries/index.js +3 -6
  145. package/dist/feature-libraries/index.js.map +1 -1
  146. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  147. package/dist/feature-libraries/mapTreeCursor.js +0 -1
  148. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  149. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  150. package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
  151. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  152. package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  153. package/dist/feature-libraries/modular-schema/comparison.js +1 -1
  154. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  155. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +21 -97
  156. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  157. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +7 -4
  158. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  159. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +52 -20
  160. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  161. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  162. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  163. package/dist/feature-libraries/modular-schema/genericFieldKind.js +9 -3
  164. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  165. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +2 -2
  166. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  167. package/dist/feature-libraries/modular-schema/index.d.ts +4 -4
  168. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  169. package/dist/feature-libraries/modular-schema/index.js +8 -11
  170. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  171. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  172. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  173. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +284 -8
  174. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  175. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +15 -48
  176. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  177. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +465 -1298
  178. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  179. package/{lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts → dist/feature-libraries/modular-schema/modularChangeFormat.d.ts} +2 -2
  180. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -0
  181. package/dist/feature-libraries/modular-schema/{modularChangeFormatV1.js → modularChangeFormat.js} +5 -5
  182. package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -0
  183. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +10 -50
  184. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  185. package/dist/feature-libraries/modular-schema/modularChangeTypes.js +3 -24
  186. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  187. package/dist/feature-libraries/optional-field/index.d.ts +2 -2
  188. package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
  189. package/dist/feature-libraries/optional-field/index.js +2 -1
  190. package/dist/feature-libraries/optional-field/index.js.map +1 -1
  191. package/dist/feature-libraries/optional-field/optionalField.d.ts +26 -5
  192. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  193. package/dist/feature-libraries/optional-field/optionalField.js +451 -217
  194. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  195. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
  196. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  197. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  198. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  199. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  200. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +28 -57
  201. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  202. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  203. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +2 -3
  204. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  205. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  206. package/dist/feature-libraries/schema-index/codec.js +4 -4
  207. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  208. package/dist/feature-libraries/schema-index/formatV1.d.ts +1 -1
  209. package/dist/feature-libraries/schema-index/formatV2.d.ts +1 -1
  210. package/dist/feature-libraries/sequence-field/compose.d.ts +7 -6
  211. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  212. package/dist/feature-libraries/sequence-field/compose.js +256 -80
  213. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  214. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
  215. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  216. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  217. package/dist/feature-libraries/sequence-field/index.d.ts +3 -2
  218. package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
  219. package/dist/feature-libraries/sequence-field/index.js +3 -1
  220. package/dist/feature-libraries/sequence-field/index.js.map +1 -1
  221. package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
  222. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  223. package/dist/feature-libraries/sequence-field/invert.js +167 -65
  224. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  225. package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  226. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  227. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  228. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
  229. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  230. package/dist/feature-libraries/sequence-field/moveEffectTable.js +86 -7
  231. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  232. package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
  233. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  234. package/dist/feature-libraries/sequence-field/rebase.js +112 -106
  235. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  236. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
  237. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
  238. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +50 -0
  239. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
  240. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  241. package/dist/feature-libraries/sequence-field/replaceRevisions.js +33 -16
  242. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  243. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  244. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -0
  245. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  246. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
  247. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  248. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +179 -358
  249. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  250. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  251. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +60 -20
  252. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  253. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  254. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  255. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  256. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  257. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  258. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  259. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
  260. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  261. package/dist/feature-libraries/sequence-field/types.d.ts +59 -30
  262. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  263. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  264. package/dist/feature-libraries/sequence-field/utils.d.ts +24 -15
  265. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  266. package/dist/feature-libraries/sequence-field/utils.js +299 -111
  267. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  268. package/dist/index.d.ts +2 -2
  269. package/dist/index.d.ts.map +1 -1
  270. package/dist/index.js +3 -1
  271. package/dist/index.js.map +1 -1
  272. package/dist/packageVersion.d.ts +1 -1
  273. package/dist/packageVersion.d.ts.map +1 -1
  274. package/dist/packageVersion.js +1 -1
  275. package/dist/packageVersion.js.map +1 -1
  276. package/dist/shared-tree/independentView.d.ts.map +1 -1
  277. package/dist/shared-tree/independentView.js +1 -1
  278. package/dist/shared-tree/independentView.js.map +1 -1
  279. package/dist/shared-tree/index.d.ts +1 -1
  280. package/dist/shared-tree/index.d.ts.map +1 -1
  281. package/dist/shared-tree/index.js.map +1 -1
  282. package/dist/shared-tree/schematizeTree.d.ts +4 -4
  283. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  284. package/dist/shared-tree/schematizeTree.js +1 -2
  285. package/dist/shared-tree/schematizeTree.js.map +1 -1
  286. package/dist/shared-tree/schematizingTreeView.d.ts +7 -2
  287. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  288. package/dist/shared-tree/schematizingTreeView.js +36 -32
  289. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  290. package/dist/shared-tree/sharedTree.d.ts +3 -9
  291. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  292. package/dist/shared-tree/sharedTree.js +0 -10
  293. package/dist/shared-tree/sharedTree.js.map +1 -1
  294. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  295. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  296. package/dist/shared-tree/sharedTreeChangeCodecs.js +2 -3
  297. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  298. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
  299. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  300. package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
  301. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  302. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
  303. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  304. package/dist/shared-tree/sharedTreeEditBuilder.js +6 -13
  305. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  306. package/dist/shared-tree/treeCheckout.d.ts +15 -12
  307. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  308. package/dist/shared-tree/treeCheckout.js +54 -48
  309. package/dist/shared-tree/treeCheckout.js.map +1 -1
  310. package/dist/shared-tree-core/branch.d.ts +2 -3
  311. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  312. package/dist/shared-tree-core/branch.js +3 -4
  313. package/dist/shared-tree-core/branch.js.map +1 -1
  314. package/dist/shared-tree-core/editManager.d.ts +2 -2
  315. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  316. package/dist/shared-tree-core/editManager.js +9 -9
  317. package/dist/shared-tree-core/editManager.js.map +1 -1
  318. package/dist/shared-tree-core/editManagerCodecs.d.ts +0 -4
  319. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  320. package/dist/shared-tree-core/editManagerCodecs.js +7 -15
  321. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  322. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
  323. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  324. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +8 -44
  325. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  326. package/dist/shared-tree-core/editManagerFormatCommons.js +2 -8
  327. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  328. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  329. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  330. package/dist/shared-tree-core/editManagerFormatV1toV4.js +0 -1
  331. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  332. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  333. package/dist/shared-tree-core/index.d.ts +3 -2
  334. package/dist/shared-tree-core/index.d.ts.map +1 -1
  335. package/dist/shared-tree-core/index.js +2 -3
  336. package/dist/shared-tree-core/index.js.map +1 -1
  337. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
  338. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  339. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  340. package/dist/shared-tree-core/messageCodecs.d.ts +0 -4
  341. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  342. package/dist/shared-tree-core/messageCodecs.js +9 -17
  343. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  344. package/dist/shared-tree-core/messageFormat.d.ts +9 -50
  345. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  346. package/dist/shared-tree-core/messageFormat.js +3 -8
  347. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  348. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +2 -3
  349. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  350. package/dist/shared-tree-core/messageFormatV1ToV4.js +1 -8
  351. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  352. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +1 -1
  353. package/dist/shared-tree-core/sharedTreeCore.d.ts +0 -1
  354. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  355. package/dist/shared-tree-core/sharedTreeCore.js +1 -1
  356. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  357. package/dist/shared-tree-core/versionedSummarizer.d.ts +6 -1
  358. package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  359. package/dist/shared-tree-core/versionedSummarizer.js +4 -3
  360. package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
  361. package/dist/simple-tree/api/eraseSchemaDetails.d.ts +89 -0
  362. package/dist/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -0
  363. package/dist/simple-tree/api/eraseSchemaDetails.js +97 -0
  364. package/dist/simple-tree/api/eraseSchemaDetails.js.map +1 -0
  365. package/dist/simple-tree/api/index.d.ts +1 -0
  366. package/dist/simple-tree/api/index.d.ts.map +1 -1
  367. package/dist/simple-tree/api/index.js +5 -1
  368. package/dist/simple-tree/api/index.js.map +1 -1
  369. package/dist/simple-tree/api/storedSchema.d.ts +1 -1
  370. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  371. package/dist/simple-tree/api/storedSchema.js +1 -2
  372. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  373. package/dist/simple-tree/api/tree.d.ts +15 -2
  374. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  375. package/dist/simple-tree/api/tree.js.map +1 -1
  376. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  377. package/dist/simple-tree/core/treeNode.js +1 -0
  378. package/dist/simple-tree/core/treeNode.js.map +1 -1
  379. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +15 -15
  380. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  381. package/dist/simple-tree/core/unhydratedFlexTree.js +8 -59
  382. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  383. package/dist/simple-tree/createContext.d.ts.map +1 -1
  384. package/dist/simple-tree/createContext.js +1 -1
  385. package/dist/simple-tree/createContext.js.map +1 -1
  386. package/dist/simple-tree/fieldSchema.d.ts +4 -4
  387. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  388. package/dist/simple-tree/fieldSchema.js.map +1 -1
  389. package/dist/simple-tree/index.d.ts +3 -3
  390. package/dist/simple-tree/index.d.ts.map +1 -1
  391. package/dist/simple-tree/index.js +5 -3
  392. package/dist/simple-tree/index.js.map +1 -1
  393. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  394. package/dist/simple-tree/node-kinds/array/arrayNode.js +3 -5
  395. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  396. package/dist/simple-tree/node-kinds/common.d.ts.map +1 -1
  397. package/dist/simple-tree/node-kinds/common.js +1 -1
  398. package/dist/simple-tree/node-kinds/common.js.map +1 -1
  399. package/dist/simple-tree/node-kinds/map/mapNode.js +2 -2
  400. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  401. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  402. package/dist/simple-tree/node-kinds/object/objectNode.js +18 -18
  403. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  404. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  405. package/dist/simple-tree/node-kinds/record/recordNode.js +2 -4
  406. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  407. package/dist/simple-tree/prepareForInsertion.d.ts +47 -54
  408. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  409. package/dist/simple-tree/prepareForInsertion.js +125 -183
  410. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  411. package/dist/simple-tree/toStoredSchema.js +3 -3
  412. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  413. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
  414. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  415. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +11 -29
  416. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  417. package/dist/tableSchema.d.ts +3 -14
  418. package/dist/tableSchema.d.ts.map +1 -1
  419. package/dist/tableSchema.js +2 -2
  420. package/dist/tableSchema.js.map +1 -1
  421. package/dist/treeFactory.d.ts.map +1 -1
  422. package/dist/treeFactory.js +3 -17
  423. package/dist/treeFactory.js.map +1 -1
  424. package/dist/util/brand.d.ts +49 -0
  425. package/dist/util/brand.d.ts.map +1 -1
  426. package/dist/util/brand.js +47 -1
  427. package/dist/util/brand.js.map +1 -1
  428. package/dist/util/index.d.ts +2 -2
  429. package/dist/util/index.d.ts.map +1 -1
  430. package/dist/util/index.js +4 -3
  431. package/dist/util/index.js.map +1 -1
  432. package/dist/util/rangeMap.d.ts +12 -24
  433. package/dist/util/rangeMap.d.ts.map +1 -1
  434. package/dist/util/rangeMap.js +6 -46
  435. package/dist/util/rangeMap.js.map +1 -1
  436. package/docs/main/sequence-field/move-composition.md +46 -0
  437. package/eslint.config.mts +98 -0
  438. package/lib/alpha.d.ts +3 -0
  439. package/lib/codec/codec.d.ts +32 -17
  440. package/lib/codec/codec.d.ts.map +1 -1
  441. package/lib/codec/codec.js +34 -18
  442. package/lib/codec/codec.js.map +1 -1
  443. package/lib/core/change-family/changeFamily.d.ts +1 -4
  444. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  445. package/lib/core/change-family/changeFamily.js.map +1 -1
  446. package/lib/core/change-family/index.d.ts +1 -1
  447. package/lib/core/change-family/index.d.ts.map +1 -1
  448. package/lib/core/change-family/index.js.map +1 -1
  449. package/lib/core/index.d.ts +3 -3
  450. package/lib/core/index.d.ts.map +1 -1
  451. package/lib/core/index.js +2 -2
  452. package/lib/core/index.js.map +1 -1
  453. package/lib/core/rebase/changeRebaser.d.ts +1 -6
  454. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  455. package/lib/core/rebase/changeRebaser.js.map +1 -1
  456. package/lib/core/rebase/index.d.ts +1 -1
  457. package/lib/core/rebase/index.d.ts.map +1 -1
  458. package/lib/core/rebase/index.js +1 -1
  459. package/lib/core/rebase/index.js.map +1 -1
  460. package/lib/core/rebase/types.d.ts +21 -3
  461. package/lib/core/rebase/types.d.ts.map +1 -1
  462. package/lib/core/rebase/types.js +0 -3
  463. package/lib/core/rebase/types.js.map +1 -1
  464. package/lib/core/rebase/utils.d.ts.map +1 -1
  465. package/lib/core/rebase/utils.js +7 -25
  466. package/lib/core/rebase/utils.js.map +1 -1
  467. package/lib/core/schema-stored/schema.d.ts +4 -7
  468. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  469. package/lib/core/schema-stored/schema.js +3 -3
  470. package/lib/core/schema-stored/schema.js.map +1 -1
  471. package/lib/core/tree/detachedFieldIndex.d.ts +0 -6
  472. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  473. package/lib/core/tree/detachedFieldIndex.js +1 -10
  474. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  475. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +4 -4
  476. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  477. package/lib/core/tree/detachedFieldIndexFormatCommon.js +3 -3
  478. package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  479. package/lib/core/tree/index.d.ts +1 -1
  480. package/lib/core/tree/index.d.ts.map +1 -1
  481. package/lib/core/tree/index.js +1 -1
  482. package/lib/core/tree/index.js.map +1 -1
  483. package/lib/core/tree/pathTree.d.ts +3 -11
  484. package/lib/core/tree/pathTree.d.ts.map +1 -1
  485. package/lib/core/tree/pathTree.js +1 -12
  486. package/lib/core/tree/pathTree.js.map +1 -1
  487. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  488. package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -8
  489. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  490. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  491. package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -4
  492. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  493. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  494. package/lib/feature-libraries/chunked-forest/codec/codecs.js +3 -3
  495. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  496. package/lib/feature-libraries/chunked-forest/codec/format.d.ts +5 -5
  497. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  498. package/lib/feature-libraries/chunked-forest/codec/format.js +5 -5
  499. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  500. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +42 -90
  501. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  502. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +69 -232
  503. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  504. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -1
  505. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  506. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +2 -11
  507. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  508. package/lib/feature-libraries/default-schema/index.d.ts +1 -2
  509. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  510. package/lib/feature-libraries/default-schema/index.js +1 -2
  511. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  512. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
  513. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  514. package/lib/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
  515. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  516. package/lib/feature-libraries/deltaUtils.d.ts +0 -1
  517. package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
  518. package/lib/feature-libraries/deltaUtils.js +1 -5
  519. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  520. package/lib/feature-libraries/flex-tree/context.d.ts +0 -9
  521. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  522. package/lib/feature-libraries/flex-tree/context.js +0 -6
  523. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  524. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  525. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  526. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  527. package/lib/feature-libraries/flex-tree/lazyField.d.ts +7 -8
  528. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  529. package/lib/feature-libraries/flex-tree/lazyField.js +9 -38
  530. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  531. package/lib/feature-libraries/forest-summary/codec.d.ts +8 -2
  532. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  533. package/lib/feature-libraries/forest-summary/codec.js +12 -11
  534. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  535. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -2
  536. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  537. package/lib/feature-libraries/forest-summary/forestSummarizer.js +19 -10
  538. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  539. package/lib/feature-libraries/forest-summary/formatCommon.d.ts +61 -0
  540. package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -0
  541. package/lib/feature-libraries/forest-summary/{format.js → formatCommon.js} +8 -6
  542. package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -0
  543. package/lib/feature-libraries/forest-summary/{format.d.ts → formatV1.d.ts} +6 -14
  544. package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -0
  545. package/lib/feature-libraries/forest-summary/formatV1.js +8 -0
  546. package/lib/feature-libraries/forest-summary/formatV1.js.map +1 -0
  547. package/lib/feature-libraries/forest-summary/formatV2.d.ts +51 -0
  548. package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -0
  549. package/lib/feature-libraries/forest-summary/formatV2.js +8 -0
  550. package/lib/feature-libraries/forest-summary/formatV2.js.map +1 -0
  551. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +7 -15
  552. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  553. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +11 -20
  554. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  555. package/lib/feature-libraries/forest-summary/index.d.ts +1 -2
  556. package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
  557. package/lib/feature-libraries/forest-summary/index.js +1 -2
  558. package/lib/feature-libraries/forest-summary/index.js.map +1 -1
  559. package/lib/feature-libraries/forest-summary/summaryFormatCommon.d.ts +35 -0
  560. package/lib/feature-libraries/forest-summary/summaryFormatCommon.d.ts.map +1 -0
  561. package/lib/feature-libraries/forest-summary/summaryFormatCommon.js +40 -0
  562. package/lib/feature-libraries/forest-summary/summaryFormatCommon.js.map +1 -0
  563. package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts +11 -0
  564. package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.d.ts.map +1 -0
  565. package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.js +11 -0
  566. package/lib/feature-libraries/forest-summary/summaryFormatV1ToV2.js.map +1 -0
  567. package/lib/feature-libraries/forest-summary/summaryFormatV3.d.ts +18 -0
  568. package/lib/feature-libraries/forest-summary/summaryFormatV3.d.ts.map +1 -0
  569. package/lib/feature-libraries/forest-summary/summaryFormatV3.js +18 -0
  570. package/lib/feature-libraries/forest-summary/summaryFormatV3.js.map +1 -0
  571. package/lib/feature-libraries/forest-summary/summaryTypes.d.ts +7 -37
  572. package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
  573. package/lib/feature-libraries/forest-summary/summaryTypes.js +20 -43
  574. package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
  575. package/lib/feature-libraries/index.d.ts +3 -3
  576. package/lib/feature-libraries/index.d.ts.map +1 -1
  577. package/lib/feature-libraries/index.js +2 -2
  578. package/lib/feature-libraries/index.js.map +1 -1
  579. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  580. package/lib/feature-libraries/mapTreeCursor.js +1 -2
  581. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  582. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  583. package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
  584. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  585. package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  586. package/lib/feature-libraries/modular-schema/comparison.js +1 -1
  587. package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
  588. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +21 -97
  589. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  590. package/lib/feature-libraries/modular-schema/crossFieldQueries.js +5 -3
  591. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  592. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +52 -20
  593. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  594. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  595. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  596. package/lib/feature-libraries/modular-schema/genericFieldKind.js +9 -3
  597. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  598. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js +1 -1
  599. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  600. package/lib/feature-libraries/modular-schema/index.d.ts +4 -4
  601. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  602. package/lib/feature-libraries/modular-schema/index.js +2 -3
  603. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  604. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  605. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  606. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +285 -9
  607. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  608. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +15 -48
  609. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  610. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +458 -1284
  611. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  612. package/{dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts → lib/feature-libraries/modular-schema/modularChangeFormat.d.ts} +2 -2
  613. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -0
  614. package/lib/feature-libraries/modular-schema/{modularChangeFormatV1.js → modularChangeFormat.js} +2 -2
  615. package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -0
  616. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +10 -50
  617. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  618. package/lib/feature-libraries/modular-schema/modularChangeTypes.js +2 -20
  619. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  620. package/lib/feature-libraries/optional-field/index.d.ts +2 -2
  621. package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
  622. package/lib/feature-libraries/optional-field/index.js +1 -1
  623. package/lib/feature-libraries/optional-field/index.js.map +1 -1
  624. package/lib/feature-libraries/optional-field/optionalField.d.ts +26 -5
  625. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  626. package/lib/feature-libraries/optional-field/optionalField.js +449 -217
  627. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  628. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
  629. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  630. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  631. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  632. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  633. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +26 -55
  634. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  635. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  636. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +2 -3
  637. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  638. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  639. package/lib/feature-libraries/schema-index/codec.js +5 -5
  640. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  641. package/lib/feature-libraries/schema-index/formatV1.d.ts +1 -1
  642. package/lib/feature-libraries/schema-index/formatV2.d.ts +1 -1
  643. package/lib/feature-libraries/sequence-field/compose.d.ts +7 -6
  644. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  645. package/lib/feature-libraries/sequence-field/compose.js +258 -82
  646. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  647. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
  648. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  649. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  650. package/lib/feature-libraries/sequence-field/index.d.ts +3 -2
  651. package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
  652. package/lib/feature-libraries/sequence-field/index.js +1 -0
  653. package/lib/feature-libraries/sequence-field/index.js.map +1 -1
  654. package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
  655. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  656. package/lib/feature-libraries/sequence-field/invert.js +169 -67
  657. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  658. package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  659. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  660. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  661. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
  662. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  663. package/lib/feature-libraries/sequence-field/moveEffectTable.js +80 -6
  664. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  665. package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
  666. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  667. package/lib/feature-libraries/sequence-field/rebase.js +114 -108
  668. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  669. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
  670. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
  671. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +46 -0
  672. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
  673. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  674. package/lib/feature-libraries/sequence-field/replaceRevisions.js +33 -16
  675. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  676. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  677. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -0
  678. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  679. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
  680. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  681. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +175 -350
  682. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  683. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  684. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +61 -21
  685. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  686. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  687. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  688. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  689. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  690. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  691. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  692. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
  693. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  694. package/lib/feature-libraries/sequence-field/types.d.ts +59 -30
  695. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  696. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  697. package/lib/feature-libraries/sequence-field/utils.d.ts +24 -15
  698. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  699. package/lib/feature-libraries/sequence-field/utils.js +292 -107
  700. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  701. package/lib/index.d.ts +2 -2
  702. package/lib/index.d.ts.map +1 -1
  703. package/lib/index.js +1 -1
  704. package/lib/index.js.map +1 -1
  705. package/lib/packageVersion.d.ts +1 -1
  706. package/lib/packageVersion.d.ts.map +1 -1
  707. package/lib/packageVersion.js +1 -1
  708. package/lib/packageVersion.js.map +1 -1
  709. package/lib/shared-tree/independentView.d.ts.map +1 -1
  710. package/lib/shared-tree/independentView.js +2 -2
  711. package/lib/shared-tree/independentView.js.map +1 -1
  712. package/lib/shared-tree/index.d.ts +1 -1
  713. package/lib/shared-tree/index.d.ts.map +1 -1
  714. package/lib/shared-tree/index.js.map +1 -1
  715. package/lib/shared-tree/schematizeTree.d.ts +4 -4
  716. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  717. package/lib/shared-tree/schematizeTree.js +2 -3
  718. package/lib/shared-tree/schematizeTree.js.map +1 -1
  719. package/lib/shared-tree/schematizingTreeView.d.ts +7 -2
  720. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  721. package/lib/shared-tree/schematizingTreeView.js +39 -35
  722. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  723. package/lib/shared-tree/sharedTree.d.ts +3 -9
  724. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  725. package/lib/shared-tree/sharedTree.js +0 -10
  726. package/lib/shared-tree/sharedTree.js.map +1 -1
  727. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  728. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  729. package/lib/shared-tree/sharedTreeChangeCodecs.js +2 -3
  730. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  731. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
  732. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  733. package/lib/shared-tree/sharedTreeChangeFamily.js +3 -3
  734. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  735. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
  736. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  737. package/lib/shared-tree/sharedTreeEditBuilder.js +5 -11
  738. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  739. package/lib/shared-tree/treeCheckout.d.ts +15 -12
  740. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  741. package/lib/shared-tree/treeCheckout.js +57 -51
  742. package/lib/shared-tree/treeCheckout.js.map +1 -1
  743. package/lib/shared-tree-core/branch.d.ts +2 -3
  744. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  745. package/lib/shared-tree-core/branch.js +3 -4
  746. package/lib/shared-tree-core/branch.js.map +1 -1
  747. package/lib/shared-tree-core/editManager.d.ts +2 -2
  748. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  749. package/lib/shared-tree-core/editManager.js +9 -9
  750. package/lib/shared-tree-core/editManager.js.map +1 -1
  751. package/lib/shared-tree-core/editManagerCodecs.d.ts +0 -4
  752. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  753. package/lib/shared-tree-core/editManagerCodecs.js +7 -14
  754. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  755. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
  756. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  757. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +8 -44
  758. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  759. package/lib/shared-tree-core/editManagerFormatCommons.js +3 -9
  760. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  761. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  762. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  763. package/lib/shared-tree-core/editManagerFormatV1toV4.js +0 -1
  764. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  765. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  766. package/lib/shared-tree-core/index.d.ts +3 -2
  767. package/lib/shared-tree-core/index.d.ts.map +1 -1
  768. package/lib/shared-tree-core/index.js +2 -2
  769. package/lib/shared-tree-core/index.js.map +1 -1
  770. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
  771. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  772. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  773. package/lib/shared-tree-core/messageCodecs.d.ts +0 -4
  774. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  775. package/lib/shared-tree-core/messageCodecs.js +9 -16
  776. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  777. package/lib/shared-tree-core/messageFormat.d.ts +9 -50
  778. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  779. package/lib/shared-tree-core/messageFormat.js +3 -8
  780. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  781. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -3
  782. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  783. package/lib/shared-tree-core/messageFormatV1ToV4.js +1 -8
  784. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  785. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +1 -1
  786. package/lib/shared-tree-core/sharedTreeCore.d.ts +0 -1
  787. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  788. package/lib/shared-tree-core/sharedTreeCore.js +1 -1
  789. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  790. package/lib/shared-tree-core/versionedSummarizer.d.ts +6 -1
  791. package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  792. package/lib/shared-tree-core/versionedSummarizer.js +4 -3
  793. package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
  794. package/lib/simple-tree/api/eraseSchemaDetails.d.ts +89 -0
  795. package/lib/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -0
  796. package/lib/simple-tree/api/eraseSchemaDetails.js +92 -0
  797. package/lib/simple-tree/api/eraseSchemaDetails.js.map +1 -0
  798. package/lib/simple-tree/api/index.d.ts +1 -0
  799. package/lib/simple-tree/api/index.d.ts.map +1 -1
  800. package/lib/simple-tree/api/index.js +1 -0
  801. package/lib/simple-tree/api/index.js.map +1 -1
  802. package/lib/simple-tree/api/storedSchema.d.ts +1 -1
  803. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  804. package/lib/simple-tree/api/storedSchema.js +1 -2
  805. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  806. package/lib/simple-tree/api/tree.d.ts +15 -2
  807. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  808. package/lib/simple-tree/api/tree.js.map +1 -1
  809. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  810. package/lib/simple-tree/core/treeNode.js +1 -0
  811. package/lib/simple-tree/core/treeNode.js.map +1 -1
  812. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +15 -15
  813. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  814. package/lib/simple-tree/core/unhydratedFlexTree.js +8 -58
  815. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  816. package/lib/simple-tree/createContext.d.ts.map +1 -1
  817. package/lib/simple-tree/createContext.js +1 -1
  818. package/lib/simple-tree/createContext.js.map +1 -1
  819. package/lib/simple-tree/fieldSchema.d.ts +4 -4
  820. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  821. package/lib/simple-tree/fieldSchema.js.map +1 -1
  822. package/lib/simple-tree/index.d.ts +3 -3
  823. package/lib/simple-tree/index.d.ts.map +1 -1
  824. package/lib/simple-tree/index.js +2 -2
  825. package/lib/simple-tree/index.js.map +1 -1
  826. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  827. package/lib/simple-tree/node-kinds/array/arrayNode.js +4 -6
  828. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  829. package/lib/simple-tree/node-kinds/common.d.ts.map +1 -1
  830. package/lib/simple-tree/node-kinds/common.js +2 -2
  831. package/lib/simple-tree/node-kinds/common.js.map +1 -1
  832. package/lib/simple-tree/node-kinds/map/mapNode.js +2 -2
  833. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  834. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  835. package/lib/simple-tree/node-kinds/object/objectNode.js +19 -19
  836. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  837. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  838. package/lib/simple-tree/node-kinds/record/recordNode.js +2 -4
  839. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  840. package/lib/simple-tree/prepareForInsertion.d.ts +47 -54
  841. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  842. package/lib/simple-tree/prepareForInsertion.js +124 -183
  843. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  844. package/lib/simple-tree/toStoredSchema.js +3 -3
  845. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  846. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
  847. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  848. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +9 -26
  849. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  850. package/lib/tableSchema.d.ts +3 -14
  851. package/lib/tableSchema.d.ts.map +1 -1
  852. package/lib/tableSchema.js +3 -3
  853. package/lib/tableSchema.js.map +1 -1
  854. package/lib/treeFactory.d.ts.map +1 -1
  855. package/lib/treeFactory.js +4 -18
  856. package/lib/treeFactory.js.map +1 -1
  857. package/lib/util/brand.d.ts +49 -0
  858. package/lib/util/brand.d.ts.map +1 -1
  859. package/lib/util/brand.js +44 -0
  860. package/lib/util/brand.js.map +1 -1
  861. package/lib/util/index.d.ts +2 -2
  862. package/lib/util/index.d.ts.map +1 -1
  863. package/lib/util/index.js +2 -2
  864. package/lib/util/index.js.map +1 -1
  865. package/lib/util/rangeMap.d.ts +12 -24
  866. package/lib/util/rangeMap.d.ts.map +1 -1
  867. package/lib/util/rangeMap.js +5 -44
  868. package/lib/util/rangeMap.js.map +1 -1
  869. package/package.json +24 -23
  870. package/src/codec/codec.ts +34 -18
  871. package/src/core/change-family/changeFamily.ts +0 -5
  872. package/src/core/change-family/index.ts +0 -1
  873. package/src/core/index.ts +2 -4
  874. package/src/core/rebase/changeRebaser.ts +1 -6
  875. package/src/core/rebase/index.ts +1 -1
  876. package/src/core/rebase/types.ts +26 -8
  877. package/src/core/rebase/utils.ts +7 -31
  878. package/src/core/schema-stored/schema.ts +5 -7
  879. package/src/core/tree/detachedFieldIndex.ts +1 -17
  880. package/src/core/tree/detachedFieldIndexFormatCommon.ts +4 -7
  881. package/src/core/tree/index.ts +1 -2
  882. package/src/core/tree/pathTree.ts +4 -16
  883. package/src/feature-libraries/chunked-forest/basicChunk.ts +1 -7
  884. package/src/feature-libraries/chunked-forest/chunkTree.ts +1 -6
  885. package/src/feature-libraries/chunked-forest/codec/codecs.ts +3 -2
  886. package/src/feature-libraries/chunked-forest/codec/format.ts +6 -9
  887. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +127 -393
  888. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +5 -13
  889. package/src/feature-libraries/default-schema/index.ts +5 -16
  890. package/src/feature-libraries/default-schema/mappedEditBuilder.ts +9 -35
  891. package/src/feature-libraries/deltaUtils.ts +1 -6
  892. package/src/feature-libraries/flex-tree/context.ts +0 -17
  893. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +8 -7
  894. package/src/feature-libraries/flex-tree/lazyField.ts +24 -66
  895. package/src/feature-libraries/forest-summary/codec.ts +25 -13
  896. package/src/feature-libraries/forest-summary/forestSummarizer.ts +37 -12
  897. package/src/feature-libraries/forest-summary/{format.ts → formatCommon.ts} +10 -11
  898. package/src/feature-libraries/forest-summary/formatV1.ts +12 -0
  899. package/src/feature-libraries/forest-summary/formatV2.ts +12 -0
  900. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +18 -21
  901. package/src/feature-libraries/forest-summary/index.ts +1 -2
  902. package/src/feature-libraries/forest-summary/summaryFormatCommon.ts +41 -0
  903. package/src/feature-libraries/forest-summary/summaryFormatV1ToV2.ts +11 -0
  904. package/src/feature-libraries/forest-summary/summaryFormatV3.ts +18 -0
  905. package/src/feature-libraries/forest-summary/summaryTypes.ts +26 -46
  906. package/src/feature-libraries/index.ts +8 -21
  907. package/src/feature-libraries/mapTreeCursor.ts +1 -2
  908. package/src/feature-libraries/mitigatedChangeFamily.ts +1 -3
  909. package/src/feature-libraries/modular-schema/comparison.ts +2 -1
  910. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +44 -142
  911. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +57 -36
  912. package/src/feature-libraries/modular-schema/genericFieldKind.ts +18 -6
  913. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -1
  914. package/src/feature-libraries/modular-schema/index.ts +15 -20
  915. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +499 -29
  916. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +741 -2541
  917. package/src/feature-libraries/modular-schema/{modularChangeFormatV1.ts → modularChangeFormat.ts} +1 -2
  918. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +10 -98
  919. package/src/feature-libraries/optional-field/index.ts +3 -1
  920. package/src/feature-libraries/optional-field/optionalField.ts +574 -317
  921. package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +38 -24
  922. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +35 -89
  923. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +2 -3
  924. package/src/feature-libraries/schema-index/codec.ts +7 -9
  925. package/src/feature-libraries/sequence-field/compose.ts +519 -134
  926. package/src/feature-libraries/sequence-field/helperTypes.ts +19 -34
  927. package/src/feature-libraries/sequence-field/index.ts +9 -0
  928. package/src/feature-libraries/sequence-field/invert.ts +228 -103
  929. package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
  930. package/src/feature-libraries/sequence-field/moveEffectTable.ts +191 -8
  931. package/src/feature-libraries/sequence-field/rebase.ts +203 -168
  932. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +57 -0
  933. package/src/feature-libraries/sequence-field/replaceRevisions.ts +52 -31
  934. package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +2 -0
  935. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +220 -643
  936. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +68 -56
  937. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +27 -25
  938. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +129 -19
  939. package/src/feature-libraries/sequence-field/types.ts +64 -34
  940. package/src/feature-libraries/sequence-field/utils.ts +346 -133
  941. package/src/index.ts +3 -0
  942. package/src/packageVersion.ts +1 -1
  943. package/src/shared-tree/independentView.ts +1 -2
  944. package/src/shared-tree/index.ts +2 -3
  945. package/src/shared-tree/schematizeTree.ts +8 -21
  946. package/src/shared-tree/schematizingTreeView.ts +73 -50
  947. package/src/shared-tree/sharedTree.ts +3 -19
  948. package/src/shared-tree/sharedTreeChangeCodecs.ts +3 -7
  949. package/src/shared-tree/sharedTreeChangeFamily.ts +4 -7
  950. package/src/shared-tree/sharedTreeEditBuilder.ts +12 -46
  951. package/src/shared-tree/treeCheckout.ts +92 -82
  952. package/src/shared-tree-core/branch.ts +2 -8
  953. package/src/shared-tree-core/editManager.ts +2 -16
  954. package/src/shared-tree-core/editManagerCodecs.ts +7 -17
  955. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +1 -1
  956. package/src/shared-tree-core/editManagerFormatCommons.ts +6 -15
  957. package/src/shared-tree-core/editManagerFormatV1toV4.ts +1 -3
  958. package/src/shared-tree-core/index.ts +3 -2
  959. package/src/shared-tree-core/messageCodecV1ToV4.ts +1 -2
  960. package/src/shared-tree-core/messageCodecs.ts +9 -19
  961. package/src/shared-tree-core/messageFormat.ts +7 -15
  962. package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -16
  963. package/src/shared-tree-core/sharedTreeCore.ts +1 -4
  964. package/src/shared-tree-core/versionedSummarizer.ts +10 -3
  965. package/src/simple-tree/api/eraseSchemaDetails.ts +123 -0
  966. package/src/simple-tree/api/index.ts +4 -0
  967. package/src/simple-tree/api/storedSchema.ts +2 -2
  968. package/src/simple-tree/api/tree.ts +16 -1
  969. package/src/simple-tree/core/treeNode.ts +1 -0
  970. package/src/simple-tree/core/unhydratedFlexTree.ts +36 -87
  971. package/src/simple-tree/createContext.ts +4 -1
  972. package/src/simple-tree/fieldSchema.ts +4 -6
  973. package/src/simple-tree/index.ts +3 -2
  974. package/src/simple-tree/node-kinds/array/arrayNode.ts +5 -7
  975. package/src/simple-tree/node-kinds/common.ts +5 -2
  976. package/src/simple-tree/node-kinds/map/mapNode.ts +4 -4
  977. package/src/simple-tree/node-kinds/object/objectNode.ts +26 -26
  978. package/src/simple-tree/node-kinds/record/recordNode.ts +9 -10
  979. package/src/simple-tree/prepareForInsertion.ts +200 -343
  980. package/src/simple-tree/toStoredSchema.ts +3 -3
  981. package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +14 -42
  982. package/src/tableSchema.ts +13 -18
  983. package/src/treeFactory.ts +5 -19
  984. package/src/util/brand.ts +61 -0
  985. package/src/util/index.ts +3 -3
  986. package/src/util/rangeMap.ts +18 -72
  987. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -36
  988. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
  989. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -126
  990. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
  991. package/dist/feature-libraries/forest-summary/format.d.ts.map +0 -1
  992. package/dist/feature-libraries/forest-summary/format.js.map +0 -1
  993. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +0 -17
  994. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +0 -1
  995. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +0 -388
  996. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +0 -1
  997. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +0 -17
  998. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +0 -1
  999. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +0 -413
  1000. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +0 -1
  1001. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +0 -1
  1002. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +0 -1
  1003. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +0 -146
  1004. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +0 -1
  1005. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +0 -32
  1006. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +0 -1
  1007. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -36
  1008. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
  1009. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -122
  1010. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
  1011. package/lib/feature-libraries/forest-summary/format.d.ts.map +0 -1
  1012. package/lib/feature-libraries/forest-summary/format.js.map +0 -1
  1013. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +0 -17
  1014. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +0 -1
  1015. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +0 -384
  1016. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +0 -1
  1017. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +0 -17
  1018. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +0 -1
  1019. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +0 -409
  1020. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +0 -1
  1021. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +0 -1
  1022. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +0 -1
  1023. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +0 -146
  1024. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +0 -1
  1025. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +0 -29
  1026. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +0 -1
  1027. package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +0 -180
  1028. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +0 -732
  1029. package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +0 -790
  1030. package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +0 -62
@@ -2,11 +2,11 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { EmptyKey, type TreeType, type Value, type TreeValue, AnchorSet, type DetachedField, type UpPath, type NormalizedUpPath, type INormalizedUpPath, type NormalizedFieldUpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, type FieldUpPath, type Anchor, type RootField, type ChildCollection, type ChildLocation, type FieldMapObject, type NodeData, type GenericTreeNode, type JsonableTree, EncodedJsonableTree, rootFieldKey, rootField, type ITreeCursor, CursorLocationType, type ITreeCursorSynchronous, castCursorToSynchronous, type GenericFieldsNode, type AnchorLocator, genericTreeKeys, getGenericTreeField, genericTreeDeleteIfEmpty, getDepth, mapCursorField, mapCursorFields, iterateCursorField, type MapTree, detachedFieldAsKey, keyAsDetachedField, visitDelta, createAnnouncedVisitor, combineVisitors, announceDelta, applyDelta, makeDetachedFieldIndex, setGenericTreeField, type DeltaVisitor, type AnnouncedVisitor, SparseNode, getDescendant, compareUpPaths, clonePath, topDownPath, compareFieldUpPaths, forEachNode, forEachNodeInSubtree, forEachField, type PathRootPrefix, deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, type AnchorSlot, type AnchorNode, anchorSlot, type UpPathDefault, isDetachedUpPathRoot, inCursorField, inCursorNode, type AnchorEvents, type AnchorSetRootEvents, type ProtoNodes, CursorMarker, isCursor, DetachedFieldIndex, type ReadOnlyDetachedFieldIndex, type DetachedFieldIndexCheckpoint, type ForestRootId, getDetachedFieldContainingPath, getDetachedFieldContainingFieldPath, aboveRootPlaceholder, type DeltaRoot, type DeltaMark, type DeltaDetachedNodeId, type DeltaFieldMap, type DeltaDetachedNodeChanges, type DeltaDetachedNodeBuild, type DeltaDetachedNodeDestruction, type DeltaDetachedNodeRename, type DeltaFieldChanges, type ExclusiveMapTree, deepCopyMapTree, type TreeChunk, dummyRoot, cursorChunk, tryGetChunk, type ChunkedCursor, DetachedFieldIndexFormatVersion, getCodecTreeForDetachedFieldIndexFormat, } from "./tree/index.js";
5
+ export { EmptyKey, type TreeType, type Value, type TreeValue, AnchorSet, type DetachedField, type UpPath, type NormalizedUpPath, type INormalizedUpPath, type NormalizedFieldUpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, type FieldUpPath, type Anchor, type RootField, type ChildCollection, type ChildLocation, type FieldMapObject, type NodeData, type GenericTreeNode, type JsonableTree, EncodedJsonableTree, rootFieldKey, rootField, type ITreeCursor, CursorLocationType, type ITreeCursorSynchronous, castCursorToSynchronous, type GenericFieldsNode, type AnchorLocator, genericTreeKeys, getGenericTreeField, genericTreeDeleteIfEmpty, getDepth, mapCursorField, mapCursorFields, iterateCursorField, type MapTree, detachedFieldAsKey, keyAsDetachedField, visitDelta, createAnnouncedVisitor, combineVisitors, announceDelta, applyDelta, makeDetachedFieldIndex, setGenericTreeField, type DeltaVisitor, type AnnouncedVisitor, SparseNode, getDescendant, compareUpPaths, clonePath, topDownPath, compareFieldUpPaths, forEachNode, forEachNodeInSubtree, forEachField, type PathRootPrefix, deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, type AnchorSlot, type AnchorNode, anchorSlot, type UpPathDefault, isDetachedUpPath, inCursorField, inCursorNode, type AnchorEvents, type AnchorSetRootEvents, type ProtoNodes, CursorMarker, isCursor, DetachedFieldIndex, type ReadOnlyDetachedFieldIndex, type DetachedFieldIndexCheckpoint, type ForestRootId, getDetachedFieldContainingPath, aboveRootPlaceholder, type DeltaRoot, type DeltaMark, type DeltaDetachedNodeId, type DeltaFieldMap, type DeltaDetachedNodeChanges, type DeltaDetachedNodeBuild, type DeltaDetachedNodeDestruction, type DeltaDetachedNodeRename, type DeltaFieldChanges, type ExclusiveMapTree, deepCopyMapTree, type TreeChunk, dummyRoot, cursorChunk, tryGetChunk, type ChunkedCursor, DetachedFieldIndexFormatVersion, getCodecTreeForDetachedFieldIndexFormat, } from "./tree/index.js";
6
6
  export { TreeNavigationResult, type IEditableForest, type IForestSubscription, type TreeLocation, type FieldLocation, type ForestLocation, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, type FieldAnchor, moveToDetachedField, type ForestEvents, } from "./forest/index.js";
7
7
  export { type FieldKey, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type TreeStoredSchemaSubscription, type MutableTreeStoredSchema, type FieldKindIdentifier, type FieldKindData, type TreeTypeSet, type TreeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, type SchemaEvents, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, type StoredSchemaCollection, schemaFormatV1, schemaFormatV2, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, decodeFieldSchema, encodeFieldSchemaV1, encodeFieldSchemaV2, storedSchemaDecodeDispatcher, type SchemaAndPolicy, Multiplicity, type SchemaPolicy, SchemaFormatVersion, } from "./schema-stored/index.js";
8
- export { type ChangeFamily, type ChangeFamilyCodec, type ChangeEncodingContext, type ChangeFamilyEditor, EditBuilder, type EditorOptions, } from "./change-family/index.js";
9
- export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, type ChangeRebaser, findAncestor, findCommonAncestor, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, RevisionTagCodec, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, type TaggedChange, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, type RevisionMetadataSource, revisionMetadataSourceFromInfo, type RevisionInfo, type EncodedRevisionTag, type EncodedStableId, type EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, StableIdSchema, subtractChangeAtomIds, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, isAncestor, type ChangeAtomIdRangeMap, newChangeAtomIdRangeMap, newChangeAtomIdTransform, compareRevisions, diffHistories, } from "./rebase/index.js";
8
+ export { type ChangeFamily, type ChangeFamilyCodec, type ChangeEncodingContext, type ChangeFamilyEditor, EditBuilder, } from "./change-family/index.js";
9
+ export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, type ChangeRebaser, findAncestor, findCommonAncestor, type GraphCommit, CommitKind, type CommitMetadata, type ChangeMetadata, type RevisionTag, RevisionTagSchema, RevisionTagCodec, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, type TaggedChange, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, type RevisionMetadataSource, revisionMetadataSourceFromInfo, type RevisionInfo, type EncodedRevisionTag, type EncodedStableId, type EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, StableIdSchema, subtractChangeAtomIds, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, isAncestor, type ChangeAtomIdRangeMap, newChangeAtomIdRangeMap, compareRevisions, diffHistories, } from "./rebase/index.js";
10
10
  export { type Adapters, AdaptedViewSchema, type TreeAdapter, } from "./schema-view/index.js";
11
11
  export { type Revertible, RevertibleStatus, type RevertibleFactory, type RevertibleAlphaFactory, type RevertibleAlpha, } from "./revertible.js";
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,KAAK,OAAO,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,KAAK,cAAc,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,KAAK,UAAU,EACf,KAAK,UAAU,EAC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K,eAAe,GACpB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,KAAK,OAAO,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,KAAK,cAAc,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,KAAK,UAAU,EACf,KAAK,UAAU,EACf,UAAU,EACV,KAAK,aAAa,EAClB,gBAAgB,EAChB,aAAa,EACb,YAAY,EAC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object.defineProperty(exports, "__esModule", { value: true });
7
- exports.tryGetChunk = exports.cursorChunk = exports.dummyRoot = exports.deepCopyMapTree = exports.aboveRootPlaceholder = exports.getDetachedFieldContainingFieldPath = exports.getDetachedFieldContainingPath = exports.DetachedFieldIndex = exports.isCursor = exports.CursorMarker = exports.inCursorNode = exports.inCursorField = exports.isDetachedUpPathRoot = exports.anchorSlot = exports.emptyDelta = exports.offsetDetachId = exports.makeDetachedNodeId = exports.deltaForRootInitialization = exports.forEachField = exports.forEachNodeInSubtree = exports.forEachNode = exports.compareFieldUpPaths = exports.topDownPath = exports.clonePath = exports.compareUpPaths = exports.getDescendant = exports.SparseNode = exports.setGenericTreeField = exports.makeDetachedFieldIndex = exports.applyDelta = exports.announceDelta = exports.combineVisitors = exports.createAnnouncedVisitor = exports.visitDelta = exports.keyAsDetachedField = exports.detachedFieldAsKey = exports.iterateCursorField = exports.mapCursorFields = exports.mapCursorField = exports.getDepth = exports.genericTreeDeleteIfEmpty = exports.getGenericTreeField = exports.genericTreeKeys = exports.castCursorToSynchronous = exports.CursorLocationType = exports.rootField = exports.rootFieldKey = exports.EncodedJsonableTree = exports.AnchorSet = exports.EmptyKey = void 0;
8
- exports.replaceChange = exports.replaceAtomRevisions = exports.subtractChangeAtomIds = exports.StableIdSchema = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.mintCommit = exports.SessionIdSchema = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.RevisionTagCodec = exports.RevisionTagSchema = exports.CommitKind = exports.findCommonAncestor = exports.findAncestor = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = exports.EditBuilder = exports.SchemaFormatVersion = exports.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchemaV2 = exports.encodeFieldSchemaV1 = exports.decodeFieldSchema = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormatV2 = exports.schemaFormatV1 = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.moveToDetachedField = exports.ITreeSubscriptionCursorState = exports.TreeNavigationResult = exports.getCodecTreeForDetachedFieldIndexFormat = exports.DetachedFieldIndexFormatVersion = void 0;
9
- exports.RevertibleStatus = exports.AdaptedViewSchema = exports.diffHistories = exports.compareRevisions = exports.newChangeAtomIdTransform = exports.newChangeAtomIdRangeMap = exports.isAncestor = void 0;
7
+ exports.DetachedFieldIndexFormatVersion = exports.tryGetChunk = exports.cursorChunk = exports.dummyRoot = exports.deepCopyMapTree = exports.aboveRootPlaceholder = exports.getDetachedFieldContainingPath = exports.DetachedFieldIndex = exports.isCursor = exports.CursorMarker = exports.inCursorNode = exports.inCursorField = exports.isDetachedUpPath = exports.anchorSlot = exports.emptyDelta = exports.offsetDetachId = exports.makeDetachedNodeId = exports.deltaForRootInitialization = exports.forEachField = exports.forEachNodeInSubtree = exports.forEachNode = exports.compareFieldUpPaths = exports.topDownPath = exports.clonePath = exports.compareUpPaths = exports.getDescendant = exports.SparseNode = exports.setGenericTreeField = exports.makeDetachedFieldIndex = exports.applyDelta = exports.announceDelta = exports.combineVisitors = exports.createAnnouncedVisitor = exports.visitDelta = exports.keyAsDetachedField = exports.detachedFieldAsKey = exports.iterateCursorField = exports.mapCursorFields = exports.mapCursorField = exports.getDepth = exports.genericTreeDeleteIfEmpty = exports.getGenericTreeField = exports.genericTreeKeys = exports.castCursorToSynchronous = exports.CursorLocationType = exports.rootField = exports.rootFieldKey = exports.EncodedJsonableTree = exports.AnchorSet = exports.EmptyKey = void 0;
8
+ exports.isAncestor = exports.replaceChange = exports.replaceAtomRevisions = exports.subtractChangeAtomIds = exports.StableIdSchema = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.mintCommit = exports.SessionIdSchema = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.RevisionTagCodec = exports.RevisionTagSchema = exports.CommitKind = exports.findCommonAncestor = exports.findAncestor = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = exports.EditBuilder = exports.SchemaFormatVersion = exports.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchemaV2 = exports.encodeFieldSchemaV1 = exports.decodeFieldSchema = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormatV2 = exports.schemaFormatV1 = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.moveToDetachedField = exports.ITreeSubscriptionCursorState = exports.TreeNavigationResult = exports.getCodecTreeForDetachedFieldIndexFormat = void 0;
9
+ exports.RevertibleStatus = exports.AdaptedViewSchema = exports.diffHistories = exports.compareRevisions = exports.newChangeAtomIdRangeMap = void 0;
10
10
  var index_js_1 = require("./tree/index.js");
11
11
  Object.defineProperty(exports, "EmptyKey", { enumerable: true, get: function () { return index_js_1.EmptyKey; } });
12
12
  Object.defineProperty(exports, "AnchorSet", { enumerable: true, get: function () { return index_js_1.AnchorSet; } });
@@ -45,14 +45,13 @@ Object.defineProperty(exports, "makeDetachedNodeId", { enumerable: true, get: fu
45
45
  Object.defineProperty(exports, "offsetDetachId", { enumerable: true, get: function () { return index_js_1.offsetDetachId; } });
46
46
  Object.defineProperty(exports, "emptyDelta", { enumerable: true, get: function () { return index_js_1.emptyDelta; } });
47
47
  Object.defineProperty(exports, "anchorSlot", { enumerable: true, get: function () { return index_js_1.anchorSlot; } });
48
- Object.defineProperty(exports, "isDetachedUpPathRoot", { enumerable: true, get: function () { return index_js_1.isDetachedUpPathRoot; } });
48
+ Object.defineProperty(exports, "isDetachedUpPath", { enumerable: true, get: function () { return index_js_1.isDetachedUpPath; } });
49
49
  Object.defineProperty(exports, "inCursorField", { enumerable: true, get: function () { return index_js_1.inCursorField; } });
50
50
  Object.defineProperty(exports, "inCursorNode", { enumerable: true, get: function () { return index_js_1.inCursorNode; } });
51
51
  Object.defineProperty(exports, "CursorMarker", { enumerable: true, get: function () { return index_js_1.CursorMarker; } });
52
52
  Object.defineProperty(exports, "isCursor", { enumerable: true, get: function () { return index_js_1.isCursor; } });
53
53
  Object.defineProperty(exports, "DetachedFieldIndex", { enumerable: true, get: function () { return index_js_1.DetachedFieldIndex; } });
54
54
  Object.defineProperty(exports, "getDetachedFieldContainingPath", { enumerable: true, get: function () { return index_js_1.getDetachedFieldContainingPath; } });
55
- Object.defineProperty(exports, "getDetachedFieldContainingFieldPath", { enumerable: true, get: function () { return index_js_1.getDetachedFieldContainingFieldPath; } });
56
55
  Object.defineProperty(exports, "aboveRootPlaceholder", { enumerable: true, get: function () { return index_js_1.aboveRootPlaceholder; } });
57
56
  Object.defineProperty(exports, "deepCopyMapTree", { enumerable: true, get: function () { return index_js_1.deepCopyMapTree; } });
58
57
  Object.defineProperty(exports, "dummyRoot", { enumerable: true, get: function () { return index_js_1.dummyRoot; } });
@@ -114,7 +113,6 @@ Object.defineProperty(exports, "replaceAtomRevisions", { enumerable: true, get:
114
113
  Object.defineProperty(exports, "replaceChange", { enumerable: true, get: function () { return index_js_5.replaceChange; } });
115
114
  Object.defineProperty(exports, "isAncestor", { enumerable: true, get: function () { return index_js_5.isAncestor; } });
116
115
  Object.defineProperty(exports, "newChangeAtomIdRangeMap", { enumerable: true, get: function () { return index_js_5.newChangeAtomIdRangeMap; } });
117
- Object.defineProperty(exports, "newChangeAtomIdTransform", { enumerable: true, get: function () { return index_js_5.newChangeAtomIdTransform; } });
118
116
  Object.defineProperty(exports, "compareRevisions", { enumerable: true, get: function () { return index_js_5.compareRevisions; } });
119
117
  Object.defineProperty(exports, "diffHistories", { enumerable: true, get: function () { return index_js_5.diffHistories; } });
120
118
  var index_js_6 = require("./schema-view/index.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;AAEH,4CAwGyB;AAvGxB,oGAAA,QAAQ,OAAA;AAIR,qGAAA,SAAS,OAAA;AAoBT,+GAAA,mBAAmB,OAAA;AACnB,wGAAA,YAAY,OAAA;AACZ,qGAAA,SAAS,OAAA;AAET,8GAAA,kBAAkB,OAAA;AAElB,mHAAA,uBAAuB,OAAA;AAGvB,2GAAA,eAAe,OAAA;AACf,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,oGAAA,QAAQ,OAAA;AACR,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAElB,8GAAA,kBAAkB,OAAA;AAClB,8GAAA,kBAAkB,OAAA;AAClB,sGAAA,UAAU,OAAA;AACV,kHAAA,sBAAsB,OAAA;AACtB,2GAAA,eAAe,OAAA;AACf,yGAAA,aAAa,OAAA;AACb,sGAAA,UAAU,OAAA;AACV,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AAGnB,sGAAA,UAAU,OAAA;AACV,yGAAA,aAAa,OAAA;AACb,0GAAA,cAAc,OAAA;AACd,qGAAA,SAAS,OAAA;AACT,uGAAA,WAAW,OAAA;AACX,+GAAA,mBAAmB,OAAA;AACnB,uGAAA,WAAW,OAAA;AACX,gHAAA,oBAAoB,OAAA;AACpB,wGAAA,YAAY,OAAA;AAEZ,sHAAA,0BAA0B,OAAA;AAC1B,8GAAA,kBAAkB,OAAA;AAClB,0GAAA,cAAc,O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OAAA;AAEd,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAElB,sGAAA,UAAU,OAAA;AAGV,6GAAA,iBAAiB,OAAA;AACjB,4GAAA,gBAAgB,OAAA;AAKhB,0GAAA,cAAc,OAAA;AACd,qGAAA,SAAS,OAAA;AACT,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,2GAAA,eAAe,OAAA;AACf,sGAAA,UAAU,OAAA;AACV,wGAAA,YAAY,OAAA;AAEZ,wGAAA,YAAY,OAAA;AACZ,mHAAA,uBAAuB,OAAA;AAEvB,0HAAA,8BAA8B,OAAA;AAK9B,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,0GAAA,cAAc,OAAA;AACd,iHAAA,qBAAqB,OAAA;AACrB,gHAAA,oBAAoB,OAAA;AACpB,yGAAA,aAAa,OAAA;AAGb,sGAAA,UAAU,OAAA;AAEV,mHAAA,uBAAuB,OAAA;AACvB,oHAAA,wBAAwB,OAAA;AACxB,4GAAA,gBAAgB,OAAA;AAChB,yGAAA,aAAa,OAAA;AAGd,mDAIgC;AAF/B,6GAAA,iBAAiB,OAAA;AAIlB,iDAMyB;AAJxB,iHAAA,gBAAgB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype NormalizedUpPath,\n\ttype INormalizedUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\tEncodedJsonableTree,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\tcastCursorToSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tgenericTreeDeleteIfEmpty,\n\tgetDepth,\n\tmapCursorField,\n\tmapCursorFields,\n\titerateCursorField,\n\ttype MapTree,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\tvisitDelta,\n\tcreateAnnouncedVisitor,\n\tcombineVisitors,\n\tannounceDelta,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tsetGenericTreeField,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tisDetachedUpPathRoot,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ReadOnlyDetachedFieldIndex,\n\ttype DetachedFieldIndexCheckpoint,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\tgetDetachedFieldContainingFieldPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype ExclusiveMapTree,\n\tdeepCopyMapTree,\n\ttype TreeChunk,\n\tdummyRoot,\n\tcursorChunk,\n\ttryGetChunk,\n\ttype ChunkedCursor,\n\tDetachedFieldIndexFormatVersion,\n\tgetCodecTreeForDetachedFieldIndexFormat,\n} from \"./tree/index.js\";\n\nexport {\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest/index.js\";\n\nexport {\n\ttype FieldKey,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype FieldKindData,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tschemaFormatV1,\n\tschemaFormatV2,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchemaV1,\n\tencodeFieldSchemaV2,\n\tstoredSchemaDecodeDispatcher,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\n\tSchemaFormatVersion,\n} from \"./schema-stored/index.js\";\n\nexport {\n\ttype ChangeFamily,\n\ttype ChangeFamilyCodec,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamilyEditor,\n\tEditBuilder,\n\ttype EditorOptions,\n} from \"./change-family/index.js\";\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\ttype ChangeRebaser,\n\tfindAncestor,\n\tfindCommonAncestor,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tRevisionTagCodec,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\tSessionIdSchema,\n\tmintCommit,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\ttype RevisionMetadataSource,\n\trevisionMetadataSourceFromInfo,\n\ttype RevisionInfo,\n\ttype EncodedRevisionTag,\n\ttype EncodedStableId,\n\ttype EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\tStableIdSchema,\n\tsubtractChangeAtomIds,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n\tisAncestor,\n\ttype ChangeAtomIdRangeMap,\n\tnewChangeAtomIdRangeMap,\n\tnewChangeAtomIdTransform,\n\tcompareRevisions,\n\tdiffHistories,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\ttype TreeAdapter,\n} from \"./schema-view/index.js\";\n\nexport {\n\ttype Revertible,\n\tRevertibleStatus,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./revertible.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;AAEH,4CAuGyB;AAtGxB,oGAAA,QAAQ,OAAA;AAIR,qGAAA,SAAS,OAAA;AAoBT,+GAAA,mBAAmB,OAAA;AACnB,wGAAA,YAAY,OAAA;AACZ,qGAAA,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;AAClB,0GAAA,cAAc,OAAA;AACd,iHAAA,qBAAqB,OAAA;AACrB,gHAAA,oBAAoB,OAAA;AACpB,yGAAA,aAAa,OAAA;AAGb,sGAAA,UAAU,OAAA;AAEV,mHAAA,uBAAuB,OAAA;AACvB,4GAAA,gBAAgB,OAAA;AAChB,yGAAA,aAAa,OAAA;AAGd,mDAIgC;AAF/B,6GAAA,iBAAiB,OAAA;AAIlB,iDAMyB;AAJxB,iHAAA,gBAAgB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype NormalizedUpPath,\n\ttype INormalizedUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\tEncodedJsonableTree,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\tcastCursorToSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tgenericTreeDeleteIfEmpty,\n\tgetDepth,\n\tmapCursorField,\n\tmapCursorFields,\n\titerateCursorField,\n\ttype MapTree,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\tvisitDelta,\n\tcreateAnnouncedVisitor,\n\tcombineVisitors,\n\tannounceDelta,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tsetGenericTreeField,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tisDetachedUpPath,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ReadOnlyDetachedFieldIndex,\n\ttype DetachedFieldIndexCheckpoint,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype ExclusiveMapTree,\n\tdeepCopyMapTree,\n\ttype TreeChunk,\n\tdummyRoot,\n\tcursorChunk,\n\ttryGetChunk,\n\ttype ChunkedCursor,\n\tDetachedFieldIndexFormatVersion,\n\tgetCodecTreeForDetachedFieldIndexFormat,\n} from \"./tree/index.js\";\n\nexport {\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest/index.js\";\n\nexport {\n\ttype FieldKey,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype FieldKindData,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tschemaFormatV1,\n\tschemaFormatV2,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchemaV1,\n\tencodeFieldSchemaV2,\n\tstoredSchemaDecodeDispatcher,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\n\tSchemaFormatVersion,\n} from \"./schema-stored/index.js\";\n\nexport {\n\ttype ChangeFamily,\n\ttype ChangeFamilyCodec,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamilyEditor,\n\tEditBuilder,\n} from \"./change-family/index.js\";\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\ttype ChangeRebaser,\n\tfindAncestor,\n\tfindCommonAncestor,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype ChangeMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tRevisionTagCodec,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\tSessionIdSchema,\n\tmintCommit,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\ttype RevisionMetadataSource,\n\trevisionMetadataSourceFromInfo,\n\ttype RevisionInfo,\n\ttype EncodedRevisionTag,\n\ttype EncodedStableId,\n\ttype EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\tStableIdSchema,\n\tsubtractChangeAtomIds,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n\tisAncestor,\n\ttype ChangeAtomIdRangeMap,\n\tnewChangeAtomIdRangeMap,\n\tcompareRevisions,\n\tdiffHistories,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\ttype TreeAdapter,\n} from \"./schema-view/index.js\";\n\nexport {\n\ttype Revertible,\n\tRevertibleStatus,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./revertible.js\";\n"]}
@@ -98,12 +98,7 @@ export declare function mapTaggedChange<TIn, TOut>(input: TaggedChange<TIn>, cha
98
98
  */
99
99
  export type RevisionIndexer = (tag: RevisionTag) => number | undefined;
100
100
  export interface RevisionMetadataSource {
101
- /**
102
- * @returns a positive number if tag2 is a later revision than tag1 or a negative number if tag2 is an earlier revision.
103
- * Returns zero is the order cannot be determined, which happens if both revisions are older
104
- * than the set of revisions handled by this metadata source.
105
- */
106
- readonly compareRevisions: (tag1: RevisionTag, tag2: RevisionTag) => number;
101
+ readonly getIndex: RevisionIndexer;
107
102
  readonly tryGetInfo: (tag: RevisionTag | undefined) => RevisionInfo | undefined;
108
103
  readonly hasRollback: (tag: RevisionTag) => boolean;
109
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"changeRebaser.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/changeRebaser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,aAAa,CAAC,UAAU;IACxC,UAAU,CAAC,E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OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;AACxC,CAAC;AAFD,wCAEC;AAMD,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC5B,qEAAU,CAAA;IACV,+DAAO,CAAA;IACP,iEAAQ,CAAA;AACT,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Invariant } from \"../../util/index.js\";\n\nimport type { RevisionTag } from \"./types.js\";\n\n/**\n * Rebasing logic for a particular kind of change.\n *\n * This interface is used to provide rebase policy to `Rebaser`.\n *\n * The implementation must ensure TChangeset forms a {@link https://en.wikipedia.org/wiki/Group_(mathematics | group}) where:\n * - `compose([])` is the identity element.\n * - associativity is defined as `compose([...a, ...b])` is equal to\n * `compose([compose(a), compose(b)])` for all `a` and `b`.\n * - `inverse(a)` gives the inverse element of `a`.\n *\n * In these requirements the definition of equality is up to the implementer,\n * but it is required that any two changes which are considered equal:\n * - have the same impact when applied to any tree.\n * - can be substituted for each-other in all methods on this\n * interface and produce equal (by this same definition) results.\n *\n * For the sake of testability, implementations will likely want to have a concrete equality implementation.\n *\n * This API uses `compose` on arrays instead of an explicit identity element and associative binary operator\n * to allow the implementation more room for optimization,\n * but should otherwise be equivalent to the identity element and binary operator group approach.\n *\n * TODO:\n * Be more specific about the above requirements.\n * For example, would something that is close to forming a group but has precision issues\n * (ex: the floating point numbers and addition) be ok?\n * Would this cause decoherence (and thus be absolutely not ok),\n * or just minor semantic precision issues, which could be tolerated.\n * For now assume that such issues are not ok.\n */\nexport interface ChangeRebaser<TChangeset> {\n\t_typeCheck?: Invariant<TChangeset>;\n\n\t/**\n\t * Compose a collection of changesets into a single one.\n\t * See {@link ChangeRebaser} for requirements.\n\t */\n\tcompose(changes: TaggedChange<TChangeset>[]): TChangeset;\n\n\t/**\n\t * @param changes - The changes to invert.\n\t * @param isRollback - Whether the inverted change is meant to rollback a change on a branch as is the case when\n\t * performing a sandwich rebase.\n\t * @param revision - The revision for the invert changeset.\n\t * This flag is relevant to merge semantics that are dependent on edit sequencing order:\n\t * - In the context of an undo, this function inverts a change that is sequenced and applied before the produced inverse.\n\t * - In the context of a rollback, this function inverts a change that is sequenced after but applied before the produced inverse.\n\t * @returns the inverse of `changes`.\n\t *\n\t * `compose([changes, inverse(changes)])` be equal to `compose([])`:\n\t * See {@link ChangeRebaser} for details.\n\t */\n\tinvert(\n\t\tchanges: TaggedChange<TChangeset>,\n\t\tisRollback: boolean,\n\t\trevision: RevisionTag,\n\t): TChangeset;\n\n\t/**\n\t * Rebase `change` over `over`.\n\t *\n\t * The resulting changeset should, as much as possible, replicate the same semantics as `change`,\n\t * except be valid to apply after `over` instead of before it.\n\t *\n\t * When rebasing `change` onto a new branch, `revisionMetadata` should include entries for all changesets\n\t * from the source which are being rebased onto the target branch.\n\t *\n\t * Requirements:\n\t * The implementation must ensure that for all possible changesets `a`, `b` and `c`:\n\t * - `rebase(a, compose([b, c])` is equal to `rebase(rebase(a, b), c)`.\n\t * - `rebase(compose([a, b]), c)` is equal to\n\t * `compose([rebase(a, c), rebase(b, compose([inverse(a), c, rebase(a, c)])])`.\n\t * - `rebase(a, compose([]))` is equal to `a`.\n\t * - `rebase(compose([]), a)` is equal to `compose([])`.\n\t */\n\trebase(\n\t\tchange: TaggedChange<TChangeset>,\n\t\tover: TaggedChange<TChangeset>,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): TChangeset;\n\n\tchangeRevision(\n\t\tchange: TChangeset,\n\t\tnewRevision: RevisionTag | undefined,\n\t\trollBackOf?: RevisionTag,\n\t): TChangeset;\n}\n\nexport interface TaggedChange<TChangeset, TTag = RevisionTag | undefined> {\n\treadonly revision: TTag;\n\t/**\n\t * When populated, indicates that the changeset is a rollback for the purpose of a rebase sandwich.\n\t * The value corresponds to the `revision` of the original changeset being rolled back.\n\t */\n\treadonly rollbackOf?: RevisionTag;\n\treadonly change: TChangeset;\n}\n\nexport function mapTaggedChange<TIn, TOut>(\n\tinput: TaggedChange<TIn>,\n\tchange: TOut,\n): TaggedChange<TOut> {\n\treturn { ...input, change };\n}\n\n/**\n * A callback that returns the index of the changeset associated with the given RevisionTag among the changesets being\n * composed or rebased. This index is solely meant to communicate relative ordering, and is only valid within the scope of the\n * compose or rebase operation.\n *\n * During composition, the index reflects the order of the changeset within the overall composed changeset that is\n * being produced.\n *\n * During rebase, the indices of the base changes are all lower than the indices of the change being rebased.\n */\nexport type RevisionIndexer = (tag: RevisionTag) => number | undefined;\n\nexport interface RevisionMetadataSource {\n\t/**\n\t * @returns a positive number if tag2 is a later revision than tag1 or a negative number if tag2 is an earlier revision.\n\t * Returns zero is the order cannot be determined, which happens if both revisions are older\n\t * than the set of revisions handled by this metadata source.\n\t */\n\treadonly compareRevisions: (tag1: RevisionTag, tag2: RevisionTag) => number;\n\treadonly tryGetInfo: (tag: RevisionTag | undefined) => RevisionInfo | undefined;\n\treadonly hasRollback: (tag: RevisionTag) => boolean;\n}\n\nexport interface RevisionInfo {\n\treadonly revision: RevisionTag;\n\t/**\n\t * When populated, indicates that the changeset is a rollback for the purpose of a rebase sandwich.\n\t * The value corresponds to the `revision` of the original changeset being rolled back.\n\t */\n\treadonly rollbackOf?: RevisionTag;\n}\n\nexport function tagChange<T>(change: T, revision: RevisionTag | undefined): TaggedChange<T> {\n\treturn { revision, change };\n}\n\nexport function tagRollbackInverse<TChange, TTag>(\n\tinverseChange: TChange,\n\trevision: TTag,\n\trollbackOf: RevisionTag | undefined,\n): TaggedChange<TChange, TTag> {\n\treturn {\n\t\trevision,\n\t\tchange: inverseChange,\n\t\trollbackOf,\n\t};\n}\n\nexport function makeAnonChange<T>(change: T): TaggedChange<T> {\n\treturn { revision: undefined, change };\n}\n\nexport interface FinalChange {\n\treadonly status: FinalChangeStatus;\n}\n\nexport enum FinalChangeStatus {\n\tconflicted,\n\trebased,\n\tcommuted,\n}\n"]}
1
+ {"version":3,"file":"changeRebaser.js","sourceRoot":"","sources":["../../../src/core/rebase/changeRebaser.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAyGH,SAAgB,eAAe,CAC9B,KAAwB,EACxB,MAAY;IAEZ,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC;AALD,0CAKC;AA6BD,SAAgB,SAAS,CAAI,MAAS,EAAE,QAAiC;IACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC;AAFD,8BAEC;AAED,SAAgB,kBAAkB,CACjC,aAAsB,EACtB,QAAc,EACd,UAAmC;IAEnC,OAAO;QACN,QAAQ;QACR,MAAM,EAAE,aAAa;QACrB,UAAU;KACV,CAAC;AACH,CAAC;AAVD,gDAUC;AAED,SAAgB,cAAc,CAAI,MAAS;IAC1C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;AACxC,CAAC;AAFD,wCAEC;AAMD,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC5B,qEAAU,CAAA;IACV,+DAAO,CAAA;IACP,iEAAQ,CAAA;AACT,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Invariant } from \"../../util/index.js\";\n\nimport type { RevisionTag } from \"./types.js\";\n\n/**\n * Rebasing logic for a particular kind of change.\n *\n * This interface is used to provide rebase policy to `Rebaser`.\n *\n * The implementation must ensure TChangeset forms a {@link https://en.wikipedia.org/wiki/Group_(mathematics | group}) where:\n * - `compose([])` is the identity element.\n * - associativity is defined as `compose([...a, ...b])` is equal to\n * `compose([compose(a), compose(b)])` for all `a` and `b`.\n * - `inverse(a)` gives the inverse element of `a`.\n *\n * In these requirements the definition of equality is up to the implementer,\n * but it is required that any two changes which are considered equal:\n * - have the same impact when applied to any tree.\n * - can be substituted for each-other in all methods on this\n * interface and produce equal (by this same definition) results.\n *\n * For the sake of testability, implementations will likely want to have a concrete equality implementation.\n *\n * This API uses `compose` on arrays instead of an explicit identity element and associative binary operator\n * to allow the implementation more room for optimization,\n * but should otherwise be equivalent to the identity element and binary operator group approach.\n *\n * TODO:\n * Be more specific about the above requirements.\n * For example, would something that is close to forming a group but has precision issues\n * (ex: the floating point numbers and addition) be ok?\n * Would this cause decoherence (and thus be absolutely not ok),\n * or just minor semantic precision issues, which could be tolerated.\n * For now assume that such issues are not ok.\n */\nexport interface ChangeRebaser<TChangeset> {\n\t_typeCheck?: Invariant<TChangeset>;\n\n\t/**\n\t * Compose a collection of changesets into a single one.\n\t * See {@link ChangeRebaser} for requirements.\n\t */\n\tcompose(changes: TaggedChange<TChangeset>[]): TChangeset;\n\n\t/**\n\t * @param changes - The changes to invert.\n\t * @param isRollback - Whether the inverted change is meant to rollback a change on a branch as is the case when\n\t * performing a sandwich rebase.\n\t * @param revision - The revision for the invert changeset.\n\t * This flag is relevant to merge semantics that are dependent on edit sequencing order:\n\t * - In the context of an undo, this function inverts a change that is sequenced and applied before the produced inverse.\n\t * - In the context of a rollback, this function inverts a change that is sequenced after but applied before the produced inverse.\n\t * @returns the inverse of `changes`.\n\t *\n\t * `compose([changes, inverse(changes)])` be equal to `compose([])`:\n\t * See {@link ChangeRebaser} for details.\n\t */\n\tinvert(\n\t\tchanges: TaggedChange<TChangeset>,\n\t\tisRollback: boolean,\n\t\trevision: RevisionTag,\n\t): TChangeset;\n\n\t/**\n\t * Rebase `change` over `over`.\n\t *\n\t * The resulting changeset should, as much as possible, replicate the same semantics as `change`,\n\t * except be valid to apply after `over` instead of before it.\n\t *\n\t * When rebasing `change` onto a new branch, `revisionMetadata` should include entries for all changesets\n\t * from the source which are being rebased onto the target branch.\n\t *\n\t * Requirements:\n\t * The implementation must ensure that for all possible changesets `a`, `b` and `c`:\n\t * - `rebase(a, compose([b, c])` is equal to `rebase(rebase(a, b), c)`.\n\t * - `rebase(compose([a, b]), c)` is equal to\n\t * `compose([rebase(a, c), rebase(b, compose([inverse(a), c, rebase(a, c)])])`.\n\t * - `rebase(a, compose([]))` is equal to `a`.\n\t * - `rebase(compose([]), a)` is equal to `compose([])`.\n\t */\n\trebase(\n\t\tchange: TaggedChange<TChangeset>,\n\t\tover: TaggedChange<TChangeset>,\n\t\trevisionMetadata: RevisionMetadataSource,\n\t): TChangeset;\n\n\tchangeRevision(\n\t\tchange: TChangeset,\n\t\tnewRevision: RevisionTag | undefined,\n\t\trollBackOf?: RevisionTag,\n\t): TChangeset;\n}\n\nexport interface TaggedChange<TChangeset, TTag = RevisionTag | undefined> {\n\treadonly revision: TTag;\n\t/**\n\t * When populated, indicates that the changeset is a rollback for the purpose of a rebase sandwich.\n\t * The value corresponds to the `revision` of the original changeset being rolled back.\n\t */\n\treadonly rollbackOf?: RevisionTag;\n\treadonly change: TChangeset;\n}\n\nexport function mapTaggedChange<TIn, TOut>(\n\tinput: TaggedChange<TIn>,\n\tchange: TOut,\n): TaggedChange<TOut> {\n\treturn { ...input, change };\n}\n\n/**\n * A callback that returns the index of the changeset associated with the given RevisionTag among the changesets being\n * composed or rebased. This index is solely meant to communicate relative ordering, and is only valid within the scope of the\n * compose or rebase operation.\n *\n * During composition, the index reflects the order of the changeset within the overall composed changeset that is\n * being produced.\n *\n * During rebase, the indices of the base changes are all lower than the indices of the change being rebased.\n */\nexport type RevisionIndexer = (tag: RevisionTag) => number | undefined;\n\nexport interface RevisionMetadataSource {\n\treadonly getIndex: RevisionIndexer;\n\treadonly tryGetInfo: (tag: RevisionTag | undefined) => RevisionInfo | undefined;\n\treadonly hasRollback: (tag: RevisionTag) => boolean;\n}\n\nexport interface RevisionInfo {\n\treadonly revision: RevisionTag;\n\t/**\n\t * When populated, indicates that the changeset is a rollback for the purpose of a rebase sandwich.\n\t * The value corresponds to the `revision` of the original changeset being rolled back.\n\t */\n\treadonly rollbackOf?: RevisionTag;\n}\n\nexport function tagChange<T>(change: T, revision: RevisionTag | undefined): TaggedChange<T> {\n\treturn { revision, change };\n}\n\nexport function tagRollbackInverse<TChange, TTag>(\n\tinverseChange: TChange,\n\trevision: TTag,\n\trollbackOf: RevisionTag | undefined,\n): TaggedChange<TChange, TTag> {\n\treturn {\n\t\trevision,\n\t\tchange: inverseChange,\n\t\trollbackOf,\n\t};\n}\n\nexport function makeAnonChange<T>(change: T): TaggedChange<T> {\n\treturn { revision: undefined, change };\n}\n\nexport interface FinalChange {\n\treadonly status: FinalChangeStatus;\n}\n\nexport enum FinalChangeStatus {\n\tconflicted,\n\trebased,\n\tcommuted,\n}\n"]}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, mintCommit, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, type EncodedRevisionTag, type EncodedChangeAtomId, type EncodedStableId, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, SessionIdSchema, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, StableIdSchema, subtractChangeAtomIds, replaceAtomRevisions, type ChangeAtomIdRangeMap, newChangeAtomIdRangeMap, newChangeAtomIdTransform, compareRevisions, } from "./types.js";
5
+ export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, mintCommit, type GraphCommit, CommitKind, type CommitMetadata, type ChangeMetadata, type RevisionTag, RevisionTagSchema, type EncodedRevisionTag, type EncodedChangeAtomId, type EncodedStableId, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, SessionIdSchema, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, StableIdSchema, subtractChangeAtomIds, replaceAtomRevisions, type ChangeAtomIdRangeMap, newChangeAtomIdRangeMap, compareRevisions, } from "./types.js";
6
6
  export { RevisionTagCodec } from "./revisionTagCodec.js";
7
7
  export { type ChangeRebaser, type FinalChange, FinalChangeStatus, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, type TaggedChange, type RevisionMetadataSource, type RevisionInfo, } from "./changeRebaser.js";
8
8
  export { findAncestor, findCommonAncestor, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, revisionMetadataSourceFromInfo, type RebaseStats, type RebaseStatsWithDuration, replaceChange, isAncestor, diffHistories, } from "./utils.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,8BAA8B,EAC9B,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,aAAa,EACb,UAAU,EACV,aAAa,GACb,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,YAAY,EACZ,kBAAkB,EAClB,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,8BAA8B,EAC9B,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,aAAa,EACb,UAAU,EACV,aAAa,GACb,MAAM,YAAY,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.diffHistories = exports.isAncestor = exports.replaceChange = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.findCommonAncestor = exports.findAncestor = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.FinalChangeStatus = exports.RevisionTagCodec = exports.compareRevisions = exports.newChangeAtomIdTransform = exports.newChangeAtomIdRangeMap = exports.replaceAtomRevisions = exports.subtractChangeAtomIds = exports.StableIdSchema = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.SessionIdSchema = exports.RevisionTagSchema = exports.CommitKind = exports.mintCommit = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = void 0;
7
+ exports.diffHistories = exports.isAncestor = exports.replaceChange = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.findCommonAncestor = exports.findAncestor = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.FinalChangeStatus = exports.RevisionTagCodec = exports.compareRevisions = exports.newChangeAtomIdRangeMap = exports.replaceAtomRevisions = exports.subtractChangeAtomIds = exports.StableIdSchema = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.SessionIdSchema = exports.RevisionTagSchema = exports.CommitKind = exports.mintCommit = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = void 0;
8
8
  var types_js_1 = require("./types.js");
9
9
  Object.defineProperty(exports, "areEqualChangeAtomIds", { enumerable: true, get: function () { return types_js_1.areEqualChangeAtomIds; } });
10
10
  Object.defineProperty(exports, "areEqualChangeAtomIdOpts", { enumerable: true, get: function () { return types_js_1.areEqualChangeAtomIdOpts; } });
@@ -21,7 +21,6 @@ Object.defineProperty(exports, "StableIdSchema", { enumerable: true, get: functi
21
21
  Object.defineProperty(exports, "subtractChangeAtomIds", { enumerable: true, get: function () { return types_js_1.subtractChangeAtomIds; } });
22
22
  Object.defineProperty(exports, "replaceAtomRevisions", { enumerable: true, get: function () { return types_js_1.replaceAtomRevisions; } });
23
23
  Object.defineProperty(exports, "newChangeAtomIdRangeMap", { enumerable: true, get: function () { return types_js_1.newChangeAtomIdRangeMap; } });
24
- Object.defineProperty(exports, "newChangeAtomIdTransform", { enumerable: true, get: function () { return types_js_1.newChangeAtomIdTransform; } });
25
24
  Object.defineProperty(exports, "compareRevisions", { enumerable: true, get: function () { return types_js_1.compareRevisions; } });
26
25
  var revisionTagCodec_js_1 = require("./revisionTagCodec.js");
27
26
  Object.defineProperty(exports, "RevisionTagCodec", { enumerable: true, get: function () { return revisionTagCodec_js_1.RevisionTagCodec; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCA4BoB;AA3BnB,iHAAA,qBAAqB,OAAA;AACrB,oHAAA,wBAAwB,OAAA;AACxB,4GAAA,gBAAgB,OAAA;AAChB,0GAAA,cAAc,OAAA;AACd,sGAAA,UAAU,OAAA;AAEV,sGAAA,UAAU,OAAA;AAGV,6GAAA,iBAAiB,OAAA;AAOjB,2GAAA,eAAe,OAAA;AACf,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,0GAAA,cAAc,OAAA;AACd,iHAAA,qBAAqB,OAAA;AACrB,gHAAA,oBAAoB,OAAA;AAEpB,mHAAA,uBAAuB,OAAA;AACvB,oHAAA,wBAAwB,OAAA;AACxB,4GAAA,gBAAgB,OAAA;AAEjB,6DAAyD;AAAhD,uHAAA,gBAAgB,OAAA;AACzB,uDAW4B;AAR3B,qHAAA,iBAAiB,OAAA;AACjB,kHAAA,cAAc,OAAA;AACd,6GAAA,SAAS,OAAA;AACT,mHAAA,eAAe,OAAA;AACf,sHAAA,kBAAkB,OAAA;AAKnB,uCAaoB;AAZnB,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAClB,wGAAA,YAAY,OAAA;AAEZ,wGAAA,YAAY,OAAA;AACZ,mHAAA,uBAAuB,OAAA;AACvB,0HAAA,8BAA8B,OAAA;AAG9B,yGAAA,aAAa,OAAA;AACb,sGAAA,UAAU,OAAA;AACV,yGAAA,aAAa,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\tmintCommit,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttype EncodedStableId,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\tSessionIdSchema,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\tStableIdSchema,\n\tsubtractChangeAtomIds,\n\treplaceAtomRevisions,\n\ttype ChangeAtomIdRangeMap,\n\tnewChangeAtomIdRangeMap,\n\tnewChangeAtomIdTransform,\n\tcompareRevisions,\n} from \"./types.js\";\nexport { RevisionTagCodec } from \"./revisionTagCodec.js\";\nexport {\n\ttype ChangeRebaser,\n\ttype FinalChange,\n\tFinalChangeStatus,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\ttype TaggedChange,\n\ttype RevisionMetadataSource,\n\ttype RevisionInfo,\n} from \"./changeRebaser.js\";\nexport {\n\tfindAncestor,\n\tfindCommonAncestor,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\trevisionMetadataSourceFromInfo,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n\treplaceChange,\n\tisAncestor,\n\tdiffHistories,\n} from \"./utils.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCA4BoB;AA3BnB,iHAAA,qBAAqB,OAAA;AACrB,oHAAA,wBAAwB,OAAA;AACxB,4GAAA,gBAAgB,OAAA;AAChB,0GAAA,cAAc,OAAA;AACd,sGAAA,UAAU,OAAA;AAEV,sGAAA,UAAU,OAAA;AAIV,6GAAA,iBAAiB,OAAA;AAOjB,2GAAA,eAAe,OAAA;AACf,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,0GAAA,cAAc,OAAA;AACd,iHAAA,qBAAqB,OAAA;AACrB,gHAAA,oBAAoB,OAAA;AAEpB,mHAAA,uBAAuB,OAAA;AACvB,4GAAA,gBAAgB,OAAA;AAEjB,6DAAyD;AAAhD,uHAAA,gBAAgB,OAAA;AACzB,uDAW4B;AAR3B,qHAAA,iBAAiB,OAAA;AACjB,kHAAA,cAAc,OAAA;AACd,6GAAA,SAAS,OAAA;AACT,mHAAA,eAAe,OAAA;AACf,sHAAA,kBAAkB,OAAA;AAKnB,uCAaoB;AAZnB,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAClB,wGAAA,YAAY,OAAA;AAEZ,wGAAA,YAAY,OAAA;AACZ,mHAAA,uBAAuB,OAAA;AACvB,0HAAA,8BAA8B,OAAA;AAG9B,yGAAA,aAAa,OAAA;AACb,sGAAA,UAAU,OAAA;AACV,yGAAA,aAAa,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\tmintCommit,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype ChangeMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttype EncodedStableId,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\tSessionIdSchema,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\tStableIdSchema,\n\tsubtractChangeAtomIds,\n\treplaceAtomRevisions,\n\ttype ChangeAtomIdRangeMap,\n\tnewChangeAtomIdRangeMap,\n\tcompareRevisions,\n} from \"./types.js\";\nexport { RevisionTagCodec } from \"./revisionTagCodec.js\";\nexport {\n\ttype ChangeRebaser,\n\ttype FinalChange,\n\tFinalChangeStatus,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\ttype TaggedChange,\n\ttype RevisionMetadataSource,\n\ttype RevisionInfo,\n} from \"./changeRebaser.js\";\nexport {\n\tfindAncestor,\n\tfindCommonAncestor,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\trevisionMetadataSourceFromInfo,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n\treplaceChange,\n\tisAncestor,\n\tdiffHistories,\n} from \"./utils.js\";\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { OpSpaceCompressedId, SessionId, SessionSpaceCompressedId, StableId } from "@fluidframework/id-compressor";
6
- import { type Brand, type NestedMap, RangeMap } from "../../util/index.js";
6
+ import { type Brand, type JsonCompatibleReadOnly, type NestedMap, RangeMap } from "../../util/index.js";
7
7
  /**
8
8
  * The identifier for a particular session/user/client that can generate `GraphCommit`s
9
9
  */
@@ -57,7 +57,7 @@ export declare function makeChangeAtomId(localId: ChangesetLocalId, revision?: R
57
57
  export declare function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId;
58
58
  export declare function taggedAtomId(id: ChangeAtomId, revision: RevisionTag | undefined): ChangeAtomId;
59
59
  export declare function taggedOptAtomId(id: ChangeAtomId | undefined, revision: RevisionTag | undefined): ChangeAtomId | undefined;
60
- export declare function offsetChangeAtomId<T extends ChangeAtomId = ChangeAtomId>(id: T, offset: number): T;
60
+ export declare function offsetChangeAtomId(id: ChangeAtomId, offset: number): ChangeAtomId;
61
61
  export declare function replaceAtomRevisions(id: ChangeAtomId, oldRevisions: Set<RevisionTag | undefined>, newRevision: RevisionTag | undefined): ChangeAtomId;
62
62
  /**
63
63
  * A node in a graph of commits. A commit's parent is the commit on which it was based.
@@ -98,6 +98,25 @@ export interface CommitMetadata {
98
98
  */
99
99
  readonly isLocal: boolean;
100
100
  }
101
+ /**
102
+ * Information about a commit that has been applied.
103
+ *
104
+ * @sealed @alpha
105
+ */
106
+ export type ChangeMetadata = CommitMetadata & ({
107
+ readonly isLocal: true;
108
+ /**
109
+ * A serializable object that encodes the change.
110
+ * @remarks This change object can be {@link TreeBranchAlpha.applyChange | applied to another branch} in the same state as the one which generated it.
111
+ * The change object must be applied to a SharedTree with the same IdCompressor session ID as it was created from.
112
+ * @privateRemarks
113
+ * This is a `SerializedChange` from treeCheckout.ts.
114
+ */
115
+ getChange(): JsonCompatibleReadOnly;
116
+ } | {
117
+ readonly isLocal: false;
118
+ readonly getChange?: undefined;
119
+ });
101
120
  /**
102
121
  * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.
103
122
  * @param parent - the parent of the new commit
@@ -107,7 +126,6 @@ export interface CommitMetadata {
107
126
  export declare function mintCommit<TChange>(parent: GraphCommit<TChange>, commit: Omit<GraphCommit<TChange>, "parent">): GraphCommit<TChange>;
108
127
  export type ChangeAtomIdRangeMap<V> = RangeMap<ChangeAtomId, V>;
109
128
  export declare function newChangeAtomIdRangeMap<V>(): ChangeAtomIdRangeMap<V>;
110
- export declare function newChangeAtomIdTransform(): ChangeAtomIdRangeMap<ChangeAtomId>;
111
129
  export declare function subtractChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): number;
112
130
  export declare function compareRevisions(a: RevisionTag | undefined, b: RevisionTag | undefined): number;
113
131
  //# sourceMappingURL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AAE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,GAC1C,WAAW,CAAC,OAAO,CAAC,CAOtB;AAED,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,QAAQ,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;AAEhE,wBAAgB,uBAAuB,CAAC,CAAC,KAAK,oBAAoB,CAAC,CAAC,CAAC,CAEpE;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,YAAY,GAAG,MAAM,CAO9E;AAED,wBAAgB,gBAAgB,CAC/B,CAAC,EAAE,WAAW,GAAG,SAAS,EAC1B,CAAC,EAAE,WAAW,GAAG,SAAS,GACxB,MAAM,CAYR"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.compareRevisions = exports.subtractChangeAtomIds = exports.newChangeAtomIdTransform = exports.newChangeAtomIdRangeMap = exports.mintCommit = exports.CommitKind = exports.replaceAtomRevisions = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = exports.StableIdSchema = exports.RevisionTagSchema = exports.SessionIdSchema = void 0;
7
+ exports.compareRevisions = exports.subtractChangeAtomIds = exports.newChangeAtomIdRangeMap = exports.mintCommit = exports.CommitKind = exports.replaceAtomRevisions = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = exports.StableIdSchema = exports.RevisionTagSchema = exports.SessionIdSchema = void 0;
8
8
  const typebox_1 = require("@sinclair/typebox");
9
9
  const index_js_1 = require("../../util/index.js");
10
10
  /**
@@ -102,10 +102,6 @@ function newChangeAtomIdRangeMap() {
102
102
  return new index_js_1.RangeMap(offsetChangeAtomId, subtractChangeAtomIds);
103
103
  }
104
104
  exports.newChangeAtomIdRangeMap = newChangeAtomIdRangeMap;
105
- function newChangeAtomIdTransform() {
106
- return new index_js_1.RangeMap(offsetChangeAtomId, subtractChangeAtomIds, offsetChangeAtomId);
107
- }
108
- exports.newChangeAtomIdTransform = newChangeAtomIdTransform;
109
105
  function subtractChangeAtomIds(a, b) {
110
106
  const cmp = compareRevisions(a.revision, b.revision);
111
107
  if (cmp !== 0) {
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,+CAAyC;AAEzC,kDAO6B;AAE7B;;GAEG;AACU,QAAA,eAAe,GAAG,IAAA,4BAAiB,GAAa,CAAC;AAWjD,QAAA,iBAAiB,GAAG,cAAI,CAAC,KAAK,CAAC;IAC3C,cAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACpB,IAAA,4BAAiB,GAAuC;CACxD,CAAC,CAAC;AAGU,QAAA,cAAc,GAAG,cAAI,CAAC,MAAM,EAAE,CAAC;AA+B5C;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAe,EAAE,CAAe;IACrE,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC;AAC7D,CAAC;AAFD,sDAEC;AAED,SAAgB,wBAAwB,CACvC,CAA2B,EAC3B,CAA2B;IAE3B,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChB,CAAC;IAED,OAAO,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AACpC,CAAC;AATD,4DASC;AAED;;GAEG;AACH,SAAgB,gBAAgB,CAC/B,OAAyB,EACzB,QAAsB;IAEtB,OAAO,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC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C,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;SAAM,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,CAAC,CAAC;IACV,CAAC;SAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC,CAAC;IACX,CAAC;SAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC;IACV,CAAC;IAED,OAAO,CAAC,CAAC;AACV,CAAC;AAfD,4CAeC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tOpSpaceCompressedId,\n\tSessionId,\n\tSessionSpaceCompressedId,\n\tStableId,\n} from \"@fluidframework/id-compressor\";\nimport { Type } from \"@sinclair/typebox\";\n\nimport {\n\ttype Brand,\n\ttype NestedMap,\n\tRangeMap,\n\tbrand,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\n\n/**\n * The identifier for a particular session/user/client that can generate `GraphCommit`s\n */\nexport const SessionIdSchema = brandedStringType<SessionId>();\n\n/**\n * A unique identifier for a commit. Commits that have been rebased, but are semantically\n * the same, will share the same revision tag.\n *\n * The constant 'root' is reserved for the trunk base: minting a SessionSpaceCompressedId is not\n * possible on readonly clients. These clients generally don't need ids, but must be done at tree initialization time.\n */\nexport type RevisionTag = SessionSpaceCompressedId | \"root\";\nexport type EncodedRevisionTag = Brand<OpSpaceCompressedId, \"EncodedRevisionTag\"> | \"root\";\nexport const RevisionTagSchema = Type.Union([\n\tType.Literal(\"root\"),\n\tbrandedNumberType<Exclude<EncodedRevisionTag, string>>(),\n]);\n\nexport type EncodedStableId = Brand<StableId, \"EncodedStableId\">;\nexport const StableIdSchema = Type.String();\n\n/**\n * An ID which is unique within a revision of a `ModularChangeset`.\n * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s,\n * but they are unique when qualified by the revision of the change they are used in.\n */\nexport type ChangesetLocalId = Brand<number, \"ChangesetLocalId\">;\n\n/**\n * A globally unique ID for an atom of change, or a node associated with the atom of change.\n * *\n * @privateRemarks\n * TODO: Rename this to be more general.\n */\nexport interface ChangeAtomId {\n\t/**\n\t * Uniquely identifies the changeset within which the change was made.\n\t * Only undefined when referring to an anonymous changesets.\n\t */\n\treadonly revision?: RevisionTag;\n\t/**\n\t * Uniquely identifies, in the scope of the changeset, the change made to the field.\n\t */\n\treadonly localId: ChangesetLocalId;\n}\n\nexport type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | ChangesetLocalId;\n\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n * Returns true iff `a` and `b` are the same.\n */\nexport function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean {\n\treturn a.localId === b.localId && a.revision === b.revision;\n}\n\nexport function areEqualChangeAtomIdOpts(\n\ta: ChangeAtomId | undefined,\n\tb: ChangeAtomId | undefined,\n): boolean {\n\tif (a === undefined || b === undefined) {\n\t\treturn a === b;\n\t}\n\n\treturn areEqualChangeAtomIds(a, b);\n}\n\n/**\n * Returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(\n\tlocalId: ChangesetLocalId,\n\trevision?: RevisionTag,\n): ChangeAtomId {\n\treturn revision === undefined ? { localId } : { localId, revision };\n}\n\nexport function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId {\n\treturn typeof id === \"object\" ? id : { localId: id };\n}\n\nexport function taggedAtomId(\n\tid: ChangeAtomId,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn makeChangeAtomId(id.localId, id.revision ?? revision);\n}\n\nexport function taggedOptAtomId(\n\tid: ChangeAtomId | undefined,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId | undefined {\n\tif (id === undefined) {\n\t\treturn undefined;\n\t}\n\treturn taggedAtomId(id, revision);\n}\n\nexport function offsetChangeAtomId<T extends ChangeAtomId = ChangeAtomId>(\n\tid: T,\n\toffset: number,\n): T {\n\treturn { ...id, localId: brand(id.localId + offset) };\n}\n\nexport function replaceAtomRevisions(\n\tid: ChangeAtomId,\n\toldRevisions: Set<RevisionTag | undefined>,\n\tnewRevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn oldRevisions.has(id.revision) ? atomWithRevision(id, newRevision) : id;\n}\n\nfunction atomWithRevision(id: ChangeAtomId, revision: RevisionTag | undefined): ChangeAtomId {\n\tconst updated = { ...id, revision };\n\tif (revision === undefined) {\n\t\tdelete updated.revision;\n\t}\n\n\treturn updated;\n}\n\n/**\n * A node in a graph of commits. A commit's parent is the commit on which it was based.\n */\nexport interface GraphCommit<TChange> {\n\t/** The tag for this commit. If this commit is rebased, the corresponding rebased commit will retain this tag. */\n\treadonly revision: RevisionTag;\n\t/** The change that will result from applying this commit */\n\treadonly change: TChange;\n\t/** The parent of this commit, on whose change this commit's change is based */\n\treadonly parent?: GraphCommit<TChange>;\n}\n\n/**\n * The type of a commit. This is used to describe the context in which the commit was created.\n *\n * @public\n */\nexport enum CommitKind {\n\t/** A commit corresponding to a change that is not the result of an undo/redo from this client. */\n\tDefault,\n\t/** A commit that is the result of an undo from this client. */\n\tUndo,\n\t/** A commit that is the result of a redo from this client. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @sealed @public\n */\nexport interface CommitMetadata {\n\t/**\n\t * A {@link CommitKind} enum value describing whether the commit represents an Edit, an Undo, or a Redo.\n\t */\n\treadonly kind: CommitKind;\n\t/**\n\t * Indicates whether the commit is a local edit\n\t */\n\treadonly isLocal: boolean;\n}\n\n/**\n * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.\n * @param parent - the parent of the new commit\n * @param commit - the contents of the new commit object\n * @returns the new commit object\n */\n// Note that this function is synchronous, and therefore it is not a Promise.\n// However, it is still a strong commit-mint.\nexport function mintCommit<TChange>(\n\tparent: GraphCommit<TChange>,\n\tcommit: Omit<GraphCommit<TChange>, \"parent\">,\n): GraphCommit<TChange> {\n\tconst { revision, change } = commit;\n\treturn {\n\t\trevision,\n\t\tchange,\n\t\tparent,\n\t};\n}\n\nexport type ChangeAtomIdRangeMap<V> = RangeMap<ChangeAtomId, V>;\n\nexport function newChangeAtomIdRangeMap<V>(): ChangeAtomIdRangeMap<V> {\n\treturn new RangeMap(offsetChangeAtomId, subtractChangeAtomIds);\n}\n\nexport function newChangeAtomIdTransform(): ChangeAtomIdRangeMap<ChangeAtomId> {\n\treturn new RangeMap(offsetChangeAtomId, subtractChangeAtomIds, offsetChangeAtomId);\n}\n\nexport function subtractChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): number {\n\tconst cmp = compareRevisions(a.revision, b.revision);\n\tif (cmp !== 0) {\n\t\treturn cmp * Number.POSITIVE_INFINITY;\n\t}\n\n\treturn a.localId - b.localId;\n}\n\nexport function compareRevisions(\n\ta: RevisionTag | undefined,\n\tb: RevisionTag | undefined,\n): number {\n\tif (a === undefined) {\n\t\treturn b === undefined ? 0 : -1;\n\t} else if (b === undefined) {\n\t\treturn 1;\n\t} else if (a < b) {\n\t\treturn -1;\n\t} else if (a > b) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,+CAAyC;AAEzC,kDAQ6B;AAE7B;;GAEG;AACU,QAAA,eAAe,GAAG,IAAA,4BAAiB,GAAa,CAAC;AAWjD,QAAA,iBAAiB,GAAG,cAAI,CAAC,KAAK,CAAC;IAC3C,cAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACpB,IAAA,4BAAiB,GAAuC;CACxD,CAAC,CAAC;AAGU,QAAA,cAAc,GAAG,cAAI,CAAC,MAAM,EAAE,CAAC;AA+B5C;;GAEG;AACH,SAAgB,qBAAqB,CAAC,CAAe,EAAE,CAAe;IACrE,OAAO,CAAC,CA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ACrD,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC;QACf,OAAO,GAAG,GAAG,MAAM,CAAC,iBAAiB,CAAC;IACvC,CAAC;IAED,OAAO,CAAC,CAAC,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC;AAC9B,CAAC;AAPD,sDAOC;AAED,SAAgB,gBAAgB,CAC/B,CAA0B,EAC1B,CAA0B;IAE1B,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACrB,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;SAAM,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,CAAC,CAAC;IACV,CAAC;SAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC,CAAC;IACX,CAAC;SAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC;IACV,CAAC;IAED,OAAO,CAAC,CAAC;AACV,CAAC;AAfD,4CAeC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tOpSpaceCompressedId,\n\tSessionId,\n\tSessionSpaceCompressedId,\n\tStableId,\n} from \"@fluidframework/id-compressor\";\nimport { Type } from \"@sinclair/typebox\";\n\nimport {\n\ttype Brand,\n\ttype JsonCompatibleReadOnly,\n\ttype NestedMap,\n\tRangeMap,\n\tbrand,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\n\n/**\n * The identifier for a particular session/user/client that can generate `GraphCommit`s\n */\nexport const SessionIdSchema = brandedStringType<SessionId>();\n\n/**\n * A unique identifier for a commit. Commits that have been rebased, but are semantically\n * the same, will share the same revision tag.\n *\n * The constant 'root' is reserved for the trunk base: minting a SessionSpaceCompressedId is not\n * possible on readonly clients. These clients generally don't need ids, but must be done at tree initialization time.\n */\nexport type RevisionTag = SessionSpaceCompressedId | \"root\";\nexport type EncodedRevisionTag = Brand<OpSpaceCompressedId, \"EncodedRevisionTag\"> | \"root\";\nexport const RevisionTagSchema = Type.Union([\n\tType.Literal(\"root\"),\n\tbrandedNumberType<Exclude<EncodedRevisionTag, string>>(),\n]);\n\nexport type EncodedStableId = Brand<StableId, \"EncodedStableId\">;\nexport const StableIdSchema = Type.String();\n\n/**\n * An ID which is unique within a revision of a `ModularChangeset`.\n * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s,\n * but they are unique when qualified by the revision of the change they are used in.\n */\nexport type ChangesetLocalId = Brand<number, \"ChangesetLocalId\">;\n\n/**\n * A globally unique ID for an atom of change, or a node associated with the atom of change.\n * *\n * @privateRemarks\n * TODO: Rename this to be more general.\n */\nexport interface ChangeAtomId {\n\t/**\n\t * Uniquely identifies the changeset within which the change was made.\n\t * Only undefined when referring to an anonymous changesets.\n\t */\n\treadonly revision?: RevisionTag;\n\t/**\n\t * Uniquely identifies, in the scope of the changeset, the change made to the field.\n\t */\n\treadonly localId: ChangesetLocalId;\n}\n\nexport type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | ChangesetLocalId;\n\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n * Returns true iff `a` and `b` are the same.\n */\nexport function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean {\n\treturn a.localId === b.localId && a.revision === b.revision;\n}\n\nexport function areEqualChangeAtomIdOpts(\n\ta: ChangeAtomId | undefined,\n\tb: ChangeAtomId | undefined,\n): boolean {\n\tif (a === undefined || b === undefined) {\n\t\treturn a === b;\n\t}\n\n\treturn areEqualChangeAtomIds(a, b);\n}\n\n/**\n * Returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(\n\tlocalId: ChangesetLocalId,\n\trevision?: RevisionTag,\n): ChangeAtomId {\n\treturn revision === undefined ? { localId } : { localId, revision };\n}\n\nexport function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId {\n\treturn typeof id === \"object\" ? id : { localId: id };\n}\n\nexport function taggedAtomId(\n\tid: ChangeAtomId,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn makeChangeAtomId(id.localId, id.revision ?? revision);\n}\n\nexport function taggedOptAtomId(\n\tid: ChangeAtomId | undefined,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId | undefined {\n\tif (id === undefined) {\n\t\treturn undefined;\n\t}\n\treturn taggedAtomId(id, revision);\n}\n\nexport function offsetChangeAtomId(id: ChangeAtomId, offset: number): ChangeAtomId {\n\treturn { ...id, localId: brand(id.localId + offset) };\n}\n\nexport function replaceAtomRevisions(\n\tid: ChangeAtomId,\n\toldRevisions: Set<RevisionTag | undefined>,\n\tnewRevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn oldRevisions.has(id.revision) ? atomWithRevision(id, newRevision) : id;\n}\n\nfunction atomWithRevision(id: ChangeAtomId, revision: RevisionTag | undefined): ChangeAtomId {\n\tconst updated = { ...id, revision };\n\tif (revision === undefined) {\n\t\tdelete updated.revision;\n\t}\n\n\treturn updated;\n}\n\n/**\n * A node in a graph of commits. A commit's parent is the commit on which it was based.\n */\nexport interface GraphCommit<TChange> {\n\t/** The tag for this commit. If this commit is rebased, the corresponding rebased commit will retain this tag. */\n\treadonly revision: RevisionTag;\n\t/** The change that will result from applying this commit */\n\treadonly change: TChange;\n\t/** The parent of this commit, on whose change this commit's change is based */\n\treadonly parent?: GraphCommit<TChange>;\n}\n\n/**\n * The type of a commit. This is used to describe the context in which the commit was created.\n *\n * @public\n */\nexport enum CommitKind {\n\t/** A commit corresponding to a change that is not the result of an undo/redo from this client. */\n\tDefault,\n\t/** A commit that is the result of an undo from this client. */\n\tUndo,\n\t/** A commit that is the result of a redo from this client. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @sealed @public\n */\nexport interface CommitMetadata {\n\t/**\n\t * A {@link CommitKind} enum value describing whether the commit represents an Edit, an Undo, or a Redo.\n\t */\n\treadonly kind: CommitKind;\n\t/**\n\t * Indicates whether the commit is a local edit\n\t */\n\treadonly isLocal: boolean;\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @sealed @alpha\n */\nexport type ChangeMetadata = CommitMetadata &\n\t(\n\t\t| {\n\t\t\t\treadonly isLocal: true;\n\t\t\t\t/**\n\t\t\t\t * A serializable object that encodes the change.\n\t\t\t\t * @remarks This change object can be {@link TreeBranchAlpha.applyChange | applied to another branch} in the same state as the one which generated it.\n\t\t\t\t * The change object must be applied to a SharedTree with the same IdCompressor session ID as it was created from.\n\t\t\t\t * @privateRemarks\n\t\t\t\t * This is a `SerializedChange` from treeCheckout.ts.\n\t\t\t\t */\n\t\t\t\tgetChange(): JsonCompatibleReadOnly;\n\t\t }\n\t\t| {\n\t\t\t\treadonly isLocal: false;\n\t\t\t\treadonly getChange?: undefined;\n\t\t }\n\t);\n\n/**\n * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.\n * @param parent - the parent of the new commit\n * @param commit - the contents of the new commit object\n * @returns the new commit object\n */\n// Note that this function is synchronous, and therefore it is not a Promise.\n// However, it is still a strong commit-mint.\nexport function mintCommit<TChange>(\n\tparent: GraphCommit<TChange>,\n\tcommit: Omit<GraphCommit<TChange>, \"parent\">,\n): GraphCommit<TChange> {\n\tconst { revision, change } = commit;\n\treturn {\n\t\trevision,\n\t\tchange,\n\t\tparent,\n\t};\n}\n\nexport type ChangeAtomIdRangeMap<V> = RangeMap<ChangeAtomId, V>;\n\nexport function newChangeAtomIdRangeMap<V>(): ChangeAtomIdRangeMap<V> {\n\treturn new RangeMap(offsetChangeAtomId, subtractChangeAtomIds);\n}\n\nexport function subtractChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): number {\n\tconst cmp = compareRevisions(a.revision, b.revision);\n\tif (cmp !== 0) {\n\t\treturn cmp * Number.POSITIVE_INFINITY;\n\t}\n\n\treturn a.localId - b.localId;\n}\n\nexport function compareRevisions(\n\ta: RevisionTag | undefined,\n\tb: RevisionTag | undefined,\n): number {\n\tif (a === undefined) {\n\t\treturn b === undefined ? 0 : -1;\n\t} else if (b === undefined) {\n\t\treturn 1;\n\t} else if (a < b) {\n\t\treturn -1;\n\t} else if (a > b) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EAKjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAc,MAAM,YAAY,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,cAAc,CAAC,OAAO;IACtC;;;;OAIG;IACH,oBAAoB,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;IAC7C;;;;OAIG;IACH,aAAa,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;IACtC;;;;OAIG;IACH,aAAa,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC3B;;OAEG;IACH,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,uBAAwB,SAAQ,WAAW;IAC3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB,CAAC,OAAO;IAC1C;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,OAAO,CAAC,CA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,EAClC,eAAe,EAAE,MAAM,WAAW,GAChC,OAAO,CAWT"}
@@ -134,9 +134,7 @@ function rebaseBranch(mintRevisionTag, changeRebaser, sourceHead, targetCommit,
134
134
  rebaseDistance: targetCommits.length,
135
135
  countDropped: sourceBranchLength - sourceSet.size,
136
136
  },
137
- }, "sourceChange", () => {
138
- return changeRebaser.compose(editsToCompose);
139
- });
137
+ }, "sourceChange", () => changeRebaser.compose(editsToCompose));
140
138
  }
141
139
  exports.rebaseBranch = rebaseBranch;
142
140
  /**
@@ -167,37 +165,21 @@ function rebaseChange(changeRebaser, change, sourceHead, targetHead, mintRevisio
167
165
  }
168
166
  exports.rebaseChange = rebaseChange;
169
167
  function revisionMetadataSourceFromInfo(revInfos) {
170
- const compareRevisions = (revision1, revision2) => {
171
- const index1 = getIndex(revision1);
172
- const index2 = getIndex(revision2);
173
- if (index1 !== undefined) {
174
- return index2 !== undefined ? index2 - index1 : -1;
175
- }
176
- return index2 !== undefined ? 1 : 0;
168
+ const getIndex = (revision) => {
169
+ const index = revInfos.findIndex((revInfo) => revInfo.revision === revision);
170
+ return index >= 0 ? index : undefined;
177
171
  };
178
172
  const tryGetInfo = (revision) => {
179
173
  if (revision === undefined) {
180
174
  return undefined;
181
175
  }
182
- return revInfos.find((info) => info.revision === revision);
176
+ const index = getIndex(revision);
177
+ return index === undefined ? undefined : revInfos[index];
183
178
  };
184
179
  const hasRollback = (revision) => {
185
180
  return revInfos.find((info) => info.rollbackOf === revision) !== undefined;
186
181
  };
187
- const getIndex = (revision) => {
188
- const index = revInfos.findIndex((revInfo) => revInfo.revision === revision);
189
- if (index >= 0) {
190
- return index;
191
- }
192
- const rollbackIndex = revInfos.findIndex((revInfo) => revInfo.rollbackOf === revision);
193
- if (rollbackIndex >= 0) {
194
- // This change is the forward revision of a rollback included in revInfos, so it comes after
195
- // all revisions in revInfos. Earlier rollbacks have later forward revisions.
196
- return 2 * revInfos.length - rollbackIndex;
197
- }
198
- return undefined;
199
- };
200
- return { compareRevisions, tryGetInfo, hasRollback };
182
+ return { getIndex, tryGetInfo, hasRollback };
201
183
  }
202
184
  exports.revisionMetadataSourceFromInfo = revisionMetadataSourceFromInfo;
203
185
  function rebaseChangeOverChanges(changeRebaser, changeToRebase, changesToRebaseOver) {