@fluidframework/tree 2.0.0-dev-rc.5.0.0.271045 → 2.0.0-dev-rc.5.0.0.271717

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 (1607) hide show
  1. package/.eslintrc.cjs +5 -0
  2. package/api-report/tree.alpha.api.md +10 -21
  3. package/api-report/tree.beta.api.md +10 -21
  4. package/api-report/tree.public.api.md +10 -21
  5. package/dist/beta.d.ts +0 -1
  6. package/dist/codec/codec.d.ts +2 -2
  7. package/dist/codec/codec.d.ts.map +1 -1
  8. package/dist/codec/codec.js +0 -1
  9. package/dist/codec/codec.js.map +1 -1
  10. package/dist/codec/discriminatedUnions.d.ts +2 -2
  11. package/dist/codec/discriminatedUnions.d.ts.map +1 -1
  12. package/dist/codec/discriminatedUnions.js +0 -1
  13. package/dist/codec/discriminatedUnions.js.map +1 -1
  14. package/dist/codec/noopValidator.d.ts +1 -1
  15. package/dist/codec/noopValidator.d.ts.map +1 -1
  16. package/dist/codec/noopValidator.js.map +1 -1
  17. package/dist/codec/versioned/codec.d.ts +3 -3
  18. package/dist/codec/versioned/codec.d.ts.map +1 -1
  19. package/dist/codec/versioned/codec.js.map +1 -1
  20. package/dist/codec/versioned/format.d.ts +1 -1
  21. package/dist/codec/versioned/format.d.ts.map +1 -1
  22. package/dist/codec/versioned/format.js.map +1 -1
  23. package/dist/core/change-family/changeFamily.d.ts +5 -5
  24. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  25. package/dist/core/change-family/changeFamily.js.map +1 -1
  26. package/dist/core/change-family/editBuilder.d.ts +1 -1
  27. package/dist/core/change-family/editBuilder.d.ts.map +1 -1
  28. package/dist/core/change-family/editBuilder.js +0 -2
  29. package/dist/core/change-family/editBuilder.js.map +1 -1
  30. package/dist/core/forest/editableForest.d.ts +5 -5
  31. package/dist/core/forest/editableForest.d.ts.map +1 -1
  32. package/dist/core/forest/editableForest.js.map +1 -1
  33. package/dist/core/forest/forest.d.ts +3 -3
  34. package/dist/core/forest/forest.d.ts.map +1 -1
  35. package/dist/core/forest/forest.js.map +1 -1
  36. package/dist/core/rebase/changeRebaser.d.ts +1 -1
  37. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  38. package/dist/core/rebase/changeRebaser.js.map +1 -1
  39. package/dist/core/rebase/revisionTagCodec.d.ts +4 -4
  40. package/dist/core/rebase/revisionTagCodec.d.ts.map +1 -1
  41. package/dist/core/rebase/revisionTagCodec.js +0 -2
  42. package/dist/core/rebase/revisionTagCodec.js.map +1 -1
  43. package/dist/core/rebase/types.d.ts +3 -3
  44. package/dist/core/rebase/types.d.ts.map +1 -1
  45. package/dist/core/rebase/types.js.map +1 -1
  46. package/dist/core/rebase/utils.d.ts +2 -2
  47. package/dist/core/rebase/utils.d.ts.map +1 -1
  48. package/dist/core/rebase/utils.js.map +1 -1
  49. package/dist/core/schema-stored/format.d.ts +2 -2
  50. package/dist/core/schema-stored/format.d.ts.map +1 -1
  51. package/dist/core/schema-stored/format.js.map +1 -1
  52. package/dist/core/schema-stored/schema.d.ts +3 -3
  53. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  54. package/dist/core/schema-stored/schema.js +0 -4
  55. package/dist/core/schema-stored/schema.js.map +1 -1
  56. package/dist/core/schema-stored/storedSchemaRepository.d.ts +3 -3
  57. package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  58. package/dist/core/schema-stored/storedSchemaRepository.js +1 -3
  59. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  60. package/dist/core/schema-view/view.d.ts +1 -1
  61. package/dist/core/schema-view/view.d.ts.map +1 -1
  62. package/dist/core/schema-view/view.js +0 -2
  63. package/dist/core/schema-view/view.js.map +1 -1
  64. package/dist/core/tree/anchorSet.d.ts +56 -18
  65. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  66. package/dist/core/tree/anchorSet.js +97 -52
  67. package/dist/core/tree/anchorSet.js.map +1 -1
  68. package/dist/core/tree/cursor.d.ts +3 -3
  69. package/dist/core/tree/cursor.d.ts.map +1 -1
  70. package/dist/core/tree/cursor.js.map +1 -1
  71. package/dist/core/tree/delta.d.ts +3 -3
  72. package/dist/core/tree/delta.d.ts.map +1 -1
  73. package/dist/core/tree/delta.js.map +1 -1
  74. package/dist/core/tree/deltaUtil.d.ts +2 -2
  75. package/dist/core/tree/deltaUtil.d.ts.map +1 -1
  76. package/dist/core/tree/deltaUtil.js.map +1 -1
  77. package/dist/core/tree/detachedFieldIndex.d.ts +7 -7
  78. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  79. package/dist/core/tree/detachedFieldIndex.js +2 -8
  80. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  81. package/dist/core/tree/detachedFieldIndexCodec.d.ts +4 -4
  82. package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  83. package/dist/core/tree/detachedFieldIndexCodec.js +0 -3
  84. package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
  85. package/dist/core/tree/detachedFieldIndexFormat.d.ts +2 -2
  86. package/dist/core/tree/detachedFieldIndexFormat.d.ts.map +1 -1
  87. package/dist/core/tree/detachedFieldIndexFormat.js.map +1 -1
  88. package/dist/core/tree/detachedFieldIndexTypes.d.ts +3 -3
  89. package/dist/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
  90. package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
  91. package/dist/core/tree/mapTree.d.ts +2 -2
  92. package/dist/core/tree/mapTree.d.ts.map +1 -1
  93. package/dist/core/tree/mapTree.js.map +1 -1
  94. package/dist/core/tree/pathTree.d.ts +3 -3
  95. package/dist/core/tree/pathTree.d.ts.map +1 -1
  96. package/dist/core/tree/pathTree.js.map +1 -1
  97. package/dist/core/tree/persistedTreeTextFormat.d.ts +1 -1
  98. package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  99. package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
  100. package/dist/core/tree/sparseTree.d.ts +2 -2
  101. package/dist/core/tree/sparseTree.d.ts.map +1 -1
  102. package/dist/core/tree/sparseTree.js +11 -15
  103. package/dist/core/tree/sparseTree.js.map +1 -1
  104. package/dist/core/tree/treeTextFormat.d.ts +2 -2
  105. package/dist/core/tree/treeTextFormat.d.ts.map +1 -1
  106. package/dist/core/tree/treeTextFormat.js.map +1 -1
  107. package/dist/core/tree/types.d.ts +3 -3
  108. package/dist/core/tree/types.d.ts.map +1 -1
  109. package/dist/core/tree/types.js +0 -1
  110. package/dist/core/tree/types.js.map +1 -1
  111. package/dist/core/tree/visitDelta.d.ts +5 -5
  112. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  113. package/dist/core/tree/visitDelta.js.map +1 -1
  114. package/dist/core/tree/visitPath.d.ts +2 -2
  115. package/dist/core/tree/visitPath.d.ts.map +1 -1
  116. package/dist/core/tree/visitPath.js.map +1 -1
  117. package/dist/core/tree/visitorUtils.d.ts +7 -7
  118. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  119. package/dist/core/tree/visitorUtils.js.map +1 -1
  120. package/dist/domains/json/jsonCursor.d.ts +2 -2
  121. package/dist/domains/json/jsonCursor.d.ts.map +1 -1
  122. package/dist/domains/json/jsonCursor.js.map +1 -1
  123. package/dist/domains/json/jsonDomainSchema.js.map +1 -1
  124. package/dist/domains/schemaBuilder.d.ts +2 -2
  125. package/dist/domains/schemaBuilder.d.ts.map +1 -1
  126. package/dist/domains/schemaBuilder.js +70 -70
  127. package/dist/domains/schemaBuilder.js.map +1 -1
  128. package/dist/events/events.js +1 -2
  129. package/dist/events/events.js.map +1 -1
  130. package/dist/feature-libraries/changeAtomIdCodec.d.ts +2 -2
  131. package/dist/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
  132. package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
  133. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts +2 -2
  134. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  135. package/dist/feature-libraries/chunked-forest/basicChunk.js +1 -14
  136. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  137. package/dist/feature-libraries/chunked-forest/chunk.d.ts +2 -2
  138. package/dist/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
  139. package/dist/feature-libraries/chunked-forest/chunk.js.map +1 -1
  140. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +4 -4
  141. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  142. package/dist/feature-libraries/chunked-forest/chunkTree.js +6 -13
  143. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  144. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +4 -4
  145. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  146. package/dist/feature-libraries/chunked-forest/chunkedForest.js +2 -9
  147. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  148. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +3 -3
  149. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
  150. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +3 -1
  151. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  152. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +17 -7
  153. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  154. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +6 -11
  155. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  156. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +8 -8
  157. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  158. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +2 -5
  159. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  160. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +3 -3
  161. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  162. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +0 -1
  163. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  164. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +6 -5
  165. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  166. package/dist/feature-libraries/chunked-forest/codec/codecs.js +4 -1
  167. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  168. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +7 -7
  169. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  170. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +13 -25
  171. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  172. package/dist/feature-libraries/chunked-forest/codec/fieldBatch.d.ts +1 -1
  173. package/dist/feature-libraries/chunked-forest/codec/fieldBatch.d.ts.map +1 -1
  174. package/dist/feature-libraries/chunked-forest/codec/fieldBatch.js.map +1 -1
  175. package/dist/feature-libraries/chunked-forest/codec/format.d.ts +1 -1
  176. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  177. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  178. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +1 -1
  179. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  180. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  181. package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts +5 -5
  182. package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
  183. package/dist/feature-libraries/chunked-forest/codec/nodeShape.js +5 -8
  184. package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
  185. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts +6 -6
  186. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +1 -1
  187. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +1 -1
  188. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +2 -2
  189. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  190. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  191. package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts +1 -1
  192. package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
  193. package/dist/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
  194. package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
  195. package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
  196. package/dist/feature-libraries/chunked-forest/sequenceChunk.js +0 -1
  197. package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  198. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +2 -2
  199. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  200. package/dist/feature-libraries/chunked-forest/uniformChunk.js +5 -40
  201. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  202. package/dist/feature-libraries/contextuallyTyped.d.ts +5 -5
  203. package/dist/feature-libraries/contextuallyTyped.d.ts.map +1 -1
  204. package/dist/feature-libraries/contextuallyTyped.js.map +1 -1
  205. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -3
  206. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  207. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +0 -2
  208. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  209. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +3 -3
  210. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  211. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  212. package/dist/feature-libraries/default-schema/defaultSchema.d.ts +1 -1
  213. package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
  214. package/dist/feature-libraries/default-schema/defaultSchema.js.map +1 -1
  215. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts +2 -2
  216. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  217. package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  218. package/dist/feature-libraries/deltaUtils.d.ts +1 -1
  219. package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
  220. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  221. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +4 -4
  222. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  223. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +1 -2
  224. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  225. package/dist/feature-libraries/editableTreeBinder.d.ts +3 -3
  226. package/dist/feature-libraries/editableTreeBinder.d.ts.map +1 -1
  227. package/dist/feature-libraries/editableTreeBinder.js +12 -13
  228. package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
  229. package/dist/feature-libraries/fieldGenerator.d.ts +2 -2
  230. package/dist/feature-libraries/fieldGenerator.d.ts.map +1 -1
  231. package/dist/feature-libraries/fieldGenerator.js.map +1 -1
  232. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts +5 -5
  233. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
  234. package/dist/feature-libraries/flex-map-tree/mapTreeNode.js +11 -12
  235. package/dist/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
  236. package/dist/feature-libraries/flex-tree/context.d.ts +8 -8
  237. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  238. package/dist/feature-libraries/flex-tree/context.js +3 -7
  239. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  240. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +9 -9
  241. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  242. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  243. package/dist/feature-libraries/flex-tree/index.d.ts +1 -1
  244. package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
  245. package/dist/feature-libraries/flex-tree/index.js +1 -4
  246. package/dist/feature-libraries/flex-tree/index.js.map +1 -1
  247. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts +4 -4
  248. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  249. package/dist/feature-libraries/flex-tree/lazyEntity.js +22 -13
  250. package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  251. package/dist/feature-libraries/flex-tree/lazyField.d.ts +6 -6
  252. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  253. package/dist/feature-libraries/flex-tree/lazyField.js +0 -6
  254. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  255. package/dist/feature-libraries/flex-tree/lazyNode.d.ts +5 -5
  256. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  257. package/dist/feature-libraries/flex-tree/lazyNode.js +19 -13
  258. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  259. package/dist/feature-libraries/flex-tree/treeEvents.d.ts +1 -13
  260. package/dist/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  261. package/dist/feature-libraries/flex-tree/treeEvents.js +0 -31
  262. package/dist/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  263. package/dist/feature-libraries/flex-tree/unboxed.d.ts +5 -5
  264. package/dist/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
  265. package/dist/feature-libraries/flex-tree/unboxed.js.map +1 -1
  266. package/dist/feature-libraries/flex-tree/utilities.d.ts +1 -1
  267. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  268. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  269. package/dist/feature-libraries/forest-summary/codec.d.ts +3 -3
  270. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  271. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  272. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +7 -7
  273. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  274. package/dist/feature-libraries/forest-summary/forestSummarizer.js +1 -6
  275. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  276. package/dist/feature-libraries/forest-summary/format.d.ts +1 -1
  277. package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
  278. package/dist/feature-libraries/forest-summary/format.js.map +1 -1
  279. package/dist/feature-libraries/index.d.ts +1 -1
  280. package/dist/feature-libraries/index.d.ts.map +1 -1
  281. package/dist/feature-libraries/index.js +1 -3
  282. package/dist/feature-libraries/index.js.map +1 -1
  283. package/dist/feature-libraries/mapTreeCursor.d.ts +2 -2
  284. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  285. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  286. package/dist/feature-libraries/memoizedIdRangeAllocator.d.ts +1 -1
  287. package/dist/feature-libraries/memoizedIdRangeAllocator.d.ts.map +1 -1
  288. package/dist/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
  289. package/dist/feature-libraries/mitigatedChangeFamily.d.ts +1 -1
  290. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  291. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  292. package/dist/feature-libraries/modular-schema/comparison.d.ts +2 -2
  293. package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  294. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  295. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +2 -2
  296. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  297. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  298. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -7
  299. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  300. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  301. package/dist/feature-libraries/modular-schema/fieldKind.d.ts +1 -1
  302. package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  303. package/dist/feature-libraries/modular-schema/fieldKind.js +0 -2
  304. package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  305. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +2 -2
  306. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  307. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  308. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +3 -3
  309. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
  310. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +0 -3
  311. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  312. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +4 -4
  313. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  314. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  315. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +2 -2
  316. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  317. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  318. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +1 -1
  319. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  320. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  321. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +1 -1
  322. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  323. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  324. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +2 -2
  325. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  326. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  327. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +5 -5
  328. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  329. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +2 -0
  330. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  331. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +6 -6
  332. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  333. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +2 -5
  334. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  335. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +3 -3
  336. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  337. package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
  338. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +3 -3
  339. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  340. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  341. package/dist/feature-libraries/node-key/mockNodeKeyManager.d.ts +2 -2
  342. package/dist/feature-libraries/node-key/mockNodeKeyManager.d.ts.map +1 -1
  343. package/dist/feature-libraries/node-key/mockNodeKeyManager.js +4 -2
  344. package/dist/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
  345. package/dist/feature-libraries/node-key/nodeKey.d.ts +3 -3
  346. package/dist/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
  347. package/dist/feature-libraries/node-key/nodeKey.js.map +1 -1
  348. package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts +4 -4
  349. package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts.map +1 -1
  350. package/dist/feature-libraries/node-key/nodeKeyIndex.js +0 -3
  351. package/dist/feature-libraries/node-key/nodeKeyIndex.js.map +1 -1
  352. package/dist/feature-libraries/node-key/nodeKeyManager.d.ts +1 -1
  353. package/dist/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
  354. package/dist/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
  355. package/dist/feature-libraries/object-forest/objectForest.d.ts +2 -2
  356. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  357. package/dist/feature-libraries/object-forest/objectForest.js +28 -23
  358. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  359. package/dist/feature-libraries/optional-field/optionalField.d.ts +3 -3
  360. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  361. package/dist/feature-libraries/optional-field/optionalField.js +3 -1
  362. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  363. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +1 -1
  364. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  365. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
  366. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +1 -1
  367. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  368. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
  369. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +2 -2
  370. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  371. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  372. package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts +3 -3
  373. package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +1 -1
  374. package/dist/feature-libraries/optional-field/optionalFieldCodecV1.js.map +1 -1
  375. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +3 -3
  376. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  377. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  378. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -2
  379. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  380. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  381. package/dist/feature-libraries/schema-aware/schemaAware.d.ts +4 -4
  382. package/dist/feature-libraries/schema-aware/schemaAware.d.ts.map +1 -1
  383. package/dist/feature-libraries/schema-aware/schemaAware.js +0 -2
  384. package/dist/feature-libraries/schema-aware/schemaAware.js.map +1 -1
  385. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  386. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  387. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  388. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +1 -1
  389. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  390. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  391. package/dist/feature-libraries/schema-edits/schemaChangeTypes.d.ts +1 -1
  392. package/dist/feature-libraries/schema-edits/schemaChangeTypes.d.ts.map +1 -1
  393. package/dist/feature-libraries/schema-edits/schemaChangeTypes.js.map +1 -1
  394. package/dist/feature-libraries/schema-index/codec.d.ts +2 -2
  395. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  396. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  397. package/dist/feature-libraries/schema-index/format.d.ts +1 -1
  398. package/dist/feature-libraries/schema-index/format.d.ts.map +1 -1
  399. package/dist/feature-libraries/schema-index/format.js.map +1 -1
  400. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +7 -7
  401. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  402. package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -5
  403. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  404. package/dist/feature-libraries/schemaBuilder.d.ts +2 -2
  405. package/dist/feature-libraries/schemaBuilder.d.ts.map +1 -1
  406. package/dist/feature-libraries/schemaBuilder.js.map +1 -1
  407. package/dist/feature-libraries/schemaBuilderBase.d.ts +4 -4
  408. package/dist/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
  409. package/dist/feature-libraries/schemaBuilderBase.js +3 -14
  410. package/dist/feature-libraries/schemaBuilderBase.js.map +1 -1
  411. package/dist/feature-libraries/sequence-field/compose.d.ts +5 -5
  412. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  413. package/dist/feature-libraries/sequence-field/compose.js +0 -6
  414. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  415. package/dist/feature-libraries/sequence-field/formatV1.d.ts +1 -1
  416. package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  417. package/dist/feature-libraries/sequence-field/formatV1.js.map +1 -1
  418. package/dist/feature-libraries/sequence-field/formatV2.d.ts +1 -1
  419. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  420. package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
  421. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +1 -1
  422. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  423. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  424. package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
  425. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  426. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  427. package/dist/feature-libraries/sequence-field/markListFactory.d.ts +1 -1
  428. package/dist/feature-libraries/sequence-field/markListFactory.d.ts.map +1 -1
  429. package/dist/feature-libraries/sequence-field/markListFactory.js +4 -3
  430. package/dist/feature-libraries/sequence-field/markListFactory.js.map +1 -1
  431. package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  432. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  433. package/dist/feature-libraries/sequence-field/markQueue.js +2 -4
  434. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  435. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +5 -5
  436. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  437. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  438. package/dist/feature-libraries/sequence-field/prune.d.ts +2 -2
  439. package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  440. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  441. package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
  442. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  443. package/dist/feature-libraries/sequence-field/rebase.js +0 -6
  444. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  445. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +3 -3
  446. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  447. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  448. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts +2 -2
  449. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  450. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  451. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts +3 -3
  452. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  453. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  454. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +2 -2
  455. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
  456. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
  457. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +5 -5
  458. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  459. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  460. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +5 -5
  461. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  462. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  463. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +4 -4
  464. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  465. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  466. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +3 -3
  467. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  468. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  469. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -3
  470. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  471. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  472. package/dist/feature-libraries/sequence-field/types.d.ts +2 -2
  473. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  474. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  475. package/dist/feature-libraries/sequence-field/utils.d.ts +5 -5
  476. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  477. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  478. package/dist/feature-libraries/storedToViewSchema.d.ts +2 -2
  479. package/dist/feature-libraries/storedToViewSchema.d.ts.map +1 -1
  480. package/dist/feature-libraries/storedToViewSchema.js.map +1 -1
  481. package/dist/feature-libraries/treeCursorUtils.d.ts +1 -1
  482. package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  483. package/dist/feature-libraries/treeCursorUtils.js +9 -13
  484. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  485. package/dist/feature-libraries/treeTextCursor.d.ts +2 -2
  486. package/dist/feature-libraries/treeTextCursor.d.ts.map +1 -1
  487. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  488. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts +3 -3
  489. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
  490. package/dist/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
  491. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +4 -4
  492. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  493. package/dist/feature-libraries/typed-schema/typedTreeSchema.js +4 -23
  494. package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  495. package/dist/feature-libraries/typed-schema/view.d.ts +4 -4
  496. package/dist/feature-libraries/typed-schema/view.d.ts.map +1 -1
  497. package/dist/feature-libraries/typed-schema/view.js +0 -7
  498. package/dist/feature-libraries/typed-schema/view.js.map +1 -1
  499. package/dist/feature-libraries/valueUtilities.d.ts +2 -2
  500. package/dist/feature-libraries/valueUtilities.d.ts.map +1 -1
  501. package/dist/feature-libraries/valueUtilities.js.map +1 -1
  502. package/dist/index.d.ts +1 -1
  503. package/dist/index.d.ts.map +1 -1
  504. package/dist/index.js +1 -2
  505. package/dist/index.js.map +1 -1
  506. package/dist/packageVersion.d.ts +1 -1
  507. package/dist/packageVersion.js +1 -1
  508. package/dist/packageVersion.js.map +1 -1
  509. package/dist/public.d.ts +0 -1
  510. package/dist/shared-tree/schematizeTree.d.ts +3 -3
  511. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  512. package/dist/shared-tree/schematizeTree.js.map +1 -1
  513. package/dist/shared-tree/schematizingTreeView.d.ts +4 -4
  514. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  515. package/dist/shared-tree/schematizingTreeView.js +10 -27
  516. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  517. package/dist/shared-tree/sharedTree.d.ts +15 -11
  518. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  519. package/dist/shared-tree/sharedTree.js +13 -10
  520. package/dist/shared-tree/sharedTree.js.map +1 -1
  521. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +4 -4
  522. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  523. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  524. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +3 -3
  525. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  526. package/dist/shared-tree/sharedTreeChangeEnricher.js +11 -14
  527. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  528. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
  529. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  530. package/dist/shared-tree/sharedTreeChangeFamily.js +3 -5
  531. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  532. package/dist/shared-tree/sharedTreeChangeFormat.d.ts +1 -1
  533. package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  534. package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  535. package/dist/shared-tree/sharedTreeChangeTypes.d.ts +1 -1
  536. package/dist/shared-tree/sharedTreeChangeTypes.d.ts.map +1 -1
  537. package/dist/shared-tree/sharedTreeChangeTypes.js.map +1 -1
  538. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +3 -3
  539. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  540. package/dist/shared-tree/sharedTreeEditBuilder.js +0 -2
  541. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  542. package/dist/shared-tree/treeApi.d.ts +1 -1
  543. package/dist/shared-tree/treeApi.d.ts.map +1 -1
  544. package/dist/shared-tree/treeApi.js.map +1 -1
  545. package/dist/shared-tree/treeCheckout.d.ts +7 -7
  546. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  547. package/dist/shared-tree/treeCheckout.js +11 -22
  548. package/dist/shared-tree/treeCheckout.js.map +1 -1
  549. package/dist/shared-tree/treeView.d.ts +3 -3
  550. package/dist/shared-tree/treeView.d.ts.map +1 -1
  551. package/dist/shared-tree/treeView.js +0 -6
  552. package/dist/shared-tree/treeView.js.map +1 -1
  553. package/dist/shared-tree-core/branch.d.ts +2 -2
  554. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  555. package/dist/shared-tree-core/branch.js +25 -31
  556. package/dist/shared-tree-core/branch.js.map +1 -1
  557. package/dist/shared-tree-core/branchCommitEnricher.d.ts +2 -2
  558. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  559. package/dist/shared-tree-core/branchCommitEnricher.js +9 -12
  560. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  561. package/dist/shared-tree-core/changeEnricher.d.ts +1 -1
  562. package/dist/shared-tree-core/changeEnricher.d.ts.map +1 -1
  563. package/dist/shared-tree-core/changeEnricher.js.map +1 -1
  564. package/dist/shared-tree-core/defaultResubmitMachine.d.ts +2 -2
  565. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  566. package/dist/shared-tree-core/defaultResubmitMachine.js +19 -21
  567. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  568. package/dist/shared-tree-core/editManager.d.ts +3 -3
  569. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  570. package/dist/shared-tree-core/editManager.js +37 -53
  571. package/dist/shared-tree-core/editManager.js.map +1 -1
  572. package/dist/shared-tree-core/editManagerCodecs.d.ts +5 -5
  573. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  574. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  575. package/dist/shared-tree-core/editManagerFormat.d.ts +4 -4
  576. package/dist/shared-tree-core/editManagerFormat.d.ts.map +1 -1
  577. package/dist/shared-tree-core/editManagerFormat.js.map +1 -1
  578. package/dist/shared-tree-core/editManagerSummarizer.d.ts +9 -9
  579. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  580. package/dist/shared-tree-core/editManagerSummarizer.js +1 -5
  581. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  582. package/dist/shared-tree-core/messageCodecs.d.ts +5 -5
  583. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  584. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  585. package/dist/shared-tree-core/messageFormat.d.ts +4 -4
  586. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  587. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  588. package/dist/shared-tree-core/messageTypes.d.ts +2 -2
  589. package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
  590. package/dist/shared-tree-core/messageTypes.js.map +1 -1
  591. package/dist/shared-tree-core/resubmitMachine.d.ts +1 -1
  592. package/dist/shared-tree-core/resubmitMachine.d.ts.map +1 -1
  593. package/dist/shared-tree-core/resubmitMachine.js.map +1 -1
  594. package/dist/shared-tree-core/sequenceIdUtils.d.ts +1 -1
  595. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  596. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  597. package/dist/shared-tree-core/sharedTreeCore.d.ts +10 -10
  598. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  599. package/dist/shared-tree-core/sharedTreeCore.js +7 -24
  600. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  601. package/dist/shared-tree-core/transactionEnricher.d.ts +2 -2
  602. package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  603. package/dist/shared-tree-core/transactionEnricher.js +1 -3
  604. package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
  605. package/dist/shared-tree-core/transactionStack.d.ts +1 -1
  606. package/dist/shared-tree-core/transactionStack.d.ts.map +1 -1
  607. package/dist/shared-tree-core/transactionStack.js +3 -1
  608. package/dist/shared-tree-core/transactionStack.js.map +1 -1
  609. package/dist/simple-tree/arrayNode.d.ts +2 -2
  610. package/dist/simple-tree/arrayNode.d.ts.map +1 -1
  611. package/dist/simple-tree/arrayNode.js +34 -26
  612. package/dist/simple-tree/arrayNode.js.map +1 -1
  613. package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
  614. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  615. package/dist/simple-tree/leafNodeSchema.js +2 -4
  616. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  617. package/dist/simple-tree/mapNode.d.ts +2 -2
  618. package/dist/simple-tree/mapNode.d.ts.map +1 -1
  619. package/dist/simple-tree/mapNode.js +5 -5
  620. package/dist/simple-tree/mapNode.js.map +1 -1
  621. package/dist/simple-tree/nodeKeys.d.ts +2 -2
  622. package/dist/simple-tree/nodeKeys.d.ts.map +1 -1
  623. package/dist/simple-tree/nodeKeys.js.map +1 -1
  624. package/dist/simple-tree/objectNode.d.ts +5 -5
  625. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  626. package/dist/simple-tree/objectNode.js +6 -6
  627. package/dist/simple-tree/objectNode.js.map +1 -1
  628. package/dist/simple-tree/proxies.d.ts +4 -4
  629. package/dist/simple-tree/proxies.d.ts.map +1 -1
  630. package/dist/simple-tree/proxies.js +6 -4
  631. package/dist/simple-tree/proxies.js.map +1 -1
  632. package/dist/simple-tree/proxyBinding.d.ts +6 -6
  633. package/dist/simple-tree/proxyBinding.d.ts.map +1 -1
  634. package/dist/simple-tree/proxyBinding.js.map +1 -1
  635. package/dist/simple-tree/schemaCaching.d.ts +2 -2
  636. package/dist/simple-tree/schemaCaching.d.ts.map +1 -1
  637. package/dist/simple-tree/schemaCaching.js.map +1 -1
  638. package/dist/simple-tree/schemaCreationUtilities.d.ts +5 -5
  639. package/dist/simple-tree/schemaCreationUtilities.d.ts.map +1 -1
  640. package/dist/simple-tree/schemaCreationUtilities.js.map +1 -1
  641. package/dist/simple-tree/schemaFactory.d.ts +25 -12
  642. package/dist/simple-tree/schemaFactory.d.ts.map +1 -1
  643. package/dist/simple-tree/schemaFactory.js +65 -53
  644. package/dist/simple-tree/schemaFactory.js.map +1 -1
  645. package/dist/simple-tree/schemaFactoryRecursive.d.ts +6 -6
  646. package/dist/simple-tree/schemaFactoryRecursive.d.ts.map +1 -1
  647. package/dist/simple-tree/schemaFactoryRecursive.js.map +1 -1
  648. package/dist/simple-tree/schemaTypes.d.ts +6 -6
  649. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  650. package/dist/simple-tree/schemaTypes.js +3 -12
  651. package/dist/simple-tree/schemaTypes.js.map +1 -1
  652. package/dist/simple-tree/testRecursiveDomain.d.ts +1 -1
  653. package/dist/simple-tree/testRecursiveDomain.d.ts.map +1 -1
  654. package/dist/simple-tree/testRecursiveDomain.js.map +1 -1
  655. package/dist/simple-tree/toFlexSchema.d.ts +4 -4
  656. package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
  657. package/dist/simple-tree/toFlexSchema.js.map +1 -1
  658. package/dist/simple-tree/toMapTree.d.ts +2 -2
  659. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  660. package/dist/simple-tree/toMapTree.js.map +1 -1
  661. package/dist/simple-tree/tree.d.ts +6 -27
  662. package/dist/simple-tree/tree.d.ts.map +1 -1
  663. package/dist/simple-tree/tree.js +0 -21
  664. package/dist/simple-tree/tree.js.map +1 -1
  665. package/dist/simple-tree/treeNodeApi.d.ts +30 -27
  666. package/dist/simple-tree/treeNodeApi.d.ts.map +1 -1
  667. package/dist/simple-tree/treeNodeApi.js +8 -3
  668. package/dist/simple-tree/treeNodeApi.js.map +1 -1
  669. package/dist/simple-tree/types.d.ts +29 -9
  670. package/dist/simple-tree/types.d.ts.map +1 -1
  671. package/dist/simple-tree/types.js +79 -54
  672. package/dist/simple-tree/types.js.map +1 -1
  673. package/dist/simple-tree/typesUnsafe.d.ts +5 -5
  674. package/dist/simple-tree/typesUnsafe.d.ts.map +1 -1
  675. package/dist/simple-tree/typesUnsafe.js.map +1 -1
  676. package/dist/treeFactory.d.ts +5 -5
  677. package/dist/treeFactory.d.ts.map +1 -1
  678. package/dist/treeFactory.js +10 -9
  679. package/dist/treeFactory.js.map +1 -1
  680. package/dist/util/brand.js +0 -1
  681. package/dist/util/brand.js.map +1 -1
  682. package/dist/util/brandedMap.d.ts +1 -1
  683. package/dist/util/brandedMap.d.ts.map +1 -1
  684. package/dist/util/brandedMap.js.map +1 -1
  685. package/dist/util/nestedMap.d.ts +1 -1
  686. package/dist/util/nestedMap.d.ts.map +1 -1
  687. package/dist/util/nestedMap.js +4 -2
  688. package/dist/util/nestedMap.js.map +1 -1
  689. package/dist/util/nestedSet.d.ts +1 -1
  690. package/dist/util/nestedSet.d.ts.map +1 -1
  691. package/dist/util/nestedSet.js.map +1 -1
  692. package/dist/util/offsetList.js +4 -2
  693. package/dist/util/offsetList.js.map +1 -1
  694. package/dist/util/referenceCounting.js +0 -1
  695. package/dist/util/referenceCounting.js.map +1 -1
  696. package/dist/util/stackyIterator.js +2 -3
  697. package/dist/util/stackyIterator.js.map +1 -1
  698. package/dist/util/typeboxBrand.d.ts +1 -1
  699. package/dist/util/typeboxBrand.d.ts.map +1 -1
  700. package/dist/util/typeboxBrand.js.map +1 -1
  701. package/lib/beta.d.ts +0 -1
  702. package/lib/codec/codec.d.ts +2 -2
  703. package/lib/codec/codec.d.ts.map +1 -1
  704. package/lib/codec/codec.js +0 -1
  705. package/lib/codec/codec.js.map +1 -1
  706. package/lib/codec/discriminatedUnions.d.ts +2 -2
  707. package/lib/codec/discriminatedUnions.d.ts.map +1 -1
  708. package/lib/codec/discriminatedUnions.js +0 -1
  709. package/lib/codec/discriminatedUnions.js.map +1 -1
  710. package/lib/codec/noopValidator.d.ts +1 -1
  711. package/lib/codec/noopValidator.d.ts.map +1 -1
  712. package/lib/codec/noopValidator.js.map +1 -1
  713. package/lib/codec/versioned/codec.d.ts +3 -3
  714. package/lib/codec/versioned/codec.d.ts.map +1 -1
  715. package/lib/codec/versioned/codec.js.map +1 -1
  716. package/lib/codec/versioned/format.d.ts +1 -1
  717. package/lib/codec/versioned/format.d.ts.map +1 -1
  718. package/lib/codec/versioned/format.js.map +1 -1
  719. package/lib/core/change-family/changeFamily.d.ts +5 -5
  720. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  721. package/lib/core/change-family/changeFamily.js.map +1 -1
  722. package/lib/core/change-family/editBuilder.d.ts +1 -1
  723. package/lib/core/change-family/editBuilder.d.ts.map +1 -1
  724. package/lib/core/change-family/editBuilder.js +0 -2
  725. package/lib/core/change-family/editBuilder.js.map +1 -1
  726. package/lib/core/forest/editableForest.d.ts +5 -5
  727. package/lib/core/forest/editableForest.d.ts.map +1 -1
  728. package/lib/core/forest/editableForest.js.map +1 -1
  729. package/lib/core/forest/forest.d.ts +3 -3
  730. package/lib/core/forest/forest.d.ts.map +1 -1
  731. package/lib/core/forest/forest.js.map +1 -1
  732. package/lib/core/rebase/changeRebaser.d.ts +1 -1
  733. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  734. package/lib/core/rebase/changeRebaser.js.map +1 -1
  735. package/lib/core/rebase/revisionTagCodec.d.ts +4 -4
  736. package/lib/core/rebase/revisionTagCodec.d.ts.map +1 -1
  737. package/lib/core/rebase/revisionTagCodec.js +0 -2
  738. package/lib/core/rebase/revisionTagCodec.js.map +1 -1
  739. package/lib/core/rebase/types.d.ts +3 -3
  740. package/lib/core/rebase/types.d.ts.map +1 -1
  741. package/lib/core/rebase/types.js.map +1 -1
  742. package/lib/core/rebase/utils.d.ts +2 -2
  743. package/lib/core/rebase/utils.d.ts.map +1 -1
  744. package/lib/core/rebase/utils.js.map +1 -1
  745. package/lib/core/schema-stored/format.d.ts +2 -2
  746. package/lib/core/schema-stored/format.d.ts.map +1 -1
  747. package/lib/core/schema-stored/format.js.map +1 -1
  748. package/lib/core/schema-stored/schema.d.ts +3 -3
  749. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  750. package/lib/core/schema-stored/schema.js +0 -4
  751. package/lib/core/schema-stored/schema.js.map +1 -1
  752. package/lib/core/schema-stored/storedSchemaRepository.d.ts +3 -3
  753. package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  754. package/lib/core/schema-stored/storedSchemaRepository.js +1 -3
  755. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  756. package/lib/core/schema-view/view.d.ts +1 -1
  757. package/lib/core/schema-view/view.d.ts.map +1 -1
  758. package/lib/core/schema-view/view.js +0 -2
  759. package/lib/core/schema-view/view.js.map +1 -1
  760. package/lib/core/tree/anchorSet.d.ts +56 -18
  761. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  762. package/lib/core/tree/anchorSet.js +97 -52
  763. package/lib/core/tree/anchorSet.js.map +1 -1
  764. package/lib/core/tree/cursor.d.ts +3 -3
  765. package/lib/core/tree/cursor.d.ts.map +1 -1
  766. package/lib/core/tree/cursor.js.map +1 -1
  767. package/lib/core/tree/delta.d.ts +3 -3
  768. package/lib/core/tree/delta.d.ts.map +1 -1
  769. package/lib/core/tree/delta.js.map +1 -1
  770. package/lib/core/tree/deltaUtil.d.ts +2 -2
  771. package/lib/core/tree/deltaUtil.d.ts.map +1 -1
  772. package/lib/core/tree/deltaUtil.js.map +1 -1
  773. package/lib/core/tree/detachedFieldIndex.d.ts +7 -7
  774. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  775. package/lib/core/tree/detachedFieldIndex.js +2 -8
  776. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  777. package/lib/core/tree/detachedFieldIndexCodec.d.ts +4 -4
  778. package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  779. package/lib/core/tree/detachedFieldIndexCodec.js +1 -4
  780. package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
  781. package/lib/core/tree/detachedFieldIndexFormat.d.ts +2 -2
  782. package/lib/core/tree/detachedFieldIndexFormat.d.ts.map +1 -1
  783. package/lib/core/tree/detachedFieldIndexFormat.js.map +1 -1
  784. package/lib/core/tree/detachedFieldIndexTypes.d.ts +3 -3
  785. package/lib/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
  786. package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
  787. package/lib/core/tree/mapTree.d.ts +2 -2
  788. package/lib/core/tree/mapTree.d.ts.map +1 -1
  789. package/lib/core/tree/mapTree.js.map +1 -1
  790. package/lib/core/tree/pathTree.d.ts +3 -3
  791. package/lib/core/tree/pathTree.d.ts.map +1 -1
  792. package/lib/core/tree/pathTree.js.map +1 -1
  793. package/lib/core/tree/persistedTreeTextFormat.d.ts +1 -1
  794. package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  795. package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
  796. package/lib/core/tree/sparseTree.d.ts +2 -2
  797. package/lib/core/tree/sparseTree.d.ts.map +1 -1
  798. package/lib/core/tree/sparseTree.js +11 -15
  799. package/lib/core/tree/sparseTree.js.map +1 -1
  800. package/lib/core/tree/treeTextFormat.d.ts +2 -2
  801. package/lib/core/tree/treeTextFormat.d.ts.map +1 -1
  802. package/lib/core/tree/treeTextFormat.js.map +1 -1
  803. package/lib/core/tree/types.d.ts +3 -3
  804. package/lib/core/tree/types.d.ts.map +1 -1
  805. package/lib/core/tree/types.js +1 -2
  806. package/lib/core/tree/types.js.map +1 -1
  807. package/lib/core/tree/visitDelta.d.ts +5 -5
  808. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  809. package/lib/core/tree/visitDelta.js.map +1 -1
  810. package/lib/core/tree/visitPath.d.ts +2 -2
  811. package/lib/core/tree/visitPath.d.ts.map +1 -1
  812. package/lib/core/tree/visitPath.js.map +1 -1
  813. package/lib/core/tree/visitorUtils.d.ts +7 -7
  814. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  815. package/lib/core/tree/visitorUtils.js.map +1 -1
  816. package/lib/domains/json/jsonCursor.d.ts +2 -2
  817. package/lib/domains/json/jsonCursor.d.ts.map +1 -1
  818. package/lib/domains/json/jsonCursor.js.map +1 -1
  819. package/lib/domains/json/jsonDomainSchema.js.map +1 -1
  820. package/lib/domains/schemaBuilder.d.ts +2 -2
  821. package/lib/domains/schemaBuilder.d.ts.map +1 -1
  822. package/lib/domains/schemaBuilder.js +70 -70
  823. package/lib/domains/schemaBuilder.js.map +1 -1
  824. package/lib/events/events.js +1 -2
  825. package/lib/events/events.js.map +1 -1
  826. package/lib/feature-libraries/changeAtomIdCodec.d.ts +2 -2
  827. package/lib/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
  828. package/lib/feature-libraries/changeAtomIdCodec.js.map +1 -1
  829. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts +2 -2
  830. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  831. package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -14
  832. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  833. package/lib/feature-libraries/chunked-forest/chunk.d.ts +2 -2
  834. package/lib/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
  835. package/lib/feature-libraries/chunked-forest/chunk.js.map +1 -1
  836. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +4 -4
  837. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  838. package/lib/feature-libraries/chunked-forest/chunkTree.js +6 -13
  839. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  840. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +4 -4
  841. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  842. package/lib/feature-libraries/chunked-forest/chunkedForest.js +2 -9
  843. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  844. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +3 -3
  845. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
  846. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +3 -1
  847. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  848. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +17 -7
  849. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  850. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +6 -11
  851. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  852. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +8 -8
  853. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  854. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +3 -6
  855. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  856. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +3 -3
  857. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  858. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +0 -1
  859. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  860. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +6 -5
  861. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  862. package/lib/feature-libraries/chunked-forest/codec/codecs.js +5 -2
  863. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  864. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +7 -7
  865. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  866. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +13 -25
  867. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  868. package/lib/feature-libraries/chunked-forest/codec/fieldBatch.d.ts +1 -1
  869. package/lib/feature-libraries/chunked-forest/codec/fieldBatch.d.ts.map +1 -1
  870. package/lib/feature-libraries/chunked-forest/codec/fieldBatch.js.map +1 -1
  871. package/lib/feature-libraries/chunked-forest/codec/format.d.ts +1 -1
  872. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  873. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  874. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +1 -1
  875. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  876. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  877. package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts +5 -5
  878. package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
  879. package/lib/feature-libraries/chunked-forest/codec/nodeShape.js +5 -8
  880. package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
  881. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts +6 -6
  882. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +1 -1
  883. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +1 -1
  884. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +2 -2
  885. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  886. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +1 -1
  887. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  888. package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts +1 -1
  889. package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
  890. package/lib/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
  891. package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
  892. package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
  893. package/lib/feature-libraries/chunked-forest/sequenceChunk.js +0 -1
  894. package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  895. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +2 -2
  896. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  897. package/lib/feature-libraries/chunked-forest/uniformChunk.js +5 -40
  898. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  899. package/lib/feature-libraries/contextuallyTyped.d.ts +5 -5
  900. package/lib/feature-libraries/contextuallyTyped.d.ts.map +1 -1
  901. package/lib/feature-libraries/contextuallyTyped.js.map +1 -1
  902. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -3
  903. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  904. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +0 -2
  905. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  906. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +3 -3
  907. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  908. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  909. package/lib/feature-libraries/default-schema/defaultSchema.d.ts +1 -1
  910. package/lib/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
  911. package/lib/feature-libraries/default-schema/defaultSchema.js.map +1 -1
  912. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts +2 -2
  913. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  914. package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  915. package/lib/feature-libraries/deltaUtils.d.ts +1 -1
  916. package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
  917. package/lib/feature-libraries/deltaUtils.js +1 -1
  918. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  919. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +4 -4
  920. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  921. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +1 -2
  922. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  923. package/lib/feature-libraries/editableTreeBinder.d.ts +3 -3
  924. package/lib/feature-libraries/editableTreeBinder.d.ts.map +1 -1
  925. package/lib/feature-libraries/editableTreeBinder.js +12 -13
  926. package/lib/feature-libraries/editableTreeBinder.js.map +1 -1
  927. package/lib/feature-libraries/fieldGenerator.d.ts +2 -2
  928. package/lib/feature-libraries/fieldGenerator.d.ts.map +1 -1
  929. package/lib/feature-libraries/fieldGenerator.js.map +1 -1
  930. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts +5 -5
  931. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
  932. package/lib/feature-libraries/flex-map-tree/mapTreeNode.js +11 -12
  933. package/lib/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
  934. package/lib/feature-libraries/flex-tree/context.d.ts +8 -8
  935. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  936. package/lib/feature-libraries/flex-tree/context.js +3 -7
  937. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  938. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +9 -9
  939. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  940. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  941. package/lib/feature-libraries/flex-tree/index.d.ts +1 -1
  942. package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
  943. package/lib/feature-libraries/flex-tree/index.js +0 -1
  944. package/lib/feature-libraries/flex-tree/index.js.map +1 -1
  945. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +4 -4
  946. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  947. package/lib/feature-libraries/flex-tree/lazyEntity.js +23 -14
  948. package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  949. package/lib/feature-libraries/flex-tree/lazyField.d.ts +6 -6
  950. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  951. package/lib/feature-libraries/flex-tree/lazyField.js +0 -6
  952. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  953. package/lib/feature-libraries/flex-tree/lazyNode.d.ts +5 -5
  954. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  955. package/lib/feature-libraries/flex-tree/lazyNode.js +19 -13
  956. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  957. package/lib/feature-libraries/flex-tree/treeEvents.d.ts +1 -13
  958. package/lib/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  959. package/lib/feature-libraries/flex-tree/treeEvents.js +1 -28
  960. package/lib/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  961. package/lib/feature-libraries/flex-tree/unboxed.d.ts +5 -5
  962. package/lib/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
  963. package/lib/feature-libraries/flex-tree/unboxed.js.map +1 -1
  964. package/lib/feature-libraries/flex-tree/utilities.d.ts +1 -1
  965. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  966. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  967. package/lib/feature-libraries/forest-summary/codec.d.ts +3 -3
  968. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  969. package/lib/feature-libraries/forest-summary/codec.js +1 -1
  970. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  971. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +7 -7
  972. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  973. package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -6
  974. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  975. package/lib/feature-libraries/forest-summary/format.d.ts +1 -1
  976. package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
  977. package/lib/feature-libraries/forest-summary/format.js.map +1 -1
  978. package/lib/feature-libraries/index.d.ts +1 -1
  979. package/lib/feature-libraries/index.d.ts.map +1 -1
  980. package/lib/feature-libraries/index.js +1 -1
  981. package/lib/feature-libraries/index.js.map +1 -1
  982. package/lib/feature-libraries/mapTreeCursor.d.ts +2 -2
  983. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  984. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  985. package/lib/feature-libraries/memoizedIdRangeAllocator.d.ts +1 -1
  986. package/lib/feature-libraries/memoizedIdRangeAllocator.d.ts.map +1 -1
  987. package/lib/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
  988. package/lib/feature-libraries/mitigatedChangeFamily.d.ts +1 -1
  989. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  990. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  991. package/lib/feature-libraries/modular-schema/comparison.d.ts +2 -2
  992. package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  993. package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
  994. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +2 -2
  995. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  996. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  997. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -7
  998. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  999. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  1000. package/lib/feature-libraries/modular-schema/fieldKind.d.ts +1 -1
  1001. package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  1002. package/lib/feature-libraries/modular-schema/fieldKind.js +0 -2
  1003. package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  1004. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +2 -2
  1005. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  1006. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  1007. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +3 -3
  1008. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
  1009. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +0 -3
  1010. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  1011. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +4 -4
  1012. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  1013. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  1014. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +2 -2
  1015. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  1016. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  1017. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +1 -1
  1018. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  1019. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  1020. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +1 -1
  1021. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  1022. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  1023. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +2 -2
  1024. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  1025. package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  1026. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +5 -5
  1027. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  1028. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +2 -0
  1029. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  1030. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +6 -6
  1031. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  1032. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +2 -5
  1033. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  1034. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +3 -3
  1035. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  1036. package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
  1037. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +3 -3
  1038. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  1039. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  1040. package/lib/feature-libraries/node-key/mockNodeKeyManager.d.ts +2 -2
  1041. package/lib/feature-libraries/node-key/mockNodeKeyManager.d.ts.map +1 -1
  1042. package/lib/feature-libraries/node-key/mockNodeKeyManager.js +4 -2
  1043. package/lib/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
  1044. package/lib/feature-libraries/node-key/nodeKey.d.ts +3 -3
  1045. package/lib/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
  1046. package/lib/feature-libraries/node-key/nodeKey.js.map +1 -1
  1047. package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts +4 -4
  1048. package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts.map +1 -1
  1049. package/lib/feature-libraries/node-key/nodeKeyIndex.js +0 -3
  1050. package/lib/feature-libraries/node-key/nodeKeyIndex.js.map +1 -1
  1051. package/lib/feature-libraries/node-key/nodeKeyManager.d.ts +1 -1
  1052. package/lib/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
  1053. package/lib/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
  1054. package/lib/feature-libraries/object-forest/objectForest.d.ts +2 -2
  1055. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  1056. package/lib/feature-libraries/object-forest/objectForest.js +28 -23
  1057. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  1058. package/lib/feature-libraries/optional-field/optionalField.d.ts +3 -3
  1059. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  1060. package/lib/feature-libraries/optional-field/optionalField.js +3 -1
  1061. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  1062. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +1 -1
  1063. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  1064. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
  1065. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +1 -1
  1066. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  1067. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
  1068. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +2 -2
  1069. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  1070. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  1071. package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts +3 -3
  1072. package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +1 -1
  1073. package/lib/feature-libraries/optional-field/optionalFieldCodecV1.js.map +1 -1
  1074. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +3 -3
  1075. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  1076. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  1077. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -2
  1078. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  1079. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  1080. package/lib/feature-libraries/schema-aware/schemaAware.d.ts +4 -4
  1081. package/lib/feature-libraries/schema-aware/schemaAware.d.ts.map +1 -1
  1082. package/lib/feature-libraries/schema-aware/schemaAware.js +1 -2
  1083. package/lib/feature-libraries/schema-aware/schemaAware.js.map +1 -1
  1084. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  1085. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  1086. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  1087. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +1 -1
  1088. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  1089. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  1090. package/lib/feature-libraries/schema-edits/schemaChangeTypes.d.ts +1 -1
  1091. package/lib/feature-libraries/schema-edits/schemaChangeTypes.d.ts.map +1 -1
  1092. package/lib/feature-libraries/schema-edits/schemaChangeTypes.js.map +1 -1
  1093. package/lib/feature-libraries/schema-index/codec.d.ts +2 -2
  1094. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  1095. package/lib/feature-libraries/schema-index/codec.js +1 -1
  1096. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  1097. package/lib/feature-libraries/schema-index/format.d.ts +1 -1
  1098. package/lib/feature-libraries/schema-index/format.d.ts.map +1 -1
  1099. package/lib/feature-libraries/schema-index/format.js.map +1 -1
  1100. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +7 -7
  1101. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  1102. package/lib/feature-libraries/schema-index/schemaSummarizer.js +2 -6
  1103. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  1104. package/lib/feature-libraries/schemaBuilder.d.ts +2 -2
  1105. package/lib/feature-libraries/schemaBuilder.d.ts.map +1 -1
  1106. package/lib/feature-libraries/schemaBuilder.js.map +1 -1
  1107. package/lib/feature-libraries/schemaBuilderBase.d.ts +4 -4
  1108. package/lib/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
  1109. package/lib/feature-libraries/schemaBuilderBase.js +3 -14
  1110. package/lib/feature-libraries/schemaBuilderBase.js.map +1 -1
  1111. package/lib/feature-libraries/sequence-field/compose.d.ts +5 -5
  1112. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  1113. package/lib/feature-libraries/sequence-field/compose.js +0 -6
  1114. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  1115. package/lib/feature-libraries/sequence-field/formatV1.d.ts +1 -1
  1116. package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  1117. package/lib/feature-libraries/sequence-field/formatV1.js.map +1 -1
  1118. package/lib/feature-libraries/sequence-field/formatV2.d.ts +1 -1
  1119. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  1120. package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
  1121. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +1 -1
  1122. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  1123. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  1124. package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
  1125. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  1126. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  1127. package/lib/feature-libraries/sequence-field/markListFactory.d.ts +1 -1
  1128. package/lib/feature-libraries/sequence-field/markListFactory.d.ts.map +1 -1
  1129. package/lib/feature-libraries/sequence-field/markListFactory.js +4 -3
  1130. package/lib/feature-libraries/sequence-field/markListFactory.js.map +1 -1
  1131. package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  1132. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  1133. package/lib/feature-libraries/sequence-field/markQueue.js +2 -4
  1134. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  1135. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +5 -5
  1136. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  1137. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  1138. package/lib/feature-libraries/sequence-field/prune.d.ts +2 -2
  1139. package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  1140. package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
  1141. package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
  1142. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  1143. package/lib/feature-libraries/sequence-field/rebase.js +0 -6
  1144. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  1145. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +3 -3
  1146. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  1147. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  1148. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts +2 -2
  1149. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  1150. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  1151. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts +3 -3
  1152. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  1153. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  1154. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +2 -2
  1155. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
  1156. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
  1157. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +5 -5
  1158. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  1159. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  1160. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +5 -5
  1161. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  1162. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  1163. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +4 -4
  1164. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  1165. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  1166. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +3 -3
  1167. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  1168. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  1169. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -3
  1170. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  1171. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  1172. package/lib/feature-libraries/sequence-field/types.d.ts +2 -2
  1173. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  1174. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  1175. package/lib/feature-libraries/sequence-field/utils.d.ts +5 -5
  1176. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  1177. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  1178. package/lib/feature-libraries/storedToViewSchema.d.ts +2 -2
  1179. package/lib/feature-libraries/storedToViewSchema.d.ts.map +1 -1
  1180. package/lib/feature-libraries/storedToViewSchema.js.map +1 -1
  1181. package/lib/feature-libraries/treeCursorUtils.d.ts +1 -1
  1182. package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  1183. package/lib/feature-libraries/treeCursorUtils.js +9 -13
  1184. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  1185. package/lib/feature-libraries/treeTextCursor.d.ts +2 -2
  1186. package/lib/feature-libraries/treeTextCursor.d.ts.map +1 -1
  1187. package/lib/feature-libraries/treeTextCursor.js +1 -1
  1188. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  1189. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts +3 -3
  1190. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
  1191. package/lib/feature-libraries/typed-schema/schemaCollection.js +1 -1
  1192. package/lib/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
  1193. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +4 -4
  1194. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  1195. package/lib/feature-libraries/typed-schema/typedTreeSchema.js +4 -23
  1196. package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  1197. package/lib/feature-libraries/typed-schema/view.d.ts +4 -4
  1198. package/lib/feature-libraries/typed-schema/view.d.ts.map +1 -1
  1199. package/lib/feature-libraries/typed-schema/view.js +0 -7
  1200. package/lib/feature-libraries/typed-schema/view.js.map +1 -1
  1201. package/lib/feature-libraries/valueUtilities.d.ts +2 -2
  1202. package/lib/feature-libraries/valueUtilities.d.ts.map +1 -1
  1203. package/lib/feature-libraries/valueUtilities.js.map +1 -1
  1204. package/lib/index.d.ts +1 -1
  1205. package/lib/index.d.ts.map +1 -1
  1206. package/lib/index.js +1 -1
  1207. package/lib/index.js.map +1 -1
  1208. package/lib/packageVersion.d.ts +1 -1
  1209. package/lib/packageVersion.js +1 -1
  1210. package/lib/packageVersion.js.map +1 -1
  1211. package/lib/public.d.ts +0 -1
  1212. package/lib/shared-tree/schematizeTree.d.ts +3 -3
  1213. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  1214. package/lib/shared-tree/schematizeTree.js.map +1 -1
  1215. package/lib/shared-tree/schematizingTreeView.d.ts +4 -4
  1216. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  1217. package/lib/shared-tree/schematizingTreeView.js +11 -28
  1218. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  1219. package/lib/shared-tree/sharedTree.d.ts +15 -11
  1220. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  1221. package/lib/shared-tree/sharedTree.js +14 -11
  1222. package/lib/shared-tree/sharedTree.js.map +1 -1
  1223. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +4 -4
  1224. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  1225. package/lib/shared-tree/sharedTreeChangeCodecs.js +1 -1
  1226. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  1227. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +3 -3
  1228. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  1229. package/lib/shared-tree/sharedTreeChangeEnricher.js +11 -14
  1230. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  1231. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
  1232. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  1233. package/lib/shared-tree/sharedTreeChangeFamily.js +4 -6
  1234. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  1235. package/lib/shared-tree/sharedTreeChangeFormat.d.ts +1 -1
  1236. package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  1237. package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  1238. package/lib/shared-tree/sharedTreeChangeTypes.d.ts +1 -1
  1239. package/lib/shared-tree/sharedTreeChangeTypes.d.ts.map +1 -1
  1240. package/lib/shared-tree/sharedTreeChangeTypes.js.map +1 -1
  1241. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +3 -3
  1242. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  1243. package/lib/shared-tree/sharedTreeEditBuilder.js +0 -2
  1244. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  1245. package/lib/shared-tree/treeApi.d.ts +1 -1
  1246. package/lib/shared-tree/treeApi.d.ts.map +1 -1
  1247. package/lib/shared-tree/treeApi.js.map +1 -1
  1248. package/lib/shared-tree/treeCheckout.d.ts +7 -7
  1249. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  1250. package/lib/shared-tree/treeCheckout.js +12 -23
  1251. package/lib/shared-tree/treeCheckout.js.map +1 -1
  1252. package/lib/shared-tree/treeView.d.ts +3 -3
  1253. package/lib/shared-tree/treeView.d.ts.map +1 -1
  1254. package/lib/shared-tree/treeView.js +0 -6
  1255. package/lib/shared-tree/treeView.js.map +1 -1
  1256. package/lib/shared-tree-core/branch.d.ts +2 -2
  1257. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  1258. package/lib/shared-tree-core/branch.js +25 -31
  1259. package/lib/shared-tree-core/branch.js.map +1 -1
  1260. package/lib/shared-tree-core/branchCommitEnricher.d.ts +2 -2
  1261. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  1262. package/lib/shared-tree-core/branchCommitEnricher.js +9 -12
  1263. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  1264. package/lib/shared-tree-core/changeEnricher.d.ts +1 -1
  1265. package/lib/shared-tree-core/changeEnricher.d.ts.map +1 -1
  1266. package/lib/shared-tree-core/changeEnricher.js.map +1 -1
  1267. package/lib/shared-tree-core/defaultResubmitMachine.d.ts +2 -2
  1268. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  1269. package/lib/shared-tree-core/defaultResubmitMachine.js +19 -21
  1270. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  1271. package/lib/shared-tree-core/editManager.d.ts +3 -3
  1272. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  1273. package/lib/shared-tree-core/editManager.js +37 -53
  1274. package/lib/shared-tree-core/editManager.js.map +1 -1
  1275. package/lib/shared-tree-core/editManagerCodecs.d.ts +5 -5
  1276. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  1277. package/lib/shared-tree-core/editManagerCodecs.js +1 -1
  1278. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  1279. package/lib/shared-tree-core/editManagerFormat.d.ts +4 -4
  1280. package/lib/shared-tree-core/editManagerFormat.d.ts.map +1 -1
  1281. package/lib/shared-tree-core/editManagerFormat.js.map +1 -1
  1282. package/lib/shared-tree-core/editManagerSummarizer.d.ts +9 -9
  1283. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  1284. package/lib/shared-tree-core/editManagerSummarizer.js +1 -5
  1285. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  1286. package/lib/shared-tree-core/messageCodecs.d.ts +5 -5
  1287. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  1288. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  1289. package/lib/shared-tree-core/messageFormat.d.ts +4 -4
  1290. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  1291. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  1292. package/lib/shared-tree-core/messageTypes.d.ts +2 -2
  1293. package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
  1294. package/lib/shared-tree-core/messageTypes.js.map +1 -1
  1295. package/lib/shared-tree-core/resubmitMachine.d.ts +1 -1
  1296. package/lib/shared-tree-core/resubmitMachine.d.ts.map +1 -1
  1297. package/lib/shared-tree-core/resubmitMachine.js.map +1 -1
  1298. package/lib/shared-tree-core/sequenceIdUtils.d.ts +1 -1
  1299. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  1300. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  1301. package/lib/shared-tree-core/sharedTreeCore.d.ts +10 -10
  1302. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  1303. package/lib/shared-tree-core/sharedTreeCore.js +7 -24
  1304. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  1305. package/lib/shared-tree-core/transactionEnricher.d.ts +2 -2
  1306. package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  1307. package/lib/shared-tree-core/transactionEnricher.js +1 -3
  1308. package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
  1309. package/lib/shared-tree-core/transactionStack.d.ts +1 -1
  1310. package/lib/shared-tree-core/transactionStack.d.ts.map +1 -1
  1311. package/lib/shared-tree-core/transactionStack.js +3 -1
  1312. package/lib/shared-tree-core/transactionStack.js.map +1 -1
  1313. package/lib/simple-tree/arrayNode.d.ts +2 -2
  1314. package/lib/simple-tree/arrayNode.d.ts.map +1 -1
  1315. package/lib/simple-tree/arrayNode.js +35 -27
  1316. package/lib/simple-tree/arrayNode.js.map +1 -1
  1317. package/lib/simple-tree/leafNodeSchema.d.ts +1 -1
  1318. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  1319. package/lib/simple-tree/leafNodeSchema.js +2 -4
  1320. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  1321. package/lib/simple-tree/mapNode.d.ts +2 -2
  1322. package/lib/simple-tree/mapNode.d.ts.map +1 -1
  1323. package/lib/simple-tree/mapNode.js +5 -5
  1324. package/lib/simple-tree/mapNode.js.map +1 -1
  1325. package/lib/simple-tree/nodeKeys.d.ts +2 -2
  1326. package/lib/simple-tree/nodeKeys.d.ts.map +1 -1
  1327. package/lib/simple-tree/nodeKeys.js.map +1 -1
  1328. package/lib/simple-tree/objectNode.d.ts +5 -5
  1329. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  1330. package/lib/simple-tree/objectNode.js +6 -6
  1331. package/lib/simple-tree/objectNode.js.map +1 -1
  1332. package/lib/simple-tree/proxies.d.ts +4 -4
  1333. package/lib/simple-tree/proxies.d.ts.map +1 -1
  1334. package/lib/simple-tree/proxies.js +7 -5
  1335. package/lib/simple-tree/proxies.js.map +1 -1
  1336. package/lib/simple-tree/proxyBinding.d.ts +6 -6
  1337. package/lib/simple-tree/proxyBinding.d.ts.map +1 -1
  1338. package/lib/simple-tree/proxyBinding.js.map +1 -1
  1339. package/lib/simple-tree/schemaCaching.d.ts +2 -2
  1340. package/lib/simple-tree/schemaCaching.d.ts.map +1 -1
  1341. package/lib/simple-tree/schemaCaching.js.map +1 -1
  1342. package/lib/simple-tree/schemaCreationUtilities.d.ts +5 -5
  1343. package/lib/simple-tree/schemaCreationUtilities.d.ts.map +1 -1
  1344. package/lib/simple-tree/schemaCreationUtilities.js.map +1 -1
  1345. package/lib/simple-tree/schemaFactory.d.ts +25 -12
  1346. package/lib/simple-tree/schemaFactory.d.ts.map +1 -1
  1347. package/lib/simple-tree/schemaFactory.js +66 -54
  1348. package/lib/simple-tree/schemaFactory.js.map +1 -1
  1349. package/lib/simple-tree/schemaFactoryRecursive.d.ts +6 -6
  1350. package/lib/simple-tree/schemaFactoryRecursive.d.ts.map +1 -1
  1351. package/lib/simple-tree/schemaFactoryRecursive.js +1 -1
  1352. package/lib/simple-tree/schemaFactoryRecursive.js.map +1 -1
  1353. package/lib/simple-tree/schemaTypes.d.ts +6 -6
  1354. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  1355. package/lib/simple-tree/schemaTypes.js +3 -12
  1356. package/lib/simple-tree/schemaTypes.js.map +1 -1
  1357. package/lib/simple-tree/testRecursiveDomain.d.ts +1 -1
  1358. package/lib/simple-tree/testRecursiveDomain.d.ts.map +1 -1
  1359. package/lib/simple-tree/testRecursiveDomain.js.map +1 -1
  1360. package/lib/simple-tree/toFlexSchema.d.ts +4 -4
  1361. package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
  1362. package/lib/simple-tree/toFlexSchema.js.map +1 -1
  1363. package/lib/simple-tree/toMapTree.d.ts +2 -2
  1364. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  1365. package/lib/simple-tree/toMapTree.js.map +1 -1
  1366. package/lib/simple-tree/tree.d.ts +6 -27
  1367. package/lib/simple-tree/tree.d.ts.map +1 -1
  1368. package/lib/simple-tree/tree.js +0 -21
  1369. package/lib/simple-tree/tree.js.map +1 -1
  1370. package/lib/simple-tree/treeNodeApi.d.ts +30 -27
  1371. package/lib/simple-tree/treeNodeApi.d.ts.map +1 -1
  1372. package/lib/simple-tree/treeNodeApi.js +8 -3
  1373. package/lib/simple-tree/treeNodeApi.js.map +1 -1
  1374. package/lib/simple-tree/types.d.ts +29 -9
  1375. package/lib/simple-tree/types.d.ts.map +1 -1
  1376. package/lib/simple-tree/types.js +78 -54
  1377. package/lib/simple-tree/types.js.map +1 -1
  1378. package/lib/simple-tree/typesUnsafe.d.ts +5 -5
  1379. package/lib/simple-tree/typesUnsafe.d.ts.map +1 -1
  1380. package/lib/simple-tree/typesUnsafe.js.map +1 -1
  1381. package/lib/treeFactory.d.ts +5 -5
  1382. package/lib/treeFactory.d.ts.map +1 -1
  1383. package/lib/treeFactory.js +10 -9
  1384. package/lib/treeFactory.js.map +1 -1
  1385. package/lib/util/brand.js +0 -1
  1386. package/lib/util/brand.js.map +1 -1
  1387. package/lib/util/brandedMap.d.ts +1 -1
  1388. package/lib/util/brandedMap.d.ts.map +1 -1
  1389. package/lib/util/brandedMap.js.map +1 -1
  1390. package/lib/util/nestedMap.d.ts +1 -1
  1391. package/lib/util/nestedMap.d.ts.map +1 -1
  1392. package/lib/util/nestedMap.js +4 -2
  1393. package/lib/util/nestedMap.js.map +1 -1
  1394. package/lib/util/nestedSet.d.ts +1 -1
  1395. package/lib/util/nestedSet.d.ts.map +1 -1
  1396. package/lib/util/nestedSet.js.map +1 -1
  1397. package/lib/util/offsetList.js +4 -2
  1398. package/lib/util/offsetList.js.map +1 -1
  1399. package/lib/util/referenceCounting.js +0 -1
  1400. package/lib/util/referenceCounting.js.map +1 -1
  1401. package/lib/util/stackyIterator.js +2 -3
  1402. package/lib/util/stackyIterator.js.map +1 -1
  1403. package/lib/util/typeboxBrand.d.ts +1 -1
  1404. package/lib/util/typeboxBrand.d.ts.map +1 -1
  1405. package/lib/util/typeboxBrand.js.map +1 -1
  1406. package/package.json +20 -20
  1407. package/src/codec/codec.ts +2 -2
  1408. package/src/codec/discriminatedUnions.ts +2 -2
  1409. package/src/codec/noopValidator.ts +1 -1
  1410. package/src/codec/versioned/codec.ts +4 -4
  1411. package/src/codec/versioned/format.ts +1 -1
  1412. package/src/core/change-family/changeFamily.ts +5 -5
  1413. package/src/core/change-family/editBuilder.ts +1 -1
  1414. package/src/core/forest/editableForest.ts +9 -9
  1415. package/src/core/forest/forest.ts +8 -8
  1416. package/src/core/rebase/changeRebaser.ts +1 -1
  1417. package/src/core/rebase/revisionTagCodec.ts +4 -4
  1418. package/src/core/rebase/types.ts +5 -5
  1419. package/src/core/rebase/utils.ts +6 -6
  1420. package/src/core/schema-stored/format.ts +2 -2
  1421. package/src/core/schema-stored/schema.ts +7 -7
  1422. package/src/core/schema-stored/storedSchemaRepository.ts +6 -6
  1423. package/src/core/schema-view/view.ts +1 -1
  1424. package/src/core/tree/anchorSet.ts +115 -23
  1425. package/src/core/tree/cursor.ts +3 -3
  1426. package/src/core/tree/delta.ts +3 -3
  1427. package/src/core/tree/deltaUtil.ts +4 -4
  1428. package/src/core/tree/detachedFieldIndex.ts +11 -11
  1429. package/src/core/tree/detachedFieldIndexCodec.ts +11 -7
  1430. package/src/core/tree/detachedFieldIndexFormat.ts +2 -2
  1431. package/src/core/tree/detachedFieldIndexTypes.ts +3 -3
  1432. package/src/core/tree/mapTree.ts +2 -2
  1433. package/src/core/tree/pathTree.ts +3 -3
  1434. package/src/core/tree/persistedTreeTextFormat.ts +1 -1
  1435. package/src/core/tree/sparseTree.ts +2 -2
  1436. package/src/core/tree/treeTextFormat.ts +2 -2
  1437. package/src/core/tree/types.ts +10 -4
  1438. package/src/core/tree/visitDelta.ts +8 -8
  1439. package/src/core/tree/visitPath.ts +2 -2
  1440. package/src/core/tree/visitorUtils.ts +9 -9
  1441. package/src/domains/json/jsonCursor.ts +5 -5
  1442. package/src/domains/json/jsonDomainSchema.ts +2 -2
  1443. package/src/domains/schemaBuilder.ts +9 -9
  1444. package/src/feature-libraries/changeAtomIdCodec.ts +2 -2
  1445. package/src/feature-libraries/chunked-forest/basicChunk.ts +9 -9
  1446. package/src/feature-libraries/chunked-forest/chunk.ts +4 -4
  1447. package/src/feature-libraries/chunked-forest/chunkTree.ts +12 -12
  1448. package/src/feature-libraries/chunked-forest/chunkedForest.ts +17 -17
  1449. package/src/feature-libraries/chunked-forest/codec/chunkCodecUtilities.ts +3 -3
  1450. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +33 -17
  1451. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +12 -7
  1452. package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +5 -5
  1453. package/src/feature-libraries/chunked-forest/codec/codecs.ts +14 -6
  1454. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +16 -16
  1455. package/src/feature-libraries/chunked-forest/codec/fieldBatch.ts +1 -1
  1456. package/src/feature-libraries/chunked-forest/codec/format.ts +1 -1
  1457. package/src/feature-libraries/chunked-forest/codec/formatGeneric.ts +1 -1
  1458. package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +19 -14
  1459. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncoding.ts +11 -11
  1460. package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +10 -5
  1461. package/src/feature-libraries/chunked-forest/emptyChunk.ts +5 -5
  1462. package/src/feature-libraries/chunked-forest/sequenceChunk.ts +1 -1
  1463. package/src/feature-libraries/chunked-forest/uniformChunk.ts +8 -8
  1464. package/src/feature-libraries/contextuallyTyped.ts +12 -12
  1465. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +17 -17
  1466. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +11 -11
  1467. package/src/feature-libraries/default-schema/defaultSchema.ts +1 -1
  1468. package/src/feature-libraries/default-schema/noChangeCodecs.ts +2 -2
  1469. package/src/feature-libraries/deltaUtils.ts +7 -2
  1470. package/src/feature-libraries/detachedFieldIndexSummarizer.ts +5 -5
  1471. package/src/feature-libraries/editableTreeBinder.ts +10 -10
  1472. package/src/feature-libraries/fieldGenerator.ts +2 -2
  1473. package/src/feature-libraries/flex-map-tree/mapTreeNode.ts +32 -32
  1474. package/src/feature-libraries/flex-tree/context.ts +11 -11
  1475. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +15 -12
  1476. package/src/feature-libraries/flex-tree/index.ts +1 -1
  1477. package/src/feature-libraries/flex-tree/lazyEntity.ts +9 -4
  1478. package/src/feature-libraries/flex-tree/lazyField.ts +22 -22
  1479. package/src/feature-libraries/flex-tree/lazyNode.ts +32 -38
  1480. package/src/feature-libraries/flex-tree/treeEvents.ts +1 -38
  1481. package/src/feature-libraries/flex-tree/unboxed.ts +7 -7
  1482. package/src/feature-libraries/flex-tree/utilities.ts +2 -2
  1483. package/src/feature-libraries/forest-summary/codec.ts +7 -3
  1484. package/src/feature-libraries/forest-summary/forestSummarizer.ts +15 -15
  1485. package/src/feature-libraries/forest-summary/format.ts +1 -1
  1486. package/src/feature-libraries/index.ts +0 -2
  1487. package/src/feature-libraries/mapTreeCursor.ts +6 -6
  1488. package/src/feature-libraries/memoizedIdRangeAllocator.ts +3 -3
  1489. package/src/feature-libraries/mitigatedChangeFamily.ts +1 -1
  1490. package/src/feature-libraries/modular-schema/comparison.ts +6 -6
  1491. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +3 -3
  1492. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +7 -7
  1493. package/src/feature-libraries/modular-schema/fieldKind.ts +1 -1
  1494. package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +2 -2
  1495. package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +3 -3
  1496. package/src/feature-libraries/modular-schema/genericFieldKind.ts +10 -10
  1497. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +3 -3
  1498. package/src/feature-libraries/modular-schema/genericFieldKindFormat.ts +1 -1
  1499. package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +1 -1
  1500. package/src/feature-libraries/modular-schema/isNeverTree.ts +4 -4
  1501. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +25 -20
  1502. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +34 -34
  1503. package/src/feature-libraries/modular-schema/modularChangeFormat.ts +3 -3
  1504. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +3 -3
  1505. package/src/feature-libraries/node-key/mockNodeKeyManager.ts +2 -2
  1506. package/src/feature-libraries/node-key/nodeKey.ts +3 -3
  1507. package/src/feature-libraries/node-key/nodeKeyIndex.ts +4 -4
  1508. package/src/feature-libraries/node-key/nodeKeyManager.ts +1 -1
  1509. package/src/feature-libraries/object-forest/objectForest.ts +22 -22
  1510. package/src/feature-libraries/optional-field/optionalField.ts +20 -20
  1511. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV1.ts +1 -1
  1512. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV2.ts +1 -1
  1513. package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +2 -2
  1514. package/src/feature-libraries/optional-field/optionalFieldCodecV1.ts +4 -4
  1515. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +4 -4
  1516. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +2 -2
  1517. package/src/feature-libraries/schema-aware/schemaAware.ts +8 -4
  1518. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +3 -3
  1519. package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +1 -1
  1520. package/src/feature-libraries/schema-edits/schemaChangeTypes.ts +1 -1
  1521. package/src/feature-libraries/schema-index/codec.ts +8 -4
  1522. package/src/feature-libraries/schema-index/format.ts +1 -1
  1523. package/src/feature-libraries/schema-index/schemaSummarizer.ts +11 -7
  1524. package/src/feature-libraries/schemaBuilder.ts +2 -2
  1525. package/src/feature-libraries/schemaBuilderBase.ts +12 -12
  1526. package/src/feature-libraries/sequence-field/compose.ts +18 -18
  1527. package/src/feature-libraries/sequence-field/formatV1.ts +1 -1
  1528. package/src/feature-libraries/sequence-field/formatV2.ts +1 -1
  1529. package/src/feature-libraries/sequence-field/helperTypes.ts +1 -1
  1530. package/src/feature-libraries/sequence-field/invert.ts +14 -14
  1531. package/src/feature-libraries/sequence-field/markListFactory.ts +1 -1
  1532. package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
  1533. package/src/feature-libraries/sequence-field/moveEffectTable.ts +5 -5
  1534. package/src/feature-libraries/sequence-field/prune.ts +2 -2
  1535. package/src/feature-libraries/sequence-field/rebase.ts +18 -18
  1536. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +3 -3
  1537. package/src/feature-libraries/sequence-field/replaceRevisions.ts +7 -7
  1538. package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +3 -3
  1539. package/src/feature-libraries/sequence-field/sequenceFieldChangeRebaser.ts +2 -2
  1540. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +17 -17
  1541. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +16 -16
  1542. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +4 -4
  1543. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +12 -3
  1544. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +7 -7
  1545. package/src/feature-libraries/sequence-field/types.ts +2 -2
  1546. package/src/feature-libraries/sequence-field/utils.ts +25 -25
  1547. package/src/feature-libraries/storedToViewSchema.ts +7 -7
  1548. package/src/feature-libraries/treeCursorUtils.ts +8 -8
  1549. package/src/feature-libraries/treeTextCursor.ts +10 -6
  1550. package/src/feature-libraries/typed-schema/schemaCollection.ts +11 -6
  1551. package/src/feature-libraries/typed-schema/typedTreeSchema.ts +16 -16
  1552. package/src/feature-libraries/typed-schema/view.ts +8 -8
  1553. package/src/feature-libraries/valueUtilities.ts +2 -2
  1554. package/src/index.ts +0 -1
  1555. package/src/packageVersion.ts +1 -1
  1556. package/src/shared-tree/schematizeTree.ts +7 -7
  1557. package/src/shared-tree/schematizingTreeView.ts +19 -16
  1558. package/src/shared-tree/sharedTree.ts +28 -16
  1559. package/src/shared-tree/sharedTreeChangeCodecs.ts +11 -8
  1560. package/src/shared-tree/sharedTreeChangeEnricher.ts +8 -8
  1561. package/src/shared-tree/sharedTreeChangeFamily.ts +21 -15
  1562. package/src/shared-tree/sharedTreeChangeFormat.ts +1 -1
  1563. package/src/shared-tree/sharedTreeChangeTypes.ts +1 -1
  1564. package/src/shared-tree/sharedTreeEditBuilder.ts +4 -4
  1565. package/src/shared-tree/treeApi.ts +5 -5
  1566. package/src/shared-tree/treeCheckout.ts +28 -23
  1567. package/src/shared-tree/treeView.ts +8 -8
  1568. package/src/shared-tree-core/branch.ts +8 -8
  1569. package/src/shared-tree-core/branchCommitEnricher.ts +2 -2
  1570. package/src/shared-tree-core/changeEnricher.ts +1 -1
  1571. package/src/shared-tree-core/defaultResubmitMachine.ts +2 -2
  1572. package/src/shared-tree-core/editManager.ts +8 -8
  1573. package/src/shared-tree-core/editManagerCodecs.ts +13 -8
  1574. package/src/shared-tree-core/editManagerFormat.ts +5 -5
  1575. package/src/shared-tree-core/editManagerSummarizer.ts +13 -9
  1576. package/src/shared-tree-core/messageCodecs.ts +7 -7
  1577. package/src/shared-tree-core/messageFormat.ts +4 -4
  1578. package/src/shared-tree-core/messageTypes.ts +2 -2
  1579. package/src/shared-tree-core/resubmitMachine.ts +1 -1
  1580. package/src/shared-tree-core/sequenceIdUtils.ts +1 -1
  1581. package/src/shared-tree-core/sharedTreeCore.ts +20 -20
  1582. package/src/shared-tree-core/transactionEnricher.ts +2 -2
  1583. package/src/shared-tree-core/transactionStack.ts +1 -1
  1584. package/src/simple-tree/arrayNode.ts +32 -28
  1585. package/src/simple-tree/leafNodeSchema.ts +4 -4
  1586. package/src/simple-tree/mapNode.ts +10 -10
  1587. package/src/simple-tree/nodeKeys.ts +2 -2
  1588. package/src/simple-tree/objectNode.ts +18 -18
  1589. package/src/simple-tree/proxies.ts +21 -27
  1590. package/src/simple-tree/proxyBinding.ts +14 -14
  1591. package/src/simple-tree/schemaCaching.ts +5 -5
  1592. package/src/simple-tree/schemaCreationUtilities.ts +5 -5
  1593. package/src/simple-tree/schemaFactory.ts +39 -22
  1594. package/src/simple-tree/schemaFactoryRecursive.ts +13 -13
  1595. package/src/simple-tree/schemaTypes.ts +8 -8
  1596. package/src/simple-tree/testRecursiveDomain.ts +1 -1
  1597. package/src/simple-tree/toFlexSchema.ts +13 -13
  1598. package/src/simple-tree/toMapTree.ts +4 -4
  1599. package/src/simple-tree/tree.ts +6 -31
  1600. package/src/simple-tree/treeNodeApi.ts +45 -33
  1601. package/src/simple-tree/types.ts +60 -12
  1602. package/src/simple-tree/typesUnsafe.ts +6 -6
  1603. package/src/treeFactory.ts +5 -5
  1604. package/src/util/brandedMap.ts +1 -1
  1605. package/src/util/nestedMap.ts +1 -1
  1606. package/src/util/nestedSet.ts +1 -1
  1607. package/src/util/typeboxBrand.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"editableForest.js","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D,+CAS0B;AAuB1B;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAC/B,MAAuB,EACvB,OAA0C,EAC1C,gBAAkC,EAClC,YAA2B;IAE3B,IAAA,iBAAM,EAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACzD,MAAM,KAAK,GAAc,IAAA,qCAA0B,EAAC,OAAO,CAAC,CAAC;IAC7D,IAAA,qBAAU,EAAC,KAAK,EAAE,MAAM,EAAE,IAAA,iCAAsB,EAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC;AAC3F,CAAC;AATD,4CASC;AAkBD,SAAgB,eAAe,CAAC,KAAoC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AAClC,CAAC;AAFD,0CAEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport { RevisionTagCodec } from \"../rebase/index.js\";\nimport { FieldKey } from \"../schema-stored/index.js\";\nimport {\n\tAnchor,\n\tDeltaRoot,\n\tDeltaVisitor,\n\tDetachedField,\n\tITreeCursorSynchronous,\n\tapplyDelta,\n\tdeltaForRootInitialization,\n\tmakeDetachedFieldIndex,\n} from \"../tree/index.js\";\n\nimport { IForestSubscription, ITreeSubscriptionCursor } from \"./forest.js\";\nimport { IIdCompressor } from \"@fluidframework/id-compressor\";\n\n/**\n * Editing APIs.\n * @internal\n */\nexport interface IEditableForest extends IForestSubscription {\n\t/**\n\t * Provides a visitor that can be used to mutate the forest.\n\t *\n\t * @returns a visitor that can be used to mutate the forest.\n\t *\n\t * @remarks\n\t * Mutating the forest does NOT update anchors.\n\t * The visitor must be released after use by calling {@link DeltaVisitor.free} on it.\n\t * It is invalid to acquire a visitor without releasing the previous one.\n\t */\n\tacquireVisitor(): DeltaVisitor;\n}\n\n/**\n * Sets the contents of the forest via delta.\n * Requires the fores starts empty.\n *\n * @remarks\n * This does not perform an edit: it updates the forest content as if there was an edit that did that.\n */\nexport function initializeForest(\n\tforest: IEditableForest,\n\tcontent: readonly ITreeCursorSynchronous[],\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n): void {\n\tassert(forest.isEmpty, 0x747 /* forest must be empty */);\n\tconst delta: DeltaRoot = deltaForRootInitialization(content);\n\tapplyDelta(delta, forest, makeDetachedFieldIndex(\"init\", revisionTagCodec, idCompressor));\n}\n\n// TODO: Types below here may be useful for input into edit building APIs, but are no longer used here directly.\n\n/**\n * Ways to refer to a node in an IEditableForest.\n * @internal\n */\nexport type ForestLocation = ITreeSubscriptionCursor | Anchor;\n\n/**\n * @internal\n */\nexport interface TreeLocation {\n\treadonly range: FieldLocation | DetachedField;\n\treadonly index: number;\n}\n\nexport function isFieldLocation(range: FieldLocation | DetachedField): range is FieldLocation {\n\treturn typeof range === \"object\";\n}\n\n/**\n * Location of a field within a tree that is not a detached/root field.\n * @internal\n */\nexport interface FieldLocation {\n\treadonly key: FieldKey;\n\treadonly parent: ForestLocation;\n}\n"]}
