@fluidframework/tree 2.110.0 → 2.112.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 (598) hide show
  1. package/.vscode/settings.json +1 -0
  2. package/CHANGELOG.md +193 -0
  3. package/api-report/tree.alpha.api.md +96 -36
  4. package/api-report/tree.beta.api.md +39 -1
  5. package/api-report/tree.legacy.beta.api.md +39 -1
  6. package/api-report/tree.legacy.public.api.md +1 -1
  7. package/api-report/tree.public.api.md +1 -1
  8. package/dist/componentApi.d.ts +198 -0
  9. package/dist/componentApi.d.ts.map +1 -0
  10. package/dist/componentApi.js +138 -0
  11. package/dist/componentApi.js.map +1 -0
  12. package/dist/core/change-family/changeFamily.d.ts +3 -10
  13. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  14. package/dist/core/change-family/changeFamily.js.map +1 -1
  15. package/dist/core/rebase/types.d.ts +2 -2
  16. package/dist/core/rebase/types.js.map +1 -1
  17. package/dist/core/schema-stored/storedSchemaRepository.d.ts +2 -2
  18. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  19. package/dist/entrypoints/alpha.d.ts +1 -1
  20. package/dist/entrypoints/alpha.d.ts.map +1 -1
  21. package/dist/entrypoints/alpha.js +4 -2
  22. package/dist/entrypoints/alpha.js.map +1 -1
  23. package/dist/entrypoints/beta.d.ts +1 -1
  24. package/dist/entrypoints/beta.d.ts.map +1 -1
  25. package/dist/entrypoints/beta.js.map +1 -1
  26. package/dist/entrypoints/legacy.d.ts +1 -1
  27. package/dist/entrypoints/legacy.d.ts.map +1 -1
  28. package/dist/entrypoints/legacy.js.map +1 -1
  29. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -20
  30. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  31. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +13 -32
  32. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  33. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -2
  34. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  35. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  36. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +73 -28
  37. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  38. package/dist/feature-libraries/chunked-forest/codec/codecs.js +76 -9
  39. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  40. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +4 -2
  41. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  42. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +11 -0
  43. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  44. package/dist/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  45. package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  46. package/dist/feature-libraries/chunked-forest/codec/index.js +2 -1
  47. package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  48. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +1 -1
  49. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  50. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js +3 -15
  51. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  52. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
  53. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  54. package/dist/feature-libraries/chunked-forest/index.js +2 -1
  55. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  56. package/dist/feature-libraries/forest-summary/codec.d.ts +3 -3
  57. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  58. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  59. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -2
  60. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  61. package/dist/feature-libraries/forest-summary/forestSummarizer.js +4 -6
  62. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  63. package/dist/feature-libraries/index.d.ts +3 -3
  64. package/dist/feature-libraries/index.d.ts.map +1 -1
  65. package/dist/feature-libraries/index.js +4 -2
  66. package/dist/feature-libraries/index.js.map +1 -1
  67. package/dist/feature-libraries/modular-schema/index.d.ts +1 -0
  68. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  69. package/dist/feature-libraries/modular-schema/index.js +3 -1
  70. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  71. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts +25 -0
  72. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -0
  73. package/dist/feature-libraries/modular-schema/minimizeModularChange.js +29 -0
  74. package/dist/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -0
  75. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  76. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +9 -9
  77. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  78. package/dist/feature-libraries/schemaChecker.d.ts +22 -3
  79. package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
  80. package/dist/feature-libraries/schemaChecker.js +48 -5
  81. package/dist/feature-libraries/schemaChecker.js.map +1 -1
  82. package/dist/index.d.ts +4 -3
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +6 -2
  85. package/dist/index.js.map +1 -1
  86. package/dist/packageVersion.d.ts +1 -1
  87. package/dist/packageVersion.js +1 -1
  88. package/dist/packageVersion.js.map +1 -1
  89. package/dist/shared-tree/independentView.d.ts +17 -4
  90. package/dist/shared-tree/independentView.d.ts.map +1 -1
  91. package/dist/shared-tree/independentView.js +15 -12
  92. package/dist/shared-tree/independentView.js.map +1 -1
  93. package/dist/shared-tree/index.d.ts +3 -2
  94. package/dist/shared-tree/index.d.ts.map +1 -1
  95. package/dist/shared-tree/index.js +3 -1
  96. package/dist/shared-tree/index.js.map +1 -1
  97. package/dist/shared-tree/schematizingTreeView.d.ts +6 -5
  98. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  99. package/dist/shared-tree/schematizingTreeView.js +6 -3
  100. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  101. package/dist/shared-tree/serializedChange.d.ts +41 -0
  102. package/dist/shared-tree/serializedChange.d.ts.map +1 -0
  103. package/dist/shared-tree/serializedChange.js +87 -0
  104. package/dist/shared-tree/serializedChange.js.map +1 -0
  105. package/dist/shared-tree/sharedTree.d.ts +18 -0
  106. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  107. package/dist/shared-tree/sharedTree.js +9 -4
  108. package/dist/shared-tree/sharedTree.js.map +1 -1
  109. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +7 -0
  110. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  111. package/dist/shared-tree/sharedTreeChangeFamily.js +8 -1
  112. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  113. package/dist/shared-tree/transactionMinimize.d.ts +35 -0
  114. package/dist/shared-tree/transactionMinimize.d.ts.map +1 -0
  115. package/dist/shared-tree/transactionMinimize.js +65 -0
  116. package/dist/shared-tree/transactionMinimize.js.map +1 -0
  117. package/dist/shared-tree/transactionPostProcessor.d.ts +28 -0
  118. package/dist/shared-tree/transactionPostProcessor.d.ts.map +1 -0
  119. package/dist/shared-tree/transactionPostProcessor.js +28 -0
  120. package/dist/shared-tree/transactionPostProcessor.js.map +1 -0
  121. package/dist/shared-tree/treeAlpha.js +3 -3
  122. package/dist/shared-tree/treeAlpha.js.map +1 -1
  123. package/dist/shared-tree/treeCheckout.d.ts +19 -13
  124. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  125. package/dist/shared-tree/treeCheckout.js +54 -71
  126. package/dist/shared-tree/treeCheckout.js.map +1 -1
  127. package/dist/shared-tree/unhydratedTreeContext.d.ts +5 -5
  128. package/dist/shared-tree/unhydratedTreeContext.d.ts.map +1 -1
  129. package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
  130. package/dist/shared-tree-core/editManager.d.ts +6 -3
  131. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  132. package/dist/shared-tree-core/editManager.js +35 -14
  133. package/dist/shared-tree-core/editManager.js.map +1 -1
  134. package/dist/shared-tree-core/editManagerCodecs.d.ts +3 -2
  135. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  136. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  137. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +3 -9
  138. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  139. package/dist/shared-tree-core/editManagerCodecsCommons.js +2 -4
  140. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  141. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +3 -3
  142. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  143. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  144. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +3 -3
  145. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  146. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  147. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +1 -1
  148. package/dist/shared-tree-core/editManagerFormatCommons.js +1 -1
  149. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  150. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  151. package/dist/shared-tree-core/editManagerSummarizer.d.ts +5 -9
  152. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  153. package/dist/shared-tree-core/editManagerSummarizer.js +5 -10
  154. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  155. package/dist/shared-tree-core/index.d.ts +1 -1
  156. package/dist/shared-tree-core/index.d.ts.map +1 -1
  157. package/dist/shared-tree-core/index.js +3 -2
  158. package/dist/shared-tree-core/index.js.map +1 -1
  159. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  160. package/dist/shared-tree-core/messageCodecVSharedBranches.js +8 -2
  161. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  162. package/dist/shared-tree-core/messageFormat.d.ts +1 -1
  163. package/dist/shared-tree-core/messageFormat.js +1 -1
  164. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  165. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +10 -1
  166. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  167. package/dist/shared-tree-core/messageFormatVSharedBranches.js +1 -0
  168. package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  169. package/dist/shared-tree-core/messageTypes.d.ts +1 -0
  170. package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
  171. package/dist/shared-tree-core/messageTypes.js.map +1 -1
  172. package/dist/shared-tree-core/sharedTreeCore.d.ts +9 -3
  173. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  174. package/dist/shared-tree-core/sharedTreeCore.js +27 -12
  175. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  176. package/dist/shared-tree-core/transaction.d.ts +84 -9
  177. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  178. package/dist/shared-tree-core/transaction.js +88 -7
  179. package/dist/shared-tree-core/transaction.js.map +1 -1
  180. package/dist/simple-tree/api/index.d.ts +2 -2
  181. package/dist/simple-tree/api/index.d.ts.map +1 -1
  182. package/dist/simple-tree/api/index.js +2 -2
  183. package/dist/simple-tree/api/index.js.map +1 -1
  184. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +9 -24
  185. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  186. package/dist/simple-tree/api/schemaCompatibilityTester.js +31 -44
  187. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  188. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +3 -3
  189. package/dist/simple-tree/api/schemaCreationUtilities.js +3 -3
  190. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  191. package/dist/simple-tree/api/schemaFactory.d.ts +1 -1
  192. package/dist/simple-tree/api/schemaFactory.js +2 -2
  193. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  194. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +56 -15
  195. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  196. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  197. package/dist/simple-tree/api/schemaFactoryBeta.d.ts +0 -3
  198. package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  199. package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  200. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +2 -2
  201. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  202. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +3 -4
  203. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  204. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  205. package/dist/simple-tree/api/storedSchema.js +1 -2
  206. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  207. package/dist/simple-tree/api/transactionTypes.d.ts +91 -28
  208. package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
  209. package/dist/simple-tree/api/transactionTypes.js.map +1 -1
  210. package/dist/simple-tree/api/tree.d.ts +108 -24
  211. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  212. package/dist/simple-tree/api/tree.js.map +1 -1
  213. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  214. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  215. package/dist/simple-tree/api/typesUnsafe.d.ts +2 -2
  216. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  217. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  218. package/dist/simple-tree/core/treeNodeSchema.d.ts +7 -7
  219. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  220. package/dist/simple-tree/index.d.ts +1 -1
  221. package/dist/simple-tree/index.d.ts.map +1 -1
  222. package/dist/simple-tree/index.js +2 -2
  223. package/dist/simple-tree/index.js.map +1 -1
  224. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +83 -4
  225. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  226. package/dist/simple-tree/node-kinds/array/arrayNode.js +39 -0
  227. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  228. package/dist/simple-tree/simpleSchemaFormatV1.js +1 -1
  229. package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  230. package/dist/text/index.d.ts +1 -0
  231. package/dist/text/index.d.ts.map +1 -1
  232. package/dist/text/index.js +3 -1
  233. package/dist/text/index.js.map +1 -1
  234. package/dist/text/textDomainFormatted.d.ts +69 -758
  235. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  236. package/dist/text/textDomainFormatted.js +275 -322
  237. package/dist/text/textDomainFormatted.js.map +1 -1
  238. package/dist/text/textDomainFormattedDefault.d.ts +273 -0
  239. package/dist/text/textDomainFormattedDefault.d.ts.map +1 -0
  240. package/dist/text/textDomainFormattedDefault.js +94 -0
  241. package/dist/text/textDomainFormattedDefault.js.map +1 -0
  242. package/dist/treeFactory.js +1 -1
  243. package/dist/treeFactory.js.map +1 -1
  244. package/dist/util/breakable.d.ts +16 -1
  245. package/dist/util/breakable.d.ts.map +1 -1
  246. package/dist/util/breakable.js +9 -1
  247. package/dist/util/breakable.js.map +1 -1
  248. package/dist/util/compressedIds.d.ts +185 -0
  249. package/dist/util/compressedIds.d.ts.map +1 -0
  250. package/dist/util/compressedIds.js +164 -0
  251. package/dist/util/compressedIds.js.map +1 -0
  252. package/dist/util/index.d.ts +2 -1
  253. package/dist/util/index.d.ts.map +1 -1
  254. package/dist/util/index.js +10 -2
  255. package/dist/util/index.js.map +1 -1
  256. package/dist/util/nestedMap.d.ts.map +1 -1
  257. package/dist/util/nestedMap.js +16 -3
  258. package/dist/util/nestedMap.js.map +1 -1
  259. package/dist/util/nestedSet.d.ts +1 -1
  260. package/dist/util/nestedSet.d.ts.map +1 -1
  261. package/dist/util/nestedSet.js.map +1 -1
  262. package/dist/util/utils.d.ts +0 -6
  263. package/dist/util/utils.d.ts.map +1 -1
  264. package/dist/util/utils.js +1 -15
  265. package/dist/util/utils.js.map +1 -1
  266. package/lib/componentApi.d.ts +198 -0
  267. package/lib/componentApi.d.ts.map +1 -0
  268. package/lib/componentApi.js +135 -0
  269. package/lib/componentApi.js.map +1 -0
  270. package/lib/core/change-family/changeFamily.d.ts +3 -10
  271. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  272. package/lib/core/change-family/changeFamily.js.map +1 -1
  273. package/lib/core/rebase/types.d.ts +2 -2
  274. package/lib/core/rebase/types.js.map +1 -1
  275. package/lib/core/schema-stored/storedSchemaRepository.d.ts +2 -2
  276. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  277. package/lib/entrypoints/alpha.d.ts +1 -1
  278. package/lib/entrypoints/alpha.d.ts.map +1 -1
  279. package/lib/entrypoints/alpha.js +1 -1
  280. package/lib/entrypoints/alpha.js.map +1 -1
  281. package/lib/entrypoints/beta.d.ts +1 -1
  282. package/lib/entrypoints/beta.d.ts.map +1 -1
  283. package/lib/entrypoints/beta.js.map +1 -1
  284. package/lib/entrypoints/legacy.d.ts +1 -1
  285. package/lib/entrypoints/legacy.d.ts.map +1 -1
  286. package/lib/entrypoints/legacy.js.map +1 -1
  287. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -20
  288. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  289. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +14 -33
  290. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  291. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -2
  292. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  293. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  294. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +73 -28
  295. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  296. package/lib/feature-libraries/chunked-forest/codec/codecs.js +75 -9
  297. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  298. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +4 -2
  299. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  300. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +12 -1
  301. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  302. package/lib/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  303. package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  304. package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
  305. package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  306. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +1 -1
  307. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  308. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js +3 -15
  309. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  310. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
  311. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  312. package/lib/feature-libraries/chunked-forest/index.js +1 -1
  313. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  314. package/lib/feature-libraries/forest-summary/codec.d.ts +3 -3
  315. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  316. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  317. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -2
  318. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  319. package/lib/feature-libraries/forest-summary/forestSummarizer.js +4 -6
  320. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  321. package/lib/feature-libraries/index.d.ts +3 -3
  322. package/lib/feature-libraries/index.d.ts.map +1 -1
  323. package/lib/feature-libraries/index.js +2 -2
  324. package/lib/feature-libraries/index.js.map +1 -1
  325. package/lib/feature-libraries/modular-schema/index.d.ts +1 -0
  326. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  327. package/lib/feature-libraries/modular-schema/index.js +1 -0
  328. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  329. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts +25 -0
  330. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -0
  331. package/lib/feature-libraries/modular-schema/minimizeModularChange.js +25 -0
  332. package/lib/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -0
  333. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  334. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +10 -10
  335. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  336. package/lib/feature-libraries/schemaChecker.d.ts +22 -3
  337. package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
  338. package/lib/feature-libraries/schemaChecker.js +48 -5
  339. package/lib/feature-libraries/schemaChecker.js.map +1 -1
  340. package/lib/index.d.ts +4 -3
  341. package/lib/index.d.ts.map +1 -1
  342. package/lib/index.js +3 -2
  343. package/lib/index.js.map +1 -1
  344. package/lib/packageVersion.d.ts +1 -1
  345. package/lib/packageVersion.js +1 -1
  346. package/lib/packageVersion.js.map +1 -1
  347. package/lib/shared-tree/independentView.d.ts +17 -4
  348. package/lib/shared-tree/independentView.d.ts.map +1 -1
  349. package/lib/shared-tree/independentView.js +13 -10
  350. package/lib/shared-tree/independentView.js.map +1 -1
  351. package/lib/shared-tree/index.d.ts +3 -2
  352. package/lib/shared-tree/index.d.ts.map +1 -1
  353. package/lib/shared-tree/index.js +1 -0
  354. package/lib/shared-tree/index.js.map +1 -1
  355. package/lib/shared-tree/schematizingTreeView.d.ts +6 -5
  356. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  357. package/lib/shared-tree/schematizingTreeView.js +7 -4
  358. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  359. package/lib/shared-tree/serializedChange.d.ts +41 -0
  360. package/lib/shared-tree/serializedChange.d.ts.map +1 -0
  361. package/lib/shared-tree/serializedChange.js +84 -0
  362. package/lib/shared-tree/serializedChange.js.map +1 -0
  363. package/lib/shared-tree/sharedTree.d.ts +18 -0
  364. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  365. package/lib/shared-tree/sharedTree.js +10 -5
  366. package/lib/shared-tree/sharedTree.js.map +1 -1
  367. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +7 -0
  368. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  369. package/lib/shared-tree/sharedTreeChangeFamily.js +7 -1
  370. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  371. package/lib/shared-tree/transactionMinimize.d.ts +35 -0
  372. package/lib/shared-tree/transactionMinimize.d.ts.map +1 -0
  373. package/lib/shared-tree/transactionMinimize.js +62 -0
  374. package/lib/shared-tree/transactionMinimize.js.map +1 -0
  375. package/lib/shared-tree/transactionPostProcessor.d.ts +28 -0
  376. package/lib/shared-tree/transactionPostProcessor.d.ts.map +1 -0
  377. package/lib/shared-tree/transactionPostProcessor.js +23 -0
  378. package/lib/shared-tree/transactionPostProcessor.js.map +1 -0
  379. package/lib/shared-tree/treeAlpha.js +3 -3
  380. package/lib/shared-tree/treeAlpha.js.map +1 -1
  381. package/lib/shared-tree/treeCheckout.d.ts +19 -13
  382. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  383. package/lib/shared-tree/treeCheckout.js +36 -53
  384. package/lib/shared-tree/treeCheckout.js.map +1 -1
  385. package/lib/shared-tree/unhydratedTreeContext.d.ts +5 -5
  386. package/lib/shared-tree/unhydratedTreeContext.d.ts.map +1 -1
  387. package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
  388. package/lib/shared-tree-core/editManager.d.ts +6 -3
  389. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  390. package/lib/shared-tree-core/editManager.js +36 -15
  391. package/lib/shared-tree-core/editManager.js.map +1 -1
  392. package/lib/shared-tree-core/editManagerCodecs.d.ts +3 -2
  393. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  394. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  395. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +3 -9
  396. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  397. package/lib/shared-tree-core/editManagerCodecsCommons.js +3 -5
  398. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  399. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +3 -3
  400. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  401. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  402. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +3 -3
  403. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  404. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  405. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +1 -1
  406. package/lib/shared-tree-core/editManagerFormatCommons.js +1 -1
  407. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  408. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  409. package/lib/shared-tree-core/editManagerSummarizer.d.ts +5 -9
  410. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  411. package/lib/shared-tree-core/editManagerSummarizer.js +5 -10
  412. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  413. package/lib/shared-tree-core/index.d.ts +1 -1
  414. package/lib/shared-tree-core/index.d.ts.map +1 -1
  415. package/lib/shared-tree-core/index.js +1 -1
  416. package/lib/shared-tree-core/index.js.map +1 -1
  417. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  418. package/lib/shared-tree-core/messageCodecVSharedBranches.js +8 -2
  419. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  420. package/lib/shared-tree-core/messageFormat.d.ts +1 -1
  421. package/lib/shared-tree-core/messageFormat.js +1 -1
  422. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  423. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +10 -1
  424. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  425. package/lib/shared-tree-core/messageFormatVSharedBranches.js +1 -0
  426. package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  427. package/lib/shared-tree-core/messageTypes.d.ts +1 -0
  428. package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
  429. package/lib/shared-tree-core/messageTypes.js.map +1 -1
  430. package/lib/shared-tree-core/sharedTreeCore.d.ts +9 -3
  431. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  432. package/lib/shared-tree-core/sharedTreeCore.js +28 -13
  433. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  434. package/lib/shared-tree-core/transaction.d.ts +84 -9
  435. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  436. package/lib/shared-tree-core/transaction.js +87 -6
  437. package/lib/shared-tree-core/transaction.js.map +1 -1
  438. package/lib/simple-tree/api/index.d.ts +2 -2
  439. package/lib/simple-tree/api/index.d.ts.map +1 -1
  440. package/lib/simple-tree/api/index.js +1 -1
  441. package/lib/simple-tree/api/index.js.map +1 -1
  442. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +9 -24
  443. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  444. package/lib/simple-tree/api/schemaCompatibilityTester.js +29 -42
  445. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  446. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +3 -3
  447. package/lib/simple-tree/api/schemaCreationUtilities.js +3 -3
  448. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  449. package/lib/simple-tree/api/schemaFactory.d.ts +1 -1
  450. package/lib/simple-tree/api/schemaFactory.js +2 -2
  451. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  452. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +56 -15
  453. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  454. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  455. package/lib/simple-tree/api/schemaFactoryBeta.d.ts +0 -3
  456. package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  457. package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  458. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +2 -2
  459. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  460. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +4 -5
  461. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  462. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  463. package/lib/simple-tree/api/storedSchema.js +2 -3
  464. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  465. package/lib/simple-tree/api/transactionTypes.d.ts +91 -28
  466. package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
  467. package/lib/simple-tree/api/transactionTypes.js.map +1 -1
  468. package/lib/simple-tree/api/tree.d.ts +108 -24
  469. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  470. package/lib/simple-tree/api/tree.js.map +1 -1
  471. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  472. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  473. package/lib/simple-tree/api/typesUnsafe.d.ts +2 -2
  474. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  475. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  476. package/lib/simple-tree/core/treeNodeSchema.d.ts +7 -7
  477. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  478. package/lib/simple-tree/index.d.ts +1 -1
  479. package/lib/simple-tree/index.d.ts.map +1 -1
  480. package/lib/simple-tree/index.js +1 -1
  481. package/lib/simple-tree/index.js.map +1 -1
  482. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +83 -4
  483. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  484. package/lib/simple-tree/node-kinds/array/arrayNode.js +39 -0
  485. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  486. package/lib/simple-tree/simpleSchemaFormatV1.js +1 -1
  487. package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  488. package/lib/text/index.d.ts +1 -0
  489. package/lib/text/index.d.ts.map +1 -1
  490. package/lib/text/index.js +1 -0
  491. package/lib/text/index.js.map +1 -1
  492. package/lib/text/textDomainFormatted.d.ts +69 -758
  493. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  494. package/lib/text/textDomainFormatted.js +277 -324
  495. package/lib/text/textDomainFormatted.js.map +1 -1
  496. package/lib/text/textDomainFormattedDefault.d.ts +273 -0
  497. package/lib/text/textDomainFormattedDefault.d.ts.map +1 -0
  498. package/lib/text/textDomainFormattedDefault.js +91 -0
  499. package/lib/text/textDomainFormattedDefault.js.map +1 -0
  500. package/lib/treeFactory.js +1 -1
  501. package/lib/treeFactory.js.map +1 -1
  502. package/lib/util/breakable.d.ts +16 -1
  503. package/lib/util/breakable.d.ts.map +1 -1
  504. package/lib/util/breakable.js +9 -1
  505. package/lib/util/breakable.js.map +1 -1
  506. package/lib/util/compressedIds.d.ts +185 -0
  507. package/lib/util/compressedIds.d.ts.map +1 -0
  508. package/lib/util/compressedIds.js +154 -0
  509. package/lib/util/compressedIds.js.map +1 -0
  510. package/lib/util/index.d.ts +2 -1
  511. package/lib/util/index.d.ts.map +1 -1
  512. package/lib/util/index.js +2 -1
  513. package/lib/util/index.js.map +1 -1
  514. package/lib/util/nestedMap.d.ts.map +1 -1
  515. package/lib/util/nestedMap.js +17 -4
  516. package/lib/util/nestedMap.js.map +1 -1
  517. package/lib/util/nestedSet.d.ts +1 -1
  518. package/lib/util/nestedSet.d.ts.map +1 -1
  519. package/lib/util/nestedSet.js.map +1 -1
  520. package/lib/util/utils.d.ts +0 -6
  521. package/lib/util/utils.d.ts.map +1 -1
  522. package/lib/util/utils.js +0 -13
  523. package/lib/util/utils.js.map +1 -1
  524. package/package.json +23 -23
  525. package/src/componentApi.ts +354 -0
  526. package/src/core/change-family/changeFamily.ts +3 -12
  527. package/src/core/rebase/types.ts +2 -2
  528. package/src/core/schema-stored/storedSchemaRepository.ts +2 -2
  529. package/src/entrypoints/alpha.ts +15 -8
  530. package/src/entrypoints/beta.ts +8 -0
  531. package/src/entrypoints/legacy.ts +8 -0
  532. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +22 -72
  533. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -2
  534. package/src/feature-libraries/chunked-forest/codec/codecs.ts +110 -41
  535. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +32 -4
  536. package/src/feature-libraries/chunked-forest/codec/index.ts +1 -0
  537. package/src/feature-libraries/chunked-forest/codec/nodeEncoder.ts +7 -19
  538. package/src/feature-libraries/chunked-forest/index.ts +3 -0
  539. package/src/feature-libraries/forest-summary/codec.ts +5 -3
  540. package/src/feature-libraries/forest-summary/forestSummarizer.ts +4 -5
  541. package/src/feature-libraries/index.ts +5 -0
  542. package/src/feature-libraries/modular-schema/index.ts +1 -0
  543. package/src/feature-libraries/modular-schema/minimizeModularChange.ts +33 -0
  544. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +13 -9
  545. package/src/feature-libraries/schemaChecker.ts +86 -9
  546. package/src/index.ts +16 -8
  547. package/src/packageVersion.ts +1 -1
  548. package/src/shared-tree/independentView.ts +40 -15
  549. package/src/shared-tree/index.ts +4 -0
  550. package/src/shared-tree/schematizingTreeView.ts +40 -30
  551. package/src/shared-tree/serializedChange.ts +127 -0
  552. package/src/shared-tree/sharedTree.ts +32 -4
  553. package/src/shared-tree/sharedTreeChangeFamily.ts +7 -1
  554. package/src/shared-tree/transactionMinimize.ts +74 -0
  555. package/src/shared-tree/transactionPostProcessor.ts +40 -0
  556. package/src/shared-tree/treeAlpha.ts +3 -3
  557. package/src/shared-tree/treeCheckout.ts +103 -101
  558. package/src/shared-tree/unhydratedTreeContext.ts +18 -15
  559. package/src/shared-tree-core/editManager.ts +42 -6
  560. package/src/shared-tree-core/editManagerCodecs.ts +3 -2
  561. package/src/shared-tree-core/editManagerCodecsCommons.ts +10 -14
  562. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +3 -2
  563. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +3 -2
  564. package/src/shared-tree-core/editManagerFormatCommons.ts +1 -1
  565. package/src/shared-tree-core/editManagerSummarizer.ts +5 -9
  566. package/src/shared-tree-core/index.ts +8 -5
  567. package/src/shared-tree-core/messageCodecVSharedBranches.ts +8 -1
  568. package/src/shared-tree-core/messageFormat.ts +1 -1
  569. package/src/shared-tree-core/messageFormatVSharedBranches.ts +10 -0
  570. package/src/shared-tree-core/messageTypes.ts +1 -0
  571. package/src/shared-tree-core/sharedTreeCore.ts +36 -12
  572. package/src/shared-tree-core/transaction.ts +165 -18
  573. package/src/simple-tree/api/index.ts +14 -10
  574. package/src/simple-tree/api/schemaCompatibilityTester.ts +36 -48
  575. package/src/simple-tree/api/schemaCreationUtilities.ts +3 -3
  576. package/src/simple-tree/api/schemaFactory.ts +2 -2
  577. package/src/simple-tree/api/schemaFactoryAlpha.ts +56 -15
  578. package/src/simple-tree/api/schemaFactoryBeta.ts +0 -3
  579. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +4 -5
  580. package/src/simple-tree/api/storedSchema.ts +2 -3
  581. package/src/simple-tree/api/transactionTypes.ts +111 -39
  582. package/src/simple-tree/api/tree.ts +165 -49
  583. package/src/simple-tree/api/treeBeta.ts +2 -0
  584. package/src/simple-tree/api/typesUnsafe.ts +2 -1
  585. package/src/simple-tree/core/treeNodeSchema.ts +7 -7
  586. package/src/simple-tree/index.ts +13 -9
  587. package/src/simple-tree/node-kinds/array/arrayNode.ts +168 -4
  588. package/src/simple-tree/simpleSchemaFormatV1.ts +1 -1
  589. package/src/text/index.ts +1 -0
  590. package/src/text/textDomainFormatted.ts +520 -415
  591. package/src/text/textDomainFormattedDefault.ts +150 -0
  592. package/src/treeFactory.ts +1 -1
  593. package/src/util/breakable.ts +8 -1
  594. package/src/util/compressedIds.ts +304 -0
  595. package/src/util/index.ts +18 -1
  596. package/src/util/nestedMap.ts +21 -4
  597. package/src/util/nestedSet.ts +1 -1
  598. package/src/util/utils.ts +0 -18
