@fluidframework/tree 2.101.1 → 2.103.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 (609) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/api-report/tree.alpha.api.md +19 -0
  3. package/dist/codec/codec.d.ts +22 -53
  4. package/dist/codec/codec.d.ts.map +1 -1
  5. package/dist/codec/codec.js +7 -44
  6. package/dist/codec/codec.js.map +1 -1
  7. package/dist/codec/index.d.ts +1 -1
  8. package/dist/codec/index.d.ts.map +1 -1
  9. package/dist/codec/index.js +2 -2
  10. package/dist/codec/index.js.map +1 -1
  11. package/dist/codec/versioned/codec.d.ts +56 -28
  12. package/dist/codec/versioned/codec.d.ts.map +1 -1
  13. package/dist/codec/versioned/codec.js +29 -12
  14. package/dist/codec/versioned/codec.js.map +1 -1
  15. package/dist/codec/versioned/format.d.ts +5 -4
  16. package/dist/codec/versioned/format.d.ts.map +1 -1
  17. package/dist/codec/versioned/format.js +26 -3
  18. package/dist/codec/versioned/format.js.map +1 -1
  19. package/dist/codec/versioned/index.d.ts +1 -1
  20. package/dist/codec/versioned/index.d.ts.map +1 -1
  21. package/dist/codec/versioned/index.js +2 -2
  22. package/dist/codec/versioned/index.js.map +1 -1
  23. package/dist/core/rebase/types.d.ts +4 -3
  24. package/dist/core/rebase/types.d.ts.map +1 -1
  25. package/dist/core/rebase/types.js +27 -4
  26. package/dist/core/rebase/types.js.map +1 -1
  27. package/dist/core/schema-stored/formatV1.d.ts +16 -15
  28. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  29. package/dist/core/schema-stored/formatV1.js +31 -8
  30. package/dist/core/schema-stored/formatV1.js.map +1 -1
  31. package/dist/core/schema-stored/formatV2.d.ts +29 -28
  32. package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
  33. package/dist/core/schema-stored/formatV2.js +33 -10
  34. package/dist/core/schema-stored/formatV2.js.map +1 -1
  35. package/dist/core/tree/deltaUtil.d.ts +2 -2
  36. package/dist/core/tree/deltaUtil.js +2 -2
  37. package/dist/core/tree/deltaUtil.js.map +1 -1
  38. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  39. package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -2
  40. package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  41. package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  42. package/dist/core/tree/detachedFieldIndexCodecV2.js +4 -2
  43. package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  44. package/dist/core/tree/detachedFieldIndexCodecs.d.ts +3 -3
  45. package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  46. package/dist/core/tree/detachedFieldIndexCodecs.js +1 -1
  47. package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  48. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +11 -10
  49. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  50. package/dist/core/tree/detachedFieldIndexFormatCommon.js +33 -10
  51. package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  52. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +7 -6
  53. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  54. package/dist/core/tree/detachedFieldIndexFormatV2.js +25 -2
  55. package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  56. package/dist/core/tree/persistedTreeTextFormat.d.ts +19 -18
  57. package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  58. package/dist/core/tree/persistedTreeTextFormat.js +33 -10
  59. package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
  60. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +38 -1
  61. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  62. package/dist/feature-libraries/chunked-forest/chunkTree.js +63 -5
  63. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  64. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  65. package/dist/feature-libraries/chunked-forest/chunkedForest.js +18 -4
  66. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  67. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +34 -2
  68. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  69. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +106 -3
  70. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  71. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +5 -5
  72. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  73. package/dist/feature-libraries/chunked-forest/codec/codecs.js +2 -2
  74. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  75. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +7 -7
  76. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  77. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +13 -12
  79. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
  80. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js +36 -13
  81. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
  82. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +36 -35
  83. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -1
  84. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js +41 -18
  85. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
  86. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +35 -14
  87. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -1
  88. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js +35 -6
  89. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
  90. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.d.ts +106 -0
  91. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.d.ts.map +1 -0
  92. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js +67 -0
  93. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js.map +1 -0
  94. package/dist/feature-libraries/chunked-forest/codec/format/index.d.ts +2 -1
  95. package/dist/feature-libraries/chunked-forest/codec/format/index.d.ts.map +1 -1
  96. package/dist/feature-libraries/chunked-forest/codec/format/index.js +5 -1
  97. package/dist/feature-libraries/chunked-forest/codec/format/index.js.map +1 -1
  98. package/dist/feature-libraries/chunked-forest/codec/format/versions.d.ts +38 -4
  99. package/dist/feature-libraries/chunked-forest/codec/format/versions.d.ts.map +1 -1
  100. package/dist/feature-libraries/chunked-forest/codec/format/versions.js +7 -1
  101. package/dist/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -1
  102. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +7 -7
  103. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  104. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js +1 -2
  105. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  106. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +66 -14
  107. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  108. package/dist/feature-libraries/chunked-forest/uniformChunk.js +101 -36
  109. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  110. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  111. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +36 -14
  112. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  113. package/dist/feature-libraries/forest-summary/codec.d.ts +5 -4
  114. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  115. package/dist/feature-libraries/forest-summary/codec.js +2 -2
  116. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  117. package/dist/feature-libraries/forest-summary/formatCommon.d.ts +6 -5
  118. package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  119. package/dist/feature-libraries/forest-summary/formatCommon.js +26 -3
  120. package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  121. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +4 -3
  122. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  123. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js +26 -3
  124. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  125. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +45 -44
  126. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  127. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js +48 -25
  128. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  129. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +23 -22
  130. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  131. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +29 -6
  132. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
  133. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +1 -1
  134. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  135. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  136. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +9 -8
  137. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  138. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +31 -8
  139. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
  140. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +14 -13
  141. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  142. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +34 -11
  143. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
  144. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +5 -4
  145. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  146. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js +25 -2
  147. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  148. package/dist/feature-libraries/schema-index/codec.d.ts +2 -2
  149. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  150. package/dist/feature-libraries/schema-index/codec.js +1 -1
  151. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  152. package/dist/feature-libraries/schema-index/formatV1.d.ts +15 -14
  153. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  154. package/dist/feature-libraries/schema-index/formatV1.js +27 -4
  155. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  156. package/dist/feature-libraries/schema-index/formatV2.d.ts +20 -19
  157. package/dist/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
  158. package/dist/feature-libraries/schema-index/formatV2.js +27 -4
  159. package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
  160. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  161. package/dist/feature-libraries/sequence-field/compose.js +1 -3
  162. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  163. package/dist/feature-libraries/sequence-field/formatV1.d.ts +283 -282
  164. package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  165. package/dist/feature-libraries/sequence-field/formatV1.js +63 -40
  166. package/dist/feature-libraries/sequence-field/formatV1.js.map +1 -1
  167. package/dist/feature-libraries/sequence-field/formatV2.d.ts +180 -179
  168. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  169. package/dist/feature-libraries/sequence-field/formatV2.js +55 -32
  170. package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
  171. package/dist/feature-libraries/sequence-field/formatV3.d.ts +126 -125
  172. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  173. package/dist/feature-libraries/sequence-field/formatV3.js +27 -4
  174. package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
  175. package/dist/index.d.ts +1 -1
  176. package/dist/index.d.ts.map +1 -1
  177. package/dist/index.js +3 -1
  178. package/dist/index.js.map +1 -1
  179. package/dist/packageVersion.d.ts +1 -1
  180. package/dist/packageVersion.js +1 -1
  181. package/dist/packageVersion.js.map +1 -1
  182. package/dist/shared-tree/isAuditableFromOutcome.d.ts +20 -0
  183. package/dist/shared-tree/isAuditableFromOutcome.d.ts.map +1 -0
  184. package/dist/shared-tree/isAuditableFromOutcome.js +36 -0
  185. package/dist/shared-tree/isAuditableFromOutcome.js.map +1 -0
  186. package/dist/shared-tree/sharedTree.d.ts +2 -2
  187. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  188. package/dist/shared-tree/sharedTree.js.map +1 -1
  189. package/dist/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
  190. package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  191. package/dist/shared-tree/sharedTreeChangeFormat.js +28 -5
  192. package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  193. package/dist/shared-tree/treeCheckout.d.ts +5 -3
  194. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  195. package/dist/shared-tree/treeCheckout.js +37 -8
  196. package/dist/shared-tree/treeCheckout.js.map +1 -1
  197. package/dist/shared-tree-core/editManager.d.ts +2 -2
  198. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  199. package/dist/shared-tree-core/editManager.js.map +1 -1
  200. package/dist/shared-tree-core/editManagerCodecs.d.ts +3 -3
  201. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  202. package/dist/shared-tree-core/editManagerCodecs.js +2 -2
  203. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  204. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +35 -34
  205. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  206. package/dist/shared-tree-core/editManagerFormatCommons.js +39 -16
  207. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  208. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +15 -15
  209. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  210. package/dist/shared-tree-core/editManagerFormatV1toV4.js +33 -10
  211. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  212. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +40 -40
  213. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  214. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +27 -4
  215. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  216. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  217. package/dist/shared-tree-core/messageCodecVSharedBranches.js +25 -2
  218. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  219. package/dist/shared-tree-core/messageCodecs.d.ts +3 -3
  220. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  221. package/dist/shared-tree-core/messageCodecs.js +2 -2
  222. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  223. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +5 -5
  224. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  225. package/dist/shared-tree-core/messageFormatV1ToV4.js +31 -8
  226. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  227. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -7
  228. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  229. package/dist/shared-tree-core/messageFormatVSharedBranches.js +29 -6
  230. package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  231. package/dist/simple-tree/core/treeNodeKernel.d.ts +5 -0
  232. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  233. package/dist/simple-tree/core/treeNodeKernel.js +62 -24
  234. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  235. package/dist/simple-tree/simpleSchemaFormatV1.d.ts +121 -120
  236. package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
  237. package/dist/simple-tree/simpleSchemaFormatV1.js +54 -31
  238. package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  239. package/dist/text/codePointUtils.d.ts +48 -0
  240. package/dist/text/codePointUtils.d.ts.map +1 -0
  241. package/dist/text/codePointUtils.js +80 -0
  242. package/dist/text/codePointUtils.js.map +1 -0
  243. package/dist/text/index.d.ts +1 -0
  244. package/dist/text/index.d.ts.map +1 -1
  245. package/dist/text/index.js +4 -1
  246. package/dist/text/index.js.map +1 -1
  247. package/dist/text/textDomain.d.ts +93 -1
  248. package/dist/text/textDomain.d.ts.map +1 -1
  249. package/dist/text/textDomain.js +65 -8
  250. package/dist/text/textDomain.js.map +1 -1
  251. package/dist/text/textDomainFormatted.d.ts +24 -6
  252. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  253. package/dist/text/textDomainFormatted.js +29 -1
  254. package/dist/text/textDomainFormatted.js.map +1 -1
  255. package/dist/treeFactory.d.ts.map +1 -1
  256. package/dist/treeFactory.js +9 -7
  257. package/dist/treeFactory.js.map +1 -1
  258. package/dist/util/breakable.d.ts +7 -1
  259. package/dist/util/breakable.d.ts.map +1 -1
  260. package/dist/util/breakable.js +18 -4
  261. package/dist/util/breakable.js.map +1 -1
  262. package/dist/util/typeboxBrand.d.ts +1 -1
  263. package/dist/util/typeboxBrand.d.ts.map +1 -1
  264. package/dist/util/typeboxBrand.js +26 -3
  265. package/dist/util/typeboxBrand.js.map +1 -1
  266. package/dist/util/utils.d.ts +2 -2
  267. package/dist/util/utils.d.ts.map +1 -1
  268. package/dist/util/utils.js +25 -2
  269. package/dist/util/utils.js.map +1 -1
  270. package/eslint.config.mts +44 -0
  271. package/lib/codec/codec.d.ts +22 -53
  272. package/lib/codec/codec.d.ts.map +1 -1
  273. package/lib/codec/codec.js +7 -44
  274. package/lib/codec/codec.js.map +1 -1
  275. package/lib/codec/index.d.ts +1 -1
  276. package/lib/codec/index.d.ts.map +1 -1
  277. package/lib/codec/index.js +1 -1
  278. package/lib/codec/index.js.map +1 -1
  279. package/lib/codec/versioned/codec.d.ts +56 -28
  280. package/lib/codec/versioned/codec.d.ts.map +1 -1
  281. package/lib/codec/versioned/codec.js +27 -10
  282. package/lib/codec/versioned/codec.js.map +1 -1
  283. package/lib/codec/versioned/format.d.ts +5 -4
  284. package/lib/codec/versioned/format.d.ts.map +1 -1
  285. package/lib/codec/versioned/format.js +1 -1
  286. package/lib/codec/versioned/format.js.map +1 -1
  287. package/lib/codec/versioned/index.d.ts +1 -1
  288. package/lib/codec/versioned/index.d.ts.map +1 -1
  289. package/lib/codec/versioned/index.js +1 -1
  290. package/lib/codec/versioned/index.js.map +1 -1
  291. package/lib/core/rebase/types.d.ts +4 -3
  292. package/lib/core/rebase/types.d.ts.map +1 -1
  293. package/lib/core/rebase/types.js +1 -1
  294. package/lib/core/rebase/types.js.map +1 -1
  295. package/lib/core/schema-stored/formatV1.d.ts +16 -15
  296. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  297. package/lib/core/schema-stored/formatV1.js +1 -1
  298. package/lib/core/schema-stored/formatV1.js.map +1 -1
  299. package/lib/core/schema-stored/formatV2.d.ts +29 -28
  300. package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
  301. package/lib/core/schema-stored/formatV2.js +1 -1
  302. package/lib/core/schema-stored/formatV2.js.map +1 -1
  303. package/lib/core/tree/deltaUtil.d.ts +2 -2
  304. package/lib/core/tree/deltaUtil.js +2 -2
  305. package/lib/core/tree/deltaUtil.js.map +1 -1
  306. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  307. package/lib/core/tree/detachedFieldIndexCodecV1.js +3 -2
  308. package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  309. package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  310. package/lib/core/tree/detachedFieldIndexCodecV2.js +5 -3
  311. package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  312. package/lib/core/tree/detachedFieldIndexCodecs.d.ts +3 -3
  313. package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  314. package/lib/core/tree/detachedFieldIndexCodecs.js +2 -2
  315. package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  316. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +11 -10
  317. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  318. package/lib/core/tree/detachedFieldIndexFormatCommon.js +1 -1
  319. package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  320. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +7 -6
  321. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  322. package/lib/core/tree/detachedFieldIndexFormatV2.js +1 -1
  323. package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  324. package/lib/core/tree/persistedTreeTextFormat.d.ts +19 -18
  325. package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  326. package/lib/core/tree/persistedTreeTextFormat.js +1 -1
  327. package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
  328. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +38 -1
  329. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  330. package/lib/feature-libraries/chunked-forest/chunkTree.js +62 -5
  331. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  332. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  333. package/lib/feature-libraries/chunked-forest/chunkedForest.js +20 -6
  334. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  335. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +34 -2
  336. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  337. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +102 -2
  338. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  339. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +5 -5
  340. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  341. package/lib/feature-libraries/chunked-forest/codec/codecs.js +3 -3
  342. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  343. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +7 -7
  344. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  345. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  346. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +13 -12
  347. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
  348. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js +1 -1
  349. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
  350. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +36 -35
  351. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -1
  352. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js +1 -1
  353. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
  354. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +35 -14
  355. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -1
  356. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js +9 -3
  357. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
  358. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.d.ts +106 -0
  359. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.d.ts.map +1 -0
  360. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.js +41 -0
  361. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.js.map +1 -0
  362. package/lib/feature-libraries/chunked-forest/codec/format/index.d.ts +2 -1
  363. package/lib/feature-libraries/chunked-forest/codec/format/index.d.ts.map +1 -1
  364. package/lib/feature-libraries/chunked-forest/codec/format/index.js +2 -1
  365. package/lib/feature-libraries/chunked-forest/codec/format/index.js.map +1 -1
  366. package/lib/feature-libraries/chunked-forest/codec/format/versions.d.ts +38 -4
  367. package/lib/feature-libraries/chunked-forest/codec/format/versions.d.ts.map +1 -1
  368. package/lib/feature-libraries/chunked-forest/codec/format/versions.js +6 -0
  369. package/lib/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -1
  370. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +7 -7
  371. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  372. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js +2 -3
  373. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  374. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +66 -14
  375. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  376. package/lib/feature-libraries/chunked-forest/uniformChunk.js +101 -36
  377. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  378. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  379. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +36 -14
  380. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  381. package/lib/feature-libraries/forest-summary/codec.d.ts +5 -4
  382. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  383. package/lib/feature-libraries/forest-summary/codec.js +3 -3
  384. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  385. package/lib/feature-libraries/forest-summary/formatCommon.d.ts +6 -5
  386. package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  387. package/lib/feature-libraries/forest-summary/formatCommon.js +1 -1
  388. package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  389. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +4 -3
  390. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  391. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js +1 -1
  392. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  393. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +45 -44
  394. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  395. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js +1 -1
  396. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  397. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +23 -22
  398. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  399. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +1 -1
  400. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
  401. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +1 -1
  402. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  403. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  404. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +9 -8
  405. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  406. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +1 -1
  407. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
  408. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +14 -13
  409. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  410. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +1 -1
  411. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
  412. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +5 -4
  413. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  414. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js +1 -1
  415. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  416. package/lib/feature-libraries/schema-index/codec.d.ts +2 -2
  417. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  418. package/lib/feature-libraries/schema-index/codec.js +2 -2
  419. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  420. package/lib/feature-libraries/schema-index/formatV1.d.ts +15 -14
  421. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  422. package/lib/feature-libraries/schema-index/formatV1.js +1 -1
  423. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  424. package/lib/feature-libraries/schema-index/formatV2.d.ts +20 -19
  425. package/lib/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
  426. package/lib/feature-libraries/schema-index/formatV2.js +1 -1
  427. package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
  428. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  429. package/lib/feature-libraries/sequence-field/compose.js +1 -3
  430. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  431. package/lib/feature-libraries/sequence-field/formatV1.d.ts +283 -282
  432. package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  433. package/lib/feature-libraries/sequence-field/formatV1.js +1 -1
  434. package/lib/feature-libraries/sequence-field/formatV1.js.map +1 -1
  435. package/lib/feature-libraries/sequence-field/formatV2.d.ts +180 -179
  436. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  437. package/lib/feature-libraries/sequence-field/formatV2.js +1 -1
  438. package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
  439. package/lib/feature-libraries/sequence-field/formatV3.d.ts +126 -125
  440. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  441. package/lib/feature-libraries/sequence-field/formatV3.js +1 -1
  442. package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
  443. package/lib/index.d.ts +1 -1
  444. package/lib/index.d.ts.map +1 -1
  445. package/lib/index.js +1 -1
  446. package/lib/index.js.map +1 -1
  447. package/lib/packageVersion.d.ts +1 -1
  448. package/lib/packageVersion.js +1 -1
  449. package/lib/packageVersion.js.map +1 -1
  450. package/lib/shared-tree/isAuditableFromOutcome.d.ts +20 -0
  451. package/lib/shared-tree/isAuditableFromOutcome.d.ts.map +1 -0
  452. package/lib/shared-tree/isAuditableFromOutcome.js +32 -0
  453. package/lib/shared-tree/isAuditableFromOutcome.js.map +1 -0
  454. package/lib/shared-tree/sharedTree.d.ts +2 -2
  455. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  456. package/lib/shared-tree/sharedTree.js +1 -1
  457. package/lib/shared-tree/sharedTree.js.map +1 -1
  458. package/lib/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
  459. package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  460. package/lib/shared-tree/sharedTreeChangeFormat.js +1 -1
  461. package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  462. package/lib/shared-tree/treeCheckout.d.ts +5 -3
  463. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  464. package/lib/shared-tree/treeCheckout.js +38 -9
  465. package/lib/shared-tree/treeCheckout.js.map +1 -1
  466. package/lib/shared-tree-core/editManager.d.ts +2 -2
  467. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  468. package/lib/shared-tree-core/editManager.js.map +1 -1
  469. package/lib/shared-tree-core/editManagerCodecs.d.ts +3 -3
  470. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  471. package/lib/shared-tree-core/editManagerCodecs.js +3 -3
  472. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  473. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +35 -34
  474. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  475. package/lib/shared-tree-core/editManagerFormatCommons.js +1 -1
  476. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  477. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +15 -15
  478. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  479. package/lib/shared-tree-core/editManagerFormatV1toV4.js +1 -1
  480. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  481. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +40 -40
  482. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  483. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
  484. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  485. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  486. package/lib/shared-tree-core/messageCodecVSharedBranches.js +1 -1
  487. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  488. package/lib/shared-tree-core/messageCodecs.d.ts +3 -3
  489. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  490. package/lib/shared-tree-core/messageCodecs.js +3 -3
  491. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  492. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +5 -5
  493. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  494. package/lib/shared-tree-core/messageFormatV1ToV4.js +1 -1
  495. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  496. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -7
  497. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  498. package/lib/shared-tree-core/messageFormatVSharedBranches.js +1 -1
  499. package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  500. package/lib/simple-tree/core/treeNodeKernel.d.ts +5 -0
  501. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  502. package/lib/simple-tree/core/treeNodeKernel.js +60 -23
  503. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  504. package/lib/simple-tree/simpleSchemaFormatV1.d.ts +121 -120
  505. package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
  506. package/lib/simple-tree/simpleSchemaFormatV1.js +1 -1
  507. package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  508. package/lib/text/codePointUtils.d.ts +48 -0
  509. package/lib/text/codePointUtils.d.ts.map +1 -0
  510. package/lib/text/codePointUtils.js +75 -0
  511. package/lib/text/codePointUtils.js.map +1 -0
  512. package/lib/text/index.d.ts +1 -0
  513. package/lib/text/index.d.ts.map +1 -1
  514. package/lib/text/index.js +1 -0
  515. package/lib/text/index.js.map +1 -1
  516. package/lib/text/textDomain.d.ts +93 -1
  517. package/lib/text/textDomain.d.ts.map +1 -1
  518. package/lib/text/textDomain.js +56 -0
  519. package/lib/text/textDomain.js.map +1 -1
  520. package/lib/text/textDomainFormatted.d.ts +24 -6
  521. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  522. package/lib/text/textDomainFormatted.js +30 -2
  523. package/lib/text/textDomainFormatted.js.map +1 -1
  524. package/lib/treeFactory.d.ts.map +1 -1
  525. package/lib/treeFactory.js +2 -0
  526. package/lib/treeFactory.js.map +1 -1
  527. package/lib/util/breakable.d.ts +7 -1
  528. package/lib/util/breakable.d.ts.map +1 -1
  529. package/lib/util/breakable.js +18 -4
  530. package/lib/util/breakable.js.map +1 -1
  531. package/lib/util/typeboxBrand.d.ts +1 -1
  532. package/lib/util/typeboxBrand.d.ts.map +1 -1
  533. package/lib/util/typeboxBrand.js +1 -1
  534. package/lib/util/typeboxBrand.js.map +1 -1
  535. package/lib/util/utils.d.ts +2 -2
  536. package/lib/util/utils.d.ts.map +1 -1
  537. package/lib/util/utils.js +1 -1
  538. package/lib/util/utils.js.map +1 -1
  539. package/package.json +24 -24
  540. package/src/codec/codec.ts +82 -73
  541. package/src/codec/index.ts +2 -1
  542. package/src/codec/versioned/codec.ts +173 -73
  543. package/src/codec/versioned/format.ts +2 -1
  544. package/src/codec/versioned/index.ts +2 -1
  545. package/src/core/rebase/types.ts +1 -1
  546. package/src/core/schema-stored/formatV1.ts +2 -1
  547. package/src/core/schema-stored/formatV2.ts +2 -1
  548. package/src/core/tree/deltaUtil.ts +2 -2
  549. package/src/core/tree/detachedFieldIndexCodecV1.ts +3 -2
  550. package/src/core/tree/detachedFieldIndexCodecV2.ts +5 -3
  551. package/src/core/tree/detachedFieldIndexCodecs.ts +2 -2
  552. package/src/core/tree/detachedFieldIndexFormatCommon.ts +2 -1
  553. package/src/core/tree/detachedFieldIndexFormatV2.ts +2 -1
  554. package/src/core/tree/persistedTreeTextFormat.ts +2 -1
  555. package/src/feature-libraries/chunked-forest/chunkTree.ts +88 -3
  556. package/src/feature-libraries/chunked-forest/chunkedForest.ts +27 -7
  557. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +143 -7
  558. package/src/feature-libraries/chunked-forest/codec/codecs.ts +30 -28
  559. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +7 -7
  560. package/src/feature-libraries/chunked-forest/codec/format/formatGeneric.ts +2 -1
  561. package/src/feature-libraries/chunked-forest/codec/format/formatV1.ts +2 -1
  562. package/src/feature-libraries/chunked-forest/codec/format/formatV2.ts +13 -8
  563. package/src/feature-libraries/chunked-forest/codec/format/formatVText.ts +84 -0
  564. package/src/feature-libraries/chunked-forest/codec/format/index.ts +6 -1
  565. package/src/feature-libraries/chunked-forest/codec/format/versions.ts +25 -4
  566. package/src/feature-libraries/chunked-forest/codec/nodeEncoder.ts +14 -18
  567. package/src/feature-libraries/chunked-forest/uniformChunk.ts +131 -44
  568. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +36 -14
  569. package/src/feature-libraries/forest-summary/codec.ts +9 -4
  570. package/src/feature-libraries/forest-summary/formatCommon.ts +2 -1
  571. package/src/feature-libraries/modular-schema/genericFieldKindFormat.ts +2 -1
  572. package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +2 -1
  573. package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +2 -1
  574. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +1 -1
  575. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV1.ts +2 -1
  576. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV2.ts +2 -1
  577. package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +2 -1
  578. package/src/feature-libraries/schema-index/codec.ts +2 -5
  579. package/src/feature-libraries/schema-index/formatV1.ts +2 -1
  580. package/src/feature-libraries/schema-index/formatV2.ts +2 -1
  581. package/src/feature-libraries/sequence-field/compose.ts +1 -4
  582. package/src/feature-libraries/sequence-field/formatV1.ts +2 -1
  583. package/src/feature-libraries/sequence-field/formatV2.ts +2 -1
  584. package/src/feature-libraries/sequence-field/formatV3.ts +2 -1
  585. package/src/index.ts +6 -1
  586. package/src/packageVersion.ts +1 -1
  587. package/src/shared-tree/isAuditableFromOutcome.ts +34 -0
  588. package/src/shared-tree/sharedTree.ts +2 -5
  589. package/src/shared-tree/sharedTreeChangeFormat.ts +2 -1
  590. package/src/shared-tree/treeCheckout.ts +55 -15
  591. package/src/shared-tree-core/editManager.ts +2 -2
  592. package/src/shared-tree-core/editManagerCodecs.ts +4 -6
  593. package/src/shared-tree-core/editManagerFormatCommons.ts +2 -1
  594. package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -1
  595. package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +2 -1
  596. package/src/shared-tree-core/messageCodecVSharedBranches.ts +2 -1
  597. package/src/shared-tree-core/messageCodecs.ts +4 -4
  598. package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -1
  599. package/src/shared-tree-core/messageFormatVSharedBranches.ts +2 -1
  600. package/src/simple-tree/core/treeNodeKernel.ts +66 -28
  601. package/src/simple-tree/simpleSchemaFormatV1.ts +2 -1
  602. package/src/text/codePointUtils.ts +81 -0
  603. package/src/text/index.ts +1 -0
  604. package/src/text/textDomain.ts +155 -2
  605. package/src/text/textDomainFormatted.ts +73 -2
  606. package/src/treeFactory.ts +5 -0
  607. package/src/util/breakable.ts +27 -6
  608. package/src/util/typeboxBrand.ts +2 -1
  609. package/src/util/utils.ts +2 -1
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerFormatCommons.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatCommons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAsB,KAAK,MAAM,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAExF,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,WAAW,EAGhB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,KAAK,EAAiC,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,WAAW,MAAM,CAAC,UAAU;IACjC,QAAQ,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,+EAA+E;IAC/E,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC9B;AAGD,MAAM,MAAM,aAAa,CAAC,UAAU,IAAI;IACvC,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,SAAS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,CAAC,CAAC,CAAC,EAAE,CAAC;CAC1F;AAED,eAAO,MAAM,mBAAmB,+CAA2C,YAAY;;;;;;;;;;;;;;;;;;;;;EAYrF,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;CA2CnC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC/E,eAAO,MAAM,kCAAkC,EAAE,WAAW,CAAC,wBAAwB,CAMlF,CAAC;AACJ,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,wBAAwB,CAE3E,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { Type } from "@sinclair/typebox";
5
+ import * as Type from "@sinclair/typebox";
6
6
  import { RevisionTagSchema, SessionIdSchema, } from "../core/index.js";
