@fluidframework/tree 2.73.0 → 2.74.0-368706

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 (1294) hide show
  1. package/.vscode/settings.json +2 -2
  2. package/api-report/tree.alpha.api.md +133 -85
  3. package/api-report/tree.beta.api.md +0 -1
  4. package/api-report/tree.legacy.beta.api.md +0 -1
  5. package/api-report/tree.legacy.public.api.md +0 -1
  6. package/api-report/tree.public.api.md +0 -1
  7. package/dist/alpha.d.ts +7 -2
  8. package/dist/codec/codec.d.ts +14 -1
  9. package/dist/codec/codec.d.ts.map +1 -1
  10. package/dist/codec/codec.js +11 -0
  11. package/dist/codec/codec.js.map +1 -1
  12. package/dist/codec/versioned/codec.d.ts +1 -1
  13. package/dist/codec/versioned/codec.d.ts.map +1 -1
  14. package/dist/codec/versioned/codec.js.map +1 -1
  15. package/dist/codec/versioned/format.d.ts +4 -1
  16. package/dist/codec/versioned/format.d.ts.map +1 -1
  17. package/dist/codec/versioned/format.js +4 -1
  18. package/dist/codec/versioned/format.js.map +1 -1
  19. package/dist/core/change-family/changeFamily.d.ts +4 -1
  20. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  21. package/dist/core/change-family/changeFamily.js.map +1 -1
  22. package/dist/core/change-family/index.d.ts +1 -1
  23. package/dist/core/change-family/index.d.ts.map +1 -1
  24. package/dist/core/change-family/index.js.map +1 -1
  25. package/dist/core/index.d.ts +3 -3
  26. package/dist/core/index.d.ts.map +1 -1
  27. package/dist/core/index.js +7 -4
  28. package/dist/core/index.js.map +1 -1
  29. package/dist/core/rebase/changeRebaser.d.ts +6 -1
  30. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  31. package/dist/core/rebase/changeRebaser.js.map +1 -1
  32. package/dist/core/rebase/index.d.ts +1 -1
  33. package/dist/core/rebase/index.d.ts.map +1 -1
  34. package/dist/core/rebase/index.js +2 -1
  35. package/dist/core/rebase/index.js.map +1 -1
  36. package/dist/core/rebase/types.d.ts +2 -1
  37. package/dist/core/rebase/types.d.ts.map +1 -1
  38. package/dist/core/rebase/types.js +5 -1
  39. package/dist/core/rebase/types.js.map +1 -1
  40. package/dist/core/rebase/utils.d.ts.map +1 -1
  41. package/dist/core/rebase/utils.js +25 -7
  42. package/dist/core/rebase/utils.js.map +1 -1
  43. package/dist/core/tree/detachedFieldIndex.d.ts +40 -13
  44. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  45. package/dist/core/tree/detachedFieldIndex.js +21 -12
  46. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  47. package/dist/core/tree/index.d.ts +4 -3
  48. package/dist/core/tree/index.d.ts.map +1 -1
  49. package/dist/core/tree/index.js +6 -2
  50. package/dist/core/tree/index.js.map +1 -1
  51. package/dist/core/tree/pathTree.d.ts +11 -3
  52. package/dist/core/tree/pathTree.d.ts.map +1 -1
  53. package/dist/core/tree/pathTree.js +14 -2
  54. package/dist/core/tree/pathTree.js.map +1 -1
  55. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  56. package/dist/feature-libraries/chunked-forest/basicChunk.js +7 -0
  57. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  58. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  59. package/dist/feature-libraries/chunked-forest/chunkTree.js +4 -1
  60. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  61. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +2 -2
  62. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  63. package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  64. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  65. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +15 -7
  66. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
  67. package/dist/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
  68. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
  69. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  70. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +90 -42
  71. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  72. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +234 -69
  73. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  74. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +4 -4
  75. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  76. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +33 -28
  77. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  78. package/dist/feature-libraries/default-schema/index.d.ts +2 -1
  79. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  80. package/dist/feature-libraries/default-schema/index.js +4 -2
  81. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  82. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +36 -0
  83. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +1 -0
  84. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +126 -0
  85. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +1 -0
  86. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +7 -6
  87. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  88. package/dist/feature-libraries/default-schema/mappedEditBuilder.js +15 -0
  89. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  90. package/dist/feature-libraries/deltaUtils.d.ts +1 -0
  91. package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
  92. package/dist/feature-libraries/deltaUtils.js +6 -1
  93. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  94. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +30 -8
  95. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  96. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +41 -11
  97. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  98. package/dist/feature-libraries/flex-tree/context.d.ts +9 -0
  99. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  100. package/dist/feature-libraries/flex-tree/context.js +6 -0
  101. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  102. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  103. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  104. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  105. package/dist/feature-libraries/flex-tree/lazyField.d.ts +8 -7
  106. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  107. package/dist/feature-libraries/flex-tree/lazyField.js +37 -8
  108. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  109. package/dist/feature-libraries/forest-summary/codec.d.ts +2 -2
  110. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  111. package/dist/feature-libraries/forest-summary/codec.js +4 -4
  112. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  113. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +9 -13
  114. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  115. package/dist/feature-libraries/forest-summary/forestSummarizer.js +22 -27
  116. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  117. package/dist/feature-libraries/forest-summary/format.d.ts +41 -5
  118. package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
  119. package/dist/feature-libraries/forest-summary/format.js +7 -7
  120. package/dist/feature-libraries/forest-summary/format.js.map +1 -1
  121. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +11 -9
  122. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  123. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +16 -29
  124. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  125. package/dist/feature-libraries/forest-summary/index.d.ts +2 -1
  126. package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
  127. package/dist/feature-libraries/forest-summary/index.js +3 -2
  128. package/dist/feature-libraries/forest-summary/index.js.map +1 -1
  129. package/dist/feature-libraries/forest-summary/summaryTypes.d.ts +47 -0
  130. package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
  131. package/dist/feature-libraries/forest-summary/summaryTypes.js +57 -0
  132. package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
  133. package/dist/feature-libraries/index.d.ts +5 -5
  134. package/dist/feature-libraries/index.d.ts.map +1 -1
  135. package/dist/feature-libraries/index.js +7 -4
  136. package/dist/feature-libraries/index.js.map +1 -1
  137. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  138. package/dist/feature-libraries/mapTreeCursor.js +1 -0
  139. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  140. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  141. package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
  142. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  143. package/dist/feature-libraries/modular-schema/comparison.d.ts +18 -2
  144. package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  145. package/dist/feature-libraries/modular-schema/comparison.js +54 -3
  146. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  147. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +97 -21
  148. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  149. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +4 -7
  150. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  151. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +20 -52
  152. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  153. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  154. package/dist/feature-libraries/modular-schema/fieldKind.d.ts +25 -13
  155. package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  156. package/dist/feature-libraries/modular-schema/fieldKind.js +0 -21
  157. package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  158. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  159. package/dist/feature-libraries/modular-schema/genericFieldKind.js +7 -10
  160. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  161. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +2 -2
  162. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  163. package/dist/feature-libraries/modular-schema/index.d.ts +5 -5
  164. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  165. package/dist/feature-libraries/modular-schema/index.js +12 -8
  166. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  167. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +17 -0
  168. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -0
  169. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +388 -0
  170. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -0
  171. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +17 -0
  172. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -0
  173. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +413 -0
  174. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -0
  175. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +4 -4
  176. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  177. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +8 -284
  178. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  179. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +48 -15
  180. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  181. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +1298 -465
  182. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  183. package/dist/feature-libraries/modular-schema/{modularChangeFormat.d.ts → modularChangeFormatV1.d.ts} +2 -2
  184. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -0
  185. package/dist/feature-libraries/modular-schema/{modularChangeFormat.js → modularChangeFormatV1.js} +5 -5
  186. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -0
  187. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +146 -0
  188. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -0
  189. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +32 -0
  190. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -0
  191. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +50 -10
  192. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  193. package/dist/feature-libraries/modular-schema/modularChangeTypes.js +24 -3
  194. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  195. package/dist/feature-libraries/optional-field/index.d.ts +2 -2
  196. package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
  197. package/dist/feature-libraries/optional-field/index.js +1 -2
  198. package/dist/feature-libraries/optional-field/index.js.map +1 -1
  199. package/dist/feature-libraries/optional-field/optionalField.d.ts +5 -26
  200. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  201. package/dist/feature-libraries/optional-field/optionalField.js +217 -451
  202. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  203. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +24 -33
  204. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  205. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  206. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  207. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  208. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +57 -28
  209. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  210. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +27 -8
  211. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  212. package/dist/feature-libraries/schema-index/schemaSummarizer.js +42 -16
  213. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  214. package/dist/feature-libraries/sequence-field/compose.d.ts +6 -7
  215. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  216. package/dist/feature-libraries/sequence-field/compose.js +80 -256
  217. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  218. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  219. package/dist/feature-libraries/sequence-field/formatV2.js +1 -0
  220. package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
  221. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +14 -10
  222. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  223. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  224. package/dist/feature-libraries/sequence-field/index.d.ts +2 -3
  225. package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
  226. package/dist/feature-libraries/sequence-field/index.js +1 -3
  227. package/dist/feature-libraries/sequence-field/index.js.map +1 -1
  228. package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
  229. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  230. package/dist/feature-libraries/sequence-field/invert.js +65 -167
  231. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  232. package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  233. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  234. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  235. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +4 -56
  236. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  237. package/dist/feature-libraries/sequence-field/moveEffectTable.js +7 -86
  238. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  239. package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
  240. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  241. package/dist/feature-libraries/sequence-field/rebase.js +106 -112
  242. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  243. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  244. package/dist/feature-libraries/sequence-field/replaceRevisions.js +16 -33
  245. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  246. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  247. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +0 -2
  248. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  249. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +22 -4
  250. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  251. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +358 -179
  252. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  253. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  254. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +20 -60
  255. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  256. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  257. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  258. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  259. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  260. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -2
  261. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  262. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +14 -109
  263. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  264. package/dist/feature-libraries/sequence-field/types.d.ts +30 -59
  265. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  266. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  267. package/dist/feature-libraries/sequence-field/utils.d.ts +15 -24
  268. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  269. package/dist/feature-libraries/sequence-field/utils.js +111 -299
  270. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  271. package/dist/feature-libraries/treeCompressionUtils.d.ts +2 -12
  272. package/dist/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
  273. package/dist/feature-libraries/treeCompressionUtils.js +4 -14
  274. package/dist/feature-libraries/treeCompressionUtils.js.map +1 -1
  275. package/dist/index.d.ts +3 -3
  276. package/dist/index.d.ts.map +1 -1
  277. package/dist/index.js +6 -3
  278. package/dist/index.js.map +1 -1
  279. package/dist/packageVersion.d.ts +1 -1
  280. package/dist/packageVersion.d.ts.map +1 -1
  281. package/dist/packageVersion.js +1 -1
  282. package/dist/packageVersion.js.map +1 -1
  283. package/dist/shared-tree/independentView.d.ts +1 -1
  284. package/dist/shared-tree/independentView.d.ts.map +1 -1
  285. package/dist/shared-tree/independentView.js.map +1 -1
  286. package/dist/shared-tree/index.d.ts +1 -1
  287. package/dist/shared-tree/index.d.ts.map +1 -1
  288. package/dist/shared-tree/index.js.map +1 -1
  289. package/dist/shared-tree/schematizeTree.d.ts +4 -4
  290. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  291. package/dist/shared-tree/schematizeTree.js +2 -1
  292. package/dist/shared-tree/schematizeTree.js.map +1 -1
  293. package/dist/shared-tree/schematizingTreeView.d.ts +1 -5
  294. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  295. package/dist/shared-tree/schematizingTreeView.js +32 -33
  296. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  297. package/dist/shared-tree/sharedTree.d.ts +18 -15
  298. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  299. package/dist/shared-tree/sharedTree.js +15 -4
  300. package/dist/shared-tree/sharedTree.js.map +1 -1
  301. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  302. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  303. package/dist/shared-tree/sharedTreeChangeCodecs.js +1 -0
  304. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  305. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +20 -8
  306. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  307. package/dist/shared-tree/sharedTreeChangeEnricher.js +25 -11
  308. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  309. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +6 -6
  310. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  311. package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
  312. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  313. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +16 -6
  314. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  315. package/dist/shared-tree/sharedTreeEditBuilder.js +13 -6
  316. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  317. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  318. package/dist/shared-tree/treeAlpha.js +1 -1
  319. package/dist/shared-tree/treeAlpha.js.map +1 -1
  320. package/dist/shared-tree/treeCheckout.d.ts +14 -12
  321. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  322. package/dist/shared-tree/treeCheckout.js +66 -17
  323. package/dist/shared-tree/treeCheckout.js.map +1 -1
  324. package/dist/shared-tree-core/branch.d.ts +3 -2
  325. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  326. package/dist/shared-tree-core/branch.js +4 -3
  327. package/dist/shared-tree-core/branch.js.map +1 -1
  328. package/dist/shared-tree-core/editManager.d.ts +2 -2
  329. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  330. package/dist/shared-tree-core/editManager.js +9 -9
  331. package/dist/shared-tree-core/editManager.js.map +1 -1
  332. package/dist/shared-tree-core/editManagerCodecs.d.ts +4 -0
  333. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  334. package/dist/shared-tree-core/editManagerCodecs.js +16 -6
  335. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  336. package/{lib/shared-tree-core/editManagerCodecsV5.d.ts → dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts} +3 -3
  337. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -0
  338. package/dist/shared-tree-core/{editManagerCodecsV5.js → editManagerCodecsVSharedBranches.js} +7 -7
  339. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -0
  340. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +20 -6
  341. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  342. package/dist/shared-tree-core/editManagerFormatCommons.js +22 -7
  343. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  344. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  345. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  346. package/dist/shared-tree-core/editManagerFormatV1toV4.js +1 -0
  347. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  348. package/dist/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts} +3 -3
  349. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -0
  350. package/dist/shared-tree-core/{editManagerFormatV5.js → editManagerFormatVSharedBranches.js} +2 -2
  351. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -0
  352. package/dist/shared-tree-core/editManagerSummarizer.d.ts +29 -9
  353. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  354. package/dist/shared-tree-core/editManagerSummarizer.js +41 -13
  355. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  356. package/dist/shared-tree-core/index.d.ts +5 -3
  357. package/dist/shared-tree-core/index.d.ts.map +1 -1
  358. package/dist/shared-tree-core/index.js +8 -1
  359. package/dist/shared-tree-core/index.js.map +1 -1
  360. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
  361. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  362. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  363. package/{lib/shared-tree-core/messageCodecV5.d.ts → dist/shared-tree-core/messageCodecVSharedBranches.d.ts} +2 -2
  364. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -0
  365. package/dist/shared-tree-core/{messageCodecV5.js → messageCodecVSharedBranches.js} +6 -6
  366. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -0
  367. package/dist/shared-tree-core/messageCodecs.d.ts +4 -0
  368. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  369. package/dist/shared-tree-core/messageCodecs.js +16 -6
  370. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  371. package/dist/shared-tree-core/messageFormat.d.ts +20 -6
  372. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  373. package/dist/shared-tree-core/messageFormat.js +22 -7
  374. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  375. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
  376. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  377. package/dist/shared-tree-core/messageFormatV1ToV4.js +8 -1
  378. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  379. package/dist/shared-tree-core/{messageFormatV5.d.ts → messageFormatVSharedBranches.d.ts} +5 -7
  380. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -0
  381. package/dist/shared-tree-core/{messageFormatV5.js → messageFormatVSharedBranches.js} +3 -2
  382. package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -0
  383. package/dist/shared-tree-core/sharedTreeCore.d.ts +14 -47
  384. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  385. package/dist/shared-tree-core/sharedTreeCore.js +30 -18
  386. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  387. package/dist/shared-tree-core/summaryTypes.d.ts +94 -0
  388. package/dist/shared-tree-core/summaryTypes.d.ts.map +1 -0
  389. package/dist/shared-tree-core/summaryTypes.js +47 -0
  390. package/dist/shared-tree-core/summaryTypes.js.map +1 -0
  391. package/dist/shared-tree-core/versionedSummarizer.d.ts +67 -0
  392. package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
  393. package/dist/shared-tree-core/versionedSummarizer.js +63 -0
  394. package/dist/shared-tree-core/versionedSummarizer.js.map +1 -0
  395. package/dist/simple-tree/api/configuration.d.ts +3 -26
  396. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  397. package/dist/simple-tree/api/configuration.js +10 -21
  398. package/dist/simple-tree/api/configuration.js.map +1 -1
  399. package/dist/simple-tree/api/dirtyIndex.d.ts +11 -0
  400. package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
  401. package/dist/simple-tree/api/dirtyIndex.js +7 -0
  402. package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
  403. package/dist/simple-tree/api/discrepancies.d.ts +1 -1
  404. package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
  405. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  406. package/dist/simple-tree/api/getSimpleSchema.d.ts +3 -3
  407. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  408. package/dist/simple-tree/api/getSimpleSchema.js +9 -3
  409. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  410. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +16 -13
  411. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  412. package/dist/simple-tree/api/incrementalAllowedTypes.js +24 -14
  413. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  414. package/dist/simple-tree/api/index.d.ts +4 -5
  415. package/dist/simple-tree/api/index.d.ts.map +1 -1
  416. package/dist/simple-tree/api/index.js +5 -6
  417. package/dist/simple-tree/api/index.js.map +1 -1
  418. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
  419. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  420. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  421. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
  422. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  423. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  424. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  425. package/dist/simple-tree/api/schemaFactoryRecursive.js +0 -1
  426. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  427. package/dist/simple-tree/api/schemaFromSimple.d.ts +6 -1
  428. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  429. package/dist/simple-tree/api/schemaFromSimple.js +5 -0
  430. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  431. package/dist/simple-tree/api/schemaStatics.d.ts +12 -12
  432. package/dist/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
  433. package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
  434. package/dist/simple-tree/api/simpleSchemaCodec.js +18 -6
  435. package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  436. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  437. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  438. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  439. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
  440. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  441. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +13 -8
  442. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  443. package/dist/simple-tree/api/tree.d.ts +1 -1
  444. package/dist/simple-tree/api/tree.js.map +1 -1
  445. package/dist/simple-tree/api/typesUnsafe.d.ts +3 -3
  446. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  447. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  448. package/dist/simple-tree/core/allowedTypes.d.ts +2 -2
  449. package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
  450. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  451. package/dist/simple-tree/core/index.d.ts +1 -1
  452. package/dist/simple-tree/core/index.d.ts.map +1 -1
  453. package/dist/simple-tree/core/index.js +2 -3
  454. package/dist/simple-tree/core/index.js.map +1 -1
  455. package/dist/simple-tree/core/toStored.d.ts +17 -15
  456. package/dist/simple-tree/core/toStored.d.ts.map +1 -1
  457. package/dist/simple-tree/core/toStored.js +5 -40
  458. package/dist/simple-tree/core/toStored.js.map +1 -1
  459. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  460. package/dist/simple-tree/core/treeNodeKernel.js +1 -0
  461. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  462. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +15 -15
  463. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  464. package/dist/simple-tree/core/unhydratedFlexTree.js +59 -8
  465. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  466. package/dist/simple-tree/core/walkSchema.d.ts.map +1 -1
  467. package/dist/simple-tree/core/walkSchema.js +4 -0
  468. package/dist/simple-tree/core/walkSchema.js.map +1 -1
  469. package/dist/simple-tree/createContext.d.ts.map +1 -1
  470. package/dist/simple-tree/createContext.js +20 -5
  471. package/dist/simple-tree/createContext.js.map +1 -1
  472. package/dist/simple-tree/fieldSchema.d.ts +7 -7
  473. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  474. package/dist/simple-tree/fieldSchema.js.map +1 -1
  475. package/dist/simple-tree/index.d.ts +8 -7
  476. package/dist/simple-tree/index.d.ts.map +1 -1
  477. package/dist/simple-tree/index.js +16 -13
  478. package/dist/simple-tree/index.js.map +1 -1
  479. package/dist/simple-tree/leafNodeSchema.d.ts +5 -5
  480. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  481. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  482. package/dist/simple-tree/node-kinds/array/arrayNode.js +6 -3
  483. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  484. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +3 -3
  485. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  486. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  487. package/dist/simple-tree/node-kinds/common.d.ts.map +1 -1
  488. package/dist/simple-tree/node-kinds/common.js +1 -1
  489. package/dist/simple-tree/node-kinds/common.js.map +1 -1
  490. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  491. package/dist/simple-tree/node-kinds/map/mapNode.js +2 -2
  492. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  493. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +3 -3
  494. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  495. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  496. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  497. package/dist/simple-tree/node-kinds/object/objectNode.js +19 -18
  498. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  499. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +2 -2
  500. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  501. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  502. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  503. package/dist/simple-tree/node-kinds/record/recordNode.js +4 -2
  504. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  505. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -3
  506. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  507. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  508. package/dist/simple-tree/prepareForInsertion.d.ts +54 -47
  509. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  510. package/dist/simple-tree/prepareForInsertion.js +183 -125
  511. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  512. package/dist/simple-tree/simpleSchema.d.ts +55 -23
  513. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  514. package/dist/simple-tree/simpleSchema.js +17 -0
  515. package/dist/simple-tree/simpleSchema.js.map +1 -1
  516. package/dist/simple-tree/simpleSchemaFormatV1.d.ts +1 -1
  517. package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
  518. package/dist/simple-tree/simpleSchemaFormatV1.js +8 -1
  519. package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  520. package/dist/simple-tree/toStoredSchema.d.ts +58 -11
  521. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  522. package/dist/simple-tree/toStoredSchema.js +205 -30
  523. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  524. package/dist/simple-tree/treeSchema.d.ts +23 -0
  525. package/dist/simple-tree/treeSchema.d.ts.map +1 -0
  526. package/dist/simple-tree/treeSchema.js +25 -0
  527. package/dist/simple-tree/treeSchema.js.map +1 -0
  528. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +13 -4
  529. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  530. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +29 -11
  531. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  532. package/dist/tableSchema.d.ts +117 -63
  533. package/dist/tableSchema.d.ts.map +1 -1
  534. package/dist/tableSchema.js +159 -58
  535. package/dist/tableSchema.js.map +1 -1
  536. package/dist/treeFactory.d.ts +5 -0
  537. package/dist/treeFactory.d.ts.map +1 -1
  538. package/dist/treeFactory.js +29 -8
  539. package/dist/treeFactory.js.map +1 -1
  540. package/dist/util/breakable.js +3 -3
  541. package/dist/util/breakable.js.map +1 -1
  542. package/dist/util/index.d.ts +2 -1
  543. package/dist/util/index.d.ts.map +1 -1
  544. package/dist/util/index.js +4 -1
  545. package/dist/util/index.js.map +1 -1
  546. package/dist/util/rangeMap.d.ts +24 -12
  547. package/dist/util/rangeMap.d.ts.map +1 -1
  548. package/dist/util/rangeMap.js +46 -6
  549. package/dist/util/rangeMap.js.map +1 -1
  550. package/dist/util/readSnapshotBlob.d.ts +13 -0
  551. package/dist/util/readSnapshotBlob.d.ts.map +1 -0
  552. package/dist/util/readSnapshotBlob.js +18 -0
  553. package/dist/util/readSnapshotBlob.js.map +1 -0
  554. package/dist/util/typeCheckTests.d.ts.map +1 -1
  555. package/dist/util/typeCheckTests.js.map +1 -1
  556. package/lib/alpha.d.ts +7 -2
  557. package/lib/codec/codec.d.ts +14 -1
  558. package/lib/codec/codec.d.ts.map +1 -1
  559. package/lib/codec/codec.js +11 -0
  560. package/lib/codec/codec.js.map +1 -1
  561. package/lib/codec/versioned/codec.d.ts +1 -1
  562. package/lib/codec/versioned/codec.d.ts.map +1 -1
  563. package/lib/codec/versioned/codec.js.map +1 -1
  564. package/lib/codec/versioned/format.d.ts +4 -1
  565. package/lib/codec/versioned/format.d.ts.map +1 -1
  566. package/lib/codec/versioned/format.js +4 -1
  567. package/lib/codec/versioned/format.js.map +1 -1
  568. package/lib/core/change-family/changeFamily.d.ts +4 -1
  569. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  570. package/lib/core/change-family/changeFamily.js.map +1 -1
  571. package/lib/core/change-family/index.d.ts +1 -1
  572. package/lib/core/change-family/index.d.ts.map +1 -1
  573. package/lib/core/change-family/index.js.map +1 -1
  574. package/lib/core/index.d.ts +3 -3
  575. package/lib/core/index.d.ts.map +1 -1
  576. package/lib/core/index.js +2 -2
  577. package/lib/core/index.js.map +1 -1
  578. package/lib/core/rebase/changeRebaser.d.ts +6 -1
  579. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  580. package/lib/core/rebase/changeRebaser.js.map +1 -1
  581. package/lib/core/rebase/index.d.ts +1 -1
  582. package/lib/core/rebase/index.d.ts.map +1 -1
  583. package/lib/core/rebase/index.js +1 -1
  584. package/lib/core/rebase/index.js.map +1 -1
  585. package/lib/core/rebase/types.d.ts +2 -1
  586. package/lib/core/rebase/types.d.ts.map +1 -1
  587. package/lib/core/rebase/types.js +3 -0
  588. package/lib/core/rebase/types.js.map +1 -1
  589. package/lib/core/rebase/utils.d.ts.map +1 -1
  590. package/lib/core/rebase/utils.js +25 -7
  591. package/lib/core/rebase/utils.js.map +1 -1
  592. package/lib/core/tree/detachedFieldIndex.d.ts +40 -13
  593. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  594. package/lib/core/tree/detachedFieldIndex.js +22 -13
  595. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  596. package/lib/core/tree/index.d.ts +4 -3
  597. package/lib/core/tree/index.d.ts.map +1 -1
  598. package/lib/core/tree/index.js +3 -2
  599. package/lib/core/tree/index.js.map +1 -1
  600. package/lib/core/tree/pathTree.d.ts +11 -3
  601. package/lib/core/tree/pathTree.d.ts.map +1 -1
  602. package/lib/core/tree/pathTree.js +12 -1
  603. package/lib/core/tree/pathTree.js.map +1 -1
  604. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  605. package/lib/feature-libraries/chunked-forest/basicChunk.js +8 -1
  606. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  607. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  608. package/lib/feature-libraries/chunked-forest/chunkTree.js +4 -1
  609. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  610. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +2 -2
  611. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  612. package/lib/feature-libraries/chunked-forest/codec/codecs.js +2 -2
  613. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  614. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts +15 -7
  615. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.d.ts.map +1 -1
  616. package/lib/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.js.map +1 -1
  617. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +7 -2
  618. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  619. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +90 -42
  620. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  621. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +232 -69
  622. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  623. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +4 -4
  624. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  625. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +34 -29
  626. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  627. package/lib/feature-libraries/default-schema/index.d.ts +2 -1
  628. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  629. package/lib/feature-libraries/default-schema/index.js +2 -1
  630. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  631. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +36 -0
  632. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +1 -0
  633. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +122 -0
  634. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +1 -0
  635. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +7 -6
  636. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  637. package/lib/feature-libraries/default-schema/mappedEditBuilder.js +15 -0
  638. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  639. package/lib/feature-libraries/deltaUtils.d.ts +1 -0
  640. package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
  641. package/lib/feature-libraries/deltaUtils.js +5 -1
  642. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  643. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +30 -8
  644. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  645. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +38 -8
  646. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  647. package/lib/feature-libraries/flex-tree/context.d.ts +9 -0
  648. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  649. package/lib/feature-libraries/flex-tree/context.js +6 -0
  650. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  651. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  652. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  653. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  654. package/lib/feature-libraries/flex-tree/lazyField.d.ts +8 -7
  655. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  656. package/lib/feature-libraries/flex-tree/lazyField.js +38 -9
  657. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  658. package/lib/feature-libraries/forest-summary/codec.d.ts +2 -2
  659. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  660. package/lib/feature-libraries/forest-summary/codec.js +5 -5
  661. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  662. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +9 -13
  663. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  664. package/lib/feature-libraries/forest-summary/forestSummarizer.js +19 -24
  665. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  666. package/lib/feature-libraries/forest-summary/format.d.ts +41 -5
  667. package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
  668. package/lib/feature-libraries/forest-summary/format.js +3 -3
  669. package/lib/feature-libraries/forest-summary/format.js.map +1 -1
  670. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +11 -9
  671. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  672. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +13 -26
  673. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  674. package/lib/feature-libraries/forest-summary/index.d.ts +2 -1
  675. package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
  676. package/lib/feature-libraries/forest-summary/index.js +2 -1
  677. package/lib/feature-libraries/forest-summary/index.js.map +1 -1
  678. package/lib/feature-libraries/forest-summary/summaryTypes.d.ts +47 -0
  679. package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -0
  680. package/lib/feature-libraries/forest-summary/summaryTypes.js +53 -0
  681. package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -0
  682. package/lib/feature-libraries/index.d.ts +5 -5
  683. package/lib/feature-libraries/index.d.ts.map +1 -1
  684. package/lib/feature-libraries/index.js +4 -4
  685. package/lib/feature-libraries/index.js.map +1 -1
  686. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  687. package/lib/feature-libraries/mapTreeCursor.js +2 -1
  688. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  689. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  690. package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
  691. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  692. package/lib/feature-libraries/modular-schema/comparison.d.ts +18 -2
  693. package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  694. package/lib/feature-libraries/modular-schema/comparison.js +55 -5
  695. package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
  696. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +97 -21
  697. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  698. package/lib/feature-libraries/modular-schema/crossFieldQueries.js +3 -5
  699. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  700. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +20 -52
  701. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  702. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  703. package/lib/feature-libraries/modular-schema/fieldKind.d.ts +25 -13
  704. package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  705. package/lib/feature-libraries/modular-schema/fieldKind.js +0 -21
  706. package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  707. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  708. package/lib/feature-libraries/modular-schema/genericFieldKind.js +7 -10
  709. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  710. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js +1 -1
  711. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  712. package/lib/feature-libraries/modular-schema/index.d.ts +5 -5
  713. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  714. package/lib/feature-libraries/modular-schema/index.js +4 -3
  715. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  716. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +17 -0
  717. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -0
  718. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +384 -0
  719. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -0
  720. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +17 -0
  721. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -0
  722. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +409 -0
  723. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -0
  724. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +4 -4
  725. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  726. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +10 -286
  727. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  728. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +48 -15
  729. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  730. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +1284 -458
  731. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  732. package/lib/feature-libraries/modular-schema/{modularChangeFormat.d.ts → modularChangeFormatV1.d.ts} +2 -2
  733. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -0
  734. package/lib/feature-libraries/modular-schema/{modularChangeFormat.js → modularChangeFormatV1.js} +2 -2
  735. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -0
  736. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +146 -0
  737. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -0
  738. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +29 -0
  739. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -0
  740. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +50 -10
  741. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  742. package/lib/feature-libraries/modular-schema/modularChangeTypes.js +20 -2
  743. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  744. package/lib/feature-libraries/optional-field/index.d.ts +2 -2
  745. package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
  746. package/lib/feature-libraries/optional-field/index.js +1 -1
  747. package/lib/feature-libraries/optional-field/index.js.map +1 -1
  748. package/lib/feature-libraries/optional-field/optionalField.d.ts +5 -26
  749. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  750. package/lib/feature-libraries/optional-field/optionalField.js +217 -449
  751. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  752. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +24 -33
  753. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  754. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  755. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  756. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  757. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +55 -26
  758. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  759. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +27 -8
  760. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  761. package/lib/feature-libraries/schema-index/schemaSummarizer.js +38 -12
  762. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  763. package/lib/feature-libraries/sequence-field/compose.d.ts +6 -7
  764. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  765. package/lib/feature-libraries/sequence-field/compose.js +82 -258
  766. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  767. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  768. package/lib/feature-libraries/sequence-field/formatV2.js +1 -0
  769. package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
  770. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +14 -10
  771. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  772. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  773. package/lib/feature-libraries/sequence-field/index.d.ts +2 -3
  774. package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
  775. package/lib/feature-libraries/sequence-field/index.js +0 -1
  776. package/lib/feature-libraries/sequence-field/index.js.map +1 -1
  777. package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
  778. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  779. package/lib/feature-libraries/sequence-field/invert.js +67 -169
  780. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  781. package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  782. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  783. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  784. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +4 -56
  785. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  786. package/lib/feature-libraries/sequence-field/moveEffectTable.js +6 -80
  787. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  788. package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
  789. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  790. package/lib/feature-libraries/sequence-field/rebase.js +108 -114
  791. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  792. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  793. package/lib/feature-libraries/sequence-field/replaceRevisions.js +16 -33
  794. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  795. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  796. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +0 -2
  797. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  798. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +22 -4
  799. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  800. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +350 -175
  801. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  802. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  803. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +21 -61
  804. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  805. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  806. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  807. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  808. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  809. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -2
  810. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  811. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +14 -109
  812. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  813. package/lib/feature-libraries/sequence-field/types.d.ts +30 -59
  814. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  815. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  816. package/lib/feature-libraries/sequence-field/utils.d.ts +15 -24
  817. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  818. package/lib/feature-libraries/sequence-field/utils.js +107 -292
  819. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  820. package/lib/feature-libraries/treeCompressionUtils.d.ts +2 -12
  821. package/lib/feature-libraries/treeCompressionUtils.d.ts.map +1 -1
  822. package/lib/feature-libraries/treeCompressionUtils.js +3 -13
  823. package/lib/feature-libraries/treeCompressionUtils.js.map +1 -1
  824. package/lib/index.d.ts +3 -3
  825. package/lib/index.d.ts.map +1 -1
  826. package/lib/index.js +2 -2
  827. package/lib/index.js.map +1 -1
  828. package/lib/packageVersion.d.ts +1 -1
  829. package/lib/packageVersion.d.ts.map +1 -1
  830. package/lib/packageVersion.js +1 -1
  831. package/lib/packageVersion.js.map +1 -1
  832. package/lib/shared-tree/independentView.d.ts +1 -1
  833. package/lib/shared-tree/independentView.d.ts.map +1 -1
  834. package/lib/shared-tree/independentView.js.map +1 -1
  835. package/lib/shared-tree/index.d.ts +1 -1
  836. package/lib/shared-tree/index.d.ts.map +1 -1
  837. package/lib/shared-tree/index.js.map +1 -1
  838. package/lib/shared-tree/schematizeTree.d.ts +4 -4
  839. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  840. package/lib/shared-tree/schematizeTree.js +3 -2
  841. package/lib/shared-tree/schematizeTree.js.map +1 -1
  842. package/lib/shared-tree/schematizingTreeView.d.ts +1 -5
  843. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  844. package/lib/shared-tree/schematizingTreeView.js +35 -36
  845. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  846. package/lib/shared-tree/sharedTree.d.ts +18 -15
  847. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  848. package/lib/shared-tree/sharedTree.js +15 -4
  849. package/lib/shared-tree/sharedTree.js.map +1 -1
  850. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  851. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  852. package/lib/shared-tree/sharedTreeChangeCodecs.js +1 -0
  853. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  854. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +20 -8
  855. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  856. package/lib/shared-tree/sharedTreeChangeEnricher.js +25 -11
  857. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  858. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +6 -6
  859. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  860. package/lib/shared-tree/sharedTreeChangeFamily.js +3 -3
  861. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  862. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +16 -6
  863. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  864. package/lib/shared-tree/sharedTreeEditBuilder.js +11 -5
  865. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  866. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  867. package/lib/shared-tree/treeAlpha.js +2 -2
  868. package/lib/shared-tree/treeAlpha.js.map +1 -1
  869. package/lib/shared-tree/treeCheckout.d.ts +14 -12
  870. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  871. package/lib/shared-tree/treeCheckout.js +69 -20
  872. package/lib/shared-tree/treeCheckout.js.map +1 -1
  873. package/lib/shared-tree-core/branch.d.ts +3 -2
  874. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  875. package/lib/shared-tree-core/branch.js +4 -3
  876. package/lib/shared-tree-core/branch.js.map +1 -1
  877. package/lib/shared-tree-core/editManager.d.ts +2 -2
  878. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  879. package/lib/shared-tree-core/editManager.js +9 -9
  880. package/lib/shared-tree-core/editManager.js.map +1 -1
  881. package/lib/shared-tree-core/editManagerCodecs.d.ts +4 -0
  882. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  883. package/lib/shared-tree-core/editManagerCodecs.js +14 -5
  884. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  885. package/{dist/shared-tree-core/editManagerCodecsV5.d.ts → lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts} +3 -3
  886. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -0
  887. package/lib/shared-tree-core/{editManagerCodecsV5.js → editManagerCodecsVSharedBranches.js} +4 -4
  888. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -0
  889. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +20 -6
  890. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  891. package/lib/shared-tree-core/editManagerFormatCommons.js +22 -7
  892. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  893. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  894. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  895. package/lib/shared-tree-core/editManagerFormatV1toV4.js +1 -0
  896. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  897. package/lib/shared-tree-core/{editManagerFormatV5.d.ts → editManagerFormatVSharedBranches.d.ts} +3 -3
  898. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -0
  899. package/lib/shared-tree-core/{editManagerFormatV5.js → editManagerFormatVSharedBranches.js} +2 -2
  900. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -0
  901. package/lib/shared-tree-core/editManagerSummarizer.d.ts +29 -9
  902. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  903. package/lib/shared-tree-core/editManagerSummarizer.js +39 -11
  904. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  905. package/lib/shared-tree-core/index.d.ts +5 -3
  906. package/lib/shared-tree-core/index.d.ts.map +1 -1
  907. package/lib/shared-tree-core/index.js +4 -2
  908. package/lib/shared-tree-core/index.js.map +1 -1
  909. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
  910. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  911. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  912. package/{dist/shared-tree-core/messageCodecV5.d.ts → lib/shared-tree-core/messageCodecVSharedBranches.d.ts} +2 -2
  913. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -0
  914. package/lib/shared-tree-core/{messageCodecV5.js → messageCodecVSharedBranches.js} +3 -3
  915. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -0
  916. package/lib/shared-tree-core/messageCodecs.d.ts +4 -0
  917. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  918. package/lib/shared-tree-core/messageCodecs.js +14 -5
  919. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  920. package/lib/shared-tree-core/messageFormat.d.ts +20 -6
  921. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  922. package/lib/shared-tree-core/messageFormat.js +22 -7
  923. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  924. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
  925. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  926. package/lib/shared-tree-core/messageFormatV1ToV4.js +8 -1
  927. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  928. package/lib/shared-tree-core/{messageFormatV5.d.ts → messageFormatVSharedBranches.d.ts} +5 -7
  929. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -0
  930. package/lib/shared-tree-core/{messageFormatV5.js → messageFormatVSharedBranches.js} +3 -2
  931. package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -0
  932. package/lib/shared-tree-core/sharedTreeCore.d.ts +14 -47
  933. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  934. package/lib/shared-tree-core/sharedTreeCore.js +28 -16
  935. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  936. package/lib/shared-tree-core/summaryTypes.d.ts +94 -0
  937. package/lib/shared-tree-core/summaryTypes.d.ts.map +1 -0
  938. package/lib/shared-tree-core/summaryTypes.js +43 -0
  939. package/lib/shared-tree-core/summaryTypes.js.map +1 -0
  940. package/lib/shared-tree-core/versionedSummarizer.d.ts +67 -0
  941. package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -0
  942. package/lib/shared-tree-core/versionedSummarizer.js +59 -0
  943. package/lib/shared-tree-core/versionedSummarizer.js.map +1 -0
  944. package/lib/simple-tree/api/configuration.d.ts +3 -26
  945. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  946. package/lib/simple-tree/api/configuration.js +14 -25
  947. package/lib/simple-tree/api/configuration.js.map +1 -1
  948. package/lib/simple-tree/api/dirtyIndex.d.ts +11 -0
  949. package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
  950. package/lib/simple-tree/api/dirtyIndex.js +7 -0
  951. package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
  952. package/lib/simple-tree/api/discrepancies.d.ts +1 -1
  953. package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
  954. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  955. package/lib/simple-tree/api/getSimpleSchema.d.ts +3 -3
  956. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  957. package/lib/simple-tree/api/getSimpleSchema.js +9 -3
  958. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
  959. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +16 -13
  960. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  961. package/lib/simple-tree/api/incrementalAllowedTypes.js +23 -13
  962. package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  963. package/lib/simple-tree/api/index.d.ts +4 -5
  964. package/lib/simple-tree/api/index.d.ts.map +1 -1
  965. package/lib/simple-tree/api/index.js +3 -4
  966. package/lib/simple-tree/api/index.js.map +1 -1
  967. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
  968. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  969. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  970. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +5 -5
  971. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  972. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  973. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  974. package/lib/simple-tree/api/schemaFactoryRecursive.js +0 -1
  975. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  976. package/lib/simple-tree/api/schemaFromSimple.d.ts +6 -1
  977. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  978. package/lib/simple-tree/api/schemaFromSimple.js +5 -0
  979. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  980. package/lib/simple-tree/api/schemaStatics.d.ts +12 -12
  981. package/lib/simple-tree/api/simpleSchemaCodec.d.ts +15 -3
  982. package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
  983. package/lib/simple-tree/api/simpleSchemaCodec.js +15 -3
  984. package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  985. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  986. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  987. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  988. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +8 -1
  989. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  990. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +15 -10
  991. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  992. package/lib/simple-tree/api/tree.d.ts +1 -1
  993. package/lib/simple-tree/api/tree.js.map +1 -1
  994. package/lib/simple-tree/api/typesUnsafe.d.ts +3 -3
  995. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  996. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  997. package/lib/simple-tree/core/allowedTypes.d.ts +2 -2
  998. package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
  999. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  1000. package/lib/simple-tree/core/index.d.ts +1 -1
  1001. package/lib/simple-tree/core/index.d.ts.map +1 -1
  1002. package/lib/simple-tree/core/index.js +1 -1
  1003. package/lib/simple-tree/core/index.js.map +1 -1
  1004. package/lib/simple-tree/core/toStored.d.ts +17 -15
  1005. package/lib/simple-tree/core/toStored.d.ts.map +1 -1
  1006. package/lib/simple-tree/core/toStored.js +4 -37
  1007. package/lib/simple-tree/core/toStored.js.map +1 -1
  1008. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  1009. package/lib/simple-tree/core/treeNodeKernel.js +1 -0
  1010. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  1011. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +15 -15
  1012. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  1013. package/lib/simple-tree/core/unhydratedFlexTree.js +58 -8
  1014. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  1015. package/lib/simple-tree/core/walkSchema.d.ts.map +1 -1
  1016. package/lib/simple-tree/core/walkSchema.js +5 -1
  1017. package/lib/simple-tree/core/walkSchema.js.map +1 -1
  1018. package/lib/simple-tree/createContext.d.ts.map +1 -1
  1019. package/lib/simple-tree/createContext.js +20 -5
  1020. package/lib/simple-tree/createContext.js.map +1 -1
  1021. package/lib/simple-tree/fieldSchema.d.ts +7 -7
  1022. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  1023. package/lib/simple-tree/fieldSchema.js.map +1 -1
  1024. package/lib/simple-tree/index.d.ts +8 -7
  1025. package/lib/simple-tree/index.d.ts.map +1 -1
  1026. package/lib/simple-tree/index.js +6 -5
  1027. package/lib/simple-tree/index.js.map +1 -1
  1028. package/lib/simple-tree/leafNodeSchema.d.ts +5 -5
  1029. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  1030. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  1031. package/lib/simple-tree/node-kinds/array/arrayNode.js +7 -4
  1032. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  1033. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +3 -3
  1034. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  1035. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  1036. package/lib/simple-tree/node-kinds/common.d.ts.map +1 -1
  1037. package/lib/simple-tree/node-kinds/common.js +2 -2
  1038. package/lib/simple-tree/node-kinds/common.js.map +1 -1
  1039. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  1040. package/lib/simple-tree/node-kinds/map/mapNode.js +2 -2
  1041. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  1042. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +3 -3
  1043. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  1044. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  1045. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  1046. package/lib/simple-tree/node-kinds/object/objectNode.js +20 -19
  1047. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  1048. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +2 -2
  1049. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  1050. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  1051. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  1052. package/lib/simple-tree/node-kinds/record/recordNode.js +4 -2
  1053. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  1054. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -3
  1055. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  1056. package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  1057. package/lib/simple-tree/prepareForInsertion.d.ts +54 -47
  1058. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  1059. package/lib/simple-tree/prepareForInsertion.js +183 -124
  1060. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  1061. package/lib/simple-tree/simpleSchema.d.ts +55 -23
  1062. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  1063. package/lib/simple-tree/simpleSchema.js +16 -1
  1064. package/lib/simple-tree/simpleSchema.js.map +1 -1
  1065. package/lib/simple-tree/simpleSchemaFormatV1.d.ts +1 -1
  1066. package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
  1067. package/lib/simple-tree/simpleSchemaFormatV1.js +8 -1
  1068. package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  1069. package/lib/simple-tree/toStoredSchema.d.ts +58 -11
  1070. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  1071. package/lib/simple-tree/toStoredSchema.js +204 -31
  1072. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  1073. package/lib/simple-tree/treeSchema.d.ts +23 -0
  1074. package/lib/simple-tree/treeSchema.d.ts.map +1 -0
  1075. package/lib/simple-tree/treeSchema.js +21 -0
  1076. package/lib/simple-tree/treeSchema.js.map +1 -0
  1077. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +13 -4
  1078. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  1079. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +26 -9
  1080. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  1081. package/lib/tableSchema.d.ts +117 -63
  1082. package/lib/tableSchema.d.ts.map +1 -1
  1083. package/lib/tableSchema.js +160 -59
  1084. package/lib/tableSchema.js.map +1 -1
  1085. package/lib/treeFactory.d.ts +5 -0
  1086. package/lib/treeFactory.d.ts.map +1 -1
  1087. package/lib/treeFactory.js +28 -8
  1088. package/lib/treeFactory.js.map +1 -1
  1089. package/lib/util/breakable.js +3 -3
  1090. package/lib/util/breakable.js.map +1 -1
  1091. package/lib/util/index.d.ts +2 -1
  1092. package/lib/util/index.d.ts.map +1 -1
  1093. package/lib/util/index.js +2 -1
  1094. package/lib/util/index.js.map +1 -1
  1095. package/lib/util/rangeMap.d.ts +24 -12
  1096. package/lib/util/rangeMap.d.ts.map +1 -1
  1097. package/lib/util/rangeMap.js +44 -5
  1098. package/lib/util/rangeMap.js.map +1 -1
  1099. package/lib/util/readSnapshotBlob.d.ts +13 -0
  1100. package/lib/util/readSnapshotBlob.d.ts.map +1 -0
  1101. package/lib/util/readSnapshotBlob.js +14 -0
  1102. package/lib/util/readSnapshotBlob.js.map +1 -0
  1103. package/lib/util/typeCheckTests.d.ts.map +1 -1
  1104. package/lib/util/typeCheckTests.js.map +1 -1
  1105. package/package.json +22 -22
  1106. package/src/codec/codec.ts +15 -1
  1107. package/src/codec/versioned/codec.ts +1 -1
  1108. package/src/codec/versioned/format.ts +4 -1
  1109. package/src/core/change-family/changeFamily.ts +5 -0
  1110. package/src/core/change-family/index.ts +1 -0
  1111. package/src/core/index.ts +7 -2
  1112. package/src/core/rebase/changeRebaser.ts +6 -1
  1113. package/src/core/rebase/index.ts +1 -0
  1114. package/src/core/rebase/types.ts +8 -1
  1115. package/src/core/rebase/utils.ts +31 -7
  1116. package/src/core/tree/detachedFieldIndex.ts +71 -14
  1117. package/src/core/tree/index.ts +9 -3
  1118. package/src/core/tree/pathTree.ts +16 -4
  1119. package/src/feature-libraries/chunked-forest/basicChunk.ts +7 -1
  1120. package/src/feature-libraries/chunked-forest/chunkTree.ts +6 -1
  1121. package/src/feature-libraries/chunked-forest/codec/codecs.ts +3 -7
  1122. package/src/feature-libraries/chunked-forest/codec/incrementalEncodingPolicy.ts +18 -11
  1123. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +9 -9
  1124. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +393 -127
  1125. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +35 -38
  1126. package/src/feature-libraries/default-schema/index.ts +16 -5
  1127. package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +180 -0
  1128. package/src/feature-libraries/default-schema/mappedEditBuilder.ts +35 -9
  1129. package/src/feature-libraries/deltaUtils.ts +6 -1
  1130. package/src/feature-libraries/detachedFieldIndexSummarizer.ts +62 -15
  1131. package/src/feature-libraries/flex-tree/context.ts +17 -0
  1132. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +7 -8
  1133. package/src/feature-libraries/flex-tree/lazyField.ts +66 -24
  1134. package/src/feature-libraries/forest-summary/codec.ts +8 -8
  1135. package/src/feature-libraries/forest-summary/forestSummarizer.ts +47 -39
  1136. package/src/feature-libraries/forest-summary/format.ts +4 -4
  1137. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +23 -39
  1138. package/src/feature-libraries/forest-summary/index.ts +2 -1
  1139. package/src/feature-libraries/forest-summary/summaryTypes.ts +61 -0
  1140. package/src/feature-libraries/index.ts +23 -14
  1141. package/src/feature-libraries/mapTreeCursor.ts +2 -1
  1142. package/src/feature-libraries/mitigatedChangeFamily.ts +3 -1
  1143. package/src/feature-libraries/modular-schema/comparison.ts +63 -5
  1144. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +142 -44
  1145. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +36 -57
  1146. package/src/feature-libraries/modular-schema/fieldKind.ts +24 -40
  1147. package/src/feature-libraries/modular-schema/genericFieldKind.ts +10 -19
  1148. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -1
  1149. package/src/feature-libraries/modular-schema/index.ts +21 -15
  1150. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +732 -0
  1151. package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +790 -0
  1152. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +32 -505
  1153. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2542 -742
  1154. package/src/feature-libraries/modular-schema/{modularChangeFormat.ts → modularChangeFormatV1.ts} +2 -1
  1155. package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +62 -0
  1156. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +98 -10
  1157. package/src/feature-libraries/optional-field/index.ts +1 -3
  1158. package/src/feature-libraries/optional-field/optionalField.ts +317 -574
  1159. package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +24 -38
  1160. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +89 -35
  1161. package/src/feature-libraries/schema-index/schemaSummarizer.ts +59 -18
  1162. package/src/feature-libraries/sequence-field/compose.ts +134 -519
  1163. package/src/feature-libraries/sequence-field/formatV2.ts +1 -0
  1164. package/src/feature-libraries/sequence-field/helperTypes.ts +34 -19
  1165. package/src/feature-libraries/sequence-field/index.ts +0 -9
  1166. package/src/feature-libraries/sequence-field/invert.ts +103 -228
  1167. package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
  1168. package/src/feature-libraries/sequence-field/moveEffectTable.ts +8 -191
  1169. package/src/feature-libraries/sequence-field/rebase.ts +168 -203
  1170. package/src/feature-libraries/sequence-field/replaceRevisions.ts +31 -52
  1171. package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +0 -2
  1172. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +643 -220
  1173. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +56 -68
  1174. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +25 -27
  1175. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +19 -129
  1176. package/src/feature-libraries/sequence-field/types.ts +34 -64
  1177. package/src/feature-libraries/sequence-field/utils.ts +133 -346
  1178. package/src/feature-libraries/treeCompressionUtils.ts +1 -15
  1179. package/src/index.ts +7 -2
  1180. package/src/packageVersion.ts +1 -1
  1181. package/src/shared-tree/independentView.ts +1 -1
  1182. package/src/shared-tree/index.ts +3 -2
  1183. package/src/shared-tree/schematizeTree.ts +21 -8
  1184. package/src/shared-tree/schematizingTreeView.ts +50 -68
  1185. package/src/shared-tree/sharedTree.ts +51 -30
  1186. package/src/shared-tree/sharedTreeChangeCodecs.ts +5 -1
  1187. package/src/shared-tree/sharedTreeChangeEnricher.ts +31 -11
  1188. package/src/shared-tree/sharedTreeChangeFamily.ts +9 -6
  1189. package/src/shared-tree/sharedTreeEditBuilder.ts +46 -12
  1190. package/src/shared-tree/treeAlpha.ts +2 -3
  1191. package/src/shared-tree/treeCheckout.ts +106 -33
  1192. package/src/shared-tree-core/branch.ts +8 -2
  1193. package/src/shared-tree-core/editManager.ts +16 -2
  1194. package/src/shared-tree-core/editManagerCodecs.ts +17 -5
  1195. package/src/shared-tree-core/{editManagerCodecsV5.ts → editManagerCodecsVSharedBranches.ts} +3 -3
  1196. package/src/shared-tree-core/editManagerFormatCommons.ts +22 -7
  1197. package/src/shared-tree-core/editManagerFormatV1toV4.ts +3 -1
  1198. package/src/shared-tree-core/{editManagerFormatV5.ts → editManagerFormatVSharedBranches.ts} +2 -2
  1199. package/src/shared-tree-core/editManagerSummarizer.ts +58 -16
  1200. package/src/shared-tree-core/index.ts +11 -3
  1201. package/src/shared-tree-core/messageCodecV1ToV4.ts +2 -1
  1202. package/src/shared-tree-core/{messageCodecV5.ts → messageCodecVSharedBranches.ts} +3 -3
  1203. package/src/shared-tree-core/messageCodecs.ts +17 -5
  1204. package/src/shared-tree-core/messageFormat.ts +22 -7
  1205. package/src/shared-tree-core/messageFormatV1ToV4.ts +16 -2
  1206. package/src/shared-tree-core/{messageFormatV5.ts → messageFormatVSharedBranches.ts} +4 -6
  1207. package/src/shared-tree-core/sharedTreeCore.ts +67 -76
  1208. package/src/shared-tree-core/summaryTypes.ts +122 -0
  1209. package/src/shared-tree-core/versionedSummarizer.ts +107 -0
  1210. package/src/simple-tree/api/configuration.ts +21 -68
  1211. package/src/simple-tree/api/dirtyIndex.ts +11 -0
  1212. package/src/simple-tree/api/discrepancies.ts +1 -1
  1213. package/src/simple-tree/api/getSimpleSchema.ts +13 -6
  1214. package/src/simple-tree/api/incrementalAllowedTypes.ts +34 -20
  1215. package/src/simple-tree/api/index.ts +4 -5
  1216. package/src/simple-tree/api/schemaCompatibilityTester.ts +1 -1
  1217. package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -2
  1218. package/src/simple-tree/api/schemaFactoryRecursive.ts +0 -2
  1219. package/src/simple-tree/api/schemaFromSimple.ts +11 -5
  1220. package/src/simple-tree/api/simpleSchemaCodec.ts +17 -3
  1221. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -1
  1222. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +18 -10
  1223. package/src/simple-tree/api/tree.ts +1 -1
  1224. package/src/simple-tree/api/typesUnsafe.ts +7 -3
  1225. package/src/simple-tree/core/allowedTypes.ts +3 -3
  1226. package/src/simple-tree/core/index.ts +2 -2
  1227. package/src/simple-tree/core/toStored.ts +22 -55
  1228. package/src/simple-tree/core/treeNodeKernel.ts +1 -0
  1229. package/src/simple-tree/core/unhydratedFlexTree.ts +87 -36
  1230. package/src/simple-tree/core/walkSchema.ts +6 -0
  1231. package/src/simple-tree/createContext.ts +26 -11
  1232. package/src/simple-tree/fieldSchema.ts +16 -7
  1233. package/src/simple-tree/index.ts +13 -12
  1234. package/src/simple-tree/node-kinds/array/arrayNode.ts +14 -7
  1235. package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +3 -3
  1236. package/src/simple-tree/node-kinds/common.ts +2 -5
  1237. package/src/simple-tree/node-kinds/map/mapNode.ts +9 -6
  1238. package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +3 -3
  1239. package/src/simple-tree/node-kinds/object/objectNode.ts +28 -27
  1240. package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +6 -2
  1241. package/src/simple-tree/node-kinds/record/recordNode.ts +15 -11
  1242. package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +3 -3
  1243. package/src/simple-tree/prepareForInsertion.ts +343 -200
  1244. package/src/simple-tree/simpleSchema.ts +79 -32
  1245. package/src/simple-tree/simpleSchemaFormatV1.ts +9 -1
  1246. package/src/simple-tree/toStoredSchema.ts +319 -61
  1247. package/src/simple-tree/treeSchema.ts +54 -0
  1248. package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +42 -14
  1249. package/src/tableSchema.ts +485 -166
  1250. package/src/treeFactory.ts +32 -9
  1251. package/src/util/breakable.ts +4 -4
  1252. package/src/util/index.ts +5 -0
  1253. package/src/util/rangeMap.ts +72 -18
  1254. package/src/util/readSnapshotBlob.ts +23 -0
  1255. package/src/util/typeCheckTests.ts +0 -1
  1256. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +0 -1
  1257. package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +0 -1
  1258. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +0 -9
  1259. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +0 -1
  1260. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +0 -50
  1261. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +0 -1
  1262. package/dist/shared-tree-core/editManagerCodecsV5.d.ts.map +0 -1
  1263. package/dist/shared-tree-core/editManagerCodecsV5.js.map +0 -1
  1264. package/dist/shared-tree-core/editManagerFormatV5.d.ts.map +0 -1
  1265. package/dist/shared-tree-core/editManagerFormatV5.js.map +0 -1
  1266. package/dist/shared-tree-core/messageCodecV5.d.ts.map +0 -1
  1267. package/dist/shared-tree-core/messageCodecV5.js.map +0 -1
  1268. package/dist/shared-tree-core/messageFormatV5.d.ts.map +0 -1
  1269. package/dist/shared-tree-core/messageFormatV5.js.map +0 -1
  1270. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts +0 -40
  1271. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +0 -1
  1272. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +0 -177
  1273. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +0 -1
  1274. package/docs/main/sequence-field/move-composition.md +0 -46
  1275. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +0 -1
  1276. package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +0 -1
  1277. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +0 -9
  1278. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +0 -1
  1279. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +0 -46
  1280. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +0 -1
  1281. package/lib/shared-tree-core/editManagerCodecsV5.d.ts.map +0 -1
  1282. package/lib/shared-tree-core/editManagerCodecsV5.js.map +0 -1
  1283. package/lib/shared-tree-core/editManagerFormatV5.d.ts.map +0 -1
  1284. package/lib/shared-tree-core/editManagerFormatV5.js.map +0 -1
  1285. package/lib/shared-tree-core/messageCodecV5.d.ts.map +0 -1
  1286. package/lib/shared-tree-core/messageCodecV5.js.map +0 -1
  1287. package/lib/shared-tree-core/messageFormatV5.d.ts.map +0 -1
  1288. package/lib/shared-tree-core/messageFormatV5.js.map +0 -1
  1289. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts +0 -40
  1290. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +0 -1
  1291. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +0 -171
  1292. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +0 -1
  1293. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +0 -57
  1294. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +0 -209