@@ -13,7 +13,7 @@ import { normalizeFieldSchema, type ImplicitFieldSchema } from "../fieldSchema.j
13
13
  import { toStoredSchema } from "../toStoredSchema.js";
14
14
 
15
15
  import { TreeViewConfigurationAlpha } from "./configuration.js";
16
- import { SchemaCompatibilityTester } from "./schemaCompatibilityTester.js";
16
+ import { checkSchemaCompatibility } from "./schemaCompatibilityTester.js";
17
17
  import type { SchemaCompatibilityStatus } from "./tree.js";
18
18
 
19
19
  /**
@@ -104,6 +104,5 @@ export function comparePersistedSchema(
104
104
  const config = new TreeViewConfigurationAlpha({
105
105
  schema: normalizeFieldSchema(view),
106
106
  });
107
- const viewSchema = new SchemaCompatibilityTester(config);
108
- return viewSchema.checkCompatibility(stored);
107
+ return checkSchemaCompatibility(config, stored);
109
108
  }
@@ -3,6 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
+ import type { ErasedType } from "@fluidframework/core-interfaces";
7
+
6
8
  import type { TreeNode } from "../core/index.js";
7
9
 
8
10
  /**
@@ -50,87 +52,148 @@ export interface NoChangeConstraint {
50
52
 
51
53
  /**
52
54
  * Contains a value returned from a transaction.
53
- * @alpha
55
+ * @input
56
+ * @beta
54
57
  */
