@fluidframework/tree 2.110.0 → 2.112.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (598) hide show
  1. package/.vscode/settings.json +1 -0
  2. package/CHANGELOG.md +193 -0
  3. package/api-report/tree.alpha.api.md +96 -36
  4. package/api-report/tree.beta.api.md +39 -1
  5. package/api-report/tree.legacy.beta.api.md +39 -1
  6. package/api-report/tree.legacy.public.api.md +1 -1
  7. package/api-report/tree.public.api.md +1 -1
  8. package/dist/componentApi.d.ts +198 -0
  9. package/dist/componentApi.d.ts.map +1 -0
  10. package/dist/componentApi.js +138 -0
  11. package/dist/componentApi.js.map +1 -0
  12. package/dist/core/change-family/changeFamily.d.ts +3 -10
  13. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  14. package/dist/core/change-family/changeFamily.js.map +1 -1
  15. package/dist/core/rebase/types.d.ts +2 -2
  16. package/dist/core/rebase/types.js.map +1 -1
  17. package/dist/core/schema-stored/storedSchemaRepository.d.ts +2 -2
  18. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  19. package/dist/entrypoints/alpha.d.ts +1 -1
  20. package/dist/entrypoints/alpha.d.ts.map +1 -1
  21. package/dist/entrypoints/alpha.js +4 -2
  22. package/dist/entrypoints/alpha.js.map +1 -1
  23. package/dist/entrypoints/beta.d.ts +1 -1
  24. package/dist/entrypoints/beta.d.ts.map +1 -1
  25. package/dist/entrypoints/beta.js.map +1 -1
  26. package/dist/entrypoints/legacy.d.ts +1 -1
  27. package/dist/entrypoints/legacy.d.ts.map +1 -1
  28. package/dist/entrypoints/legacy.js.map +1 -1
  29. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -20
  30. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  31. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +13 -32
  32. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  33. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -2
  34. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  35. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  36. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +73 -28
  37. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  38. package/dist/feature-libraries/chunked-forest/codec/codecs.js +76 -9
  39. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  40. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +4 -2
  41. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  42. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +11 -0
  43. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  44. package/dist/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  45. package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  46. package/dist/feature-libraries/chunked-forest/codec/index.js +2 -1
  47. package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  48. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +1 -1
  49. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  50. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js +3 -15
  51. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  52. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
  53. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  54. package/dist/feature-libraries/chunked-forest/index.js +2 -1
  55. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  56. package/dist/feature-libraries/forest-summary/codec.d.ts +3 -3
  57. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  58. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  59. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -2
  60. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  61. package/dist/feature-libraries/forest-summary/forestSummarizer.js +4 -6
  62. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  63. package/dist/feature-libraries/index.d.ts +3 -3
  64. package/dist/feature-libraries/index.d.ts.map +1 -1
  65. package/dist/feature-libraries/index.js +4 -2
  66. package/dist/feature-libraries/index.js.map +1 -1
  67. package/dist/feature-libraries/modular-schema/index.d.ts +1 -0
  68. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  69. package/dist/feature-libraries/modular-schema/index.js +3 -1
  70. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  71. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts +25 -0
  72. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -0
  73. package/dist/feature-libraries/modular-schema/minimizeModularChange.js +29 -0
  74. package/dist/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -0
  75. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  76. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +9 -9
  77. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  78. package/dist/feature-libraries/schemaChecker.d.ts +22 -3
  79. package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
  80. package/dist/feature-libraries/schemaChecker.js +48 -5
  81. package/dist/feature-libraries/schemaChecker.js.map +1 -1
  82. package/dist/index.d.ts +4 -3
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/index.js +6 -2
  85. package/dist/index.js.map +1 -1
  86. package/dist/packageVersion.d.ts +1 -1
  87. package/dist/packageVersion.js +1 -1
  88. package/dist/packageVersion.js.map +1 -1
  89. package/dist/shared-tree/independentView.d.ts +17 -4
  90. package/dist/shared-tree/independentView.d.ts.map +1 -1
  91. package/dist/shared-tree/independentView.js +15 -12
  92. package/dist/shared-tree/independentView.js.map +1 -1
  93. package/dist/shared-tree/index.d.ts +3 -2
  94. package/dist/shared-tree/index.d.ts.map +1 -1
  95. package/dist/shared-tree/index.js +3 -1
  96. package/dist/shared-tree/index.js.map +1 -1
  97. package/dist/shared-tree/schematizingTreeView.d.ts +6 -5
  98. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  99. package/dist/shared-tree/schematizingTreeView.js +6 -3
  100. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  101. package/dist/shared-tree/serializedChange.d.ts +41 -0
  102. package/dist/shared-tree/serializedChange.d.ts.map +1 -0
  103. package/dist/shared-tree/serializedChange.js +87 -0
  104. package/dist/shared-tree/serializedChange.js.map +1 -0
  105. package/dist/shared-tree/sharedTree.d.ts +18 -0
  106. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  107. package/dist/shared-tree/sharedTree.js +9 -4
  108. package/dist/shared-tree/sharedTree.js.map +1 -1
  109. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +7 -0
  110. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  111. package/dist/shared-tree/sharedTreeChangeFamily.js +8 -1
  112. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  113. package/dist/shared-tree/transactionMinimize.d.ts +35 -0
  114. package/dist/shared-tree/transactionMinimize.d.ts.map +1 -0
  115. package/dist/shared-tree/transactionMinimize.js +65 -0
  116. package/dist/shared-tree/transactionMinimize.js.map +1 -0
  117. package/dist/shared-tree/transactionPostProcessor.d.ts +28 -0
  118. package/dist/shared-tree/transactionPostProcessor.d.ts.map +1 -0
  119. package/dist/shared-tree/transactionPostProcessor.js +28 -0
  120. package/dist/shared-tree/transactionPostProcessor.js.map +1 -0
  121. package/dist/shared-tree/treeAlpha.js +3 -3
  122. package/dist/shared-tree/treeAlpha.js.map +1 -1
  123. package/dist/shared-tree/treeCheckout.d.ts +19 -13
  124. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  125. package/dist/shared-tree/treeCheckout.js +54 -71
  126. package/dist/shared-tree/treeCheckout.js.map +1 -1
  127. package/dist/shared-tree/unhydratedTreeContext.d.ts +5 -5
  128. package/dist/shared-tree/unhydratedTreeContext.d.ts.map +1 -1
  129. package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
  130. package/dist/shared-tree-core/editManager.d.ts +6 -3
  131. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  132. package/dist/shared-tree-core/editManager.js +35 -14
  133. package/dist/shared-tree-core/editManager.js.map +1 -1
  134. package/dist/shared-tree-core/editManagerCodecs.d.ts +3 -2
  135. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  136. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  137. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +3 -9
  138. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  139. package/dist/shared-tree-core/editManagerCodecsCommons.js +2 -4
  140. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  141. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +3 -3
  142. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  143. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  144. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +3 -3
  145. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  146. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  147. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +1 -1
  148. package/dist/shared-tree-core/editManagerFormatCommons.js +1 -1
  149. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  150. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  151. package/dist/shared-tree-core/editManagerSummarizer.d.ts +5 -9
  152. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  153. package/dist/shared-tree-core/editManagerSummarizer.js +5 -10
  154. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  155. package/dist/shared-tree-core/index.d.ts +1 -1
  156. package/dist/shared-tree-core/index.d.ts.map +1 -1
  157. package/dist/shared-tree-core/index.js +3 -2
  158. package/dist/shared-tree-core/index.js.map +1 -1
  159. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  160. package/dist/shared-tree-core/messageCodecVSharedBranches.js +8 -2
  161. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  162. package/dist/shared-tree-core/messageFormat.d.ts +1 -1
  163. package/dist/shared-tree-core/messageFormat.js +1 -1
  164. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  165. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +10 -1
  166. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  167. package/dist/shared-tree-core/messageFormatVSharedBranches.js +1 -0
  168. package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  169. package/dist/shared-tree-core/messageTypes.d.ts +1 -0
  170. package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
  171. package/dist/shared-tree-core/messageTypes.js.map +1 -1
  172. package/dist/shared-tree-core/sharedTreeCore.d.ts +9 -3
  173. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  174. package/dist/shared-tree-core/sharedTreeCore.js +27 -12
  175. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  176. package/dist/shared-tree-core/transaction.d.ts +84 -9
  177. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  178. package/dist/shared-tree-core/transaction.js +88 -7
  179. package/dist/shared-tree-core/transaction.js.map +1 -1
  180. package/dist/simple-tree/api/index.d.ts +2 -2
  181. package/dist/simple-tree/api/index.d.ts.map +1 -1
  182. package/dist/simple-tree/api/index.js +2 -2
  183. package/dist/simple-tree/api/index.js.map +1 -1
  184. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +9 -24
  185. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  186. package/dist/simple-tree/api/schemaCompatibilityTester.js +31 -44
  187. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  188. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +3 -3
  189. package/dist/simple-tree/api/schemaCreationUtilities.js +3 -3
  190. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  191. package/dist/simple-tree/api/schemaFactory.d.ts +1 -1
  192. package/dist/simple-tree/api/schemaFactory.js +2 -2
  193. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  194. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +56 -15
  195. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  196. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  197. package/dist/simple-tree/api/schemaFactoryBeta.d.ts +0 -3
  198. package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  199. package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  200. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +2 -2
  201. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  202. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +3 -4
  203. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  204. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  205. package/dist/simple-tree/api/storedSchema.js +1 -2
  206. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  207. package/dist/simple-tree/api/transactionTypes.d.ts +91 -28
  208. package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
  209. package/dist/simple-tree/api/transactionTypes.js.map +1 -1
  210. package/dist/simple-tree/api/tree.d.ts +108 -24
  211. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  212. package/dist/simple-tree/api/tree.js.map +1 -1
  213. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  214. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  215. package/dist/simple-tree/api/typesUnsafe.d.ts +2 -2
  216. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  217. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  218. package/dist/simple-tree/core/treeNodeSchema.d.ts +7 -7
  219. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  220. package/dist/simple-tree/index.d.ts +1 -1
  221. package/dist/simple-tree/index.d.ts.map +1 -1
  222. package/dist/simple-tree/index.js +2 -2
  223. package/dist/simple-tree/index.js.map +1 -1
  224. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +83 -4
  225. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  226. package/dist/simple-tree/node-kinds/array/arrayNode.js +39 -0
  227. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  228. package/dist/simple-tree/simpleSchemaFormatV1.js +1 -1
  229. package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  230. package/dist/text/index.d.ts +1 -0
  231. package/dist/text/index.d.ts.map +1 -1
  232. package/dist/text/index.js +3 -1
  233. package/dist/text/index.js.map +1 -1
  234. package/dist/text/textDomainFormatted.d.ts +69 -758
  235. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  236. package/dist/text/textDomainFormatted.js +275 -322
  237. package/dist/text/textDomainFormatted.js.map +1 -1
  238. package/dist/text/textDomainFormattedDefault.d.ts +273 -0
  239. package/dist/text/textDomainFormattedDefault.d.ts.map +1 -0
  240. package/dist/text/textDomainFormattedDefault.js +94 -0
  241. package/dist/text/textDomainFormattedDefault.js.map +1 -0
  242. package/dist/treeFactory.js +1 -1
  243. package/dist/treeFactory.js.map +1 -1
  244. package/dist/util/breakable.d.ts +16 -1
  245. package/dist/util/breakable.d.ts.map +1 -1
  246. package/dist/util/breakable.js +9 -1
  247. package/dist/util/breakable.js.map +1 -1
  248. package/dist/util/compressedIds.d.ts +185 -0
  249. package/dist/util/compressedIds.d.ts.map +1 -0
  250. package/dist/util/compressedIds.js +164 -0
  251. package/dist/util/compressedIds.js.map +1 -0
  252. package/dist/util/index.d.ts +2 -1
  253. package/dist/util/index.d.ts.map +1 -1
  254. package/dist/util/index.js +10 -2
  255. package/dist/util/index.js.map +1 -1
  256. package/dist/util/nestedMap.d.ts.map +1 -1
  257. package/dist/util/nestedMap.js +16 -3
  258. package/dist/util/nestedMap.js.map +1 -1
  259. package/dist/util/nestedSet.d.ts +1 -1
  260. package/dist/util/nestedSet.d.ts.map +1 -1
  261. package/dist/util/nestedSet.js.map +1 -1
  262. package/dist/util/utils.d.ts +0 -6
  263. package/dist/util/utils.d.ts.map +1 -1
  264. package/dist/util/utils.js +1 -15
  265. package/dist/util/utils.js.map +1 -1
  266. package/lib/componentApi.d.ts +198 -0
  267. package/lib/componentApi.d.ts.map +1 -0
  268. package/lib/componentApi.js +135 -0
  269. package/lib/componentApi.js.map +1 -0
  270. package/lib/core/change-family/changeFamily.d.ts +3 -10
  271. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  272. package/lib/core/change-family/changeFamily.js.map +1 -1
  273. package/lib/core/rebase/types.d.ts +2 -2
  274. package/lib/core/rebase/types.js.map +1 -1
  275. package/lib/core/schema-stored/storedSchemaRepository.d.ts +2 -2
  276. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  277. package/lib/entrypoints/alpha.d.ts +1 -1
  278. package/lib/entrypoints/alpha.d.ts.map +1 -1
  279. package/lib/entrypoints/alpha.js +1 -1
  280. package/lib/entrypoints/alpha.js.map +1 -1
  281. package/lib/entrypoints/beta.d.ts +1 -1
  282. package/lib/entrypoints/beta.d.ts.map +1 -1
  283. package/lib/entrypoints/beta.js.map +1 -1
  284. package/lib/entrypoints/legacy.d.ts +1 -1
  285. package/lib/entrypoints/legacy.d.ts.map +1 -1
  286. package/lib/entrypoints/legacy.js.map +1 -1
  287. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -20
  288. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  289. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +14 -33
  290. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  291. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -2
  292. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  293. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  294. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +73 -28
  295. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  296. package/lib/feature-libraries/chunked-forest/codec/codecs.js +75 -9
  297. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  298. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +4 -2
  299. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  300. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +12 -1
  301. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  302. package/lib/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  303. package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  304. package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
  305. package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  306. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +1 -1
  307. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  308. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js +3 -15
  309. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  310. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
  311. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  312. package/lib/feature-libraries/chunked-forest/index.js +1 -1
  313. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  314. package/lib/feature-libraries/forest-summary/codec.d.ts +3 -3
  315. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  316. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  317. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -2
  318. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  319. package/lib/feature-libraries/forest-summary/forestSummarizer.js +4 -6
  320. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  321. package/lib/feature-libraries/index.d.ts +3 -3
  322. package/lib/feature-libraries/index.d.ts.map +1 -1
  323. package/lib/feature-libraries/index.js +2 -2
  324. package/lib/feature-libraries/index.js.map +1 -1
  325. package/lib/feature-libraries/modular-schema/index.d.ts +1 -0
  326. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  327. package/lib/feature-libraries/modular-schema/index.js +1 -0
  328. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  329. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts +25 -0
  330. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -0
  331. package/lib/feature-libraries/modular-schema/minimizeModularChange.js +25 -0
  332. package/lib/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -0
  333. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  334. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +10 -10
  335. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  336. package/lib/feature-libraries/schemaChecker.d.ts +22 -3
  337. package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
  338. package/lib/feature-libraries/schemaChecker.js +48 -5
  339. package/lib/feature-libraries/schemaChecker.js.map +1 -1
  340. package/lib/index.d.ts +4 -3
  341. package/lib/index.d.ts.map +1 -1
  342. package/lib/index.js +3 -2
  343. package/lib/index.js.map +1 -1
  344. package/lib/packageVersion.d.ts +1 -1
  345. package/lib/packageVersion.js +1 -1
  346. package/lib/packageVersion.js.map +1 -1
  347. package/lib/shared-tree/independentView.d.ts +17 -4
  348. package/lib/shared-tree/independentView.d.ts.map +1 -1
  349. package/lib/shared-tree/independentView.js +13 -10
  350. package/lib/shared-tree/independentView.js.map +1 -1
  351. package/lib/shared-tree/index.d.ts +3 -2
  352. package/lib/shared-tree/index.d.ts.map +1 -1
  353. package/lib/shared-tree/index.js +1 -0
  354. package/lib/shared-tree/index.js.map +1 -1
  355. package/lib/shared-tree/schematizingTreeView.d.ts +6 -5
  356. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  357. package/lib/shared-tree/schematizingTreeView.js +7 -4
  358. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  359. package/lib/shared-tree/serializedChange.d.ts +41 -0
  360. package/lib/shared-tree/serializedChange.d.ts.map +1 -0
  361. package/lib/shared-tree/serializedChange.js +84 -0
  362. package/lib/shared-tree/serializedChange.js.map +1 -0
  363. package/lib/shared-tree/sharedTree.d.ts +18 -0
  364. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  365. package/lib/shared-tree/sharedTree.js +10 -5
  366. package/lib/shared-tree/sharedTree.js.map +1 -1
  367. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +7 -0
  368. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  369. package/lib/shared-tree/sharedTreeChangeFamily.js +7 -1
  370. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  371. package/lib/shared-tree/transactionMinimize.d.ts +35 -0
  372. package/lib/shared-tree/transactionMinimize.d.ts.map +1 -0
  373. package/lib/shared-tree/transactionMinimize.js +62 -0
  374. package/lib/shared-tree/transactionMinimize.js.map +1 -0
  375. package/lib/shared-tree/transactionPostProcessor.d.ts +28 -0
  376. package/lib/shared-tree/transactionPostProcessor.d.ts.map +1 -0
  377. package/lib/shared-tree/transactionPostProcessor.js +23 -0
  378. package/lib/shared-tree/transactionPostProcessor.js.map +1 -0
  379. package/lib/shared-tree/treeAlpha.js +3 -3
  380. package/lib/shared-tree/treeAlpha.js.map +1 -1
  381. package/lib/shared-tree/treeCheckout.d.ts +19 -13
  382. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  383. package/lib/shared-tree/treeCheckout.js +36 -53
  384. package/lib/shared-tree/treeCheckout.js.map +1 -1
  385. package/lib/shared-tree/unhydratedTreeContext.d.ts +5 -5
  386. package/lib/shared-tree/unhydratedTreeContext.d.ts.map +1 -1
  387. package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
  388. package/lib/shared-tree-core/editManager.d.ts +6 -3
  389. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  390. package/lib/shared-tree-core/editManager.js +36 -15
  391. package/lib/shared-tree-core/editManager.js.map +1 -1
  392. package/lib/shared-tree-core/editManagerCodecs.d.ts +3 -2
  393. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  394. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  395. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +3 -9
  396. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  397. package/lib/shared-tree-core/editManagerCodecsCommons.js +3 -5
  398. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  399. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +3 -3
  400. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  401. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  402. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +3 -3
  403. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  404. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  405. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +1 -1
  406. package/lib/shared-tree-core/editManagerFormatCommons.js +1 -1
  407. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  408. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  409. package/lib/shared-tree-core/editManagerSummarizer.d.ts +5 -9
  410. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  411. package/lib/shared-tree-core/editManagerSummarizer.js +5 -10
  412. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  413. package/lib/shared-tree-core/index.d.ts +1 -1
  414. package/lib/shared-tree-core/index.d.ts.map +1 -1
  415. package/lib/shared-tree-core/index.js +1 -1
  416. package/lib/shared-tree-core/index.js.map +1 -1
  417. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  418. package/lib/shared-tree-core/messageCodecVSharedBranches.js +8 -2
  419. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  420. package/lib/shared-tree-core/messageFormat.d.ts +1 -1
  421. package/lib/shared-tree-core/messageFormat.js +1 -1
  422. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  423. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +10 -1
  424. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  425. package/lib/shared-tree-core/messageFormatVSharedBranches.js +1 -0
  426. package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  427. package/lib/shared-tree-core/messageTypes.d.ts +1 -0
  428. package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
  429. package/lib/shared-tree-core/messageTypes.js.map +1 -1
  430. package/lib/shared-tree-core/sharedTreeCore.d.ts +9 -3
  431. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  432. package/lib/shared-tree-core/sharedTreeCore.js +28 -13
  433. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  434. package/lib/shared-tree-core/transaction.d.ts +84 -9
  435. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  436. package/lib/shared-tree-core/transaction.js +87 -6
  437. package/lib/shared-tree-core/transaction.js.map +1 -1
  438. package/lib/simple-tree/api/index.d.ts +2 -2
  439. package/lib/simple-tree/api/index.d.ts.map +1 -1
  440. package/lib/simple-tree/api/index.js +1 -1
  441. package/lib/simple-tree/api/index.js.map +1 -1
  442. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +9 -24
  443. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  444. package/lib/simple-tree/api/schemaCompatibilityTester.js +29 -42
  445. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  446. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +3 -3
  447. package/lib/simple-tree/api/schemaCreationUtilities.js +3 -3
  448. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  449. package/lib/simple-tree/api/schemaFactory.d.ts +1 -1
  450. package/lib/simple-tree/api/schemaFactory.js +2 -2
  451. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  452. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +56 -15
  453. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  454. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  455. package/lib/simple-tree/api/schemaFactoryBeta.d.ts +0 -3
  456. package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  457. package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  458. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +2 -2
  459. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  460. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +4 -5
  461. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  462. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  463. package/lib/simple-tree/api/storedSchema.js +2 -3
  464. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  465. package/lib/simple-tree/api/transactionTypes.d.ts +91 -28
  466. package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
  467. package/lib/simple-tree/api/transactionTypes.js.map +1 -1
  468. package/lib/simple-tree/api/tree.d.ts +108 -24
  469. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  470. package/lib/simple-tree/api/tree.js.map +1 -1
  471. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  472. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  473. package/lib/simple-tree/api/typesUnsafe.d.ts +2 -2
  474. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  475. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  476. package/lib/simple-tree/core/treeNodeSchema.d.ts +7 -7
  477. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  478. package/lib/simple-tree/index.d.ts +1 -1
  479. package/lib/simple-tree/index.d.ts.map +1 -1
  480. package/lib/simple-tree/index.js +1 -1
  481. package/lib/simple-tree/index.js.map +1 -1
  482. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +83 -4
  483. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  484. package/lib/simple-tree/node-kinds/array/arrayNode.js +39 -0
  485. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  486. package/lib/simple-tree/simpleSchemaFormatV1.js +1 -1
  487. package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  488. package/lib/text/index.d.ts +1 -0
  489. package/lib/text/index.d.ts.map +1 -1
  490. package/lib/text/index.js +1 -0
  491. package/lib/text/index.js.map +1 -1
  492. package/lib/text/textDomainFormatted.d.ts +69 -758
  493. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  494. package/lib/text/textDomainFormatted.js +277 -324
  495. package/lib/text/textDomainFormatted.js.map +1 -1
  496. package/lib/text/textDomainFormattedDefault.d.ts +273 -0
  497. package/lib/text/textDomainFormattedDefault.d.ts.map +1 -0
  498. package/lib/text/textDomainFormattedDefault.js +91 -0
  499. package/lib/text/textDomainFormattedDefault.js.map +1 -0
  500. package/lib/treeFactory.js +1 -1
  501. package/lib/treeFactory.js.map +1 -1
  502. package/lib/util/breakable.d.ts +16 -1
  503. package/lib/util/breakable.d.ts.map +1 -1
  504. package/lib/util/breakable.js +9 -1
  505. package/lib/util/breakable.js.map +1 -1
  506. package/lib/util/compressedIds.d.ts +185 -0
  507. package/lib/util/compressedIds.d.ts.map +1 -0
  508. package/lib/util/compressedIds.js +154 -0
  509. package/lib/util/compressedIds.js.map +1 -0
  510. package/lib/util/index.d.ts +2 -1
  511. package/lib/util/index.d.ts.map +1 -1
  512. package/lib/util/index.js +2 -1
  513. package/lib/util/index.js.map +1 -1
  514. package/lib/util/nestedMap.d.ts.map +1 -1
  515. package/lib/util/nestedMap.js +17 -4
  516. package/lib/util/nestedMap.js.map +1 -1
  517. package/lib/util/nestedSet.d.ts +1 -1
  518. package/lib/util/nestedSet.d.ts.map +1 -1
  519. package/lib/util/nestedSet.js.map +1 -1
  520. package/lib/util/utils.d.ts +0 -6
  521. package/lib/util/utils.d.ts.map +1 -1
  522. package/lib/util/utils.js +0 -13
  523. package/lib/util/utils.js.map +1 -1
  524. package/package.json +23 -23
  525. package/src/componentApi.ts +354 -0
  526. package/src/core/change-family/changeFamily.ts +3 -12
  527. package/src/core/rebase/types.ts +2 -2
  528. package/src/core/schema-stored/storedSchemaRepository.ts +2 -2
  529. package/src/entrypoints/alpha.ts +15 -8
  530. package/src/entrypoints/beta.ts +8 -0
  531. package/src/entrypoints/legacy.ts +8 -0
  532. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +22 -72
  533. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -2
  534. package/src/feature-libraries/chunked-forest/codec/codecs.ts +110 -41
  535. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +32 -4
  536. package/src/feature-libraries/chunked-forest/codec/index.ts +1 -0
  537. package/src/feature-libraries/chunked-forest/codec/nodeEncoder.ts +7 -19
  538. package/src/feature-libraries/chunked-forest/index.ts +3 -0
  539. package/src/feature-libraries/forest-summary/codec.ts +5 -3
  540. package/src/feature-libraries/forest-summary/forestSummarizer.ts +4 -5
  541. package/src/feature-libraries/index.ts +5 -0
  542. package/src/feature-libraries/modular-schema/index.ts +1 -0
  543. package/src/feature-libraries/modular-schema/minimizeModularChange.ts +33 -0
  544. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +13 -9
  545. package/src/feature-libraries/schemaChecker.ts +86 -9
  546. package/src/index.ts +16 -8
  547. package/src/packageVersion.ts +1 -1
  548. package/src/shared-tree/independentView.ts +40 -15
  549. package/src/shared-tree/index.ts +4 -0
  550. package/src/shared-tree/schematizingTreeView.ts +40 -30
  551. package/src/shared-tree/serializedChange.ts +127 -0
  552. package/src/shared-tree/sharedTree.ts +32 -4
  553. package/src/shared-tree/sharedTreeChangeFamily.ts +7 -1
  554. package/src/shared-tree/transactionMinimize.ts +74 -0
  555. package/src/shared-tree/transactionPostProcessor.ts +40 -0
  556. package/src/shared-tree/treeAlpha.ts +3 -3
  557. package/src/shared-tree/treeCheckout.ts +103 -101
  558. package/src/shared-tree/unhydratedTreeContext.ts +18 -15
  559. package/src/shared-tree-core/editManager.ts +42 -6
  560. package/src/shared-tree-core/editManagerCodecs.ts +3 -2
  561. package/src/shared-tree-core/editManagerCodecsCommons.ts +10 -14
  562. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +3 -2
  563. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +3 -2
  564. package/src/shared-tree-core/editManagerFormatCommons.ts +1 -1
  565. package/src/shared-tree-core/editManagerSummarizer.ts +5 -9
  566. package/src/shared-tree-core/index.ts +8 -5
  567. package/src/shared-tree-core/messageCodecVSharedBranches.ts +8 -1
  568. package/src/shared-tree-core/messageFormat.ts +1 -1
  569. package/src/shared-tree-core/messageFormatVSharedBranches.ts +10 -0
  570. package/src/shared-tree-core/messageTypes.ts +1 -0
  571. package/src/shared-tree-core/sharedTreeCore.ts +36 -12
  572. package/src/shared-tree-core/transaction.ts +165 -18
  573. package/src/simple-tree/api/index.ts +14 -10
  574. package/src/simple-tree/api/schemaCompatibilityTester.ts +36 -48
  575. package/src/simple-tree/api/schemaCreationUtilities.ts +3 -3
  576. package/src/simple-tree/api/schemaFactory.ts +2 -2
  577. package/src/simple-tree/api/schemaFactoryAlpha.ts +56 -15
  578. package/src/simple-tree/api/schemaFactoryBeta.ts +0 -3
  579. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +4 -5
  580. package/src/simple-tree/api/storedSchema.ts +2 -3
  581. package/src/simple-tree/api/transactionTypes.ts +111 -39
  582. package/src/simple-tree/api/tree.ts +165 -49
  583. package/src/simple-tree/api/treeBeta.ts +2 -0
  584. package/src/simple-tree/api/typesUnsafe.ts +2 -1
  585. package/src/simple-tree/core/treeNodeSchema.ts +7 -7
  586. package/src/simple-tree/index.ts +13 -9
  587. package/src/simple-tree/node-kinds/array/arrayNode.ts +168 -4
  588. package/src/simple-tree/simpleSchemaFormatV1.ts +1 -1
  589. package/src/text/index.ts +1 -0
  590. package/src/text/textDomainFormatted.ts +520 -415
  591. package/src/text/textDomainFormattedDefault.ts +150 -0
  592. package/src/treeFactory.ts +1 -1
  593. package/src/util/breakable.ts +8 -1
  594. package/src/util/compressedIds.ts +304 -0
  595. package/src/util/index.ts +18 -1
  596. package/src/util/nestedMap.ts +21 -4
  597. package/src/util/nestedSet.ts +1 -1
  598. package/src/util/utils.ts +0 -18
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerCodecsCommons.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsCommons.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAU7D,+CAA0F;AAE1F,yDAAoE;AA6BpE,4EAA4E;AAC5E,SAAS,YAAY,CACpB,WAKC,EACD,gBAKC,EACD,MAAS,EACT,OAA8B;IAE9B,OAAO;QACN,GAAG,MAAM;QACT,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE;YAClD,YAAY,EAAE,MAAM,CAAC,SAAS;YAC9B,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,QAAQ,EAAE,SAAS;Y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,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE;YAC9C,YAAY;YACZ,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,OAAO,CAAC,SAAS;SAC5B,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AA5FD,gDA4FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\n\nimport type { IJsonCodec } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport { mapIterable, type JsonCompatibleReadOnly, type Mutable } from \"../util/index.js\";\n\nimport { decodeBranchId, encodeBranchId } from \"./branchIdCodec.js\";\nimport type { SharedBranchSummaryData } from \"./editManager.js\";\nimport type {\n\tCommit,\n\tEncodedCommit,\n\tEncodedSharedBranch,\n\tSequenceId,\n\tSequencedCommit,\n} from \"./editManagerFormatCommons.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n\t/**\n\t * See {@link ChangeEncodingContext.isSummary}. EditManager codec callers\n\t * always set this to `true` (the codec is only invoked for summaries),\n\t * but it is carried explicitly so downstream codecs can read it.\n\t */\n\treadonly isSummary: boolean;\n\t/**\n\t * See {@link ChangeEncodingContext.healUnresolvableIdentifiersOnDecode}.\n\t */\n\treadonly healUnresolvableIdentifiersOnDecode?: boolean;\n\t/**\n\t * See {@link ChangeEncodingContext.sharedObjectId}.\n\t */\n\treadonly sharedObjectId?: string;\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction encodeCommit<TChangeset, T extends Commit<TChangeset>>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tcommit: T,\n\tcontext: ChangeEncodingContext,\n) {\n\treturn {\n\t\t...commit,\n\t\trevision: revisionTagCodec.encode(commit.revision, {\n\t\t\toriginatorId: commit.sessionId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t\tisSummary: context.isSummary,\n\t\t}),\n\t\tchange: changeCodec.encode(commit.change, { ...context, revision: commit.revision }),\n\t};\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction decodeCommit<TChangeset, T extends EncodedCommit<JsonCompatibleReadOnly>>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tcommit: T,\n\tcontext: ChangeEncodingContext,\n) {\n\tconst revision = revisionTagCodec.decode(commit.revision, {\n\t\toriginatorId: commit.sessionId,\n\t\tidCompressor: context.idCompressor,\n\t\trevision: undefined,\n\t\tisSummary: context.isSummary,\n\t});\n\n\treturn {\n\t\t...commit,\n\t\trevision,\n\t\tchange: changeCodec.decode(commit.change, { ...context, revision }),\n\t};\n}\n\nexport function encodeSharedBranch<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tdata: SharedBranchSummaryData<TChangeset>,\n\tcontext: EditManagerEncodingContext,\n\toriginatorId: SessionId | undefined,\n): EncodedSharedBranch<TChangeset> {\n\tconst json: Mutable<EncodedSharedBranch<TChangeset>> = {\n\t\ttrunk: data.trunk.map((commit) =>\n\t\t\tencodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\tschema: context.schema,\n\t\t\t\trevision: undefined,\n\t\t\t\tisSummary: context.isSummary,\n\t\t\t}),\n\t\t),\n\t\tpeers: Array.from(data.peerLocalBranches.entries(), ([sessionId, branch]) => [\n\t\t\tsessionId,\n\t\t\t{\n\t\t\t\tbase: revisionTagCodec.encode(branch.base, {\n\t\t\t\t\toriginatorId: sessionId,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t\tisSummary: context.isSummary,\n\t\t\t\t}),\n\t\t\t\tcommits: branch.commits.map((commit) =>\n\t\t\t\t\tencodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t\tisSummary: context.isSummary,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t},\n\t\t]),\n\t};\n\tif (data.session !== undefined) {\n\t\tjson.session = data.session;\n\t}\n\tif (data.id !== undefined) {\n\t\tjson.id = encodeBranchId(context.idCompressor, data.id);\n\t}\n\tif (data.name !== undefined) {\n\t\tjson.name = data.name;\n\t}\n\tif (data.author !== undefined) {\n\t\tjson.author = data.author;\n\t}\n\tif (data.base !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc62 /* Cannot encode branch base without originatorId */,\n\t\t);\n\t\tjson.base = revisionTagCodec.encode(data.base, {\n\t\t\toriginatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t\tisSummary: context.isSummary,\n\t\t});\n\t}\n\treturn json;\n}\n\nexport function decodeSharedBranch<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tjson: EncodedSharedBranch<TChangeset>,\n\tcontext: EditManagerEncodingContext,\n\toriginatorId: SessionId | undefined,\n): SharedBranchSummaryData<TChangeset> {\n\t// TODO: sort out EncodedCommit vs Commit, and make this type check without type assertion.\n\tconst trunk = json.trunk as readonly (EncodedCommit<JsonCompatibleReadOnly> & SequenceId)[];\n\tconst data: Mutable<SharedBranchSummaryData<TChangeset>> = {\n\t\ttrunk: trunk.map(\n\t\t\t(commit): SequencedCommit<TChangeset> =>\n\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.\n\t\t\t\tdecodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t\tisSummary: context.isSummary,\n\t\t\t\t\thealUnresolvableIdentifiersOnDecode: context.healUnresolvableIdentifiersOnDecode,\n\t\t\t\t\tsharedObjectId: context.sharedObjectId,\n\t\t\t\t}),\n\t\t),\n\t\tpeerLocalBranches: new Map(\n\t\t\tmapIterable(json.peers, ([sessionId, branch]) => [\n\t\t\t\tsessionId,\n\t\t\t\t{\n\t\t\t\t\tbase: revisionTagCodec.decode(branch.base, {\n\t\t\t\t\t\toriginatorId: sessionId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t\tisSummary: context.isSummary,\n\t\t\t\t\t}),\n\t\t\t\t\tcommits: branch.commits.map((commit) =>\n\t\t\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.\n\t\t\t\t\t\tdecodeCommit(\n\t\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\tcommit as EncodedCommit<JsonCompatibleReadOnly>,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\toriginatorId: commit.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\tisSummary: context.isSummary,\n\t\t\t\t\t\t\t\thealUnresolvableIdentifiersOnDecode:\n\t\t\t\t\t\t\t\t\tcontext.healUnresolvableIdentifiersOnDecode,\n\t\t\t\t\t\t\t\tsharedObjectId: context.sharedObjectId,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t]),\n\t\t),\n\t};\n\tif (json.session !== undefined) {\n\t\tdata.session = json.session;\n\t}\n\tif (json.name !== undefined) {\n\t\tdata.name = json.name;\n\t}\n\tif (json.author !== undefined) {\n\t\tdata.author = json.author;\n\t}\n\tif (json.id !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc63 /* Cannot decode branch id without originatorId */,\n\t\t);\n\t\tdata.id = decodeBranchId(context.idCompressor, json.id, { originatorId });\n\t}\n\tif (json.base !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc64 /* Cannot decode branch base without originatorId */,\n\t\t);\n\t\tdata.base = revisionTagCodec.decode(json.base, {\n\t\t\toriginatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t\tisSummary: context.isSummary,\n\t\t});\n\t}\n\treturn data;\n}\n"]}
1
+ {"version":3,"file":"editManagerCodecsCommons.js","sourceRoot":"","sources":["../../src/shared-tree-core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AAG,IAAA,iCAAc,EAAC,OAAO,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC;IAC3E,CAAC;IACD,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAA,iBAAM,EACL,YAAY,KAAK,SAAS,EAC1B,KAAK,CAAC,oDAAoD,CAC1D,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE;YAC9C,YAAY;YACZ,YAAY,EAAE,OAAO,CAAC,YAAY;YAClC,QAAQ,EAAE,SAAS;YACnB,SAAS,EAAE,OAAO,CAAC,SAAS;SAC5B,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAzFD,gDAyFC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\n\nimport type { IJsonCodec } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport {\n\tmapIterable,\n\ttype IdentifierHealingConfig,\n\ttype JsonCompatibleReadOnly,\n\ttype Mutable,\n} from \"../util/index.js\";\n\nimport { decodeBranchId, encodeBranchId } from \"./branchIdCodec.js\";\nimport type { SharedBranchSummaryData } from \"./editManager.js\";\nimport type {\n\tCommit,\n\tEncodedCommit,\n\tEncodedSharedBranch,\n\tSequenceId,\n\tSequencedCommit,\n} from \"./editManagerFormatCommons.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n\t/**\n\t * See {@link ChangeEncodingContext.isSummary}. EditManager codec callers\n\t * always set this to `true` (the codec is only invoked for summaries),\n\t * but it is carried explicitly so downstream codecs can read it.\n\t */\n\treadonly isSummary: boolean;\n\t/** See {@link IdentifierHealingConfig}. */\n\treadonly healing?: IdentifierHealingConfig;\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction encodeCommit<TChangeset, T extends Commit<TChangeset>>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tcommit: T,\n\tcontext: ChangeEncodingContext,\n) {\n\treturn {\n\t\t...commit,\n\t\trevision: revisionTagCodec.encode(commit.revision, {\n\t\t\toriginatorId: commit.sessionId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t\tisSummary: context.isSummary,\n\t\t}),\n\t\tchange: changeCodec.encode(commit.change, { ...context, revision: commit.revision }),\n\t};\n}\n\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nfunction decodeCommit<TChangeset, T extends EncodedCommit<JsonCompatibleReadOnly>>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tcommit: T,\n\tcontext: ChangeEncodingContext,\n) {\n\tconst revision = revisionTagCodec.decode(commit.revision, {\n\t\toriginatorId: commit.sessionId,\n\t\tidCompressor: context.idCompressor,\n\t\trevision: undefined,\n\t\tisSummary: context.isSummary,\n\t});\n\n\treturn {\n\t\t...commit,\n\t\trevision,\n\t\tchange: changeCodec.decode(commit.change, { ...context, revision }),\n\t};\n}\n\nexport function encodeSharedBranch<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tdata: SharedBranchSummaryData<TChangeset>,\n\tcontext: EditManagerEncodingContext,\n\toriginatorId: SessionId | undefined,\n): EncodedSharedBranch<TChangeset> {\n\tconst json: Mutable<EncodedSharedBranch<TChangeset>> = {\n\t\ttrunk: data.trunk.map((commit) =>\n\t\t\tencodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\tschema: context.schema,\n\t\t\t\trevision: undefined,\n\t\t\t\tisSummary: context.isSummary,\n\t\t\t}),\n\t\t),\n\t\tpeers: Array.from(data.peerLocalBranches.entries(), ([sessionId, branch]) => [\n\t\t\tsessionId,\n\t\t\t{\n\t\t\t\tbase: revisionTagCodec.encode(branch.base, {\n\t\t\t\t\toriginatorId: sessionId,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t\tisSummary: context.isSummary,\n\t\t\t\t}),\n\t\t\t\tcommits: branch.commits.map((commit) =>\n\t\t\t\t\tencodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\tschema: context.schema,\n\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t\tisSummary: context.isSummary,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t},\n\t\t]),\n\t};\n\tif (data.session !== undefined) {\n\t\tjson.session = data.session;\n\t}\n\tif (data.id !== undefined) {\n\t\tjson.id = encodeBranchId(context.idCompressor, data.id);\n\t}\n\tif (data.name !== undefined) {\n\t\tjson.name = data.name;\n\t}\n\tif (data.author !== undefined) {\n\t\tjson.author = data.author;\n\t}\n\tif (data.base !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc62 /* Cannot encode branch base without originatorId */,\n\t\t);\n\t\tjson.base = revisionTagCodec.encode(data.base, {\n\t\t\toriginatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t\tisSummary: context.isSummary,\n\t\t});\n\t}\n\treturn json;\n}\n\nexport function decodeSharedBranch<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tjson: EncodedSharedBranch<TChangeset>,\n\tcontext: EditManagerEncodingContext,\n\toriginatorId: SessionId | undefined,\n): SharedBranchSummaryData<TChangeset> {\n\t// TODO: sort out EncodedCommit vs Commit, and make this type check without type assertion.\n\tconst trunk = json.trunk as readonly (EncodedCommit<JsonCompatibleReadOnly> & SequenceId)[];\n\tconst data: Mutable<SharedBranchSummaryData<TChangeset>> = {\n\t\ttrunk: trunk.map(\n\t\t\t(commit): SequencedCommit<TChangeset> =>\n\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.\n\t\t\t\tdecodeCommit(changeCodec, revisionTagCodec, commit, {\n\t\t\t\t\toriginatorId: commit.sessionId,\n\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\trevision: undefined,\n\t\t\t\t\tisSummary: context.isSummary,\n\t\t\t\t\thealing: context.healing,\n\t\t\t\t}),\n\t\t),\n\t\tpeerLocalBranches: new Map(\n\t\t\tmapIterable(json.peers, ([sessionId, branch]) => [\n\t\t\t\tsessionId,\n\t\t\t\t{\n\t\t\t\t\tbase: revisionTagCodec.decode(branch.base, {\n\t\t\t\t\t\toriginatorId: sessionId,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t\tisSummary: context.isSummary,\n\t\t\t\t\t}),\n\t\t\t\t\tcommits: branch.commits.map((commit) =>\n\t\t\t\t\t\t// TODO: sort out EncodedCommit vs Commit, and make this type check without `as`.\n\t\t\t\t\t\tdecodeCommit(\n\t\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\tcommit as EncodedCommit<JsonCompatibleReadOnly>,\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\toriginatorId: commit.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\tisSummary: context.isSummary,\n\t\t\t\t\t\t\t\thealing: context.healing,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t},\n\t\t\t]),\n\t\t),\n\t};\n\tif (json.session !== undefined) {\n\t\tdata.session = json.session;\n\t}\n\tif (json.name !== undefined) {\n\t\tdata.name = json.name;\n\t}\n\tif (json.author !== undefined) {\n\t\tdata.author = json.author;\n\t}\n\tif (json.id !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc63 /* Cannot decode branch id without originatorId */,\n\t\t);\n\t\tdata.id = decodeBranchId(context.idCompressor, json.id, { originatorId });\n\t}\n\tif (json.base !== undefined) {\n\t\tassert(\n\t\t\toriginatorId !== undefined,\n\t\t\t0xc64 /* Cannot decode branch base without originatorId */,\n\t\t);\n\t\tdata.base = revisionTagCodec.decode(json.base, {\n\t\t\toriginatorId,\n\t\t\tidCompressor: context.idCompressor,\n\t\t\trevision: undefined,\n\t\t\tisSummary: context.isSummary,\n\t\t});\n\t}\n\treturn data;\n}\n"]}
@@ -5,15 +5,15 @@
5
5
  import type { IIdCompressor } from "@fluidframework/id-compressor";