@@ -1 +1 @@
1
- {"version":3,"file":"messageCodecV1ToV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecV1ToV4.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0D;AAC1D,kEAA6D;AA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,EAAE,SAAS;gBACnB,YAAY,EAAE,OAAO,CAAC,YAAY;aAClC,CAAC,CAAC;YAEH,OAAO;gBACN,QAAQ,EAAE,MAAM;gBAChB,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE;oBACP,QAAQ;oBACR,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE;wBACrC,YAAY;wBACZ,QAAQ;wBACR,YAAY,EAAE,OAAO,CAAC,YAAY;qBAClC,CAAC;iBACF;gBACD,SAAS,EAAE,YAAY;aACvB,CAAC;QACH,CAAC;KACD,EACD,OAAO,CAAC,aAAa,CACrB,CAAC;AACH,CAAC;AAtFD,gEAsFC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type TAnySchema, Type } from \"@sinclair/typebox\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport { type ICodecOptions, type IJsonCodec, withSchemaValidation } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tChangeFamilyCodec,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport { Message } from \"./messageFormatV1ToV4.js\";\nimport type { DecodedMessage } from \"./messageTypes.js\";\nimport type { MessageEncodingContext } from \"./messageCodecs.js\";\nimport type { MessageFormatVersion } from \"./messageFormat.js\";\n\nexport function makeV1ToV4CodecWithVersion<TChangeset>(\n\tchangeCodec: ChangeFamilyCodec<TChangeset>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n\tversion:\n\t\t| typeof MessageFormatVersion.v1\n\t\t| typeof MessageFormatVersion.v2\n\t\t| typeof MessageFormatVersion.v3\n\t\t| typeof MessageFormatVersion.v4,\n): IJsonCodec<\n\tDecodedMessage<TChangeset>,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tMessageEncodingContext\n> {\n\treturn withSchemaValidation<\n\t\tDecodedMessage<TChangeset>,\n\t\tTAnySchema,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tMessageEncodingContext\n\t>(\n\t\tMessage(changeCodec.encodedSchema ?? Type.Any()),\n\t\t{\n\t\t\tencode: (decoded: DecodedMessage<TChangeset>, context: MessageEncodingContext) => {\n\t\t\t\tassert(decoded.type === \"commit\", 0xc68 /* Only commit messages are supported */);\n\t\t\t\tassert(\n\t\t\t\t\tdecoded.branchId === \"main\",\n\t\t\t\t\t0xc69 /* Only commit messages to main are supported */,\n\t\t\t\t);\n\t\t\t\tconst { commit, sessionId: originatorId } = decoded;\n\t\t\t\tconst message: Message = {\n\t\t\t\t\trevision: revisionTagCodec.encode(commit.revision, {\n\t\t\t\t\t\toriginatorId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t}),\n\t\t\t\t\toriginatorId,\n\t\t\t\t\tchangeset: changeCodec.encode(commit.change, {\n\t\t\t\t\t\toriginatorId,\n\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\trevision: commit.revision,\n\t\t\t\t\t}),\n\t\t\t\t\tversion,\n\t\t\t\t};\n\t\t\t\treturn message as unknown as JsonCompatibleReadOnly;\n\t\t\t},\n\t\t\tdecode: (\n\t\t\t\tencoded: JsonCompatibleReadOnly,\n\t\t\t\tcontext: MessageEncodingContext,\n\t\t\t): DecodedMessage<TChangeset> => {\n\t\t\t\tconst {\n\t\t\t\t\trevision: encodedRevision,\n\t\t\t\t\toriginatorId,\n\t\t\t\t\tchangeset,\n\t\t\t\t} = encoded as unknown as Message;\n\n\t\t\t\tconst revision = revisionTagCodec.decode(encodedRevision, {\n\t\t\t\t\toriginatorId,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t});\n\n\t\t\t\treturn {\n\t\t\t\t\tbranchId: \"main\",\n\t\t\t\t\ttype: \"commit\",\n\t\t\t\t\tcommit: {\n\t\t\t\t\t\trevision,\n\t\t\t\t\t\tchange: changeCodec.decode(changeset, {\n\t\t\t\t\t\t\toriginatorId,\n\t\t\t\t\t\t\trevision,\n\t\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\t}),\n\t\t\t\t\t},\n\t\t\t\t\tsessionId: originatorId,\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\toptions.jsonValidator,\n\t);\n}\n"]}
1
+ {"version":3,"file":"messageCodecV1ToV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecV1ToV4.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0D;AAC1D,kEAA6D;AAE7D,gDAA8F;AAS9F,qEAAmD;AAKnD,SAAgB,0BAA0B,CACzC,WAA0C,EAC1C,gBAKC,EACD,OAAsB,EACtB,OAK6C;IAO7C,OAAO,IAAA,+BAAoB,EAO1B,IAAA,gCAAO,EAAC,WAAW,CAAC,aAAa,IAAI,cAAI,CAAC,GAAG,EAAE,CAAC,EAChD;QACC,MAAM,EAAE,CAAC,OAAmC,EAAE,OAA+B,EAAE,EAAE;YAChF,IAAA,iBAAM,EAAC,OAAO,CAAC,IAAI,KAAK,QAAQ,EAAE,KAAK,CAAC,wCAAwC,CAAC,CAAC;YAClF,IAAA,iBAAM,EACL,OAAO,CAAC,QAAQ,KAAK,MAAM,EAC3B,KAAK,CAAC,gDAAgD,CACtD,CAAC;YACF,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC;YACpD,MAAM,OAAO,GAAY;gBACxB,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;oBAClD,YAAY;oBACZ,YAAY,EAAE,OAAO,CAAC,YAAY;oBAClC,QAAQ,EAAE,SAAS;iBACnB,CAAC;gBACF,YAAY;gBACZ,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;oBAC5C,YAAY;oBACZ,MAAM,EAAE,OAAO,CAAC,MAAM;oBACtB,YAAY,EAAE,OAAO,CAAC,YAAY;oBAClC,QAAQ,EAAE,MAAM,CAAC,QAAQ;iBACzB,CAAC;gBACF,OAAO;aACP,CAAC;YACF,OAAO,OAA4C,CAAC;QACrD,CAAC;QACD,MAAM,EAAE,CACP,OAA+B,EAC/B,OAA+B,EACF,EAAE;YAC/B,MAAM,EACL,QAAQ,EAAE,eAAe,EACzB,YAAY,EACZ,SAAS,GACT,GAAG,OAA6B,CAAC;YAElC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,eAAe,EAAE;gBACzD,YAAY;gBACZ,QAAQ,EAAE,SAAS;gBACnB,YAAY,EAAE,OAAO,CAAC,YAAY;aAClC,CAAC,CAAC;YAEH,OAAO;gBACN,QAAQ,EAAE,MAAM;gBAChB,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE;oBACP,QAAQ;oBACR,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE;wBACrC,YAAY;wBACZ,QAAQ;wBACR,YAAY,EAAE,OAAO,CAAC,YAAY;qBAClC,CAAC;iBACF;gBACD,SAAS,EAAE,YAAY;aACvB,CAAC;QACH,CAAC;KACD,EACD,OAAO,CAAC,aAAa,CACrB,CAAC;AACH,CAAC;AAvFD,gEAuFC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type TAnySchema, Type } from \"@sinclair/typebox\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport { type ICodecOptions, type IJsonCodec, withSchemaValidation } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tChangeFamilyCodec,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport { Message } from \"./messageFormatV1ToV4.js\";\nimport type { DecodedMessage } from \"./messageTypes.js\";\nimport type { MessageEncodingContext } from \"./messageCodecs.js\";\nimport type { MessageFormatVersion } from \"./messageFormat.js\";\n\nexport function makeV1ToV4CodecWithVersion<TChangeset>(\n\tchangeCodec: ChangeFamilyCodec<TChangeset>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n\tversion:\n\t\t| typeof MessageFormatVersion.v1\n\t\t| typeof MessageFormatVersion.v2\n\t\t| typeof MessageFormatVersion.v3\n\t\t| typeof MessageFormatVersion.v4\n\t\t| typeof MessageFormatVersion.vDetachedRoots,\n): IJsonCodec<\n\tDecodedMessage<TChangeset>,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tMessageEncodingContext\n> {\n\treturn withSchemaValidation<\n\t\tDecodedMessage<TChangeset>,\n\t\tTAnySchema,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tMessageEncodingContext\n\t>(\n\t\tMessage(changeCodec.encodedSchema ?? Type.Any()),\n\t\t{\n\t\t\tencode: (decoded: DecodedMessage<TChangeset>, context: MessageEncodingContext) => {\n\t\t\t\tassert(decoded.type === \"commit\", 0xc68 /* Only commit messages are supported */);\n\t\t\t\tassert(\n\t\t\t\t\tdecoded.branchId === \"main\",\n\t\t\t\t\t0xc69 /* Only commit messages to main are supported */,\n\t\t\t\t);\n\t\t\t\tconst { commit, sessionId: originatorId } = decoded;\n\t\t\t\tconst message: Message = {\n\t\t\t\t\trevision: revisionTagCodec.encode(commit.revision, {\n\t\t\t\t\t\toriginatorId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t}),\n\t\t\t\t\toriginatorId,\n\t\t\t\t\tchangeset: changeCodec.encode(commit.change, {\n\t\t\t\t\t\toriginatorId,\n\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\trevision: commit.revision,\n\t\t\t\t\t}),\n\t\t\t\t\tversion,\n\t\t\t\t};\n\t\t\t\treturn message as unknown as JsonCompatibleReadOnly;\n\t\t\t},\n\t\t\tdecode: (\n\t\t\t\tencoded: JsonCompatibleReadOnly,\n\t\t\t\tcontext: MessageEncodingContext,\n\t\t\t): DecodedMessage<TChangeset> => {\n\t\t\t\tconst {\n\t\t\t\t\trevision: encodedRevision,\n\t\t\t\t\toriginatorId,\n\t\t\t\t\tchangeset,\n\t\t\t\t} = encoded as unknown as Message;\n\n\t\t\t\tconst revision = revisionTagCodec.decode(encodedRevision, {\n\t\t\t\t\toriginatorId,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t});\n\n\t\t\t\treturn {\n\t\t\t\t\tbranchId: \"main\",\n\t\t\t\t\ttype: \"commit\",\n\t\t\t\t\tcommit: {\n\t\t\t\t\t\trevision,\n\t\t\t\t\t\tchange: changeCodec.decode(changeset, {\n\t\t\t\t\t\t\toriginatorId,\n\t\t\t\t\t\t\trevision,\n\t\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\t}),\n\t\t\t\t\t},\n\t\t\t\t\tsessionId: originatorId,\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\toptions.jsonValidator,\n\t);\n}\n"]}
@@ -8,5 +8,5 @@ import type { JsonCompatibleReadOnly } from "../util/index.js";
8
8
  import type { DecodedMessage } from "./messageTypes.js";