55
58
  export interface WithValue<TValue> {
56
59
  /** The user-supplied value. */
57
- value: TValue;
60
+ readonly value: TValue;
58
61
  }
59
62
 
60
63
  /**
61
- * Contains a value and status returned from a user-supplied {@link TreeBranchAlpha.(runTransaction:1) | transaction callback}.
62
- * @alpha
64
+ * Contains a value and status returned from a user-supplied {@link TreeViewBeta.runTransaction | transaction callback}.
65
+ * @input
66
+ * @beta
63
67
  */
64
- export type TransactionCallbackStatus<TSuccessValue, TFailureValue> = (
68
+ export type TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> =
65
69
  | (WithValue<TSuccessValue> & {
66
70
  /** Indicates that the transaction callback ran successfully. */
67
- rollback?: false;
71
+ readonly rollback?: false;
68
72
  })
69
73
  | (WithValue<TFailureValue> & {
70
74
  /** Indicates that the transaction callback failed and the transaction should be rolled back. */
71
- rollback: true;
72
- })
73
- ) & {
74
- /**
75
- * An optional list of {@link TransactionConstraintAlpha | constraints} that will be checked when the commit corresponding
76
- * to this transaction is reverted. If any of these constraints are not met when the revert is being applied either
77
- * locally or on remote clients, the revert will be ignored.
78
- * These constraints must also be met at the time they are first introduced. If they are not met after the transaction
79
- * callback returns, then `runTransaction` (which invokes the transaction callback) will throw a `UsageError`.
80
- */
81
- preconditionsOnRevert?: readonly TransactionConstraintAlpha[];
82
- };
75
+ readonly rollback: true;
76
+ });
77
+
78
+ /**
79
+ * The result of a {@link TreeViewBeta.runTransaction | transaction} that doesn't return a value.
80
+ * @input
81
+ * @beta
82
+ */
83
+ export type VoidTransactionCallbackStatusBeta = Omit<
84
+ TransactionCallbackStatusBeta<unknown, unknown>,
85
+ "value"
86
+ >;
87
+
88
+ /**
89
+ * {@link TransactionCallbackStatusBeta} extended with alpha-only {@link TransactionConstraintAlpha | constraint} options.
90
+ * @input
91
+ * @alpha
92
+ */
93
+ export type TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue> =
94
+ TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> & {
95
+ /**
96
+ * An optional list of {@link TransactionConstraintAlpha | constraints} that will be checked when the commit corresponding
97
+ * to this transaction is reverted. If any of these constraints are not met when the revert is being applied either
98
+ * locally or on remote clients, the revert will be ignored.
99
+ * These constraints must also be met at the time they are first introduced. If they are not met after the transaction
100
+ * callback returns, then `runTransaction` (which invokes the transaction callback) will throw a `UsageError`.
101
+ */
102
+ readonly preconditionsOnRevert?: readonly TransactionConstraintAlpha[];
103
+ };
83
104
 