1
+ {"version":3,"file":"editableForest.js","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D,+CAS0B;AAuB1B;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAC/B,MAAuB,EACvB,OAA0C,EAC1C,gBAAkC,EAClC,YAA2B;IAE3B,IAAA,iBAAM,EAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACzD,MAAM,KAAK,GAAc,IAAA,qCAA0B,EAAC,OAAO,CAAC,CAAC;IAC7D,IAAA,qBAAU,EAAC,KAAK,EAAE,MAAM,EAAE,IAAA,iCAAsB,EAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,CAAC,CAAC;AAC3F,CAAC;AATD,4CASC;AAkBD,SAAgB,eAAe,CAAC,KAAoC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AAClC,CAAC;AAFD,0CAEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { RevisionTagCodec } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\nimport {\n\ttype Anchor,\n\ttype DeltaRoot,\n\ttype DeltaVisitor,\n\ttype DetachedField,\n\ttype ITreeCursorSynchronous,\n\tapplyDelta,\n\tdeltaForRootInitialization,\n\tmakeDetachedFieldIndex,\n} from \"../tree/index.js\";\n\nimport type { IForestSubscription, ITreeSubscriptionCursor } from \"./forest.js\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\n/**\n * Editing APIs.\n * @internal\n */\nexport interface IEditableForest extends IForestSubscription {\n\t/**\n\t * Provides a visitor that can be used to mutate the forest.\n\t *\n\t * @returns a visitor that can be used to mutate the forest.\n\t *\n\t * @remarks\n\t * Mutating the forest does NOT update anchors.\n\t * The visitor must be released after use by calling {@link DeltaVisitor.free} on it.\n\t * It is invalid to acquire a visitor without releasing the previous one.\n\t */\n\tacquireVisitor(): DeltaVisitor;\n}\n\n/**\n * Sets the contents of the forest via delta.\n * Requires the fores starts empty.\n *\n * @remarks\n * This does not perform an edit: it updates the forest content as if there was an edit that did that.\n */\nexport function initializeForest(\n\tforest: IEditableForest,\n\tcontent: readonly ITreeCursorSynchronous[],\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n): void {\n\tassert(forest.isEmpty, 0x747 /* forest must be empty */);\n\tconst delta: DeltaRoot = deltaForRootInitialization(content);\n\tapplyDelta(delta, forest, makeDetachedFieldIndex(\"init\", revisionTagCodec, idCompressor));\n}\n\n// TODO: Types below here may be useful for input into edit building APIs, but are no longer used here directly.\n\n/**\n * Ways to refer to a node in an IEditableForest.\n * @internal\n */\nexport type ForestLocation = ITreeSubscriptionCursor | Anchor;\n\n/**\n * @internal\n */\nexport interface TreeLocation {\n\treadonly range: FieldLocation | DetachedField;\n\treadonly index: number;\n}\n\nexport function isFieldLocation(range: FieldLocation | DetachedField): range is FieldLocation {\n\treturn typeof range === \"object\";\n}\n\n/**\n * Location of a field within a tree that is not a detached/root field.\n * @internal\n */\nexport interface FieldLocation {\n\treadonly key: FieldKey;\n\treadonly parent: ForestLocation;\n}\n"]}
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { Listenable } from "../../events/index.js";
6
- import { FieldKey, TreeStoredSchemaSubscription } from "../schema-stored/index.js";
7
- import { Anchor, AnchorSet, DetachedField, ITreeCursor, ITreeCursorSynchronous, UpPath } from "../tree/index.js";
5
+ import type { Listenable } from "../../events/index.js";
6
+ import type { FieldKey, TreeStoredSchemaSubscription } from "../schema-stored/index.js";
7
+ import { type Anchor, type AnchorSet, type DetachedField, type ITreeCursor, type ITreeCursorSynchronous, type UpPath } from "../tree/index.js";
8
8
  import type { IEditableForest } from "./editableForest.js";
