@fluidframework/tree 2.102.0 → 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 (367) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/codec/versioned/format.d.ts +5 -4
  3. package/dist/codec/versioned/format.d.ts.map +1 -1
  4. package/dist/codec/versioned/format.js +26 -3
  5. package/dist/codec/versioned/format.js.map +1 -1
  6. package/dist/core/rebase/types.d.ts +4 -3
  7. package/dist/core/rebase/types.d.ts.map +1 -1
  8. package/dist/core/rebase/types.js +27 -4
  9. package/dist/core/rebase/types.js.map +1 -1
  10. package/dist/core/schema-stored/formatV1.d.ts +16 -15
  11. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  12. package/dist/core/schema-stored/formatV1.js +31 -8
  13. package/dist/core/schema-stored/formatV1.js.map +1 -1
  14. package/dist/core/schema-stored/formatV2.d.ts +29 -28
  15. package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
  16. package/dist/core/schema-stored/formatV2.js +33 -10
  17. package/dist/core/schema-stored/formatV2.js.map +1 -1
  18. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +11 -10
  19. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  20. package/dist/core/tree/detachedFieldIndexFormatCommon.js +33 -10
  21. package/dist/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  22. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +7 -6
  23. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  24. package/dist/core/tree/detachedFieldIndexFormatV2.js +25 -2
  25. package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  26. package/dist/core/tree/persistedTreeTextFormat.d.ts +19 -18
  27. package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  28. package/dist/core/tree/persistedTreeTextFormat.js +33 -10
  29. package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
  30. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  31. package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -1
  32. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  33. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +13 -12
  34. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
  35. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js +36 -13
  36. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
  37. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +36 -35
  38. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -1
  39. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js +41 -18
  40. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
  41. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +26 -25
  42. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -1
  43. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js +27 -4
  44. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
  45. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.d.ts +24 -23
  46. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.d.ts.map +1 -1
  47. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js +30 -7
  48. package/dist/feature-libraries/chunked-forest/codec/format/formatVText.js.map +1 -1
  49. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +66 -14
  50. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  51. package/dist/feature-libraries/chunked-forest/uniformChunk.js +101 -36
  52. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  53. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  54. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +36 -14
  55. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  56. package/dist/feature-libraries/forest-summary/formatCommon.d.ts +6 -5
  57. package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  58. package/dist/feature-libraries/forest-summary/formatCommon.js +26 -3
  59. package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  60. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +4 -3
  61. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  62. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js +26 -3
  63. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  64. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +45 -44
  65. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  66. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js +48 -25
  67. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  68. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +23 -22
  69. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  70. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +29 -6
  71. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
  72. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +9 -8
  73. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  74. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +31 -8
  75. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
  76. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +14 -13
  77. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  78. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +34 -11
  79. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
  80. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +5 -4
  81. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  82. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js +25 -2
  83. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  84. package/dist/feature-libraries/schema-index/formatV1.d.ts +15 -14
  85. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  86. package/dist/feature-libraries/schema-index/formatV1.js +27 -4
  87. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  88. package/dist/feature-libraries/schema-index/formatV2.d.ts +20 -19
  89. package/dist/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
  90. package/dist/feature-libraries/schema-index/formatV2.js +27 -4
  91. package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
  92. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  93. package/dist/feature-libraries/sequence-field/compose.js +1 -3
  94. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  95. package/dist/feature-libraries/sequence-field/formatV1.d.ts +283 -282
  96. package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  97. package/dist/feature-libraries/sequence-field/formatV1.js +63 -40
  98. package/dist/feature-libraries/sequence-field/formatV1.js.map +1 -1
  99. package/dist/feature-libraries/sequence-field/formatV2.d.ts +180 -179
  100. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  101. package/dist/feature-libraries/sequence-field/formatV2.js +55 -32
  102. package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
  103. package/dist/feature-libraries/sequence-field/formatV3.d.ts +126 -125
  104. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  105. package/dist/feature-libraries/sequence-field/formatV3.js +27 -4
  106. package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
  107. package/dist/packageVersion.d.ts +1 -1
  108. package/dist/packageVersion.js +1 -1
  109. package/dist/packageVersion.js.map +1 -1
  110. package/dist/shared-tree/sharedTree.d.ts +2 -2
  111. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  112. package/dist/shared-tree/sharedTree.js.map +1 -1
  113. package/dist/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
  114. package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  115. package/dist/shared-tree/sharedTreeChangeFormat.js +28 -5
  116. package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  117. package/dist/shared-tree/treeCheckout.d.ts +3 -3
  118. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  119. package/dist/shared-tree/treeCheckout.js.map +1 -1
  120. package/dist/shared-tree-core/editManager.d.ts +2 -2
  121. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  122. package/dist/shared-tree-core/editManager.js.map +1 -1
  123. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +35 -34
  124. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  125. package/dist/shared-tree-core/editManagerFormatCommons.js +39 -16
  126. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  127. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +15 -15
  128. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  129. package/dist/shared-tree-core/editManagerFormatV1toV4.js +33 -10
  130. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  131. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +40 -40
  132. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  133. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +27 -4
  134. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  135. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  136. package/dist/shared-tree-core/messageCodecVSharedBranches.js +25 -2
  137. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  138. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +5 -5
  139. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  140. package/dist/shared-tree-core/messageFormatV1ToV4.js +31 -8
  141. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  142. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -7
  143. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  144. package/dist/shared-tree-core/messageFormatVSharedBranches.js +29 -6
  145. package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  146. package/dist/simple-tree/core/treeNodeKernel.d.ts +5 -0
  147. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  148. package/dist/simple-tree/core/treeNodeKernel.js +37 -13
  149. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  150. package/dist/simple-tree/simpleSchemaFormatV1.d.ts +121 -120
  151. package/dist/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
  152. package/dist/simple-tree/simpleSchemaFormatV1.js +54 -31
  153. package/dist/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  154. package/dist/util/typeboxBrand.d.ts +1 -1
  155. package/dist/util/typeboxBrand.d.ts.map +1 -1
  156. package/dist/util/typeboxBrand.js +26 -3
  157. package/dist/util/typeboxBrand.js.map +1 -1
  158. package/dist/util/utils.d.ts +2 -2
  159. package/dist/util/utils.d.ts.map +1 -1
  160. package/dist/util/utils.js +25 -2
  161. package/dist/util/utils.js.map +1 -1
  162. package/eslint.config.mts +44 -0
  163. package/lib/codec/versioned/format.d.ts +5 -4
  164. package/lib/codec/versioned/format.d.ts.map +1 -1
  165. package/lib/codec/versioned/format.js +1 -1
  166. package/lib/codec/versioned/format.js.map +1 -1
  167. package/lib/core/rebase/types.d.ts +4 -3
  168. package/lib/core/rebase/types.d.ts.map +1 -1
  169. package/lib/core/rebase/types.js +1 -1
  170. package/lib/core/rebase/types.js.map +1 -1
  171. package/lib/core/schema-stored/formatV1.d.ts +16 -15
  172. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  173. package/lib/core/schema-stored/formatV1.js +1 -1
  174. package/lib/core/schema-stored/formatV1.js.map +1 -1
  175. package/lib/core/schema-stored/formatV2.d.ts +29 -28
  176. package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
  177. package/lib/core/schema-stored/formatV2.js +1 -1
  178. package/lib/core/schema-stored/formatV2.js.map +1 -1
  179. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +11 -10
  180. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  181. package/lib/core/tree/detachedFieldIndexFormatCommon.js +1 -1
  182. package/lib/core/tree/detachedFieldIndexFormatCommon.js.map +1 -1
  183. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts +7 -6
  184. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  185. package/lib/core/tree/detachedFieldIndexFormatV2.js +1 -1
  186. package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  187. package/lib/core/tree/persistedTreeTextFormat.d.ts +19 -18
  188. package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  189. package/lib/core/tree/persistedTreeTextFormat.js +1 -1
  190. package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
  191. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  192. package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -1
  193. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  194. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +13 -12
  195. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
  196. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js +1 -1
  197. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -1
  198. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +36 -35
  199. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -1
  200. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js +1 -1
  201. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -1
  202. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +26 -25
  203. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -1
  204. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js +1 -1
  205. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -1
  206. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.d.ts +24 -23
  207. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.d.ts.map +1 -1
  208. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.js +1 -1
  209. package/lib/feature-libraries/chunked-forest/codec/format/formatVText.js.map +1 -1
  210. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +66 -14
  211. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  212. package/lib/feature-libraries/chunked-forest/uniformChunk.js +101 -36
  213. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  214. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  215. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +36 -14
  216. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  217. package/lib/feature-libraries/forest-summary/formatCommon.d.ts +6 -5
  218. package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  219. package/lib/feature-libraries/forest-summary/formatCommon.js +1 -1
  220. package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  221. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +4 -3
  222. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  223. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js +1 -1
  224. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  225. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +45 -44
  226. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  227. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js +1 -1
  228. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  229. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +23 -22
  230. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  231. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +1 -1
  232. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
  233. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +9 -8
  234. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  235. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js +1 -1
  236. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
  237. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +14 -13
  238. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  239. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js +1 -1
  240. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
  241. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +5 -4
  242. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  243. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js +1 -1
  244. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  245. package/lib/feature-libraries/schema-index/formatV1.d.ts +15 -14
  246. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  247. package/lib/feature-libraries/schema-index/formatV1.js +1 -1
  248. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  249. package/lib/feature-libraries/schema-index/formatV2.d.ts +20 -19
  250. package/lib/feature-libraries/schema-index/formatV2.d.ts.map +1 -1
  251. package/lib/feature-libraries/schema-index/formatV2.js +1 -1
  252. package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
  253. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  254. package/lib/feature-libraries/sequence-field/compose.js +1 -3
  255. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  256. package/lib/feature-libraries/sequence-field/formatV1.d.ts +283 -282
  257. package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  258. package/lib/feature-libraries/sequence-field/formatV1.js +1 -1
  259. package/lib/feature-libraries/sequence-field/formatV1.js.map +1 -1
  260. package/lib/feature-libraries/sequence-field/formatV2.d.ts +180 -179
  261. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  262. package/lib/feature-libraries/sequence-field/formatV2.js +1 -1
  263. package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
  264. package/lib/feature-libraries/sequence-field/formatV3.d.ts +126 -125
  265. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  266. package/lib/feature-libraries/sequence-field/formatV3.js +1 -1
  267. package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
  268. package/lib/packageVersion.d.ts +1 -1
  269. package/lib/packageVersion.js +1 -1
  270. package/lib/packageVersion.js.map +1 -1
  271. package/lib/shared-tree/sharedTree.d.ts +2 -2
  272. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  273. package/lib/shared-tree/sharedTree.js +1 -1
  274. package/lib/shared-tree/sharedTree.js.map +1 -1
  275. package/lib/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
  276. package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  277. package/lib/shared-tree/sharedTreeChangeFormat.js +1 -1
  278. package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  279. package/lib/shared-tree/treeCheckout.d.ts +3 -3
  280. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  281. package/lib/shared-tree/treeCheckout.js +1 -1
  282. package/lib/shared-tree/treeCheckout.js.map +1 -1
  283. package/lib/shared-tree-core/editManager.d.ts +2 -2
  284. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  285. package/lib/shared-tree-core/editManager.js.map +1 -1
  286. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +35 -34
  287. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  288. package/lib/shared-tree-core/editManagerFormatCommons.js +1 -1
  289. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  290. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +15 -15
  291. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  292. package/lib/shared-tree-core/editManagerFormatV1toV4.js +1 -1
  293. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  294. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +40 -40
  295. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  296. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
  297. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  298. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  299. package/lib/shared-tree-core/messageCodecVSharedBranches.js +1 -1
  300. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  301. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +5 -5
  302. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  303. package/lib/shared-tree-core/messageFormatV1ToV4.js +1 -1
  304. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  305. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +7 -7
  306. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  307. package/lib/shared-tree-core/messageFormatVSharedBranches.js +1 -1
  308. package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  309. package/lib/simple-tree/core/treeNodeKernel.d.ts +5 -0
  310. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  311. package/lib/simple-tree/core/treeNodeKernel.js +35 -12
  312. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  313. package/lib/simple-tree/simpleSchemaFormatV1.d.ts +121 -120
  314. package/lib/simple-tree/simpleSchemaFormatV1.d.ts.map +1 -1
  315. package/lib/simple-tree/simpleSchemaFormatV1.js +1 -1
  316. package/lib/simple-tree/simpleSchemaFormatV1.js.map +1 -1
  317. package/lib/util/typeboxBrand.d.ts +1 -1
  318. package/lib/util/typeboxBrand.d.ts.map +1 -1
  319. package/lib/util/typeboxBrand.js +1 -1
  320. package/lib/util/typeboxBrand.js.map +1 -1
  321. package/lib/util/utils.d.ts +2 -2
  322. package/lib/util/utils.d.ts.map +1 -1
  323. package/lib/util/utils.js +1 -1
  324. package/lib/util/utils.js.map +1 -1
  325. package/package.json +21 -21
  326. package/src/codec/versioned/format.ts +2 -1
  327. package/src/core/rebase/types.ts +1 -1
  328. package/src/core/schema-stored/formatV1.ts +2 -1
  329. package/src/core/schema-stored/formatV2.ts +2 -1
  330. package/src/core/tree/detachedFieldIndexFormatCommon.ts +2 -1
  331. package/src/core/tree/detachedFieldIndexFormatV2.ts +2 -1
  332. package/src/core/tree/persistedTreeTextFormat.ts +2 -1
  333. package/src/feature-libraries/chunked-forest/chunkTree.ts +3 -2
  334. package/src/feature-libraries/chunked-forest/codec/format/formatGeneric.ts +2 -1
  335. package/src/feature-libraries/chunked-forest/codec/format/formatV1.ts +2 -1
  336. package/src/feature-libraries/chunked-forest/codec/format/formatV2.ts +2 -1
  337. package/src/feature-libraries/chunked-forest/codec/format/formatVText.ts +2 -1
  338. package/src/feature-libraries/chunked-forest/uniformChunk.ts +131 -44
  339. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +36 -14
  340. package/src/feature-libraries/forest-summary/formatCommon.ts +2 -1
  341. package/src/feature-libraries/modular-schema/genericFieldKindFormat.ts +2 -1
  342. package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +2 -1
  343. package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +2 -1
  344. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV1.ts +2 -1
  345. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV2.ts +2 -1
  346. package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +2 -1
  347. package/src/feature-libraries/schema-index/formatV1.ts +2 -1
  348. package/src/feature-libraries/schema-index/formatV2.ts +2 -1
  349. package/src/feature-libraries/sequence-field/compose.ts +1 -4
  350. package/src/feature-libraries/sequence-field/formatV1.ts +2 -1
  351. package/src/feature-libraries/sequence-field/formatV2.ts +2 -1
  352. package/src/feature-libraries/sequence-field/formatV3.ts +2 -1
  353. package/src/packageVersion.ts +1 -1
  354. package/src/shared-tree/sharedTree.ts +2 -5
  355. package/src/shared-tree/sharedTreeChangeFormat.ts +2 -1
  356. package/src/shared-tree/treeCheckout.ts +3 -6
  357. package/src/shared-tree-core/editManager.ts +2 -2
  358. package/src/shared-tree-core/editManagerFormatCommons.ts +2 -1
  359. package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -1
  360. package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +2 -1
  361. package/src/shared-tree-core/messageCodecVSharedBranches.ts +2 -1
  362. package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -1
  363. package/src/shared-tree-core/messageFormatVSharedBranches.ts +2 -1
  364. package/src/simple-tree/core/treeNodeKernel.ts +39 -15
  365. package/src/simple-tree/simpleSchemaFormatV1.ts +2 -1
  366. package/src/util/typeboxBrand.ts +2 -1
  367. package/src/util/utils.ts +2 -1