84
105
  /**
85
106
  * The result of a {@link TreeBranchAlpha.(runTransaction:2) | transaction} that doesn't return a value.
107
+ * @input
86
108
  * @alpha
87
109
  */
88
- export type VoidTransactionCallbackStatus = Omit<
89
- TransactionCallbackStatus<unknown, unknown>,
110
+ export type VoidTransactionCallbackStatusAlpha = Omit<
111
+ TransactionCallbackStatusAlpha<unknown, unknown>,
90
112
  "value"
91
113
  >;
92
114
 
93
115
  /**
94
- * The result of a {@link TreeBranchAlpha.(runTransaction:1) | transaction} that completed successfully.
95
- * @alpha
116
+ * The result of a {@link TreeViewBeta.(runTransaction:1) | transaction} that completed successfully.
117
+ * @sealed
118
+ * @beta
96
119
  */
97
120
  export interface TransactionResultSuccess<TSuccessValue> extends WithValue<TSuccessValue> {
98
- /** The success flag for a transaction that completed without being {@link TransactionCallbackStatus | rolled back}. */
99
- success: true;
121
+ /** The success flag for a transaction that completed without being {@link TransactionCallbackStatusBeta | rolled back}. */
122
+ readonly success: true;
100
123
  }
101
124
 
102
125
  /**
103
- * The result of a {@link TreeBranchAlpha.(runTransaction:1) | transaction} that was rolled back.
104
- * @alpha
126
+ * The result of a {@link TreeViewBeta.runTransaction | transaction} that was rolled back.
127
+ * @sealed
128
+ * @beta
105
129
  */
