@fluidframework/tree 2.41.0-338401 → 2.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1111) hide show
  1. package/.vscode/settings.json +1 -0
  2. package/CHANGELOG.md +374 -0
  3. package/api-report/tree.alpha.api.md +21 -7
  4. package/dist/alpha.d.ts +2 -0
  5. package/dist/codec/codec.d.ts +33 -3
  6. package/dist/codec/codec.d.ts.map +1 -1
  7. package/dist/codec/codec.js +13 -3
  8. package/dist/codec/codec.js.map +1 -1
  9. package/dist/codec/index.d.ts +1 -1
  10. package/dist/codec/index.d.ts.map +1 -1
  11. package/dist/codec/index.js.map +1 -1
  12. package/dist/codec/versioned/codec.d.ts +35 -2
  13. package/dist/codec/versioned/codec.d.ts.map +1 -1
  14. package/dist/codec/versioned/codec.js +38 -3
  15. package/dist/codec/versioned/codec.js.map +1 -1
  16. package/dist/core/index.d.ts +1 -1
  17. package/dist/core/index.d.ts.map +1 -1
  18. package/dist/core/index.js +2 -1
  19. package/dist/core/index.js.map +1 -1
  20. package/dist/core/rebase/types.d.ts +2 -2
  21. package/dist/core/rebase/types.js +2 -2
  22. package/dist/core/rebase/types.js.map +1 -1
  23. package/dist/core/rebase/utils.d.ts +0 -2
  24. package/dist/core/rebase/utils.d.ts.map +1 -1
  25. package/dist/core/rebase/utils.js +6 -10
  26. package/dist/core/rebase/utils.js.map +1 -1
  27. package/dist/core/schema-stored/formatV1.d.ts +0 -1
  28. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  29. package/dist/core/schema-stored/formatV1.js +1 -2
  30. package/dist/core/schema-stored/formatV1.js.map +1 -1
  31. package/dist/core/schema-stored/index.d.ts +1 -1
  32. package/dist/core/schema-stored/index.d.ts.map +1 -1
  33. package/dist/core/schema-stored/index.js +2 -1
  34. package/dist/core/schema-stored/index.js.map +1 -1
  35. package/dist/core/schema-stored/schema.d.ts +6 -0
  36. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  37. package/dist/core/schema-stored/schema.js +8 -1
  38. package/dist/core/schema-stored/schema.js.map +1 -1
  39. package/dist/core/tree/anchorSet.d.ts +2 -1
  40. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  41. package/dist/core/tree/anchorSet.js +2 -1
  42. package/dist/core/tree/anchorSet.js.map +1 -1
  43. package/dist/core/tree/detachedFieldIndex.d.ts +2 -2
  44. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  45. package/dist/core/tree/detachedFieldIndex.js +5 -1
  46. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  47. package/dist/core/tree/mapTree.d.ts +2 -1
  48. package/dist/core/tree/mapTree.d.ts.map +1 -1
  49. package/dist/core/tree/mapTree.js +11 -5
  50. package/dist/core/tree/mapTree.js.map +1 -1
  51. package/dist/core/tree/pathTree.d.ts +12 -11
  52. package/dist/core/tree/pathTree.d.ts.map +1 -1
  53. package/dist/core/tree/pathTree.js +8 -7
  54. package/dist/core/tree/pathTree.js.map +1 -1
  55. package/dist/core/tree/treeTextFormat.d.ts +1 -1
  56. package/dist/core/tree/treeTextFormat.js +1 -1
  57. package/dist/core/tree/treeTextFormat.js.map +1 -1
  58. package/dist/core/tree/visitorUtils.d.ts +2 -2
  59. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  60. package/dist/core/tree/visitorUtils.js.map +1 -1
  61. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -1
  62. package/dist/feature-libraries/chunked-forest/chunkedForest.js +1 -1
  63. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  64. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -2
  65. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  66. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  67. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  68. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  69. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  70. package/dist/feature-libraries/default-schema/index.js +2 -2
  71. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  72. package/dist/feature-libraries/default-schema/schemaChecker.d.ts +17 -16
  73. package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  74. package/dist/feature-libraries/default-schema/schemaChecker.js +54 -38
  75. package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  76. package/dist/feature-libraries/flex-tree/context.d.ts +32 -8
  77. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  78. package/dist/feature-libraries/flex-tree/context.js +22 -6
  79. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  80. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +37 -16
  81. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  82. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +7 -2
  83. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  84. package/dist/feature-libraries/flex-tree/index.d.ts +2 -2
  85. package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
  86. package/dist/feature-libraries/flex-tree/index.js.map +1 -1
  87. package/dist/feature-libraries/flex-tree/lazyField.d.ts +6 -6
  88. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  89. package/dist/feature-libraries/flex-tree/lazyField.js +1 -1
  90. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  91. package/dist/feature-libraries/flex-tree/lazyNode.d.ts +3 -2
  92. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  93. package/dist/feature-libraries/flex-tree/lazyNode.js +3 -0
  94. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  95. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  96. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  97. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -3
  98. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  99. package/dist/feature-libraries/forest-summary/forestSummarizer.js +7 -7
  100. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  101. package/dist/feature-libraries/index.d.ts +4 -4
  102. package/dist/feature-libraries/index.d.ts.map +1 -1
  103. package/dist/feature-libraries/index.js +5 -4
  104. package/dist/feature-libraries/index.js.map +1 -1
  105. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  106. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  107. package/dist/feature-libraries/indexing/anchorTreeIndex.js +15 -15
  108. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  109. package/dist/feature-libraries/mapTreeCursor.d.ts +39 -3
  110. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  111. package/dist/feature-libraries/mapTreeCursor.js +45 -7
  112. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  113. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  114. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  115. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  116. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  117. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  118. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  119. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  120. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  121. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  122. package/dist/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  123. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  124. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  125. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  126. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  127. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  128. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  129. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  130. package/dist/feature-libraries/modular-schema/isNeverTree.js +0 -2
  131. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  132. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +1 -1
  133. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  134. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +5 -5
  135. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  136. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  137. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  138. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  139. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  140. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  141. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  142. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  143. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  144. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  145. package/dist/feature-libraries/object-forest/objectForest.d.ts +22 -5
  146. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  147. package/dist/feature-libraries/object-forest/objectForest.js +296 -207
  148. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  149. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  150. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  151. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +3 -2
  152. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  153. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  154. package/dist/feature-libraries/schema-index/codec.d.ts +6 -12
  155. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  156. package/dist/feature-libraries/schema-index/codec.js +8 -15
  157. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  158. package/dist/feature-libraries/schema-index/formatV1.d.ts +2 -2
  159. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  160. package/dist/feature-libraries/schema-index/formatV1.js +1 -1
  161. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  162. package/dist/feature-libraries/schema-index/index.d.ts +1 -1
  163. package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
  164. package/dist/feature-libraries/schema-index/index.js +1 -2
  165. package/dist/feature-libraries/schema-index/index.js.map +1 -1
  166. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  167. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  168. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  169. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  170. package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
  171. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  172. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  173. package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  174. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  175. package/dist/feature-libraries/sequence-field/rebase.js +1 -1
  176. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  177. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  178. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  179. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  180. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  181. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  182. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  183. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  184. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  185. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  186. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  187. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  188. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  189. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  190. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  191. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  192. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  193. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  194. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  195. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  196. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  197. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  198. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  199. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  200. package/dist/feature-libraries/sequence-field/utils.d.ts +7 -5
  201. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  202. package/dist/feature-libraries/sequence-field/utils.js +7 -5
  203. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  204. package/dist/feature-libraries/treeCursorUtils.d.ts +5 -1
  205. package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  206. package/dist/feature-libraries/treeCursorUtils.js +10 -4
  207. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  208. package/dist/feature-libraries/treeTextCursor.d.ts +1 -1
  209. package/dist/feature-libraries/treeTextCursor.js +1 -1
  210. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  211. package/dist/index.d.ts +3 -3
  212. package/dist/index.d.ts.map +1 -1
  213. package/dist/index.js +2 -6
  214. package/dist/index.js.map +1 -1
  215. package/dist/packageVersion.d.ts +1 -1
  216. package/dist/packageVersion.d.ts.map +1 -1
  217. package/dist/packageVersion.js +1 -1
  218. package/dist/packageVersion.js.map +1 -1
  219. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  220. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
  221. package/dist/shared-tree/independentView.d.ts +1 -1
  222. package/dist/shared-tree/independentView.d.ts.map +1 -1
  223. package/dist/shared-tree/independentView.js +8 -3
  224. package/dist/shared-tree/independentView.js.map +1 -1
  225. package/dist/shared-tree/index.d.ts +1 -1
  226. package/dist/shared-tree/index.d.ts.map +1 -1
  227. package/dist/shared-tree/index.js.map +1 -1
  228. package/dist/shared-tree/schematizeTree.d.ts +1 -1
  229. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  230. package/dist/shared-tree/schematizeTree.js.map +1 -1
  231. package/dist/shared-tree/schematizingTreeView.d.ts +12 -2
  232. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  233. package/dist/shared-tree/schematizingTreeView.js +37 -23
  234. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  235. package/dist/shared-tree/sharedTree.d.ts +6 -6
  236. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  237. package/dist/shared-tree/sharedTree.js +9 -8
  238. package/dist/shared-tree/sharedTree.js.map +1 -1
  239. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  240. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  241. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  242. package/dist/shared-tree/tree.d.ts.map +1 -1
  243. package/dist/shared-tree/tree.js +9 -25
  244. package/dist/shared-tree/tree.js.map +1 -1
  245. package/dist/shared-tree/treeAlpha.d.ts +78 -5
  246. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  247. package/dist/shared-tree/treeAlpha.js +52 -8
  248. package/dist/shared-tree/treeAlpha.js.map +1 -1
  249. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  250. package/dist/shared-tree/treeCheckout.js +8 -4
  251. package/dist/shared-tree/treeCheckout.js.map +1 -1
  252. package/dist/shared-tree-core/branch.d.ts +2 -2
  253. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  254. package/dist/shared-tree-core/branch.js +2 -2
  255. package/dist/shared-tree-core/branch.js.map +1 -1
  256. package/dist/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  257. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  258. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  259. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  260. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  261. package/dist/shared-tree-core/editManager.d.ts +3 -1
  262. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  263. package/dist/shared-tree-core/editManager.js +4 -2
  264. package/dist/shared-tree-core/editManager.js.map +1 -1
  265. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  266. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  267. package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  268. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  269. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  270. package/dist/shared-tree-core/messageCodecs.d.ts +1 -1
  271. package/dist/shared-tree-core/messageCodecs.js +1 -1
  272. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  273. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  274. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  275. package/dist/shared-tree-core/sharedTreeCore.d.ts +2 -2
  276. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  277. package/dist/shared-tree-core/sharedTreeCore.js +4 -4
  278. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  279. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  280. package/dist/shared-tree-core/transaction.js +1 -1
  281. package/dist/shared-tree-core/transaction.js.map +1 -1
  282. package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  283. package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
  284. package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
  285. package/dist/simple-tree/api/conciseTree.js +1 -1
  286. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  287. package/dist/simple-tree/api/configuration.d.ts +2 -2
  288. package/dist/simple-tree/api/configuration.js +5 -5
  289. package/dist/simple-tree/api/configuration.js.map +1 -1
  290. package/dist/simple-tree/api/create.d.ts +10 -29
  291. package/dist/simple-tree/api/create.d.ts.map +1 -1
  292. package/dist/simple-tree/api/create.js +27 -51
  293. package/dist/simple-tree/api/create.js.map +1 -1
  294. package/dist/simple-tree/api/customTree.d.ts +5 -1
  295. package/dist/simple-tree/api/customTree.d.ts.map +1 -1
  296. package/dist/simple-tree/api/customTree.js +33 -25
  297. package/dist/simple-tree/api/customTree.js.map +1 -1
  298. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  299. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  300. package/dist/simple-tree/api/identifierIndex.js +2 -2
  301. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  302. package/dist/simple-tree/api/index.d.ts +2 -3
  303. package/dist/simple-tree/api/index.d.ts.map +1 -1
  304. package/dist/simple-tree/api/index.js +2 -10
  305. package/dist/simple-tree/api/index.js.map +1 -1
  306. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  307. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  308. package/dist/simple-tree/api/schemaFactory.d.ts +14 -6
  309. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  310. package/dist/simple-tree/api/schemaFactory.js +45 -16
  311. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  312. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  313. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  314. package/dist/simple-tree/api/schemaFactoryAlpha.js +4 -6
  315. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  316. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  317. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  318. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  319. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  320. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  321. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  322. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  323. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +4 -6
  324. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  325. package/dist/simple-tree/api/storedSchema.d.ts +1 -1
  326. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  327. package/dist/simple-tree/api/storedSchema.js +7 -6
  328. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  329. package/dist/simple-tree/api/tree.d.ts +2 -2
  330. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  331. package/dist/simple-tree/api/tree.js.map +1 -1
  332. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  333. package/dist/simple-tree/api/treeBeta.js +1 -1
  334. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  335. package/dist/simple-tree/api/treeNodeApi.d.ts +44 -6
  336. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  337. package/dist/simple-tree/api/treeNodeApi.js +56 -29
  338. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  339. package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
  340. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  341. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  342. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  343. package/dist/simple-tree/api/verboseTree.js +15 -12
  344. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  345. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  346. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +4 -6
  347. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  348. package/dist/simple-tree/core/context.d.ts.map +1 -1
  349. package/dist/simple-tree/core/context.js.map +1 -1
  350. package/dist/simple-tree/core/getOrCreateNode.d.ts +1 -1
  351. package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  352. package/dist/simple-tree/core/getOrCreateNode.js +2 -1
  353. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
  354. package/dist/simple-tree/core/index.d.ts +2 -2
  355. package/dist/simple-tree/core/index.d.ts.map +1 -1
  356. package/dist/simple-tree/core/index.js +3 -4
  357. package/dist/simple-tree/core/index.js.map +1 -1
  358. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  359. package/dist/simple-tree/core/treeNode.js +1 -1
  360. package/dist/simple-tree/core/treeNode.js.map +1 -1
  361. package/dist/simple-tree/core/treeNodeKernel.d.ts +18 -28
  362. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  363. package/dist/simple-tree/core/treeNodeKernel.js +28 -35
  364. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  365. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  366. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  367. package/dist/simple-tree/core/types.d.ts.map +1 -1
  368. package/dist/simple-tree/core/types.js.map +1 -1
  369. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +128 -59
  370. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  371. package/dist/simple-tree/core/unhydratedFlexTree.js +180 -193
  372. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  373. package/dist/simple-tree/core/withType.d.ts +1 -1
  374. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  375. package/dist/simple-tree/core/withType.js.map +1 -1
  376. package/dist/simple-tree/createContext.d.ts.map +1 -1
  377. package/dist/simple-tree/createContext.js.map +1 -1
  378. package/dist/simple-tree/getTreeNodeForField.d.ts.map +1 -1
  379. package/dist/simple-tree/getTreeNodeForField.js.map +1 -1
  380. package/dist/simple-tree/index.d.ts +4 -11
  381. package/dist/simple-tree/index.d.ts.map +1 -1
  382. package/dist/simple-tree/index.js +16 -24
  383. package/dist/simple-tree/index.js.map +1 -1
  384. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  385. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  386. package/dist/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  387. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  388. package/dist/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +12 -13
  389. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  390. package/dist/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  391. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  392. package/dist/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  393. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -0
  394. package/dist/simple-tree/node-kinds/array/index.d.ts +7 -0
  395. package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  396. package/dist/simple-tree/node-kinds/array/index.js +16 -0
  397. package/dist/simple-tree/node-kinds/array/index.js.map +1 -0
  398. package/dist/simple-tree/node-kinds/index.d.ts +8 -0
  399. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -0
  400. package/dist/simple-tree/node-kinds/index.js +25 -0
  401. package/dist/simple-tree/node-kinds/index.js.map +1 -0
  402. package/dist/simple-tree/node-kinds/map/index.d.ts +7 -0
  403. package/dist/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  404. package/dist/simple-tree/node-kinds/map/index.js +13 -0
  405. package/dist/simple-tree/node-kinds/map/index.js.map +1 -0
  406. package/{lib/simple-tree → dist/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  407. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  408. package/dist/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +9 -9
  409. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  410. package/dist/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  411. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  412. package/dist/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  413. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  414. package/dist/simple-tree/node-kinds/object/index.d.ts +7 -0
  415. package/dist/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  416. package/dist/simple-tree/node-kinds/object/index.js +15 -0
  417. package/dist/simple-tree/node-kinds/object/index.js.map +1 -0
  418. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNode.d.ts +6 -6
  419. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  420. package/dist/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +9 -17
  421. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  422. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  423. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  424. package/dist/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  425. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  426. package/dist/simple-tree/prepareForInsertion.d.ts +20 -6
  427. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  428. package/dist/simple-tree/prepareForInsertion.js +26 -19
  429. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  430. package/dist/simple-tree/schemaTypes.d.ts +9 -9
  431. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  432. package/dist/simple-tree/schemaTypes.js.map +1 -1
  433. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  434. package/dist/simple-tree/simpleSchema.js.map +1 -1
  435. package/dist/simple-tree/toStoredSchema.d.ts +6 -1
  436. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  437. package/dist/simple-tree/toStoredSchema.js +7 -4
  438. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  439. package/dist/simple-tree/treeNodeValid.d.ts +1 -1
  440. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  441. package/dist/simple-tree/treeNodeValid.js +10 -10
  442. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  443. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +72 -0
  444. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -0
  445. package/dist/simple-tree/{toMapTree.js → unhydratedFlexTreeFromInsertable.js} +136 -178
  446. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -0
  447. package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -1
  448. package/dist/simple-tree/walkFieldSchema.js.map +1 -1
  449. package/dist/tableSchema.d.ts +10 -10
  450. package/dist/treeFactory.d.ts +1 -1
  451. package/dist/treeFactory.d.ts.map +1 -1
  452. package/dist/treeFactory.js +7 -2
  453. package/dist/treeFactory.js.map +1 -1
  454. package/dist/util/bTreeUtils.d.ts.map +1 -1
  455. package/dist/util/bTreeUtils.js.map +1 -1
  456. package/dist/util/breakable.d.ts +23 -4
  457. package/dist/util/breakable.d.ts.map +1 -1
  458. package/dist/util/breakable.js +12 -3
  459. package/dist/util/breakable.js.map +1 -1
  460. package/dist/util/index.d.ts +1 -1
  461. package/dist/util/index.d.ts.map +1 -1
  462. package/dist/util/index.js +2 -1
  463. package/dist/util/index.js.map +1 -1
  464. package/dist/util/utils.d.ts +4 -0
  465. package/dist/util/utils.d.ts.map +1 -1
  466. package/dist/util/utils.js +8 -1
  467. package/dist/util/utils.js.map +1 -1
  468. package/docs/SharedTree Philosophy.md +5 -5
  469. package/docs/user-facing/schema-evolution.md +1 -1
  470. package/lib/alpha.d.ts +2 -0
  471. package/lib/codec/codec.d.ts +33 -3
  472. package/lib/codec/codec.d.ts.map +1 -1
  473. package/lib/codec/codec.js +13 -3
  474. package/lib/codec/codec.js.map +1 -1
  475. package/lib/codec/index.d.ts +1 -1
  476. package/lib/codec/index.d.ts.map +1 -1
  477. package/lib/codec/index.js.map +1 -1
  478. package/lib/codec/versioned/codec.d.ts +35 -2
  479. package/lib/codec/versioned/codec.d.ts.map +1 -1
  480. package/lib/codec/versioned/codec.js +36 -2
  481. package/lib/codec/versioned/codec.js.map +1 -1
  482. package/lib/core/index.d.ts +1 -1
  483. package/lib/core/index.d.ts.map +1 -1
  484. package/lib/core/index.js +1 -1
  485. package/lib/core/index.js.map +1 -1
  486. package/lib/core/rebase/types.d.ts +2 -2
  487. package/lib/core/rebase/types.js +2 -2
  488. package/lib/core/rebase/types.js.map +1 -1
  489. package/lib/core/rebase/utils.d.ts +0 -2
  490. package/lib/core/rebase/utils.d.ts.map +1 -1
  491. package/lib/core/rebase/utils.js +6 -10
  492. package/lib/core/rebase/utils.js.map +1 -1
  493. package/lib/core/schema-stored/formatV1.d.ts +0 -1
  494. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  495. package/lib/core/schema-stored/formatV1.js +0 -1
  496. package/lib/core/schema-stored/formatV1.js.map +1 -1
  497. package/lib/core/schema-stored/index.d.ts +1 -1
  498. package/lib/core/schema-stored/index.d.ts.map +1 -1
  499. package/lib/core/schema-stored/index.js +1 -1
  500. package/lib/core/schema-stored/index.js.map +1 -1
  501. package/lib/core/schema-stored/schema.d.ts +6 -0
  502. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  503. package/lib/core/schema-stored/schema.js +7 -0
  504. package/lib/core/schema-stored/schema.js.map +1 -1
  505. package/lib/core/tree/anchorSet.d.ts +2 -1
  506. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  507. package/lib/core/tree/anchorSet.js +2 -1
  508. package/lib/core/tree/anchorSet.js.map +1 -1
  509. package/lib/core/tree/detachedFieldIndex.d.ts +2 -2
  510. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  511. package/lib/core/tree/detachedFieldIndex.js +6 -2
  512. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  513. package/lib/core/tree/mapTree.d.ts +2 -1
  514. package/lib/core/tree/mapTree.d.ts.map +1 -1
  515. package/lib/core/tree/mapTree.js +11 -5
  516. package/lib/core/tree/mapTree.js.map +1 -1
  517. package/lib/core/tree/pathTree.d.ts +12 -11
  518. package/lib/core/tree/pathTree.d.ts.map +1 -1
  519. package/lib/core/tree/pathTree.js +8 -7
  520. package/lib/core/tree/pathTree.js.map +1 -1
  521. package/lib/core/tree/treeTextFormat.d.ts +1 -1
  522. package/lib/core/tree/treeTextFormat.js +1 -1
  523. package/lib/core/tree/treeTextFormat.js.map +1 -1
  524. package/lib/core/tree/visitorUtils.d.ts +2 -2
  525. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  526. package/lib/core/tree/visitorUtils.js.map +1 -1
  527. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -1
  528. package/lib/feature-libraries/chunked-forest/chunkedForest.js +1 -1
  529. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  530. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -2
  531. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  532. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  533. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  534. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  535. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  536. package/lib/feature-libraries/default-schema/index.js +1 -1
  537. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  538. package/lib/feature-libraries/default-schema/schemaChecker.d.ts +17 -16
  539. package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  540. package/lib/feature-libraries/default-schema/schemaChecker.js +53 -37
  541. package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  542. package/lib/feature-libraries/flex-tree/context.d.ts +32 -8
  543. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  544. package/lib/feature-libraries/flex-tree/context.js +23 -7
  545. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  546. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +37 -16
  547. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  548. package/lib/feature-libraries/flex-tree/flexTreeTypes.js +7 -2
  549. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  550. package/lib/feature-libraries/flex-tree/index.d.ts +2 -2
  551. package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
  552. package/lib/feature-libraries/flex-tree/index.js.map +1 -1
  553. package/lib/feature-libraries/flex-tree/lazyField.d.ts +6 -6
  554. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  555. package/lib/feature-libraries/flex-tree/lazyField.js +1 -1
  556. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  557. package/lib/feature-libraries/flex-tree/lazyNode.d.ts +3 -2
  558. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  559. package/lib/feature-libraries/flex-tree/lazyNode.js +3 -0
  560. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  561. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  562. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  563. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -3
  564. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  565. package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -2
  566. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  567. package/lib/feature-libraries/index.d.ts +4 -4
  568. package/lib/feature-libraries/index.d.ts.map +1 -1
  569. package/lib/feature-libraries/index.js +3 -3
  570. package/lib/feature-libraries/index.js.map +1 -1
  571. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  572. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  573. package/lib/feature-libraries/indexing/anchorTreeIndex.js +1 -1
  574. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  575. package/lib/feature-libraries/mapTreeCursor.d.ts +39 -3
  576. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  577. package/lib/feature-libraries/mapTreeCursor.js +43 -7
  578. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  579. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  580. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  581. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  582. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  583. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  584. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  585. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  586. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  587. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  588. package/lib/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  589. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  590. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  591. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  592. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  593. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  594. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  595. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  596. package/lib/feature-libraries/modular-schema/isNeverTree.js +0 -2
  597. package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  598. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +1 -1
  599. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  600. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +5 -5
  601. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  602. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  603. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  604. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  605. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  606. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  607. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  608. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  609. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  610. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  611. package/lib/feature-libraries/object-forest/objectForest.d.ts +22 -5
  612. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  613. package/lib/feature-libraries/object-forest/objectForest.js +299 -209
  614. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  615. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  616. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  617. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +4 -3
  618. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  619. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  620. package/lib/feature-libraries/schema-index/codec.d.ts +6 -12
  621. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  622. package/lib/feature-libraries/schema-index/codec.js +8 -15
  623. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  624. package/lib/feature-libraries/schema-index/formatV1.d.ts +2 -2
  625. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  626. package/lib/feature-libraries/schema-index/formatV1.js +2 -2
  627. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  628. package/lib/feature-libraries/schema-index/index.d.ts +1 -1
  629. package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
  630. package/lib/feature-libraries/schema-index/index.js +1 -1
  631. package/lib/feature-libraries/schema-index/index.js.map +1 -1
  632. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  633. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  634. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  635. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  636. package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
  637. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  638. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  639. package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  640. package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
  641. package/lib/feature-libraries/sequence-field/rebase.js +1 -1
  642. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  643. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  644. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  645. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  646. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  647. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  648. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  649. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  650. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  651. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  652. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  653. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  654. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  655. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  656. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  657. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  658. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  659. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  660. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  661. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  662. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  663. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  664. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  665. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  666. package/lib/feature-libraries/sequence-field/utils.d.ts +7 -5
  667. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  668. package/lib/feature-libraries/sequence-field/utils.js +7 -5
  669. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  670. package/lib/feature-libraries/treeCursorUtils.d.ts +5 -1
  671. package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  672. package/lib/feature-libraries/treeCursorUtils.js +10 -4
  673. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  674. package/lib/feature-libraries/treeTextCursor.d.ts +1 -1
  675. package/lib/feature-libraries/treeTextCursor.js +1 -1
  676. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  677. package/lib/index.d.ts +3 -3
  678. package/lib/index.d.ts.map +1 -1
  679. package/lib/index.js +0 -2
  680. package/lib/index.js.map +1 -1
  681. package/lib/packageVersion.d.ts +1 -1
  682. package/lib/packageVersion.d.ts.map +1 -1
  683. package/lib/packageVersion.js +1 -1
  684. package/lib/packageVersion.js.map +1 -1
  685. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  686. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
  687. package/lib/shared-tree/independentView.d.ts +1 -1
  688. package/lib/shared-tree/independentView.d.ts.map +1 -1
  689. package/lib/shared-tree/independentView.js +10 -5
  690. package/lib/shared-tree/independentView.js.map +1 -1
  691. package/lib/shared-tree/index.d.ts +1 -1
  692. package/lib/shared-tree/index.d.ts.map +1 -1
  693. package/lib/shared-tree/index.js +1 -1
  694. package/lib/shared-tree/index.js.map +1 -1
  695. package/lib/shared-tree/schematizeTree.d.ts +1 -1
  696. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  697. package/lib/shared-tree/schematizeTree.js.map +1 -1
  698. package/lib/shared-tree/schematizingTreeView.d.ts +12 -2
  699. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  700. package/lib/shared-tree/schematizingTreeView.js +35 -22
  701. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  702. package/lib/shared-tree/sharedTree.d.ts +6 -6
  703. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  704. package/lib/shared-tree/sharedTree.js +12 -11
  705. package/lib/shared-tree/sharedTree.js.map +1 -1
  706. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  707. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  708. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  709. package/lib/shared-tree/tree.d.ts.map +1 -1
  710. package/lib/shared-tree/tree.js +2 -18
  711. package/lib/shared-tree/tree.js.map +1 -1
  712. package/lib/shared-tree/treeAlpha.d.ts +78 -5
  713. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  714. package/lib/shared-tree/treeAlpha.js +53 -9
  715. package/lib/shared-tree/treeAlpha.js.map +1 -1
  716. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  717. package/lib/shared-tree/treeCheckout.js +9 -5
  718. package/lib/shared-tree/treeCheckout.js.map +1 -1
  719. package/lib/shared-tree-core/branch.d.ts +2 -2
  720. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  721. package/lib/shared-tree-core/branch.js +2 -2
  722. package/lib/shared-tree-core/branch.js.map +1 -1
  723. package/lib/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  724. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  725. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  726. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  727. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  728. package/lib/shared-tree-core/editManager.d.ts +3 -1
  729. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  730. package/lib/shared-tree-core/editManager.js +4 -2
  731. package/lib/shared-tree-core/editManager.js.map +1 -1
  732. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  733. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  734. package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  735. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  736. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  737. package/lib/shared-tree-core/messageCodecs.d.ts +1 -1
  738. package/lib/shared-tree-core/messageCodecs.js +1 -1
  739. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  740. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  741. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  742. package/lib/shared-tree-core/sharedTreeCore.d.ts +2 -2
  743. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  744. package/lib/shared-tree-core/sharedTreeCore.js +4 -4
  745. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  746. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  747. package/lib/shared-tree-core/transaction.js +1 -1
  748. package/lib/shared-tree-core/transaction.js.map +1 -1
  749. package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  750. package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
  751. package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
  752. package/lib/simple-tree/api/conciseTree.js +1 -1
  753. package/lib/simple-tree/api/conciseTree.js.map +1 -1
  754. package/lib/simple-tree/api/configuration.d.ts +2 -2
  755. package/lib/simple-tree/api/configuration.js +2 -2
  756. package/lib/simple-tree/api/configuration.js.map +1 -1
  757. package/lib/simple-tree/api/create.d.ts +10 -29
  758. package/lib/simple-tree/api/create.d.ts.map +1 -1
  759. package/lib/simple-tree/api/create.js +23 -45
  760. package/lib/simple-tree/api/create.js.map +1 -1
  761. package/lib/simple-tree/api/customTree.d.ts +5 -1
  762. package/lib/simple-tree/api/customTree.d.ts.map +1 -1
  763. package/lib/simple-tree/api/customTree.js +10 -3
  764. package/lib/simple-tree/api/customTree.js.map +1 -1
  765. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  766. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
  767. package/lib/simple-tree/api/identifierIndex.js +1 -1
  768. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  769. package/lib/simple-tree/api/index.d.ts +2 -3
  770. package/lib/simple-tree/api/index.d.ts.map +1 -1
  771. package/lib/simple-tree/api/index.js +2 -5
  772. package/lib/simple-tree/api/index.js.map +1 -1
  773. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  774. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  775. package/lib/simple-tree/api/schemaFactory.d.ts +14 -6
  776. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  777. package/lib/simple-tree/api/schemaFactory.js +44 -15
  778. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  779. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  780. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  781. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -3
  782. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  783. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  784. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  785. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  786. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  787. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  788. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  789. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  790. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +1 -3
  791. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  792. package/lib/simple-tree/api/storedSchema.d.ts +1 -1
  793. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  794. package/lib/simple-tree/api/storedSchema.js +3 -2
  795. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  796. package/lib/simple-tree/api/tree.d.ts +2 -2
  797. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  798. package/lib/simple-tree/api/tree.js.map +1 -1
  799. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  800. package/lib/simple-tree/api/treeBeta.js +1 -1
  801. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  802. package/lib/simple-tree/api/treeNodeApi.d.ts +44 -6
  803. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  804. package/lib/simple-tree/api/treeNodeApi.js +55 -29
  805. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  806. package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
  807. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  808. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  809. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  810. package/lib/simple-tree/api/verboseTree.js +14 -11
  811. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  812. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  813. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +1 -3
  814. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  815. package/lib/simple-tree/core/context.d.ts.map +1 -1
  816. package/lib/simple-tree/core/context.js.map +1 -1
  817. package/lib/simple-tree/core/getOrCreateNode.d.ts +1 -1
  818. package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  819. package/lib/simple-tree/core/getOrCreateNode.js +3 -2
  820. package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
  821. package/lib/simple-tree/core/index.d.ts +2 -2
  822. package/lib/simple-tree/core/index.d.ts.map +1 -1
  823. package/lib/simple-tree/core/index.js +2 -2
  824. package/lib/simple-tree/core/index.js.map +1 -1
  825. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  826. package/lib/simple-tree/core/treeNode.js +1 -1
  827. package/lib/simple-tree/core/treeNode.js.map +1 -1
  828. package/lib/simple-tree/core/treeNodeKernel.d.ts +18 -28
  829. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  830. package/lib/simple-tree/core/treeNodeKernel.js +26 -34
  831. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  832. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  833. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  834. package/lib/simple-tree/core/types.d.ts.map +1 -1
  835. package/lib/simple-tree/core/types.js.map +1 -1
  836. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +128 -59
  837. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  838. package/lib/simple-tree/core/unhydratedFlexTree.js +167 -182
  839. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  840. package/lib/simple-tree/core/withType.d.ts +1 -1
  841. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  842. package/lib/simple-tree/core/withType.js.map +1 -1
  843. package/lib/simple-tree/createContext.d.ts.map +1 -1
  844. package/lib/simple-tree/createContext.js.map +1 -1
  845. package/lib/simple-tree/getTreeNodeForField.d.ts.map +1 -1
  846. package/lib/simple-tree/getTreeNodeForField.js.map +1 -1
  847. package/lib/simple-tree/index.d.ts +4 -11
  848. package/lib/simple-tree/index.d.ts.map +1 -1
  849. package/lib/simple-tree/index.js +4 -8
  850. package/lib/simple-tree/index.js.map +1 -1
  851. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  852. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  853. package/lib/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  854. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  855. package/lib/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +10 -11
  856. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  857. package/lib/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  858. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  859. package/lib/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  860. package/{dist/simple-tree → lib/simple-tree/node-kinds/array}/arrayNodeTypes.js.map +1 -1
  861. package/lib/simple-tree/node-kinds/array/index.d.ts +7 -0
  862. package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  863. package/lib/simple-tree/node-kinds/array/index.js +7 -0
  864. package/lib/simple-tree/node-kinds/array/index.js.map +1 -0
  865. package/lib/simple-tree/node-kinds/index.d.ts +8 -0
  866. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -0
  867. package/lib/simple-tree/node-kinds/index.js +8 -0
  868. package/lib/simple-tree/node-kinds/index.js.map +1 -0
  869. package/lib/simple-tree/node-kinds/map/index.d.ts +7 -0
  870. package/lib/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  871. package/lib/simple-tree/node-kinds/map/index.js +7 -0
  872. package/lib/simple-tree/node-kinds/map/index.js.map +1 -0
  873. package/{dist/simple-tree → lib/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  874. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  875. package/lib/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +9 -9
  876. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  877. package/lib/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  878. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  879. package/lib/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  880. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  881. package/lib/simple-tree/node-kinds/object/index.d.ts +7 -0
  882. package/lib/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  883. package/lib/simple-tree/node-kinds/object/index.js +7 -0
  884. package/lib/simple-tree/node-kinds/object/index.js.map +1 -0
  885. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNode.d.ts +6 -6
  886. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  887. package/lib/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +9 -17
  888. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  889. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  890. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  891. package/lib/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  892. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  893. package/lib/simple-tree/prepareForInsertion.d.ts +20 -6
  894. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  895. package/lib/simple-tree/prepareForInsertion.js +25 -19
  896. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  897. package/lib/simple-tree/schemaTypes.d.ts +9 -9
  898. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  899. package/lib/simple-tree/schemaTypes.js.map +1 -1
  900. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  901. package/lib/simple-tree/simpleSchema.js.map +1 -1
  902. package/lib/simple-tree/toStoredSchema.d.ts +6 -1
  903. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  904. package/lib/simple-tree/toStoredSchema.js +5 -2
  905. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  906. package/lib/simple-tree/treeNodeValid.d.ts +1 -1
  907. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  908. package/lib/simple-tree/treeNodeValid.js +2 -2
  909. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  910. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +72 -0
  911. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -0
  912. package/lib/simple-tree/{toMapTree.js → unhydratedFlexTreeFromInsertable.js} +138 -179
  913. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -0
  914. package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -1
  915. package/lib/simple-tree/walkFieldSchema.js.map +1 -1
  916. package/lib/tableSchema.d.ts +10 -10
  917. package/lib/treeFactory.d.ts +1 -1
  918. package/lib/treeFactory.d.ts.map +1 -1
  919. package/lib/treeFactory.js +7 -2
  920. package/lib/treeFactory.js.map +1 -1
  921. package/lib/util/bTreeUtils.d.ts.map +1 -1
  922. package/lib/util/bTreeUtils.js.map +1 -1
  923. package/lib/util/breakable.d.ts +23 -4
  924. package/lib/util/breakable.d.ts.map +1 -1
  925. package/lib/util/breakable.js +12 -3
  926. package/lib/util/breakable.js.map +1 -1
  927. package/lib/util/index.d.ts +1 -1
  928. package/lib/util/index.d.ts.map +1 -1
  929. package/lib/util/index.js +1 -1
  930. package/lib/util/index.js.map +1 -1
  931. package/lib/util/utils.d.ts +4 -0
  932. package/lib/util/utils.d.ts.map +1 -1
  933. package/lib/util/utils.js +6 -0
  934. package/lib/util/utils.js.map +1 -1
  935. package/package.json +22 -22
  936. package/src/codec/codec.ts +37 -6
  937. package/src/codec/index.ts +1 -0
  938. package/src/codec/versioned/codec.ts +42 -5
  939. package/src/core/index.ts +1 -0
  940. package/src/core/rebase/types.ts +2 -2
  941. package/src/core/rebase/utils.ts +10 -10
  942. package/src/core/schema-stored/formatV1.ts +0 -2
  943. package/src/core/schema-stored/index.ts +1 -0
  944. package/src/core/schema-stored/schema.ts +7 -0
  945. package/src/core/tree/anchorSet.ts +2 -1
  946. package/src/core/tree/detachedFieldIndex.ts +13 -4
  947. package/src/core/tree/mapTree.ts +22 -7
  948. package/src/core/tree/pathTree.ts +12 -11
  949. package/src/core/tree/treeTextFormat.ts +1 -1
  950. package/src/core/tree/visitorUtils.ts +2 -2
  951. package/src/feature-libraries/chunked-forest/chunkedForest.ts +1 -1
  952. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +4 -3
  953. package/src/feature-libraries/default-schema/index.ts +1 -1
  954. package/src/feature-libraries/default-schema/schemaChecker.ts +51 -35
  955. package/src/feature-libraries/flex-tree/context.ts +46 -15
  956. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +39 -17
  957. package/src/feature-libraries/flex-tree/index.ts +4 -0
  958. package/src/feature-libraries/flex-tree/lazyField.ts +9 -7
  959. package/src/feature-libraries/flex-tree/lazyNode.ts +6 -2
  960. package/src/feature-libraries/flex-tree/utilities.ts +1 -1
  961. package/src/feature-libraries/forest-summary/forestSummarizer.ts +4 -3
  962. package/src/feature-libraries/index.ts +10 -2
  963. package/src/feature-libraries/indexing/anchorTreeIndex.ts +4 -2
  964. package/src/feature-libraries/mapTreeCursor.ts +103 -16
  965. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +1 -0
  966. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +1 -1
  967. package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +1 -1
  968. package/src/feature-libraries/modular-schema/genericFieldKind.ts +4 -2
  969. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -0
  970. package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +1 -0
  971. package/src/feature-libraries/modular-schema/isNeverTree.ts +0 -2
  972. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +10 -6
  973. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2 -0
  974. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +1 -0
  975. package/src/feature-libraries/node-identifier/mockNodeIdentifierManager.ts +11 -5
  976. package/src/feature-libraries/object-forest/objectForest.ts +65 -7
  977. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +5 -8
  978. package/src/feature-libraries/schema-index/codec.ts +13 -21
  979. package/src/feature-libraries/schema-index/formatV1.ts +2 -2
  980. package/src/feature-libraries/schema-index/index.ts +0 -1
  981. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -1
  982. package/src/feature-libraries/sequence-field/formatV3.ts +1 -0
  983. package/src/feature-libraries/sequence-field/markQueue.ts +1 -0
  984. package/src/feature-libraries/sequence-field/prune.ts +1 -0
  985. package/src/feature-libraries/sequence-field/rebase.ts +1 -1
  986. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +1 -1
  987. package/src/feature-libraries/sequence-field/replaceRevisions.ts +3 -1
  988. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +2 -2
  989. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +3 -3
  990. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +3 -3
  991. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +2 -2
  992. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +1 -1
  993. package/src/feature-libraries/sequence-field/utils.ts +7 -5
  994. package/src/feature-libraries/treeCursorUtils.ts +23 -12
  995. package/src/feature-libraries/treeTextCursor.ts +1 -1
  996. package/src/index.ts +2 -4
  997. package/src/packageVersion.ts +1 -1
  998. package/src/shared-tree/checkoutFlexTreeView.ts +1 -0
  999. package/src/shared-tree/independentView.ts +10 -3
  1000. package/src/shared-tree/index.ts +4 -1
  1001. package/src/shared-tree/schematizeTree.ts +2 -1
  1002. package/src/shared-tree/schematizingTreeView.ts +42 -24
  1003. package/src/shared-tree/sharedTree.ts +35 -22
  1004. package/src/shared-tree/sharedTreeChangeFamily.ts +1 -1
  1005. package/src/shared-tree/tree.ts +6 -21
  1006. package/src/shared-tree/treeAlpha.ts +159 -29
  1007. package/src/shared-tree/treeCheckout.ts +9 -5
  1008. package/src/shared-tree-core/branch.ts +3 -4
  1009. package/src/shared-tree-core/branchCommitEnricher.ts +3 -1
  1010. package/src/shared-tree-core/defaultResubmitMachine.ts +2 -0
  1011. package/src/shared-tree-core/editManager.ts +4 -2
  1012. package/src/shared-tree-core/editManagerCodecs.ts +1 -0
  1013. package/src/shared-tree-core/editManagerSummarizer.ts +1 -1
  1014. package/src/shared-tree-core/messageCodecs.ts +1 -1
  1015. package/src/shared-tree-core/sequenceIdUtils.ts +1 -0
  1016. package/src/shared-tree-core/sharedTreeCore.ts +5 -5
  1017. package/src/shared-tree-core/transaction.ts +4 -2
  1018. package/src/shared-tree-core/transactionEnricher.ts +2 -0
  1019. package/src/simple-tree/api/conciseTree.ts +3 -2
  1020. package/src/simple-tree/api/configuration.ts +4 -4
  1021. package/src/simple-tree/api/create.ts +52 -99
  1022. package/src/simple-tree/api/customTree.ts +14 -4
  1023. package/src/simple-tree/api/getSimpleSchema.ts +1 -0
  1024. package/src/simple-tree/api/identifierIndex.ts +1 -1
  1025. package/src/simple-tree/api/index.ts +2 -14
  1026. package/src/simple-tree/api/schemaCompatibilityTester.ts +2 -0
  1027. package/src/simple-tree/api/schemaFactory.ts +89 -35
  1028. package/src/simple-tree/api/schemaFactoryAlpha.ts +8 -6
  1029. package/src/simple-tree/api/schemaFactoryRecursive.ts +3 -3
  1030. package/src/simple-tree/api/schemaFromSimple.ts +3 -1
  1031. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -3
  1032. package/src/simple-tree/api/storedSchema.ts +5 -4
  1033. package/src/simple-tree/api/tree.ts +3 -4
  1034. package/src/simple-tree/api/treeBeta.ts +3 -2
  1035. package/src/simple-tree/api/treeNodeApi.ts +115 -45
  1036. package/src/simple-tree/api/typesUnsafe.ts +1 -1
  1037. package/src/simple-tree/api/verboseTree.ts +16 -13
  1038. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +1 -3
  1039. package/src/simple-tree/core/context.ts +1 -0
  1040. package/src/simple-tree/core/getOrCreateNode.ts +6 -3
  1041. package/src/simple-tree/core/index.ts +2 -3
  1042. package/src/simple-tree/core/treeNode.ts +1 -1
  1043. package/src/simple-tree/core/treeNodeKernel.ts +47 -62
  1044. package/src/simple-tree/core/treeNodeSchema.ts +1 -0
  1045. package/src/simple-tree/core/types.ts +1 -1
  1046. package/src/simple-tree/core/unhydratedFlexTree.ts +224 -262
  1047. package/src/simple-tree/core/withType.ts +1 -1
  1048. package/src/simple-tree/createContext.ts +1 -0
  1049. package/src/simple-tree/getTreeNodeForField.ts +2 -0
  1050. package/src/simple-tree/index.ts +17 -24
  1051. package/src/simple-tree/leafNodeSchema.ts +1 -0
  1052. package/src/simple-tree/{arrayNode.ts → node-kinds/array/arrayNode.ts} +18 -19
  1053. package/src/simple-tree/{arrayNodeTypes.ts → node-kinds/array/arrayNodeTypes.ts} +3 -3
  1054. package/src/simple-tree/node-kinds/array/index.ts +18 -0
  1055. package/src/simple-tree/node-kinds/index.ts +39 -0
  1056. package/src/simple-tree/node-kinds/map/index.ts +16 -0
  1057. package/src/simple-tree/{mapNode.ts → node-kinds/map/mapNode.ts} +14 -17
  1058. package/src/simple-tree/{mapNodeTypes.ts → node-kinds/map/mapNodeTypes.ts} +3 -3
  1059. package/src/simple-tree/node-kinds/object/index.ts +16 -0
  1060. package/src/simple-tree/{objectNode.ts → node-kinds/object/objectNode.ts} +32 -45
  1061. package/src/simple-tree/{objectNodeTypes.ts → node-kinds/object/objectNodeTypes.ts} +5 -5
  1062. package/src/simple-tree/prepareForInsertion.ts +50 -43
  1063. package/src/simple-tree/schemaTypes.ts +12 -10
  1064. package/src/simple-tree/simpleSchema.ts +1 -0
  1065. package/src/simple-tree/toStoredSchema.ts +10 -3
  1066. package/src/simple-tree/treeNodeValid.ts +3 -3
  1067. package/src/simple-tree/{toMapTree.ts → unhydratedFlexTreeFromInsertable.ts} +138 -249
  1068. package/src/simple-tree/walkFieldSchema.ts +0 -1
  1069. package/src/treeFactory.ts +7 -2
  1070. package/src/util/bTreeUtils.ts +1 -0
  1071. package/src/util/breakable.ts +19 -4
  1072. package/src/util/index.ts +1 -0
  1073. package/src/util/utils.ts +7 -0
  1074. package/dist/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  1075. package/dist/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  1076. package/dist/simple-tree/api/testRecursiveDomain.js +0 -45
  1077. package/dist/simple-tree/api/testRecursiveDomain.js.map +0 -1
  1078. package/dist/simple-tree/arrayNode.d.ts.map +0 -1
  1079. package/dist/simple-tree/arrayNode.js.map +0 -1
  1080. package/dist/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  1081. package/dist/simple-tree/mapNode.d.ts.map +0 -1
  1082. package/dist/simple-tree/mapNode.js.map +0 -1
  1083. package/dist/simple-tree/mapNodeTypes.d.ts.map +0 -1
  1084. package/dist/simple-tree/mapNodeTypes.js.map +0 -1
  1085. package/dist/simple-tree/objectNode.d.ts.map +0 -1
  1086. package/dist/simple-tree/objectNode.js.map +0 -1
  1087. package/dist/simple-tree/objectNodeTypes.d.ts.map +0 -1
  1088. package/dist/simple-tree/objectNodeTypes.js.map +0 -1
  1089. package/dist/simple-tree/toMapTree.d.ts +0 -98
  1090. package/dist/simple-tree/toMapTree.d.ts.map +0 -1
  1091. package/dist/simple-tree/toMapTree.js.map +0 -1
  1092. package/lib/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  1093. package/lib/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  1094. package/lib/simple-tree/api/testRecursiveDomain.js +0 -41
  1095. package/lib/simple-tree/api/testRecursiveDomain.js.map +0 -1
  1096. package/lib/simple-tree/arrayNode.d.ts.map +0 -1
  1097. package/lib/simple-tree/arrayNode.js.map +0 -1
  1098. package/lib/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  1099. package/lib/simple-tree/arrayNodeTypes.js.map +0 -1
  1100. package/lib/simple-tree/mapNode.d.ts.map +0 -1
  1101. package/lib/simple-tree/mapNode.js.map +0 -1
  1102. package/lib/simple-tree/mapNodeTypes.d.ts.map +0 -1
  1103. package/lib/simple-tree/mapNodeTypes.js.map +0 -1
  1104. package/lib/simple-tree/objectNode.d.ts.map +0 -1
  1105. package/lib/simple-tree/objectNode.js.map +0 -1
  1106. package/lib/simple-tree/objectNodeTypes.d.ts.map +0 -1
  1107. package/lib/simple-tree/objectNodeTypes.js.map +0 -1
  1108. package/lib/simple-tree/toMapTree.d.ts +0 -98
  1109. package/lib/simple-tree/toMapTree.d.ts.map +0 -1
  1110. package/lib/simple-tree/toMapTree.js.map +0 -1
  1111. package/src/simple-tree/api/testRecursiveDomain.ts +0 -53
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { type FormatVersion, type IBinaryCodec, type ICodecFamily, type ICodecOptions, type IDecoder, type IEncoder, type IJsonCodec, type IMultiFormatCodec, type JsonValidator, makeCodecFamily, type SchemaValidationFunction, unitCodec, withDefaultBinaryEncoding, withSchemaValidation, FluidClientVersion, currentVersion, } from "./codec.js";
5
+ export { type FormatVersion, type IBinaryCodec, type ICodecFamily, type ICodecOptions, type CodecWriteOptions, type IDecoder, type IEncoder, type IJsonCodec, type IMultiFormatCodec, type JsonValidator, makeCodecFamily, type SchemaValidationFunction, unitCodec, withDefaultBinaryEncoding, withSchemaValidation, FluidClientVersion, currentVersion, } from "./codec.js";
6
6
  export { DiscriminatedUnionDispatcher, type DiscriminatedUnionLibrary, unionOptions, } from "./discriminatedUnions.js";
7
7
  export { noopValidator } from "./noopValidator.js";
8
8
  export { Versioned, makeVersionedCodec, makeVersionedValidatedCodec, makeVersionDispatchingCodec, } from "./versioned/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codec/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,KAAK,wBAAwB,EAC7B,SAAS,EACT,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,4BAA4B,EAC5B,KAAK,yBAAyB,EAC9B,YAAY,GACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACN,SAAS,EACT,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/codec/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,KAAK,wBAAwB,EAC7B,SAAS,EACT,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,4BAA4B,EAC5B,KAAK,yBAAyB,EAC9B,YAAY,GACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACN,SAAS,EACT,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/codec/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAUN,eAAe,EAEf,SAAS,EACT,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,4BAA4B,EAE5B,YAAY,GACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACN,SAAS,EACT,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype FormatVersion,\n\ttype IBinaryCodec,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IDecoder,\n\ttype IEncoder,\n\ttype IJsonCodec,\n\ttype IMultiFormatCodec,\n\ttype JsonValidator,\n\tmakeCodecFamily,\n\ttype SchemaValidationFunction,\n\tunitCodec,\n\twithDefaultBinaryEncoding,\n\twithSchemaValidation,\n\tFluidClientVersion,\n\tcurrentVersion,\n} from \"./codec.js\";\nexport {\n\tDiscriminatedUnionDispatcher,\n\ttype DiscriminatedUnionLibrary,\n\tunionOptions,\n} from \"./discriminatedUnions.js\";\nexport { noopValidator } from \"./noopValidator.js\";\nexport {\n\tVersioned,\n\tmakeVersionedCodec,\n\tmakeVersionedValidatedCodec,\n\tmakeVersionDispatchingCodec,\n} from \"./versioned/index.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/codec/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAWN,eAAe,EAEf,SAAS,EACT,yBAAyB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,GACd,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,4BAA4B,EAE5B,YAAY,GACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACN,SAAS,EACT,kBAAkB,EAClB,2BAA2B,EAC3B,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype FormatVersion,\n\ttype IBinaryCodec,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype CodecWriteOptions,\n\ttype IDecoder,\n\ttype IEncoder,\n\ttype IJsonCodec,\n\ttype IMultiFormatCodec,\n\ttype JsonValidator,\n\tmakeCodecFamily,\n\ttype SchemaValidationFunction,\n\tunitCodec,\n\twithDefaultBinaryEncoding,\n\twithSchemaValidation,\n\tFluidClientVersion,\n\tcurrentVersion,\n} from \"./codec.js\";\nexport {\n\tDiscriminatedUnionDispatcher,\n\ttype DiscriminatedUnionLibrary,\n\tunionOptions,\n} from \"./discriminatedUnions.js\";\nexport { noopValidator } from \"./noopValidator.js\";\nexport {\n\tVersioned,\n\tmakeVersionedCodec,\n\tmakeVersionedValidatedCodec,\n\tmakeVersionDispatchingCodec,\n} from \"./versioned/index.js\";\n"]}
