@fluidframework/tree 2.61.0 → 2.62.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 (388) hide show
  1. package/CHANGELOG.md +162 -0
  2. package/api-report/tree.alpha.api.md +26 -21
  3. package/api-report/tree.beta.api.md +15 -0
  4. package/api-report/tree.legacy.beta.api.md +18 -0
  5. package/dist/alpha.d.ts +8 -8
  6. package/dist/api.d.ts +17 -0
  7. package/dist/api.d.ts.map +1 -0
  8. package/dist/api.js +24 -0
  9. package/dist/api.js.map +1 -0
  10. package/dist/beta.d.ts +5 -0
  11. package/dist/codec/codec.d.ts +3 -5
  12. package/dist/codec/codec.d.ts.map +1 -1
  13. package/dist/codec/codec.js +9 -2
  14. package/dist/codec/codec.js.map +1 -1
  15. package/dist/codec/index.d.ts +0 -1
  16. package/dist/codec/index.d.ts.map +1 -1
  17. package/dist/codec/index.js +1 -3
  18. package/dist/codec/index.js.map +1 -1
  19. package/dist/core/index.d.ts +1 -1
  20. package/dist/core/index.d.ts.map +1 -1
  21. package/dist/core/index.js +2 -1
  22. package/dist/core/index.js.map +1 -1
  23. package/dist/core/rebase/index.d.ts +1 -1
  24. package/dist/core/rebase/index.d.ts.map +1 -1
  25. package/dist/core/rebase/index.js +2 -1
  26. package/dist/core/rebase/index.js.map +1 -1
  27. package/dist/core/rebase/utils.d.ts +10 -0
  28. package/dist/core/rebase/utils.d.ts.map +1 -1
  29. package/dist/core/rebase/utils.js +20 -1
  30. package/dist/core/rebase/utils.js.map +1 -1
  31. package/dist/core/tree/detachedFieldIndex.js +1 -1
  32. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  33. package/dist/external-utilities/index.d.ts +1 -1
  34. package/dist/external-utilities/index.d.ts.map +1 -1
  35. package/dist/external-utilities/index.js +1 -2
  36. package/dist/external-utilities/index.js.map +1 -1
  37. package/dist/external-utilities/typeboxValidator.d.ts +0 -13
  38. package/dist/external-utilities/typeboxValidator.d.ts.map +1 -1
  39. package/dist/external-utilities/typeboxValidator.js +3 -5
  40. package/dist/external-utilities/typeboxValidator.js.map +1 -1
  41. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -0
  42. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  43. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  44. package/dist/feature-libraries/flex-tree/index.d.ts +1 -0
  45. package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
  46. package/dist/feature-libraries/flex-tree/index.js +4 -1
  47. package/dist/feature-libraries/flex-tree/index.js.map +1 -1
  48. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  49. package/dist/feature-libraries/flex-tree/lazyNode.js +15 -8
  50. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  51. package/dist/feature-libraries/flex-tree/observer.d.ts +32 -0
  52. package/dist/feature-libraries/flex-tree/observer.d.ts.map +1 -0
  53. package/dist/feature-libraries/flex-tree/observer.js +33 -0
  54. package/dist/feature-libraries/flex-tree/observer.js.map +1 -0
  55. package/dist/feature-libraries/index.d.ts +1 -1
  56. package/dist/feature-libraries/index.d.ts.map +1 -1
  57. package/dist/feature-libraries/index.js +3 -1
  58. package/dist/feature-libraries/index.js.map +1 -1
  59. package/dist/index.d.ts +5 -5
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +9 -8
  62. package/dist/index.js.map +1 -1
  63. package/dist/legacy.d.ts +7 -1
  64. package/dist/packageVersion.d.ts +1 -1
  65. package/dist/packageVersion.js +1 -1
  66. package/dist/packageVersion.js.map +1 -1
  67. package/dist/shared-tree/index.d.ts +2 -2
  68. package/dist/shared-tree/index.d.ts.map +1 -1
  69. package/dist/shared-tree/index.js.map +1 -1
  70. package/dist/shared-tree/schematizingTreeView.js +2 -2
  71. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  72. package/dist/shared-tree/sharedTree.d.ts +21 -6
  73. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  74. package/dist/shared-tree/sharedTree.js +76 -37
  75. package/dist/shared-tree/sharedTree.js.map +1 -1
  76. package/dist/shared-tree/treeAlpha.d.ts +114 -1
  77. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  78. package/dist/shared-tree/treeAlpha.js +140 -1
  79. package/dist/shared-tree/treeAlpha.js.map +1 -1
  80. package/dist/shared-tree/treeCheckout.d.ts +13 -7
  81. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  82. package/dist/shared-tree/treeCheckout.js +115 -85
  83. package/dist/shared-tree/treeCheckout.js.map +1 -1
  84. package/dist/shared-tree-core/branch.d.ts +3 -0
  85. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  86. package/dist/shared-tree-core/branch.js.map +1 -1
  87. package/dist/shared-tree-core/branchIdCodec.d.ts +11 -0
  88. package/dist/shared-tree-core/branchIdCodec.d.ts.map +1 -0
  89. package/dist/shared-tree-core/branchIdCodec.js +18 -0
  90. package/dist/shared-tree-core/branchIdCodec.js.map +1 -0
  91. package/dist/shared-tree-core/editManager.d.ts +39 -64
  92. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  93. package/dist/shared-tree-core/editManager.js +455 -295
  94. package/dist/shared-tree-core/editManager.js.map +1 -1
  95. package/dist/shared-tree-core/editManagerCodecs.d.ts +1 -1
  96. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  97. package/dist/shared-tree-core/editManagerCodecs.js +7 -96
  98. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  99. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +17 -0
  100. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -0
  101. package/dist/shared-tree-core/editManagerCodecsCommons.js +139 -0
  102. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -0
  103. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +16 -0
  104. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -0
  105. package/dist/shared-tree-core/editManagerCodecsV1toV4.js +39 -0
  106. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -0
  107. package/dist/shared-tree-core/editManagerCodecsV5.d.ts +16 -0
  108. package/dist/shared-tree-core/editManagerCodecsV5.d.ts.map +1 -0
  109. package/dist/shared-tree-core/editManagerCodecsV5.js +58 -0
  110. package/dist/shared-tree-core/editManagerCodecsV5.js.map +1 -0
  111. package/dist/shared-tree-core/{editManagerFormat.d.ts → editManagerFormatCommons.d.ts} +31 -7
  112. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -0
  113. package/dist/shared-tree-core/{editManagerFormat.js → editManagerFormatCommons.js} +13 -12
  114. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -0
  115. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +31 -0
  116. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -0
  117. package/dist/shared-tree-core/editManagerFormatV1toV4.js +24 -0
  118. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -0
  119. package/dist/shared-tree-core/editManagerFormatV5.d.ts +62 -0
  120. package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +1 -0
  121. package/dist/shared-tree-core/editManagerFormatV5.js +20 -0
  122. package/dist/shared-tree-core/editManagerFormatV5.js.map +1 -0
  123. package/dist/shared-tree-core/index.d.ts +3 -3
  124. package/dist/shared-tree-core/index.d.ts.map +1 -1
  125. package/dist/shared-tree-core/index.js.map +1 -1
  126. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +11 -0
  127. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -0
  128. package/dist/shared-tree-core/messageCodecV1ToV4.js +59 -0
  129. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -0
  130. package/dist/shared-tree-core/messageCodecV5.d.ts +11 -0
  131. package/dist/shared-tree-core/messageCodecV5.d.ts.map +1 -0
  132. package/dist/shared-tree-core/messageCodecV5.js +78 -0
  133. package/dist/shared-tree-core/messageCodecV5.js.map +1 -0
  134. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  135. package/dist/shared-tree-core/messageCodecs.js +16 -47
  136. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  137. package/dist/shared-tree-core/{messageFormat.d.ts → messageFormatV1ToV4.d.ts} +1 -1
  138. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -0
  139. package/dist/shared-tree-core/{messageFormat.js → messageFormatV1ToV4.js} +1 -1
  140. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -0
  141. package/dist/shared-tree-core/messageFormatV5.d.ts +42 -0
  142. package/dist/shared-tree-core/messageFormatV5.d.ts.map +1 -0
  143. package/dist/shared-tree-core/messageFormatV5.js +20 -0
  144. package/dist/shared-tree-core/messageFormatV5.js.map +1 -0
  145. package/dist/shared-tree-core/messageTypes.d.ts +12 -2
  146. package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
  147. package/dist/shared-tree-core/messageTypes.js.map +1 -1
  148. package/dist/shared-tree-core/sequenceIdUtils.d.ts +1 -1
  149. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  150. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  151. package/dist/shared-tree-core/sharedTreeCore.d.ts +19 -5
  152. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  153. package/dist/shared-tree-core/sharedTreeCore.js +182 -58
  154. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  155. package/dist/simple-tree/api/tree.d.ts +17 -0
  156. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  157. package/dist/simple-tree/api/tree.js +2 -0
  158. package/dist/simple-tree/api/tree.js.map +1 -1
  159. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  160. package/dist/simple-tree/core/unhydratedFlexTree.js +7 -1
  161. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  162. package/dist/treeFactory.d.ts +38 -9
  163. package/dist/treeFactory.d.ts.map +1 -1
  164. package/dist/treeFactory.js +44 -9
  165. package/dist/treeFactory.js.map +1 -1
  166. package/lib/alpha.d.ts +8 -8
  167. package/lib/api.d.ts +17 -0
  168. package/lib/api.d.ts.map +1 -0
  169. package/lib/api.js +22 -0
  170. package/lib/api.js.map +1 -0
  171. package/lib/beta.d.ts +5 -0
  172. package/lib/codec/codec.d.ts +3 -5
  173. package/lib/codec/codec.d.ts.map +1 -1
  174. package/lib/codec/codec.js +8 -1
  175. package/lib/codec/codec.js.map +1 -1
  176. package/lib/codec/index.d.ts +0 -1
  177. package/lib/codec/index.d.ts.map +1 -1
  178. package/lib/codec/index.js +0 -1
  179. package/lib/codec/index.js.map +1 -1
  180. package/lib/core/index.d.ts +1 -1
  181. package/lib/core/index.d.ts.map +1 -1
  182. package/lib/core/index.js +1 -1
  183. package/lib/core/index.js.map +1 -1
  184. package/lib/core/rebase/index.d.ts +1 -1
  185. package/lib/core/rebase/index.d.ts.map +1 -1
  186. package/lib/core/rebase/index.js +1 -1
  187. package/lib/core/rebase/index.js.map +1 -1
  188. package/lib/core/rebase/utils.d.ts +10 -0
  189. package/lib/core/rebase/utils.d.ts.map +1 -1
  190. package/lib/core/rebase/utils.js +18 -0
  191. package/lib/core/rebase/utils.js.map +1 -1
  192. package/lib/core/tree/detachedFieldIndex.js +2 -2
  193. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  194. package/lib/external-utilities/index.d.ts +1 -1
  195. package/lib/external-utilities/index.d.ts.map +1 -1
  196. package/lib/external-utilities/index.js +1 -1
  197. package/lib/external-utilities/index.js.map +1 -1
  198. package/lib/external-utilities/typeboxValidator.d.ts +0 -13
  199. package/lib/external-utilities/typeboxValidator.d.ts.map +1 -1
  200. package/lib/external-utilities/typeboxValidator.js +1 -3
  201. package/lib/external-utilities/typeboxValidator.js.map +1 -1
  202. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -0
  203. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  204. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  205. package/lib/feature-libraries/flex-tree/index.d.ts +1 -0
  206. package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
  207. package/lib/feature-libraries/flex-tree/index.js +1 -0
  208. package/lib/feature-libraries/flex-tree/index.js.map +1 -1
  209. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  210. package/lib/feature-libraries/flex-tree/lazyNode.js +15 -8
  211. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  212. package/lib/feature-libraries/flex-tree/observer.d.ts +32 -0
  213. package/lib/feature-libraries/flex-tree/observer.d.ts.map +1 -0
  214. package/lib/feature-libraries/flex-tree/observer.js +40 -0
  215. package/lib/feature-libraries/flex-tree/observer.js.map +1 -0
  216. package/lib/feature-libraries/index.d.ts +1 -1
  217. package/lib/feature-libraries/index.d.ts.map +1 -1
  218. package/lib/feature-libraries/index.js +1 -1
  219. package/lib/feature-libraries/index.js.map +1 -1
  220. package/lib/index.d.ts +5 -5
  221. package/lib/index.d.ts.map +1 -1
  222. package/lib/index.js +3 -3
  223. package/lib/index.js.map +1 -1
  224. package/lib/legacy.d.ts +7 -1
  225. package/lib/packageVersion.d.ts +1 -1
  226. package/lib/packageVersion.js +1 -1
  227. package/lib/packageVersion.js.map +1 -1
  228. package/lib/shared-tree/index.d.ts +2 -2
  229. package/lib/shared-tree/index.d.ts.map +1 -1
  230. package/lib/shared-tree/index.js.map +1 -1
  231. package/lib/shared-tree/schematizingTreeView.js +2 -2
  232. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  233. package/lib/shared-tree/sharedTree.d.ts +21 -6
  234. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  235. package/lib/shared-tree/sharedTree.js +78 -39
  236. package/lib/shared-tree/sharedTree.js.map +1 -1
  237. package/lib/shared-tree/treeAlpha.d.ts +114 -1
  238. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  239. package/lib/shared-tree/treeAlpha.js +143 -4
  240. package/lib/shared-tree/treeAlpha.js.map +1 -1
  241. package/lib/shared-tree/treeCheckout.d.ts +13 -7
  242. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  243. package/lib/shared-tree/treeCheckout.js +117 -87
  244. package/lib/shared-tree/treeCheckout.js.map +1 -1
  245. package/lib/shared-tree-core/branch.d.ts +3 -0
  246. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  247. package/lib/shared-tree-core/branch.js.map +1 -1
  248. package/lib/shared-tree-core/branchIdCodec.d.ts +11 -0
  249. package/lib/shared-tree-core/branchIdCodec.d.ts.map +1 -0
  250. package/lib/shared-tree-core/branchIdCodec.js +13 -0
  251. package/lib/shared-tree-core/branchIdCodec.js.map +1 -0
  252. package/lib/shared-tree-core/editManager.d.ts +39 -64
  253. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  254. package/lib/shared-tree-core/editManager.js +455 -295
  255. package/lib/shared-tree-core/editManager.js.map +1 -1
  256. package/lib/shared-tree-core/editManagerCodecs.d.ts +1 -1
  257. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  258. package/lib/shared-tree-core/editManagerCodecs.js +4 -93
  259. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  260. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +17 -0
  261. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -0
  262. package/lib/shared-tree-core/editManagerCodecsCommons.js +134 -0
  263. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -0
  264. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +16 -0
  265. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -0
  266. package/lib/shared-tree-core/editManagerCodecsV1toV4.js +35 -0
  267. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -0
  268. package/lib/shared-tree-core/editManagerCodecsV5.d.ts +16 -0
  269. package/lib/shared-tree-core/editManagerCodecsV5.d.ts.map +1 -0
  270. package/lib/shared-tree-core/editManagerCodecsV5.js +54 -0
  271. package/lib/shared-tree-core/editManagerCodecsV5.js.map +1 -0
  272. package/lib/shared-tree-core/{editManagerFormat.d.ts → editManagerFormatCommons.d.ts} +31 -7
  273. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -0
  274. package/lib/shared-tree-core/{editManagerFormat.js → editManagerFormatCommons.js} +10 -11
  275. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -0
  276. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +31 -0
  277. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -0
  278. package/lib/shared-tree-core/editManagerFormatV1toV4.js +20 -0
  279. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -0
  280. package/lib/shared-tree-core/editManagerFormatV5.d.ts +62 -0
  281. package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +1 -0
  282. package/lib/shared-tree-core/editManagerFormatV5.js +16 -0
  283. package/lib/shared-tree-core/editManagerFormatV5.js.map +1 -0
  284. package/lib/shared-tree-core/index.d.ts +3 -3
  285. package/lib/shared-tree-core/index.d.ts.map +1 -1
  286. package/lib/shared-tree-core/index.js.map +1 -1
  287. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +11 -0
  288. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -0
  289. package/lib/shared-tree-core/messageCodecV1ToV4.js +55 -0
  290. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -0
  291. package/lib/shared-tree-core/messageCodecV5.d.ts +11 -0
  292. package/lib/shared-tree-core/messageCodecV5.d.ts.map +1 -0
  293. package/lib/shared-tree-core/messageCodecV5.js +74 -0
  294. package/lib/shared-tree-core/messageCodecV5.js.map +1 -0
  295. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  296. package/lib/shared-tree-core/messageCodecs.js +17 -48
  297. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  298. package/lib/shared-tree-core/{messageFormat.d.ts → messageFormatV1ToV4.d.ts} +1 -1
  299. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -0
  300. package/lib/shared-tree-core/{messageFormat.js → messageFormatV1ToV4.js} +1 -1
  301. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -0
  302. package/lib/shared-tree-core/messageFormatV5.d.ts +42 -0
  303. package/lib/shared-tree-core/messageFormatV5.d.ts.map +1 -0
  304. package/lib/shared-tree-core/messageFormatV5.js +16 -0
  305. package/lib/shared-tree-core/messageFormatV5.js.map +1 -0
  306. package/lib/shared-tree-core/messageTypes.d.ts +12 -2
  307. package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
  308. package/lib/shared-tree-core/messageTypes.js.map +1 -1
  309. package/lib/shared-tree-core/sequenceIdUtils.d.ts +1 -1
  310. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  311. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  312. package/lib/shared-tree-core/sharedTreeCore.d.ts +19 -5
  313. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  314. package/lib/shared-tree-core/sharedTreeCore.js +183 -59
  315. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  316. package/lib/simple-tree/api/tree.d.ts +17 -0
  317. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  318. package/lib/simple-tree/api/tree.js +2 -0
  319. package/lib/simple-tree/api/tree.js.map +1 -1
  320. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  321. package/lib/simple-tree/core/unhydratedFlexTree.js +8 -2
  322. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  323. package/lib/treeFactory.d.ts +38 -9
  324. package/lib/treeFactory.d.ts.map +1 -1
  325. package/lib/treeFactory.js +41 -8
  326. package/lib/treeFactory.js.map +1 -1
  327. package/package.json +25 -25
  328. package/src/api.ts +30 -0
  329. package/src/codec/codec.ts +12 -6
  330. package/src/codec/index.ts +0 -1
  331. package/src/core/index.ts +1 -0
  332. package/src/core/rebase/index.ts +1 -0
  333. package/src/core/rebase/utils.ts +27 -0
  334. package/src/core/tree/detachedFieldIndex.ts +2 -2
  335. package/src/external-utilities/index.ts +1 -1
  336. package/src/external-utilities/typeboxValidator.ts +1 -3
  337. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +2 -0
  338. package/src/feature-libraries/flex-tree/index.ts +2 -0
  339. package/src/feature-libraries/flex-tree/lazyNode.ts +13 -3
  340. package/src/feature-libraries/flex-tree/observer.ts +64 -0
  341. package/src/feature-libraries/index.ts +3 -0
  342. package/src/index.ts +6 -4
  343. package/src/packageVersion.ts +1 -1
  344. package/src/shared-tree/index.ts +2 -0
  345. package/src/shared-tree/schematizingTreeView.ts +2 -2
  346. package/src/shared-tree/sharedTree.ts +116 -52
  347. package/src/shared-tree/treeAlpha.ts +309 -4
  348. package/src/shared-tree/treeCheckout.ts +152 -100
  349. package/src/shared-tree-core/branch.ts +7 -0
  350. package/src/shared-tree-core/branchIdCodec.ts +28 -0
  351. package/src/shared-tree-core/editManager.ts +729 -430
  352. package/src/shared-tree-core/editManagerCodecs.ts +4 -164
  353. package/src/shared-tree-core/editManagerCodecsCommons.ts +245 -0
  354. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +108 -0
  355. package/src/shared-tree-core/editManagerCodecsV5.ts +156 -0
  356. package/src/shared-tree-core/{editManagerFormat.ts → editManagerFormatCommons.ts} +17 -13
  357. package/src/shared-tree-core/editManagerFormatV1toV4.ts +42 -0
  358. package/src/shared-tree-core/editManagerFormatV5.ts +35 -0
  359. package/src/shared-tree-core/index.ts +3 -1
  360. package/src/shared-tree-core/messageCodecV1ToV4.ts +104 -0
  361. package/src/shared-tree-core/messageCodecV5.ts +131 -0
  362. package/src/shared-tree-core/messageCodecs.ts +16 -85
  363. package/src/shared-tree-core/messageFormatV5.ts +50 -0
  364. package/src/shared-tree-core/messageTypes.ts +15 -2
  365. package/src/shared-tree-core/sequenceIdUtils.ts +1 -1
  366. package/src/shared-tree-core/sharedTreeCore.ts +281 -85
  367. package/src/simple-tree/api/tree.ts +23 -0
  368. package/src/simple-tree/core/unhydratedFlexTree.ts +11 -2
  369. package/src/treeFactory.ts +48 -8
  370. package/dist/codec/noopValidator.d.ts +0 -13
  371. package/dist/codec/noopValidator.d.ts.map +0 -1
  372. package/dist/codec/noopValidator.js +0 -17
  373. package/dist/codec/noopValidator.js.map +0 -1
  374. package/dist/shared-tree-core/editManagerFormat.d.ts.map +0 -1
  375. package/dist/shared-tree-core/editManagerFormat.js.map +0 -1
  376. package/dist/shared-tree-core/messageFormat.d.ts.map +0 -1
  377. package/dist/shared-tree-core/messageFormat.js.map +0 -1
  378. package/docs/user-facing/schema-evolution.md +0 -309
  379. package/lib/codec/noopValidator.d.ts +0 -13
  380. package/lib/codec/noopValidator.d.ts.map +0 -1
  381. package/lib/codec/noopValidator.js +0 -14
  382. package/lib/codec/noopValidator.js.map +0 -1
  383. package/lib/shared-tree-core/editManagerFormat.d.ts.map +0 -1
  384. package/lib/shared-tree-core/editManagerFormat.js.map +0 -1
  385. package/lib/shared-tree-core/messageFormat.d.ts.map +0 -1
  386. package/lib/shared-tree-core/messageFormat.js.map +0 -1
  387. package/src/codec/noopValidator.ts +0 -18
  388. /package/src/shared-tree-core/{messageFormat.ts → messageFormatV1ToV4.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/tree",
3
- "version": "2.61.0",
3
+ "version": "2.62.0",
4
4
  "description": "Distributed tree",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -66,12 +66,12 @@
66
66
  "./internal/test": {
67
67
  "allow-ff-test-exports": {
68
68
  "import": {
69
- "types": "./lib/test/index.d.ts",
70
- "default": "./lib/test/index.js"
69
+ "types": "./lib/test/testExports.d.ts",
70
+ "default": "./lib/test/testExports.js"
71
71
  },
72
72
  "require": {
73
- "types": "./dist/test/index.d.ts",
74
- "default": "./dist/test/index.js"
73
+ "types": "./dist/test/testExports.d.ts",
74
+ "default": "./dist/test/testExports.js"
75
75
  }
76
76
  }
77
77
  }
@@ -101,17 +101,17 @@
101
101
  "temp-directory": "nyc/.nyc_output"
102
102
  },
