@fluidframework/tree 2.13.0 → 2.20.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 (303) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/api-report/tree.alpha.api.md +22 -12
  3. package/api-report/tree.beta.api.md +9 -5
  4. package/api-report/tree.legacy.alpha.api.md +9 -5
  5. package/api-report/tree.legacy.public.api.md +9 -5
  6. package/api-report/tree.public.api.md +9 -5
  7. package/assertTagging.config.mjs +14 -0
  8. package/dist/alpha.d.ts +3 -0
  9. package/dist/core/index.d.ts +2 -2
  10. package/dist/core/index.d.ts.map +1 -1
  11. package/dist/core/index.js +6 -4
  12. package/dist/core/index.js.map +1 -1
  13. package/dist/core/rebase/index.d.ts +2 -2
  14. package/dist/core/rebase/index.d.ts.map +1 -1
  15. package/dist/core/rebase/index.js +5 -1
  16. package/dist/core/rebase/index.js.map +1 -1
  17. package/dist/core/rebase/types.d.ts +5 -4
  18. package/dist/core/rebase/types.d.ts.map +1 -1
  19. package/dist/core/rebase/types.js +29 -1
  20. package/dist/core/rebase/types.js.map +1 -1
  21. package/dist/core/rebase/utils.d.ts +10 -0
  22. package/dist/core/rebase/utils.d.ts.map +1 -1
  23. package/dist/core/rebase/utils.js +22 -1
  24. package/dist/core/rebase/utils.js.map +1 -1
  25. package/dist/core/tree/delta.d.ts +21 -26
  26. package/dist/core/tree/delta.d.ts.map +1 -1
  27. package/dist/core/tree/delta.js.map +1 -1
  28. package/dist/core/tree/deltaUtil.d.ts +1 -3
  29. package/dist/core/tree/deltaUtil.d.ts.map +1 -1
  30. package/dist/core/tree/deltaUtil.js +2 -14
  31. package/dist/core/tree/deltaUtil.js.map +1 -1
  32. package/dist/core/tree/index.d.ts +1 -1
  33. package/dist/core/tree/index.d.ts.map +1 -1
  34. package/dist/core/tree/index.js +1 -3
  35. package/dist/core/tree/index.js.map +1 -1
  36. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  37. package/dist/core/tree/visitDelta.js +82 -80
  38. package/dist/core/tree/visitDelta.js.map +1 -1
  39. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  40. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  41. package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
  42. package/dist/feature-libraries/deltaUtils.js +13 -0
  43. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  44. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  45. package/dist/feature-libraries/forest-summary/forestSummarizer.js +1 -6
  46. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  47. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +5 -5
  48. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  49. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +2 -9
  50. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  51. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +19 -2
  52. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  53. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  54. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  55. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  56. package/dist/feature-libraries/modular-schema/index.d.ts +2 -2
  57. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  58. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  59. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +1 -1
  60. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  61. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +8 -8
  62. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  63. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +4 -4
  64. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  65. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +105 -199
  66. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  67. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +11 -20
  68. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  69. package/dist/feature-libraries/modular-schema/modularChangeTypes.js +20 -0
  70. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  71. package/dist/feature-libraries/optional-field/optionalField.d.ts +3 -3
  72. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  73. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  74. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +1 -1
  75. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  76. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  77. package/dist/feature-libraries/sequence-field/rebase.js +4 -4
  78. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  79. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  80. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  81. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  82. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  83. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  84. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  85. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  86. package/dist/feature-libraries/sequence-field/utils.js +36 -4
  87. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  88. package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  89. package/dist/feature-libraries/treeCursorUtils.js +4 -1
  90. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  91. package/dist/index.d.ts +26 -2
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.js +4 -2
  94. package/dist/index.js.map +1 -1
  95. package/dist/package.json +2 -1
  96. package/dist/packageVersion.d.ts +1 -1
  97. package/dist/packageVersion.js +1 -1
  98. package/dist/packageVersion.js.map +1 -1
  99. package/dist/shared-tree/index.d.ts +1 -1
  100. package/dist/shared-tree/index.d.ts.map +1 -1
  101. package/dist/shared-tree/index.js +4 -2
  102. package/dist/shared-tree/index.js.map +1 -1
  103. package/dist/shared-tree/sharedTree.d.ts +38 -18
  104. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  105. package/dist/shared-tree/sharedTree.js +38 -34
  106. package/dist/shared-tree/sharedTree.js.map +1 -1
  107. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  108. package/dist/shared-tree/treeCheckout.js +12 -8
  109. package/dist/shared-tree/treeCheckout.js.map +1 -1
  110. package/dist/simple-tree/api/treeNodeApi.js +1 -1
  111. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  112. package/dist/simple-tree/arrayNode.js +1 -1
  113. package/dist/simple-tree/arrayNode.js.map +1 -1
  114. package/dist/simple-tree/toMapTree.js +1 -1
  115. package/dist/simple-tree/toMapTree.js.map +1 -1
  116. package/dist/util/bTreeUtils.d.ts +10 -0
  117. package/dist/util/bTreeUtils.d.ts.map +1 -0
  118. package/dist/util/bTreeUtils.js +52 -0
  119. package/dist/util/bTreeUtils.js.map +1 -0
  120. package/dist/util/idAllocator.d.ts +0 -2
  121. package/dist/util/idAllocator.d.ts.map +1 -1
  122. package/dist/util/idAllocator.js +0 -2
  123. package/dist/util/idAllocator.js.map +1 -1
  124. package/dist/util/index.d.ts +2 -1
  125. package/dist/util/index.d.ts.map +1 -1
  126. package/dist/util/index.js +5 -1
  127. package/dist/util/index.js.map +1 -1
  128. package/dist/util/rangeMap.d.ts +52 -30
  129. package/dist/util/rangeMap.d.ts.map +1 -1
  130. package/dist/util/rangeMap.js +161 -117
  131. package/dist/util/rangeMap.js.map +1 -1
  132. package/dist/util/utils.d.ts +4 -1
  133. package/dist/util/utils.d.ts.map +1 -1
  134. package/dist/util/utils.js +7 -1
  135. package/dist/util/utils.js.map +1 -1
  136. package/lib/alpha.d.ts +3 -0
  137. package/lib/core/index.d.ts +2 -2
  138. package/lib/core/index.d.ts.map +1 -1
  139. package/lib/core/index.js +2 -2
  140. package/lib/core/index.js.map +1 -1
  141. package/lib/core/rebase/index.d.ts +2 -2
  142. package/lib/core/rebase/index.d.ts.map +1 -1
  143. package/lib/core/rebase/index.js +2 -2
  144. package/lib/core/rebase/index.js.map +1 -1
  145. package/lib/core/rebase/types.d.ts +5 -4
  146. package/lib/core/rebase/types.d.ts.map +1 -1
  147. package/lib/core/rebase/types.js +26 -1
  148. package/lib/core/rebase/types.js.map +1 -1
  149. package/lib/core/rebase/utils.d.ts +10 -0
  150. package/lib/core/rebase/utils.d.ts.map +1 -1
  151. package/lib/core/rebase/utils.js +20 -0
  152. package/lib/core/rebase/utils.js.map +1 -1
  153. package/lib/core/tree/delta.d.ts +21 -26
  154. package/lib/core/tree/delta.d.ts.map +1 -1
  155. package/lib/core/tree/delta.js.map +1 -1
  156. package/lib/core/tree/deltaUtil.d.ts +1 -3
  157. package/lib/core/tree/deltaUtil.d.ts.map +1 -1
  158. package/lib/core/tree/deltaUtil.js +1 -12
  159. package/lib/core/tree/deltaUtil.js.map +1 -1
  160. package/lib/core/tree/index.d.ts +1 -1
  161. package/lib/core/tree/index.d.ts.map +1 -1
  162. package/lib/core/tree/index.js +1 -1
  163. package/lib/core/tree/index.js.map +1 -1
  164. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  165. package/lib/core/tree/visitDelta.js +82 -80
  166. package/lib/core/tree/visitDelta.js.map +1 -1
  167. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  168. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  169. package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
  170. package/lib/feature-libraries/deltaUtils.js +13 -0
  171. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  172. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  173. package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -6
  174. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  175. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +5 -5
  176. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  177. package/lib/feature-libraries/modular-schema/crossFieldQueries.js +2 -9
  178. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  179. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +19 -2
  180. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  181. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  182. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  183. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  184. package/lib/feature-libraries/modular-schema/index.d.ts +2 -2
  185. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  186. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  187. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +1 -1
  188. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  189. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +4 -4
  190. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  191. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +4 -4
  192. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  193. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +74 -166
  194. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  195. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +11 -20
  196. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  197. package/lib/feature-libraries/modular-schema/modularChangeTypes.js +18 -1
  198. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  199. package/lib/feature-libraries/optional-field/optionalField.d.ts +3 -3
  200. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  201. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  202. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +1 -1
  203. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  204. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  205. package/lib/feature-libraries/sequence-field/rebase.js +4 -4
  206. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  207. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  208. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  209. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  210. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  211. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  212. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  213. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  214. package/lib/feature-libraries/sequence-field/utils.js +36 -4
  215. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  216. package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  217. package/lib/feature-libraries/treeCursorUtils.js +4 -1
  218. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  219. package/lib/index.d.ts +26 -2
  220. package/lib/index.d.ts.map +1 -1
  221. package/lib/index.js +1 -1
  222. package/lib/index.js.map +1 -1
  223. package/lib/packageVersion.d.ts +1 -1
  224. package/lib/packageVersion.js +1 -1
  225. package/lib/packageVersion.js.map +1 -1
  226. package/lib/shared-tree/index.d.ts +1 -1
  227. package/lib/shared-tree/index.d.ts.map +1 -1
  228. package/lib/shared-tree/index.js +1 -1
  229. package/lib/shared-tree/index.js.map +1 -1
  230. package/lib/shared-tree/sharedTree.d.ts +38 -18
  231. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  232. package/lib/shared-tree/sharedTree.js +37 -33
  233. package/lib/shared-tree/sharedTree.js.map +1 -1
  234. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  235. package/lib/shared-tree/treeCheckout.js +13 -9
  236. package/lib/shared-tree/treeCheckout.js.map +1 -1
  237. package/lib/simple-tree/api/treeNodeApi.js +1 -1
  238. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  239. package/lib/simple-tree/arrayNode.js +1 -1
  240. package/lib/simple-tree/arrayNode.js.map +1 -1
  241. package/lib/simple-tree/toMapTree.js +1 -1
  242. package/lib/simple-tree/toMapTree.js.map +1 -1
  243. package/lib/util/bTreeUtils.d.ts +10 -0
  244. package/lib/util/bTreeUtils.d.ts.map +1 -0
  245. package/lib/util/bTreeUtils.js +47 -0
  246. package/lib/util/bTreeUtils.js.map +1 -0
  247. package/lib/util/idAllocator.d.ts +0 -2
  248. package/lib/util/idAllocator.d.ts.map +1 -1
  249. package/lib/util/idAllocator.js +0 -2
  250. package/lib/util/idAllocator.js.map +1 -1
  251. package/lib/util/index.d.ts +2 -1
  252. package/lib/util/index.d.ts.map +1 -1
  253. package/lib/util/index.js +2 -1
  254. package/lib/util/index.js.map +1 -1
  255. package/lib/util/rangeMap.d.ts +52 -30
  256. package/lib/util/rangeMap.d.ts.map +1 -1
  257. package/lib/util/rangeMap.js +160 -117
  258. package/lib/util/rangeMap.js.map +1 -1
  259. package/lib/util/utils.d.ts +4 -1
  260. package/lib/util/utils.d.ts.map +1 -1
  261. package/lib/util/utils.js +7 -1
  262. package/lib/util/utils.js.map +1 -1
  263. package/package.json +23 -23
  264. package/src/core/index.ts +5 -2
  265. package/src/core/rebase/index.ts +5 -0
  266. package/src/core/rebase/types.ts +33 -5
  267. package/src/core/rebase/utils.ts +27 -0
  268. package/src/core/tree/delta.ts +21 -26
  269. package/src/core/tree/deltaUtil.ts +1 -16
  270. package/src/core/tree/index.ts +0 -2
  271. package/src/core/tree/visitDelta.ts +108 -97
  272. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +2 -2
  273. package/src/feature-libraries/deltaUtils.ts +13 -0
  274. package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -6
  275. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +12 -13
  276. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +21 -1
  277. package/src/feature-libraries/modular-schema/genericFieldKind.ts +2 -2
  278. package/src/feature-libraries/modular-schema/index.ts +2 -0
  279. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +12 -11
  280. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +138 -225
  281. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +40 -27
  282. package/src/feature-libraries/optional-field/optionalField.ts +3 -3
  283. package/src/feature-libraries/sequence-field/moveEffectTable.ts +1 -1
  284. package/src/feature-libraries/sequence-field/rebase.ts +9 -3
  285. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +1 -1
  286. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +1 -1
  287. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +3 -4
  288. package/src/feature-libraries/sequence-field/utils.ts +36 -4
  289. package/src/feature-libraries/treeCursorUtils.ts +6 -1
  290. package/src/index.ts +34 -6
  291. package/src/packageVersion.ts +1 -1
  292. package/src/shared-tree/index.ts +4 -1
  293. package/src/shared-tree/sharedTree.ts +60 -40
  294. package/src/shared-tree/treeCheckout.ts +19 -12
  295. package/src/simple-tree/api/treeNodeApi.ts +1 -1
  296. package/src/simple-tree/arrayNode.ts +1 -1
  297. package/src/simple-tree/toMapTree.ts +1 -1
  298. package/src/util/bTreeUtils.ts +60 -0
  299. package/src/util/idAllocator.ts +0 -2
  300. package/src/util/index.ts +3 -0
  301. package/src/util/rangeMap.ts +208 -143
  302. package/src/util/utils.ts +10 -3
  303. package/lib/package.json +0 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @fluidframework/tree