9
9
  import type { MessageEncodingContext } from "./messageCodecs.js";
10
10
  import type { MessageFormatVersion } from "./messageFormat.js";
11
- export declare function makeV5CodecWithVersion<TChangeset>(changeCodec: ChangeFamilyCodec<TChangeset>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions, version: typeof MessageFormatVersion.v5): IJsonCodec<DecodedMessage<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, MessageEncodingContext>;
12
- //# sourceMappingURL=messageCodecV5.d.ts.map
11
+ export declare function makeSharedBranchesCodecWithVersion<TChangeset>(changeCodec: ChangeFamilyCodec<TChangeset>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: ICodecOptions, version: typeof MessageFormatVersion.vSharedBranches): IJsonCodec<DecodedMessage<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, MessageEncodingContext>;
12
+ //# sourceMappingURL=messageCodecVSharedBranches.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messageCodecVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAwB,MAAM,mBAAmB,CAAC;AAC9F,OAAO,KAAK,EACX,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,wBAAgB,kCAAkC,CAAC,UAAU,EAC5D,WAAW,EAAE,iBAAiB,CAAC,UAAU,CAAC,EAC1C,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,aAAa,EACtB,OAAO,EAAE,OAAO,oBAAoB,CAAC,eAAe,GAClD,UAAU,CACZ,cAAc,CAAC,UAAU,CAAC,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,CACtB,CA6FA"}
@@ -4,14 +4,14 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.makeV5CodecWithVersion = void 0;
7
+ exports.makeSharedBranchesCodecWithVersion = void 0;
8
8
  const typebox_1 = require("@sinclair/typebox");