106
130
  export interface TransactionResultFailed<TFailureValue> extends WithValue<TFailureValue> {
107
- /** The failure flag for a transaction that was {@link TransactionCallbackStatus | rolled back}. */
108
- success: false;
131
+ /** The failure flag for a transaction that was {@link TransactionCallbackStatusBeta | rolled back}. */
132
+ readonly success: false;
109
133
  }
110
134
 
111
135
  /**
112
136
  * The result of the {@link RunTransaction | RunTransaction} API.
113
- * @alpha
137
+ * @sealed
138
+ * @beta
114
139
  */
115
- export type TransactionResultExt<TSuccessValue, TFailureValue> =
140
+ export type TransactionValueResult<TSuccessValue, TFailureValue> =
116
141
  | TransactionResultSuccess<TSuccessValue>
117
142
  | TransactionResultFailed<TFailureValue>;
118
143
 
119
144
  /**
120
- * The result of the {@link RunTransaction | RunTransaction} API. This is the same as {@link TransactionResultExt}
145
+ * The result of the {@link RunTransaction | RunTransaction} API. This is the same as {@link TransactionValueResult}
121
146
  * but with the `value` field omitted. This is useful when the transaction callback doesn't need to return a value.
122
- * @alpha
147
+ * @sealed
148
+ * @beta
123
149
  */
124
- export type TransactionResult =
150
+ export type TransactionVoidResult =
125
151
  | Omit<TransactionResultSuccess<unknown>, "value">
126
152
  | Omit<TransactionResultFailed<unknown>, "value">;
127
153
 
128
154
  /**
129
- * The parameters for the {@link RunTransaction | RunTransaction} API.
155
+ * A type-erased function that post-processes the change produced when a transaction is committed.
156
+ *
157
+ * @remarks
158
+ * Supply one via {@link RunTransactionParamsAlpha.postProcessor} to process/alter
159
+ * the change that a transaction produces. For example a post-processor could
160
+ * remove extraneous information, so that the resulting squashed change contains
161
+ * no extraneous information.
162
+ *
163
+ * This type intentionally hides its internal representation: its concrete shape
164
+ * is an implementation detail of `@fluidframework/tree`. Obtain a value of this
165
+ * type from a `@fluidframework/tree` helper or constant rather than constructing
166
+ * one directly.
167
+ *
130
168
  * @alpha
169
+ * @sealed
170
+ * @system
171
+ */
172
+ export interface TransactionPostProcessor
173
+ extends ErasedType<"@fluidframework/tree.TransactionPostProcessor"> {}
174
+
175
+ /**
176
+ * The parameters for the {@link RunTransaction | RunTransaction} API.
177
+ * @input
178
+ * @beta
179
+ */
180
+ export interface RunTransactionParamsBeta {
181
+ /**
182
+ * A label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).
183
+ * @remarks
184
+ * If this transaction is applied to a {@link TreeBranchAlpha | branch}, the label will be available in the {@link LocalChangeMetadata.label | metadata} of the {@link TreeBranchEvents.changed | `changed`} event.
185
+ *
186
+ * If there is a nested transaction, only the outermost transaction label will be used.
187
+ */
188
+ readonly label?: unknown;
189
+ }
190
+
191
+ /**
192
+ * The parameters for the {@link RunTransaction | RunTransaction} API, extended with alpha-only {@link TransactionConstraintAlpha | constraint} options.
131
193
  * @input
194
+ * @alpha
132
195
  */
