@fluidframework/tree 2.71.0 → 2.72.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 (603) hide show
  1. package/CHANGELOG.md +26 -40
  2. package/api-report/tree.alpha.api.md +27 -18
  3. package/api-report/tree.beta.api.md +42 -0
  4. package/api-report/tree.legacy.beta.api.md +42 -0
  5. package/dist/alpha.d.ts +9 -7
  6. package/dist/api.js +1 -1
  7. package/dist/api.js.map +1 -1
  8. package/dist/beta.d.ts +7 -0
  9. package/dist/codec/codec.d.ts +16 -1
  10. package/dist/codec/codec.d.ts.map +1 -1
  11. package/dist/codec/codec.js +16 -3
  12. package/dist/codec/codec.js.map +1 -1
  13. package/dist/core/index.d.ts +1 -1
  14. package/dist/core/index.d.ts.map +1 -1
  15. package/dist/core/index.js +2 -2
  16. package/dist/core/index.js.map +1 -1
  17. package/dist/core/schema-stored/index.d.ts +1 -1
  18. package/dist/core/schema-stored/index.d.ts.map +1 -1
  19. package/dist/core/schema-stored/index.js +2 -2
  20. package/dist/core/schema-stored/index.js.map +1 -1
  21. package/dist/core/schema-stored/schema.d.ts +6 -6
  22. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  23. package/dist/core/schema-stored/schema.js +6 -7
  24. package/dist/core/schema-stored/schema.js.map +1 -1
  25. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +2 -1
  26. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  27. package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  28. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts +1 -1
  29. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  30. package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -2
  31. package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  32. package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  33. package/dist/core/tree/detachedFieldIndexCodecV2.js +3 -1
  34. package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  35. package/dist/core/tree/detachedFieldIndexCodecs.d.ts +2 -3
  36. package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  37. package/dist/core/tree/detachedFieldIndexCodecs.js +29 -8
  38. package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  39. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +10 -1
  40. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  41. package/dist/core/tree/detachedFieldIndexFormatCommon.js +8 -1
  42. package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  43. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts +2 -2
  44. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
  45. package/dist/core/tree/detachedFieldIndexFormatV1.js +3 -3
  46. package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
  47. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
  48. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  49. package/dist/core/tree/detachedFieldIndexFormatV2.js +3 -3
  50. package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  51. package/dist/core/tree/index.d.ts +2 -1
  52. package/dist/core/tree/index.d.ts.map +1 -1
  53. package/dist/core/tree/index.js.map +1 -1
  54. package/dist/external-utilities/typeboxValidator.js +1 -1
  55. package/dist/external-utilities/typeboxValidator.js.map +1 -1
  56. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -10
  57. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  58. package/dist/feature-libraries/chunked-forest/codec/codecs.js +12 -8
  59. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  60. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  61. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  62. package/dist/feature-libraries/chunked-forest/codec/format.d.ts +8 -3
  63. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  64. package/dist/feature-libraries/chunked-forest/codec/format.js +9 -4
  65. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  66. package/dist/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
  67. package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  68. package/dist/feature-libraries/chunked-forest/codec/index.js +1 -2
  69. package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  70. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  71. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +1 -1
  72. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  73. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
  74. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  75. package/dist/feature-libraries/chunked-forest/index.js +1 -2
  76. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  77. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -9
  78. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  79. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +3 -21
  80. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  81. package/dist/feature-libraries/forest-summary/codec.d.ts +4 -5
  82. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  83. package/dist/feature-libraries/forest-summary/codec.js +15 -4
  84. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  85. package/dist/feature-libraries/forest-summary/forestSummarizer.js +1 -1
  86. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  87. package/dist/feature-libraries/forest-summary/format.d.ts +8 -1
  88. package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
  89. package/dist/feature-libraries/forest-summary/format.js +8 -3
  90. package/dist/feature-libraries/forest-summary/format.js.map +1 -1
  91. package/dist/feature-libraries/forest-summary/index.d.ts +2 -1
  92. package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
  93. package/dist/feature-libraries/forest-summary/index.js +3 -1
  94. package/dist/feature-libraries/forest-summary/index.js.map +1 -1
  95. package/dist/feature-libraries/index.d.ts +3 -3
  96. package/dist/feature-libraries/index.d.ts.map +1 -1
  97. package/dist/feature-libraries/index.js +2 -2
  98. package/dist/feature-libraries/index.js.map +1 -1
  99. package/dist/feature-libraries/schema-edits/index.d.ts +1 -1
  100. package/dist/feature-libraries/schema-edits/index.d.ts.map +1 -1
  101. package/dist/feature-libraries/schema-edits/index.js.map +1 -1
  102. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -7
  103. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  104. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +5 -4
  105. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  106. package/dist/feature-libraries/schema-index/codec.d.ts +10 -10
  107. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  108. package/dist/feature-libraries/schema-index/codec.js +22 -18
  109. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  110. package/dist/feature-libraries/schema-index/formatV1.d.ts +2 -2
  111. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  112. package/dist/feature-libraries/schema-index/formatV1.js +1 -1
  113. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  114. package/dist/feature-libraries/schema-index/formatV2.d.ts +1 -2
  115. package/dist/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
  116. package/dist/feature-libraries/schema-index/formatV2.js +1 -1
  117. package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
  118. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
  119. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  120. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  121. package/dist/index.d.ts +1 -1
  122. package/dist/index.d.ts.map +1 -1
  123. package/dist/index.js +3 -1
  124. package/dist/index.js.map +1 -1
  125. package/dist/legacy.d.ts +7 -0
  126. package/dist/packageVersion.d.ts +1 -1
  127. package/dist/packageVersion.js +1 -1
  128. package/dist/packageVersion.js.map +1 -1
  129. package/dist/shared-tree/independentView.d.ts +1 -1
  130. package/dist/shared-tree/independentView.d.ts.map +1 -1
  131. package/dist/shared-tree/independentView.js +22 -15
  132. package/dist/shared-tree/independentView.js.map +1 -1
  133. package/dist/shared-tree/sharedTree.d.ts +12 -16
  134. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  135. package/dist/shared-tree/sharedTree.js +87 -127
  136. package/dist/shared-tree/sharedTree.js.map +1 -1
  137. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +7 -6
  138. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  139. package/dist/shared-tree/sharedTreeChangeCodecs.js +12 -11
  140. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  141. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
  142. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  143. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  144. package/dist/shared-tree/treeAlpha.d.ts +1 -1
  145. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  146. package/dist/shared-tree/treeAlpha.js +4 -2
  147. package/dist/shared-tree/treeAlpha.js.map +1 -1
  148. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  149. package/dist/shared-tree/treeCheckout.js +1 -3
  150. package/dist/shared-tree/treeCheckout.js.map +1 -1
  151. package/dist/shared-tree-core/editManagerCodecs.d.ts +19 -6
  152. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  153. package/dist/shared-tree-core/editManagerCodecs.js +35 -17
  154. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  155. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +37 -0
  156. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  157. package/dist/shared-tree-core/editManagerFormatCommons.js +43 -1
  158. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  159. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  160. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  161. package/dist/shared-tree-core/editManagerFormatV1toV4.js +4 -4
  162. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  163. package/dist/shared-tree-core/editManagerFormatV5.d.ts +2 -2
  164. package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +1 -1
  165. package/dist/shared-tree-core/editManagerFormatV5.js +1 -1
  166. package/dist/shared-tree-core/editManagerFormatV5.js.map +1 -1
  167. package/dist/shared-tree-core/index.d.ts +5 -3
  168. package/dist/shared-tree-core/index.d.ts.map +1 -1
  169. package/dist/shared-tree-core/index.js +11 -3
  170. package/dist/shared-tree-core/index.js.map +1 -1
  171. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -1
  172. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  173. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  174. package/dist/shared-tree-core/messageCodecV5.d.ts +2 -1
  175. package/dist/shared-tree-core/messageCodecV5.d.ts.map +1 -1
  176. package/dist/shared-tree-core/messageCodecV5.js.map +1 -1
  177. package/dist/shared-tree-core/messageCodecs.d.ts +19 -6
  178. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  179. package/dist/shared-tree-core/messageCodecs.js +38 -21
  180. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  181. package/dist/shared-tree-core/messageFormat.d.ts +50 -0
  182. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -0
  183. package/dist/shared-tree-core/messageFormat.js +51 -0
  184. package/dist/shared-tree-core/messageFormat.js.map +1 -0
  185. package/dist/shared-tree-core/sharedTreeCore.d.ts +8 -8
  186. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  187. package/dist/shared-tree-core/sharedTreeCore.js +3 -3
  188. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  189. package/dist/simple-tree/api/discrepancies.d.ts +2 -2
  190. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  191. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
  192. package/dist/simple-tree/api/incrementalAllowedTypes.js +1 -1
  193. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  194. package/dist/simple-tree/api/index.d.ts +3 -2
  195. package/dist/simple-tree/api/index.d.ts.map +1 -1
  196. package/dist/simple-tree/api/index.js +4 -1
  197. package/dist/simple-tree/api/index.js.map +1 -1
  198. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +2 -98
  199. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  200. package/dist/simple-tree/api/schemaFactoryAlpha.js +1 -52
  201. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  202. package/dist/simple-tree/api/schemaFactoryBeta.d.ts +98 -2
  203. package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  204. package/dist/simple-tree/api/schemaFactoryBeta.js +61 -7
  205. package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  206. package/dist/simple-tree/api/schemaFromSimple.js +6 -3
  207. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  208. package/dist/simple-tree/api/simpleSchemaCodec.d.ts +28 -0
  209. package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -0
  210. package/dist/simple-tree/api/simpleSchemaCodec.js +292 -0
  211. package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -0
  212. package/dist/simple-tree/api/storedSchema.d.ts +2 -2
  213. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  214. package/dist/simple-tree/api/storedSchema.js +8 -6
  215. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  216. package/dist/simple-tree/api/tree.d.ts +2 -2
  217. package/dist/simple-tree/api/tree.js.map +1 -1
  218. package/dist/simple-tree/api/typesUnsafe.d.ts +6 -6
  219. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  220. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +18 -3
  221. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  222. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +78 -35
  223. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  224. package/dist/simple-tree/core/allowedTypes.d.ts +3 -3
  225. package/dist/simple-tree/core/allowedTypes.js +1 -1
  226. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  227. package/dist/simple-tree/core/treeNode.js +1 -1
  228. package/dist/simple-tree/core/treeNode.js.map +1 -1
  229. package/dist/simple-tree/index.d.ts +2 -1
  230. package/dist/simple-tree/index.d.ts.map +1 -1
  231. package/dist/simple-tree/index.js +4 -0
  232. package/dist/simple-tree/index.js.map +1 -1
  233. package/dist/simple-tree/node-kinds/array/arrayNode.js +1 -1
  234. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  235. package/dist/simple-tree/node-kinds/map/mapNode.js +1 -1
  236. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  237. package/dist/simple-tree/node-kinds/object/objectNode.js +2 -2
  238. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  239. package/dist/simple-tree/node-kinds/record/recordNode.js +2 -2
  240. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  241. package/dist/simple-tree/simpleSchema.d.ts +11 -3
  242. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  243. package/dist/simple-tree/simpleSchema.js.map +1 -1
  244. package/dist/simple-tree/simpleSchemaFormatV1.d.ts +249 -0
  245. package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -0
  246. package/dist/simple-tree/simpleSchemaFormatV1.js +115 -0
  247. package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -0
  248. package/dist/tableSchema.d.ts.map +1 -1
  249. package/dist/tableSchema.js +1 -1
  250. package/dist/tableSchema.js.map +1 -1
  251. package/dist/treeFactory.d.ts +3 -1
  252. package/dist/treeFactory.d.ts.map +1 -1
  253. package/dist/treeFactory.js +26 -2
  254. package/dist/treeFactory.js.map +1 -1
  255. package/dist/util/brand.d.ts +31 -2
  256. package/dist/util/brand.d.ts.map +1 -1
  257. package/dist/util/brand.js +28 -2
  258. package/dist/util/brand.js.map +1 -1
  259. package/dist/util/brandedMap.d.ts +3 -1
  260. package/dist/util/brandedMap.d.ts.map +1 -1
  261. package/dist/util/brandedMap.js.map +1 -1
  262. package/dist/util/index.d.ts +1 -1
  263. package/dist/util/index.d.ts.map +1 -1
  264. package/dist/util/index.js +3 -2
  265. package/dist/util/index.js.map +1 -1
  266. package/lib/alpha.d.ts +9 -7
  267. package/lib/api.js +2 -2
  268. package/lib/api.js.map +1 -1
  269. package/lib/beta.d.ts +7 -0
  270. package/lib/codec/codec.d.ts +16 -1
  271. package/lib/codec/codec.d.ts.map +1 -1
  272. package/lib/codec/codec.js +16 -3
  273. package/lib/codec/codec.js.map +1 -1
  274. package/lib/core/index.d.ts +1 -1
  275. package/lib/core/index.d.ts.map +1 -1
  276. package/lib/core/index.js +1 -1
  277. package/lib/core/index.js.map +1 -1
  278. package/lib/core/schema-stored/index.d.ts +1 -1
  279. package/lib/core/schema-stored/index.d.ts.map +1 -1
  280. package/lib/core/schema-stored/index.js +1 -1
  281. package/lib/core/schema-stored/index.js.map +1 -1
  282. package/lib/core/schema-stored/schema.d.ts +6 -6
  283. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  284. package/lib/core/schema-stored/schema.js +6 -7
  285. package/lib/core/schema-stored/schema.js.map +1 -1
  286. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +2 -1
  287. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  288. package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  289. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts +1 -1
  290. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  291. package/lib/core/tree/detachedFieldIndexCodecV1.js +3 -2
  292. package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  293. package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  294. package/lib/core/tree/detachedFieldIndexCodecV2.js +4 -2
  295. package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  296. package/lib/core/tree/detachedFieldIndexCodecs.d.ts +2 -3
  297. package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  298. package/lib/core/tree/detachedFieldIndexCodecs.js +29 -8
  299. package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  300. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +10 -1
  301. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  302. package/lib/core/tree/detachedFieldIndexFormatCommon.js +7 -0
  303. package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  304. package/lib/core/tree/detachedFieldIndexFormatV1.d.ts +2 -2
  305. package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
  306. package/lib/core/tree/detachedFieldIndexFormatV1.js +3 -3
  307. package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
  308. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
  309. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  310. package/lib/core/tree/detachedFieldIndexFormatV2.js +3 -3
  311. package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  312. package/lib/core/tree/index.d.ts +2 -1
  313. package/lib/core/tree/index.d.ts.map +1 -1
  314. package/lib/core/tree/index.js +1 -1
  315. package/lib/core/tree/index.js.map +1 -1
  316. package/lib/external-utilities/typeboxValidator.js +1 -1
  317. package/lib/external-utilities/typeboxValidator.js.map +1 -1
  318. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -10
  319. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  320. package/lib/feature-libraries/chunked-forest/codec/codecs.js +13 -8
  321. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  322. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +2 -2
  323. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  324. package/lib/feature-libraries/chunked-forest/codec/format.d.ts +8 -3
  325. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  326. package/lib/feature-libraries/chunked-forest/codec/format.js +8 -3
  327. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  328. package/lib/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
  329. package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  330. package/lib/feature-libraries/chunked-forest/codec/index.js +2 -2
  331. package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  332. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  333. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +2 -2
  334. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  335. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
  336. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  337. package/lib/feature-libraries/chunked-forest/index.js +1 -1
  338. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  339. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +1 -9
  340. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  341. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +2 -20
  342. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  343. package/lib/feature-libraries/forest-summary/codec.d.ts +4 -5
  344. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  345. package/lib/feature-libraries/forest-summary/codec.js +16 -5
  346. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  347. package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -1
  348. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  349. package/lib/feature-libraries/forest-summary/format.d.ts +8 -1
  350. package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
  351. package/lib/feature-libraries/forest-summary/format.js +7 -2
  352. package/lib/feature-libraries/forest-summary/format.js.map +1 -1
  353. package/lib/feature-libraries/forest-summary/index.d.ts +2 -1
  354. package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
  355. package/lib/feature-libraries/forest-summary/index.js +1 -0
  356. package/lib/feature-libraries/forest-summary/index.js.map +1 -1
  357. package/lib/feature-libraries/index.d.ts +3 -3
  358. package/lib/feature-libraries/index.d.ts.map +1 -1
  359. package/lib/feature-libraries/index.js +2 -2
  360. package/lib/feature-libraries/index.js.map +1 -1
  361. package/lib/feature-libraries/schema-edits/index.d.ts +1 -1
  362. package/lib/feature-libraries/schema-edits/index.d.ts.map +1 -1
  363. package/lib/feature-libraries/schema-edits/index.js.map +1 -1
  364. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -7
  365. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  366. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +6 -5
  367. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  368. package/lib/feature-libraries/schema-index/codec.d.ts +10 -10
  369. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  370. package/lib/feature-libraries/schema-index/codec.js +24 -20
  371. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  372. package/lib/feature-libraries/schema-index/formatV1.d.ts +2 -2
  373. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  374. package/lib/feature-libraries/schema-index/formatV1.js +2 -2
  375. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  376. package/lib/feature-libraries/schema-index/formatV2.d.ts +1 -2
  377. package/lib/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
  378. package/lib/feature-libraries/schema-index/formatV2.js +2 -2
  379. package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
  380. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +2 -2
  381. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  382. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  383. package/lib/index.d.ts +1 -1
  384. package/lib/index.d.ts.map +1 -1
  385. package/lib/index.js +1 -1
  386. package/lib/index.js.map +1 -1
  387. package/lib/legacy.d.ts +7 -0
  388. package/lib/packageVersion.d.ts +1 -1
  389. package/lib/packageVersion.js +1 -1
  390. package/lib/packageVersion.js.map +1 -1
  391. package/lib/shared-tree/independentView.d.ts +1 -1
  392. package/lib/shared-tree/independentView.d.ts.map +1 -1
  393. package/lib/shared-tree/independentView.js +11 -4
  394. package/lib/shared-tree/independentView.js.map +1 -1
  395. package/lib/shared-tree/sharedTree.d.ts +12 -16
  396. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  397. package/lib/shared-tree/sharedTree.js +90 -130
  398. package/lib/shared-tree/sharedTree.js.map +1 -1
  399. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +7 -6
  400. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  401. package/lib/shared-tree/sharedTreeChangeCodecs.js +7 -6
  402. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  403. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +2 -2
  404. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  405. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  406. package/lib/shared-tree/treeAlpha.d.ts +1 -1
  407. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  408. package/lib/shared-tree/treeAlpha.js +5 -3
  409. package/lib/shared-tree/treeAlpha.js.map +1 -1
  410. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  411. package/lib/shared-tree/treeCheckout.js +1 -3
  412. package/lib/shared-tree/treeCheckout.js.map +1 -1
  413. package/lib/shared-tree-core/editManagerCodecs.d.ts +19 -6
  414. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  415. package/lib/shared-tree-core/editManagerCodecs.js +32 -16
  416. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  417. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +37 -0
  418. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  419. package/lib/shared-tree-core/editManagerFormatCommons.js +42 -0
  420. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  421. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  422. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  423. package/lib/shared-tree-core/editManagerFormatV1toV4.js +5 -5
  424. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  425. package/lib/shared-tree-core/editManagerFormatV5.d.ts +2 -2
  426. package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +1 -1
  427. package/lib/shared-tree-core/editManagerFormatV5.js +2 -2
  428. package/lib/shared-tree-core/editManagerFormatV5.js.map +1 -1
  429. package/lib/shared-tree-core/index.d.ts +5 -3
  430. package/lib/shared-tree-core/index.d.ts.map +1 -1
  431. package/lib/shared-tree-core/index.js +4 -2
  432. package/lib/shared-tree-core/index.js.map +1 -1
  433. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -1
  434. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  435. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  436. package/lib/shared-tree-core/messageCodecV5.d.ts +2 -1
  437. package/lib/shared-tree-core/messageCodecV5.d.ts.map +1 -1
  438. package/lib/shared-tree-core/messageCodecV5.js.map +1 -1
  439. package/lib/shared-tree-core/messageCodecs.d.ts +19 -6
  440. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  441. package/lib/shared-tree-core/messageCodecs.js +35 -20
  442. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  443. package/lib/shared-tree-core/messageFormat.d.ts +50 -0
  444. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -0
  445. package/lib/shared-tree-core/messageFormat.js +48 -0
  446. package/lib/shared-tree-core/messageFormat.js.map +1 -0
  447. package/lib/shared-tree-core/sharedTreeCore.d.ts +8 -8
  448. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  449. package/lib/shared-tree-core/sharedTreeCore.js +3 -3
  450. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  451. package/lib/simple-tree/api/discrepancies.d.ts +2 -2
  452. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  453. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
  454. package/lib/simple-tree/api/incrementalAllowedTypes.js +1 -1
  455. package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  456. package/lib/simple-tree/api/index.d.ts +3 -2
  457. package/lib/simple-tree/api/index.d.ts.map +1 -1
  458. package/lib/simple-tree/api/index.js +1 -0
  459. package/lib/simple-tree/api/index.js.map +1 -1
  460. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +2 -98
  461. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  462. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -52
  463. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  464. package/lib/simple-tree/api/schemaFactoryBeta.d.ts +98 -2
  465. package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  466. package/lib/simple-tree/api/schemaFactoryBeta.js +58 -4
  467. package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  468. package/lib/simple-tree/api/schemaFromSimple.js +6 -3
  469. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  470. package/lib/simple-tree/api/simpleSchemaCodec.d.ts +28 -0
  471. package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -0
  472. package/lib/simple-tree/api/simpleSchemaCodec.js +264 -0
  473. package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -0
  474. package/lib/simple-tree/api/storedSchema.d.ts +2 -2
  475. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  476. package/lib/simple-tree/api/storedSchema.js +5 -3
  477. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  478. package/lib/simple-tree/api/tree.d.ts +2 -2
  479. package/lib/simple-tree/api/tree.js.map +1 -1
  480. package/lib/simple-tree/api/typesUnsafe.d.ts +6 -6
  481. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  482. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +18 -3
  483. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  484. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +75 -34
  485. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  486. package/lib/simple-tree/core/allowedTypes.d.ts +3 -3
  487. package/lib/simple-tree/core/allowedTypes.js +1 -1
  488. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  489. package/lib/simple-tree/core/treeNode.js +1 -1
  490. package/lib/simple-tree/core/treeNode.js.map +1 -1
  491. package/lib/simple-tree/index.d.ts +2 -1
  492. package/lib/simple-tree/index.d.ts.map +1 -1
  493. package/lib/simple-tree/index.js +1 -0
  494. package/lib/simple-tree/index.js.map +1 -1
  495. package/lib/simple-tree/node-kinds/array/arrayNode.js +2 -2
  496. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  497. package/lib/simple-tree/node-kinds/map/mapNode.js +2 -2
  498. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  499. package/lib/simple-tree/node-kinds/object/objectNode.js +3 -3
  500. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  501. package/lib/simple-tree/node-kinds/record/recordNode.js +3 -3
  502. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  503. package/lib/simple-tree/simpleSchema.d.ts +11 -3
  504. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  505. package/lib/simple-tree/simpleSchema.js.map +1 -1
  506. package/lib/simple-tree/simpleSchemaFormatV1.d.ts +249 -0
  507. package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -0
  508. package/lib/simple-tree/simpleSchemaFormatV1.js +112 -0
  509. package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -0
  510. package/lib/tableSchema.d.ts.map +1 -1
  511. package/lib/tableSchema.js +1 -1
  512. package/lib/tableSchema.js.map +1 -1
  513. package/lib/treeFactory.d.ts +3 -1
  514. package/lib/treeFactory.d.ts.map +1 -1
  515. package/lib/treeFactory.js +23 -1
  516. package/lib/treeFactory.js.map +1 -1
  517. package/lib/util/brand.d.ts +31 -2
  518. package/lib/util/brand.d.ts.map +1 -1
  519. package/lib/util/brand.js +26 -1
  520. package/lib/util/brand.js.map +1 -1
  521. package/lib/util/brandedMap.d.ts +3 -1
  522. package/lib/util/brandedMap.d.ts.map +1 -1
  523. package/lib/util/brandedMap.js.map +1 -1
  524. package/lib/util/index.d.ts +1 -1
  525. package/lib/util/index.d.ts.map +1 -1
  526. package/lib/util/index.js +1 -1
  527. package/lib/util/index.js.map +1 -1
  528. package/package.json +24 -24
  529. package/src/api.ts +2 -2
  530. package/src/codec/codec.ts +17 -3
  531. package/src/core/index.ts +1 -2
  532. package/src/core/schema-stored/index.ts +1 -2
  533. package/src/core/schema-stored/schema.ts +10 -7
  534. package/src/core/tree/detachedFieldIndexCodecCommon.ts +2 -1
  535. package/src/core/tree/detachedFieldIndexCodecV1.ts +4 -2
  536. package/src/core/tree/detachedFieldIndexCodecV2.ts +4 -6
  537. package/src/core/tree/detachedFieldIndexCodecs.ts +33 -11
  538. package/src/core/tree/detachedFieldIndexFormatCommon.ts +17 -2
  539. package/src/core/tree/detachedFieldIndexFormatV1.ts +6 -4
  540. package/src/core/tree/detachedFieldIndexFormatV2.ts +6 -4
  541. package/src/core/tree/index.ts +2 -4
  542. package/src/external-utilities/typeboxValidator.ts +1 -1
  543. package/src/feature-libraries/chunked-forest/codec/codecs.ts +18 -13
  544. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +2 -2
  545. package/src/feature-libraries/chunked-forest/codec/format.ts +15 -4
  546. package/src/feature-libraries/chunked-forest/codec/index.ts +4 -2
  547. package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +2 -2
  548. package/src/feature-libraries/chunked-forest/index.ts +0 -1
  549. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +2 -29
  550. package/src/feature-libraries/forest-summary/codec.ts +24 -9
  551. package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
  552. package/src/feature-libraries/forest-summary/format.ts +12 -2
  553. package/src/feature-libraries/forest-summary/index.ts +2 -1
  554. package/src/feature-libraries/index.ts +1 -2
  555. package/src/feature-libraries/schema-edits/index.ts +0 -1
  556. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +16 -16
  557. package/src/feature-libraries/schema-index/codec.ts +34 -22
  558. package/src/feature-libraries/schema-index/formatV1.ts +2 -2
  559. package/src/feature-libraries/schema-index/formatV2.ts +2 -2
  560. package/src/feature-libraries/schema-index/schemaSummarizer.ts +2 -1
  561. package/src/index.ts +3 -1
  562. package/src/packageVersion.ts +1 -1
  563. package/src/shared-tree/independentView.ts +16 -5
  564. package/src/shared-tree/sharedTree.ts +112 -172
  565. package/src/shared-tree/sharedTreeChangeCodecs.ts +15 -9
  566. package/src/shared-tree/sharedTreeChangeFamily.ts +2 -2
  567. package/src/shared-tree/treeAlpha.ts +6 -5
  568. package/src/shared-tree/treeCheckout.ts +1 -3
  569. package/src/shared-tree-core/editManagerCodecs.ts +56 -19
  570. package/src/shared-tree-core/editManagerFormatCommons.ts +47 -0
  571. package/src/shared-tree-core/editManagerFormatV1toV4.ts +10 -5
  572. package/src/shared-tree-core/editManagerFormatV5.ts +3 -3
  573. package/src/shared-tree-core/index.ts +11 -5
  574. package/src/shared-tree-core/messageCodecV1ToV4.ts +6 -1
  575. package/src/shared-tree-core/messageCodecV5.ts +2 -1
  576. package/src/shared-tree-core/messageCodecs.ts +60 -26
  577. package/src/shared-tree-core/messageFormat.ts +56 -0
  578. package/src/shared-tree-core/sharedTreeCore.ts +11 -13
  579. package/src/simple-tree/api/discrepancies.ts +2 -2
  580. package/src/simple-tree/api/incrementalAllowedTypes.ts +1 -1
  581. package/src/simple-tree/api/index.ts +6 -2
  582. package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -168
  583. package/src/simple-tree/api/schemaFactoryBeta.ts +180 -14
  584. package/src/simple-tree/api/schemaFromSimple.ts +6 -3
  585. package/src/simple-tree/api/simpleSchemaCodec.ts +360 -0
  586. package/src/simple-tree/api/storedSchema.ts +8 -5
  587. package/src/simple-tree/api/tree.ts +2 -2
  588. package/src/simple-tree/api/typesUnsafe.ts +6 -6
  589. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +80 -47
  590. package/src/simple-tree/core/allowedTypes.ts +3 -3
  591. package/src/simple-tree/core/treeNode.ts +2 -2
  592. package/src/simple-tree/index.ts +5 -1
  593. package/src/simple-tree/node-kinds/array/arrayNode.ts +2 -2
  594. package/src/simple-tree/node-kinds/map/mapNode.ts +2 -2
  595. package/src/simple-tree/node-kinds/object/objectNode.ts +3 -3
  596. package/src/simple-tree/node-kinds/record/recordNode.ts +3 -3
  597. package/src/simple-tree/simpleSchema.ts +12 -3
  598. package/src/simple-tree/simpleSchemaFormatV1.ts +179 -0
  599. package/src/tableSchema.ts +5 -2
  600. package/src/treeFactory.ts +33 -1
  601. package/src/util/brand.ts +40 -2
  602. package/src/util/brandedMap.ts +3 -1
  603. package/src/util/index.ts +1 -0