103
103
  "dependencies": {
104
- "@fluid-internal/client-utils": "~2.61.0",
105
- "@fluidframework/container-runtime": "~2.61.0",
106
- "@fluidframework/core-interfaces": "~2.61.0",
107
- "@fluidframework/core-utils": "~2.61.0",
108
- "@fluidframework/datastore-definitions": "~2.61.0",
109
- "@fluidframework/driver-definitions": "~2.61.0",
110
- "@fluidframework/id-compressor": "~2.61.0",
111
- "@fluidframework/runtime-definitions": "~2.61.0",
112
- "@fluidframework/runtime-utils": "~2.61.0",
113
- "@fluidframework/shared-object-base": "~2.61.0",
114
- "@fluidframework/telemetry-utils": "~2.61.0",
104
+ "@fluid-internal/client-utils": "~2.62.0",
105
+ "@fluidframework/container-runtime": "~2.62.0",
106
+ "@fluidframework/core-interfaces": "~2.62.0",
107
+ "@fluidframework/core-utils": "~2.62.0",
108
+ "@fluidframework/datastore-definitions": "~2.62.0",
109
+ "@fluidframework/driver-definitions": "~2.62.0",
110
+ "@fluidframework/id-compressor": "~2.62.0",
111
+ "@fluidframework/runtime-definitions": "~2.62.0",
112
+ "@fluidframework/runtime-utils": "~2.62.0",
113
+ "@fluidframework/shared-object-base": "~2.62.0",
114
+ "@fluidframework/telemetry-utils": "~2.62.0",
115
115
  "@sinclair/typebox": "^0.34.13",
116
116
  "@tylerbu/sorted-btree-es6": "^1.8.0",
117
117
  "@types/ungap__structured-clone": "^1.2.0",
@@ -121,19 +121,19 @@
121
121
  "devDependencies": {
122
122
  "@arethetypeswrong/cli": "^0.17.1",
123
123
  "@biomejs/biome": "~1.9.3",
124
- "@fluid-internal/mocha-test-setup": "~2.61.0",
125
- "@fluid-private/stochastic-test-utils": "~2.61.0",
126
- "@fluid-private/test-dds-utils": "~2.61.0",
127
- "@fluid-private/test-drivers": "~2.61.0",
124
+ "@fluid-internal/mocha-test-setup": "~2.62.0",
125
+ "@fluid-private/stochastic-test-utils": "~2.62.0",
126
+ "@fluid-private/test-dds-utils": "~2.62.0",
127
+ "@fluid-private/test-drivers": "~2.62.0",
128
128
  "@fluid-tools/benchmark": "^0.51.0",
129
129
  "@fluid-tools/build-cli": "^0.58.3",
130
130
  "@fluidframework/build-common": "^2.0.3",
131
131
  "@fluidframework/build-tools": "^0.58.3",
132
- "@fluidframework/container-definitions": "~2.61.0",
133
- "@fluidframework/container-loader": "~2.61.0",
132
+ "@fluidframework/container-definitions": "~2.62.0",
133
+ "@fluidframework/container-loader": "~2.62.0",
134
134
  "@fluidframework/eslint-config-fluid": "^6.0.0",
135
- "@fluidframework/test-runtime-utils": "~2.61.0",
136
- "@fluidframework/test-utils": "~2.61.0",
135
+ "@fluidframework/test-runtime-utils": "~2.62.0",
136
+ "@fluidframework/test-utils": "~2.62.0",
137
137
  "@fluidframework/tree-previous": "npm:@fluidframework/tree@2.60.0",
138
138
  "@microsoft/api-extractor": "7.52.11",
139
139
  "@types/diff": "^3.5.1",
@@ -228,7 +228,7 @@
228
228
  "test:memory": "mocha --perfMode --config ./src/test/memory/.mocharc.cjs",
229
229
  "test:memory-profiling:report": "mocha --config ./src/test/memory/.mocharc.cjs",
230
230
  "test:mocha": "echo skipping non-smoke cjs to avoid overhead && npm run test:mocha:cjs -- --fgrep @Smoke && npm run test:mocha:esm",
231
- "test:mocha:cjs": "cross-env MOCHA_SPEC=dist/test mocha",
231
+ "test:mocha:cjs": "cross-env FLUID_TEST_MODULE_SYSTEM=CJS mocha",
232
232
  "test:mocha:esm": "mocha",
233
233
  "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
234
234
  "test:snapshots:regen": "pnpm test:mocha:esm --snapshot",
package/src/api.ts ADDED
@@ -0,0 +1,30 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import {
7
+ type TreeView,
8
+ type TreeViewAlpha,
9
+ type ImplicitFieldSchema,
10
+ // eslint-disable-next-line import/no-deprecated
11
+ asTreeViewAlpha,
12
+ } from "./simple-tree/index.js";
13
+
14
+ /**
15
+ * Module entry points for retrieving alternate (alpha/beta) versions of tree APIs.
16
+ * For each API (usually a class) that has an alpha/beta version, add overloads to the function(s) below.
17
+ * In the future, `asBeta` may be added here too.
18
+ * These functions should only be used by external consumers, not referenced internally within the tree package, to avoid circular import dependencies.
19
+ */
20
+
21
+ /**
22
+ * Retrieve the {@link TreeViewAlpha | alpha API} for a {@link TreeView}.
23
+ * @alpha
24
+ */
25
+ export function asAlpha<TSchema extends ImplicitFieldSchema>(
26
+ view: TreeView<TSchema>,
27
+ ): TreeViewAlpha<TSchema> {
28
+ // eslint-disable-next-line import/no-deprecated
29
+ return asTreeViewAlpha(view);
30
+ }
@@ -10,7 +10,6 @@ import type { Static, TAnySchema, TSchema } from "@sinclair/typebox";
10
10
 
11
11
  import type { ChangeEncodingContext } from "../core/index.js";
12
12
  import type { JsonCompatibleReadOnly } from "../util/index.js";
13
- import { noopValidator } from "./noopValidator.js";
14
13
 
15
14
  /**
16
15
  * Translates decoded data to encoded data.
@@ -37,7 +36,6 @@ export interface IDecoder<TDecoded, TEncoded, TContext> {
37
36
  /**
38
37
  * Validates data complies with some particular schema.
39
38
  * Implementations are typically created by a {@link JsonValidator}.
40
- * @alpha @input
41
39
  */
42
40
  export interface SchemaValidationFunction<Schema extends TSchema> {
43
41
  /**
@@ -66,6 +64,15 @@ export interface SchemaValidationFunction<Schema extends TSchema> {
66
64
  */
67
65
  export interface FormatValidator extends ErasedType<"FormatValidator"> {}
68
66
 
67
+ /**
68
+ * A {@link JsonValidator} implementation which performs no validation and accepts all data as valid.
69
+ * @privateRemarks Having this as an option unifies opting out of validation with selection of
70
+ * validators, simplifying code performing validation.
71
+ */
72
+ const noopValidator: JsonValidator = {
73
+ compile: <Schema extends TSchema>() => ({ check: (data): data is Static<Schema> => true }),
74
+ };
75
+
69
76
  /**
70
77
  * A {@link FormatValidator} which does no validation.
71
78
  * @alpha
@@ -122,11 +129,10 @@ export interface ICodecOptions {
122
129
  * SharedTree users are still encouraged to use a non-trivial validator (i.e. not `FormatValidatorNoOp`)
123
130
  * whenever reasonable: it gives better fail-fast behavior when unexpected encoded data is found,
124
131
  * which reduces the risk of unrecoverable data corruption.
125
- *
126
- * Use of {@link JsonValidator} here is deprecated and will be removed:
127
- * it is recommended to use {@link FormatValidator} instead.
132
+ * @privateRemarks
133
+ * This property should probably be renamed to `validator` before stabilizing the API.
128
134
  */
129
- readonly jsonValidator: JsonValidator | FormatValidator;
135
+ readonly jsonValidator: FormatValidator;
130
136
  }
131
137
 
132
138
  /**
@@ -31,7 +31,6 @@ export {
31
31
  type DiscriminatedUnionLibrary,
32
32
  unionOptions,
33
33
  } from "./discriminatedUnions.js";
34
- export { noopValidator } from "./noopValidator.js";
35
34
  export {
36
35
  Versioned,
37
36
  makeVersionedCodec,
package/src/core/index.ts CHANGED
@@ -207,6 +207,7 @@ export {
207
207
  type ChangeAtomIdRangeMap,
208
208
  newChangeAtomIdRangeMap,
209
209
  compareRevisions,
210
+ diffHistories,
210
211
  } from "./rebase/index.js";
211
212
 
212
213
  export {
@@ -56,4 +56,5 @@ export {
56
56
  type RebaseStatsWithDuration,
57
57
  replaceChange,
58
58
  isAncestor,
59
+ diffHistories,
59
60
  } from "./utils.js";
@@ -678,3 +678,30 @@ export function isAncestor<TNode extends { readonly parent?: TNode }>(
678
678
 
679
679
  return false;
680
680
  }
681
+
682
+ /**
683
+ * Returns a change that represents the different between two places in a commit graph.
684
+ * Applying this change to the state at `sourceCommit` will yield the state at `targetCommit`.
685
+ * @param changeRebaser - the change rebaser responsible for providing inverses to the changes in the commits.
686
+ * @param sourceCommit - the commit representing the initial state.
687
+ * @param targetCommit - the commit representing the final state.
688
+ * @param mintRevisionTag - a function which can be called to create revision tags for any rollback changes that need to be generated.
689
+ * @returns a change representing the difference between `sourceCommit` and `targetCommit`.
690
+ */
691
+ export function diffHistories<TChange>(
692
+ changeRebaser: ChangeRebaser<TChange>,
693
+ sourceCommit: GraphCommit<TChange>,
694
+ targetCommit: GraphCommit<TChange>,
695
+ mintRevisionTag: () => RevisionTag,
696
+ ): TChange {
697
+ const sourcePath: GraphCommit<TChange>[] = [];
698
+ const targetPath: GraphCommit<TChange>[] = [];
699
+ const ancestor = findCommonAncestor([sourceCommit, sourcePath], [targetCommit, targetPath]);
700
+ assert(ancestor !== undefined, 0xc6f /* Branches must be related */);
701
+ const inverses = sourcePath.map((commit) =>
702
+ rollbackFromCommit(changeRebaser, commit, mintRevisionTag),
703
+ );
704
+
705
+ inverses.reverse();
706
+ return changeRebaser.compose([...inverses, ...targetPath]);
707
+ }
@@ -9,8 +9,8 @@ import type { IIdCompressor } from "@fluidframework/id-compressor";
9
9
  import {
10
10
  type CodecWriteOptions,
11
11
  FluidClientVersion,
12
+ FormatValidatorNoOp,
12
13
  type IJsonCodec,
13
- noopValidator,
14
14
  } from "../../codec/index.js";
15
15
  import {
16
16
  type IdAllocator,
@@ -83,7 +83,7 @@ export class DetachedFieldIndex {
83
83
  options?: CodecWriteOptions,
84
84
  ) {
85
85
  this.options = options ?? {
86
- jsonValidator: noopValidator,
86
+ jsonValidator: FormatValidatorNoOp,
87
87
  oldestCompatibleClient: FluidClientVersion.v2_0,
88
88
  };
89
89
  this.codec = makeDetachedFieldIndexCodec(revisionTagCodec, this.options, idCompressor);
@@ -3,4 +3,4 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- export { typeboxValidator, FormatValidatorBasic } from "./typeboxValidator.js";
6
+ export { FormatValidatorBasic } from "./typeboxValidator.js";
@@ -18,10 +18,8 @@ import { toFormatValidator, type JsonValidator } from "../codec/index.js";
18
18
  * (i.e. a JSON validator is only included in an application's bundle if that application references it).
19
19
  *
20
20
  * Defining this validator in its own file also helps to ensure it is tree-shakeable.
21
- *
22
- * @alpha
23
21
  */
24
- export const typeboxValidator: JsonValidator = {
22
+ const typeboxValidator: JsonValidator = {
25
23
  compile: <Schema extends TSchema>(schema: Schema) => {
26
24
  const compiledFormat = TypeCompiler.Compile(schema);
27
25
  return {
@@ -151,6 +151,8 @@ export enum TreeStatus {
151
151
  *
152
152
  * @remarks
153
153
  * All editing is actually done via {@link FlexTreeField}s: the nodes are immutable other than that they contain mutable fields.
154
+ *
155
+ * All implementations should track read access in {@link currentObserver}'s observation methods as appropriate.
154
156
  */
155
157
  export interface FlexTreeNode extends FlexTreeEntity, MapTreeNodeViewGeneric<FlexTreeNode> {
156
158
  readonly [flexTreeMarker]: FlexTreeEntityKind.Node;
@@ -42,3 +42,5 @@ export { getOrCreateHydratedFlexTreeNode } from "./lazyNode.js";
42
42
  export { getSchemaAndPolicy, indexForAt } from "./utilities.js";
43
43
 
44
44
  export { treeStatusFromAnchorCache } from "./utilities.js";
45
+
46
+ export { currentObserver, withObservation, type Observer } from "./observer.js";
@@ -33,6 +33,7 @@ import {
33
33
  } from "./flexTreeTypes.js";
34
34
  import { LazyEntity } from "./lazyEntity.js";
35
35
  import { makeField } from "./lazyField.js";
36
+ import { currentObserver } from "./observer.js";
36
37
 
37
38
  /**
38
39
  * Get or create a {@link HydratedFlexTreeNode} for the given context at node indicated by the cursor.
@@ -118,18 +119,23 @@ export class LazyTreeNode extends LazyEntity<Anchor> implements HydratedFlexTree
118
119
  public readonly fields: Pick<Map<FieldKey, FlexTreeField>, typeof Symbol.iterator | "get"> =
119
120
  {
120
121
  get: (key: FieldKey): FlexTreeField | undefined => this.tryGetField(key),
121
- [Symbol.iterator]: (): IterableIterator<[FieldKey, FlexTreeField]> =>
122
- mapCursorFields(this.cursor, (cursor) => {
122
+ [Symbol.iterator]: (): IterableIterator<[FieldKey, FlexTreeField]> => {
123
+ currentObserver?.observeNodeFields(this);
124
+
125
+ return mapCursorFields(this.cursor, (cursor) => {
123
126
  const key: FieldKey = cursor.getFieldKey();
124
127
  const pair: [FieldKey, FlexTreeField] = [
125
128
  key,
126
129
  makeField(this.context, this.storedSchema.getFieldSchema(key).kind, cursor),
127
130
  ];
128
131
  return pair;
129
- }).values(),
132
+ }).values();
133
+ },
130
134
  };
131
135
 
132
136
  public tryGetField(fieldKey: FieldKey): FlexTreeField | undefined {
137
+ currentObserver?.observeNodeField(this, fieldKey);
138
+
133
139
  const schema = this.storedSchema.getFieldSchema(fieldKey);
134
140
  return inCursorField(this.cursor, fieldKey, (cursor) => {
135
141
  if (cursor.getFieldLength() === 0) {
@@ -140,6 +146,8 @@ export class LazyTreeNode extends LazyEntity<Anchor> implements HydratedFlexTree
140
146
  }
141
147
 
142
148
  public getBoxed(key: FieldKey): FlexTreeField {
149
+ currentObserver?.observeNodeField(this, key);
150
+
143
151
  const fieldSchema = this.storedSchema.getFieldSchema(key);
144
152
  return inCursorField(this.cursor, key, (cursor) => {
145
153
  return makeField(this.context, fieldSchema.kind, cursor);
@@ -157,6 +165,8 @@ export class LazyTreeNode extends LazyEntity<Anchor> implements HydratedFlexTree
157
165
  }
158
166
 
159
167
  public get parentField(): { readonly parent: FlexTreeField; readonly index: number } {
168
+ currentObserver?.observeParentOf(this);
169
+
160
170
  const cursor = this.cursor;
161
171
  const index = this.anchorNode.parentIndex;
162
172
  assert(cursor.fieldIndex === index, 0x786 /* mismatched indexes */);
@@ -0,0 +1,64 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import { debugAssert } from "@fluidframework/core-utils/internal";
7
+ import type { FlexTreeNode } from "./flexTreeTypes.js";
8
+ import type { FieldKey } from "../../core/index.js";
9
+
10
+ /*
11
+ * This file sets up a static observation tracking system.
12
+ *
13
+ * This library used to contain a more general variant of this which was deleted in https://github.com/microsoft/FluidFramework/pull/18659.
14
+ * This pattern somewhat resembles the approach in https://github.com/tc39/proposal-signals.
15
+ */
16
+
17
+ /**
18
+ * An object informed about observation made to trees.
19
+ * @remarks
20
+ * See {@link withObservation} and {@link currentObserver}.
21
+ */
22
+ export interface Observer {
23
+ observeNodeFields(node: FlexTreeNode): void;
24
+ observeNodeField(node: FlexTreeNode, key: FieldKey): void;
25
+ observeParentOf(node: FlexTreeNode): void;
26
+ }
27
+
28
+ /**
29
+ * The current observer, if any.
30
+ * @remarks
31
+ * Set via {@link setObserver} as used by {@link withObservation}.
32
+ * It should not be assigned in any other way.
33
+ * @privateRemarks
34
+ * This is exported directly as a property instead of via a getter for reduced overhead (less code, faster access) as this is used on some hot paths and its performance matters.
35
+ * The case where this is undefined (no observation) is particularly important for performance as we do not want to regress code which is not using this feature very much.
36
+ * Since it is not exported outside the package, this seems like a fine tradeoff, but could be reevaluated with some benchmarking if needed.
37
+ */
38
+ export let currentObserver: Observer | undefined;
39
+
40
+ const observerStack: (Observer | undefined)[] = [];
41
+
42
+ function setObserver(newObserver: Observer | undefined): void {
43
+ observerStack.push(newObserver);
44
+ currentObserver = newObserver;
45
+ }
46
+
47
+ function clearObserver(): void {
48
+ debugAssert(() => observerStack.length > 0 || "Empty Observer stack on clear");
49
+ const popped = observerStack.pop();
50
+ debugAssert(() => popped === currentObserver || "Mismatched observer stack");
51
+ currentObserver = observerStack[observerStack.length - 1];
52
+ }
53
+
54
+ /**
55
+ * For the duration of `f`, pushes `newObserver` onto the observer stack, making it the {@link currentObserver}.
56
+ */
57
+ export function withObservation<T>(newObserver: Observer | undefined, f: () => T): T {
58
+ setObserver(newObserver);
59
+ try {
60
+ return f();
61
+ } finally {
62
+ clearObserver();
63
+ }
64
+ }
@@ -171,6 +171,9 @@ export {
171
171
  type FlexTreeHydratedContextMinimal,
172
172
  type HydratedFlexTreeNode,
173
173
  getOrCreateHydratedFlexTreeNode,
174
+ currentObserver,
175
+ withObservation,
176
+ type Observer,
174
177
  } from "./flex-tree/index.js";
175
178
 
176
179
  export {
package/src/index.ts CHANGED
@@ -57,6 +57,7 @@ export {
57
57
  export {
58
58
  type ITreeInternal,
59
59
  type SharedTreeOptions,
60
+ type SharedTreeOptionsBeta,
60
61
  type ForestType,
61
62
  type SharedTreeFormatOptions,
62
63
  SharedTreeFormatVersion,
@@ -69,6 +70,7 @@ export {
69
70
  independentInitializedView,
70
71
  type ViewContent,
71
72
  TreeAlpha,
73
+ type ObservationResults,
72
74
  type TreeIdentifierUtils,
73
75
  independentView,
74
76
  ForestTypeOptimized,
@@ -275,6 +277,8 @@ export {
275
277
  export {
276
278
  SharedTree,
277
279
  configuredSharedTree,
280
+ configuredSharedTreeBeta,
281
+ configuredSharedTreeBetaLegacy,
278
282
  } from "./treeFactory.js";
279
283
  export { SharedTreeAttributes, SharedTreeFactoryType } from "./sharedTreeAttributes.js";
280
284
  export { persistedToSimpleSchema } from "./shared-tree/index.js";
@@ -282,14 +286,11 @@ export { persistedToSimpleSchema } from "./shared-tree/index.js";
282
286
  export {
283
287
  type ICodecOptions,
284
288
  type CodecWriteOptions,
285
- type JsonValidator,
286
- type SchemaValidationFunction,
287
289
  FluidClientVersion,
288
290
  type FormatValidator,
289
291
  FormatValidatorNoOp,
290
292
  } from "./codec/index.js";
291
- export { noopValidator } from "./codec/index.js";
292
- export { typeboxValidator, FormatValidatorBasic } from "./external-utilities/index.js";
293
+ export { FormatValidatorBasic } from "./external-utilities/index.js";
293
294
 
294
295
  export type {
295
296
  // Type Testing
@@ -332,3 +333,4 @@ export type { MapNodeInsertableData } from "./simple-tree/index.js";
332
333
  export { JsonAsTree } from "./jsonDomainSchema.js";
333
334
  export { FluidSerializableAsTree } from "./serializableDomainSchema.js";
334
335
  export { TableSchema, type System_TableSchema } from "./tableSchema.js";
336
+ export { asAlpha } from "./api.js";
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/tree";
9
- export const pkgVersion = "2.61.0";
9
+ export const pkgVersion = "2.62.0";
@@ -7,6 +7,7 @@ export {
7
7
  type ITreePrivate,
8
8
  type SharedTreeOptionsInternal,
9
9
  type SharedTreeOptions,
10
+ type SharedTreeOptionsBeta,
10
11
  SharedTreeKernel,
11
12
  getBranch,
12
13
  type ForestType,
@@ -49,6 +50,7 @@ export type { RunTransaction } from "./tree.js";
49
50
  export {
50
51
  TreeAlpha,
51
52
  type TreeIdentifierUtils,
53
+ type ObservationResults,
52
54
  } from "./treeAlpha.js";
53
55
 
54
56
  export {
@@ -420,8 +420,8 @@ export class SchematizingSimpleTreeView<
420
420
  this.checkout.forest.anchors.slots.delete(ViewSlot);
421
421
  this.currentCompatibility = undefined;
422
422
  this.onDispose?.();
423
- if (this.checkout.isBranch && !this.checkout.disposed) {
424
- // All (non-main) branches are 1:1 with views, so if a user manually disposes a view, we should also dispose the checkout/branch.
423
+ if (!this.checkout.isSharedBranch && !this.checkout.disposed) {
424
+ // All non-shared branches are 1:1 with views, so if a user manually disposes a view, we should also dispose the checkout/branch.
425
425
  this.checkout.dispose();
426
426
  }
427
427
  }