133
- export interface RunTransactionParams {
196
+ export interface RunTransactionParamsAlpha extends RunTransactionParamsBeta {
134
197
  /**
135
198
  * An optional list of {@link TransactionConstraintAlpha | constraints} that are checked just before the transaction begins.
136
199
  * @remarks
@@ -138,12 +201,21 @@ export interface RunTransactionParams {
138
201
  * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.
139
202
  */
140
203
  readonly preconditions?: readonly TransactionConstraintAlpha[];
204
+
141
205
  /**
142
- * A label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).
206
+ * An optional {@link TransactionPostProcessor | post-processor} applied to
207
+ * the change produced when this transaction is committed.
143
208
  * @remarks
144
- * If this transaction is applied to a {@link TreeBranchAlpha | branch}, the label will be available in the {@link LocalChangeMetadata.label | metadata} of the {@link TreeBranchEvents.changed | `changed`} event.
209
+ * When omitted, the transaction's edits are squashed without any such processing.
145
210
  *
146
- * If there is a nested transaction, only the outermost transaction label will be used.
211
+ * Specific post-processors are applied according to their own rules for
212
+ * optimization and other post-processing tasks in a transaction stack. For
213
+ * example a "minimization" post-processor may be applied once for the
214
+ * outermost transaction in a stack as it will process all nested edits and
215
+ * there is no benefit from multiple applications.
216
+ *
217
+ * Note: minimization is not yet implemented. Supplying a post-processor currently has no observable effect beyond
218
+ * reserving the behavior; a real post-processor will be provided in a future change.
147
219
  */
148
- readonly label?: unknown;
220
+ readonly postProcessor?: TransactionPostProcessor;
149
221
  }
@@ -11,17 +11,14 @@ import type {
11
11
  RevertibleAlphaFactory,
12
12
  RevertibleFactory,
13
13
  } from "../../core/index.js";
14
- // This is referenced by doc comments.
15
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
14
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- This is referenced by doc comments.
16
15
  import type { TreeStatus } from "../../feature-libraries/index.js";
17
16
  import type {
18
- // This is referenced by doc comments.
19
- // eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports
17
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports -- This is referenced by doc comments.
20
18
  TreeAlpha,
21
19
  } from "../../shared-tree/index.js";
22
20
  import type { JsonCompatibleReadOnly } from "../../util/index.js";
23
- // This is referenced by doc comments.
24
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
21
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- This is referenced by doc comments.
25
22
  import type { Unhydrated } from "../core/index.js";
26
23
  import type {
27
24
  ImplicitFieldSchema,
@@ -36,11 +33,14 @@ import type { UnsafeUnknownSchema } from "../unsafeUnknownSchema.js";
36
33
 
37
34
  import type { TreeViewConfiguration } from "./configuration.js";
38
35
  import type {
39
- RunTransactionParams,
40
- TransactionCallbackStatus,
41
- TransactionResult,
42
- TransactionResultExt,
43
- VoidTransactionCallbackStatus,
36
+ RunTransactionParamsAlpha,
37
+ RunTransactionParamsBeta,
38
+ TransactionCallbackStatusAlpha,
39
+ TransactionCallbackStatusBeta,
40
+ TransactionVoidResult,
41
+ TransactionValueResult,
42
+ VoidTransactionCallbackStatusAlpha,
43
+ VoidTransactionCallbackStatusBeta,
44
44
  WithValue,
45
45
  } from "./transactionTypes.js";
46
46
  import type { VerboseTree } from "./verboseTree.js";
@@ -112,8 +112,20 @@ export interface ITreeAlpha extends ITree {
112
112
  /**
113
113
  * Creates a fork of the current state of the main branch.
114
114
  * This new branch will be shared with and editable by all clients.
115
+ * @param name - Optional name for the new branch.
116
+ * This name is not guaranteed to be unique.
117
+ * (Maximum {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length | length}: 1024)
118
+ * @returns The ID of the new branch, which can be used to {@link ITreeAlpha.viewSharedBranchWith | view} the branch.
115
119
  */
116
- createSharedBranch(): string;
120
+ createSharedBranch(name?: string): string;
121
+
122
+ /**
123
+ * Retrieves the name, if any, of the shared branch with the given ID.
124
+ * @param branchId - The ID of the shared branch to retrieve the name of.
125
+ * @returns The name of the shared branch, or `undefined` if the branch has no assigned name.
126
+ * @throws if the branch with the given ID does not exist.
127
+ */
128
+ getSharedBranchName(branchId: string): string | undefined;
117
129
 
118
130
  /**
119
131
  * Returns a list of all shared branches that currently exist on this tree.
@@ -193,8 +205,8 @@ export interface TreeContextAlpha {
193
205
  * Run a synchronous transaction which groups sequential edits to the tree into a single atomic edit if possible.
194
206
  * @param transaction - A callback run during the transaction to perform user-supplied operations.
195
207
  * It may optionally return a {@link WithValue | value }, which will be returned by the `runTransaction` call.
196
- * @param params - Optional {@link RunTransactionParams | parameters} for the transaction.
197
- * @returns A {@link TransactionResultExt | value } indicating whether or not the transaction succeeded, and containing the value returned by `transaction`.
208
+ * @param params - Optional {@link RunTransactionParamsAlpha | parameters} for the transaction.
209
+ * @returns A {@link TransactionValueResult | value } indicating whether or not the transaction succeeded, and containing the value returned by `transaction`.
198
210
  * @remarks
199
211
  * All of the changes in the transaction are applied synchronously and therefore no other changes from a remote client can be interleaved with those changes.
200
212
  * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.
@@ -215,11 +227,20 @@ export interface TreeContextAlpha {
215
227
  */
216
228
  runTransaction<TValue>(
217
229
  transaction: () => WithValue<TValue>,
218
- params?: RunTransactionParams,
219
- ): TransactionResultExt<TValue, TValue>;
230
+ params?: RunTransactionParamsAlpha,
231
+ ): TransactionValueResult<TValue, TValue>;
220
232
 
221
- /** An overload of {@link TreeContextAlpha.(runTransaction:1) | runTransaction } which does not return a value. */
222
- runTransaction(transaction: () => void, params?: RunTransactionParams): TransactionResult;
233
+ /**
234
+ * An overload of {@link TreeContextAlpha.(runTransaction:1) | runTransaction } which does not return a value.
235
+ *
236
+ * @privateRemarks
237
+ * TODO: Consider updating these methods to avoid the need for overloads.
238
+ * See {@link TreeViewBeta.runTransaction} for an example of how to do this.
239
+ */
240
+ runTransaction(
241
+ transaction: () => void,
242
+ params?: RunTransactionParamsAlpha,
243
+ ): TransactionVoidResult;
223
244
 
224
245
  /**
225
246
  * An asynchronous version of {@link TreeContextAlpha.(runTransaction:1) | runTransaction}.
@@ -234,14 +255,20 @@ export interface TreeContextAlpha {
234
255
  */
235
256
  runTransactionAsync<TValue>(
236
257
  transaction: () => Promise<WithValue<TValue>>,
237
- params?: RunTransactionParams,
238
- ): Promise<TransactionResultExt<TValue, TValue>>;
258
+ params?: RunTransactionParamsAlpha,
259
+ ): Promise<TransactionValueResult<TValue, TValue>>;
239
260
 
240
- /** An overload of {@link TreeContextAlpha.(runTransactionAsync:1) | runTransactionAsync } which does not return a value. */
261
+ /**
262
+ * An overload of {@link TreeContextAlpha.(runTransactionAsync:1) | runTransactionAsync } which does not return a value.
263
+ *
264
+ * @privateRemarks
265
+ * TODO: Consider updating these methods to avoid the need for overloads.
266
+ * See {@link TreeViewBeta.runTransactionAsync} for an example of how to do this.
267
+ */
241
268
  runTransactionAsync(
242
269
  transaction: () => Promise<void>,
243
- params?: RunTransactionParams,
244
- ): Promise<TransactionResult>;
270
+ params?: RunTransactionParamsAlpha,
271
+ ): Promise<TransactionVoidResult>;
245
272
 