9
9
  /**
10
10
  * APIs for forest designed so the implementation can be copy on write,
@@ -1 +1 @@
1
- {"version":3,"file":"forest.d.ts","sourceRoot":"","sources":["../../../src/core/forest/forest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EACN,MAAM,EACN,SAAS,EACT,aAAa,EACb,WAAW,EACX,sBAAsB,EACtB,MAAM,EAGN,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,qBAAqB,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE3C;;;;;;;OAOG;IACH,YAAY,IAAI,IAAI,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,mBAAoB,SAAQ,UAAU,CAAC,YAAY,CAAC;IACpE;;;;;;;OAOG;IACH,QAAQ,CAAC,OAAO,EAAE,SAAS,CAAC;IAE5B;;;;OAIG;IACH,KAAK,CAAC,MAAM,EAAE,4BAA4B,EAAE,OAAO,EAAE,SAAS,GAAG,eAAe,CAAC;IAEjF;;;OAGG;IACH,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,uBAAuB,CAAC;IAEzD;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnC;;;OAGG;IACH,mBAAmB,CAClB,WAAW,EAAE,MAAM,EACnB,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EG;AACH,0BAAkB,oBAAoB;IACrC;;OAEG;IACH,QAAQ,KAAK;IAEb;;OAEG;IACH,OAAO,IAAI;IAEX;;OAEG;IACH,EAAE,IAAI;CACN;AAED;;;GAGG;AACH,MAAM,MAAM,2BAA2B,GAAG,oBAAoB,CAAC,EAAE,GAAG,oBAAoB,CAAC,QAAQ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"forest.js","sourceRoot":"","sources":["../../../src/core/forest/forest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D,+CAS0B;AAoH1B;;;GAGG;AACH,SAAgB,UAAU,CAAC,QAAuB,oBAAS;IAC1D,OAAO;QACN,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,IAAA,6BAAkB,EAAC,KAAK,CAAC;KACnC,CAAC;AACH,CAAC;AALD,gCAKC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAClC,MAA2B,EAC3B,YAAqC,EACrC,QAAuB,oBAAS;IAEhC,MAAM,MAAM,GAAG,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC;IAC5E,IAAA,iBAAM,EACL,MAAM,oCAA4B,EAClC,KAAK,CAAC,qDAAqD,CAC3D,CAAC;AACH,CAAC;AAVD,kDAUC;AAoED;;GAEG;AACH,IAAY,4BAaX;AAbD,WAAY,4BAA4B;IACvC;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,iFAAK,CAAA;AACN,CAAC,EAbW,4BAA4B,4CAA5B,4BAA4B,QAavC;AAED;;GAEG;AACH,IAAkB,oBAejB;AAfD,WAAkB,oBAAoB;IACrC;;OAEG;IACH,wEAAa,CAAA;IAEb;;OAEG;IACH,qEAAW,CAAA;IAEX;;OAEG;IACH,2DAAM,CAAA;AACP,CAAC,EAfiB,oBAAoB,oCAApB,oBAAoB,QAerC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport { Listenable } from \"../../events/index.js\";\nimport { FieldKey, TreeStoredSchemaSubscription } from \"../schema-stored/index.js\";\nimport {\n\tAnchor,\n\tAnchorSet,\n\tDetachedField,\n\tITreeCursor,\n\tITreeCursorSynchronous,\n\tUpPath,\n\tdetachedFieldAsKey,\n\trootField,\n} from \"../tree/index.js\";\n\nimport type { IEditableForest } from \"./editableForest.js\";\n\n/**\n * APIs for forest designed so the implementation can be copy on write,\n * or mutate in place, and we can ensure no references are dangling into the forest to allow this.\n *\n * This results in rather manual memory management,\n * but makes it practical to provide highly optimized implementations,\n * for example WASM powered binary formats that can track reference counts and only copy when needed.\n */\n\n/**\n * Events for {@link IForestSubscription}.\n *\n * TODO: consider having before and after events per subtree instead while applying anchor (and this just shows what happens at the root).\n * @internal\n */\nexport interface ForestEvents {\n\t/**\n\t * A new root field was just created in this forest.\n\t */\n\tafterRootFieldCreated(key: FieldKey): void;\n\n\t/**\n\t * The forest is about to be changed.\n\t * Emitted before each change in a batch of changes.\n\t * @remarks\n\t * This is the last chance for users of the forest to remove cursors from the forest before the edit.\n\t * Removing these cursors is important since they are not allowed to live across edits and\n\t * not clearing them can lead to corruption of in memory structures.\n\t */\n\tbeforeChange(): void;\n}\n\n/**\n * Invalidates whenever the tree content changes.\n * For now (might change later) downloading new parts of the forest counts as a change.\n * Not invalidated when schema changes.\n *\n * When invalidating, all outstanding cursors must be freed or cleared.\n * @internal\n */\nexport interface IForestSubscription extends Listenable<ForestEvents> {\n\t/**\n\t * Set of anchors this forest is tracking.\n\t *\n\t * To keep these anchors usable, this AnchorSet must be updated / rebased for any changes made to the forest.\n\t * It is the responsibility of the caller of the forest-editing methods to do this, not the forest itself.\n\t * The caller performs these updates because it has more semantic knowledge about the edits, which can be needed to\n\t * update the anchors in a semantically optimal way.\n\t */\n\treadonly anchors: AnchorSet;\n\n\t/**\n\t * Create an independent copy of this forest, that uses the provided schema and anchors.\n\t *\n\t * The new copy will not invalidate observers (dependents) of the old one.\n\t */\n\tclone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): IEditableForest;\n\n\t/**\n\t * Allocates a cursor in the \"cleared\" state.\n\t * @param source - optional string identifying the source of the cursor for debugging purposes when cursors are not properly cleaned up.\n\t */\n\tallocateCursor(source?: string): ITreeSubscriptionCursor;\n\n\t/**\n\t * Frees an Anchor, stopping tracking its position across edits.\n\t */\n\tforgetAnchor(anchor: Anchor): void;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * Set `cursorToMove` to location described by path.\n\t * This is NOT a relative move: current position is discarded.\n\t * Path must point to existing node.\n\t */\n\tmoveCursorToPath(destination: UpPath, cursorToMove: ITreeSubscriptionCursor): void;\n\n\t/**\n\t * The cursor is moved to a special dummy node above the detached fields.\n\t * This dummy node can be used to read the detached fields,\n\t * but other operations (such as inspecting the dummy node's type or path) should not be relied upon.\n\t * While this method does not return an {@link ITreeSubscriptionCursor}, similar restrictions apply to its use:\n\t * the returned cursor must not used after any edits are made to the forest.\n\t */\n\tgetCursorAboveDetachedFields(): ITreeCursorSynchronous;\n\n\t/**\n\t * True if there are no nodes in the forest at all.\n\t *\n\t * @remarks\n\t * This means no nodes under any detached field, not just the special document root one.\n\t */\n\treadonly isEmpty: boolean;\n}\n\n/**\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function rootAnchor(field: DetachedField = rootField): FieldAnchor {\n\treturn {\n\t\tparent: undefined,\n\t\tfieldKey: detachedFieldAsKey(field),\n\t};\n}\n\n/**\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function moveToDetachedField(\n\tforest: IForestSubscription,\n\tcursorToMove: ITreeSubscriptionCursor,\n\tfield: DetachedField = rootField,\n): void {\n\tconst result = forest.tryMoveCursorToField(rootAnchor(field), cursorToMove);\n\tassert(\n\t\tresult === TreeNavigationResult.Ok,\n\t\t0x42d /* Navigation to detached fields should never fail */,\n\t);\n}\n\n/**\n * Anchor to a field.\n * This is structurally based on the parent, so it will move only as the parent moves.\n * @internal\n */\nexport interface FieldAnchor {\n\t/**\n\t * Node above this field.\n\t * If `undefined`, field is a detached field.\n\t */\n\tparent: Anchor | undefined;\n\tfieldKey: FieldKey;\n}\n\n/**\n * ITreeCursor supporting IForestSubscription and its changes over time.\n * @internal\n */\nexport interface ITreeSubscriptionCursor extends ITreeCursor {\n\t/**\n\t * @param source - optional string identifying the source of the cursor for debugging purposes when cursors are not properly cleaned up.\n\t * @returns an independent copy of this cursor at the same location in the tree.\n\t */\n\tfork(source?: string): ITreeSubscriptionCursor;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` is forbidden (undefined behavior).\n\t */\n\tfree(): void;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` or passing to `tryGet`\n\t * or calling `free` is forbidden (undefined behavior).\n\t */\n\tclear(): void;\n\n\t/**\n\t * Construct an `Anchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Nodes`.\n\t */\n\tbuildAnchor(): Anchor;\n\n\t/**\n\t * Construct a `FieldAnchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Fields`.\n\t */\n\tbuildFieldAnchor(): FieldAnchor;\n\n\t/**\n\t * Current state.\n\t */\n\treadonly state: ITreeSubscriptionCursorState;\n\n\t/**\n\t * @returns location within parent field or range.\n\t */\n\t// TODO: maybe support this.\n\t// getParentInfo(id: NodeId): TreeLocation;\n}\n\n/**\n * @internal\n */\nexport enum ITreeSubscriptionCursorState {\n\t/**\n\t * On the current revision of the forest.\n\t */\n\tCurrent,\n\t/**\n\t * Empty, but can be reused.\n\t */\n\tCleared,\n\t/**\n\t * Freed and must not be used.\n\t */\n\tFreed,\n}\n\n/**\n * @internal\n */\nexport const enum TreeNavigationResult {\n\t/**\n\t * Attempt to navigate cursor to a key or index that is outside the client's view.\n\t */\n\tNotFound = -1,\n\n\t/**\n\t * Attempt to navigate cursor to a portion of the tree that has not yet been loaded.\n\t */\n\tPending = 0,\n\n\t/**\n\t * ITreeReader successfully navigated to the desired node.\n\t */\n\tOk = 1,\n}\n\n/**\n * TreeNavigationResult, but never \"Pending\".\n * Can be used when data is never pending.\n */\nexport type SynchronousNavigationResult = TreeNavigationResult.Ok | TreeNavigationResult.NotFound;\n"]}
1
+ {"version":3,"file":"forest.js","sourceRoot":"","sources":["../../../src/core/forest/forest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D,+CAS0B;AAoH1B;;;GAGG;AACH,SAAgB,UAAU,CAAC,QAAuB,oBAAS;IAC1D,OAAO;QACN,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,IAAA,6BAAkB,EAAC,KAAK,CAAC;KACnC,CAAC;AACH,CAAC;AALD,gCAKC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAClC,MAA2B,EAC3B,YAAqC,EACrC,QAAuB,oBAAS;IAEhC,MAAM,MAAM,GAAG,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC;IAC5E,IAAA,iBAAM,EACL,MAAM,oCAA4B,EAClC,KAAK,CAAC,qDAAqD,CAC3D,CAAC;AACH,CAAC;AAVD,kDAUC;AAoED;;GAEG;AACH,IAAY,4BAaX;AAbD,WAAY,4BAA4B;IACvC;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,iFAAK,CAAA;AACN,CAAC,EAbW,4BAA4B,4CAA5B,4BAA4B,QAavC;AAED;;GAEG;AACH,IAAkB,oBAejB;AAfD,WAAkB,oBAAoB;IACrC;;OAEG;IACH,wEAAa,CAAA;IAEb;;OAEG;IACH,qEAAW,CAAA;IAEX;;OAEG;IACH,2DAAM,CAAA;AACP,CAAC,EAfiB,oBAAoB,oCAApB,oBAAoB,QAerC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { Listenable } from \"../../events/index.js\";\nimport type { FieldKey, TreeStoredSchemaSubscription } from \"../schema-stored/index.js\";\nimport {\n\ttype Anchor,\n\ttype AnchorSet,\n\ttype DetachedField,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\ttype UpPath,\n\tdetachedFieldAsKey,\n\trootField,\n} from \"../tree/index.js\";\n\nimport type { IEditableForest } from \"./editableForest.js\";\n\n/**\n * APIs for forest designed so the implementation can be copy on write,\n * or mutate in place, and we can ensure no references are dangling into the forest to allow this.\n *\n * This results in rather manual memory management,\n * but makes it practical to provide highly optimized implementations,\n * for example WASM powered binary formats that can track reference counts and only copy when needed.\n */\n\n/**\n * Events for {@link IForestSubscription}.\n *\n * TODO: consider having before and after events per subtree instead while applying anchor (and this just shows what happens at the root).\n * @internal\n */\nexport interface ForestEvents {\n\t/**\n\t * A new root field was just created in this forest.\n\t */\n\tafterRootFieldCreated(key: FieldKey): void;\n\n\t/**\n\t * The forest is about to be changed.\n\t * Emitted before each change in a batch of changes.\n\t * @remarks\n\t * This is the last chance for users of the forest to remove cursors from the forest before the edit.\n\t * Removing these cursors is important since they are not allowed to live across edits and\n\t * not clearing them can lead to corruption of in memory structures.\n\t */\n\tbeforeChange(): void;\n}\n\n/**\n * Invalidates whenever the tree content changes.\n * For now (might change later) downloading new parts of the forest counts as a change.\n * Not invalidated when schema changes.\n *\n * When invalidating, all outstanding cursors must be freed or cleared.\n * @internal\n */\nexport interface IForestSubscription extends Listenable<ForestEvents> {\n\t/**\n\t * Set of anchors this forest is tracking.\n\t *\n\t * To keep these anchors usable, this AnchorSet must be updated / rebased for any changes made to the forest.\n\t * It is the responsibility of the caller of the forest-editing methods to do this, not the forest itself.\n\t * The caller performs these updates because it has more semantic knowledge about the edits, which can be needed to\n\t * update the anchors in a semantically optimal way.\n\t */\n\treadonly anchors: AnchorSet;\n\n\t/**\n\t * Create an independent copy of this forest, that uses the provided schema and anchors.\n\t *\n\t * The new copy will not invalidate observers (dependents) of the old one.\n\t */\n\tclone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): IEditableForest;\n\n\t/**\n\t * Allocates a cursor in the \"cleared\" state.\n\t * @param source - optional string identifying the source of the cursor for debugging purposes when cursors are not properly cleaned up.\n\t */\n\tallocateCursor(source?: string): ITreeSubscriptionCursor;\n\n\t/**\n\t * Frees an Anchor, stopping tracking its position across edits.\n\t */\n\tforgetAnchor(anchor: Anchor): void;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * Set `cursorToMove` to location described by path.\n\t * This is NOT a relative move: current position is discarded.\n\t * Path must point to existing node.\n\t */\n\tmoveCursorToPath(destination: UpPath, cursorToMove: ITreeSubscriptionCursor): void;\n\n\t/**\n\t * The cursor is moved to a special dummy node above the detached fields.\n\t * This dummy node can be used to read the detached fields,\n\t * but other operations (such as inspecting the dummy node's type or path) should not be relied upon.\n\t * While this method does not return an {@link ITreeSubscriptionCursor}, similar restrictions apply to its use:\n\t * the returned cursor must not used after any edits are made to the forest.\n\t */\n\tgetCursorAboveDetachedFields(): ITreeCursorSynchronous;\n\n\t/**\n\t * True if there are no nodes in the forest at all.\n\t *\n\t * @remarks\n\t * This means no nodes under any detached field, not just the special document root one.\n\t */\n\treadonly isEmpty: boolean;\n}\n\n/**\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function rootAnchor(field: DetachedField = rootField): FieldAnchor {\n\treturn {\n\t\tparent: undefined,\n\t\tfieldKey: detachedFieldAsKey(field),\n\t};\n}\n\n/**\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function moveToDetachedField(\n\tforest: IForestSubscription,\n\tcursorToMove: ITreeSubscriptionCursor,\n\tfield: DetachedField = rootField,\n): void {\n\tconst result = forest.tryMoveCursorToField(rootAnchor(field), cursorToMove);\n\tassert(\n\t\tresult === TreeNavigationResult.Ok,\n\t\t0x42d /* Navigation to detached fields should never fail */,\n\t);\n}\n\n/**\n * Anchor to a field.\n * This is structurally based on the parent, so it will move only as the parent moves.\n * @internal\n */\nexport interface FieldAnchor {\n\t/**\n\t * Node above this field.\n\t * If `undefined`, field is a detached field.\n\t */\n\tparent: Anchor | undefined;\n\tfieldKey: FieldKey;\n}\n\n/**\n * ITreeCursor supporting IForestSubscription and its changes over time.\n * @internal\n */\nexport interface ITreeSubscriptionCursor extends ITreeCursor {\n\t/**\n\t * @param source - optional string identifying the source of the cursor for debugging purposes when cursors are not properly cleaned up.\n\t * @returns an independent copy of this cursor at the same location in the tree.\n\t */\n\tfork(source?: string): ITreeSubscriptionCursor;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` is forbidden (undefined behavior).\n\t */\n\tfree(): void;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` or passing to `tryGet`\n\t * or calling `free` is forbidden (undefined behavior).\n\t */\n\tclear(): void;\n\n\t/**\n\t * Construct an `Anchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Nodes`.\n\t */\n\tbuildAnchor(): Anchor;\n\n\t/**\n\t * Construct a `FieldAnchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Fields`.\n\t */\n\tbuildFieldAnchor(): FieldAnchor;\n\n\t/**\n\t * Current state.\n\t */\n\treadonly state: ITreeSubscriptionCursorState;\n\n\t/**\n\t * @returns location within parent field or range.\n\t */\n\t// TODO: maybe support this.\n\t// getParentInfo(id: NodeId): TreeLocation;\n}\n\n/**\n * @internal\n */\nexport enum ITreeSubscriptionCursorState {\n\t/**\n\t * On the current revision of the forest.\n\t */\n\tCurrent,\n\t/**\n\t * Empty, but can be reused.\n\t */\n\tCleared,\n\t/**\n\t * Freed and must not be used.\n\t */\n\tFreed,\n}\n\n/**\n * @internal\n */\nexport const enum TreeNavigationResult {\n\t/**\n\t * Attempt to navigate cursor to a key or index that is outside the client's view.\n\t */\n\tNotFound = -1,\n\n\t/**\n\t * Attempt to navigate cursor to a portion of the tree that has not yet been loaded.\n\t */\n\tPending = 0,\n\n\t/**\n\t * ITreeReader successfully navigated to the desired node.\n\t */\n\tOk = 1,\n}\n\n/**\n * TreeNavigationResult, but never \"Pending\".\n * Can be used when data is never pending.\n */\nexport type SynchronousNavigationResult = TreeNavigationResult.Ok | TreeNavigationResult.NotFound;\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
- import { Invariant } from "../../util/index.js";
5
+ import type { Invariant } from "../../util/index.js";
6
6
  import type { RevisionTag } from "./types.js";
7
7
  /**
8
8
  * Rebasing logic for a particular kind of change.
@@ -1 +1 @@
1
- {"version":3,"file":"changeRebaser.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/changeRebaser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,WAAW,aAAa,CAAC,UAAU;IACxC,UAAU,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAEnC;;;OAGG;IACH,OAAO,CAAC,OAAO,EAAE,YAAY,CAAC,UAAU,CAAC,EAAE,GAAG,UAAU,CAAC;IAEzD;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,OAAO,EAAE,YAAY,CAAC,UAAU,CAAC,EAAE,UAAU,EAAE,OAAO,GAAG,UAAU,CAAC;IAE3E;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CACL,MAAM,EAAE,YAAY,CAAC,UAAU,CAAC,EAChC,IAAI,EAAE,YAAY,CAAC,UAAU,CAAC,EAC9B,gBAAgB,EAAE,sBAAsB,GACtC,UAAU,CAAC;IAEd,cAAc,CACb,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,WAAW,GAAG,SAAS,EACpC,UAAU,CAAC,EAAE,WAAW,GACtB,UAAU,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,UAAU,EAAE,IAAI,GAAG,WAAW,GAAG,SAAS;IACvE,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC;IAClC,QAAQ,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;AAuGH,SAAgB,eAAe,CAC9B,KAAwB,EACxB,MAAY;IAEZ,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC;AALD,0CAKC;AAoCD,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 { 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 [group](https://en.wikipedia.org/wiki/Group_(mathematics)) 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 * 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(changes: TaggedChange<TChangeset>, isRollback: boolean): 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\n/**\n * @internal\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 * @internal\n */\nexport type RevisionIndexer = (tag: RevisionTag) => number | undefined;\n\n/**\n * @internal\n */\nexport interface RevisionMetadataSource {\n\treadonly getIndex: RevisionIndexer;\n\treadonly tryGetInfo: (tag: RevisionTag | undefined) => RevisionInfo | undefined;\n\treadonly hasRollback: (tag: RevisionTag) => boolean;\n}\n\n/**\n * @internal\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;;;AAuGH,SAAgB,eAAe,CAC9B,KAAwB,EACxB,MAAY;IAEZ,OAAO,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,CAAC;AAC7B,CAAC;AALD,0CAKC;AAoCD,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 [group](https://en.wikipedia.org/wiki/Group_(mathematics)) 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 * 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(changes: TaggedChange<TChangeset>, isRollback: boolean): 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\n/**\n * @internal\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 * @internal\n */\nexport type RevisionIndexer = (tag: RevisionTag) => number | undefined;\n\n/**\n * @internal\n */\nexport interface RevisionMetadataSource {\n\treadonly getIndex: RevisionIndexer;\n\treadonly tryGetInfo: (tag: RevisionTag | undefined) => RevisionInfo | undefined;\n\treadonly hasRollback: (tag: RevisionTag) => boolean;\n}\n\n/**\n * @internal\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,10 +2,10 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { IIdCompressor, SessionId } from "@fluidframework/id-compressor";
6
- import { IJsonCodec } from "../../codec/index.js";
7
- import { ChangeEncodingContext } from "../change-family/index.js";
8
- import { EncodedRevisionTag, RevisionTag } from "./types.js";
5
+ import type { IIdCompressor, SessionId } from "@fluidframework/id-compressor";
6
+ import type { IJsonCodec } from "../../codec/index.js";
7
+ import type { ChangeEncodingContext } from "../change-family/index.js";
8
+ import type { EncodedRevisionTag, RevisionTag } from "./types.js";
9
9
  export declare class RevisionTagCodec implements IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext> {
10
10
  private readonly idCompressor;
11
11
  localSessionId: SessionId;
@@ -1 +1 @@
1
- {"version":3,"file":"revisionTagCodec.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/revisionTagCodec.ts"],"names":[],"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AAE,qBAAqB,GAAG,WAAW;CAQnF"}
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.RevisionTagCodec = void 0;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  class RevisionTagCodec {
10
- idCompressor;
11
- localSessionId;
12
10
  constructor(idCompressor) {
13
11
  this.idCompressor = idCompressor;
14
12
  this.localSessionId = idCompressor.localSessionId;
@@ -1 +1 @@
1
- {"version":3,"file":"revisionTagCodec.js","sourceRoot":"","sources":["../../../src/core/rebase/revisionTagCodec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAQ7D,MAAa,gBAAgB;IAMQ;IAF7B,cAAc,CAAY;IAEjC,YAAoC,YAA2B;QAA3B,iBAAY,GAAZ,YAAY,CAAe;QAC9D,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;IACnD,CAAC;IAEM,MAAM,CAAC,GAAgB;QAC7B,OAAO,GAAG,KAAK,MAAM;YACpB,CAAC,CAAC,GAAG;YACL,CAAC,CAAE,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,GAAG,CAAwB,CAAC;IACtE,CAAC;IACM,MAAM,CAAC,GAAuB,EAAE,OAA8B;QACpE,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;YACpB,OAAO,GAAG,CAAC;QACZ,CAAC;QAED,IAAA,iBAAM,EAAC,OAAO,GAAG,KAAK,QAAQ,EAAE,KAAK,CAAC,oDAAoD,CAAC,CAAC;QAC5F,OAAO,IAAI,CAAC,YAAY,CAAC,uBAAuB,CAAC,GAAG,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7E,CAAC;CACD;AAvBD,4CAuBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\n\nimport { IJsonCodec } from \"../../codec/index.js\";\nimport { ChangeEncodingContext } from \"../change-family/index.js\";\n\nimport { EncodedRevisionTag, RevisionTag } from \"./types.js\";\n\nexport class RevisionTagCodec\n\timplements\n\t\tIJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>\n{\n\tpublic localSessionId: SessionId;\n\n\tpublic constructor(private readonly idCompressor: IIdCompressor) {\n\t\tthis.localSessionId = idCompressor.localSessionId;\n\t}\n\n\tpublic encode(tag: RevisionTag): EncodedRevisionTag {\n\t\treturn tag === \"root\"\n\t\t\t? tag\n\t\t\t: (this.idCompressor.normalizeToOpSpace(tag) as EncodedRevisionTag);\n\t}\n\tpublic decode(tag: EncodedRevisionTag, context: ChangeEncodingContext): RevisionTag {\n\t\tif (tag === \"root\") {\n\t\t\treturn tag;\n\t\t}\n\n\t\tassert(typeof tag === \"number\", 0x88d /* String revision tag must be the literal 'root' */);\n\t\treturn this.idCompressor.normalizeToSessionSpace(tag, context.originatorId);\n\t}\n}\n"]}
1
+ {"version":3,"file":"revisionTagCodec.js","sourceRoot":"","sources":["../../../src/core/rebase/revisionTagCodec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAQ7D,MAAa,gBAAgB;IAM5B,YAAoC,YAA2B;QAA3B,iBAAY,GAAZ,YAAY,CAAe;QAC9D,IAAI,CAAC,cAAc,GAAG,YAAY,CAAC,cAAc,CAAC;IACnD,CAAC;IAEM,MAAM,CAAC,GAAgB;QAC7B,OAAO,GAAG,KAAK,MAAM;YACpB,CAAC,CAAC,GAAG;YACL,CAAC,CAAE,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,GAAG,CAAwB,CAAC;IACtE,CAAC;IACM,MAAM,CAAC,GAAuB,EAAE,OAA8B;QACpE,IAAI,GAAG,KAAK,MAAM,EAAE,CAAC;YACpB,OAAO,GAAG,CAAC;QACZ,CAAC;QAED,IAAA,iBAAM,EAAC,OAAO,GAAG,KAAK,QAAQ,EAAE,KAAK,CAAC,oDAAoD,CAAC,CAAC;QAC5F,OAAO,IAAI,CAAC,YAAY,CAAC,uBAAuB,CAAC,GAAG,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC7E,CAAC;CACD;AAvBD,4CAuBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\n\nimport type { IJsonCodec } from \"../../codec/index.js\";\nimport type { ChangeEncodingContext } from \"../change-family/index.js\";\n\nimport type { EncodedRevisionTag, RevisionTag } from \"./types.js\";\n\nexport class RevisionTagCodec\n\timplements\n\t\tIJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>\n{\n\tpublic localSessionId: SessionId;\n\n\tpublic constructor(private readonly idCompressor: IIdCompressor) {\n\t\tthis.localSessionId = idCompressor.localSessionId;\n\t}\n\n\tpublic encode(tag: RevisionTag): EncodedRevisionTag {\n\t\treturn tag === \"root\"\n\t\t\t? tag\n\t\t\t: (this.idCompressor.normalizeToOpSpace(tag) as EncodedRevisionTag);\n\t}\n\tpublic decode(tag: EncodedRevisionTag, context: ChangeEncodingContext): RevisionTag {\n\t\tif (tag === \"root\") {\n\t\t\treturn tag;\n\t\t}\n\n\t\tassert(typeof tag === \"number\", 0x88d /* String revision tag must be the literal 'root' */);\n\t\treturn this.idCompressor.normalizeToSessionSpace(tag, context.originatorId);\n\t}\n}\n"]}
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { OpSpaceCompressedId, SessionId, SessionSpaceCompressedId } from "@fluidframework/id-compressor";
6
- import { Brand, NestedMap, RangeMap } from "../../util/index.js";
7
- import { TaggedChange } from "./changeRebaser.js";
5
+ import type { OpSpaceCompressedId, SessionId, SessionSpaceCompressedId } from "@fluidframework/id-compressor";
6
+ import { type Brand, type NestedMap, type RangeMap } from "../../util/index.js";
7
+ import type { TaggedChange } from "./changeRebaser.js";
8
8
  /**
9
9
  * The identifier for a particular session/user/client that can generate `GraphCommit`s
10
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,mBAAmB,EACnB,SAAS,EACT,wBAAwB,EACxB,MAAM,+BAA+B,CAAC;AAGvC,OAAO,EACN,KAAK,EACL,SAAS,EACT,QAAQ,EAIR,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,eAAe,gDAAiC,CAAC;AAE9D;;;;;;;GAOG;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;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC5B;;;OAGG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC;IAChC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,gBAAgB,CAAC;CACnC;AAED,MAAM,MAAM,mBAAmB,GAAG,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,GAAG,gBAAgB,CAAC;AAE5F;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,SAAS,CAAC,WAAW,GAAG,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAEzF;;GAEG;AACH,MAAM,MAAM,oBAAoB,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under the MIT License.\n */\n\nimport {\n\tOpSpaceCompressedId,\n\tSessionId,\n\tSessionSpaceCompressedId,\n} from \"@fluidframework/id-compressor\";\nimport { Type } from \"@sinclair/typebox\";\n\nimport {\n\tBrand,\n\tNestedMap,\n\tRangeMap,\n\tbrand,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\nimport { TaggedChange } from \"./changeRebaser.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 * @internal\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\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 * @internal\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 * @internal\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\n/**\n * @internal\n */\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n * @internal\n */\nexport type ChangeAtomIdRangeMap<T> = Map<RevisionTag | undefined, RangeMap<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\n/**\n * @returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(localId: ChangesetLocalId, revision?: RevisionTag): 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(id: ChangeAtomId, revision: RevisionTag | undefined): 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\t/** The rollback of this commit */\n\trollback?: TaggedChange<TChange, RevisionTag>;\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. */\n\tDefault,\n\t/** A commit that is the result of an undo. */\n\tUndo,\n\t/** A commit that is the result of a redo. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @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 function replaceChange<TChange>(\n\tcommit: GraphCommit<TChange>,\n\tchange: TChange,\n): GraphCommit<TChange> {\n\tconst output = { ...commit, change };\n\tdelete output.rollback;\n\treturn output;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAOH,+CAAyC;AAEzC,kDAO6B;AAG7B;;GAEG;AACU,QAAA,eAAe,GAAG,IAAA,4BAAiB,GAAa,CAAC;AAYjD,QAAA,iBAAiB,GAAG,cAAI,CAAC,KAAK,CAAC;IAC3C,cAAI,CA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,EAAgB,EAChB,YAA0C,EAC1C,WAAoC;IAEpC,OAAO,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC/E,CAAC;AAND,oDAMC;AAED,SAAS,gBAAgB,CAAC,EAAgB,EAAE,QAAiC;IAC5E,MAAM,OAAO,GAAG,EAAE,GAAG,EAAE,EAAE,QAAQ,EAAE,CAAC;IACpC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,OAAO,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED,OAAO,OAAO,CAAC;AAChB,CAAC;AAgBD;;;;GAIG;AACH,IAAY,UAOX;AAPD,WAAY,UAAU;IACrB,iFAAiF;IACjF,iDAAO,CAAA;IACP,8CAA8C;IAC9C,2CAAI,CAAA;IACJ,6CAA6C;IAC7C,2CAAI,CAAA;AACL,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB;AAkBD;;;;;GAKG;AACH,6EAA6E;AAC7E,6CAA6C;AAC7C,SAAgB,UAAU,CACzB,MAA4B,EAC5B,MAA4C;IAE5C,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IACpC,OAAO;QACN,QAAQ;QACR,MAAM;QACN,MAAM;KACN,CAAC;AACH,CAAC;AAVD,gCAUC;AAED,SAAgB,aAAa,CAC5B,MAA4B,EAC5B,MAAe;IAEf,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,EAAE,MAAM,EAAE,CAAC;IACrC,OAAO,MAAM,CAAC,QAAQ,CAAC;IACvB,OAAO,MAAM,CAAC;AACf,CAAC;AAPD,sCAOC","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} from \"@fluidframework/id-compressor\";\nimport { Type } from \"@sinclair/typebox\";\n\nimport {\n\ttype Brand,\n\ttype NestedMap,\n\ttype RangeMap,\n\tbrand,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\nimport type { TaggedChange } from \"./changeRebaser.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 * @internal\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\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 * @internal\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 * @internal\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\n/**\n * @internal\n */\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n * @internal\n */\nexport type ChangeAtomIdRangeMap<T> = Map<RevisionTag | undefined, RangeMap<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\n/**\n * @returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(localId: ChangesetLocalId, revision?: RevisionTag): 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(id: ChangeAtomId, revision: RevisionTag | undefined): 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\t/** The rollback of this commit */\n\trollback?: TaggedChange<TChange, RevisionTag>;\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. */\n\tDefault,\n\t/** A commit that is the result of an undo. */\n\tUndo,\n\t/** A commit that is the result of a redo. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @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 function replaceChange<TChange>(\n\tcommit: GraphCommit<TChange>,\n\tchange: TChange,\n): GraphCommit<TChange> {\n\tconst output = { ...commit, change };\n\tdelete output.rollback;\n\treturn output;\n}\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
- import { ChangeRebaser, RevisionInfo, RevisionMetadataSource, TaggedChange } from "./changeRebaser.js";
6
- import { GraphCommit, RevisionTag } from "./types.js";
5
+ import { type ChangeRebaser, type RevisionInfo, type RevisionMetadataSource, type TaggedChange } from "./changeRebaser.js";
6
+ import { type GraphCommit, type RevisionTag } from "./types.js";
7
7
  /**
8
8
  * Contains information about how the commit graph changed as the result of rebasing a source branch onto another target branch.
9
9
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACN,aAAa,EACb,YAAY,EACZ,sBAAsB,EACtB,YAAY,EAKZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,WAAW,EAAc,MAAM,YAAY,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;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,UAAU,mBAAmB;IAC5B;;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,kBAAkB,CAAC,OAAO;IAC1C;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7C;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC;IAC1C;;OAEG;IACH,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;CAClD;AAED,UAAU,kBAAkB,CAAC,OAAO;IACnC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;C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AAC;YACf,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;YACf,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;QACd,CAAC;IACF,CAAC;IAED,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,CAAC;IACD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAlED,gDAkEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport { Mutable } from \"../../util/index.js\";\n\nimport {\n\tChangeRebaser,\n\tRevisionInfo,\n\tRevisionMetadataSource,\n\tTaggedChange,\n\tmakeAnonChange,\n\tmapTaggedChange,\n\ttagChange,\n\ttagRollbackInverse,\n} from \"./changeRebaser.js\";\nimport { GraphCommit, RevisionTag, mintCommit } from \"./types.js\";\n\n/**\n * Contains information about how the commit graph changed as the result of rebasing a source branch onto another target branch.\n * @remarks\n * ```text\n * Consider the commit graph below containing two branches, X and Y, with head commits C and E, respectively.\n * Branch Y branches off of Branch X at their common ancestor commit A, i.e. \"Y is based off of X at commit A\".\n *\n * A ─ B ─ C ← Branch X\n * └─ D ─ E ← Branch Y\n *\n * Branch Y is then rebased onto Branch X. This results in the following commit graph:\n *\n * A ─ B ─ C ← Branch X\n * └─ D'─ E'← Branch Y\n *\n * Commits D' and E' are the rebased versions of commits D and E, respectively. This results in:\n * deletedSourceCommits: [D, E],\n * targetCommits: [B, C],\n * sourceCommits: [D', E']\n * ```\n */\nexport interface RebasedCommits<TChange> {\n\t/**\n\t * The commits on the original source branch that were rebased. These are no longer referenced by the source branch and have\n\t * been replaced with new versions on the new source branch, see {@link sourceCommits}. In the case that the source\n\t * branch was already ahead of the target branch before the rebase, this list will be empty.\n\t */\n\tdeletedSourceCommits: GraphCommit<TChange>[];\n\t/**\n\t * All commits on the target branch that the source branch's commits were rebased over. These are now the direct\n\t * ancestors of {@link sourceCommits}. In the case that the source branch was already ahead of the target branch\n\t * before the rebase, this list will be empty.\n\t */\n\ttargetCommits: GraphCommit<TChange>[];\n\t/**\n\t * All commits on the source branch that are not also on the target branch after the rebase operation. In the case that the\n\t * source branch was already ahead of the target branch before the rebase, these are the same commits that were already on\n\t * the source branch before the rebase, otherwise these are the new, rebased versions of {@link deletedSourceCommits}.\n\t */\n\tsourceCommits: GraphCommit<TChange>[];\n}\n\ninterface TelemetryProperties {\n\t/**\n\t * The length of the source branch before the rebase.\n\t */\n\treadonly sourceBranchLength: number;\n\t/**\n\t * Number of commits rebased over on the target branch.\n\t */\n\treadonly rebaseDistance: number;\n\t/**\n\t * The number of commits that are dropped from the source branch when rebased to the target branch.\n\t */\n\treadonly countDropped: number;\n}\n\nexport interface BranchRebaseResult<TChange> {\n\t/**\n\t * The head of a rebased source branch.\n\t */\n\treadonly newSourceHead: GraphCommit<TChange>;\n\t/**\n\t * A thunk that computes the cumulative change to the source branch (undefined if no change occurred)\n\t */\n\treadonly sourceChange: TChange | undefined;\n\t/**\n\t * Details about how the commits on the source branch changed\n\t */\n\treadonly commits: RebasedCommits<TChange>;\n\t/**\n\t * Telemetry properties for the rebase operation.\n\t */\n\treadonly telemetryProperties: TelemetryProperties;\n}\n\ninterface RebaseChangeResult<TChange> {\n\treadonly change: TChange;\n\t/**\n\t * Telemetry properties for the rebase operation.\n\t */\n\treadonly telemetryProperties: TelemetryProperties;\n}\n\n/**\n * Rebases a source branch onto another commit in a target branch.\n *\n * A \"branch\" is defined as a \"head\" commit and all ancestors of that commit, i.e. one linked list in a graph of commits.\n *\n * The source and target branch must share an ancestor.\n * @param changeRebaser - the change rebaser responsible for rebasing the changes in the commits of each branch\n * @param sourceHead - the head of the source branch, which will be rebased onto `targetHead`\n * @param targetHead - the commit to rebase the source branch onto\n * @returns a {@link BranchRebaseResult}\n * @remarks While a single branch must not have multiple commits with the same revision tag (that will result in undefined\n * behavior), there may be a commit on the source branch with the same revision tag as a commit on the target branch. If such\n * a pair is encountered while rebasing, it will be \"cancelled out\" in the new branch. For example:\n * ```\n * // (A)-(B)-(C) <- Branch X\n * // \\\n * // (B')-(D) <- Branch Y\n * //\n * // As Branch Y is rebased onto Branch X, commits B and B' cancel out so there is no version of B on the new rebased source branch\n * //\n * // (A)-(B)-(C) <- Branch X\n * // \\\n * // (D') <- Branch Y'\n * //\n * ```\n */\nexport function rebaseBranch<TChange>(\n\tmintRevisionTag: () => RevisionTag,\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tsourceHead: GraphCommit<TChange>,\n\ttargetHead: GraphCommit<TChange>,\n): BranchRebaseResult<TChange>;\n\n/**\n * Rebases a source branch onto another commit in a target branch.\n *\n * A \"branch\" is defined as a \"head\" commit and all ancestors of that commit, i.e. one linked list in a graph of commits.\n *\n * The source and target branch must share an ancestor.\n * @param changeRebaser - the change rebaser responsible for rebasing the changes in the commits of each branch\n * @param sourceHead - the head of the source branch, which will be rebased onto `newBase`\n * @param targetCommit - the commit on the target branch to rebase the source branch onto.\n * @param targetHead - the head of the branch that `newBase` belongs to. Must be `newBase` or a descendent of `newBase`.\n * @returns a {@link BranchRebaseResult}\n * @remarks While a single branch must not have multiple commits with the same revision tag (that will result in undefined\n * behavior), there may be a commit on the source branch with the same revision tag as a commit on the target branch. If such\n * a pair is encountered while rebasing, it will be \"cancelled out\" in the new branch. Additionally, this function will rebase\n * the source branch _farther_ than `newBase` if the source branch's next commits after `newBase` match those on the target branch.\n * For example:\n * ```\n * // (A)-(B)-(C)-(D)-(E) <- Branch X\n * // \\\n * // (B')-(D')-(F) <- Branch Y\n * //\n * // If Branch Y is rebased onto commit C of Branch X, the branches must at least look like this afterwards (B was cancelled out):\n * //\n * // (A)-(B)-(C)-(D)-(E) <- Branch X\n * // \\\n * // (D'')-(F') <- Branch Y'\n * //\n * // But this function will recognize that B is equivalent to B' and D is equivalent to D', and instead produce:\n * //\n * // (A)-(B)-(C)-(D)-(E) <- Branch X\n * // \\\n * // (F') <- Branch Y'\n * ```\n */\nexport function rebaseBranch<TChange>(\n\tmintRevisionTag: () => RevisionTag,\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tsourceHead: GraphCommit<TChange>,\n\ttargetCommit: GraphCommit<TChange>,\n\ttargetHead: GraphCommit<TChange>,\n): BranchRebaseResult<TChange>;\nexport function rebaseBranch<TChange>(\n\tmintRevisionTag: () => RevisionTag,\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tsourceHead: GraphCommit<TChange>,\n\ttargetCommit: GraphCommit<TChange>,\n\ttargetHead = targetCommit,\n): BranchRebaseResult<TChange> {\n\t// Get both source and target as path arrays\n\tconst sourcePath: GraphCommit<TChange>[] = [];\n\tconst targetPath: GraphCommit<TChange>[] = [];\n\tconst ancestor = findCommonAncestor([sourceHead, sourcePath], [targetHead, targetPath]);\n\tassert(ancestor !== undefined, 0x675 /* branches must be related */);\n\n\tconst sourceBranchLength = sourcePath.length;\n\n\t// Find where `targetCommit` is in the target branch\n\tconst targetCommitIndex = targetPath.findIndex((r) => r === targetCommit);\n\tif (targetCommitIndex === -1) {\n\t\t// If the targetCommit is not in the target path, then it is either disjoint from `target` or it is behind/at\n\t\t// the commit where source and target diverge (ancestor), in which case there is nothing more to rebase\n\t\t// TODO: Ideally, this would be an \"assertExpensive\"\n\t\tassert(\n\t\t\tfindCommonAncestor(targetCommit, targetHead) !== undefined,\n\t\t\t0x676 /* target commit is not in target branch */,\n\t\t);\n\t\treturn {\n\t\t\tnewSourceHead: sourceHead,\n\t\t\tsourceChange: undefined,\n\t\t\tcommits: { deletedSourceCommits: [], targetCommits: [], sourceCommits: sourcePath },\n\t\t\ttelemetryProperties: {\n\t\t\t\tsourceBranchLength,\n\t\t\t\trebaseDistance: targetCommitIndex + 1,\n\t\t\t\tcountDropped: 0,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Iterate through the target path and look for commits that are also present on the source branch (i.e. they\n\t// have matching tags). Each commit found in the target branch can be skipped when processing the source branch\n\t// because it has already been rebased onto the target. In the case that one or more of these commits are present\n\t// directly after `targetCommit`, then the new base can be advanced further without having to do any work.\n\tconst sourceSet = new Set(sourcePath.map((r) => r.revision));\n\tlet newBaseIndex = targetCommitIndex;\n\n\tfor (let i = 0; i < targetPath.length; i += 1) {\n\t\tconst { revision } = targetPath[i];\n\t\tif (sourceSet.has(revision)) {\n\t\t\tsourceSet.delete(revision);\n\t\t\tnewBaseIndex = Math.max(newBaseIndex, i);\n\t\t} else if (i > targetCommitIndex) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t/** The commit on the target branch that the new source branch branches off of (i.e. the new common ancestor) */\n\tconst newBase = targetPath[newBaseIndex];\n\t// Figure out how much of the trunk to start rebasing over.\n\tconst targetCommits = targetPath.slice(0, newBaseIndex + 1);\n\tconst deletedSourceCommits = [...sourcePath];\n\n\t// If the source and target rebase path begin with a range that has all the same revisions, remove it; it is\n\t// equivalent on both branches and doesn't need to be rebased.\n\tconst targetRebasePath = [...targetCommits];\n\tconst minLength = Math.min(sourcePath.length, targetRebasePath.length);\n\tfor (let i = 0; i < minLength; i++) {\n\t\tif (sourcePath[0].revision === targetRebasePath[0].revision) {\n\t\t\tsourcePath.shift();\n\t\t\ttargetRebasePath.shift();\n\t\t}\n\t}\n\n\tconst sourceCommits: GraphCommit<TChange>[] = [];\n\n\t// If all commits that are about to be rebased over on the target branch already comprise the start of the source branch,\n\t// are in the same order, and have no other commits interleaving them, then no rebasing needs to occur. Those commits can\n\t// simply be removed from the source branch, and the remaining commits on the source branch are reparented off of the new\n\t// base commit.\n\tif (targetRebasePath.length === 0) {\n\t\tfor (const c of sourcePath) {\n\t\t\tsourceCommits.push(mintCommit(sourceCommits[sourceCommits.length - 1] ?? newBase, c));\n\t\t}\n\t\treturn {\n\t\t\tnewSourceHead: sourceCommits[sourceCommits.length - 1] ?? newBase,\n\t\t\tsourceChange: undefined,\n\t\t\tcommits: {\n\t\t\t\tdeletedSourceCommits,\n\t\t\t\ttargetCommits,\n\t\t\t\tsourceCommits,\n\t\t\t},\n\t\t\ttelemetryProperties: {\n\t\t\t\tsourceBranchLength,\n\t\t\t\trebaseDistance: targetCommits.length,\n\t\t\t\tcountDropped: sourceBranchLength - sourceSet.size,\n\t\t\t},\n\t\t};\n\t}\n\n\t// For each source commit, rebase backwards over the inverses of any commits already rebased, and then\n\t// rebase forwards over the rest of the commits up to the new base before advancing the new base.\n\tlet newHead = newBase;\n\tconst revInfos = getRevInfoFromTaggedChanges([...targetRebasePath, ...sourcePath]);\n\t// Note that the `revisionMetadata` gets updated as `revInfos` gets updated.\n\tconst revisionMetadata = revisionMetadataSourceFromInfo(revInfos);\n\tlet editsToCompose: TaggedChange<TChange>[] = targetRebasePath.slice();\n\tfor (const c of sourcePath) {\n\t\tconst rollback = rollbackFromCommit(changeRebaser, c, mintRevisionTag, false);\n\t\tif (sourceSet.has(c.revision)) {\n\t\t\tconst currentComposedEdit = makeAnonChange(changeRebaser.compose(editsToCompose));\n\t\t\teditsToCompose = [currentComposedEdit];\n\t\t\tconst change = changeRebaser.rebase(c, currentComposedEdit, revisionMetadata);\n\t\t\tnewHead = {\n\t\t\t\trevision: c.revision,\n\t\t\t\tchange,\n\t\t\t\tparent: newHead,\n\t\t\t};\n\t\t\tsourceCommits.push(newHead);\n\t\t\teditsToCompose.push(tagChange(change, c.revision));\n\t\t}\n\t\trevInfos.push({ revision: c.revision });\n\t\teditsToCompose.unshift(rollback);\n\t\trevInfos.unshift({ revision: rollback.revision, rollbackOf: rollback.rollbackOf });\n\t}\n\n\tlet netChange: TChange | undefined;\n\treturn {\n\t\tnewSourceHead: newHead,\n\t\tget sourceChange(): TChange | undefined {\n\t\t\tif (netChange === undefined) {\n\t\t\t\tnetChange = changeRebaser.compose(editsToCompose);\n\t\t\t}\n\t\t\treturn netChange;\n\t\t},\n\t\tcommits: {\n\t\t\tdeletedSourceCommits,\n\t\t\ttargetCommits,\n\t\t\tsourceCommits,\n\t\t},\n\t\ttelemetryProperties: {\n\t\t\tsourceBranchLength,\n\t\t\trebaseDistance: targetCommits.length,\n\t\t\tcountDropped: sourceBranchLength - sourceSet.size,\n\t\t},\n\t};\n}\n\n/**\n * \"Sandwich/Horseshoe Rebase\" a change over the given source and target branches\n * @param changeRebaser - the change rebaser responsible for rebasing the change over the commits in each branch\n * @param change - the change to rebase\n * @param sourceHead - the head of the branch that `change` is based on\n * @param targetHead - the branch to rebase `change` onto\n * @returns the rebased change\n *\n * @remarks inverses will be cached.\n */\nexport function rebaseChange<TChange>(\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tchange: TaggedChange<TChange>,\n\tsourceHead: GraphCommit<TChange>,\n\ttargetHead: GraphCommit<TChange>,\n\tmintRevisionTag: () => RevisionTag,\n): RebaseChangeResult<TChange> {\n\tconst sourcePath: GraphCommit<TChange>[] = [];\n\tconst targetPath: GraphCommit<TChange>[] = [];\n\tassert(\n\t\tfindCommonAncestor([sourceHead, sourcePath], [targetHead, targetPath]) !== undefined,\n\t\t0x576 /* branch A and branch B must be related */,\n\t);\n\n\tconst inverses = sourcePath.map((commit) =>\n\t\trollbackFromCommit(changeRebaser, commit, mintRevisionTag, true),\n\t);\n\tinverses.reverse();\n\n\tconst telemetryProperties = {\n\t\tsourceBranchLength: 1,\n\t\trebaseDistance: sourcePath.length + targetPath.length,\n\t\tcountDropped: 0,\n\t};\n\n\treturn {\n\t\tchange: rebaseChangeOverChanges(changeRebaser, change, [...inverses, ...targetPath]),\n\t\ttelemetryProperties,\n\t};\n}\n\n/**\n * @internal\n */\nexport function revisionMetadataSourceFromInfo(\n\trevInfos: readonly RevisionInfo[],\n): RevisionMetadataSource {\n\tconst getIndex = (revision: RevisionTag): number | undefined => {\n\t\tconst index = revInfos.findIndex((revInfo) => revInfo.revision === revision);\n\t\treturn index >= 0 ? index : undefined;\n\t};\n\tconst tryGetInfo = (revision: RevisionTag | undefined): RevisionInfo | undefined => {\n\t\tif (revision === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst index = getIndex(revision);\n\t\treturn index === undefined ? undefined : revInfos[index];\n\t};\n\n\tconst hasRollback = (revision: RevisionTag): boolean => {\n\t\treturn revInfos.find((info) => info.rollbackOf === revision) !== undefined;\n\t};\n\n\treturn { getIndex, tryGetInfo, hasRollback };\n}\n\nexport function rebaseChangeOverChanges<TChange>(\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tchangeToRebase: TaggedChange<TChange>,\n\tchangesToRebaseOver: TaggedChange<TChange>[],\n): TChange {\n\tconst revisionMetadata = revisionMetadataSourceFromInfo(\n\t\tgetRevInfoFromTaggedChanges([...changesToRebaseOver, changeToRebase]),\n\t);\n\n\treturn changesToRebaseOver.reduce(\n\t\t(a, b) => mapTaggedChange(changeToRebase, changeRebaser.rebase(a, b, revisionMetadata)),\n\t\tchangeToRebase,\n\t).change;\n}\n\n// TODO: Deduplicate\nfunction getRevInfoFromTaggedChanges(changes: TaggedChange<unknown>[]): RevisionInfo[] {\n\tconst revInfos: RevisionInfo[] = [];\n\tfor (const taggedChange of changes) {\n\t\trevInfos.push(...revisionInfoFromTaggedChange(taggedChange));\n\t}\n\n\treturn revInfos;\n}\n\n// TODO: Deduplicate\nfunction revisionInfoFromTaggedChange(taggedChange: TaggedChange<unknown>): RevisionInfo[] {\n\tconst revInfos: RevisionInfo[] = [];\n\tif (taggedChange.revision !== undefined) {\n\t\tconst info: Mutable<RevisionInfo> = { revision: taggedChange.revision };\n\t\tif (taggedChange.rollbackOf !== undefined) {\n\t\t\tinfo.rollbackOf = taggedChange.rollbackOf;\n\t\t}\n\t\trevInfos.push(info);\n\t}\n\treturn revInfos;\n}\n\nfunction rollbackFromCommit<TChange>(\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tcommit: GraphCommit<TChange>,\n\tmintRevisionTag: () => RevisionTag,\n\tcache?: boolean,\n): TaggedChange<TChange, RevisionTag> {\n\tif (commit.rollback !== undefined) {\n\t\treturn commit.rollback;\n\t}\n\tconst untagged = changeRebaser.invert(commit, true);\n\tconst tag = mintRevisionTag();\n\tconst deeplyTaggedRollback = changeRebaser.changeRevision(untagged, tag, commit.revision);\n\tconst fullyTaggedRollback = tagRollbackInverse(deeplyTaggedRollback, tag, commit.revision);\n\n\tif (cache === true) {\n\t\tcommit.rollback = fullyTaggedRollback;\n\t}\n\treturn fullyTaggedRollback;\n}\n\n/**\n * Find the furthest ancestor of some descendant.\n * @param descendant - a descendant. If an empty `path` array is included, it will be populated\n * with the chain of ancestry for `descendant` from most distant to closest (not including the furthest ancestor,\n * but otherwise including `descendant`).\n * @returns the furthest ancestor of `descendant`, or `descendant` itself if `descendant` has no ancestors.\n */\nexport function findAncestor<T extends { parent?: T }>(\n\tdescendant: T | [descendant: T, path?: T[]],\n): T;\n/**\n * Find the furthest ancestor of some descendant.\n * @param descendant - a descendant. If an empty `path` array is included, it will be populated\n * with the chain of ancestry for `descendant` from most distant to closest (not including the furthest ancestor,\n * but otherwise including `descendant`).\n * @returns the furthest ancestor of `descendant`, or `descendant` itself if `descendant` has no ancestors. Returns\n * `undefined` if `descendant` is undefined.\n */\nexport function findAncestor<T extends { parent?: T }>(\n\tdescendant: T | [descendant: T | undefined, path?: T[]] | undefined,\n): T | undefined;\n/**\n * Find an ancestor of some descendant.\n * @param descendant - a descendant. If an empty `path` array is included, it will be populated\n * with the chain of ancestry for `descendant` from most distant to closest (not including the ancestor found by `predicate`,\n * but otherwise including `descendant`).\n * @param predicate - a function which will be evaluated on every ancestor of `descendant` until it returns true.\n * @returns the closest ancestor of `descendant` that satisfies `predicate`, or `undefined` if no such ancestor exists.\n *\n * @example\n *\n * ```typescript\n * interface Parented {\n * id: string;\n * parent?: Parented;\n * }\n * const g = { id: \"g\" }; // Grandparent\n * const p = { parent: g, id: \"p\" }; // Parent\n * const c = { parent: p, id: \"c\" }; // Child\n * const path: Parented[] = [];\n * const ancestor = findAncestor<Parented>([c, path], (n) => n.id === \"g\");\n * // ancestor === g\n * // path === [p, c]\n * ```\n */\nexport function findAncestor<T extends { parent?: T }>(\n\tdescendant: T | [descendant: T | undefined, path?: T[]] | undefined,\n\tpredicate: (t: T) => boolean,\n): T | undefined;\nexport function findAncestor<T extends { parent?: T }>(\n\tdescendant: T | [descendant: T | undefined, path?: T[]] | undefined,\n\tpredicate: (t: T) => boolean = (t): boolean => t.parent === undefined,\n): T | undefined {\n\tlet d: T | undefined;\n\tlet path: T[] | undefined;\n\tif (Array.isArray(descendant)) {\n\t\t[d, path] = descendant;\n\t} else {\n\t\td = descendant;\n\t}\n\tfor (let cur = d; cur !== undefined; cur = cur.parent) {\n\t\tif (predicate(cur)) {\n\t\t\tpath?.reverse();\n\t\t\treturn cur;\n\t\t}\n\t\tpath?.push(cur);\n\t}\n\n\tif (path !== undefined) {\n\t\tpath.length = 0;\n\t}\n\treturn undefined;\n}\n\n/**\n * Find a common ancestor between two descendants that are linked by parent pointers.\n * @param descendantA - a descendant. If an empty `path` array is included, it will be populated\n * with the chain of commits from the ancestor to `descendantA` (not including the ancestor).\n * @param descendantB - another descendant. If an empty `path` array is included, it will be populated\n * with the chain of commits from the ancestor to `descendantB` (not including the ancestor).\n * @returns the common ancestor of `descendantA` and `descendantB`, or `undefined` if no such ancestor exists.\n *\n * @example\n *\n * ```typescript\n * interface Parented {\n * parent?: Parented;\n * }\n * const shared = {};\n * const a = { parent: shared };\n * const b1 = { parent: shared };\n * const b2 = { parent: b1 };\n * const pathB: Parented[] = []\n * const ancestor = findCommonAncestor<Parented>(a, [b2, pathB]);\n * // ancestor === shared\n * // pathB === [b1, b2]\n * ```\n */\nexport function findCommonAncestor<T extends { parent?: T }>(\n\tdescendantA: T | [descendantA: T, path?: T[]] | undefined,\n\tdescendantB: T | [descendantB: T, path?: T[]] | undefined,\n): T | undefined {\n\tlet a: T | undefined;\n\tlet b: T | undefined;\n\tlet pathA: T[] | undefined;\n\tlet pathB: T[] | undefined;\n\tif (Array.isArray(descendantA)) {\n\t\t[a, pathA] = descendantA;\n\t\tassert(pathA === undefined || pathA.length === 0, 0x578 /* Path A must be empty */);\n\t} else {\n\t\ta = descendantA;\n\t}\n\tif (Array.isArray(descendantB)) {\n\t\t[b, pathB] = descendantB;\n\t\tassert(pathB === undefined || pathB.length === 0, 0x579 /* Path B must be empty */);\n\t} else {\n\t\tb = descendantB;\n\t}\n\n\tif (a === b) {\n\t\treturn a;\n\t}\n\n\tconst reversePaths = (): void => {\n\t\tpathA?.reverse();\n\t\tpathB?.reverse();\n\t};\n\n\tconst visited = new Set();\n\twhile (a !== undefined || b !== undefined) {\n\t\tif (a !== undefined) {\n\t\t\tif (visited.has(a)) {\n\t\t\t\tif (pathB !== undefined) {\n\t\t\t\t\tpathB.length = pathB.findIndex((r) => Object.is(r, a));\n\t\t\t\t}\n\t\t\t\treversePaths();\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\tvisited.add(a);\n\t\t\tpathA?.push(a);\n\t\t\ta = a.parent;\n\t\t}\n\n\t\tif (b !== undefined) {\n\t\t\tif (visited.has(b)) {\n\t\t\t\tif (pathA !== undefined) {\n\t\t\t\t\tpathA.length = pathA.findIndex((r) => Object.is(r, b));\n\t\t\t\t}\n\t\t\t\treversePaths();\n\t\t\t\treturn b;\n\t\t\t}\n\t\t\tvisited.add(b);\n\t\t\tpathB?.push(b);\n\t\t\tb = b.parent;\n\t\t}\n\t}\n\n\tif (pathA !== undefined) {\n\t\tpathA.length = 0;\n\t}\n\tif (pathB !== undefined) {\n\t\tpathB.length = 0;\n\t}\n\treturn undefined;\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/core/rebase/utils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D,yDAS4B;AAC5B,yCAA4E;AAgK5E,SAAgB,YAAY,CAC3B,eAAkC,EAClC,aAAqC,EACrC,UAAgC,EAChC,YAAkC,EAClC,UAAU,GAAG,YAAY;IAEzB,4CAA4C;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CAAC;YACf,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;YACf,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC;QACd,CAAC;IACF,CAAC;IAED,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,CAAC;IACD,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IAClB,CAAC;IACD,OAAO,SAAS,CAAC;AAClB,CAAC;AAlED,gDAkEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { Mutable } from \"../../util/index.js\";\n\nimport {\n\ttype ChangeRebaser,\n\ttype RevisionInfo,\n\ttype RevisionMetadataSource,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\tmapTaggedChange,\n\ttagChange,\n\ttagRollbackInverse,\n} from \"./changeRebaser.js\";\nimport { type GraphCommit, type RevisionTag, mintCommit } from \"./types.js\";\n\n/**\n * Contains information about how the commit graph changed as the result of rebasing a source branch onto another target branch.\n * @remarks\n * ```text\n * Consider the commit graph below containing two branches, X and Y, with head commits C and E, respectively.\n * Branch Y branches off of Branch X at their common ancestor commit A, i.e. \"Y is based off of X at commit A\".\n *\n * A ─ B ─ C ← Branch X\n * └─ D ─ E ← Branch Y\n *\n * Branch Y is then rebased onto Branch X. This results in the following commit graph:\n *\n * A ─ B ─ C ← Branch X\n * └─ D'─ E'← Branch Y\n *\n * Commits D' and E' are the rebased versions of commits D and E, respectively. This results in:\n * deletedSourceCommits: [D, E],\n * targetCommits: [B, C],\n * sourceCommits: [D', E']\n * ```\n */\nexport interface RebasedCommits<TChange> {\n\t/**\n\t * The commits on the original source branch that were rebased. These are no longer referenced by the source branch and have\n\t * been replaced with new versions on the new source branch, see {@link sourceCommits}. In the case that the source\n\t * branch was already ahead of the target branch before the rebase, this list will be empty.\n\t */\n\tdeletedSourceCommits: GraphCommit<TChange>[];\n\t/**\n\t * All commits on the target branch that the source branch's commits were rebased over. These are now the direct\n\t * ancestors of {@link sourceCommits}. In the case that the source branch was already ahead of the target branch\n\t * before the rebase, this list will be empty.\n\t */\n\ttargetCommits: GraphCommit<TChange>[];\n\t/**\n\t * All commits on the source branch that are not also on the target branch after the rebase operation. In the case that the\n\t * source branch was already ahead of the target branch before the rebase, these are the same commits that were already on\n\t * the source branch before the rebase, otherwise these are the new, rebased versions of {@link deletedSourceCommits}.\n\t */\n\tsourceCommits: GraphCommit<TChange>[];\n}\n\ninterface TelemetryProperties {\n\t/**\n\t * The length of the source branch before the rebase.\n\t */\n\treadonly sourceBranchLength: number;\n\t/**\n\t * Number of commits rebased over on the target branch.\n\t */\n\treadonly rebaseDistance: number;\n\t/**\n\t * The number of commits that are dropped from the source branch when rebased to the target branch.\n\t */\n\treadonly countDropped: number;\n}\n\nexport interface BranchRebaseResult<TChange> {\n\t/**\n\t * The head of a rebased source branch.\n\t */\n\treadonly newSourceHead: GraphCommit<TChange>;\n\t/**\n\t * A thunk that computes the cumulative change to the source branch (undefined if no change occurred)\n\t */\n\treadonly sourceChange: TChange | undefined;\n\t/**\n\t * Details about how the commits on the source branch changed\n\t */\n\treadonly commits: RebasedCommits<TChange>;\n\t/**\n\t * Telemetry properties for the rebase operation.\n\t */\n\treadonly telemetryProperties: TelemetryProperties;\n}\n\ninterface RebaseChangeResult<TChange> {\n\treadonly change: TChange;\n\t/**\n\t * Telemetry properties for the rebase operation.\n\t */\n\treadonly telemetryProperties: TelemetryProperties;\n}\n\n/**\n * Rebases a source branch onto another commit in a target branch.\n *\n * A \"branch\" is defined as a \"head\" commit and all ancestors of that commit, i.e. one linked list in a graph of commits.\n *\n * The source and target branch must share an ancestor.\n * @param changeRebaser - the change rebaser responsible for rebasing the changes in the commits of each branch\n * @param sourceHead - the head of the source branch, which will be rebased onto `targetHead`\n * @param targetHead - the commit to rebase the source branch onto\n * @returns a {@link BranchRebaseResult}\n * @remarks While a single branch must not have multiple commits with the same revision tag (that will result in undefined\n * behavior), there may be a commit on the source branch with the same revision tag as a commit on the target branch. If such\n * a pair is encountered while rebasing, it will be \"cancelled out\" in the new branch. For example:\n * ```\n * // (A)-(B)-(C) <- Branch X\n * // \\\n * // (B')-(D) <- Branch Y\n * //\n * // As Branch Y is rebased onto Branch X, commits B and B' cancel out so there is no version of B on the new rebased source branch\n * //\n * // (A)-(B)-(C) <- Branch X\n * // \\\n * // (D') <- Branch Y'\n * //\n * ```\n */\nexport function rebaseBranch<TChange>(\n\tmintRevisionTag: () => RevisionTag,\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tsourceHead: GraphCommit<TChange>,\n\ttargetHead: GraphCommit<TChange>,\n): BranchRebaseResult<TChange>;\n\n/**\n * Rebases a source branch onto another commit in a target branch.\n *\n * A \"branch\" is defined as a \"head\" commit and all ancestors of that commit, i.e. one linked list in a graph of commits.\n *\n * The source and target branch must share an ancestor.\n * @param changeRebaser - the change rebaser responsible for rebasing the changes in the commits of each branch\n * @param sourceHead - the head of the source branch, which will be rebased onto `newBase`\n * @param targetCommit - the commit on the target branch to rebase the source branch onto.\n * @param targetHead - the head of the branch that `newBase` belongs to. Must be `newBase` or a descendent of `newBase`.\n * @returns a {@link BranchRebaseResult}\n * @remarks While a single branch must not have multiple commits with the same revision tag (that will result in undefined\n * behavior), there may be a commit on the source branch with the same revision tag as a commit on the target branch. If such\n * a pair is encountered while rebasing, it will be \"cancelled out\" in the new branch. Additionally, this function will rebase\n * the source branch _farther_ than `newBase` if the source branch's next commits after `newBase` match those on the target branch.\n * For example:\n * ```\n * // (A)-(B)-(C)-(D)-(E) <- Branch X\n * // \\\n * // (B')-(D')-(F) <- Branch Y\n * //\n * // If Branch Y is rebased onto commit C of Branch X, the branches must at least look like this afterwards (B was cancelled out):\n * //\n * // (A)-(B)-(C)-(D)-(E) <- Branch X\n * // \\\n * // (D'')-(F') <- Branch Y'\n * //\n * // But this function will recognize that B is equivalent to B' and D is equivalent to D', and instead produce:\n * //\n * // (A)-(B)-(C)-(D)-(E) <- Branch X\n * // \\\n * // (F') <- Branch Y'\n * ```\n */\nexport function rebaseBranch<TChange>(\n\tmintRevisionTag: () => RevisionTag,\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tsourceHead: GraphCommit<TChange>,\n\ttargetCommit: GraphCommit<TChange>,\n\ttargetHead: GraphCommit<TChange>,\n): BranchRebaseResult<TChange>;\nexport function rebaseBranch<TChange>(\n\tmintRevisionTag: () => RevisionTag,\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tsourceHead: GraphCommit<TChange>,\n\ttargetCommit: GraphCommit<TChange>,\n\ttargetHead = targetCommit,\n): BranchRebaseResult<TChange> {\n\t// Get both source and target as path arrays\n\tconst sourcePath: GraphCommit<TChange>[] = [];\n\tconst targetPath: GraphCommit<TChange>[] = [];\n\tconst ancestor = findCommonAncestor([sourceHead, sourcePath], [targetHead, targetPath]);\n\tassert(ancestor !== undefined, 0x675 /* branches must be related */);\n\n\tconst sourceBranchLength = sourcePath.length;\n\n\t// Find where `targetCommit` is in the target branch\n\tconst targetCommitIndex = targetPath.findIndex((r) => r === targetCommit);\n\tif (targetCommitIndex === -1) {\n\t\t// If the targetCommit is not in the target path, then it is either disjoint from `target` or it is behind/at\n\t\t// the commit where source and target diverge (ancestor), in which case there is nothing more to rebase\n\t\t// TODO: Ideally, this would be an \"assertExpensive\"\n\t\tassert(\n\t\t\tfindCommonAncestor(targetCommit, targetHead) !== undefined,\n\t\t\t0x676 /* target commit is not in target branch */,\n\t\t);\n\t\treturn {\n\t\t\tnewSourceHead: sourceHead,\n\t\t\tsourceChange: undefined,\n\t\t\tcommits: { deletedSourceCommits: [], targetCommits: [], sourceCommits: sourcePath },\n\t\t\ttelemetryProperties: {\n\t\t\t\tsourceBranchLength,\n\t\t\t\trebaseDistance: targetCommitIndex + 1,\n\t\t\t\tcountDropped: 0,\n\t\t\t},\n\t\t};\n\t}\n\n\t// Iterate through the target path and look for commits that are also present on the source branch (i.e. they\n\t// have matching tags). Each commit found in the target branch can be skipped when processing the source branch\n\t// because it has already been rebased onto the target. In the case that one or more of these commits are present\n\t// directly after `targetCommit`, then the new base can be advanced further without having to do any work.\n\tconst sourceSet = new Set(sourcePath.map((r) => r.revision));\n\tlet newBaseIndex = targetCommitIndex;\n\n\tfor (let i = 0; i < targetPath.length; i += 1) {\n\t\tconst { revision } = targetPath[i];\n\t\tif (sourceSet.has(revision)) {\n\t\t\tsourceSet.delete(revision);\n\t\t\tnewBaseIndex = Math.max(newBaseIndex, i);\n\t\t} else if (i > targetCommitIndex) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t/** The commit on the target branch that the new source branch branches off of (i.e. the new common ancestor) */\n\tconst newBase = targetPath[newBaseIndex];\n\t// Figure out how much of the trunk to start rebasing over.\n\tconst targetCommits = targetPath.slice(0, newBaseIndex + 1);\n\tconst deletedSourceCommits = [...sourcePath];\n\n\t// If the source and target rebase path begin with a range that has all the same revisions, remove it; it is\n\t// equivalent on both branches and doesn't need to be rebased.\n\tconst targetRebasePath = [...targetCommits];\n\tconst minLength = Math.min(sourcePath.length, targetRebasePath.length);\n\tfor (let i = 0; i < minLength; i++) {\n\t\tif (sourcePath[0].revision === targetRebasePath[0].revision) {\n\t\t\tsourcePath.shift();\n\t\t\ttargetRebasePath.shift();\n\t\t}\n\t}\n\n\tconst sourceCommits: GraphCommit<TChange>[] = [];\n\n\t// If all commits that are about to be rebased over on the target branch already comprise the start of the source branch,\n\t// are in the same order, and have no other commits interleaving them, then no rebasing needs to occur. Those commits can\n\t// simply be removed from the source branch, and the remaining commits on the source branch are reparented off of the new\n\t// base commit.\n\tif (targetRebasePath.length === 0) {\n\t\tfor (const c of sourcePath) {\n\t\t\tsourceCommits.push(mintCommit(sourceCommits[sourceCommits.length - 1] ?? newBase, c));\n\t\t}\n\t\treturn {\n\t\t\tnewSourceHead: sourceCommits[sourceCommits.length - 1] ?? newBase,\n\t\t\tsourceChange: undefined,\n\t\t\tcommits: {\n\t\t\t\tdeletedSourceCommits,\n\t\t\t\ttargetCommits,\n\t\t\t\tsourceCommits,\n\t\t\t},\n\t\t\ttelemetryProperties: {\n\t\t\t\tsourceBranchLength,\n\t\t\t\trebaseDistance: targetCommits.length,\n\t\t\t\tcountDropped: sourceBranchLength - sourceSet.size,\n\t\t\t},\n\t\t};\n\t}\n\n\t// For each source commit, rebase backwards over the inverses of any commits already rebased, and then\n\t// rebase forwards over the rest of the commits up to the new base before advancing the new base.\n\tlet newHead = newBase;\n\tconst revInfos = getRevInfoFromTaggedChanges([...targetRebasePath, ...sourcePath]);\n\t// Note that the `revisionMetadata` gets updated as `revInfos` gets updated.\n\tconst revisionMetadata = revisionMetadataSourceFromInfo(revInfos);\n\tlet editsToCompose: TaggedChange<TChange>[] = targetRebasePath.slice();\n\tfor (const c of sourcePath) {\n\t\tconst rollback = rollbackFromCommit(changeRebaser, c, mintRevisionTag, false);\n\t\tif (sourceSet.has(c.revision)) {\n\t\t\tconst currentComposedEdit = makeAnonChange(changeRebaser.compose(editsToCompose));\n\t\t\teditsToCompose = [currentComposedEdit];\n\t\t\tconst change = changeRebaser.rebase(c, currentComposedEdit, revisionMetadata);\n\t\t\tnewHead = {\n\t\t\t\trevision: c.revision,\n\t\t\t\tchange,\n\t\t\t\tparent: newHead,\n\t\t\t};\n\t\t\tsourceCommits.push(newHead);\n\t\t\teditsToCompose.push(tagChange(change, c.revision));\n\t\t}\n\t\trevInfos.push({ revision: c.revision });\n\t\teditsToCompose.unshift(rollback);\n\t\trevInfos.unshift({ revision: rollback.revision, rollbackOf: rollback.rollbackOf });\n\t}\n\n\tlet netChange: TChange | undefined;\n\treturn {\n\t\tnewSourceHead: newHead,\n\t\tget sourceChange(): TChange | undefined {\n\t\t\tif (netChange === undefined) {\n\t\t\t\tnetChange = changeRebaser.compose(editsToCompose);\n\t\t\t}\n\t\t\treturn netChange;\n\t\t},\n\t\tcommits: {\n\t\t\tdeletedSourceCommits,\n\t\t\ttargetCommits,\n\t\t\tsourceCommits,\n\t\t},\n\t\ttelemetryProperties: {\n\t\t\tsourceBranchLength,\n\t\t\trebaseDistance: targetCommits.length,\n\t\t\tcountDropped: sourceBranchLength - sourceSet.size,\n\t\t},\n\t};\n}\n\n/**\n * \"Sandwich/Horseshoe Rebase\" a change over the given source and target branches\n * @param changeRebaser - the change rebaser responsible for rebasing the change over the commits in each branch\n * @param change - the change to rebase\n * @param sourceHead - the head of the branch that `change` is based on\n * @param targetHead - the branch to rebase `change` onto\n * @returns the rebased change\n *\n * @remarks inverses will be cached.\n */\nexport function rebaseChange<TChange>(\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tchange: TaggedChange<TChange>,\n\tsourceHead: GraphCommit<TChange>,\n\ttargetHead: GraphCommit<TChange>,\n\tmintRevisionTag: () => RevisionTag,\n): RebaseChangeResult<TChange> {\n\tconst sourcePath: GraphCommit<TChange>[] = [];\n\tconst targetPath: GraphCommit<TChange>[] = [];\n\tassert(\n\t\tfindCommonAncestor([sourceHead, sourcePath], [targetHead, targetPath]) !== undefined,\n\t\t0x576 /* branch A and branch B must be related */,\n\t);\n\n\tconst inverses = sourcePath.map((commit) =>\n\t\trollbackFromCommit(changeRebaser, commit, mintRevisionTag, true),\n\t);\n\tinverses.reverse();\n\n\tconst telemetryProperties = {\n\t\tsourceBranchLength: 1,\n\t\trebaseDistance: sourcePath.length + targetPath.length,\n\t\tcountDropped: 0,\n\t};\n\n\treturn {\n\t\tchange: rebaseChangeOverChanges(changeRebaser, change, [...inverses, ...targetPath]),\n\t\ttelemetryProperties,\n\t};\n}\n\n/**\n * @internal\n */\nexport function revisionMetadataSourceFromInfo(\n\trevInfos: readonly RevisionInfo[],\n): RevisionMetadataSource {\n\tconst getIndex = (revision: RevisionTag): number | undefined => {\n\t\tconst index = revInfos.findIndex((revInfo) => revInfo.revision === revision);\n\t\treturn index >= 0 ? index : undefined;\n\t};\n\tconst tryGetInfo = (revision: RevisionTag | undefined): RevisionInfo | undefined => {\n\t\tif (revision === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst index = getIndex(revision);\n\t\treturn index === undefined ? undefined : revInfos[index];\n\t};\n\n\tconst hasRollback = (revision: RevisionTag): boolean => {\n\t\treturn revInfos.find((info) => info.rollbackOf === revision) !== undefined;\n\t};\n\n\treturn { getIndex, tryGetInfo, hasRollback };\n}\n\nexport function rebaseChangeOverChanges<TChange>(\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tchangeToRebase: TaggedChange<TChange>,\n\tchangesToRebaseOver: TaggedChange<TChange>[],\n): TChange {\n\tconst revisionMetadata = revisionMetadataSourceFromInfo(\n\t\tgetRevInfoFromTaggedChanges([...changesToRebaseOver, changeToRebase]),\n\t);\n\n\treturn changesToRebaseOver.reduce(\n\t\t(a, b) => mapTaggedChange(changeToRebase, changeRebaser.rebase(a, b, revisionMetadata)),\n\t\tchangeToRebase,\n\t).change;\n}\n\n// TODO: Deduplicate\nfunction getRevInfoFromTaggedChanges(changes: TaggedChange<unknown>[]): RevisionInfo[] {\n\tconst revInfos: RevisionInfo[] = [];\n\tfor (const taggedChange of changes) {\n\t\trevInfos.push(...revisionInfoFromTaggedChange(taggedChange));\n\t}\n\n\treturn revInfos;\n}\n\n// TODO: Deduplicate\nfunction revisionInfoFromTaggedChange(taggedChange: TaggedChange<unknown>): RevisionInfo[] {\n\tconst revInfos: RevisionInfo[] = [];\n\tif (taggedChange.revision !== undefined) {\n\t\tconst info: Mutable<RevisionInfo> = { revision: taggedChange.revision };\n\t\tif (taggedChange.rollbackOf !== undefined) {\n\t\t\tinfo.rollbackOf = taggedChange.rollbackOf;\n\t\t}\n\t\trevInfos.push(info);\n\t}\n\treturn revInfos;\n}\n\nfunction rollbackFromCommit<TChange>(\n\tchangeRebaser: ChangeRebaser<TChange>,\n\tcommit: GraphCommit<TChange>,\n\tmintRevisionTag: () => RevisionTag,\n\tcache?: boolean,\n): TaggedChange<TChange, RevisionTag> {\n\tif (commit.rollback !== undefined) {\n\t\treturn commit.rollback;\n\t}\n\tconst untagged = changeRebaser.invert(commit, true);\n\tconst tag = mintRevisionTag();\n\tconst deeplyTaggedRollback = changeRebaser.changeRevision(untagged, tag, commit.revision);\n\tconst fullyTaggedRollback = tagRollbackInverse(deeplyTaggedRollback, tag, commit.revision);\n\n\tif (cache === true) {\n\t\tcommit.rollback = fullyTaggedRollback;\n\t}\n\treturn fullyTaggedRollback;\n}\n\n/**\n * Find the furthest ancestor of some descendant.\n * @param descendant - a descendant. If an empty `path` array is included, it will be populated\n * with the chain of ancestry for `descendant` from most distant to closest (not including the furthest ancestor,\n * but otherwise including `descendant`).\n * @returns the furthest ancestor of `descendant`, or `descendant` itself if `descendant` has no ancestors.\n */\nexport function findAncestor<T extends { parent?: T }>(\n\tdescendant: T | [descendant: T, path?: T[]],\n): T;\n/**\n * Find the furthest ancestor of some descendant.\n * @param descendant - a descendant. If an empty `path` array is included, it will be populated\n * with the chain of ancestry for `descendant` from most distant to closest (not including the furthest ancestor,\n * but otherwise including `descendant`).\n * @returns the furthest ancestor of `descendant`, or `descendant` itself if `descendant` has no ancestors. Returns\n * `undefined` if `descendant` is undefined.\n */\nexport function findAncestor<T extends { parent?: T }>(\n\tdescendant: T | [descendant: T | undefined, path?: T[]] | undefined,\n): T | undefined;\n/**\n * Find an ancestor of some descendant.\n * @param descendant - a descendant. If an empty `path` array is included, it will be populated\n * with the chain of ancestry for `descendant` from most distant to closest (not including the ancestor found by `predicate`,\n * but otherwise including `descendant`).\n * @param predicate - a function which will be evaluated on every ancestor of `descendant` until it returns true.\n * @returns the closest ancestor of `descendant` that satisfies `predicate`, or `undefined` if no such ancestor exists.\n *\n * @example\n *\n * ```typescript\n * interface Parented {\n * id: string;\n * parent?: Parented;\n * }\n * const g = { id: \"g\" }; // Grandparent\n * const p = { parent: g, id: \"p\" }; // Parent\n * const c = { parent: p, id: \"c\" }; // Child\n * const path: Parented[] = [];\n * const ancestor = findAncestor<Parented>([c, path], (n) => n.id === \"g\");\n * // ancestor === g\n * // path === [p, c]\n * ```\n */\nexport function findAncestor<T extends { parent?: T }>(\n\tdescendant: T | [descendant: T | undefined, path?: T[]] | undefined,\n\tpredicate: (t: T) => boolean,\n): T | undefined;\nexport function findAncestor<T extends { parent?: T }>(\n\tdescendant: T | [descendant: T | undefined, path?: T[]] | undefined,\n\tpredicate: (t: T) => boolean = (t): boolean => t.parent === undefined,\n): T | undefined {\n\tlet d: T | undefined;\n\tlet path: T[] | undefined;\n\tif (Array.isArray(descendant)) {\n\t\t[d, path] = descendant;\n\t} else {\n\t\td = descendant;\n\t}\n\tfor (let cur = d; cur !== undefined; cur = cur.parent) {\n\t\tif (predicate(cur)) {\n\t\t\tpath?.reverse();\n\t\t\treturn cur;\n\t\t}\n\t\tpath?.push(cur);\n\t}\n\n\tif (path !== undefined) {\n\t\tpath.length = 0;\n\t}\n\treturn undefined;\n}\n\n/**\n * Find a common ancestor between two descendants that are linked by parent pointers.\n * @param descendantA - a descendant. If an empty `path` array is included, it will be populated\n * with the chain of commits from the ancestor to `descendantA` (not including the ancestor).\n * @param descendantB - another descendant. If an empty `path` array is included, it will be populated\n * with the chain of commits from the ancestor to `descendantB` (not including the ancestor).\n * @returns the common ancestor of `descendantA` and `descendantB`, or `undefined` if no such ancestor exists.\n *\n * @example\n *\n * ```typescript\n * interface Parented {\n * parent?: Parented;\n * }\n * const shared = {};\n * const a = { parent: shared };\n * const b1 = { parent: shared };\n * const b2 = { parent: b1 };\n * const pathB: Parented[] = []\n * const ancestor = findCommonAncestor<Parented>(a, [b2, pathB]);\n * // ancestor === shared\n * // pathB === [b1, b2]\n * ```\n */\nexport function findCommonAncestor<T extends { parent?: T }>(\n\tdescendantA: T | [descendantA: T, path?: T[]] | undefined,\n\tdescendantB: T | [descendantB: T, path?: T[]] | undefined,\n): T | undefined {\n\tlet a: T | undefined;\n\tlet b: T | undefined;\n\tlet pathA: T[] | undefined;\n\tlet pathB: T[] | undefined;\n\tif (Array.isArray(descendantA)) {\n\t\t[a, pathA] = descendantA;\n\t\tassert(pathA === undefined || pathA.length === 0, 0x578 /* Path A must be empty */);\n\t} else {\n\t\ta = descendantA;\n\t}\n\tif (Array.isArray(descendantB)) {\n\t\t[b, pathB] = descendantB;\n\t\tassert(pathB === undefined || pathB.length === 0, 0x579 /* Path B must be empty */);\n\t} else {\n\t\tb = descendantB;\n\t}\n\n\tif (a === b) {\n\t\treturn a;\n\t}\n\n\tconst reversePaths = (): void => {\n\t\tpathA?.reverse();\n\t\tpathB?.reverse();\n\t};\n\n\tconst visited = new Set();\n\twhile (a !== undefined || b !== undefined) {\n\t\tif (a !== undefined) {\n\t\t\tif (visited.has(a)) {\n\t\t\t\tif (pathB !== undefined) {\n\t\t\t\t\tpathB.length = pathB.findIndex((r) => Object.is(r, a));\n\t\t\t\t}\n\t\t\t\treversePaths();\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\tvisited.add(a);\n\t\t\tpathA?.push(a);\n\t\t\ta = a.parent;\n\t\t}\n\n\t\tif (b !== undefined) {\n\t\t\tif (visited.has(b)) {\n\t\t\t\tif (pathA !== undefined) {\n\t\t\t\t\tpathA.length = pathA.findIndex((r) => Object.is(r, b));\n\t\t\t\t}\n\t\t\t\treversePaths();\n\t\t\t\treturn b;\n\t\t\t}\n\t\t\tvisited.add(b);\n\t\t\tpathB?.push(b);\n\t\t\tb = b.parent;\n\t\t}\n\t}\n\n\tif (pathA !== undefined) {\n\t\tpathA.length = 0;\n\t}\n\tif (pathB !== undefined) {\n\t\tpathB.length = 0;\n\t}\n\treturn undefined;\n}\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
- import { Static } from "@sinclair/typebox";
6
- import { Brand } from "../../util/index.js";
5
+ import { type Static } from "@sinclair/typebox";
6
+ import { type Brand } from "../../util/index.js";
7
7
  export declare const version: 1;
8
8
  /**
9
9
  * Key (aka Name or Label) for a field which is scoped to a specific TreeNodeStoredSchema.
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/core/schema-stored/format.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAiB,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAqB,MAAM,qBAAqB,CAAC;AAE/D,eAAO,MAAM,OAAO,GAAa,CAAC;AAElC;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,cAAc,+CAAgC,CAAC;AAE5D;;;;;;GAMG;AACH,MAAM,MAAM,wBAAwB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,IAAI,KAAK,CAC1E,KAAK,EACL,+BAA+B,CAC/B,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAAG,KAAK,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;AAC5E,eAAO,MAAM,yBAAyB,0DAA2C,CAAC;AAElF;;GAEG;AACH,eAAO,MAAM,8BAA8B,uEAAgD,CAAC;AAS5F,eAAO,MAAM,iBAAiB;;;EAA6D,CAAC;AAE5F;;GAEG;AACH,oBAAY,oBAAoB;IAC/B,MAAM,IAAA;IACN,MAAM,IAAA;IACN,OAAO,IAAA;IACP,WAAW,IAAA;IACX,IAAI,IAAA;CACJ;AAED;;;;GAIG;AACH,eAAO,MAAM,wBAAwB;IAEnC;;OAEG;;;;;IAEH;;OAEG;;;;;IAEH;;OAEG;;EAIJ,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE/E,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/core/schema-stored/format.ts"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,GAAG,CAAU,CAAC;AAUlC;;GAEG;AACU,QAAA,cAAc,GAAG,IAAA,4BAAiB,GAAY,CAAC;AAsB/C,QAAA,yBAAyB,GAAG,IAAA,4BAAiB,GAAuB,CAAC;AAElF;;GAEG;AACU,QAAA,8BAA8B,GAAG,IAAA,4BAAiB,GAA4B,CAAC;AAE5F,MAAM,qBAAqB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,iCAAyB;IAC/B,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,sCAA8B,CAAC,CAAC;CAChE,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAE5D,QAAA,iBAAiB,GAAG,cAAI,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAE5F;;GAEG;AACH,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC/B,mEAAM,CAAA;IACN,mEAAM,CAAA;IACN,qEAAO,CAAA;IACP,6EAAW,CAAA;IACX,+DAAI,CAAA;AACL,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AAED;;;;GAIG;AACU,QAAA,wBAAwB,GAAG,cAAI,CAAC,MAAM,CAClD;IACC;;OAEG;IACH,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,yBAAiB,CAAC,CAAC;IACpE;;OAEG;IACH,GAAG,EAAE,cAAI,CAAC,QAAQ,CAAC,yBAAiB,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;CACpD,EACD,uBAAY,CACZ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ObjectOptions, Static, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport { Brand, brandedStringType } from \"../../util/index.js\";\n\nexport const version = 1 as const;\n\n/**\n * Key (aka Name or Label) for a field which is scoped to a specific TreeNodeStoredSchema.\n *\n * Stable identifier, used when persisting data.\n * @internal\n */\nexport type FieldKey = Brand<string, \"tree.FieldKey\">;\n\n/**\n * TypeBox Schema for encoding {@link FieldKey} in persisted data.\n */\nexport const FieldKeySchema = brandedStringType<FieldKey>();\n\n/**\n * Identifier for a TreeNode schema.\n * Also known as \"Definition\"\n *\n * Stable identifier, used when persisting data.\n * @internal\n */\nexport type TreeNodeSchemaIdentifier<TName extends string = string> = Brand<\n\tTName,\n\t\"tree.TreeNodeSchemaIdentifier\"\n>;\n\n/**\n * Identifier for a FieldKind.\n * Refers to an exact stable policy (ex: specific version of a policy),\n * for how to handle (ex: edit and merge edits to) fields marked with this kind.\n * Persisted in documents as part of stored schema.\n * @internal\n */\nexport type FieldKindIdentifier = Brand<string, \"tree.FieldKindIdentifier\">;\nexport const FieldKindIdentifierSchema = brandedStringType<FieldKindIdentifier>();\n\n/**\n * TypeBox Schema for encoding {@link TreeNodeSchemaIdentifiers} in persisted data.\n */\nexport const TreeNodeSchemaIdentifierSchema = brandedStringType<TreeNodeSchemaIdentifier>();\n\nconst FieldSchemaFormatBase = Type.Object({\n\tkind: FieldKindIdentifierSchema,\n\ttypes: Type.Optional(Type.Array(TreeNodeSchemaIdentifierSchema)),\n});\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport const FieldSchemaFormat = Type.Composite([FieldSchemaFormatBase], noAdditionalProps);\n\n/**\n * Persisted version of {@link ValueSchema}.\n */\nexport enum PersistedValueSchema {\n\tNumber,\n\tString,\n\tBoolean,\n\tFluidHandle,\n\tNull,\n}\n\n/**\n * Discriminated union content of tree node schema.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const TreeNodeSchemaDataFormat = Type.Object(\n\t{\n\t\t/**\n\t\t * Object node union member.\n\t\t */\n\t\tobject: Type.Optional(Type.Record(Type.String(), FieldSchemaFormat)),\n\t\t/**\n\t\t * Map node union member.\n\t\t */\n\t\tmap: Type.Optional(FieldSchemaFormat),\n\t\t/**\n\t\t * Leaf node union member.\n\t\t */\n\t\tleaf: Type.Optional(Type.Enum(PersistedValueSchema)),\n\t},\n\tunionOptions,\n);\n\nexport type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;\n\nexport type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;\n"]}
1
+ {"version":3,"file":"format.js","sourceRoot":"","sources":["../../../src/core/schema-stored/format.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,mDAAoD;AACpD,kDAAoE;AAEvD,QAAA,OAAO,GAAG,CAAU,CAAC;AAUlC;;GAEG;AACU,QAAA,cAAc,GAAG,IAAA,4BAAiB,GAAY,CAAC;AAsB/C,QAAA,yBAAyB,GAAG,IAAA,4BAAiB,GAAuB,CAAC;AAElF;;GAEG;AACU,QAAA,8BAA8B,GAAG,IAAA,4BAAiB,GAA4B,CAAC;AAE5F,MAAM,qBAAqB,GAAG,cAAI,CAAC,MAAM,CAAC;IACzC,IAAI,EAAE,iCAAyB;IAC/B,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,sCAA8B,CAAC,CAAC;CAChE,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAE5D,QAAA,iBAAiB,GAAG,cAAI,CAAC,SAAS,CAAC,CAAC,qBAAqB,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAE5F;;GAEG;AACH,IAAY,oBAMX;AAND,WAAY,oBAAoB;IAC/B,mEAAM,CAAA;IACN,mEAAM,CAAA;IACN,qEAAO,CAAA;IACP,6EAAW,CAAA;IACX,+DAAI,CAAA;AACL,CAAC,EANW,oBAAoB,oCAApB,oBAAoB,QAM/B;AAED;;;;GAIG;AACU,QAAA,wBAAwB,GAAG,cAAI,CAAC,MAAM,CAClD;IACC;;OAEG;IACH,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,yBAAiB,CAAC,CAAC;IACpE;;OAEG;IACH,GAAG,EAAE,cAAI,CAAC,QAAQ,CAAC,yBAAiB,CAAC;IACrC;;OAEG;IACH,IAAI,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;CACpD,EACD,uBAAY,CACZ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport { type Brand, brandedStringType } from \"../../util/index.js\";\n\nexport const version = 1 as const;\n\n/**\n * Key (aka Name or Label) for a field which is scoped to a specific TreeNodeStoredSchema.\n *\n * Stable identifier, used when persisting data.\n * @internal\n */\nexport type FieldKey = Brand<string, \"tree.FieldKey\">;\n\n/**\n * TypeBox Schema for encoding {@link FieldKey} in persisted data.\n */\nexport const FieldKeySchema = brandedStringType<FieldKey>();\n\n/**\n * Identifier for a TreeNode schema.\n * Also known as \"Definition\"\n *\n * Stable identifier, used when persisting data.\n * @internal\n */\nexport type TreeNodeSchemaIdentifier<TName extends string = string> = Brand<\n\tTName,\n\t\"tree.TreeNodeSchemaIdentifier\"\n>;\n\n/**\n * Identifier for a FieldKind.\n * Refers to an exact stable policy (ex: specific version of a policy),\n * for how to handle (ex: edit and merge edits to) fields marked with this kind.\n * Persisted in documents as part of stored schema.\n * @internal\n */\nexport type FieldKindIdentifier = Brand<string, \"tree.FieldKindIdentifier\">;\nexport const FieldKindIdentifierSchema = brandedStringType<FieldKindIdentifier>();\n\n/**\n * TypeBox Schema for encoding {@link TreeNodeSchemaIdentifiers} in persisted data.\n */\nexport const TreeNodeSchemaIdentifierSchema = brandedStringType<TreeNodeSchemaIdentifier>();\n\nconst FieldSchemaFormatBase = Type.Object({\n\tkind: FieldKindIdentifierSchema,\n\ttypes: Type.Optional(Type.Array(TreeNodeSchemaIdentifierSchema)),\n});\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nexport const FieldSchemaFormat = Type.Composite([FieldSchemaFormatBase], noAdditionalProps);\n\n/**\n * Persisted version of {@link ValueSchema}.\n */\nexport enum PersistedValueSchema {\n\tNumber,\n\tString,\n\tBoolean,\n\tFluidHandle,\n\tNull,\n}\n\n/**\n * Discriminated union content of tree node schema.\n *\n * See {@link DiscriminatedUnionDispatcher} for more information on this pattern.\n */\nexport const TreeNodeSchemaDataFormat = Type.Object(\n\t{\n\t\t/**\n\t\t * Object node union member.\n\t\t */\n\t\tobject: Type.Optional(Type.Record(Type.String(), FieldSchemaFormat)),\n\t\t/**\n\t\t * Map node union member.\n\t\t */\n\t\tmap: Type.Optional(FieldSchemaFormat),\n\t\t/**\n\t\t * Leaf node union member.\n\t\t */\n\t\tleaf: Type.Optional(Type.Enum(PersistedValueSchema)),\n\t},\n\tunionOptions,\n);\n\nexport type TreeNodeSchemaDataFormat = Static<typeof TreeNodeSchemaDataFormat>;\n\nexport type FieldSchemaFormat = Static<typeof FieldSchemaFormat>;\n"]}
@@ -4,9 +4,9 @@
4
4
  */