@@ -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"}
@@ -3,22 +3,45 @@
3
3
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
4
  * Licensed under the MIT License.
5
5
  */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
6
29
  Object.defineProperty(exports, "__esModule", { value: true });
7
30
  exports.EncodedEditManager = void 0;
8
- const typebox_1 = require("@sinclair/typebox");
31
+ const Type = __importStar(require("@sinclair/typebox"));
9
32
  const index_js_1 = require("../core/index.js");
10
33
  const editManagerFormatCommons_js_1 = require("./editManagerFormatCommons.js");
11
34
  const noAdditionalProps = { additionalProperties: false };
12
- const EncodedEditManager = (tChange) => typebox_1.Type.Object({
13
- version: typebox_1.Type.Union([
14
- typebox_1.Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.v1),
15
- typebox_1.Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.v2),
16
- typebox_1.Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.v3),
17
- typebox_1.Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.v4),
18
- typebox_1.Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.v6),
35
+ const EncodedEditManager = (tChange) => Type.Object({
36
+ version: Type.Union([
37
+ Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.v1),
38
+ Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.v2),
39
+ Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.v3),
40
+ Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.v4),
41
+ Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.v6),
19
42
  ]),
20
- trunk: typebox_1.Type.Array((0, editManagerFormatCommons_js_1.SequencedCommit)(tChange)),
21
- branches: typebox_1.Type.Array(typebox_1.Type.Tuple([index_js_1.SessionIdSchema, (0, editManagerFormatCommons_js_1.SummarySessionBranch)(tChange)])),
43
+ trunk: Type.Array((0, editManagerFormatCommons_js_1.SequencedCommit)(tChange)),
44
+ branches: Type.Array(Type.Tuple([index_js_1.SessionIdSchema, (0, editManagerFormatCommons_js_1.SummarySessionBranch)(tChange)])),
22
45
  }, noAdditionalProps);