6
6
  import type { CodecAndSchema, IJsonCodec } from "../codec/index.js";
7
7
  import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag, SchemaAndPolicy } from "../core/index.js";
8
- import { type JsonCompatibleReadOnly } from "../util/index.js";
8
+ import { type IdentifierHealingConfig, type JsonCompatibleReadOnly } from "../util/index.js";
9
9
  import type { SummaryData } from "./editManager.js";
10
10
  import { EncodedEditManager } from "./editManagerFormatV1toV4.js";
11
11
  export interface EditManagerEncodingContext {
12
12
  idCompressor: IIdCompressor;
13
13
  readonly schema?: SchemaAndPolicy;
14
14
  readonly isSummary: boolean;
15
- readonly healUnresolvableIdentifiersOnDecode?: boolean;
16
- readonly sharedObjectId?: string;
15
+ /** See {@link IdentifierHealingConfig}. */
16
+ readonly healing?: IdentifierHealingConfig;
17
17
  }
18
18
  /**
19
19
  * Create the provided version of the {@link EditManager} codec (which encodes it's {@link SummaryData}).
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerCodecsV1toV4.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsV1toV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAa,MAAM,mBAAmB,CAAC;AAC/E,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,KAAK,sBAAsB,EAG3B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,MAAM,WAAW,0BAA0B;IAC1C,YAAY,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;I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AO,CAAC,EAAE,uBAAuB,CAAC;CAC3C;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAAC,UAAU,EACzD,WAAW,EAAE,UAAU,CACtB,UAAU,EACV,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,CACrB,EACD,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,GAChD,cAAc,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAC,CA4CrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerCodecsV1toV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsV1toV4.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAWH,+CAI0B;AAG1B,+EAAuF;AACvF,6EAAkE;AAUlE;;;;;;;GAOG;AACH,SAAgB,+BAA+B,CAC9C,WAKC,EACD,gBAKC,EACD,OAAkD;IAElD,MAAM,MAAM,GAAG,IAAA,+CAAkB,EAAC,WAAW,CAAC,aAAa,IAAI,uCAA4B,CAAC,CAAC;IAE7F,MAAM,KAAK,GAAwE;QAClF,MAAM;QACN,MAAM,EAAE,CACP,IAA6B,EAC7B,OAAmC,EACyC,EAAE;YAC9E,MAAM,UAAU,GAAG,IAAA,gDAAkB,EACpC,WAAW,EACX,gBAAgB,EAChB,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CAAC;YACF,MAAM,OAAO,GAAmC;gBAC/C,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,QAAQ,EAAE,UAAU,CAAC,KAAK;gBAC1B,OAAO;aACP,CAAC;YACF,OAAO,OAEsB,CAAC;QAC/B,CAAC;QACD,MAAM,EAAE,CACP,IAA6D,EAC7D,OAAmC,EACT,EAAE;YAC5B,OAAO;gBACN,IAAI,EAAE,IAAA,gDAAkB,EACvB,WAAW,EACX,gBAAgB,EAChB;oBACC,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,KAAK,EAAE,IAAI,CAAC,QAAQ;iBACpB,EACD,OAAO,EACP,SAAS,CACT;aACD,CAAC;QACH,CAAC;KACD,CAAC;IACF,OAAO,KAAK,CAAC;AACd,CAAC;AA1DD,0EA0DC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecAndSchema, IJsonCodec, Versioned } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport {\n\ttype JsonCompatibleReadOnly,\n\ttype JsonCompatibleReadOnlyObject,\n\tJsonCompatibleReadOnlySchema,\n} from \"../util/index.js\";\n\nimport type { SummaryData } from \"./editManager.js\";\nimport { decodeSharedBranch, encodeSharedBranch } from \"./editManagerCodecsCommons.js\";\nimport { EncodedEditManager } from \"./editManagerFormatV1toV4.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n\treadonly isSummary: boolean;\n\treadonly healUnresolvableIdentifiersOnDecode?: boolean;\n\treadonly sharedObjectId?: string;\n}\n\n/**\n * Create the provided version of the {@link EditManager} codec (which encodes it's {@link SummaryData}).\n * @remarks\n * The changeCodec and revisionTagCodec are not explicitly versioned, so the exact right version of them must be provided here\n * or data will be incompatible.\n *\n * TODO: this file should be renamed as this is used for v6 as well.\n */\nexport function makeV1toV4andV6CodecWithVersion<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tversion: EncodedEditManager<TChangeset>[\"version\"],\n): CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> {\n\tconst schema = EncodedEditManager(changeCodec.encodedSchema ?? JsonCompatibleReadOnlySchema);\n\n\tconst codec: CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> = {\n\t\tschema,\n\t\tencode: (\n\t\t\tdata: SummaryData<TChangeset>,\n\t\t\tcontext: EditManagerEncodingContext,\n\t\t): EncodedEditManager<TChangeset> & Versioned & JsonCompatibleReadOnlyObject => {\n\t\t\tconst mainBranch = encodeSharedBranch(\n\t\t\t\tchangeCodec,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tdata.main,\n\t\t\t\tcontext,\n\t\t\t\tdata.originator,\n\t\t\t);\n\t\t\tconst encoded: EncodedEditManager<TChangeset> = {\n\t\t\t\ttrunk: mainBranch.trunk,\n\t\t\t\tbranches: mainBranch.peers,\n\t\t\t\tversion,\n\t\t\t};\n\t\t\treturn encoded as EncodedEditManager<TChangeset> &\n\t\t\t\tVersioned &\n\t\t\t\tJsonCompatibleReadOnlyObject;\n\t\t},\n\t\tdecode: (\n\t\t\tjson: EncodedEditManager<TChangeset> & JsonCompatibleReadOnly,\n\t\t\tcontext: EditManagerEncodingContext,\n\t\t): SummaryData<TChangeset> => {\n\t\t\treturn {\n\t\t\t\tmain: decodeSharedBranch(\n\t\t\t\t\tchangeCodec,\n\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t{\n\t\t\t\t\t\ttrunk: json.trunk,\n\t\t\t\t\t\tpeers: json.branches,\n\t\t\t\t\t},\n\t\t\t\t\tcontext,\n\t\t\t\t\tundefined, // Non \"vSharedBranches\" versions do not encode the summary originatorId.\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t};\n\treturn codec;\n}\n"]}
1
+ {"version":3,"file":"editManagerCodecsV1toV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsV1toV4.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAWH,+CAK0B;AAG1B,+EAAuF;AACvF,6EAAkE;AAUlE;;;;;;;GAOG;AACH,SAAgB,+BAA+B,CAC9C,WAKC,EACD,gBAKC,EACD,OAAkD;IAElD,MAAM,MAAM,GAAG,IAAA,+CAAkB,EAAC,WAAW,CAAC,aAAa,IAAI,uCAA4B,CAAC,CAAC;IAE7F,MAAM,KAAK,GAAwE;QAClF,MAAM;QACN,MAAM,EAAE,CACP,IAA6B,EAC7B,OAAmC,EACyC,EAAE;YAC9E,MAAM,UAAU,GAAG,IAAA,gDAAkB,EACpC,WAAW,EACX,gBAAgB,EAChB,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CAAC;YACF,MAAM,OAAO,GAAmC;gBAC/C,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,QAAQ,EAAE,UAAU,CAAC,KAAK;gBAC1B,OAAO;aACP,CAAC;YACF,OAAO,OAEsB,CAAC;QAC/B,CAAC;QACD,MAAM,EAAE,CACP,IAA6D,EAC7D,OAAmC,EACT,EAAE;YAC5B,OAAO;gBACN,IAAI,EAAE,IAAA,gDAAkB,EACvB,WAAW,EACX,gBAAgB,EAChB;oBACC,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,KAAK,EAAE,IAAI,CAAC,QAAQ;iBACpB,EACD,OAAO,EACP,SAAS,CACT;aACD,CAAC;QACH,CAAC;KACD,CAAC;IACF,OAAO,KAAK,CAAC;AACd,CAAC;AA1DD,0EA0DC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecAndSchema, IJsonCodec, Versioned } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport {\n\ttype IdentifierHealingConfig,\n\ttype JsonCompatibleReadOnly,\n\ttype JsonCompatibleReadOnlyObject,\n\tJsonCompatibleReadOnlySchema,\n} from \"../util/index.js\";\n\nimport type { SummaryData } from \"./editManager.js\";\nimport { decodeSharedBranch, encodeSharedBranch } from \"./editManagerCodecsCommons.js\";\nimport { EncodedEditManager } from \"./editManagerFormatV1toV4.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n\treadonly isSummary: boolean;\n\t/** See {@link IdentifierHealingConfig}. */\n\treadonly healing?: IdentifierHealingConfig;\n}\n\n/**\n * Create the provided version of the {@link EditManager} codec (which encodes it's {@link SummaryData}).\n * @remarks\n * The changeCodec and revisionTagCodec are not explicitly versioned, so the exact right version of them must be provided here\n * or data will be incompatible.\n *\n * TODO: this file should be renamed as this is used for v6 as well.\n */\nexport function makeV1toV4andV6CodecWithVersion<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tversion: EncodedEditManager<TChangeset>[\"version\"],\n): CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> {\n\tconst schema = EncodedEditManager(changeCodec.encodedSchema ?? JsonCompatibleReadOnlySchema);\n\n\tconst codec: CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> = {\n\t\tschema,\n\t\tencode: (\n\t\t\tdata: SummaryData<TChangeset>,\n\t\t\tcontext: EditManagerEncodingContext,\n\t\t): EncodedEditManager<TChangeset> & Versioned & JsonCompatibleReadOnlyObject => {\n\t\t\tconst mainBranch = encodeSharedBranch(\n\t\t\t\tchangeCodec,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tdata.main,\n\t\t\t\tcontext,\n\t\t\t\tdata.originator,\n\t\t\t);\n\t\t\tconst encoded: EncodedEditManager<TChangeset> = {\n\t\t\t\ttrunk: mainBranch.trunk,\n\t\t\t\tbranches: mainBranch.peers,\n\t\t\t\tversion,\n\t\t\t};\n\t\t\treturn encoded as EncodedEditManager<TChangeset> &\n\t\t\t\tVersioned &\n\t\t\t\tJsonCompatibleReadOnlyObject;\n\t\t},\n\t\tdecode: (\n\t\t\tjson: EncodedEditManager<TChangeset> & JsonCompatibleReadOnly,\n\t\t\tcontext: EditManagerEncodingContext,\n\t\t): SummaryData<TChangeset> => {\n\t\t\treturn {\n\t\t\t\tmain: decodeSharedBranch(\n\t\t\t\t\tchangeCodec,\n\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t{\n\t\t\t\t\t\ttrunk: json.trunk,\n\t\t\t\t\t\tpeers: json.branches,\n\t\t\t\t\t},\n\t\t\t\t\tcontext,\n\t\t\t\t\tundefined, // Non \"vSharedBranches\" versions do not encode the summary originatorId.\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t};\n\treturn codec;\n}\n"]}
@@ -5,15 +5,15 @@
5
5
  import type { IIdCompressor } from "@fluidframework/id-compressor";