9
9
  const index_js_1 = require("../codec/index.js");
10
- const messageFormatV5_js_1 = require("./messageFormatV5.js");
10
+ const messageFormatVSharedBranches_js_1 = require("./messageFormatVSharedBranches.js");
11
11
  const internal_1 = require("@fluidframework/core-utils/internal");
12
12
  const branchIdCodec_js_1 = require("./branchIdCodec.js");
13
- function makeV5CodecWithVersion(changeCodec, revisionTagCodec, options, version) {
14
- return (0, index_js_1.withSchemaValidation)((0, messageFormatV5_js_1.Message)(changeCodec.encodedSchema ?? typebox_1.Type.Any()), {
13
+ function makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, options, version) {
14
+ return (0, index_js_1.withSchemaValidation)((0, messageFormatVSharedBranches_js_1.Message)(changeCodec.encodedSchema ?? typebox_1.Type.Any()), {
15
15
  encode: (message, context) => {
16
16
  const type = message.type;
17
17
  switch (type) {
@@ -74,5 +74,5 @@ function makeV5CodecWithVersion(changeCodec, revisionTagCodec, options, version)
74
74
  },
75
75
  }, options.jsonValidator);
76
76
  }
77
- exports.makeV5CodecWithVersion = makeV5CodecWithVersion;
78
- //# sourceMappingURL=messageCodecV5.js.map
77
+ exports.makeSharedBranchesCodecWithVersion = makeSharedBranchesCodecWithVersion;
78
+ //# sourceMappingURL=messageCodecVSharedBranches.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messageCodecVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecVSharedBranches.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA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Licensed under the MIT License.\n */\n\nimport { type TAnySchema, Type } from \"@sinclair/typebox\";\n\nimport { type ICodecOptions, type IJsonCodec, withSchemaValidation } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tChangeFamilyCodec,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport { Message } from \"./messageFormatVSharedBranches.js\";\nimport type { DecodedMessage } from \"./messageTypes.js\";\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport type { MessageEncodingContext } from \"./messageCodecs.js\";\nimport { decodeBranchId, encodeBranchId } from \"./branchIdCodec.js\";\nimport type { MessageFormatVersion } from \"./messageFormat.js\";\n\nexport function makeSharedBranchesCodecWithVersion<TChangeset>(\n\tchangeCodec: ChangeFamilyCodec<TChangeset>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n\tversion: typeof MessageFormatVersion.vSharedBranches,\n): IJsonCodec<\n\tDecodedMessage<TChangeset>,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tMessageEncodingContext\n> {\n\treturn withSchemaValidation<\n\t\tDecodedMessage<TChangeset>,\n\t\tTAnySchema,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tMessageEncodingContext\n\t>(\n\t\tMessage(changeCodec.encodedSchema ?? Type.Any()),\n\t\t{\n\t\t\tencode: (\n\t\t\t\tmessage: DecodedMessage<TChangeset>,\n\t\t\t\tcontext: MessageEncodingContext,\n\t\t\t): JsonCompatibleReadOnly => {\n\t\t\t\tconst type = message.type;\n\t\t\t\tswitch (type) {\n\t\t\t\t\tcase \"commit\": {\n\t\t\t\t\t\tconst changeContext: ChangeEncodingContext = {\n\t\t\t\t\t\t\toriginatorId: message.sessionId,\n\t\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\t\trevision: message.commit.revision,\n\t\t\t\t\t\t};\n\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\trevision: revisionTagCodec.encode(message.commit.revision, {\n\t\t\t\t\t\t\t\toriginatorId: message.sessionId,\n\t\t\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\toriginatorId: message.sessionId,\n\t\t\t\t\t\t\tchangeset: changeCodec.encode(message.commit.change, changeContext),\n\t\t\t\t\t\t\tbranchId: encodeBranchId(context.idCompressor, message.branchId),\n\t\t\t\t\t\t\tversion,\n\t\t\t\t\t\t} satisfies Message & JsonCompatibleReadOnly;\n\t\t\t\t\t}\n\t\t\t\t\tcase \"branch\": {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\toriginatorId: message.sessionId,\n\t\t\t\t\t\t\tbranchId: encodeBranchId(context.idCompressor, message.branchId),\n\t\t\t\t\t\t\tversion,\n\t\t\t\t\t\t} satisfies Message & JsonCompatibleReadOnly;\n\t\t\t\t\t}\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tunreachableCase(type);\n\t\t\t\t}\n\t\t\t},\n\t\t\tdecode: (\n\t\t\t\tencoded: JsonCompatibleReadOnly,\n\t\t\t\tcontext: MessageEncodingContext,\n\t\t\t): DecodedMessage<TChangeset> => {\n\t\t\t\tconst {\n\t\t\t\t\trevision: encodedRevision,\n\t\t\t\t\toriginatorId,\n\t\t\t\t\tchangeset,\n\t\t\t\t\tbranchId: encodedBranchId,\n\t\t\t\t} = encoded as unknown as Message;\n\n\t\t\t\tconst changeContext = {\n\t\t\t\t\toriginatorId,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t};\n\n\t\t\t\tconst branchId = decodeBranchId(context.idCompressor, encodedBranchId, changeContext);\n\n\t\t\t\tif (changeset === undefined) {\n\t\t\t\t\treturn { type: \"branch\", sessionId: originatorId, branchId };\n\t\t\t\t}\n\n\t\t\t\tassert(\n\t\t\t\t\tencodedRevision !== undefined,\n\t\t\t\t\t0xc6a /* Commit messages must have a revision */,\n\t\t\t\t);\n\t\t\t\tconst revision = revisionTagCodec.decode(encodedRevision, changeContext);\n\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"commit\",\n\t\t\t\t\tcommit: {\n\t\t\t\t\t\trevision,\n\t\t\t\t\t\tchange: changeCodec.decode(changeset, {\n\t\t\t\t\t\t\toriginatorId,\n\t\t\t\t\t\t\trevision,\n\t\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\t}),\n\t\t\t\t\t},\n\t\t\t\t\tbranchId,\n\t\t\t\t\tsessionId: originatorId,\n\t\t\t\t};\n\t\t\t},\n\t\t},\n\t\toptions.jsonValidator,\n\t);\n}\n"]}
@@ -26,6 +26,10 @@ export interface MessageCodecOptions {
26
26
  * Returns the version that should be used for testing shared branches.
27
27
  */
28
28
  export declare function messageFormatVersionSelectorForSharedBranches(clientVersion: MinimumVersionForCollab): MessageFormatVersion;
29
+ /**
30
+ * Returns the version that should be used for testing detached root editing.
31
+ */
32
+ export declare function messageFormatVersionSelectorForDetachedRootEditing(clientVersion: MinimumVersionForCollab): MessageFormatVersion;
29
33
  export declare function makeMessageCodec<TChangeset>(changeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>, dependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, options: MessageCodecOptions & CodecWriteOptions): IJsonCodec<DecodedMessage<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, MessageEncodingContext>;
30
34
  /**
31
35
  * @privateRemarks Exported for testing.
@@ -1 +1 @@
1
- {"version":3,"file":"messageCodecs.d.ts","sourceRoot":"","sources":["../../src/shared-t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BAAuB,EACtC,YAAY,EAAE,SAAS,GACrB,SAAS,CAMX"}
@@ -4,13 +4,13 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.getCodecTreeForMessageFormatWithChange = exports.makeMessageCodecs = exports.makeMessageCodec = exports.messageFormatVersionSelectorForSharedBranches = exports.clientVersionToMessageFormatVersion = void 0;
7
+ exports.getCodecTreeForMessageFormatWithChange = exports.makeMessageCodecs = exports.makeMessageCodec = exports.messageFormatVersionSelectorForDetachedRootEditing = exports.messageFormatVersionSelectorForSharedBranches = exports.clientVersionToMessageFormatVersion = void 0;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const internal_2 = require("@fluidframework/runtime-utils/internal");
10
10
  const index_js_1 = require("../codec/index.js");
11
11
  const index_js_2 = require("../util/index.js");
12
12
  const messageCodecV1ToV4_js_1 = require("./messageCodecV1ToV4.js");
13
- const messageCodecV5_js_1 = require("./messageCodecV5.js");
13
+ const messageCodecVSharedBranches_js_1 = require("./messageCodecVSharedBranches.js");
14
14
  const messageFormat_js_1 = require("./messageFormat.js");
15
15
  /**
16
16
  * Convert a MinimumVersionForCollab to a MessageFormatVersion.
@@ -33,9 +33,16 @@ function messageFormatVersionFromOptions(options) {
33
33
  * Returns the version that should be used for testing shared branches.
34
34
  */
35
35
  function messageFormatVersionSelectorForSharedBranches(clientVersion) {
36
- return (0, index_js_2.brand)(messageFormat_js_1.MessageFormatVersion.v5);
36
+ return (0, index_js_2.brand)(messageFormat_js_1.MessageFormatVersion.vSharedBranches);
37
37
  }
38
38
  exports.messageFormatVersionSelectorForSharedBranches = messageFormatVersionSelectorForSharedBranches;
39
+ /**
40
+ * Returns the version that should be used for testing detached root editing.
41
+ */
42
+ function messageFormatVersionSelectorForDetachedRootEditing(clientVersion) {
43
+ return (0, index_js_2.brand)(messageFormat_js_1.MessageFormatVersion.vDetachedRoots);
44
+ }
45
+ exports.messageFormatVersionSelectorForDetachedRootEditing = messageFormatVersionSelectorForDetachedRootEditing;
39
46
  function makeMessageCodec(changeCodecs, dependentChangeFormatVersion, revisionTagCodec, options) {
40
47
  const family = makeMessageCodecs(changeCodecs, dependentChangeFormatVersion, revisionTagCodec, options);
41
48
  const writeVersion = messageFormatVersionFromOptions(options);
@@ -58,18 +65,21 @@ function makeMessageCodecs(changeCodecs, dependentChangeFormatVersion, revisionT
58
65
  ];
59
66
  }
60
67
  case messageFormat_js_1.MessageFormatVersion.v3:
61
- case messageFormat_js_1.MessageFormatVersion.v4: {
68
+ case messageFormat_js_1.MessageFormatVersion.v4:
69
+ case messageFormat_js_1.MessageFormatVersion.vDetachedRoots: {
62
70
  const changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version)).json;
63
71
  return [
64
72
  version,
65
73
  (0, messageCodecV1ToV4_js_1.makeV1ToV4CodecWithVersion)(changeCodec, revisionTagCodec, options, version),
66
74
  ];
67
75
  }
68
- case messageFormat_js_1.MessageFormatVersion.v5: {
76
+ case messageFormat_js_1.MessageFormatVersion.v5:
77
+ return [version, (0, index_js_1.makeDiscontinuedCodecVersion)(options, version, "2.74.0")];
78
+ case messageFormat_js_1.MessageFormatVersion.vSharedBranches: {
69
79
  const changeCodec = changeCodecs.resolve(dependentChangeFormatVersion.lookup(version)).json;
70
80
  return [
71
81
  version,
72
- (0, messageCodecV5_js_1.makeV5CodecWithVersion)(changeCodec, revisionTagCodec, options, version),
82
+ (0, messageCodecVSharedBranches_js_1.makeSharedBranchesCodecWithVersion)(changeCodec, revisionTagCodec, options, version),
73
83
  ];
74
84
  }
75
85
  default:
@@ -1 +1 @@
1
- {"version":3,"file":"messageCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAsE;AAEtE,qEAGgD;AAEhD,gDAY2B;AAO3B,+CAAsE;AAItE,mEAAqE;AACrE,2DAA6D;AAC7D,yDAAiF;AAOjF;;;;GAIG;A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AE,mCAAmC,CAAC,aAAa,CAAC;QAC3D,QAAQ,EAAE,CAAC,YAAY,CAAC;KACxB,CAAC;AACH,CAAC;AATD,wFASC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tgetConfigForMinVersionForCollab,\n\tlowestMinVersionForCollab,\n} from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\ttype CodecTree,\n\ttype CodecWriteOptions,\n\ttype DependentFormatVersion,\n\tFluidClientVersion,\n\ttype FormatVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeDiscontinuedCodecVersion,\n\tmakeVersionDispatchingCodec,\n} from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport { brand, type JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport type { DecodedMessage } from \"./messageTypes.js\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport { makeV1ToV4CodecWithVersion } from \"./messageCodecV1ToV4.js\";\nimport { makeV5CodecWithVersion } from \"./messageCodecV5.js\";\nimport { MessageFormatVersion, messageFormatVersions } from \"./messageFormat.js\";\n\nexport interface MessageEncodingContext {\n\tidCompressor: IIdCompressor;\n\tschema?: SchemaAndPolicy;\n}\n\n/**\n * Convert a MinimumVersionForCollab to a MessageFormatVersion.\n * @param clientVersion - The MinimumVersionForCollab to convert.\n * @returns The MessageFormatVersion that corresponds to the provided MinimumVersionForCollab.\n */\nexport function clientVersionToMessageFormatVersion(\n\tclientVersion: MinimumVersionForCollab,\n\twriteVersionOverride?: MessageFormatVersion,\n): MessageFormatVersion {\n\tconst compatibleVersion: MessageFormatVersion = brand(\n\t\tgetConfigForMinVersionForCollab(clientVersion, {\n\t\t\t[lowestMinVersionForCollab]: MessageFormatVersion.v3,\n\t\t\t[FluidClientVersion.v2_43]: MessageFormatVersion.v4,\n\t\t}),\n\t);\n\treturn writeVersionOverride ?? compatibleVersion;\n}\n\nexport interface MessageCodecOptions {\n\treadonly messageFormatSelector?: (\n\t\tminVersionForCollab: MinimumVersionForCollab,\n\t) => MessageFormatVersion;\n}\n\nfunction messageFormatVersionFromOptions(\n\toptions: MessageCodecOptions & CodecWriteOptions,\n): MessageFormatVersion {\n\tconst selector = options.messageFormatSelector ?? clientVersionToMessageFormatVersion;\n\treturn selector(options.minVersionForCollab);\n}\n\n/**\n * Returns the version that should be used for testing shared branches.\n */\nexport function messageFormatVersionSelectorForSharedBranches(\n\tclientVersion: MinimumVersionForCollab,\n): MessageFormatVersion {\n\treturn brand(MessageFormatVersion.v5);\n}\n\nexport function makeMessageCodec<TChangeset>(\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,\n\tdependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: MessageCodecOptions & CodecWriteOptions,\n): IJsonCodec<\n\tDecodedMessage<TChangeset>,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tMessageEncodingContext\n> {\n\tconst family = makeMessageCodecs(\n\t\tchangeCodecs,\n\t\tdependentChangeFormatVersion,\n\t\trevisionTagCodec,\n\t\toptions,\n\t);\n\tconst writeVersion = messageFormatVersionFromOptions(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * @privateRemarks Exported for testing.\n */\nexport function makeMessageCodecs<TChangeset>(\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,\n\tdependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n): ICodecFamily<DecodedMessage<TChangeset>, MessageEncodingContext> {\n\tconst registry: [\n\t\tFormatVersion,\n\t\tIJsonCodec<\n\t\t\tDecodedMessage<TChangeset>,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tMessageEncodingContext\n\t\t>,\n\t][] = Array.from(messageFormatVersions).map((version) => {\n\t\tswitch (version) {\n\t\t\tcase MessageFormatVersion.undefined:\n\t\t\tcase MessageFormatVersion.v1:\n\t\t\tcase MessageFormatVersion.v2: {\n\t\t\t\tconst versionOrUndefined =\n\t\t\t\t\tversion === MessageFormatVersion.undefined ? undefined : version;\n\t\t\t\treturn [\n\t\t\t\t\tversionOrUndefined,\n\t\t\t\t\tmakeDiscontinuedCodecVersion(options, versionOrUndefined, \"2.73.0\"),\n\t\t\t\t];\n\t\t\t}\n\t\t\tcase MessageFormatVersion.v3:\n\t\t\tcase MessageFormatVersion.v4: {\n\t\t\t\tconst changeCodec = changeCodecs.resolve(\n\t\t\t\t\tdependentChangeFormatVersion.lookup(version),\n\t\t\t\t).json;\n\t\t\t\treturn [\n\t\t\t\t\tversion,\n\t\t\t\t\tmakeV1ToV4CodecWithVersion(changeCodec, revisionTagCodec, options, version),\n\t\t\t\t];\n\t\t\t}\n\t\t\tcase MessageFormatVersion.v5: {\n\t\t\t\tconst changeCodec = changeCodecs.resolve(\n\t\t\t\t\tdependentChangeFormatVersion.lookup(version),\n\t\t\t\t).json;\n\t\t\t\treturn [\n\t\t\t\t\tversion,\n\t\t\t\t\tmakeV5CodecWithVersion(changeCodec, revisionTagCodec, options, version),\n\t\t\t\t];\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tunreachableCase(version);\n\t\t}\n\t});\n\treturn makeCodecFamily(registry);\n}\n\nexport function getCodecTreeForMessageFormatWithChange(\n\tclientVersion: MinimumVersionForCollab,\n\tchangeFormat: CodecTree,\n): CodecTree {\n\treturn {\n\t\tname: \"Message\",\n\t\tversion: clientVersionToMessageFormatVersion(clientVersion),\n\t\tchildren: [changeFormat],\n\t};\n}\n"]}
1
+ {"version":3,"file":"messageCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAsE;AAEtE,qEAGgD;AAEhD,gDAY2B;AAO3B,+CAAsE;AAItE,mEAAqE;AACrE,qFAAsF;AACtF,yDAAiF;AAOjF;;;;GAIG;AACH,SAAgB,mCAAmC,CAClD,aAAsC,EACtC,oBAA2C;IAE3C,MAAM,iBAAiB,GAAyB,IAAA,gBAAK,EACpD,IAAA,0CAA+B,EAAC,aAAa,EAAE;QAC9C,CAAC,oCAAyB,CAAC,EAAE,uCAAoB,CAAC,EAAE;QACpD,CAAC,6BAAkB,CAAC,KAAK,CAAC,EAAE,uCAAoB,CAAC,EAAE;KACnD,CAAC,CACF,CAAC;IACF,OAAO,oBAAoB,IAAI,iBAAiB,CAAC;AAClD,CAAC;AAXD,kFAWC;AAQD,SAAS,+BAA+B,CACvC,OAAgD;IAEhD,MAAM,QAAQ,GAAG,OAAO,CAAC,qBAAqB,IAAI,mCAAmC,CAAC;IACtF,OAAO,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,SAAgB,6CAA6C,CAC5D,aAAsC;IAEtC,OAAO,IAAA,gBAAK,EAAC,uCAAoB,CAAC,eAAe,CAAC,CAAC;AACpD,CAAC;AAJD,sGAIC;AAED;;GAEG;AACH,SAAgB,kDAAkD,CACjE,aAAsC;IAEtC,OAAO,IAAA,gBAAK,EAAC,uCAAoB,CAAC,cAAc,CAAC,CAAC;AACnD,CAAC;AAJD,gHAIC;AAED,SAAgB,gBAAgB,CAC/B,YAA6D,EAC7D,4BAA0E,EAC1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;iBAC3E,CAAC;YACH,CAAC;YACD,KAAK,uCAAoB,CAAC,EAAE;gBAC3B,OAAO,CAAC,OAAO,EAAE,IAAA,uCAA4B,EAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC;YAC5E,KAAK,uCAAoB,CAAC,eAAe,CAAC,CAAC,CAAC;gBAC3C,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CACvC,4BAA4B,CAAC,MAAM,CAAC,OAAO,CAAC,CAC5C,CAAC,IAAI,CAAC;gBACP,OAAO;oBACN,OAAO;oBACP,IAAA,mEAAkC,EAAC,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,OAAO,CAAC;iBACnF,CAAC;YACH,CAAC;YACD;gBACC,IAAA,0BAAe,EAAC,OAAO,CAAC,CAAC;QAC3B,CAAC;IACF,CAAC,CAAC,CAAC;IACH,OAAO,IAAA,0BAAe,EAAC,QAAQ,CAAC,CAAC;AAClC,CAAC;AA1DD,8CA0DC;AAED,SAAgB,sCAAsC,CACrD,aAAsC,EACtC,YAAuB;IAEvB,OAAO;QACN,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,mCAAmC,CAAC,aAAa,CAAC;QAC3D,QAAQ,EAAE,CAAC,YAAY,CAAC;KACxB,CAAC;AACH,CAAC;AATD,wFASC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tgetConfigForMinVersionForCollab,\n\tlowestMinVersionForCollab,\n} from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\ttype CodecTree,\n\ttype CodecWriteOptions,\n\ttype DependentFormatVersion,\n\tFluidClientVersion,\n\ttype FormatVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeDiscontinuedCodecVersion,\n\tmakeVersionDispatchingCodec,\n} from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport { brand, type JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport type { DecodedMessage } from \"./messageTypes.js\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport { makeV1ToV4CodecWithVersion } from \"./messageCodecV1ToV4.js\";\nimport { makeSharedBranchesCodecWithVersion } from \"./messageCodecVSharedBranches.js\";\nimport { MessageFormatVersion, messageFormatVersions } from \"./messageFormat.js\";\n\nexport interface MessageEncodingContext {\n\tidCompressor: IIdCompressor;\n\tschema?: SchemaAndPolicy;\n}\n\n/**\n * Convert a MinimumVersionForCollab to a MessageFormatVersion.\n * @param clientVersion - The MinimumVersionForCollab to convert.\n * @returns The MessageFormatVersion that corresponds to the provided MinimumVersionForCollab.\n */\nexport function clientVersionToMessageFormatVersion(\n\tclientVersion: MinimumVersionForCollab,\n\twriteVersionOverride?: MessageFormatVersion,\n): MessageFormatVersion {\n\tconst compatibleVersion: MessageFormatVersion = brand(\n\t\tgetConfigForMinVersionForCollab(clientVersion, {\n\t\t\t[lowestMinVersionForCollab]: MessageFormatVersion.v3,\n\t\t\t[FluidClientVersion.v2_43]: MessageFormatVersion.v4,\n\t\t}),\n\t);\n\treturn writeVersionOverride ?? compatibleVersion;\n}\n\nexport interface MessageCodecOptions {\n\treadonly messageFormatSelector?: (\n\t\tminVersionForCollab: MinimumVersionForCollab,\n\t) => MessageFormatVersion;\n}\n\nfunction messageFormatVersionFromOptions(\n\toptions: MessageCodecOptions & CodecWriteOptions,\n): MessageFormatVersion {\n\tconst selector = options.messageFormatSelector ?? clientVersionToMessageFormatVersion;\n\treturn selector(options.minVersionForCollab);\n}\n\n/**\n * Returns the version that should be used for testing shared branches.\n */\nexport function messageFormatVersionSelectorForSharedBranches(\n\tclientVersion: MinimumVersionForCollab,\n): MessageFormatVersion {\n\treturn brand(MessageFormatVersion.vSharedBranches);\n}\n\n/**\n * Returns the version that should be used for testing detached root editing.\n */\nexport function messageFormatVersionSelectorForDetachedRootEditing(\n\tclientVersion: MinimumVersionForCollab,\n): MessageFormatVersion {\n\treturn brand(MessageFormatVersion.vDetachedRoots);\n}\n\nexport function makeMessageCodec<TChangeset>(\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,\n\tdependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: MessageCodecOptions & CodecWriteOptions,\n): IJsonCodec<\n\tDecodedMessage<TChangeset>,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tMessageEncodingContext\n> {\n\tconst family = makeMessageCodecs(\n\t\tchangeCodecs,\n\t\tdependentChangeFormatVersion,\n\t\trevisionTagCodec,\n\t\toptions,\n\t);\n\tconst writeVersion = messageFormatVersionFromOptions(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * @privateRemarks Exported for testing.\n */\nexport function makeMessageCodecs<TChangeset>(\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>,\n\tdependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\toptions: ICodecOptions,\n): ICodecFamily<DecodedMessage<TChangeset>, MessageEncodingContext> {\n\tconst registry: [\n\t\tFormatVersion,\n\t\tIJsonCodec<\n\t\t\tDecodedMessage<TChangeset>,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tMessageEncodingContext\n\t\t>,\n\t][] = Array.from(messageFormatVersions).map((version) => {\n\t\tswitch (version) {\n\t\t\tcase MessageFormatVersion.undefined:\n\t\t\tcase MessageFormatVersion.v1:\n\t\t\tcase MessageFormatVersion.v2: {\n\t\t\t\tconst versionOrUndefined =\n\t\t\t\t\tversion === MessageFormatVersion.undefined ? undefined : version;\n\t\t\t\treturn [\n\t\t\t\t\tversionOrUndefined,\n\t\t\t\t\tmakeDiscontinuedCodecVersion(options, versionOrUndefined, \"2.73.0\"),\n\t\t\t\t];\n\t\t\t}\n\t\t\tcase MessageFormatVersion.v3:\n\t\t\tcase MessageFormatVersion.v4:\n\t\t\tcase MessageFormatVersion.vDetachedRoots: {\n\t\t\t\tconst changeCodec = changeCodecs.resolve(\n\t\t\t\t\tdependentChangeFormatVersion.lookup(version),\n\t\t\t\t).json;\n\t\t\t\treturn [\n\t\t\t\t\tversion,\n\t\t\t\t\tmakeV1ToV4CodecWithVersion(changeCodec, revisionTagCodec, options, version),\n\t\t\t\t];\n\t\t\t}\n\t\t\tcase MessageFormatVersion.v5:\n\t\t\t\treturn [version, makeDiscontinuedCodecVersion(options, version, \"2.74.0\")];\n\t\t\tcase MessageFormatVersion.vSharedBranches: {\n\t\t\t\tconst changeCodec = changeCodecs.resolve(\n\t\t\t\t\tdependentChangeFormatVersion.lookup(version),\n\t\t\t\t).json;\n\t\t\t\treturn [\n\t\t\t\t\tversion,\n\t\t\t\t\tmakeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, options, version),\n\t\t\t\t];\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tunreachableCase(version);\n\t\t}\n\t});\n\treturn makeCodecFamily(registry);\n}\n\nexport function getCodecTreeForMessageFormatWithChange(\n\tclientVersion: MinimumVersionForCollab,\n\tchangeFormat: CodecTree,\n): CodecTree {\n\treturn {\n\t\tname: \"Message\",\n\t\tversion: clientVersionToMessageFormatVersion(clientVersion),\n\t\tchildren: [changeFormat],\n\t};\n}\n"]}
@@ -25,22 +25,36 @@ export declare const MessageFormatVersion: {
25
25
  readonly v2: 2;
26
26
  /**
27
27
  * Introduced prior to 2.0 and used beyond.
28
- * Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.
29
- * Writing capability needs to be maintained.
28
+ * Reading capability must be maintained for backwards compatibility.
29
+ * Writing capability needs to be maintained so long as {@link lowestMinVersionForCollab} is less than 2.2.0.
30
30
  */
31
31
  readonly v3: 3;
32
32
  /**
33
- * Was inadvertently released in 2.43.0 (through usages of configuredSharedTree) and remains available.
33
+ * Introduced in 2.2.0.
34
+ * Was inadvertently made usable for writing in 2.43.0 (through configuredSharedTree) and remains available.
34
35
  * Reading capability must be maintained for backwards compatibility.
35
- * Writing capability needs to be maintained.
36
- * @privateRemarks TODO: stop writing this version.
36
+ * Writing capability could be dropped in favor of {@link MessageFormatVersion.v3},
37
+ * but doing so would make the pattern of writable versions more complex and gain little
38
+ * because most of the logic for this format is shared with {@link MessageFormatVersion.v3}.
37
39
  */
38
40
  readonly v4: 4;
41
+ /**
42
+ * This version number was used internally for testing shared branches.
43
+ * This format was never made stable.
44
+ * This version number is kept here solely to avoid reusing the number: it is not supported for either reading or writing.
45
+ * @deprecated Use {@link MessageFormatVersion.vSharedBranches} for testing shared branches.
46
+ */
47
+ readonly v5: 5;
39
48
  /**
40
49
  * Not yet released.
41
50
  * Only used for testing shared branches.
42
51
  */
43
- readonly v5: 5;
52
+ readonly vSharedBranches: "shared-branches|v0.1";
53
+ /**
54
+ * Not yet released.
55
+ * Only used for testing detached roots.
56
+ */
57
+ readonly vDetachedRoots: "detached-roots|v0.1";
44
58
  };
45
59
  export type MessageFormatVersion = Brand<(typeof MessageFormatVersion)[keyof typeof MessageFormatVersion], "MessageFormatVersion">;
46
60
  export declare const supportedMessageFormatVersions: ReadonlySet<MessageFormatVersion>;
@@ -1 +1 @@
1
- {"version":3,"file":"messageFormat.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,oBAAoB;IAChC;;;;OAIG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;;OAGG;;CAEM,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,KAAK,CACvC,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,EAChE,sBAAsB,CACtB,CAAC;AACF,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,oBAAoB,CAIjD,CAAC;AAC7B,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,oBAAoB,CAEnE,CAAC"}
1
+ {"version":3,"file":"messageFormat.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormat.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,oBAAoB;IAChC;;;;OAIG;;IAEH;;;OAGG;;IAEH;;;OAGG;;IAEH;;;;OAIG;;IAEH;;;;;;;OAOG;;IAEH;;;;;OAKG;;IAEH;;;OAGG;;IAEH;;;OAGG;;CAEM,CAAC;AACX,MAAM,MAAM,oBAAoB,GAAG,KAAK,CACvC,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,EAChE,sBAAsB,CACtB,CAAC;AACF,eAAO,MAAM,8BAA8B,EAAE,WAAW,CAAC,oBAAoB,CAKjD,CAAC;AAC7B,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,oBAAoB,CAEnE,CAAC"}
@@ -27,27 +27,42 @@ exports.MessageFormatVersion = {
27
27
  v2: 2,
28
28
  /**
29
29
  * Introduced prior to 2.0 and used beyond.
30
- * Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.
31
- * Writing capability needs to be maintained.
30
+ * Reading capability must be maintained for backwards compatibility.
31
+ * Writing capability needs to be maintained so long as {@link lowestMinVersionForCollab} is less than 2.2.0.
32
32
  */
33
33
  v3: 3,
34
34
  /**
35
- * Was inadvertently released in 2.43.0 (through usages of configuredSharedTree) and remains available.
35
+ * Introduced in 2.2.0.
36
+ * Was inadvertently made usable for writing in 2.43.0 (through configuredSharedTree) and remains available.
36
37
  * Reading capability must be maintained for backwards compatibility.
37
- * Writing capability needs to be maintained.
38
- * @privateRemarks TODO: stop writing this version.
38
+ * Writing capability could be dropped in favor of {@link MessageFormatVersion.v3},
39
+ * but doing so would make the pattern of writable versions more complex and gain little
40
+ * because most of the logic for this format is shared with {@link MessageFormatVersion.v3}.
39
41
  */
40
42
  v4: 4,
43
+ /**
44
+ * This version number was used internally for testing shared branches.
45
+ * This format was never made stable.
46
+ * This version number is kept here solely to avoid reusing the number: it is not supported for either reading or writing.
47
+ * @deprecated Use {@link MessageFormatVersion.vSharedBranches} for testing shared branches.
48
+ */
49
+ v5: 5,
41
50
  /**
42
51
  * Not yet released.
43
52
  * Only used for testing shared branches.
44
53
  */
45
- v5: 5,
54
+ vSharedBranches: "shared-branches|v0.1",
55
+ /**
56
+ * Not yet released.
57
+ * Only used for testing detached roots.
58
+ */
59
+ vDetachedRoots: "detached-roots|v0.1",
46
60
  };
47
61
  exports.supportedMessageFormatVersions = new Set([
48
62
  exports.MessageFormatVersion.v3,
49
63
  exports.MessageFormatVersion.v4,
50
- exports.MessageFormatVersion.v5,
64
+ exports.MessageFormatVersion.vSharedBranches,
65
+ exports.MessageFormatVersion.vDetachedRoots,
51
66
  ]);
52
67
  exports.messageFormatVersions = new Set(Object.values(exports.MessageFormatVersion));
53
68
  //# sourceMappingURL=messageFormat.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"messageFormat.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACU,QAAA,oBAAoB,GAAG;IACnC;;;;OAIG;IACH,SAAS,EAAE,CAAC;IACZ;;;OAGG;IACH,EAAE,EAAE,CAAC;IACL;;;OAGG;IACH,EAAE,EAAE,CAAC;IACL;;;;OAIG;IACH,EAAE,EAAE,CAAC;IACL;;;;;OAKG;IACH,EAAE,EAAE,CAAC;IACL;;;OAGG;IACH,EAAE,EAAE,CAAC;CACI,CAAC;AAKE,QAAA,8BAA8B,GAAsC,IAAI,GAAG,CAAC;IACxF,4BAAoB,CAAC,EAAE;IACvB,4BAAoB,CAAC,EAAE;IACvB,4BAAoB,CAAC,EAAE;CACG,CAAC,CAAC;AAChB,QAAA,qBAAqB,GAAsC,IAAI,GAAG,CAC9E,MAAM,CAAC,MAAM,CAAC,4BAAoB,CAA2B,CAC7D,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Brand } from \"../util/index.js\";\n\n/**\n * The format version for the message.\n */\nexport const MessageFormatVersion = {\n\t/**\n\t * NOTE: this is written as `undefined` rather than `0` in the wire format.\n\t * Introduced and retired prior to 2.0.\n\t * Reading and writing capability removed in 2.73.0.\n\t */\n\tundefined: 0,\n\t/**\n\t * Introduced and retired prior to 2.0.\n\t * Reading and writing capability removed in 2.73.0.\n\t */\n\tv1: 1,\n\t/**\n\t * Introduced and retired prior to 2.0.\n\t * Reading and writing capability removed in 2.73.0.\n\t */\n\tv2: 2,\n\t/**\n\t * Introduced prior to 2.0 and used beyond.\n\t * Reading capability is currently maintained for backwards compatibility, but it could be removed in the future.\n\t * Writing capability needs to be maintained.\n\t */\n\tv3: 3,\n\t/**\n\t * Was inadvertently released in 2.43.0 (through usages of configuredSharedTree) and remains available.\n\t * Reading capability must be maintained for backwards compatibility.\n\t * Writing capability needs to be maintained.\n\t * @privateRemarks TODO: stop writing this version.\n\t */\n\tv4: 4,\n\t/**\n\t * Not yet released.\n\t * Only used for testing shared branches.\n\t */\n\tv5: 5,\n} as const;\nexport type MessageFormatVersion = Brand<\n\t(typeof MessageFormatVersion)[keyof typeof MessageFormatVersion],\n\t\"MessageFormatVersion\"\n>;\nexport const supportedMessageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set([\n\tMessageFormatVersion.v3,\n\tMessageFormatVersion.v4,\n\tMessageFormatVersion.v5,\n] as MessageFormatVersion[]);\nexport const messageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set(\n\tObject.values(MessageFormatVersion) as MessageFormatVersion[],\n);\n"]}
1
+ {"version":3,"file":"messageFormat.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH;;GAEG;AACU,QAAA,oBAAoB,GAAG;IACnC;;;;OAIG;IACH,SAAS,EAAE,CAAC;IACZ;;;OAGG;IACH,EAAE,EAAE,CAAC;IACL;;;OAGG;IACH,EAAE,EAAE,CAAC;IACL;;;;OAIG;IACH,EAAE,EAAE,CAAC;IACL;;;;;;;OAOG;IACH,EAAE,EAAE,CAAC;IACL;;;;;OAKG;IACH,EAAE,EAAE,CAAC;IACL;;;OAGG;IACH,eAAe,EAAE,sBAAsB;IACvC;;;OAGG;IACH,cAAc,EAAE,qBAAqB;CAC5B,CAAC;AAKE,QAAA,8BAA8B,GAAsC,IAAI,GAAG,CAAC;IACxF,4BAAoB,CAAC,EAAE;IACvB,4BAAoB,CAAC,EAAE;IACvB,4BAAoB,CAAC,eAAe;IACpC,4BAAoB,CAAC,cAAc;CACT,CAAC,CAAC;AAChB,QAAA,qBAAqB,GAAsC,IAAI,GAAG,CAC9E,MAAM,CAAC,MAAM,CAAC,4BAAoB,CAA2B,CAC7D,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Brand } from \"../util/index.js\";\n\n/**\n * The format version for the message.\n */\nexport const MessageFormatVersion = {\n\t/**\n\t * NOTE: this is written as `undefined` rather than `0` in the wire format.\n\t * Introduced and retired prior to 2.0.\n\t * Reading and writing capability removed in 2.73.0.\n\t */\n\tundefined: 0,\n\t/**\n\t * Introduced and retired prior to 2.0.\n\t * Reading and writing capability removed in 2.73.0.\n\t */\n\tv1: 1,\n\t/**\n\t * Introduced and retired prior to 2.0.\n\t * Reading and writing capability removed in 2.73.0.\n\t */\n\tv2: 2,\n\t/**\n\t * Introduced prior to 2.0 and used beyond.\n\t * Reading capability must be maintained for backwards compatibility.\n\t * Writing capability needs to be maintained so long as {@link lowestMinVersionForCollab} is less than 2.2.0.\n\t */\n\tv3: 3,\n\t/**\n\t * Introduced in 2.2.0.\n\t * Was inadvertently made usable for writing in 2.43.0 (through configuredSharedTree) and remains available.\n\t * Reading capability must be maintained for backwards compatibility.\n\t * Writing capability could be dropped in favor of {@link MessageFormatVersion.v3},\n\t * but doing so would make the pattern of writable versions more complex and gain little\n\t * because most of the logic for this format is shared with {@link MessageFormatVersion.v3}.\n\t */\n\tv4: 4,\n\t/**\n\t * This version number was used internally for testing shared branches.\n\t * This format was never made stable.\n\t * This version number is kept here solely to avoid reusing the number: it is not supported for either reading or writing.\n\t * @deprecated Use {@link MessageFormatVersion.vSharedBranches} for testing shared branches.\n\t */\n\tv5: 5,\n\t/**\n\t * Not yet released.\n\t * Only used for testing shared branches.\n\t */\n\tvSharedBranches: \"shared-branches|v0.1\",\n\t/**\n\t * Not yet released.\n\t * Only used for testing detached roots.\n\t */\n\tvDetachedRoots: \"detached-roots|v0.1\",\n} as const;\nexport type MessageFormatVersion = Brand<\n\t(typeof MessageFormatVersion)[keyof typeof MessageFormatVersion],\n\t\"MessageFormatVersion\"\n>;\nexport const supportedMessageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set([\n\tMessageFormatVersion.v3,\n\tMessageFormatVersion.v4,\n\tMessageFormatVersion.vSharedBranches,\n\tMessageFormatVersion.vDetachedRoots,\n] as MessageFormatVersion[]);\nexport const messageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set(\n\tObject.values(MessageFormatVersion) as MessageFormatVersion[],\n);\n"]}
@@ -6,6 +6,7 @@ import type { SessionId } from "@fluidframework/id-compressor";
6
6
  import { type TSchema } from "@sinclair/typebox";
7
7
  import { type EncodedRevisionTag } from "../core/index.js";
8
8
  import type { JsonCompatibleReadOnly } from "../util/index.js";
9
+ import { MessageFormatVersion } from "./messageFormat.js";
9
10
  /**
10
11
  * The format of messages that SharedTree sends and receives.
11
12
  */
@@ -28,12 +29,12 @@ export interface Message {
28
29
  * This was not set historically and was added before making any breaking changes to the format.
29
30
  * For that reason, absence of a 'version' field is synonymous with version 1.
30
31
  */
31
- readonly version?: number;
32
+ readonly version?: typeof MessageFormatVersion.v1 | typeof MessageFormatVersion.v2 | typeof MessageFormatVersion.v3 | typeof MessageFormatVersion.v4 | typeof MessageFormatVersion.vDetachedRoots;
32
33
  }
33
34
  export declare const Message: <ChangeSchema extends TSchema>(tChange: ChangeSchema) => import("@sinclair/typebox").TObject<{
34
35
  revision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
35
36
  originatorId: import("@sinclair/typebox").TUnsafe<SessionId>;
36
37
  changeset: ChangeSchema;
37
- version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
38
+ version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<1>, import("@sinclair/typebox").TLiteral<2>, import("@sinclair/typebox").TLiteral<3>, import("@sinclair/typebox").TLiteral<4>, import("@sinclair/typebox").TLiteral<"detached-roots|v0.1">]>>;
38
39
  }>;