23
46
  exports.EncodedEditManager = EncodedEditManager;
24
47
  /* eslint-enable @typescript-eslint/explicit-function-return-type */
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerFormatV1toV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatV1toV4.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+CAA2E;AAE3E,+CAAmD;AAEnD,+EAKuC;AAEvC,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAgBlE,MAAM,kBAAkB,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACzF,cAAI,CAAC,MAAM,CACV;IACC,OAAO,EAAE,cAAI,CAAC,KAAK,CAAC;QACnB,cAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,EAAE,CAAC;QACzC,cAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,EAAE,CAAC;QACzC,cAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,EAAE,CAAC;QACzC,cAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,EAAE,CAAC;QACzC,cAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,EAAE,CAAC;KACzC,CAAC;IACF,KAAK,EAAE,cAAI,CAAC,KAAK,CAAC,IAAA,6CAAe,EAAC,OAAO,CAAC,CAAC;IAC3C,QAAQ,EAAE,cAAI,CAAC,KAAK,CAAC,cAAI,CAAC,KAAK,CAAC,CAAC,0BAAe,EAAE,IAAA,kDAAoB,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAClF,EACD,iBAAiB,CACjB,CAAC;AAdU,QAAA,kBAAkB,sBAc5B;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,wDAA0C;AAG1C,+CAAmD;AAEnD,+EAKuC;AAEvC,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAgBlE,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,sDAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,EAAE,CAAC;KACzC,CAAC;IACF,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAA,6CAAe,EAAC,OAAO,CAAC,CAAC;IAC3C,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,0BAAe,EAAE,IAAA,kDAAoB,EAAC,OAAO,CAAC,CAAC,CAAC,CAAC;CAClF,EACD,iBAAiB,CACjB,CAAC;AAdU,QAAA,kBAAkB,sBAc5B;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"}
@@ -3,17 +3,40 @@
3
3
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
4
  * Licensed under the MIT License.