@@ -4,16 +4,49 @@
4
4
  */
5
5
  import type { TSchema } from "@sinclair/typebox";
6
6
  import type { JsonCompatibleReadOnly } from "../../util/index.js";
7
- import { type ICodecFamily, type ICodecOptions, type IJsonCodec, type FormatVersion } from "../codec.js";
7
+ import { type ICodecFamily, type ICodecOptions, type IJsonCodec, type FormatVersion, type FluidClientVersion, type CodecWriteOptions } from "../codec.js";
8
8
  import { Versioned } from "./format.js";
9
9
  export declare function makeVersionedCodec<TDecoded, TEncoded extends Versioned = JsonCompatibleReadOnly & Versioned, TValidate = TEncoded, TContext = void>(supportedVersions: Set<FormatVersion>, { jsonValidator: validator }: ICodecOptions, inner: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>): IJsonCodec<TDecoded, TEncoded, TValidate, TContext>;
10
10
  export declare function makeVersionedValidatedCodec<EncodedSchema extends TSchema, TDecoded, TEncoded extends Versioned = JsonCompatibleReadOnly & Versioned, TValidate = TEncoded, TContext = void>(options: ICodecOptions, supportedVersions: Set<number>, schema: EncodedSchema, codec: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>): IJsonCodec<TDecoded, TEncoded, TValidate, TContext>;
