@fluidframework/tree 2.23.0 → 2.30.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 (619) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/api-report/tree.alpha.api.md +28 -12
  3. package/dist/alpha.d.ts +6 -0
  4. package/dist/core/forest/editableForest.d.ts +1 -14
  5. package/dist/core/forest/editableForest.d.ts.map +1 -1
  6. package/dist/core/forest/editableForest.js +1 -28
  7. package/dist/core/forest/editableForest.js.map +1 -1
  8. package/dist/core/forest/forest.d.ts +16 -3
  9. package/dist/core/forest/forest.d.ts.map +1 -1
  10. package/dist/core/forest/forest.js +4 -1
  11. package/dist/core/forest/forest.js.map +1 -1
  12. package/dist/core/forest/index.d.ts +1 -1
  13. package/dist/core/forest/index.d.ts.map +1 -1
  14. package/dist/core/forest/index.js +1 -2
  15. package/dist/core/forest/index.js.map +1 -1
  16. package/dist/core/index.d.ts +2 -2
  17. package/dist/core/index.d.ts.map +1 -1
  18. package/dist/core/index.js +3 -3
  19. package/dist/core/index.js.map +1 -1
  20. package/dist/core/tree/anchorSet.d.ts +8 -3
  21. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  22. package/dist/core/tree/anchorSet.js +12 -5
  23. package/dist/core/tree/anchorSet.js.map +1 -1
  24. package/dist/core/tree/delta.d.ts +8 -23
  25. package/dist/core/tree/delta.d.ts.map +1 -1
  26. package/dist/core/tree/delta.js.map +1 -1
  27. package/dist/core/tree/deltaUtil.d.ts +3 -3
  28. package/dist/core/tree/deltaUtil.d.ts.map +1 -1
  29. package/dist/core/tree/deltaUtil.js +2 -2
  30. package/dist/core/tree/deltaUtil.js.map +1 -1
  31. package/dist/core/tree/index.d.ts +2 -2
  32. package/dist/core/tree/index.d.ts.map +1 -1
  33. package/dist/core/tree/index.js +2 -1
  34. package/dist/core/tree/index.js.map +1 -1
  35. package/dist/core/tree/pathTree.d.ts +54 -1
  36. package/dist/core/tree/pathTree.d.ts.map +1 -1
  37. package/dist/core/tree/pathTree.js +8 -1
  38. package/dist/core/tree/pathTree.js.map +1 -1
  39. package/dist/core/tree/visitDelta.d.ts +7 -5
  40. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  41. package/dist/core/tree/visitDelta.js +19 -9
  42. package/dist/core/tree/visitDelta.js.map +1 -1
  43. package/dist/core/tree/visitorUtils.d.ts +5 -23
  44. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  45. package/dist/core/tree/visitorUtils.js +8 -5
  46. package/dist/core/tree/visitorUtils.js.map +1 -1
  47. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts +1 -1
  48. package/dist/feature-libraries/chunked-forest/basicChunk.js +1 -1
  49. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  50. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +5 -3
  51. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  52. package/dist/feature-libraries/chunked-forest/chunkTree.js +10 -7
  53. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  54. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -0
  55. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  56. package/dist/feature-libraries/chunked-forest/chunkedForest.js +5 -2
  57. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  58. package/dist/feature-libraries/chunked-forest/codec/codecs.js +2 -2
  59. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  60. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  61. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  62. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  63. package/dist/feature-libraries/chunked-forest/codec/{schemaBasedEncoding.d.ts → schemaBasedEncode.d.ts} +1 -1
  64. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -0
  65. package/dist/feature-libraries/chunked-forest/codec/{schemaBasedEncoding.js → schemaBasedEncode.js} +1 -1
  66. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -0
  67. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +3 -2
  68. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  69. package/dist/feature-libraries/chunked-forest/uniformChunk.js +3 -2
  70. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  71. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +12 -14
  72. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  73. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +5 -6
  74. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  75. package/dist/feature-libraries/default-schema/index.d.ts +1 -0
  76. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  77. package/dist/feature-libraries/default-schema/index.js +3 -1
  78. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  79. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +21 -0
  80. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -0
  81. package/dist/feature-libraries/default-schema/mappedEditBuilder.js +57 -0
  82. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -0
  83. package/dist/feature-libraries/deltaUtils.js +1 -1
  84. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  85. package/dist/feature-libraries/flex-tree/context.d.ts +5 -5
  86. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  87. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  88. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -2
  89. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  90. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  91. package/dist/feature-libraries/flex-tree/lazyField.d.ts +5 -4
  92. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  93. package/dist/feature-libraries/flex-tree/lazyField.js +9 -6
  94. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  95. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  96. package/dist/feature-libraries/forest-summary/forestSummarizer.js +4 -5
  97. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  98. package/dist/feature-libraries/index.d.ts +2 -1
  99. package/dist/feature-libraries/index.d.ts.map +1 -1
  100. package/dist/feature-libraries/index.js +9 -7
  101. package/dist/feature-libraries/index.js.map +1 -1
  102. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  103. package/dist/feature-libraries/initializeForest.d.ts +18 -0
  104. package/dist/feature-libraries/initializeForest.d.ts.map +1 -0
  105. package/dist/feature-libraries/initializeForest.js +35 -0
  106. package/dist/feature-libraries/initializeForest.js.map +1 -0
  107. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +5 -5
  108. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  109. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +9 -15
  110. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  111. package/dist/feature-libraries/node-identifier/index.d.ts +8 -0
  112. package/dist/feature-libraries/node-identifier/index.d.ts.map +1 -0
  113. package/dist/feature-libraries/node-identifier/index.js +16 -0
  114. package/dist/feature-libraries/node-identifier/index.js.map +1 -0
  115. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts +22 -0
  116. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -0
  117. package/dist/feature-libraries/{node-key/mockNodeKeyManager.js → node-identifier/mockNodeIdentifierManager.js} +18 -18
  118. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -0
  119. package/dist/feature-libraries/node-identifier/nodeIdentifier.d.ts +38 -0
  120. package/dist/feature-libraries/node-identifier/nodeIdentifier.d.ts.map +1 -0
  121. package/dist/feature-libraries/node-identifier/nodeIdentifier.js +26 -0
  122. package/dist/feature-libraries/node-identifier/nodeIdentifier.js.map +1 -0
  123. package/dist/feature-libraries/node-identifier/nodeIdentifierManager.d.ts +37 -0
  124. package/dist/feature-libraries/node-identifier/nodeIdentifierManager.d.ts.map +1 -0
  125. package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js +48 -0
  126. package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -0
  127. package/dist/feature-libraries/object-forest/objectForest.d.ts +2 -1
  128. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  129. package/dist/feature-libraries/object-forest/objectForest.js +6 -2
  130. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  131. package/dist/feature-libraries/treeCursorUtils.js +1 -1
  132. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  133. package/dist/index.d.ts +3 -3
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +9 -1
  136. package/dist/index.js.map +1 -1
  137. package/dist/packageVersion.d.ts +1 -1
  138. package/dist/packageVersion.js +1 -1
  139. package/dist/packageVersion.js.map +1 -1
  140. package/dist/shared-tree/checkoutFlexTreeView.d.ts +3 -3
  141. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  142. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
  143. package/dist/shared-tree/independentView.d.ts.map +1 -1
  144. package/dist/shared-tree/independentView.js +3 -18
  145. package/dist/shared-tree/independentView.js.map +1 -1
  146. package/dist/shared-tree/index.d.ts +1 -1
  147. package/dist/shared-tree/index.d.ts.map +1 -1
  148. package/dist/shared-tree/index.js +2 -1
  149. package/dist/shared-tree/index.js.map +1 -1
  150. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  151. package/dist/shared-tree/schematizeTree.js +3 -2
  152. package/dist/shared-tree/schematizeTree.js.map +1 -1
  153. package/dist/shared-tree/schematizingTreeView.d.ts +4 -4
  154. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  155. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  156. package/dist/shared-tree/sharedTree.d.ts +1 -0
  157. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  158. package/dist/shared-tree/sharedTree.js +11 -7
  159. package/dist/shared-tree/sharedTree.js.map +1 -1
  160. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  161. package/dist/shared-tree/sharedTreeChangeFamily.js +1 -1
  162. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  163. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +1 -2
  164. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  165. package/dist/shared-tree/sharedTreeEditBuilder.js +2 -2
  166. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  167. package/dist/shared-tree/treeApiAlpha.d.ts +6 -31
  168. package/dist/shared-tree/treeApiAlpha.d.ts.map +1 -1
  169. package/dist/shared-tree/treeApiAlpha.js +3 -18
  170. package/dist/shared-tree/treeApiAlpha.js.map +1 -1
  171. package/dist/shared-tree/treeCheckout.js +1 -1
  172. package/dist/shared-tree/treeCheckout.js.map +1 -1
  173. package/dist/simple-tree/api/conciseTree.d.ts +8 -2
  174. package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
  175. package/dist/simple-tree/api/conciseTree.js +10 -1
  176. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  177. package/dist/simple-tree/api/create.d.ts +3 -3
  178. package/dist/simple-tree/api/create.d.ts.map +1 -1
  179. package/dist/simple-tree/api/create.js.map +1 -1
  180. package/dist/simple-tree/api/customTree.d.ts +42 -12
  181. package/dist/simple-tree/api/customTree.d.ts.map +1 -1
  182. package/dist/simple-tree/api/customTree.js +30 -2
  183. package/dist/simple-tree/api/customTree.js.map +1 -1
  184. package/dist/simple-tree/api/index.d.ts +4 -3
  185. package/dist/simple-tree/api/index.d.ts.map +1 -1
  186. package/dist/simple-tree/api/index.js +6 -1
  187. package/dist/simple-tree/api/index.js.map +1 -1
  188. package/dist/simple-tree/api/schemaFactory.d.ts +12 -9
  189. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  190. package/dist/simple-tree/api/schemaFactory.js +16 -26
  191. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  192. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +7 -0
  193. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  194. package/dist/simple-tree/api/schemaFactoryAlpha.js +9 -0
  195. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  196. package/dist/simple-tree/api/schemaFromSimple.d.ts +19 -0
  197. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -0
  198. package/dist/simple-tree/api/schemaFromSimple.js +60 -0
  199. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -0
  200. package/dist/simple-tree/api/simpleSchema.d.ts +3 -0
  201. package/dist/simple-tree/api/simpleSchema.d.ts.map +1 -1
  202. package/dist/simple-tree/api/simpleSchema.js.map +1 -1
  203. package/dist/simple-tree/api/tree.d.ts +11 -5
  204. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  205. package/dist/simple-tree/api/tree.js +11 -2
  206. package/dist/simple-tree/api/tree.js.map +1 -1
  207. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  208. package/dist/simple-tree/api/treeNodeApi.js +2 -17
  209. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  210. package/dist/simple-tree/api/typesUnsafe.d.ts +15 -15
  211. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  212. package/dist/simple-tree/api/verboseTree.d.ts +16 -25
  213. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  214. package/dist/simple-tree/api/verboseTree.js +15 -10
  215. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  216. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +2 -2
  217. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  218. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  219. package/dist/simple-tree/flexList.d.ts +4 -5
  220. package/dist/simple-tree/flexList.d.ts.map +1 -1
  221. package/dist/simple-tree/flexList.js +1 -14
  222. package/dist/simple-tree/flexList.js.map +1 -1
  223. package/dist/simple-tree/index.d.ts +2 -2
  224. package/dist/simple-tree/index.d.ts.map +1 -1
  225. package/dist/simple-tree/index.js +7 -2
  226. package/dist/simple-tree/index.js.map +1 -1
  227. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  228. package/dist/simple-tree/objectNode.js +2 -0
  229. package/dist/simple-tree/objectNode.js.map +1 -1
  230. package/dist/simple-tree/schemaTypes.d.ts +34 -2
  231. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  232. package/dist/simple-tree/schemaTypes.js +55 -2
  233. package/dist/simple-tree/schemaTypes.js.map +1 -1
  234. package/dist/simple-tree/toMapTree.d.ts +4 -4
  235. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  236. package/dist/simple-tree/toMapTree.js.map +1 -1
  237. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  238. package/dist/simple-tree/toStoredSchema.js +1 -5
  239. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  240. package/dist/simple-tree/treeNodeValid.d.ts +7 -1
  241. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  242. package/dist/simple-tree/treeNodeValid.js +13 -5
  243. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  244. package/dist/util/cloneWithReplacements.d.ts +21 -0
  245. package/dist/util/cloneWithReplacements.d.ts.map +1 -0
  246. package/dist/util/cloneWithReplacements.js +38 -0
  247. package/dist/util/cloneWithReplacements.js.map +1 -0
  248. package/dist/util/index.d.ts +1 -0
  249. package/dist/util/index.d.ts.map +1 -1
  250. package/dist/util/index.js +3 -1
  251. package/dist/util/index.js.map +1 -1
  252. package/dist/util/referenceCounting.d.ts +18 -0
  253. package/dist/util/referenceCounting.d.ts.map +1 -1
  254. package/dist/util/referenceCounting.js.map +1 -1
  255. package/lib/alpha.d.ts +6 -0
  256. package/lib/core/forest/editableForest.d.ts +1 -14
  257. package/lib/core/forest/editableForest.d.ts.map +1 -1
  258. package/lib/core/forest/editableForest.js +0 -26
  259. package/lib/core/forest/editableForest.js.map +1 -1
  260. package/lib/core/forest/forest.d.ts +16 -3
  261. package/lib/core/forest/forest.d.ts.map +1 -1
  262. package/lib/core/forest/forest.js +4 -1
  263. package/lib/core/forest/forest.js.map +1 -1
  264. package/lib/core/forest/index.d.ts +1 -1
  265. package/lib/core/forest/index.d.ts.map +1 -1
  266. package/lib/core/forest/index.js +1 -1
  267. package/lib/core/forest/index.js.map +1 -1
  268. package/lib/core/index.d.ts +2 -2
  269. package/lib/core/index.d.ts.map +1 -1
  270. package/lib/core/index.js +2 -2
  271. package/lib/core/index.js.map +1 -1
  272. package/lib/core/tree/anchorSet.d.ts +8 -3
  273. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  274. package/lib/core/tree/anchorSet.js +12 -5
  275. package/lib/core/tree/anchorSet.js.map +1 -1
  276. package/lib/core/tree/delta.d.ts +8 -23
  277. package/lib/core/tree/delta.d.ts.map +1 -1
  278. package/lib/core/tree/delta.js.map +1 -1
  279. package/lib/core/tree/deltaUtil.d.ts +3 -3
  280. package/lib/core/tree/deltaUtil.d.ts.map +1 -1
  281. package/lib/core/tree/deltaUtil.js +2 -2
  282. package/lib/core/tree/deltaUtil.js.map +1 -1
  283. package/lib/core/tree/index.d.ts +2 -2
  284. package/lib/core/tree/index.d.ts.map +1 -1
  285. package/lib/core/tree/index.js +1 -1
  286. package/lib/core/tree/index.js.map +1 -1
  287. package/lib/core/tree/pathTree.d.ts +54 -1
  288. package/lib/core/tree/pathTree.d.ts.map +1 -1
  289. package/lib/core/tree/pathTree.js +6 -0
  290. package/lib/core/tree/pathTree.js.map +1 -1
  291. package/lib/core/tree/visitDelta.d.ts +7 -5
  292. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  293. package/lib/core/tree/visitDelta.js +19 -9
  294. package/lib/core/tree/visitDelta.js.map +1 -1
  295. package/lib/core/tree/visitorUtils.d.ts +5 -23
  296. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  297. package/lib/core/tree/visitorUtils.js +8 -5
  298. package/lib/core/tree/visitorUtils.js.map +1 -1
  299. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts +1 -1
  300. package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -1
  301. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  302. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +5 -3
  303. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  304. package/lib/feature-libraries/chunked-forest/chunkTree.js +11 -8
  305. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  306. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -0
  307. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  308. package/lib/feature-libraries/chunked-forest/chunkedForest.js +6 -3
  309. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  310. package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  311. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  312. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  313. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  314. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  315. package/lib/feature-libraries/chunked-forest/codec/{schemaBasedEncoding.d.ts → schemaBasedEncode.d.ts} +1 -1
  316. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -0
  317. package/lib/feature-libraries/chunked-forest/codec/{schemaBasedEncoding.js → schemaBasedEncode.js} +1 -1
  318. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -0
  319. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +3 -2
  320. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  321. package/lib/feature-libraries/chunked-forest/uniformChunk.js +3 -2
  322. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  323. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +12 -14
  324. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  325. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +5 -6
  326. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  327. package/lib/feature-libraries/default-schema/index.d.ts +1 -0
  328. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  329. package/lib/feature-libraries/default-schema/index.js +1 -0
  330. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  331. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +21 -0
  332. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -0
  333. package/lib/feature-libraries/default-schema/mappedEditBuilder.js +53 -0
  334. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -0
  335. package/lib/feature-libraries/deltaUtils.js +1 -1
  336. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  337. package/lib/feature-libraries/flex-tree/context.d.ts +5 -5
  338. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  339. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  340. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +2 -2
  341. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  342. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  343. package/lib/feature-libraries/flex-tree/lazyField.d.ts +5 -4
  344. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  345. package/lib/feature-libraries/flex-tree/lazyField.js +11 -8
  346. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  347. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  348. package/lib/feature-libraries/forest-summary/forestSummarizer.js +6 -7
  349. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  350. package/lib/feature-libraries/index.d.ts +2 -1
  351. package/lib/feature-libraries/index.d.ts.map +1 -1
  352. package/lib/feature-libraries/index.js +2 -1
  353. package/lib/feature-libraries/index.js.map +1 -1
  354. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  355. package/lib/feature-libraries/initializeForest.d.ts +18 -0
  356. package/lib/feature-libraries/initializeForest.d.ts.map +1 -0
  357. package/lib/feature-libraries/initializeForest.js +31 -0
  358. package/lib/feature-libraries/initializeForest.js.map +1 -0
  359. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +5 -5
  360. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  361. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +10 -16
  362. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  363. package/lib/feature-libraries/node-identifier/index.d.ts +8 -0
  364. package/lib/feature-libraries/node-identifier/index.d.ts.map +1 -0
  365. package/lib/feature-libraries/node-identifier/index.js +8 -0
  366. package/lib/feature-libraries/node-identifier/index.js.map +1 -0
  367. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts +22 -0
  368. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -0
  369. package/lib/feature-libraries/{node-key/mockNodeKeyManager.js → node-identifier/mockNodeIdentifierManager.js} +16 -16
  370. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -0
  371. package/lib/feature-libraries/node-identifier/nodeIdentifier.d.ts +38 -0
  372. package/lib/feature-libraries/node-identifier/nodeIdentifier.d.ts.map +1 -0
  373. package/lib/feature-libraries/node-identifier/nodeIdentifier.js +22 -0
  374. package/lib/feature-libraries/node-identifier/nodeIdentifier.js.map +1 -0
  375. package/lib/feature-libraries/node-identifier/nodeIdentifierManager.d.ts +37 -0
  376. package/lib/feature-libraries/node-identifier/nodeIdentifierManager.d.ts.map +1 -0
  377. package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js +43 -0
  378. package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -0
  379. package/lib/feature-libraries/object-forest/objectForest.d.ts +2 -1
  380. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  381. package/lib/feature-libraries/object-forest/objectForest.js +6 -2
  382. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  383. package/lib/feature-libraries/treeCursorUtils.js +1 -1
  384. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  385. package/lib/index.d.ts +3 -3
  386. package/lib/index.d.ts.map +1 -1
  387. package/lib/index.js +2 -1
  388. package/lib/index.js.map +1 -1
  389. package/lib/packageVersion.d.ts +1 -1
  390. package/lib/packageVersion.js +1 -1
  391. package/lib/packageVersion.js.map +1 -1
  392. package/lib/shared-tree/checkoutFlexTreeView.d.ts +3 -3
  393. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  394. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
  395. package/lib/shared-tree/independentView.d.ts.map +1 -1
  396. package/lib/shared-tree/independentView.js +5 -20
  397. package/lib/shared-tree/independentView.js.map +1 -1
  398. package/lib/shared-tree/index.d.ts +1 -1
  399. package/lib/shared-tree/index.d.ts.map +1 -1
  400. package/lib/shared-tree/index.js +1 -1
  401. package/lib/shared-tree/index.js.map +1 -1
  402. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  403. package/lib/shared-tree/schematizeTree.js +3 -2
  404. package/lib/shared-tree/schematizeTree.js.map +1 -1
  405. package/lib/shared-tree/schematizingTreeView.d.ts +4 -4
  406. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  407. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  408. package/lib/shared-tree/sharedTree.d.ts +1 -0
  409. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  410. package/lib/shared-tree/sharedTree.js +9 -6
  411. package/lib/shared-tree/sharedTree.js.map +1 -1
  412. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  413. package/lib/shared-tree/sharedTreeChangeFamily.js +1 -1
  414. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  415. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +1 -2
  416. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  417. package/lib/shared-tree/sharedTreeEditBuilder.js +2 -2
  418. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  419. package/lib/shared-tree/treeApiAlpha.d.ts +6 -31
  420. package/lib/shared-tree/treeApiAlpha.d.ts.map +1 -1
  421. package/lib/shared-tree/treeApiAlpha.js +3 -18
  422. package/lib/shared-tree/treeApiAlpha.js.map +1 -1
  423. package/lib/shared-tree/treeCheckout.js +2 -2
  424. package/lib/shared-tree/treeCheckout.js.map +1 -1
  425. package/lib/simple-tree/api/conciseTree.d.ts +8 -2
  426. package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
  427. package/lib/simple-tree/api/conciseTree.js +9 -1
  428. package/lib/simple-tree/api/conciseTree.js.map +1 -1
  429. package/lib/simple-tree/api/create.d.ts +3 -3
  430. package/lib/simple-tree/api/create.d.ts.map +1 -1
  431. package/lib/simple-tree/api/create.js.map +1 -1
  432. package/lib/simple-tree/api/customTree.d.ts +42 -12
  433. package/lib/simple-tree/api/customTree.d.ts.map +1 -1
  434. package/lib/simple-tree/api/customTree.js +29 -2
  435. package/lib/simple-tree/api/customTree.js.map +1 -1
  436. package/lib/simple-tree/api/index.d.ts +4 -3
  437. package/lib/simple-tree/api/index.d.ts.map +1 -1
  438. package/lib/simple-tree/api/index.js +4 -3
  439. package/lib/simple-tree/api/index.js.map +1 -1
  440. package/lib/simple-tree/api/schemaFactory.d.ts +12 -9
  441. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  442. package/lib/simple-tree/api/schemaFactory.js +14 -23
  443. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  444. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +7 -0
  445. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  446. package/lib/simple-tree/api/schemaFactoryAlpha.js +9 -0
  447. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  448. package/lib/simple-tree/api/schemaFromSimple.d.ts +19 -0
  449. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -0
  450. package/lib/simple-tree/api/schemaFromSimple.js +56 -0
  451. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -0
  452. package/lib/simple-tree/api/simpleSchema.d.ts +3 -0
  453. package/lib/simple-tree/api/simpleSchema.d.ts.map +1 -1
  454. package/lib/simple-tree/api/simpleSchema.js.map +1 -1
  455. package/lib/simple-tree/api/tree.d.ts +11 -5
  456. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  457. package/lib/simple-tree/api/tree.js +12 -3
  458. package/lib/simple-tree/api/tree.js.map +1 -1
  459. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  460. package/lib/simple-tree/api/treeNodeApi.js +4 -19
  461. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  462. package/lib/simple-tree/api/typesUnsafe.d.ts +15 -15
  463. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  464. package/lib/simple-tree/api/verboseTree.d.ts +16 -25
  465. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  466. package/lib/simple-tree/api/verboseTree.js +14 -10
  467. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  468. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +2 -2
  469. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  470. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  471. package/lib/simple-tree/flexList.d.ts +4 -5
  472. package/lib/simple-tree/flexList.d.ts.map +1 -1
  473. package/lib/simple-tree/flexList.js +0 -12
  474. package/lib/simple-tree/flexList.js.map +1 -1
  475. package/lib/simple-tree/index.d.ts +2 -2
  476. package/lib/simple-tree/index.d.ts.map +1 -1
  477. package/lib/simple-tree/index.js +2 -2
  478. package/lib/simple-tree/index.js.map +1 -1
  479. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  480. package/lib/simple-tree/objectNode.js +2 -0
  481. package/lib/simple-tree/objectNode.js.map +1 -1
  482. package/lib/simple-tree/schemaTypes.d.ts +34 -2
  483. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  484. package/lib/simple-tree/schemaTypes.js +54 -3
  485. package/lib/simple-tree/schemaTypes.js.map +1 -1
  486. package/lib/simple-tree/toMapTree.d.ts +4 -4
  487. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  488. package/lib/simple-tree/toMapTree.js.map +1 -1
  489. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  490. package/lib/simple-tree/toStoredSchema.js +3 -7
  491. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  492. package/lib/simple-tree/treeNodeValid.d.ts +7 -1
  493. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  494. package/lib/simple-tree/treeNodeValid.js +13 -5
  495. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  496. package/lib/util/cloneWithReplacements.d.ts +21 -0
  497. package/lib/util/cloneWithReplacements.d.ts.map +1 -0
  498. package/lib/util/cloneWithReplacements.js +34 -0
  499. package/lib/util/cloneWithReplacements.js.map +1 -0
  500. package/lib/util/index.d.ts +1 -0
  501. package/lib/util/index.d.ts.map +1 -1
  502. package/lib/util/index.js +1 -0
  503. package/lib/util/index.js.map +1 -1
  504. package/lib/util/referenceCounting.d.ts +18 -0
  505. package/lib/util/referenceCounting.d.ts.map +1 -1
  506. package/lib/util/referenceCounting.js.map +1 -1
  507. package/package.json +22 -22
  508. package/src/core/forest/editableForest.ts +1 -52
  509. package/src/core/forest/forest.ts +17 -2
  510. package/src/core/forest/index.ts +0 -1
  511. package/src/core/index.ts +4 -2
  512. package/src/core/tree/anchorSet.ts +41 -10
  513. package/src/core/tree/delta.ts +8 -25
  514. package/src/core/tree/deltaUtil.ts +5 -5
  515. package/src/core/tree/index.ts +4 -1
  516. package/src/core/tree/pathTree.ts +72 -1
  517. package/src/core/tree/visitDelta.ts +38 -17
  518. package/src/core/tree/visitorUtils.ts +22 -36
  519. package/src/feature-libraries/chunked-forest/basicChunk.ts +1 -1
  520. package/src/feature-libraries/chunked-forest/chunkTree.ts +19 -8
  521. package/src/feature-libraries/chunked-forest/chunkedForest.ts +9 -4
  522. package/src/feature-libraries/chunked-forest/codec/README.md +3 -3
  523. package/src/feature-libraries/chunked-forest/codec/codecs.ts +1 -1
  524. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
  525. package/src/feature-libraries/chunked-forest/uniformChunk.ts +3 -2
  526. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +21 -38
  527. package/src/feature-libraries/default-schema/index.ts +2 -0
  528. package/src/feature-libraries/default-schema/mappedEditBuilder.ts +68 -0
  529. package/src/feature-libraries/deltaUtils.ts +1 -1
  530. package/src/feature-libraries/flex-tree/context.ts +4 -4
  531. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +2 -2
  532. package/src/feature-libraries/flex-tree/lazyField.ts +19 -10
  533. package/src/feature-libraries/forest-summary/forestSummarizer.ts +5 -9
  534. package/src/feature-libraries/index.ts +10 -8
  535. package/src/feature-libraries/indexing/anchorTreeIndex.ts +2 -2
  536. package/src/feature-libraries/initializeForest.ts +55 -0
  537. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +12 -28
  538. package/src/feature-libraries/node-identifier/README.md +11 -0
  539. package/src/feature-libraries/node-identifier/index.ts +17 -0
  540. package/src/feature-libraries/node-identifier/mockNodeIdentifierManager.ts +59 -0
  541. package/src/feature-libraries/node-identifier/nodeIdentifier.ts +50 -0
  542. package/src/feature-libraries/node-identifier/nodeIdentifierManager.ts +95 -0
  543. package/src/feature-libraries/object-forest/objectForest.ts +10 -3
  544. package/src/feature-libraries/treeCursorUtils.ts +1 -1
  545. package/src/index.ts +17 -10
  546. package/src/packageVersion.ts +1 -1
  547. package/src/shared-tree/checkoutFlexTreeView.ts +2 -2
  548. package/src/shared-tree/independentView.ts +5 -29
  549. package/src/shared-tree/index.ts +1 -0
  550. package/src/shared-tree/schematizeTree.ts +3 -2
  551. package/src/shared-tree/schematizingTreeView.ts +3 -3
  552. package/src/shared-tree/sharedTree.ts +13 -9
  553. package/src/shared-tree/sharedTreeChangeFamily.ts +0 -1
  554. package/src/shared-tree/sharedTreeEditBuilder.ts +5 -11
  555. package/src/shared-tree/treeApiAlpha.ts +15 -78
  556. package/src/shared-tree/treeCheckout.ts +2 -2
  557. package/src/simple-tree/api/conciseTree.ts +25 -8
  558. package/src/simple-tree/api/create.ts +3 -3
  559. package/src/simple-tree/api/customTree.ts +59 -16
  560. package/src/simple-tree/api/index.ts +10 -1
  561. package/src/simple-tree/api/schemaFactory.ts +18 -32
  562. package/src/simple-tree/api/schemaFactoryAlpha.ts +12 -0
  563. package/src/simple-tree/api/schemaFromSimple.ts +68 -0
  564. package/src/simple-tree/api/simpleSchema.ts +10 -0
  565. package/src/simple-tree/api/tree.ts +13 -8
  566. package/src/simple-tree/api/treeNodeApi.ts +4 -17
  567. package/src/simple-tree/api/typesUnsafe.ts +15 -15
  568. package/src/simple-tree/api/verboseTree.ts +43 -55
  569. package/src/simple-tree/core/unhydratedFlexTree.ts +2 -2
  570. package/src/simple-tree/flexList.ts +4 -14
  571. package/src/simple-tree/index.ts +6 -0
  572. package/src/simple-tree/objectNode.ts +3 -0
  573. package/src/simple-tree/schemaTypes.ts +70 -4
  574. package/src/simple-tree/toMapTree.ts +6 -6
  575. package/src/simple-tree/toStoredSchema.ts +3 -6
  576. package/src/simple-tree/treeNodeValid.ts +16 -5
  577. package/src/util/cloneWithReplacements.ts +41 -0
  578. package/src/util/index.ts +2 -0
  579. package/src/util/referenceCounting.ts +18 -1
  580. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +0 -1
  581. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +0 -1
  582. package/dist/feature-libraries/node-key/index.d.ts +0 -8
  583. package/dist/feature-libraries/node-key/index.d.ts.map +0 -1
  584. package/dist/feature-libraries/node-key/index.js +0 -16
  585. package/dist/feature-libraries/node-key/index.js.map +0 -1
  586. package/dist/feature-libraries/node-key/mockNodeKeyManager.d.ts +0 -22
  587. package/dist/feature-libraries/node-key/mockNodeKeyManager.d.ts.map +0 -1
  588. package/dist/feature-libraries/node-key/mockNodeKeyManager.js.map +0 -1
  589. package/dist/feature-libraries/node-key/nodeKey.d.ts +0 -38
  590. package/dist/feature-libraries/node-key/nodeKey.d.ts.map +0 -1
  591. package/dist/feature-libraries/node-key/nodeKey.js +0 -26
  592. package/dist/feature-libraries/node-key/nodeKey.js.map +0 -1
  593. package/dist/feature-libraries/node-key/nodeKeyManager.d.ts +0 -37
  594. package/dist/feature-libraries/node-key/nodeKeyManager.d.ts.map +0 -1
  595. package/dist/feature-libraries/node-key/nodeKeyManager.js +0 -48
  596. package/dist/feature-libraries/node-key/nodeKeyManager.js.map +0 -1
  597. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +0 -1
  598. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +0 -1
  599. package/lib/feature-libraries/node-key/index.d.ts +0 -8
  600. package/lib/feature-libraries/node-key/index.d.ts.map +0 -1
  601. package/lib/feature-libraries/node-key/index.js +0 -8
  602. package/lib/feature-libraries/node-key/index.js.map +0 -1
  603. package/lib/feature-libraries/node-key/mockNodeKeyManager.d.ts +0 -22
  604. package/lib/feature-libraries/node-key/mockNodeKeyManager.d.ts.map +0 -1
  605. package/lib/feature-libraries/node-key/mockNodeKeyManager.js.map +0 -1
  606. package/lib/feature-libraries/node-key/nodeKey.d.ts +0 -38
  607. package/lib/feature-libraries/node-key/nodeKey.d.ts.map +0 -1
  608. package/lib/feature-libraries/node-key/nodeKey.js +0 -22
  609. package/lib/feature-libraries/node-key/nodeKey.js.map +0 -1
  610. package/lib/feature-libraries/node-key/nodeKeyManager.d.ts +0 -37
  611. package/lib/feature-libraries/node-key/nodeKeyManager.d.ts.map +0 -1
  612. package/lib/feature-libraries/node-key/nodeKeyManager.js +0 -43
  613. package/lib/feature-libraries/node-key/nodeKeyManager.js.map +0 -1
  614. package/src/feature-libraries/node-key/README.md +0 -11
  615. package/src/feature-libraries/node-key/index.ts +0 -17
  616. package/src/feature-libraries/node-key/mockNodeKeyManager.ts +0 -54
  617. package/src/feature-libraries/node-key/nodeKey.ts +0 -47
  618. package/src/feature-libraries/node-key/nodeKeyManager.ts +0 -93
  619. /package/src/feature-libraries/chunked-forest/codec/{schemaBasedEncoding.ts → schemaBasedEncode.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @fluidframework/tree
2
2
 
3
+ ## 2.30.0
4
+
5
+ ### Minor Changes
6
+
7
+ - New SchemaFactoryAlpha.scopedFactory method ([#23987](https://github.com/microsoft/FluidFramework/pull/23987)) [cddd5139c3](https://github.com/microsoft/FluidFramework/commit/cddd5139c3e070ef26db55331528435a99c0a1b1)
8
+
9
+ The [`SchemaFactoryAlpha.scopedFactory`](https://fluidframework.com/docs/api/fluid-framework/schemafactoryalpha-class)
10
+ method has been added, providing an easy way to create a new `SchemaFactory` with a nested scope string.
11
+
12
+ - TreeBranchEvents now exposes the rootChanged event ([#24014](https://github.com/microsoft/FluidFramework/pull/24014)) [702a08af83](https://github.com/microsoft/FluidFramework/commit/702a08af83206c21e1016ca47051052fa8554aa5)
13
+
14
+ `TreeBranchEvents` now includes the `rootChanged` event from `TreeViewEvents`.
15
+
16
+ - Alpha APIs for replacing handles in export formats have been redesigned ([#24061](https://github.com/microsoft/FluidFramework/pull/24061)) [34b319cae7](https://github.com/microsoft/FluidFramework/commit/34b319cae7a78db5530dc898689e2eb846f1419f)
17
+
18
+ The various import and export [`VerboseTree`](https://fluidframework.com/docs/api/fluid-framework/verbosetree-typealias) and [`ConciseTree`](https://fluidframework.com/docs/api/fluid-framework/concisetree-typealias) APIs no longer include `valueConverter` options.
19
+ Instead the resulting tree can be further processed to do any desired replacements.
20
+ The following `@alpha` APIs have been added to assist with this:
21
+
22
+ 1. `cloneWithReplacements`
23
+ 2. `replaceHandles`
24
+ 3. `replaceConciseTreeHandles`
25
+ 4. `replaceVerboseTreeHandles`
26
+
27
+ - Rules regarding how and when lazy schema references are resolved have been clarified ([#24030](https://github.com/microsoft/FluidFramework/pull/24030)) [23f32794db](https://github.com/microsoft/FluidFramework/commit/23f32794dbd3672dcc18e2a9ba2f16f4bf1241f0)
28
+
29
+ A lazy schema reference is a [LazyItem](https://fluidframework.com/docs/api/fluid-framework/lazyitem-typealias) referencing a [TreeNodeSchema](https://fluidframework.com/docs/api/fluid-framework/treenodeschema-typealias).
30
+ They typically look like `() => MySchema` and are used when a [forward reference](https://en.wikipedia.org/wiki/Forward_declaration#Forward_reference) from one schema to another is required (including but not limited to recursive and co-recursive schema).
31
+
32
+ [TreeViewConfiguration](https://fluidframework.com/docs/api/fluid-framework/treeviewconfiguration-class#_constructor_-constructor) now documents its significance with respect to lazy schema references.
33
+ Additionally some implicit assumptions like no modifications of [AllowedTypes](https://fluidframework.com/docs/api/fluid-framework/allowedtypes-typealias)
34
+ after resolving of lazy schema references have been enforced (such modifications would previously cause undefined behavior in the future, and now an error is thrown when trying to modify them).
35
+
36
+ `evaluateLazySchema` has been added as an `@alpha` API that is now consistently used by all internal code when evaluating lazy schema references.
37
+ This ensures consistent behavior and error reporting, but also adds caching.
38
+ Therefore it is now supported for applications to have lazy schema references which compute the schema when invoked,
39
+ without having to implement their own caching as long as those applications use `evaluateLazySchema` anytime they need to evaluate a lazy schema reference.
40
+
3
41
  ## 2.23.0
4
42
 
5
43
  ### Minor Changes
@@ -44,6 +44,12 @@ export interface BranchableTree extends ViewableTree {
44
44
  rebase(branch: TreeBranchFork): void;
45
45
  }
46
46
 
47
+ // @alpha
48
+ export function cloneWithReplacements(root: unknown, rootKey: string, replacer: (key: string, value: unknown) => {
49
+ clone: boolean;
50
+ value: unknown;
51
+ }): unknown;
52
+
47
53
  // @public
48
54
  export enum CommitKind {
49
55
  Default = 0,
@@ -85,9 +91,8 @@ interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider
85
91
  }
86
92
 
87
93
  // @alpha
88
- export interface EncodeOptions<TCustom> {
94
+ export interface EncodeOptions {
89
95
  readonly useStoredKeys?: boolean;
90
- valueConverter(data: IFluidHandle): TCustom;
91
96
  }
92
97
 
93
98
  // @alpha
@@ -101,6 +106,9 @@ export function enumFromStrings<TScope extends string, const Members extends rea
101
106
  }, Record<string, never>, true, Record<string, never>, undefined>; }[Members[number]] : never>;
102
107
  };
103
108
 
109
+ // @alpha
110
+ export function evaluateLazySchema<T extends TreeNodeSchema>(value: LazyItem<T>): T;
111
+
104
112
  // @public
105
113
  type ExtractItemType<Item extends LazyItem> = Item extends () => infer Result ? Result : Item;
106
114
 
@@ -208,6 +216,9 @@ export function getBranch<T extends ImplicitFieldSchema | UnsafeUnknownSchema>(v
208
216
  // @alpha
209
217
  export function getJsonSchema(schema: ImplicitFieldSchema): JsonTreeSchema;
210
218
 
219
+ // @alpha
220
+ export type HandleConverter<TCustom> = (data: IFluidHandle) => TCustom;
221
+
211
222
  // @alpha
212
223
  export interface ICodecOptions {
213
224
  readonly jsonValidator: JsonValidator;
@@ -545,9 +556,8 @@ type ObjectFromSchemaRecordUnsafe<T extends Unenforced<RestrictiveStringRecord<I
545
556
  export type Off = Off_2;
546
557
 
547
558
  // @alpha
548
- export interface ParseOptions<TCustom> {
559
+ export interface ParseOptions {
549
560
  readonly useStoredKeys?: boolean;
550
- valueConverter(data: VerboseTree<TCustom>): TreeLeafValue | VerboseTreeNode<TCustom>;
551
561
  }
552
562
 
553
563
  // @alpha
@@ -581,6 +591,15 @@ export type ReadSchema<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema
581
591
  TSchema
582
592
  ] extends [ImplicitFieldSchema] ? TSchema : ImplicitFieldSchema;
583
593
 
594
+ // @alpha
595
+ export function replaceConciseTreeHandles<T>(tree: ConciseTree, replacer: HandleConverter<T>): ConciseTree<T>;
596
+
597
+ // @alpha
598
+ export function replaceHandles<T>(tree: unknown, replacer: HandleConverter<T>): unknown;
599
+
600
+ // @alpha
601
+ export function replaceVerboseTreeHandles<T>(tree: VerboseTree, replacer: HandleConverter<T>): VerboseTree<T>;
602
+
584
603
  // @public @deprecated
585
604
  export type RestrictiveReadonlyRecord<K extends symbol | string, T> = {
586
605
  readonly [P in symbol | string]: P extends K ? T : never;
@@ -713,6 +732,7 @@ export class SchemaFactoryAlpha<out TScope extends string | undefined = string |
713
732
  }, false, T, undefined, TCustomMetadata>;
714
733
  object<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitFieldSchema>, const TCustomMetadata = unknown>(name: Name, fields: T, options?: SchemaFactoryObjectOptions<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, TreeObjectNode<T, ScopedSchemaName<TScope, Name>>, object & InsertableObjectFromSchemaRecord<T>, true, T, never, TCustomMetadata>;
715
734
  objectRecursive<const Name extends TName, const T extends Unenforced<RestrictiveStringRecord<ImplicitFieldSchema>>, const TCustomMetadata = unknown>(name: Name, t: T, options?: SchemaFactoryObjectOptions<TCustomMetadata>): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Object, TreeObjectNodeUnsafe<T, ScopedSchemaName<TScope, Name>>, object & InsertableObjectFromSchemaRecordUnsafe<T>, false, T, never, TCustomMetadata>;
735
+ scopedFactory<const T extends TName, TNameInner extends number | string = string>(name: T): SchemaFactoryAlpha<ScopedSchemaName<TScope, T>, TNameInner>;
716
736
  }
717
737
 
718
738
  // @alpha
@@ -809,12 +829,9 @@ export const TreeAlpha: {
809
829
  branch(node: TreeNode): TreeBranch | undefined;
810
830
  create<const TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema>(schema: UnsafeUnknownSchema extends TSchema ? ImplicitFieldSchema : TSchema & ImplicitFieldSchema, data: InsertableField<TSchema>): Unhydrated<TSchema extends ImplicitFieldSchema ? TreeFieldFromImplicitField<TSchema> : TreeNode | TreeLeafValue | undefined>;
811
831
  importConcise<const TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema>(schema: UnsafeUnknownSchema extends TSchema ? ImplicitFieldSchema : TSchema & ImplicitFieldSchema, data: ConciseTree | undefined): Unhydrated<TSchema extends ImplicitFieldSchema ? TreeFieldFromImplicitField<TSchema> : TreeNode | TreeLeafValue | undefined>;
812
- importVerbose<const TSchema extends ImplicitFieldSchema>(schema: TSchema, data: VerboseTree | undefined, options?: Partial<ParseOptions<IFluidHandle>>): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
813
- importVerbose<const TSchema extends ImplicitFieldSchema, THandle>(schema: TSchema, data: VerboseTree<THandle> | undefined, options: ParseOptions<THandle>): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
814
- exportConcise(node: TreeNode | TreeLeafValue, options?: Partial<EncodeOptions<IFluidHandle>>): ConciseTree;
815
- exportConcise<THandle>(node: TreeNode | TreeLeafValue, options: EncodeOptions<THandle>): ConciseTree<THandle>;
816
- exportVerbose(node: TreeNode | TreeLeafValue, options?: Partial<EncodeOptions<IFluidHandle>>): VerboseTree;
817
- exportVerbose<T>(node: TreeNode | TreeLeafValue, options: EncodeOptions<T>): VerboseTree<T>;
832
+ importVerbose<const TSchema extends ImplicitFieldSchema>(schema: TSchema, data: VerboseTree | undefined, options?: Partial<ParseOptions>): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
833
+ exportConcise(node: TreeNode | TreeLeafValue, options?: EncodeOptions): ConciseTree;
834
+ exportVerbose(node: TreeNode | TreeLeafValue, options?: EncodeOptions): VerboseTree;
818
835
  exportCompressed(tree: TreeNode | TreeLeafValue, options: {
819
836
  oldestCompatibleClient: FluidClientVersion;
820
837
  idCompressor?: IIdCompressor;
@@ -878,10 +895,9 @@ export interface TreeBranch extends IDisposable {
878
895
  }
879
896
 
880
897
  // @alpha @sealed
881
- export interface TreeBranchEvents {
898
+ export interface TreeBranchEvents extends Omit<TreeViewEvents, "commitApplied"> {
882
899
  changed(data: CommitMetadata, getRevertible?: RevertibleAlphaFactory): void;
883
900
  commitApplied(data: CommitMetadata, getRevertible?: RevertibleAlphaFactory): void;
884
- schemaChanged(): void;
885
901
  }
886
902
 
887
903
  // @alpha @sealed
package/dist/alpha.d.ts CHANGED
@@ -109,6 +109,7 @@ export {
109
109
  ForestTypeExpensiveDebug,
110
110
  ForestTypeOptimized,
111
111
  ForestTypeReference,
112
+ HandleConverter,
112
113
  ICodecOptions,
113
114
  IdentifierIndex,
114
115
  Insertable,
@@ -168,16 +169,21 @@ export {
168
169
  VoidTransactionCallbackStatus,
169
170
  adaptEnum,
170
171
  asTreeViewAlpha,
172
+ cloneWithReplacements,
171
173
  comparePersistedSchema,
172
174
  createIdentifierIndex,
173
175
  createSimpleTreeIndex,
174
176
  enumFromStrings,
177
+ evaluateLazySchema,
175
178
  extractPersistedSchema,
176
179
  getBranch,
177
180
  getJsonSchema,
178
181
  independentInitializedView,
179
182
  independentView,
180
183
  noopValidator,
184
+ replaceConciseTreeHandles,
185
+ replaceHandles,
186
+ replaceVerboseTreeHandles,
181
187
  singletonSchema,
182
188
  typeboxValidator
183
189
  } from "./index.js";
@@ -2,10 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import type { IIdCompressor } from "@fluidframework/id-compressor";
6
- import type { RevisionTagCodec } from "../rebase/index.js";
7
5
  import type { FieldKey } from "../schema-stored/index.js";
8
- import { type Anchor, type DeltaVisitor, type DetachedField, type ITreeCursorSynchronous } from "../tree/index.js";
6
+ import type { Anchor, DeltaVisitor, DetachedField } from "../tree/index.js";
9
7
  import type { IForestSubscription, ITreeSubscriptionCursor } from "./forest.js";
10
8
  /**
11
9
  * Editing APIs.
@@ -23,17 +21,6 @@ export interface IEditableForest extends IForestSubscription {
23
21
  */
24
22
  acquireVisitor(): DeltaVisitor;
25
23
  }
26
- /**
27
- * Initializes the given forest with the given content.
28
- * @remarks The forest must be empty when this function is called.
29
- * This does not perform an edit in the typical sense.
30
- * Instead, it creates a delta expressing a creation and insertion of the `content` under the {@link rootFieldKey}, and then applies the delta to the forest.
31
- * If `visitAnchors` is enabled, then the delta will also be applied to the forest's {@link AnchorSet} (in which case there must be no existing anchors when this function is called).
32
- *
33
- * @remarks
34
- * This does not perform an edit: it updates the forest content as if there was an edit that did that.
35
- */
36
- export declare function initializeForest(forest: IEditableForest, content: readonly ITreeCursorSynchronous[], revisionTagCodec: RevisionTagCodec, idCompressor: IIdCompressor, visitAnchors?: boolean): void;
37
24
  /**
38
25
  * Ways to refer to a node in an IEditableForest.
39
26
  */
@@ -1 +1 @@
1
- {"version":3,"file":"editableForest.d.ts","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAA4B,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAG7F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EACN,KAAK,MAAM,EAEX,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAK3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC3D;;;;;;;;;OASG;IACH,cAAc,IAAI,YAAY,CAAC;CAC/B;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,eAA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a,GAAG,aAAa,GAAG,KAAK,IAAI,aAAa,CAE5F;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CAChC"}
@@ -4,34 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.isFieldLocation = exports.initializeForest = void 0;
8
- const internal_1 = require("@fluidframework/core-utils/internal");
9
- const index_js_1 = require("../tree/index.js");
10
- /**
11
- * Initializes the given forest with the given content.
12
- * @remarks The forest must be empty when this function is called.
13
- * This does not perform an edit in the typical sense.
14
- * Instead, it creates a delta expressing a creation and insertion of the `content` under the {@link rootFieldKey}, and then applies the delta to the forest.
15
- * If `visitAnchors` is enabled, then the delta will also be applied to the forest's {@link AnchorSet} (in which case there must be no existing anchors when this function is called).
16
- *
17
- * @remarks
18
- * This does not perform an edit: it updates the forest content as if there was an edit that did that.
19
- */
20
- function initializeForest(forest, content, revisionTagCodec, idCompressor, visitAnchors = false) {
21
- (0, internal_1.assert)(forest.isEmpty, 0x747 /* forest must be empty */);
22
- const delta = (0, index_js_1.deltaForRootInitialization)(content);
23
- let visitor = forest.acquireVisitor();
24
- if (visitAnchors) {
25
- (0, internal_1.assert)(forest.anchors.isEmpty(), 0x9b7 /* anchor set must be empty */);
26
- const anchorVisitor = forest.anchors.acquireVisitor();
27
- visitor = (0, index_js_1.combineVisitors)([visitor, anchorVisitor]);
28
- }
29
- // any detached trees built here are immediately attached so the revision used here doesn't matter
30
- // we use a dummy revision to make correctness checks in the detached field index easier
31
- (0, index_js_1.visitDelta)(delta, visitor, (0, index_js_1.makeDetachedFieldIndex)("init", revisionTagCodec, idCompressor), 0);
32
- visitor.free();
33
- }
34
- exports.initializeForest = initializeForest;
7
+ exports.isFieldLocation = void 0;
35
8
  function isFieldLocation(range) {
36
9
  return typeof range === "object";
37
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"editableForest.js","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,kEAA6D;AAI7D,+CAU0B;AAqB1B;;;;;;;;;GASG;AACH,SAAgB,gBAAgB,CAC/B,MAAuB,EACvB,OAA0C,EAC1C,gBAAkC,EAClC,YAA2B,EAC3B,YAAY,GAAG,KAAK;IAEpB,IAAA,iBAAM,EAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACzD,MAAM,KAAK,GAAc,IAAA,qCAA0B,EAAC,OAAO,CAAC,CAAC;IAC7D,IAAI,OAAO,GAAG,MAAM,CAAC,cAAc,EAAE,CAAC;IACtC,IAAI,YAAY,EAAE,CAAC;QAClB,IAAA,iBAAM,EAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;QACvE,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QACtD,OAAO,GAAG,IAAA,0BAAe,EAAC,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;IACrD,CAAC;IAED,kGAAkG;IAClG,wFAAwF;IACxF,IAAA,qBAAU,EACT,KAAK,EACL,OAAO,EACP,IAAA,iCAAsB,EAAC,MAAM,EAAE,gBAAgB,EAAE,YAAY,CAAC,EAC9D,CAA6B,CAC7B,CAAC;IACF,OAAO,CAAC,IAAI,EAAE,CAAC;AAChB,CAAC;AAzBD,4CAyBC;AAgBD,SAAgB,eAAe,CAAC,KAAoC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AAClC,CAAC;AAFD,0CAEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { SessionSpaceCompressedId, IIdCompressor } from \"@fluidframework/id-compressor\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { RevisionTagCodec } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\nimport {\n\ttype Anchor,\n\ttype DeltaRoot,\n\ttype DeltaVisitor,\n\ttype DetachedField,\n\ttype ITreeCursorSynchronous,\n\tcombineVisitors,\n\tdeltaForRootInitialization,\n\tmakeDetachedFieldIndex,\n\tvisitDelta,\n} from \"../tree/index.js\";\n\nimport type { IForestSubscription, ITreeSubscriptionCursor } from \"./forest.js\";\n\n/**\n * Editing APIs.\n */\nexport interface IEditableForest extends IForestSubscription {\n\t/**\n\t * Provides a visitor that can be used to mutate the forest.\n\t *\n\t * @returns a visitor that can be used to mutate the forest.\n\t *\n\t * @remarks\n\t * Mutating the forest does NOT update anchors.\n\t * The visitor must be released after use by calling {@link DeltaVisitor.free} on it.\n\t * It is invalid to acquire a visitor without releasing the previous one.\n\t */\n\tacquireVisitor(): DeltaVisitor;\n}\n\n/**\n * Initializes the given forest with the given content.\n * @remarks The forest must be empty when this function is called.\n * This does not perform an edit in the typical sense.\n * Instead, it creates a delta expressing a creation and insertion of the `content` under the {@link rootFieldKey}, and then applies the delta to the forest.\n * If `visitAnchors` is enabled, then the delta will also be applied to the forest's {@link AnchorSet} (in which case there must be no existing anchors when this function is called).\n *\n * @remarks\n * This does not perform an edit: it updates the forest content as if there was an edit that did that.\n */\nexport function initializeForest(\n\tforest: IEditableForest,\n\tcontent: readonly ITreeCursorSynchronous[],\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n\tvisitAnchors = false,\n): void {\n\tassert(forest.isEmpty, 0x747 /* forest must be empty */);\n\tconst delta: DeltaRoot = deltaForRootInitialization(content);\n\tlet visitor = forest.acquireVisitor();\n\tif (visitAnchors) {\n\t\tassert(forest.anchors.isEmpty(), 0x9b7 /* anchor set must be empty */);\n\t\tconst anchorVisitor = forest.anchors.acquireVisitor();\n\t\tvisitor = combineVisitors([visitor, anchorVisitor]);\n\t}\n\n\t// any detached trees built here are immediately attached so the revision used here doesn't matter\n\t// we use a dummy revision to make correctness checks in the detached field index easier\n\tvisitDelta(\n\t\tdelta,\n\t\tvisitor,\n\t\tmakeDetachedFieldIndex(\"init\", revisionTagCodec, idCompressor),\n\t\t0 as SessionSpaceCompressedId,\n\t);\n\tvisitor.free();\n}\n\n// TODO: Types below here may be useful for input into edit building APIs, but are no longer used here directly.\n\n/**\n * Ways to refer to a node in an IEditableForest.\n */\nexport type ForestLocation = ITreeSubscriptionCursor | Anchor;\n\n/**\n */\nexport interface TreeLocation {\n\treadonly range: FieldLocation | DetachedField;\n\treadonly index: number;\n}\n\nexport function isFieldLocation(range: FieldLocation | DetachedField): range is FieldLocation {\n\treturn typeof range === \"object\";\n}\n\n/**\n * Location of a field within a tree that is not a detached/root field.\n */\nexport interface FieldLocation {\n\treadonly key: FieldKey;\n\treadonly parent: ForestLocation;\n}\n"]}
1
+ {"version":3,"file":"editableForest.js","sourceRoot":"","sources":["../../../src/core/forest/editableForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAsCH,SAAgB,eAAe,CAAC,KAAoC;IACnE,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AAClC,CAAC;AAFD,0CAEC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { FieldKey } from \"../schema-stored/index.js\";\nimport type { Anchor, DeltaVisitor, DetachedField } from \"../tree/index.js\";\n\nimport type { IForestSubscription, ITreeSubscriptionCursor } from \"./forest.js\";\n\n/**\n * Editing APIs.\n */\nexport interface IEditableForest extends IForestSubscription {\n\t/**\n\t * Provides a visitor that can be used to mutate the forest.\n\t *\n\t * @returns a visitor that can be used to mutate the forest.\n\t *\n\t * @remarks\n\t * Mutating the forest does NOT update anchors.\n\t * The visitor must be released after use by calling {@link DeltaVisitor.free} on it.\n\t * It is invalid to acquire a visitor without releasing the previous one.\n\t */\n\tacquireVisitor(): DeltaVisitor;\n}\n\n// TODO: Types below here may be useful for input into edit building APIs, but are no longer used here directly.\n\n/**\n * Ways to refer to a node in an IEditableForest.\n */\nexport type ForestLocation = ITreeSubscriptionCursor | Anchor;\n\n/**\n */\nexport interface TreeLocation {\n\treadonly range: FieldLocation | DetachedField;\n\treadonly index: number;\n}\n\nexport function isFieldLocation(range: FieldLocation | DetachedField): range is FieldLocation {\n\treturn typeof range === \"object\";\n}\n\n/**\n * Location of a field within a tree that is not a detached/root field.\n */\nexport interface FieldLocation {\n\treadonly key: FieldKey;\n\treadonly parent: ForestLocation;\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { Listenable } from "@fluidframework/core-interfaces/internal";
6
6
  import type { FieldKey, TreeStoredSchemaSubscription } from "../schema-stored/index.js";
7
- import { type Anchor, type AnchorSet, type AnnouncedVisitor, type DetachedField, type ITreeCursor, type ITreeCursorSynchronous, type UpPath } from "../tree/index.js";
7
+ import { type Anchor, type AnchorSet, type AnnouncedVisitor, type DetachedField, type ITreeCursor, type ITreeCursorSynchronous, type TreeChunk, type UpPath } from "../tree/index.js";
8
8
  import type { IEditableForest } from "./editableForest.js";
9
9
  /**
10
10
  * APIs for forest designed so the implementation can be copy on write,
@@ -61,6 +61,16 @@ export interface IForestSubscription {
61
61
  * The new copy will not invalidate observers (dependents) of the old one.
62
62
  */
63
63
  clone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): IEditableForest;
64
+ /**
65
+ * Generate a TreeChunk for the content in the given field cursor.
66
+ * This can be used to chunk data that is then inserted into the forest.
67
+ *
68
+ * @remarks
69
+ * Like {@link chunkField}, but forces the results into a single TreeChunk.
70
+ * While any TreeChunk is compatible with any forest, this method creates one optimized for this specific forest.
71
+ * The provided data must be compatible with the forest's current schema.
72
+ */
73
+ chunkField(cursor: ITreeCursorSynchronous): TreeChunk;
64
74
  /**
65
75
  * Allocates a cursor in the "cleared" state.
66
76
  * @param source - optional string identifying the source of the cursor for debugging purposes when cursors are not properly cleaned up.
@@ -81,7 +91,7 @@ export interface IForestSubscription {
81
91
  */
82
92
  tryMoveCursorToField(destination: FieldAnchor, cursorToMove: ITreeSubscriptionCursor): TreeNavigationResult;
83
93
  /**
84
- * Set `cursorToMove` to location described by path.
94
+ * Set `cursorToMove` to the {@link CursorLocationType.node} described by path.
85
95
  * This is NOT a relative move: current position is discarded.
86
96
  * Path must point to existing node.
87
97
  */
@@ -111,13 +121,16 @@ export interface IForestSubscription {
111
121
  deregisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void;
112
122
  }
113
123
  /**
124
+ * Returns an anchor to the given field.
114
125
  * @param field - defaults to {@link rootField}.
115
126
  * @returns anchor to `field`.
116
127
  */
117
128
  export declare function rootAnchor(field?: DetachedField): FieldAnchor;
118
129
  /**
130
+ * Moves the given cursor to the given detached fields in the given forest.
131
+ * @param forest - forest to move cursor in.
132
+ * @param cursorToMove - cursor to move, must be allocated by the given forest
119
133
  * @param field - defaults to {@link rootField}.
120
- * @returns anchor to `field`.
121
134
  */
122
135
  export declare function moveToDetachedField(forest: IForestSubscription, cursorToMove: ITreeSubscriptionCursor, field?: DetachedField): void;
123
136
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"forest.d.ts","sourceRoot":"","sources":["../../../src/core/forest/forest.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,KAAK,EAAE,QAAQ,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACxF,OAAO,EACN,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,MAAM,EAGX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D;;;;;;;GAOG;AAEH;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,qBAAqB,CAAC,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,QAAQ,CAAC"}
@@ -8,6 +8,7 @@ exports.TreeNavigationResult = exports.ITreeSubscriptionCursorState = exports.mo
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const index_js_1 = require("../tree/index.js");
10
10
  /**
11
+ * Returns an anchor to the given field.
11
12
  * @param field - defaults to {@link rootField}.
12
13
  * @returns anchor to `field`.
13
14
  */
@@ -19,8 +20,10 @@ function rootAnchor(field = index_js_1.rootField) {
19
20
  }
20
21
  exports.rootAnchor = rootAnchor;
21
22
  /**
23
+ * Moves the given cursor to the given detached fields in the given forest.
24
+ * @param forest - forest to move cursor in.
25
+ * @param cursorToMove - cursor to move, must be allocated by the given forest
22
26
  * @param field - defaults to {@link rootField}.
23
- * @returns anchor to `field`.
24
27
  */
25
28
  function moveToDetachedField(forest, cursorToMove, field = index_js_1.rootField) {
26
29
  const result = forest.tryMoveCursorToField(rootAnchor(field), cursorToMove);
@@ -1 +1 @@
1
- {"version":3,"file":"forest.js","sourceRoot":"","sources":["../../../src/core/forest/forest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D,+CAU0B;AAiI1B;;;GAGG;AACH,SAAgB,UAAU,CAAC,QAAuB,oBAAS;IAC1D,OAAO;QACN,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,IAAA,6BAAkB,EAAC,KAAK,CAAC;KACnC,CAAC;AACH,CAAC;AALD,gCAKC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAClC,MAA2B,EAC3B,YAAqC,EACrC,QAAuB,oBAAS;IAEhC,MAAM,MAAM,GAAG,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC;IAC5E,IAAA,iBAAM,EACL,MAAM,oCAA4B,EAClC,KAAK,CAAC,qDAAqD,CAC3D,CAAC;AACH,CAAC;AAVD,kDAUC;AAkED;GACG;AACH,IAAY,4BAaX;AAbD,WAAY,4BAA4B;IACvC;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,iFAAK,CAAA;AACN,CAAC,EAbW,4BAA4B,4CAA5B,4BAA4B,QAavC;AAED;GACG;AACH,IAAkB,oBAejB;AAfD,WAAkB,oBAAoB;IACrC;;OAEG;IACH,wEAAa,CAAA;IAEb;;OAEG;IACH,qEAAW,CAAA;IAEX;;OAEG;IACH,2DAAM,CAAA;AACP,CAAC,EAfiB,oBAAoB,oCAApB,oBAAoB,QAerC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { Listenable } from \"@fluidframework/core-interfaces/internal\";\nimport type { FieldKey, TreeStoredSchemaSubscription } from \"../schema-stored/index.js\";\nimport {\n\ttype Anchor,\n\ttype AnchorSet,\n\ttype AnnouncedVisitor,\n\ttype DetachedField,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\ttype UpPath,\n\tdetachedFieldAsKey,\n\trootField,\n} from \"../tree/index.js\";\n\nimport type { IEditableForest } from \"./editableForest.js\";\n\n/**\n * APIs for forest designed so the implementation can be copy on write,\n * or mutate in place, and we can ensure no references are dangling into the forest to allow this.\n *\n * This results in rather manual memory management,\n * but makes it practical to provide highly optimized implementations,\n * for example WASM powered binary formats that can track reference counts and only copy when needed.\n */\n\n/**\n * Events for {@link IForestSubscription}.\n *\n * TODO: consider having before and after events per subtree instead while applying anchor (and this just shows what happens at the root).\n */\nexport interface ForestEvents {\n\t/**\n\t * A new root field was just created in this forest.\n\t */\n\tafterRootFieldCreated(key: FieldKey): void;\n\n\t/**\n\t * The forest is about to be changed.\n\t * Emitted before each change in a batch of changes.\n\t * @remarks\n\t * This is the last chance for users of the forest to remove cursors from the forest before the edit.\n\t * Removing these cursors is important since they are not allowed to live across edits and\n\t * not clearing them can lead to corruption of in memory structures.\n\t */\n\tbeforeChange(): void;\n}\n\n/**\n * Invalidates whenever the tree content changes.\n * For now (might change later) downloading new parts of the forest counts as a change.\n * Not invalidated when schema changes.\n *\n * When invalidating, all outstanding cursors must be freed or cleared.\n */\nexport interface IForestSubscription {\n\t/**\n\t * Events for this forest.\n\t */\n\treadonly events: Listenable<ForestEvents>;\n\n\t/**\n\t * Set of anchors this forest is tracking.\n\t *\n\t * To keep these anchors usable, this AnchorSet must be updated / rebased for any changes made to the forest.\n\t * It is the responsibility of the caller of the forest-editing methods to do this, not the forest itself.\n\t * The caller performs these updates because it has more semantic knowledge about the edits, which can be needed to\n\t * update the anchors in a semantically optimal way.\n\t */\n\treadonly anchors: AnchorSet;\n\n\t/**\n\t * Create an independent copy of this forest, that uses the provided schema and anchors.\n\t *\n\t * The new copy will not invalidate observers (dependents) of the old one.\n\t */\n\tclone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): IEditableForest;\n\n\t/**\n\t * Allocates a cursor in the \"cleared\" state.\n\t * @param source - optional string identifying the source of the cursor for debugging purposes when cursors are not properly cleaned up.\n\t */\n\tallocateCursor(source?: string): ITreeSubscriptionCursor;\n\n\t/**\n\t * Frees an Anchor, stopping tracking its position across edits.\n\t */\n\tforgetAnchor(anchor: Anchor): void;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * Set `cursorToMove` to location described by path.\n\t * This is NOT a relative move: current position is discarded.\n\t * Path must point to existing node.\n\t */\n\tmoveCursorToPath(destination: UpPath, cursorToMove: ITreeSubscriptionCursor): void;\n\n\t/**\n\t * The cursor is moved to a special dummy node above the detached fields.\n\t * This dummy node can be used to read the detached fields,\n\t * but other operations (such as inspecting the dummy node's type or path) should not be relied upon.\n\t * While this method does not return an {@link ITreeSubscriptionCursor}, similar restrictions apply to its use:\n\t * the returned cursor must not used after any edits are made to the forest.\n\t */\n\tgetCursorAboveDetachedFields(): ITreeCursorSynchronous;\n\n\t/**\n\t * True if there are no nodes in the forest at all.\n\t *\n\t * @remarks\n\t * This means no nodes under any detached field, not just the special document root one.\n\t */\n\treadonly isEmpty: boolean;\n\n\t/**\n\t * Obtains and registers an {@link AnnouncedVisitor} that responds to changes on the forest.\n\t */\n\tregisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void;\n\n\t/**\n\t * Deregister the given visitor so that it stops responding to updates\n\t */\n\tderegisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void;\n}\n\n/**\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function rootAnchor(field: DetachedField = rootField): FieldAnchor {\n\treturn {\n\t\tparent: undefined,\n\t\tfieldKey: detachedFieldAsKey(field),\n\t};\n}\n\n/**\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function moveToDetachedField(\n\tforest: IForestSubscription,\n\tcursorToMove: ITreeSubscriptionCursor,\n\tfield: DetachedField = rootField,\n): void {\n\tconst result = forest.tryMoveCursorToField(rootAnchor(field), cursorToMove);\n\tassert(\n\t\tresult === TreeNavigationResult.Ok,\n\t\t0x42d /* Navigation to detached fields should never fail */,\n\t);\n}\n\n/**\n * Anchor to a field.\n * This is structurally based on the parent, so it will move only as the parent moves.\n */\nexport interface FieldAnchor {\n\t/**\n\t * Node above this field.\n\t * If `undefined`, field is a detached field.\n\t */\n\tparent: Anchor | undefined;\n\tfieldKey: FieldKey;\n}\n\n/**\n * ITreeCursor supporting IForestSubscription and its changes over time.\n */\nexport interface ITreeSubscriptionCursor extends ITreeCursor {\n\t/**\n\t * @param source - optional string identifying the source of the cursor for debugging purposes when cursors are not properly cleaned up.\n\t * @returns an independent copy of this cursor at the same location in the tree.\n\t */\n\tfork(source?: string): ITreeSubscriptionCursor;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` is forbidden (undefined behavior).\n\t */\n\tfree(): void;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` or passing to `tryGet`\n\t * or calling `free` is forbidden (undefined behavior).\n\t */\n\tclear(): void;\n\n\t/**\n\t * Construct an `Anchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Nodes`.\n\t */\n\tbuildAnchor(): Anchor;\n\n\t/**\n\t * Construct a `FieldAnchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Fields`.\n\t */\n\tbuildFieldAnchor(): FieldAnchor;\n\n\t/**\n\t * Current state.\n\t */\n\treadonly state: ITreeSubscriptionCursorState;\n\n\t/**\n\t * @returns location within parent field or range.\n\t */\n\t// TODO: maybe support this.\n\t// getParentInfo(id: NodeId): TreeLocation;\n}\n\n/**\n */\nexport enum ITreeSubscriptionCursorState {\n\t/**\n\t * On the current revision of the forest.\n\t */\n\tCurrent,\n\t/**\n\t * Empty, but can be reused.\n\t */\n\tCleared,\n\t/**\n\t * Freed and must not be used.\n\t */\n\tFreed,\n}\n\n/**\n */\nexport const enum TreeNavigationResult {\n\t/**\n\t * Attempt to navigate cursor to a key or index that is outside the client's view.\n\t */\n\tNotFound = -1,\n\n\t/**\n\t * Attempt to navigate cursor to a portion of the tree that has not yet been loaded.\n\t */\n\tPending = 0,\n\n\t/**\n\t * ITreeReader successfully navigated to the desired node.\n\t */\n\tOk = 1,\n}\n\n/**\n * TreeNavigationResult, but never \"Pending\".\n * Can be used when data is never pending.\n */\nexport type SynchronousNavigationResult =\n\t| TreeNavigationResult.Ok\n\t| TreeNavigationResult.NotFound;\n"]}
1
+ {"version":3,"file":"forest.js","sourceRoot":"","sources":["../../../src/core/forest/forest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAI7D,+CAW0B;AA4I1B;;;;GAIG;AACH,SAAgB,UAAU,CAAC,QAAuB,oBAAS;IAC1D,OAAO;QACN,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,IAAA,6BAAkB,EAAC,KAAK,CAAC;KACnC,CAAC;AACH,CAAC;AALD,gCAKC;AAED;;;;;GAKG;AACH,SAAgB,mBAAmB,CAClC,MAA2B,EAC3B,YAAqC,EACrC,QAAuB,oBAAS;IAEhC,MAAM,MAAM,GAAG,MAAM,CAAC,oBAAoB,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,CAAC;IAC5E,IAAA,iBAAM,EACL,MAAM,oCAA4B,EAClC,KAAK,CAAC,qDAAqD,CAC3D,CAAC;AACH,CAAC;AAVD,kDAUC;AAkED;GACG;AACH,IAAY,4BAaX;AAbD,WAAY,4BAA4B;IACvC;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,qFAAO,CAAA;IACP;;OAEG;IACH,iFAAK,CAAA;AACN,CAAC,EAbW,4BAA4B,4CAA5B,4BAA4B,QAavC;AAED;GACG;AACH,IAAkB,oBAejB;AAfD,WAAkB,oBAAoB;IACrC;;OAEG;IACH,wEAAa,CAAA;IAEb;;OAEG;IACH,qEAAW,CAAA;IAEX;;OAEG;IACH,2DAAM,CAAA;AACP,CAAC,EAfiB,oBAAoB,oCAApB,oBAAoB,QAerC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport type { Listenable } from \"@fluidframework/core-interfaces/internal\";\nimport type { FieldKey, TreeStoredSchemaSubscription } from \"../schema-stored/index.js\";\nimport {\n\ttype Anchor,\n\ttype AnchorSet,\n\ttype AnnouncedVisitor,\n\ttype DetachedField,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\ttype TreeChunk,\n\ttype UpPath,\n\tdetachedFieldAsKey,\n\trootField,\n} from \"../tree/index.js\";\n\nimport type { IEditableForest } from \"./editableForest.js\";\n\n/**\n * APIs for forest designed so the implementation can be copy on write,\n * or mutate in place, and we can ensure no references are dangling into the forest to allow this.\n *\n * This results in rather manual memory management,\n * but makes it practical to provide highly optimized implementations,\n * for example WASM powered binary formats that can track reference counts and only copy when needed.\n */\n\n/**\n * Events for {@link IForestSubscription}.\n *\n * TODO: consider having before and after events per subtree instead while applying anchor (and this just shows what happens at the root).\n */\nexport interface ForestEvents {\n\t/**\n\t * A new root field was just created in this forest.\n\t */\n\tafterRootFieldCreated(key: FieldKey): void;\n\n\t/**\n\t * The forest is about to be changed.\n\t * Emitted before each change in a batch of changes.\n\t * @remarks\n\t * This is the last chance for users of the forest to remove cursors from the forest before the edit.\n\t * Removing these cursors is important since they are not allowed to live across edits and\n\t * not clearing them can lead to corruption of in memory structures.\n\t */\n\tbeforeChange(): void;\n}\n\n/**\n * Invalidates whenever the tree content changes.\n * For now (might change later) downloading new parts of the forest counts as a change.\n * Not invalidated when schema changes.\n *\n * When invalidating, all outstanding cursors must be freed or cleared.\n */\nexport interface IForestSubscription {\n\t/**\n\t * Events for this forest.\n\t */\n\treadonly events: Listenable<ForestEvents>;\n\n\t/**\n\t * Set of anchors this forest is tracking.\n\t *\n\t * To keep these anchors usable, this AnchorSet must be updated / rebased for any changes made to the forest.\n\t * It is the responsibility of the caller of the forest-editing methods to do this, not the forest itself.\n\t * The caller performs these updates because it has more semantic knowledge about the edits, which can be needed to\n\t * update the anchors in a semantically optimal way.\n\t */\n\treadonly anchors: AnchorSet;\n\n\t/**\n\t * Create an independent copy of this forest, that uses the provided schema and anchors.\n\t *\n\t * The new copy will not invalidate observers (dependents) of the old one.\n\t */\n\tclone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): IEditableForest;\n\n\t/**\n\t * Generate a TreeChunk for the content in the given field cursor.\n\t * This can be used to chunk data that is then inserted into the forest.\n\t *\n\t * @remarks\n\t * Like {@link chunkField}, but forces the results into a single TreeChunk.\n\t * While any TreeChunk is compatible with any forest, this method creates one optimized for this specific forest.\n\t * The provided data must be compatible with the forest's current schema.\n\t */\n\tchunkField(cursor: ITreeCursorSynchronous): TreeChunk;\n\n\t/**\n\t * Allocates a cursor in the \"cleared\" state.\n\t * @param source - optional string identifying the source of the cursor for debugging purposes when cursors are not properly cleaned up.\n\t */\n\tallocateCursor(source?: string): ITreeSubscriptionCursor;\n\n\t/**\n\t * Frees an Anchor, stopping tracking its position across edits.\n\t */\n\tforgetAnchor(anchor: Anchor): void;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * It is an error not to free `cursorToMove` before the next edit.\n\t * Must provide a `cursorToMove` from this subscription (acquired via `allocateCursor`).\n\t */\n\ttryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult;\n\n\t/**\n\t * Set `cursorToMove` to the {@link CursorLocationType.node} described by path.\n\t * This is NOT a relative move: current position is discarded.\n\t * Path must point to existing node.\n\t */\n\tmoveCursorToPath(destination: UpPath, cursorToMove: ITreeSubscriptionCursor): void;\n\n\t/**\n\t * The cursor is moved to a special dummy node above the detached fields.\n\t * This dummy node can be used to read the detached fields,\n\t * but other operations (such as inspecting the dummy node's type or path) should not be relied upon.\n\t * While this method does not return an {@link ITreeSubscriptionCursor}, similar restrictions apply to its use:\n\t * the returned cursor must not used after any edits are made to the forest.\n\t */\n\tgetCursorAboveDetachedFields(): ITreeCursorSynchronous;\n\n\t/**\n\t * True if there are no nodes in the forest at all.\n\t *\n\t * @remarks\n\t * This means no nodes under any detached field, not just the special document root one.\n\t */\n\treadonly isEmpty: boolean;\n\n\t/**\n\t * Obtains and registers an {@link AnnouncedVisitor} that responds to changes on the forest.\n\t */\n\tregisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void;\n\n\t/**\n\t * Deregister the given visitor so that it stops responding to updates\n\t */\n\tderegisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void;\n}\n\n/**\n * Returns an anchor to the given field.\n * @param field - defaults to {@link rootField}.\n * @returns anchor to `field`.\n */\nexport function rootAnchor(field: DetachedField = rootField): FieldAnchor {\n\treturn {\n\t\tparent: undefined,\n\t\tfieldKey: detachedFieldAsKey(field),\n\t};\n}\n\n/**\n * Moves the given cursor to the given detached fields in the given forest.\n * @param forest - forest to move cursor in.\n * @param cursorToMove - cursor to move, must be allocated by the given forest\n * @param field - defaults to {@link rootField}.\n */\nexport function moveToDetachedField(\n\tforest: IForestSubscription,\n\tcursorToMove: ITreeSubscriptionCursor,\n\tfield: DetachedField = rootField,\n): void {\n\tconst result = forest.tryMoveCursorToField(rootAnchor(field), cursorToMove);\n\tassert(\n\t\tresult === TreeNavigationResult.Ok,\n\t\t0x42d /* Navigation to detached fields should never fail */,\n\t);\n}\n\n/**\n * Anchor to a field.\n * This is structurally based on the parent, so it will move only as the parent moves.\n */\nexport interface FieldAnchor {\n\t/**\n\t * Node above this field.\n\t * If `undefined`, field is a detached field.\n\t */\n\tparent: Anchor | undefined;\n\tfieldKey: FieldKey;\n}\n\n/**\n * ITreeCursor supporting IForestSubscription and its changes over time.\n */\nexport interface ITreeSubscriptionCursor extends ITreeCursor {\n\t/**\n\t * @param source - optional string identifying the source of the cursor for debugging purposes when cursors are not properly cleaned up.\n\t * @returns an independent copy of this cursor at the same location in the tree.\n\t */\n\tfork(source?: string): ITreeSubscriptionCursor;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` is forbidden (undefined behavior).\n\t */\n\tfree(): void;\n\n\t/**\n\t * Release any resources this cursor is holding onto.\n\t * After doing this, further use of this object other than reading `state` or passing to `tryGet`\n\t * or calling `free` is forbidden (undefined behavior).\n\t */\n\tclear(): void;\n\n\t/**\n\t * Construct an `Anchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Nodes`.\n\t */\n\tbuildAnchor(): Anchor;\n\n\t/**\n\t * Construct a `FieldAnchor` which the IForestSubscription will keep rebased to `current`.\n\t * Note that maintaining an Anchor has cost: free them to stop incurring that cost.\n\t *\n\t * Only valid when `mode` is `Fields`.\n\t */\n\tbuildFieldAnchor(): FieldAnchor;\n\n\t/**\n\t * Current state.\n\t */\n\treadonly state: ITreeSubscriptionCursorState;\n\n\t/**\n\t * @returns location within parent field or range.\n\t */\n\t// TODO: maybe support this.\n\t// getParentInfo(id: NodeId): TreeLocation;\n}\n\n/**\n */\nexport enum ITreeSubscriptionCursorState {\n\t/**\n\t * On the current revision of the forest.\n\t */\n\tCurrent,\n\t/**\n\t * Empty, but can be reused.\n\t */\n\tCleared,\n\t/**\n\t * Freed and must not be used.\n\t */\n\tFreed,\n}\n\n/**\n */\nexport const enum TreeNavigationResult {\n\t/**\n\t * Attempt to navigate cursor to a key or index that is outside the client's view.\n\t */\n\tNotFound = -1,\n\n\t/**\n\t * Attempt to navigate cursor to a portion of the tree that has not yet been loaded.\n\t */\n\tPending = 0,\n\n\t/**\n\t * ITreeReader successfully navigated to the desired node.\n\t */\n\tOk = 1,\n}\n\n/**\n * TreeNavigationResult, but never \"Pending\".\n * Can be used when data is never pending.\n */\nexport type SynchronousNavigationResult =\n\t| TreeNavigationResult.Ok\n\t| TreeNavigationResult.NotFound;\n"]}
@@ -2,6 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { type IEditableForest, type FieldLocation, type TreeLocation, isFieldLocation, type ForestLocation, initializeForest, } from "./editableForest.js";
5
+ export { type IEditableForest, type FieldLocation, type TreeLocation, isFieldLocation, type ForestLocation, } from "./editableForest.js";
6
6
  export { type IForestSubscription, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, TreeNavigationResult, type FieldAnchor, moveToDetachedField, type ForestEvents, } from "./forest.js";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/forest/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,eAAe,EACf,KAAK,cAAc,EACnB,gBAAgB,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,KAAK,WAAW,EAChB,mBAAmB,EACnB,KAAK,YAAY,GACjB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/forest/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,eAAe,EACf,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,KAAK,WAAW,EAChB,mBAAmB,EACnB,KAAK,YAAY,GACjB,MAAM,aAAa,CAAC"}
@@ -4,10 +4,9 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.moveToDetachedField = exports.TreeNavigationResult = exports.ITreeSubscriptionCursorState = exports.initializeForest = exports.isFieldLocation = void 0;
7
+ exports.moveToDetachedField = exports.TreeNavigationResult = exports.ITreeSubscriptionCursorState = exports.isFieldLocation = void 0;
8
8
  var editableForest_js_1 = require("./editableForest.js");
9
9
  Object.defineProperty(exports, "isFieldLocation", { enumerable: true, get: function () { return editableForest_js_1.isFieldLocation; } });
10
- Object.defineProperty(exports, "initializeForest", { enumerable: true, get: function () { return editableForest_js_1.initializeForest; } });
11
10
  var forest_js_1 = require("./forest.js");
12
11
  Object.defineProperty(exports, "ITreeSubscriptionCursorState", { enumerable: true, get: function () { return forest_js_1.ITreeSubscriptionCursorState; } });
13
12
  Object.defineProperty(exports, "TreeNavigationResult", { enumerable: true, get: function () { return forest_js_1.TreeNavigationResult; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/forest/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yDAO6B;AAH5B,oHAAA,eAAe,OAAA;AAEf,qHAAA,gBAAgB,OAAA;AAEjB,yCAQqB;AALpB,yHAAA,4BAA4B,OAAA;AAC5B,iHAAA,oBAAoB,OAAA;AAEpB,gHAAA,mBAAmB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype IEditableForest,\n\ttype FieldLocation,\n\ttype TreeLocation,\n\tisFieldLocation,\n\ttype ForestLocation,\n\tinitializeForest,\n} from \"./editableForest.js\";\nexport {\n\ttype IForestSubscription,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\tTreeNavigationResult,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/forest/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yDAM6B;AAF5B,oHAAA,eAAe,OAAA;AAGhB,yCAQqB;AALpB,yHAAA,4BAA4B,OAAA;AAC5B,iHAAA,oBAAoB,OAAA;AAEpB,gHAAA,mBAAmB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype IEditableForest,\n\ttype FieldLocation,\n\ttype TreeLocation,\n\tisFieldLocation,\n\ttype ForestLocation,\n} from \"./editableForest.js\";\nexport {\n\ttype IForestSubscription,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\tTreeNavigationResult,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest.js\";\n"]}
@@ -2,8 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { EmptyKey, type TreeType, type Value, type TreeValue, AnchorSet, type DetachedField, type UpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, type FieldUpPath, type Anchor, type RootField, type ChildCollection, type ChildLocation, type FieldMapObject, type NodeData, type GenericTreeNode, type JsonableTree, EncodedJsonableTree, rootFieldKey, rootField, type ITreeCursor, CursorLocationType, type ITreeCursorSynchronous, castCursorToSynchronous, type GenericFieldsNode, type AnchorLocator, genericTreeKeys, getGenericTreeField, genericTreeDeleteIfEmpty, getDepth, mapCursorField, mapCursorFields, iterateCursorField, type MapTree, detachedFieldAsKey, keyAsDetachedField, visitDelta, createAnnouncedVisitor, combineVisitors, announceDelta, applyDelta, makeDetachedFieldIndex, setGenericTreeField, type DeltaVisitor, type AnnouncedVisitor, SparseNode, getDescendant, compareUpPaths, clonePath, topDownPath, compareFieldUpPaths, forEachNode, forEachNodeInSubtree, forEachField, type PathRootPrefix, deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, type AnchorSlot, type AnchorNode, anchorSlot, type UpPathDefault, inCursorField, inCursorNode, type AnchorEvents, type AnchorSetRootEvents, type ProtoNodes, CursorMarker, isCursor, DetachedFieldIndex, type ForestRootId, getDetachedFieldContainingPath, aboveRootPlaceholder, type DeltaRoot, type DeltaProtoNode, type DeltaMark, type DeltaDetachedNodeId, type DeltaFieldMap, type DeltaDetachedNodeChanges, type DeltaDetachedNodeBuild, type DeltaDetachedNodeDestruction, type DeltaDetachedNodeRename, type DeltaFieldChanges, type ExclusiveMapTree, deepCopyMapTree, type TreeChunk, dummyRoot, cursorChunk, tryGetChunk, type ChunkedCursor, } from "./tree/index.js";
6
- export { TreeNavigationResult, type IEditableForest, type IForestSubscription, type TreeLocation, type FieldLocation, type ForestLocation, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, initializeForest, type FieldAnchor, moveToDetachedField, type ForestEvents, } from "./forest/index.js";
5
+ export { EmptyKey, type TreeType, type Value, type TreeValue, AnchorSet, type DetachedField, type UpPath, type NormalizedUpPath, type INormalizedUpPath, type NormalizedFieldUpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, type FieldUpPath, type Anchor, type RootField, type ChildCollection, type ChildLocation, type FieldMapObject, type NodeData, type GenericTreeNode, type JsonableTree, EncodedJsonableTree, rootFieldKey, rootField, type ITreeCursor, CursorLocationType, type ITreeCursorSynchronous, castCursorToSynchronous, type GenericFieldsNode, type AnchorLocator, genericTreeKeys, getGenericTreeField, genericTreeDeleteIfEmpty, getDepth, mapCursorField, mapCursorFields, iterateCursorField, type MapTree, detachedFieldAsKey, keyAsDetachedField, visitDelta, createAnnouncedVisitor, combineVisitors, announceDelta, applyDelta, makeDetachedFieldIndex, setGenericTreeField, type DeltaVisitor, type AnnouncedVisitor, SparseNode, getDescendant, compareUpPaths, clonePath, topDownPath, compareFieldUpPaths, forEachNode, forEachNodeInSubtree, forEachField, type PathRootPrefix, deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, type AnchorSlot, type AnchorNode, anchorSlot, type UpPathDefault, isDetachedUpPath, inCursorField, inCursorNode, type AnchorEvents, type AnchorSetRootEvents, type ProtoNodes, CursorMarker, isCursor, DetachedFieldIndex, type ForestRootId, getDetachedFieldContainingPath, aboveRootPlaceholder, type DeltaRoot, type DeltaMark, type DeltaDetachedNodeId, type DeltaFieldMap, type DeltaDetachedNodeChanges, type DeltaDetachedNodeBuild, type DeltaDetachedNodeDestruction, type DeltaDetachedNodeRename, type DeltaFieldChanges, type ExclusiveMapTree, deepCopyMapTree, type TreeChunk, dummyRoot, cursorChunk, tryGetChunk, type ChunkedCursor, } from "./tree/index.js";
6
+ export { TreeNavigationResult, type IEditableForest, type IForestSubscription, type TreeLocation, type FieldLocation, type ForestLocation, type ITreeSubscriptionCursor, ITreeSubscriptionCursorState, type FieldAnchor, moveToDetachedField, type ForestEvents, } from "./forest/index.js";
7
7
  export { type FieldKey, type TreeNodeSchemaIdentifier, type TreeFieldStoredSchema, ValueSchema, TreeNodeStoredSchema, type TreeStoredSchemaSubscription, type MutableTreeStoredSchema, type FieldKindIdentifier, type FieldKindData, type TreeTypeSet, type TreeStoredSchema, TreeStoredSchemaRepository, schemaDataIsEmpty, type SchemaEvents, forbiddenFieldKindIdentifier, identifierFieldKindIdentifier, storedEmptyFieldSchema, type StoredSchemaCollection, schemaFormat, LeafNodeStoredSchema, ObjectNodeStoredSchema, MapNodeStoredSchema, toTreeNodeSchemaDataFormat, decodeFieldSchema, encodeFieldSchema, storedSchemaDecodeDispatcher, type ErasedTreeNodeSchemaDataFormat, type SchemaAndPolicy, Multiplicity, type SchemaPolicy, } from "./schema-stored/index.js";
8
8
  export { type ChangeFamily, type ChangeFamilyCodec, type ChangeEncodingContext, type ChangeFamilyEditor, EditBuilder, } from "./change-family/index.js";
9
9
  export { areEqualChangeAtomIds, areEqualChangeAtomIdOpts, makeChangeAtomId, asChangeAtomId, type ChangeRebaser, findAncestor, findCommonAncestor, type GraphCommit, CommitKind, type CommitMetadata, type RevisionTag, RevisionTagSchema, RevisionTagCodec, type ChangesetLocalId, type ChangeAtomId, type ChangeAtomIdMap, type TaggedChange, makeAnonChange, tagChange, mapTaggedChange, tagRollbackInverse, SessionIdSchema, mintCommit, rebaseBranch, type BranchRebaseResult, rebaseChange, rebaseChangeOverChanges, type RevisionMetadataSource, revisionMetadataSourceFromInfo, type RevisionInfo, type EncodedRevisionTag, type EncodedChangeAtomId, taggedAtomId, taggedOptAtomId, offsetChangeAtomId, subtractChangeAtomIds, replaceAtomRevisions, replaceChange, type RebaseStats, type RebaseStatsWithDuration, isAncestor, type ChangeAtomIdRangeMap, newChangeAtomIdRangeMap, compareRevisions, } from "./rebase/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,KAAK,OAAO,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EAC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B,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,QAAQ,EACR,KAAK,QAAQ,EACb,KAAK,KAAK,EACV,KAAK,SAAS,EACd,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,KAAK,EACV,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,MAAM,EACX,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,mBAAmB,EACnB,YAAY,EACZ,SAAS,EACT,KAAK,WAAW,EAChB,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,QAAQ,EACR,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,KAAK,OAAO,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,KAAK,cAAc,EACnB,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,KAAK,UAAU,EACf,KAAK,UAAU,EACf,UAAU,EACV,KAAK,aAAa,EAClB,gBAAgB,EAChB,aAAa,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;AAElC,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,WAAW,GACX,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACN,qBAAqB,EACrB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,EACd,KAAK,aAAa,EAClB,YAAY,EACZ,kBAAkB,EAClB,KAAK,WAAW,EAChB,UAAU,EACV,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,cAAc,EACd,SAAS,EACT,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,KAAK,kBAAkB,EACvB,YAAY,EACZ,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,oBAAoB,EACpB,aAAa,EACb,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,UAAU,EACV,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,gBAAgB,GAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,QAAQ,EACb,iBAAiB,EACjB,KAAK,WAAW,EAChB,iBAAiB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,UAAU,EACf,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC"}
@@ -4,8 +4,8 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.ITreeSubscriptionCursorState = exports.TreeNavigationResult = exports.tryGetChunk = exports.cursorChunk = exports.dummyRoot = exports.deepCopyMapTree = exports.aboveRootPlaceholder = exports.getDetachedFieldContainingPath = exports.DetachedFieldIndex = exports.isCursor = exports.CursorMarker = exports.inCursorNode = exports.inCursorField = exports.anchorSlot = exports.emptyDelta = exports.offsetDetachId = exports.makeDetachedNodeId = exports.deltaForRootInitialization = exports.forEachField = exports.forEachNodeInSubtree = exports.forEachNode = exports.compareFieldUpPaths = exports.topDownPath = exports.clonePath = exports.compareUpPaths = exports.getDescendant = exports.SparseNode = exports.setGenericTreeField = exports.makeDetachedFieldIndex = exports.applyDelta = exports.announceDelta = exports.combineVisitors = exports.createAnnouncedVisitor = exports.visitDelta = exports.keyAsDetachedField = exports.detachedFieldAsKey = exports.iterateCursorField = exports.mapCursorFields = exports.mapCursorField = exports.getDepth = exports.genericTreeDeleteIfEmpty = exports.getGenericTreeField = exports.genericTreeKeys = exports.castCursorToSynchronous = exports.CursorLocationType = exports.rootField = exports.rootFieldKey = exports.EncodedJsonableTree = exports.AnchorSet = exports.EmptyKey = void 0;
8
- exports.RevertibleStatus = exports.AllowedUpdateType = exports.AdaptedViewSchema = exports.compareRevisions = exports.newChangeAtomIdRangeMap = exports.isAncestor = exports.replaceChange = exports.replaceAtomRevisions = exports.subtractChangeAtomIds = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.mintCommit = exports.SessionIdSchema = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.RevisionTagCodec = exports.RevisionTagSchema = exports.CommitKind = exports.findCommonAncestor = exports.findAncestor = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = exports.EditBuilder = exports.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchema = exports.decodeFieldSchema = exports.toTreeNodeSchemaDataFormat = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormat = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.moveToDetachedField = exports.initializeForest = void 0;
7
+ exports.TreeNavigationResult = exports.tryGetChunk = exports.cursorChunk = exports.dummyRoot = exports.deepCopyMapTree = exports.aboveRootPlaceholder = exports.getDetachedFieldContainingPath = exports.DetachedFieldIndex = exports.isCursor = exports.CursorMarker = exports.inCursorNode = exports.inCursorField = exports.isDetachedUpPath = exports.anchorSlot = exports.emptyDelta = exports.offsetDetachId = exports.makeDetachedNodeId = exports.deltaForRootInitialization = exports.forEachField = exports.forEachNodeInSubtree = exports.forEachNode = exports.compareFieldUpPaths = exports.topDownPath = exports.clonePath = exports.compareUpPaths = exports.getDescendant = exports.SparseNode = exports.setGenericTreeField = exports.makeDetachedFieldIndex = exports.applyDelta = exports.announceDelta = exports.combineVisitors = exports.createAnnouncedVisitor = exports.visitDelta = exports.keyAsDetachedField = exports.detachedFieldAsKey = exports.iterateCursorField = exports.mapCursorFields = exports.mapCursorField = exports.getDepth = exports.genericTreeDeleteIfEmpty = exports.getGenericTreeField = exports.genericTreeKeys = exports.castCursorToSynchronous = exports.CursorLocationType = exports.rootField = exports.rootFieldKey = exports.EncodedJsonableTree = exports.AnchorSet = exports.EmptyKey = void 0;
8
+ exports.RevertibleStatus = exports.AllowedUpdateType = exports.AdaptedViewSchema = exports.compareRevisions = exports.newChangeAtomIdRangeMap = exports.isAncestor = exports.replaceChange = exports.replaceAtomRevisions = exports.subtractChangeAtomIds = exports.offsetChangeAtomId = exports.taggedOptAtomId = exports.taggedAtomId = exports.revisionMetadataSourceFromInfo = exports.rebaseChangeOverChanges = exports.rebaseChange = exports.rebaseBranch = exports.mintCommit = exports.SessionIdSchema = exports.tagRollbackInverse = exports.mapTaggedChange = exports.tagChange = exports.makeAnonChange = exports.RevisionTagCodec = exports.RevisionTagSchema = exports.CommitKind = exports.findCommonAncestor = exports.findAncestor = exports.asChangeAtomId = exports.makeChangeAtomId = exports.areEqualChangeAtomIdOpts = exports.areEqualChangeAtomIds = exports.EditBuilder = exports.Multiplicity = exports.storedSchemaDecodeDispatcher = exports.encodeFieldSchema = exports.decodeFieldSchema = exports.toTreeNodeSchemaDataFormat = exports.MapNodeStoredSchema = exports.ObjectNodeStoredSchema = exports.LeafNodeStoredSchema = exports.schemaFormat = exports.storedEmptyFieldSchema = exports.identifierFieldKindIdentifier = exports.forbiddenFieldKindIdentifier = exports.schemaDataIsEmpty = exports.TreeStoredSchemaRepository = exports.TreeNodeStoredSchema = exports.ValueSchema = exports.moveToDetachedField = exports.ITreeSubscriptionCursorState = void 0;
9
9
  var index_js_1 = require("./tree/index.js");
10
10
  Object.defineProperty(exports, "EmptyKey", { enumerable: true, get: function () { return index_js_1.EmptyKey; } });
11
11
  Object.defineProperty(exports, "AnchorSet", { enumerable: true, get: function () { return index_js_1.AnchorSet; } });
@@ -44,6 +44,7 @@ Object.defineProperty(exports, "makeDetachedNodeId", { enumerable: true, get: fu
44
44
  Object.defineProperty(exports, "offsetDetachId", { enumerable: true, get: function () { return index_js_1.offsetDetachId; } });
45
45
  Object.defineProperty(exports, "emptyDelta", { enumerable: true, get: function () { return index_js_1.emptyDelta; } });
46
46
  Object.defineProperty(exports, "anchorSlot", { enumerable: true, get: function () { return index_js_1.anchorSlot; } });
47
+ Object.defineProperty(exports, "isDetachedUpPath", { enumerable: true, get: function () { return index_js_1.isDetachedUpPath; } });
47
48
  Object.defineProperty(exports, "inCursorField", { enumerable: true, get: function () { return index_js_1.inCursorField; } });
48
49
  Object.defineProperty(exports, "inCursorNode", { enumerable: true, get: function () { return index_js_1.inCursorNode; } });
49
50
  Object.defineProperty(exports, "CursorMarker", { enumerable: true, get: function () { return index_js_1.CursorMarker; } });
@@ -58,7 +59,6 @@ Object.defineProperty(exports, "tryGetChunk", { enumerable: true, get: function
58
59
  var index_js_2 = require("./forest/index.js");
59
60
  Object.defineProperty(exports, "TreeNavigationResult", { enumerable: true, get: function () { return index_js_2.TreeNavigationResult; } });
60
61
  Object.defineProperty(exports, "ITreeSubscriptionCursorState", { enumerable: true, get: function () { return index_js_2.ITreeSubscriptionCursorState; } });
61
- Object.defineProperty(exports, "initializeForest", { enumerable: true, get: function () { return index_js_2.initializeForest; } });
62
62
  Object.defineProperty(exports, "moveToDetachedField", { enumerable: true, get: function () { return index_js_2.moveToDetachedField; } });
63
63
  var index_js_3 = require("./schema-stored/index.js");
64
64
  Object.defineProperty(exports, "ValueSchema", { enumerable: true, get: function () { return index_js_3.ValueSchema; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,4CAgGyB;AA/FxB,oGAAA,QAAQ,OAAA;AAIR,qGAAA,SAAS,OAAA;AAiBT,+GAAA,mBAAmB,OAAA;AACnB,wGAAA,YAAY,OAAA;AACZ,qGAAA,SAAS,OAAA;AAET,8GAAA,kBAAkB,OAAA;AAElB,mHAAA,uBAAuB,OAAA;AAGvB,2GAAA,eAAe,OAAA;AACf,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,oGAAA,QAAQ,OAAA;AACR,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAElB,8GAAA,kBAAkB,OAAA;AAClB,8GAAA,kBAAkB,OAAA;AAClB,sGAAA,UAAU,OAAA;AACV,kHAAA,sBAAsB,OAAA;AACtB,2GAAA,eAAe,OAAA;AACf,yGAAA,aAAa,OAAA;AACb,sGAAA,UAAU,OAAA;AACV,kHAAA,sBAAsB,OAAA;AACtB,+GAAA,mBAAmB,OAAA;AAGnB,sGAAA,UAAU,OAAA;AACV,yGAAA,aAAa,OAAA;AACb,0GAAA,cAAc,OAAA;AACd,qGAAA,SAA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AA;AACrB,oHAAA,wBAAwB,OAAA;AACxB,4GAAA,gBAAgB,OAAA;AAChB,0GAAA,cAAc,OAAA;AAEd,wGAAA,YAAY,OAAA;AACZ,8GAAA,kBAAkB,OAAA;AAElB,sGAAA,UAAU,OAAA;AAGV,6GAAA,iBAAiB,OAAA;AACjB,4GAAA,gBAAgB,OAAA;AAKhB,0GAAA,cAAc,OAAA;AACd,qGAAA,SAAS,OAAA;AACT,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,2GAAA,eAAe,OAAA;AACf,sGAAA,UAAU,OAAA;AACV,wGAAA,YAAY,OAAA;AAEZ,wGAAA,YAAY,OAAA;AACZ,mHAAA,uBAAuB,OAAA;AAEvB,0HAAA,8BAA8B,OAAA;AAI9B,wGAAA,YAAY,OAAA;AACZ,2GAAA,eAAe,OAAA;AACf,8GAAA,kBAAkB,OAAA;AAClB,iHAAA,qBAAqB,OAAA;AACrB,gHAAA,oBAAoB,OAAA;AACpB,yGAAA,aAAa,OAAA;AAGb,sGAAA,UAAU,OAAA;AAEV,mHAAA,uBAAuB,OAAA;AACvB,4GAAA,gBAAgB,OAAA;AAGjB,mDAKgC;AAH/B,6GAAA,iBAAiB,OAAA;AAEjB,6GAAA,iBAAiB,OAAA;AAGlB,iDAMyB;AAJxB,iHAAA,gBAAgB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\tEncodedJsonableTree,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\tcastCursorToSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tgenericTreeDeleteIfEmpty,\n\tgetDepth,\n\tmapCursorField,\n\tmapCursorFields,\n\titerateCursorField,\n\ttype MapTree,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\tvisitDelta,\n\tcreateAnnouncedVisitor,\n\tcombineVisitors,\n\tannounceDelta,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tsetGenericTreeField,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaProtoNode,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype ExclusiveMapTree,\n\tdeepCopyMapTree,\n\ttype TreeChunk,\n\tdummyRoot,\n\tcursorChunk,\n\ttryGetChunk,\n\ttype ChunkedCursor,\n} from \"./tree/index.js\";\n\nexport {\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\tinitializeForest,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest/index.js\";\n\nexport {\n\ttype FieldKey,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype FieldKindData,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tschemaFormat,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\ttoTreeNodeSchemaDataFormat,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tstoredSchemaDecodeDispatcher,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\n} from \"./schema-stored/index.js\";\n\nexport {\n\ttype ChangeFamily,\n\ttype ChangeFamilyCodec,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamilyEditor,\n\tEditBuilder,\n} from \"./change-family/index.js\";\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\ttype ChangeRebaser,\n\tfindAncestor,\n\tfindCommonAncestor,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tRevisionTagCodec,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\tSessionIdSchema,\n\tmintCommit,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\ttype RevisionMetadataSource,\n\trevisionMetadataSourceFromInfo,\n\ttype RevisionInfo,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\tsubtractChangeAtomIds,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n\tisAncestor,\n\ttype ChangeAtomIdRangeMap,\n\tnewChangeAtomIdRangeMap,\n\tcompareRevisions,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\ttype TreeAdapter,\n\tAllowedUpdateType,\n} from \"./schema-view/index.js\";\n\nexport {\n\ttype Revertible,\n\tRevertibleStatus,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./revertible.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,4CAmGyB;AAlGxB,oGAAA,QAAQ,OAAA;AAIR,qGAAA,SAAS,OAAA;AAoBT,+GAAA,mBAAmB,OAAA;AACnB,wGAAA,YAAY,OAAA;AACZ,qGAAA,SAAS,OAAA;AAET,8GAAA,kBAAkB,OAAA;AAElB,mHAAA,uBAAuB,OAAA;AAGvB,2GAAA,eAAe,OAAA;AACf,+GAAA,mBAAmB,OAAA;AACnB,oHAAA,wBAAwB,OAAA;AACxB,oGAAA,QAAQ,OAAA;AACR,0GAAA,cAAc,OAAA;AACd,2GAAA,eAAe,OAAA;AACf,8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ensed under the MIT License.\n */\n\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype Value,\n\ttype TreeValue,\n\tAnchorSet,\n\ttype DetachedField,\n\ttype UpPath,\n\ttype NormalizedUpPath,\n\ttype INormalizedUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\ttype FieldUpPath,\n\ttype Anchor,\n\ttype RootField,\n\ttype ChildCollection,\n\ttype ChildLocation,\n\ttype FieldMapObject,\n\ttype NodeData,\n\ttype GenericTreeNode,\n\ttype JsonableTree,\n\tEncodedJsonableTree,\n\trootFieldKey,\n\trootField,\n\ttype ITreeCursor,\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\tcastCursorToSynchronous,\n\ttype GenericFieldsNode,\n\ttype AnchorLocator,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tgenericTreeDeleteIfEmpty,\n\tgetDepth,\n\tmapCursorField,\n\tmapCursorFields,\n\titerateCursorField,\n\ttype MapTree,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\tvisitDelta,\n\tcreateAnnouncedVisitor,\n\tcombineVisitors,\n\tannounceDelta,\n\tapplyDelta,\n\tmakeDetachedFieldIndex,\n\tsetGenericTreeField,\n\ttype DeltaVisitor,\n\ttype AnnouncedVisitor,\n\tSparseNode,\n\tgetDescendant,\n\tcompareUpPaths,\n\tclonePath,\n\ttopDownPath,\n\tcompareFieldUpPaths,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\ttype PathRootPrefix,\n\tdeltaForRootInitialization,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype UpPathDefault,\n\tisDetachedUpPath,\n\tinCursorField,\n\tinCursorNode,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n\ttype ProtoNodes,\n\tCursorMarker,\n\tisCursor,\n\tDetachedFieldIndex,\n\ttype ForestRootId,\n\tgetDetachedFieldContainingPath,\n\taboveRootPlaceholder,\n\ttype DeltaRoot,\n\ttype DeltaMark,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaFieldMap,\n\ttype DeltaDetachedNodeChanges,\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaDetachedNodeDestruction,\n\ttype DeltaDetachedNodeRename,\n\ttype DeltaFieldChanges,\n\ttype ExclusiveMapTree,\n\tdeepCopyMapTree,\n\ttype TreeChunk,\n\tdummyRoot,\n\tcursorChunk,\n\ttryGetChunk,\n\ttype ChunkedCursor,\n} from \"./tree/index.js\";\n\nexport {\n\tTreeNavigationResult,\n\ttype IEditableForest,\n\ttype IForestSubscription,\n\ttype TreeLocation,\n\ttype FieldLocation,\n\ttype ForestLocation,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype FieldAnchor,\n\tmoveToDetachedField,\n\ttype ForestEvents,\n} from \"./forest/index.js\";\n\nexport {\n\ttype FieldKey,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeFieldStoredSchema,\n\tValueSchema,\n\tTreeNodeStoredSchema,\n\ttype TreeStoredSchemaSubscription,\n\ttype MutableTreeStoredSchema,\n\ttype FieldKindIdentifier,\n\ttype FieldKindData,\n\ttype TreeTypeSet,\n\ttype TreeStoredSchema,\n\tTreeStoredSchemaRepository,\n\tschemaDataIsEmpty,\n\ttype SchemaEvents,\n\tforbiddenFieldKindIdentifier,\n\tidentifierFieldKindIdentifier,\n\tstoredEmptyFieldSchema,\n\ttype StoredSchemaCollection,\n\tschemaFormat,\n\tLeafNodeStoredSchema,\n\tObjectNodeStoredSchema,\n\tMapNodeStoredSchema,\n\ttoTreeNodeSchemaDataFormat,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tstoredSchemaDecodeDispatcher,\n\ttype ErasedTreeNodeSchemaDataFormat,\n\ttype SchemaAndPolicy,\n\tMultiplicity,\n\ttype SchemaPolicy,\n} from \"./schema-stored/index.js\";\n\nexport {\n\ttype ChangeFamily,\n\ttype ChangeFamilyCodec,\n\ttype ChangeEncodingContext,\n\ttype ChangeFamilyEditor,\n\tEditBuilder,\n} from \"./change-family/index.js\";\n\nexport {\n\tareEqualChangeAtomIds,\n\tareEqualChangeAtomIdOpts,\n\tmakeChangeAtomId,\n\tasChangeAtomId,\n\ttype ChangeRebaser,\n\tfindAncestor,\n\tfindCommonAncestor,\n\ttype GraphCommit,\n\tCommitKind,\n\ttype CommitMetadata,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tRevisionTagCodec,\n\ttype ChangesetLocalId,\n\ttype ChangeAtomId,\n\ttype ChangeAtomIdMap,\n\ttype TaggedChange,\n\tmakeAnonChange,\n\ttagChange,\n\tmapTaggedChange,\n\ttagRollbackInverse,\n\tSessionIdSchema,\n\tmintCommit,\n\trebaseBranch,\n\ttype BranchRebaseResult,\n\trebaseChange,\n\trebaseChangeOverChanges,\n\ttype RevisionMetadataSource,\n\trevisionMetadataSourceFromInfo,\n\ttype RevisionInfo,\n\ttype EncodedRevisionTag,\n\ttype EncodedChangeAtomId,\n\ttaggedAtomId,\n\ttaggedOptAtomId,\n\toffsetChangeAtomId,\n\tsubtractChangeAtomIds,\n\treplaceAtomRevisions,\n\treplaceChange,\n\ttype RebaseStats,\n\ttype RebaseStatsWithDuration,\n\tisAncestor,\n\ttype ChangeAtomIdRangeMap,\n\tnewChangeAtomIdRangeMap,\n\tcompareRevisions,\n} from \"./rebase/index.js\";\n\nexport {\n\ttype Adapters,\n\tAdaptedViewSchema,\n\ttype TreeAdapter,\n\tAllowedUpdateType,\n} from \"./schema-view/index.js\";\n\nexport {\n\ttype Revertible,\n\tRevertibleStatus,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./revertible.js\";\n"]}
@@ -5,7 +5,8 @@
5
5
  import type { Listenable } from "@fluidframework/core-interfaces/internal";
6
6
  import { type Brand, type BrandedKey, type BrandedMapSubset, type Opaque, ReferenceCountedBase } from "../../util/index.js";
7
7
  import type { FieldKey } from "../schema-stored/index.js";
8
- import type { UpPath } from "./pathTree.js";
8
+ import type * as Delta from "./delta.js";
9
+ import { type INormalizedUpPath, type UpPath } from "./pathTree.js";
9
10
  import type { DeltaVisitor } from "./visitDelta.js";
10
11
  /**
11
12
  * A way to refer to a particular tree location within an {@link AnchorSet}.
@@ -160,7 +161,7 @@ export interface AnchorSetRootEvents {
160
161
  /**
161
162
  * Node in a tree of anchors.
162
163
  */
163
- export interface AnchorNode extends UpPath<AnchorNode> {
164
+ export interface AnchorNode extends INormalizedUpPath<AnchorNode> {
164
165
  /**
165
166
  * Events for this anchor node.
166
167
  */
@@ -429,7 +430,7 @@ declare enum Status {
429
430
  * 2. refcount is non-zero.
430
431
  * 3. events are registered.
431
432
  */
432
- declare class PathNode extends ReferenceCountedBase implements UpPath<PathNode>, AnchorNode {
433
+ declare class PathNode extends ReferenceCountedBase implements AnchorNode {
433
434
  readonly anchorSet: AnchorSet;
434
435
  parentField: FieldKey;
435
436
  parentIndex: number;
@@ -462,6 +463,10 @@ declare class PathNode extends ReferenceCountedBase implements UpPath<PathNode>,
462
463
  */
463
464
  readonly children: Map<FieldKey, PathNode[]>;
464
465
  readonly slots: BrandedMapSubset<AnchorSlot<any>>;
466
+ /**
467
+ * {@inheritdoc UpPath.detachedNodeId}
468
+ */
469
+ detachedNodeId: Delta.DetachedNodeId | undefined;
465
470
  /**
466
471
  * Construct a PathNode with refcount 1.
467
472
  * @param anchorSet - used to determine if this PathNode is already part of a specific anchorSet