@fluidframework/tree 2.4.0-294316 → 2.4.0-297027

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 (606) hide show
  1. package/api-report/tree.alpha.api.md +58 -28
  2. package/api-report/tree.beta.api.md +38 -27
  3. package/api-report/tree.legacy.alpha.api.md +38 -27
  4. package/api-report/tree.legacy.public.api.md +38 -27
  5. package/api-report/tree.public.api.md +38 -27
  6. package/dist/alpha.d.ts +6 -0
  7. package/dist/beta.d.ts +3 -0
  8. package/dist/core/schema-stored/schema.d.ts +7 -0
  9. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  10. package/dist/core/schema-stored/schema.js +9 -0
  11. package/dist/core/schema-stored/schema.js.map +1 -1
  12. package/dist/core/tree/anchorSet.d.ts +1 -2
  13. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  14. package/dist/core/tree/anchorSet.js +2 -2
  15. package/dist/core/tree/anchorSet.js.map +1 -1
  16. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  17. package/dist/core/tree/detachedFieldIndex.js +13 -2
  18. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  19. package/dist/core/tree/detachedFieldIndexTypes.d.ts +1 -1
  20. package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
  21. package/dist/feature-libraries/editableTreeBinder.d.ts +3 -230
  22. package/dist/feature-libraries/editableTreeBinder.d.ts.map +1 -1
  23. package/dist/feature-libraries/editableTreeBinder.js +1 -539
  24. package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
  25. package/dist/feature-libraries/flex-tree/context.d.ts +7 -14
  26. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  27. package/dist/feature-libraries/flex-tree/context.js +3 -3
  28. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  29. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -16
  30. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  31. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  32. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts +2 -3
  33. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  34. package/dist/feature-libraries/flex-tree/lazyEntity.js +1 -2
  35. package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  36. package/dist/feature-libraries/flex-tree/lazyField.d.ts +10 -15
  37. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  38. package/dist/feature-libraries/flex-tree/lazyField.js +18 -20
  39. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  40. package/dist/feature-libraries/flex-tree/lazyNode.d.ts +4 -5
  41. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  42. package/dist/feature-libraries/flex-tree/lazyNode.js +13 -23
  43. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  44. package/dist/feature-libraries/flex-tree/utilities.js +1 -1
  45. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  46. package/dist/feature-libraries/index.d.ts +4 -7
  47. package/dist/feature-libraries/index.d.ts.map +1 -1
  48. package/dist/feature-libraries/index.js +5 -31
  49. package/dist/feature-libraries/index.js.map +1 -1
  50. package/dist/feature-libraries/sequence-field/formatV1.d.ts +18 -18
  51. package/dist/feature-libraries/sequence-field/formatV2.d.ts +18 -18
  52. package/dist/feature-libraries/sequence-field/formatV3.d.ts +27 -27
  53. package/dist/feature-libraries/typed-schema/flexList.d.ts +1 -46
  54. package/dist/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
  55. package/dist/feature-libraries/typed-schema/flexList.js +1 -13
  56. package/dist/feature-libraries/typed-schema/flexList.js.map +1 -1
  57. package/dist/feature-libraries/typed-schema/index.d.ts +2 -4
  58. package/dist/feature-libraries/typed-schema/index.d.ts.map +1 -1
  59. package/dist/feature-libraries/typed-schema/index.js +1 -19
  60. package/dist/feature-libraries/typed-schema/index.js.map +1 -1
  61. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +0 -212
  62. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  63. package/dist/feature-libraries/typed-schema/typedTreeSchema.js +0 -266
  64. package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  65. package/dist/index.d.ts +3 -3
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +2 -1
  68. package/dist/index.js.map +1 -1
  69. package/dist/internalTypes.d.ts +1 -1
  70. package/dist/internalTypes.d.ts.map +1 -1
  71. package/dist/internalTypes.js.map +1 -1
  72. package/dist/legacy.d.ts +3 -0
  73. package/dist/packageVersion.d.ts +1 -1
  74. package/dist/packageVersion.js +1 -1
  75. package/dist/packageVersion.js.map +1 -1
  76. package/dist/public.d.ts +3 -0
  77. package/dist/shared-tree/checkoutFlexTreeView.d.ts +3 -3
  78. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  79. package/dist/shared-tree/checkoutFlexTreeView.js +1 -1
  80. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
  81. package/dist/shared-tree/index.d.ts +3 -3
  82. package/dist/shared-tree/index.d.ts.map +1 -1
  83. package/dist/shared-tree/index.js +2 -3
  84. package/dist/shared-tree/index.js.map +1 -1
  85. package/dist/shared-tree/schematizeTree.d.ts +1 -40
  86. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  87. package/dist/shared-tree/schematizeTree.js +2 -11
  88. package/dist/shared-tree/schematizeTree.js.map +1 -1
  89. package/dist/shared-tree/schematizingTreeView.d.ts +8 -7
  90. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  91. package/dist/shared-tree/schematizingTreeView.js +16 -8
  92. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  93. package/dist/shared-tree/sharedTree.d.ts +19 -2
  94. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  95. package/dist/shared-tree/sharedTree.js +10 -2
  96. package/dist/shared-tree/sharedTree.js.map +1 -1
  97. package/dist/shared-tree/treeCheckout.d.ts +71 -41
  98. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  99. package/dist/shared-tree/treeCheckout.js +116 -84
  100. package/dist/shared-tree/treeCheckout.js.map +1 -1
  101. package/dist/shared-tree-core/branch.d.ts +8 -11
  102. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  103. package/dist/shared-tree-core/branch.js +12 -15
  104. package/dist/shared-tree-core/branch.js.map +1 -1
  105. package/dist/simple-tree/api/create.d.ts +1 -1
  106. package/dist/simple-tree/api/create.d.ts.map +1 -1
  107. package/dist/simple-tree/api/create.js +11 -13
  108. package/dist/simple-tree/api/create.js.map +1 -1
  109. package/dist/simple-tree/api/getJsonSchema.d.ts +3 -3
  110. package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
  111. package/dist/simple-tree/api/getJsonSchema.js +1 -1
  112. package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
  113. package/dist/simple-tree/api/getSimpleSchema.d.ts +2 -2
  114. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  115. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  116. package/dist/simple-tree/api/index.d.ts +2 -1
  117. package/dist/simple-tree/api/index.d.ts.map +1 -1
  118. package/dist/simple-tree/api/index.js +3 -1
  119. package/dist/simple-tree/api/index.js.map +1 -1
  120. package/dist/simple-tree/api/schemaFactory.d.ts +6 -6
  121. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  122. package/dist/simple-tree/api/schemaFactory.js +15 -2
  123. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  124. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +3 -3
  125. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  126. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  127. package/dist/simple-tree/api/simpleSchema.d.ts +14 -10
  128. package/dist/simple-tree/api/simpleSchema.d.ts.map +1 -1
  129. package/dist/simple-tree/api/simpleSchema.js.map +1 -1
  130. package/dist/simple-tree/api/tree.d.ts +12 -6
  131. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  132. package/dist/simple-tree/api/tree.js +4 -4
  133. package/dist/simple-tree/api/tree.js.map +1 -1
  134. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  135. package/dist/simple-tree/api/treeNodeApi.js +8 -6
  136. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  137. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  138. package/dist/simple-tree/api/verboseTree.js +6 -10
  139. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  140. package/{lib/feature-libraries/typed-schema → dist/simple-tree/api}/view.d.ts +4 -11
  141. package/dist/simple-tree/api/view.d.ts.map +1 -0
  142. package/dist/{feature-libraries/typed-schema → simple-tree/api}/view.js +9 -9
  143. package/dist/simple-tree/api/view.js.map +1 -0
  144. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +2 -2
  145. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  146. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +7 -1
  147. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  148. package/dist/simple-tree/arrayNode.d.ts +147 -14
  149. package/dist/simple-tree/arrayNode.d.ts.map +1 -1
  150. package/dist/simple-tree/arrayNode.js +32 -20
  151. package/dist/simple-tree/arrayNode.js.map +1 -1
  152. package/dist/simple-tree/core/context.d.ts +55 -0
  153. package/dist/simple-tree/core/context.d.ts.map +1 -0
  154. package/dist/simple-tree/core/context.js +60 -0
  155. package/dist/simple-tree/core/context.js.map +1 -0
  156. package/dist/simple-tree/core/getOrCreateNode.d.ts +15 -0
  157. package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -0
  158. package/dist/simple-tree/core/getOrCreateNode.js +36 -0
  159. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -0
  160. package/dist/simple-tree/core/index.d.ts +7 -3
  161. package/dist/simple-tree/core/index.d.ts.map +1 -1
  162. package/dist/simple-tree/core/index.js +16 -7
  163. package/dist/simple-tree/core/index.js.map +1 -1
  164. package/dist/simple-tree/core/schemaCaching.d.ts +5 -13
  165. package/dist/simple-tree/core/schemaCaching.d.ts.map +1 -1
  166. package/dist/simple-tree/core/schemaCaching.js +16 -45
  167. package/dist/simple-tree/core/schemaCaching.js.map +1 -1
  168. package/dist/simple-tree/core/treeNodeKernel.d.ts +29 -7
  169. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  170. package/dist/simple-tree/core/treeNodeKernel.js +94 -58
  171. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  172. package/dist/simple-tree/core/treeNodeSchema.d.ts +24 -0
  173. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  174. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  175. package/dist/simple-tree/core/types.d.ts +0 -5
  176. package/dist/simple-tree/core/types.d.ts.map +1 -1
  177. package/dist/simple-tree/core/types.js.map +1 -1
  178. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +139 -0
  179. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -0
  180. package/dist/{feature-libraries/flex-map-tree/mapTreeNode.js → simple-tree/core/unhydratedFlexTree.js} +112 -132
  181. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -0
  182. package/dist/simple-tree/{walkSchema.d.ts → core/walkSchema.d.ts} +8 -4
  183. package/dist/simple-tree/core/walkSchema.d.ts.map +1 -0
  184. package/dist/simple-tree/core/walkSchema.js +34 -0
  185. package/dist/simple-tree/core/walkSchema.js.map +1 -0
  186. package/dist/simple-tree/createContext.d.ts +11 -0
  187. package/dist/simple-tree/createContext.d.ts.map +1 -0
  188. package/dist/simple-tree/createContext.js +25 -0
  189. package/dist/simple-tree/createContext.js.map +1 -0
  190. package/dist/simple-tree/index.d.ts +3 -4
  191. package/dist/simple-tree/index.d.ts.map +1 -1
  192. package/dist/simple-tree/index.js +7 -7
  193. package/dist/simple-tree/index.js.map +1 -1
  194. package/dist/simple-tree/leafNodeSchema.d.ts +1 -0
  195. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  196. package/dist/simple-tree/leafNodeSchema.js +1 -2
  197. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  198. package/dist/simple-tree/mapNode.d.ts +4 -4
  199. package/dist/simple-tree/mapNode.d.ts.map +1 -1
  200. package/dist/simple-tree/mapNode.js +9 -5
  201. package/dist/simple-tree/mapNode.js.map +1 -1
  202. package/dist/simple-tree/objectNode.d.ts +8 -8
  203. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  204. package/dist/simple-tree/objectNode.js +33 -14
  205. package/dist/simple-tree/objectNode.js.map +1 -1
  206. package/dist/simple-tree/objectNodeTypes.d.ts +7 -3
  207. package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -1
  208. package/dist/simple-tree/objectNodeTypes.js.map +1 -1
  209. package/dist/simple-tree/proxies.d.ts +1 -2
  210. package/dist/simple-tree/proxies.d.ts.map +1 -1
  211. package/dist/simple-tree/proxies.js +6 -22
  212. package/dist/simple-tree/proxies.js.map +1 -1
  213. package/dist/simple-tree/schemaTypes.d.ts +2 -2
  214. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  215. package/dist/simple-tree/schemaTypes.js.map +1 -1
  216. package/dist/simple-tree/toFlexSchema.d.ts +6 -36
  217. package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
  218. package/dist/simple-tree/toFlexSchema.js +58 -142
  219. package/dist/simple-tree/toFlexSchema.js.map +1 -1
  220. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  221. package/dist/simple-tree/toMapTree.js +2 -2
  222. package/dist/simple-tree/toMapTree.js.map +1 -1
  223. package/dist/simple-tree/treeNodeValid.d.ts +13 -5
  224. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  225. package/dist/simple-tree/treeNodeValid.js +19 -10
  226. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  227. package/dist/simple-tree/typesUnsafe.d.ts +4 -4
  228. package/dist/simple-tree/typesUnsafe.d.ts.map +1 -1
  229. package/dist/simple-tree/typesUnsafe.js.map +1 -1
  230. package/dist/simple-tree/walkFieldSchema.d.ts +11 -0
  231. package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -0
  232. package/dist/simple-tree/walkFieldSchema.js +17 -0
  233. package/dist/simple-tree/walkFieldSchema.js.map +1 -0
  234. package/dist/util/index.d.ts +1 -1
  235. package/dist/util/index.d.ts.map +1 -1
  236. package/dist/util/index.js.map +1 -1
  237. package/dist/util/typeUtils.d.ts +14 -45
  238. package/dist/util/typeUtils.d.ts.map +1 -1
  239. package/dist/util/typeUtils.js.map +1 -1
  240. package/lib/alpha.d.ts +6 -0
  241. package/lib/beta.d.ts +3 -0
  242. package/lib/core/schema-stored/schema.d.ts +7 -0
  243. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  244. package/lib/core/schema-stored/schema.js +9 -0
  245. package/lib/core/schema-stored/schema.js.map +1 -1
  246. package/lib/core/tree/anchorSet.d.ts +1 -2
  247. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  248. package/lib/core/tree/anchorSet.js +2 -2
  249. package/lib/core/tree/anchorSet.js.map +1 -1
  250. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  251. package/lib/core/tree/detachedFieldIndex.js +13 -2
  252. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  253. package/lib/core/tree/detachedFieldIndexTypes.d.ts +1 -1
  254. package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
  255. package/lib/feature-libraries/editableTreeBinder.d.ts +3 -230
  256. package/lib/feature-libraries/editableTreeBinder.d.ts.map +1 -1
  257. package/lib/feature-libraries/editableTreeBinder.js +1 -532
  258. package/lib/feature-libraries/editableTreeBinder.js.map +1 -1
  259. package/lib/feature-libraries/flex-tree/context.d.ts +7 -14
  260. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  261. package/lib/feature-libraries/flex-tree/context.js +3 -3
  262. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  263. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -16
  264. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  265. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  266. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +2 -3
  267. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  268. package/lib/feature-libraries/flex-tree/lazyEntity.js +1 -2
  269. package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  270. package/lib/feature-libraries/flex-tree/lazyField.d.ts +10 -15
  271. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  272. package/lib/feature-libraries/flex-tree/lazyField.js +18 -20
  273. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  274. package/lib/feature-libraries/flex-tree/lazyNode.d.ts +4 -5
  275. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  276. package/lib/feature-libraries/flex-tree/lazyNode.js +13 -23
  277. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  278. package/lib/feature-libraries/flex-tree/utilities.js +1 -1
  279. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  280. package/lib/feature-libraries/index.d.ts +4 -7
  281. package/lib/feature-libraries/index.d.ts.map +1 -1
  282. package/lib/feature-libraries/index.js +4 -6
  283. package/lib/feature-libraries/index.js.map +1 -1
  284. package/lib/feature-libraries/sequence-field/formatV1.d.ts +18 -18
  285. package/lib/feature-libraries/sequence-field/formatV2.d.ts +18 -18
  286. package/lib/feature-libraries/sequence-field/formatV3.d.ts +27 -27
  287. package/lib/feature-libraries/typed-schema/flexList.d.ts +1 -46
  288. package/lib/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
  289. package/lib/feature-libraries/typed-schema/flexList.js +0 -11
  290. package/lib/feature-libraries/typed-schema/flexList.js.map +1 -1
  291. package/lib/feature-libraries/typed-schema/index.d.ts +2 -4
  292. package/lib/feature-libraries/typed-schema/index.d.ts.map +1 -1
  293. package/lib/feature-libraries/typed-schema/index.js +0 -3
  294. package/lib/feature-libraries/typed-schema/index.js.map +1 -1
  295. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +0 -212
  296. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  297. package/lib/feature-libraries/typed-schema/typedTreeSchema.js +1 -253
  298. package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  299. package/lib/index.d.ts +3 -3
  300. package/lib/index.d.ts.map +1 -1
  301. package/lib/index.js +1 -1
  302. package/lib/index.js.map +1 -1
  303. package/lib/internalTypes.d.ts +1 -1
  304. package/lib/internalTypes.d.ts.map +1 -1
  305. package/lib/internalTypes.js.map +1 -1
  306. package/lib/legacy.d.ts +3 -0
  307. package/lib/packageVersion.d.ts +1 -1
  308. package/lib/packageVersion.js +1 -1
  309. package/lib/packageVersion.js.map +1 -1
  310. package/lib/public.d.ts +3 -0
  311. package/lib/shared-tree/checkoutFlexTreeView.d.ts +3 -3
  312. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  313. package/lib/shared-tree/checkoutFlexTreeView.js +1 -1
  314. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
  315. package/lib/shared-tree/index.d.ts +3 -3
  316. package/lib/shared-tree/index.d.ts.map +1 -1
  317. package/lib/shared-tree/index.js +1 -2
  318. package/lib/shared-tree/index.js.map +1 -1
  319. package/lib/shared-tree/schematizeTree.d.ts +1 -40
  320. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  321. package/lib/shared-tree/schematizeTree.js +1 -9
  322. package/lib/shared-tree/schematizeTree.js.map +1 -1
  323. package/lib/shared-tree/schematizingTreeView.d.ts +8 -7
  324. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  325. package/lib/shared-tree/schematizingTreeView.js +19 -11
  326. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  327. package/lib/shared-tree/sharedTree.d.ts +19 -2
  328. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  329. package/lib/shared-tree/sharedTree.js +10 -3
  330. package/lib/shared-tree/sharedTree.js.map +1 -1
  331. package/lib/shared-tree/treeCheckout.d.ts +71 -41
  332. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  333. package/lib/shared-tree/treeCheckout.js +118 -86
  334. package/lib/shared-tree/treeCheckout.js.map +1 -1
  335. package/lib/shared-tree-core/branch.d.ts +8 -11
  336. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  337. package/lib/shared-tree-core/branch.js +12 -15
  338. package/lib/shared-tree-core/branch.js.map +1 -1
  339. package/lib/simple-tree/api/create.d.ts +1 -1
  340. package/lib/simple-tree/api/create.d.ts.map +1 -1
  341. package/lib/simple-tree/api/create.js +14 -16
  342. package/lib/simple-tree/api/create.js.map +1 -1
  343. package/lib/simple-tree/api/getJsonSchema.d.ts +3 -3
  344. package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
  345. package/lib/simple-tree/api/getJsonSchema.js +1 -1
  346. package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
  347. package/lib/simple-tree/api/getSimpleSchema.d.ts +2 -2
  348. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  349. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
  350. package/lib/simple-tree/api/index.d.ts +2 -1
  351. package/lib/simple-tree/api/index.d.ts.map +1 -1
  352. package/lib/simple-tree/api/index.js +1 -0
  353. package/lib/simple-tree/api/index.js.map +1 -1
  354. package/lib/simple-tree/api/schemaFactory.d.ts +6 -6
  355. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  356. package/lib/simple-tree/api/schemaFactory.js +15 -2
  357. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  358. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +3 -3
  359. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  360. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  361. package/lib/simple-tree/api/simpleSchema.d.ts +14 -10
  362. package/lib/simple-tree/api/simpleSchema.d.ts.map +1 -1
  363. package/lib/simple-tree/api/simpleSchema.js.map +1 -1
  364. package/lib/simple-tree/api/tree.d.ts +12 -6
  365. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  366. package/lib/simple-tree/api/tree.js +4 -4
  367. package/lib/simple-tree/api/tree.js.map +1 -1
  368. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  369. package/lib/simple-tree/api/treeNodeApi.js +10 -8
  370. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  371. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  372. package/lib/simple-tree/api/verboseTree.js +6 -10
  373. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  374. package/{dist/feature-libraries/typed-schema → lib/simple-tree/api}/view.d.ts +4 -11
  375. package/lib/simple-tree/api/view.d.ts.map +1 -0
  376. package/lib/{feature-libraries/typed-schema → simple-tree/api}/view.js +9 -9
  377. package/lib/simple-tree/api/view.js.map +1 -0
  378. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +2 -2
  379. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  380. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +7 -1
  381. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  382. package/lib/simple-tree/arrayNode.d.ts +147 -14
  383. package/lib/simple-tree/arrayNode.d.ts.map +1 -1
  384. package/lib/simple-tree/arrayNode.js +37 -25
  385. package/lib/simple-tree/arrayNode.js.map +1 -1
  386. package/lib/simple-tree/core/context.d.ts +55 -0
  387. package/lib/simple-tree/core/context.d.ts.map +1 -0
  388. package/lib/simple-tree/core/context.js +55 -0
  389. package/lib/simple-tree/core/context.js.map +1 -0
  390. package/lib/simple-tree/core/getOrCreateNode.d.ts +15 -0
  391. package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -0
  392. package/lib/simple-tree/core/getOrCreateNode.js +32 -0
  393. package/lib/simple-tree/core/getOrCreateNode.js.map +1 -0
  394. package/lib/simple-tree/core/index.d.ts +7 -3
  395. package/lib/simple-tree/core/index.d.ts.map +1 -1
  396. package/lib/simple-tree/core/index.js +6 -2
  397. package/lib/simple-tree/core/index.js.map +1 -1
  398. package/lib/simple-tree/core/schemaCaching.d.ts +5 -13
  399. package/lib/simple-tree/core/schemaCaching.d.ts.map +1 -1
  400. package/lib/simple-tree/core/schemaCaching.js +13 -39
  401. package/lib/simple-tree/core/schemaCaching.js.map +1 -1
  402. package/lib/simple-tree/core/treeNodeKernel.d.ts +29 -7
  403. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  404. package/lib/simple-tree/core/treeNodeKernel.js +89 -54
  405. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  406. package/lib/simple-tree/core/treeNodeSchema.d.ts +24 -0
  407. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  408. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  409. package/lib/simple-tree/core/types.d.ts +0 -5
  410. package/lib/simple-tree/core/types.d.ts.map +1 -1
  411. package/lib/simple-tree/core/types.js.map +1 -1
  412. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +139 -0
  413. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -0
  414. package/lib/{feature-libraries/flex-map-tree/mapTreeNode.js → simple-tree/core/unhydratedFlexTree.js} +110 -128
  415. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -0
  416. package/lib/simple-tree/{walkSchema.d.ts → core/walkSchema.d.ts} +8 -4
  417. package/lib/simple-tree/core/walkSchema.d.ts.map +1 -0
  418. package/lib/simple-tree/core/walkSchema.js +29 -0
  419. package/lib/simple-tree/core/walkSchema.js.map +1 -0
  420. package/lib/simple-tree/createContext.d.ts +11 -0
  421. package/lib/simple-tree/createContext.d.ts.map +1 -0
  422. package/lib/simple-tree/createContext.js +21 -0
  423. package/lib/simple-tree/createContext.js.map +1 -0
  424. package/lib/simple-tree/index.d.ts +3 -4
  425. package/lib/simple-tree/index.d.ts.map +1 -1
  426. package/lib/simple-tree/index.js +3 -4
  427. package/lib/simple-tree/index.js.map +1 -1
  428. package/lib/simple-tree/leafNodeSchema.d.ts +1 -0
  429. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  430. package/lib/simple-tree/leafNodeSchema.js +3 -4
  431. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  432. package/lib/simple-tree/mapNode.d.ts +4 -4
  433. package/lib/simple-tree/mapNode.d.ts.map +1 -1
  434. package/lib/simple-tree/mapNode.js +12 -8
  435. package/lib/simple-tree/mapNode.js.map +1 -1
  436. package/lib/simple-tree/objectNode.d.ts +8 -8
  437. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  438. package/lib/simple-tree/objectNode.js +36 -17
  439. package/lib/simple-tree/objectNode.js.map +1 -1
  440. package/lib/simple-tree/objectNodeTypes.d.ts +7 -3
  441. package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -1
  442. package/lib/simple-tree/objectNodeTypes.js.map +1 -1
  443. package/lib/simple-tree/proxies.d.ts +1 -2
  444. package/lib/simple-tree/proxies.d.ts.map +1 -1
  445. package/lib/simple-tree/proxies.js +7 -22
  446. package/lib/simple-tree/proxies.js.map +1 -1
  447. package/lib/simple-tree/schemaTypes.d.ts +2 -2
  448. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  449. package/lib/simple-tree/schemaTypes.js.map +1 -1
  450. package/lib/simple-tree/toFlexSchema.d.ts +6 -36
  451. package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
  452. package/lib/simple-tree/toFlexSchema.js +61 -142
  453. package/lib/simple-tree/toFlexSchema.js.map +1 -1
  454. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  455. package/lib/simple-tree/toMapTree.js +4 -4
  456. package/lib/simple-tree/toMapTree.js.map +1 -1
  457. package/lib/simple-tree/treeNodeValid.d.ts +13 -5
  458. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  459. package/lib/simple-tree/treeNodeValid.js +21 -12
  460. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  461. package/lib/simple-tree/typesUnsafe.d.ts +4 -4
  462. package/lib/simple-tree/typesUnsafe.d.ts.map +1 -1
  463. package/lib/simple-tree/typesUnsafe.js.map +1 -1
  464. package/lib/simple-tree/walkFieldSchema.d.ts +11 -0
  465. package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -0
  466. package/lib/simple-tree/walkFieldSchema.js +13 -0
  467. package/lib/simple-tree/walkFieldSchema.js.map +1 -0
  468. package/lib/util/index.d.ts +1 -1
  469. package/lib/util/index.d.ts.map +1 -1
  470. package/lib/util/index.js.map +1 -1
  471. package/lib/util/typeUtils.d.ts +14 -45
  472. package/lib/util/typeUtils.d.ts.map +1 -1
  473. package/lib/util/typeUtils.js.map +1 -1
  474. package/package.json +29 -20
  475. package/src/core/schema-stored/schema.ts +17 -0
  476. package/src/core/tree/anchorSet.ts +3 -4
  477. package/src/core/tree/detachedFieldIndex.ts +14 -3
  478. package/src/core/tree/detachedFieldIndexTypes.ts +1 -1
  479. package/src/feature-libraries/editableTreeBinder.ts +2 -915
  480. package/src/feature-libraries/flex-tree/context.ts +7 -20
  481. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +2 -18
  482. package/src/feature-libraries/flex-tree/lazyEntity.ts +1 -4
  483. package/src/feature-libraries/flex-tree/lazyField.ts +22 -78
  484. package/src/feature-libraries/flex-tree/lazyNode.ts +24 -39
  485. package/src/feature-libraries/flex-tree/utilities.ts +1 -1
  486. package/src/feature-libraries/index.ts +3 -71
  487. package/src/feature-libraries/typed-schema/flexList.ts +3 -84
  488. package/src/feature-libraries/typed-schema/index.ts +1 -33
  489. package/src/feature-libraries/typed-schema/typedTreeSchema.ts +0 -458
  490. package/src/index.ts +6 -0
  491. package/src/internalTypes.ts +0 -1
  492. package/src/packageVersion.ts +1 -1
  493. package/src/shared-tree/checkoutFlexTreeView.ts +3 -3
  494. package/src/shared-tree/index.ts +4 -8
  495. package/src/shared-tree/schematizeTree.ts +2 -56
  496. package/src/shared-tree/schematizingTreeView.ts +34 -15
  497. package/src/shared-tree/sharedTree.ts +36 -8
  498. package/src/shared-tree/treeCheckout.ts +225 -128
  499. package/src/shared-tree-core/branch.ts +15 -26
  500. package/src/simple-tree/api/create.ts +18 -20
  501. package/src/simple-tree/api/getJsonSchema.ts +3 -3
  502. package/src/simple-tree/api/getSimpleSchema.ts +2 -2
  503. package/src/simple-tree/api/index.ts +2 -0
  504. package/src/simple-tree/api/schemaFactory.ts +41 -12
  505. package/src/simple-tree/api/schemaFactoryRecursive.ts +3 -6
  506. package/src/simple-tree/api/simpleSchema.ts +15 -10
  507. package/src/simple-tree/api/tree.ts +15 -9
  508. package/src/simple-tree/api/treeNodeApi.ts +12 -10
  509. package/src/simple-tree/api/verboseTree.ts +6 -12
  510. package/src/{feature-libraries/typed-schema → simple-tree/api}/view.ts +9 -22
  511. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +11 -2
  512. package/src/simple-tree/arrayNode.ts +202 -53
  513. package/src/simple-tree/core/context.ts +78 -0
  514. package/src/simple-tree/core/getOrCreateNode.ts +38 -0
  515. package/src/simple-tree/core/index.ts +11 -7
  516. package/src/simple-tree/core/schemaCaching.ts +13 -50
  517. package/src/simple-tree/core/treeNodeKernel.ts +117 -78
  518. package/src/simple-tree/core/treeNodeSchema.ts +35 -1
  519. package/src/simple-tree/core/types.ts +0 -5
  520. package/src/{feature-libraries/flex-map-tree/mapTreeNode.ts → simple-tree/core/unhydratedFlexTree.ts} +167 -210
  521. package/src/simple-tree/{walkSchema.ts → core/walkSchema.ts} +12 -34
  522. package/src/simple-tree/createContext.ts +24 -0
  523. package/src/simple-tree/index.ts +5 -2
  524. package/src/simple-tree/leafNodeSchema.ts +3 -9
  525. package/src/simple-tree/mapNode.ts +20 -17
  526. package/src/simple-tree/objectNode.ts +63 -38
  527. package/src/simple-tree/objectNodeTypes.ts +8 -5
  528. package/src/simple-tree/proxies.ts +8 -26
  529. package/src/simple-tree/schemaTypes.ts +2 -2
  530. package/src/simple-tree/toFlexSchema.ts +71 -204
  531. package/src/simple-tree/toMapTree.ts +5 -5
  532. package/src/simple-tree/treeNodeValid.ts +28 -22
  533. package/src/simple-tree/typesUnsafe.ts +4 -4
  534. package/src/simple-tree/walkFieldSchema.ts +19 -0
  535. package/src/util/index.ts +1 -5
  536. package/src/util/typeUtils.ts +14 -56
  537. package/dist/feature-libraries/fieldGenerator.d.ts +0 -43
  538. package/dist/feature-libraries/fieldGenerator.d.ts.map +0 -1
  539. package/dist/feature-libraries/fieldGenerator.js +0 -13
  540. package/dist/feature-libraries/fieldGenerator.js.map +0 -1
  541. package/dist/feature-libraries/flex-map-tree/index.d.ts +0 -6
  542. package/dist/feature-libraries/flex-map-tree/index.d.ts.map +0 -1
  543. package/dist/feature-libraries/flex-map-tree/index.js +0 -14
  544. package/dist/feature-libraries/flex-map-tree/index.js.map +0 -1
  545. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts +0 -157
  546. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +0 -1
  547. package/dist/feature-libraries/flex-map-tree/mapTreeNode.js.map +0 -1
  548. package/dist/feature-libraries/storedToViewSchema.d.ts +0 -17
  549. package/dist/feature-libraries/storedToViewSchema.d.ts.map +0 -1
  550. package/dist/feature-libraries/storedToViewSchema.js +0 -67
  551. package/dist/feature-libraries/storedToViewSchema.js.map +0 -1
  552. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts +0 -58
  553. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +0 -1
  554. package/dist/feature-libraries/typed-schema/schemaCollection.js +0 -160
  555. package/dist/feature-libraries/typed-schema/schemaCollection.js.map +0 -1
  556. package/dist/feature-libraries/typed-schema/typeUtils.d.ts +0 -15
  557. package/dist/feature-libraries/typed-schema/typeUtils.d.ts.map +0 -1
  558. package/dist/feature-libraries/typed-schema/typeUtils.js +0 -14
  559. package/dist/feature-libraries/typed-schema/typeUtils.js.map +0 -1
  560. package/dist/feature-libraries/typed-schema/view.d.ts.map +0 -1
  561. package/dist/feature-libraries/typed-schema/view.js.map +0 -1
  562. package/dist/simple-tree/getSimpleFieldSchema.d.ts +0 -14
  563. package/dist/simple-tree/getSimpleFieldSchema.d.ts.map +0 -1
  564. package/dist/simple-tree/getSimpleFieldSchema.js +0 -29
  565. package/dist/simple-tree/getSimpleFieldSchema.js.map +0 -1
  566. package/dist/simple-tree/walkSchema.d.ts.map +0 -1
  567. package/dist/simple-tree/walkSchema.js +0 -49
  568. package/dist/simple-tree/walkSchema.js.map +0 -1
  569. package/lib/feature-libraries/fieldGenerator.d.ts +0 -43
  570. package/lib/feature-libraries/fieldGenerator.d.ts.map +0 -1
  571. package/lib/feature-libraries/fieldGenerator.js +0 -12
  572. package/lib/feature-libraries/fieldGenerator.js.map +0 -1
  573. package/lib/feature-libraries/flex-map-tree/index.d.ts +0 -6
  574. package/lib/feature-libraries/flex-map-tree/index.d.ts.map +0 -1
  575. package/lib/feature-libraries/flex-map-tree/index.js +0 -6
  576. package/lib/feature-libraries/flex-map-tree/index.js.map +0 -1
  577. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts +0 -157
  578. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +0 -1
  579. package/lib/feature-libraries/flex-map-tree/mapTreeNode.js.map +0 -1
  580. package/lib/feature-libraries/storedToViewSchema.d.ts +0 -17
  581. package/lib/feature-libraries/storedToViewSchema.d.ts.map +0 -1
  582. package/lib/feature-libraries/storedToViewSchema.js +0 -62
  583. package/lib/feature-libraries/storedToViewSchema.js.map +0 -1
  584. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts +0 -58
  585. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +0 -1
  586. package/lib/feature-libraries/typed-schema/schemaCollection.js +0 -153
  587. package/lib/feature-libraries/typed-schema/schemaCollection.js.map +0 -1
  588. package/lib/feature-libraries/typed-schema/typeUtils.d.ts +0 -15
  589. package/lib/feature-libraries/typed-schema/typeUtils.d.ts.map +0 -1
  590. package/lib/feature-libraries/typed-schema/typeUtils.js +0 -10
  591. package/lib/feature-libraries/typed-schema/typeUtils.js.map +0 -1
  592. package/lib/feature-libraries/typed-schema/view.d.ts.map +0 -1
  593. package/lib/feature-libraries/typed-schema/view.js.map +0 -1
  594. package/lib/simple-tree/getSimpleFieldSchema.d.ts +0 -14
  595. package/lib/simple-tree/getSimpleFieldSchema.d.ts.map +0 -1
  596. package/lib/simple-tree/getSimpleFieldSchema.js +0 -25
  597. package/lib/simple-tree/getSimpleFieldSchema.js.map +0 -1
  598. package/lib/simple-tree/walkSchema.d.ts.map +0 -1
  599. package/lib/simple-tree/walkSchema.js +0 -43
  600. package/lib/simple-tree/walkSchema.js.map +0 -1
  601. package/src/feature-libraries/fieldGenerator.ts +0 -47
  602. package/src/feature-libraries/flex-map-tree/index.ts +0 -14
  603. package/src/feature-libraries/storedToViewSchema.ts +0 -100
  604. package/src/feature-libraries/typed-schema/schemaCollection.ts +0 -254
  605. package/src/feature-libraries/typed-schema/typeUtils.ts +0 -29
  606. package/src/simple-tree/getSimpleFieldSchema.ts +0 -36