11
11
  /**
12
12
  * Creates a codec which dispatches to the appropriate member of a codec family based on the version of
13
13
  * data it encounters.
14
- * Each member of the codec family must write an explicit version number into the data it encodes.
14
+ * @remarks
15
+ * Each member of the codec family must write an explicit version number into the data it encodes (implementing {@link Versioned}).
16
+ *
17
+ * TODO: Users of this should migrate to {@link ClientVersionDispatchingCodecBuilder} so that the actual format version used can be encapsulated.
15
18
  */
16
19
  export declare function makeVersionDispatchingCodec<TDecoded, TContext>(family: ICodecFamily<TDecoded, TContext>, options: ICodecOptions & {
17
20
  writeVersion: number;
18
21
  }): IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>;
22
+ /**
23
+ * Creates a codec which dispatches to the appropriate member of a codec family based on the `oldestCompatibleClient` for encode and the
24
+ * version number in data it encounters for decode.
25
+ * @privateRemarks
26
+ * This is a two stage builder so the first stage can encapsulate all codec specific details and the second can bring in configuration.
27
+ */
28
+ export declare class ClientVersionDispatchingCodecBuilder<TDecoded, TContext> {
29
+ /**
30
+ * The codec family to dispatch to.
31
+ */
32
+ private readonly family;
33
+ /**
34
+ * A function which maps a {@link FluidClientVersion} to a version number for the codec family which is supported by that version.
35
+ * This can (and typically does) pick the newest version of the codec which is known to be compatible with the client version so that
36
+ * any improvements in newer versions of the codec can be used when allowed.
37
+ */
38
+ private readonly versionMapping;
39
+ constructor(
40
+ /**
41
+ * The codec family to dispatch to.
42
+ */
43
+ family: ICodecFamily<TDecoded, TContext>,
44
+ /**
45
+ * A function which maps a {@link FluidClientVersion} to a version number for the codec family which is supported by that version.
46
+ * This can (and typically does) pick the newest version of the codec which is known to be compatible with the client version so that
47
+ * any improvements in newer versions of the codec can be used when allowed.
48
+ */
49
+ versionMapping: (oldestCompatibleClient: FluidClientVersion) => number);
50
+ build(options: CodecWriteOptions): IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext>;
51
+ }
19
52
  //# sourceMappingURL=codec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../src/codec/versioned/codec.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CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,GACxD,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,CAAC,CAMrD;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,EAC7D,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,EACxC,OAAO,EAAE,aAAa,GAAG;IAAE,YAAY,EAAE,MAAM,CAAA;CAAE,GAC/C,UAAU,CAAC,QAAQ,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,QAAQ,CAAC,CAYhF;AAED;;;;;GAKG;AACH,qBAAa,oCAAoC,CAAC,QAAQ,EAAE,QAAQ;IAElE;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,cAAc;;IAT/B;;OAEG;IACc,MAAM,EAAE,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACzD;;;;OAIG;IACc,cAAc,EAAE,CAAC,sBAAsB,EAAE,kBAAkB,KAAK,MAAM;IAGjF,KAAK,CACX,OAAO,EAAE,iBAAiB,GACxB,UAAU,CAAC,QAAQ,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,QAAQ,CAAC;CAIjF"}