246
273
  /**
247
274
  * True if this context is associated with a {@link TreeBranchAlpha | branch} and false if it is associated with an {@link Unhydrated | unhydrated } node.
@@ -295,22 +322,26 @@ export interface TreeBranchAlpha extends TreeBranch, TreeContextAlpha {
295
322
 
296
323
  /**
297
324
  * {@link TreeContextAlpha.(runTransaction:1) | Run a transaction} on a branch of the SharedTree.
298
- * @param transaction - The function to run as the body of the transaction, which may optionally return a {@link TransactionCallbackStatus | value or rollback signal}.
325
+ * @param transaction - The function to run as the body of the transaction, which may optionally return a {@link TransactionCallbackStatusAlpha | value or rollback signal}.
299
326
  * @remarks
300
327
  * If the transaction is rolled back, a corresponding {@link TreeBranchEvents.changed | `changed`} event will also be emitted for the rollback.
301
328
  */
302
329
  runTransaction<TSuccessValue, TFailureValue>(
303
- transaction: () => TransactionCallbackStatus<TSuccessValue, TFailureValue>,
304
- params?: RunTransactionParams,
305
- ): TransactionResultExt<TSuccessValue, TFailureValue>;
330
+ transaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>,
331
+ params?: RunTransactionParamsAlpha,
332
+ ): TransactionValueResult<TSuccessValue, TFailureValue>;
306
333
 
307
334
  /**
308
335
  * An overload of {@link TreeBranchAlpha.(runTransaction:1) | runTransaction } which does not return a value.
336
+ *
337
+ * @privateRemarks
338
+ * TODO: Consider updating these methods to avoid the need for overloads.
339
+ * See {@link TreeViewBeta.runTransaction} for an example of how to do this.
309
340
  */
310
341
  runTransaction(
311
- transaction: () => VoidTransactionCallbackStatus | void,
312
- params?: RunTransactionParams,
313
- ): TransactionResult;
342
+ transaction: () => VoidTransactionCallbackStatusAlpha | void,
343
+ params?: RunTransactionParamsAlpha,
344
+ ): TransactionVoidResult;
314
345
 
315
346
  /**
316
347
  * An asynchronous version of {@link TreeBranchAlpha.(runTransaction:1) | runTransaction}.
@@ -318,17 +349,21 @@ export interface TreeBranchAlpha extends TreeBranch, TreeContextAlpha {
318
349
  */
319
350
 
320
351
  runTransactionAsync<TSuccessValue, TFailureValue>(
321
- transaction: () => Promise<TransactionCallbackStatus<TSuccessValue, TFailureValue>>,
322
- params?: RunTransactionParams,
323
- ): Promise<TransactionResultExt<TSuccessValue, TFailureValue>>;
352
+ transaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>,
353
+ params?: RunTransactionParamsAlpha,
354
+ ): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;
324
355
 
325
356
  /**
326
357
  * An overload of {@link TreeBranchAlpha.(runTransactionAsync:1) | runTransactionAsync } which does not return a value.
358
+ *
359
+ * @privateRemarks
360
+ * TODO: Consider updating these methods to avoid the need for overloads.
361
+ * See {@link TreeViewBeta.runTransactionAsync} for an example of how to do this.
327
362
  */
328
363
  runTransactionAsync(
329
- transaction: () => Promise<VoidTransactionCallbackStatus | void>,
330
- params?: RunTransactionParams,
331
- ): Promise<TransactionResult>;
364
+ transaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>,
365
+ params?: RunTransactionParamsAlpha,
366
+ ): Promise<TransactionVoidResult>;
332
367
 
333
368
  /**
334
369
  * Apply a serialized change to this branch.
@@ -353,6 +388,16 @@ export interface TreeBranchAlpha extends TreeBranch, TreeContextAlpha {
353
388
  * @throws UsageError if the branches are unrelated.
354
389
  */
355
390
  isMissingEditsFrom(branch: TreeBranch): boolean;
391
+
392
+ /**
393
+ * Computes the net change that would result if this branch were {@link TreeBranch.rebaseOnto | rebased onto} the given branch.
394
+ * Note that this method does not actually perform the rebase and therefore has no effect on this branch.
395
+ *
396
+ * @param branch - The branch that would be rebased onto.
397
+ * @returns The net change that would result if this branch were rebased onto the given branch,
398
+ * or `undefined` if rebasing would have no impact.
399
+ */
400
+ computeNetChangeIfRebasedOnto(branch: TreeBranch): JsonCompatibleReadOnly | undefined;
356
401
  }
357
402
 
358
403
  /**
@@ -449,13 +494,92 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
449
494
  readonly schema: TSchema;
450
495
  }
451
496
 
497
+ /**
498
+ * {@link TreeView} with additional beta APIs.
499
+ * @sealed @beta
500
+ */
501
+ export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema>
502
+ extends TreeView<TSchema>,
503
+ TreeBranch {
504
+ // Override the base branch method to return a typed view rather than merely a branch.
505
+ fork(): ReturnType<TreeBranch["fork"]> & TreeViewBeta<TSchema>;
506
+
507
+ /**
508
+ * Run a synchronous transaction which groups sequential edits to the tree into a single atomic edit if possible.
509
+ *
510
+ * @param transaction - The function to run as the body of the transaction, which may optionally return a {@link TransactionCallbackStatusBeta | value or rollback signal}.
511
+ * It may optionally return a {@link WithValue | value }, which will be returned by the `runTransaction` call.
512
+ *
513
+ * @param params - Optional {@link RunTransactionParamsBeta | parameters} for the transaction.
514
+ *
515
+ * @returns A {@link TransactionValueResult | value } indicating whether or not the transaction succeeded, and containing the value returned by `transaction`.
516
+ *
517
+ * @remarks
518
+ * All of the changes in the transaction are applied synchronously and therefore no other changes from a remote client can be interleaved with those changes.
519
+ * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.
520
+ *
521
+ * {@link (TreeBeta:interface).on | Change events } will be emitted for changed nodes on this client _as each edit happens_, just as they would be if the changes were made outside of a transaction.
522
+ * Any other/future clients or contexts will process the transaction "squashed", i.e. they will apply its changes all at once, emitting only a single event per node (even if that node was edited multiple times in the transaction).
523
+ * Edits to the tree are not permitted within these event callbacks, therefore no other local changes from this client will be interleaved with the changes in this transaction.
524
+ *
525
+ * Using a transaction has the following additional consequences:
526
+ *
527
+ * - If {@link Revertible | reverted } (e.g. via an "undo" operation), all the changes in the transaction are reverted together.
528
+ * Only the "outermost" transaction commits a change to the synchronized tree state and therefore only the outermost transaction can be reverted.
529
+ * If a transaction is started and completed while another transaction is already in progress, then the inner transaction will be reverted together with the outer transaction.
530
+ * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.
531
+ *
532
+ * If the transaction is rolled back, a corresponding {@link TreeBranchEvents.changed | `changed`} event will also be emitted for the rollback.
533
+ */
534
+ runTransaction<
535
+ TOut extends
536
+ | TransactionCallbackStatusBeta<unknown, unknown>
537
+ | VoidTransactionCallbackStatusBeta
538
+ | void,
539
+ >(
540
+ transaction: () => TOut,
541
+ params?: RunTransactionParamsBeta,
542
+ ): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue>
543
+ ? TransactionValueResult<TSuccessValue, TFailureValue>
544
+ : TransactionVoidResult;
545
+
546
+ /**
547
+ * An asynchronous version of {@link TreeViewBeta.runTransaction | runTransaction}.
548
+ *
549
+ * @remarks
550
+ * As with synchronous transactions, all of the changes in an asynchronous transaction are treated as a unit.
551
+ * Therefore, no other changes (either from this client or from a remote client) can be interleaved with the transaction changes.
552
+ *
553
+ * Unlike with synchronous transactions, it is possible that other changes (e.g. from a remote client) may be applied to the branch while this transaction is in progress.
554
+ * Those other changes will be not be reflected on the branch until after this transaction completes, at which point the transaction changes will be applied after those other changes.
555
+ *
556
+ * An asynchronous transaction may not be started while any other transaction is in progress in this view.
557
+ */
558
+ runTransactionAsync<
559
+ TOut extends
560
+ | TransactionCallbackStatusBeta<unknown, unknown>
561
+ | VoidTransactionCallbackStatusBeta
562
+ | void,
563
+ >(
564
+ transaction: () => Promise<TOut>,
565
+ params?: RunTransactionParamsBeta,
566
+ ): Promise<
567
+ TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue>
568
+ ? TransactionValueResult<TSuccessValue, TFailureValue>
569
+ : TransactionVoidResult
570
+ >;
571
+ }
572
+
452
573
  /**
453
574
  * {@link TreeView} with proposed changes to the schema aware typing to allow use with `UnsafeUnknownSchema`.
454
575
  * @sealed @alpha
455
576
  */