7
7
  import { brandedNumberType, strictEnum } from "../util/index.js";
8
8
  const noAdditionalProps = { additionalProperties: false };
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerFormatCommons.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatCommons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAiD,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAExF,OAAO,EAGN,iBAAiB,EACjB,eAAe,GACf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAc,iBAAiB,EAAE,UAAU,EAAe,MAAM,kBAAkB,CAAC;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,iBAAiB;IAC3B,MAAM,EAAE,OAAO;IACf,SAAS,EAAE,eAAe;CAC1B,CAAC,CAAC;AACJ;;;GAGG;A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,CAAC,QAAQ,CAAC,iBAAiB,CAAC;IACtC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3C,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAC/E,EACD,iBAAiB,CACjB,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,UAAU,CAAC,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;AAEH,MAAM,CAAC,MAAM,kCAAkC,GAC9C,IAAI,GAAG,CAAC;IACP,wBAAwB,CAAC,EAAE;IAC3B,wBAAwB,CAAC,EAAE;IAC3B,wBAAwB,CAAC,EAAE;IAC3B,wBAAwB,CAAC,eAAe;CACxC,CAAC,CAAC;AACJ,MAAM,CAAC,MAAM,yBAAyB,GAA0C,IAAI,GAAG,CACtF,MAAM,CAAC,MAAM,CAAC,wBAAwB,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 { type ObjectOptions, type Static, type TSchema, Type } 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,OAAO,KAAK,IAAI,MA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Ae;CACxC,CAAC,CAAC;AACJ,MAAM,CAAC,MAAM,yBAAyB,GAA0C,IAAI,GAAG,CACtF,MAAM,CAAC,MAAM,CAAC,wBAAwB,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"]}
@@ -3,28 +3,28 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { SessionId } from "@fluidframework/id-compressor";
6
- import { type TSchema } from "@sinclair/typebox";
6
+ import * as Type from "@sinclair/typebox";
7
7
  import { EditManagerFormatVersion, type EncodedSummarySessionBranch, SequencedCommit } from "./editManagerFormatCommons.js";