2
2
 
3
+ ## 2.20.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Events-related interfaces have been moved to core-interfaces ([#23313](https://github.com/microsoft/FluidFramework/pull/23313)) [69a755ebd7](https://github.com/microsoft/FluidFramework/commit/69a755ebd76db36ffd4638d331062f96ec4c0648)
8
+
9
+ The following interfaces and types have been moved from the `@fluidframework/tree` package into the
10
+ `@fluidframework/core-interfaces` package. As such, they are now deprecated in the `@fluidframework/tree` package.
11
+
12
+ - Listeners
13
+ - IsListener
14
+ - Listenable
15
+ - Off
16
+
17
+ Users should now import them from either `@fluidframework/core-interfaces` or `fluid-framework`.
18
+
19
+ These deprecated interfaces will be removed from the `@fluidframework/tree` package in Fluid Framework v3.0.
20
+
3
21
  ## 2.13.0
4
22
 
5
23
  ### Minor Changes
@@ -186,13 +186,19 @@ export interface ForestOptions {
186
186
  readonly forest?: ForestType;
187
187
  }
188
188
 
189
- // @alpha
190
- export enum ForestType {
191
- Expensive = 2,
192
- Optimized = 1,
193
- Reference = 0
189
+ // @alpha @sealed
190
+ export interface ForestType extends ErasedType_2<"ForestType"> {
194
191
  }
195
192
 
193
+ // @alpha
194
+ export const ForestTypeExpensiveDebug: ForestType;
195
+
196
+ // @alpha
197
+ export const ForestTypeOptimized: ForestType;
198
+
199
+ // @alpha
200
+ export const ForestTypeReference: ForestType;
201
+
196
202
  // @alpha @deprecated
197
203
  export function getBranch(tree: ITree): BranchableTree;
198
204
 
@@ -329,7 +335,8 @@ declare namespace InternalTypes {
329
335
  }
330
336
  export { InternalTypes }
331
337
 
332
- export { IsListener }
338
+ // @public @deprecated
339
+ export type IsListener<T> = IsListener_2<T>;
333
340
 
334
341
  // @alpha
335
342
  export type IsUnion<T, T2 = T> = T extends unknown ? [T2] extends [T] ? false : true : "error";
@@ -433,9 +440,11 @@ export interface JsonValidator {
433
440
  // @public
434
441
  export type LazyItem<Item = unknown> = Item | (() => Item);
435
442
 
436
- export { Listenable }
443
+ // @public @deprecated
444
+ export type Listenable<T extends object> = Listenable_2<T>;
437
445
 
438
- export { Listeners }
446
+ // @public @deprecated
447
+ export type Listeners<T extends object> = Listeners_2<T>;
439
448
 
440
449
  // @public @sealed
441
450
  export interface MakeNominal {
@@ -501,7 +510,8 @@ type ObjectFromSchemaRecordUnsafe<T extends Unenforced<RestrictiveStringRecord<I
501
510
  -readonly [Property in keyof T]: TreeFieldFromImplicitFieldUnsafe<T[Property]>;
502
511
  };
503
512
 
504
- export { Off }
513
+ // @public @deprecated
514
+ export type Off = Off_2;
505
515
 
506
516
  // @alpha
507
517
  export interface ParseOptions<TCustom> {
@@ -804,7 +814,7 @@ export const TreeBeta: {
804
814
  // @alpha @sealed
805
815
  export interface TreeBranch extends IDisposable {
806
816
  dispose(error?: Error): void;
807
- readonly events: Listenable<TreeBranchEvents>;
817
+ readonly events: Listenable_2<TreeBranchEvents>;
808
818
  fork(): TreeBranch;
809
819
  hasRootSchema<TSchema extends ImplicitFieldSchema>(schema: TSchema): this is TreeViewAlpha<TSchema>;
810
820
  merge(branch: TreeBranch, disposeMerged?: boolean): void;
@@ -965,7 +975,7 @@ export enum TreeStatus {
965
975
  // @public @sealed
966
976
  export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends IDisposable {
967
977
  readonly compatibility: SchemaCompatibilityStatus;
968
- readonly events: Listenable<TreeViewEvents>;
978
+ readonly events: Listenable_2<TreeViewEvents>;
969
979
  initialize(content: InsertableTreeFieldFromImplicitField<TSchema>): void;
970
980
  get root(): TreeFieldFromImplicitField<TSchema>;
971
981
  set root(newRoot: InsertableTreeFieldFromImplicitField<TSchema>);
@@ -976,7 +986,7 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
976
986
  // @alpha @sealed
977
987
  export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeView<ReadSchema<TSchema>>, "root" | "initialize">, TreeBranch {
978
988
  // (undocumented)
979
- readonly events: Listenable<TreeViewEvents & TreeBranchEvents>;
989
+ readonly events: Listenable_2<TreeViewEvents & TreeBranchEvents>;
980
990
  // (undocumented)
981
991
  fork(): ReturnType<TreeBranch["fork"]> & TreeViewAlpha<TSchema>;
982
992
  // (undocumented)
@@ -197,7 +197,8 @@ declare namespace InternalTypes {
197
197
  }
198
198
  export { InternalTypes }
199
199
 
200
- export { IsListener }
200
+ // @public @deprecated
201
+ export type IsListener<T> = IsListener_2<T>;
201
202
 
202
203
  // @public @sealed
203
204
  export class IterableTreeArrayContent<T> implements Iterable<T> {
@@ -222,9 +223,11 @@ export interface ITreeViewConfiguration<TSchema extends ImplicitFieldSchema = Im
222
223
  // @public
223
224
  export type LazyItem<Item = unknown> = Item | (() => Item);
224
225
 
225
- export { Listenable }
226
+ // @public @deprecated
227
+ export type Listenable<T extends object> = Listenable_2<T>;
226
228
 
227
- export { Listeners }
229
+ // @public @deprecated
230
+ export type Listeners<T extends object> = Listeners_2<T>;
228
231
 
229
232
  // @public @sealed
230
233
  export interface MakeNominal {
@@ -287,7 +290,8 @@ type ObjectFromSchemaRecordUnsafe<T extends Unenforced<RestrictiveStringRecord<I
287
290
  -readonly [Property in keyof T]: TreeFieldFromImplicitFieldUnsafe<T[Property]>;
288
291
  };
289
292
 
290
- export { Off }
293
+ // @public @deprecated
294
+ export type Off = Off_2;
291
295
 
292
296
  // @public @sealed
293
297
  export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends ReadonlyArray<T>, Awaited<TreeNode & WithType<string, NodeKind.Array>> {
@@ -577,7 +581,7 @@ export enum TreeStatus {
577
581
  // @public @sealed
578
582
  export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends IDisposable {
579
583
  readonly compatibility: SchemaCompatibilityStatus;
580
- readonly events: Listenable<TreeViewEvents>;
584
+ readonly events: Listenable_2<TreeViewEvents>;
581
585
  initialize(content: InsertableTreeFieldFromImplicitField<TSchema>): void;
582
586
  get root(): TreeFieldFromImplicitField<TSchema>;
583
587
  set root(newRoot: InsertableTreeFieldFromImplicitField<TSchema>);
@@ -197,7 +197,8 @@ declare namespace InternalTypes {
197
197
  }
198
198
  export { InternalTypes }
199
199
 
200
- export { IsListener }
200
+ // @public @deprecated
201
+ export type IsListener<T> = IsListener_2<T>;
201
202
 
202
203
  // @public @sealed
203
204
  export class IterableTreeArrayContent<T> implements Iterable<T> {
@@ -222,9 +223,11 @@ export interface ITreeViewConfiguration<TSchema extends ImplicitFieldSchema = Im
222
223
  // @public
223
224
  export type LazyItem<Item = unknown> = Item | (() => Item);
224
225
 
225
- export { Listenable }
226
+ // @public @deprecated
227
+ export type Listenable<T extends object> = Listenable_2<T>;
226
228
 
227
- export { Listeners }
229
+ // @public @deprecated
230
+ export type Listeners<T extends object> = Listeners_2<T>;
228
231
 
229
232
  // @public @sealed
230
233
  export interface MakeNominal {
@@ -282,7 +285,8 @@ type ObjectFromSchemaRecordUnsafe<T extends Unenforced<RestrictiveStringRecord<I
282
285
  -readonly [Property in keyof T]: TreeFieldFromImplicitFieldUnsafe<T[Property]>;
283
286
  };
284
287
 
285
- export { Off }
288
+ // @public @deprecated
289
+ export type Off = Off_2;
286
290
 
287
291
  // @public @sealed
288
292
  export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends ReadonlyArray<T>, Awaited<TreeNode & WithType<string, NodeKind.Array>> {
@@ -564,7 +568,7 @@ export enum TreeStatus {
564
568
  // @public @sealed
565
569
  export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends IDisposable {
566
570
  readonly compatibility: SchemaCompatibilityStatus;
567
- readonly events: Listenable<TreeViewEvents>;
571
+ readonly events: Listenable_2<TreeViewEvents>;
568
572
  initialize(content: InsertableTreeFieldFromImplicitField<TSchema>): void;
569
573
  get root(): TreeFieldFromImplicitField<TSchema>;
570
574
  set root(newRoot: InsertableTreeFieldFromImplicitField<TSchema>);
@@ -197,7 +197,8 @@ declare namespace InternalTypes {
197
197
  }
198
198
  export { InternalTypes }
199
199
 
200
- export { IsListener }
200
+ // @public @deprecated
201
+ export type IsListener<T> = IsListener_2<T>;
201
202
 
202
203
  // @public @sealed
203
204
  export class IterableTreeArrayContent<T> implements Iterable<T> {
@@ -222,9 +223,11 @@ export interface ITreeViewConfiguration<TSchema extends ImplicitFieldSchema = Im
222
223
  // @public
223
224
  export type LazyItem<Item = unknown> = Item | (() => Item);
224
225
 
225
- export { Listenable }
226
+ // @public @deprecated
227
+ export type Listenable<T extends object> = Listenable_2<T>;
226
228
 
227
- export { Listeners }
229
+ // @public @deprecated
230
+ export type Listeners<T extends object> = Listeners_2<T>;
228
231
 
229
232
  // @public @sealed
230
233
  export interface MakeNominal {
@@ -282,7 +285,8 @@ type ObjectFromSchemaRecordUnsafe<T extends Unenforced<RestrictiveStringRecord<I
282
285
  -readonly [Property in keyof T]: TreeFieldFromImplicitFieldUnsafe<T[Property]>;
283
286
  };
284
287
 
285
- export { Off }
288
+ // @public @deprecated
289
+ export type Off = Off_2;
286
290
 
287
291
  // @public @sealed
288
292
  export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends ReadonlyArray<T>, Awaited<TreeNode & WithType<string, NodeKind.Array>> {
@@ -561,7 +565,7 @@ export enum TreeStatus {
561
565
  // @public @sealed
562
566
  export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends IDisposable {
563
567
  readonly compatibility: SchemaCompatibilityStatus;
564
- readonly events: Listenable<TreeViewEvents>;
568
+ readonly events: Listenable_2<TreeViewEvents>;
565
569
  initialize(content: InsertableTreeFieldFromImplicitField<TSchema>): void;
566
570
  get root(): TreeFieldFromImplicitField<TSchema>;
567
571
  set root(newRoot: InsertableTreeFieldFromImplicitField<TSchema>);
@@ -197,7 +197,8 @@ declare namespace InternalTypes {
197
197
  }
198
198
  export { InternalTypes }
199
199
 
200
- export { IsListener }
200
+ // @public @deprecated
201
+ export type IsListener<T> = IsListener_2<T>;
201
202
 
202
203
  // @public @sealed
203
204
  export class IterableTreeArrayContent<T> implements Iterable<T> {
@@ -222,9 +223,11 @@ export interface ITreeViewConfiguration<TSchema extends ImplicitFieldSchema = Im
222
223
  // @public
223
224
  export type LazyItem<Item = unknown> = Item | (() => Item);
224
225
 
225
- export { Listenable }
226
+ // @public @deprecated
227
+ export type Listenable<T extends object> = Listenable_2<T>;
226
228
 
227
- export { Listeners }
229
+ // @public @deprecated
230
+ export type Listeners<T extends object> = Listeners_2<T>;
228
231
 
229
232
  // @public @sealed
230
233
  export interface MakeNominal {
@@ -282,7 +285,8 @@ type ObjectFromSchemaRecordUnsafe<T extends Unenforced<RestrictiveStringRecord<I
282
285
  -readonly [Property in keyof T]: TreeFieldFromImplicitFieldUnsafe<T[Property]>;
283
286
  };
284
287
 
285
- export { Off }
288
+ // @public @deprecated
289
+ export type Off = Off_2;
286
290
 
287
291
  // @public @sealed
288
292
  export interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue> extends ReadonlyArray<T>, Awaited<TreeNode & WithType<string, NodeKind.Array>> {
@@ -561,7 +565,7 @@ export enum TreeStatus {
561
565
  // @public @sealed
562
566
  export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends IDisposable {
563
567
  readonly compatibility: SchemaCompatibilityStatus;
564
- readonly events: Listenable<TreeViewEvents>;
568
+ readonly events: Listenable_2<TreeViewEvents>;
565
569
  initialize(content: InsertableTreeFieldFromImplicitField<TSchema>): void;
566
570
  get root(): TreeFieldFromImplicitField<TSchema>;
567
571
  set root(newRoot: InsertableTreeFieldFromImplicitField<TSchema>);
@@ -0,0 +1,14 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ /**
7
+ * @type {import("@fluid-tools/build-cli").AssertTaggingConfig}
8
+ */
9
+ export default {
10
+ assertionFunctions: {
11
+ "assert": 1,
12
+ "fail": 0,
13
+ },
14
+ };
package/dist/alpha.d.ts CHANGED
@@ -105,6 +105,9 @@ export {
105
105
  FluidClientVersion,
106
106
  ForestOptions,
107
107
  ForestType,
108
+ ForestTypeExpensiveDebug,
109
+ ForestTypeOptimized,
110
+ ForestTypeReference,
108
111
  ICodecOptions,
109
112
  IdentifierIndex,
110
113
  Insertable,
@@ -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 Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, type DetachedPlaceUpPath, type DetachedRangeUpPath, 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, type PathVisitor, SparseNode, getDescendant, compareUpPaths, clonePath, topDownPath, compareFieldUpPaths, forEachNode, forEachNodeInSubtree, forEachField, type PathRootPrefix, deltaForRootInitialization, emptyFieldChanges, isEmptyFieldChanges, makeDetachedNodeId, offsetDetachId, emptyDelta, type AnchorSlot, type AnchorNode, anchorSlot, type UpPathDefault, inCursorField, inCursorNode, type AnchorEvents, type AnchorSetRootEvents, type ProtoNodes, CursorMarker, isCursor, DetachedFieldIndex, type ForestRootId, getDetachedFieldContainingPath, aboveRootPlaceholder, type DeltaRoot, type DeltaProtoNode, 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, } from "./tree/index.js";
5
+ export { EmptyKey, type TreeType, type Value, type TreeValue, AnchorSet, type DetachedField, type UpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, type DetachedPlaceUpPath, type DetachedRangeUpPath, 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, type PathVisitor, SparseNode, getDescendant, compareUpPaths, clonePath, topDownPath, compareFieldUpPaths, forEachNode, forEachNodeInSubtree, forEachField, type PathRootPrefix, deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, type AnchorSlot, type AnchorNode, anchorSlot, type UpPathDefault, inCursorField, inCursorNode, type AnchorEvents, type AnchorSetRootEvents, type ProtoNodes, CursorMarker, isCursor, DetachedFieldIndex, type ForestRootId, getDetachedFieldContainingPath, aboveRootPlaceholder, type DeltaRoot, type DeltaProtoNode, 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, } from "./tree/index.js";
6
6
  export { TreeNavigationResult, type IEditableForest, type IForestSubscription, type TreeLocation, type FieldLocation, type ForestLocation, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, initializeForest, 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, schemaFormat, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, toTreeNodeSchemaDataFormat, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, type ErasedTreeNodeSchemaDataFormat, type SchemaAndPolicy, Multiplicity, type SchemaPolicy, } from "./schema-stored/index.js";
8
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 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 EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, } from "./rebase/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 EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, subtractChangeAtomIds, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, isAncestor, type ChangeAtomIdRangeMap, newChangeAtomIdRangeMap, compareRevisions, } from "./rebase/index.js";
10
10
  export { type Adapters, AdaptedViewSchema, type TreeAdapter, AllowedUpdateType, } 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,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,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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BAAuB,EACvB,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,uBAAuB,GAC5B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,iBAAiB,EACjB,KAAK,WAAW,EAChB,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,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,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,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,kB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gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,iBAAiB,EACjB,KAAK,WAAW,EAChB,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC"}
@@ -4,8 +4,8 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.tryGetChunk = exports.cursorChunk = exports.dummyRoot = exports.deepCopyMapTree = exports.aboveRootPlaceholder = exports.getDetachedFieldContainingPath = exports.DetachedFieldIndex = exports.isCursor = exports.CursorMarker = exports.inCursorNode = exports.inCursorField = exports.anchorSlot = exports.emptyDelta = exports.offsetDetachId = exports.makeDetachedNodeId = exports.isEmptyFieldChanges = exports.emptyFieldChanges = 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.RevertibleStatus = exports.AllowedUpdateType = exports.AdaptedViewSchema = exports.replaceChange = exports.replaceAtomRevisions = 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.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchema = exports.decodeFieldSchema = exports.toTreeNodeSchemaDataFormat = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormat = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.moveToDetachedField = exports.initializeForest = exports.ITreeSubscriptionCursorState = exports.TreeNavigationResult = void 0;
7
+ exports.ITreeSubscriptionCursorState = exports.TreeNavigationResult = exports.tryGetChunk = exports.cursorChunk = exports.dummyRoot = exports.deepCopyMapTree = exports.aboveRootPlaceholder = exports.getDetachedFieldContainingPath = exports.DetachedFieldIndex = exports.isCursor = exports.CursorMarker = exports.inCursorNode = exports.inCursorField = 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.RevertibleStatus = exports.AllowedUpdateType = exports.AdaptedViewSchema = exports.compareRevisions = exports.newChangeAtomIdRangeMap = exports.isAncestor = exports.replaceChange = exports.replaceAtomRevisions = exports.subtractChangeAtomIds = 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.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchema = exports.decodeFieldSchema = exports.toTreeNodeSchemaDataFormat = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormat = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.moveToDetachedField = exports.initializeForest = void 0;
9
9
  var index_js_1 = require("./tree/index.js");
10
10
  Object.defineProperty(exports, "EmptyKey", { enumerable: true, get: function () { return index_js_1.EmptyKey; } });
11
11
  Object.defineProperty(exports, "AnchorSet", { enumerable: true, get: function () { return index_js_1.AnchorSet; } });
@@ -40,8 +40,6 @@ Object.defineProperty(exports, "forEachNode", { enumerable: true, get: function
40
40
  Object.defineProperty(exports, "forEachNodeInSubtree", { enumerable: true, get: function () { return index_js_1.forEachNodeInSubtree; } });
41
41
  Object.defineProperty(exports, "forEachField", { enumerable: true, get: function () { return index_js_1.forEachField; } });
42
42
  Object.defineProperty(exports, "deltaForRootInitialization", { enumerable: true, get: function () { return index_js_1.deltaForRootInitialization; } });
43
- Object.defineProperty(exports, "emptyFieldChanges", { enumerable: true, get: function () { return index_js_1.emptyFieldChanges; } });
44
- Object.defineProperty(exports, "isEmptyFieldChanges", { enumerable: true, get: function () { return index_js_1.isEmptyFieldChanges; } });
45
43
  Object.defineProperty(exports, "makeDetachedNodeId", { enumerable: true, get: function () { return index_js_1.makeDetachedNodeId; } });
46
44
  Object.defineProperty(exports, "offsetDetachId", { enumerable: true, get: function () { return index_js_1.offsetDetachId; } });
47
45
  Object.defineProperty(exports, "emptyDelta", { enumerable: true, get: function () { return index_js_1.emptyDelta; } });
@@ -104,8 +102,12 @@ Object.defineProperty(exports, "revisionMetadataSourceFromInfo", { enumerable: t
104
102
  Object.defineProperty(exports, "taggedAtomId", { enumerable: true, get: function () { return index_js_5.taggedAtomId; } });
105
103
  Object.defineProperty(exports, "taggedOptAtomId", { enumerable: true, get: function () { return index_js_5.taggedOptAtomId; } });
106
104
  Object.defineProperty(exports, "offsetChangeAtomId", { enumerable: true, get: function () { return index_js_5.offsetChangeAtomId; } });
105
+ Object.defineProperty(exports, "subtractChangeAtomIds", { enumerable: true, get: function () { return index_js_5.subtractChangeAtomIds; } });
107
106
  Object.defineProperty(exports, "replaceAtomRevisions", { enumerable: true, get: function () { return index_js_5.replaceAtomRevisions; } });
108
107
  Object.defineProperty(exports, "replaceChange", { enumerable: true, get: function () { return index_js_5.replaceChange; } });
108
+ Object.defineProperty(exports, "isAncestor", { enumerable: true, get: function () { return index_js_5.isAncestor; } });
109
+ Object.defineProperty(exports, "newChangeAtomIdRangeMap", { enumerable: true, get: function () { return index_js_5.newChangeAtomIdRangeMap; } });
110
+ Object.defineProperty(exports, "compareRevisions", { enumerable: true, get: function () { return index_js_5.compareRevisions; } });
109
111
  var index_js_6 = require("./schema-view/index.js");
110
112
  Object.defineProperty(exports, "AdaptedViewSchema", { enumerable: true, get: function () { return index_js_6.AdaptedViewSchema; } });
111
113
  Object.defineProperty(exports, "AllowedUpdateType", { enumerable: true, get: function () { return index_js_6.AllowedUpdateType; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,4CAqGyB;AApGxB,oGAAA,QAAQ,OAAA;AAIR,qGAAA,SAAS,OAAA;AAmBT,+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;AAInB,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,6GAAA,iBAAiB,OAAA;AACjB,+GAAA,mBAAmB,OAAA;AACnB,8GAAA,kBAAkB,OAAA;AAClB,0GAAA,cAAc,OAAA;AACd,sGAAA,UAAU,OAAA;AAGV,sGAAA,UAAU,OAAA;AAE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,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;AAI9B,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,gHAAA,oBAAoB,OAAA;AACpB,yGAAA,aAAa,OAAA;AAKd,mDAKgC;AAH/B,6GAAA,iBAAiB,OAAA;AAEjB,6GAAA,iBAAiB,OAAA;AAGlB,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 Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype DetachedPlaceUpPath,\n\ttype DetachedRangeUpPath,\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\ttype PathVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\temptyFieldChanges,\n\tisEmptyFieldChanges,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaProtoNode,\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} 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\tinitializeForest,\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\tschemaFormat,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\ttoTreeNodeSchemaDataFormat,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tstoredSchemaDecodeDispatcher,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\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 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 EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\ttype TreeAdapter,\n\tAllowedUpdateType,\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,4CAmGyB;AAlGxB,oGAAA,QAAQ,OAAA;AAIR,qGAAA,SAAS,OAAA;AAmBT,+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;AAInB,sGAAA,UAAU,OAAA;AACV,yGAAA,aAAa,OAAA;AACb,0GAAA,cAAc,OAAA;AACd,qGAAA,SAAS,OAAA;AACT,uGAAA,WAAW,OAAA;AACX,+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GAAA,gBAAgB,OAAA;AAChB,0GAAA,cAAc,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;AAI9B,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,iHAAA,qBAAqB,OAAA;AACrB,gHAAA,oBAAoB,OAAA;AACpB,yGAAA,aAAa,OAAA;AAGb,sGAAA,UAAU,OAAA;AAEV,mHAAA,uBAAuB,OAAA;AACvB,4GAAA,gBAAgB,OAAA;AAGjB,mDAKgC;AAH/B,6GAAA,iBAAiB,OAAA;AAEjB,6GAAA,iBAAiB,OAAA;AAGlB,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 Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype DetachedPlaceUpPath,\n\ttype DetachedRangeUpPath,\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\ttype PathVisitor,\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\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaProtoNode,\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} 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\tinitializeForest,\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\tschemaFormat,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\ttoTreeNodeSchemaDataFormat,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tstoredSchemaDecodeDispatcher,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\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 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 EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\tsubtractChangeAtomIds,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n\tisAncestor,\n\ttype ChangeAtomIdRangeMap,\n\tnewChangeAtomIdRangeMap,\n\tcompareRevisions,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\ttype TreeAdapter,\n\tAllowedUpdateType,\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"]}
@@ -2,8 +2,8 @@
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 ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, SessionIdSchema, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, replaceAtomRevisions, } from "./types.js";
5
+ export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, mintCommit, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, type EncodedRevisionTag, type EncodedChangeAtomId, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, SessionIdSchema, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, 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
- export { findAncestor, findCommonAncestor, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, revisionMetadataSourceFromInfo, type RebaseStats, type RebaseStatsWithDuration, replaceChange, } from "./utils.js";
8
+ export { findAncestor, findCommonAncestor, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, revisionMetadataSourceFromInfo, type RebaseStats, type RebaseStatsWithDuration, replaceChange, isAncestor, } from "./utils.js";
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -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,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,GACpB,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,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,WAAW,EAChB,iBAAiB,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,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,GACV,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.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.replaceAtomRevisions = 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.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.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; } });
@@ -17,7 +17,10 @@ Object.defineProperty(exports, "SessionIdSchema", { enumerable: true, get: funct
17
17
  Object.defineProperty(exports, "taggedAtomId", { enumerable: true, get: function () { return types_js_1.taggedAtomId; } });
18
18
  Object.defineProperty(exports, "taggedOptAtomId", { enumerable: true, get: function () { return types_js_1.taggedOptAtomId; } });
19
19
  Object.defineProperty(exports, "offsetChangeAtomId", { enumerable: true, get: function () { return types_js_1.offsetChangeAtomId; } });
20
+ Object.defineProperty(exports, "subtractChangeAtomIds", { enumerable: true, get: function () { return types_js_1.subtractChangeAtomIds; } });
20
21
  Object.defineProperty(exports, "replaceAtomRevisions", { enumerable: true, get: function () { return types_js_1.replaceAtomRevisions; } });
22
+ Object.defineProperty(exports, "newChangeAtomIdRangeMap", { enumerable: true, get: function () { return types_js_1.newChangeAtomIdRangeMap; } });
23
+ Object.defineProperty(exports, "compareRevisions", { enumerable: true, get: function () { return types_js_1.compareRevisions; } });
21
24
  var revisionTagCodec_js_1 = require("./revisionTagCodec.js");
22
25
  Object.defineProperty(exports, "RevisionTagCodec", { enumerable: true, get: function () { return revisionTagCodec_js_1.RevisionTagCodec; } });
23
26
  var changeRebaser_js_1 = require("./changeRebaser.js");
@@ -34,4 +37,5 @@ Object.defineProperty(exports, "rebaseChange", { enumerable: true, get: function
34
37
  Object.defineProperty(exports, "rebaseChangeOverChanges", { enumerable: true, get: function () { return utils_js_1.rebaseChangeOverChanges; } });
35
38
  Object.defineProperty(exports, "revisionMetadataSourceFromInfo", { enumerable: true, get: function () { return utils_js_1.revisionMetadataSourceFromInfo; } });
36
39
  Object.defineProperty(exports, "replaceChange", { enumerable: true, get: function () { return utils_js_1.replaceChange; } });
40
+ Object.defineProperty(exports, "isAncestor", { enumerable: true, get: function () { return utils_js_1.isAncestor; } });
37
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAqBoB;AApBnB,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;AAMjB,2GAAA,eAAe,OAAA;AACf,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,gHAAA,oBAAoB,OAAA;AAErB,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,uCAWoB;AAVnB,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","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 ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\tSessionIdSchema,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\treplaceAtomRevisions,\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} from \"./utils.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/rebase/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uCAyBoB;AAxBnB,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;AAMjB,2GAAA,eAAe,OAAA;AACf,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,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,uCAYoB;AAXnB,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","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 ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\tSessionIdSchema,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\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} from \"./utils.js\";\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { OpSpaceCompressedId, SessionId, SessionSpaceCompressedId } from "@fluidframework/id-compressor";
6
- import { type Brand, type NestedMap, type RangeMap } from "../../util/index.js";
6
+ import { type Brand, 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
  */
@@ -45,9 +45,6 @@ export type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | Chang
45
45
  /**
46
46
  */
47
47
  export type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;
48
- /**
49
- */
50
- export type ChangeAtomIdRangeMap<T> = Map<RevisionTag | undefined, RangeMap<T>>;
51
48
  /**
52
49
  * @returns true iff `a` and `b` are the same.
53
50
  */
@@ -108,4 +105,8 @@ export interface CommitMetadata {
108
105
  * @returns the new commit object
109
106
  */
110
107
  export declare function mintCommit<TChange>(parent: GraphCommit<TChange>, commit: Omit<GraphCommit<TChange>, "parent">): GraphCommit<TChange>;
108
+ export type ChangeAtomIdRangeMap<V> = RangeMap<ChangeAtomId, V>;
109
+ export declare function newChangeAtomIdRangeMap<V>(): ChangeAtomIdRangeMap<V>;
110
+ export declare function subtractChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): number;
111
+ export declare function compareRevisions(a: RevisionTag | undefined, b: RevisionTag | undefined): number;
111
112
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,mBAAmB,EACnB,SAAS,EACT,wBAAwB,EACxB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACN,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,QAAQ,EAIb,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,eAAO,MAAM,eAAe,gDAAiC,CAAC;AAE9D;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GAAG,wBAAwB,GAAG,MAAM,CAAC;AAC5D,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,GAAG,MAAM,CAAC;AAC3F,eAAO,MAAM,iBAAiB,2KAG5B,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GA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C,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.mintCommit = exports.CommitKind = exports.replaceAtomRevisions = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = 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.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
  /**
@@ -97,4 +97,32 @@ function mintCommit(parent, commit) {
97
97
  };
98
98
  }
99
99
  exports.mintCommit = mintCommit;
100
+ function newChangeAtomIdRangeMap() {
101
+ return new index_js_1.RangeMap(offsetChangeAtomId, subtractChangeAtomIds);
102
+ }
103
+ exports.newChangeAtomIdRangeMap = newChangeAtomIdRangeMap;
104
+ function subtractChangeAtomIds(a, b) {
105
+ const cmp = compareRevisions(a.revision, b.revision);
106
+ if (cmp !== 0) {
107
+ return cmp * Number.POSITIVE_INFINITY;
108
+ }
109
+ return a.localId - b.localId;
110
+ }
111
+ exports.subtractChangeAtomIds = subtractChangeAtomIds;
112
+ function compareRevisions(a, b) {
113
+ if (a === undefined) {
114
+ return b === undefined ? 0 : -1;
115
+ }
116
+ else if (b === undefined) {
117
+ return 1;
118
+ }
119
+ else if (a < b) {
120
+ return -1;
121
+ }
122
+ else if (a > b) {
123
+ return 1;
124
+ }
125
+ return 0;
126
+ }
127
+ exports.compareRevisions = compareRevisions;
100
128
  //# sourceMappingURL=types.js.map