5
5
  */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
6
29
  Object.defineProperty(exports, "__esModule", { value: true });
7
30
  exports.EncodedEditManager = void 0;
8
- const typebox_1 = require("@sinclair/typebox");
31
+ const Type = __importStar(require("@sinclair/typebox"));
9
32
  const index_js_1 = require("../core/index.js");
10
33
  const editManagerFormatCommons_js_1 = require("./editManagerFormatCommons.js");
11
34
  const noAdditionalProps = { additionalProperties: false };
12
- const EncodedEditManager = (tChange) => typebox_1.Type.Object({
13
- version: typebox_1.Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.vSharedBranches),
35
+ const EncodedEditManager = (tChange) => Type.Object({
36
+ version: Type.Literal(editManagerFormatCommons_js_1.EditManagerFormatVersion.vSharedBranches),
14
37
  originator: index_js_1.SessionIdSchema,
15
38
  main: (0, editManagerFormatCommons_js_1.EncodedSharedBranch)(tChange),
16
- branches: typebox_1.Type.Optional(typebox_1.Type.Array((0, editManagerFormatCommons_js_1.EncodedSharedBranch)(tChange))),
39
+ branches: Type.Optional(Type.Array((0, editManagerFormatCommons_js_1.EncodedSharedBranch)(tChange))),
17
40
  }, noAdditionalProps);
18
41
  exports.EncodedEditManager = EncodedEditManager;
19
42
  /* eslint-enable @typescript-eslint/explicit-function-return-type */
@@ -1 +1 @@
1
- {"version":3,"file":"editManagerFormatVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/editManagerFormatVSharedBranches.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+CAA2E;AAE3E,+CAAmD;AAEnD,+EAA8F;AAE9F,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAYlE,MAAM,kBAAkB,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACzF,cAAI,CAAC,MAAM,CACV;IACC,OAAO,EAAE,cAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,eAAe,CAAC;IAC/D,UAAU,EAAE,0BAAe;IAC3B,IAAI,EAAE,IAAA,iDAAmB,EAAC,OAAO,CAAC;IAClC,QAAQ,EAAE,cAAI,CAAC,QAAQ,CAAC,cAAI,CAAC,KAAK,CAAC,IAAA,iDAAmB,EAAC,OAAO,CAAC,CAAC,CAAC;CACjE,EACD,iBAAiB,CACjB,CAAC;AATU,QAAA,kBAAkB,sBAS5B;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,wDAA0C;AAG1C,+CAAmD;AAEnD,+EAA8F;AAE9F,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAYlE,MAAM,kBAAkB,GAAG,CAA+B,OAAqB,EAAE,EAAE,CACzF,IAAI,CAAC,MAAM,CACV;IACC,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,sDAAwB,CAAC,eAAe,CAAC;IAC/D,UAAU,EAAE,0BAAe;IAC3B,IAAI,EAAE,IAAA,iDAAmB,EAAC,OAAO,CAAC;IAClC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAA,iDAAmB,EAAC,OAAO,CAAC,CAAC,CAAC;CACjE,EACD,iBAAiB,CACjB,CAAC;AATU,QAAA,kBAAkB,sBAS5B;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,14 +3,37 @@
3
3
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
4
  * Licensed under the MIT License.
5
5
  */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
6
29
  Object.defineProperty(exports, "__esModule", { value: true });
7
30
  exports.makeSharedBranchesCodecWithVersion = void 0;
8
31
  const internal_1 = require("@fluidframework/core-utils/internal");
9
- const typebox_1 = require("@sinclair/typebox");
32
+ const Type = __importStar(require("@sinclair/typebox"));
10
33
  const branchIdCodec_js_1 = require("./branchIdCodec.js");
11
34
  const messageFormatVSharedBranches_js_1 = require("./messageFormatVSharedBranches.js");
12
35
  function makeSharedBranchesCodecWithVersion(changeCodec, revisionTagCodec, version) {
13
- const schema = (0, messageFormatVSharedBranches_js_1.Message)(changeCodec.encodedSchema ?? typebox_1.Type.Any());
36
+ const schema = (0, messageFormatVSharedBranches_js_1.Message)(changeCodec.encodedSchema ?? Type.Any());
14
37
  return {
15
38
  schema,
16
39
  encode: (message, context) => {
@@ -1 +1 @@
1
- {"version":3,"file":"messageCodecVSharedBranches.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageCodecVSharedBranches.ts"],"names":[],"mappings":"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","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":"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","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"]}
@@ -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"}
@@ -3,23 +3,46 @@
3
3
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
4
  * Licensed under the MIT License.
5
5
  */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
6
29
  Object.defineProperty(exports, "__esModule", { value: true });
7
30
  exports.Message = void 0;
8
- const typebox_1 = require("@sinclair/typebox");
31
+ const Type = __importStar(require("@sinclair/typebox"));
9
32
  const index_js_1 = require("../core/index.js");
10
33
  const messageFormat_js_1 = require("./messageFormat.js");
11
34
  // Return type is intentionally derived.
12
35
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
13
- const Message = (tChange) => typebox_1.Type.Object({
36
+ const Message = (tChange) => Type.Object({
14
37
  revision: index_js_1.RevisionTagSchema,
15
38
  originatorId: index_js_1.SessionIdSchema,
16
39
  changeset: tChange,
17
- version: typebox_1.Type.Optional(typebox_1.Type.Union([
18
- typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.v1),
19
- typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.v2),
20
- typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.v3),
21
- typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.v4),
22
- typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.v6),
40
+ version: Type.Optional(Type.Union([
41
+ Type.Literal(messageFormat_js_1.MessageFormatVersion.v1),
42
+ Type.Literal(messageFormat_js_1.MessageFormatVersion.v2),
43
+ Type.Literal(messageFormat_js_1.MessageFormatVersion.v3),
44
+ Type.Literal(messageFormat_js_1.MessageFormatVersion.v4),
45
+ Type.Literal(messageFormat_js_1.MessageFormatVersion.v6),
23
46
  ])),
24
47
  });
25
48
  exports.Message = Message;
@@ -1 +1 @@
1
- {"version":3,"file":"messageFormatV1ToV4.js","sourceRoot":"","sources":["../../src/shared-tree-core/messageFormatV1ToV4.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+CAAuD;AAEvD,+CAA+F;AAG/F,yDAA0D;AAiC1D,wCAAwC;AACxC,4EAA4E;AACrE,MAAM,OAAO,GAAG,CAA+B,OAAqB,EAAE,EAAE,CAC9E,cAAI,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,4BAAiB;IAC3B,YAAY,EAAE,0BAAe;IAC7B,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,cAAI,CAAC,QAAQ,CACrB,cAAI,CAAC,KAAK,CAAC;QACV,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,cAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;KACrC,CAAC,CACF;CACD,CAAC,CAAC;AAdS,QAAA,OAAO,WAchB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { SessionId } from \"@fluidframework/id-compressor\";\nimport { type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { type EncodedRevisionTag, RevisionTagSchema, SessionIdSchema } from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\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,wDAA0C;AAG1C,+CAA+F;AAG/F,yDAA0D;AAiC1D,wCAAwC;AACxC,4EAA4E;AACrE,MAAM,OAAO,GAAG,CAA+B,OAAqB,EAAE,EAAE,CAC9E,IAAI,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,4BAAiB;IAC3B,YAAY,EAAE,0BAAe;IAC7B,SAAS,EAAE,OAAO;IAClB,OAAO,EAAE,IAAI,CAAC,QAAQ,CACrB,IAAI,CAAC,KAAK,CAAC;QACV,IAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;QACrC,IAAI,CAAC,OAAO,CAAC,uCAAoB,CAAC,EAAE,CAAC;KACrC,CAAC,CACF;CACD,CAAC,CAAC;AAdS,QAAA,OAAO,WAchB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { SessionId } from \"@fluidframework/id-compressor\";\nimport * 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"}
@@ -3,19 +3,42 @@
3
3
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
4
4
  * Licensed under the MIT License.
5
5
  */
6
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || function (mod) {
23
+ if (mod && mod.__esModule) return mod;
24
+ var result = {};
25
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
26
+ __setModuleDefault(result, mod);
27
+ return result;
28
+ };
6
29
  Object.defineProperty(exports, "__esModule", { value: true });
7
30
  exports.Message = void 0;
8
- const typebox_1 = require("@sinclair/typebox");
31
+ const Type = __importStar(require("@sinclair/typebox"));
9
32
  const index_js_1 = require("../core/index.js");
10
33
  const messageFormat_js_1 = require("./messageFormat.js");
11
34
  // Return type is intentionally derived.
12
35
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
13
- const Message = (tChange) => typebox_1.Type.Object({
14
- revision: typebox_1.Type.Optional(index_js_1.RevisionTagSchema),
36
+ const Message = (tChange) => Type.Object({
37
+ revision: Type.Optional(index_js_1.RevisionTagSchema),
15
38
  originatorId: index_js_1.SessionIdSchema,
16
- changeset: typebox_1.Type.Optional(tChange),
17
- branchId: typebox_1.Type.Optional(typebox_1.Type.Number()),
18
- version: typebox_1.Type.Literal(messageFormat_js_1.MessageFormatVersion.vSharedBranches),
39
+ changeset: Type.Optional(tChange),
40
+ branchId: Type.Optional(Type.Number()),
41
+ version: Type.Literal(messageFormat_js_1.MessageFormatVersion.vSharedBranches),
19
42
  });
20
43
  exports.Message = Message;
21
44
  //# sourceMappingURL=messageFormatVSharedBranches.js.map