456
577
  export interface TreeViewAlpha<
457
578
  in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema,
458
- > extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork">,
579
+ > extends Omit<
580
+ TreeViewBeta<ReadSchema<TSchema>>,
581
+ "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync"
582
+ >,
459
583
  TreeBranchAlpha {
460
584
  get root(): ReadableField<TSchema>;
461
585
 
@@ -469,23 +593,15 @@ export interface TreeViewAlpha<
469
593
  fork(): ReturnType<TreeBranch["fork"]> & TreeViewAlpha<TSchema>;
470
594
  }
471
595
 
472
- /**
473
- * {@link TreeView} with additional beta APIs.
474
- * @sealed @beta
475
- */
476
- export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema>
477
- extends TreeView<TSchema>,
478
- TreeBranch {
479
- // Override the base branch method to return a typed view rather than merely a branch.
480
- fork(): ReturnType<TreeBranch["fork"]> & TreeViewBeta<TSchema>;
481
- }
482
-
483
596
  /**
484
597
  * Information about a view schema's compatibility with the document's stored schema.
485
598
  *
599
+ * @see
486
600
  * See SharedTree's README for more information about choosing a compatibility policy.
601
+ *
487
602
  * @privateRemarks
488
- * See {@link SchemaCompatibilityTester} for the implementation of this compatibility checking.
603
+ * See {@link checkSchemaCompatibility} for the implementation of this compatibility checking.
604
+ *
489
605
  * @sealed @public
490
606
  */
491
607
  export interface SchemaCompatibilityStatus {
@@ -37,6 +37,8 @@ import type { InsertableField, UnsafeUnknownSchema } from "../unsafeUnknownSchem
37
37
  import { conciseFromCursor, type ConciseTree } from "./conciseTree.js";
38
38
  import { createFromCursor } from "./create.js";
39
39
  import type { TreeEncodingOptions } from "./customTree.js";
40
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars -- Used by docs
41
+ import type { ObjectSchemaOptions } from "./schemaFactory.js";
40
42
  import type { TreeChangeEvents } from "./treeChangeEvents.js";
41
43
  import { treeNodeApi } from "./treeNodeApi.js";
42
44
  import { cursorFromVerbose } from "./verboseTree.js";
@@ -21,6 +21,7 @@ import type {
21
21
  TreeLeafValue,
22
22
  FlexListToUnion,
23
23
  LazyItem,
24
+ NumberKeys,
24
25
  AnnotatedAllowedType,
25
26
  AnnotatedAllowedTypes,
26
27
  } from "../core/index.js";
@@ -260,7 +261,7 @@ export namespace System_Unsafe {
260
261
  >
261
262
  ? InsertableTypedNodeUnsafe<TSchema>
262
263
  : never;
263
- }[number];
264
+ }[NumberKeys<TList>];
264
265
 
265
266
  /**
266
267
  * {@link Unenforced} version of {@link InsertableTypedNode}.
@@ -290,18 +290,18 @@ export interface TreeNodeSchemaCore<
290
290
  readonly implicitlyConstructable: ImplicitlyConstructable;
291
291
 
292
292
  /**
293
- * All possible schema that a direct child of a node with this schema could have.
293
+ * All possible schemas that a direct child of a node with this schema could have.
294
294
  *
295
- * Equivalently, this is also all schema directly referenced when defining this schema's allowed child types,
296
- * which is also the same as the set of schema referenced directly by the `Info` type parameter and the `info` property.
295
+ * Equivalently, this is also all schemas directly referenced when defining this schema's allowed child types,
296
+ * which is also the same as the set of schemas referenced directly by the `Info` type parameter and the `info` property.
297
297
  * This property is simply re-exposing that information in an easier to traverse format consistent across all node kinds.
298
298
  * @remarks
299
299
  * Some kinds of nodes may have additional restrictions on children:
300
- * this set simply enumerates all directly referenced schema, and can be use to walk over all referenced schema types.
300
+ * this set simply enumerates all directly referenced schemas, and can be use to walk over all referenced schema types.
301
301
  *
302
- * This set cannot be used before the schema in it have been defined:
303
- * more specifically, when using lazy schema references (for example to make foreword references to schema which have not yet been defined),
304
- * users must wait until after the schema are defined to access this set.
302
+ * This set cannot be used before the schemas in it have been defined:
303
+ * more specifically, when using lazy schema references (for example to make foreword references to schemas which have not yet been defined),
304
+ * users must wait until after the schemas are defined to access this set.
305
305
  * @privateRemarks
306
306
  * Currently there isn't much use for this in the public API,
307
307
  * and it's possible this will want to be tweaked or renamed as part of a larger schema reflection API surface that might be added later.
@@ -140,7 +140,7 @@ export {
140
140
  extractPersistedSchema,
141
141
  comparePersistedSchema,
142
142
  type ConciseTree,
143
- SchemaCompatibilityTester,
143
+ checkSchemaCompatibility,
144
144
  type Unenforced,
145
145
  type System_Unsafe,
146
146
  type ArrayNodeCustomizableSchemaUnsafe,
@@ -175,17 +175,21 @@ export {
175
175
  tryStoredSchemaAsArray,
176
176
  type SchemaStatics,
177
177
  type ITreeAlpha,
178
+ type NoChangeConstraint,
179
+ type NodeInDocumentConstraint,
180
+ type RunTransactionParamsAlpha,
181
+ type RunTransactionParamsBeta,
182
+ type TransactionCallbackStatusAlpha,
183
+ type TransactionCallbackStatusBeta,
178
184
  type TransactionConstraint,
179
185
  type TransactionConstraintAlpha,
180
- type NodeInDocumentConstraint,
181
- type NoChangeConstraint,
182
- type RunTransactionParams,
183
- type VoidTransactionCallbackStatus,
184
- type TransactionCallbackStatus,
185
- type TransactionResult,
186
- type TransactionResultExt,
187
- type TransactionResultSuccess,
186
+ type TransactionPostProcessor,
188
187
  type TransactionResultFailed,
188
+ type TransactionResultSuccess,
189
+ type TransactionValueResult,
190
+ type TransactionVoidResult,
191
+ type VoidTransactionCallbackStatusAlpha,
192
+ type VoidTransactionCallbackStatusBeta,
189
193
  rollback,
190
194
  generateSchemaFromSimpleSchema,
191
195
  replaceConciseTreeHandles,