39
40
  //# sourceMappingURL=messageFormatV1ToV4.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messageFormatV1ToV4.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatV1ToV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D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AAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,cAAc,CAAC;CAC9C;AAID,eAAO,MAAM,OAAO,0CAA2C,YAAY;;;;;EAcxE,CAAC"}
@@ -7,13 +7,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.Message = void 0;
8
8
  const typebox_1 = require("@sinclair/typebox");
9
9
  const index_js_1 = require("../core/index.js");
10
+ const messageFormat_js_1 = require("./messageFormat.js");
10
11
  // Return type is intentionally derived.
11
12
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
12
13
  const Message = (tChange) => typebox_1.Type.Object({
13
14
  revision: index_js_1.RevisionTagSchema,
14
15
  originatorId: index_js_1.SessionIdSchema,
15
16
  changeset: tChange,
16
- version: typebox_1.Type.Optional(typebox_1.Type.Number()),
17
+ version: typebox_1.Type.Optional(typebox_1.Type.Union([
18
+ typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.v1),
19
+ typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.v2),
20
+ typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.v3),
21
+ typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.v4),
22
+ typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.vDetachedRoots),
23
+ ])),
17
24
  });
18
25
  exports.Message = Message;
19
26
  //# sourceMappingURL=messageFormatV1ToV4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"messageFormatV1ToV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatV1ToV4.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+CAAuD;AAEvD,+CAA+F;AA6B/F,wCAAwC;AACxC,4EAA4E;AACrE,MAAM,OAAO,GAAG,CAA+B,OAAqB,EAAE,EAAE,CAC9E,cAAI,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,4BAAiB;IAC3B,YAAY,EAAE,0BAAe;IAC7B,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;CACrC,CAAC,CAAC;AANS,QAAA,OAAO,WAMhB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { SessionId } from \"@fluidframework/id-compressor\";\nimport { type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { type EncodedRevisionTag, RevisionTagSchema, SessionIdSchema } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\n\n/**\n * The format of messages that SharedTree sends and receives.\n */\nexport interface Message {\n\t/**\n\t * The revision tag for the change in this message\n\t */\n\treadonly revision: EncodedRevisionTag;\n\t/**\n\t * The stable ID that identifies the originator of the message.\n\t */\n\treadonly originatorId: SessionId;\n\t/**\n\t * The changeset to be applied.\n\t */\n\treadonly changeset: JsonCompatibleReadOnly;\n\n\t/**\n\t * The version of the message. This controls how the message is encoded.\n\t *\n\t * This was not set historically and was added before making any breaking changes to the format.\n\t * For that reason, absence of a 'version' field is synonymous with version 1.\n\t */\n\treadonly version?: number;\n}\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const Message = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object({\n\t\trevision: RevisionTagSchema,\n\t\toriginatorId: SessionIdSchema,\n\t\tchangeset: tChange,\n\t\tversion: Type.Optional(Type.Number()),\n\t});\n"]}