@@ -3,8 +3,10 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { assert } from "@fluidframework/core-utils/internal";
6
+ import { UsageError } from "@fluidframework/telemetry-utils/internal";
6
7
  import { withSchemaValidation, } from "../codec.js";
7
8
  import { Versioned } from "./format.js";
9
+ import { pkgVersion } from "../../packageVersion.js";
8
10
  export function makeVersionedCodec(supportedVersions, { jsonValidator: validator }, inner) {
9
11
  const codec = {
10
12
  encode: (data, context) => {
@@ -14,7 +16,10 @@ export function makeVersionedCodec(supportedVersions, { jsonValidator: validator
14
16
  },
15
17
  decode: (data, context) => {
16
18
  const versioned = data; // Validated by withSchemaValidation
17
- assert(supportedVersions.has(versioned.version), 0x88c /* version being decoded is not supported */);
19
+ if (!supportedVersions.has(versioned.version)) {
20
+ throw new UsageError(`Unsupported version ${versioned.version} encountered while decoding data. Supported versions for this data are: ${Array.from(supportedVersions).join(", ")}.
21
+ The client which encoded this data likely specified an "oldestCompatibleClient" value which corresponds to a version newer than the version of this client ("${pkgVersion}").`);
22
+ }
18
23
  const decoded = inner.decode(data, context);
19
24
  return decoded;
20
25
  },
@@ -29,7 +34,10 @@ export function makeVersionedValidatedCodec(options, supportedVersions, schema,
29
34
  /**
30
35
  * Creates a codec which dispatches to the appropriate member of a codec family based on the version of
31
36
  * data it encounters.
32
- * Each member of the codec family must write an explicit version number into the data it encodes.
37
+ * @remarks
38
+ * Each member of the codec family must write an explicit version number into the data it encodes (implementing {@link Versioned}).
39
+ *
40
+ * TODO: Users of this should migrate to {@link ClientVersionDispatchingCodecBuilder} so that the actual format version used can be encapsulated.
33
41
  */
34
42
  export function makeVersionDispatchingCodec(family, options) {
35
43
  const writeCodec = family.resolve(options.writeVersion).json;
@@ -44,4 +52,30 @@ export function makeVersionDispatchingCodec(family, options) {
44
52
  },
45
53
  });
46
54
  }
55
+ /**
56
+ * Creates a codec which dispatches to the appropriate member of a codec family based on the `oldestCompatibleClient` for encode and the
57
+ * version number in data it encounters for decode.
58
+ * @privateRemarks
59
+ * This is a two stage builder so the first stage can encapsulate all codec specific details and the second can bring in configuration.
60
+ */
61
+ export class ClientVersionDispatchingCodecBuilder {
62
+ constructor(
63
+ /**
64
+ * The codec family to dispatch to.
65
+ */
66
+ family,
67
+ /**
68
+ * A function which maps a {@link FluidClientVersion} to a version number for the codec family which is supported by that version.
69
+ * This can (and typically does) pick the newest version of the codec which is known to be compatible with the client version so that
70
+ * any improvements in newer versions of the codec can be used when allowed.
71
+ */
72
+ versionMapping) {
73
+ this.family = family;
74
+ this.versionMapping = versionMapping;
75
+ }
76
+ build(options) {
77
+ const writeVersion = this.versionMapping(options.oldestCompatibleClient);
78
+ return makeVersionDispatchingCodec(this.family, { ...options, writeVersion });
79
+ }
80
+ }
47
81
  //# sourceMappingURL=codec.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/codec/versioned/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAI7D,OAAO,EAIN,oBAAoB,GAEpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,UAAU,kBAAkB,CAMjC,iBAAqC,EACrC,EAAE,aAAa,EAAE,SAAS,EAAiB,EAC3C,KAA0D;IAE1D,MAAM,KAAK,GAAG;QACb,MAAM,EAAE,CAAC,IAAc,EAAE,OAAiB,EAAY,EAAE;YACvD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC5C,MAAM,CACL,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,EACtC,KAAK,CAAC,+CAA+C,CACrD,CAAC;YACF,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,CAAC,IAAe,EAAE,OAAiB,EAAY,EAAE;YACxD,MAAM,SAAS,GAAG,IAAiB,CAAC,CAAC,oCAAoC;YACzE,MAAM,CACL,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,EACxC,KAAK,CAAC,4CAA4C,CAClD,CAAC;YACF,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC5C,OAAO,OAAO,CAAC;QAChB,CAAC;KACD,CAAC;IAEF,OAAO,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC;QACtC,CAAC,CAAC,KAAK;QACP,CAAC,CAAC,oBAAoB,CAAC,SAAS,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,2BAA2B,CAO1C,OAAsB,EACtB,iBAA8B,EAC9B,MAAqB,EACrB,KAA0D;IAE1D,OAAO,kBAAkB,CACxB,iBAAiB,EACjB,OAAO,EACP,oBAAoB,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,aAAa,CAAC,CAC1D,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,2BAA2B,CAC1C,MAAwC,EACxC,OAAiD;IAEjD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC;IAC7D,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAChE,OAAO,kBAAkB,CAAC,iBAAiB,EAAE,OAAO,EAAE;QACrD,MAAM,CAAC,IAAI,EAAE,OAAO;YACnB,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAc,CAAC;QACtD,CAAC;QACD,MAAM,CAAC,IAAe,EAAE,OAAO;YAC9B,MAAM,KAAK,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC3C,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACzC,CAAC;KACD,CAAC,CAAC;AACJ,CAAC","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 { TSchema } from \"@sinclair/typebox\";\n\nimport type { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport {\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\twithSchemaValidation,\n\ttype FormatVersion,\n} from \"../codec.js\";\n\nimport { Versioned } from \"./format.js\";\n\nexport function makeVersionedCodec<\n\tTDecoded,\n\tTEncoded extends Versioned = JsonCompatibleReadOnly & Versioned,\n\tTValidate = TEncoded,\n\tTContext = void,\n>(\n\tsupportedVersions: Set<FormatVersion>,\n\t{ jsonValidator: validator }: ICodecOptions,\n\tinner: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>,\n): IJsonCodec<TDecoded, TEncoded, TValidate, TContext> {\n\tconst codec = {\n\t\tencode: (data: TDecoded, context: TContext): TEncoded => {\n\t\t\tconst encoded = inner.encode(data, context);\n\t\t\tassert(\n\t\t\t\tsupportedVersions.has(encoded.version),\n\t\t\t\t0x88b /* version being encoded should be supported */,\n\t\t\t);\n\t\t\treturn encoded;\n\t\t},\n\t\tdecode: (data: TValidate, context: TContext): TDecoded => {\n\t\t\tconst versioned = data as Versioned; // Validated by withSchemaValidation\n\t\t\tassert(\n\t\t\t\tsupportedVersions.has(versioned.version),\n\t\t\t\t0x88c /* version being decoded is not supported */,\n\t\t\t);\n\t\t\tconst decoded = inner.decode(data, context);\n\t\t\treturn decoded;\n\t\t},\n\t};\n\n\treturn supportedVersions.has(undefined)\n\t\t? codec\n\t\t: withSchemaValidation(Versioned, codec, validator);\n}\n\nexport function makeVersionedValidatedCodec<\n\tEncodedSchema extends TSchema,\n\tTDecoded,\n\tTEncoded extends Versioned = JsonCompatibleReadOnly & Versioned,\n\tTValidate = TEncoded,\n\tTContext = void,\n>(\n\toptions: ICodecOptions,\n\tsupportedVersions: Set<number>,\n\tschema: EncodedSchema,\n\tcodec: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>,\n): IJsonCodec<TDecoded, TEncoded, TValidate, TContext> {\n\treturn makeVersionedCodec(\n\t\tsupportedVersions,\n\t\toptions,\n\t\twithSchemaValidation(schema, codec, options.jsonValidator),\n\t);\n}\n\n/**\n * Creates a codec which dispatches to the appropriate member of a codec family based on the version of\n * data it encounters.\n * Each member of the codec family must write an explicit version number into the data it encodes.\n */\nexport function makeVersionDispatchingCodec<TDecoded, TContext>(\n\tfamily: ICodecFamily<TDecoded, TContext>,\n\toptions: ICodecOptions & { writeVersion: number },\n): IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\n\tconst writeCodec = family.resolve(options.writeVersion).json;\n\tconst supportedVersions = new Set(family.getSupportedFormats());\n\treturn makeVersionedCodec(supportedVersions, options, {\n\t\tencode(data, context): Versioned {\n\t\t\treturn writeCodec.encode(data, context) as Versioned;\n\t\t},\n\t\tdecode(data: Versioned, context) {\n\t\t\tconst codec = family.resolve(data.version);\n\t\t\treturn codec.json.decode(data, context);\n\t\t},\n\t});\n}\n"]}
1
+ {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/codec/versioned/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAItE,OAAO,EAIN,oBAAoB,GAIpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,MAAM,UAAU,kBAAkB,CAMjC,iBAAqC,EACrC,EAAE,aAAa,EAAE,SAAS,EAAiB,EAC3C,KAA0D;IAE1D,MAAM,KAAK,GAAG;QACb,MAAM,EAAE,CAAC,IAAc,EAAE,OAAiB,EAAY,EAAE;YACvD,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAC5C,MAAM,CACL,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,EACtC,KAAK,CAAC,+CAA+C,CACrD,CAAC;YACF,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,CAAC,IAAe,EAAE,OAAiB,EAAY,EAAE;YACxD,MAAM,SAAS,GAAG,IAAiB,CAAC,CAAC,oCAAoC;YACzE,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,SAAS,C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C,CAAC;YAC3C,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACzC,CAAC;KACD,CAAC,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,OAAO,oCAAoC;IAChD;IACC;;OAEG;IACc,MAAwC;IACzD;;;;OAIG;IACc,cAAsE;QANtE,WAAM,GAAN,MAAM,CAAkC;QAMxC,mBAAc,GAAd,cAAc,CAAwD;IACrF,CAAC;IAEG,KAAK,CACX,OAA0B;QAE1B,MAAM,YAAY,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,sBAAsB,CAAC,CAAC;QACzE,OAAO,2BAA2B,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;IAC/E,CAAC;CACD","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 { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport type { TSchema } from \"@sinclair/typebox\";\n\nimport type { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport {\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\twithSchemaValidation,\n\ttype FormatVersion,\n\ttype FluidClientVersion,\n\ttype CodecWriteOptions,\n} from \"../codec.js\";\n\nimport { Versioned } from \"./format.js\";\nimport { pkgVersion } from \"../../packageVersion.js\";\n\nexport function makeVersionedCodec<\n\tTDecoded,\n\tTEncoded extends Versioned = JsonCompatibleReadOnly & Versioned,\n\tTValidate = TEncoded,\n\tTContext = void,\n>(\n\tsupportedVersions: Set<FormatVersion>,\n\t{ jsonValidator: validator }: ICodecOptions,\n\tinner: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>,\n): IJsonCodec<TDecoded, TEncoded, TValidate, TContext> {\n\tconst codec = {\n\t\tencode: (data: TDecoded, context: TContext): TEncoded => {\n\t\t\tconst encoded = inner.encode(data, context);\n\t\t\tassert(\n\t\t\t\tsupportedVersions.has(encoded.version),\n\t\t\t\t0x88b /* version being encoded should be supported */,\n\t\t\t);\n\t\t\treturn encoded;\n\t\t},\n\t\tdecode: (data: TValidate, context: TContext): TDecoded => {\n\t\t\tconst versioned = data as Versioned; // Validated by withSchemaValidation\n\t\t\tif (!supportedVersions.has(versioned.version)) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t`Unsupported version ${versioned.version} encountered while decoding data. Supported versions for this data are: ${Array.from(supportedVersions).join(\", \")}.\nThe client which encoded this data likely specified an \"oldestCompatibleClient\" value which corresponds to a version newer than the version of this client (\"${pkgVersion}\").`,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst decoded = inner.decode(data, context);\n\t\t\treturn decoded;\n\t\t},\n\t};\n\n\treturn supportedVersions.has(undefined)\n\t\t? codec\n\t\t: withSchemaValidation(Versioned, codec, validator);\n}\n\nexport function makeVersionedValidatedCodec<\n\tEncodedSchema extends TSchema,\n\tTDecoded,\n\tTEncoded extends Versioned = JsonCompatibleReadOnly & Versioned,\n\tTValidate = TEncoded,\n\tTContext = void,\n>(\n\toptions: ICodecOptions,\n\tsupportedVersions: Set<number>,\n\tschema: EncodedSchema,\n\tcodec: IJsonCodec<TDecoded, TEncoded, TValidate, TContext>,\n): IJsonCodec<TDecoded, TEncoded, TValidate, TContext> {\n\treturn makeVersionedCodec(\n\t\tsupportedVersions,\n\t\toptions,\n\t\twithSchemaValidation(schema, codec, options.jsonValidator),\n\t);\n}\n\n/**\n * Creates a codec which dispatches to the appropriate member of a codec family based on the version of\n * data it encounters.\n * @remarks\n * Each member of the codec family must write an explicit version number into the data it encodes (implementing {@link Versioned}).\n *\n * TODO: Users of this should migrate to {@link ClientVersionDispatchingCodecBuilder} so that the actual format version used can be encapsulated.\n */\nexport function makeVersionDispatchingCodec<TDecoded, TContext>(\n\tfamily: ICodecFamily<TDecoded, TContext>,\n\toptions: ICodecOptions & { writeVersion: number },\n): IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\n\tconst writeCodec = family.resolve(options.writeVersion).json;\n\tconst supportedVersions = new Set(family.getSupportedFormats());\n\treturn makeVersionedCodec(supportedVersions, options, {\n\t\tencode(data, context): Versioned {\n\t\t\treturn writeCodec.encode(data, context) as Versioned;\n\t\t},\n\t\tdecode(data: Versioned, context) {\n\t\t\tconst codec = family.resolve(data.version);\n\t\t\treturn codec.json.decode(data, context);\n\t\t},\n\t});\n}\n\n/**\n * Creates a codec which dispatches to the appropriate member of a codec family based on the `oldestCompatibleClient` for encode and the\n * version number in data it encounters for decode.\n * @privateRemarks\n * This is a two stage builder so the first stage can encapsulate all codec specific details and the second can bring in configuration.\n */\nexport class ClientVersionDispatchingCodecBuilder<TDecoded, TContext> {\n\tpublic constructor(\n\t\t/**\n\t\t * The codec family to dispatch to.\n\t\t */\n\t\tprivate readonly family: ICodecFamily<TDecoded, TContext>,\n\t\t/**\n\t\t * A function which maps a {@link FluidClientVersion} to a version number for the codec family which is supported by that version.\n\t\t * This can (and typically does) pick the newest version of the codec which is known to be compatible with the client version so that\n\t\t * any improvements in newer versions of the codec can be used when allowed.\n\t\t */\n\t\tprivate readonly versionMapping: (oldestCompatibleClient: FluidClientVersion) => number,\n\t) {}\n\n\tpublic build(\n\t\toptions: CodecWriteOptions,\n\t): IJsonCodec<TDecoded, JsonCompatibleReadOnly, JsonCompatibleReadOnly, TContext> {\n\t\tconst writeVersion = this.versionMapping(options.oldestCompatibleClient);\n\t\treturn makeVersionDispatchingCodec(this.family, { ...options, writeVersion });\n\t}\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export { EmptyKey, type TreeType, type Value, type TreeValue, AnchorSet, type DetachedField, type UpPath, type NormalizedUpPath, type INormalizedUpPath, type NormalizedFieldUpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, type FieldUpPath, type Anchor, type RootField, type ChildCollection, type ChildLocation, type FieldMapObject, type NodeData, type GenericTreeNode, type JsonableTree, EncodedJsonableTree, rootFieldKey, rootField, type ITreeCursor, CursorLocationType, type ITreeCursorSynchronous, castCursorToSynchronous, type GenericFieldsNode, type AnchorLocator, genericTreeKeys, getGenericTreeField, genericTreeDeleteIfEmpty, getDepth, mapCursorField, mapCursorFields, iterateCursorField, type MapTree, detachedFieldAsKey, keyAsDetachedField, visitDelta, createAnnouncedVisitor, combineVisitors, announceDelta, applyDelta, makeDetachedFieldIndex, setGenericTreeField, type DeltaVisitor, type AnnouncedVisitor, SparseNode, getDescendant, compareUpPaths, clonePath, topDownPath, compareFieldUpPaths, forEachNode, forEachNodeInSubtree, forEachField, type PathRootPrefix, deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, type AnchorSlot, type AnchorNode, anchorSlot, type UpPathDefault, isDetachedUpPath, inCursorField, inCursorNode, type AnchorEvents, type AnchorSetRootEvents, type ProtoNodes, CursorMarker, isCursor, DetachedFieldIndex, type ForestRootId, getDetachedFieldContainingPath, aboveRootPlaceholder, type DeltaRoot, type DeltaMark, type DeltaDetachedNodeId, type DeltaFieldMap, type DeltaDetachedNodeChanges, type DeltaDetachedNodeBuild, type DeltaDetachedNodeDestruction, type DeltaDetachedNodeRename, type DeltaFieldChanges, type ExclusiveMapTree, deepCopyMapTree, type TreeChunk, dummyRoot, cursorChunk, tryGetChunk, type ChunkedCursor, } from "./tree/index.js";
6
6
  export { TreeNavigationResult, type IEditableForest, type IForestSubscription, type TreeLocation, type FieldLocation, type ForestLocation, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, type FieldAnchor, moveToDetachedField, type ForestEvents, } from "./forest/index.js";
7
- export { type FieldKey, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type TreeStoredSchemaSubscription, type MutableTreeStoredSchema, type FieldKindIdentifier, type FieldKindData, type TreeTypeSet, type TreeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, type SchemaEvents, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, type StoredSchemaCollection, schemaFormatV1, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, type SchemaAndPolicy, Multiplicity, type SchemaPolicy, } from "./schema-stored/index.js";
7
+ export { type FieldKey, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type TreeStoredSchemaSubscription, type MutableTreeStoredSchema, type FieldKindIdentifier, type FieldKindData, type TreeTypeSet, type TreeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, type SchemaEvents, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, type StoredSchemaCollection, schemaFormatV1, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, type SchemaAndPolicy, Multiplicity, type SchemaPolicy, SchemaVersion, } from "./schema-stored/index.js";
8
8
  export { type ChangeFamily, type ChangeFamilyCodec, type ChangeEncodingContext, type ChangeFamilyEditor, EditBuilder, } from "./change-family/index.js";
9
9
  export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, type ChangeRebaser, findAncestor, findCommonAncestor, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, RevisionTagCodec, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, type TaggedChange, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, type RevisionMetadataSource, revisionMetadataSourceFromInfo, type RevisionInfo, type EncodedRevisionTag, type EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, subtractChangeAtomIds, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, isAncestor, type ChangeAtomIdRangeMap, newChangeAtomIdRangeMap, compareRevisions, } from "./rebase/index.js";
10
10
  export { type Adapters, AdaptedViewSchema, type TreeAdapter, } from "./schema-view/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,KAAK,OAAO,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,KAAK,cAAc,EACnB,0BAA0B,EAC1B,kBAAkB,EA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5B,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,YAAY,GACjB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,WAAW,GACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACN,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,KAAK,aAAa,EAClB,YAAY,EACZ,kBAAkB,EAClB,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,UAAU,EACV,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,iBAAiB,EACjB,KAAK,WAAW,GAChB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ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B,EAChB,cAAc,EACd,KAAK,aAAa,EAClB,YAAY,EACZ,kBAAkB,EAClB,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,UAAU,EACV,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,iBAAiB,EACjB,KAAK,WAAW,GAChB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC"}
package/lib/core/index.js CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export { EmptyKey, AnchorSet, EncodedJsonableTree, rootFieldKey, rootField, CursorLocationType, castCursorToSynchronous, genericTreeKeys, getGenericTreeField, genericTreeDeleteIfEmpty, getDepth, mapCursorField, mapCursorFields, iterateCursorField, detachedFieldAsKey, keyAsDetachedField, visitDelta, createAnnouncedVisitor, combineVisitors, announceDelta, applyDelta, makeDetachedFieldIndex, setGenericTreeField, SparseNode, getDescendant, compareUpPaths, clonePath, topDownPath, compareFieldUpPaths, forEachNode, forEachNodeInSubtree, forEachField, deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, anchorSlot, isDetachedUpPath, inCursorField, inCursorNode, CursorMarker, isCursor, DetachedFieldIndex, getDetachedFieldContainingPath, aboveRootPlaceholder, deepCopyMapTree, dummyRoot, cursorChunk, tryGetChunk, } from "./tree/index.js";
6
6
  export { TreeNavigationResult, ITreeSubscriptionCursorState, moveToDetachedField, } from "./forest/index.js";
7
- export { ValueSchema, TreeNodeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, schemaFormatV1, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, Multiplicity, } from "./schema-stored/index.js";
7
+ export { ValueSchema, TreeNodeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, schemaFormatV1, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, Multiplicity, SchemaVersion, } from "./schema-stored/index.js";
8
8
  export { EditBuilder, } from "./change-family/index.js";
9
9
  export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, findAncestor, findCommonAncestor, CommitKind, RevisionTagSchema, RevisionTagCodec, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, rebaseChange, rebaseChangeOverChanges, revisionMetadataSourceFromInfo, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, subtractChangeAtomIds, replaceAtomRevisions, replaceChange, isAncestor, newChangeAtomIdRangeMap, compareRevisions, } from "./rebase/index.js";
10
10
  export { AdaptedViewSchema, } from "./schema-view/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src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cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EAEZ,YAAY,EACZ,uBAAuB,EAEvB,8BAA8B,EAI9B,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EAGb,UAAU,EAEV,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAEN,iBAAiB,GAEjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEN,gBAAgB,GAIhB,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype NormalizedUpPath,\n\ttype INormalizedUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\tEncodedJsonableTree,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\tcastCursorToSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tgenericTreeDeleteIfEmpty,\n\tgetDepth,\n\tmapCursorField,\n\tmapCursorFields,\n\titerateCursorField,\n\ttype MapTree,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\tvisitDelta,\n\tcreateAnnouncedVisitor,\n\tcombineVisitors,\n\tannounceDelta,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tsetGenericTreeField,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tisDetachedUpPath,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype ExclusiveMapTree,\n\tdeepCopyMapTree,\n\ttype TreeChunk,\n\tdummyRoot,\n\tcursorChunk,\n\ttryGetChunk,\n\ttype ChunkedCursor,\n} from \"./tree/index.js\";\n\nexport {\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest/index.js\";\n\nexport {\n\ttype FieldKey,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype FieldKindData,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tschemaFormatV1,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tstoredSchemaDecodeDispatcher,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\n} from \"./schema-stored/index.js\";\n\nexport {\n\ttype ChangeFamily,\n\ttype ChangeFamilyCodec,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamilyEditor,\n\tEditBuilder,\n} from \"./change-family/index.js\";\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\ttype ChangeRebaser,\n\tfindAncestor,\n\tfindCommonAncestor,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tRevisionTagCodec,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\tSessionIdSchema,\n\tmintCommit,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\ttype RevisionMetadataSource,\n\trevisionMetadataSourceFromInfo,\n\ttype RevisionInfo,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\tsubtractChangeAtomIds,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n\tisAncestor,\n\ttype ChangeAtomIdRangeMap,\n\tnewChangeAtomIdRangeMap,\n\tcompareRevisions,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\ttype TreeAdapter,\n} from \"./schema-view/index.js\";\n\nexport {\n\ttype Revertible,\n\tRevertibleStatus,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./revertible.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EAIR,SAAS,EAoBT,mBAAmB,EACnB,YAAY,EACZ,SAAS,EAET,kBAAkB,EAElB,uBAAuB,EAGvB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAElB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EAGnB,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,YAAY,EAEZ,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,UAAU,EAGV,UAAU,EAEV,gBAAgB,EAChB,aAAa,EACb,YAAY,EAIZ,YAAY,EACZ,QAAQ,EACR,kBAAkB,EAElB,8BAA8B,EAC9B,oBAAoB,EAWpB,eAAe,EAEf,SAAS,EACT,WAAW,EACX,WAAW,GAEX,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACN,oBAAoB,EAOpB,4BAA4B,EAE5B,mBAAmB,GAEnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAIN,WAAW,EACX,oBAAoB,EAOpB,0BAA0B,EAC1B,iBAAiB,EAEjB,4BAA4B,EAC5B,6BAA6B,EAC7B,sBAAsB,EAEtB,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,4BAA4B,EAE5B,YAAY,EAEZ,aAAa,GACb,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAKN,WAAW,GACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACN,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACZ,kBAAkB,EAElB,UAAU,EAGV,iBAAiB,EACjB,gBAAgB,EAKhB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EAEZ,YAAY,EACZ,uBAAuB,EAEvB,8BAA8B,EAI9B,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EAGb,UAAU,EAEV,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAEN,iBAAiB,GAEjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAEN,gBAAgB,GAIhB,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype NormalizedUpPath,\n\ttype INormalizedUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\tEncodedJsonableTree,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\tcastCursorToSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tgenericTreeDeleteIfEmpty,\n\tgetDepth,\n\tmapCursorField,\n\tmapCursorFields,\n\titerateCursorField,\n\ttype MapTree,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\tvisitDelta,\n\tcreateAnnouncedVisitor,\n\tcombineVisitors,\n\tannounceDelta,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tsetGenericTreeField,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tisDetachedUpPath,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype ExclusiveMapTree,\n\tdeepCopyMapTree,\n\ttype TreeChunk,\n\tdummyRoot,\n\tcursorChunk,\n\ttryGetChunk,\n\ttype ChunkedCursor,\n} from \"./tree/index.js\";\n\nexport {\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest/index.js\";\n\nexport {\n\ttype FieldKey,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype FieldKindData,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tschemaFormatV1,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tstoredSchemaDecodeDispatcher,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\n\tSchemaVersion,\n} from \"./schema-stored/index.js\";\n\nexport {\n\ttype ChangeFamily,\n\ttype ChangeFamilyCodec,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamilyEditor,\n\tEditBuilder,\n} from \"./change-family/index.js\";\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\ttype ChangeRebaser,\n\tfindAncestor,\n\tfindCommonAncestor,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tRevisionTagCodec,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\tSessionIdSchema,\n\tmintCommit,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\ttype RevisionMetadataSource,\n\trevisionMetadataSourceFromInfo,\n\ttype RevisionInfo,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\tsubtractChangeAtomIds,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n\tisAncestor,\n\ttype ChangeAtomIdRangeMap,\n\tnewChangeAtomIdRangeMap,\n\tcompareRevisions,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\ttype TreeAdapter,\n} from \"./schema-view/index.js\";\n\nexport {\n\ttype Revertible,\n\tRevertibleStatus,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./revertible.js\";\n"]}