6
6
  import type { CodecAndSchema, IJsonCodec } from "../codec/index.js";
7
7
  import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag, SchemaAndPolicy } from "../core/index.js";
8
- import { type JsonCompatibleReadOnly } from "../util/index.js";
8
+ import { type IdentifierHealingConfig, type JsonCompatibleReadOnly } from "../util/index.js";
9
9
  import type { SummaryData } from "./editManager.js";
10
10
  import { EncodedEditManager } from "./editManagerFormatVSharedBranches.js";
11
11
  export interface EditManagerEncodingContext {
12
12
  idCompressor: IIdCompressor;
13
13
  readonly schema?: SchemaAndPolicy;
14
14
  readonly isSummary: boolean;
15
- readonly healUnresolvableIdentifiersOnDecode?: boolean;
16
- readonly sharedObjectId?: string;
15
+ /** See {@link IdentifierHealingConfig}. */
16
+ readonly healing?: IdentifierHealingConfig;
17
17
  }
18
18
  export declare function makeSharedBranchesCodecWithVersion<TChangeset>(changeCodec: IJsonCodec<TChangeset, JsonCompatibleReadOnly, JsonCompatibleReadOnly, ChangeEncodingContext>, revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>, version: EncodedEditManager<TChangeset>["version"]): CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext>;