1
+ {"version":3,"file":"messageFormatV1ToV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatV1ToV4.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+CAAuD;AAEvD,+CAA+F;AAE/F,yDAA0D;AAiC1D,wCAAwC;AACxC,4EAA4E;AACrE,MAAM,OAAO,GAAG,CAA+B,OAAqB,EAAE,EAAE,CAC9E,cAAI,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,4BAAiB;IAC3B,YAAY,EAAE,0BAAe;IAC7B,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,cAAI,CAAC,QAAQ,CACrB,cAAI,CAAC,KAAK,CAAC;QACV,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,cAAc,CAAC;KACjD,CAAC,CACF;CACD,CAAC,CAAC;AAdS,QAAA,OAAO,WAchB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { SessionId } from \"@fluidframework/id-compressor\";\nimport { type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { type EncodedRevisionTag, RevisionTagSchema, SessionIdSchema } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\nimport { MessageFormatVersion } from \"./messageFormat.js\";\n\n/**\n * The format of messages that SharedTree sends and receives.\n */\nexport interface Message {\n\t/**\n\t * The revision tag for the change in this message\n\t */\n\treadonly revision: EncodedRevisionTag;\n\t/**\n\t * The stable ID that identifies the originator of the message.\n\t */\n\treadonly originatorId: SessionId;\n\t/**\n\t * The changeset to be applied.\n\t */\n\treadonly changeset: JsonCompatibleReadOnly;\n\n\t/**\n\t * The version of the message. This controls how the message is encoded.\n\t *\n\t * This was not set historically and was added before making any breaking changes to the format.\n\t * For that reason, absence of a 'version' field is synonymous with version 1.\n\t */\n\treadonly version?:\n\t\t| typeof MessageFormatVersion.v1\n\t\t| typeof MessageFormatVersion.v2\n\t\t| typeof MessageFormatVersion.v3\n\t\t| typeof MessageFormatVersion.v4\n\t\t| typeof MessageFormatVersion.vDetachedRoots;\n}\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const Message = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object({\n\t\trevision: RevisionTagSchema,\n\t\toriginatorId: SessionIdSchema,\n\t\tchangeset: tChange,\n\t\tversion: Type.Optional(\n\t\t\tType.Union([\n\t\t\t\tType.Literal(MessageFormatVersion.v1),\n\t\t\t\tType.Literal(MessageFormatVersion.v2),\n\t\t\t\tType.Literal(MessageFormatVersion.v3),\n\t\t\t\tType.Literal(MessageFormatVersion.v4),\n\t\t\t\tType.Literal(MessageFormatVersion.vDetachedRoots),\n\t\t\t]),\n\t\t),\n\t});\n"]}
@@ -7,6 +7,7 @@ import { type TSchema } from "@sinclair/typebox";
7
7
  import { type EncodedRevisionTag } from "../core/index.js";
