@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
@@ -8,9 +8,9 @@ import { UsageError } from "@fluidframework/telemetry-utils/internal";
8
8
  import type {
9
9
  TreeContextAlpha,
10
10
  TreeBranchAlpha,
11
- RunTransactionParams,
12
- TransactionResult,
13
- TransactionResultExt,
11
+ RunTransactionParamsAlpha,
12
+ TransactionVoidResult,
13
+ TransactionValueResult,
14
14
  WithValue,
15
15
  } from "../simple-tree/index.js";
16
16
 
@@ -30,13 +30,16 @@ export class UnhydratedTreeContext implements TreeContextAlpha {
30
30
 
31
31
  public runTransaction<TValue>(
32
32
  t: () => WithValue<TValue>,
33
- params?: RunTransactionParams,
34
- ): TransactionResultExt<TValue, TValue>;
35
- public runTransaction(t: () => void, _params?: RunTransactionParams): TransactionResult;
33
+ params?: RunTransactionParamsAlpha,
34
+ ): TransactionValueResult<TValue, TValue>;
35
+ public runTransaction(
36
+ t: () => void,
37
+ _params?: RunTransactionParamsAlpha,
38
+ ): TransactionVoidResult;
36
39
  public runTransaction(
37
40
  t: () => WithValue<unknown> | void,
38
- params?: RunTransactionParams,
39
- ): TransactionResultExt<unknown, unknown> | TransactionResult {
41
+ params?: RunTransactionParamsAlpha,
42
+ ): TransactionValueResult<unknown, unknown> | TransactionVoidResult {
40
43
  for (const constraint of params?.preconditions ?? []) {
41
44
  assertValidConstraint(constraint, false);
42
45
  }
@@ -50,16 +53,16 @@ export class UnhydratedTreeContext implements TreeContextAlpha {
50
53
 
51
54
  public runTransactionAsync<TValue>(
52
55
  t: () => Promise<WithValue<TValue>>,
53
- params?: RunTransactionParams,
54
- ): Promise<TransactionResultExt<TValue, TValue>>;
56
+ params?: RunTransactionParamsAlpha,
57
+ ): Promise<TransactionValueResult<TValue, TValue>>;
55
58
  public runTransactionAsync(
56
59
  t: () => Promise<void>,
57
- params?: RunTransactionParams,
58
- ): Promise<TransactionResult>;
60
+ params?: RunTransactionParamsAlpha,
61
+ ): Promise<TransactionVoidResult>;
59
62
  public async runTransactionAsync(
60
63
  t: () => Promise<WithValue<unknown> | void>,
61
- params?: RunTransactionParams,
62
- ): Promise<TransactionResultExt<unknown, unknown> | TransactionResult> {
64
+ params?: RunTransactionParamsAlpha,
65
+ ): Promise<TransactionValueResult<unknown, unknown> | TransactionVoidResult> {
63
66
  if (this.transactionCount > 0) {
64
67
  throw new UsageError(
65
68
  "An asynchronous transaction cannot be started while another transaction is already in progress.",
@@ -78,7 +81,7 @@ export class UnhydratedTreeContext implements TreeContextAlpha {
78
81
 
79
82
  private static wrapTransactionResult<TValue>(
80
83
  value: WithValue<TValue> | void,
81
- ): TransactionResultExt<TValue, TValue> | TransactionResult {
84
+ ): TransactionValueResult<TValue, TValue> | TransactionVoidResult {
82
85
  if (value?.value !== undefined) {
83
86
  return { success: true, value: value.value };
84
87
  }
@@ -9,6 +9,7 @@ import { assert, fail } from "@fluidframework/core-utils/internal";
9
9
  import type { SessionId } from "@fluidframework/id-compressor";
10
10
  import {
11
11
  TelemetryEventBatcher,
12
+ UsageError,
12
13
  type TelemetryLoggerExt,
13
14
  } from "@fluidframework/telemetry-utils/internal";
14
15
  import { BTree } from "@tylerbu/sorted-btree-es6";
@@ -117,6 +118,7 @@ export class EditManager<
117
118
  * @param localSessionId - the id of the local session that will be used for local commits
118
119
  * @param mintRevisionTag - a function which generates globally unique revision tags
119
120
  * @param onSharedBranchCreated - called when a new shared branch is created. This is not called for the main branch.
121
+ * @param retainHistory - when `true`, trunk commits are never trimmed/evicted.
120
122
  */
121
123
  public constructor(
122
124
  public readonly changeFamily: TChangeFamily,
@@ -124,6 +126,7 @@ export class EditManager<
124
126
  private readonly mintRevisionTag: () => RevisionTag,
125
127
  private readonly onSharedBranchCreated?: (branchId: BranchId) => void,
126
128
  logger?: TelemetryLoggerExt,
129
+ private readonly retainHistory: boolean = false,
127
130
  ) {
128
131
  this.trunkBase = {
129
132
  revision: rootRevision,
@@ -149,15 +152,23 @@ export class EditManager<
149
152
  this.telemetryEventBatcher,
150
153
  );
151
154
 
152
- this.createAndAddSharedBranch("main", undefined, undefined, mainTrunk);
155
+ this.createAndAddSharedBranch("main", "main", undefined, undefined, mainTrunk);
153
156
  }
154
157
 
155
158
  public getLocalBranch(branchId: BranchId): SharedTreeBranch<TEditor, TChangeset> {
156
159
  return this.getSharedBranch(branchId).localBranch;
157
160
  }
158
161
 
162
+ public getSharedBranchName(branchId: BranchId): string | undefined {
163
+ return this.getSharedBranch(branchId).branchName;
164
+ }
165
+
159
166
  private getSharedBranch(branchId: BranchId): SharedBranch<TEditor, TChangeset> {
160
- return this.sharedBranches.get(branchId) ?? fail(0xc56 /* Branch does not exist */);
167
+ const branch = this.sharedBranches.get(branchId);
168
+ if (branch === undefined) {
169
+ throw new UsageError("No shared branch with such ID");
170
+ }
171
+ return branch;
161
172
  }
162
173
 
163
174
  /**
@@ -268,6 +279,11 @@ export class EditManager<
268
279
  * if any commits on the trunk are unreferenced and unneeded for future computation; those found are evicted from the trunk.
269
280
  */
270
281
  private trimHistory(): void {
282
+ if (this.retainHistory) {
283
+ // When history retention is enabled, trunk commits are never evicted.
284
+ return;
285
+ }
286
+
271
287
  /** The sequence id of the most recent commit on the trunk that will be trimmed */
272
288
  let trunkTailSequenceId: SequenceId = {
273
289
  sequenceNumber: this.minimumSequenceNumber,
@@ -397,6 +413,7 @@ export class EditManager<
397
413
  for (const [branchId, branchData] of data.branches) {
398
414
  const branch = this.createSharedBranch(
399
415
  branchId,
416
+ branchData.name,
400
417
  branchData.session,
401
418
  mainBranch,
402
419
  mainBranch.trunk.fork(),
@@ -444,6 +461,7 @@ export class EditManager<
444
461
  sessionId: SessionId,
445
462
  referenceSequenceNumber: SeqNumber,
446
463
  branchId: BranchId,
464
+ branchName?: string,
447
465
  ): void {
448
466
  if (sessionId === this.localSessionId) {
449
467
  assert(this.sharedBranches.has(branchId), 0xc59 /* Expected branch to already exist */);
@@ -452,13 +470,14 @@ export class EditManager<
452
470
 
453
471
  const mainBranch = this.getSharedBranch("main");
454
472
  const branchTrunk = mainBranch.rebasePeer(sessionId, referenceSequenceNumber).fork();
455
- this.createAndAddSharedBranch(branchId, sessionId, mainBranch, branchTrunk);
473
+ this.createAndAddSharedBranch(branchId, branchName, sessionId, mainBranch, branchTrunk);
456
474
  }
457
475
 
458
- public addNewBranch(branchId: BranchId): void {
476
+ public addNewBranch(branchId: BranchId, branchName?: string): void {
459
477
  const main = this.getSharedBranch("main") ?? fail(0xc5a /* Main branch must exist */);
460
478
  this.createAndAddSharedBranch(
461
479
  branchId,
480
+ branchName,
462
481
  this.localSessionId,
463
482
  main,
464
483
  this.getLocalBranch("main").fork(),
@@ -477,11 +496,18 @@ export class EditManager<
477
496
 
478
497
  private createAndAddSharedBranch(
479
498
  branchId: BranchId,
499
+ branchName: string | undefined,
480
500
  sessionId: SessionId | undefined,
481
501
  parent: SharedBranch<TEditor, TChangeset> | undefined,
482
502
  branch: SharedTreeBranch<TEditor, TChangeset>,
483
503
  ): SharedBranch<TEditor, TChangeset> {
484
- const sharedBranch = this.createSharedBranch(branchId, sessionId, parent, branch);
504
+ const sharedBranch = this.createSharedBranch(
505
+ branchId,
506
+ branchName,
507
+ sessionId,
508
+ parent,
509
+ branch,
510
+ );
485
511
  this.addSharedBranch(branchId, sharedBranch);
486
512
  return sharedBranch;
487
513
  }
@@ -509,6 +535,7 @@ export class EditManager<
509
535
 
510
536
  private createSharedBranch(
511
537
  branchId: BranchId,
538
+ branchName: string | undefined,
512
539
  sessionId: SessionId | undefined,
513
540
  parent: SharedBranch<TEditor, TChangeset> | undefined,
514
541
  branch: SharedTreeBranch<TEditor, TChangeset>,
@@ -517,6 +544,7 @@ export class EditManager<
517
544
  parent,
518
545
  branch,
519
546
  branchId,
547
+ branchName,
520
548
  sessionId,
521
549
  minimumPossibleSequenceId,
522
550
  this.changeFamily,
@@ -689,6 +717,7 @@ class SharedBranch<TEditor extends ChangeFamilyEditor, TChangeset> {
689
717
  public readonly parentBranch: SharedBranch<TEditor, TChangeset> | undefined,
690
718
  public readonly trunk: SharedTreeBranch<TEditor, TChangeset>,
691
719
  private readonly id: BranchId,
720
+ public readonly branchName: string | undefined,
692
721
  private readonly sessionId: SessionId | undefined,
693
722
  baseCommitSequenceId: SequenceId,
694
723
  private readonly changeFamily: ChangeFamily<TEditor, TChangeset>,
@@ -1076,7 +1105,14 @@ class SharedBranch<TEditor extends ChangeFamilyEditor, TChangeset> {
1076
1105
 
1077
1106
  const trunkBase =
1078
1107
  this.parentBranch === undefined ? undefined : forkPointFromMainTrunk.revision;
1079
- return { trunk, peerLocalBranches, base: trunkBase, id: this.id, session: this.sessionId };
1108
+ return {
1109
+ trunk,
1110
+ peerLocalBranches,
1111
+ base: trunkBase,
1112
+ id: this.id,
1113
+ name: this.branchName,
1114
+ session: this.sessionId,
1115
+ };
1080
1116
  }
1081
1117
 
1082
1118
  public loadSummaryData(
@@ -24,6 +24,7 @@ import type {
24
24
  RevisionTag,
25
25
  SchemaAndPolicy,
26
26
  } from "../core/index.js";
27
+ import type { IdentifierHealingConfig } from "../util/index.js";
27
28
 
28
29
  import type { SummaryData } from "./editManager.js";
29
30
  import { makeV1toV4andV6CodecWithVersion } from "./editManagerCodecsV1toV4.js";
@@ -37,8 +38,8 @@ export interface EditManagerEncodingContext {
37
38
  idCompressor: IIdCompressor;
38
39
  readonly schema?: SchemaAndPolicy;
39
40
  readonly isSummary: boolean;
40
- readonly healUnresolvableIdentifiersOnDecode?: boolean;
41
- readonly sharedObjectId?: string;
41
+ /** See {@link IdentifierHealingConfig}. */
42
+ readonly healing?: IdentifierHealingConfig;
42
43
  }
43
44
 
44
45
  /**
@@ -13,7 +13,12 @@ import type {
13
13
  RevisionTag,
14
14
  SchemaAndPolicy,
15
15
  } from "../core/index.js";
16
- import { mapIterable, type JsonCompatibleReadOnly, type Mutable } from "../util/index.js";
16
+ import {
17
+ mapIterable,
18
+ type IdentifierHealingConfig,
19
+ type JsonCompatibleReadOnly,
20
+ type Mutable,
21
+ } from "../util/index.js";
17
22
 
18
23
  import { decodeBranchId, encodeBranchId } from "./branchIdCodec.js";
19
24
  import type { SharedBranchSummaryData } from "./editManager.js";
@@ -34,14 +39,8 @@ export interface EditManagerEncodingContext {
34
39
  * but it is carried explicitly so downstream codecs can read it.
35
40
  */
36
41
  readonly isSummary: boolean;
37
- /**
38
- * See {@link ChangeEncodingContext.healUnresolvableIdentifiersOnDecode}.
39
- */
40
- readonly healUnresolvableIdentifiersOnDecode?: boolean;
41
- /**
42
- * See {@link ChangeEncodingContext.sharedObjectId}.
43
- */
44
- readonly sharedObjectId?: string;
42
+ /** See {@link IdentifierHealingConfig}. */
43
+ readonly healing?: IdentifierHealingConfig;
45
44
  }
46
45
 
47
46
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
@@ -207,8 +206,7 @@ export function decodeSharedBranch<TChangeset>(
207
206
  idCompressor: context.idCompressor,
208
207
  revision: undefined,
209
208
  isSummary: context.isSummary,
210
- healUnresolvableIdentifiersOnDecode: context.healUnresolvableIdentifiersOnDecode,
211
- sharedObjectId: context.sharedObjectId,
209
+ healing: context.healing,
212
210
  }),
213
211
  ),
214
212
  peerLocalBranches: new Map(
@@ -232,9 +230,7 @@ export function decodeSharedBranch<TChangeset>(
232
230
  idCompressor: context.idCompressor,
233
231
  revision: undefined,
234
232
  isSummary: context.isSummary,
235
- healUnresolvableIdentifiersOnDecode:
236
- context.healUnresolvableIdentifiersOnDecode,
237
- sharedObjectId: context.sharedObjectId,
233
+ healing: context.healing,
238
234
  },
239
235
  ),
240
236
  ),
@@ -13,6 +13,7 @@ import type {
13
13
  SchemaAndPolicy,
14
14
  } from "../core/index.js";
15
15
  import {
16
+ type IdentifierHealingConfig,
16
17
  type JsonCompatibleReadOnly,
17
18
  type JsonCompatibleReadOnlyObject,
18
19
  JsonCompatibleReadOnlySchema,
@@ -26,8 +27,8 @@ export interface EditManagerEncodingContext {
26
27
  idCompressor: IIdCompressor;
27
28
  readonly schema?: SchemaAndPolicy;
28
29
  readonly isSummary: boolean;
29
- readonly healUnresolvableIdentifiersOnDecode?: boolean;
30
- readonly sharedObjectId?: string;
30
+ /** See {@link IdentifierHealingConfig}. */
31
+ readonly healing?: IdentifierHealingConfig;
31
32
  }
32
33
 
33
34
  /**
@@ -14,6 +14,7 @@ import type {
14
14
  SchemaAndPolicy,
15
15
  } from "../core/index.js";
16
16
  import {
17
+ type IdentifierHealingConfig,
17
18
  type JsonCompatibleReadOnly,
18
19
  type JsonCompatibleReadOnlyObject,
19
20
  JsonCompatibleReadOnlySchema,
@@ -30,8 +31,8 @@ export interface EditManagerEncodingContext {
30
31
  idCompressor: IIdCompressor;
31
32
  readonly schema?: SchemaAndPolicy;
32
33
  readonly isSummary: boolean;
33
- readonly healUnresolvableIdentifiersOnDecode?: boolean;
34
- readonly sharedObjectId?: string;
34
+ /** See {@link IdentifierHealingConfig}. */
35
+ readonly healing?: IdentifierHealingConfig;
35
36
  }
36
37
 
37
38
  export function makeSharedBranchesCodecWithVersion<TChangeset>(
@@ -167,7 +167,7 @@ export const EditManagerFormatVersion = strictEnum("editManager.FormatVersion",
167
167
  * Not yet released.
168
168
  * Only used for testing shared branches.
169
169
  */
170
- vSharedBranches: "shared-branches|v0.1",
170
+ vSharedBranches: "shared-branches|v0.2",
171
171
  });
172
172
  export type EditManagerFormatVersion = Values<typeof EditManagerFormatVersion>;
173
173
  export const supportedEditManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> =
@@ -16,7 +16,7 @@ import type { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal"
16
16
 
17
17
  import type { IJsonCodec } from "../codec/index.js";
18
18
  import type { ChangeFamily, ChangeFamilyEditor, SchemaAndPolicy } from "../core/index.js";
19
- import type { JsonCompatibleReadOnly } from "../util/index.js";
19
+ import type { IdentifierHealingConfig, JsonCompatibleReadOnly } from "../util/index.js";
20
20
 
21
21
  import type { EditManager, SummaryData } from "./editManager.js";
22
22
  import type { EditManagerEncodingContext } from "./editManagerCodecs.js";
@@ -85,10 +85,8 @@ export class EditManagerSummarizer<TChangeset>
85
85
  private readonly idCompressor: IIdCompressor,
86
86
  minVersionForCollab: MinimumVersionForCollab,
87
87
  private readonly schemaAndPolicy?: SchemaAndPolicy,
88
- /** See {@link EditManagerEncodingContext.healUnresolvableIdentifiersOnDecode}. */
89
- private readonly healUnresolvableIdentifiersOnDecode?: boolean,
90
- /** See {@link EditManagerEncodingContext.sharedObjectId}. */
91
- private readonly sharedObjectId?: string,
88
+ /** See {@link IdentifierHealingConfig}. */
89
+ private readonly healing?: IdentifierHealingConfig,
92
90
  ) {
93
91
  super(
94
92
  EditManagerSummarizer.key,
@@ -111,8 +109,7 @@ export class EditManagerSummarizer<TChangeset>
111
109
  idCompressor: this.idCompressor,
112
110
  schema: this.schemaAndPolicy,
113
111
  isSummary: true,
114
- healUnresolvableIdentifiersOnDecode: this.healUnresolvableIdentifiersOnDecode,
115
- sharedObjectId: this.sharedObjectId,
112
+ healing: this.healing,
116
113
  };
117
114
  const jsonCompatible = this.codec.encode(this.editManager.getSummaryData(), context);
118
115
  const dataString = stringify(jsonCompatible);
@@ -137,8 +134,7 @@ export class EditManagerSummarizer<TChangeset>
137
134
  const data = this.codec.decode(summary, {
138
135
  idCompressor: this.idCompressor,
139
136
  isSummary: true,
140
- healUnresolvableIdentifiersOnDecode: this.healUnresolvableIdentifiersOnDecode,
141
- sharedObjectId: this.sharedObjectId,
137
+ healing: this.healing,
142
138
  });
143
139
  this.editManager.loadSummaryData(data);
144
140
  }
@@ -12,13 +12,16 @@ export {
12
12
  } from "./branch.js";
13
13
 
14
14
  export {
15
- TransactionResult,
16
- type Transactor,
15
+ type ChangeProcessor,
16
+ type OnPop,
17
+ type OnPush,
18
+ type SquashingTransactionOptions,
17
19
  type TransactionEvents,
18
- TransactionStack,
20
+ type Transactor,
21
+ ChangeProcessorApplicability,
19
22
  SquashingTransactionStack,
20
- type OnPush,
21
- type OnPop,
23
+ TransactionResult,
24
+ TransactionStack,
22
25
  } from "./transaction.js";
23
26
 
24
27
  export {
@@ -68,6 +68,7 @@ export function makeSharedBranchesCodecWithVersion<TChangeset>(
68
68
  return {
69
69
  originatorId: message.sessionId,
70
70
  branchId: encodeBranchId(context.idCompressor, message.branchId),
71
+ branchName: message.branchName,
71
72
  version,
72
73
  };
73
74
  }
@@ -85,6 +86,7 @@ export function makeSharedBranchesCodecWithVersion<TChangeset>(
85
86
  originatorId,
86
87
  changeset,
87
88
  branchId: encodedBranchId,
89
+ branchName: encodedBranchName,
88
90
  } = encoded;
89
91
 
90
92
  const changeContext: ChangeEncodingContext = {
@@ -97,7 +99,12 @@ export function makeSharedBranchesCodecWithVersion<TChangeset>(
97
99
  const branchId = decodeBranchId(context.idCompressor, encodedBranchId, changeContext);
98
100
 
99
101
  if (changeset === undefined) {
100
- return { type: "branch", sessionId: originatorId, branchId };
102
+ return {
103
+ type: "branch",
104
+ sessionId: originatorId,
105
+ branchId,
106
+ branchName: encodedBranchName,
107
+ };
101
108
  }
102
109
 
103
110
  assert(encodedRevision !== undefined, 0xc6a /* Commit messages must have a revision */);
@@ -56,7 +56,7 @@ export const MessageFormatVersion = strictEnum("MessageFormatVersion", {
56
56
  * Not yet released.
57
57
  * Only used for testing shared branches.
58
58
  */
59
- vSharedBranches: "shared-branches|v0.1",
59
+ vSharedBranches: "shared-branches|v0.2",
60
60
  });
61
61
  export type MessageFormatVersion = Values<typeof MessageFormatVersion>;
62
62
  export const supportedMessageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set([
@@ -30,8 +30,17 @@ export interface Message {
30
30
  */
31
31
  readonly changeset?: JsonCompatibleReadOnly;
32
32
 
33
+ /**
34
+ * Unique ID associated with the branch.
35
+ */
33
36
  readonly branchId?: EncodedBranchId;
34
37
 
38
+ /**
39
+ * Application-defined name of the branch, if any.
40
+ * Not guaranteed to be unique.
41
+ */
42
+ readonly branchName?: string;
43
+
35
44
  /**
36
45
  * The version of the message format.
37
46
  */
@@ -46,5 +55,6 @@ export const Message = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>
46
55
  originatorId: SessionIdSchema,
47
56
  changeset: Type.Optional(tChange),
48
57
  branchId: Type.Optional(Type.Number()),
58
+ branchName: Type.Optional(Type.String()),
49
59
  version: Type.Literal(MessageFormatVersion.vSharedBranches),
50
60
  });
@@ -24,4 +24,5 @@ export interface CommitMessage<TChange> extends MessageBase {
24
24
  export interface BranchMessage extends MessageBase {
25
25
  type: "branch";
26
26
  branchId: BranchId;
27
+ branchName?: string;
27
28
  }
@@ -11,6 +11,7 @@ import type {
11
11
  IIdCompressor,
12
12
  SessionId,
13
13
  SessionSpaceCompressedId,
14
+ StableId,
14
15
  } from "@fluidframework/id-compressor";
15
16
  import type {
16
17
  IExperimentalIncrementalSummaryContext,
@@ -23,7 +24,7 @@ import type {
23
24
  IChannelView,
24
25
  IFluidSerializer,
25
26
  } from "@fluidframework/shared-object-base/internal";
26
- import { createChildLogger } from "@fluidframework/telemetry-utils/internal";
27
+ import { createChildLogger, UsageError } from "@fluidframework/telemetry-utils/internal";
27
28
 
28
29
  import type { CodecWriteOptions, DependentFormatVersion, IJsonCodec } from "../codec/index.js";
29
30
  import {
@@ -78,6 +79,11 @@ export interface SharedTreeCoreOptionsInternal extends CodecWriteOptions {
78
79
  * See {@link SharedTreeOptionsBeta.healUnresolvableIdentifiersOnDecode}.
79
80
  */
80
81
  readonly healUnresolvableIdentifiersOnDecode?: boolean;
82
+
83
+ /**
84
+ * {@inheritDoc SharedTreeOptions.retainHistory}
85
+ */
86
+ readonly retainHistory?: boolean;
81
87
  }
82
88
 
83
89
  export interface EnrichmentConfig<TChange> {
@@ -124,6 +130,8 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
124
130
 
125
131
  private readonly schemaAndPolicy: ClonableSchemaAndPolicy;
126
132
 
133
+ private static readonly maxBranchNameLength = 1024;
134
+
127
135
  /**
128
136
  * @param summarizables - Summarizers for all indexes used by this tree
129
137
  * @param changeFamily - The change family
@@ -179,6 +187,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
179
187
  this.mintRevisionTag,
180
188
  (branchId) => this.registerSharedBranch(branchId),
181
189
  rebaseLogger,
190
+ options.retainHistory ?? false,
182
191
  );
183
192
 
184
193
  this.registerSharedBranch("main");
@@ -197,8 +206,9 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
197
206
  this.idCompressor,
198
207
  options.minVersionForCollab,
199
208
  this.schemaAndPolicy,
200
- options.healUnresolvableIdentifiersOnDecode,
201
- sharedObject.id,
209
+ options.healUnresolvableIdentifiersOnDecode === true
210
+ ? { sharedObjectId: sharedObject.id }
211
+ : undefined,
202
212
  ),
203
213
  ...summarizables,
204
214
  ];
@@ -390,9 +400,9 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
390
400
  this.getResubmitMachine(branchId).onCommitSubmitted(enrichedCommit);
391
401
  }
392
402
 
393
- protected submitBranchCreation(branchId: BranchId): void {
403
+ protected submitBranchCreation(branchId: BranchId, branchName?: string): void {
394
404
  this.submitMessage(
395
- { type: "branch", sessionId: this.editManager.localSessionId, branchId },
405
+ { type: "branch", sessionId: this.editManager.localSessionId, branchId, branchName },
396
406
  this.schemaAndPolicy,
397
407
  );
398
408
  }
@@ -470,6 +480,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
470
480
  messagesSessionId,
471
481
  brand(envelope.referenceSequenceNumber),
472
482
  message.branchId,
483
+ message.branchName,
473
484
  );
474
485
  break;
475
486
  }
@@ -518,21 +529,34 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
518
529
  .filter((id): id is SessionSpaceCompressedId => id !== "main")
519
530
  .map((id) => this.idCompressor.decompress(id));
520
531
  }
521
- public createSharedBranch(): string {
532
+ public createSharedBranch(branchName?: string): string {
533
+ if (branchName !== undefined && branchName.length > SharedTreeCore.maxBranchNameLength) {
534
+ throw new UsageError(
535
+ `Branch name is too long: ${branchName.length} > maxBranchNameLength`,
536
+ );
537
+ }
522
538
  const branchId = this.idCompressor.generateCompressedId();
523
- this.addBranch(branchId);
524
- this.submitBranchCreation(branchId);
539
+ this.addBranch(branchId, branchName);
540
+ this.submitBranchCreation(branchId, branchName);
525
541
  return this.idCompressor.decompress(branchId);
526
542
  }
527
543
 
528
- protected addBranch(branchId: BranchId): void {
529
- this.editManager.addNewBranch(branchId);
544
+ protected addBranch(branchId: BranchId, branchName?: string): void {
545
+ this.editManager.addNewBranch(branchId, branchName);
530
546
  }
531
547
 
532
548
  public getSharedBranch(branchId: BranchId): SharedTreeBranch<TEditor, TChange> {
533
549
  return this.editManager.getLocalBranch(branchId);
534
550
  }
535
551
 
552
+ public getSharedBranchName(branchId: string): string | undefined {
553
+ const compressedId = this.idCompressor.tryRecompress(branchId as StableId);
554
+ if (compressedId === undefined) {
555
+ throw new UsageError(`No branch found with id: ${branchId}`);
556
+ }
557
+ return this.editManager.getSharedBranchName(compressedId);
558
+ }
559
+
536
560
  public didAttach(): void {
537
561
  this.detachedRevision = undefined;
538
562
  }
@@ -573,7 +597,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
573
597
  break;
574
598
  }
575
599
  case "branch": {
576
- this.submitBranchCreation(message.branchId);
600
+ this.submitBranchCreation(message.branchId, message.branchName);
577
601
  break;
578
602
  }
579
603
  default: {
@@ -630,7 +654,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
630
654
  break;
631
655
  }
632
656
  case "branch": {
633
- this.editManager.addNewBranch(message.branchId);
657
+ this.editManager.addNewBranch(message.branchId, message.branchName);
634
658
  break;
635
659
  }
636
660
  default: {