19
19
  //# sourceMappingURL=editManagerCodecsVSharedBranches.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerCodecsVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,KAAK,sBAAsB,EAI3B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAA2B,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,WAAW,0BAA0B;IAC1C,YAAY,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,mCAAmC,CAAC,EAAE,OAAO,CAAC;IACvD,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,wBAAgB,kCAAkC,CAAC,UAAU,EAC5D,WAAW,EAAE,UAAU,CACtB,UAAU,EACV,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,CACrB,EACD,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,GAChD,cAAc,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAC,CA8ErE"}
1
+ {"version":3,"file":"editManagerCodecsVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAI3B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAA2B,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,WAAW,0BAA0B;IAC1C,YAAY,EAAE,aAAa,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,2CAA2C;IAC3C,QAAQ,CAAC,OAAO,CAAC,EAAE,uBAAuB,CAAC;CAC3C;AAED,wBAAgB,kCAAkC,CAAC,UAAU,EAC5D,WAAW,EAAE,UAAU,CACtB,UAAU,EACV,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,CACrB,EACD,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,EACD,OAAO,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,GAChD,cAAc,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,0BAA0B,CAAC,CA8ErE"}
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerCodecsVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsVSharedBranches.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAU7D,+CAK0B;AAI1B,+EAAuF;AAEvF,+FAA2E;AAU3E,SAAgB,kCAAkC,CACjD,WAKC,EACD,gBAKC,EACD,OAAkD;IAElD,MAAM,MAAM,GAAG,IAAA,wDAAkB,EAAC,WAAW,CAAC,aAAa,IAAI,uCAA4B,CAAC,CAAC;IAE7F,MAAM,KAAK,GAAwE;QAClF,MAAM;QACN,MAAM,EAAE,CAAC,IAA6B,EAAE,OAAmC,EAAE,EAAE;YAC9E,MAAM,UAAU,GAAG,IAAA,gDAAkB,EACpC,WAAW,EACX,gBAAgB,EAChB,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CAAC;YACF,IAAA,iBAAM,EACL,IAAI,CAAC,UAAU,KAAK,SAAS,EAC7B,KAAK,CAAC,8DAA8D,CACpE,CAAC;YACF,MAAM,IAAI,GAA4C;gBACrD,IAAI,EAAE,UAAU;gBAChB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,OAAO;aACP,CAAC;YACF,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;gBAC3D,MAAM,QAAQ,GAAsC,EAAE,CAAC;gBACvD,KAAK,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACzC,QAAQ,CAAC,IAAI,CACZ,IAAA,gDAAkB,EACjB,WAAW,EACX,gBAAgB,EAChB,MAAM,EACN,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CACD,CAAC;gBACH,CAAC;gBACD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC1B,CAAC;YACD,OAAO,IAAqE,CAAC;QAC9E,CAAC;QACD,MAAM,EAAE,CACP,IAAmE,EACnE,OAAmC,EACT,EAAE;YAC5B,MAAM,UAAU,GAAG,IAAA,gDAAkB,EACpC,WAAW,EACX,gBAAgB,EAChB,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CAAC;YAEF,MAAM,OAAO,GAAqC;gBACjD,IAAI,EAAE,UAAU;gBAChB,UAAU,EAAE,IAAI,CAAC,UAAU;aAC3B,CAAC;YAEF,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE,CAAC;gBACjC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAiD,CAAC;gBAC1E,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACpC,MAAM,aAAa,GAAG,IAAA,gDAAkB,EACvC,WAAW,EACX,gBAAgB,EAChB,MAAM,EACN,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CAAC;oBACF,IAAA,iBAAM,EAAC,aAAa,CAAC,EAAE,KAAK,SAAS,EAAE,KAAK,CAAC,qCAAqC,CAAC,CAAC;oBACpF,IAAA,iBAAM,EAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;oBAChF,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;gBAC/C,CAAC;gBAED,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC7B,CAAC;YACD,OAAO,OAAO,CAAC;QAChB,CAAC;KACD,CAAC;IAEF,OAAO,KAAK,CAAC;AACd,CAAC;AA5FD,gFA4FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecAndSchema, IJsonCodec } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport {\n\ttype JsonCompatibleReadOnly,\n\ttype JsonCompatibleReadOnlyObject,\n\tJsonCompatibleReadOnlySchema,\n\ttype Mutable,\n} from \"../util/index.js\";\n\nimport type { BranchId } from \"./branch.js\";\nimport type { SharedBranchSummaryData, SummaryData } from \"./editManager.js\";\nimport { decodeSharedBranch, encodeSharedBranch } from \"./editManagerCodecsCommons.js\";\nimport type { EncodedSharedBranch } from \"./editManagerFormatCommons.js\";\nimport { EncodedEditManager } from \"./editManagerFormatVSharedBranches.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n\treadonly isSummary: boolean;\n\treadonly healUnresolvableIdentifiersOnDecode?: boolean;\n\treadonly sharedObjectId?: string;\n}\n\nexport function makeSharedBranchesCodecWithVersion<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tversion: EncodedEditManager<TChangeset>[\"version\"],\n): CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> {\n\tconst schema = EncodedEditManager(changeCodec.encodedSchema ?? JsonCompatibleReadOnlySchema);\n\n\tconst codec: CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> = {\n\t\tschema,\n\t\tencode: (data: SummaryData<TChangeset>, context: EditManagerEncodingContext) => {\n\t\t\tconst mainBranch = encodeSharedBranch(\n\t\t\t\tchangeCodec,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tdata.main,\n\t\t\t\tcontext,\n\t\t\t\tdata.originator,\n\t\t\t);\n\t\t\tassert(\n\t\t\t\tdata.originator !== undefined,\n\t\t\t\t0xca5 /* Cannot encode vSharedBranches summary without originator */,\n\t\t\t);\n\t\t\tconst json: Mutable<EncodedEditManager<TChangeset>> = {\n\t\t\t\tmain: mainBranch,\n\t\t\t\toriginator: data.originator,\n\t\t\t\tversion,\n\t\t\t};\n\t\t\tif (data.branches !== undefined && data.branches.size > 0) {\n\t\t\t\tconst branches: EncodedSharedBranch<TChangeset>[] = [];\n\t\t\t\tfor (const [_, branch] of data.branches) {\n\t\t\t\t\tbranches.push(\n\t\t\t\t\t\tencodeSharedBranch(\n\t\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\tbranch,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tdata.originator,\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tjson.branches = branches;\n\t\t\t}\n\t\t\treturn json as EncodedEditManager<TChangeset> & JsonCompatibleReadOnlyObject;\n\t\t},\n\t\tdecode: (\n\t\t\tjson: EncodedEditManager<TChangeset> & JsonCompatibleReadOnlyObject,\n\t\t\tcontext: EditManagerEncodingContext,\n\t\t): SummaryData<TChangeset> => {\n\t\t\tconst mainBranch = decodeSharedBranch(\n\t\t\t\tchangeCodec,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tjson.main,\n\t\t\t\tcontext,\n\t\t\t\tjson.originator,\n\t\t\t);\n\n\t\t\tconst decoded: Mutable<SummaryData<TChangeset>> = {\n\t\t\t\tmain: mainBranch,\n\t\t\t\toriginator: json.originator,\n\t\t\t};\n\n\t\t\tif (json.branches !== undefined) {\n\t\t\t\tconst branches = new Map<BranchId, SharedBranchSummaryData<TChangeset>>();\n\t\t\t\tfor (const branch of json.branches) {\n\t\t\t\t\tconst decodedBranch = decodeSharedBranch(\n\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\tbranch,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tjson.originator,\n\t\t\t\t\t);\n\t\t\t\t\tassert(decodedBranch.id !== undefined, 0xc66 /* Shared branches must have an id */);\n\t\t\t\t\tassert(!branches.has(decodedBranch.id), 0xc67 /* Duplicate shared branch id */);\n\t\t\t\t\tbranches.set(decodedBranch.id, decodedBranch);\n\t\t\t\t}\n\n\t\t\t\tdecoded.branches = branches;\n\t\t\t}\n\t\t\treturn decoded;\n\t\t},\n\t};\n\n\treturn codec;\n}\n"]}
1
+ {"version":3,"file":"editManagerCodecsVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerCodecsVSharedBranches.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAU7D,+CAM0B;AAI1B,+EAAuF;AAEvF,+FAA2E;AAU3E,SAAgB,kCAAkC,CACjD,WAKC,EACD,gBAKC,EACD,OAAkD;IAElD,MAAM,MAAM,GAAG,IAAA,wDAAkB,EAAC,WAAW,CAAC,aAAa,IAAI,uCAA4B,CAAC,CAAC;IAE7F,MAAM,KAAK,GAAwE;QAClF,MAAM;QACN,MAAM,EAAE,CAAC,IAA6B,EAAE,OAAmC,EAAE,EAAE;YAC9E,MAAM,UAAU,GAAG,IAAA,gDAAkB,EACpC,WAAW,EACX,gBAAgB,EAChB,IAAI,CAAC,IAAI,EACT,OAAO,EACP,IAAI,CAAC,UAAU,CACf,CAAC;YACF,IAAA,iBAAM,EACL,IAAI,CAAC,UAAU,KAAK,SAAS,EAC7B,KAAK,CAAC,8DAA8D,CACpE,CAAC;YACF,MAAM,IAAI,GAA4C;gBACrD,IAAI,EAAE,UAAU;gBAChB,UAAU,EAAE,IAAI,CAAC,UAAU;gBAC3B,OAAO;aACP,CAAC;YACF,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,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AAa,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;gBAC/C,CAAC;gBAED,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;YAC7B,CAAC;YACD,OAAO,OAAO,CAAC;QAChB,CAAC;KACD,CAAC;IAEF,OAAO,KAAK,CAAC;AACd,CAAC;AA5FD,gFA4FC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecAndSchema, IJsonCodec } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\nimport {\n\ttype IdentifierHealingConfig,\n\ttype JsonCompatibleReadOnly,\n\ttype JsonCompatibleReadOnlyObject,\n\tJsonCompatibleReadOnlySchema,\n\ttype Mutable,\n} from \"../util/index.js\";\n\nimport type { BranchId } from \"./branch.js\";\nimport type { SharedBranchSummaryData, SummaryData } from \"./editManager.js\";\nimport { decodeSharedBranch, encodeSharedBranch } from \"./editManagerCodecsCommons.js\";\nimport type { EncodedSharedBranch } from \"./editManagerFormatCommons.js\";\nimport { EncodedEditManager } from \"./editManagerFormatVSharedBranches.js\";\n\nexport interface EditManagerEncodingContext {\n\tidCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n\treadonly isSummary: boolean;\n\t/** See {@link IdentifierHealingConfig}. */\n\treadonly healing?: IdentifierHealingConfig;\n}\n\nexport function makeSharedBranchesCodecWithVersion<TChangeset>(\n\tchangeCodec: IJsonCodec<\n\t\tTChangeset,\n\t\tJsonCompatibleReadOnly,\n\t\tJsonCompatibleReadOnly,\n\t\tChangeEncodingContext\n\t>,\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>,\n\tversion: EncodedEditManager<TChangeset>[\"version\"],\n): CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> {\n\tconst schema = EncodedEditManager(changeCodec.encodedSchema ?? JsonCompatibleReadOnlySchema);\n\n\tconst codec: CodecAndSchema<SummaryData<TChangeset>, EditManagerEncodingContext> = {\n\t\tschema,\n\t\tencode: (data: SummaryData<TChangeset>, context: EditManagerEncodingContext) => {\n\t\t\tconst mainBranch = encodeSharedBranch(\n\t\t\t\tchangeCodec,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tdata.main,\n\t\t\t\tcontext,\n\t\t\t\tdata.originator,\n\t\t\t);\n\t\t\tassert(\n\t\t\t\tdata.originator !== undefined,\n\t\t\t\t0xca5 /* Cannot encode vSharedBranches summary without originator */,\n\t\t\t);\n\t\t\tconst json: Mutable<EncodedEditManager<TChangeset>> = {\n\t\t\t\tmain: mainBranch,\n\t\t\t\toriginator: data.originator,\n\t\t\t\tversion,\n\t\t\t};\n\t\t\tif (data.branches !== undefined && data.branches.size > 0) {\n\t\t\t\tconst branches: EncodedSharedBranch<TChangeset>[] = [];\n\t\t\t\tfor (const [_, branch] of data.branches) {\n\t\t\t\t\tbranches.push(\n\t\t\t\t\t\tencodeSharedBranch(\n\t\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\t\tbranch,\n\t\t\t\t\t\t\tcontext,\n\t\t\t\t\t\t\tdata.originator,\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tjson.branches = branches;\n\t\t\t}\n\t\t\treturn json as EncodedEditManager<TChangeset> & JsonCompatibleReadOnlyObject;\n\t\t},\n\t\tdecode: (\n\t\t\tjson: EncodedEditManager<TChangeset> & JsonCompatibleReadOnlyObject,\n\t\t\tcontext: EditManagerEncodingContext,\n\t\t): SummaryData<TChangeset> => {\n\t\t\tconst mainBranch = decodeSharedBranch(\n\t\t\t\tchangeCodec,\n\t\t\t\trevisionTagCodec,\n\t\t\t\tjson.main,\n\t\t\t\tcontext,\n\t\t\t\tjson.originator,\n\t\t\t);\n\n\t\t\tconst decoded: Mutable<SummaryData<TChangeset>> = {\n\t\t\t\tmain: mainBranch,\n\t\t\t\toriginator: json.originator,\n\t\t\t};\n\n\t\t\tif (json.branches !== undefined) {\n\t\t\t\tconst branches = new Map<BranchId, SharedBranchSummaryData<TChangeset>>();\n\t\t\t\tfor (const branch of json.branches) {\n\t\t\t\t\tconst decodedBranch = decodeSharedBranch(\n\t\t\t\t\t\tchangeCodec,\n\t\t\t\t\t\trevisionTagCodec,\n\t\t\t\t\t\tbranch,\n\t\t\t\t\t\tcontext,\n\t\t\t\t\t\tjson.originator,\n\t\t\t\t\t);\n\t\t\t\t\tassert(decodedBranch.id !== undefined, 0xc66 /* Shared branches must have an id */);\n\t\t\t\t\tassert(!branches.has(decodedBranch.id), 0xc67 /* Duplicate shared branch id */);\n\t\t\t\t\tbranches.set(decodedBranch.id, decodedBranch);\n\t\t\t\t}\n\n\t\t\t\tdecoded.branches = branches;\n\t\t\t}\n\t\t\treturn decoded;\n\t\t},\n\t};\n\n\treturn codec;\n}\n"]}
@@ -106,7 +106,7 @@ export declare const EditManagerFormatVersion: {
106
106
  readonly v4: Brand<4, "editManager.FormatVersion">;
107
107
  readonly v5: Brand<5, "editManager.FormatVersion">;
108
108
  readonly v6: Brand<6, "editManager.FormatVersion">;
109
- readonly vSharedBranches: Brand<"shared-branches|v0.1", "editManager.FormatVersion">;
109
+ readonly vSharedBranches: Brand<"shared-branches|v0.2", "editManager.FormatVersion">;
110
110
  };