8
8
  import type { JsonCompatibleReadOnly } from "../util/index.js";
9
9
  import type { EncodedBranchId } from "./branch.js";
10
+ import { MessageFormatVersion } from "./messageFormat.js";
10
11
  /**
11
12
  * The format of messages that SharedTree sends and receives.
12
13
  */
@@ -25,18 +26,15 @@ export interface Message {
25
26
  readonly changeset?: JsonCompatibleReadOnly;
26
27
  readonly branchId?: EncodedBranchId;
27
28
  /**
28
- * The version of the message. This controls how the message is encoded.
29
- *
30
- * This was not set historically and was added before making any breaking changes to the format.
31
- * For that reason, absence of a 'version' field is synonymous with version 1.
29
+ * The version of the message format.
32
30
  */
33
- readonly version?: number;
31
+ readonly version: typeof MessageFormatVersion.vSharedBranches;
34
32
  }
35
33
  export declare const Message: <ChangeSchema extends TSchema>(tChange: ChangeSchema) => import("@sinclair/typebox").TObject<{
36
34
  revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
37
35
  originatorId: import("@sinclair/typebox").TUnsafe<SessionId>;
38
36
  changeset: ChangeSchema extends import("@sinclair/typebox").TOptional<infer S extends TSchema> ? import("@sinclair/typebox").TOptional<S> : import("@sinclair/typebox").Ensure<import("@sinclair/typebox").TOptional<ChangeSchema>>;
39
37
  branchId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
40
- version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
38
+ version: import("@sinclair/typebox").TLiteral<"shared-branches|v0.1">;
41
39
  }>;