@@ -46,12 +46,12 @@ export type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | Chang
46
46
  */
47
47
  export type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;
48
48
  /**
49
- * @returns true iff `a` and `b` are the same.
49
+ * Returns true iff `a` and `b` are the same.
50
50
  */
51
51
  export declare function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean;
52
52
  export declare function areEqualChangeAtomIdOpts(a: ChangeAtomId | undefined, b: ChangeAtomId | undefined): boolean;
53
53
  /**
54
- * @returns a ChangeAtomId with the given revision and local ID.
54
+ * Returns a ChangeAtomId with the given revision and local ID.
55
55
  */
56
56
  export declare function makeChangeAtomId(localId: ChangesetLocalId, revision?: RevisionTag): ChangeAtomId;
57
57
  export declare function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId;
@@ -13,7 +13,7 @@ export const RevisionTagSchema = Type.Union([
13
13
  brandedNumberType(),
14
14
  ]);
15
15
  /**
16
- * @returns true iff `a` and `b` are the same.
16
+ * Returns true iff `a` and `b` are the same.
17
17
  */
18
18
  export function areEqualChangeAtomIds(a, b) {
19
19
  return a.localId === b.localId && a.revision === b.revision;
@@ -25,7 +25,7 @@ export function areEqualChangeAtomIdOpts(a, b) {
25
25
  return areEqualChangeAtomIds(a, b);
26
26
  }
27
27
  /**
28
- * @returns a ChangeAtomId with the given revision and local ID.
28
+ * Returns a ChangeAtomId with the given revision and local ID.
29
29
  */
30
30
  export function makeChangeAtomId(localId, revision) {
31
31
  return revision === undefined ? { localId } : { localId, revision };
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAGN,QAAQ,EACR,KAAK,EACL,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,EAAa,CAAC;AAW9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC;IAC3C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACpB,iBAAiB,EAAuC;CACxD,CAAC,CAAC;AAiCH;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,CAAe,EAAE,CAAe;IACrE,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,wBAAwB,CACvC,CAA2B,EAC3B,CAA2B;IAE3B,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,CAAC,KAAK,CAAC,CAAC;IAChB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AAC,CAAC,CAAC,CAAC;IACjC,CAAC;SAAM,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,CAAC,CAAC;IACV,CAAC;SAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC,CAAC;IACX,CAAC;SAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC;IACV,CAAC;IAED,OAAO,CAAC,CAAC;AACV,CAAC","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\tRangeMap,\n\tbrand,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\n\n/**\n * The identifier for a particular session/user/client that can generate `GraphCommit`s\n */\nexport const SessionIdSchema = brandedStringType<SessionId>();\n\n/**\n * A unique identifier for a commit. Commits that have been rebased, but are semantically\n * the same, will share the same revision tag.\n *\n * The constant 'root' is reserved for the trunk base: minting a SessionSpaceCompressedId is not\n * possible on readonly clients. These clients generally don't need ids, but must be done at tree initialization time.\n */\nexport type RevisionTag = SessionSpaceCompressedId | \"root\";\nexport type EncodedRevisionTag = Brand<OpSpaceCompressedId, \"EncodedRevisionTag\"> | \"root\";\nexport const RevisionTagSchema = Type.Union([\n\tType.Literal(\"root\"),\n\tbrandedNumberType<Exclude<EncodedRevisionTag, string>>(),\n]);\n\n/**\n * An ID which is unique within a revision of a `ModularChangeset`.\n * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s,\n * but they are unique when qualified by the revision of the change they are used in.\n */\nexport type ChangesetLocalId = Brand<number, \"ChangesetLocalId\">;\n\n/**\n * A globally unique ID for an atom of change, or a node associated with the atom of change.\n * *\n * @privateRemarks\n * TODO: Rename this to be more general.\n */\nexport interface ChangeAtomId {\n\t/**\n\t * Uniquely identifies the changeset within which the change was made.\n\t * Only undefined when referring to an anonymous changesets.\n\t */\n\treadonly revision?: RevisionTag;\n\t/**\n\t * Uniquely identifies, in the scope of the changeset, the change made to the field.\n\t */\n\treadonly localId: ChangesetLocalId;\n}\n\nexport type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | ChangesetLocalId;\n\n/**\n */\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n * @returns true iff `a` and `b` are the same.\n */\nexport function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean {\n\treturn a.localId === b.localId && a.revision === b.revision;\n}\n\nexport function areEqualChangeAtomIdOpts(\n\ta: ChangeAtomId | undefined,\n\tb: ChangeAtomId | undefined,\n): boolean {\n\tif (a === undefined || b === undefined) {\n\t\treturn a === b;\n\t}\n\n\treturn areEqualChangeAtomIds(a, b);\n}\n\n/**\n * @returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(\n\tlocalId: ChangesetLocalId,\n\trevision?: RevisionTag,\n): ChangeAtomId {\n\treturn revision === undefined ? { localId } : { localId, revision };\n}\n\nexport function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId {\n\treturn typeof id === \"object\" ? id : { localId: id };\n}\n\nexport function taggedAtomId(\n\tid: ChangeAtomId,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn makeChangeAtomId(id.localId, id.revision ?? revision);\n}\n\nexport function taggedOptAtomId(\n\tid: ChangeAtomId | undefined,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId | undefined {\n\tif (id === undefined) {\n\t\treturn undefined;\n\t}\n\treturn taggedAtomId(id, revision);\n}\n\nexport function offsetChangeAtomId(id: ChangeAtomId, offset: number): ChangeAtomId {\n\treturn { ...id, localId: brand(id.localId + offset) };\n}\n\nexport function replaceAtomRevisions(\n\tid: ChangeAtomId,\n\toldRevisions: Set<RevisionTag | undefined>,\n\tnewRevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn oldRevisions.has(id.revision) ? atomWithRevision(id, newRevision) : id;\n}\n\nfunction atomWithRevision(id: ChangeAtomId, revision: RevisionTag | undefined): ChangeAtomId {\n\tconst updated = { ...id, revision };\n\tif (revision === undefined) {\n\t\tdelete updated.revision;\n\t}\n\n\treturn updated;\n}\n\n/**\n * A node in a graph of commits. A commit's parent is the commit on which it was based.\n */\nexport interface GraphCommit<TChange> {\n\t/** The tag for this commit. If this commit is rebased, the corresponding rebased commit will retain this tag. */\n\treadonly revision: RevisionTag;\n\t/** The change that will result from applying this commit */\n\treadonly change: TChange;\n\t/** The parent of this commit, on whose change this commit's change is based */\n\treadonly parent?: GraphCommit<TChange>;\n}\n\n/**\n * The type of a commit. This is used to describe the context in which the commit was created.\n *\n * @public\n */\nexport enum CommitKind {\n\t/** A commit corresponding to a change that is not the result of an undo/redo from this client. */\n\tDefault,\n\t/** A commit that is the result of an undo from this client. */\n\tUndo,\n\t/** A commit that is the result of a redo from this client. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @sealed @public\n */\nexport interface CommitMetadata {\n\t/**\n\t * A {@link CommitKind} enum value describing whether the commit represents an Edit, an Undo, or a Redo.\n\t */\n\treadonly kind: CommitKind;\n\t/**\n\t * Indicates whether the commit is a local edit\n\t */\n\treadonly isLocal: boolean;\n}\n\n/**\n * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.\n * @param parent - the parent of the new commit\n * @param commit - the contents of the new commit object\n * @returns the new commit object\n */\n// Note that this function is synchronous, and therefore it is not a Promise.\n// However, it is still a strong commit-mint.\nexport function mintCommit<TChange>(\n\tparent: GraphCommit<TChange>,\n\tcommit: Omit<GraphCommit<TChange>, \"parent\">,\n): GraphCommit<TChange> {\n\tconst { revision, change } = commit;\n\treturn {\n\t\trevision,\n\t\tchange,\n\t\tparent,\n\t};\n}\n\nexport type ChangeAtomIdRangeMap<V> = RangeMap<ChangeAtomId, V>;\n\nexport function newChangeAtomIdRangeMap<V>(): ChangeAtomIdRangeMap<V> {\n\treturn new RangeMap(offsetChangeAtomId, subtractChangeAtomIds);\n}\n\nexport function subtractChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): number {\n\tconst cmp = compareRevisions(a.revision, b.revision);\n\tif (cmp !== 0) {\n\t\treturn cmp * Number.POSITIVE_INFINITY;\n\t}\n\n\treturn a.localId - b.localId;\n}\n\nexport function compareRevisions(\n\ta: RevisionTag | undefined,\n\tb: RevisionTag | undefined,\n): number {\n\tif (a === undefined) {\n\t\treturn b === undefined ? 0 : -1;\n\t} else if (b === undefined) {\n\t\treturn 1;\n\t} else if (a < b) {\n\t\treturn -1;\n\t} else if (a > b) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/rebase/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,OAAO,EAGN,QAAQ,EACR,KAAK,EACL,iBAAiB,EACjB,iBAAiB,GACjB,MAAM,qBAAqB,CAAC;AAE7B;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,EAAa,CAAC;AAW9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC;IAC3C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACpB,iBAAiB,EAAuC;CACxD,CAAC,CAAC;AAiCH;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,CAAe,EAAE,CAAe;IACrE,OAAO,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,QAAQ,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,wBAAwB,CACvC,CAA2B,EAC3B,C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0B;IAE1B,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACrB,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACjC,CAAC;SAAM,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,CAAC,CAAC;IACV,CAAC;SAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC,CAAC;IACX,CAAC;SAAM,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAClB,OAAO,CAAC,CAAC;IACV,CAAC;IAED,OAAO,CAAC,CAAC;AACV,CAAC","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\tRangeMap,\n\tbrand,\n\tbrandedNumberType,\n\tbrandedStringType,\n} from \"../../util/index.js\";\n\n/**\n * The identifier for a particular session/user/client that can generate `GraphCommit`s\n */\nexport const SessionIdSchema = brandedStringType<SessionId>();\n\n/**\n * A unique identifier for a commit. Commits that have been rebased, but are semantically\n * the same, will share the same revision tag.\n *\n * The constant 'root' is reserved for the trunk base: minting a SessionSpaceCompressedId is not\n * possible on readonly clients. These clients generally don't need ids, but must be done at tree initialization time.\n */\nexport type RevisionTag = SessionSpaceCompressedId | \"root\";\nexport type EncodedRevisionTag = Brand<OpSpaceCompressedId, \"EncodedRevisionTag\"> | \"root\";\nexport const RevisionTagSchema = Type.Union([\n\tType.Literal(\"root\"),\n\tbrandedNumberType<Exclude<EncodedRevisionTag, string>>(),\n]);\n\n/**\n * An ID which is unique within a revision of a `ModularChangeset`.\n * A `ModularChangeset` which is a composition of multiple revisions may contain duplicate `ChangesetLocalId`s,\n * but they are unique when qualified by the revision of the change they are used in.\n */\nexport type ChangesetLocalId = Brand<number, \"ChangesetLocalId\">;\n\n/**\n * A globally unique ID for an atom of change, or a node associated with the atom of change.\n * *\n * @privateRemarks\n * TODO: Rename this to be more general.\n */\nexport interface ChangeAtomId {\n\t/**\n\t * Uniquely identifies the changeset within which the change was made.\n\t * Only undefined when referring to an anonymous changesets.\n\t */\n\treadonly revision?: RevisionTag;\n\t/**\n\t * Uniquely identifies, in the scope of the changeset, the change made to the field.\n\t */\n\treadonly localId: ChangesetLocalId;\n}\n\nexport type EncodedChangeAtomId = [ChangesetLocalId, EncodedRevisionTag] | ChangesetLocalId;\n\n/**\n */\nexport type ChangeAtomIdMap<T> = NestedMap<RevisionTag | undefined, ChangesetLocalId, T>;\n\n/**\n * Returns true iff `a` and `b` are the same.\n */\nexport function areEqualChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): boolean {\n\treturn a.localId === b.localId && a.revision === b.revision;\n}\n\nexport function areEqualChangeAtomIdOpts(\n\ta: ChangeAtomId | undefined,\n\tb: ChangeAtomId | undefined,\n): boolean {\n\tif (a === undefined || b === undefined) {\n\t\treturn a === b;\n\t}\n\n\treturn areEqualChangeAtomIds(a, b);\n}\n\n/**\n * Returns a ChangeAtomId with the given revision and local ID.\n */\nexport function makeChangeAtomId(\n\tlocalId: ChangesetLocalId,\n\trevision?: RevisionTag,\n): ChangeAtomId {\n\treturn revision === undefined ? { localId } : { localId, revision };\n}\n\nexport function asChangeAtomId(id: ChangesetLocalId | ChangeAtomId): ChangeAtomId {\n\treturn typeof id === \"object\" ? id : { localId: id };\n}\n\nexport function taggedAtomId(\n\tid: ChangeAtomId,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn makeChangeAtomId(id.localId, id.revision ?? revision);\n}\n\nexport function taggedOptAtomId(\n\tid: ChangeAtomId | undefined,\n\trevision: RevisionTag | undefined,\n): ChangeAtomId | undefined {\n\tif (id === undefined) {\n\t\treturn undefined;\n\t}\n\treturn taggedAtomId(id, revision);\n}\n\nexport function offsetChangeAtomId(id: ChangeAtomId, offset: number): ChangeAtomId {\n\treturn { ...id, localId: brand(id.localId + offset) };\n}\n\nexport function replaceAtomRevisions(\n\tid: ChangeAtomId,\n\toldRevisions: Set<RevisionTag | undefined>,\n\tnewRevision: RevisionTag | undefined,\n): ChangeAtomId {\n\treturn oldRevisions.has(id.revision) ? atomWithRevision(id, newRevision) : id;\n}\n\nfunction atomWithRevision(id: ChangeAtomId, revision: RevisionTag | undefined): ChangeAtomId {\n\tconst updated = { ...id, revision };\n\tif (revision === undefined) {\n\t\tdelete updated.revision;\n\t}\n\n\treturn updated;\n}\n\n/**\n * A node in a graph of commits. A commit's parent is the commit on which it was based.\n */\nexport interface GraphCommit<TChange> {\n\t/** The tag for this commit. If this commit is rebased, the corresponding rebased commit will retain this tag. */\n\treadonly revision: RevisionTag;\n\t/** The change that will result from applying this commit */\n\treadonly change: TChange;\n\t/** The parent of this commit, on whose change this commit's change is based */\n\treadonly parent?: GraphCommit<TChange>;\n}\n\n/**\n * The type of a commit. This is used to describe the context in which the commit was created.\n *\n * @public\n */\nexport enum CommitKind {\n\t/** A commit corresponding to a change that is not the result of an undo/redo from this client. */\n\tDefault,\n\t/** A commit that is the result of an undo from this client. */\n\tUndo,\n\t/** A commit that is the result of a redo from this client. */\n\tRedo,\n}\n\n/**\n * Information about a commit that has been applied.\n *\n * @sealed @public\n */\nexport interface CommitMetadata {\n\t/**\n\t * A {@link CommitKind} enum value describing whether the commit represents an Edit, an Undo, or a Redo.\n\t */\n\treadonly kind: CommitKind;\n\t/**\n\t * Indicates whether the commit is a local edit\n\t */\n\treadonly isLocal: boolean;\n}\n\n/**\n * Creates a new graph commit object. This is useful for creating copies of commits with different parentage.\n * @param parent - the parent of the new commit\n * @param commit - the contents of the new commit object\n * @returns the new commit object\n */\n// Note that this function is synchronous, and therefore it is not a Promise.\n// However, it is still a strong commit-mint.\nexport function mintCommit<TChange>(\n\tparent: GraphCommit<TChange>,\n\tcommit: Omit<GraphCommit<TChange>, \"parent\">,\n): GraphCommit<TChange> {\n\tconst { revision, change } = commit;\n\treturn {\n\t\trevision,\n\t\tchange,\n\t\tparent,\n\t};\n}\n\nexport type ChangeAtomIdRangeMap<V> = RangeMap<ChangeAtomId, V>;\n\nexport function newChangeAtomIdRangeMap<V>(): ChangeAtomIdRangeMap<V> {\n\treturn new RangeMap(offsetChangeAtomId, subtractChangeAtomIds);\n}\n\nexport function subtractChangeAtomIds(a: ChangeAtomId, b: ChangeAtomId): number {\n\tconst cmp = compareRevisions(a.revision, b.revision);\n\tif (cmp !== 0) {\n\t\treturn cmp * Number.POSITIVE_INFINITY;\n\t}\n\n\treturn a.localId - b.localId;\n}\n\nexport function compareRevisions(\n\ta: RevisionTag | undefined,\n\tb: RevisionTag | undefined,\n): number {\n\tif (a === undefined) {\n\t\treturn b === undefined ? 0 : -1;\n\t} else if (b === undefined) {\n\t\treturn 1;\n\t} else if (a < b) {\n\t\treturn -1;\n\t} else if (a > b) {\n\t\treturn 1;\n\t}\n\n\treturn 0;\n}\n"]}
@@ -163,8 +163,6 @@ export declare function rebaseBranch<TChange>(mintRevisionTag: () => RevisionTag
163
163
  * @remarks inverses will be cached.
164
164
  */
165
165
  export declare function rebaseChange<TChange>(changeRebaser: ChangeRebaser<TChange>, change: TaggedChange<TChange>, sourceHead: GraphCommit<TChange>, targetHead: GraphCommit<TChange>, mintRevisionTag: () => RevisionTag): RebaseChangeResult<TChange>;
166
- /**
167
- */
168
166
  export declare function revisionMetadataSourceFromInfo(revInfos: readonly RevisionInfo[]): RevisionMetadataSource;
169
167
  export declare function rebaseChangeOverChanges<TChange>(changeRebaser: ChangeRebaser<TChange>, changeToRebase: TaggedChange<TChange>, changesToRebaseOver: TaggedChange<TChange>[]): TChange;
170
168
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/rebase/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,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G,SAAS,EACzD,WAAW,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,SAAS,GACvD,CAAC,GAAG,SAAS,CA+Df;AAED,wBAAgB,aAAa,CAAC,OAAO,EACpC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAC5B,MAAM,EAAE,OAAO,GACb,WAAW,CAAC,OAAO,CAAC,CAItB;AAwBD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,KAAK,SAAS;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,EACnE,QAAQ,EAAE,KAAK,EACf,UAAU,EAAE,KAAK,EACjB,UAAU,EAAE,OAAO,GACjB,OAAO,CAcT"}
@@ -159,8 +159,6 @@ export function rebaseChange(changeRebaser, change, sourceHead, targetHead, mint
159
159
  telemetryProperties,
160
160
  };
161
161
  }