5
5
  import type { ErasedType } from "@fluidframework/core-interfaces";
6
6
  import { DiscriminatedUnionDispatcher } from "../../codec/index.js";
7
- import { MakeNominal } from "../../util/index.js";
8
- import { FieldKey, FieldKindIdentifier, FieldSchemaFormat, TreeNodeSchemaDataFormat, TreeNodeSchemaIdentifier } from "./format.js";
9
- import { Multiplicity } from "./multiplicity.js";
7
+ import { type MakeNominal } from "../../util/index.js";
8
+ import { type FieldKey, type FieldKindIdentifier, type FieldSchemaFormat, type TreeNodeSchemaDataFormat, type TreeNodeSchemaIdentifier } from "./format.js";
9
+ import type { Multiplicity } from "./multiplicity.js";
10
10
  /**
11
11
  * Schema for what {@link TreeValue} is allowed on a Leaf node.
12
12
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/core/schema-stored/schema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,WAAW,EAA0B,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EACN,QAAQ,EACR,mBAAmB,EACnB,iBAAiB,EAEjB,wBAAwB,EACxB,wBAAwB,EACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;GAGG;AACH,oBAAY,WAAW;IACtB,MAAM,IAAA;IACN,MAAM,IAAA;IACN,OAAO,IAAA;IACP,WAAW,IAAA;IACX,IAAI,IAAA;CACJ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC,wBAAwB,CAAC,GAAG,SAAS,CAAC;AAE5E;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,UAAU,EAAE,mBAAmB,CAAC;IACzC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC5B;;;;;;OAMG;IACH,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;IAErE;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC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ASzB,SAAS,EAAE,qBAAqB;IARnE;;;;;;;OAOG;gBACgC,SAAS,EAAE,qBAAqB;IAInD,MAAM,IAAI,8BAA8B;CAKxD;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,oBAAoB;aAa1B,SAAS,EAAE,WAAW;IAZzD;;;;;;;;;;;OAWG;gBACgC,SAAS,EAAE,WAAW;IAIzC,MAAM,IAAI,8BAA8B;CAKxD;AAED,eAAO,MAAM,4BAA4B,EAAE,4BAA4B,CACtE,wBAAwB,EACxB;CAAE,EACF,oBAAoB,CAWnB,CAAC;AAoBH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,qBAAqB,GAAG,iBAAiB,CAQlF;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,qBAAqB,CAOlF;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,gBAAiB,SAAQ,sBAAsB;IAC/D;;OAEG;IACH,QAAQ,CAAC,eAAe,EAAE,qBAAqB,CAAC;CAChD;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,QAAQ,CAAC,UAAU,EAAE,WAAW,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC;CACjF"}
@@ -58,14 +58,12 @@ exports.toTreeNodeSchemaDataFormat = toTreeNodeSchemaDataFormat;
58
58
  * @internal
59
59
  */
60
60
  class TreeNodeStoredSchema {
61
- _typeCheck;
62
61
  }
63
62
  exports.TreeNodeStoredSchema = TreeNodeStoredSchema;
64
63
  /**
65
64
  * @internal
66
65
  */
67
66
  class ObjectNodeStoredSchema extends TreeNodeStoredSchema {
68
- objectNodeFields;
69
67
  /**
70
68
  * @param objectNodeFields -
71
69
  * Schema for fields with keys scoped to this TreeNodeStoredSchema.
@@ -100,7 +98,6 @@ exports.ObjectNodeStoredSchema = ObjectNodeStoredSchema;
100
98
  * @internal
101
99
  */
102
100
  class MapNodeStoredSchema extends TreeNodeStoredSchema {
103
- mapFields;
104
101
  /**
105
102
  * @param mapFields -
106
103
  * Allows using the fields as a map, with the keys being
@@ -124,7 +121,6 @@ exports.MapNodeStoredSchema = MapNodeStoredSchema;
124
121
  * @internal
125
122
  */
126
123
  class LeafNodeStoredSchema extends TreeNodeStoredSchema {
127
- leafValue;
128
124
  /**
129
125
  * @param leafValue -
130
126
  * There are several approaches for how to store actual data in the tree