8
8
  export interface EncodedEditManager<TChangeset> {
9
9
  readonly trunk: readonly Readonly<SequencedCommit<TChangeset>>[];
10
10
  readonly branches: readonly [SessionId, Readonly<EncodedSummarySessionBranch<TChangeset>>][];
11
11
  readonly version: typeof EditManagerFormatVersion.v1 | typeof EditManagerFormatVersion.v2 | typeof EditManagerFormatVersion.v3 | typeof EditManagerFormatVersion.v4 | typeof EditManagerFormatVersion.v6;
12
12
  }
13
- export declare const EncodedEditManager: <ChangeSchema extends TSchema>(tChange: ChangeSchema) => import("@sinclair/typebox").TObject<{
14
- version: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<1, "editManager.FormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<2, "editManager.FormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<3, "editManager.FormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<4, "editManager.FormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<6, "editManager.FormatVersion">>]>;
15
- trunk: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
16
- revision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
17
- change: import("@sinclair/typebox").TIntersectEvaluated<import("@sinclair/typebox").Assert<ChangeSchema, TSchema> extends infer T ? T extends import("@sinclair/typebox").Assert<ChangeSchema, TSchema> ? T extends import("@sinclair/typebox").TNever ? [] : [T] : never : never>;
18
- sessionId: import("@sinclair/typebox").TUnsafe<SessionId>;
19
- sequenceNumber: import("@sinclair/typebox").TUnsafe<import("./editManagerFormatCommons.js").SeqNumber>;
20
- indexInBatch: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
13
+ export declare const EncodedEditManager: <ChangeSchema extends Type.TSchema>(tChange: ChangeSchema) => Type.TObject<{
14
+ version: Type.TUnion<[Type.TLiteral<import("../util/brand.js").Brand<1, "editManager.FormatVersion">>, Type.TLiteral<import("../util/brand.js").Brand<2, "editManager.FormatVersion">>, Type.TLiteral<import("../util/brand.js").Brand<3, "editManager.FormatVersion">>, Type.TLiteral<import("../util/brand.js").Brand<4, "editManager.FormatVersion">>, Type.TLiteral<import("../util/brand.js").Brand<6, "editManager.FormatVersion">>]>;
15
+ trunk: Type.TArray<Type.TObject<{
16
+ revision: Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
17
+ change: Type.TIntersectEvaluated<Type.Assert<ChangeSchema, Type.TSchema> extends infer T ? T extends Type.Assert<ChangeSchema, Type.TSchema> ? T extends Type.TNever ? [] : [T] : never : never>;
18
+ sessionId: Type.TUnsafe<SessionId>;
19
+ sequenceNumber: Type.TUnsafe<import("./editManagerFormatCommons.js").SeqNumber>;
20
+ indexInBatch: Type.TOptional<Type.TNumber>;
21
21
  }>>;
22
- branches: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<SessionId>, import("@sinclair/typebox").TObject<{
23
- base: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
24
- commits: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
25
- revision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
26
- change: import("@sinclair/typebox").TIntersectEvaluated<import("@sinclair/typebox").Assert<ChangeSchema, TSchema> extends infer T_1 ? T_1 extends import("@sinclair/typebox").Assert<ChangeSchema, TSchema> ? T_1 extends import("@sinclair/typebox").TNever ? [] : [T_1] : never : never>;
27
- sessionId: import("@sinclair/typebox").TUnsafe<SessionId>;
22
+ branches: Type.TArray<Type.TTuple<[Type.TUnsafe<SessionId>, Type.TObject<{
23
+ base: Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
24
+ commits: Type.TArray<Type.TObject<{
25
+ revision: Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
26
+ change: Type.TIntersectEvaluated<Type.Assert<ChangeSchema, Type.TSchema> extends infer T_1 ? T_1 extends Type.Assert<ChangeSchema, Type.TSchema> ? T_1 extends Type.TNever ? [] : [T_1] : never : never>;
27
+ sessionId: Type.TUnsafe<SessionId>;
28
28
  }>>;
29
29
  }>]>>;
30
30
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerFormatV1toV4.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatV1toV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAsB,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAI3E,OAAO,EACN,wBAAwB,EACxB,KAAK,2BAA2B,EAChC,eAAe,EAEf,MAAM,+BAA+B,CAAC;AAOvC,MAAM,WAAW,kBAAkB,CAAC,UAAU;IAC7C,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;IACjE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC,2BAA2B,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7F,QAAQ,CAAC,OAAO,EACb,OAAO,wBAAwB,CAAC,EAAE,GAClC,OAAO,wBAAwB,CAAC,EAAE,GAClC,OAAO,wBAAwB,CAAC,EAAE,GAClC,OAAO,wBAAwB,CAAC,EAAE,GAClC,OAAO,wBAAwB,CAAC,EAAE,CAAC;CACtC;AAED,eAAO,MAAM,kBAAkB,0CAA2C,YAAY;;;;;;;;;;;;;;;;;EAcpF,CAAC"}
1
+ {"version":3,"file":"editManagerFormatV1toV4.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatV1toV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAK1C,OAAO,EACN,wBAAwB,EACxB,KAAK,2BAA2B,EAChC,eAAe,EAEf,MAAM,+BAA+B,CAAC;AAOvC,MAAM,WAAW,kBAAkB,CAAC,UAAU;IAC7C,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;IACjE,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC,SAAS,EAAE,QAAQ,CAAC,2BAA2B,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7F,QAAQ,CAAC,OAAO,EACb,OAAO,wBAAwB,CAAC,EAAE,GAClC,OAAO,wBAAwB,CAAC,EAAE,GAClC,OAAO,wBAAwB,CAAC,EAAE,GAClC,OAAO,wBAAwB,CAAC,EAAE,GAClC,OAAO,wBAAwB,CAAC,EAAE,CAAC;CACtC;AAED,eAAO,MAAM,kBAAkB,+CAA2C,YAAY;;;;;;;;;;;;;;;;;EAcpF,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { Type } from "@sinclair/typebox";
5
+ import * as Type from "@sinclair/typebox";
6
6
  import { SessionIdSchema } from "../core/index.js";
7
7
  import { EditManagerFormatVersion, SequencedCommit, SummarySessionBranch, } from "./editManagerFormatCommons.js";
8
8
  const noAdditionalProps = { additionalProperties: false };
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerFormatV1toV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatV1toV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAoC,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EACN,wBAAwB,EAExB,eAAe,EACf,oBAAoB,GACpB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAgBzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACzF,IAAI,CAAC,MAAM,CACV;IACC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;KACzC,CAAC;IACF,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAClF,EACD,iBAAiB,CACjB,CAAC;AAEH,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 { type ObjectOptions, type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { SessionIdSchema } from \"../core/index.js\";\n\nimport {\n\tEditManagerFormatVersion,\n\ttype EncodedSummarySessionBranch,\n\tSequencedCommit,\n\tSummarySessionBranch,\n} from \"./editManagerFormatCommons.js\";\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\nexport interface EncodedEditManager<TChangeset> {\n\treadonly trunk: readonly Readonly<SequencedCommit<TChangeset>>[];\n\treadonly branches: readonly [SessionId, Readonly<EncodedSummarySessionBranch<TChangeset>>][];\n\treadonly version:\n\t\t| typeof EditManagerFormatVersion.v1\n\t\t| typeof EditManagerFormatVersion.v2\n\t\t| typeof EditManagerFormatVersion.v3\n\t\t| typeof EditManagerFormatVersion.v4\n\t\t| typeof EditManagerFormatVersion.v6;\n}\n\nexport const EncodedEditManager = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tversion: Type.Union([\n\t\t\t\tType.Literal(EditManagerFormatVersion.v1),\n\t\t\t\tType.Literal(EditManagerFormatVersion.v2),\n\t\t\t\tType.Literal(EditManagerFormatVersion.v3),\n\t\t\t\tType.Literal(EditManagerFormatVersion.v4),\n\t\t\t\tType.Literal(EditManagerFormatVersion.v6),\n\t\t\t]),\n\t\t\ttrunk: Type.Array(SequencedCommit(tChange)),\n\t\t\tbranches: Type.Array(Type.Tuple([SessionIdSchema, SummarySessionBranch(tChange)])),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
1
+ {"version":3,"file":"editManagerFormatV1toV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatV1toV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EACN,wBAAwB,EAExB,eAAe,EACf,oBAAoB,GACpB,MAAM,+BAA+B,CAAC;AAEvC,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAgBzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACzF,IAAI,CAAC,MAAM,CACV;IACC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,EAAE,CAAC;KACzC,CAAC;IACF,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;IAC3C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAClF,EACD,iBAAiB,CACjB,CAAC;AAEH,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, TSchema } from \"@sinclair/typebox\";\n\nimport { SessionIdSchema } from \"../core/index.js\";\n\nimport {\n\tEditManagerFormatVersion,\n\ttype EncodedSummarySessionBranch,\n\tSequencedCommit,\n\tSummarySessionBranch,\n} from \"./editManagerFormatCommons.js\";\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\nexport interface EncodedEditManager<TChangeset> {\n\treadonly trunk: readonly Readonly<SequencedCommit<TChangeset>>[];\n\treadonly branches: readonly [SessionId, Readonly<EncodedSummarySessionBranch<TChangeset>>][];\n\treadonly version:\n\t\t| typeof EditManagerFormatVersion.v1\n\t\t| typeof EditManagerFormatVersion.v2\n\t\t| typeof EditManagerFormatVersion.v3\n\t\t| typeof EditManagerFormatVersion.v4\n\t\t| typeof EditManagerFormatVersion.v6;\n}\n\nexport const EncodedEditManager = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tversion: Type.Union([\n\t\t\t\tType.Literal(EditManagerFormatVersion.v1),\n\t\t\t\tType.Literal(EditManagerFormatVersion.v2),\n\t\t\t\tType.Literal(EditManagerFormatVersion.v3),\n\t\t\t\tType.Literal(EditManagerFormatVersion.v4),\n\t\t\t\tType.Literal(EditManagerFormatVersion.v6),\n\t\t\t]),\n\t\t\ttrunk: Type.Array(SequencedCommit(tChange)),\n\t\t\tbranches: Type.Array(Type.Tuple([SessionIdSchema, SummarySessionBranch(tChange)])),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { SessionId } from "@fluidframework/id-compressor";
6
- import { type TSchema } from "@sinclair/typebox";
6
+ import * as Type from "@sinclair/typebox";
7
7
  import { EncodedSharedBranch, EditManagerFormatVersion } from "./editManagerFormatCommons.js";
8
8
  export interface EncodedEditManager<TChangeset> {
9
9
  readonly version: typeof EditManagerFormatVersion.vSharedBranches;
@@ -11,50 +11,50 @@ export interface EncodedEditManager<TChangeset> {
11
11
  readonly main: EncodedSharedBranch<TChangeset>;
12
12
  readonly branches?: readonly EncodedSharedBranch<TChangeset>[];
13
13
  }
14
- export declare const EncodedEditManager: <ChangeSchema extends TSchema>(tChange: ChangeSchema) => import("@sinclair/typebox").TObject<{
15
- version: import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<"shared-branches|v0.1", "editManager.FormatVersion">>;
16
- originator: import("@sinclair/typebox").TUnsafe<SessionId>;
17
- main: import("@sinclair/typebox").TObject<{
18
- id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
19
- name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
20
- session: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<SessionId>>;
21
- author: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
22
- base: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
23
- trunk: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
24
- revision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
25
- change: import("@sinclair/typebox").TIntersectEvaluated<import("@sinclair/typebox").Assert<ChangeSchema, TSchema> extends infer T ? T extends import("@sinclair/typebox").Assert<ChangeSchema, TSchema> ? T extends import("@sinclair/typebox").TNever ? [] : [T] : never : never>;
26
- sessionId: import("@sinclair/typebox").TUnsafe<SessionId>;
27
- sequenceNumber: import("@sinclair/typebox").TUnsafe<import("./editManagerFormatCommons.js").SeqNumber>;
28
- indexInBatch: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
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">>;
16
+ originator: Type.TUnsafe<SessionId>;
17
+ main: Type.TObject<{
18
+ id: Type.TOptional<Type.TNumber>;
19
+ name: Type.TOptional<Type.TString>;
20
+ session: Type.TOptional<Type.TUnsafe<SessionId>>;
21
+ author: Type.TOptional<Type.TString>;
22
+ base: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
23
+ trunk: Type.TArray<Type.TObject<{
24
+ revision: Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
25
+ change: Type.TIntersectEvaluated<Type.Assert<ChangeSchema, Type.TSchema> extends infer T ? T extends Type.Assert<ChangeSchema, Type.TSchema> ? T extends Type.TNever ? [] : [T] : never : never>;
26
+ sessionId: Type.TUnsafe<SessionId>;
27
+ sequenceNumber: Type.TUnsafe<import("./editManagerFormatCommons.js").SeqNumber>;
28
+ indexInBatch: Type.TOptional<Type.TNumber>;
29
29
  }>>;
30
- peers: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<SessionId>, import("@sinclair/typebox").TObject<{
31
- base: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
32
- commits: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
33
- revision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
34
- change: import("@sinclair/typebox").TIntersectEvaluated<import("@sinclair/typebox").Assert<ChangeSchema, TSchema> extends infer T_1 ? T_1 extends import("@sinclair/typebox").Assert<ChangeSchema, TSchema> ? T_1 extends import("@sinclair/typebox").TNever ? [] : [T_1] : never : never>;
35
- sessionId: import("@sinclair/typebox").TUnsafe<SessionId>;
30
+ peers: Type.TArray<Type.TTuple<[Type.TUnsafe<SessionId>, Type.TObject<{
31
+ base: Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
32
+ commits: Type.TArray<Type.TObject<{
33
+ revision: Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
34
+ change: Type.TIntersectEvaluated<Type.Assert<ChangeSchema, Type.TSchema> extends infer T_1 ? T_1 extends Type.Assert<ChangeSchema, Type.TSchema> ? T_1 extends Type.TNever ? [] : [T_1] : never : never>;
35
+ sessionId: Type.TUnsafe<SessionId>;
36
36
  }>>;
37
37
  }>]>>;
38
38
  }>;
39
- branches: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
40
- id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
41
- name: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
42
- session: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnsafe<SessionId>>;
43
- author: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
44
- base: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
45
- trunk: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
46
- revision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
47
- change: import("@sinclair/typebox").TIntersectEvaluated<import("@sinclair/typebox").Assert<ChangeSchema, TSchema> extends infer T_2 ? T_2 extends import("@sinclair/typebox").Assert<ChangeSchema, TSchema> ? T_2 extends import("@sinclair/typebox").TNever ? [] : [T_2] : never : never>;
48
- sessionId: import("@sinclair/typebox").TUnsafe<SessionId>;
49
- sequenceNumber: import("@sinclair/typebox").TUnsafe<import("./editManagerFormatCommons.js").SeqNumber>;
50
- indexInBatch: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
39
+ branches: Type.TOptional<Type.TArray<Type.TObject<{
40
+ id: Type.TOptional<Type.TNumber>;
41
+ name: Type.TOptional<Type.TString>;
42
+ session: Type.TOptional<Type.TUnsafe<SessionId>>;
43
+ author: Type.TOptional<Type.TString>;
44
+ base: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
45
+ trunk: Type.TArray<Type.TObject<{
46
+ revision: Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
47
+ change: Type.TIntersectEvaluated<Type.Assert<ChangeSchema, Type.TSchema> extends infer T_2 ? T_2 extends Type.Assert<ChangeSchema, Type.TSchema> ? T_2 extends Type.TNever ? [] : [T_2] : never : never>;
48
+ sessionId: Type.TUnsafe<SessionId>;
49
+ sequenceNumber: Type.TUnsafe<import("./editManagerFormatCommons.js").SeqNumber>;
50
+ indexInBatch: Type.TOptional<Type.TNumber>;
51
51
  }>>;
52
- peers: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TTuple<[import("@sinclair/typebox").TUnsafe<SessionId>, import("@sinclair/typebox").TObject<{
53
- base: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
54
- commits: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
55
- revision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
56
- change: import("@sinclair/typebox").TIntersectEvaluated<import("@sinclair/typebox").Assert<ChangeSchema, TSchema> extends infer T_3 ? T_3 extends import("@sinclair/typebox").Assert<ChangeSchema, TSchema> ? T_3 extends import("@sinclair/typebox").TNever ? [] : [T_3] : never : never>;
57
- sessionId: import("@sinclair/typebox").TUnsafe<SessionId>;
52
+ peers: Type.TArray<Type.TTuple<[Type.TUnsafe<SessionId>, Type.TObject<{
53
+ base: Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
54
+ commits: Type.TArray<Type.TObject<{
55
+ revision: Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
56
+ change: Type.TIntersectEvaluated<Type.Assert<ChangeSchema, Type.TSchema> extends infer T_3 ? T_3 extends Type.Assert<ChangeSchema, Type.TSchema> ? T_3 extends Type.TNever ? [] : [T_3] : never : never>;
57
+ sessionId: Type.TUnsafe<SessionId>;
58
58
  }>>;
59
59
  }>]>>;
60
60
  }>>>;
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerFormatVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAsB,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAI3E,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAO9F,MAAM,WAAW,kBAAkB,CAAC,UAAU;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,wBAAwB,CAAC,eAAe,CAAC;IAClE,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,mBAAmB,CAAC,UAAU,CAAC,EAAE,CAAC;CAC/D;AAED,eAAO,MAAM,kBAAkB,0CAA2C,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASpF,CAAC"}
1
+ {"version":3,"file":"editManagerFormatVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAK1C,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAO9F,MAAM,WAAW,kBAAkB,CAAC,UAAU;IAC7C,QAAQ,CAAC,OAAO,EAAE,OAAO,wBAAwB,CAAC,eAAe,CAAC;IAClE,QAAQ,CAAC,UAAU,EAAE,SAAS,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,mBAAmB,CAAC,UAAU,CAAC,EAAE,CAAC;CAC/D;AAED,eAAO,MAAM,kBAAkB,+CAA2C,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASpF,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { Type } from "@sinclair/typebox";
5
+ import * as Type from "@sinclair/typebox";
6
6
  import { SessionIdSchema } from "../core/index.js";
7
7
  import { EncodedSharedBranch, EditManagerFormatVersion } from "./editManagerFormatCommons.js";
8
8
  const noAdditionalProps = { additionalProperties: false };
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerFormatVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAoC,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE3E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9F,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAYzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACzF,IAAI,CAAC,MAAM,CACV;IACC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,eAAe,CAAC;IAC/D,UAAU,EAAE,eAAe;IAC3B,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC;IAClC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;CACjE,EACD,iBAAiB,CACjB,CAAC;AAEH,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 { type ObjectOptions, type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { SessionIdSchema } from \"../core/index.js\";\n\nimport { EncodedSharedBranch, EditManagerFormatVersion } from \"./editManagerFormatCommons.js\";\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\nexport interface EncodedEditManager<TChangeset> {\n\treadonly version: typeof EditManagerFormatVersion.vSharedBranches;\n\treadonly originator: SessionId;\n\treadonly main: EncodedSharedBranch<TChangeset>;\n\treadonly branches?: readonly EncodedSharedBranch<TChangeset>[];\n}\n\nexport const EncodedEditManager = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tversion: Type.Literal(EditManagerFormatVersion.vSharedBranches),\n\t\t\toriginator: SessionIdSchema,\n\t\t\tmain: EncodedSharedBranch(tChange),\n\t\t\tbranches: Type.Optional(Type.Array(EncodedSharedBranch(tChange))),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
1
+ {"version":3,"file":"editManagerFormatVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9F,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAYzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACzF,IAAI,CAAC,MAAM,CACV;IACC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,wBAAwB,CAAC,eAAe,CAAC;IAC/D,UAAU,EAAE,eAAe;IAC3B,IAAI,EAAE,mBAAmB,CAAC,OAAO,CAAC;IAClC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC,CAAC;CACjE,EACD,iBAAiB,CACjB,CAAC;AAEH,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, TSchema } from \"@sinclair/typebox\";\n\nimport { SessionIdSchema } from \"../core/index.js\";\n\nimport { EncodedSharedBranch, EditManagerFormatVersion } from \"./editManagerFormatCommons.js\";\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\nexport interface EncodedEditManager<TChangeset> {\n\treadonly version: typeof EditManagerFormatVersion.vSharedBranches;\n\treadonly originator: SessionId;\n\treadonly main: EncodedSharedBranch<TChangeset>;\n\treadonly branches?: readonly EncodedSharedBranch<TChangeset>[];\n}\n\nexport const EncodedEditManager = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object(\n\t\t{\n\t\t\tversion: Type.Literal(EditManagerFormatVersion.vSharedBranches),\n\t\t\toriginator: SessionIdSchema,\n\t\t\tmain: EncodedSharedBranch(tChange),\n\t\t\tbranches: Type.Optional(Type.Array(EncodedSharedBranch(tChange))),\n\t\t},\n\t\tnoAdditionalProps,\n\t);\n\n/* eslint-enable @typescript-eslint/explicit-function-return-type */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"messageCodecVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,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,CAwFpE"}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
6
- import { Type } from "@sinclair/typebox";
6
+ import * as Type from "@sinclair/typebox";
7
7
  import { decodeBranchId, encodeBranchId } from "./branchIdCodec.js";
8
8
  import { Message } from "./messageFormatVSharedBranches.js";
9
9
  export function makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, version) {
@@ -1 +1 @@
1
- {"version":3,"file":"messageCodecVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAmB,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAW1D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpE,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAG5D,MAAM,UA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AChE,OAAO;qBACP,CAAC;gBACH,CAAC;gBACD,OAAO,CAAC,CAAC,CAAC;oBACT,eAAe,CAAC,IAAI,CAAC,CAAC;gBACvB,CAAC;YACF,CAAC;QACF,CAAC;QACD,MAAM,EAAE,CACP,OAA2D,EAC3D,OAA+B,EACF,EAAE;YAC/B,MAAM,EACL,QAAQ,EAAE,eAAe,EACzB,YAAY,EACZ,SAAS,EACT,QAAQ,EAAE,eAAe,GACzB,GAAG,OAAO,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,cAAc,CAAC,OAAO,CAAC,YAAY,EAAE,eAAe,EAAE,aAAa,CAAC,CAAC;YAEtF,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;gBAC7B,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;YAC9D,CAAC;YAED,MAAM,CAAC,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","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 { type TAnySchema, Type } 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,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAY1C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAGpE,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAG5D,MAAM,UAAU,kCAAkC,CACjD,WAA0C,EAC1C,gBAKC,EACD,OAAoD;IAEpD,MAAM,MAAM,GAAe,OAAO,CAAC,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,C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EAAE,CAAC;YAC9D,CAAC;YAED,MAAM,CAAC,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","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"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { IIdCompressor } from "@fluidframework/id-compressor";
6
6
  import type { MinimumVersionForCollab } from "@fluidframework/runtime-definitions/internal";
7
- import { ClientVersionDispatchingCodecBuilder, type CodecTree, type DependentFormatVersion, type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../codec/index.js";
7
+ import { VersionDispatchingCodecBuilder, type CodecTree, type DependentFormatVersion, type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../codec/index.js";
8
8
  import type { ChangeEncodingContext, EncodedRevisionTag, RevisionTag, SchemaAndPolicy } from "../core/index.js";
9
9
  import { MessageFormatVersion } from "./messageFormat.js";
10
10
  import type { DecodedMessage } from "./messageTypes.js";
@@ -28,9 +28,9 @@ interface MessageCodecBuilderOptions<TChangeset> extends ICodecOptions {
28
28
  revisionTagCodec: IJsonCodec<RevisionTag, EncodedRevisionTag, EncodedRevisionTag, ChangeEncodingContext>;
29
29
  }
30
30
  /**
31
- * Creates a {@link ClientVersionDispatchingCodecBuilder} for encoding/decoding messages.
31
+ * Creates a {@link VersionDispatchingCodecBuilder} for encoding/decoding messages.
32
32
  */
33
- export declare function makeMessageCodecBuilder<TChangeset>(): ClientVersionDispatchingCodecBuilder<MessageCodecBuilderOptions<TChangeset>, DecodedMessage<TChangeset>, MessageEncodingContext, MessageFormatVersion | undefined, typeof messageCodecName>;
33
+ export declare function makeMessageCodecBuilder<TChangeset>(): VersionDispatchingCodecBuilder<MessageCodecBuilderOptions<TChangeset>, DecodedMessage<TChangeset>, MessageEncodingContext, MessageFormatVersion | undefined, typeof messageCodecName>;
34
34
  export declare function getCodecTreeForMessageFormatWithChange(clientVersion: MinimumVersionForCollab, changeFormat: CodecTree): CodecTree;
35
35
  export {};
36
36
  //# sourceMappingURL=messageCodecs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messageCodecs.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAG5F,OAAO,EACN,oCAAoC,EACpC,KAAK,SAAS,EAEd,KAAK,sBAAsB,EAE3B,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,C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ACrB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,MAAM,WAAW,sBAAsB;IACtC,YAAY,EAAE,aAAa,CAAC;IAC5B,MAAM,CAAC,EAAE,eAAe,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C;;GAEG;AACH,UAAU,0BAA0B,CAAC,UAAU,CAAE,SAAQ,aAAa;IACrE,sCAAsC;IACtC,YAAY,EAAE,YAAY,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAC;IAC9D,oFAAoF;IACpF,4BAA4B,EAAE,sBAAsB,CAAC,oBAAoB,CAAC,CAAC;IAC3E,0DAA0D;IAC1D,gBAAgB,EAAE,UAAU,CAC3B,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,CACrB,CAAC;CACF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,KAAK,8BAA8B,CACpF,0BAA0B,CAAC,UAAU,CAAC,EACtC,cAAc,CAAC,UAAU,CAAC,EAC1B,sBAAsB,EACtB,oBAAoB,GAAG,SAAS,EAChC,OAAO,gBAAgB,CACvB,CAgEA;AAED,wBAAgB,sCAAsC,CACrD,aAAa,EAAE,uBAAuB,EACtC,YAAY,EAAE,SAAS,GACrB,SAAS,CAMX"}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { lowestMinVersionForCollab } from "@fluidframework/runtime-utils/internal";
6
- import { ClientVersionDispatchingCodecBuilder, FluidClientVersion, makeDiscontinuedCodecAndSchema, } from "../codec/index.js";
6
+ import { VersionDispatchingCodecBuilder, FluidClientVersion, makeDiscontinuedCodecAndSchema, } from "../codec/index.js";
7
7
  import { makeV1ToV4CodecWithVersion } from "./messageCodecV1ToV4.js";
8
8
  import { makeSharedBranchesCodecWithVersion } from "./messageCodecVSharedBranches.js";
9
9
  import { MessageFormatVersion } from "./messageFormat.js";
@@ -12,7 +12,7 @@ import { MessageFormatVersion } from "./messageFormat.js";
12
12
  */
13
13
  export const messageCodecName = "Message";
14
14
  /**
15
- * Creates a {@link ClientVersionDispatchingCodecBuilder} for encoding/decoding messages.
15
+ * Creates a {@link VersionDispatchingCodecBuilder} for encoding/decoding messages.
16
16
  */
17
17
  export function makeMessageCodecBuilder() {
18
18
  // See MessageFormatVersion and its members for documentation on what changed in each version.
@@ -43,7 +43,7 @@ export function makeMessageCodecBuilder() {
43
43
  codec: (options) => makeSharedBranchesCodecWithVersion(options.changeCodecs.resolve(options.dependentChangeFormatVersion.lookup(MessageFormatVersion.vSharedBranches)), options.revisionTagCodec, MessageFormatVersion.vSharedBranches),
44
44
  },
45
45
  ];
46
- return ClientVersionDispatchingCodecBuilder.build(messageCodecName, versions);
46
+ return VersionDispatchingCodecBuilder.build(messageCodecName, versions);
47
47
  }
48
48
  export function getCodecTreeForMessageFormatWithChange(clientVersion, changeFormat) {
49
49
  const builder = makeMessageCodecBuilder();
@@ -1 +1 @@
1
- {"version":3,"file":"messageCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,OAAO,EACN,oCAAoC,EAIpC,kBAAkB,EAIlB,8BAA8B,GAC9B,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,kCAAkC,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAQ1D;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAmB1C;;GAEG;AACH,MAAM,UAAU,uBAAuB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QACD;YACC,mBAAmB,EAAE,SAAS;YAC9B,aAAa,EAAE,oBAAoB,CAAC,eAAe;YACnD,KAAK,EAAE,CAAC,OAA+C,EAAE,EAAE,CAC1D,kCAAkC,CACjC,OAAO,CAAC,YAAY,CAAC,OAAO,CAC3B,OAAO,CAAC,4BAA4B,CAAC,MAAM,CAAC,oBAAoB,CAAC,eAAe,CAAC,CACjF,EACD,OAAO,CAAC,gBAAgB,EACxB,oBAAoB,CAAC,eAAe,CACpC;SACF;KACD,CAAC;IAEF,OAAO,oCAAoC,CAAC,KAAK,CAAC,gBAAgB,EAAE,QAAQ,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,sCAAsC,CACrD,aAAsC,EACtC,YAAuB;IAEvB,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAC1C,OAAO;QACN,GAAG,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC;QACtC,QAAQ,EAAE,CAAC,YAAY,CAAC;KACxB,CAAC;AACH,CAAC","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\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport { lowestMinVersionForCollab } from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\tClientVersionDispatchingCodecBuilder,\n\ttype CodecTree,\n\ttype CodecVersion,\n\ttype DependentFormatVersion,\n\tFluidClientVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeDiscontinuedCodecAndSchema,\n} from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\n\nimport { makeV1ToV4CodecWithVersion } from \"./messageCodecV1ToV4.js\";\nimport { makeSharedBranchesCodecWithVersion } from \"./messageCodecVSharedBranches.js\";\nimport { MessageFormatVersion } from \"./messageFormat.js\";\nimport type { DecodedMessage } from \"./messageTypes.js\";\n\nexport interface MessageEncodingContext {\n\tidCompressor: IIdCompressor;\n\tschema?: SchemaAndPolicy;\n}\n\n/**\n * Codec name used to identify the message codec, see {@link makeMessageCodecBuilder}.\n */\nexport const messageCodecName = \"Message\";\n\n/**\n * Options for constructing a message codec, see {@link makeMessageCodecBuilder}.\n */\ninterface MessageCodecBuilderOptions<TChangeset> extends ICodecOptions {\n\t/** Codecs for encoding changesets. */\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>;\n\t/** Maps each MessageFormatVersion to the corresponding changeset format version. */\n\tdependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>;\n\t/** Codec for encoding revision tags within changesets. */\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>;\n}\n\n/**\n * Creates a {@link ClientVersionDispatchingCodecBuilder} for encoding/decoding messages.\n */\nexport function makeMessageCodecBuilder<TChangeset>(): ClientVersionDispatchingCodecBuilder<\n\tMessageCodecBuilderOptions<TChangeset>,\n\tDecodedMessage<TChangeset>,\n\tMessageEncodingContext,\n\tMessageFormatVersion | undefined,\n\ttypeof messageCodecName\n> {\n\t// See MessageFormatVersion and its members for documentation on what changed in each version.\n\tconst versions: CodecVersion<\n\t\tDecodedMessage<TChangeset>,\n\t\tMessageEncodingContext,\n\t\tMessageFormatVersion | undefined,\n\t\tMessageCodecBuilderOptions<TChangeset>\n\t>[] = [\n\t\t// The \"undefined\" wire format (no version field) is discontinued.\n\t\tmakeDiscontinuedCodecAndSchema(undefined, \"2.73.0\"),\n\t\tmakeDiscontinuedCodecAndSchema(MessageFormatVersion.v1, \"2.73.0\"),\n\t\tmakeDiscontinuedCodecAndSchema(MessageFormatVersion.v2, \"2.73.0\"),\n\t\t{\n\t\t\tminVersionForCollab: lowestMinVersionForCollab,\n\t\t\tformatVersion: MessageFormatVersion.v3,\n\t\t\tcodec: (options: MessageCodecBuilderOptions<TChangeset>) =>\n\t\t\t\tmakeV1ToV4CodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(MessageFormatVersion.v3),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tMessageFormatVersion.v3,\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\tminVersionForCollab: FluidClientVersion.v2_43,\n\t\t\tformatVersion: MessageFormatVersion.v4,\n\t\t\tcodec: (options: MessageCodecBuilderOptions<TChangeset>) =>\n\t\t\t\tmakeV1ToV4CodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(MessageFormatVersion.v4),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tMessageFormatVersion.v4,\n\t\t\t\t),\n\t\t},\n\t\tmakeDiscontinuedCodecAndSchema(MessageFormatVersion.v5, \"2.74.0\"),\n\t\t{\n\t\t\tminVersionForCollab: FluidClientVersion.v2_80,\n\t\t\tformatVersion: MessageFormatVersion.v6,\n\t\t\tcodec: (options: MessageCodecBuilderOptions<TChangeset>) =>\n\t\t\t\tmakeV1ToV4CodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(MessageFormatVersion.v6),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tMessageFormatVersion.v6,\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\tminVersionForCollab: undefined,\n\t\t\tformatVersion: MessageFormatVersion.vSharedBranches,\n\t\t\tcodec: (options: MessageCodecBuilderOptions<TChangeset>) =>\n\t\t\t\tmakeSharedBranchesCodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(MessageFormatVersion.vSharedBranches),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tMessageFormatVersion.vSharedBranches,\n\t\t\t\t),\n\t\t},\n\t];\n\n\treturn ClientVersionDispatchingCodecBuilder.build(messageCodecName, versions);\n}\n\nexport function getCodecTreeForMessageFormatWithChange(\n\tclientVersion: MinimumVersionForCollab,\n\tchangeFormat: CodecTree,\n): CodecTree {\n\tconst builder = makeMessageCodecBuilder();\n\treturn {\n\t\t...builder.getCodecTree(clientVersion),\n\t\tchildren: [changeFormat],\n\t};\n}\n"]}
1
+ {"version":3,"file":"messageCodecs.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,OAAO,EACN,8BAA8B,EAI9B,kBAAkB,EAIlB,8BAA8B,GAC9B,MAAM,mBAAmB,CAAC;AAQ3B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,kCAAkC,EAAE,MAAM,kCAAkC,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAQ1D;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAmB1C;;GAEG;AACH,MAAM,UAAU,uBAAuB;IAOtC,8FAA8F;IAC9F,MAAM,QAAQ,GAKR;QACL,kEAAkE;QAClE,8BAA8B,CAAC,SAAS,EAAE,QAAQ,CAAC;QACnD,8BAA8B,CAAC,oBAAoB,CAAC,EAAE,EAAE,QAAQ,CAAC;QACjE,8BAA8B,CAAC,oBAAoB,CAAC,EAAE,EAAE,QAAQ,CAAC;QACjE;YACC,mBAAmB,EAAE,yBAAyB;YAC9C,aAAa,EAAE,oBAAoB,CAAC,EAAE;YACtC,KAAK,EAAE,CAAC,OAA+C,EAAE,EAAE,CAC1D,0BAA0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C,gBAAgB,EAAE,QAAQ,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,sCAAsC,CACrD,aAAsC,EACtC,YAAuB;IAEvB,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAC1C,OAAO;QACN,GAAG,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC;QACtC,QAAQ,EAAE,CAAC,YAAY,CAAC;KACxB,CAAC;AACH,CAAC","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\";\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport { lowestMinVersionForCollab } from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\tVersionDispatchingCodecBuilder,\n\ttype CodecTree,\n\ttype CodecVersion,\n\ttype DependentFormatVersion,\n\tFluidClientVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeDiscontinuedCodecAndSchema,\n} from \"../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tEncodedRevisionTag,\n\tRevisionTag,\n\tSchemaAndPolicy,\n} from \"../core/index.js\";\n\nimport { makeV1ToV4CodecWithVersion } from \"./messageCodecV1ToV4.js\";\nimport { makeSharedBranchesCodecWithVersion } from \"./messageCodecVSharedBranches.js\";\nimport { MessageFormatVersion } from \"./messageFormat.js\";\nimport type { DecodedMessage } from \"./messageTypes.js\";\n\nexport interface MessageEncodingContext {\n\tidCompressor: IIdCompressor;\n\tschema?: SchemaAndPolicy;\n}\n\n/**\n * Codec name used to identify the message codec, see {@link makeMessageCodecBuilder}.\n */\nexport const messageCodecName = \"Message\";\n\n/**\n * Options for constructing a message codec, see {@link makeMessageCodecBuilder}.\n */\ninterface MessageCodecBuilderOptions<TChangeset> extends ICodecOptions {\n\t/** Codecs for encoding changesets. */\n\tchangeCodecs: ICodecFamily<TChangeset, ChangeEncodingContext>;\n\t/** Maps each MessageFormatVersion to the corresponding changeset format version. */\n\tdependentChangeFormatVersion: DependentFormatVersion<MessageFormatVersion>;\n\t/** Codec for encoding revision tags within changesets. */\n\trevisionTagCodec: IJsonCodec<\n\t\tRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tEncodedRevisionTag,\n\t\tChangeEncodingContext\n\t>;\n}\n\n/**\n * Creates a {@link VersionDispatchingCodecBuilder} for encoding/decoding messages.\n */\nexport function makeMessageCodecBuilder<TChangeset>(): VersionDispatchingCodecBuilder<\n\tMessageCodecBuilderOptions<TChangeset>,\n\tDecodedMessage<TChangeset>,\n\tMessageEncodingContext,\n\tMessageFormatVersion | undefined,\n\ttypeof messageCodecName\n> {\n\t// See MessageFormatVersion and its members for documentation on what changed in each version.\n\tconst versions: CodecVersion<\n\t\tDecodedMessage<TChangeset>,\n\t\tMessageEncodingContext,\n\t\tMessageFormatVersion | undefined,\n\t\tMessageCodecBuilderOptions<TChangeset>\n\t>[] = [\n\t\t// The \"undefined\" wire format (no version field) is discontinued.\n\t\tmakeDiscontinuedCodecAndSchema(undefined, \"2.73.0\"),\n\t\tmakeDiscontinuedCodecAndSchema(MessageFormatVersion.v1, \"2.73.0\"),\n\t\tmakeDiscontinuedCodecAndSchema(MessageFormatVersion.v2, \"2.73.0\"),\n\t\t{\n\t\t\tminVersionForCollab: lowestMinVersionForCollab,\n\t\t\tformatVersion: MessageFormatVersion.v3,\n\t\t\tcodec: (options: MessageCodecBuilderOptions<TChangeset>) =>\n\t\t\t\tmakeV1ToV4CodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(MessageFormatVersion.v3),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tMessageFormatVersion.v3,\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\tminVersionForCollab: FluidClientVersion.v2_43,\n\t\t\tformatVersion: MessageFormatVersion.v4,\n\t\t\tcodec: (options: MessageCodecBuilderOptions<TChangeset>) =>\n\t\t\t\tmakeV1ToV4CodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(MessageFormatVersion.v4),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tMessageFormatVersion.v4,\n\t\t\t\t),\n\t\t},\n\t\tmakeDiscontinuedCodecAndSchema(MessageFormatVersion.v5, \"2.74.0\"),\n\t\t{\n\t\t\tminVersionForCollab: FluidClientVersion.v2_80,\n\t\t\tformatVersion: MessageFormatVersion.v6,\n\t\t\tcodec: (options: MessageCodecBuilderOptions<TChangeset>) =>\n\t\t\t\tmakeV1ToV4CodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(MessageFormatVersion.v6),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tMessageFormatVersion.v6,\n\t\t\t\t),\n\t\t},\n\t\t{\n\t\t\tminVersionForCollab: undefined,\n\t\t\tformatVersion: MessageFormatVersion.vSharedBranches,\n\t\t\tcodec: (options: MessageCodecBuilderOptions<TChangeset>) =>\n\t\t\t\tmakeSharedBranchesCodecWithVersion(\n\t\t\t\t\toptions.changeCodecs.resolve(\n\t\t\t\t\t\toptions.dependentChangeFormatVersion.lookup(MessageFormatVersion.vSharedBranches),\n\t\t\t\t\t),\n\t\t\t\t\toptions.revisionTagCodec,\n\t\t\t\t\tMessageFormatVersion.vSharedBranches,\n\t\t\t\t),\n\t\t},\n\t];\n\n\treturn VersionDispatchingCodecBuilder.build(messageCodecName, versions);\n}\n\nexport function getCodecTreeForMessageFormatWithChange(\n\tclientVersion: MinimumVersionForCollab,\n\tchangeFormat: CodecTree,\n): CodecTree {\n\tconst builder = makeMessageCodecBuilder();\n\treturn {\n\t\t...builder.getCodecTree(clientVersion),\n\t\tchildren: [changeFormat],\n\t};\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { SessionId } from "@fluidframework/id-compressor";
6
- import { type TSchema } from "@sinclair/typebox";
6
+ import * as Type from "@sinclair/typebox";
7
7
  import { type EncodedRevisionTag } from "../core/index.js";
8
8
  import type { JsonCompatibleReadOnly } from "../util/index.js";
9
9
  import { MessageFormatVersion } from "./messageFormat.js";
@@ -31,10 +31,10 @@ export interface Message {
31
31
  */
32
32
  readonly version?: typeof MessageFormatVersion.v1 | typeof MessageFormatVersion.v2 | typeof MessageFormatVersion.v3 | typeof MessageFormatVersion.v4 | typeof MessageFormatVersion.v6;
33
33
  }
34
- export declare const Message: <ChangeSchema extends TSchema>(tChange: ChangeSchema) => import("@sinclair/typebox").TObject<{
35
- revision: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
36
- originatorId: import("@sinclair/typebox").TUnsafe<SessionId>;
34
+ export declare const Message: <ChangeSchema extends Type.TSchema>(tChange: ChangeSchema) => Type.TObject<{
35
+ revision: Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>;
36
+ originatorId: Type.TUnsafe<SessionId>;
37
37
  changeset: ChangeSchema;
38
- version: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<1, "MessageFormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<2, "MessageFormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<3, "MessageFormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<4, "MessageFormatVersion">>, import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<6, "MessageFormatVersion">>]>>;
38
+ version: Type.TOptional<Type.TUnion<[Type.TLiteral<import("../util/brand.js").Brand<1, "MessageFormatVersion">>, Type.TLiteral<import("../util/brand.js").Brand<2, "MessageFormatVersion">>, Type.TLiteral<import("../util/brand.js").Brand<3, "MessageFormatVersion">>, Type.TLiteral<import("../util/brand.js").Brand<4, "MessageFormatVersion">>, Type.TLiteral<import("../util/brand.js").Brand<6, "MessageFormatVersion">>]>>;
39
39
  }>;
40
40
  //# sourceMappingURL=messageFormatV1ToV4.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messageFormatV1ToV4.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatV1ToV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,KAAK,kBAAkB,EAAsC,MAAM,kBAAkB,CAAC;AAC/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,sBAAsB,CAAC;IAE3C;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,EACd,OAAO,oBAAoB,CAAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,EAAE,CAAC;CAClC;AAID,eAAO,MAAM,OAAO,0CAA2C,YAAY;;;;;EAcxE,CAAC"}
1
+ {"version":3,"file":"messageFormatV1ToV4.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatV1ToV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,KAAK,kBAAkB,EAAsC,MAAM,kBAAkB,CAAC;AAC/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,sBAAsB,CAAC;IAE3C;;;;;OAKG;IACH,QAAQ,CAAC,OAAO,CAAC,EACd,OAAO,oBAAoB,CAAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,EAAE,GAC9B,OAAO,oBAAoB,CAAC,EAAE,CAAC;CAClC;AAID,eAAO,MAAM,OAAO,+CAA2C,YAAY;;;;;EAcxE,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { Type } from "@sinclair/typebox";
5
+ import * as Type from "@sinclair/typebox";
6
6
  import { RevisionTagSchema, SessionIdSchema } from "../core/index.js";
7
7
  import { MessageFormatVersion } from "./messageFormat.js";
8
8
  // Return type is intentionally derived.
@@ -1 +1 @@
1
- {"version":3,"file":"messageFormatV1ToV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatV1ToV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAgB,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAA2B,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAiC1D,wCAAwC;AACxC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,OAAO,GAAG,CAA+B,OAAqB,EAAE,EAAE,CAC9E,IAAI,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,iBAAiB;IAC3B,YAAY,EAAE,eAAe;IAC7B,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,IAAI,CAAC,QAAQ,CACrB,IAAI,CAAC,KAAK,CAAC;QACV,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;KACrC,CAAC,CACF;CACD,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { SessionId } from \"@fluidframework/id-compressor\";\nimport { type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { type EncodedRevisionTag, RevisionTagSchema, SessionIdSchema } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport { MessageFormatVersion } from \"./messageFormat.js\";\n\n/**\n * The format of messages that SharedTree sends and receives.\n */\nexport interface Message {\n\t/**\n\t * The revision tag for the change in this message\n\t */\n\treadonly revision: EncodedRevisionTag;\n\t/**\n\t * The stable ID that identifies the originator of the message.\n\t */\n\treadonly originatorId: SessionId;\n\t/**\n\t * The changeset to be applied.\n\t */\n\treadonly changeset: JsonCompatibleReadOnly;\n\n\t/**\n\t * The version of the message. This controls how the message is encoded.\n\t *\n\t * This was not set historically and was added before making any breaking changes to the format.\n\t * For that reason, absence of a 'version' field is synonymous with version 1.\n\t */\n\treadonly version?:\n\t\t| typeof MessageFormatVersion.v1\n\t\t| typeof MessageFormatVersion.v2\n\t\t| typeof MessageFormatVersion.v3\n\t\t| typeof MessageFormatVersion.v4\n\t\t| typeof MessageFormatVersion.v6;\n}\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const Message = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object({\n\t\trevision: RevisionTagSchema,\n\t\toriginatorId: SessionIdSchema,\n\t\tchangeset: tChange,\n\t\tversion: Type.Optional(\n\t\t\tType.Union([\n\t\t\t\tType.Literal(MessageFormatVersion.v1),\n\t\t\t\tType.Literal(MessageFormatVersion.v2),\n\t\t\t\tType.Literal(MessageFormatVersion.v3),\n\t\t\t\tType.Literal(MessageFormatVersion.v4),\n\t\t\t\tType.Literal(MessageFormatVersion.v6),\n\t\t\t]),\n\t\t),\n\t});\n"]}
1
+ {"version":3,"file":"messageFormatV1ToV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatV1ToV4.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAA2B,iBAAiB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAG/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAiC1D,wCAAwC;AACxC,4EAA4E;AAC5E,MAAM,CAAC,MAAM,OAAO,GAAG,CAA+B,OAAqB,EAAE,EAAE,CAC9E,IAAI,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,iBAAiB;IAC3B,YAAY,EAAE,eAAe;IAC7B,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,IAAI,CAAC,QAAQ,CACrB,IAAI,CAAC,KAAK,CAAC;QACV,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;KACrC,CAAC,CACF;CACD,CAAC,CAAC","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 { TSchema } from \"@sinclair/typebox\";\n\nimport { type EncodedRevisionTag, RevisionTagSchema, SessionIdSchema } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport { MessageFormatVersion } from \"./messageFormat.js\";\n\n/**\n * The format of messages that SharedTree sends and receives.\n */\nexport interface Message {\n\t/**\n\t * The revision tag for the change in this message\n\t */\n\treadonly revision: EncodedRevisionTag;\n\t/**\n\t * The stable ID that identifies the originator of the message.\n\t */\n\treadonly originatorId: SessionId;\n\t/**\n\t * The changeset to be applied.\n\t */\n\treadonly changeset: JsonCompatibleReadOnly;\n\n\t/**\n\t * The version of the message. This controls how the message is encoded.\n\t *\n\t * This was not set historically and was added before making any breaking changes to the format.\n\t * For that reason, absence of a 'version' field is synonymous with version 1.\n\t */\n\treadonly version?:\n\t\t| typeof MessageFormatVersion.v1\n\t\t| typeof MessageFormatVersion.v2\n\t\t| typeof MessageFormatVersion.v3\n\t\t| typeof MessageFormatVersion.v4\n\t\t| typeof MessageFormatVersion.v6;\n}\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const Message = <ChangeSchema extends TSchema>(tChange: ChangeSchema) =>\n\tType.Object({\n\t\trevision: RevisionTagSchema,\n\t\toriginatorId: SessionIdSchema,\n\t\tchangeset: tChange,\n\t\tversion: Type.Optional(\n\t\t\tType.Union([\n\t\t\t\tType.Literal(MessageFormatVersion.v1),\n\t\t\t\tType.Literal(MessageFormatVersion.v2),\n\t\t\t\tType.Literal(MessageFormatVersion.v3),\n\t\t\t\tType.Literal(MessageFormatVersion.v4),\n\t\t\t\tType.Literal(MessageFormatVersion.v6),\n\t\t\t]),\n\t\t),\n\t});\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { SessionId } from "@fluidframework/id-compressor";
6
- import { type TSchema } from "@sinclair/typebox";
6
+ import * as Type from "@sinclair/typebox";
7
7
  import { type EncodedRevisionTag } from "../core/index.js";
8
8
  import type { JsonCompatibleReadOnly } from "../util/index.js";
9
9
  import type { EncodedBranchId } from "./branch.js";
@@ -30,11 +30,11 @@ export interface Message {
30
30
  */
31
31
  readonly version: typeof MessageFormatVersion.vSharedBranches;
32
32
  }
33
- export declare const Message: <ChangeSchema extends TSchema>(tChange: ChangeSchema) => import("@sinclair/typebox").TObject<{
34
- revision: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"root">, import("@sinclair/typebox").TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
35
- originatorId: import("@sinclair/typebox").TUnsafe<SessionId>;
36
- changeset: ChangeSchema extends import("@sinclair/typebox").TOptional<infer S extends TSchema> ? import("@sinclair/typebox").TOptional<S> : import("@sinclair/typebox").Ensure<import("@sinclair/typebox").TOptional<ChangeSchema>>;
37
- branchId: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
38
- version: import("@sinclair/typebox").TLiteral<import("../util/brand.js").Brand<"shared-branches|v0.1", "MessageFormatVersion">>;
33
+ export declare const Message: <ChangeSchema extends Type.TSchema>(tChange: ChangeSchema) => Type.TObject<{
34
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
35
+ originatorId: Type.TUnsafe<SessionId>;
36
+ changeset: ChangeSchema extends Type.TOptional<infer S extends Type.TSchema> ? Type.TOptional<S> : Type.Ensure<Type.TOptional<ChangeSchema>>;
37
+ branchId: Type.TOptional<Type.TNumber>;
38
+ version: Type.TLiteral<import("../util/brand.js").Brand<"shared-branches|v0.1", "MessageFormatVersion">>;
39
39
  }>;
40
40
  //# sourceMappingURL=messageFormatVSharedBranches.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messageFormatVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAE,KAAK,kBAAkB,EAAsC,MAAM,kBAAkB,CAAC;AAC/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,sBAAsB,CAAC;IAE5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,oBAAoB,CAAC,eAAe,CAAC;CAC9D;AAID,eAAO,MAAM,OAAO,0CAA2C,YAAY;;;;;;EAOxE,CAAC"}
1
+ {"version":3,"file":"messageFormatVSharedBranches.d.ts","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatVSharedBranches.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAG1C,OAAO,EAAE,KAAK,kBAAkB,EAAsC,MAAM,kBAAkB,CAAC;AAC/F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D;;GAEG;AACH,MAAM,WAAW,OAAO;IACvB;;OAEG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IACvC;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,sBAAsB,CAAC;IAE5C,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC;IAEpC;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,oBAAoB,CAAC,eAAe,CAAC;CAC9D;AAID,eAAO,MAAM,OAAO,+CAA2C,YAAY;;;;;;EAOxE,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { Type } from "@sinclair/typebox";
5
+ import * as Type from "@sinclair/typebox";
6
6
  import { RevisionTagSchema, SessionIdSchema } from "../core/index.js";
7
7
  import { MessageFormatVersion } from "./messageFormat.js";
8
8
  // Return type is intentionally derived.