@@ -8,7 +8,9 @@ import { unreachableCase } from "@fluidframework/core-utils/internal";
8
8
 
9
9
  import {
10
10
  type CodecTree,
11
+ type CodecWriteOptions,
11
12
  type DependentFormatVersion,
13
+ FluidClientVersion,
12
14
  type FormatVersion,
13
15
  type ICodecFamily,
14
16
  type ICodecOptions,
@@ -22,17 +24,61 @@ import type {
22
24
  RevisionTag,
23
25
  SchemaAndPolicy,
24
26
  } from "../core/index.js";
25
- import { brand, type Brand, type JsonCompatibleReadOnly } from "../util/index.js";
27
+ import { brand, type JsonCompatibleReadOnly } from "../util/index.js";
26
28
 
27
29
  import type { SummaryData } from "./editManager.js";
28
30
  import { makeV1CodecWithVersion } from "./editManagerCodecsV1toV4.js";
29
31
  import { makeV5CodecWithVersion } from "./editManagerCodecsV5.js";
32
+ import type { MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
33
+ import {
34
+ EditManagerFormatVersion,
35
+ editManagerFormatVersions,
36
+ } from "./editManagerFormatCommons.js";
30
37
 
31
38
  export interface EditManagerEncodingContext {
32
39
  idCompressor: IIdCompressor;
33
40
  readonly schema?: SchemaAndPolicy;
34
41
  }
35
42
 
43
+ /**
44
+ * Convert a MinimumVersionForCollab to an EditManagerFormatVersion.
45
+ * @param clientVersion - The MinimumVersionForCollab to convert.
46
+ * @returns The EditManagerFormatVersion that corresponds to the provided MinimumVersionForCollab.
47
+ */
48
+ export function clientVersionToEditManagerFormatVersion(
49
+ clientVersion: MinimumVersionForCollab,
50
+ writeVersionOverride?: EditManagerFormatVersion,
51
+ ): EditManagerFormatVersion {
52
+ const compatibleVersion: EditManagerFormatVersion =
53
+ clientVersion < FluidClientVersion.v2_43
54
+ ? brand(EditManagerFormatVersion.v3)
55
+ : brand(EditManagerFormatVersion.v4);
56
+ return writeVersionOverride ?? compatibleVersion;
57
+ }
58
+
59
+ /**
60
+ * Returns the version that should be used for testing shared branches.
61
+ */
62
+ export function editManagerFormatVersionSelectorForSharedBranches(
63
+ clientVersion: MinimumVersionForCollab,
64
+ ): EditManagerFormatVersion {
65
+ return brand(EditManagerFormatVersion.v5);
66
+ }
67
+
68
+ export interface EditManagerCodecOptions {
69
+ readonly editManagerFormatSelector?: (
70
+ minVersionForCollab: MinimumVersionForCollab,
71
+ ) => EditManagerFormatVersion;
72
+ }
73
+
74
+ function editManagerFormatVersionFromOptions(
75
+ options: EditManagerCodecOptions & CodecWriteOptions,
76
+ ): EditManagerFormatVersion {
77
+ const selector =
78
+ options.editManagerFormatSelector ?? clientVersionToEditManagerFormatVersion;
79
+ return selector(options.minVersionForCollab);
80
+ }
81
+
36
82
  export function makeEditManagerCodec<TChangeset>(
37
83
  changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,
38
84
  dependentChangeFormatVersion: DependentFormatVersion<EditManagerFormatVersion>,
@@ -42,8 +88,7 @@ export function makeEditManagerCodec<TChangeset>(
42
88
  EncodedRevisionTag,
43
89
  ChangeEncodingContext
44
90
  >,
45
- options: ICodecOptions,
46
- writeVersion: number,
91
+ options: EditManagerCodecOptions & CodecWriteOptions,
47
92
  ): IJsonCodec<
48
93
  SummaryData<TChangeset>,
49
94
  JsonCompatibleReadOnly,
@@ -56,6 +101,7 @@ export function makeEditManagerCodec<TChangeset>(
56
101
  revisionTagCodec,
57
102
  options,
58
103
  );
104
+ const writeVersion = editManagerFormatVersionFromOptions(options);
59
105
  return makeVersionDispatchingCodec(family, { ...options, writeVersion });
60
106
  }
61
107
 
@@ -81,15 +127,15 @@ export function makeEditManagerCodecs<TChangeset>(
81
127
  ][] = Array.from(editManagerFormatVersions, (version) => {
82
128
  const changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version));
83
129
  switch (version) {
84
- case 1:
85
- case 2:
86
- case 3:
87
- case 4:
130
+ case EditManagerFormatVersion.v1:
131
+ case EditManagerFormatVersion.v2:
132
+ case EditManagerFormatVersion.v3:
133
+ case EditManagerFormatVersion.v4:
88
134
  return [
89
135
  version,
90
136
  makeV1CodecWithVersion(changeCodec, revisionTagCodec, options, version),
91
137
  ];
92
- case 5:
138
+ case EditManagerFormatVersion.v5:
93
139
  return [
94
140
  version,
95
141
  makeV5CodecWithVersion(changeCodec, revisionTagCodec, options, version),
@@ -101,22 +147,13 @@ export function makeEditManagerCodecs<TChangeset>(
101
147
  return makeCodecFamily(registry);
102
148
  }
103
149
 
104
- export type EditManagerFormatVersion = Brand<1 | 2 | 3 | 4 | 5, "EditManagerFormatVersion">;
105
- export const editManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> = new Set([
106
- brand(1),
107
- brand(2),
108
- brand(3),
109
- brand(4),
110
- brand(5),
111
- ]);
112
-
113
150
  export function getCodecTreeForEditManagerFormatWithChange(
114
- version: EditManagerFormatVersion,
151
+ clientVersion: MinimumVersionForCollab,
115
152
  changeFormat: CodecTree,
116
153
  ): CodecTree {
117
154
  return {
118
155
  name: "EditManager",
119
- version,
156
+ version: clientVersionToEditManagerFormatVersion(clientVersion),
120
157
  children: [changeFormat],
121
158
  };
122
159
  }
@@ -120,4 +120,51 @@ export const EncodedSharedBranch = <ChangeSchema extends TSchema>(tChange: Chang
120
120
  noAdditionalProps,
121
121
  );
122
122
 
123
+ /**
124
+ * The format version for the EditManager.
125
+ */
126
+ export const EditManagerFormatVersion = {
127
+ /**
128
+ * Introduced and retired prior to 2.0.
129
+ * Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.
130
+ * Writing capability need not be maintained.
131
+ */
132
+ v1: 1,
133
+ /**
134
+ * Introduced and retired prior to 2.0.
135
+ * Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.
136
+ * Writing capability need not be maintained.
137
+ */
138
+ v2: 2,
139
+ /**
140
+ * Introduced prior to 2.0 and used beyond.
141
+ * Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.
142
+ * Writing capability needs to be maintained.
143
+ */
144
+ v3: 3,
145
+ /**
146
+ * Was inadvertently released in 2.43.0 (through usages of configuredSharedTree) and remains available.
147
+ * Reading capability must be maintained for backwards compatibility.
148
+ * Writing capability needs to be maintained.
149
+ * @privateRemarks TODO: stop writing this version.
150
+ */
151
+ v4: 4,
152
+ /**
153
+ * Not yet released.
154
+ * Only used for testing shared branches.
155
+ */
156
+ v5: 5,
157
+ } as const;
158
+ export type EditManagerFormatVersion = Brand<
159
+ (typeof EditManagerFormatVersion)[keyof typeof EditManagerFormatVersion],
160
+ "EditManagerFormatVersion"
161
+ >;
162
+ export const editManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> = new Set([
163
+ EditManagerFormatVersion.v1,
164
+ EditManagerFormatVersion.v2,
165
+ EditManagerFormatVersion.v3,
166
+ EditManagerFormatVersion.v4,
167
+ EditManagerFormatVersion.v5,
168
+ ] as EditManagerFormatVersion[]);
169
+
123
170
  /* eslint-enable @typescript-eslint/explicit-function-return-type */
@@ -8,6 +8,7 @@ import { type ObjectOptions, type TSchema, Type } from "@sinclair/typebox";
8
8
 
9
9
  import { SessionIdSchema } from "../core/index.js";
10
10
  import {
11
+ EditManagerFormatVersion,
11
12
  type EncodedSummarySessionBranch,
12
13
  SequencedCommit,
13
14
  SummarySessionBranch,
@@ -21,17 +22,21 @@ const noAdditionalProps: ObjectOptions = { additionalProperties: false };
21
22
  export interface EncodedEditManager<TChangeset> {
22
23
  readonly trunk: readonly Readonly<SequencedCommit<TChangeset>>[];
23
24
  readonly branches: readonly [SessionId, Readonly<EncodedSummarySessionBranch<TChangeset>>][];
24
- readonly version: 1 | 2 | 3 | 4;
25
+ readonly version:
26
+ | typeof EditManagerFormatVersion.v1
27
+ | typeof EditManagerFormatVersion.v2
28
+ | typeof EditManagerFormatVersion.v3
29
+ | typeof EditManagerFormatVersion.v4;
25
30
  }
26
31
 
27
32
  export const EncodedEditManager = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>
28
33
  Type.Object(
29
34
  {
30
35
  version: Type.Union([
31
- Type.Literal(1),
32
- Type.Literal(2),
33
- Type.Literal(3),
34
- Type.Literal(4),
36
+ Type.Literal(EditManagerFormatVersion.v1),
37
+ Type.Literal(EditManagerFormatVersion.v2),
38
+ Type.Literal(EditManagerFormatVersion.v3),
39
+ Type.Literal(EditManagerFormatVersion.v4),
35
40
  ]),
36
41
  trunk: Type.Array(SequencedCommit(tChange)),
37
42
  branches: Type.Array(Type.Tuple([SessionIdSchema, SummarySessionBranch(tChange)])),
@@ -6,7 +6,7 @@
6
6
  import { type ObjectOptions, type TSchema, Type } from "@sinclair/typebox";
7
7
  import type { SessionId } from "@fluidframework/id-compressor";
8
8
 
9
- import { EncodedSharedBranch } from "./editManagerFormatCommons.js";
9
+ import { EncodedSharedBranch, EditManagerFormatVersion } from "./editManagerFormatCommons.js";
10
10
  import { SessionIdSchema } from "../core/index.js";
11
11
 
12
12
  const noAdditionalProps: ObjectOptions = { additionalProperties: false };
@@ -15,7 +15,7 @@ const noAdditionalProps: ObjectOptions = { additionalProperties: false };
15
15
  /* eslint-disable @typescript-eslint/explicit-function-return-type */
16
16
 
17
17
  export interface EncodedEditManager<TChangeset> {
18
- readonly version: 5;
18
+ readonly version: typeof EditManagerFormatVersion.v5;
19
19
  readonly originator: SessionId;
20
20
  readonly main: EncodedSharedBranch<TChangeset>;
21
21
  readonly branches?: readonly EncodedSharedBranch<TChangeset>[];
@@ -24,7 +24,7 @@ export interface EncodedEditManager<TChangeset> {
24
24
  export const EncodedEditManager = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>
25
25
  Type.Object(
26
26
  {
27
- version: Type.Union([Type.Literal(5)]),
27
+ version: Type.Union([Type.Literal(EditManagerFormatVersion.v5)]),
28
28
  originator: SessionIdSchema,
29
29
  main: EncodedSharedBranch(tChange),
30
30
  branches: Type.Optional(Type.Array(EncodedSharedBranch(tChange))),
@@ -22,12 +22,12 @@ export {
22
22
  } from "./transaction.js";
23
23
 
24
24
  export {
25
- type ExplicitCoreCodecVersions,
26
25
  SharedTreeCore,
27
26
  type Summarizable,
28
27
  type SummaryElementParser,
29
28
  type SummaryElementStringifier,
30
29
  type ClonableSchemaAndPolicy,
30
+ type SharedTreeCoreOptionsInternal as SharedTreCoreOptionsInternal,
31
31
  } from "./sharedTreeCore.js";
32
32
 
33
33
  export type { ResubmitMachine } from "./resubmitMachine.js";
@@ -42,9 +42,14 @@ export {
42
42
  export {
43
43
  makeEditManagerCodec,
44
44
  getCodecTreeForEditManagerFormatWithChange,
45
- type EditManagerFormatVersion,
46
- editManagerFormatVersions,
45
+ type EditManagerCodecOptions,
46
+ clientVersionToEditManagerFormatVersion,
47
+ editManagerFormatVersionSelectorForSharedBranches,
47
48
  } from "./editManagerCodecs.js";
49
+ export {
50
+ EditManagerFormatVersion,
51
+ editManagerFormatVersions,
52
+ } from "./editManagerFormatCommons.js";
48
53
  export { EditManagerSummarizer } from "./editManagerSummarizer.js";
49
54
  export {
50
55
  EditManager,
@@ -61,7 +66,8 @@ export type {
61
66
  } from "./editManagerFormatCommons.js";
62
67
 
63
68
  export {
64
- type MessageFormatVersion,
65
- messageFormatVersions,
66
69
  getCodecTreeForMessageFormatWithChange,
70
+ clientVersionToMessageFormatVersion,
71
+ messageFormatVersionSelectorForSharedBranches,
67
72
  } from "./messageCodecs.js";
73
+ export { MessageFormatVersion, messageFormatVersions } from "./messageFormat.js";
@@ -18,6 +18,7 @@ import type { JsonCompatibleReadOnly } from "../util/index.js";
18
18
  import { Message } from "./messageFormatV1ToV4.js";
19
19
  import type { DecodedMessage } from "./messageTypes.js";
20
20
  import type { MessageEncodingContext } from "./messageCodecs.js";
21
+ import type { MessageFormatVersion } from "./messageFormat.js";
21
22
 
22
23
  export function makeV1ToV4CodecWithVersion<TChangeset>(
23
24
  changeCodec: ChangeFamilyCodec<TChangeset>,
@@ -28,7 +29,11 @@ export function makeV1ToV4CodecWithVersion<TChangeset>(
28
29
  ChangeEncodingContext
29
30
  >,
30
31
  options: ICodecOptions,
31
- version: 1 | 2 | 3 | 4,
32
+ version:
33
+ | typeof MessageFormatVersion.v1
34
+ | typeof MessageFormatVersion.v2
35
+ | typeof MessageFormatVersion.v3
36
+ | typeof MessageFormatVersion.v4,
32
37
  ): IJsonCodec<
33
38
  DecodedMessage<TChangeset>,
34
39
  JsonCompatibleReadOnly,
@@ -19,6 +19,7 @@ import type { DecodedMessage } from "./messageTypes.js";
19
19
  import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
20
20
  import type { MessageEncodingContext } from "./messageCodecs.js";
21
21
  import { decodeBranchId, encodeBranchId } from "./branchIdCodec.js";
22
+ import type { MessageFormatVersion } from "./messageFormat.js";
22
23
 
23
24
  export function makeV5CodecWithVersion<TChangeset>(
24
25
  changeCodec: ChangeFamilyCodec<TChangeset>,
@@ -29,7 +30,7 @@ export function makeV5CodecWithVersion<TChangeset>(
29
30
  ChangeEncodingContext
30
31
  >,
31
32
  options: ICodecOptions,
32
- version: 5,
33
+ version: typeof MessageFormatVersion.v5,
33
34
  ): IJsonCodec<
34
35
  DecodedMessage<TChangeset>,
35
36
  JsonCompatibleReadOnly,
@@ -4,9 +4,12 @@
4
4
  */
5
5
 
6
6
  import { unreachableCase } from "@fluidframework/core-utils/internal";
7
+ import type { MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
7
8
  import {
8
9
  type CodecTree,
10
+ type CodecWriteOptions,
9
11
  type DependentFormatVersion,
12
+ FluidClientVersion,
10
13
  type FormatVersion,
11
14
  type ICodecFamily,
12
15
  type ICodecOptions,
@@ -20,18 +23,57 @@ import type {
20
23
  RevisionTag,
21
24
  SchemaAndPolicy,
22
25
  } from "../core/index.js";
23
- import { brand, type Brand, type JsonCompatibleReadOnly } from "../util/index.js";
26
+ import { brand, type JsonCompatibleReadOnly } from "../util/index.js";
24
27
 
25
28
  import type { DecodedMessage } from "./messageTypes.js";
26
29
  import type { IIdCompressor } from "@fluidframework/id-compressor";
27
30
  import { makeV1ToV4CodecWithVersion } from "./messageCodecV1ToV4.js";
28
31
  import { makeV5CodecWithVersion } from "./messageCodecV5.js";
32
+ import { MessageFormatVersion, messageFormatVersions } from "./messageFormat.js";
29
33
 
30
34
  export interface MessageEncodingContext {
31
35
  idCompressor: IIdCompressor;
32
36
  schema?: SchemaAndPolicy;
33
37
  }
34
38
 
39
+ /**
40
+ * Convert a MinimumVersionForCollab to a MessageFormatVersion.
41
+ * @param clientVersion - The MinimumVersionForCollab to convert.
42
+ * @returns The MessageFormatVersion that corresponds to the provided MinimumVersionForCollab.
43
+ */
44
+ export function clientVersionToMessageFormatVersion(
45
+ clientVersion: MinimumVersionForCollab,
46
+ writeVersionOverride?: MessageFormatVersion,
47
+ ): MessageFormatVersion {
48
+ const compatibleVersion: MessageFormatVersion =
49
+ clientVersion < FluidClientVersion.v2_43
50
+ ? brand(MessageFormatVersion.v3)
51
+ : brand(MessageFormatVersion.v4);
52
+ return writeVersionOverride ?? compatibleVersion;
53
+ }
54
+
55
+ export interface MessageCodecOptions {
56
+ readonly messageFormatSelector?: (
57
+ minVersionForCollab: MinimumVersionForCollab,
58
+ ) => MessageFormatVersion;
59
+ }
60
+
61
+ function messageFormatVersionFromOptions(
62
+ options: MessageCodecOptions & CodecWriteOptions,
63
+ ): MessageFormatVersion {
64
+ const selector = options.messageFormatSelector ?? clientVersionToMessageFormatVersion;
65
+ return selector(options.minVersionForCollab);
66
+ }
67
+
68
+ /**
69
+ * Returns the version that should be used for testing shared branches.
70
+ */
71
+ export function messageFormatVersionSelectorForSharedBranches(
72
+ clientVersion: MinimumVersionForCollab,
73
+ ): MessageFormatVersion {
74
+ return brand(MessageFormatVersion.v5);
75
+ }
76
+
35
77
  export function makeMessageCodec<TChangeset>(
36
78
  changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,
37
79
  dependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>,
@@ -41,8 +83,7 @@ export function makeMessageCodec<TChangeset>(
41
83
  EncodedRevisionTag,
42
84
  ChangeEncodingContext
43
85
  >,
44
- options: ICodecOptions,
45
- writeVersion: MessageFormatVersion = brand(1),
86
+ options: MessageCodecOptions & CodecWriteOptions,
46
87
  ): IJsonCodec<
47
88
  DecodedMessage<TChangeset>,
48
89
  JsonCompatibleReadOnly,
@@ -55,6 +96,7 @@ export function makeMessageCodec<TChangeset>(
55
96
  revisionTagCodec,
56
97
  options,
57
98
  );
99
+ const writeVersion = messageFormatVersionFromOptions(options);
58
100
  return makeVersionDispatchingCodec(family, { ...options, writeVersion });
59
101
  }
60
102
 
@@ -85,16 +127,21 @@ export function makeMessageCodecs<TChangeset>(
85
127
  dependentChangeFormatVersion.lookup(version),
86
128
  ).json;
87
129
  switch (version) {
88
- case undefined:
89
- case 1:
90
- case 2:
91
- case 3:
92
- case 4:
130
+ case MessageFormatVersion.undefined:
131
+ case MessageFormatVersion.v1:
132
+ case MessageFormatVersion.v2:
133
+ case MessageFormatVersion.v3:
134
+ case MessageFormatVersion.v4:
93
135
  return [
94
- version,
95
- makeV1ToV4CodecWithVersion(changeCodec, revisionTagCodec, options, version ?? 1),
136
+ version === MessageFormatVersion.undefined ? undefined : version,
137
+ makeV1ToV4CodecWithVersion(
138
+ changeCodec,
139
+ revisionTagCodec,
140
+ options,
141
+ version === MessageFormatVersion.undefined ? MessageFormatVersion.v1 : version,
142
+ ),
96
143
  ];
97
- case 5:
144
+ case MessageFormatVersion.v5:
98
145
  return [
99
146
  version,
100
147
  makeV5CodecWithVersion(changeCodec, revisionTagCodec, options, version),
@@ -106,26 +153,13 @@ export function makeMessageCodecs<TChangeset>(
106
153
  return makeCodecFamily(registry);
107
154
  }
108
155
 
109
- export type MessageFormatVersion = Brand<
110
- undefined | 1 | 2 | 3 | 4 | 5,
111
- "MessageFormatVersion"
112
- >;
113
- export const messageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set([
114
- brand(undefined),
115
- brand(1),
116
- brand(2),
117
- brand(3),
118
- brand(4),
119
- brand(5),
120
- ]);
121
-
122
156
  export function getCodecTreeForMessageFormatWithChange(
123
- version: MessageFormatVersion,
157
+ clientVersion: MinimumVersionForCollab,
124
158
  changeFormat: CodecTree,
125
159
  ): CodecTree {
126
160
  return {
127
161
  name: "Message",
128
- version,
162
+ version: clientVersionToMessageFormatVersion(clientVersion),
129
163
  children: [changeFormat],
130
164
  };
131
165
  }
@@ -0,0 +1,56 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ import type { Brand } from "../util/index.js";
7
+
8
+ /**
9
+ * The format version for the message.
10
+ */
11
+ export const MessageFormatVersion = {
12
+ /**
13
+ * NOTE: this is written as `undefined` rather than `0` in the wire format.
14
+ * Introduced and retired prior to 2.0.
15
+ * Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.
16
+ * Writing capability need not be maintained.
17
+ */
18
+ undefined: 0,
19
+ /**
20
+ * Introduced and retired prior to 2.0.
21
+ * Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.
22
+ * Writing capability need not be maintained.
23
+ */
24
+ v1: 1,
25
+ /**
26
+ * Introduced and retired prior to 2.0.
27
+ * Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.
28
+ * Writing capability need not be maintained.
29
+ */
30
+ v2: 2,
31
+ /**
32
+ * Introduced prior to 2.0 and used beyond.
33
+ * Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.
34
+ * Writing capability needs to be maintained.
35
+ */
36
+ v3: 3,
37
+ /**
38
+ * Was inadvertently released in 2.43.0 (through usages of configuredSharedTree) and remains available.
39
+ * Reading capability must be maintained for backwards compatibility.
40
+ * Writing capability needs to be maintained.
41
+ * @privateRemarks TODO: stop writing this version.
42
+ */
43
+ v4: 4,
44
+ /**
45
+ * Not yet released.
46
+ * Only used for testing shared branches.
47
+ */
48
+ v5: 5,
49
+ } as const;
50
+ export type MessageFormatVersion = Brand<
51
+ (typeof MessageFormatVersion)[keyof typeof MessageFormatVersion],
52
+ "MessageFormatVersion"
53
+ >;
54
+ export const messageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set(
55
+ Object.values(MessageFormatVersion) as MessageFormatVersion[],
56
+ );
@@ -25,7 +25,7 @@ import type {
25
25
  } from "@fluidframework/shared-object-base/internal";
26
26
  import { createChildLogger } from "@fluidframework/telemetry-utils/internal";
27
27
 
28
- import type { DependentFormatVersion, ICodecOptions, IJsonCodec } from "../codec/index.js";
28
+ import type { CodecWriteOptions, DependentFormatVersion, IJsonCodec } from "../codec/index.js";
29
29
  import {
30
30
  type ChangeFamily,
31
31
  type ChangeFamilyEditor,
@@ -51,29 +51,30 @@ import { BranchCommitEnricher } from "./branchCommitEnricher.js";
51
51
  import { type ChangeEnricherReadonlyCheckout, NoOpChangeEnricher } from "./changeEnricher.js";
52
52
  import { DefaultResubmitMachine } from "./defaultResubmitMachine.js";
53
53
  import { EditManager, minimumPossibleSequenceNumber } from "./editManager.js";
54
- import { makeEditManagerCodec, type EditManagerFormatVersion } from "./editManagerCodecs.js";
55
- import type { SeqNumber } from "./editManagerFormatCommons.js";
54
+ import { makeEditManagerCodec, type EditManagerCodecOptions } from "./editManagerCodecs.js";
55
+ import type { EditManagerFormatVersion, SeqNumber } from "./editManagerFormatCommons.js";
56
56
  import { EditManagerSummarizer } from "./editManagerSummarizer.js";
57
57
  import {
58
+ type MessageCodecOptions,
58
59
  type MessageEncodingContext,
59
- type MessageFormatVersion,
60
60
  makeMessageCodec,
61
61
  } from "./messageCodecs.js";
62
62
  import type { DecodedMessage } from "./messageTypes.js";
63
63
  import type { ResubmitMachine } from "./resubmitMachine.js";
64
+ import type { MessageFormatVersion } from "./messageFormat.js";
64
65
 
65
66
  // TODO: Organize this to be adjacent to persisted types.
66
67
  const summarizablesTreeKey = "indexes";
67
68
 
68
- export interface ExplicitCoreCodecVersions {
69
- editManager: EditManagerFormatVersion;
70
- message: MessageFormatVersion;
71
- }
72
-
73
69
  export interface ClonableSchemaAndPolicy extends SchemaAndPolicy {
74
70
  schema: TreeStoredSchemaRepository;
75
71
  }
76
72
 
73
+ export interface SharedTreeCoreOptionsInternal
74
+ extends CodecWriteOptions,
75
+ EditManagerCodecOptions,
76
+ MessageCodecOptions {}
77
+
77
78
  /**
78
79
  * Generic shared tree, which needs to be configured with indexes, field kinds and other configuration.
79
80
  */
@@ -128,8 +129,7 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
128
129
  logger: ITelemetryBaseLogger | undefined,
129
130
  summarizables: readonly Summarizable[],
130
131
  protected readonly changeFamily: ChangeFamily<TEditor, TChange>,
131
- options: ICodecOptions,
132
- formatOptions: ExplicitCoreCodecVersions,
132
+ options: SharedTreeCoreOptionsInternal,
133
133
  changeFormatVersionForEditManager: DependentFormatVersion<EditManagerFormatVersion>,
134
134
  changeFormatVersionForMessage: DependentFormatVersion<MessageFormatVersion>,
135
135
  protected readonly idCompressor: IIdCompressor,
@@ -172,7 +172,6 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
172
172
  changeFormatVersionForEditManager,
173
173
  revisionTagCodec,
174
174
  options,
175
- formatOptions.editManager,
176
175
  );
177
176
  this.summarizables = [
178
177
  new EditManagerSummarizer(
@@ -193,7 +192,6 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
193
192
  changeFormatVersionForMessage,
194
193
  new RevisionTagCodec(idCompressor),
195
194
  options,
196
- formatOptions.message,
197
195
  );
198
196
 
199
197
  this.registerSharedBranchForEditing(
@@ -90,12 +90,12 @@ export interface AllowedTypeDiscrepancy extends FieldDiscrepancyLocation {
90
90
  readonly mismatch: "allowedTypes";
91
91
  /**
92
92
  * Annotated allowed types in viewed schema
93
- * (excluding {@link SchemaStaticsAlpha.staged | staged} schema) which are not allowed in stored schema.
93
+ * (excluding {@link SchemaStaticsBeta.staged | staged} schema) which are not allowed in stored schema.
94
94
  */
95
95
  readonly view: readonly AnnotatedAllowedType<TreeNodeSchema>[];
96
96
  /**
97
97
  * Allowed type identifiers in stored schema which are not allowed in view schema
98
- * (including the view schema's {@link SchemaStaticsAlpha.staged | staged} schema).
98
+ * (including the view schema's {@link SchemaStaticsBeta.staged | staged} schema).
99
99
  */
100
100
  readonly stored: readonly TreeNodeSchemaIdentifier[];
101
101
  }
@@ -19,7 +19,7 @@ import { assert } from "@fluidframework/core-utils/internal";
19
19
  * @remarks
20
20
  * See {@link getShouldIncrementallySummarizeAllowedTypes} for more details.
21
21
  *
22
- * Use {@link SchemaStaticsAlpha.types} to add this metadata to allowed types in a schema.
22
+ * Use {@link SchemaStaticsBeta.types} to add this metadata to allowed types in a schema.
23
23
  * @example
24
24
  * ```typescript
25
25
  * const sf = new SchemaFactoryAlpha("IncrementalSummarization");
@@ -36,8 +36,8 @@ export {
36
36
  type NodeSchemaOptionsAlpha,
37
37
  type SchemaFactory_base,
38
38
  } from "./schemaFactory.js";
39
- export { SchemaFactoryBeta } from "./schemaFactoryBeta.js";
40
- export { SchemaFactoryAlpha, type SchemaStaticsAlpha } from "./schemaFactoryAlpha.js";
39
+ export { SchemaFactoryBeta, type SchemaStaticsBeta } from "./schemaFactoryBeta.js";
40
+ export { SchemaFactoryAlpha } from "./schemaFactoryAlpha.js";
41
41
  export type {
42
42
  ValidateRecursiveSchema,
43
43
  FixRecursiveArraySchema,
@@ -167,3 +167,7 @@ export {
167
167
  getShouldIncrementallySummarizeAllowedTypes,
168
168
  incrementalSummaryHint,
169
169
  } from "./incrementalAllowedTypes.js";
170
+ export {
171
+ encodeSimpleSchema,
172
+ decodeSimpleSchema,
173
+ } from "./simpleSchemaCodec.js";