42
- //# sourceMappingURL=messageFormatV5.d.ts.map
40
+ //# sourceMappingURL=messageFormatVSharedBranches.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messageFormatVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,KAAK,kBAAkB,EAAsC,MAAM,kBAAkB,CAAC;AAC/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,sBAAsB,CAAC;IAE5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,oBAAoB,CAAC,eAAe,CAAC;CAC9D;AAID,eAAO,MAAM,OAAO,0CAA2C,YAAY;;;;;;EAOxE,CAAC"}
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.Message = void 0;
8
8
  const typebox_1 = require("@sinclair/typebox");
9
9
  const index_js_1 = require("../core/index.js");
10
+ const messageFormat_js_1 = require("./messageFormat.js");
10
11
  // Return type is intentionally derived.
11
12
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
12
13
  const Message = (tChange) => typebox_1.Type.Object({
@@ -14,7 +15,7 @@ const Message = (tChange) => typebox_1.Type.Object({
14
15
  originatorId: index_js_1.SessionIdSchema,
15
16
  changeset: typebox_1.Type.Optional(tChange),
16
17
  branchId: typebox_1.Type.Optional(typebox_1.Type.Number()),
17
- version: typebox_1.Type.Optional(typebox_1.Type.Number()),
18
+ version: typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.vSharedBranches),
18
19
  });
19
20
  exports.Message = Message;
20
- //# sourceMappingURL=messageFormatV5.js.map
21
+ //# sourceMappingURL=messageFormatVSharedBranches.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messageFormatVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatVSharedBranches.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+CAAuD;AAEvD,+CAA+F;AAG/F,yDAA0D;AA2B1D,wCAAwC;AACxC,4EAA4E;AACrE,MAAM,OAAO,GAAG,CAA+B,OAAqB,EAAE,EAAE,CAC9E,cAAI,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,cAAI,CAAC,QAAQ,CAAC,4BAAiB,CAAC;IAC1C,YAAY,EAAE,0BAAe;IAC7B,SAAS,EAAE,cAAI,CAAC,QAAQ,CAAC,OAAO,CAAC;IACjC,QAAQ,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,MAAM,EAAE,CAAC;IACtC,OAAO,EAAE,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,eAAe,CAAC;CAC3D,CAAC,CAAC;AAPS,QAAA,OAAO,WAOhB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { SessionId } from \"@fluidframework/id-compressor\";\nimport { type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { type EncodedRevisionTag, RevisionTagSchema, SessionIdSchema } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\nimport type { EncodedBranchId } from \"./branch.js\";\nimport { MessageFormatVersion } from \"./messageFormat.js\";\n\n/**\n * The format of messages that SharedTree sends and receives.\n */\nexport interface Message {\n\t/**\n\t * The revision tag for the change in this message\n\t */\n\treadonly revision?: EncodedRevisionTag;\n\t/**\n\t * The stable ID that identifies the originator of the message.\n\t */\n\treadonly originatorId: SessionId;\n\t/**\n\t * The changeset to be applied.\n\t */\n\treadonly changeset?: JsonCompatibleReadOnly;\n\n\treadonly branchId?: EncodedBranchId;\n\n\t/**\n\t * The version of the message format.\n\t */\n\treadonly version: typeof MessageFormatVersion.vSharedBranches;\n}\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const Message = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object({\n\t\trevision: Type.Optional(RevisionTagSchema),\n\t\toriginatorId: SessionIdSchema,\n\t\tchangeset: Type.Optional(tChange),\n\t\tbranchId: Type.Optional(Type.Number()),\n\t\tversion: Type.Literal(MessageFormatVersion.vSharedBranches),\n\t});\n"]}
@@ -6,6 +6,7 @@ import type { IFluidLoadable, ITelemetryBaseLogger } from "@fluidframework/core-
6
6
  import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
7
7
  import type { IIdCompressor } from "@fluidframework/id-compressor";
8
8
  import type { IExperimentalIncrementalSummaryContext, IRuntimeMessageCollection, ISummaryTreeWithStats, ITelemetryContext } from "@fluidframework/runtime-definitions/internal";
9
+ import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
9
10
  import type { IChannelView, IFluidSerializer } from "@fluidframework/shared-object-base/internal";
10
11
  import type { CodecWriteOptions, DependentFormatVersion } from "../codec/index.js";
11
12
  import { type ChangeFamily, type ChangeFamilyEditor, type GraphCommit, type RevisionTag, type SchemaAndPolicy, type SchemaPolicy, type TreeStoredSchemaRepository } from "../core/index.js";
@@ -18,15 +19,18 @@ import type { EditManagerFormatVersion } from "./editManagerFormatCommons.js";
18
19
  import { type MessageCodecOptions } from "./messageCodecs.js";
19
20
  import type { ResubmitMachine } from "./resubmitMachine.js";
20
21
  import type { MessageFormatVersion } from "./messageFormat.js";
22
+ import { type SharedTreeSummaryFormatVersion, type Summarizable, type SummaryElementParser, type SummaryElementStringifier } from "./summaryTypes.js";
23
+ import { VersionedSummarizer } from "./versionedSummarizer.js";
21
24
  export interface ClonableSchemaAndPolicy extends SchemaAndPolicy {
22
25
  schema: TreeStoredSchemaRepository;
23
26
  }
24
27
  export interface SharedTreeCoreOptionsInternal extends CodecWriteOptions, EditManagerCodecOptions, MessageCodecOptions {
28
+ canMakeDetachedRootEdits: boolean;
25
29
  }
26
30
  /**
27
31
  * Generic shared tree, which needs to be configured with indexes, field kinds and other configuration.
28
32
  */
29
- export declare class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange> implements WithBreakable {
33
+ export declare class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange> extends VersionedSummarizer<SharedTreeSummaryFormatVersion> implements WithBreakable, Summarizable {
30
34
  readonly breaker: Breakable;
31
35
  readonly sharedObject: IChannelView & IFluidLoadable;
32
36
  readonly serializer: IFluidSerializer;
@@ -64,6 +68,15 @@ export declare class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
64
68
  * If there is no transaction currently ongoing, then the edits will be submitted to Fluid immediately as well.
65
69
  */
66
70
  constructor(breaker: Breakable, sharedObject: IChannelView & IFluidLoadable, serializer: IFluidSerializer, submitLocalMessage: (content: unknown, localOpMetadata?: unknown) => void, logger: ITelemetryBaseLogger | undefined, summarizables: readonly Summarizable[], changeFamily: ChangeFamily<TEditor, TChange>, options: SharedTreeCoreOptionsInternal, changeFormatVersionForEditManager: DependentFormatVersion<EditManagerFormatVersion>, changeFormatVersionForMessage: DependentFormatVersion<MessageFormatVersion>, idCompressor: IIdCompressor, schema: TreeStoredSchemaRepository, schemaPolicy: SchemaPolicy, resubmitMachine?: ResubmitMachine<TChange>, enricher?: ChangeEnricherReadonlyCheckout<TChange>, getEditor?: () => TEditor);
71
+ protected summarizeInternal(props: {
72
+ stringify: SummaryElementStringifier;
73
+ fullTree?: boolean;
74
+ trackState?: boolean;
75
+ telemetryContext?: ITelemetryContext;
76
+ incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
77
+ builder: SummaryTreeBuilder;
78
+ }): void;
79
+ protected loadInternal(services: IChannelStorageService, parse: SummaryElementParser): Promise<void>;
67
80
  summarizeCore(serializer: IFluidSerializer, telemetryContext?: ITelemetryContext, incrementalSummaryContext?: IExperimentalIncrementalSummaryContext, fullTree?: boolean): ISummaryTreeWithStats;
68
81
  loadCore(services: IChannelStorageService): Promise<void>;
69
82
  private registerSharedBranch;
@@ -98,50 +111,4 @@ export declare class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
98
111
  private getEnricherState;
99
112
  private tryGetEnricherState;
100
113
  }
101
- /**
102
- * Specifies the behavior of a component that puts data in a summary.
103
- */
104
- export interface Summarizable {
105
- /**
106
- * Field name in summary json under which this element stores its data.
107
- */
108
- readonly key: string;
109
- /**
110
- * {@inheritDoc @fluidframework/datastore-definitions#(IChannel:interface).summarize}
111
- * @param stringify - Serializes the contents of the component (including {@link (IFluidHandle:interface)}s) for storage.
112
- * @param fullTree - A flag indicating whether the attempt should generate a full
113
- * summary tree without any handles for unchanged subtrees. It should only be set to true when generating
114
- * a summary from the entire container. The default value is false.
115
- * @param trackState - An optimization for tracking state of objects across summaries. If the state
116
- * of an object did not change since last successful summary, an
117
- * {@link @fluidframework/protocol-definitions#ISummaryHandle} can be used
118
- * instead of re-summarizing it. If this is `false`, the expectation is that you should never
119
- * send an `ISummaryHandle`, since you are not expected to track state. The default value is true.
120
- * @param telemetryContext - See {@link @fluidframework/runtime-definitions#ITelemetryContext}.
121
- * @param incrementalSummaryContext - See {@link @fluidframework/runtime-definitions#IExperimentalIncrementalSummaryContext}.
122
- */
123
- summarize(props: {
124
- stringify: SummaryElementStringifier;
125
- fullTree?: boolean;
126
- trackState?: boolean;
127
- telemetryContext?: ITelemetryContext;
128
- incrementalSummaryContext?: IExperimentalIncrementalSummaryContext;
129
- }): ISummaryTreeWithStats;
130
- /**
131
- * Allows the component to perform custom loading. The storage service is scoped to this component and therefore
132
- * paths in this component will not collide with those in other components, even if they are the same string.
133
- * @param service - Storage used by the component
134
- * @param parse - Parses serialized data from storage into runtime objects for the component
135
- */
136
- load(service: IChannelStorageService, parse: SummaryElementParser): Promise<void>;
137
- }
138
- /**
139
- * Serializes the given contents into a string acceptable for storing in summaries, i.e. all
140
- * Fluid handles have been replaced appropriately by an IFluidSerializer
141
- */
142
- export type SummaryElementStringifier = (contents: unknown) => string;
143
- /**
144
- * Parses a serialized/summarized string into an object, rehydrating any Fluid handles as necessary
145
- */
146
- export type SummaryElementParser = (contents: string) => unknown;
147
114
  //# sourceMappingURL=sharedTreeCore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sharedTreeCore.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/sharedTreeCore.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAE5F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAE7F,OAAO,KAAK,EACX,aAAa,EAGb,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACX,sCAAsC,EACtC,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,8CAA8C,CAAC;AAEtD,OAAO,KA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