@@ -1 +1 @@
1
- {"version":3,"file":"sharedTree.js","sourceRoot":"","sources":["../../src/shared-tree/sharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAS7D,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtE,OAAO,EAAsB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAEN,gBAAgB,EAEhB,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ACd,CAAC,EAbW,UAAU,KAAV,UAAU,QAarB;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAgC;IACpE,aAAa,EAAE,aAAa;IAC5B,MAAM,EAAE,UAAU,CAAC,SAAS;IAC5B,cAAc,EAAE,uBAAuB,CAAC,UAAU;IAClD,aAAa,EAAE,uBAAuB,CAAC,EAAE;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,OAAO,iBAAiB;IAS7B,YAAoC,UAA6B,EAAE;QAA/B,YAAO,GAAP,OAAO,CAAwB;QARnD,SAAI,GAAW,wCAAwC,CAAC;QAExD,eAAU,GAAuB;YAChD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,qBAAqB,EAAE,OAAO;YAC9B,cAAc,EAAE,OAAO;SACvB,CAAC;IAEoE,CAAC;IAEhE,KAAK,CAAC,IAAI,CAChB,OAA+B,EAC/B,EAAU,EACV,QAA0B,EAC1B,iBAA+C;QAE/C,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1E,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,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 type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport type { ISharedObject } from \"@fluidframework/shared-object-base/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { type ICodecOptions, noopValidator } from \"../codec/index.js\";\nimport {\n\ttype JsonableTree,\n\tRevisionTagCodec,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tmakeDetachedFieldIndex,\n\tmoveToDetachedField,\n} from \"../core/index.js\";\nimport {\n\ttype HasListeners,\n\ttype IEmitter,\n\ttype Listenable,\n\tcreateEmitter,\n} from \"../events/index.js\";\nimport {\n\tDetachedFieldIndexSummarizer,\n\tForestSummarizer,\n\tSchemaSummarizer,\n\tTreeCompressionStrategy,\n\tbuildChunkedForest,\n\tbuildForest,\n\tcreateNodeKeyManager,\n\tdefaultSchemaPolicy,\n\tjsonableTreeFromFieldCursor,\n\tmakeFieldBatchCodec,\n\tmakeMitigatedChangeFamily,\n\tmakeTreeChunker,\n} from \"../feature-libraries/index.js\";\nimport {\n\tDefaultResubmitMachine,\n\ttype ExplicitCoreCodecVersions,\n\tSharedTreeCore,\n} from \"../shared-tree-core/index.js\";\nimport type {\n\tITree,\n\tImplicitFieldSchema,\n\tTreeViewConfiguration,\n} from \"../simple-tree/index.js\";\n\nimport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\nimport { SharedTreeReadonlyChangeEnricher } from \"./sharedTreeChangeEnricher.js\";\nimport { SharedTreeChangeFamily } from \"./sharedTreeChangeFamily.js\";\nimport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\nimport type { SharedTreeEditBuilder } from \"./sharedTreeEditBuilder.js\";\nimport { type CheckoutEvents, type TreeCheckout, createTreeCheckout } from \"./treeCheckout.js\";\nimport { breakingClass, throwIfBroken } from \"../util/index.js\";\n\n/**\n * Copy of data from an {@link ISharedTree} at some point in time.\n * @remarks\n * This is unrelated to Fluids concept of \"snapshots\".\n * @internal\n */\nexport interface SharedTreeContentSnapshot {\n\t/**\n\t * The schema stored in the document.\n\t *\n\t * @remarks\n\t * Edits to the schema can mutate the schema stored of the tree which took this snapshot (but this snapshot will remain the same)\n\t * This is mainly useful for debugging cases where schematize reports an incompatible view schema.\n\t */\n\treadonly schema: TreeStoredSchema;\n\t/**\n\t * All {@link TreeStatus.InDocument} content.\n\t */\n\treadonly tree: JsonableTree[];\n\t/**\n\t * All {@link TreeStatus.Removed} content.\n\t */\n\treadonly removed: [string | number | undefined, number, JsonableTree][];\n}\n\n/**\n * {@link ITree} extended with some non-public APIs.\n * @internal\n */\nexport interface ISharedTree extends ISharedObject, ITree {\n\t/**\n\t * Provides a copy of the current content of the tree.\n\t * This can be useful for inspecting the tree when no suitable view schema is available.\n\t * This is only intended for use in testing and exceptional code paths: it is not performant.\n\t *\n\t * This does not include everything that is included in a tree summary, since information about how to merge future edits is omitted.\n\t */\n\tcontentSnapshot(): SharedTreeContentSnapshot;\n}\n\n/**\n * Has an entry for each codec which writes an explicit version into its data.\n *\n * This is used to map the single API entrypoint controlling the format {@link SharedTreeOptions.formatVersion}\n * to a list of write versions that for each codec that should be used for that format.\n *\n * Note that all explicitly versioned codecs should be using the format version from the data to read encoded data.\n *\n * TODO: Plumb these write versions into forest, schema, detached field index codec creation.\n */\ninterface ExplicitCodecVersions extends ExplicitCoreCodecVersions {\n\tforest: number;\n\tschema: number;\n\tdetachedFieldIndex: number;\n\tfieldBatch: number;\n}\n\nconst formatVersionToTopLevelCodecVersions = new Map<number, ExplicitCodecVersions>([\n\t[\n\t\t1,\n\t\t{ forest: 1, schema: 1, detachedFieldIndex: 1, editManager: 1, message: 1, fieldBatch: 1 },\n\t],\n\t[\n\t\t2,\n\t\t{ forest: 1, schema: 1, detachedFieldIndex: 1, editManager: 2, message: 2, fieldBatch: 1 },\n\t],\n\t[\n\t\t3,\n\t\t{ forest: 1, schema: 1, detachedFieldIndex: 1, editManager: 3, message: 3, fieldBatch: 1 },\n\t],\n\t[\n\t\t4,\n\t\t{ forest: 1, schema: 1, detachedFieldIndex: 1, editManager: 4, message: 4, fieldBatch: 1 },\n\t],\n]);\n\nfunction getCodecVersions(formatVersion: number): ExplicitCodecVersions {\n\tconst versions = formatVersionToTopLevelCodecVersions.get(formatVersion);\n\tassert(versions !== undefined, 0x90e /* Unknown format version */);\n\treturn versions;\n}\n\n/**\n * Shared tree, configured with a good set of indexes and field kinds which will maintain compatibility over time.\n *\n * TODO: detail compatibility requirements.\n */\n@breakingClass\nexport class SharedTree\n\textends SharedTreeCore<SharedTreeEditBuilder, SharedTreeChange>\n\timplements ISharedTree\n{\n\tprivate readonly _events: Listenable<CheckoutEvents> &\n\t\tIEmitter<CheckoutEvents> &\n\t\tHasListeners<CheckoutEvents>;\n\tpublic readonly checkout: TreeCheckout;\n\tpublic get storedSchema(): TreeStoredSchemaRepository {\n\t\treturn this.checkout.storedSchema;\n\t}\n\n\tpublic constructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\toptionsParam: SharedTreeOptions,\n\t\ttelemetryContextPrefix: string = \"fluid_sharedTree_\",\n\t) {\n\t\tif (runtime.idCompressor === undefined) {\n\t\t\tthrow new UsageError(\"IdCompressor must be enabled to use SharedTree\");\n\t\t}\n\n\t\tconst options = { ...defaultSharedTreeOptions, ...optionsParam };\n\t\tconst codecVersions = getCodecVersions(options.formatVersion);\n\t\tconst schema = new TreeStoredSchemaRepository();\n\t\tconst forest =\n\t\t\toptions.forest === ForestType.Optimized\n\t\t\t\t? buildChunkedForest(\n\t\t\t\t\t\tmakeTreeChunker(schema, defaultSchemaPolicy),\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\truntime.idCompressor,\n\t\t\t\t\t)\n\t\t\t\t: options.forest === ForestType.Reference\n\t\t\t\t\t? buildForest()\n\t\t\t\t\t: buildForest(undefined, true);\n\t\tconst revisionTagCodec = new RevisionTagCodec(runtime.idCompressor);\n\t\tconst removedRoots = makeDetachedFieldIndex(\n\t\t\t\"repair\",\n\t\t\trevisionTagCodec,\n\t\t\truntime.idCompressor,\n\t\t\toptions,\n\t\t);\n\t\tconst schemaSummarizer = new SchemaSummarizer(runtime, schema, options, {\n\t\t\tgetCurrentSeq: () => this.deltaManager.lastSequenceNumber,\n\t\t});\n\t\tconst fieldBatchCodec = makeFieldBatchCodec(options, codecVersions.fieldBatch);\n\n\t\tconst encoderContext = {\n\t\t\tschema: {\n\t\t\t\tschema,\n\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t},\n\t\t\tencodeType: options.treeEncodeType,\n\t\t\toriginatorId: runtime.idCompressor.localSessionId,\n\t\t\tidCompressor: runtime.idCompressor,\n\t\t};\n\t\tconst forestSummarizer = new ForestSummarizer(\n\t\t\tforest,\n\t\t\trevisionTagCodec,\n\t\t\tfieldBatchCodec,\n\t\t\tencoderContext,\n\t\t\toptions,\n\t\t\truntime.idCompressor,\n\t\t);\n\t\tconst removedRootsSummarizer = new DetachedFieldIndexSummarizer(removedRoots);\n\t\tconst innerChangeFamily = new SharedTreeChangeFamily(\n\t\t\trevisionTagCodec,\n\t\t\tfieldBatchCodec,\n\t\t\toptions,\n\t\t\toptions.treeEncodeType,\n\t\t\truntime.idCompressor,\n\t\t);\n\t\tconst changeFamily = makeMitigatedChangeFamily(\n\t\t\tinnerChangeFamily,\n\t\t\tSharedTreeChangeFamily.emptyChange,\n\t\t\t(error: unknown) => {\n\t\t\t\t// TODO:6344 Add telemetry for these errors.\n\t\t\t\t// Rethrowing the error has a different effect depending on the context in which the\n\t\t\t\t// ChangeFamily was invoked:\n\t\t\t\t// - If the ChangeFamily was invoked as part of incoming op processing, rethrowing the error\n\t\t\t\t// will cause the runtime to disconnect the client, log a severe error, and not reconnect.\n\t\t\t\t// This will not cause the host application to crash because it is not on the stack at that time.\n\t\t\t\t// TODO: let the host application know that the client is now disconnected.\n\t\t\t\t// - If the ChangeFamily was invoked as part of dealing with a local change, rethrowing the\n\t\t\t\t// error will cause the host application to crash. This is not ideal, but is better than\n\t\t\t\t// letting the application either send an invalid change to the server or allowing the\n\t\t\t\t// application to continue working when its local branches contain edits that cannot be\n\t\t\t\t// reflected in its views.\n\t\t\t\t// The best course of action for a host application in such a state is to restart.\n\t\t\t\t// TODO: let the host application know about this situation and provide a way to\n\t\t\t\t// programmatically reload the SharedTree container.\n\t\t\t\tthrow error;\n\t\t\t},\n\t\t);\n\t\tconst changeEnricher = new SharedTreeReadonlyChangeEnricher(forest, schema, removedRoots);\n\t\tsuper(\n\t\t\t[schemaSummarizer, forestSummarizer, removedRootsSummarizer],\n\t\t\tchangeFamily,\n\t\t\toptions,\n\t\t\tcodecVersions,\n\t\t\tid,\n\t\t\truntime,\n\t\t\tattributes,\n\t\t\ttelemetryContextPrefix,\n\t\t\tschema,\n\t\t\tdefaultSchemaPolicy,\n\t\t\tnew DefaultResubmitMachine(\n\t\t\t\tchangeFamily.rebaser.invert.bind(changeFamily.rebaser),\n\t\t\t\tchangeEnricher,\n\t\t\t),\n\t\t\tchangeEnricher,\n\t\t);\n\t\tthis._events = createEmitter<CheckoutEvents>();\n\t\tconst localBranch = this.getLocalBranch();\n\t\tthis.checkout = createTreeCheckout(\n\t\t\truntime.idCompressor,\n\t\t\tthis.mintRevisionTag,\n\t\t\trevisionTagCodec,\n\t\t\t{\n\t\t\t\tbranch: localBranch,\n\t\t\t\tchangeFamily,\n\t\t\t\tschema,\n\t\t\t\tforest,\n\t\t\t\tfieldBatchCodec,\n\t\t\t\tevents: this._events,\n\t\t\t\tremovedRoots,\n\t\t\t\tchunkCompressionStrategy: options.treeEncodeType,\n\t\t\t\tlogger: this.logger,\n\t\t\t},\n\t\t);\n\t}\n\n\t@throwIfBroken\n\tpublic contentSnapshot(): SharedTreeContentSnapshot {\n\t\tconst cursor = this.checkout.forest.allocateCursor(\"contentSnapshot\");\n\t\ttry {\n\t\t\tmoveToDetachedField(this.checkout.forest, cursor);\n\t\t\treturn {\n\t\t\t\tschema: this.storedSchema.clone(),\n\t\t\t\ttree: jsonableTreeFromFieldCursor(cursor),\n\t\t\t\tremoved: this.checkout.getRemovedRoots(),\n\t\t\t};\n\t\t} finally {\n\t\t\tcursor.free();\n\t\t}\n\t}\n\n\tpublic viewWith<TRoot extends ImplicitFieldSchema>(\n\t\tconfig: TreeViewConfiguration<TRoot>,\n\t): SchematizingSimpleTreeView<TRoot> {\n\t\treturn new SchematizingSimpleTreeView(\n\t\t\tthis.checkout,\n\t\t\tconfig,\n\t\t\tcreateNodeKeyManager(this.runtime.idCompressor),\n\t\t\tthis.breaker,\n\t\t);\n\t}\n\n\tprotected override async loadCore(services: IChannelStorageService): Promise<void> {\n\t\tawait super.loadCore(services);\n\t\tthis.checkout.setTipRevisionForLoadedData(this.trunkHeadRevision);\n\t\tthis._events.emit(\"afterBatch\");\n\t}\n}\n\n/**\n * Format versions supported by SharedTree.\n *\n * Each version documents a required minimum version of the \\@fluidframework/tree package.\n * @internal\n */\nexport const SharedTreeFormatVersion = {\n\t/**\n\t * Requires \\@fluidframework/tree \\>= 2.0.0.\n\t *\n\t * @deprecated - FF does not currently plan on supporting this format long-term.\n\t * Do not write production documents using this format, as they may not be loadable in the future.\n\t */\n\tv1: 1,\n\n\t/**\n\t * Requires \\@fluidframework/tree \\>= 2.0.0.\n\t */\n\tv2: 2,\n\n\t/**\n\t * Requires \\@fluidframework/tree \\>= 2.0.0.\n\t */\n\tv3: 3,\n} as const;\n\n/**\n * Format versions supported by SharedTree.\n *\n * Each version documents a required minimum version of the \\@fluidframework/tree package.\n * @internal\n * @privateRemarks\n * See packages/dds/tree/docs/main/compatibility.md for information on how to add support for a new format.\n */\nexport type SharedTreeFormatVersion = typeof SharedTreeFormatVersion;\n\n/**\n * @internal\n */\nexport type SharedTreeOptions = Partial<ICodecOptions> &\n\tPartial<SharedTreeFormatOptions> & {\n\t\t/**\n\t\t * The {@link ForestType} indicating which forest type should be created for the SharedTree.\n\t\t */\n\t\tforest?: ForestType;\n\t};\n\n/**\n * Options for configuring the persisted format SharedTree uses.\n * @internal\n */\nexport interface SharedTreeFormatOptions {\n\t/**\n\t * See {@link TreeCompressionStrategy}.\n\t * default: TreeCompressionStrategy.Compressed\n\t */\n\ttreeEncodeType: TreeCompressionStrategy;\n\t/**\n\t * The format version SharedTree should use to persist documents.\n\t *\n\t * This option has compatibility implications for applications using SharedTree.\n\t * Each version documents a required minimum version of \\@fluidframework/tree.\n\t * If this minimum version fails to be met, the SharedTree may fail to load.\n\t * To be safe, application authors should verify that they have saturated this version\n\t * of \\@fluidframework/tree in their ecosystem before changing the format version.\n\t *\n\t * This option defaults to SharedTreeFormatVersion.v2.\n\t */\n\tformatVersion: SharedTreeFormatVersion[keyof SharedTreeFormatVersion];\n}\n\n/**\n * Used to distinguish between different forest types.\n * @internal\n */\nexport enum ForestType {\n\t/**\n\t * The \"ObjectForest\" forest type.\n\t */\n\tReference = 0,\n\t/**\n\t * The \"ChunkedForest\" forest type.\n\t */\n\tOptimized = 1,\n\t/**\n\t * The \"ObjectForest\" forest type with expensive asserts for debugging.\n\t */\n\tExpensive = 2,\n}\n\nexport const defaultSharedTreeOptions: Required<SharedTreeOptions> = {\n\tjsonValidator: noopValidator,\n\tforest: ForestType.Reference,\n\ttreeEncodeType: TreeCompressionStrategy.Compressed,\n\tformatVersion: SharedTreeFormatVersion.v3,\n};\n\n/**\n * A channel factory that creates {@link ISharedTree}s.\n */\nexport class SharedTreeFactory implements IChannelFactory<ISharedTree> {\n\tpublic readonly type: string = \"https://graph.microsoft.com/types/tree\";\n\n\tpublic readonly attributes: IChannelAttributes = {\n\t\ttype: this.type,\n\t\tsnapshotFormatVersion: \"0.0.0\",\n\t\tpackageVersion: \"0.0.0\",\n\t};\n\n\tpublic constructor(private readonly options: SharedTreeOptions = {}) {}\n\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tchannelAttributes: Readonly<IChannelAttributes>,\n\t): Promise<SharedTree> {\n\t\tconst tree = new SharedTree(id, runtime, channelAttributes, this.options);\n\t\tawait tree.load(services);\n\t\treturn tree;\n\t}\n\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): SharedTree {\n\t\tconst tree = new SharedTree(id, runtime, this.attributes, this.options);\n\t\ttree.initializeLocal();\n\t\treturn tree;\n\t}\n}\n"]}
1
+ {"version":3,"file":"sharedTree.js","sourceRoot":"","sources":["../../src/shared-tree/sharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAS7D,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtE,OAAO,EAAsB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAEN,gBAAgB,EAEhB,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAIN,aAAa,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,4BAA4B,EAC5B,gBAAgB,EAChB,gBAAgB,EAChB,uBAAuB,EACvB,kBAAkB,EAClB,WAAW,EACX,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EACzB,eAAe,GACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACN,sBAAsB,EAEtB,cAAc,GACd,MAAM,8BAA8B,CAAC;AAQtC,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAGrE,OAAO,EAIN,kBAAkB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AA2DhE,MAAM,oCAAoC,GAAG,IAAI,GAAG,CAAgC;IACnF;QACC,CAAC;QACD,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EA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UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAC1E,MAAM,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,MAAM,CAAC,OAA+B,EAAE,EAAU;QACxD,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACxE,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACb,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 type {\n\tIChannelAttributes,\n\tIChannelFactory,\n\tIFluidDataStoreRuntime,\n\tIChannelServices,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions/internal\";\nimport type { ISharedObject } from \"@fluidframework/shared-object-base/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { type ICodecOptions, noopValidator } from \"../codec/index.js\";\nimport {\n\ttype JsonableTree,\n\tRevisionTagCodec,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tmakeDetachedFieldIndex,\n\tmoveToDetachedField,\n} from \"../core/index.js\";\nimport {\n\ttype HasListeners,\n\ttype IEmitter,\n\ttype Listenable,\n\tcreateEmitter,\n} from \"../events/index.js\";\nimport {\n\tDetachedFieldIndexSummarizer,\n\tForestSummarizer,\n\tSchemaSummarizer,\n\tTreeCompressionStrategy,\n\tbuildChunkedForest,\n\tbuildForest,\n\tdefaultSchemaPolicy,\n\tjsonableTreeFromFieldCursor,\n\tmakeFieldBatchCodec,\n\tmakeMitigatedChangeFamily,\n\tmakeTreeChunker,\n} from \"../feature-libraries/index.js\";\nimport {\n\tDefaultResubmitMachine,\n\ttype ExplicitCoreCodecVersions,\n\tSharedTreeCore,\n} from \"../shared-tree-core/index.js\";\nimport type {\n\tITree,\n\tImplicitFieldSchema,\n\tTreeView,\n\tTreeViewConfiguration,\n} from \"../simple-tree/index.js\";\n\nimport { SchematizingSimpleTreeView } from \"./schematizingTreeView.js\";\nimport { SharedTreeReadonlyChangeEnricher } from \"./sharedTreeChangeEnricher.js\";\nimport { SharedTreeChangeFamily } from \"./sharedTreeChangeFamily.js\";\nimport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\nimport type { SharedTreeEditBuilder } from \"./sharedTreeEditBuilder.js\";\nimport {\n\ttype CheckoutEvents,\n\ttype TreeCheckout,\n\ttype TreeBranch,\n\tcreateTreeCheckout,\n} from \"./treeCheckout.js\";\nimport { breakingClass, throwIfBroken } from \"../util/index.js\";\n\n/**\n * Copy of data from an {@link ISharedTree} at some point in time.\n * @remarks\n * This is unrelated to Fluids concept of \"snapshots\".\n * @internal\n */\nexport interface SharedTreeContentSnapshot {\n\t/**\n\t * The schema stored in the document.\n\t *\n\t * @remarks\n\t * Edits to the schema can mutate the schema stored of the tree which took this snapshot (but this snapshot will remain the same)\n\t * This is mainly useful for debugging cases where schematize reports an incompatible view schema.\n\t */\n\treadonly schema: TreeStoredSchema;\n\t/**\n\t * All {@link TreeStatus.InDocument} content.\n\t */\n\treadonly tree: JsonableTree[];\n\t/**\n\t * All {@link TreeStatus.Removed} content.\n\t */\n\treadonly removed: [string | number | undefined, number, JsonableTree][];\n}\n\n/**\n * {@link ITree} extended with some non-public APIs.\n * @internal\n */\nexport interface ISharedTree extends ISharedObject, ITree {\n\t/**\n\t * Provides a copy of the current content of the tree.\n\t * This can be useful for inspecting the tree when no suitable view schema is available.\n\t * This is only intended for use in testing and exceptional code paths: it is not performant.\n\t *\n\t * This does not include everything that is included in a tree summary, since information about how to merge future edits is omitted.\n\t */\n\tcontentSnapshot(): SharedTreeContentSnapshot;\n}\n\n/**\n * Has an entry for each codec which writes an explicit version into its data.\n *\n * This is used to map the single API entrypoint controlling the format {@link SharedTreeOptions.formatVersion}\n * to a list of write versions that for each codec that should be used for that format.\n *\n * Note that all explicitly versioned codecs should be using the format version from the data to read encoded data.\n *\n * TODO: Plumb these write versions into forest, schema, detached field index codec creation.\n */\ninterface ExplicitCodecVersions extends ExplicitCoreCodecVersions {\n\tforest: number;\n\tschema: number;\n\tdetachedFieldIndex: number;\n\tfieldBatch: number;\n}\n\nconst formatVersionToTopLevelCodecVersions = new Map<number, ExplicitCodecVersions>([\n\t[\n\t\t1,\n\t\t{ forest: 1, schema: 1, detachedFieldIndex: 1, editManager: 1, message: 1, fieldBatch: 1 },\n\t],\n\t[\n\t\t2,\n\t\t{ forest: 1, schema: 1, detachedFieldIndex: 1, editManager: 2, message: 2, fieldBatch: 1 },\n\t],\n\t[\n\t\t3,\n\t\t{ forest: 1, schema: 1, detachedFieldIndex: 1, editManager: 3, message: 3, fieldBatch: 1 },\n\t],\n\t[\n\t\t4,\n\t\t{ forest: 1, schema: 1, detachedFieldIndex: 1, editManager: 4, message: 4, fieldBatch: 1 },\n\t],\n]);\n\nfunction getCodecVersions(formatVersion: number): ExplicitCodecVersions {\n\tconst versions = formatVersionToTopLevelCodecVersions.get(formatVersion);\n\tassert(versions !== undefined, 0x90e /* Unknown format version */);\n\treturn versions;\n}\n\n/**\n * Shared tree, configured with a good set of indexes and field kinds which will maintain compatibility over time.\n *\n * TODO: detail compatibility requirements.\n */\n@breakingClass\nexport class SharedTree\n\textends SharedTreeCore<SharedTreeEditBuilder, SharedTreeChange>\n\timplements ISharedTree\n{\n\tprivate readonly _events: Listenable<CheckoutEvents> &\n\t\tIEmitter<CheckoutEvents> &\n\t\tHasListeners<CheckoutEvents>;\n\tpublic readonly checkout: TreeCheckout;\n\tpublic get storedSchema(): TreeStoredSchemaRepository {\n\t\treturn this.checkout.storedSchema;\n\t}\n\n\tpublic constructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\toptionsParam: SharedTreeOptions,\n\t\ttelemetryContextPrefix: string = \"fluid_sharedTree_\",\n\t) {\n\t\tif (runtime.idCompressor === undefined) {\n\t\t\tthrow new UsageError(\"IdCompressor must be enabled to use SharedTree\");\n\t\t}\n\n\t\tconst options = { ...defaultSharedTreeOptions, ...optionsParam };\n\t\tconst codecVersions = getCodecVersions(options.formatVersion);\n\t\tconst schema = new TreeStoredSchemaRepository();\n\t\tconst forest =\n\t\t\toptions.forest === ForestType.Optimized\n\t\t\t\t? buildChunkedForest(\n\t\t\t\t\t\tmakeTreeChunker(schema, defaultSchemaPolicy),\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\truntime.idCompressor,\n\t\t\t\t\t)\n\t\t\t\t: options.forest === ForestType.Reference\n\t\t\t\t\t? buildForest()\n\t\t\t\t\t: buildForest(undefined, true);\n\t\tconst revisionTagCodec = new RevisionTagCodec(runtime.idCompressor);\n\t\tconst removedRoots = makeDetachedFieldIndex(\n\t\t\t\"repair\",\n\t\t\trevisionTagCodec,\n\t\t\truntime.idCompressor,\n\t\t\toptions,\n\t\t);\n\t\tconst schemaSummarizer = new SchemaSummarizer(runtime, schema, options, {\n\t\t\tgetCurrentSeq: () => this.deltaManager.lastSequenceNumber,\n\t\t});\n\t\tconst fieldBatchCodec = makeFieldBatchCodec(options, codecVersions.fieldBatch);\n\n\t\tconst encoderContext = {\n\t\t\tschema: {\n\t\t\t\tschema,\n\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t},\n\t\t\tencodeType: options.treeEncodeType,\n\t\t\toriginatorId: runtime.idCompressor.localSessionId,\n\t\t\tidCompressor: runtime.idCompressor,\n\t\t};\n\t\tconst forestSummarizer = new ForestSummarizer(\n\t\t\tforest,\n\t\t\trevisionTagCodec,\n\t\t\tfieldBatchCodec,\n\t\t\tencoderContext,\n\t\t\toptions,\n\t\t\truntime.idCompressor,\n\t\t);\n\t\tconst removedRootsSummarizer = new DetachedFieldIndexSummarizer(removedRoots);\n\t\tconst innerChangeFamily = new SharedTreeChangeFamily(\n\t\t\trevisionTagCodec,\n\t\t\tfieldBatchCodec,\n\t\t\toptions,\n\t\t\toptions.treeEncodeType,\n\t\t\truntime.idCompressor,\n\t\t);\n\t\tconst changeFamily = makeMitigatedChangeFamily(\n\t\t\tinnerChangeFamily,\n\t\t\tSharedTreeChangeFamily.emptyChange,\n\t\t\t(error: unknown) => {\n\t\t\t\t// TODO:6344 Add telemetry for these errors.\n\t\t\t\t// Rethrowing the error has a different effect depending on the context in which the\n\t\t\t\t// ChangeFamily was invoked:\n\t\t\t\t// - If the ChangeFamily was invoked as part of incoming op processing, rethrowing the error\n\t\t\t\t// will cause the runtime to disconnect the client, log a severe error, and not reconnect.\n\t\t\t\t// This will not cause the host application to crash because it is not on the stack at that time.\n\t\t\t\t// TODO: let the host application know that the client is now disconnected.\n\t\t\t\t// - If the ChangeFamily was invoked as part of dealing with a local change, rethrowing the\n\t\t\t\t// error will cause the host application to crash. This is not ideal, but is better than\n\t\t\t\t// letting the application either send an invalid change to the server or allowing the\n\t\t\t\t// application to continue working when its local branches contain edits that cannot be\n\t\t\t\t// reflected in its views.\n\t\t\t\t// The best course of action for a host application in such a state is to restart.\n\t\t\t\t// TODO: let the host application know about this situation and provide a way to\n\t\t\t\t// programmatically reload the SharedTree container.\n\t\t\t\tthrow error;\n\t\t\t},\n\t\t);\n\t\tconst changeEnricher = new SharedTreeReadonlyChangeEnricher(forest, schema, removedRoots);\n\t\tsuper(\n\t\t\t[schemaSummarizer, forestSummarizer, removedRootsSummarizer],\n\t\t\tchangeFamily,\n\t\t\toptions,\n\t\t\tcodecVersions,\n\t\t\tid,\n\t\t\truntime,\n\t\t\tattributes,\n\t\t\ttelemetryContextPrefix,\n\t\t\tschema,\n\t\t\tdefaultSchemaPolicy,\n\t\t\tnew DefaultResubmitMachine(\n\t\t\t\tchangeFamily.rebaser.invert.bind(changeFamily.rebaser),\n\t\t\t\tchangeEnricher,\n\t\t\t),\n\t\t\tchangeEnricher,\n\t\t);\n\t\tthis._events = createEmitter<CheckoutEvents>();\n\t\tconst localBranch = this.getLocalBranch();\n\t\tthis.checkout = createTreeCheckout(\n\t\t\truntime.idCompressor,\n\t\t\tthis.mintRevisionTag,\n\t\t\trevisionTagCodec,\n\t\t\t{\n\t\t\t\tbranch: localBranch,\n\t\t\t\tchangeFamily,\n\t\t\t\tschema,\n\t\t\t\tforest,\n\t\t\t\tfieldBatchCodec,\n\t\t\t\tevents: this._events,\n\t\t\t\tremovedRoots,\n\t\t\t\tchunkCompressionStrategy: options.treeEncodeType,\n\t\t\t\tlogger: this.logger,\n\t\t\t\tbreaker: this.breaker,\n\t\t\t},\n\t\t);\n\t}\n\n\t@throwIfBroken\n\tpublic contentSnapshot(): SharedTreeContentSnapshot {\n\t\tconst cursor = this.checkout.forest.allocateCursor(\"contentSnapshot\");\n\t\ttry {\n\t\t\tmoveToDetachedField(this.checkout.forest, cursor);\n\t\t\treturn {\n\t\t\t\tschema: this.storedSchema.clone(),\n\t\t\t\ttree: jsonableTreeFromFieldCursor(cursor),\n\t\t\t\tremoved: this.checkout.getRemovedRoots(),\n\t\t\t};\n\t\t} finally {\n\t\t\tcursor.free();\n\t\t}\n\t}\n\n\tpublic viewWith<TRoot extends ImplicitFieldSchema>(\n\t\tconfig: TreeViewConfiguration<TRoot>,\n\t): SchematizingSimpleTreeView<TRoot> {\n\t\treturn this.checkout.viewWith(config);\n\t}\n\n\tprotected override async loadCore(services: IChannelStorageService): Promise<void> {\n\t\tawait super.loadCore(services);\n\t\tthis.checkout.setTipRevisionForLoadedData(this.trunkHeadRevision);\n\t\tthis._events.emit(\"afterBatch\");\n\t}\n}\n\n/**\n * Get a {@link TreeBranch} from a {@link ITree}.\n * @remarks The branch can be used for \"version control\"-style coordination of edits on the tree.\n * @privateRemarks This function will be removed if/when the branching API becomes public,\n * but it (or something like it) is necessary in the meantime to prevent the alpha types from being exposed as public.\n * @alpha\n */\nexport function getBranch(tree: ITree): TreeBranch;\n/**\n * Get a {@link TreeBranch} from a {@link TreeView}.\n * @remarks The branch can be used for \"version control\"-style coordination of edits on the tree.\n * Branches are currently an unstable \"alpha\" API and are subject to change in the future.\n * @privateRemarks This function will be removed if/when the branching API becomes public,\n * but it (or something like it) is necessary in the meantime to prevent the alpha types from being exposed as public.\n * @alpha\n */\nexport function getBranch(view: TreeView<ImplicitFieldSchema>): TreeBranch;\nexport function getBranch(treeOrView: ITree | TreeView<ImplicitFieldSchema>): TreeBranch {\n\tassert(\n\t\ttreeOrView instanceof SharedTree || treeOrView instanceof SchematizingSimpleTreeView,\n\t\t\"Unsupported implementation\",\n\t);\n\tconst checkout: TreeCheckout = treeOrView.checkout;\n\t// This cast is safe so long as TreeCheckout supports all the operations on the branch interface.\n\treturn checkout as unknown as TreeBranch;\n}\n\n/**\n * Format versions supported by SharedTree.\n *\n * Each version documents a required minimum version of the \\@fluidframework/tree package.\n * @internal\n */\nexport const SharedTreeFormatVersion = {\n\t/**\n\t * Requires \\@fluidframework/tree \\>= 2.0.0.\n\t *\n\t * @deprecated - FF does not currently plan on supporting this format long-term.\n\t * Do not write production documents using this format, as they may not be loadable in the future.\n\t */\n\tv1: 1,\n\n\t/**\n\t * Requires \\@fluidframework/tree \\>= 2.0.0.\n\t */\n\tv2: 2,\n\n\t/**\n\t * Requires \\@fluidframework/tree \\>= 2.0.0.\n\t */\n\tv3: 3,\n} as const;\n\n/**\n * Format versions supported by SharedTree.\n *\n * Each version documents a required minimum version of the \\@fluidframework/tree package.\n * @internal\n * @privateRemarks\n * See packages/dds/tree/docs/main/compatibility.md for information on how to add support for a new format.\n */\nexport type SharedTreeFormatVersion = typeof SharedTreeFormatVersion;\n\n/**\n * @internal\n */\nexport type SharedTreeOptions = Partial<ICodecOptions> &\n\tPartial<SharedTreeFormatOptions> & {\n\t\t/**\n\t\t * The {@link ForestType} indicating which forest type should be created for the SharedTree.\n\t\t */\n\t\tforest?: ForestType;\n\t};\n\n/**\n * Options for configuring the persisted format SharedTree uses.\n * @internal\n */\nexport interface SharedTreeFormatOptions {\n\t/**\n\t * See {@link TreeCompressionStrategy}.\n\t * default: TreeCompressionStrategy.Compressed\n\t */\n\ttreeEncodeType: TreeCompressionStrategy;\n\t/**\n\t * The format version SharedTree should use to persist documents.\n\t *\n\t * This option has compatibility implications for applications using SharedTree.\n\t * Each version documents a required minimum version of \\@fluidframework/tree.\n\t * If this minimum version fails to be met, the SharedTree may fail to load.\n\t * To be safe, application authors should verify that they have saturated this version\n\t * of \\@fluidframework/tree in their ecosystem before changing the format version.\n\t *\n\t * This option defaults to SharedTreeFormatVersion.v2.\n\t */\n\tformatVersion: SharedTreeFormatVersion[keyof SharedTreeFormatVersion];\n}\n\n/**\n * Used to distinguish between different forest types.\n * @internal\n */\nexport enum ForestType {\n\t/**\n\t * The \"ObjectForest\" forest type.\n\t */\n\tReference = 0,\n\t/**\n\t * The \"ChunkedForest\" forest type.\n\t */\n\tOptimized = 1,\n\t/**\n\t * The \"ObjectForest\" forest type with expensive asserts for debugging.\n\t */\n\tExpensive = 2,\n}\n\nexport const defaultSharedTreeOptions: Required<SharedTreeOptions> = {\n\tjsonValidator: noopValidator,\n\tforest: ForestType.Reference,\n\ttreeEncodeType: TreeCompressionStrategy.Compressed,\n\tformatVersion: SharedTreeFormatVersion.v3,\n};\n\n/**\n * A channel factory that creates {@link ISharedTree}s.\n */\nexport class SharedTreeFactory implements IChannelFactory<ISharedTree> {\n\tpublic readonly type: string = \"https://graph.microsoft.com/types/tree\";\n\n\tpublic readonly attributes: IChannelAttributes = {\n\t\ttype: this.type,\n\t\tsnapshotFormatVersion: \"0.0.0\",\n\t\tpackageVersion: \"0.0.0\",\n\t};\n\n\tpublic constructor(private readonly options: SharedTreeOptions = {}) {}\n\n\tpublic async load(\n\t\truntime: IFluidDataStoreRuntime,\n\t\tid: string,\n\t\tservices: IChannelServices,\n\t\tchannelAttributes: Readonly<IChannelAttributes>,\n\t): Promise<SharedTree> {\n\t\tconst tree = new SharedTree(id, runtime, channelAttributes, this.options);\n\t\tawait tree.load(services);\n\t\treturn tree;\n\t}\n\n\tpublic create(runtime: IFluidDataStoreRuntime, id: string): SharedTree {\n\t\tconst tree = new SharedTree(id, runtime, this.attributes, this.options);\n\t\ttree.initializeLocal();\n\t\treturn tree;\n\t}\n}\n"]}
@@ -8,9 +8,12 @@ import { type Anchor, type AnchorLocator, type AnchorNode, type AnchorSetRootEve
8
8
  import { type HasListeners, type IEmitter, type Listenable } from "../events/index.js";
9
9
  import { type FieldBatchCodec, type TreeCompressionStrategy } from "../feature-libraries/index.js";
10
10
  import { SharedTreeBranch } from "../shared-tree-core/index.js";
11
- import { type IDisposable, TransactionResult, disposeSymbol } from "../util/index.js";
11
+ import { Breakable, TransactionResult, disposeSymbol } from "../util/index.js";
12
12
  import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
13
13
  import type { ISharedTreeEditor, SharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
14
+ import type { IDisposable } from "@fluidframework/core-interfaces";
15
+ import type { ImplicitFieldSchema, TreeViewConfiguration, ViewableTree } from "../simple-tree/index.js";
16
+ import { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
14
17
  /**
15
18
  * Events for {@link ITreeCheckout}.
16
19
  */
@@ -36,6 +39,52 @@ export interface CheckoutEvents {
36
39
  */
37
40
  commitApplied(data: CommitMetadata, getRevertible?: RevertibleFactory): void;
38
41
  }
42
+ /**
43
+ * A "version control"-style branch of a SharedTree.
44
+ * @remarks Branches may be used to coordinate edits to a SharedTree, e.g. via merge and rebase operations.
45
+ * Changes applied to a branch of a branch only apply to that branch and are isolated from other branches.
46
+ * Changes may be synchronized across branches via merge and rebase operations provided on the branch object.
47
+ * @alpha @sealed
48
+ */
49
+ export interface TreeBranch extends ViewableTree {
50
+ /**
51
+ * Spawn a new branch which is based off of the current state of this branch.
52
+ * Any mutations of the new branch will not apply to this branch until the new branch is merged back into this branch via `merge()`.
53
+ */
54
+ branch(): TreeBranchFork;
55
+ /**
56
+ * Apply all the new changes on the given branch to this branch.
57
+ * @param view - a branch which was created by a call to `branch()`.
58
+ * It is automatically disposed after the merge completes.
59
+ * @remarks All ongoing transactions (if any) in `branch` will be committed before the merge.
60
+ * A "commitApplied" event and a corresponding {@link Revertible} will be emitted on this branch for each new change merged from 'branch'.
61
+ */
62
+ merge(branch: TreeBranchFork): void;
63
+ /**
64
+ * Apply all the new changes on the given branch to this branch.
65
+ * @param branch - a branch which was created by a call to `branch()`.
66
+ * @param disposeMerged - whether or not to dispose `branch` after the merge completes.
67
+ * @remarks All ongoing transactions (if any) in `branch` will be committed before the merge.
68
+ */
69
+ merge(branch: TreeBranchFork, disposeMerged: boolean): void;
70
+ /**
71
+ * Rebase the given branch onto this branch.
72
+ * @param branch - a branch which was created by a call to `branch()`. It is modified by this operation.
73
+ */
74
+ rebase(branch: TreeBranchFork): void;
75
+ }
76
+ /**
77
+ * A {@link TreeBranch | branch} of a SharedTree that has merged from another branch.
78
+ * @remarks This branch should be disposed when it is no longer needed in order to free resources.
79
+ * @alpha @sealed
80
+ */
81
+ export interface TreeBranchFork extends TreeBranch, IDisposable {
82
+ /**
83
+ * Rebase the changes that have been applied to this branch over all the new changes in the given branch.
84
+ * @param branch - Either the root branch or a branch that was created by a call to `branch()`. It is not modified by this operation.
85
+ */
86
+ rebaseOnto(branch: TreeBranch): void;
87
+ }
39
88
  /**
40
89
  * Provides a means for interacting with a SharedTree.
41
90
  * This includes reading data from the tree and running transactions to mutate the tree.
@@ -44,7 +93,7 @@ export interface CheckoutEvents {
44
93
  * API for interacting with a {@link SharedTreeBranch}.
45
94
  * Implementations of this interface must implement the {@link branchKey} property.
46
95
  */
47
- export interface ITreeCheckout extends AnchorLocator {
96
+ export interface ITreeCheckout extends AnchorLocator, ViewableTree {
48
97
  /**
49
98
  * Read and Write access for schema stored in the document.
50
99
  *
@@ -77,30 +126,10 @@ export interface ITreeCheckout extends AnchorLocator {
77
126
  * A collection of functions for managing transactions.
78
127
  */
79
128
  readonly transaction: ITransaction;
80
- /**
81
- * Spawn a new view which is based off of the current state of this view.
82
- * Any mutations of the new view will not apply to this view until the new view is merged back into this view via `merge()`.
83
- */
84
- fork(): ITreeCheckoutFork;
85
- /**
86
- * Apply all the new changes on the given view to this view.
87
- * @param view - a view which was created by a call to `fork()`.
88
- * It is automatically disposed after the merge completes.
89
- * @remarks All ongoing transactions (if any) in `view` will be committed before the merge.
90
- */
91
- merge(view: ITreeCheckoutFork): void;
92
- /**
93
- * Apply all the new changes on the given view to this view.
94
- * @param view - a view which was created by a call to `fork()`.
95
- * @param disposeView - whether or not to dispose `view` after the merge completes.
96
- * @remarks All ongoing transactions (if any) in `view` will be committed before the merge.
97
- */
98
- merge(view: ITreeCheckoutFork, disposeView: boolean): void;
99
- /**
100
- * Rebase the given view onto this view.
101
- * @param view - a view which was created by a call to `fork()`. It is modified by this operation.
102
- */
103
- rebase(view: ITreeCheckoutFork): void;
129
+ branch(): ITreeCheckoutFork;
130
+ merge(checkout: ITreeCheckoutFork): void;
131
+ merge(checkout: ITreeCheckoutFork, disposeMerged: boolean): void;
132
+ rebase(checkout: ITreeCheckoutFork): void;
104
133
  /**
105
134
  * Replaces all schema with the provided schema.
106
135
  * Can over-write preexisting schema, and removes unmentioned schema.
@@ -140,6 +169,7 @@ export declare function createTreeCheckout(idCompressor: IIdCompressor, mintRevi
140
169
  removedRoots?: DetachedFieldIndex;
141
170
  chunkCompressionStrategy?: TreeCompressionStrategy;
142
171
  logger?: ITelemetryLoggerExt;
172
+ breaker?: Breakable;
143
173
  }): TreeCheckout;
144
174
  /**
145
175
  * A collection of functions for managing transactions.
@@ -149,7 +179,7 @@ export declare function createTreeCheckout(idCompressor: IIdCompressor, mintRevi
149
179
  * Transactions may nest, meaning that a transaction may be started while a transaction is already ongoing.
150
180
  *
151
181
  * To avoid updating observers of the view state with intermediate results during a transaction,
152
- * use {@link ITreeCheckout#fork} and {@link ISharedTreeFork#merge}.
182
+ * use {@link ITreeCheckout#branch} and {@link ISharedTreeFork#merge}.
153
183
  */
154
184
  export interface ITransaction {
155
185
  /**
@@ -189,11 +219,7 @@ export interface ITransaction {
189
219
  *
190
220
  * {@link ITreeCheckout} that has forked off of the main trunk/branch.
191
221
  */
192
- export interface ITreeCheckoutFork extends ITreeCheckout, IDisposable {
193
- /**
194
- * Rebase the changes that have been applied to this view over all the new changes in the given view.
195
- * @param view - Either the root view or a view that was created by a call to `fork()`. It is not modified by this operation.
196
- */
222
+ export interface ITreeCheckoutFork extends ITreeCheckout {
197
223
  rebaseOnto(view: ITreeCheckout): void;
198
224
  }
199
225
  /**
@@ -212,7 +238,7 @@ export interface RevertMetrics {
212
238
  */
213
239
  export declare class TreeCheckout implements ITreeCheckoutFork {
214
240
  readonly transaction: ITransaction;
215
- private readonly branch;
241
+ private readonly _branch;
216
242
  private readonly changeFamily;
217
243
  readonly storedSchema: TreeStoredSchemaRepository;
218
244
  readonly forest: IEditableForest;
@@ -223,7 +249,9 @@ export declare class TreeCheckout implements ITreeCheckoutFork {
223
249
  private removedRoots;
224
250
  /** Optional logger for telemetry. */
225
251
  private readonly logger?;
226
- private isDisposed;
252
+ private readonly breaker;
253
+ disposed: boolean;
254
+ private readonly views;
227
255
  /**
228
256
  * Set of revertibles maintained for automatic disposal
229
257
  */
@@ -243,20 +271,22 @@ export declare class TreeCheckout implements ITreeCheckoutFork {
243
271
  * @privateRemarks Exposed for testing purposes.
244
272
  */
245
273
  static readonly revertTelemetryEventName = "RevertRevertible";
246
- constructor(transaction: ITransaction, branch: SharedTreeBranch<SharedTreeEditBuilder, SharedTreeChange>, changeFamily: ChangeFamily<SharedTreeEditBuilder, SharedTreeChange>, storedSchema: TreeStoredSchemaRepository, forest: IEditableForest, events: Listenable<CheckoutEvents> & IEmitter<CheckoutEvents> & HasListeners<CheckoutEvents>, mintRevisionTag: () => RevisionTag, revisionTagCodec: RevisionTagCodec, idCompressor: IIdCompressor, removedRoots?: DetachedFieldIndex,
274
+ constructor(transaction: ITransaction, _branch: SharedTreeBranch<SharedTreeEditBuilder, SharedTreeChange>, changeFamily: ChangeFamily<SharedTreeEditBuilder, SharedTreeChange>, storedSchema: TreeStoredSchemaRepository, forest: IEditableForest, events: Listenable<CheckoutEvents> & IEmitter<CheckoutEvents> & HasListeners<CheckoutEvents>, mintRevisionTag: () => RevisionTag, revisionTagCodec: RevisionTagCodec, idCompressor: IIdCompressor, removedRoots?: DetachedFieldIndex,
247
275
  /** Optional logger for telemetry. */
248
- logger?: ITelemetryLoggerExt | undefined);
276
+ logger?: ITelemetryLoggerExt | undefined, breaker?: Breakable);
249
277
  private withCombinedVisitor;
250
278
  private checkNotDisposed;
279
+ viewWith<TRoot extends ImplicitFieldSchema>(config: TreeViewConfiguration<TRoot>): SchematizingSimpleTreeView<TRoot>;
251
280
  get rootEvents(): Listenable<AnchorSetRootEvents>;
252
281
  get editor(): ISharedTreeEditor;
253
282
  locate(anchor: Anchor): AnchorNode | undefined;
254
- fork(): TreeCheckout;
255
- rebase(view: TreeCheckout): void;
256
- rebaseOnto(view: ITreeCheckout): void;
257
- merge(view: TreeCheckout): void;
258
- merge(view: TreeCheckout, disposeView: boolean): void;
283
+ branch(): TreeCheckout;
284
+ rebase(checkout: TreeCheckout): void;
285
+ rebaseOnto(checkout: ITreeCheckout): void;
286
+ merge(checkout: TreeCheckout): void;
287
+ merge(checkout: TreeCheckout, disposeMerged: boolean): void;
259
288
  updateSchema(newSchema: TreeStoredSchema): void;
289
+ dispose(): void;
260
290
  [disposeSymbol](): void;
261
291
  getRemovedRoots(): [string | number | undefined, number, JsonableTree][];
262
292
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"treeCheckout.d.ts","sourceRoot":"","sources":["../../src/shared-tree/treeCheckout.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAEN,KAAK,mBAAmB,EACxB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACN,KAAK,MAAM,EACX,KAAK,a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