111
111
  export type EditManagerFormatVersion = Values<typeof EditManagerFormatVersion>;
112
112
  export declare const supportedEditManagerFormatVersions: ReadonlySet<EditManagerFormatVersion>;
@@ -89,7 +89,7 @@ exports.EditManagerFormatVersion = (0, index_js_2.strictEnum)("editManager.Forma
89
89
  * Not yet released.
90
90
  * Only used for testing shared branches.
91
91
  */
92
- vSharedBranches: "shared-branches|v0.1",
92
+ vSharedBranches: "shared-branches|v0.2",
93
93
  });
94
94
  exports.supportedEditManagerFormatVersions = new Set([
95
95
  exports.EditManagerFormatVersion.v3,
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerFormatCommons.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatCommons.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAGH,gEAA0C;AAG1C,+CAK0B;AAC1B,+CAA0F;AAwB1F,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE,uGAAuG;AACvG,qEAAqE;AAErE,MAAM,UAAU,GAAG,CAA+B,OAAqB,EAAE,EAAE,CAC1E,IAAI,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,4BAAiB;IAC3B,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,0BAAe;CAC1B,CAAC,CAAC;AACJ;;;GAGG;AACH,MAAM,MAAM,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACtE,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAG1D,MAAM,SAAS,GAAG,IAAA,4BAAiB,EAAY,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;AAElE,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9B,cAAc,EAAE,SAAS;IACzB,YAAY,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;CACvE,CAAC,CAAC;AASI,MAAM,eAAe,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACtF,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,UAAU,CAAC,EAAE,iBAAiB,CAAC,CAAC;AADzD,QAAA,eAAe,mBAC0C;AAkB/D,MAAM,oBAAoB,GAAG,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EAAE,sBAAsB;CACvC,CAAC,CAAC;AAEU,QAAA,kCAAkC,GAC9C,IAAI,GAAG,CAAC;IACP,gCAAwB,CAAC,EAAE;IAC3B,gCAAwB,CAAC,EAAE;IAC3B,gCAAwB,CAAC,EAAE;IAC3B,gCAAwB,CAAC,eAAe;CACxC,CAAC,CAAC;AACS,QAAA,yBAAyB,GAA0C,IAAI,GAAG,CACtF,MAAM,CAAC,MAAM,CAAC,gCAAwB,CAAC,CACvC,CAAC;AACF,oEAAoE","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 * as Type from \"@sinclair/typebox\";\nimport type { ObjectOptions, Static, TSchema } from \"@sinclair/typebox\";\n\nimport {\n\ttype EncodedRevisionTag,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tSessionIdSchema,\n} from \"../core/index.js\";\nimport { type Brand, brandedNumberType, strictEnum, type Values } from \"../util/index.js\";\n\nimport type { EncodedBranchId } from \"./branch.js\";\n\n/**\n * Contains a single change to the `SharedTree` and associated metadata.\n *\n * TODO: if this type is not used in the encoded format, move it out of this file, and stop using it in EncodedEditManager.\n * If this is an encoded format, clarify the difference between it and EncodedCommit.\n */\nexport interface Commit<TChangeset> {\n\treadonly revision: RevisionTag;\n\treadonly change: TChangeset;\n\t/** An identifier representing the session/user/client that made this commit */\n\treadonly sessionId: SessionId;\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type EncodedCommit<TChangeset> = {\n\treadonly revision: EncodedRevisionTag;\n\treadonly change: TChangeset;\n\treadonly sessionId: SessionId;\n};\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n// Many of the return types in this module are intentionally derived, rather than explicitly specified.\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\nconst CommitBase = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object({\n\t\trevision: RevisionTagSchema,\n\t\tchange: tChange,\n\t\tsessionId: SessionIdSchema,\n\t});\n/**\n * @privateRemarks Commits are generally encoded from `GraphCommit`s, which often contain extra data.\n * This `noAdditionalProps` is especially important in that light.\n */\nconst Commit = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Composite([CommitBase(tChange)], noAdditionalProps);\n\nexport type SeqNumber = Brand<number, \"edit-manager.SeqNumber\">;\nconst SeqNumber = brandedNumberType<SeqNumber>({ multipleOf: 1 });\n\nconst SequenceId = Type.Object({\n\tsequenceNumber: SeqNumber,\n\tindexInBatch: Type.Optional(Type.Number({ multipleOf: 1, minimum: 0 })),\n});\n\nexport type SequenceId = Static<typeof SequenceId>;\n\n/**\n * A commit with a sequence number but no parentage; used for serializing the `EditManager` into a summary\n */\nexport interface SequencedCommit<TChangeset> extends Commit<TChangeset>, SequenceId {}\n\nexport const SequencedCommit = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Composite([CommitBase(tChange), SequenceId], noAdditionalProps);\n\n/**\n * A branch off of the trunk for use in summaries.\n *\n * TODO: if this type is not used in the encoded format, move it out of this file, and stop using it in EncodedEditManager.\n * If this is an encoded format, use EncodedCommit instead of Commit or clarify that Commit is also an encoded format.\n */\nexport interface SummarySessionBranch<TChangeset> {\n\treadonly base: RevisionTag;\n\treadonly commits: Commit<TChangeset>[];\n}\n\nexport interface EncodedSummarySessionBranch<TChangeset> {\n\treadonly base: EncodedRevisionTag;\n\treadonly commits: Commit<TChangeset>[];\n}\n\nexport const SummarySessionBranch = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tbase: RevisionTagSchema,\n\t\t\tcommits: Type.Array(Commit(tChange)),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\nexport interface EncodedSharedBranch<TChangeset> {\n\treadonly id?: EncodedBranchId;\n\treadonly name?: string;\n\treadonly author?: string;\n\treadonly session?: SessionId;\n\treadonly base?: EncodedRevisionTag;\n\treadonly trunk: readonly Readonly<SequencedCommit<TChangeset>>[];\n\treadonly peers: readonly [SessionId, Readonly<EncodedSummarySessionBranch<TChangeset>>][];\n}\n\nexport const EncodedSharedBranch = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tid: Type.Optional(Type.Number()),\n\t\t\tname: Type.Optional(Type.String()),\n\t\t\tsession: Type.Optional(SessionIdSchema),\n\t\t\tauthor: Type.Optional(Type.String()),\n\t\t\tbase: Type.Optional(RevisionTagSchema),\n\t\t\ttrunk: Type.Array(SequencedCommit(tChange)),\n\t\t\tpeers: Type.Array(Type.Tuple([SessionIdSchema, SummarySessionBranch(tChange)])),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\n/**\n * The format version for the EditManager.\n */\nexport const EditManagerFormatVersion = strictEnum(\"editManager.FormatVersion\", {\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 EditManagerFormatVersion.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 EditManagerFormatVersion.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 EditManagerFormatVersion.vSharedBranches} for testing shared branches.\n\t */\n\tv5: 5,\n\t/**\n\t * Introduced and made available for writing in 2.80.0\n\t * Adds support for \"no change\" constraints.\n\t */\n\tv6: 6,\n\t/**\n\t * Not yet released.\n\t * Only used for testing shared branches.\n\t */\n\tvSharedBranches: \"shared-branches|v0.1\",\n});\nexport type EditManagerFormatVersion = Values<typeof EditManagerFormatVersion>;\nexport const supportedEditManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> =\n\tnew Set([\n\t\tEditManagerFormatVersion.v3,\n\t\tEditManagerFormatVersion.v4,\n\t\tEditManagerFormatVersion.v6,\n\t\tEditManagerFormatVersion.vSharedBranches,\n\t]);\nexport const editManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> = new Set(\n\tObject.values(EditManagerFormatVersion),\n);\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
1
+ {"version":3,"file":"editManagerFormatCommons.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatCommons.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAGH,gEAA0C;AAG1C,+CAK0B;AAC1B,+CAA0F;AAwB1F,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE,uGAAuG;AACvG,qEAAqE;AAErE,MAAM,UAAU,GAAG,CAA+B,OAAqB,EAAE,EAAE,CAC1E,IAAI,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,4BAAiB;IAC3B,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,0BAAe;CAC1B,CAAC,CAAC;AACJ;;;GAGG;AACH,MAAM,MAAM,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACtE,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAG1D,MAAM,SAAS,GAAG,IAAA,4BAAiB,EAAY,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,CAAC;AAElE,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9B,cAAc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,iBAAiB,CACjB,CAAC;AAZU,QAAA,mBAAmB,uBAY7B;AAEH;;GAEG;AACU,QAAA,wBAAwB,GAAG,IAAA,qBAAU,EAAC,2BAA2B,EAAE;IAC/E;;;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,CAAC;IACL;;;OAGG;IACH,eAAe,EAAE,sBAAsB;CACvC,CAAC,CAAC;AAEU,QAAA,kCAAkC,GAC9C,IAAI,GAAG,CAAC;IACP,gCAAwB,CAAC,EAAE;IAC3B,gCAAwB,CAAC,EAAE;IAC3B,gCAAwB,CAAC,EAAE;IAC3B,gCAAwB,CAAC,eAAe;CACxC,CAAC,CAAC;AACS,QAAA,yBAAyB,GAA0C,IAAI,GAAG,CACtF,MAAM,CAAC,MAAM,CAAC,gCAAwB,CAAC,CACvC,CAAC;AACF,oEAAoE","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 * as Type from \"@sinclair/typebox\";\nimport type { ObjectOptions, Static, TSchema } from \"@sinclair/typebox\";\n\nimport {\n\ttype EncodedRevisionTag,\n\ttype RevisionTag,\n\tRevisionTagSchema,\n\tSessionIdSchema,\n} from \"../core/index.js\";\nimport { type Brand, brandedNumberType, strictEnum, type Values } from \"../util/index.js\";\n\nimport type { EncodedBranchId } from \"./branch.js\";\n\n/**\n * Contains a single change to the `SharedTree` and associated metadata.\n *\n * TODO: if this type is not used in the encoded format, move it out of this file, and stop using it in EncodedEditManager.\n * If this is an encoded format, clarify the difference between it and EncodedCommit.\n */\nexport interface Commit<TChangeset> {\n\treadonly revision: RevisionTag;\n\treadonly change: TChangeset;\n\t/** An identifier representing the session/user/client that made this commit */\n\treadonly sessionId: SessionId;\n}\n\n// eslint-disable-next-line @typescript-eslint/consistent-type-definitions\nexport type EncodedCommit<TChangeset> = {\n\treadonly revision: EncodedRevisionTag;\n\treadonly change: TChangeset;\n\treadonly sessionId: SessionId;\n};\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n// Many of the return types in this module are intentionally derived, rather than explicitly specified.\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\nconst CommitBase = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object({\n\t\trevision: RevisionTagSchema,\n\t\tchange: tChange,\n\t\tsessionId: SessionIdSchema,\n\t});\n/**\n * @privateRemarks Commits are generally encoded from `GraphCommit`s, which often contain extra data.\n * This `noAdditionalProps` is especially important in that light.\n */\nconst Commit = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Composite([CommitBase(tChange)], noAdditionalProps);\n\nexport type SeqNumber = Brand<number, \"edit-manager.SeqNumber\">;\nconst SeqNumber = brandedNumberType<SeqNumber>({ multipleOf: 1 });\n\nconst SequenceId = Type.Object({\n\tsequenceNumber: SeqNumber,\n\tindexInBatch: Type.Optional(Type.Number({ multipleOf: 1, minimum: 0 })),\n});\n\nexport type SequenceId = Static<typeof SequenceId>;\n\n/**\n * A commit with a sequence number but no parentage; used for serializing the `EditManager` into a summary\n */\nexport interface SequencedCommit<TChangeset> extends Commit<TChangeset>, SequenceId {}\n\nexport const SequencedCommit = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Composite([CommitBase(tChange), SequenceId], noAdditionalProps);\n\n/**\n * A branch off of the trunk for use in summaries.\n *\n * TODO: if this type is not used in the encoded format, move it out of this file, and stop using it in EncodedEditManager.\n * If this is an encoded format, use EncodedCommit instead of Commit or clarify that Commit is also an encoded format.\n */\nexport interface SummarySessionBranch<TChangeset> {\n\treadonly base: RevisionTag;\n\treadonly commits: Commit<TChangeset>[];\n}\n\nexport interface EncodedSummarySessionBranch<TChangeset> {\n\treadonly base: EncodedRevisionTag;\n\treadonly commits: Commit<TChangeset>[];\n}\n\nexport const SummarySessionBranch = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tbase: RevisionTagSchema,\n\t\t\tcommits: Type.Array(Commit(tChange)),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\nexport interface EncodedSharedBranch<TChangeset> {\n\treadonly id?: EncodedBranchId;\n\treadonly name?: string;\n\treadonly author?: string;\n\treadonly session?: SessionId;\n\treadonly base?: EncodedRevisionTag;\n\treadonly trunk: readonly Readonly<SequencedCommit<TChangeset>>[];\n\treadonly peers: readonly [SessionId, Readonly<EncodedSummarySessionBranch<TChangeset>>][];\n}\n\nexport const EncodedSharedBranch = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tid: Type.Optional(Type.Number()),\n\t\t\tname: Type.Optional(Type.String()),\n\t\t\tsession: Type.Optional(SessionIdSchema),\n\t\t\tauthor: Type.Optional(Type.String()),\n\t\t\tbase: Type.Optional(RevisionTagSchema),\n\t\t\ttrunk: Type.Array(SequencedCommit(tChange)),\n\t\t\tpeers: Type.Array(Type.Tuple([SessionIdSchema, SummarySessionBranch(tChange)])),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\n/**\n * The format version for the EditManager.\n */\nexport const EditManagerFormatVersion = strictEnum(\"editManager.FormatVersion\", {\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 EditManagerFormatVersion.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 EditManagerFormatVersion.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 EditManagerFormatVersion.vSharedBranches} for testing shared branches.\n\t */\n\tv5: 5,\n\t/**\n\t * Introduced and made available for writing in 2.80.0\n\t * Adds support for \"no change\" constraints.\n\t */\n\tv6: 6,\n\t/**\n\t * Not yet released.\n\t * Only used for testing shared branches.\n\t */\n\tvSharedBranches: \"shared-branches|v0.2\",\n});\nexport type EditManagerFormatVersion = Values<typeof EditManagerFormatVersion>;\nexport const supportedEditManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> =\n\tnew Set([\n\t\tEditManagerFormatVersion.v3,\n\t\tEditManagerFormatVersion.v4,\n\t\tEditManagerFormatVersion.v6,\n\t\tEditManagerFormatVersion.vSharedBranches,\n\t]);\nexport const editManagerFormatVersions: ReadonlySet<EditManagerFormatVersion> = new Set(\n\tObject.values(EditManagerFormatVersion),\n);\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
@@ -12,7 +12,7 @@ export interface EncodedEditManager<TChangeset> {
12
12
  readonly branches?: readonly EncodedSharedBranch<TChangeset>[];
13
13
  }
14
14
  export declare const EncodedEditManager: <ChangeSchema extends Type.TSchema>(tChange: ChangeSchema) => Type.TObject<{
15
- version: Type.TLiteral<import("../util/brand.js").Brand<"shared-branches|v0.1", "editManager.FormatVersion">>;
15
+ version: Type.TLiteral<import("../util/brand.js").Brand<"shared-branches|v0.2", "editManager.FormatVersion">>;
16
16
  originator: Type.TUnsafe<SessionId>;
17
17
  main: Type.TObject<{
18
18
  id: Type.TOptional<Type.TNumber>;
@@ -8,7 +8,7 @@ import type { IExperimentalIncrementalSummaryContext, ITelemetryContext, Minimum
8
8
  import type { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
9
9
  import type { IJsonCodec } from "../codec/index.js";
10
10
  import type { ChangeFamily, ChangeFamilyEditor, SchemaAndPolicy } from "../core/index.js";
11
- import type { JsonCompatibleReadOnly } from "../util/index.js";
11
+ import type { IdentifierHealingConfig, JsonCompatibleReadOnly } from "../util/index.js";
12
12
  import type { EditManager, SummaryData } from "./editManager.js";
13
13
  import type { EditManagerEncodingContext } from "./editManagerCodecs.js";
14
14
  import type { Summarizable, SummaryElementParser, SummaryElementStringifier } from "./summaryTypes.js";
@@ -39,16 +39,12 @@ export declare class EditManagerSummarizer<TChangeset> extends VersionedSummariz
39
39
  private readonly codec;
40
40
  private readonly idCompressor;
41
41
  private readonly schemaAndPolicy?;
42
- /** See {@link EditManagerEncodingContext.healUnresolvableIdentifiersOnDecode}. */
43
- private readonly healUnresolvableIdentifiersOnDecode?;
44
- /** See {@link EditManagerEncodingContext.sharedObjectId}. */
45
- private readonly sharedObjectId?;
42
+ /** See {@link IdentifierHealingConfig}. */
43
+ private readonly healing?;
46
44
  static readonly key = "EditManager";
47
45
  constructor(editManager: EditManager<ChangeFamilyEditor, TChangeset, ChangeFamily<ChangeFamilyEditor, TChangeset>>, codec: IJsonCodec<SummaryData<TChangeset>, JsonCompatibleReadOnly, JsonCompatibleReadOnly, EditManagerEncodingContext>, idCompressor: IIdCompressor, minVersionForCollab: MinimumVersionForCollab, schemaAndPolicy?: SchemaAndPolicy | undefined,
48
- /** See {@link EditManagerEncodingContext.healUnresolvableIdentifiersOnDecode}. */
49
- healUnresolvableIdentifiersOnDecode?: boolean | undefined,
50
- /** See {@link EditManagerEncodingContext.sharedObjectId}. */
51
- sharedObjectId?: string | undefined);
46
+ /** See {@link IdentifierHealingConfig}. */
47
+ healing?: IdentifierHealingConfig | undefined);
52
48
  protected summarizeInternal(props: {
53
49
  stringify: SummaryElementStringifier;
54
50
  fullTree?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerSummarizer.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EACX,sCAAsC,EACtC,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,8CAA8C,CAAC;AACtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC1F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EACX,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,EACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAO,MAAM,SAAS,WAAW,CAAC;AAElC;;GAEG;AACH,0BAAkB,+BAA+B;IAChD;;OAEG;IACH,EAAE,IAAI;IACN;;OAEG;IACH,EAAE,IAAI;IACN;;OAEG;IACH,OAAO,IAAK;CACZ;AAiBD;;GAEG;AACH,qBAAa,qBAAqB,CAAC,UAAU,CAC5C,SAAQ,mBAAmB,CAAC,+BAA+B,CAC3D,YAAW,YAAY;IAItB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAK5B,OAAO,CAAC,QAAQ,CA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AAE,UAAU,CAAC,CAC5C,EACgB,KAAK,EAAE,UAAU,CACjC,WAAW,CAAC,UAAU,CAAC,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,CAC1B,EACgB,YAAY,EAAE,aAAa,EAC5C,mBAAmB,EAAE,uBAAuB,EAC3B,eAAe,CAAC,6BAAiB;IAClD,2CAA2C;IAC1B,OAAO,CAAC,qCAAyB;IAUnD,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE;QAClC,SAAS,EAAE,yBAAyB,CAAC;QACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;QACrC,yBAAyB,CAAC,EAAE,sCAAsC,CAAC;QACnE,OAAO,EAAE,kBAAkB,CAAC;KAC5B,GAAG,IAAI;cAaQ,YAAY,CAC3B,QAAQ,EAAE,sBAAsB,EAChC,KAAK,EAAE,oBAAoB,GACzB,OAAO,CAAC,IAAI,CAAC;CAmBhB"}
@@ -43,17 +43,14 @@ function minVersionToEditManagerSummaryFormatVersion(version) {
43
43
  */
44
44
  class EditManagerSummarizer extends versionedSummarizer_js_1.VersionedSummarizer {
45
45
  constructor(editManager, codec, idCompressor, minVersionForCollab, schemaAndPolicy,
46
- /** See {@link EditManagerEncodingContext.healUnresolvableIdentifiersOnDecode}. */
47
- healUnresolvableIdentifiersOnDecode,
48
- /** See {@link EditManagerEncodingContext.sharedObjectId}. */
49
- sharedObjectId) {
46
+ /** See {@link IdentifierHealingConfig}. */
47
+ healing) {
50
48
  super(EditManagerSummarizer.key, minVersionToEditManagerSummaryFormatVersion(minVersionForCollab), supportedVersions, true /* supportPreVersioningFormat */);
51
49
  this.editManager = editManager;
52
50
  this.codec = codec;
53
51
  this.idCompressor = idCompressor;
54
52
  this.schemaAndPolicy = schemaAndPolicy;
55
- this.healUnresolvableIdentifiersOnDecode = healUnresolvableIdentifiersOnDecode;
56
- this.sharedObjectId = sharedObjectId;
53
+ this.healing = healing;
57
54
  }
58
55
  summarizeInternal(props) {
59
56
  const { stringify, builder } = props;
@@ -61,8 +58,7 @@ class EditManagerSummarizer extends versionedSummarizer_js_1.VersionedSummarizer
61
58
  idCompressor: this.idCompressor,
62
59
  schema: this.schemaAndPolicy,
63
60
  isSummary: true,
64
- healUnresolvableIdentifiersOnDecode: this.healUnresolvableIdentifiersOnDecode,
65
- sharedObjectId: this.sharedObjectId,
61
+ healing: this.healing,
66
62
  };
67
63
  const jsonCompatible = this.codec.encode(this.editManager.getSummaryData(), context);
68
64
  const dataString = stringify(jsonCompatible);
@@ -78,8 +74,7 @@ class EditManagerSummarizer extends versionedSummarizer_js_1.VersionedSummarizer
78
74
  const data = this.codec.decode(summary, {
79
75
  idCompressor: this.idCompressor,
80
76
  isSummary: true,
81
- healUnresolvableIdentifiersOnDecode: this.healUnresolvableIdentifiersOnDecode,
82
- sharedObjectId: this.sharedObjectId,
77
+ healing: this.healing,
83
78
  });
84
79
  this.editManager.loadSummaryData(data);
85
80
  }
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerSummarizer.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerSummarizer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA8D;AAC9D,kEAA6D;AAqB7D,qEAA+D;AAElD,QAAA,SAAS,GAAG,QAAQ,CAAC;AAElC;;GAEG;AACH,IAAkB,+BAajB;AAbD,WAAkB,+BAA+B;IAChD;;OAEG;IACH,iFAAM,CAAA;IACN;;OAEG;IACH,iFAAM,CAAA;IACN;;OAEG;IACH,2FAAY,CAAA;AACb,CAAC,EAbiB,+BAA+B,+CAA/B,+BAA+B,QAahD;AAED,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAkC;;;CAGlE,CAAC,CAAC;AAEH;;GAEG;AACH,SAAS,2CAA2C,CACnD,OAAgC;IAEhC,2EAA2E;IAC3E,kDAA0C;AAC3C,CAAC;AAED;;GAEG;AACH,MAAa,qB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AAM,EACL,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,EAC1B,KAAK,CAAC,mFAAmF,CACzF,CAAC;QAEF,MAAM,OAAO,GAAG,KAAK,CAAC,IAAA,6BAAc,EAAC,YAAY,EAAE,MAAM,CAAC,CAA2B,CAAC;QACtF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE;YACvC,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,SAAS,EAAE,IAAI;YACf,mCAAmC,EAAE,IAAI,CAAC,mCAAmC;YAC7E,cAAc,EAAE,IAAI,CAAC,cAAc;SACnC,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;;AA5EF,sDA6EC;AAzEuB,yBAAG,GAAG,aAAa,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport type {\n\tIExperimentalIncrementalSummaryContext,\n\tITelemetryContext,\n\tMinimumVersionForCollab,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport type { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\n\nimport type { IJsonCodec } from \"../codec/index.js\";\nimport type { ChangeFamily, ChangeFamilyEditor, SchemaAndPolicy } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport type { EditManager, SummaryData } from \"./editManager.js\";\nimport type { EditManagerEncodingContext } from \"./editManagerCodecs.js\";\nimport type {\n\tSummarizable,\n\tSummaryElementParser,\n\tSummaryElementStringifier,\n} from \"./summaryTypes.js\";\nimport { VersionedSummarizer } from \"./versionedSummarizer.js\";\n\nexport const stringKey = \"String\";\n\n/**\n * The versions for the edit manager summary format.\n */\nexport const enum EditManagerSummaryFormatVersion {\n\t/**\n\t * This version represents summary format before summary versioning was introduced.\n\t */\n\tv1 = 1,\n\t/**\n\t * This version adds metadata to the summary. This is backward compatible with version 1.\n\t */\n\tv2 = 2,\n\t/**\n\t * The latest version of the summary. Must be updated when a new version is added.\n\t */\n\tvLatest = v2,\n}\n\nconst supportedVersions = new Set<EditManagerSummaryFormatVersion>([\n\tEditManagerSummaryFormatVersion.v1,\n\tEditManagerSummaryFormatVersion.v2,\n]);\n\n/**\n * Returns the summary version to use as per the given minimum version for collab.\n */\nfunction minVersionToEditManagerSummaryFormatVersion(\n\tversion: MinimumVersionForCollab,\n): EditManagerSummaryFormatVersion {\n\t// Currently, version 2 is written which adds metadata blob to the summary.\n\treturn EditManagerSummaryFormatVersion.v2;\n}\n\n/**\n * Provides methods for summarizing and loading an `EditManager`\n */\nexport class EditManagerSummarizer<TChangeset>\n\textends VersionedSummarizer<EditManagerSummaryFormatVersion>\n\timplements Summarizable\n{\n\tpublic static readonly key = \"EditManager\";\n\tpublic constructor(\n\t\tprivate readonly editManager: EditManager<\n\t\t\tChangeFamilyEditor,\n\t\t\tTChangeset,\n\t\t\tChangeFamily<ChangeFamilyEditor, TChangeset>\n\t\t>,\n\t\tprivate readonly codec: IJsonCodec<\n\t\t\tSummaryData<TChangeset>,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tEditManagerEncodingContext\n\t\t>,\n\t\tprivate readonly idCompressor: IIdCompressor,\n\t\tminVersionForCollab: MinimumVersionForCollab,\n\t\tprivate readonly schemaAndPolicy?: SchemaAndPolicy,\n\t\t/** See {@link EditManagerEncodingContext.healUnresolvableIdentifiersOnDecode}. */\n\t\tprivate readonly healUnresolvableIdentifiersOnDecode?: boolean,\n\t\t/** See {@link EditManagerEncodingContext.sharedObjectId}. */\n\t\tprivate readonly sharedObjectId?: string,\n\t) {\n\t\tsuper(\n\t\t\tEditManagerSummarizer.key,\n\t\t\tminVersionToEditManagerSummaryFormatVersion(minVersionForCollab),\n\t\t\tsupportedVersions,\n\t\t\ttrue /* supportPreVersioningFormat */,\n\t\t);\n\t}\n\n\tprotected summarizeInternal(props: {\n\t\tstringify: SummaryElementStringifier;\n\t\tfullTree?: boolean;\n\t\ttrackState?: boolean;\n\t\ttelemetryContext?: ITelemetryContext;\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext;\n\t\tbuilder: SummaryTreeBuilder;\n\t}): void {\n\t\tconst { stringify, builder } = props;\n\t\tconst context: EditManagerEncodingContext = {\n\t\t\tidCompressor: this.idCompressor,\n\t\t\tschema: this.schemaAndPolicy,\n\t\t\tisSummary: true,\n\t\t\thealUnresolvableIdentifiersOnDecode: this.healUnresolvableIdentifiersOnDecode,\n\t\t\tsharedObjectId: this.sharedObjectId,\n\t\t};\n\t\tconst jsonCompatible = this.codec.encode(this.editManager.getSummaryData(), context);\n\t\tconst dataString = stringify(jsonCompatible);\n\t\tbuilder.addBlob(stringKey, dataString);\n\t}\n\n\tprotected async loadInternal(\n\t\tservices: IChannelStorageService,\n\t\tparse: SummaryElementParser,\n\t): Promise<void> {\n\t\tconst schemaBuffer: ArrayBufferLike = await services.readBlob(stringKey);\n\n\t\t// After the awaits, validate that the data is in a clean state.\n\t\t// This detects any data that could have been accidentally added through\n\t\t// invalid means and is about to be overwritten.\n\t\tassert(\n\t\t\tthis.editManager.isEmpty(),\n\t\t\t0x42c /* There should not already be stored EditManager data when loading from summary */,\n\t\t);\n\n\t\tconst summary = parse(bufferToString(schemaBuffer, \"utf8\")) as JsonCompatibleReadOnly;\n\t\tconst data = this.codec.decode(summary, {\n\t\t\tidCompressor: this.idCompressor,\n\t\t\tisSummary: true,\n\t\t\thealUnresolvableIdentifiersOnDecode: this.healUnresolvableIdentifiersOnDecode,\n\t\t\tsharedObjectId: this.sharedObjectId,\n\t\t});\n\t\tthis.editManager.loadSummaryData(data);\n\t}\n}\n"]}
1
+ {"version":3,"file":"editManagerSummarizer.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerSummarizer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA8D;AAC9D,kEAA6D;AAqB7D,qEAA+D;AAElD,QAAA,SAAS,GAAG,QAAQ,CAAC;AAElC;;GAEG;AACH,IAAkB,+BAajB;AAbD,WAAkB,+BAA+B;IAChD;;OAEG;IACH,iFAAM,CAAA;IACN;;OAEG;IACH,iFAAM,CAAA;IACN;;OAEG;IACH,2FAAY,CAAA;AACb,CAAC,EAbiB,+BAA+B,+CAA/B,+BAA+B,QAahD;AAED,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAkC;;;CAGlE,CAAC,CAAC;AAEH;;GAEG;AACH,SAAS,2CAA2C,CACnD,OAAgC;IAEhC,2EAA2E;IAC3E,kDAA0C;AAC3C,CAAC;AAED;;GAEG;AACH,MAAa,qBACZ,SAAQ,4CAAoD;IAI5D,YACkB,WAIhB,EACgB,KAKhB,EACgB,YAA2B,EAC5C,mBAA4C,EAC3B,eAAiC;IAClD,2CAA2C;IAC1B,OAAiC;QAElD,KAAK,CACJ,qBAAqB,CAAC,GAAG,EACzB,2CAA2C,CAAC,mBAAmB,CAAC,EAChE,iBAAiB,EACjB,IAAI,CAAC,gCAAgC,CACrC,CAAC;QAtBe,gBAAW,GAAX,WAAW,CAI3B;QACgB,UAAK,GAAL,KAAK,CAKrB;QACgB,iBAAY,GAAZ,YAAY,CAAe;QAE3B,oBAAe,GAAf,eAAe,CAAkB;QAEjC,YAAO,GAAP,OAAO,CAA0B;IAQnD,CAAC;IAES,iBAAiB,CAAC,KAO3B;QACA,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;QACrC,MAAM,OAAO,GAA+B;YAC3C,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,MAAM,EAAE,IAAI,CAAC,eAAe;YAC5B,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAC;QACF,MAAM,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,EAAE,OAAO,CAAC,CAAC;QACrF,MAAM,UAAU,GAAG,SAAS,CAAC,cAAc,CAAC,CAAC;QAC7C,OAAO,CAAC,OAAO,CAAC,iBAAS,EAAE,UAAU,CAAC,CAAC;IACxC,CAAC;IAES,KAAK,CAAC,YAAY,CAC3B,QAAgC,EAChC,KAA2B;QAE3B,MAAM,YAAY,GAAoB,MAAM,QAAQ,CAAC,QAAQ,CAAC,iBAAS,CAAC,CAAC;QAEzE,gEAAgE;QAChE,wEAAwE;QACxE,gDAAgD;QAChD,IAAA,iBAAM,EACL,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,EAC1B,KAAK,CAAC,mFAAmF,CACzF,CAAC;QAEF,MAAM,OAAO,GAAG,KAAK,CAAC,IAAA,6BAAc,EAAC,YAAY,EAAE,MAAM,CAAC,CAA2B,CAAC;QACtF,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE;YACvC,YAAY,EAAE,IAAI,CAAC,YAAY;YAC/B,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAC,CAAC;QACH,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;;AAxEF,sDAyEC;AArEuB,yBAAG,GAAG,aAAa,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport type {\n\tIExperimentalIncrementalSummaryContext,\n\tITelemetryContext,\n\tMinimumVersionForCollab,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport type { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\n\nimport type { IJsonCodec } from \"../codec/index.js\";\nimport type { ChangeFamily, ChangeFamilyEditor, SchemaAndPolicy } from \"../core/index.js\";\nimport type { IdentifierHealingConfig, JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport type { EditManager, SummaryData } from \"./editManager.js\";\nimport type { EditManagerEncodingContext } from \"./editManagerCodecs.js\";\nimport type {\n\tSummarizable,\n\tSummaryElementParser,\n\tSummaryElementStringifier,\n} from \"./summaryTypes.js\";\nimport { VersionedSummarizer } from \"./versionedSummarizer.js\";\n\nexport const stringKey = \"String\";\n\n/**\n * The versions for the edit manager summary format.\n */\nexport const enum EditManagerSummaryFormatVersion {\n\t/**\n\t * This version represents summary format before summary versioning was introduced.\n\t */\n\tv1 = 1,\n\t/**\n\t * This version adds metadata to the summary. This is backward compatible with version 1.\n\t */\n\tv2 = 2,\n\t/**\n\t * The latest version of the summary. Must be updated when a new version is added.\n\t */\n\tvLatest = v2,\n}\n\nconst supportedVersions = new Set<EditManagerSummaryFormatVersion>([\n\tEditManagerSummaryFormatVersion.v1,\n\tEditManagerSummaryFormatVersion.v2,\n]);\n\n/**\n * Returns the summary version to use as per the given minimum version for collab.\n */\nfunction minVersionToEditManagerSummaryFormatVersion(\n\tversion: MinimumVersionForCollab,\n): EditManagerSummaryFormatVersion {\n\t// Currently, version 2 is written which adds metadata blob to the summary.\n\treturn EditManagerSummaryFormatVersion.v2;\n}\n\n/**\n * Provides methods for summarizing and loading an `EditManager`\n */\nexport class EditManagerSummarizer<TChangeset>\n\textends VersionedSummarizer<EditManagerSummaryFormatVersion>\n\timplements Summarizable\n{\n\tpublic static readonly key = \"EditManager\";\n\tpublic constructor(\n\t\tprivate readonly editManager: EditManager<\n\t\t\tChangeFamilyEditor,\n\t\t\tTChangeset,\n\t\t\tChangeFamily<ChangeFamilyEditor, TChangeset>\n\t\t>,\n\t\tprivate readonly codec: IJsonCodec<\n\t\t\tSummaryData<TChangeset>,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tJsonCompatibleReadOnly,\n\t\t\tEditManagerEncodingContext\n\t\t>,\n\t\tprivate readonly idCompressor: IIdCompressor,\n\t\tminVersionForCollab: MinimumVersionForCollab,\n\t\tprivate readonly schemaAndPolicy?: SchemaAndPolicy,\n\t\t/** See {@link IdentifierHealingConfig}. */\n\t\tprivate readonly healing?: IdentifierHealingConfig,\n\t) {\n\t\tsuper(\n\t\t\tEditManagerSummarizer.key,\n\t\t\tminVersionToEditManagerSummaryFormatVersion(minVersionForCollab),\n\t\t\tsupportedVersions,\n\t\t\ttrue /* supportPreVersioningFormat */,\n\t\t);\n\t}\n\n\tprotected summarizeInternal(props: {\n\t\tstringify: SummaryElementStringifier;\n\t\tfullTree?: boolean;\n\t\ttrackState?: boolean;\n\t\ttelemetryContext?: ITelemetryContext;\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext;\n\t\tbuilder: SummaryTreeBuilder;\n\t}): void {\n\t\tconst { stringify, builder } = props;\n\t\tconst context: EditManagerEncodingContext = {\n\t\t\tidCompressor: this.idCompressor,\n\t\t\tschema: this.schemaAndPolicy,\n\t\t\tisSummary: true,\n\t\t\thealing: this.healing,\n\t\t};\n\t\tconst jsonCompatible = this.codec.encode(this.editManager.getSummaryData(), context);\n\t\tconst dataString = stringify(jsonCompatible);\n\t\tbuilder.addBlob(stringKey, dataString);\n\t}\n\n\tprotected async loadInternal(\n\t\tservices: IChannelStorageService,\n\t\tparse: SummaryElementParser,\n\t): Promise<void> {\n\t\tconst schemaBuffer: ArrayBufferLike = await services.readBlob(stringKey);\n\n\t\t// After the awaits, validate that the data is in a clean state.\n\t\t// This detects any data that could have been accidentally added through\n\t\t// invalid means and is about to be overwritten.\n\t\tassert(\n\t\t\tthis.editManager.isEmpty(),\n\t\t\t0x42c /* There should not already be stored EditManager data when loading from summary */,\n\t\t);\n\n\t\tconst summary = parse(bufferToString(schemaBuffer, \"utf8\")) as JsonCompatibleReadOnly;\n\t\tconst data = this.codec.decode(summary, {\n\t\t\tidCompressor: this.idCompressor,\n\t\t\tisSummary: true,\n\t\t\thealing: this.healing,\n\t\t});\n\t\tthis.editManager.loadSummaryData(data);\n\t}\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { onForkTransitive, SharedTreeBranch, type SharedTreeBranchChange, type SharedTreeBranchEvents, type BranchId, } from "./branch.js";
6
- export { TransactionResult, type Transactor, type TransactionEvents, TransactionStack, SquashingTransactionStack, type OnPush, type OnPop, } from "./transaction.js";
6
+ export { type ChangeProcessor, type OnPop, type OnPush, type SquashingTransactionOptions, type TransactionEvents, type Transactor, ChangeProcessorApplicability, SquashingTransactionStack, TransactionResult, TransactionStack, } from "./transaction.js";
7
7
  export { SharedTreeCore, type ClonableSchemaAndPolicy, type SharedTreeCoreOptionsInternal, type EnrichmentConfig, } from "./sharedTreeCore.js";
8
8
  export { SharedTreeSummaryFormatVersion, type SharedTreeSummarizableMetadata, type Summarizable, type SummaryElementParser, type SummaryElementStringifier, summarizablesMetadataKey, } from "./summaryTypes.js";
9
9
  export { VersionedSummarizer } from "./versionedSummarizer.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,GACb,MAAM,aAAa,CAAC;AAErB,OAAO,EACN,iBAAiB,EACjB,KAAK,UAAU,EACf,KAAK,iBAAiB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,KAAK,MAAM,EACX,KAAK,KAAK,GACV,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,cAAc,EACd,KAAK,uBAAuB,EAC5B,KAAK,6BAA6B,EAClC,KAAK,gBAAgB,GAC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oB,CAAC;AAC5B,OAAO,EACN,oBAAoB,EACpB,8BAA8B,GAC9B,MAAM,oBAAoB,CAAC"}
@@ -4,14 +4,15 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.supportedMessageFormatVersions = exports.MessageFormatVersion = exports.messageCodecName = exports.makeMessageCodecBuilder = exports.getCodecTreeForMessageFormatWithChange = exports.minimumPossibleSequenceNumber = exports.EditManager = exports.EditManagerSummarizer = exports.supportedEditManagerFormatVersions = exports.EditManagerFormatVersion = exports.editManagerCodecName = exports.getCodecTreeForEditManagerFormatWithChange = exports.makeEditManagerCodecBuilder = exports.DefaultResubmitMachine = exports.VersionedSummarizer = exports.summarizablesMetadataKey = exports.SharedTreeSummaryFormatVersion = exports.SharedTreeCore = exports.SquashingTransactionStack = exports.TransactionStack = exports.TransactionResult = exports.SharedTreeBranch = exports.onForkTransitive = void 0;
7
+ exports.supportedMessageFormatVersions = exports.MessageFormatVersion = exports.messageCodecName = exports.makeMessageCodecBuilder = exports.getCodecTreeForMessageFormatWithChange = exports.minimumPossibleSequenceNumber = exports.EditManager = exports.EditManagerSummarizer = exports.supportedEditManagerFormatVersions = exports.EditManagerFormatVersion = exports.editManagerCodecName = exports.getCodecTreeForEditManagerFormatWithChange = exports.makeEditManagerCodecBuilder = exports.DefaultResubmitMachine = exports.VersionedSummarizer = exports.summarizablesMetadataKey = exports.SharedTreeSummaryFormatVersion = exports.SharedTreeCore = exports.TransactionStack = exports.TransactionResult = exports.SquashingTransactionStack = exports.ChangeProcessorApplicability = exports.SharedTreeBranch = exports.onForkTransitive = void 0;
8
8
  var branch_js_1 = require("./branch.js");
9
9
  Object.defineProperty(exports, "onForkTransitive", { enumerable: true, get: function () { return branch_js_1.onForkTransitive; } });
10
10
  Object.defineProperty(exports, "SharedTreeBranch", { enumerable: true, get: function () { return branch_js_1.SharedTreeBranch; } });
11
11
  var transaction_js_1 = require("./transaction.js");
12
+ Object.defineProperty(exports, "ChangeProcessorApplicability", { enumerable: true, get: function () { return transaction_js_1.ChangeProcessorApplicability; } });
13
+ Object.defineProperty(exports, "SquashingTransactionStack", { enumerable: true, get: function () { return transaction_js_1.SquashingTransactionStack; } });
12
14
  Object.defineProperty(exports, "TransactionResult", { enumerable: true, get: function () { return transaction_js_1.TransactionResult; } });
13
15
  Object.defineProperty(exports, "TransactionStack", { enumerable: true, get: function () { return transaction_js_1.TransactionStack; } });
14
- Object.defineProperty(exports, "SquashingTransactionStack", { enumerable: true, get: function () { return transaction_js_1.SquashingTransactionStack; } });
15
16
  var sharedTreeCore_js_1 = require("./sharedTreeCore.js");
16
17
  Object.defineProperty(exports, "SharedTreeCore", { enumerable: true, get: function () { return sharedTreeCore_js_1.SharedTreeCore; } });
17
18
  var summaryTypes_js_1 = require("./summaryTypes.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree-core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAMqB;AALpB,6GAAA,gBAAgB,OAAA;AAChB,6GAAA,gBAAgB,OAAA;AAMjB,mDAQ0B;AAPzB,mHAAA,iBAAiB,OAAA;AAGjB,kHAAA,gBAAgB,OAAA;AAChB,2HAAA,yBAAyB,OAAA;AAK1B,yDAK6B;AAJ5B,mHAAA,cAAc,OAAA;AAKf,qDAO2B;AAN1B,iIAAA,8BAA8B,OAAA;AAK9B,2HAAA,wBAAwB,OAAA;AAEzB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA;AAG5B,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAI/B,+DAIgC;AAH/B,mIAAA,2BAA2B,OAAA;AAC3B,kJAAA,0CAA0C,OAAA;AAC1C,4HAAA,oBAAoB,OAAA;AAErB,6EAGuC;AAFtC,uIAAA,wBAAwB,OAAA;AACxB,iJAAA,kCAAkC,OAAA;AAEnC,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA;AAC9B,mDAK0B;AAJzB,6GAAA,WAAW,OAAA;AACX,+HAAA,6BAA6B,OAAA;AAa9B,uDAK4B;AAJ3B,0IAAA,sCAAsC,OAAA;AACtC,2HAAA,uBAAuB,OAAA;AACvB,oHAAA,gBAAgB,OAAA;AAGjB,uDAG4B;AAF3B,wHAAA,oBAAoB,OAAA;AACpB,kIAAA,8BAA8B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tonForkTransitive,\n\tSharedTreeBranch,\n\ttype SharedTreeBranchChange,\n\ttype SharedTreeBranchEvents,\n\ttype BranchId,\n} from \"./branch.js\";\n\nexport {\n\tTransactionResult,\n\ttype Transactor,\n\ttype TransactionEvents,\n\tTransactionStack,\n\tSquashingTransactionStack,\n\ttype OnPush,\n\ttype OnPop,\n} from \"./transaction.js\";\n\nexport {\n\tSharedTreeCore,\n\ttype ClonableSchemaAndPolicy,\n\ttype SharedTreeCoreOptionsInternal,\n\ttype EnrichmentConfig,\n} from \"./sharedTreeCore.js\";\nexport {\n\tSharedTreeSummaryFormatVersion,\n\ttype SharedTreeSummarizableMetadata,\n\ttype Summarizable,\n\ttype SummaryElementParser,\n\ttype SummaryElementStringifier,\n\tsummarizablesMetadataKey,\n} from \"./summaryTypes.js\";\nexport { VersionedSummarizer } from \"./versionedSummarizer.js\";\n\nexport type { ResubmitMachine } from \"./resubmitMachine.js\";\nexport { DefaultResubmitMachine } from \"./defaultResubmitMachine.js\";\n\nexport { type ChangeEnricher } from \"./changeEnricher.js\";\n\nexport {\n\tmakeEditManagerCodecBuilder,\n\tgetCodecTreeForEditManagerFormatWithChange,\n\teditManagerCodecName,\n} from \"./editManagerCodecs.js\";\nexport {\n\tEditManagerFormatVersion,\n\tsupportedEditManagerFormatVersions,\n} from \"./editManagerFormatCommons.js\";\nexport { EditManagerSummarizer } from \"./editManagerSummarizer.js\";\nexport {\n\tEditManager,\n\tminimumPossibleSequenceNumber,\n\ttype SummaryData,\n\ttype SharedBranchSummaryData,\n} from \"./editManager.js\";\nexport type {\n\tCommit,\n\tSeqNumber,\n\tSequencedCommit,\n\tSummarySessionBranch,\n\tEncodedCommit,\n} from \"./editManagerFormatCommons.js\";\n\nexport type { DecodedMessage } from \"./messageTypes.js\";\nexport {\n\tgetCodecTreeForMessageFormatWithChange,\n\tmakeMessageCodecBuilder,\n\tmessageCodecName,\n\ttype MessageEncodingContext,\n} from \"./messageCodecs.js\";\nexport {\n\tMessageFormatVersion,\n\tsupportedMessageFormatVersions,\n} from \"./messageFormat.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared-tree-core/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAMqB;AALpB,6GAAA,gBAAgB,OAAA;AAChB,6GAAA,gBAAgB,OAAA;AAMjB,mDAW0B;AAJzB,8HAAA,4BAA4B,OAAA;AAC5B,2HAAA,yBAAyB,OAAA;AACzB,mHAAA,iBAAiB,OAAA;AACjB,kHAAA,gBAAgB,OAAA;AAGjB,yDAK6B;AAJ5B,mHAAA,cAAc,OAAA;AAKf,qDAO2B;AAN1B,iIAAA,8BAA8B,OAAA;AAK9B,2HAAA,wBAAwB,OAAA;AAEzB,mEAA+D;AAAtD,6HAAA,mBAAmB,OAAA;AAG5B,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAI/B,+DAIgC;AAH/B,mIAAA,2BAA2B,OAAA;AAC3B,kJAAA,0CAA0C,OAAA;AAC1C,4HAAA,oBAAoB,OAAA;AAErB,6EAGuC;AAFtC,uIAAA,wBAAwB,OAAA;AACxB,iJAAA,kCAAkC,OAAA;AAEnC,uEAAmE;AAA1D,iIAAA,qBAAqB,OAAA;AAC9B,mDAK0B;AAJzB,6GAAA,WAAW,OAAA;AACX,+HAAA,6BAA6B,OAAA;AAa9B,uDAK4B;AAJ3B,0IAAA,sCAAsC,OAAA;AACtC,2HAAA,uBAAuB,OAAA;AACvB,oHAAA,gBAAgB,OAAA;AAGjB,uDAG4B;AAF3B,wHAAA,oBAAoB,OAAA;AACpB,kIAAA,8BAA8B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tonForkTransitive,\n\tSharedTreeBranch,\n\ttype SharedTreeBranchChange,\n\ttype SharedTreeBranchEvents,\n\ttype BranchId,\n} from \"./branch.js\";\n\nexport {\n\ttype ChangeProcessor,\n\ttype OnPop,\n\ttype OnPush,\n\ttype SquashingTransactionOptions,\n\ttype TransactionEvents,\n\ttype Transactor,\n\tChangeProcessorApplicability,\n\tSquashingTransactionStack,\n\tTransactionResult,\n\tTransactionStack,\n} from \"./transaction.js\";\n\nexport {\n\tSharedTreeCore,\n\ttype ClonableSchemaAndPolicy,\n\ttype SharedTreeCoreOptionsInternal,\n\ttype EnrichmentConfig,\n} from \"./sharedTreeCore.js\";\nexport {\n\tSharedTreeSummaryFormatVersion,\n\ttype SharedTreeSummarizableMetadata,\n\ttype Summarizable,\n\ttype SummaryElementParser,\n\ttype SummaryElementStringifier,\n\tsummarizablesMetadataKey,\n} from \"./summaryTypes.js\";\nexport { VersionedSummarizer } from \"./versionedSummarizer.js\";\n\nexport type { ResubmitMachine } from \"./resubmitMachine.js\";\nexport { DefaultResubmitMachine } from \"./defaultResubmitMachine.js\";\n\nexport { type ChangeEnricher } from \"./changeEnricher.js\";\n\nexport {\n\tmakeEditManagerCodecBuilder,\n\tgetCodecTreeForEditManagerFormatWithChange,\n\teditManagerCodecName,\n} from \"./editManagerCodecs.js\";\nexport {\n\tEditManagerFormatVersion,\n\tsupportedEditManagerFormatVersions,\n} from \"./editManagerFormatCommons.js\";\nexport { EditManagerSummarizer } from \"./editManagerSummarizer.js\";\nexport {\n\tEditManager,\n\tminimumPossibleSequenceNumber,\n\ttype SummaryData,\n\ttype SharedBranchSummaryData,\n} from \"./editManager.js\";\nexport type {\n\tCommit,\n\tSeqNumber,\n\tSequencedCommit,\n\tSummarySessionBranch,\n\tEncodedCommit,\n} from \"./editManagerFormatCommons.js\";\n\nexport type { DecodedMessage } from \"./messageTypes.js\";\nexport {\n\tgetCodecTreeForMessageFormatWithChange,\n\tmakeMessageCodecBuilder,\n\tmessageCodecName,\n\ttype MessageEncodingContext,\n} from \"./messageCodecs.js\";\nexport {\n\tMessageFormatVersion,\n\tsupportedMessageFormatVersions,\n} from \"./messageFormat.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"messageCodecVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAa,MAAM,mBAAmB,CAAC;AAC/E,OAAO,KAAK,EACX,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,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,OAAO,oBAAoB,CAAC,eAAe,GAClD,cAAc,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,sBAAsB,CAAC,CAwFpE"}
1
+ {"version":3,"file":"messageCodecVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAa,MAAM,mBAAmB,CAAC;AAC/E,OAAO,KAAK,EACX,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,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,OAAO,oBAAoB,CAAC,eAAe,GAClD,cAAc,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,sBAAsB,CAAC,CA+FpE"}
@@ -42,6 +42,7 @@ function makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, versi
42
42
  return {
43
43
  originatorId: message.sessionId,
44
44
  branchId: (0, branchIdCodec_js_1.encodeBranchId)(context.idCompressor, message.branchId),
45
+ branchName: message.branchName,
45
46
  version,
46
47
  };
47
48
  }
@@ -51,7 +52,7 @@ function makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, versi
51
52
  }
52
53
  },
53
54
  decode: (encoded, context) => {
54
- const { revision: encodedRevision, originatorId, changeset, branchId: encodedBranchId, } = encoded;
55
+ const { revision: encodedRevision, originatorId, changeset, branchId: encodedBranchId, branchName: encodedBranchName, } = encoded;
55
56
  const changeContext = {
56
57
  originatorId,
57
58
  revision: undefined,
@@ -60,7 +61,12 @@ function makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, versi
60
61
  };
61
62
  const branchId = (0, branchIdCodec_js_1.decodeBranchId)(context.idCompressor, encodedBranchId, changeContext);
62
63
  if (changeset === undefined) {
63
- return { type: "branch", sessionId: originatorId, branchId };
64
+ return {
65
+ type: "branch",
66
+ sessionId: originatorId,
67
+ branchId,
68
+ branchName: encodedBranchName,
69
+ };
64
70
  }
65
71
  (0, internal_1.assert)(encodedRevision !== undefined, 0xc6a /* Commit messages must have a revision */);
66
72
  const revision = revisionTagCodec.decode(encodedRevision, changeContext);
@@ -1 +1 @@
1
- {"version":3,"file":"messageCodecVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecVSharedBranches.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,kEAA8E;AAC9E,gEAA0C;AAY1C,yDAAoE;AAGpE,uFAA4D;AAG5D,SAAgB,kCAAkC,CACjD,WAA0C,EAC1C,gBAKC,EACD,OAAoD;IAEpD,MAAM,MAAM,GAAe,IAAA,yCAAO,EAAC,WAAW,CAAC,aAAa,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAE5E,OAAO;QACN,MAAM;QACN,MAAM,EAAE,CACP,OAAmC,EACnC,OAA+B,EACsB,EAAE;YACvD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;YAC1B,QAAQ,IAAI,EAAE,CAAC;gBACd,KAAK,QAAQ,CAAC,CAAC,CAAC;oBACf,MAAM,aAAa,GAA0B;wBAC5C,YAAY,EAAE,OAAO,CAAC,SAAS;wBAC/B,MAAM,EAAE,OAAO,CAAC,MAAM;wBACtB,YAAY,EAAE,OAAO,CAAC,YAAY;wBAClC,QAAQ,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ;wBACjC,SAAS,EAAE,KAAK;qBAChB,CAAC;oBAEF,OAAO;wBACN,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;4BAC1D,YAAY,EAAE,OAAO,CAAC,SAAS;4BAC/B,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,QAAQ,EAAE,SAAS;4BACnB,SAAS,EAAE,KAAK;yBAChB,CAAC;wBACF,YAAY,EAAE,OAAO,CAAC,SAAS;wBAC/B,SAAS,EAAE,WAA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zE,OAAO;gBACN,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;wBAClC,SAAS,EAAE,KAAK;qBAChB,CAAC;iBACF;gBACD,QAAQ;gBACR,SAAS,EAAE,YAAY;aACvB,CAAC;QACH,CAAC;KACD,CAAC;AACH,CAAC;AAjGD,gFAiGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport * as Type from \"@sinclair/typebox\";\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport type { CodecAndSchema, IJsonCodec, Versioned } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tChangeFamilyCodec,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../core/index.js\";\nimport type { JsonCompatibleReadOnlyObject } from \"../util/index.js\";\n\nimport { decodeBranchId, encodeBranchId } from \"./branchIdCodec.js\";\nimport type { MessageEncodingContext } from \"./messageCodecs.js\";\nimport type { MessageFormatVersion } from \"./messageFormat.js\";\nimport { Message } from \"./messageFormatVSharedBranches.js\";\nimport type { DecodedMessage } from \"./messageTypes.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\tversion: typeof MessageFormatVersion.vSharedBranches,\n): CodecAndSchema<DecodedMessage<TChangeset>, MessageEncodingContext> {\n\tconst schema: TAnySchema = Message(changeCodec.encodedSchema ?? Type.Any());\n\n\treturn {\n\t\tschema,\n\t\tencode: (\n\t\t\tmessage: DecodedMessage<TChangeset>,\n\t\t\tcontext: MessageEncodingContext,\n\t\t): Message & JsonCompatibleReadOnlyObject & Versioned => {\n\t\t\tconst type = message.type;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"commit\": {\n\t\t\t\t\tconst changeContext: ChangeEncodingContext = {\n\t\t\t\t\t\toriginatorId: message.sessionId,\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: message.commit.revision,\n\t\t\t\t\t\tisSummary: false,\n\t\t\t\t\t};\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\trevision: revisionTagCodec.encode(message.commit.revision, {\n\t\t\t\t\t\t\toriginatorId: message.sessionId,\n\t\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t\t\tisSummary: false,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\toriginatorId: message.sessionId,\n\t\t\t\t\t\tchangeset: changeCodec.encode(message.commit.change, changeContext),\n\t\t\t\t\t\tbranchId: encodeBranchId(context.idCompressor, message.branchId),\n\t\t\t\t\t\tversion,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tcase \"branch\": {\n\t\t\t\t\treturn {\n\t\t\t\t\t\toriginatorId: message.sessionId,\n\t\t\t\t\t\tbranchId: encodeBranchId(context.idCompressor, message.branchId),\n\t\t\t\t\t\tversion,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tunreachableCase(type);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdecode: (\n\t\t\tencoded: Message & JsonCompatibleReadOnlyObject & Versioned,\n\t\t\tcontext: MessageEncodingContext,\n\t\t): DecodedMessage<TChangeset> => {\n\t\t\tconst {\n\t\t\t\trevision: encodedRevision,\n\t\t\t\toriginatorId,\n\t\t\t\tchangeset,\n\t\t\t\tbranchId: encodedBranchId,\n\t\t\t} = encoded;\n\n\t\t\tconst changeContext: ChangeEncodingContext = {\n\t\t\t\toriginatorId,\n\t\t\t\trevision: undefined,\n\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\tisSummary: false,\n\t\t\t};\n\n\t\t\tconst branchId = decodeBranchId(context.idCompressor, encodedBranchId, changeContext);\n\n\t\t\tif (changeset === undefined) {\n\t\t\t\treturn { type: \"branch\", sessionId: originatorId, branchId };\n\t\t\t}\n\n\t\t\tassert(encodedRevision !== undefined, 0xc6a /* Commit messages must have a revision */);\n\t\t\tconst revision = revisionTagCodec.decode(encodedRevision, changeContext);\n\n\t\t\treturn {\n\t\t\t\ttype: \"commit\",\n\t\t\t\tcommit: {\n\t\t\t\t\trevision,\n\t\t\t\t\tchange: changeCodec.decode(changeset, {\n\t\t\t\t\t\toriginatorId,\n\t\t\t\t\t\trevision,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\tisSummary: false,\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t\tbranchId,\n\t\t\t\tsessionId: originatorId,\n\t\t\t};\n\t\t},\n\t};\n}\n"]}
1
+ {"version":3,"file":"messageCodecVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecVSharedBranches.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH,kEAA8E;AAC9E,gEAA0C;AAY1C,yDAAoE;AAGpE,uFAA4D;AAG5D,SAAgB,kCAAkC,CACjD,WAA0C,EAC1C,gBAKC,EACD,OAAoD;IAEpD,MAAM,MAAM,GAAe,IAAA,yCAAO,EAAC,WAAW,CAAC,aAAa,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAE5E,OAAO;QACN,MAAM;QACN,MAAM,EAAE,CACP,OAAmC,EACnC,OAA+B,EACsB,EAAE;YACvD,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;YAC1B,QAAQ,IAAI,EAAE,CAAC;gBACd,KAAK,QAAQ,CAAC,CAAC,CAAC;oBACf,MAAM,aAAa,GAA0B;wBAC5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AAO,CAAC;YAEZ,MAAM,aAAa,GAA0B;gBAC5C,YAAY;gBACZ,QAAQ,EAAE,SAAS;gBACnB,YAAY,EAAE,OAAO,CAAC,YAAY;gBAClC,SAAS,EAAE,KAAK;aAChB,CAAC;YAEF,MAAM,QAAQ,GAAG,IAAA,iCAAc,EAAC,OAAO,CAAC,YAAY,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;YAEtF,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;gBAC7B,OAAO;oBACN,IAAI,EAAE,QAAQ;oBACd,SAAS,EAAE,YAAY;oBACvB,QAAQ;oBACR,UAAU,EAAE,iBAAiB;iBAC7B,CAAC;YACH,CAAC;YAED,IAAA,iBAAM,EAAC,eAAe,KAAK,SAAS,EAAE,KAAK,CAAC,0CAA0C,CAAC,CAAC;YACxF,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;YAEzE,OAAO;gBACN,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;wBAClC,SAAS,EAAE,KAAK;qBAChB,CAAC;iBACF;gBACD,QAAQ;gBACR,SAAS,EAAE,YAAY;aACvB,CAAC;QACH,CAAC;KACD,CAAC;AACH,CAAC;AAxGD,gFAwGC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport * as Type from \"@sinclair/typebox\";\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport type { CodecAndSchema, IJsonCodec, Versioned } from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tChangeFamilyCodec,\n\tEncodedRevisionTag,\n\tRevisionTag,\n} from \"../core/index.js\";\nimport type { JsonCompatibleReadOnlyObject } from \"../util/index.js\";\n\nimport { decodeBranchId, encodeBranchId } from \"./branchIdCodec.js\";\nimport type { MessageEncodingContext } from \"./messageCodecs.js\";\nimport type { MessageFormatVersion } from \"./messageFormat.js\";\nimport { Message } from \"./messageFormatVSharedBranches.js\";\nimport type { DecodedMessage } from \"./messageTypes.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\tversion: typeof MessageFormatVersion.vSharedBranches,\n): CodecAndSchema<DecodedMessage<TChangeset>, MessageEncodingContext> {\n\tconst schema: TAnySchema = Message(changeCodec.encodedSchema ?? Type.Any());\n\n\treturn {\n\t\tschema,\n\t\tencode: (\n\t\t\tmessage: DecodedMessage<TChangeset>,\n\t\t\tcontext: MessageEncodingContext,\n\t\t): Message & JsonCompatibleReadOnlyObject & Versioned => {\n\t\t\tconst type = message.type;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"commit\": {\n\t\t\t\t\tconst changeContext: ChangeEncodingContext = {\n\t\t\t\t\t\toriginatorId: message.sessionId,\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: message.commit.revision,\n\t\t\t\t\t\tisSummary: false,\n\t\t\t\t\t};\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\trevision: revisionTagCodec.encode(message.commit.revision, {\n\t\t\t\t\t\t\toriginatorId: message.sessionId,\n\t\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\t\trevision: undefined,\n\t\t\t\t\t\t\tisSummary: false,\n\t\t\t\t\t\t}),\n\t\t\t\t\t\toriginatorId: message.sessionId,\n\t\t\t\t\t\tchangeset: changeCodec.encode(message.commit.change, changeContext),\n\t\t\t\t\t\tbranchId: encodeBranchId(context.idCompressor, message.branchId),\n\t\t\t\t\t\tversion,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tcase \"branch\": {\n\t\t\t\t\treturn {\n\t\t\t\t\t\toriginatorId: message.sessionId,\n\t\t\t\t\t\tbranchId: encodeBranchId(context.idCompressor, message.branchId),\n\t\t\t\t\t\tbranchName: message.branchName,\n\t\t\t\t\t\tversion,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tunreachableCase(type);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdecode: (\n\t\t\tencoded: Message & JsonCompatibleReadOnlyObject & Versioned,\n\t\t\tcontext: MessageEncodingContext,\n\t\t): DecodedMessage<TChangeset> => {\n\t\t\tconst {\n\t\t\t\trevision: encodedRevision,\n\t\t\t\toriginatorId,\n\t\t\t\tchangeset,\n\t\t\t\tbranchId: encodedBranchId,\n\t\t\t\tbranchName: encodedBranchName,\n\t\t\t} = encoded;\n\n\t\t\tconst changeContext: ChangeEncodingContext = {\n\t\t\t\toriginatorId,\n\t\t\t\trevision: undefined,\n\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\tisSummary: false,\n\t\t\t};\n\n\t\t\tconst branchId = decodeBranchId(context.idCompressor, encodedBranchId, changeContext);\n\n\t\t\tif (changeset === undefined) {\n\t\t\t\treturn {\n\t\t\t\t\ttype: \"branch\",\n\t\t\t\t\tsessionId: originatorId,\n\t\t\t\t\tbranchId,\n\t\t\t\t\tbranchName: encodedBranchName,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tassert(encodedRevision !== undefined, 0xc6a /* Commit messages must have a revision */);\n\t\t\tconst revision = revisionTagCodec.decode(encodedRevision, changeContext);\n\n\t\t\treturn {\n\t\t\t\ttype: \"commit\",\n\t\t\t\tcommit: {\n\t\t\t\t\trevision,\n\t\t\t\t\tchange: changeCodec.decode(changeset, {\n\t\t\t\t\t\toriginatorId,\n\t\t\t\t\t\trevision,\n\t\t\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\t\t\tisSummary: false,\n\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t\tbranchId,\n\t\t\t\tsessionId: originatorId,\n\t\t\t};\n\t\t},\n\t};\n}\n"]}
@@ -14,7 +14,7 @@ export declare const MessageFormatVersion: {
14
14
  readonly v4: import("../util/brand.js").Brand<4, "MessageFormatVersion">;
15
15
  readonly v5: import("../util/brand.js").Brand<5, "MessageFormatVersion">;
16
16
  readonly v6: import("../util/brand.js").Brand<6, "MessageFormatVersion">;
17
- readonly vSharedBranches: import("../util/brand.js").Brand<"shared-branches|v0.1", "MessageFormatVersion">;
17
+ readonly vSharedBranches: import("../util/brand.js").Brand<"shared-branches|v0.2", "MessageFormatVersion">;
18
18
  };
19
19
  export type MessageFormatVersion = Values<typeof MessageFormatVersion>;
20
20
  export declare const supportedMessageFormatVersions: ReadonlySet<MessageFormatVersion>;
@@ -57,7 +57,7 @@ exports.MessageFormatVersion = (0, index_js_1.strictEnum)("MessageFormatVersion"
57
57
  * Not yet released.
58
58
  * Only used for testing shared branches.
59
59
  */
60
- vSharedBranches: "shared-branches|v0.1",
60
+ vSharedBranches: "shared-branches|v0.2",
61
61
  });
62
62
  exports.supportedMessageFormatVersions = new Set([
63
63
  exports.MessageFormatVersion.v3,
@@ -1 +1 @@
1
- {"version":3,"file":"messageFormat.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA2D;AAE3D;;GAEG;AACU,QAAA,oBAAoB,GAAG,IAAA,qBAAU,EAAC,sBAAsB,EAAE;IACtE;;;;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,CAAC;IACL;;;OAGG;IACH,eAAe,EAAE,sBAAsB;CACvC,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAsC,IAAI,GAAG,CAAC;IACxF,4BAAoB,CAAC,EAAE;IACvB,4BAAoB,CAAC,EAAE;IACvB,4BAAoB,CAAC,EAAE;IACvB,4BAAoB,CAAC,eAAe;CACpC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strictEnum, type Values } from \"../util/index.js\";\n\n/**\n * The format version for the message.\n */\nexport const MessageFormatVersion = strictEnum(\"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 * Introduced and made available for writing in 2.80.0\n\t * Adds support for \"no change\" constraints.\n\t */\n\tv6: 6,\n\t/**\n\t * Not yet released.\n\t * Only used for testing shared branches.\n\t */\n\tvSharedBranches: \"shared-branches|v0.1\",\n});\nexport type MessageFormatVersion = Values<typeof MessageFormatVersion>;\nexport const supportedMessageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set([\n\tMessageFormatVersion.v3,\n\tMessageFormatVersion.v4,\n\tMessageFormatVersion.v6,\n\tMessageFormatVersion.vSharedBranches,\n]);\n"]}
1
+ {"version":3,"file":"messageFormat.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormat.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA2D;AAE3D;;GAEG;AACU,QAAA,oBAAoB,GAAG,IAAA,qBAAU,EAAC,sBAAsB,EAAE;IACtE;;;;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,CAAC;IACL;;;OAGG;IACH,eAAe,EAAE,sBAAsB;CACvC,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAsC,IAAI,GAAG,CAAC;IACxF,4BAAoB,CAAC,EAAE;IACvB,4BAAoB,CAAC,EAAE;IACvB,4BAAoB,CAAC,EAAE;IACvB,4BAAoB,CAAC,eAAe;CACpC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strictEnum, type Values } from \"../util/index.js\";\n\n/**\n * The format version for the message.\n */\nexport const MessageFormatVersion = strictEnum(\"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 * Introduced and made available for writing in 2.80.0\n\t * Adds support for \"no change\" constraints.\n\t */\n\tv6: 6,\n\t/**\n\t * Not yet released.\n\t * Only used for testing shared branches.\n\t */\n\tvSharedBranches: \"shared-branches|v0.2\",\n});\nexport type MessageFormatVersion = Values<typeof MessageFormatVersion>;\nexport const supportedMessageFormatVersions: ReadonlySet<MessageFormatVersion> = new Set([\n\tMessageFormatVersion.v3,\n\tMessageFormatVersion.v4,\n\tMessageFormatVersion.v6,\n\tMessageFormatVersion.vSharedBranches,\n]);\n"]}