@fluidframework/tree 2.41.0-338401 → 2.42.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1111) hide show
  1. package/.vscode/settings.json +1 -0
  2. package/CHANGELOG.md +374 -0
  3. package/api-report/tree.alpha.api.md +21 -7
  4. package/dist/alpha.d.ts +2 -0
  5. package/dist/codec/codec.d.ts +33 -3
  6. package/dist/codec/codec.d.ts.map +1 -1
  7. package/dist/codec/codec.js +13 -3
  8. package/dist/codec/codec.js.map +1 -1
  9. package/dist/codec/index.d.ts +1 -1
  10. package/dist/codec/index.d.ts.map +1 -1
  11. package/dist/codec/index.js.map +1 -1
  12. package/dist/codec/versioned/codec.d.ts +35 -2
  13. package/dist/codec/versioned/codec.d.ts.map +1 -1
  14. package/dist/codec/versioned/codec.js +38 -3
  15. package/dist/codec/versioned/codec.js.map +1 -1
  16. package/dist/core/index.d.ts +1 -1
  17. package/dist/core/index.d.ts.map +1 -1
  18. package/dist/core/index.js +2 -1
  19. package/dist/core/index.js.map +1 -1
  20. package/dist/core/rebase/types.d.ts +2 -2
  21. package/dist/core/rebase/types.js +2 -2
  22. package/dist/core/rebase/types.js.map +1 -1
  23. package/dist/core/rebase/utils.d.ts +0 -2
  24. package/dist/core/rebase/utils.d.ts.map +1 -1
  25. package/dist/core/rebase/utils.js +6 -10
  26. package/dist/core/rebase/utils.js.map +1 -1
  27. package/dist/core/schema-stored/formatV1.d.ts +0 -1
  28. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  29. package/dist/core/schema-stored/formatV1.js +1 -2
  30. package/dist/core/schema-stored/formatV1.js.map +1 -1
  31. package/dist/core/schema-stored/index.d.ts +1 -1
  32. package/dist/core/schema-stored/index.d.ts.map +1 -1
  33. package/dist/core/schema-stored/index.js +2 -1
  34. package/dist/core/schema-stored/index.js.map +1 -1
  35. package/dist/core/schema-stored/schema.d.ts +6 -0
  36. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  37. package/dist/core/schema-stored/schema.js +8 -1
  38. package/dist/core/schema-stored/schema.js.map +1 -1
  39. package/dist/core/tree/anchorSet.d.ts +2 -1
  40. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  41. package/dist/core/tree/anchorSet.js +2 -1
  42. package/dist/core/tree/anchorSet.js.map +1 -1
  43. package/dist/core/tree/detachedFieldIndex.d.ts +2 -2
  44. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  45. package/dist/core/tree/detachedFieldIndex.js +5 -1
  46. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  47. package/dist/core/tree/mapTree.d.ts +2 -1
  48. package/dist/core/tree/mapTree.d.ts.map +1 -1
  49. package/dist/core/tree/mapTree.js +11 -5
  50. package/dist/core/tree/mapTree.js.map +1 -1
  51. package/dist/core/tree/pathTree.d.ts +12 -11
  52. package/dist/core/tree/pathTree.d.ts.map +1 -1
  53. package/dist/core/tree/pathTree.js +8 -7
  54. package/dist/core/tree/pathTree.js.map +1 -1
  55. package/dist/core/tree/treeTextFormat.d.ts +1 -1
  56. package/dist/core/tree/treeTextFormat.js +1 -1
  57. package/dist/core/tree/treeTextFormat.js.map +1 -1
  58. package/dist/core/tree/visitorUtils.d.ts +2 -2
  59. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  60. package/dist/core/tree/visitorUtils.js.map +1 -1
  61. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -1
  62. package/dist/feature-libraries/chunked-forest/chunkedForest.js +1 -1
  63. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  64. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -2
  65. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  66. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  67. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  68. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  69. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  70. package/dist/feature-libraries/default-schema/index.js +2 -2
  71. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  72. package/dist/feature-libraries/default-schema/schemaChecker.d.ts +17 -16
  73. package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  74. package/dist/feature-libraries/default-schema/schemaChecker.js +54 -38
  75. package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  76. package/dist/feature-libraries/flex-tree/context.d.ts +32 -8
  77. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  78. package/dist/feature-libraries/flex-tree/context.js +22 -6
  79. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  80. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +37 -16
  81. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  82. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +7 -2
  83. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  84. package/dist/feature-libraries/flex-tree/index.d.ts +2 -2
  85. package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
  86. package/dist/feature-libraries/flex-tree/index.js.map +1 -1
  87. package/dist/feature-libraries/flex-tree/lazyField.d.ts +6 -6
  88. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  89. package/dist/feature-libraries/flex-tree/lazyField.js +1 -1
  90. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  91. package/dist/feature-libraries/flex-tree/lazyNode.d.ts +3 -2
  92. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  93. package/dist/feature-libraries/flex-tree/lazyNode.js +3 -0
  94. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  95. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  96. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  97. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -3
  98. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  99. package/dist/feature-libraries/forest-summary/forestSummarizer.js +7 -7
  100. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  101. package/dist/feature-libraries/index.d.ts +4 -4
  102. package/dist/feature-libraries/index.d.ts.map +1 -1
  103. package/dist/feature-libraries/index.js +5 -4
  104. package/dist/feature-libraries/index.js.map +1 -1
  105. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  106. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  107. package/dist/feature-libraries/indexing/anchorTreeIndex.js +15 -15
  108. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  109. package/dist/feature-libraries/mapTreeCursor.d.ts +39 -3
  110. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  111. package/dist/feature-libraries/mapTreeCursor.js +45 -7
  112. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  113. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  114. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  115. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  116. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  117. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  118. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  119. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  120. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  121. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  122. package/dist/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  123. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  124. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  125. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  126. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  127. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  128. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  129. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  130. package/dist/feature-libraries/modular-schema/isNeverTree.js +0 -2
  131. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  132. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +1 -1
  133. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  134. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +5 -5
  135. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  136. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  137. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  138. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  139. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  140. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  141. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  142. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  143. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  144. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  145. package/dist/feature-libraries/object-forest/objectForest.d.ts +22 -5
  146. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  147. package/dist/feature-libraries/object-forest/objectForest.js +296 -207
  148. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  149. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  150. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  151. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +3 -2
  152. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  153. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  154. package/dist/feature-libraries/schema-index/codec.d.ts +6 -12
  155. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  156. package/dist/feature-libraries/schema-index/codec.js +8 -15
  157. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  158. package/dist/feature-libraries/schema-index/formatV1.d.ts +2 -2
  159. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  160. package/dist/feature-libraries/schema-index/formatV1.js +1 -1
  161. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  162. package/dist/feature-libraries/schema-index/index.d.ts +1 -1
  163. package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
  164. package/dist/feature-libraries/schema-index/index.js +1 -2
  165. package/dist/feature-libraries/schema-index/index.js.map +1 -1
  166. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  167. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  168. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  169. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  170. package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
  171. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  172. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  173. package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  174. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  175. package/dist/feature-libraries/sequence-field/rebase.js +1 -1
  176. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  177. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  178. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  179. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  180. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  181. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  182. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  183. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  184. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  185. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  186. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  187. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  188. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  189. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  190. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  191. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  192. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  193. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  194. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  195. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  196. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  197. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  198. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  199. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  200. package/dist/feature-libraries/sequence-field/utils.d.ts +7 -5
  201. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  202. package/dist/feature-libraries/sequence-field/utils.js +7 -5
  203. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  204. package/dist/feature-libraries/treeCursorUtils.d.ts +5 -1
  205. package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  206. package/dist/feature-libraries/treeCursorUtils.js +10 -4
  207. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  208. package/dist/feature-libraries/treeTextCursor.d.ts +1 -1
  209. package/dist/feature-libraries/treeTextCursor.js +1 -1
  210. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  211. package/dist/index.d.ts +3 -3
  212. package/dist/index.d.ts.map +1 -1
  213. package/dist/index.js +2 -6
  214. package/dist/index.js.map +1 -1
  215. package/dist/packageVersion.d.ts +1 -1
  216. package/dist/packageVersion.d.ts.map +1 -1
  217. package/dist/packageVersion.js +1 -1
  218. package/dist/packageVersion.js.map +1 -1
  219. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  220. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
  221. package/dist/shared-tree/independentView.d.ts +1 -1
  222. package/dist/shared-tree/independentView.d.ts.map +1 -1
  223. package/dist/shared-tree/independentView.js +8 -3
  224. package/dist/shared-tree/independentView.js.map +1 -1
  225. package/dist/shared-tree/index.d.ts +1 -1
  226. package/dist/shared-tree/index.d.ts.map +1 -1
  227. package/dist/shared-tree/index.js.map +1 -1
  228. package/dist/shared-tree/schematizeTree.d.ts +1 -1
  229. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  230. package/dist/shared-tree/schematizeTree.js.map +1 -1
  231. package/dist/shared-tree/schematizingTreeView.d.ts +12 -2
  232. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  233. package/dist/shared-tree/schematizingTreeView.js +37 -23
  234. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  235. package/dist/shared-tree/sharedTree.d.ts +6 -6
  236. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  237. package/dist/shared-tree/sharedTree.js +9 -8
  238. package/dist/shared-tree/sharedTree.js.map +1 -1
  239. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  240. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  241. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  242. package/dist/shared-tree/tree.d.ts.map +1 -1
  243. package/dist/shared-tree/tree.js +9 -25
  244. package/dist/shared-tree/tree.js.map +1 -1
  245. package/dist/shared-tree/treeAlpha.d.ts +78 -5
  246. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  247. package/dist/shared-tree/treeAlpha.js +52 -8
  248. package/dist/shared-tree/treeAlpha.js.map +1 -1
  249. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  250. package/dist/shared-tree/treeCheckout.js +8 -4
  251. package/dist/shared-tree/treeCheckout.js.map +1 -1
  252. package/dist/shared-tree-core/branch.d.ts +2 -2
  253. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  254. package/dist/shared-tree-core/branch.js +2 -2
  255. package/dist/shared-tree-core/branch.js.map +1 -1
  256. package/dist/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  257. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  258. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  259. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  260. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  261. package/dist/shared-tree-core/editManager.d.ts +3 -1
  262. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  263. package/dist/shared-tree-core/editManager.js +4 -2
  264. package/dist/shared-tree-core/editManager.js.map +1 -1
  265. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  266. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  267. package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  268. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  269. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  270. package/dist/shared-tree-core/messageCodecs.d.ts +1 -1
  271. package/dist/shared-tree-core/messageCodecs.js +1 -1
  272. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  273. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  274. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  275. package/dist/shared-tree-core/sharedTreeCore.d.ts +2 -2
  276. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  277. package/dist/shared-tree-core/sharedTreeCore.js +4 -4
  278. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  279. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  280. package/dist/shared-tree-core/transaction.js +1 -1
  281. package/dist/shared-tree-core/transaction.js.map +1 -1
  282. package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  283. package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
  284. package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
  285. package/dist/simple-tree/api/conciseTree.js +1 -1
  286. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  287. package/dist/simple-tree/api/configuration.d.ts +2 -2
  288. package/dist/simple-tree/api/configuration.js +5 -5
  289. package/dist/simple-tree/api/configuration.js.map +1 -1
  290. package/dist/simple-tree/api/create.d.ts +10 -29
  291. package/dist/simple-tree/api/create.d.ts.map +1 -1
  292. package/dist/simple-tree/api/create.js +27 -51
  293. package/dist/simple-tree/api/create.js.map +1 -1
  294. package/dist/simple-tree/api/customTree.d.ts +5 -1
  295. package/dist/simple-tree/api/customTree.d.ts.map +1 -1
  296. package/dist/simple-tree/api/customTree.js +33 -25
  297. package/dist/simple-tree/api/customTree.js.map +1 -1
  298. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  299. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  300. package/dist/simple-tree/api/identifierIndex.js +2 -2
  301. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  302. package/dist/simple-tree/api/index.d.ts +2 -3
  303. package/dist/simple-tree/api/index.d.ts.map +1 -1
  304. package/dist/simple-tree/api/index.js +2 -10
  305. package/dist/simple-tree/api/index.js.map +1 -1
  306. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  307. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  308. package/dist/simple-tree/api/schemaFactory.d.ts +14 -6
  309. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  310. package/dist/simple-tree/api/schemaFactory.js +45 -16
  311. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  312. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  313. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  314. package/dist/simple-tree/api/schemaFactoryAlpha.js +4 -6
  315. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  316. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  317. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  318. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  319. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  320. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  321. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  322. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  323. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +4 -6
  324. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  325. package/dist/simple-tree/api/storedSchema.d.ts +1 -1
  326. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  327. package/dist/simple-tree/api/storedSchema.js +7 -6
  328. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  329. package/dist/simple-tree/api/tree.d.ts +2 -2
  330. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  331. package/dist/simple-tree/api/tree.js.map +1 -1
  332. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  333. package/dist/simple-tree/api/treeBeta.js +1 -1
  334. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  335. package/dist/simple-tree/api/treeNodeApi.d.ts +44 -6
  336. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  337. package/dist/simple-tree/api/treeNodeApi.js +56 -29
  338. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  339. package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
  340. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  341. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  342. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  343. package/dist/simple-tree/api/verboseTree.js +15 -12
  344. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  345. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  346. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +4 -6
  347. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  348. package/dist/simple-tree/core/context.d.ts.map +1 -1
  349. package/dist/simple-tree/core/context.js.map +1 -1
  350. package/dist/simple-tree/core/getOrCreateNode.d.ts +1 -1
  351. package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  352. package/dist/simple-tree/core/getOrCreateNode.js +2 -1
  353. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
  354. package/dist/simple-tree/core/index.d.ts +2 -2
  355. package/dist/simple-tree/core/index.d.ts.map +1 -1
  356. package/dist/simple-tree/core/index.js +3 -4
  357. package/dist/simple-tree/core/index.js.map +1 -1
  358. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  359. package/dist/simple-tree/core/treeNode.js +1 -1
  360. package/dist/simple-tree/core/treeNode.js.map +1 -1
  361. package/dist/simple-tree/core/treeNodeKernel.d.ts +18 -28
  362. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  363. package/dist/simple-tree/core/treeNodeKernel.js +28 -35
  364. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  365. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  366. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  367. package/dist/simple-tree/core/types.d.ts.map +1 -1
  368. package/dist/simple-tree/core/types.js.map +1 -1
  369. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +128 -59
  370. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  371. package/dist/simple-tree/core/unhydratedFlexTree.js +180 -193
  372. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  373. package/dist/simple-tree/core/withType.d.ts +1 -1
  374. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  375. package/dist/simple-tree/core/withType.js.map +1 -1
  376. package/dist/simple-tree/createContext.d.ts.map +1 -1
  377. package/dist/simple-tree/createContext.js.map +1 -1
  378. package/dist/simple-tree/getTreeNodeForField.d.ts.map +1 -1
  379. package/dist/simple-tree/getTreeNodeForField.js.map +1 -1
  380. package/dist/simple-tree/index.d.ts +4 -11
  381. package/dist/simple-tree/index.d.ts.map +1 -1
  382. package/dist/simple-tree/index.js +16 -24
  383. package/dist/simple-tree/index.js.map +1 -1
  384. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  385. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  386. package/dist/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  387. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  388. package/dist/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +12 -13
  389. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  390. package/dist/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  391. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  392. package/dist/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  393. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -0
  394. package/dist/simple-tree/node-kinds/array/index.d.ts +7 -0
  395. package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  396. package/dist/simple-tree/node-kinds/array/index.js +16 -0
  397. package/dist/simple-tree/node-kinds/array/index.js.map +1 -0
  398. package/dist/simple-tree/node-kinds/index.d.ts +8 -0
  399. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -0
  400. package/dist/simple-tree/node-kinds/index.js +25 -0
  401. package/dist/simple-tree/node-kinds/index.js.map +1 -0
  402. package/dist/simple-tree/node-kinds/map/index.d.ts +7 -0
  403. package/dist/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  404. package/dist/simple-tree/node-kinds/map/index.js +13 -0
  405. package/dist/simple-tree/node-kinds/map/index.js.map +1 -0
  406. package/{lib/simple-tree → dist/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  407. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  408. package/dist/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +9 -9
  409. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  410. package/dist/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  411. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  412. package/dist/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  413. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  414. package/dist/simple-tree/node-kinds/object/index.d.ts +7 -0
  415. package/dist/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  416. package/dist/simple-tree/node-kinds/object/index.js +15 -0
  417. package/dist/simple-tree/node-kinds/object/index.js.map +1 -0
  418. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNode.d.ts +6 -6
  419. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  420. package/dist/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +9 -17
  421. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  422. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  423. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  424. package/dist/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  425. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  426. package/dist/simple-tree/prepareForInsertion.d.ts +20 -6
  427. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  428. package/dist/simple-tree/prepareForInsertion.js +26 -19
  429. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  430. package/dist/simple-tree/schemaTypes.d.ts +9 -9
  431. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  432. package/dist/simple-tree/schemaTypes.js.map +1 -1
  433. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  434. package/dist/simple-tree/simpleSchema.js.map +1 -1
  435. package/dist/simple-tree/toStoredSchema.d.ts +6 -1
  436. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  437. package/dist/simple-tree/toStoredSchema.js +7 -4
  438. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  439. package/dist/simple-tree/treeNodeValid.d.ts +1 -1
  440. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  441. package/dist/simple-tree/treeNodeValid.js +10 -10
  442. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  443. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +72 -0
  444. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -0
  445. package/dist/simple-tree/{toMapTree.js → unhydratedFlexTreeFromInsertable.js} +136 -178
  446. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -0
  447. package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -1
  448. package/dist/simple-tree/walkFieldSchema.js.map +1 -1
  449. package/dist/tableSchema.d.ts +10 -10
  450. package/dist/treeFactory.d.ts +1 -1
  451. package/dist/treeFactory.d.ts.map +1 -1
  452. package/dist/treeFactory.js +7 -2
  453. package/dist/treeFactory.js.map +1 -1
  454. package/dist/util/bTreeUtils.d.ts.map +1 -1
  455. package/dist/util/bTreeUtils.js.map +1 -1
  456. package/dist/util/breakable.d.ts +23 -4
  457. package/dist/util/breakable.d.ts.map +1 -1
  458. package/dist/util/breakable.js +12 -3
  459. package/dist/util/breakable.js.map +1 -1
  460. package/dist/util/index.d.ts +1 -1
  461. package/dist/util/index.d.ts.map +1 -1
  462. package/dist/util/index.js +2 -1
  463. package/dist/util/index.js.map +1 -1
  464. package/dist/util/utils.d.ts +4 -0
  465. package/dist/util/utils.d.ts.map +1 -1
  466. package/dist/util/utils.js +8 -1
  467. package/dist/util/utils.js.map +1 -1
  468. package/docs/SharedTree Philosophy.md +5 -5
  469. package/docs/user-facing/schema-evolution.md +1 -1
  470. package/lib/alpha.d.ts +2 -0
  471. package/lib/codec/codec.d.ts +33 -3
  472. package/lib/codec/codec.d.ts.map +1 -1
  473. package/lib/codec/codec.js +13 -3
  474. package/lib/codec/codec.js.map +1 -1
  475. package/lib/codec/index.d.ts +1 -1
  476. package/lib/codec/index.d.ts.map +1 -1
  477. package/lib/codec/index.js.map +1 -1
  478. package/lib/codec/versioned/codec.d.ts +35 -2
  479. package/lib/codec/versioned/codec.d.ts.map +1 -1
  480. package/lib/codec/versioned/codec.js +36 -2
  481. package/lib/codec/versioned/codec.js.map +1 -1
  482. package/lib/core/index.d.ts +1 -1
  483. package/lib/core/index.d.ts.map +1 -1
  484. package/lib/core/index.js +1 -1
  485. package/lib/core/index.js.map +1 -1
  486. package/lib/core/rebase/types.d.ts +2 -2
  487. package/lib/core/rebase/types.js +2 -2
  488. package/lib/core/rebase/types.js.map +1 -1
  489. package/lib/core/rebase/utils.d.ts +0 -2
  490. package/lib/core/rebase/utils.d.ts.map +1 -1
  491. package/lib/core/rebase/utils.js +6 -10
  492. package/lib/core/rebase/utils.js.map +1 -1
  493. package/lib/core/schema-stored/formatV1.d.ts +0 -1
  494. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  495. package/lib/core/schema-stored/formatV1.js +0 -1
  496. package/lib/core/schema-stored/formatV1.js.map +1 -1
  497. package/lib/core/schema-stored/index.d.ts +1 -1
  498. package/lib/core/schema-stored/index.d.ts.map +1 -1
  499. package/lib/core/schema-stored/index.js +1 -1
  500. package/lib/core/schema-stored/index.js.map +1 -1
  501. package/lib/core/schema-stored/schema.d.ts +6 -0
  502. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  503. package/lib/core/schema-stored/schema.js +7 -0
  504. package/lib/core/schema-stored/schema.js.map +1 -1
  505. package/lib/core/tree/anchorSet.d.ts +2 -1
  506. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  507. package/lib/core/tree/anchorSet.js +2 -1
  508. package/lib/core/tree/anchorSet.js.map +1 -1
  509. package/lib/core/tree/detachedFieldIndex.d.ts +2 -2
  510. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  511. package/lib/core/tree/detachedFieldIndex.js +6 -2
  512. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  513. package/lib/core/tree/mapTree.d.ts +2 -1
  514. package/lib/core/tree/mapTree.d.ts.map +1 -1
  515. package/lib/core/tree/mapTree.js +11 -5
  516. package/lib/core/tree/mapTree.js.map +1 -1
  517. package/lib/core/tree/pathTree.d.ts +12 -11
  518. package/lib/core/tree/pathTree.d.ts.map +1 -1
  519. package/lib/core/tree/pathTree.js +8 -7
  520. package/lib/core/tree/pathTree.js.map +1 -1
  521. package/lib/core/tree/treeTextFormat.d.ts +1 -1
  522. package/lib/core/tree/treeTextFormat.js +1 -1
  523. package/lib/core/tree/treeTextFormat.js.map +1 -1
  524. package/lib/core/tree/visitorUtils.d.ts +2 -2
  525. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  526. package/lib/core/tree/visitorUtils.js.map +1 -1
  527. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -1
  528. package/lib/feature-libraries/chunked-forest/chunkedForest.js +1 -1
  529. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  530. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -2
  531. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  532. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  533. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  534. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  535. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  536. package/lib/feature-libraries/default-schema/index.js +1 -1
  537. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  538. package/lib/feature-libraries/default-schema/schemaChecker.d.ts +17 -16
  539. package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  540. package/lib/feature-libraries/default-schema/schemaChecker.js +53 -37
  541. package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  542. package/lib/feature-libraries/flex-tree/context.d.ts +32 -8
  543. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  544. package/lib/feature-libraries/flex-tree/context.js +23 -7
  545. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  546. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +37 -16
  547. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  548. package/lib/feature-libraries/flex-tree/flexTreeTypes.js +7 -2
  549. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  550. package/lib/feature-libraries/flex-tree/index.d.ts +2 -2
  551. package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
  552. package/lib/feature-libraries/flex-tree/index.js.map +1 -1
  553. package/lib/feature-libraries/flex-tree/lazyField.d.ts +6 -6
  554. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  555. package/lib/feature-libraries/flex-tree/lazyField.js +1 -1
  556. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  557. package/lib/feature-libraries/flex-tree/lazyNode.d.ts +3 -2
  558. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  559. package/lib/feature-libraries/flex-tree/lazyNode.js +3 -0
  560. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  561. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  562. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  563. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -3
  564. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  565. package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -2
  566. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  567. package/lib/feature-libraries/index.d.ts +4 -4
  568. package/lib/feature-libraries/index.d.ts.map +1 -1
  569. package/lib/feature-libraries/index.js +3 -3
  570. package/lib/feature-libraries/index.js.map +1 -1
  571. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  572. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  573. package/lib/feature-libraries/indexing/anchorTreeIndex.js +1 -1
  574. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  575. package/lib/feature-libraries/mapTreeCursor.d.ts +39 -3
  576. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  577. package/lib/feature-libraries/mapTreeCursor.js +43 -7
  578. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  579. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  580. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  581. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  582. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  583. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  584. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  585. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  586. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  587. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  588. package/lib/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  589. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  590. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  591. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  592. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  593. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  594. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  595. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  596. package/lib/feature-libraries/modular-schema/isNeverTree.js +0 -2
  597. package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  598. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +1 -1
  599. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  600. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +5 -5
  601. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  602. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  603. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  604. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  605. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  606. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  607. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  608. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  609. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  610. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  611. package/lib/feature-libraries/object-forest/objectForest.d.ts +22 -5
  612. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  613. package/lib/feature-libraries/object-forest/objectForest.js +299 -209
  614. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  615. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  616. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  617. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +4 -3
  618. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  619. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  620. package/lib/feature-libraries/schema-index/codec.d.ts +6 -12
  621. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  622. package/lib/feature-libraries/schema-index/codec.js +8 -15
  623. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  624. package/lib/feature-libraries/schema-index/formatV1.d.ts +2 -2
  625. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  626. package/lib/feature-libraries/schema-index/formatV1.js +2 -2
  627. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  628. package/lib/feature-libraries/schema-index/index.d.ts +1 -1
  629. package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
  630. package/lib/feature-libraries/schema-index/index.js +1 -1
  631. package/lib/feature-libraries/schema-index/index.js.map +1 -1
  632. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  633. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  634. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  635. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  636. package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
  637. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  638. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  639. package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  640. package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
  641. package/lib/feature-libraries/sequence-field/rebase.js +1 -1
  642. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  643. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  644. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  645. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  646. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  647. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  648. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  649. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  650. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  651. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  652. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  653. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  654. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  655. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  656. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  657. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  658. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  659. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  660. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  661. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  662. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  663. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  664. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  665. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  666. package/lib/feature-libraries/sequence-field/utils.d.ts +7 -5
  667. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  668. package/lib/feature-libraries/sequence-field/utils.js +7 -5
  669. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  670. package/lib/feature-libraries/treeCursorUtils.d.ts +5 -1
  671. package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  672. package/lib/feature-libraries/treeCursorUtils.js +10 -4
  673. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  674. package/lib/feature-libraries/treeTextCursor.d.ts +1 -1
  675. package/lib/feature-libraries/treeTextCursor.js +1 -1
  676. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  677. package/lib/index.d.ts +3 -3
  678. package/lib/index.d.ts.map +1 -1
  679. package/lib/index.js +0 -2
  680. package/lib/index.js.map +1 -1
  681. package/lib/packageVersion.d.ts +1 -1
  682. package/lib/packageVersion.d.ts.map +1 -1
  683. package/lib/packageVersion.js +1 -1
  684. package/lib/packageVersion.js.map +1 -1
  685. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  686. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
  687. package/lib/shared-tree/independentView.d.ts +1 -1
  688. package/lib/shared-tree/independentView.d.ts.map +1 -1
  689. package/lib/shared-tree/independentView.js +10 -5
  690. package/lib/shared-tree/independentView.js.map +1 -1
  691. package/lib/shared-tree/index.d.ts +1 -1
  692. package/lib/shared-tree/index.d.ts.map +1 -1
  693. package/lib/shared-tree/index.js +1 -1
  694. package/lib/shared-tree/index.js.map +1 -1
  695. package/lib/shared-tree/schematizeTree.d.ts +1 -1
  696. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  697. package/lib/shared-tree/schematizeTree.js.map +1 -1
  698. package/lib/shared-tree/schematizingTreeView.d.ts +12 -2
  699. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  700. package/lib/shared-tree/schematizingTreeView.js +35 -22
  701. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  702. package/lib/shared-tree/sharedTree.d.ts +6 -6
  703. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  704. package/lib/shared-tree/sharedTree.js +12 -11
  705. package/lib/shared-tree/sharedTree.js.map +1 -1
  706. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  707. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  708. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  709. package/lib/shared-tree/tree.d.ts.map +1 -1
  710. package/lib/shared-tree/tree.js +2 -18
  711. package/lib/shared-tree/tree.js.map +1 -1
  712. package/lib/shared-tree/treeAlpha.d.ts +78 -5
  713. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  714. package/lib/shared-tree/treeAlpha.js +53 -9
  715. package/lib/shared-tree/treeAlpha.js.map +1 -1
  716. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  717. package/lib/shared-tree/treeCheckout.js +9 -5
  718. package/lib/shared-tree/treeCheckout.js.map +1 -1
  719. package/lib/shared-tree-core/branch.d.ts +2 -2
  720. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  721. package/lib/shared-tree-core/branch.js +2 -2
  722. package/lib/shared-tree-core/branch.js.map +1 -1
  723. package/lib/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  724. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  725. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  726. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  727. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  728. package/lib/shared-tree-core/editManager.d.ts +3 -1
  729. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  730. package/lib/shared-tree-core/editManager.js +4 -2
  731. package/lib/shared-tree-core/editManager.js.map +1 -1
  732. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  733. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  734. package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  735. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  736. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  737. package/lib/shared-tree-core/messageCodecs.d.ts +1 -1
  738. package/lib/shared-tree-core/messageCodecs.js +1 -1
  739. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  740. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  741. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  742. package/lib/shared-tree-core/sharedTreeCore.d.ts +2 -2
  743. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  744. package/lib/shared-tree-core/sharedTreeCore.js +4 -4
  745. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  746. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  747. package/lib/shared-tree-core/transaction.js +1 -1
  748. package/lib/shared-tree-core/transaction.js.map +1 -1
  749. package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  750. package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
  751. package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
  752. package/lib/simple-tree/api/conciseTree.js +1 -1
  753. package/lib/simple-tree/api/conciseTree.js.map +1 -1
  754. package/lib/simple-tree/api/configuration.d.ts +2 -2
  755. package/lib/simple-tree/api/configuration.js +2 -2
  756. package/lib/simple-tree/api/configuration.js.map +1 -1
  757. package/lib/simple-tree/api/create.d.ts +10 -29
  758. package/lib/simple-tree/api/create.d.ts.map +1 -1
  759. package/lib/simple-tree/api/create.js +23 -45
  760. package/lib/simple-tree/api/create.js.map +1 -1
  761. package/lib/simple-tree/api/customTree.d.ts +5 -1
  762. package/lib/simple-tree/api/customTree.d.ts.map +1 -1
  763. package/lib/simple-tree/api/customTree.js +10 -3
  764. package/lib/simple-tree/api/customTree.js.map +1 -1
  765. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  766. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
  767. package/lib/simple-tree/api/identifierIndex.js +1 -1
  768. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  769. package/lib/simple-tree/api/index.d.ts +2 -3
  770. package/lib/simple-tree/api/index.d.ts.map +1 -1
  771. package/lib/simple-tree/api/index.js +2 -5
  772. package/lib/simple-tree/api/index.js.map +1 -1
  773. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  774. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  775. package/lib/simple-tree/api/schemaFactory.d.ts +14 -6
  776. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  777. package/lib/simple-tree/api/schemaFactory.js +44 -15
  778. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  779. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  780. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  781. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -3
  782. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  783. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  784. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  785. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  786. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  787. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  788. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  789. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  790. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +1 -3
  791. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  792. package/lib/simple-tree/api/storedSchema.d.ts +1 -1
  793. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  794. package/lib/simple-tree/api/storedSchema.js +3 -2
  795. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  796. package/lib/simple-tree/api/tree.d.ts +2 -2
  797. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  798. package/lib/simple-tree/api/tree.js.map +1 -1
  799. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  800. package/lib/simple-tree/api/treeBeta.js +1 -1
  801. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  802. package/lib/simple-tree/api/treeNodeApi.d.ts +44 -6
  803. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  804. package/lib/simple-tree/api/treeNodeApi.js +55 -29
  805. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  806. package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
  807. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  808. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  809. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  810. package/lib/simple-tree/api/verboseTree.js +14 -11
  811. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  812. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  813. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +1 -3
  814. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  815. package/lib/simple-tree/core/context.d.ts.map +1 -1
  816. package/lib/simple-tree/core/context.js.map +1 -1
  817. package/lib/simple-tree/core/getOrCreateNode.d.ts +1 -1
  818. package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  819. package/lib/simple-tree/core/getOrCreateNode.js +3 -2
  820. package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
  821. package/lib/simple-tree/core/index.d.ts +2 -2
  822. package/lib/simple-tree/core/index.d.ts.map +1 -1
  823. package/lib/simple-tree/core/index.js +2 -2
  824. package/lib/simple-tree/core/index.js.map +1 -1
  825. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  826. package/lib/simple-tree/core/treeNode.js +1 -1
  827. package/lib/simple-tree/core/treeNode.js.map +1 -1
  828. package/lib/simple-tree/core/treeNodeKernel.d.ts +18 -28
  829. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  830. package/lib/simple-tree/core/treeNodeKernel.js +26 -34
  831. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  832. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  833. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  834. package/lib/simple-tree/core/types.d.ts.map +1 -1
  835. package/lib/simple-tree/core/types.js.map +1 -1
  836. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +128 -59
  837. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  838. package/lib/simple-tree/core/unhydratedFlexTree.js +167 -182
  839. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  840. package/lib/simple-tree/core/withType.d.ts +1 -1
  841. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  842. package/lib/simple-tree/core/withType.js.map +1 -1
  843. package/lib/simple-tree/createContext.d.ts.map +1 -1
  844. package/lib/simple-tree/createContext.js.map +1 -1
  845. package/lib/simple-tree/getTreeNodeForField.d.ts.map +1 -1
  846. package/lib/simple-tree/getTreeNodeForField.js.map +1 -1
  847. package/lib/simple-tree/index.d.ts +4 -11
  848. package/lib/simple-tree/index.d.ts.map +1 -1
  849. package/lib/simple-tree/index.js +4 -8
  850. package/lib/simple-tree/index.js.map +1 -1
  851. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  852. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  853. package/lib/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  854. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  855. package/lib/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +10 -11
  856. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  857. package/lib/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  858. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  859. package/lib/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  860. package/{dist/simple-tree → lib/simple-tree/node-kinds/array}/arrayNodeTypes.js.map +1 -1
  861. package/lib/simple-tree/node-kinds/array/index.d.ts +7 -0
  862. package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  863. package/lib/simple-tree/node-kinds/array/index.js +7 -0
  864. package/lib/simple-tree/node-kinds/array/index.js.map +1 -0
  865. package/lib/simple-tree/node-kinds/index.d.ts +8 -0
  866. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -0
  867. package/lib/simple-tree/node-kinds/index.js +8 -0
  868. package/lib/simple-tree/node-kinds/index.js.map +1 -0
  869. package/lib/simple-tree/node-kinds/map/index.d.ts +7 -0
  870. package/lib/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  871. package/lib/simple-tree/node-kinds/map/index.js +7 -0
  872. package/lib/simple-tree/node-kinds/map/index.js.map +1 -0
  873. package/{dist/simple-tree → lib/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  874. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  875. package/lib/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +9 -9
  876. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  877. package/lib/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  878. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  879. package/lib/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  880. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  881. package/lib/simple-tree/node-kinds/object/index.d.ts +7 -0
  882. package/lib/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  883. package/lib/simple-tree/node-kinds/object/index.js +7 -0
  884. package/lib/simple-tree/node-kinds/object/index.js.map +1 -0
  885. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNode.d.ts +6 -6
  886. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  887. package/lib/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +9 -17
  888. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  889. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  890. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  891. package/lib/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  892. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  893. package/lib/simple-tree/prepareForInsertion.d.ts +20 -6
  894. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  895. package/lib/simple-tree/prepareForInsertion.js +25 -19
  896. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  897. package/lib/simple-tree/schemaTypes.d.ts +9 -9
  898. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  899. package/lib/simple-tree/schemaTypes.js.map +1 -1
  900. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  901. package/lib/simple-tree/simpleSchema.js.map +1 -1
  902. package/lib/simple-tree/toStoredSchema.d.ts +6 -1
  903. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  904. package/lib/simple-tree/toStoredSchema.js +5 -2
  905. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  906. package/lib/simple-tree/treeNodeValid.d.ts +1 -1
  907. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  908. package/lib/simple-tree/treeNodeValid.js +2 -2
  909. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  910. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +72 -0
  911. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -0
  912. package/lib/simple-tree/{toMapTree.js → unhydratedFlexTreeFromInsertable.js} +138 -179
  913. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -0
  914. package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -1
  915. package/lib/simple-tree/walkFieldSchema.js.map +1 -1
  916. package/lib/tableSchema.d.ts +10 -10
  917. package/lib/treeFactory.d.ts +1 -1
  918. package/lib/treeFactory.d.ts.map +1 -1
  919. package/lib/treeFactory.js +7 -2
  920. package/lib/treeFactory.js.map +1 -1
  921. package/lib/util/bTreeUtils.d.ts.map +1 -1
  922. package/lib/util/bTreeUtils.js.map +1 -1
  923. package/lib/util/breakable.d.ts +23 -4
  924. package/lib/util/breakable.d.ts.map +1 -1
  925. package/lib/util/breakable.js +12 -3
  926. package/lib/util/breakable.js.map +1 -1
  927. package/lib/util/index.d.ts +1 -1
  928. package/lib/util/index.d.ts.map +1 -1
  929. package/lib/util/index.js +1 -1
  930. package/lib/util/index.js.map +1 -1
  931. package/lib/util/utils.d.ts +4 -0
  932. package/lib/util/utils.d.ts.map +1 -1
  933. package/lib/util/utils.js +6 -0
  934. package/lib/util/utils.js.map +1 -1
  935. package/package.json +22 -22
  936. package/src/codec/codec.ts +37 -6
  937. package/src/codec/index.ts +1 -0
  938. package/src/codec/versioned/codec.ts +42 -5
  939. package/src/core/index.ts +1 -0
  940. package/src/core/rebase/types.ts +2 -2
  941. package/src/core/rebase/utils.ts +10 -10
  942. package/src/core/schema-stored/formatV1.ts +0 -2
  943. package/src/core/schema-stored/index.ts +1 -0
  944. package/src/core/schema-stored/schema.ts +7 -0
  945. package/src/core/tree/anchorSet.ts +2 -1
  946. package/src/core/tree/detachedFieldIndex.ts +13 -4
  947. package/src/core/tree/mapTree.ts +22 -7
  948. package/src/core/tree/pathTree.ts +12 -11
  949. package/src/core/tree/treeTextFormat.ts +1 -1
  950. package/src/core/tree/visitorUtils.ts +2 -2
  951. package/src/feature-libraries/chunked-forest/chunkedForest.ts +1 -1
  952. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +4 -3
  953. package/src/feature-libraries/default-schema/index.ts +1 -1
  954. package/src/feature-libraries/default-schema/schemaChecker.ts +51 -35
  955. package/src/feature-libraries/flex-tree/context.ts +46 -15
  956. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +39 -17
  957. package/src/feature-libraries/flex-tree/index.ts +4 -0
  958. package/src/feature-libraries/flex-tree/lazyField.ts +9 -7
  959. package/src/feature-libraries/flex-tree/lazyNode.ts +6 -2
  960. package/src/feature-libraries/flex-tree/utilities.ts +1 -1
  961. package/src/feature-libraries/forest-summary/forestSummarizer.ts +4 -3
  962. package/src/feature-libraries/index.ts +10 -2
  963. package/src/feature-libraries/indexing/anchorTreeIndex.ts +4 -2
  964. package/src/feature-libraries/mapTreeCursor.ts +103 -16
  965. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +1 -0
  966. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +1 -1
  967. package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +1 -1
  968. package/src/feature-libraries/modular-schema/genericFieldKind.ts +4 -2
  969. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -0
  970. package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +1 -0
  971. package/src/feature-libraries/modular-schema/isNeverTree.ts +0 -2
  972. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +10 -6
  973. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2 -0
  974. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +1 -0
  975. package/src/feature-libraries/node-identifier/mockNodeIdentifierManager.ts +11 -5
  976. package/src/feature-libraries/object-forest/objectForest.ts +65 -7
  977. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +5 -8
  978. package/src/feature-libraries/schema-index/codec.ts +13 -21
  979. package/src/feature-libraries/schema-index/formatV1.ts +2 -2
  980. package/src/feature-libraries/schema-index/index.ts +0 -1
  981. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -1
  982. package/src/feature-libraries/sequence-field/formatV3.ts +1 -0
  983. package/src/feature-libraries/sequence-field/markQueue.ts +1 -0
  984. package/src/feature-libraries/sequence-field/prune.ts +1 -0
  985. package/src/feature-libraries/sequence-field/rebase.ts +1 -1
  986. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +1 -1
  987. package/src/feature-libraries/sequence-field/replaceRevisions.ts +3 -1
  988. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +2 -2
  989. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +3 -3
  990. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +3 -3
  991. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +2 -2
  992. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +1 -1
  993. package/src/feature-libraries/sequence-field/utils.ts +7 -5
  994. package/src/feature-libraries/treeCursorUtils.ts +23 -12
  995. package/src/feature-libraries/treeTextCursor.ts +1 -1
  996. package/src/index.ts +2 -4
  997. package/src/packageVersion.ts +1 -1
  998. package/src/shared-tree/checkoutFlexTreeView.ts +1 -0
  999. package/src/shared-tree/independentView.ts +10 -3
  1000. package/src/shared-tree/index.ts +4 -1
  1001. package/src/shared-tree/schematizeTree.ts +2 -1
  1002. package/src/shared-tree/schematizingTreeView.ts +42 -24
  1003. package/src/shared-tree/sharedTree.ts +35 -22
  1004. package/src/shared-tree/sharedTreeChangeFamily.ts +1 -1
  1005. package/src/shared-tree/tree.ts +6 -21
  1006. package/src/shared-tree/treeAlpha.ts +159 -29
  1007. package/src/shared-tree/treeCheckout.ts +9 -5
  1008. package/src/shared-tree-core/branch.ts +3 -4
  1009. package/src/shared-tree-core/branchCommitEnricher.ts +3 -1
  1010. package/src/shared-tree-core/defaultResubmitMachine.ts +2 -0
  1011. package/src/shared-tree-core/editManager.ts +4 -2
  1012. package/src/shared-tree-core/editManagerCodecs.ts +1 -0
  1013. package/src/shared-tree-core/editManagerSummarizer.ts +1 -1
  1014. package/src/shared-tree-core/messageCodecs.ts +1 -1
  1015. package/src/shared-tree-core/sequenceIdUtils.ts +1 -0
  1016. package/src/shared-tree-core/sharedTreeCore.ts +5 -5
  1017. package/src/shared-tree-core/transaction.ts +4 -2
  1018. package/src/shared-tree-core/transactionEnricher.ts +2 -0
  1019. package/src/simple-tree/api/conciseTree.ts +3 -2
  1020. package/src/simple-tree/api/configuration.ts +4 -4
  1021. package/src/simple-tree/api/create.ts +52 -99
  1022. package/src/simple-tree/api/customTree.ts +14 -4
  1023. package/src/simple-tree/api/getSimpleSchema.ts +1 -0
  1024. package/src/simple-tree/api/identifierIndex.ts +1 -1
  1025. package/src/simple-tree/api/index.ts +2 -14
  1026. package/src/simple-tree/api/schemaCompatibilityTester.ts +2 -0
  1027. package/src/simple-tree/api/schemaFactory.ts +89 -35
  1028. package/src/simple-tree/api/schemaFactoryAlpha.ts +8 -6
  1029. package/src/simple-tree/api/schemaFactoryRecursive.ts +3 -3
  1030. package/src/simple-tree/api/schemaFromSimple.ts +3 -1
  1031. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -3
  1032. package/src/simple-tree/api/storedSchema.ts +5 -4
  1033. package/src/simple-tree/api/tree.ts +3 -4
  1034. package/src/simple-tree/api/treeBeta.ts +3 -2
  1035. package/src/simple-tree/api/treeNodeApi.ts +115 -45
  1036. package/src/simple-tree/api/typesUnsafe.ts +1 -1
  1037. package/src/simple-tree/api/verboseTree.ts +16 -13
  1038. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +1 -3
  1039. package/src/simple-tree/core/context.ts +1 -0
  1040. package/src/simple-tree/core/getOrCreateNode.ts +6 -3
  1041. package/src/simple-tree/core/index.ts +2 -3
  1042. package/src/simple-tree/core/treeNode.ts +1 -1
  1043. package/src/simple-tree/core/treeNodeKernel.ts +47 -62
  1044. package/src/simple-tree/core/treeNodeSchema.ts +1 -0
  1045. package/src/simple-tree/core/types.ts +1 -1
  1046. package/src/simple-tree/core/unhydratedFlexTree.ts +224 -262
  1047. package/src/simple-tree/core/withType.ts +1 -1
  1048. package/src/simple-tree/createContext.ts +1 -0
  1049. package/src/simple-tree/getTreeNodeForField.ts +2 -0
  1050. package/src/simple-tree/index.ts +17 -24
  1051. package/src/simple-tree/leafNodeSchema.ts +1 -0
  1052. package/src/simple-tree/{arrayNode.ts → node-kinds/array/arrayNode.ts} +18 -19
  1053. package/src/simple-tree/{arrayNodeTypes.ts → node-kinds/array/arrayNodeTypes.ts} +3 -3
  1054. package/src/simple-tree/node-kinds/array/index.ts +18 -0
  1055. package/src/simple-tree/node-kinds/index.ts +39 -0
  1056. package/src/simple-tree/node-kinds/map/index.ts +16 -0
  1057. package/src/simple-tree/{mapNode.ts → node-kinds/map/mapNode.ts} +14 -17
  1058. package/src/simple-tree/{mapNodeTypes.ts → node-kinds/map/mapNodeTypes.ts} +3 -3
  1059. package/src/simple-tree/node-kinds/object/index.ts +16 -0
  1060. package/src/simple-tree/{objectNode.ts → node-kinds/object/objectNode.ts} +32 -45
  1061. package/src/simple-tree/{objectNodeTypes.ts → node-kinds/object/objectNodeTypes.ts} +5 -5
  1062. package/src/simple-tree/prepareForInsertion.ts +50 -43
  1063. package/src/simple-tree/schemaTypes.ts +12 -10
  1064. package/src/simple-tree/simpleSchema.ts +1 -0
  1065. package/src/simple-tree/toStoredSchema.ts +10 -3
  1066. package/src/simple-tree/treeNodeValid.ts +3 -3
  1067. package/src/simple-tree/{toMapTree.ts → unhydratedFlexTreeFromInsertable.ts} +138 -249
  1068. package/src/simple-tree/walkFieldSchema.ts +0 -1
  1069. package/src/treeFactory.ts +7 -2
  1070. package/src/util/bTreeUtils.ts +1 -0
  1071. package/src/util/breakable.ts +19 -4
  1072. package/src/util/index.ts +1 -0
  1073. package/src/util/utils.ts +7 -0
  1074. package/dist/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  1075. package/dist/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  1076. package/dist/simple-tree/api/testRecursiveDomain.js +0 -45
  1077. package/dist/simple-tree/api/testRecursiveDomain.js.map +0 -1
  1078. package/dist/simple-tree/arrayNode.d.ts.map +0 -1
  1079. package/dist/simple-tree/arrayNode.js.map +0 -1
  1080. package/dist/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  1081. package/dist/simple-tree/mapNode.d.ts.map +0 -1
  1082. package/dist/simple-tree/mapNode.js.map +0 -1
  1083. package/dist/simple-tree/mapNodeTypes.d.ts.map +0 -1
  1084. package/dist/simple-tree/mapNodeTypes.js.map +0 -1
  1085. package/dist/simple-tree/objectNode.d.ts.map +0 -1
  1086. package/dist/simple-tree/objectNode.js.map +0 -1
  1087. package/dist/simple-tree/objectNodeTypes.d.ts.map +0 -1
  1088. package/dist/simple-tree/objectNodeTypes.js.map +0 -1
  1089. package/dist/simple-tree/toMapTree.d.ts +0 -98
  1090. package/dist/simple-tree/toMapTree.d.ts.map +0 -1
  1091. package/dist/simple-tree/toMapTree.js.map +0 -1
  1092. package/lib/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  1093. package/lib/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  1094. package/lib/simple-tree/api/testRecursiveDomain.js +0 -41
  1095. package/lib/simple-tree/api/testRecursiveDomain.js.map +0 -1
  1096. package/lib/simple-tree/arrayNode.d.ts.map +0 -1
  1097. package/lib/simple-tree/arrayNode.js.map +0 -1
  1098. package/lib/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  1099. package/lib/simple-tree/arrayNodeTypes.js.map +0 -1
  1100. package/lib/simple-tree/mapNode.d.ts.map +0 -1
  1101. package/lib/simple-tree/mapNode.js.map +0 -1
  1102. package/lib/simple-tree/mapNodeTypes.d.ts.map +0 -1
  1103. package/lib/simple-tree/mapNodeTypes.js.map +0 -1
  1104. package/lib/simple-tree/objectNode.d.ts.map +0 -1
  1105. package/lib/simple-tree/objectNode.js.map +0 -1
  1106. package/lib/simple-tree/objectNodeTypes.d.ts.map +0 -1
  1107. package/lib/simple-tree/objectNodeTypes.js.map +0 -1
  1108. package/lib/simple-tree/toMapTree.d.ts +0 -98
  1109. package/lib/simple-tree/toMapTree.d.ts.map +0 -1
  1110. package/lib/simple-tree/toMapTree.js.map +0 -1
  1111. package/src/simple-tree/api/testRecursiveDomain.ts +0 -53
@@ -3,12 +3,12 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import { createEmitter } from "@fluid-internal/client-utils";
6
7
  import type {
7
8
  HasListeners,
8
9
  IEmitter,
9
10
  Listenable,
10
11
  } from "@fluidframework/core-interfaces/internal";
11
- import { createEmitter } from "@fluid-internal/client-utils";
12
12
  import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
13
13
  import { UsageError } from "@fluidframework/telemetry-utils/internal";
14
14
 
@@ -61,9 +61,9 @@ import {
61
61
  type WithBreakable,
62
62
  } from "../util/index.js";
63
63
 
64
+ import { CheckoutFlexTreeView } from "./checkoutFlexTreeView.js";
64
65
  import { canInitialize, ensureSchema, initialize } from "./schematizeTree.js";
65
66
  import type { ITreeCheckout, TreeCheckout } from "./treeCheckout.js";
66
- import { CheckoutFlexTreeView } from "./checkoutFlexTreeView.js";
67
67
 
68
68
  /**
69
69
  * Creating multiple tree views from the same checkout is not supported. This slot is used to detect if one already
@@ -247,28 +247,7 @@ export class SchematizingSimpleTreeView<
247
247
  constraintsOnRevert: boolean,
248
248
  constraints: readonly TransactionConstraint[] = [],
249
249
  ): void => {
250
- for (const constraint of constraints) {
251
- switch (constraint.type) {
252
- case "nodeInDocument": {
253
- const node = getOrCreateInnerNode(constraint.node);
254
- const nodeStatus = getKernel(constraint.node).getStatus();
255
- if (nodeStatus !== TreeStatus.InDocument) {
256
- const revertText = constraintsOnRevert ? " on revert" : "";
257
- throw new UsageError(
258
- `Attempted to add a "nodeInDocument" constraint${revertText}, but the node is not currently in the document. Node status: ${nodeStatus}`,
259
- );
260
- }
261
- if (constraintsOnRevert) {
262
- this.checkout.editor.addNodeExistsConstraintOnRevert(node.anchorNode);
263
- } else {
264
- this.checkout.editor.addNodeExistsConstraint(node.anchorNode);
265
- }
266
- break;
267
- }
268
- default:
269
- unreachableCase(constraint.type);
270
- }
271
- }
250
+ addConstraintsToTransaction(this.checkout, constraintsOnRevert, constraints);
272
251
  };
273
252
 
274
253
  this.checkout.transaction.start();
@@ -520,3 +499,42 @@ export function requireSchema(
520
499
 
521
500
  return view;
522
501
  }
502
+
503
+ /**
504
+ * Adds constraints to a `checkout`'s pending transaction.
505
+ *
506
+ * @param checkout - The checkout's who's transaction will have the constraints added to it.
507
+ * @param constraintsOnRevert - If true, use {@link ISharedTreeEditor.addNodeExistsConstraintOnRevert}.
508
+ * @param constraints - The constraints to add to the transaction.
509
+ *
510
+ * @see {@link RunTransactionParams.preconditions}.
511
+ */
512
+ export function addConstraintsToTransaction(
513
+ checkout: ITreeCheckout,
514
+ constraintsOnRevert: boolean,
515
+ constraints: readonly TransactionConstraint[] = [],
516
+ ): void {
517
+ for (const constraint of constraints) {
518
+ switch (constraint.type) {
519
+ case "nodeInDocument": {
520
+ const node = getOrCreateInnerNode(constraint.node);
521
+ const nodeStatus = getKernel(constraint.node).getStatus();
522
+ if (nodeStatus !== TreeStatus.InDocument) {
523
+ const revertText = constraintsOnRevert ? " on revert" : "";
524
+ throw new UsageError(
525
+ `Attempted to add a "nodeInDocument" constraint${revertText}, but the node is not currently in the document. Node status: ${nodeStatus}`,
526
+ );
527
+ }
528
+ assert(node.isHydrated(), "In document node must be hydrated.");
529
+ if (constraintsOnRevert) {
530
+ checkout.editor.addNodeExistsConstraintOnRevert(node.anchorNode);
531
+ } else {
532
+ checkout.editor.addNodeExistsConstraint(node.anchorNode);
533
+ }
534
+ break;
535
+ }
536
+ default:
537
+ unreachableCase(constraint.type);
538
+ }
539
+ }
540
+ }
@@ -3,13 +3,14 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { assert, fail } from "@fluidframework/core-utils/internal";
7
6
  import type {
8
7
  ErasedType,
9
8
  IFluidHandle,
10
9
  IFluidLoadable,
11
10
  } from "@fluidframework/core-interfaces/internal";
11
+ import { assert, fail } from "@fluidframework/core-utils/internal";
12
12
  import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
13
+ import type { IIdCompressor } from "@fluidframework/id-compressor";
13
14
  import type {
14
15
  IChannelView,
15
16
  IFluidSerializer,
@@ -19,9 +20,13 @@ import {
19
20
  UsageError,
20
21
  type ITelemetryLoggerExt,
21
22
  } from "@fluidframework/telemetry-utils/internal";
22
- import type { IIdCompressor } from "@fluidframework/id-compressor";
23
23
 
24
- import { type ICodecOptions, noopValidator } from "../codec/index.js";
24
+ import {
25
+ type CodecWriteOptions,
26
+ FluidClientVersion,
27
+ type ICodecOptions,
28
+ noopValidator,
29
+ } from "../codec/index.js";
25
30
  import {
26
31
  type FieldKey,
27
32
  type GraphCommit,
@@ -32,6 +37,7 @@ import {
32
37
  MapNodeStoredSchema,
33
38
  ObjectNodeStoredSchema,
34
39
  RevisionTagCodec,
40
+ SchemaVersion,
35
41
  type TaggedChange,
36
42
  type TreeFieldStoredSchema,
37
43
  type TreeNodeSchemaIdentifier,
@@ -42,12 +48,10 @@ import {
42
48
  makeDetachedFieldIndex,
43
49
  moveToDetachedField,
44
50
  } from "../core/index.js";
45
-
46
51
  import {
47
52
  DetachedFieldIndexSummarizer,
48
53
  FieldKinds,
49
54
  ForestSummarizer,
50
- SchemaCodecVersion,
51
55
  SchemaSummarizer,
52
56
  TreeCompressionStrategy,
53
57
  buildChunkedForest,
@@ -59,6 +63,8 @@ import {
59
63
  makeSchemaCodec,
60
64
  makeTreeChunker,
61
65
  } from "../feature-libraries/index.js";
66
+ // eslint-disable-next-line import/no-internal-modules
67
+ import type { Format } from "../feature-libraries/schema-index/index.js";
62
68
  import {
63
69
  type ClonableSchemaAndPolicy,
64
70
  DefaultResubmitMachine,
@@ -86,6 +92,12 @@ import {
86
92
  type ITreeAlpha,
87
93
  type SimpleObjectFieldSchema,
88
94
  } from "../simple-tree/index.js";
95
+ import {
96
+ type Breakable,
97
+ breakingClass,
98
+ type JsonCompatible,
99
+ throwIfBroken,
100
+ } from "../util/index.js";
89
101
 
90
102
  import { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
91
103
  import { SharedTreeReadonlyChangeEnricher } from "./sharedTreeChangeEnricher.js";
@@ -93,14 +105,6 @@ import { SharedTreeChangeFamily } from "./sharedTreeChangeFamily.js";
93
105
  import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
94
106
  import type { SharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
95
107
  import { type TreeCheckout, type BranchableTree, createTreeCheckout } from "./treeCheckout.js";
96
- import {
97
- type Breakable,
98
- breakingClass,
99
- type JsonCompatible,
100
- throwIfBroken,
101
- } from "../util/index.js";
102
- // eslint-disable-next-line import/no-internal-modules
103
- import type { Format } from "../feature-libraries/schema-index/index.js";
104
108
 
105
109
  /**
106
110
  * Copy of data from an {@link ITreePrivate} at some point in time.
@@ -166,7 +170,7 @@ export interface ITreePrivate extends ITreeInternal {
166
170
  */
167
171
  interface ExplicitCodecVersions extends ExplicitCoreCodecVersions {
168
172
  forest: number;
169
- schema: SchemaCodecVersion;
173
+ schema: SchemaVersion;
170
174
  detachedFieldIndex: number;
171
175
  fieldBatch: number;
172
176
  }
@@ -238,7 +242,7 @@ export class SharedTreeKernel
238
242
  const options = { ...defaultSharedTreeOptions, ...optionsParam };
239
243
  const codecVersions = getCodecVersions(options.formatVersion);
240
244
  const schema = new TreeStoredSchemaRepository();
241
- const forest = buildConfiguredForest(options.forest, schema, idCompressor);
245
+ const forest = buildConfiguredForest(breaker, options.forest, schema, idCompressor);
242
246
  const revisionTagCodec = new RevisionTagCodec(idCompressor);
243
247
  const removedRoots = makeDetachedFieldIndex(
244
248
  "repair",
@@ -506,7 +510,7 @@ export function persistedToSimpleSchema(
506
510
  persisted: JsonCompatible,
507
511
  options: ICodecOptions,
508
512
  ): SimpleTreeSchema {
509
- const schemaCodec = makeSchemaCodec(options, SchemaCodecVersion.v1);
513
+ const schemaCodec = makeSchemaCodec(options, SchemaVersion.v1);
510
514
  const stored = schemaCodec.decode(persisted as Format);
511
515
  return exportSimpleSchema(stored);
512
516
  }
@@ -586,9 +590,9 @@ export type SharedTreeFormatVersion = typeof SharedTreeFormatVersion;
586
590
 
587
591
  /**
588
592
  * Configuration options for SharedTree.
589
- * @alpha
593
+ * @alpha @input
590
594
  */
591
- export type SharedTreeOptions = Partial<ICodecOptions> &
595
+ export type SharedTreeOptions = Partial<CodecWriteOptions> &
592
596
  Partial<SharedTreeFormatOptions> &
593
597
  ForestOptions;
594
598
 
@@ -646,7 +650,10 @@ export interface ForestType extends ErasedType<"ForestType"> {}
646
650
  * The "ObjectForest" forest type.
647
651
  * @alpha
648
652
  */
649
- export const ForestTypeReference = toForestType(() => buildForest());
653
+ export const ForestTypeReference = toForestType(
654
+ (breaker: Breakable, schema: TreeStoredSchemaSubscription, idCompressor: IIdCompressor) =>
655
+ buildForest(breaker, schema),
656
+ );
650
657
 
651
658
  /**
652
659
  * Optimized implementation of forest.
@@ -658,7 +665,7 @@ export const ForestTypeReference = toForestType(() => buildForest());
658
665
  * @alpha
659
666
  */
660
667
  export const ForestTypeOptimized = toForestType(
661
- (schema: TreeStoredSchemaSubscription, idCompressor: IIdCompressor) =>
668
+ (breaker: Breakable, schema: TreeStoredSchemaSubscription, idCompressor: IIdCompressor) =>
662
669
  buildChunkedForest(makeTreeChunker(schema, defaultSchemaPolicy), undefined, idCompressor),
663
670
  );
664
671
 
@@ -671,9 +678,13 @@ export const ForestTypeOptimized = toForestType(
671
678
  * The "ObjectForest" forest type with expensive asserts for debugging.
672
679
  * @alpha
673
680
  */
674
- export const ForestTypeExpensiveDebug = toForestType(() => buildForest(undefined, true));
681
+ export const ForestTypeExpensiveDebug = toForestType(
682
+ (breaker: Breakable, schema: TreeStoredSchemaSubscription) =>
683
+ buildForest(breaker, schema, undefined, true),
684
+ );
675
685
 
676
686
  type ForestFactory = (
687
+ breaker: Breakable,
677
688
  schema: TreeStoredSchemaSubscription,
678
689
  idCompressor: IIdCompressor,
679
690
  ) => IEditableForest;
@@ -686,15 +697,17 @@ function toForestType(factory: ForestFactory): ForestType {
686
697
  * Build and return a forest of the requested type.
687
698
  */
688
699
  export function buildConfiguredForest(
700
+ breaker: Breakable,
689
701
  factory: ForestType,
690
702
  schema: TreeStoredSchemaSubscription,
691
703
  idCompressor: IIdCompressor,
692
704
  ): IEditableForest {
693
- return (factory as unknown as ForestFactory)(schema, idCompressor);
705
+ return (factory as unknown as ForestFactory)(breaker, schema, idCompressor);
694
706
  }
695
707
 
696
708
  export const defaultSharedTreeOptions: Required<SharedTreeOptionsInternal> = {
697
709
  jsonValidator: noopValidator,
710
+ oldestCompatibleClient: FluidClientVersion.v2_0,
698
711
  forest: ForestTypeReference,
699
712
  treeEncodeType: TreeCompressionStrategy.Compressed,
700
713
  formatVersion: SharedTreeFormatVersion.v3,
@@ -4,6 +4,7 @@
4
4
  */
5
5
 
6
6
  import { assert, fail } from "@fluidframework/core-utils/internal";
7
+ import type { IIdCompressor } from "@fluidframework/id-compressor";
7
8
 
8
9
  import type { ICodecFamily, ICodecOptions } from "../codec/index.js";
9
10
  import {
@@ -38,7 +39,6 @@ import {
38
39
  import { makeSharedTreeChangeCodecFamily } from "./sharedTreeChangeCodecs.js";
39
40
  import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
40
41
  import { SharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
41
- import type { IIdCompressor } from "@fluidframework/id-compressor";
42
42
 
43
43
  /**
44
44
  * Implementation of {@link ChangeFamily} that combines edits to fields and schema changes.
@@ -3,10 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { unreachableCase } from "@fluidframework/core-utils/internal";
7
6
  import { UsageError } from "@fluidframework/telemetry-utils/internal";
8
7
 
9
- import { TreeStatus } from "../feature-libraries/index.js";
10
8
  import {
11
9
  type ImplicitFieldSchema,
12
10
  type TreeNode,
@@ -18,9 +16,12 @@ import {
18
16
  type TransactionConstraint,
19
17
  } from "../simple-tree/index.js";
20
18
 
21
- import { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
22
- import type { ITreeCheckout } from "./treeCheckout.js";
23
19
  import { getCheckoutFlexTreeView } from "./checkoutFlexTreeView.js";
20
+ import {
21
+ addConstraintsToTransaction,
22
+ SchematizingSimpleTreeView,
23
+ } from "./schematizingTreeView.js";
24
+ import type { ITreeCheckout } from "./treeCheckout.js";
24
25
 
25
26
  /**
26
27
  * Provides various functions for interacting with {@link TreeNode}s.
@@ -463,23 +464,7 @@ function runTransactionInCheckout<TResult>(
463
464
  preconditions: readonly TransactionConstraint[],
464
465
  ): TResult | typeof rollback {
465
466
  checkout.transaction.start();
466
- for (const constraint of preconditions) {
467
- switch (constraint.type) {
468
- case "nodeInDocument": {
469
- const node = getOrCreateInnerNode(constraint.node);
470
- const nodeStatus = Tree.status(constraint.node);
471
- if (nodeStatus !== TreeStatus.InDocument) {
472
- throw new UsageError(
473
- `Attempted to add a "nodeInDocument" constraint, but the node is not currently in the document. Node status: ${nodeStatus}`,
474
- );
475
- }
476
- checkout.editor.addNodeExistsConstraint(node.anchorNode);
477
- break;
478
- }
479
- default:
480
- unreachableCase(constraint.type);
481
- }
482
- }
467
+ addConstraintsToTransaction(checkout, false, preconditions);
483
468
 
484
469
  let result: ReturnType<typeof transaction>;
485
470
  try {
@@ -16,8 +16,6 @@ import {
16
16
  TreeBeta,
17
17
  tryGetSchema,
18
18
  createFromCursor,
19
- createFromInsertable,
20
- cursorFromInsertable,
21
19
  FieldKind,
22
20
  normalizeFieldSchema,
23
21
  type ImplicitFieldSchema,
@@ -39,10 +37,12 @@ import {
39
37
  getStoredKey,
40
38
  getPropertyKeyFromStoredKey,
41
39
  treeNodeApi,
42
- mapTreeFromNodeData,
40
+ getIdentifierFromNode,
41
+ unhydratedFlexTreeFromInsertable,
42
+ getOrCreateNodeFromInnerNode,
43
43
  } from "../simple-tree/index.js";
44
- import type { JsonCompatible } from "../util/index.js";
45
- import { noopValidator, type FluidClientVersion, type ICodecOptions } from "../codec/index.js";
44
+ import { extractFromOpaque, type JsonCompatible } from "../util/index.js";
45
+ import type { CodecWriteOptions, ICodecOptions } from "../codec/index.js";
46
46
  import type { ITreeCursorSynchronous } from "../core/index.js";
47
47
  import {
48
48
  cursorForMapTreeField,
@@ -54,11 +54,122 @@ import {
54
54
  type FieldBatch,
55
55
  type FieldBatchEncodingContext,
56
56
  fluidVersionToFieldBatchCodecWriteVersion,
57
+ type LocalNodeIdentifier,
57
58
  } from "../feature-libraries/index.js";
58
59
  import { independentInitializedView, type ViewContent } from "./independentView.js";
59
60
  import { SchematizingSimpleTreeView, ViewSlot } from "./schematizingTreeView.js";
60
- import { currentVersion } from "../codec/index.js";
61
- import { createFromMapTree } from "../simple-tree/index.js";
61
+ import { currentVersion, noopValidator } from "../codec/index.js";
62
+
63
+ const identifier: TreeIdentifierUtils = (node: TreeNode): string | undefined => {
64
+ const nodeIdentifier = getIdentifierFromNode(node, "uncompressed");
65
+ if (typeof nodeIdentifier === "number") {
66
+ throw new TypeError("identifier should be uncompressed.");
67
+ }
68
+ return nodeIdentifier;
69
+ };
70
+
71
+ identifier.shorten = (branch: TreeBranch, nodeIdentifier: string): number | undefined => {
72
+ const nodeKeyManager = (branch as SchematizingSimpleTreeView<ImplicitFieldSchema>)
73
+ .nodeKeyManager;
74
+ const localNodeKey = nodeKeyManager.tryLocalizeNodeIdentifier(nodeIdentifier);
75
+ return localNodeKey !== undefined ? extractFromOpaque(localNodeKey) : undefined;
76
+ };
77
+
78
+ identifier.lengthen = (branch: TreeBranch, nodeIdentifier: number): string => {
79
+ const nodeKeyManager = (branch as SchematizingSimpleTreeView<ImplicitFieldSchema>)
80
+ .nodeKeyManager;
81
+ return nodeKeyManager.stabilizeNodeIdentifier(
82
+ nodeIdentifier as unknown as LocalNodeIdentifier,
83
+ );
84
+ };
85
+
86
+ identifier.getShort = (node: TreeNode): number | undefined => {
87
+ const shortIdentifier = getIdentifierFromNode(node, "compressed");
88
+ return typeof shortIdentifier === "number" ? shortIdentifier : undefined;
89
+ };
90
+
91
+ identifier.create = (branch: TreeBranch): string => {
92
+ const nodeKeyManager = (branch as SchematizingSimpleTreeView<ImplicitFieldSchema>)
93
+ .nodeKeyManager;
94
+ return nodeKeyManager.stabilizeNodeIdentifier(nodeKeyManager.generateLocalNodeIdentifier());
95
+ };
96
+
97
+ Object.freeze(identifier);
98
+
99
+ /**
100
+ * A utility interface for retrieving or converting node identifiers.
101
+ *
102
+ * @remarks
103
+ * This provides methods to:
104
+ *
105
+ * - Retrieve long or short identifiers from nodes
106
+ *
107
+ * - Convert between long identifiers and short identifiers
108
+ *
109
+ * - Generates long identifiers
110
+ *
111
+ * @alpha @sealed
112
+ */
113
+ export interface TreeIdentifierUtils {
114
+ /**
115
+ * Returns the contents of a node's {@link SchemaFactory.identifier} field as a stable identifier.
116
+ * If the identifier field does not exist, returns undefined.
117
+ *
118
+ * @param node - The TreeNode you want to get the identifier from,
119
+ */
120
+ (node: TreeNode): string | undefined;
121
+
122
+ /**
123
+ * Returns the shortened identifier as a number given long identifier known by the id compressor on the branch if possible.
124
+ * Otherwise, it will return the original string identifier provided.
125
+ * If the id does not exist, or is unknown by the id compressor, it returns undefined.
126
+ *
127
+ * This method is the inverse of {@link TreeIdentifierUtils.lengthen}. If you shorten an identifier
128
+ * and then immediately pass it to {@link TreeIdentifierUtils.lengthen}, you will get the original string back.
129
+ *
130
+ * @param branch - TreeBranch from where you get the idCompressor to do the decompression.
131
+ * @param nodeIdentifier - the stable identifier that needs to be shortened.
132
+ */
133
+ shorten(branch: TreeBranch, nodeIdentifier: string): number | undefined;
134
+
135
+ /**
136
+ * Returns the stable id as a string if the identifier is decompressible and known by the id compressor. Otherwise, it will throw an error.
137
+ *
138
+ * This method is the inverse of {@link TreeIdentifierUtils.shorten}. If you lengthen an identifier
139
+ * and then immediately pass it to {@link TreeIdentifierUtils.shorten}, you will get the original short identifier back.
140
+ *
141
+ * @param branch - TreeBranch from where you want to get the id compressor to do the decompression.
142
+ * @param nodeIdentifier - The local identifier that needs to be expanded.
143
+ */
144
+ lengthen(branch: TreeBranch, nodeIdentifier: number): string;
145
+
146
+ /**
147
+ * Returns the {@link SchemaFactory.identifier | identifier} of the given node in the most compressed form possible.
148
+ * @remarks
149
+ * If the node is {@link Unhydrated | hydrated} and its identifier is a valid UUID that was automatically generated by the SharedTree it is part of (or something else using the same {@link @fluidframework/id-compressor#IIdCompressor}), then this will return a process-unique integer corresponding to that identifier.
150
+ * This is useful for performance-sensitive scenarios involving many nodes with identifiers that need to be compactly retained in memory or used for efficient lookup.
151
+ * Note that automatically generated identifiers that were accessed before the node was hydrated will return the generated UUID, not the process-unique integer.
152
+ *
153
+ * If the node's identifier is any other user-provided string, then this will return undefined.
154
+ *
155
+ * If the node has no identifier (that is, it has no {@link SchemaFactory.identifier | identifier} field), then this returns `undefined`.
156
+ *
157
+ * If the node has more than one identifier, then this will throw an error.
158
+ *
159
+ * The returned integer should not be serialized or preserved outside of the current process.
160
+ * Its lifetime is that of the current in-memory instance of the FF container for this client, and it is not guaranteed to be unique or stable outside of that context.
161
+ * The same node's identifier may, for example, be different across multiple sessions for the same client and document, or different across two clients in the same session.
162
+ */
163
+ getShort(node: TreeNode): number | undefined;
164
+
165
+ /**
166
+ * Creates and returns a long identifier.
167
+ * The long identifier is a compressible, stable identifier generated by the tree's ID compressor.
168
+ *
169
+ * @param branch - TreeBranch from where you want to get the id compressor to generate the identifier from.
170
+ */
171
+ create(branch: TreeBranch): string;
172
+ }
62
173
 
63
174
  /**
64
175
  * Extensions to {@link (Tree:interface)} and {@link (TreeBeta:interface)} which are not yet stable.
@@ -180,11 +291,14 @@ export interface TreeAlpha {
180
291
  * Additionally using `createIdCompressor` to make an idCompressor is `@legacy` and thus not intended for use in this API surface.
181
292
  * It would probably make more sense if we provided a way to get an idCompressor from the context of a node,
182
293
  * which could be optional (and settable if missing) for un0hydrated nodes and required for hydrated ones.
183
- * Add in a stable public APi for creating idCompressors, and a way to get them from a tree (without view schema), and that should address the anticipated use-cases.
294
+ * Add in a stable public API for creating idCompressors, and a way to get them from a tree (without view schema), and that should address the anticipated use-cases.
184
295
  */
185
296
  exportCompressed(
186
297
  tree: TreeNode | TreeLeafValue,
187
- options: { oldestCompatibleClient: FluidClientVersion; idCompressor?: IIdCompressor },
298
+ options: { idCompressor?: IIdCompressor } & Pick<
299
+ CodecWriteOptions,
300
+ "oldestCompatibleClient"
301
+ >,
188
302
  ): JsonCompatible<IFluidHandle>;
189
303
 
190
304
  /**
@@ -212,6 +326,11 @@ export interface TreeAlpha {
212
326
  options: { idCompressor?: IIdCompressor } & ICodecOptions,
213
327
  ): Unhydrated<TreeFieldFromImplicitField<TSchema>>;
214
328
 
329
+ /**
330
+ * APIs for creating, converting, and retrieving identifiers.
331
+ */
332
+ readonly identifier: TreeIdentifierUtils;
333
+
215
334
  /**
216
335
  * The key of the given node under its parent.
217
336
  * @remarks
@@ -251,8 +370,11 @@ export const TreeAlpha: TreeAlpha = {
251
370
  ? TreeFieldFromImplicitField<TSchema>
252
371
  : TreeNode | TreeLeafValue | undefined
253
372
  > {
254
- const mapTree = mapTreeFromNodeData(data as InsertableField<UnsafeUnknownSchema>, schema);
255
- const result = mapTree === undefined ? undefined : createFromMapTree(schema, mapTree);
373
+ const mapTree = unhydratedFlexTreeFromInsertable(
374
+ data as InsertableField<UnsafeUnknownSchema>,
375
+ schema,
376
+ );
377
+ const result = mapTree === undefined ? undefined : getOrCreateNodeFromInnerNode(mapTree);
256
378
  return result as Unhydrated<
257
379
  TSchema extends ImplicitFieldSchema
258
380
  ? TreeFieldFromImplicitField<TSchema>
@@ -270,14 +392,10 @@ export const TreeAlpha: TreeAlpha = {
270
392
  ? TreeFieldFromImplicitField<TSchema>
271
393
  : TreeNode | TreeLeafValue | undefined
272
394
  > {
273
- return createFromInsertable<UnsafeUnknownSchema>(
274
- schema,
275
- data as InsertableField<UnsafeUnknownSchema>,
276
- ) as Unhydrated<
277
- TSchema extends ImplicitFieldSchema
278
- ? TreeFieldFromImplicitField<TSchema>
279
- : TreeNode | TreeLeafValue | undefined
280
- >;
395
+ // `importConcise` does not need to support all the formats that `create` does.
396
+ // Perhaps it should error instead of hydrating nodes for example.
397
+ // For now however, it is a simple wrapper around `create`.
398
+ return this.create(schema, data as InsertableField<TSchema>);
281
399
  },
282
400
 
283
401
  importVerbose<const TSchema extends ImplicitFieldSchema>(
@@ -314,10 +432,10 @@ export const TreeAlpha: TreeAlpha = {
314
432
 
315
433
  exportCompressed(
316
434
  node: TreeNode | TreeLeafValue,
317
- options: {
318
- oldestCompatibleClient: FluidClientVersion;
319
- idCompressor?: IIdCompressor;
320
- },
435
+ options: { idCompressor?: IIdCompressor } & Pick<
436
+ CodecWriteOptions,
437
+ "oldestCompatibleClient"
438
+ >,
321
439
  ): JsonCompatible<IFluidHandle> {
322
440
  const schema = tryGetSchema(node) ?? fail(0xacf /* invalid input */);
323
441
  const format = fluidVersionToFieldBatchCodecWriteVersion(options.oldestCompatibleClient);
@@ -353,6 +471,8 @@ export const TreeAlpha: TreeAlpha = {
353
471
  return TreeBeta.clone<TSchema>(view.root);
354
472
  },
355
473
 
474
+ identifier,
475
+
356
476
  key2(node: TreeNode): string | number | undefined {
357
477
  // If the parent is undefined, then this node is under the root field,
358
478
  const parent = treeNodeApi.parent(node);
@@ -396,25 +516,35 @@ function exportConcise(
396
516
  );
397
517
  }
398
518
 
519
+ /**
520
+ * Borrow a cursor from a node.
521
+ * @remarks
522
+ * The cursor must be put back to its original location before the node is used again.
523
+ */
399
524
  function borrowCursorFromTreeNodeOrValue(
400
525
  node: TreeNode | TreeLeafValue,
401
526
  ): ITreeCursorSynchronous {
402
527
  if (isTreeValue(node)) {
403
- return cursorFromInsertable<UnsafeUnknownSchema>(
404
- tryGetSchema(node) ?? fail(0xad0 /* missing schema */),
405
- node,
406
- );
528
+ return cursorFromVerbose(node, {});
407
529
  }
408
530
  const kernel = getKernel(node);
409
531
  const cursor = kernel.getOrCreateInnerNode().borrowCursor();
410
532
  return cursor;
411
533
  }
412
534
 
535
+ /**
536
+ * Borrow a cursor from a field.
537
+ * @remarks
538
+ * The cursor must be put back to its original location before the node is used again.
539
+ */
413
540
  function borrowFieldCursorFromTreeNodeOrValue(
414
- node: TreeNode | TreeLeafValue,
541
+ node: TreeNode | TreeLeafValue | undefined,
415
542
  ): ITreeCursorSynchronous {
543
+ if (node === undefined) {
544
+ return cursorForMapTreeField([]);
545
+ }
416
546
  const cursor = borrowCursorFromTreeNodeOrValue(node);
417
- // TODO: avoid copy
547
+ // TODO: avoid copy: borrow cursor from field instead.
418
548
  const mapTree = mapTreeFromCursor(cursor);
419
549
  return cursorForMapTreeField([mapTree]);
420
550
  }
@@ -11,7 +11,7 @@ import {
11
11
  UsageError,
12
12
  type ITelemetryLoggerExt,
13
13
  } from "@fluidframework/telemetry-utils/internal";
14
- import { noopValidator } from "../codec/index.js";
14
+ import { FluidClientVersion, noopValidator } from "../codec/index.js";
15
15
  import {
16
16
  type Anchor,
17
17
  type AnchorLocator,
@@ -276,9 +276,13 @@ export function createTreeCheckout(
276
276
  disposeForksAfterTransaction?: boolean;
277
277
  },
278
278
  ): TreeCheckout {
279
- const forest = args?.forest ?? buildForest();
279
+ const breaker = args?.breaker ?? new Breakable("TreeCheckout");
280
280
  const schema = args?.schema ?? new TreeStoredSchemaRepository();
281
- const defaultCodecOptions = { jsonValidator: noopValidator };
281
+ const forest = args?.forest ?? buildForest(breaker, schema);
282
+ const defaultCodecOptions = {
283
+ jsonValidator: noopValidator,
284
+ oldestCompatibleClient: FluidClientVersion.v2_0,
285
+ };
282
286
  const defaultFieldBatchVersion = 1;
283
287
  const changeFamily =
284
288
  args?.changeFamily ??
@@ -286,7 +290,7 @@ export function createTreeCheckout(
286
290
  revisionTagCodec,
287
291
  args?.fieldBatchCodec ??
288
292
  makeFieldBatchCodec(defaultCodecOptions, defaultFieldBatchVersion),
289
- { jsonValidator: noopValidator },
293
+ defaultCodecOptions,
290
294
  args?.chunkCompressionStrategy,
291
295
  idCompressor,
292
296
  );
@@ -312,7 +316,7 @@ export function createTreeCheckout(
312
316
  idCompressor,
313
317
  args?.removedRoots,
314
318
  args?.logger,
315
- args?.breaker,
319
+ breaker,
316
320
  args?.disposeForksAfterTransaction,
317
321
  );
318
322
  }
@@ -3,6 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import { createEmitter } from "@fluid-internal/client-utils";
7
+ import type { Listenable } from "@fluidframework/core-interfaces";
6
8
  import { assert } from "@fluidframework/core-utils/internal";
7
9
  import { type TelemetryEventBatcher, measure } from "@fluidframework/telemetry-utils/internal";
8
10
 
@@ -21,9 +23,6 @@ import {
21
23
  tagRollbackInverse,
22
24
  type RebaseStatsWithDuration,
23
25
  } from "../core/index.js";
24
- import type { Listenable } from "@fluidframework/core-interfaces";
25
- import { createEmitter } from "@fluid-internal/client-utils";
26
-
27
26
  import { hasSome, defineLazyCachedProperty } from "../util/index.js";
28
27
 
29
28
  /**
@@ -171,7 +170,7 @@ export class SharedTreeBranch<TEditor extends ChangeFamilyEditor, TChange> {
171
170
  }
172
171
 
173
172
  /**
174
- * @returns the commit at the head of this branch.
173
+ * Gets the commit at the head of this branch.
175
174
  */
176
175
  public getHead(): GraphCommit<TChange> {
177
176
  return this.head;