162
- /**
163
- */
164
162
  export function revisionMetadataSourceFromInfo(revInfos) {
165
163
  const getIndex = (revision) => {
166
164
  const index = revInfos.findIndex((revInfo) => revInfo.revision === revision);
@@ -203,18 +201,16 @@ function revisionInfoFromTaggedChange(taggedChange) {
203
201
  return revInfos;
204
202
  }
205
203
  function rollbackFromCommit(changeRebaser, commit, mintRevisionTag, cache) {
206
- const rollback = Rollback.get(commit);
207
- if (rollback !== undefined) {
208
- return rollback;
204
+ const cachedRollback = Rollback.get(commit);
205
+ if (cachedRollback !== undefined) {
206
+ return cachedRollback;
209
207
  }
210
208
  const tag = mintRevisionTag();
211
- const untagged = changeRebaser.invert(commit, true, tag);
212
- const deeplyTaggedRollback = changeRebaser.changeRevision(untagged, tag, commit.revision);
213
- const fullyTaggedRollback = tagRollbackInverse(deeplyTaggedRollback, tag, commit.revision);
209
+ const rollback = tagRollbackInverse(changeRebaser.invert(commit, true, tag), tag, commit.revision);
214
210
  if (cache === true) {
215
- Rollback.set(commit, fullyTaggedRollback);
211
+ Rollback.set(commit, rollback);
216
212
  }
217
- return fullyTaggedRollback;
213
+ return rollback;
218
214
  }
219
215
  export function findAncestor(descendant, predicate = (t) => t.parent === undefined) {
220
216
  let d;