@fluidframework/tree 2.81.0-374083 → 2.81.1

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 (1522) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/api-report/tree.alpha.api.md +0 -1
  3. package/dist/codec/codec.d.ts +2 -2
  4. package/dist/codec/codec.d.ts.map +1 -1
  5. package/dist/codec/codec.js +8 -8
  6. package/dist/codec/codec.js.map +1 -1
  7. package/dist/codec/versioned/codec.d.ts +1 -1
  8. package/dist/codec/versioned/codec.d.ts.map +1 -1
  9. package/dist/codec/versioned/codec.js +12 -12
  10. package/dist/codec/versioned/codec.js.map +1 -1
  11. package/dist/core/change-family/changeFamily.d.ts +1 -4
  12. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  13. package/dist/core/change-family/changeFamily.js.map +1 -1
  14. package/dist/core/change-family/index.d.ts +1 -1
  15. package/dist/core/change-family/index.d.ts.map +1 -1
  16. package/dist/core/change-family/index.js.map +1 -1
  17. package/dist/core/index.d.ts +3 -3
  18. package/dist/core/index.d.ts.map +1 -1
  19. package/dist/core/index.js +4 -6
  20. package/dist/core/index.js.map +1 -1
  21. package/dist/core/rebase/changeRebaser.d.ts +1 -6
  22. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  23. package/dist/core/rebase/changeRebaser.js.map +1 -1
  24. package/dist/core/rebase/index.d.ts +1 -1
  25. package/dist/core/rebase/index.d.ts.map +1 -1
  26. package/dist/core/rebase/index.js +1 -2
  27. package/dist/core/rebase/index.js.map +1 -1
  28. package/dist/core/rebase/types.d.ts +1 -2
  29. package/dist/core/rebase/types.d.ts.map +1 -1
  30. package/dist/core/rebase/types.js +1 -5
  31. package/dist/core/rebase/types.js.map +1 -1
  32. package/dist/core/rebase/utils.d.ts.map +1 -1
  33. package/dist/core/rebase/utils.js +7 -25
  34. package/dist/core/rebase/utils.js.map +1 -1
  35. package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
  36. package/dist/core/schema-stored/formatV2.js +4 -4
  37. package/dist/core/schema-stored/formatV2.js.map +1 -1
  38. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  39. package/dist/core/tree/anchorSet.js +1 -1
  40. package/dist/core/tree/anchorSet.js.map +1 -1
  41. package/dist/core/tree/detachedFieldIndex.d.ts +0 -6
  42. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  43. package/dist/core/tree/detachedFieldIndex.js +0 -9
  44. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  45. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
  46. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  47. package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  48. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  49. package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -3
  50. package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  51. package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  52. package/dist/core/tree/detachedFieldIndexCodecV2.js +2 -2
  53. package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  54. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
  55. package/dist/core/tree/detachedFieldIndexFormatV1.js +3 -3
  56. package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
  57. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  58. package/dist/core/tree/detachedFieldIndexFormatV2.js +4 -4
  59. package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  60. package/dist/core/tree/index.d.ts +1 -1
  61. package/dist/core/tree/index.d.ts.map +1 -1
  62. package/dist/core/tree/index.js +3 -4
  63. package/dist/core/tree/index.js.map +1 -1
  64. package/dist/core/tree/pathTree.d.ts +3 -11
  65. package/dist/core/tree/pathTree.d.ts.map +1 -1
  66. package/dist/core/tree/pathTree.js +2 -14
  67. package/dist/core/tree/pathTree.js.map +1 -1
  68. package/dist/core/tree/visitDelta.d.ts +1 -1
  69. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  70. package/dist/core/tree/visitDelta.js.map +1 -1
  71. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  72. package/dist/core/tree/visitorUtils.js +1 -1
  73. package/dist/core/tree/visitorUtils.js.map +1 -1
  74. package/dist/feature-libraries/changeAtomIdBTree.d.ts +3 -4
  75. package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  76. package/dist/feature-libraries/changeAtomIdBTree.js +2 -16
  77. package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  79. package/dist/feature-libraries/chunked-forest/basicChunk.js +0 -7
  80. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  81. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
  82. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  83. package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -4
  84. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  85. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  86. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  87. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  88. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
  89. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  90. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  91. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
  92. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  93. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  94. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +1 -1
  95. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  96. package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  97. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  98. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  99. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  100. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  101. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  102. package/dist/feature-libraries/chunked-forest/codec/format.js +1 -1
  103. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  104. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  105. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  106. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  107. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  108. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
  109. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  110. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
  111. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  112. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +78 -245
  113. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  114. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
  115. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  116. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +25 -75
  117. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  118. package/dist/feature-libraries/default-schema/index.d.ts +2 -3
  119. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  120. package/dist/feature-libraries/default-schema/index.js +2 -5
  121. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  122. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
  123. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  124. package/dist/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
  125. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  126. package/dist/feature-libraries/deltaUtils.d.ts +0 -1
  127. package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
  128. package/dist/feature-libraries/deltaUtils.js +1 -6
  129. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  130. package/dist/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
  131. package/dist/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
  132. package/dist/feature-libraries/fieldKindIdentifiers.js +16 -0
  133. package/dist/feature-libraries/fieldKindIdentifiers.js.map +1 -0
  134. package/dist/feature-libraries/flex-tree/context.d.ts +0 -9
  135. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  136. package/dist/feature-libraries/flex-tree/context.js +0 -6
  137. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  138. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  139. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  140. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  141. package/dist/feature-libraries/flex-tree/lazyField.d.ts +7 -8
  142. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  143. package/dist/feature-libraries/flex-tree/lazyField.js +17 -48
  144. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  145. package/dist/feature-libraries/flex-tree/observer.d.ts +1 -1
  146. package/dist/feature-libraries/flex-tree/observer.d.ts.map +1 -1
  147. package/dist/feature-libraries/flex-tree/observer.js.map +1 -1
  148. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  149. package/dist/feature-libraries/forest-summary/codec.js +1 -1
  150. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  151. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  152. package/dist/feature-libraries/forest-summary/forestSummarizer.js +3 -3
  153. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  154. package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
  155. package/dist/feature-libraries/forest-summary/formatV1.js.map +1 -1
  156. package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
  157. package/dist/feature-libraries/forest-summary/formatV2.js.map +1 -1
  158. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
  159. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  160. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
  161. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  162. package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
  163. package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
  164. package/dist/feature-libraries/index.d.ts +3 -3
  165. package/dist/feature-libraries/index.d.ts.map +1 -1
  166. package/dist/feature-libraries/index.js +3 -8
  167. package/dist/feature-libraries/index.js.map +1 -1
  168. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  169. package/dist/feature-libraries/mapTreeCursor.js +0 -1
  170. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  171. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  172. package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
  173. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  174. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +21 -97
  175. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  176. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +7 -4
  177. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  178. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
  179. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  180. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  181. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  182. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  183. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
  184. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  185. package/dist/feature-libraries/modular-schema/genericFieldKind.js +11 -5
  186. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  187. package/dist/feature-libraries/modular-schema/index.d.ts +4 -4
  188. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  189. package/dist/feature-libraries/modular-schema/index.js +2 -2
  190. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  191. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
  192. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  193. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +162 -254
  194. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  195. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  196. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
  197. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  198. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  199. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
  200. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  201. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
  202. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  203. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +460 -1325
  204. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  205. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  206. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  207. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
  208. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  209. package/dist/feature-libraries/modular-schema/modularChangeTypes.js +3 -3
  210. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  211. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  212. package/dist/feature-libraries/object-forest/objectForest.js +2 -2
  213. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  214. package/dist/feature-libraries/optional-field/index.d.ts +2 -2
  215. package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
  216. package/dist/feature-libraries/optional-field/index.js +4 -7
  217. package/dist/feature-libraries/optional-field/index.js.map +1 -1
  218. package/dist/feature-libraries/optional-field/optionalField.d.ts +34 -5
  219. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  220. package/dist/feature-libraries/optional-field/optionalField.js +455 -221
  221. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  222. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
  223. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  224. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  225. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  226. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  227. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +28 -57
  228. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  229. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  230. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
  231. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  232. package/dist/feature-libraries/optional-field/requiredField.d.ts +36 -0
  233. package/dist/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
  234. package/dist/feature-libraries/optional-field/requiredField.js +27 -0
  235. package/dist/feature-libraries/optional-field/requiredField.js.map +1 -0
  236. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
  237. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  238. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +7 -7
  239. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  240. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  241. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  242. package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
  243. package/dist/feature-libraries/schemaChecker.js +1 -1
  244. package/dist/feature-libraries/schemaChecker.js.map +1 -1
  245. package/dist/feature-libraries/sequence-field/compose.d.ts +7 -6
  246. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  247. package/dist/feature-libraries/sequence-field/compose.js +259 -83
  248. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  249. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
  250. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  251. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  252. package/dist/feature-libraries/sequence-field/index.d.ts +2 -13
  253. package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
  254. package/dist/feature-libraries/sequence-field/index.js +3 -28
  255. package/dist/feature-libraries/sequence-field/index.js.map +1 -1
  256. package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
  257. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  258. package/dist/feature-libraries/sequence-field/invert.js +167 -65
  259. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  260. package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  261. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  262. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  263. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
  264. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  265. package/dist/feature-libraries/sequence-field/moveEffectTable.js +90 -7
  266. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  267. package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
  268. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  269. package/dist/feature-libraries/sequence-field/rebase.js +114 -107
  270. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  271. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
  272. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
  273. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +50 -0
  274. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
  275. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  276. package/dist/feature-libraries/sequence-field/replaceRevisions.js +31 -18
  277. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  278. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  279. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -0
  280. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  281. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
  282. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  283. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +187 -365
  284. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  285. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  286. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +62 -20
  287. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  288. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  289. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  290. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  291. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  292. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  293. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  294. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
  295. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  296. package/dist/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
  297. package/dist/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
  298. package/dist/feature-libraries/sequence-field/sequenceKind.js +24 -0
  299. package/dist/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
  300. package/dist/feature-libraries/sequence-field/types.d.ts +59 -30
  301. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  302. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  303. package/dist/feature-libraries/sequence-field/utils.d.ts +24 -15
  304. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  305. package/dist/feature-libraries/sequence-field/utils.js +305 -116
  306. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  307. package/dist/index.d.ts +1 -1
  308. package/dist/index.d.ts.map +1 -1
  309. package/dist/index.js +2 -1
  310. package/dist/index.js.map +1 -1
  311. package/dist/packageVersion.d.ts +1 -1
  312. package/dist/packageVersion.d.ts.map +1 -1
  313. package/dist/packageVersion.js +1 -1
  314. package/dist/packageVersion.js.map +1 -1
  315. package/dist/shared-tree/independentView.d.ts.map +1 -1
  316. package/dist/shared-tree/independentView.js +7 -7
  317. package/dist/shared-tree/independentView.js.map +1 -1
  318. package/dist/shared-tree/index.d.ts +1 -1
  319. package/dist/shared-tree/index.d.ts.map +1 -1
  320. package/dist/shared-tree/index.js.map +1 -1
  321. package/dist/shared-tree/schematizeTree.d.ts +4 -4
  322. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  323. package/dist/shared-tree/schematizeTree.js +1 -2
  324. package/dist/shared-tree/schematizeTree.js.map +1 -1
  325. package/dist/shared-tree/schematizingTreeView.d.ts +5 -1
  326. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  327. package/dist/shared-tree/schematizingTreeView.js +39 -40
  328. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  329. package/dist/shared-tree/sharedTree.d.ts +5 -11
  330. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  331. package/dist/shared-tree/sharedTree.js +5 -43
  332. package/dist/shared-tree/sharedTree.js.map +1 -1
  333. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  334. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  335. package/dist/shared-tree/sharedTreeChangeCodecs.js +0 -1
  336. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  337. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
  338. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  339. package/dist/shared-tree/sharedTreeChangeEnricher.js +75 -58
  340. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  341. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
  342. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  343. package/dist/shared-tree/sharedTreeChangeFamily.js +4 -10
  344. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  345. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
  346. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  347. package/dist/shared-tree/sharedTreeEditBuilder.js +7 -14
  348. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  349. package/dist/shared-tree/tree.d.ts.map +1 -1
  350. package/dist/shared-tree/tree.js +14 -14
  351. package/dist/shared-tree/tree.js.map +1 -1
  352. package/dist/shared-tree/treeAlpha.d.ts +1 -1
  353. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  354. package/dist/shared-tree/treeAlpha.js +77 -77
  355. package/dist/shared-tree/treeAlpha.js.map +1 -1
  356. package/dist/shared-tree/treeCheckout.d.ts +29 -13
  357. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  358. package/dist/shared-tree/treeCheckout.js +80 -79
  359. package/dist/shared-tree/treeCheckout.js.map +1 -1
  360. package/dist/shared-tree-core/branch.d.ts +3 -4
  361. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  362. package/dist/shared-tree-core/branch.js +3 -4
  363. package/dist/shared-tree-core/branch.js.map +1 -1
  364. package/dist/shared-tree-core/branchCommitEnricher.d.ts +18 -31
  365. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  366. package/dist/shared-tree-core/branchCommitEnricher.js +24 -76
  367. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  368. package/dist/shared-tree-core/branchIdCodec.d.ts.map +1 -1
  369. package/dist/shared-tree-core/branchIdCodec.js.map +1 -1
  370. package/dist/shared-tree-core/changeEnricher.d.ts +8 -43
  371. package/dist/shared-tree-core/changeEnricher.d.ts.map +1 -1
  372. package/dist/shared-tree-core/changeEnricher.js +0 -13
  373. package/dist/shared-tree-core/changeEnricher.js.map +1 -1
  374. package/dist/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
  375. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  376. package/dist/shared-tree-core/defaultResubmitMachine.js +26 -36
  377. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  378. package/dist/shared-tree-core/editManager.d.ts +3 -3
  379. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  380. package/dist/shared-tree-core/editManager.js +11 -11
  381. package/dist/shared-tree-core/editManager.js.map +1 -1
  382. package/dist/shared-tree-core/editManagerCodecs.d.ts +1 -5
  383. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  384. package/dist/shared-tree-core/editManagerCodecs.js +2 -10
  385. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  386. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
  387. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  388. package/dist/shared-tree-core/editManagerCodecsCommons.js +1 -2
  389. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  390. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  391. package/dist/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
  392. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  393. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  394. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
  395. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  396. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
  397. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  398. package/dist/shared-tree-core/editManagerFormatCommons.js +0 -6
  399. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  400. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  401. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  402. package/dist/shared-tree-core/editManagerFormatV1toV4.js +0 -1
  403. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  404. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  405. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  406. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
  407. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  408. package/dist/shared-tree-core/index.d.ts +4 -4
  409. package/dist/shared-tree-core/index.d.ts.map +1 -1
  410. package/dist/shared-tree-core/index.js +1 -5
  411. package/dist/shared-tree-core/index.js.map +1 -1
  412. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
  413. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  414. package/dist/shared-tree-core/messageCodecV1ToV4.js +1 -1
  415. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  416. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
  417. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  418. package/dist/shared-tree-core/messageCodecVSharedBranches.js +2 -2
  419. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  420. package/dist/shared-tree-core/messageCodecs.d.ts +2 -6
  421. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  422. package/dist/shared-tree-core/messageCodecs.js +2 -10
  423. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  424. package/dist/shared-tree-core/messageFormat.d.ts +0 -1
  425. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  426. package/dist/shared-tree-core/messageFormat.js +0 -6
  427. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  428. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
  429. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  430. package/dist/shared-tree-core/messageFormatV1ToV4.js +0 -1
  431. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  432. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  433. package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  434. package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
  435. package/dist/shared-tree-core/messageTypes.js.map +1 -1
  436. package/dist/shared-tree-core/sharedTreeCore.d.ts +8 -5
  437. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  438. package/dist/shared-tree-core/sharedTreeCore.js +14 -14
  439. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  440. package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  441. package/dist/shared-tree-core/versionedSummarizer.js +1 -1
  442. package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
  443. package/dist/simple-tree/api/configuration.d.ts +2 -2
  444. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  445. package/dist/simple-tree/api/configuration.js +14 -14
  446. package/dist/simple-tree/api/configuration.js.map +1 -1
  447. package/dist/simple-tree/api/create.d.ts +1 -1
  448. package/dist/simple-tree/api/create.d.ts.map +1 -1
  449. package/dist/simple-tree/api/create.js +7 -7
  450. package/dist/simple-tree/api/create.js.map +1 -1
  451. package/dist/simple-tree/api/dirtyIndex.d.ts +1 -1
  452. package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
  453. package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
  454. package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
  455. package/dist/simple-tree/api/discrepancies.js +23 -23
  456. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  457. package/dist/simple-tree/api/getJsonSchema.d.ts +1 -1
  458. package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
  459. package/dist/simple-tree/api/getJsonSchema.js +1 -1
  460. package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
  461. package/dist/simple-tree/api/identifierIndex.d.ts +2 -2
  462. package/dist/simple-tree/api/identifierIndex.d.ts.map +1 -1
  463. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  464. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
  465. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  466. package/dist/simple-tree/api/incrementalAllowedTypes.js +6 -6
  467. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  468. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
  469. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  470. package/dist/simple-tree/api/schemaCompatibilityTester.js +1 -1
  471. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  472. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
  473. package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  474. package/dist/simple-tree/api/schemaCreationUtilities.js +7 -7
  475. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  476. package/dist/simple-tree/api/schemaFactory.d.ts +2 -2
  477. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  478. package/dist/simple-tree/api/schemaFactory.js +7 -7
  479. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  480. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
  481. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  482. package/dist/simple-tree/api/schemaFactoryAlpha.js +1 -1
  483. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  484. package/dist/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
  485. package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  486. package/dist/simple-tree/api/schemaFactoryBeta.js +1 -0
  487. package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  488. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
  489. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  490. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  491. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  492. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  493. package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
  494. package/dist/simple-tree/api/schemaStatics.js.map +1 -1
  495. package/dist/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
  496. package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
  497. package/dist/simple-tree/api/simpleSchemaCodec.js +17 -17
  498. package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  499. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
  500. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  501. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
  502. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  503. package/dist/simple-tree/api/simpleTreeIndex.d.ts +1 -1
  504. package/dist/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
  505. package/dist/simple-tree/api/simpleTreeIndex.js +1 -1
  506. package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
  507. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  508. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +14 -14
  509. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  510. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  511. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  512. package/dist/simple-tree/api/tree.d.ts +2 -2
  513. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  514. package/dist/simple-tree/api/tree.js.map +1 -1
  515. package/dist/simple-tree/api/treeBeta.d.ts +1 -1
  516. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  517. package/dist/simple-tree/api/treeBeta.js +2 -2
  518. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  519. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  520. package/dist/simple-tree/api/treeNodeApi.js +4 -4
  521. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  522. package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
  523. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  524. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  525. package/dist/simple-tree/api/verboseTree.d.ts +1 -1
  526. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  527. package/dist/simple-tree/api/verboseTree.js +22 -22
  528. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  529. package/dist/simple-tree/core/allowedTypes.d.ts +1 -1
  530. package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
  531. package/dist/simple-tree/core/allowedTypes.js +7 -7
  532. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  533. package/dist/simple-tree/core/context.d.ts.map +1 -1
  534. package/dist/simple-tree/core/context.js.map +1 -1
  535. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  536. package/dist/simple-tree/core/treeNode.js +1 -1
  537. package/dist/simple-tree/core/treeNode.js.map +1 -1
  538. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  539. package/dist/simple-tree/core/treeNodeKernel.js +1 -3
  540. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  541. package/dist/simple-tree/core/treeNodeSchema.d.ts +5 -5
  542. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  543. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  544. package/dist/simple-tree/core/treeNodeValid.d.ts +3 -3
  545. package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  546. package/dist/simple-tree/core/treeNodeValid.js +2 -2
  547. package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
  548. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
  549. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  550. package/dist/simple-tree/core/unhydratedFlexTree.js +8 -59
  551. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  552. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  553. package/dist/simple-tree/core/withType.js.map +1 -1
  554. package/dist/simple-tree/createContext.d.ts.map +1 -1
  555. package/dist/simple-tree/createContext.js.map +1 -1
  556. package/dist/simple-tree/fieldSchema.d.ts +5 -5
  557. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  558. package/dist/simple-tree/fieldSchema.js.map +1 -1
  559. package/dist/simple-tree/index.d.ts +2 -2
  560. package/dist/simple-tree/index.d.ts.map +1 -1
  561. package/dist/simple-tree/index.js +1 -1
  562. package/dist/simple-tree/index.js.map +1 -1
  563. package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
  564. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  565. package/dist/simple-tree/leafNodeSchema.js +15 -15
  566. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  567. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +1 -1
  568. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  569. package/dist/simple-tree/node-kinds/array/arrayNode.js +47 -49
  570. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  571. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
  572. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  573. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  574. package/dist/simple-tree/node-kinds/common.d.ts.map +1 -1
  575. package/dist/simple-tree/node-kinds/common.js +1 -1
  576. package/dist/simple-tree/node-kinds/common.js.map +1 -1
  577. package/dist/simple-tree/node-kinds/map/mapNode.d.ts +2 -2
  578. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  579. package/dist/simple-tree/node-kinds/map/mapNode.js +26 -26
  580. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  581. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
  582. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  583. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  584. package/dist/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
  585. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  586. package/dist/simple-tree/node-kinds/object/objectNode.js +28 -28
  587. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  588. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
  589. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  590. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  591. package/dist/simple-tree/node-kinds/record/recordNode.d.ts +1 -1
  592. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  593. package/dist/simple-tree/node-kinds/record/recordNode.js +36 -38
  594. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  595. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
  596. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  597. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  598. package/dist/simple-tree/prepareForInsertion.d.ts +47 -54
  599. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  600. package/dist/simple-tree/prepareForInsertion.js +128 -186
  601. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  602. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  603. package/dist/simple-tree/simpleSchema.js.map +1 -1
  604. package/dist/simple-tree/treeSchema.d.ts.map +1 -1
  605. package/dist/simple-tree/treeSchema.js.map +1 -1
  606. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
  607. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  608. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +22 -40
  609. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  610. package/dist/tableSchema.d.ts.map +1 -1
  611. package/dist/tableSchema.js +22 -21
  612. package/dist/tableSchema.js.map +1 -1
  613. package/dist/text/index.d.ts +1 -0
  614. package/dist/text/index.d.ts.map +1 -1
  615. package/dist/text/index.js +3 -1
  616. package/dist/text/index.js.map +1 -1
  617. package/dist/text/textDomain.d.ts +8 -0
  618. package/dist/text/textDomain.d.ts.map +1 -1
  619. package/dist/text/textDomain.js +2 -1
  620. package/dist/text/textDomain.js.map +1 -1
  621. package/dist/text/textDomainFormatted.d.ts +572 -0
  622. package/dist/text/textDomainFormatted.d.ts.map +1 -0
  623. package/dist/text/textDomainFormatted.js +183 -0
  624. package/dist/text/textDomainFormatted.js.map +1 -0
  625. package/dist/treeFactory.d.ts.map +1 -1
  626. package/dist/treeFactory.js +11 -21
  627. package/dist/treeFactory.js.map +1 -1
  628. package/dist/util/bTreeUtils.d.ts.map +1 -1
  629. package/dist/util/bTreeUtils.js +1 -1
  630. package/dist/util/bTreeUtils.js.map +1 -1
  631. package/dist/util/index.d.ts +1 -1
  632. package/dist/util/index.d.ts.map +1 -1
  633. package/dist/util/index.js +1 -2
  634. package/dist/util/index.js.map +1 -1
  635. package/dist/util/rangeMap.d.ts +12 -24
  636. package/dist/util/rangeMap.d.ts.map +1 -1
  637. package/dist/util/rangeMap.js +6 -46
  638. package/dist/util/rangeMap.js.map +1 -1
  639. package/dist/util/readSnapshotBlob.d.ts +1 -1
  640. package/dist/util/readSnapshotBlob.d.ts.map +1 -1
  641. package/dist/util/readSnapshotBlob.js.map +1 -1
  642. package/docs/main/sequence-field/move-composition.md +46 -0
  643. package/eslint.config.mts +4 -4
  644. package/lib/codec/codec.d.ts +2 -2
  645. package/lib/codec/codec.d.ts.map +1 -1
  646. package/lib/codec/codec.js +1 -1
  647. package/lib/codec/codec.js.map +1 -1
  648. package/lib/codec/versioned/codec.d.ts +1 -1
  649. package/lib/codec/versioned/codec.d.ts.map +1 -1
  650. package/lib/codec/versioned/codec.js +2 -2
  651. package/lib/codec/versioned/codec.js.map +1 -1
  652. package/lib/core/change-family/changeFamily.d.ts +1 -4
  653. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  654. package/lib/core/change-family/changeFamily.js.map +1 -1
  655. package/lib/core/change-family/index.d.ts +1 -1
  656. package/lib/core/change-family/index.d.ts.map +1 -1
  657. package/lib/core/change-family/index.js.map +1 -1
  658. package/lib/core/index.d.ts +3 -3
  659. package/lib/core/index.d.ts.map +1 -1
  660. package/lib/core/index.js +2 -2
  661. package/lib/core/index.js.map +1 -1
  662. package/lib/core/rebase/changeRebaser.d.ts +1 -6
  663. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  664. package/lib/core/rebase/changeRebaser.js.map +1 -1
  665. package/lib/core/rebase/index.d.ts +1 -1
  666. package/lib/core/rebase/index.d.ts.map +1 -1
  667. package/lib/core/rebase/index.js +1 -1
  668. package/lib/core/rebase/index.js.map +1 -1
  669. package/lib/core/rebase/types.d.ts +1 -2
  670. package/lib/core/rebase/types.d.ts.map +1 -1
  671. package/lib/core/rebase/types.js +0 -3
  672. package/lib/core/rebase/types.js.map +1 -1
  673. package/lib/core/rebase/utils.d.ts.map +1 -1
  674. package/lib/core/rebase/utils.js +7 -25
  675. package/lib/core/rebase/utils.js.map +1 -1
  676. package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
  677. package/lib/core/schema-stored/formatV2.js +1 -1
  678. package/lib/core/schema-stored/formatV2.js.map +1 -1
  679. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  680. package/lib/core/tree/anchorSet.js +1 -1
  681. package/lib/core/tree/anchorSet.js.map +1 -1
  682. package/lib/core/tree/detachedFieldIndex.d.ts +0 -6
  683. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  684. package/lib/core/tree/detachedFieldIndex.js +1 -10
  685. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  686. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
  687. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  688. package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  689. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  690. package/lib/core/tree/detachedFieldIndexCodecV1.js +1 -1
  691. package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  692. package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  693. package/lib/core/tree/detachedFieldIndexCodecV2.js +2 -2
  694. package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  695. package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
  696. package/lib/core/tree/detachedFieldIndexFormatV1.js +2 -2
  697. package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
  698. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  699. package/lib/core/tree/detachedFieldIndexFormatV2.js +2 -2
  700. package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  701. package/lib/core/tree/index.d.ts +1 -1
  702. package/lib/core/tree/index.d.ts.map +1 -1
  703. package/lib/core/tree/index.js +1 -1
  704. package/lib/core/tree/index.js.map +1 -1
  705. package/lib/core/tree/pathTree.d.ts +3 -11
  706. package/lib/core/tree/pathTree.d.ts.map +1 -1
  707. package/lib/core/tree/pathTree.js +1 -12
  708. package/lib/core/tree/pathTree.js.map +1 -1
  709. package/lib/core/tree/visitDelta.d.ts +1 -1
  710. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  711. package/lib/core/tree/visitDelta.js.map +1 -1
  712. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  713. package/lib/core/tree/visitorUtils.js +1 -1
  714. package/lib/core/tree/visitorUtils.js.map +1 -1
  715. package/lib/feature-libraries/changeAtomIdBTree.d.ts +3 -4
  716. package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  717. package/lib/feature-libraries/changeAtomIdBTree.js +1 -14
  718. package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
  719. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  720. package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -8
  721. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  722. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
  723. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  724. package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -4
  725. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  726. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  727. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  728. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  729. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
  730. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  731. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  732. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
  733. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  734. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  735. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +1 -1
  736. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  737. package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  738. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  739. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  740. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  741. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  742. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  743. package/lib/feature-libraries/chunked-forest/codec/format.js +1 -1
  744. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  745. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  746. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  747. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  748. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  749. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
  750. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  751. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
  752. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  753. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +73 -237
  754. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  755. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
  756. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  757. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +6 -56
  758. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  759. package/lib/feature-libraries/default-schema/index.d.ts +2 -3
  760. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  761. package/lib/feature-libraries/default-schema/index.js +1 -2
  762. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  763. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
  764. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  765. package/lib/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
  766. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  767. package/lib/feature-libraries/deltaUtils.d.ts +0 -1
  768. package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
  769. package/lib/feature-libraries/deltaUtils.js +1 -5
  770. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  771. package/lib/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
  772. package/lib/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
  773. package/lib/feature-libraries/fieldKindIdentifiers.js +13 -0
  774. package/lib/feature-libraries/fieldKindIdentifiers.js.map +1 -0
  775. package/lib/feature-libraries/flex-tree/context.d.ts +0 -9
  776. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  777. package/lib/feature-libraries/flex-tree/context.js +0 -6
  778. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  779. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  780. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  781. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  782. package/lib/feature-libraries/flex-tree/lazyField.d.ts +7 -8
  783. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  784. package/lib/feature-libraries/flex-tree/lazyField.js +11 -42
  785. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  786. package/lib/feature-libraries/flex-tree/observer.d.ts +1 -1
  787. package/lib/feature-libraries/flex-tree/observer.d.ts.map +1 -1
  788. package/lib/feature-libraries/flex-tree/observer.js.map +1 -1
  789. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  790. package/lib/feature-libraries/forest-summary/codec.js +1 -1
  791. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  792. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  793. package/lib/feature-libraries/forest-summary/forestSummarizer.js +3 -3
  794. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  795. package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
  796. package/lib/feature-libraries/forest-summary/formatV1.js.map +1 -1
  797. package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
  798. package/lib/feature-libraries/forest-summary/formatV2.js.map +1 -1
  799. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
  800. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  801. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
  802. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  803. package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
  804. package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
  805. package/lib/feature-libraries/index.d.ts +3 -3
  806. package/lib/feature-libraries/index.d.ts.map +1 -1
  807. package/lib/feature-libraries/index.js +2 -2
  808. package/lib/feature-libraries/index.js.map +1 -1
  809. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  810. package/lib/feature-libraries/mapTreeCursor.js +1 -2
  811. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  812. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  813. package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
  814. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  815. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +21 -97
  816. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  817. package/lib/feature-libraries/modular-schema/crossFieldQueries.js +5 -3
  818. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  819. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
  820. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  821. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  822. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  823. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  824. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
  825. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  826. package/lib/feature-libraries/modular-schema/genericFieldKind.js +11 -5
  827. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  828. package/lib/feature-libraries/modular-schema/index.d.ts +4 -4
  829. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  830. package/lib/feature-libraries/modular-schema/index.js +2 -2
  831. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  832. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
  833. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  834. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +144 -246
  835. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  836. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  837. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
  838. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  839. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  840. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
  841. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  842. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
  843. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  844. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +463 -1319
  845. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  846. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  847. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  848. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
  849. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  850. package/lib/feature-libraries/modular-schema/modularChangeTypes.js +1 -1
  851. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  852. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  853. package/lib/feature-libraries/object-forest/objectForest.js +2 -2
  854. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  855. package/lib/feature-libraries/optional-field/index.d.ts +2 -2
  856. package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
  857. package/lib/feature-libraries/optional-field/index.js +2 -2
  858. package/lib/feature-libraries/optional-field/index.js.map +1 -1
  859. package/lib/feature-libraries/optional-field/optionalField.d.ts +34 -5
  860. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  861. package/lib/feature-libraries/optional-field/optionalField.js +453 -221
  862. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  863. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
  864. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  865. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  866. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  867. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  868. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +26 -55
  869. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  870. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  871. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
  872. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  873. package/lib/feature-libraries/optional-field/requiredField.d.ts +36 -0
  874. package/lib/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
  875. package/lib/feature-libraries/optional-field/requiredField.js +24 -0
  876. package/lib/feature-libraries/optional-field/requiredField.js.map +1 -0
  877. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
  878. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  879. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +1 -1
  880. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  881. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  882. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  883. package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
  884. package/lib/feature-libraries/schemaChecker.js +1 -1
  885. package/lib/feature-libraries/schemaChecker.js.map +1 -1
  886. package/lib/feature-libraries/sequence-field/compose.d.ts +7 -6
  887. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  888. package/lib/feature-libraries/sequence-field/compose.js +261 -85
  889. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  890. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
  891. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  892. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  893. package/lib/feature-libraries/sequence-field/index.d.ts +2 -13
  894. package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
  895. package/lib/feature-libraries/sequence-field/index.js +1 -12
  896. package/lib/feature-libraries/sequence-field/index.js.map +1 -1
  897. package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
  898. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  899. package/lib/feature-libraries/sequence-field/invert.js +169 -67
  900. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  901. package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  902. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  903. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  904. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
  905. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  906. package/lib/feature-libraries/sequence-field/moveEffectTable.js +84 -6
  907. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  908. package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
  909. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  910. package/lib/feature-libraries/sequence-field/rebase.js +116 -109
  911. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  912. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
  913. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
  914. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +46 -0
  915. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
  916. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  917. package/lib/feature-libraries/sequence-field/replaceRevisions.js +31 -18
  918. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  919. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  920. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -0
  921. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  922. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
  923. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  924. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +182 -356
  925. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  926. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  927. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +63 -21
  928. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  929. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  930. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  931. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  932. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  933. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  934. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  935. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
  936. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  937. package/lib/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
  938. package/lib/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
  939. package/lib/feature-libraries/sequence-field/sequenceKind.js +21 -0
  940. package/lib/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
  941. package/lib/feature-libraries/sequence-field/types.d.ts +59 -30
  942. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  943. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  944. package/lib/feature-libraries/sequence-field/utils.d.ts +24 -15
  945. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  946. package/lib/feature-libraries/sequence-field/utils.js +298 -112
  947. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  948. package/lib/index.d.ts +1 -1
  949. package/lib/index.d.ts.map +1 -1
  950. package/lib/index.js +1 -1
  951. package/lib/index.js.map +1 -1
  952. package/lib/packageVersion.d.ts +1 -1
  953. package/lib/packageVersion.d.ts.map +1 -1
  954. package/lib/packageVersion.js +1 -1
  955. package/lib/packageVersion.js.map +1 -1
  956. package/lib/shared-tree/independentView.d.ts.map +1 -1
  957. package/lib/shared-tree/independentView.js +3 -3
  958. package/lib/shared-tree/independentView.js.map +1 -1
  959. package/lib/shared-tree/index.d.ts +1 -1
  960. package/lib/shared-tree/index.d.ts.map +1 -1
  961. package/lib/shared-tree/index.js.map +1 -1
  962. package/lib/shared-tree/schematizeTree.d.ts +4 -4
  963. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  964. package/lib/shared-tree/schematizeTree.js +2 -3
  965. package/lib/shared-tree/schematizeTree.js.map +1 -1
  966. package/lib/shared-tree/schematizingTreeView.d.ts +5 -1
  967. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  968. package/lib/shared-tree/schematizingTreeView.js +42 -43
  969. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  970. package/lib/shared-tree/sharedTree.d.ts +5 -11
  971. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  972. package/lib/shared-tree/sharedTree.js +5 -43
  973. package/lib/shared-tree/sharedTree.js.map +1 -1
  974. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  975. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  976. package/lib/shared-tree/sharedTreeChangeCodecs.js +0 -1
  977. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  978. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
  979. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  980. package/lib/shared-tree/sharedTreeChangeEnricher.js +74 -56
  981. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  982. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
  983. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  984. package/lib/shared-tree/sharedTreeChangeFamily.js +5 -11
  985. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  986. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
  987. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  988. package/lib/shared-tree/sharedTreeEditBuilder.js +6 -12
  989. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  990. package/lib/shared-tree/tree.d.ts.map +1 -1
  991. package/lib/shared-tree/tree.js +7 -7
  992. package/lib/shared-tree/tree.js.map +1 -1
  993. package/lib/shared-tree/treeAlpha.d.ts +1 -1
  994. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  995. package/lib/shared-tree/treeAlpha.js +3 -3
  996. package/lib/shared-tree/treeAlpha.js.map +1 -1
  997. package/lib/shared-tree/treeCheckout.d.ts +29 -13
  998. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  999. package/lib/shared-tree/treeCheckout.js +55 -54
  1000. package/lib/shared-tree/treeCheckout.js.map +1 -1
  1001. package/lib/shared-tree-core/branch.d.ts +3 -4
  1002. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  1003. package/lib/shared-tree-core/branch.js +3 -4
  1004. package/lib/shared-tree-core/branch.js.map +1 -1
  1005. package/lib/shared-tree-core/branchCommitEnricher.d.ts +18 -31
  1006. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  1007. package/lib/shared-tree-core/branchCommitEnricher.js +24 -76
  1008. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  1009. package/lib/shared-tree-core/branchIdCodec.d.ts.map +1 -1
  1010. package/lib/shared-tree-core/branchIdCodec.js.map +1 -1
  1011. package/lib/shared-tree-core/changeEnricher.d.ts +8 -43
  1012. package/lib/shared-tree-core/changeEnricher.d.ts.map +1 -1
  1013. package/lib/shared-tree-core/changeEnricher.js +1 -11
  1014. package/lib/shared-tree-core/changeEnricher.js.map +1 -1
  1015. package/lib/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
  1016. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  1017. package/lib/shared-tree-core/defaultResubmitMachine.js +28 -38
  1018. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  1019. package/lib/shared-tree-core/editManager.d.ts +3 -3
  1020. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  1021. package/lib/shared-tree-core/editManager.js +11 -11
  1022. package/lib/shared-tree-core/editManager.js.map +1 -1
  1023. package/lib/shared-tree-core/editManagerCodecs.d.ts +1 -5
  1024. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  1025. package/lib/shared-tree-core/editManagerCodecs.js +1 -8
  1026. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  1027. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
  1028. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  1029. package/lib/shared-tree-core/editManagerCodecsCommons.js +1 -2
  1030. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  1031. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  1032. package/lib/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
  1033. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  1034. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  1035. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
  1036. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  1037. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
  1038. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  1039. package/lib/shared-tree-core/editManagerFormatCommons.js +0 -6
  1040. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  1041. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  1042. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  1043. package/lib/shared-tree-core/editManagerFormatV1toV4.js +0 -1
  1044. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  1045. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  1046. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  1047. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
  1048. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  1049. package/lib/shared-tree-core/index.d.ts +4 -4
  1050. package/lib/shared-tree-core/index.d.ts.map +1 -1
  1051. package/lib/shared-tree-core/index.js +2 -3
  1052. package/lib/shared-tree-core/index.js.map +1 -1
  1053. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
  1054. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  1055. package/lib/shared-tree-core/messageCodecV1ToV4.js +1 -1
  1056. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  1057. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
  1058. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  1059. package/lib/shared-tree-core/messageCodecVSharedBranches.js +2 -2
  1060. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  1061. package/lib/shared-tree-core/messageCodecs.d.ts +2 -6
  1062. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  1063. package/lib/shared-tree-core/messageCodecs.js +1 -8
  1064. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  1065. package/lib/shared-tree-core/messageFormat.d.ts +0 -1
  1066. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  1067. package/lib/shared-tree-core/messageFormat.js +0 -6
  1068. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  1069. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
  1070. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  1071. package/lib/shared-tree-core/messageFormatV1ToV4.js +0 -1
  1072. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  1073. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  1074. package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  1075. package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
  1076. package/lib/shared-tree-core/messageTypes.js.map +1 -1
  1077. package/lib/shared-tree-core/sharedTreeCore.d.ts +8 -5
  1078. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  1079. package/lib/shared-tree-core/sharedTreeCore.js +15 -15
  1080. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  1081. package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  1082. package/lib/shared-tree-core/versionedSummarizer.js +1 -1
  1083. package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
  1084. package/lib/simple-tree/api/configuration.d.ts +2 -2
  1085. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  1086. package/lib/simple-tree/api/configuration.js +4 -4
  1087. package/lib/simple-tree/api/configuration.js.map +1 -1
  1088. package/lib/simple-tree/api/create.d.ts +1 -1
  1089. package/lib/simple-tree/api/create.d.ts.map +1 -1
  1090. package/lib/simple-tree/api/create.js +1 -1
  1091. package/lib/simple-tree/api/create.js.map +1 -1
  1092. package/lib/simple-tree/api/dirtyIndex.d.ts +1 -1
  1093. package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
  1094. package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
  1095. package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
  1096. package/lib/simple-tree/api/discrepancies.js +3 -3
  1097. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  1098. package/lib/simple-tree/api/getJsonSchema.d.ts +1 -1
  1099. package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
  1100. package/lib/simple-tree/api/getJsonSchema.js +1 -1
  1101. package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
  1102. package/lib/simple-tree/api/identifierIndex.d.ts +2 -2
  1103. package/lib/simple-tree/api/identifierIndex.d.ts.map +1 -1
  1104. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  1105. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
  1106. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  1107. package/lib/simple-tree/api/incrementalAllowedTypes.js +3 -3
  1108. package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  1109. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
  1110. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  1111. package/lib/simple-tree/api/schemaCompatibilityTester.js +1 -1
  1112. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  1113. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
  1114. package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  1115. package/lib/simple-tree/api/schemaCreationUtilities.js +1 -1
  1116. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  1117. package/lib/simple-tree/api/schemaFactory.d.ts +2 -2
  1118. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  1119. package/lib/simple-tree/api/schemaFactory.js +2 -2
  1120. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  1121. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
  1122. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  1123. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -1
  1124. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  1125. package/lib/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
  1126. package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  1127. package/lib/simple-tree/api/schemaFactoryBeta.js +1 -0
  1128. package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  1129. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
  1130. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  1131. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  1132. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  1133. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  1134. package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
  1135. package/lib/simple-tree/api/schemaStatics.js.map +1 -1
  1136. package/lib/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
  1137. package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
  1138. package/lib/simple-tree/api/simpleSchemaCodec.js +3 -3
  1139. package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  1140. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
  1141. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  1142. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
  1143. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  1144. package/lib/simple-tree/api/simpleTreeIndex.d.ts +1 -1
  1145. package/lib/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
  1146. package/lib/simple-tree/api/simpleTreeIndex.js +1 -1
  1147. package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
  1148. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  1149. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +5 -5
  1150. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  1151. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  1152. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  1153. package/lib/simple-tree/api/tree.d.ts +2 -2
  1154. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  1155. package/lib/simple-tree/api/tree.js.map +1 -1
  1156. package/lib/simple-tree/api/treeBeta.d.ts +1 -1
  1157. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  1158. package/lib/simple-tree/api/treeBeta.js +2 -2
  1159. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  1160. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  1161. package/lib/simple-tree/api/treeNodeApi.js +4 -4
  1162. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  1163. package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
  1164. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  1165. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  1166. package/lib/simple-tree/api/verboseTree.d.ts +1 -1
  1167. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  1168. package/lib/simple-tree/api/verboseTree.js +3 -3
  1169. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  1170. package/lib/simple-tree/core/allowedTypes.d.ts +1 -1
  1171. package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
  1172. package/lib/simple-tree/core/allowedTypes.js +2 -2
  1173. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  1174. package/lib/simple-tree/core/context.d.ts.map +1 -1
  1175. package/lib/simple-tree/core/context.js.map +1 -1
  1176. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  1177. package/lib/simple-tree/core/treeNode.js +1 -1
  1178. package/lib/simple-tree/core/treeNode.js.map +1 -1
  1179. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  1180. package/lib/simple-tree/core/treeNodeKernel.js +1 -3
  1181. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  1182. package/lib/simple-tree/core/treeNodeSchema.d.ts +5 -5
  1183. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  1184. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  1185. package/lib/simple-tree/core/treeNodeValid.d.ts +3 -3
  1186. package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  1187. package/lib/simple-tree/core/treeNodeValid.js +2 -2
  1188. package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
  1189. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
  1190. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  1191. package/lib/simple-tree/core/unhydratedFlexTree.js +8 -58
  1192. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  1193. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  1194. package/lib/simple-tree/core/withType.js.map +1 -1
  1195. package/lib/simple-tree/createContext.d.ts.map +1 -1
  1196. package/lib/simple-tree/createContext.js.map +1 -1
  1197. package/lib/simple-tree/fieldSchema.d.ts +5 -5
  1198. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  1199. package/lib/simple-tree/fieldSchema.js.map +1 -1
  1200. package/lib/simple-tree/index.d.ts +2 -2
  1201. package/lib/simple-tree/index.d.ts.map +1 -1
  1202. package/lib/simple-tree/index.js +1 -1
  1203. package/lib/simple-tree/index.js.map +1 -1
  1204. package/lib/simple-tree/leafNodeSchema.d.ts +1 -1
  1205. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  1206. package/lib/simple-tree/leafNodeSchema.js +2 -2
  1207. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  1208. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +1 -1
  1209. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  1210. package/lib/simple-tree/node-kinds/array/arrayNode.js +6 -8
  1211. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  1212. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
  1213. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  1214. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  1215. package/lib/simple-tree/node-kinds/common.d.ts.map +1 -1
  1216. package/lib/simple-tree/node-kinds/common.js +2 -2
  1217. package/lib/simple-tree/node-kinds/common.js.map +1 -1
  1218. package/lib/simple-tree/node-kinds/map/mapNode.d.ts +2 -2
  1219. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  1220. package/lib/simple-tree/node-kinds/map/mapNode.js +8 -8
  1221. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  1222. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
  1223. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  1224. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  1225. package/lib/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
  1226. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  1227. package/lib/simple-tree/node-kinds/object/objectNode.js +22 -22
  1228. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  1229. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
  1230. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  1231. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  1232. package/lib/simple-tree/node-kinds/record/recordNode.d.ts +1 -1
  1233. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  1234. package/lib/simple-tree/node-kinds/record/recordNode.js +6 -8
  1235. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  1236. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
  1237. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  1238. package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  1239. package/lib/simple-tree/prepareForInsertion.d.ts +47 -54
  1240. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  1241. package/lib/simple-tree/prepareForInsertion.js +125 -184
  1242. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  1243. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  1244. package/lib/simple-tree/simpleSchema.js.map +1 -1
  1245. package/lib/simple-tree/treeSchema.d.ts.map +1 -1
  1246. package/lib/simple-tree/treeSchema.js.map +1 -1
  1247. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
  1248. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  1249. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +13 -30
  1250. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  1251. package/lib/tableSchema.d.ts.map +1 -1
  1252. package/lib/tableSchema.js +2 -1
  1253. package/lib/tableSchema.js.map +1 -1
  1254. package/lib/text/index.d.ts +1 -0
  1255. package/lib/text/index.d.ts.map +1 -1
  1256. package/lib/text/index.js +1 -0
  1257. package/lib/text/index.js.map +1 -1
  1258. package/lib/text/textDomain.d.ts +8 -0
  1259. package/lib/text/textDomain.d.ts.map +1 -1
  1260. package/lib/text/textDomain.js +1 -1
  1261. package/lib/text/textDomain.js.map +1 -1
  1262. package/lib/text/textDomainFormatted.d.ts +572 -0
  1263. package/lib/text/textDomainFormatted.d.ts.map +1 -0
  1264. package/lib/text/textDomainFormatted.js +180 -0
  1265. package/lib/text/textDomainFormatted.js.map +1 -0
  1266. package/lib/treeFactory.d.ts.map +1 -1
  1267. package/lib/treeFactory.js +4 -14
  1268. package/lib/treeFactory.js.map +1 -1
  1269. package/lib/util/bTreeUtils.d.ts.map +1 -1
  1270. package/lib/util/bTreeUtils.js +1 -1
  1271. package/lib/util/bTreeUtils.js.map +1 -1
  1272. package/lib/util/index.d.ts +1 -1
  1273. package/lib/util/index.d.ts.map +1 -1
  1274. package/lib/util/index.js +1 -1
  1275. package/lib/util/index.js.map +1 -1
  1276. package/lib/util/rangeMap.d.ts +12 -24
  1277. package/lib/util/rangeMap.d.ts.map +1 -1
  1278. package/lib/util/rangeMap.js +5 -44
  1279. package/lib/util/rangeMap.js.map +1 -1
  1280. package/lib/util/readSnapshotBlob.d.ts +1 -1
  1281. package/lib/util/readSnapshotBlob.d.ts.map +1 -1
  1282. package/lib/util/readSnapshotBlob.js.map +1 -1
  1283. package/package.json +22 -22
  1284. package/src/codec/codec.ts +10 -7
  1285. package/src/codec/versioned/codec.ts +3 -3
  1286. package/src/core/change-family/changeFamily.ts +0 -5
  1287. package/src/core/change-family/index.ts +0 -1
  1288. package/src/core/index.ts +1 -4
  1289. package/src/core/rebase/changeRebaser.ts +1 -6
  1290. package/src/core/rebase/index.ts +0 -1
  1291. package/src/core/rebase/types.ts +1 -8
  1292. package/src/core/rebase/utils.ts +7 -31
  1293. package/src/core/schema-stored/formatV2.ts +2 -1
  1294. package/src/core/tree/anchorSet.ts +1 -1
  1295. package/src/core/tree/detachedFieldIndex.ts +2 -18
  1296. package/src/core/tree/detachedFieldIndexCodecCommon.ts +2 -1
  1297. package/src/core/tree/detachedFieldIndexCodecV1.ts +2 -2
  1298. package/src/core/tree/detachedFieldIndexCodecV2.ts +3 -3
  1299. package/src/core/tree/detachedFieldIndexFormatV1.ts +3 -2
  1300. package/src/core/tree/detachedFieldIndexFormatV2.ts +3 -2
  1301. package/src/core/tree/index.ts +1 -2
  1302. package/src/core/tree/pathTree.ts +4 -16
  1303. package/src/core/tree/visitDelta.ts +2 -3
  1304. package/src/core/tree/visitorUtils.ts +2 -1
  1305. package/src/feature-libraries/changeAtomIdBTree.ts +4 -28
  1306. package/src/feature-libraries/chunked-forest/basicChunk.ts +1 -7
  1307. package/src/feature-libraries/chunked-forest/chunkTree.ts +2 -7
  1308. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +1 -1
  1309. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -1
  1310. package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -1
  1311. package/src/feature-libraries/chunked-forest/codec/codecs.ts +2 -2
  1312. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
  1313. package/src/feature-libraries/chunked-forest/codec/format.ts +1 -1
  1314. package/src/feature-libraries/chunked-forest/codec/formatGeneric.ts +1 -0
  1315. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +3 -3
  1316. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +128 -405
  1317. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +27 -123
  1318. package/src/feature-libraries/default-schema/index.ts +5 -22
  1319. package/src/feature-libraries/default-schema/mappedEditBuilder.ts +9 -35
  1320. package/src/feature-libraries/deltaUtils.ts +1 -6
  1321. package/src/feature-libraries/fieldKindIdentifiers.ts +16 -0
  1322. package/src/feature-libraries/flex-tree/context.ts +0 -17
  1323. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +8 -7
  1324. package/src/feature-libraries/flex-tree/lazyField.ts +26 -69
  1325. package/src/feature-libraries/flex-tree/observer.ts +3 -1
  1326. package/src/feature-libraries/forest-summary/codec.ts +1 -1
  1327. package/src/feature-libraries/forest-summary/forestSummarizer.ts +6 -6
  1328. package/src/feature-libraries/forest-summary/formatV1.ts +1 -0
  1329. package/src/feature-libraries/forest-summary/formatV2.ts +1 -0
  1330. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +9 -7
  1331. package/src/feature-libraries/forest-summary/summaryTypes.ts +1 -0
  1332. package/src/feature-libraries/index.ts +8 -27
  1333. package/src/feature-libraries/mapTreeCursor.ts +2 -3
  1334. package/src/feature-libraries/mitigatedChangeFamily.ts +1 -3
  1335. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +44 -142
  1336. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +58 -32
  1337. package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +1 -0
  1338. package/src/feature-libraries/modular-schema/genericFieldKind.ts +20 -8
  1339. package/src/feature-libraries/modular-schema/index.ts +15 -16
  1340. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +336 -543
  1341. package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +2 -2
  1342. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +3 -15
  1343. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +753 -2582
  1344. package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +0 -1
  1345. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +8 -55
  1346. package/src/feature-libraries/object-forest/objectForest.ts +2 -2
  1347. package/src/feature-libraries/optional-field/index.ts +5 -5
  1348. package/src/feature-libraries/optional-field/optionalField.ts +592 -317
  1349. package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +38 -24
  1350. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +35 -89
  1351. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +1 -5
  1352. package/src/feature-libraries/optional-field/requiredField.ts +62 -0
  1353. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +1 -1
  1354. package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +1 -0
  1355. package/src/feature-libraries/schemaChecker.ts +3 -2
  1356. package/src/feature-libraries/sequence-field/compose.ts +522 -139
  1357. package/src/feature-libraries/sequence-field/helperTypes.ts +19 -34
  1358. package/src/feature-libraries/sequence-field/index.ts +2 -42
  1359. package/src/feature-libraries/sequence-field/invert.ts +228 -103
  1360. package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
  1361. package/src/feature-libraries/sequence-field/moveEffectTable.ts +195 -8
  1362. package/src/feature-libraries/sequence-field/rebase.ts +205 -169
  1363. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +57 -0
  1364. package/src/feature-libraries/sequence-field/replaceRevisions.ts +47 -25
  1365. package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +2 -0
  1366. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +228 -648
  1367. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +70 -56
  1368. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +27 -25
  1369. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +129 -19
  1370. package/src/feature-libraries/sequence-field/sequenceKind.ts +40 -0
  1371. package/src/feature-libraries/sequence-field/types.ts +64 -34
  1372. package/src/feature-libraries/sequence-field/utils.ts +353 -139
  1373. package/src/index.ts +1 -1
  1374. package/src/packageVersion.ts +1 -1
  1375. package/src/shared-tree/independentView.ts +4 -3
  1376. package/src/shared-tree/index.ts +2 -3
  1377. package/src/shared-tree/schematizeTree.ts +8 -21
  1378. package/src/shared-tree/schematizingTreeView.ts +79 -61
  1379. package/src/shared-tree/sharedTree.ts +10 -64
  1380. package/src/shared-tree/sharedTreeChangeCodecs.ts +2 -5
  1381. package/src/shared-tree/sharedTreeChangeEnricher.ts +87 -68
  1382. package/src/shared-tree/sharedTreeChangeFamily.ts +5 -15
  1383. package/src/shared-tree/sharedTreeEditBuilder.ts +8 -39
  1384. package/src/shared-tree/tree.ts +10 -10
  1385. package/src/shared-tree/treeAlpha.ts +26 -25
  1386. package/src/shared-tree/treeCheckout.ts +119 -94
  1387. package/src/shared-tree-core/branch.ts +6 -12
  1388. package/src/shared-tree-core/branchCommitEnricher.ts +25 -77
  1389. package/src/shared-tree-core/branchIdCodec.ts +1 -0
  1390. package/src/shared-tree-core/changeEnricher.ts +8 -52
  1391. package/src/shared-tree-core/defaultResubmitMachine.ts +39 -51
  1392. package/src/shared-tree-core/editManager.ts +8 -22
  1393. package/src/shared-tree-core/editManagerCodecs.ts +3 -13
  1394. package/src/shared-tree-core/editManagerCodecsCommons.ts +7 -6
  1395. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +1 -1
  1396. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +2 -2
  1397. package/src/shared-tree-core/editManagerFormatCommons.ts +1 -6
  1398. package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -3
  1399. package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +3 -2
  1400. package/src/shared-tree-core/index.ts +2 -7
  1401. package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -5
  1402. package/src/shared-tree-core/messageCodecVSharedBranches.ts +4 -4
  1403. package/src/shared-tree-core/messageCodecs.ts +3 -13
  1404. package/src/shared-tree-core/messageFormat.ts +0 -6
  1405. package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -3
  1406. package/src/shared-tree-core/messageFormatVSharedBranches.ts +1 -0
  1407. package/src/shared-tree-core/messageTypes.ts +1 -0
  1408. package/src/shared-tree-core/sharedTreeCore.ts +27 -31
  1409. package/src/shared-tree-core/versionedSummarizer.ts +3 -1
  1410. package/src/simple-tree/api/configuration.ts +9 -9
  1411. package/src/simple-tree/api/create.ts +7 -6
  1412. package/src/simple-tree/api/dirtyIndex.ts +4 -2
  1413. package/src/simple-tree/api/discrepancies.ts +9 -8
  1414. package/src/simple-tree/api/getJsonSchema.ts +4 -3
  1415. package/src/simple-tree/api/identifierIndex.ts +4 -2
  1416. package/src/simple-tree/api/incrementalAllowedTypes.ts +6 -5
  1417. package/src/simple-tree/api/schemaCompatibilityTester.ts +3 -3
  1418. package/src/simple-tree/api/schemaCreationUtilities.ts +4 -3
  1419. package/src/simple-tree/api/schemaFactory.ts +16 -17
  1420. package/src/simple-tree/api/schemaFactoryAlpha.ts +21 -21
  1421. package/src/simple-tree/api/schemaFactoryBeta.ts +17 -15
  1422. package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -1
  1423. package/src/simple-tree/api/schemaFromSimple.ts +1 -1
  1424. package/src/simple-tree/api/schemaStatics.ts +2 -0
  1425. package/src/simple-tree/api/simpleSchemaCodec.ts +12 -11
  1426. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +20 -18
  1427. package/src/simple-tree/api/simpleTreeIndex.ts +6 -4
  1428. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +7 -5
  1429. package/src/simple-tree/api/storedSchema.ts +2 -1
  1430. package/src/simple-tree/api/tree.ts +2 -2
  1431. package/src/simple-tree/api/treeBeta.ts +3 -3
  1432. package/src/simple-tree/api/treeNodeApi.ts +14 -13
  1433. package/src/simple-tree/api/typesUnsafe.ts +7 -8
  1434. package/src/simple-tree/api/verboseTree.ts +6 -5
  1435. package/src/simple-tree/core/allowedTypes.ts +4 -4
  1436. package/src/simple-tree/core/context.ts +1 -1
  1437. package/src/simple-tree/core/treeNode.ts +1 -1
  1438. package/src/simple-tree/core/treeNodeKernel.ts +1 -3
  1439. package/src/simple-tree/core/treeNodeSchema.ts +7 -6
  1440. package/src/simple-tree/core/treeNodeValid.ts +9 -9
  1441. package/src/simple-tree/core/unhydratedFlexTree.ts +37 -88
  1442. package/src/simple-tree/core/withType.ts +3 -2
  1443. package/src/simple-tree/createContext.ts +1 -0
  1444. package/src/simple-tree/fieldSchema.ts +5 -8
  1445. package/src/simple-tree/index.ts +1 -2
  1446. package/src/simple-tree/leafNodeSchema.ts +3 -3
  1447. package/src/simple-tree/node-kinds/array/arrayNode.ts +20 -21
  1448. package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +2 -2
  1449. package/src/simple-tree/node-kinds/common.ts +6 -3
  1450. package/src/simple-tree/node-kinds/map/mapNode.ts +20 -19
  1451. package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +2 -2
  1452. package/src/simple-tree/node-kinds/object/objectNode.ts +37 -37
  1453. package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +8 -7
  1454. package/src/simple-tree/node-kinds/record/recordNode.ts +21 -22
  1455. package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +1 -2
  1456. package/src/simple-tree/prepareForInsertion.ts +205 -345
  1457. package/src/simple-tree/simpleSchema.ts +1 -0
  1458. package/src/simple-tree/treeSchema.ts +1 -0
  1459. package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +16 -44
  1460. package/src/tableSchema.ts +3 -1
  1461. package/src/text/index.ts +1 -0
  1462. package/src/text/textDomain.ts +1 -1
  1463. package/src/text/textDomainFormatted.ts +309 -0
  1464. package/src/treeFactory.ts +8 -18
  1465. package/src/util/bTreeUtils.ts +1 -1
  1466. package/src/util/index.ts +0 -3
  1467. package/src/util/rangeMap.ts +18 -72
  1468. package/src/util/readSnapshotBlob.ts +4 -2
  1469. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
  1470. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
  1471. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -132
  1472. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
  1473. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
  1474. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
  1475. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -393
  1476. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
  1477. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
  1478. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
  1479. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -32
  1480. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
  1481. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
  1482. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
  1483. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -31
  1484. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
  1485. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
  1486. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
  1487. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -57
  1488. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
  1489. package/dist/shared-tree-core/transactionEnricher.d.ts +0 -23
  1490. package/dist/shared-tree-core/transactionEnricher.d.ts.map +0 -1
  1491. package/dist/shared-tree-core/transactionEnricher.js +0 -74
  1492. package/dist/shared-tree-core/transactionEnricher.js.map +0 -1
  1493. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
  1494. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
  1495. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -128
  1496. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
  1497. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
  1498. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
  1499. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -389
  1500. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
  1501. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
  1502. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
  1503. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -29
  1504. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
  1505. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
  1506. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
  1507. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -27
  1508. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
  1509. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
  1510. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
  1511. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -53
  1512. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
  1513. package/lib/shared-tree-core/transactionEnricher.d.ts +0 -23
  1514. package/lib/shared-tree-core/transactionEnricher.d.ts.map +0 -1
  1515. package/lib/shared-tree-core/transactionEnricher.js +0 -70
  1516. package/lib/shared-tree-core/transactionEnricher.js.map +0 -1
  1517. package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +0 -188
  1518. package/src/feature-libraries/modular-schema/modularChangeCodecV3.ts +0 -760
  1519. package/src/feature-libraries/modular-schema/modularChangeFormatV3.ts +0 -62
  1520. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV3.ts +0 -45
  1521. package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +0 -94
  1522. package/src/shared-tree-core/transactionEnricher.ts +0 -74
@@ -1 +1 @@
1
- {"version":3,"file":"forestSummarizer.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/forestSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAU7D,OAAO,EASN,UAAU,EACV,YAAY,EACZ,sBAAsB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,mBAAmB,GAInB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACrF,wDAAwD;AACxD,OAAO,EAAE,gBAAgB,EAAE,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M,wBAAwB,CAAC,2BAA2B,EAAE,QAAQ,EAAE,KAAK,CAAC,EAC5E;YACC,GAAG,IAAI,CAAC,cAAc;YACtB,yBAAyB,EAAE,IAAI,CAAC,yBAAyB;SACzD,CACD,CAAC;QACF,MAAM,SAAS,GAAG,oBAAoB,EAAE,CAAC;QACzC,MAAM,YAAY,GAAoC,EAAE,CAAC;QACzD,MAAM,KAAK,GAA6B,EAAE,CAAC;QAC3C,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,MAAM,EAAE,CAAC;YACxC,MAAM,OAAO,GAAG,gBAAgB,CAAC,KAAK,EAAE;gBACvC,MAAM,EAAE,kBAAkB;gBAC1B,YAAY,EAAE,IAAI,CAAC,YAAY;aAC/B,CAAC,CAAC;YACH,MAAM,OAAO,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC;YACtE,KAAK,CAAC,IAAI,CAAC;gBACV,EAAE,EAAE,OAAO;gBACX,KAAK,EAAE,OAAO;aACd,CAAC,CAAC;YACH,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;QACrF,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,0BAA0B,CAAC,CAAC;QAC9D,UAAU,CACT,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,GAAG,CAAC,YAAY,CAAC,EAAE,EACxC,SAAS,EACT,IAAI,CAAC,MAAM,EACX,sBAAsB,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,YAAY,CAAC,CACxE,CAAC;IACH,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport type {\n\tIExperimentalIncrementalSummaryContext,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport type { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\n\nimport type { CodecWriteOptions } from \"../../codec/index.js\";\nimport {\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaFieldChanges,\n\ttype FieldKey,\n\ttype IEditableForest,\n\ttype ITreeCursorSynchronous,\n\ttype ITreeSubscriptionCursor,\n\ttype RevisionTagCodec,\n\tTreeNavigationResult,\n\tapplyDelta,\n\tforEachField,\n\tmakeDetachedFieldIndex,\n} from \"../../core/index.js\";\nimport {\n\tVersionedSummarizer,\n\ttype Summarizable,\n\ttype SummaryElementParser,\n\ttype SummaryElementStringifier,\n} from \"../../shared-tree-core/index.js\";\nimport { idAllocatorFromMaxId, readAndParseSnapshotBlob } from \"../../util/index.js\";\n// eslint-disable-next-line import-x/no-internal-modules\nimport { chunkFieldSingle, defaultChunkPolicy } from \"../chunked-forest/chunkTree.js\";\nimport {\n\tdefaultIncrementalEncodingPolicy,\n\ttype FieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\ttype IncrementalEncodingPolicy,\n} from \"../chunked-forest/index.js\";\n\nimport {\n\tclientVersionToForestFormatVersion,\n\ttype ForestCodec,\n\tmakeForestSummarizerCodec,\n} from \"./codec.js\";\nimport {\n\tForestIncrementalSummaryBehavior,\n\tForestIncrementalSummaryBuilder,\n} from \"./incrementalSummaryBuilder.js\";\nimport {\n\tminVersionToForestSummaryFormatVersion,\n\tgetForestRootSummaryContentKey,\n} from \"./summaryTypes.js\";\nimport { TreeCompressionStrategy } from \"../treeCompressionUtils.js\";\nimport { ForestFormatVersion } from \"./formatCommon.js\";\nimport {\n\tForestSummaryFormatVersion,\n\tforestSummaryKey,\n\tsupportedForestSummaryFormatVersions,\n} from \"./summaryFormatCommon.js\";\n\n/**\n * Provides methods for summarizing and loading a forest.\n */\nexport class ForestSummarizer\n\textends VersionedSummarizer<ForestSummaryFormatVersion>\n\timplements Summarizable\n{\n\tprivate readonly codec: ForestCodec;\n\n\tprivate readonly incrementalSummaryBuilder: ForestIncrementalSummaryBuilder;\n\tprivate readonly forestRootSummaryContentKey: string;\n\n\t/**\n\t * @param encoderContext - The schema if provided here must be mutated by the caller to keep it up to date.\n\t */\n\tpublic constructor(\n\t\tprivate readonly forest: IEditableForest,\n\t\tprivate readonly revisionTagCodec: RevisionTagCodec,\n\t\tfieldBatchCodec: FieldBatchCodec,\n\t\tprivate readonly encoderContext: FieldBatchEncodingContext,\n\t\toptions: CodecWriteOptions,\n\t\tprivate readonly idCompressor: IIdCompressor,\n\t\tinitialSequenceNumber: number,\n\t\tshouldEncodeIncrementally: IncrementalEncodingPolicy = defaultIncrementalEncodingPolicy,\n\t) {\n\t\tsuper(\n\t\t\tforestSummaryKey,\n\t\t\tminVersionToForestSummaryFormatVersion(options.minVersionForCollab),\n\t\t\tsupportedForestSummaryFormatVersions,\n\t\t\ttrue /* supportPreVersioningFormat */,\n\t\t);\n\n\t\tthis.codec = makeForestSummarizerCodec(options, fieldBatchCodec);\n\n\t\tconst forestFormatWriteVersion = clientVersionToForestFormatVersion(\n\t\t\toptions.minVersionForCollab,\n\t\t);\n\t\tconst summaryFormatWriteVersion = minVersionToForestSummaryFormatVersion(\n\t\t\toptions.minVersionForCollab,\n\t\t);\n\t\tthis.forestRootSummaryContentKey = getForestRootSummaryContentKey(\n\t\t\tsummaryFormatWriteVersion,\n\t\t);\n\n\t\t// Incremental summary is supported from ForestFormatVersion.v2 and ForestSummaryFormatVersion.v3 onwards.\n\t\tconst enableIncrementalSummary =\n\t\t\tforestFormatWriteVersion >= ForestFormatVersion.v2 &&\n\t\t\tsummaryFormatWriteVersion >= ForestSummaryFormatVersion.v3 &&\n\t\t\tencoderContext.encodeType === TreeCompressionStrategy.CompressedIncremental;\n\t\tthis.incrementalSummaryBuilder = new ForestIncrementalSummaryBuilder(\n\t\t\tenableIncrementalSummary,\n\t\t\t(cursor: ITreeCursorSynchronous) => this.forest.chunkField(cursor),\n\t\t\tshouldEncodeIncrementally,\n\t\t\tinitialSequenceNumber,\n\t\t);\n\t}\n\n\t/**\n\t * Summarization of the forest's tree content.\n\t * @returns a summary tree containing the forest's tree content.\n\t * @remarks\n\t * If incremental summary is disabled, all the content will be added to a single summary blob.\n\t * If incremental summary is enabled, the summary will be a tree.\n\t * See {@link ForestIncrementalSummaryBuilder} for details of what this tree looks like.\n\t *\n\t * TODO: when perf matters, this should be replaced with a chunked async version using a binary format.\n\t */\n\tprotected summarizeInternal(props: {\n\t\tstringify: SummaryElementStringifier;\n\t\tfullTree?: boolean;\n\t\ttrackState?: boolean;\n\t\ttelemetryContext?: ITelemetryContext;\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext;\n\t\tbuilder: SummaryTreeBuilder;\n\t}): void {\n\t\tconst { stringify, fullTree = false, incrementalSummaryContext, builder } = props;\n\n\t\tconst rootCursor = this.forest.getCursorAboveDetachedFields();\n\t\tconst fieldMap: Map<FieldKey, ITreeCursorSynchronous & ITreeSubscriptionCursor> =\n\t\t\tnew Map();\n\t\t// TODO: Encode all detached fields in one operation for better performance and compression\n\t\tforEachField(rootCursor, (cursor) => {\n\t\t\tconst key = cursor.getFieldKey();\n\t\t\tconst innerCursor = this.forest.allocateCursor(\"getTreeString\");\n\t\t\tassert(\n\t\t\t\tthis.forest.tryMoveCursorToField({ fieldKey: key, parent: undefined }, innerCursor) ===\n\t\t\t\t\tTreeNavigationResult.Ok,\n\t\t\t\t0x892 /* failed to navigate to field */,\n\t\t\t);\n\t\t\tfieldMap.set(key, innerCursor as ITreeCursorSynchronous & ITreeSubscriptionCursor);\n\t\t});\n\n\t\t// Let the incremental summary builder know that we are starting a new summary.\n\t\t// It returns whether incremental encoding is enabled.\n\t\tconst incrementalSummaryBehavior = this.incrementalSummaryBuilder.startSummary({\n\t\t\tfullTree,\n\t\t\tincrementalSummaryContext,\n\t\t\tstringify,\n\t\t\tbuilder,\n\t\t});\n\t\tconst encoderContext: FieldBatchEncodingContext = {\n\t\t\t...this.encoderContext,\n\t\t\tincrementalEncoderDecoder:\n\t\t\t\tincrementalSummaryBehavior === ForestIncrementalSummaryBehavior.Incremental\n\t\t\t\t\t? this.incrementalSummaryBuilder\n\t\t\t\t\t: undefined,\n\t\t};\n\t\tconst encoded = this.codec.encode(fieldMap, encoderContext);\n\t\tfor (const value of fieldMap.values()) {\n\t\t\tvalue.free();\n\t\t}\n\n\t\tthis.incrementalSummaryBuilder.completeSummary({\n\t\t\tincrementalSummaryContext,\n\t\t\tforestSummaryRootContent: stringify(encoded),\n\t\t\tforestSummaryRootContentKey: this.forestRootSummaryContentKey,\n\t\t\tbuilder,\n\t\t});\n\t}\n\n\tprotected async loadInternal(\n\t\tservices: IChannelStorageService,\n\t\tparse: SummaryElementParser,\n\t\tversion: ForestSummaryFormatVersion | undefined,\n\t): Promise<void> {\n\t\t// Get the key of the summary blob where the top-level forest content is stored based on the summary format version.\n\t\t// If the summary was generated as `ForestIncrementalSummaryBehavior.SingleBlob`, this blob will contain all\n\t\t// of forest's contents.\n\t\t// If the summary was generated as `ForestIncrementalSummaryBehavior.Incremental`, this blob will contain only\n\t\t// the top-level forest node's contents.\n\t\t// The contents of the incremental chunks will be in separate tree nodes and will be read later during decoding.\n\t\tconst forestSummaryRootContentKey = getForestRootSummaryContentKey(version);\n\t\tassert(\n\t\t\tawait services.contains(forestSummaryRootContentKey),\n\t\t\t0xc21 /* Forest summary content missing in snapshot */,\n\t\t);\n\n\t\t// Load the incremental summary builder so that it can download any incremental chunks in the\n\t\t// snapshot.\n\t\tawait this.incrementalSummaryBuilder.load({\n\t\t\tservices,\n\t\t\treadAndParseChunk: async (chunkBlobPath: string) =>\n\t\t\t\treadAndParseSnapshotBlob(chunkBlobPath, services, parse),\n\t\t});\n\n\t\t// TODO: this code is parsing data without an optional validator, this should be defined in a typebox schema as part of the\n\t\t// forest summary format.\n\t\tconst fields = this.codec.decode(\n\t\t\tawait readAndParseSnapshotBlob(forestSummaryRootContentKey, services, parse),\n\t\t\t{\n\t\t\t\t...this.encoderContext,\n\t\t\t\tincrementalEncoderDecoder: this.incrementalSummaryBuilder,\n\t\t\t},\n\t\t);\n\t\tconst allocator = idAllocatorFromMaxId();\n\t\tconst fieldChanges: [FieldKey, DeltaFieldChanges][] = [];\n\t\tconst build: DeltaDetachedNodeBuild[] = [];\n\t\tfor (const [fieldKey, field] of fields) {\n\t\t\tconst chunked = chunkFieldSingle(field, {\n\t\t\t\tpolicy: defaultChunkPolicy,\n\t\t\t\tidCompressor: this.idCompressor,\n\t\t\t});\n\t\t\tconst buildId = { minor: allocator.allocate(chunked.topLevelLength) };\n\t\t\tbuild.push({\n\t\t\t\tid: buildId,\n\t\t\t\ttrees: chunked,\n\t\t\t});\n\t\t\tfieldChanges.push([fieldKey, [{ count: chunked.topLevelLength, attach: buildId }]]);\n\t\t}\n\n\t\tassert(this.forest.isEmpty, 0x797 /* forest must be empty */);\n\t\tapplyDelta(\n\t\t\t{ build, fields: new Map(fieldChanges) },\n\t\t\tundefined,\n\t\t\tthis.forest,\n\t\t\tmakeDetachedFieldIndex(\"init\", this.revisionTagCodec, this.idCompressor),\n\t\t);\n\t}\n}\n"]}
1
+ {"version":3,"file":"forestSummarizer.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/forestSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAU7D,OAAO,EASN,UAAU,EACV,YAAY,EACZ,sBAAsB,GACtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,mBAAmB,GAInB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACrF,wDAAwD;AACx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ed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport type {\n\tIExperimentalIncrementalSummaryContext,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport type { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\n\nimport type { CodecWriteOptions } from \"../../codec/index.js\";\nimport {\n\ttype DeltaDetachedNodeBuild,\n\ttype DeltaFieldChanges,\n\ttype FieldKey,\n\ttype IEditableForest,\n\ttype ITreeCursorSynchronous,\n\ttype ITreeSubscriptionCursor,\n\ttype RevisionTagCodec,\n\tTreeNavigationResult,\n\tapplyDelta,\n\tforEachField,\n\tmakeDetachedFieldIndex,\n} from \"../../core/index.js\";\nimport {\n\tVersionedSummarizer,\n\ttype Summarizable,\n\ttype SummaryElementParser,\n\ttype SummaryElementStringifier,\n} from \"../../shared-tree-core/index.js\";\nimport { idAllocatorFromMaxId, readAndParseSnapshotBlob } from \"../../util/index.js\";\n// eslint-disable-next-line import-x/no-internal-modules\nimport { chunkFieldSingle, defaultChunkPolicy } from \"../chunked-forest/chunkTree.js\";\nimport {\n\tdefaultIncrementalEncodingPolicy,\n\ttype FieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\ttype IncrementalEncodingPolicy,\n} from \"../chunked-forest/index.js\";\nimport { TreeCompressionStrategy } from \"../treeCompressionUtils.js\";\n\nimport {\n\tclientVersionToForestFormatVersion,\n\ttype ForestCodec,\n\tmakeForestSummarizerCodec,\n} from \"./codec.js\";\nimport { ForestFormatVersion } from \"./formatCommon.js\";\nimport {\n\tForestIncrementalSummaryBehavior,\n\tForestIncrementalSummaryBuilder,\n} from \"./incrementalSummaryBuilder.js\";\nimport {\n\tForestSummaryFormatVersion,\n\tforestSummaryKey,\n\tsupportedForestSummaryFormatVersions,\n} from \"./summaryFormatCommon.js\";\nimport {\n\tminVersionToForestSummaryFormatVersion,\n\tgetForestRootSummaryContentKey,\n} from \"./summaryTypes.js\";\n\n/**\n * Provides methods for summarizing and loading a forest.\n */\nexport class ForestSummarizer\n\textends VersionedSummarizer<ForestSummaryFormatVersion>\n\timplements Summarizable\n{\n\tprivate readonly codec: ForestCodec;\n\n\tprivate readonly incrementalSummaryBuilder: ForestIncrementalSummaryBuilder;\n\tprivate readonly forestRootSummaryContentKey: string;\n\n\t/**\n\t * @param encoderContext - The schema if provided here must be mutated by the caller to keep it up to date.\n\t */\n\tpublic constructor(\n\t\tprivate readonly forest: IEditableForest,\n\t\tprivate readonly revisionTagCodec: RevisionTagCodec,\n\t\tfieldBatchCodec: FieldBatchCodec,\n\t\tprivate readonly encoderContext: FieldBatchEncodingContext,\n\t\toptions: CodecWriteOptions,\n\t\tprivate readonly idCompressor: IIdCompressor,\n\t\tinitialSequenceNumber: number,\n\t\tshouldEncodeIncrementally: IncrementalEncodingPolicy = defaultIncrementalEncodingPolicy,\n\t) {\n\t\tsuper(\n\t\t\tforestSummaryKey,\n\t\t\tminVersionToForestSummaryFormatVersion(options.minVersionForCollab),\n\t\t\tsupportedForestSummaryFormatVersions,\n\t\t\ttrue /* supportPreVersioningFormat */,\n\t\t);\n\n\t\tthis.codec = makeForestSummarizerCodec(options, fieldBatchCodec);\n\n\t\tconst forestFormatWriteVersion = clientVersionToForestFormatVersion(\n\t\t\toptions.minVersionForCollab,\n\t\t);\n\t\tconst summaryFormatWriteVersion = minVersionToForestSummaryFormatVersion(\n\t\t\toptions.minVersionForCollab,\n\t\t);\n\t\tthis.forestRootSummaryContentKey = getForestRootSummaryContentKey(\n\t\t\tsummaryFormatWriteVersion,\n\t\t);\n\n\t\t// Incremental summary is supported from ForestFormatVersion.v2 and ForestSummaryFormatVersion.v3 onwards.\n\t\tconst enableIncrementalSummary =\n\t\t\tforestFormatWriteVersion >= ForestFormatVersion.v2 &&\n\t\t\tsummaryFormatWriteVersion >= ForestSummaryFormatVersion.v3 &&\n\t\t\tencoderContext.encodeType === TreeCompressionStrategy.CompressedIncremental;\n\t\tthis.incrementalSummaryBuilder = new ForestIncrementalSummaryBuilder(\n\t\t\tenableIncrementalSummary,\n\t\t\t(cursor: ITreeCursorSynchronous) => this.forest.chunkField(cursor),\n\t\t\tshouldEncodeIncrementally,\n\t\t\tinitialSequenceNumber,\n\t\t);\n\t}\n\n\t/**\n\t * Summarization of the forest's tree content.\n\t * @returns a summary tree containing the forest's tree content.\n\t * @remarks\n\t * If incremental summary is disabled, all the content will be added to a single summary blob.\n\t * If incremental summary is enabled, the summary will be a tree.\n\t * See {@link ForestIncrementalSummaryBuilder} for details of what this tree looks like.\n\t *\n\t * TODO: when perf matters, this should be replaced with a chunked async version using a binary format.\n\t */\n\tprotected summarizeInternal(props: {\n\t\tstringify: SummaryElementStringifier;\n\t\tfullTree?: boolean;\n\t\ttrackState?: boolean;\n\t\ttelemetryContext?: ITelemetryContext;\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext;\n\t\tbuilder: SummaryTreeBuilder;\n\t}): void {\n\t\tconst { stringify, fullTree = false, incrementalSummaryContext, builder } = props;\n\n\t\tconst rootCursor = this.forest.getCursorAboveDetachedFields();\n\t\tconst fieldMap: Map<FieldKey, ITreeCursorSynchronous & ITreeSubscriptionCursor> =\n\t\t\tnew Map();\n\t\t// TODO: Encode all detached fields in one operation for better performance and compression\n\t\tforEachField(rootCursor, (cursor) => {\n\t\t\tconst key = cursor.getFieldKey();\n\t\t\tconst innerCursor = this.forest.allocateCursor(\"getTreeString\");\n\t\t\tassert(\n\t\t\t\tthis.forest.tryMoveCursorToField({ fieldKey: key, parent: undefined }, innerCursor) ===\n\t\t\t\t\tTreeNavigationResult.Ok,\n\t\t\t\t0x892 /* failed to navigate to field */,\n\t\t\t);\n\t\t\tfieldMap.set(key, innerCursor as ITreeCursorSynchronous & ITreeSubscriptionCursor);\n\t\t});\n\n\t\t// Let the incremental summary builder know that we are starting a new summary.\n\t\t// It returns whether incremental encoding is enabled.\n\t\tconst incrementalSummaryBehavior = this.incrementalSummaryBuilder.startSummary({\n\t\t\tfullTree,\n\t\t\tincrementalSummaryContext,\n\t\t\tstringify,\n\t\t\tbuilder,\n\t\t});\n\t\tconst encoderContext: FieldBatchEncodingContext = {\n\t\t\t...this.encoderContext,\n\t\t\tincrementalEncoderDecoder:\n\t\t\t\tincrementalSummaryBehavior === ForestIncrementalSummaryBehavior.Incremental\n\t\t\t\t\t? this.incrementalSummaryBuilder\n\t\t\t\t\t: undefined,\n\t\t};\n\t\tconst encoded = this.codec.encode(fieldMap, encoderContext);\n\t\tfor (const value of fieldMap.values()) {\n\t\t\tvalue.free();\n\t\t}\n\n\t\tthis.incrementalSummaryBuilder.completeSummary({\n\t\t\tincrementalSummaryContext,\n\t\t\tforestSummaryRootContent: stringify(encoded),\n\t\t\tforestSummaryRootContentKey: this.forestRootSummaryContentKey,\n\t\t\tbuilder,\n\t\t});\n\t}\n\n\tprotected async loadInternal(\n\t\tservices: IChannelStorageService,\n\t\tparse: SummaryElementParser,\n\t\tversion: ForestSummaryFormatVersion | undefined,\n\t): Promise<void> {\n\t\t// Get the key of the summary blob where the top-level forest content is stored based on the summary format version.\n\t\t// If the summary was generated as `ForestIncrementalSummaryBehavior.SingleBlob`, this blob will contain all\n\t\t// of forest's contents.\n\t\t// If the summary was generated as `ForestIncrementalSummaryBehavior.Incremental`, this blob will contain only\n\t\t// the top-level forest node's contents.\n\t\t// The contents of the incremental chunks will be in separate tree nodes and will be read later during decoding.\n\t\tconst forestSummaryRootContentKey = getForestRootSummaryContentKey(version);\n\t\tassert(\n\t\t\tawait services.contains(forestSummaryRootContentKey),\n\t\t\t0xc21 /* Forest summary content missing in snapshot */,\n\t\t);\n\n\t\t// Load the incremental summary builder so that it can download any incremental chunks in the\n\t\t// snapshot.\n\t\tawait this.incrementalSummaryBuilder.load({\n\t\t\tservices,\n\t\t\treadAndParseChunk: async (chunkBlobPath: string) =>\n\t\t\t\treadAndParseSnapshotBlob(chunkBlobPath, services, parse),\n\t\t});\n\n\t\t// TODO: this code is parsing data without an optional validator, this should be defined in a typebox schema as part of the\n\t\t// forest summary format.\n\t\tconst fields = this.codec.decode(\n\t\t\tawait readAndParseSnapshotBlob(forestSummaryRootContentKey, services, parse),\n\t\t\t{\n\t\t\t\t...this.encoderContext,\n\t\t\t\tincrementalEncoderDecoder: this.incrementalSummaryBuilder,\n\t\t\t},\n\t\t);\n\t\tconst allocator = idAllocatorFromMaxId();\n\t\tconst fieldChanges: [FieldKey, DeltaFieldChanges][] = [];\n\t\tconst build: DeltaDetachedNodeBuild[] = [];\n\t\tfor (const [fieldKey, field] of fields) {\n\t\t\tconst chunked = chunkFieldSingle(field, {\n\t\t\t\tpolicy: defaultChunkPolicy,\n\t\t\t\tidCompressor: this.idCompressor,\n\t\t\t});\n\t\t\tconst buildId = { minor: allocator.allocate(chunked.topLevelLength) };\n\t\t\tbuild.push({\n\t\t\t\tid: buildId,\n\t\t\t\ttrees: chunked,\n\t\t\t});\n\t\t\tfieldChanges.push([fieldKey, [{ count: chunked.topLevelLength, attach: buildId }]]);\n\t\t}\n\n\t\tassert(this.forest.isEmpty, 0x797 /* forest must be empty */);\n\t\tapplyDelta(\n\t\t\t{ build, fields: new Map(fieldChanges) },\n\t\t\tundefined,\n\t\t\tthis.forest,\n\t\t\tmakeDetachedFieldIndex(\"init\", this.revisionTagCodec, this.idCompressor),\n\t\t);\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"formatV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmE,CAAC;AACzF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"formatV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmE,CAAC;AACzF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAsB,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Static } from \"@sinclair/typebox\";\n\nimport { brand } from \"../../util/index.js\";\nimport { FormatCommon, ForestFormatVersion } from \"./formatCommon.js\";\n\nexport const FormatV1 = FormatCommon(brand<ForestFormatVersion>(ForestFormatVersion.v1));\nexport type FormatV1 = Static<typeof FormatV1>;\n"]}
1
+ {"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAsB,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Static } from \"@sinclair/typebox\";\n\nimport { brand } from \"../../util/index.js\";\n\nimport { FormatCommon, ForestFormatVersion } from \"./formatCommon.js\";\n\nexport const FormatV1 = FormatCommon(brand<ForestFormatVersion>(ForestFormatVersion.v1));\nexport type FormatV1 = Static<typeof FormatV1>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmE,CAAC;AACzF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"formatV2.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD,OAAO,EAAgB,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAmE,CAAC;AACzF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAsB,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Static } from \"@sinclair/typebox\";\n\nimport { brand } from \"../../util/index.js\";\nimport { FormatCommon, ForestFormatVersion } from \"./formatCommon.js\";\n\nexport const FormatV2 = FormatCommon(brand<ForestFormatVersion>(ForestFormatVersion.v2));\nexport type FormatV2 = Static<typeof FormatV2>;\n"]}
1
+ {"version":3,"file":"formatV2.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/formatV2.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAEtE,MAAM,CAAC,MAAM,QAAQ,GAAG,YAAY,CAAC,KAAK,CAAsB,mBAAmB,CAAC,EAAE,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Static } from \"@sinclair/typebox\";\n\nimport { brand } from \"../../util/index.js\";\n\nimport { FormatCommon, ForestFormatVersion } from \"./formatCommon.js\";\n\nexport const FormatV2 = FormatCommon(brand<ForestFormatVersion>(ForestFormatVersion.v2));\nexport type FormatV2 = Static<typeof FormatV2>;\n"]}
@@ -2,14 +2,14 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import type { IFluidHandle } from "@fluidframework/core-interfaces";
6
+ import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
5
7
  import type { IExperimentalIncrementalSummaryContext } from "@fluidframework/runtime-definitions/internal";
6
8
  import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
7
- import { type JsonCompatible } from "../../util/index.js";
8
- import type { ChunkReferenceId, EncodedFieldBatch, IncrementalEncoderDecoder, IncrementalEncodingPolicy, TreeChunk } from "../chunked-forest/index.js";
9
9
  import type { ITreeCursorSynchronous } from "../../core/index.js";
10
- import type { IChannelStorageService } from "@fluidframework/datastore-definitions/internal";
11
- import type { IFluidHandle } from "@fluidframework/core-interfaces";
12
10
  import type { SummaryElementStringifier } from "../../shared-tree-core/index.js";
11
+ import { type JsonCompatible } from "../../util/index.js";
12
+ import type { ChunkReferenceId, EncodedFieldBatch, IncrementalEncoderDecoder, IncrementalEncodingPolicy, TreeChunk } from "../chunked-forest/index.js";
13
13
  /**
14
14
  * State that tells whether a summary is currently being tracked.
15
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"incrementalSummaryBuilder.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,8CAA8C,CAAC;AAC3G,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAIN,KAAK,cAAc,EAEnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,gBAAgB,EAChB,iBAAiB,EACjB,yBAAyB,EACzB,yBAAyB,EACzB,SAAS,EACT,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAG7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,KAAK,EAAE,yBAAyB,EAAE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AG,OAAO,CAAC,IAAI,CAAC;IA2CjB;;;;;;;;OAQG;IACI,YAAY,CAAC,IAAI,EAAE;QACzB,QAAQ,EAAE,OAAO,CAAC;QAClB,yBAAyB,EAAE,sCAAsC,GAAG,SAAS,CAAC;QAC9E,SAAS,EAAE,yBAAyB,CAAC;QACrC,OAAO,EAAE,kBAAkB,CAAC;KAC5B,GAAG,gCAAgC;IAwBpC;;;OAGG;IACI,sBAAsB,CAC5B,MAAM,EAAE,sBAAsB,EAC9B,YAAY,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,iBAAiB,GACnD,gBAAgB,EAAE;IA0ErB;;;;;;;;;;;OAWG;IACI,eAAe,CAAC,IAAI,EAAE;QAC5B,yBAAyB,EAAE,sCAAsC,GAAG,SAAS,CAAC;QAC9E,wBAAwB,EAAE,MAAM,CAAC;QACjC,2BAA2B,EAAE,MAAM,CAAC;QACpC,OAAO,EAAE,kBAAkB,CAAC;KAC5B,GAAG,IAAI;IA8CR;;OAEG;IACI,sBAAsB,CAC5B,WAAW,EAAE,gBAAgB,EAC7B,YAAY,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,SAAS,GACrD,SAAS;CAkBZ"}
1
+ {"version":3,"file":"incrementalSummaryBuilder.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAG7F,OAAO,KAAK,EAAE,sCAAsC,EAAE,MAAM,8CAA8C,CAAC;AAC3G,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAG5E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AACjF,OAAO,EAIN,K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ACjC,iBAAiB,EAAE,CAAC,CAAC,SAAS,cAAc,CAAC,YAAY,CAAC,EACzD,aAAa,EAAE,MAAM,KACjB,OAAO,CAAC,CAAC,CAAC,CAAC;KAChB,GAAG,OAAO,CAAC,IAAI,CAAC;IA2CjB;;;;;;;;OAQG;IACI,YAAY,CAAC,IAAI,EAAE;QACzB,QAAQ,EAAE,OAAO,CAAC;QAClB,yBAAyB,EAAE,sCAAsC,GAAG,SAAS,CAAC;QAC9E,SAAS,EAAE,yBAAyB,CAAC;QACrC,OAAO,EAAE,kBAAkB,CAAC;KAC5B,GAAG,gCAAgC;IAwBpC;;;OAGG;IACI,sBAAsB,CAC5B,MAAM,EAAE,sBAAsB,EAC9B,YAAY,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,iBAAiB,GACnD,gBAAgB,EAAE;IA0ErB;;;;;;;;;;;OAWG;IACI,eAAe,CAAC,IAAI,EAAE;QAC5B,yBAAyB,EAAE,sCAAsC,GAAG,SAAS,CAAC;QAC9E,wBAAwB,EAAE,MAAM,CAAC;QACjC,2BAA2B,EAAE,MAAM,CAAC;QACpC,OAAO,EAAE,kBAAkB,CAAC;KAC5B,GAAG,IAAI;IA8CR;;OAEG;IACI,sBAAsB,CAC5B,WAAW,EAAE,gBAAgB,EAC7B,YAAY,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,SAAS,GACrD,SAAS;CAkBZ"}
@@ -3,10 +3,10 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { assert } from "@fluidframework/core-utils/internal";
6
- import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
7
- import { brand, setInNestedMap, tryGetFromNestedMap, } from "../../util/index.js";
8
6
  import { SummaryType } from "@fluidframework/driver-definitions";
7
+ import { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal";
9
8
  import { LoggingError } from "@fluidframework/telemetry-utils/internal";
9
+ import { brand, setInNestedMap, tryGetFromNestedMap, } from "../../util/index.js";
10
10
  import { summaryContentBlobKey } from "./summaryFormatV3.js";
11
11
  /**
12
12
  * State that tells whether a summary is currently being tracked.
@@ -1 +1 @@
1
- {"version":3,"file":"incrementalSummaryBuilder.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACN,KAAK,EACL,cAAc,EACd,mBAAmB,GAGnB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAGjE,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAGxE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC,4CAA4C;IAC5C,QAAQ,EAAE,UAAU;IACpB,wCAAwC;IACxC,YAAY,EAAE,cAAc;CACnB,CAAC;AAoFX;;GAEG;AACH,MAAM,CAAN,IAAY,gCAgBX;AAhBD,WAAY,gCAAgC;IAC3C;;;;OAIG;IACH,qGAAW,CAAA;IACX;;;;;;;OAOG;IACH,mGAAU,CAAA;AACX,CAAC,EAhBW,gCAAgC,KAAhC,gCAAgC,QAgB3C;AAED;;;;GAIG;AACH,SAAS,uBAAuB,CAC/B,kBAA8C,EAC9C,wBAA8D;IAE9D,MAAM,CACL,kBAAkB,KAAK,0BAA0B,CAAC,QAAQ,EAC1D,KAAK,CAAC,4BAA4B,CAClC,CAAC;IACF,MAAM,CACL,wBAAwB,KAAK,SAAS,EACtC,KAAK,CAAC,0EAA0E,CAChF,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,2BAA2B,CACnC,kBAA8C,EAC9C,wBAA8D;IAE9D,MAAM,CACL,kBAAkB,KAAK,0BAA0B,CAAC,YAAY,EAC9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AE,EAAE,CAAC;YACrE,IAAI,cAAc,GAAG,IAAI,CAAC,2BAA2B,EAAE,CAAC;gBACvD,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;YACxD,CAAC;QACF,CAAC;QAED,IAAI,CAAC,kBAAkB,GAAG,0BAA0B,CAAC,YAAY,CAAC;QAClE,IAAI,CAAC,wBAAwB,GAAG,SAAS,CAAC;IAC3C,CAAC;IAED;;OAEG;IACI,sBAAsB,CAC5B,WAA6B,EAC7B,YAAuD;QAEvD,MAAM,mBAAmB,GAAG,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,WAAW,EAAE,CAAC,CAAC;QACvE,MAAM,CAAC,mBAAmB,KAAK,SAAS,EAAE,KAAK,CAAC,yCAAyC,CAAC,CAAC;QAC3F,MAAM,KAAK,GAAG,YAAY,CAAC,mBAAmB,CAAC,eAAe,CAAC,CAAC;QAEhE,8EAA8E;QAC9E,gFAAgF;QAChF,sFAAsF;QACtF,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,mGAAmG;QACnG,mGAAmG;QACnG,yCAAyC;QACzC,cAAc,CAAC,IAAI,CAAC,0BAA0B,EAAE,IAAI,CAAC,qBAAqB,EAAE,KAAK,EAAE;YAClF,WAAW;YACX,WAAW,EAAE,mBAAmB,CAAC,WAAW;SAC5C,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IExperimentalIncrementalSummaryContext } from \"@fluidframework/runtime-definitions/internal\";\nimport { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\nimport {\n\tbrand,\n\tsetInNestedMap,\n\ttryGetFromNestedMap,\n\ttype JsonCompatible,\n\ttype NestedMap,\n} from \"../../util/index.js\";\nimport type {\n\tChunkReferenceId,\n\tEncodedFieldBatch,\n\tIncrementalEncoderDecoder,\n\tIncrementalEncodingPolicy,\n\tTreeChunk,\n} from \"../chunked-forest/index.js\";\nimport type { ITreeCursorSynchronous } from \"../../core/index.js\";\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport type { ISnapshotTree } from \"@fluidframework/driver-definitions/internal\";\nimport { LoggingError } from \"@fluidframework/telemetry-utils/internal\";\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport type { SummaryElementStringifier } from \"../../shared-tree-core/index.js\";\nimport { summaryContentBlobKey } from \"./summaryFormatV3.js\";\n\n/**\n * State that tells whether a summary is currently being tracked.\n */\nexport const ForestSummaryTrackingState = {\n\t/** A summary is currently being tracked. */\n\tTracking: \"Tracking\",\n\t/** A summary is ready to be tracked. */\n\tReadyToTrack: \"ReadyToTrack\",\n} as const;\nexport type ForestSummaryTrackingState =\n\t(typeof ForestSummaryTrackingState)[keyof typeof ForestSummaryTrackingState];\n\n/**\n * The properties of a chunk tracked during the loading process.\n * These are used to identify a chunk when it is decoded and recreate the tracking state\n * as it was when the summary that the client is loading from was generated.\n *\n * An encoded chunk, paired with a location it can be reused / reloaded from.\n * @remarks\n * This identifies a location in a specific summary where `encodedContents` was loaded from.\n *\n * When summarizing, Fluid always ensures the summary that the summary client is allowed to reuse content from\n * is the one it loaded from, so tracking this on load is sufficient for now:\n * there is no need to track the equivalent data when summarizing.\n */\ninterface ChunkLoadProperties {\n\t/**\n\t * The encoded contents of the chunk.\n\t */\n\treadonly encodedContents: EncodedFieldBatch;\n\t/**\n\t * The path for this chunk's contents in the summary tree relative to the forest's summary tree.\n\t * This path is used to generate a summary handle for the chunk if it doesn't change between summaries.\n\t */\n\treadonly summaryPath: string;\n}\n\n/**\n * The properties of a chunk that is tracked for every summary.\n * If a chunk doesn't change between summaries,\n * these properties will be used to generate a summary handle for the chunk.\n */\ninterface ChunkSummaryProperties {\n\t/**\n\t * The reference ID of the chunk which uniquely identifies it under its parent's summary tree.\n\t * The summary for this chunk will be stored against this reference ID as key in the summary tree.\n\t */\n\treadonly referenceId: ChunkReferenceId;\n\t/**\n\t * The path for this chunk's summary in the summary tree relative to the forest's summary tree.\n\t * This path is used to generate a summary handle for the chunk if it doesn't change between summaries.\n\t */\n\treadonly summaryPath: string;\n}\n\n/**\n * The properties of a summary being tracked.\n */\ninterface TrackedSummaryProperties {\n\t/**\n\t * The sequence number of the summary in progress.\n\t */\n\treadonly summarySequenceNumber: number;\n\t/**\n\t * The base path for the latest summary that was successful.\n\t * This is used to generate summary handles.\n\t */\n\treadonly latestSummaryBasePath: string;\n\t/**\n\t * Whether the summary being tracked is a full tree summary.\n\t * If true, the summary will not contain any summary handles. All chunks must be summarized in full.\n\t */\n\treadonly fullTree: boolean;\n\t/**\n\t * Represents the path of a chunk in the summary tree relative to the forest's summary tree.\n\t * Each item in the array is the {@link ChunkReferenceId} of a chunk in the summary tree starting\n\t * from the chunk under forest summary tree.\n\t * When a chunk is summarized, this array will be used to generate the path for the chunk's summary in the\n\t * summary tree.\n\t */\n\treadonly chunkSummaryPath: ChunkReferenceId[];\n\t/**\n\t * The parent summary builder to use to build the incremental summary tree.\n\t * When a chunk is being summarized, it will add its summary to this builder against its reference ID.\n\t */\n\tparentSummaryBuilder: SummaryTreeBuilder;\n\t/**\n\t * Serializes content (including {@link (IFluidHandle:interface)}s) for adding to a summary blob.\n\t */\n\tstringify: SummaryElementStringifier;\n}\n\n/**\n * The behavior of the forest's incremental summary - whether the summary should be a single blob or incremental.\n */\nexport enum ForestIncrementalSummaryBehavior {\n\t/**\n\t * The forest can encode chunks incrementally, i.e., chunks that support incremental encoding will be encoded\n\t * separately - they will be added to a separate tree.\n\t * The incremental summary format is described in {@link ForestIncrementalSummaryBuilder}.\n\t */\n\tIncremental,\n\t/**\n\t * The forest should encode all of it's data in a single summary blob.\n\t * @remarks\n\t * The format of the summary will be the same as the old format (pre-incremental summaries) and is fully\n\t * backwards compatible with the old format. The summary will basically look like an incremental summary\n\t * with no incremental fields - it will only contain the \"ForestTree\" blob in the summary format described\n\t * in {@link ForestIncrementalSummaryBuilder}.\n\t */\n\tSingleBlob,\n}\n\n/**\n * Validates that a summary is currently being tracked and that the tracked summary properties are defined.\n * @param forestSummaryState - The current state of the forest summary tracking.\n * @param trackedSummaryProperties - The properties of the tracked summary, which must be available.\n */\nfunction validateTrackingSummary(\n\tforestSummaryState: ForestSummaryTrackingState,\n\ttrackedSummaryProperties: TrackedSummaryProperties | undefined,\n): asserts trackedSummaryProperties is TrackedSummaryProperties {\n\tassert(\n\t\tforestSummaryState === ForestSummaryTrackingState.Tracking,\n\t\t0xc22 /* Not tracking a summary */,\n\t);\n\tassert(\n\t\ttrackedSummaryProperties !== undefined,\n\t\t0xc23 /* Tracked summary properties must be available when tracking a summary */,\n\t);\n}\n\n/**\n * Validates that a summary is ready to be tracked and that the tracked summary properties are undefined.\n * @param forestSummaryState - The current state of the forest summary tracking.\n * @param trackedSummaryProperties - The properties of the tracked summary, which must be undefined.\n */\nfunction validateReadyToTrackSummary(\n\tforestSummaryState: ForestSummaryTrackingState,\n\ttrackedSummaryProperties: TrackedSummaryProperties | undefined,\n): asserts trackedSummaryProperties is undefined {\n\tassert(\n\t\tforestSummaryState === ForestSummaryTrackingState.ReadyToTrack,\n\t\t0xc24 /* Already tracking a summary */,\n\t);\n\tassert(\n\t\ttrackedSummaryProperties === undefined,\n\t\t0xc25 /* Tracked summary properties must not be available when ready to track */,\n\t);\n}\n\n/* eslint-disable jsdoc/check-indentation */\n/**\n * Tracks and builds the incremental summary tree for a forest where chunks that support incremental encoding are\n * stored in a separate tree in the summary under its {@link ChunkReferenceId}.\n * The summary tree for a chunk is self-sufficient and can be independently loaded and used to reconstruct the\n * chunk's contents without any additional context from its parent.\n *\n * An example summary tree with incremental summary:\n * Forest\n * ├── contents\n * ├── 0\n * | ├── contents\n * | ├── 1\n * | | ├── contents\n * | | ├── 2\n * | | | ├── contents\n * | ├── 3 - \".../Forest/ForestTree/0/1/3\"\n * ├── 4\n * | ├── contents\n * | ├── ...\n * ├── 5 - \"/.../Forest/ForestTree/5\"\n * - Forest is a summary tree node added by the shared tree and contains the following:\n * - The inline portion of the top-level forest content is stored in a summary blob called \"contents\".\n * It also contains the {@link ChunkReferenceId}s of the incremental chunks under it.\n * - The summary for each incremental chunk under it is stored against its {@link ChunkReferenceId}.\n * - For each chunk, the structure of the summary tree is the same as the Forest. It contains the following:\n * - The inline portion of the chunk content is stored in a blob called \"contents\".\n * It also contains the {@link ChunkReferenceId}s of the incremental chunks under it.\n * - The summary for each incremental chunk under it is stored against its {@link ChunkReferenceId}.\n * - Chunks that do not change between summaries are summarized as handles in the summary tree.\n *\n * TODO: AB#46752\n * Add strong types for the summary structure to document it better. It will help make it super clear what the actual\n * format is in a way that can easily be linked to, documented and inspected.\n */\n/* eslint-enable jsdoc/check-indentation */\nexport class ForestIncrementalSummaryBuilder implements IncrementalEncoderDecoder {\n\t/**\n\t * The next reference ID to use for a chunk.\n\t */\n\tprivate nextReferenceId: ChunkReferenceId = brand(0);\n\n\t/**\n\t * For a given summary sequence number, keeps track of a chunk's properties that will be used to generate\n\t * a summary handle for the chunk if it does not change between summaries.\n\t */\n\tprivate readonly chunkTrackingPropertiesMap: NestedMap<\n\t\tnumber,\n\t\tTreeChunk,\n\t\tChunkSummaryProperties\n\t> = new Map();\n\n\t/**\n\t * The state indicating whether a summary is currently being tracked or not.\n\t */\n\tpublic forestSummaryState: ForestSummaryTrackingState =\n\t\tForestSummaryTrackingState.ReadyToTrack;\n\n\t/**\n\t * The sequence number of the latest summary that was successful.\n\t */\n\tprivate latestSummarySequenceNumber: number = -1;\n\n\t/**\n\t * The current state of the summary being tracked.\n\t * This is undefined if no summary is currently being tracked.\n\t */\n\tprivate trackedSummaryProperties: TrackedSummaryProperties | undefined;\n\n\t/**\n\t * A map of chunk reference IDs to their encoded contents. This is typically used during the loading of the\n\t * forest to retrieve the contents of the chunks that were summarized incrementally.\n\t */\n\t/**\n\t * A map of chunk reference IDs to their {@link ChunkLoadProperties}.\n\t * This is used during the loading of the forest to track each chunk that is retrieved and decoded.\n\t */\n\tprivate readonly loadedChunksMap: Map<string, ChunkLoadProperties> = new Map();\n\n\tpublic constructor(\n\t\tprivate readonly enableIncrementalSummary: boolean,\n\t\tprivate readonly getChunkAtCursor: (cursor: ITreeCursorSynchronous) => TreeChunk[],\n\t\tpublic readonly shouldEncodeIncrementally: IncrementalEncodingPolicy,\n\t\tprivate readonly initialSequenceNumber: number,\n\t) {}\n\n\t/**\n\t * Must be called when the forest is loaded to download the encoded contents of incremental chunks.\n\t * @param services - The channel storage service to use to access the snapshot tree and download the\n\t * contents of the chunks.\n\t * @param readAndParse - A function that reads and parses a blob from the storage service.\n\t */\n\tpublic async load(args: {\n\t\tservices: IChannelStorageService;\n\t\treadAndParseChunk: <T extends JsonCompatible<IFluidHandle>>(\n\t\t\tchunkBlobPath: string,\n\t\t) => Promise<T>;\n\t}): Promise<void> {\n\t\tconst forestTree = args.services.getSnapshotTree?.();\n\t\t// Snapshot tree should be available when loading forest's contents. However, it is an optional function\n\t\t// and may not be implemented by the storage service.\n\t\tif (forestTree === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Downloads the contents of incremental chunks in the given snapshot tree. Also, recursively downloads\n\t\t// the contents of incremental chunks in any sub-trees.\n\t\tconst downloadChunkContentsInTree = async (\n\t\t\tsnapshotTree: ISnapshotTree,\n\t\t\tparentTreeKey: string,\n\t\t): Promise<void> => {\n\t\t\t// All trees in the snapshot tree are for incremental chunks. The key is the chunk's reference ID\n\t\t\t// and the value is the snapshot tree for the chunk.\n\t\t\tfor (const [chunkReferenceId, chunkSnapshotTree] of Object.entries(snapshotTree.trees)) {\n\t\t\t\tconst chunkSubTreePath = `${parentTreeKey}${chunkReferenceId}`;\n\t\t\t\tconst chunkContentsPath = `${chunkSubTreePath}/${summaryContentBlobKey}`;\n\t\t\t\tif (!(await args.services.contains(chunkContentsPath))) {\n\t\t\t\t\tthrow new LoggingError(\n\t\t\t\t\t\t`SharedTree: Cannot find contents for incremental chunk ${chunkContentsPath}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst chunkContents =\n\t\t\t\t\tawait args.readAndParseChunk<EncodedFieldBatch>(chunkContentsPath);\n\t\t\t\tthis.loadedChunksMap.set(chunkReferenceId, {\n\t\t\t\t\tencodedContents: chunkContents,\n\t\t\t\t\tsummaryPath: chunkSubTreePath,\n\t\t\t\t});\n\n\t\t\t\tconst chunkReferenceIdNumber = Number(chunkReferenceId);\n\t\t\t\tthis.nextReferenceId = brand(\n\t\t\t\t\tMath.max(this.nextReferenceId, chunkReferenceIdNumber + 1),\n\t\t\t\t);\n\n\t\t\t\t// Recursively download the contents of chunks in this chunk's sub tree.\n\t\t\t\tawait downloadChunkContentsInTree(chunkSnapshotTree, `${chunkSubTreePath}/`);\n\t\t\t}\n\t\t};\n\t\tawait downloadChunkContentsInTree(forestTree, \"\");\n\t}\n\n\t/**\n\t * Must be called when starting a new forest summary to track it.\n\t * @param fullTree - Whether the summary is a full tree summary. If true, the summary will not contain\n\t * any summary handles. All chunks must be summarized in full.\n\t * @param incrementalSummaryContext - The context for the incremental summary that contains the sequence numbers\n\t * for the current and latest summaries.\n\t * @param stringify - Serializes content (including {@link (IFluidHandle:interface)}s) for adding to a summary blob.\n\t * @returns the behavior of the forest's incremental summary.\n\t */\n\tpublic startSummary(args: {\n\t\tfullTree: boolean;\n\t\tincrementalSummaryContext: IExperimentalIncrementalSummaryContext | undefined;\n\t\tstringify: SummaryElementStringifier;\n\t\tbuilder: SummaryTreeBuilder;\n\t}): ForestIncrementalSummaryBehavior {\n\t\tconst { fullTree, incrementalSummaryContext, stringify, builder } = args;\n\t\t// If there is no incremental summary context, do not summarize incrementally. This happens in two scenarios:\n\t\t// 1. When summarizing a detached container, i.e., the first ever summary.\n\t\t// 2. When running GC, the default behavior is to call summarize on DDS without incrementalSummaryContext.\n\t\tif (!this.enableIncrementalSummary || incrementalSummaryContext === undefined) {\n\t\t\treturn ForestIncrementalSummaryBehavior.SingleBlob;\n\t\t}\n\n\t\tvalidateReadyToTrackSummary(this.forestSummaryState, this.trackedSummaryProperties);\n\n\t\tthis.forestSummaryState = ForestSummaryTrackingState.Tracking;\n\t\tthis.latestSummarySequenceNumber = incrementalSummaryContext.latestSummarySequenceNumber;\n\t\tthis.trackedSummaryProperties = {\n\t\t\tsummarySequenceNumber: incrementalSummaryContext.summarySequenceNumber,\n\t\t\tlatestSummaryBasePath: incrementalSummaryContext.summaryPath,\n\t\t\tchunkSummaryPath: [],\n\t\t\tparentSummaryBuilder: builder,\n\t\t\tfullTree,\n\t\t\tstringify,\n\t\t};\n\t\treturn ForestIncrementalSummaryBehavior.Incremental;\n\t}\n\n\t/**\n\t * {@link IncrementalEncoder.encodeIncrementalField}\n\t * @remarks Returns an empty array if the field has no content.\n\t */\n\tpublic encodeIncrementalField(\n\t\tcursor: ITreeCursorSynchronous,\n\t\tchunkEncoder: (chunk: TreeChunk) => EncodedFieldBatch,\n\t): ChunkReferenceId[] {\n\t\t// Validate that a summary is currently being tracked and that the tracked summary properties are defined.\n\t\tvalidateTrackingSummary(this.forestSummaryState, this.trackedSummaryProperties);\n\n\t\tconst chunkReferenceIds: ChunkReferenceId[] = [];\n\t\tconst chunks = this.getChunkAtCursor(cursor);\n\t\tfor (const chunk of chunks) {\n\t\t\tlet chunkProperties: ChunkSummaryProperties;\n\n\t\t\t// Try and get the properties of the chunk from the latest successful summary.\n\t\t\t// If it exists and the summary is not a full tree, use the properties to generate a summary handle.\n\t\t\t// If it does not exist, encode the chunk and generate new properties for it.\n\t\t\tconst previousChunkProperties = tryGetFromNestedMap(\n\t\t\t\tthis.chunkTrackingPropertiesMap,\n\t\t\t\tthis.latestSummarySequenceNumber,\n\t\t\t\tchunk,\n\t\t\t);\n\t\t\tif (previousChunkProperties !== undefined && !this.trackedSummaryProperties.fullTree) {\n\t\t\t\tchunkProperties = previousChunkProperties;\n\t\t\t\tthis.trackedSummaryProperties.parentSummaryBuilder.addHandle(\n\t\t\t\t\t`${chunkProperties.referenceId}`,\n\t\t\t\t\tSummaryType.Tree,\n\t\t\t\t\t`${this.trackedSummaryProperties.latestSummaryBasePath}/${chunkProperties.summaryPath}`,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// Generate a new reference ID for the chunk.\n\t\t\t\tconst newReferenceId: ChunkReferenceId = brand(this.nextReferenceId++);\n\n\t\t\t\t// Add the reference ID of this chunk to the chunk summary path and use the path as the summary path\n\t\t\t\t// for the chunk in its summary properties.\n\t\t\t\t// This is done before encoding the chunk so that the summary path is updated correctly when encoding\n\t\t\t\t// any incremental chunks that are under this chunk.\n\t\t\t\tthis.trackedSummaryProperties.chunkSummaryPath.push(newReferenceId);\n\n\t\t\t\tchunkProperties = {\n\t\t\t\t\treferenceId: newReferenceId,\n\t\t\t\t\tsummaryPath: this.trackedSummaryProperties.chunkSummaryPath.join(\"/\"),\n\t\t\t\t};\n\n\t\t\t\tconst parentSummaryBuilder = this.trackedSummaryProperties.parentSummaryBuilder;\n\t\t\t\t// Create a new summary builder for this chunk to build its summary tree which will be stored in the\n\t\t\t\t// parent's summary tree under its reference ID.\n\t\t\t\t// Before encoding the chunk, set the parent summary builder to this chunk's summary builder so that\n\t\t\t\t// any incremental chunks in the subtree of this chunk will use that as their parent summary builder.\n\t\t\t\tconst chunkSummaryBuilder = new SummaryTreeBuilder();\n\t\t\t\tthis.trackedSummaryProperties.parentSummaryBuilder = chunkSummaryBuilder;\n\t\t\t\tchunkSummaryBuilder.addBlob(\n\t\t\t\t\tsummaryContentBlobKey,\n\t\t\t\t\tthis.trackedSummaryProperties.stringify(chunkEncoder(chunk)),\n\t\t\t\t);\n\n\t\t\t\t// Add this chunk's summary tree to the parent's summary tree. The summary tree contains its encoded\n\t\t\t\t// contents and the summary trees of any incremental chunks under it.\n\t\t\t\tparentSummaryBuilder.addWithStats(\n\t\t\t\t\t`${newReferenceId}`,\n\t\t\t\t\tchunkSummaryBuilder.getSummaryTree(),\n\t\t\t\t);\n\n\t\t\t\t// Restore the parent summary builder and chunk summary path.\n\t\t\t\tthis.trackedSummaryProperties.parentSummaryBuilder = parentSummaryBuilder;\n\t\t\t\tthis.trackedSummaryProperties.chunkSummaryPath.pop();\n\t\t\t}\n\n\t\t\tsetInNestedMap(\n\t\t\t\tthis.chunkTrackingPropertiesMap,\n\t\t\t\tthis.trackedSummaryProperties.summarySequenceNumber,\n\t\t\t\tchunk,\n\t\t\t\tchunkProperties,\n\t\t\t);\n\t\t\tchunkReferenceIds.push(chunkProperties.referenceId);\n\t\t}\n\t\treturn chunkReferenceIds;\n\t}\n\n\t/**\n\t * Must be called after summary generation is complete to finish tracking the summary.\n\t * It clears any tracking state and deletes the tracking properties for summaries that are older than the\n\t * latest successful summary.\n\t * @param incrementalSummaryContext - The context for the incremental summary that contains the sequence numbers.\n\t * If this is undefined, the summary tree will only contain a summary blob for `forestSummaryRootContent`.\n\t * @param forestSummaryRootContent - The stringified ForestCodec output of top-level Forest content.\n\t * @param forestSummaryRootContentKey - The key to use for the blob containing `forestSummaryRootContent`.\n\t * @param builder - The summary tree builder to use to add the forest's contents. Note that if tracking an incremental\n\t * summary, this builder will be the same as the one tracked in `trackedSummaryProperties`.\n\t * @returns the Forest's summary tree.\n\t */\n\tpublic completeSummary(args: {\n\t\tincrementalSummaryContext: IExperimentalIncrementalSummaryContext | undefined;\n\t\tforestSummaryRootContent: string;\n\t\tforestSummaryRootContentKey: string;\n\t\tbuilder: SummaryTreeBuilder;\n\t}): void {\n\t\tconst {\n\t\t\tincrementalSummaryContext,\n\t\t\tforestSummaryRootContent,\n\t\t\tforestSummaryRootContentKey,\n\t\t\tbuilder,\n\t\t} = args;\n\t\tif (!this.enableIncrementalSummary || incrementalSummaryContext === undefined) {\n\t\t\tbuilder.addBlob(forestSummaryRootContentKey, forestSummaryRootContent);\n\t\t\treturn;\n\t\t}\n\n\t\tvalidateTrackingSummary(this.forestSummaryState, this.trackedSummaryProperties);\n\n\t\tbuilder.addBlob(forestSummaryRootContentKey, forestSummaryRootContent);\n\n\t\t// Copy over the entries from the latest summary to the current summary.\n\t\t// In the current summary, there can be fields that haven't changed since the latest summary and the chunks\n\t\t// in these fields and in any of its children weren't encoded. So, we need get the entries for these chunks\n\t\t// to be able to incrementally summarize them in the next summary.\n\t\tconst latestSummaryTrackingMap = this.chunkTrackingPropertiesMap.get(\n\t\t\tthis.latestSummarySequenceNumber,\n\t\t);\n\t\tconst currentSummaryTrackingMap = this.chunkTrackingPropertiesMap.get(\n\t\t\tthis.trackedSummaryProperties.summarySequenceNumber,\n\t\t);\n\t\tif (latestSummaryTrackingMap !== undefined && currentSummaryTrackingMap !== undefined) {\n\t\t\tfor (const [chunk, chunkProperties] of latestSummaryTrackingMap.entries()) {\n\t\t\t\tif (!currentSummaryTrackingMap.has(chunk)) {\n\t\t\t\t\tcurrentSummaryTrackingMap.set(chunk, chunkProperties);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Delete tracking for summaries that are older than the latest successful summary because they will\n\t\t// never be referenced again for generating summary handles.\n\t\tfor (const sequenceNumber of this.chunkTrackingPropertiesMap.keys()) {\n\t\t\tif (sequenceNumber < this.latestSummarySequenceNumber) {\n\t\t\t\tthis.chunkTrackingPropertiesMap.delete(sequenceNumber);\n\t\t\t}\n\t\t}\n\n\t\tthis.forestSummaryState = ForestSummaryTrackingState.ReadyToTrack;\n\t\tthis.trackedSummaryProperties = undefined;\n\t}\n\n\t/**\n\t * {@link IncrementalEncoder.decodeIncrementalChunk}\n\t */\n\tpublic decodeIncrementalChunk(\n\t\treferenceId: ChunkReferenceId,\n\t\tchunkDecoder: (encoded: EncodedFieldBatch) => TreeChunk,\n\t): TreeChunk {\n\t\tconst ChunkLoadProperties = this.loadedChunksMap.get(`${referenceId}`);\n\t\tassert(ChunkLoadProperties !== undefined, 0xc86 /* Encoded incremental chunk not found */);\n\t\tconst chunk = chunkDecoder(ChunkLoadProperties.encodedContents);\n\n\t\t// Account for the reference about to be added in `chunkTrackingPropertiesMap`\n\t\t// to ensure that no other users of this chunk think they have unique ownership.\n\t\t// This prevents prevent whoever this chunk is returned to from modifying it in-place.\n\t\tchunk.referenceAdded();\n\t\t// Track the decoded chunk. This will recreate the tracking state when the summary that this client\n\t\t// is loaded from was generated. This is needed to ensure that incremental summaries work correctly\n\t\t// when a new client starts to summarize.\n\t\tsetInNestedMap(this.chunkTrackingPropertiesMap, this.initialSequenceNumber, chunk, {\n\t\t\treferenceId,\n\t\t\tsummaryPath: ChunkLoadProperties.summaryPath,\n\t\t});\n\t\treturn chunk;\n\t}\n}\n"]}
1
+ {"version":3,"file":"incrementalSummaryBuilder.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AAGjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AAIxE,OAAO,EACN,KAAK,EACL,cAAc,EACd,mBAAmB,GAGnB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACzC,4CAA4C;IAC5C,QAAQ,EAAE,UAAU;IACpB,wCAAwC;IACxC,YAAY,EAAE,cAAc;CACnB,CAAC;AAoFX;;GAEG;AACH,MAAM,CAAN,IAAY,gCAgBX;AAhBD,WAAY,gCAAgC;IAC3C;;;;OAIG;IACH,qGAAW,CAAA;IACX;;;;;;;OAOG;IACH,mGAAU,CAAA;AACX,CAAC,EAhBW,gCAAgC,KAAhC,gCAAgC,QAgB3C;AAED;;;;GAIG;AACH,SAAS,uBAAuB,CAC/B,kB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Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\nimport type { ISnapshotTree } from \"@fluidframework/driver-definitions/internal\";\nimport type { IExperimentalIncrementalSummaryContext } from \"@fluidframework/runtime-definitions/internal\";\nimport { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\nimport { LoggingError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { ITreeCursorSynchronous } from \"../../core/index.js\";\nimport type { SummaryElementStringifier } from \"../../shared-tree-core/index.js\";\nimport {\n\tbrand,\n\tsetInNestedMap,\n\ttryGetFromNestedMap,\n\ttype JsonCompatible,\n\ttype NestedMap,\n} from \"../../util/index.js\";\nimport type {\n\tChunkReferenceId,\n\tEncodedFieldBatch,\n\tIncrementalEncoderDecoder,\n\tIncrementalEncodingPolicy,\n\tTreeChunk,\n} from \"../chunked-forest/index.js\";\n\nimport { summaryContentBlobKey } from \"./summaryFormatV3.js\";\n\n/**\n * State that tells whether a summary is currently being tracked.\n */\nexport const ForestSummaryTrackingState = {\n\t/** A summary is currently being tracked. */\n\tTracking: \"Tracking\",\n\t/** A summary is ready to be tracked. */\n\tReadyToTrack: \"ReadyToTrack\",\n} as const;\nexport type ForestSummaryTrackingState =\n\t(typeof ForestSummaryTrackingState)[keyof typeof ForestSummaryTrackingState];\n\n/**\n * The properties of a chunk tracked during the loading process.\n * These are used to identify a chunk when it is decoded and recreate the tracking state\n * as it was when the summary that the client is loading from was generated.\n *\n * An encoded chunk, paired with a location it can be reused / reloaded from.\n * @remarks\n * This identifies a location in a specific summary where `encodedContents` was loaded from.\n *\n * When summarizing, Fluid always ensures the summary that the summary client is allowed to reuse content from\n * is the one it loaded from, so tracking this on load is sufficient for now:\n * there is no need to track the equivalent data when summarizing.\n */\ninterface ChunkLoadProperties {\n\t/**\n\t * The encoded contents of the chunk.\n\t */\n\treadonly encodedContents: EncodedFieldBatch;\n\t/**\n\t * The path for this chunk's contents in the summary tree relative to the forest's summary tree.\n\t * This path is used to generate a summary handle for the chunk if it doesn't change between summaries.\n\t */\n\treadonly summaryPath: string;\n}\n\n/**\n * The properties of a chunk that is tracked for every summary.\n * If a chunk doesn't change between summaries,\n * these properties will be used to generate a summary handle for the chunk.\n */\ninterface ChunkSummaryProperties {\n\t/**\n\t * The reference ID of the chunk which uniquely identifies it under its parent's summary tree.\n\t * The summary for this chunk will be stored against this reference ID as key in the summary tree.\n\t */\n\treadonly referenceId: ChunkReferenceId;\n\t/**\n\t * The path for this chunk's summary in the summary tree relative to the forest's summary tree.\n\t * This path is used to generate a summary handle for the chunk if it doesn't change between summaries.\n\t */\n\treadonly summaryPath: string;\n}\n\n/**\n * The properties of a summary being tracked.\n */\ninterface TrackedSummaryProperties {\n\t/**\n\t * The sequence number of the summary in progress.\n\t */\n\treadonly summarySequenceNumber: number;\n\t/**\n\t * The base path for the latest summary that was successful.\n\t * This is used to generate summary handles.\n\t */\n\treadonly latestSummaryBasePath: string;\n\t/**\n\t * Whether the summary being tracked is a full tree summary.\n\t * If true, the summary will not contain any summary handles. All chunks must be summarized in full.\n\t */\n\treadonly fullTree: boolean;\n\t/**\n\t * Represents the path of a chunk in the summary tree relative to the forest's summary tree.\n\t * Each item in the array is the {@link ChunkReferenceId} of a chunk in the summary tree starting\n\t * from the chunk under forest summary tree.\n\t * When a chunk is summarized, this array will be used to generate the path for the chunk's summary in the\n\t * summary tree.\n\t */\n\treadonly chunkSummaryPath: ChunkReferenceId[];\n\t/**\n\t * The parent summary builder to use to build the incremental summary tree.\n\t * When a chunk is being summarized, it will add its summary to this builder against its reference ID.\n\t */\n\tparentSummaryBuilder: SummaryTreeBuilder;\n\t/**\n\t * Serializes content (including {@link (IFluidHandle:interface)}s) for adding to a summary blob.\n\t */\n\tstringify: SummaryElementStringifier;\n}\n\n/**\n * The behavior of the forest's incremental summary - whether the summary should be a single blob or incremental.\n */\nexport enum ForestIncrementalSummaryBehavior {\n\t/**\n\t * The forest can encode chunks incrementally, i.e., chunks that support incremental encoding will be encoded\n\t * separately - they will be added to a separate tree.\n\t * The incremental summary format is described in {@link ForestIncrementalSummaryBuilder}.\n\t */\n\tIncremental,\n\t/**\n\t * The forest should encode all of it's data in a single summary blob.\n\t * @remarks\n\t * The format of the summary will be the same as the old format (pre-incremental summaries) and is fully\n\t * backwards compatible with the old format. The summary will basically look like an incremental summary\n\t * with no incremental fields - it will only contain the \"ForestTree\" blob in the summary format described\n\t * in {@link ForestIncrementalSummaryBuilder}.\n\t */\n\tSingleBlob,\n}\n\n/**\n * Validates that a summary is currently being tracked and that the tracked summary properties are defined.\n * @param forestSummaryState - The current state of the forest summary tracking.\n * @param trackedSummaryProperties - The properties of the tracked summary, which must be available.\n */\nfunction validateTrackingSummary(\n\tforestSummaryState: ForestSummaryTrackingState,\n\ttrackedSummaryProperties: TrackedSummaryProperties | undefined,\n): asserts trackedSummaryProperties is TrackedSummaryProperties {\n\tassert(\n\t\tforestSummaryState === ForestSummaryTrackingState.Tracking,\n\t\t0xc22 /* Not tracking a summary */,\n\t);\n\tassert(\n\t\ttrackedSummaryProperties !== undefined,\n\t\t0xc23 /* Tracked summary properties must be available when tracking a summary */,\n\t);\n}\n\n/**\n * Validates that a summary is ready to be tracked and that the tracked summary properties are undefined.\n * @param forestSummaryState - The current state of the forest summary tracking.\n * @param trackedSummaryProperties - The properties of the tracked summary, which must be undefined.\n */\nfunction validateReadyToTrackSummary(\n\tforestSummaryState: ForestSummaryTrackingState,\n\ttrackedSummaryProperties: TrackedSummaryProperties | undefined,\n): asserts trackedSummaryProperties is undefined {\n\tassert(\n\t\tforestSummaryState === ForestSummaryTrackingState.ReadyToTrack,\n\t\t0xc24 /* Already tracking a summary */,\n\t);\n\tassert(\n\t\ttrackedSummaryProperties === undefined,\n\t\t0xc25 /* Tracked summary properties must not be available when ready to track */,\n\t);\n}\n\n/* eslint-disable jsdoc/check-indentation */\n/**\n * Tracks and builds the incremental summary tree for a forest where chunks that support incremental encoding are\n * stored in a separate tree in the summary under its {@link ChunkReferenceId}.\n * The summary tree for a chunk is self-sufficient and can be independently loaded and used to reconstruct the\n * chunk's contents without any additional context from its parent.\n *\n * An example summary tree with incremental summary:\n * Forest\n * ├── contents\n * ├── 0\n * | ├── contents\n * | ├── 1\n * | | ├── contents\n * | | ├── 2\n * | | | ├── contents\n * | ├── 3 - \".../Forest/ForestTree/0/1/3\"\n * ├── 4\n * | ├── contents\n * | ├── ...\n * ├── 5 - \"/.../Forest/ForestTree/5\"\n * - Forest is a summary tree node added by the shared tree and contains the following:\n * - The inline portion of the top-level forest content is stored in a summary blob called \"contents\".\n * It also contains the {@link ChunkReferenceId}s of the incremental chunks under it.\n * - The summary for each incremental chunk under it is stored against its {@link ChunkReferenceId}.\n * - For each chunk, the structure of the summary tree is the same as the Forest. It contains the following:\n * - The inline portion of the chunk content is stored in a blob called \"contents\".\n * It also contains the {@link ChunkReferenceId}s of the incremental chunks under it.\n * - The summary for each incremental chunk under it is stored against its {@link ChunkReferenceId}.\n * - Chunks that do not change between summaries are summarized as handles in the summary tree.\n *\n * TODO: AB#46752\n * Add strong types for the summary structure to document it better. It will help make it super clear what the actual\n * format is in a way that can easily be linked to, documented and inspected.\n */\n/* eslint-enable jsdoc/check-indentation */\nexport class ForestIncrementalSummaryBuilder implements IncrementalEncoderDecoder {\n\t/**\n\t * The next reference ID to use for a chunk.\n\t */\n\tprivate nextReferenceId: ChunkReferenceId = brand(0);\n\n\t/**\n\t * For a given summary sequence number, keeps track of a chunk's properties that will be used to generate\n\t * a summary handle for the chunk if it does not change between summaries.\n\t */\n\tprivate readonly chunkTrackingPropertiesMap: NestedMap<\n\t\tnumber,\n\t\tTreeChunk,\n\t\tChunkSummaryProperties\n\t> = new Map();\n\n\t/**\n\t * The state indicating whether a summary is currently being tracked or not.\n\t */\n\tpublic forestSummaryState: ForestSummaryTrackingState =\n\t\tForestSummaryTrackingState.ReadyToTrack;\n\n\t/**\n\t * The sequence number of the latest summary that was successful.\n\t */\n\tprivate latestSummarySequenceNumber: number = -1;\n\n\t/**\n\t * The current state of the summary being tracked.\n\t * This is undefined if no summary is currently being tracked.\n\t */\n\tprivate trackedSummaryProperties: TrackedSummaryProperties | undefined;\n\n\t/**\n\t * A map of chunk reference IDs to their encoded contents. This is typically used during the loading of the\n\t * forest to retrieve the contents of the chunks that were summarized incrementally.\n\t */\n\t/**\n\t * A map of chunk reference IDs to their {@link ChunkLoadProperties}.\n\t * This is used during the loading of the forest to track each chunk that is retrieved and decoded.\n\t */\n\tprivate readonly loadedChunksMap: Map<string, ChunkLoadProperties> = new Map();\n\n\tpublic constructor(\n\t\tprivate readonly enableIncrementalSummary: boolean,\n\t\tprivate readonly getChunkAtCursor: (cursor: ITreeCursorSynchronous) => TreeChunk[],\n\t\tpublic readonly shouldEncodeIncrementally: IncrementalEncodingPolicy,\n\t\tprivate readonly initialSequenceNumber: number,\n\t) {}\n\n\t/**\n\t * Must be called when the forest is loaded to download the encoded contents of incremental chunks.\n\t * @param services - The channel storage service to use to access the snapshot tree and download the\n\t * contents of the chunks.\n\t * @param readAndParse - A function that reads and parses a blob from the storage service.\n\t */\n\tpublic async load(args: {\n\t\tservices: IChannelStorageService;\n\t\treadAndParseChunk: <T extends JsonCompatible<IFluidHandle>>(\n\t\t\tchunkBlobPath: string,\n\t\t) => Promise<T>;\n\t}): Promise<void> {\n\t\tconst forestTree = args.services.getSnapshotTree?.();\n\t\t// Snapshot tree should be available when loading forest's contents. However, it is an optional function\n\t\t// and may not be implemented by the storage service.\n\t\tif (forestTree === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Downloads the contents of incremental chunks in the given snapshot tree. Also, recursively downloads\n\t\t// the contents of incremental chunks in any sub-trees.\n\t\tconst downloadChunkContentsInTree = async (\n\t\t\tsnapshotTree: ISnapshotTree,\n\t\t\tparentTreeKey: string,\n\t\t): Promise<void> => {\n\t\t\t// All trees in the snapshot tree are for incremental chunks. The key is the chunk's reference ID\n\t\t\t// and the value is the snapshot tree for the chunk.\n\t\t\tfor (const [chunkReferenceId, chunkSnapshotTree] of Object.entries(snapshotTree.trees)) {\n\t\t\t\tconst chunkSubTreePath = `${parentTreeKey}${chunkReferenceId}`;\n\t\t\t\tconst chunkContentsPath = `${chunkSubTreePath}/${summaryContentBlobKey}`;\n\t\t\t\tif (!(await args.services.contains(chunkContentsPath))) {\n\t\t\t\t\tthrow new LoggingError(\n\t\t\t\t\t\t`SharedTree: Cannot find contents for incremental chunk ${chunkContentsPath}`,\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tconst chunkContents =\n\t\t\t\t\tawait args.readAndParseChunk<EncodedFieldBatch>(chunkContentsPath);\n\t\t\t\tthis.loadedChunksMap.set(chunkReferenceId, {\n\t\t\t\t\tencodedContents: chunkContents,\n\t\t\t\t\tsummaryPath: chunkSubTreePath,\n\t\t\t\t});\n\n\t\t\t\tconst chunkReferenceIdNumber = Number(chunkReferenceId);\n\t\t\t\tthis.nextReferenceId = brand(\n\t\t\t\t\tMath.max(this.nextReferenceId, chunkReferenceIdNumber + 1),\n\t\t\t\t);\n\n\t\t\t\t// Recursively download the contents of chunks in this chunk's sub tree.\n\t\t\t\tawait downloadChunkContentsInTree(chunkSnapshotTree, `${chunkSubTreePath}/`);\n\t\t\t}\n\t\t};\n\t\tawait downloadChunkContentsInTree(forestTree, \"\");\n\t}\n\n\t/**\n\t * Must be called when starting a new forest summary to track it.\n\t * @param fullTree - Whether the summary is a full tree summary. If true, the summary will not contain\n\t * any summary handles. All chunks must be summarized in full.\n\t * @param incrementalSummaryContext - The context for the incremental summary that contains the sequence numbers\n\t * for the current and latest summaries.\n\t * @param stringify - Serializes content (including {@link (IFluidHandle:interface)}s) for adding to a summary blob.\n\t * @returns the behavior of the forest's incremental summary.\n\t */\n\tpublic startSummary(args: {\n\t\tfullTree: boolean;\n\t\tincrementalSummaryContext: IExperimentalIncrementalSummaryContext | undefined;\n\t\tstringify: SummaryElementStringifier;\n\t\tbuilder: SummaryTreeBuilder;\n\t}): ForestIncrementalSummaryBehavior {\n\t\tconst { fullTree, incrementalSummaryContext, stringify, builder } = args;\n\t\t// If there is no incremental summary context, do not summarize incrementally. This happens in two scenarios:\n\t\t// 1. When summarizing a detached container, i.e., the first ever summary.\n\t\t// 2. When running GC, the default behavior is to call summarize on DDS without incrementalSummaryContext.\n\t\tif (!this.enableIncrementalSummary || incrementalSummaryContext === undefined) {\n\t\t\treturn ForestIncrementalSummaryBehavior.SingleBlob;\n\t\t}\n\n\t\tvalidateReadyToTrackSummary(this.forestSummaryState, this.trackedSummaryProperties);\n\n\t\tthis.forestSummaryState = ForestSummaryTrackingState.Tracking;\n\t\tthis.latestSummarySequenceNumber = incrementalSummaryContext.latestSummarySequenceNumber;\n\t\tthis.trackedSummaryProperties = {\n\t\t\tsummarySequenceNumber: incrementalSummaryContext.summarySequenceNumber,\n\t\t\tlatestSummaryBasePath: incrementalSummaryContext.summaryPath,\n\t\t\tchunkSummaryPath: [],\n\t\t\tparentSummaryBuilder: builder,\n\t\t\tfullTree,\n\t\t\tstringify,\n\t\t};\n\t\treturn ForestIncrementalSummaryBehavior.Incremental;\n\t}\n\n\t/**\n\t * {@link IncrementalEncoder.encodeIncrementalField}\n\t * @remarks Returns an empty array if the field has no content.\n\t */\n\tpublic encodeIncrementalField(\n\t\tcursor: ITreeCursorSynchronous,\n\t\tchunkEncoder: (chunk: TreeChunk) => EncodedFieldBatch,\n\t): ChunkReferenceId[] {\n\t\t// Validate that a summary is currently being tracked and that the tracked summary properties are defined.\n\t\tvalidateTrackingSummary(this.forestSummaryState, this.trackedSummaryProperties);\n\n\t\tconst chunkReferenceIds: ChunkReferenceId[] = [];\n\t\tconst chunks = this.getChunkAtCursor(cursor);\n\t\tfor (const chunk of chunks) {\n\t\t\tlet chunkProperties: ChunkSummaryProperties;\n\n\t\t\t// Try and get the properties of the chunk from the latest successful summary.\n\t\t\t// If it exists and the summary is not a full tree, use the properties to generate a summary handle.\n\t\t\t// If it does not exist, encode the chunk and generate new properties for it.\n\t\t\tconst previousChunkProperties = tryGetFromNestedMap(\n\t\t\t\tthis.chunkTrackingPropertiesMap,\n\t\t\t\tthis.latestSummarySequenceNumber,\n\t\t\t\tchunk,\n\t\t\t);\n\t\t\tif (previousChunkProperties !== undefined && !this.trackedSummaryProperties.fullTree) {\n\t\t\t\tchunkProperties = previousChunkProperties;\n\t\t\t\tthis.trackedSummaryProperties.parentSummaryBuilder.addHandle(\n\t\t\t\t\t`${chunkProperties.referenceId}`,\n\t\t\t\t\tSummaryType.Tree,\n\t\t\t\t\t`${this.trackedSummaryProperties.latestSummaryBasePath}/${chunkProperties.summaryPath}`,\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\t// Generate a new reference ID for the chunk.\n\t\t\t\tconst newReferenceId: ChunkReferenceId = brand(this.nextReferenceId++);\n\n\t\t\t\t// Add the reference ID of this chunk to the chunk summary path and use the path as the summary path\n\t\t\t\t// for the chunk in its summary properties.\n\t\t\t\t// This is done before encoding the chunk so that the summary path is updated correctly when encoding\n\t\t\t\t// any incremental chunks that are under this chunk.\n\t\t\t\tthis.trackedSummaryProperties.chunkSummaryPath.push(newReferenceId);\n\n\t\t\t\tchunkProperties = {\n\t\t\t\t\treferenceId: newReferenceId,\n\t\t\t\t\tsummaryPath: this.trackedSummaryProperties.chunkSummaryPath.join(\"/\"),\n\t\t\t\t};\n\n\t\t\t\tconst parentSummaryBuilder = this.trackedSummaryProperties.parentSummaryBuilder;\n\t\t\t\t// Create a new summary builder for this chunk to build its summary tree which will be stored in the\n\t\t\t\t// parent's summary tree under its reference ID.\n\t\t\t\t// Before encoding the chunk, set the parent summary builder to this chunk's summary builder so that\n\t\t\t\t// any incremental chunks in the subtree of this chunk will use that as their parent summary builder.\n\t\t\t\tconst chunkSummaryBuilder = new SummaryTreeBuilder();\n\t\t\t\tthis.trackedSummaryProperties.parentSummaryBuilder = chunkSummaryBuilder;\n\t\t\t\tchunkSummaryBuilder.addBlob(\n\t\t\t\t\tsummaryContentBlobKey,\n\t\t\t\t\tthis.trackedSummaryProperties.stringify(chunkEncoder(chunk)),\n\t\t\t\t);\n\n\t\t\t\t// Add this chunk's summary tree to the parent's summary tree. The summary tree contains its encoded\n\t\t\t\t// contents and the summary trees of any incremental chunks under it.\n\t\t\t\tparentSummaryBuilder.addWithStats(\n\t\t\t\t\t`${newReferenceId}`,\n\t\t\t\t\tchunkSummaryBuilder.getSummaryTree(),\n\t\t\t\t);\n\n\t\t\t\t// Restore the parent summary builder and chunk summary path.\n\t\t\t\tthis.trackedSummaryProperties.parentSummaryBuilder = parentSummaryBuilder;\n\t\t\t\tthis.trackedSummaryProperties.chunkSummaryPath.pop();\n\t\t\t}\n\n\t\t\tsetInNestedMap(\n\t\t\t\tthis.chunkTrackingPropertiesMap,\n\t\t\t\tthis.trackedSummaryProperties.summarySequenceNumber,\n\t\t\t\tchunk,\n\t\t\t\tchunkProperties,\n\t\t\t);\n\t\t\tchunkReferenceIds.push(chunkProperties.referenceId);\n\t\t}\n\t\treturn chunkReferenceIds;\n\t}\n\n\t/**\n\t * Must be called after summary generation is complete to finish tracking the summary.\n\t * It clears any tracking state and deletes the tracking properties for summaries that are older than the\n\t * latest successful summary.\n\t * @param incrementalSummaryContext - The context for the incremental summary that contains the sequence numbers.\n\t * If this is undefined, the summary tree will only contain a summary blob for `forestSummaryRootContent`.\n\t * @param forestSummaryRootContent - The stringified ForestCodec output of top-level Forest content.\n\t * @param forestSummaryRootContentKey - The key to use for the blob containing `forestSummaryRootContent`.\n\t * @param builder - The summary tree builder to use to add the forest's contents. Note that if tracking an incremental\n\t * summary, this builder will be the same as the one tracked in `trackedSummaryProperties`.\n\t * @returns the Forest's summary tree.\n\t */\n\tpublic completeSummary(args: {\n\t\tincrementalSummaryContext: IExperimentalIncrementalSummaryContext | undefined;\n\t\tforestSummaryRootContent: string;\n\t\tforestSummaryRootContentKey: string;\n\t\tbuilder: SummaryTreeBuilder;\n\t}): void {\n\t\tconst {\n\t\t\tincrementalSummaryContext,\n\t\t\tforestSummaryRootContent,\n\t\t\tforestSummaryRootContentKey,\n\t\t\tbuilder,\n\t\t} = args;\n\t\tif (!this.enableIncrementalSummary || incrementalSummaryContext === undefined) {\n\t\t\tbuilder.addBlob(forestSummaryRootContentKey, forestSummaryRootContent);\n\t\t\treturn;\n\t\t}\n\n\t\tvalidateTrackingSummary(this.forestSummaryState, this.trackedSummaryProperties);\n\n\t\tbuilder.addBlob(forestSummaryRootContentKey, forestSummaryRootContent);\n\n\t\t// Copy over the entries from the latest summary to the current summary.\n\t\t// In the current summary, there can be fields that haven't changed since the latest summary and the chunks\n\t\t// in these fields and in any of its children weren't encoded. So, we need get the entries for these chunks\n\t\t// to be able to incrementally summarize them in the next summary.\n\t\tconst latestSummaryTrackingMap = this.chunkTrackingPropertiesMap.get(\n\t\t\tthis.latestSummarySequenceNumber,\n\t\t);\n\t\tconst currentSummaryTrackingMap = this.chunkTrackingPropertiesMap.get(\n\t\t\tthis.trackedSummaryProperties.summarySequenceNumber,\n\t\t);\n\t\tif (latestSummaryTrackingMap !== undefined && currentSummaryTrackingMap !== undefined) {\n\t\t\tfor (const [chunk, chunkProperties] of latestSummaryTrackingMap.entries()) {\n\t\t\t\tif (!currentSummaryTrackingMap.has(chunk)) {\n\t\t\t\t\tcurrentSummaryTrackingMap.set(chunk, chunkProperties);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Delete tracking for summaries that are older than the latest successful summary because they will\n\t\t// never be referenced again for generating summary handles.\n\t\tfor (const sequenceNumber of this.chunkTrackingPropertiesMap.keys()) {\n\t\t\tif (sequenceNumber < this.latestSummarySequenceNumber) {\n\t\t\t\tthis.chunkTrackingPropertiesMap.delete(sequenceNumber);\n\t\t\t}\n\t\t}\n\n\t\tthis.forestSummaryState = ForestSummaryTrackingState.ReadyToTrack;\n\t\tthis.trackedSummaryProperties = undefined;\n\t}\n\n\t/**\n\t * {@link IncrementalEncoder.decodeIncrementalChunk}\n\t */\n\tpublic decodeIncrementalChunk(\n\t\treferenceId: ChunkReferenceId,\n\t\tchunkDecoder: (encoded: EncodedFieldBatch) => TreeChunk,\n\t): TreeChunk {\n\t\tconst ChunkLoadProperties = this.loadedChunksMap.get(`${referenceId}`);\n\t\tassert(ChunkLoadProperties !== undefined, 0xc86 /* Encoded incremental chunk not found */);\n\t\tconst chunk = chunkDecoder(ChunkLoadProperties.encodedContents);\n\n\t\t// Account for the reference about to be added in `chunkTrackingPropertiesMap`\n\t\t// to ensure that no other users of this chunk think they have unique ownership.\n\t\t// This prevents prevent whoever this chunk is returned to from modifying it in-place.\n\t\tchunk.referenceAdded();\n\t\t// Track the decoded chunk. This will recreate the tracking state when the summary that this client\n\t\t// is loaded from was generated. This is needed to ensure that incremental summaries work correctly\n\t\t// when a new client starts to summarize.\n\t\tsetInNestedMap(this.chunkTrackingPropertiesMap, this.initialSequenceNumber, chunk, {\n\t\t\treferenceId,\n\t\t\tsummaryPath: ChunkLoadProperties.summaryPath,\n\t\t});\n\t\treturn chunk;\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"summaryTypes.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/summaryTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAO5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAItE;;GAEG;AACH,wBAAgB,sCAAsC,CACrD,OAAO,EAAE,uBAAuB,GAC9B,0BAA0B,CAK5B;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC7C,oBAAoB,EAAE,0BAA0B,GAAG,SAAS,GAC1D,MAAM,CAKR"}
1
+ {"version":3,"file":"summaryTypes.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/summaryTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAQ5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAItE;;GAEG;AACH,wBAAgB,sCAAsC,CACrD,OAAO,EAAE,uBAAuB,GAC9B,0BAA0B,CAK5B;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC7C,oBAAoB,EAAE,0BAA0B,GAAG,SAAS,GAC1D,MAAM,CAKR"}
@@ -1 +1 @@
1
- {"version":3,"file":"summaryTypes.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/summaryTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,+BAA+B,EAC/B,yBAAyB,GACzB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,qBAAqB,IAAI,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,qBAAqB,IAAI,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAExF;;GAEG;AACH,MAAM,UAAU,sCAAsC,CACrD,OAAgC;IAEhC,OAAO,+BAA+B,CAAC,OAAO,EAAE;QAC/C,CAAC,yBAAyB,CAAC,EAAE,0BAA0B,CAAC,EAAE;QAC1D,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,0BAA0B,CAAC,EAAE;KACzD,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAC7C,oBAA4D;IAE5D,OAAO,oBAAoB,KAAK,SAAS;QACxC,oBAAoB,GAAG,0BAA0B,CAAC,EAAE;QACpD,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,uBAAuB,CAAC;AAC5B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tgetConfigForMinVersionForCollab,\n\tlowestMinVersionForCollab,\n} from \"@fluidframework/runtime-utils/internal\";\n\nimport { FluidClientVersion } from \"../../codec/index.js\";\nimport { ForestSummaryFormatVersion } from \"./summaryFormatCommon.js\";\nimport { summaryContentBlobKey as summaryContentBlobKeyV1ToV2 } from \"./summaryFormatV1ToV2.js\";\nimport { summaryContentBlobKey as summaryContentBlobKeyV3 } from \"./summaryFormatV3.js\";\n\n/**\n * Returns the summary format version to use as per the given minimum version for collab.\n */\nexport function minVersionToForestSummaryFormatVersion(\n\tversion: MinimumVersionForCollab,\n): ForestSummaryFormatVersion {\n\treturn getConfigForMinVersionForCollab(version, {\n\t\t[lowestMinVersionForCollab]: ForestSummaryFormatVersion.v2,\n\t\t[FluidClientVersion.v2_74]: ForestSummaryFormatVersion.v3,\n\t});\n}\n\n/**\n * Gets the key for the blob containing the forest summary root content based on the summary format version.\n * @param summaryFormatVersion - The version of the forest summary format.\n * @returns The key for the forest summary root content blob.\n */\nexport function getForestRootSummaryContentKey(\n\tsummaryFormatVersion: ForestSummaryFormatVersion | undefined,\n): string {\n\treturn summaryFormatVersion === undefined ||\n\t\tsummaryFormatVersion < ForestSummaryFormatVersion.v3\n\t\t? summaryContentBlobKeyV1ToV2\n\t\t: summaryContentBlobKeyV3;\n}\n"]}
1
+ {"version":3,"file":"summaryTypes.js","sourceRoot":"","sources":["../../../src/feature-libraries/forest-summary/summaryTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,+BAA+B,EAC/B,yBAAyB,GACzB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,qBAAqB,IAAI,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,qBAAqB,IAAI,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAExF;;GAEG;AACH,MAAM,UAAU,sCAAsC,CACrD,OAAgC;IAEhC,OAAO,+BAA+B,CAAC,OAAO,EAAE;QAC/C,CAAC,yBAAyB,CAAC,EAAE,0BAA0B,CAAC,EAAE;QAC1D,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,0BAA0B,CAAC,EAAE;KACzD,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,8BAA8B,CAC7C,oBAA4D;IAE5D,OAAO,oBAAoB,KAAK,SAAS;QACxC,oBAAoB,GAAG,0BAA0B,CAAC,EAAE;QACpD,CAAC,CAAC,2BAA2B;QAC7B,CAAC,CAAC,uBAAuB,CAAC;AAC5B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tgetConfigForMinVersionForCollab,\n\tlowestMinVersionForCollab,\n} from \"@fluidframework/runtime-utils/internal\";\n\nimport { FluidClientVersion } from \"../../codec/index.js\";\n\nimport { ForestSummaryFormatVersion } from \"./summaryFormatCommon.js\";\nimport { summaryContentBlobKey as summaryContentBlobKeyV1ToV2 } from \"./summaryFormatV1ToV2.js\";\nimport { summaryContentBlobKey as summaryContentBlobKeyV3 } from \"./summaryFormatV3.js\";\n\n/**\n * Returns the summary format version to use as per the given minimum version for collab.\n */\nexport function minVersionToForestSummaryFormatVersion(\n\tversion: MinimumVersionForCollab,\n): ForestSummaryFormatVersion {\n\treturn getConfigForMinVersionForCollab(version, {\n\t\t[lowestMinVersionForCollab]: ForestSummaryFormatVersion.v2,\n\t\t[FluidClientVersion.v2_74]: ForestSummaryFormatVersion.v3,\n\t});\n}\n\n/**\n * Gets the key for the blob containing the forest summary root content based on the summary format version.\n * @param summaryFormatVersion - The version of the forest summary format.\n * @returns The key for the forest summary root content blob.\n */\nexport function getForestRootSummaryContentKey(\n\tsummaryFormatVersion: ForestSummaryFormatVersion | undefined,\n): string {\n\treturn summaryFormatVersion === undefined ||\n\t\tsummaryFormatVersion < ForestSummaryFormatVersion.v3\n\t\t? summaryContentBlobKeyV1ToV2\n\t\t: summaryContentBlobKeyV3;\n}\n"]}
@@ -12,11 +12,11 @@ export { stackTreeNodeCursor, type CursorAdapter, prefixPath, prefixFieldPath, t
12
12
  export { cursorForJsonableTreeNode, cursorForJsonableTreeField, jsonableTreeFromCursor, jsonableTreeFromFieldCursor, jsonableTreeFromForest, } from "./treeTextCursor.js";
13
13
  import * as SequenceField from "./sequence-field/index.js";
14
14
  export { SequenceField };
15
- export { isNeverField, ModularEditBuilder, type FieldEditDescription as EditDescription, type FieldChangeHandler, type FieldChangeRebaser, type FieldEditor, type FieldChangeMap, type FieldChange, type FieldChangeset, type ToDelta, type ModularChangeset, makeModularChangeCodecFamily, type NodeChangeComposer, type NodeChangeInverter, type NodeChangeRebaser, type NodeChangePruner, type ComposeNodeManager, type InvertNodeManager, type RebaseNodeManager, CrossFieldTarget, FlexFieldKind, type FullSchemaPolicy, allowsRepoSuperset, type GenericChangeset, genericFieldKind, type HasFieldChanges, type NodeExistsConstraint, ModularChangeFamily, EncodedModularChangesetV1, EncodedModularChangesetV2, updateRefreshers, type NodeId, type FieldChangeEncodingContext, type FieldKindConfiguration, type FieldKindConfigurationEntry, isNeverTree, DefaultRevisionReplacer, } from "./modular-schema/index.js";
16
- export { mapRootChanges, nodeIdFromChangeAtom, changeAtomFromDetachedNodeId, } from "./deltaUtils.js";
15
+ export { isNeverField, ModularEditBuilder, type FieldEditDescription as EditDescription, type FieldChangeHandler, type FieldChangeRebaser, type FieldEditor, type FieldChangeMap, type FieldChange, type FieldChangeset, type ToDelta, type ModularChangeset, makeModularChangeCodecFamily, type NodeChangeComposer, type NodeChangeInverter, type NodeChangeRebaser, type NodeChangePruner, type CrossFieldManager, CrossFieldTarget, FlexFieldKind, type FullSchemaPolicy, allowsRepoSuperset, type GenericChangeset, genericFieldKind, type HasFieldChanges, type NodeExistsConstraint, ModularChangeFamily, type RelevantRemovedRootsFromChild, EncodedModularChangesetV1, EncodedModularChangesetV2, updateRefreshers, type NodeId, type FieldChangeEncodingContext, type FieldKindConfiguration, type FieldKindConfigurationEntry, isNeverTree, DefaultRevisionReplacer, } from "./modular-schema/index.js";
16
+ export { mapRootChanges } from "./deltaUtils.js";
17
17
  export { type TreeChunk, chunkTree, chunkField, chunkFieldSingle, buildChunkedForest, defaultChunkPolicy, type FieldBatch, type FieldBatchCodec, FieldBatchFormatVersion, getCodecTreeForFieldBatchFormat, makeTreeChunker, makeFieldBatchCodec, type FieldBatchEncodingContext, emptyChunk, combineChunks, type IncrementalEncodingPolicy, defaultIncrementalEncodingPolicy, } from "./chunked-forest/index.js";
18
18
  export { compareLocalNodeIdentifiers, createNodeIdentifierManager, isStableNodeIdentifier, type LocalNodeIdentifier, MockNodeIdentifierManager, type NodeIdentifierManager, nodeKeyTreeIdentifier, type StableNodeIdentifier, } from "./node-identifier/index.js";
19
- export { FieldKinds, type Required, type Optional, type Sequence, type Identifier, type Forbidden, type DefaultChangeset, type DetachedRootIds, DefaultChangeFamily, type IdBasedChangeFamilyDataEditor, DefaultIdBasedDataEditor, type DataEditor, type RequiredFieldEditor, type OptionalFieldEditor, type SequenceFieldEditor, defaultSchemaPolicy, fieldKinds, fieldKindConfigurations, intoDelta, relevantRemovedRoots, getBuildsIds, type DetachedRootLocation, type DetachedRootsLocation, type DetachedRootIdRange, type Locator, LocationBasedDataEditor, type ILocationBasedDataEditor, getCodecTreeForModularChangeFormat, type ModularChangeFormatVersion, } from "./default-schema/index.js";
19
+ export { FieldKinds, type DefaultChangeset, DefaultChangeFamily, DefaultEditBuilder, type IDefaultEditBuilder, type ValueFieldEditBuilder, type OptionalFieldEditBuilder, type SequenceFieldEditBuilder, defaultSchemaPolicy, fieldKinds, fieldKindConfigurations, intoDelta, relevantRemovedRoots, getCodecTreeForModularChangeFormat, type ModularChangeFormatVersion, } from "./default-schema/index.js";
20
20
  export { SchemaValidationError, isNodeInSchema, isFieldInSchema, throwOutOfSchema, } from "./schemaChecker.js";
21
21
  export { type FlexTreeOptionalField, type FlexTreeRequiredField, type FlexTreeSequenceField, type FlexTreeContext, type FlexTreeHydratedContext, type FlexTreeTypedField, type FlexTreeEntity, type FlexTreeField, type FlexTreeNode, TreeStatus, Context, type FlexTreeNodeEvents, type FlexTreeUnknownUnboxed, isFlexTreeNode, ContextSlot, flexTreeMarker, assertFlexTreeEntityNotFreed, flexTreeSlot, getSchemaAndPolicy, LazyEntity, treeStatusFromAnchorCache, indexForAt, FlexTreeEntityKind, type FlexibleNodeContent, type FlexibleFieldContent, type FlexTreeHydratedContextMinimal, type HydratedFlexTreeNode, getOrCreateHydratedFlexTreeNode, currentObserver, withObservation, type Observer, } from "./flex-tree/index.js";
22
22
  export { TreeCompressionStrategy } from "./treeCompressionUtils.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,QAAQ,EACb,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,sBAAsB,EAC3B,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,O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U,EACV,OAAO,EACP,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,cAAc,EACd,WAAW,EAEX,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,EACzB,+BAA+B,EAC/B,eAAe,EACf,eAAe,EACf,KAAK,QAAQ,GACb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EACN,KAAK,YAAY,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EACN,KAAK,SAAS,EACd,eAAe,EACf,UAAU,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,KAAK,iBAAiB,EACtB,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,QAAQ,EACb,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAo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ACd,WAAW,EAEX,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAClB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,8BAA8B,EACnC,KAAK,oBAAoB,EACzB,+BAA+B,EAC/B,eAAe,EACf,eAAe,EACf,KAAK,QAAQ,GACb,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EACN,KAAK,YAAY,EACjB,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EACN,KAAK,SAAS,EACd,eAAe,EACf,UAAU,EACV,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,cAAc,GACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACN,KAAK,iBAAiB,EACtB,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,wBAAwB,CAAC"}
@@ -14,10 +14,10 @@ export { cursorForJsonableTreeNode, cursorForJsonableTreeField, jsonableTreeFrom
14
14
  import * as SequenceField from "./sequence-field/index.js";
15
15
  export { SequenceField };
16
16
  export { isNeverField, ModularEditBuilder, makeModularChangeCodecFamily, CrossFieldTarget, FlexFieldKind, allowsRepoSuperset, genericFieldKind, ModularChangeFamily, EncodedModularChangesetV1, EncodedModularChangesetV2, updateRefreshers, isNeverTree, DefaultRevisionReplacer, } from "./modular-schema/index.js";
17
- export { mapRootChanges, nodeIdFromChangeAtom, changeAtomFromDetachedNodeId, } from "./deltaUtils.js";
17
+ export { mapRootChanges } from "./deltaUtils.js";
18
18
  export { chunkTree, chunkField, chunkFieldSingle, buildChunkedForest, defaultChunkPolicy, FieldBatchFormatVersion, getCodecTreeForFieldBatchFormat, makeTreeChunker, makeFieldBatchCodec, emptyChunk, combineChunks, defaultIncrementalEncodingPolicy, } from "./chunked-forest/index.js";
19
19
  export { compareLocalNodeIdentifiers, createNodeIdentifierManager, isStableNodeIdentifier, MockNodeIdentifierManager, nodeKeyTreeIdentifier, } from "./node-identifier/index.js";
20
- export { FieldKinds, DefaultChangeFamily, DefaultIdBasedDataEditor, defaultSchemaPolicy, fieldKinds, fieldKindConfigurations, intoDelta, relevantRemovedRoots, getBuildsIds, LocationBasedDataEditor, getCodecTreeForModularChangeFormat, } from "./default-schema/index.js";
20
+ export { FieldKinds, DefaultChangeFamily, DefaultEditBuilder, defaultSchemaPolicy, fieldKinds, fieldKindConfigurations, intoDelta, relevantRemovedRoots, getCodecTreeForModularChangeFormat, } from "./default-schema/index.js";
21
21
  export { SchemaValidationError, isNodeInSchema, isFieldInSchema, throwOutOfSchema, } from "./schemaChecker.js";
22
22
  export { TreeStatus, Context, isFlexTreeNode, ContextSlot,
23
23
  // Internal
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EACN,gBAAgB,EAChB,2BAA2B,EAC3B,mBAAmB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EAEtB,sBAAsB,EACtB,gBAAgB,GAIhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GAClB,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EAUN,UAAU,EACV,OAAO,EAGP,cAAc,EACd,WAAW;AACX,WAAW;AACX,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAKlB,+BAA+B,EAC/B,eAAe,EACf,eAAe,GAEf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EAEN,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAEN,eAAe,EACf,UAAU,GAIV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEN,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport {\n\tForestSummarizer,\n\tgetCodecTreeForForestFormat,\n\tForestFormatVersion,\n} from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n\ttype MinimalMapTreeNodeView,\n\tmapTreeFieldsWithField,\n\tmapTreeWithField,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype MinimalFieldMap,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport {\n\tSchemaSummarizer,\n\tmakeSchemaCodec,\n\tschemaCodecBuilder,\n} from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\n// Split this up into separate import and export for compatibility with API-Extractor.\nimport * as SequenceField from \"./sequence-field/index.js\";\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype ComposeNodeManager,\n\ttype InvertNodeManager,\n\ttype RebaseNodeManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tModularChangeFamily,\n\tEncodedModularChangesetV1,\n\tEncodedModularChangesetV2,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tisNeverTree,\n\tDefaultRevisionReplacer,\n} from \"./modular-schema/index.js\";\n\nexport {\n\tmapRootChanges,\n\tnodeIdFromChangeAtom,\n\tchangeAtomFromDetachedNodeId,\n} from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkField,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tFieldBatchFormatVersion,\n\tgetCodecTreeForFieldBatchFormat,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\temptyChunk,\n\tcombineChunks,\n\ttype IncrementalEncodingPolicy,\n\tdefaultIncrementalEncodingPolicy,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype Required,\n\ttype Optional,\n\ttype Sequence,\n\ttype Identifier,\n\ttype Forbidden,\n\ttype DefaultChangeset,\n\ttype DetachedRootIds,\n\tDefaultChangeFamily,\n\ttype IdBasedChangeFamilyDataEditor,\n\tDefaultIdBasedDataEditor,\n\ttype DataEditor,\n\ttype RequiredFieldEditor,\n\ttype OptionalFieldEditor,\n\ttype SequenceFieldEditor,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tgetBuildsIds,\n\ttype DetachedRootLocation,\n\ttype DetachedRootsLocation,\n\ttype DetachedRootIdRange,\n\ttype Locator,\n\tLocationBasedDataEditor,\n\ttype ILocationBasedDataEditor,\n\tgetCodecTreeForModularChangeFormat,\n\ttype ModularChangeFormatVersion,\n} from \"./default-schema/index.js\";\n\nexport {\n\tSchemaValidationError,\n\tisNodeInSchema,\n\tisFieldInSchema,\n\tthrowOutOfSchema,\n} from \"./schemaChecker.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n\ttype FlexibleNodeContent,\n\ttype FlexibleFieldContent,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype HydratedFlexTreeNode,\n\tgetOrCreateHydratedFlexTreeNode,\n\tcurrentObserver,\n\twithObservation,\n\ttype Observer,\n} from \"./flex-tree/index.js\";\n\nexport { TreeCompressionStrategy } from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n\tgetCodecTreeForSchemaChangeFormat,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n\nexport {\n\ttype ChangeAtomIdBTree,\n\tgetFromChangeAtomIdMap,\n\tsetInChangeAtomIdMap,\n} from \"./changeAtomIdBTree.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/feature-libraries/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEN,UAAU,GACV,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM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BAA4B,CAAC;AAEpC,OAAO,EACN,UAAU,EAEV,mBAAmB,EACnB,kBAAkB,EAKlB,mBAAmB,EACnB,UAAU,EACV,uBAAuB,EACvB,SAAS,EACT,oBAAoB,EACpB,kCAAkC,GAElC,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACN,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,gBAAgB,GAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAUN,UAAU,EACV,OAAO,EAGP,cAAc,EACd,WAAW;AACX,WAAW;AACX,cAAc,EACd,4BAA4B,EAC5B,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAKlB,+BAA+B,EAC/B,eAAe,EACf,eAAe,GAEf,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AAEjF,OAAO,EAEN,sBAAsB,EACtB,mBAAmB,EACnB,iCAAiC,GACjC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAEvE,OAAO,EAEN,eAAe,EACf,UAAU,GAIV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEN,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype DownPath,\n\ttoDownPath,\n} from \"./editableTreeBinder.js\";\nexport { allowsValue, assertAllowedValue, isTreeValue } from \"./valueUtilities.js\";\n\nexport {\n\tForestSummarizer,\n\tgetCodecTreeForForestFormat,\n\tForestFormatVersion,\n} from \"./forest-summary/index.js\";\nexport {\n\tcursorForMapTreeField,\n\tcursorForMapTreeNode,\n\tmapTreeFromCursor,\n\tmapTreeFieldFromCursor,\n\ttype MinimalMapTreeNodeView,\n\tmapTreeFieldsWithField,\n\tmapTreeWithField,\n\ttype MapTreeFieldViewGeneric,\n\ttype MapTreeNodeViewGeneric,\n\ttype MinimalFieldMap,\n} from \"./mapTreeCursor.js\";\nexport { buildForest } from \"./object-forest/index.js\";\nexport {\n\tSchemaSummarizer,\n\tmakeSchemaCodec,\n\tschemaCodecBuilder,\n} from \"./schema-index/index.js\";\nexport {\n\tstackTreeNodeCursor,\n\ttype CursorAdapter,\n\tprefixPath,\n\tprefixFieldPath,\n\ttype CursorWithNode,\n\tstackTreeFieldCursor,\n} from \"./treeCursorUtils.js\";\nexport {\n\tcursorForJsonableTreeNode,\n\tcursorForJsonableTreeField,\n\tjsonableTreeFromCursor,\n\tjsonableTreeFromFieldCursor,\n\tjsonableTreeFromForest,\n} from \"./treeTextCursor.js\";\n\n// Split this up into separate import and export for compatibility with API-Extractor.\nimport * as SequenceField from \"./sequence-field/index.js\";\nexport { SequenceField };\n\nexport {\n\tisNeverField,\n\tModularEditBuilder,\n\ttype FieldEditDescription as EditDescription,\n\ttype FieldChangeHandler,\n\ttype FieldChangeRebaser,\n\ttype FieldEditor,\n\ttype FieldChangeMap,\n\ttype FieldChange,\n\ttype FieldChangeset,\n\ttype ToDelta,\n\ttype ModularChangeset,\n\tmakeModularChangeCodecFamily,\n\ttype NodeChangeComposer,\n\ttype NodeChangeInverter,\n\ttype NodeChangeRebaser,\n\ttype NodeChangePruner,\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\tFlexFieldKind,\n\ttype FullSchemaPolicy,\n\tallowsRepoSuperset,\n\ttype GenericChangeset,\n\tgenericFieldKind,\n\ttype HasFieldChanges,\n\ttype NodeExistsConstraint,\n\tModularChangeFamily,\n\ttype RelevantRemovedRootsFromChild,\n\tEncodedModularChangesetV1,\n\tEncodedModularChangesetV2,\n\tupdateRefreshers,\n\ttype NodeId,\n\ttype FieldChangeEncodingContext,\n\ttype FieldKindConfiguration,\n\ttype FieldKindConfigurationEntry,\n\tisNeverTree,\n\tDefaultRevisionReplacer,\n} from \"./modular-schema/index.js\";\n\nexport { mapRootChanges } from \"./deltaUtils.js\";\n\nexport {\n\ttype TreeChunk,\n\tchunkTree,\n\tchunkField,\n\tchunkFieldSingle,\n\tbuildChunkedForest,\n\tdefaultChunkPolicy,\n\ttype FieldBatch,\n\ttype FieldBatchCodec,\n\tFieldBatchFormatVersion,\n\tgetCodecTreeForFieldBatchFormat,\n\tmakeTreeChunker,\n\tmakeFieldBatchCodec,\n\ttype FieldBatchEncodingContext,\n\temptyChunk,\n\tcombineChunks,\n\ttype IncrementalEncodingPolicy,\n\tdefaultIncrementalEncodingPolicy,\n} from \"./chunked-forest/index.js\";\n\nexport {\n\tcompareLocalNodeIdentifiers,\n\tcreateNodeIdentifierManager,\n\tisStableNodeIdentifier,\n\ttype LocalNodeIdentifier,\n\tMockNodeIdentifierManager,\n\ttype NodeIdentifierManager,\n\tnodeKeyTreeIdentifier,\n\ttype StableNodeIdentifier,\n} from \"./node-identifier/index.js\";\n\nexport {\n\tFieldKinds,\n\ttype DefaultChangeset,\n\tDefaultChangeFamily,\n\tDefaultEditBuilder,\n\ttype IDefaultEditBuilder,\n\ttype ValueFieldEditBuilder,\n\ttype OptionalFieldEditBuilder,\n\ttype SequenceFieldEditBuilder,\n\tdefaultSchemaPolicy,\n\tfieldKinds,\n\tfieldKindConfigurations,\n\tintoDelta,\n\trelevantRemovedRoots,\n\tgetCodecTreeForModularChangeFormat,\n\ttype ModularChangeFormatVersion,\n} from \"./default-schema/index.js\";\n\nexport {\n\tSchemaValidationError,\n\tisNodeInSchema,\n\tisFieldInSchema,\n\tthrowOutOfSchema,\n} from \"./schemaChecker.js\";\n\nexport {\n\ttype FlexTreeOptionalField,\n\ttype FlexTreeRequiredField,\n\ttype FlexTreeSequenceField,\n\ttype FlexTreeContext,\n\ttype FlexTreeHydratedContext,\n\ttype FlexTreeTypedField,\n\ttype FlexTreeEntity,\n\ttype FlexTreeField,\n\ttype FlexTreeNode,\n\tTreeStatus,\n\tContext,\n\ttype FlexTreeNodeEvents,\n\ttype FlexTreeUnknownUnboxed,\n\tisFlexTreeNode,\n\tContextSlot,\n\t// Internal\n\tflexTreeMarker,\n\tassertFlexTreeEntityNotFreed,\n\tflexTreeSlot,\n\tgetSchemaAndPolicy,\n\tLazyEntity,\n\ttreeStatusFromAnchorCache,\n\tindexForAt,\n\tFlexTreeEntityKind,\n\ttype FlexibleNodeContent,\n\ttype FlexibleFieldContent,\n\ttype FlexTreeHydratedContextMinimal,\n\ttype HydratedFlexTreeNode,\n\tgetOrCreateHydratedFlexTreeNode,\n\tcurrentObserver,\n\twithObservation,\n\ttype Observer,\n} from \"./flex-tree/index.js\";\n\nexport { TreeCompressionStrategy } from \"./treeCompressionUtils.js\";\n\nexport { valueSchemaAllows } from \"./valueUtilities.js\";\n\nexport { DetachedFieldIndexSummarizer } from \"./detachedFieldIndexSummarizer.js\";\n\nexport {\n\ttype SchemaChange,\n\tmakeSchemaChangeCodecs,\n\tEncodedSchemaChange,\n\tgetCodecTreeForSchemaChangeFormat,\n} from \"./schema-edits/index.js\";\n\nexport { makeMitigatedChangeFamily } from \"./mitigatedChangeFamily.js\";\n\nexport {\n\ttype KeyFinder,\n\tAnchorTreeIndex,\n\thasElement,\n\ttype TreeIndex,\n\ttype TreeIndexKey,\n\ttype TreeIndexNodes,\n} from \"./indexing/index.js\";\n\nexport {\n\ttype ChangeAtomIdBTree,\n\tgetFromChangeAtomIdMap,\n\tsetInChangeAtomIdMap,\n} from \"./changeAtomIdBTree.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mapTreeCursor.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/mapTreeCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,WAAW,EAEhB,KAA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AE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,sBAChB,SAAQ,sBAAsB,CAAC,sBAAsB,CAAC;CAAG;AAQ1D;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,CAAC,EACvE,IAAI,EAAE,CAAC,GACL,cAAc,CAAC,CAAC,CAAC,CAKnB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC/B,QAAQ,EAAE,gBAAgB,EAAE,EAC5B,GAAG,WAAe,EAClB,IAAI,sDAAuB,GACzB,gBAAgB,CAKlB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,SAAS,OAAO,EAAE,EAClE,QAAQ,EAAE,CAAC,EACX,GAAG,EAAE,QAAQ,GACX,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAElB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS,sBAAsB,CAAC,CAAC,CAAC,EACxE,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,aAAa,GAAE,aAAyB,GACtC,cAAc,CAAC,CAAC,CAAC,CAQnB;AAsBD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,CAevE;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,gBAAgB,EAAE,CAG9E"}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { assert, debugAssert } from "@fluidframework/core-utils/internal";
5
+ import { assert } from "@fluidframework/core-utils/internal";
6
6
  import { aboveRootPlaceholder, detachedFieldAsKey, mapCursorField, rootField, rootFieldKey, } from "../core/index.js";
7
7
  import { stackTreeFieldCursor, stackTreeNodeCursor, } from "./treeCursorUtils.js";
8
8
  {
@@ -71,7 +71,6 @@ export function mapTreeFromCursor(cursor) {
71
71
  const fields = new Map();
72
72
  for (let inField = cursor.firstField(); inField; inField = cursor.nextField()) {
73
73
  const field = mapCursorField(cursor, mapTreeFromCursor);
74
- debugAssert(() => field.length > 0 || "field must have at least one child");
75
74
  fields.set(cursor.getFieldKey(), field);
76
75
  }
77
76
  const node = {
@@ -1 +1 @@
1
- {"version":3,"file":"mapTreeCursor.js","sourceRoot":"","sources":["../../src/feature-libraries/mapTreeCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAE1E,OAAO,EAQN,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,YAAY,GACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAIN,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,sBAAsB,CAAC;AA6C9B,CAAC;AAID,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CACnC,IAAO;IAEP,4FAA4F;IAC5F,yGAAyG;IACzG,MAAM,YAAY,GAAG,OAAuE,CAAC;IAC7F,OAAO,mBAAmB,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAC/B,QAA4B,EAC5B,GAAG,GAAG,YAAY,EAClB,IAAI,GAAG,oBAAoB;IAE3B,OAAO;QACN,IAAI;QACJ,MAAM,EAAE,sBAAsB,CAAC,QAAQ,EAAE,GAAG,CAAC;KAC7C,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CACrC,QAAW,EACX,GAAa;IAEb,OAAO,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;AAChE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACpC,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AAK,IAAI,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,CAAC;QAC/E,MAAM,KAAK,GAAuB,cAAc,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;QAC5E,WAAW,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,oCAAoC,CAAC,CAAC;QAC5E,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,IAAI,GAAqB;QAC9B,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,MAAM;KACN,CAAC;IAEF,OAAO,IAAI,CAAC;AACb,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,MAAmB;IACzD,MAAM,CAAC,MAAM,CAAC,IAAI,sCAA8B,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACnF,OAAO,cAAc,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;AAClD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, debugAssert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tCursorLocationType,\n\ttype DetachedField,\n\ttype ExclusiveMapTree,\n\ttype FieldKey,\n\ttype ITreeCursor,\n\ttype MapTree,\n\ttype NodeData,\n\taboveRootPlaceholder,\n\tdetachedFieldAsKey,\n\tmapCursorField,\n\trootField,\n\trootFieldKey,\n} from \"../core/index.js\";\n\nimport {\n\ttype CursorAdapter,\n\ttype CursorWithNode,\n\ttype Field,\n\tstackTreeFieldCursor,\n\tstackTreeNodeCursor,\n} from \"./treeCursorUtils.js\";\nimport type { requireAssignableTo } from \"../util/index.js\";\n\n/**\n * A generic variant of {@link MapTree} that can be used to strongly type trees implementing a MapTree-like API.\n * @remarks\n * Due to how TypeScript handles recursive generic types, explicitly named extension interfaces work best for parameterizing this, and a default type parameter can't be provided.\n * @see {@link MinimalMapTreeNodeView} for a minimal configuration of this interface.\n */\nexport interface MapTreeNodeViewGeneric<TNode> extends NodeData {\n\t/**\n\t * The non-empty fields on this node.\n\t * @remarks\n\t * This is the subset of map needed to view the tree.\n\t * Theoretically `Symbol.iterator` and \"keys\" are redundant.\n\t */\n\treadonly fields: MinimalFieldMap<MapTreeFieldViewGeneric<TNode>>;\n}\n\n/**\n * A minimal map for the fields of a {@link MapTreeNodeViewGeneric}.\n * @remarks\n * Subset of map, so can be implemented by `Map<FieldKey, TField>`.\n */\nexport interface MinimalFieldMap<TField> {\n\t[Symbol.iterator]: () => Iterator<[FieldKey, TField]>;\n\tget: (key: FieldKey) => TField | undefined;\n}\n\n/**\n * A field in {@link MapTreeNodeViewGeneric}.\n * @remarks\n * Subset of array, so can be implemented by `TNode[]`.\n */\nexport interface MapTreeFieldViewGeneric<TNode> {\n\treadonly [Symbol.iterator]: () => Iterator<TNode>;\n\treadonly length: number;\n}\n\n/**\n * Like {@link MapTree} but with the minimal properties needed for reading.\n */\nexport interface MinimalMapTreeNodeView\n\textends MapTreeNodeViewGeneric<MinimalMapTreeNodeView> {}\n\n{\n\t// Check that these interfaces are subsets of MapTree as intended:\n\ttype _check1 = requireAssignableTo<MapTree, MinimalMapTreeNodeView>;\n\ttype _check2 = requireAssignableTo<MapTree, MapTreeNodeViewGeneric<MapTree>>;\n}\n\n/**\n * Returns an {@link ITreeCursorSynchronous} in nodes mode for a single {@link MapTree}.\n */\nexport function cursorForMapTreeNode<T extends MapTreeNodeViewGeneric<T>>(\n\troot: T,\n): CursorWithNode<T> {\n\t// There doesn't seem to be a clean way to get TypeScript to type check this without casting\n\t// without declaring the adapter inside this generic function and needlessly recreating it on every call.\n\tconst adapterTyped = adapter as CursorAdapter<MapTreeNodeViewGeneric<T>> as CursorAdapter<T>;\n\treturn stackTreeNodeCursor(adapterTyped, root);\n}\n\n/**\n * Creates an {@link ExclusiveMapTree} with a single field and no value.\n * @remarks\n * This handles ensuring the field is omitted if empty, and defaults to making the node above the root.\n */\nexport function mapTreeWithField(\n\tchildren: ExclusiveMapTree[],\n\tkey = rootFieldKey,\n\ttype = aboveRootPlaceholder,\n): ExclusiveMapTree {\n\treturn {\n\t\ttype,\n\t\tfields: mapTreeFieldsWithField(children, key),\n\t};\n}\n\n/**\n * Creates a Map suitable for use as {@link MapTree.fields} with a single field.\n * @remarks\n * This handles ensuring the field is omitted if empty.\n */\nexport function mapTreeFieldsWithField<T extends readonly unknown[]>(\n\tchildren: T,\n\tkey: FieldKey,\n): Map<FieldKey, T> {\n\treturn new Map(children.length === 0 ? [] : [[key, children]]);\n}\n\n/**\n * Returns an {@link ITreeCursorSynchronous} in fields mode for a MapTree field.\n */\nexport function cursorForMapTreeField<T extends MapTreeNodeViewGeneric<T>>(\n\troot: readonly T[],\n\tdetachedField: DetachedField = rootField,\n): CursorWithNode<T> {\n\tconst key = detachedFieldAsKey(detachedField);\n\tconst adapterTyped = adapter as unknown as CursorAdapter<T>;\n\tconst dummyRoot: MapTreeNodeViewGeneric<T> = {\n\t\ttype: aboveRootPlaceholder,\n\t\tfields: mapTreeFieldsWithField(root, key),\n\t};\n\treturn stackTreeFieldCursor(adapterTyped, dummyRoot as T, detachedField);\n}\n\nconst adapter: CursorAdapter<MinimalMapTreeNodeView> = {\n\tvalue: (node) => node.value,\n\ttype: (node) => node.type,\n\tkeysFromNode: (node) => Array.from(node.fields, ([key, field]) => key),\n\tgetFieldFromNode: (node, key): Field<MinimalMapTreeNodeView> => {\n\t\tconst field = node.fields.get(key) as\n\t\t\t| MinimalMapTreeNodeView[]\n\t\t\t| Iterable<MinimalMapTreeNodeView>\n\t\t\t| undefined;\n\t\tif (field === undefined) {\n\t\t\treturn [];\n\t\t}\n\t\tif (Array.isArray(field)) {\n\t\t\treturn field as readonly MinimalMapTreeNodeView[];\n\t\t}\n\t\t// TODO: this copy could be avoided by using Array.at instead of indexing in `Field`, but that requires ES2022.\n\t\treturn [...field] as readonly MinimalMapTreeNodeView[];\n\t},\n};\n\n/**\n * Extract a MapTree from the contents of the given ITreeCursor's current node.\n */\nexport function mapTreeFromCursor(cursor: ITreeCursor): ExclusiveMapTree {\n\tassert(cursor.mode === CursorLocationType.Nodes, 0x3b7 /* must start at node */);\n\tconst fields: Map<FieldKey, ExclusiveMapTree[]> = new Map();\n\tfor (let inField = cursor.firstField(); inField; inField = cursor.nextField()) {\n\t\tconst field: ExclusiveMapTree[] = mapCursorField(cursor, mapTreeFromCursor);\n\t\tdebugAssert(() => field.length > 0 || \"field must have at least one child\");\n\t\tfields.set(cursor.getFieldKey(), field);\n\t}\n\n\tconst node: ExclusiveMapTree = {\n\t\ttype: cursor.type,\n\t\tvalue: cursor.value,\n\t\tfields,\n\t};\n\n\treturn node;\n}\n\n/**\n * Extract an array of MapTrees (a field) from the contents of the given ITreeCursor's current field.\n */\nexport function mapTreeFieldFromCursor(cursor: ITreeCursor): ExclusiveMapTree[] {\n\tassert(cursor.mode === CursorLocationType.Fields, 0xa03 /* must start at field */);\n\treturn mapCursorField(cursor, mapTreeFromCursor);\n}\n"]}
1
+ {"version":3,"file":"mapTreeCursor.js","sourceRoot":"","sources":["../../src/feature-libraries/mapTreeCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAQN,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,YAAY,GACZ,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAIN,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,sBAAsB,CAAC;AA4C9B,CAAC;AAID,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CACnC,IAAO;IAEP,4FAA4F;IAC5F,yGAAyG;IACzG,MAAM,YAAY,GAAG,OAAuE,CAAC;IAC7F,OAA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n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tCursorLocationType,\n\ttype DetachedField,\n\ttype ExclusiveMapTree,\n\ttype FieldKey,\n\ttype ITreeCursor,\n\ttype MapTree,\n\ttype NodeData,\n\taboveRootPlaceholder,\n\tdetachedFieldAsKey,\n\tmapCursorField,\n\trootField,\n\trootFieldKey,\n} from \"../core/index.js\";\nimport type { requireAssignableTo } from \"../util/index.js\";\n\nimport {\n\ttype CursorAdapter,\n\ttype CursorWithNode,\n\ttype Field,\n\tstackTreeFieldCursor,\n\tstackTreeNodeCursor,\n} from \"./treeCursorUtils.js\";\n\n/**\n * A generic variant of {@link MapTree} that can be used to strongly type trees implementing a MapTree-like API.\n * @remarks\n * Due to how TypeScript handles recursive generic types, explicitly named extension interfaces work best for parameterizing this, and a default type parameter can't be provided.\n * @see {@link MinimalMapTreeNodeView} for a minimal configuration of this interface.\n */\nexport interface MapTreeNodeViewGeneric<TNode> extends NodeData {\n\t/**\n\t * The non-empty fields on this node.\n\t * @remarks\n\t * This is the subset of map needed to view the tree.\n\t * Theoretically `Symbol.iterator` and \"keys\" are redundant.\n\t */\n\treadonly fields: MinimalFieldMap<MapTreeFieldViewGeneric<TNode>>;\n}\n\n/**\n * A minimal map for the fields of a {@link MapTreeNodeViewGeneric}.\n * @remarks\n * Subset of map, so can be implemented by `Map<FieldKey, TField>`.\n */\nexport interface MinimalFieldMap<TField> {\n\t[Symbol.iterator]: () => Iterator<[FieldKey, TField]>;\n\tget: (key: FieldKey) => TField | undefined;\n}\n\n/**\n * A field in {@link MapTreeNodeViewGeneric}.\n * @remarks\n * Subset of array, so can be implemented by `TNode[]`.\n */\nexport interface MapTreeFieldViewGeneric<TNode> {\n\treadonly [Symbol.iterator]: () => Iterator<TNode>;\n\treadonly length: number;\n}\n\n/**\n * Like {@link MapTree} but with the minimal properties needed for reading.\n */\nexport interface MinimalMapTreeNodeView\n\textends MapTreeNodeViewGeneric<MinimalMapTreeNodeView> {}\n\n{\n\t// Check that these interfaces are subsets of MapTree as intended:\n\ttype _check1 = requireAssignableTo<MapTree, MinimalMapTreeNodeView>;\n\ttype _check2 = requireAssignableTo<MapTree, MapTreeNodeViewGeneric<MapTree>>;\n}\n\n/**\n * Returns an {@link ITreeCursorSynchronous} in nodes mode for a single {@link MapTree}.\n */\nexport function cursorForMapTreeNode<T extends MapTreeNodeViewGeneric<T>>(\n\troot: T,\n): CursorWithNode<T> {\n\t// There doesn't seem to be a clean way to get TypeScript to type check this without casting\n\t// without declaring the adapter inside this generic function and needlessly recreating it on every call.\n\tconst adapterTyped = adapter as CursorAdapter<MapTreeNodeViewGeneric<T>> as CursorAdapter<T>;\n\treturn stackTreeNodeCursor(adapterTyped, root);\n}\n\n/**\n * Creates an {@link ExclusiveMapTree} with a single field and no value.\n * @remarks\n * This handles ensuring the field is omitted if empty, and defaults to making the node above the root.\n */\nexport function mapTreeWithField(\n\tchildren: ExclusiveMapTree[],\n\tkey = rootFieldKey,\n\ttype = aboveRootPlaceholder,\n): ExclusiveMapTree {\n\treturn {\n\t\ttype,\n\t\tfields: mapTreeFieldsWithField(children, key),\n\t};\n}\n\n/**\n * Creates a Map suitable for use as {@link MapTree.fields} with a single field.\n * @remarks\n * This handles ensuring the field is omitted if empty.\n */\nexport function mapTreeFieldsWithField<T extends readonly unknown[]>(\n\tchildren: T,\n\tkey: FieldKey,\n): Map<FieldKey, T> {\n\treturn new Map(children.length === 0 ? [] : [[key, children]]);\n}\n\n/**\n * Returns an {@link ITreeCursorSynchronous} in fields mode for a MapTree field.\n */\nexport function cursorForMapTreeField<T extends MapTreeNodeViewGeneric<T>>(\n\troot: readonly T[],\n\tdetachedField: DetachedField = rootField,\n): CursorWithNode<T> {\n\tconst key = detachedFieldAsKey(detachedField);\n\tconst adapterTyped = adapter as unknown as CursorAdapter<T>;\n\tconst dummyRoot: MapTreeNodeViewGeneric<T> = {\n\t\ttype: aboveRootPlaceholder,\n\t\tfields: mapTreeFieldsWithField(root, key),\n\t};\n\treturn stackTreeFieldCursor(adapterTyped, dummyRoot as T, detachedField);\n}\n\nconst adapter: CursorAdapter<MinimalMapTreeNodeView> = {\n\tvalue: (node) => node.value,\n\ttype: (node) => node.type,\n\tkeysFromNode: (node) => Array.from(node.fields, ([key, field]) => key),\n\tgetFieldFromNode: (node, key): Field<MinimalMapTreeNodeView> => {\n\t\tconst field = node.fields.get(key) as\n\t\t\t| MinimalMapTreeNodeView[]\n\t\t\t| Iterable<MinimalMapTreeNodeView>\n\t\t\t| undefined;\n\t\tif (field === undefined) {\n\t\t\treturn [];\n\t\t}\n\t\tif (Array.isArray(field)) {\n\t\t\treturn field as readonly MinimalMapTreeNodeView[];\n\t\t}\n\t\t// TODO: this copy could be avoided by using Array.at instead of indexing in `Field`, but that requires ES2022.\n\t\treturn [...field] as readonly MinimalMapTreeNodeView[];\n\t},\n};\n\n/**\n * Extract a MapTree from the contents of the given ITreeCursor's current node.\n */\nexport function mapTreeFromCursor(cursor: ITreeCursor): ExclusiveMapTree {\n\tassert(cursor.mode === CursorLocationType.Nodes, 0x3b7 /* must start at node */);\n\tconst fields: Map<FieldKey, ExclusiveMapTree[]> = new Map();\n\tfor (let inField = cursor.firstField(); inField; inField = cursor.nextField()) {\n\t\tconst field: ExclusiveMapTree[] = mapCursorField(cursor, mapTreeFromCursor);\n\t\tfields.set(cursor.getFieldKey(), field);\n\t}\n\n\tconst node: ExclusiveMapTree = {\n\t\ttype: cursor.type,\n\t\tvalue: cursor.value,\n\t\tfields,\n\t};\n\n\treturn node;\n}\n\n/**\n * Extract an array of MapTrees (a field) from the contents of the given ITreeCursor's current field.\n */\nexport function mapTreeFieldFromCursor(cursor: ITreeCursor): ExclusiveMapTree[] {\n\tassert(cursor.mode === CursorLocationType.Fields, 0xa03 /* must start at field */);\n\treturn mapCursorField(cursor, mapTreeFromCursor);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mitigatedChangeFamily.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/mitigatedChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,YAAY,EACZ,kBAAkB,EAClB,aAAa,EAMb,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,SAAS,kBAAkB,EAAE,OAAO,EACpF,uBAAuB,EAAE,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,EACvD,cAAc,EAAE,OAAO,EACvB,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAC/B,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAYhC;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAC3C,kBAAkB,EAAE,aAAa,CAAC,OAAO,CAAC,EAC1C,cAAc,EAAE,OAAO,EACvB,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAC/B,aAAa,CAAC,OAAO,CAAC,CAuCxB"}
1
+ {"version":3,"file":"mitigatedChangeFamily.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/mitigatedChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,YAAY,EACZ,kBAAkB,EAClB,aAAa,EAKb,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;GAaG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,SAAS,kBAAkB,EAAE,OAAO,EACpF,uBAAuB,EAAE,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,EACvD,cAAc,EAAE,OAAO,EACvB,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAC/B,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAWhC;AAED,wBAAgB,oBAAoB,CAAC,OAAO,EAC3C,kBAAkB,EAAE,aAAa,CAAC,OAAO,CAAC,EAC1C,cAAc,EAAE,OAAO,EACvB,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAC/B,aAAa,CAAC,OAAO,CAAC,CAuCxB"}
@@ -18,8 +18,8 @@
18
18
  */
19
19
  export function makeMitigatedChangeFamily(unmitigatedChangeFamily, fallbackChange, onError) {
20
20
  return {
21
- buildEditor: (mintRevisionTag, changeReceiver, options) => {
22
- return unmitigatedChangeFamily.buildEditor(mintRevisionTag, changeReceiver, options);
21
+ buildEditor: (mintRevisionTag, changeReceiver) => {
22
+ return unmitigatedChangeFamily.buildEditor(mintRevisionTag, changeReceiver);
23
23
  },
24
24
  rebaser: makeMitigatedRebaser(unmitigatedChangeFamily.rebaser, fallbackChange, onError),
25
25
  codecs: unmitigatedChangeFamily.codecs,
@@ -1 +1 @@
1
- {"version":3,"file":"mitigatedChangeFamily.js","sourceRoot":"","sources":["../../src/feature-libraries/mitigatedChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,yBAAyB,CACxC,uBAAuD,EACvD,cAAuB,EACvB,OAAiC;IAEjC,OAAO;QACN,WAAW,EAAE,CACZ,eAAkC,EAClC,cAAuD,EACvD,OAAuB,EACb,EAAE;YACZ,OAAO,uBAAuB,CAAC,WAAW,CAAC,eAAe,EAAE,cAAc,EAAE,OAAO,CAAC,CAAC;QACtF,CAAC;QACD,OAAO,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC;QACvF,MAAM,EAAE,uBAAuB,CAAC,MAAM;KACtC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,oBAAoB,CACnC,kBAA0C,EAC1C,cAAuB,EACvB,OAAiC;IAEjC,MAAM,YAAY,GAAG,CAAC,EAAiB,EAAW,EAAE;QACnD,IAAI,CAAC;YACJ,OAAO,EAAE,EAAE,CAAC;QACb,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACzB,OAAO,CAAC,KAAK,CAAC,CAAC;YACf,OAAO,cAAc,CAAC;QACvB,CAAC;IACF,CAAC,CAAC;IAEF,OAAO;QACN,OAAO,EAAE,CAAC,OAAgC,EAAW,EAAE;YACtD,OAAO,YAAY,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAChE,CAAC;QACD,MAAM,EAAE,CACP,OAA8B,EAC9B,UAAmB,EACnB,QAAqB,EACX,EAAE;YACZ,OAAO,YAAY,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;QACrF,CAAC;QACD,MAAM,EAAE,CACP,MAA6B,EAC7B,IAA2B,EAC3B,gBAAwC,EAC9B,EAAE;YACZ,OAAO,YAAY,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACtF,CAAC;QACD,YAAY,EAAE,CAAC,MAAe,EAAgC,EAAE;YAC/D,IAAI,CAAC;gBACJ,OAAO,kBAAkB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACzB,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,OAAO,IAAI,GAAG,EAAE,CAAC;YAClB,CAAC;QACF,CAAC;QACD,cAAc,EAAE,CAAC,MAAe,EAAE,QAA0B,EAAW,EAAE,CACxE,YAAY,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KACxE,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tChangeFamily,\n\tChangeFamilyEditor,\n\tChangeRebaser,\n\tEditorOptions,\n\tRevisionMetadataSource,\n\tRevisionReplacer,\n\tRevisionTag,\n\tTaggedChange,\n} from \"../core/index.js\";\n\n/**\n * Makes a given `ChangeFamily` safer to use by wrapping some of its functions in try-catch blocks.\n *\n * Mitigated functions:\n * - {@link ChangeFamily.intoDelta} (an empty Delta is returned instead)\n * - {@link ChangeRebaser.rebase} (the given `fallbackChange` is returned instead)\n * - {@link ChangeRebaser.invert} (the given `fallbackChange` is returned instead)\n * - {@link ChangeRebaser.compose} (the given `fallbackChange` is returned instead)\n *\n * @param unmitigatedChangeFamily - The change family to mitigate.\n * @param fallbackChange - A changeset to use as a fallback when one of the mitigated functions throws.\n * @param onError - A callback invoked for each error thrown.\n * @returns a mitigated change family.\n */\nexport function makeMitigatedChangeFamily<TEditor extends ChangeFamilyEditor, TChange>(\n\tunmitigatedChangeFamily: ChangeFamily<TEditor, TChange>,\n\tfallbackChange: TChange,\n\tonError: (error: unknown) => void,\n): ChangeFamily<TEditor, TChange> {\n\treturn {\n\t\tbuildEditor: (\n\t\t\tmintRevisionTag: () => RevisionTag,\n\t\t\tchangeReceiver: (change: TaggedChange<TChange>) => void,\n\t\t\toptions?: EditorOptions,\n\t\t): TEditor => {\n\t\t\treturn unmitigatedChangeFamily.buildEditor(mintRevisionTag, changeReceiver, options);\n\t\t},\n\t\trebaser: makeMitigatedRebaser(unmitigatedChangeFamily.rebaser, fallbackChange, onError),\n\t\tcodecs: unmitigatedChangeFamily.codecs,\n\t};\n}\n\nexport function makeMitigatedRebaser<TChange>(\n\tunmitigatedRebaser: ChangeRebaser<TChange>,\n\tfallbackChange: TChange,\n\tonError: (error: unknown) => void,\n): ChangeRebaser<TChange> {\n\tconst withFallback = (fn: () => TChange): TChange => {\n\t\ttry {\n\t\t\treturn fn();\n\t\t} catch (error: unknown) {\n\t\t\tonError(error);\n\t\t\treturn fallbackChange;\n\t\t}\n\t};\n\n\treturn {\n\t\tcompose: (changes: TaggedChange<TChange>[]): TChange => {\n\t\t\treturn withFallback(() => unmitigatedRebaser.compose(changes));\n\t\t},\n\t\tinvert: (\n\t\t\tchanges: TaggedChange<TChange>,\n\t\t\tisRollback: boolean,\n\t\t\trevision: RevisionTag,\n\t\t): TChange => {\n\t\t\treturn withFallback(() => unmitigatedRebaser.invert(changes, isRollback, revision));\n\t\t},\n\t\trebase: (\n\t\t\tchange: TaggedChange<TChange>,\n\t\t\tover: TaggedChange<TChange>,\n\t\t\trevisionMetadata: RevisionMetadataSource,\n\t\t): TChange => {\n\t\t\treturn withFallback(() => unmitigatedRebaser.rebase(change, over, revisionMetadata));\n\t\t},\n\t\tgetRevisions: (change: TChange): Set<RevisionTag | undefined> => {\n\t\t\ttry {\n\t\t\t\treturn unmitigatedRebaser.getRevisions(change);\n\t\t\t} catch (error: unknown) {\n\t\t\t\tonError(error);\n\t\t\t\treturn new Set();\n\t\t\t}\n\t\t},\n\t\tchangeRevision: (change: TChange, replacer: RevisionReplacer): TChange =>\n\t\t\twithFallback(() => unmitigatedRebaser.changeRevision(change, replacer)),\n\t};\n}\n"]}
1
+ {"version":3,"file":"mitigatedChangeFamily.js","sourceRoot":"","sources":["../../src/feature-libraries/mitigatedChangeFamily.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,yBAAyB,CACxC,uBAAuD,EACvD,cAAuB,EACvB,OAAiC;IAEjC,OAAO;QACN,WAAW,EAAE,CACZ,eAAkC,EAClC,cAAuD,EAC7C,EAAE;YACZ,OAAO,uBAAuB,CAAC,WAAW,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,EAAE,oBAAoB,CAAC,uBAAuB,CAAC,OAAO,EAAE,cAAc,EAAE,OAAO,CAAC;QACvF,MAAM,EAAE,uBAAuB,CAAC,MAAM;KACtC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,oBAAoB,CACnC,kBAA0C,EAC1C,cAAuB,EACvB,OAAiC;IAEjC,MAAM,YAAY,GAAG,CAAC,EAAiB,EAAW,EAAE;QACnD,IAAI,CAAC;YACJ,OAAO,EAAE,EAAE,CAAC;QACb,CAAC;QAAC,OAAO,KAAc,EAAE,CAAC;YACzB,OAAO,CAAC,KAAK,CAAC,CAAC;YACf,OAAO,cAAc,CAAC;QACvB,CAAC;IACF,CAAC,CAAC;IAEF,OAAO;QACN,OAAO,EAAE,CAAC,OAAgC,EAAW,EAAE;YACtD,OAAO,YAAY,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;QAChE,CAAC;QACD,MAAM,EAAE,CACP,OAA8B,EAC9B,UAAmB,EACnB,QAAqB,EACX,EAAE;YACZ,OAAO,YAAY,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC;QACrF,CAAC;QACD,MAAM,EAAE,CACP,MAA6B,EAC7B,IAA2B,EAC3B,gBAAwC,EAC9B,EAAE;YACZ,OAAO,YAAY,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACtF,CAAC;QACD,YAAY,EAAE,CAAC,MAAe,EAAgC,EAAE;YAC/D,IAAI,CAAC;gBACJ,OAAO,kBAAkB,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;YAChD,CAAC;YAAC,OAAO,KAAc,EAAE,CAAC;gBACzB,OAAO,CAAC,KAAK,CAAC,CAAC;gBACf,OAAO,IAAI,GAAG,EAAE,CAAC;YAClB,CAAC;QACF,CAAC;QACD,cAAc,EAAE,CAAC,MAAe,EAAE,QAA0B,EAAW,EAAE,CACxE,YAAY,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;KACxE,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type {\n\tChangeFamily,\n\tChangeFamilyEditor,\n\tChangeRebaser,\n\tRevisionMetadataSource,\n\tRevisionReplacer,\n\tRevisionTag,\n\tTaggedChange,\n} from \"../core/index.js\";\n\n/**\n * Makes a given `ChangeFamily` safer to use by wrapping some of its functions in try-catch blocks.\n *\n * Mitigated functions:\n * - {@link ChangeFamily.intoDelta} (an empty Delta is returned instead)\n * - {@link ChangeRebaser.rebase} (the given `fallbackChange` is returned instead)\n * - {@link ChangeRebaser.invert} (the given `fallbackChange` is returned instead)\n * - {@link ChangeRebaser.compose} (the given `fallbackChange` is returned instead)\n *\n * @param unmitigatedChangeFamily - The change family to mitigate.\n * @param fallbackChange - A changeset to use as a fallback when one of the mitigated functions throws.\n * @param onError - A callback invoked for each error thrown.\n * @returns a mitigated change family.\n */\nexport function makeMitigatedChangeFamily<TEditor extends ChangeFamilyEditor, TChange>(\n\tunmitigatedChangeFamily: ChangeFamily<TEditor, TChange>,\n\tfallbackChange: TChange,\n\tonError: (error: unknown) => void,\n): ChangeFamily<TEditor, TChange> {\n\treturn {\n\t\tbuildEditor: (\n\t\t\tmintRevisionTag: () => RevisionTag,\n\t\t\tchangeReceiver: (change: TaggedChange<TChange>) => void,\n\t\t): TEditor => {\n\t\t\treturn unmitigatedChangeFamily.buildEditor(mintRevisionTag, changeReceiver);\n\t\t},\n\t\trebaser: makeMitigatedRebaser(unmitigatedChangeFamily.rebaser, fallbackChange, onError),\n\t\tcodecs: unmitigatedChangeFamily.codecs,\n\t};\n}\n\nexport function makeMitigatedRebaser<TChange>(\n\tunmitigatedRebaser: ChangeRebaser<TChange>,\n\tfallbackChange: TChange,\n\tonError: (error: unknown) => void,\n): ChangeRebaser<TChange> {\n\tconst withFallback = (fn: () => TChange): TChange => {\n\t\ttry {\n\t\t\treturn fn();\n\t\t} catch (error: unknown) {\n\t\t\tonError(error);\n\t\t\treturn fallbackChange;\n\t\t}\n\t};\n\n\treturn {\n\t\tcompose: (changes: TaggedChange<TChange>[]): TChange => {\n\t\t\treturn withFallback(() => unmitigatedRebaser.compose(changes));\n\t\t},\n\t\tinvert: (\n\t\t\tchanges: TaggedChange<TChange>,\n\t\t\tisRollback: boolean,\n\t\t\trevision: RevisionTag,\n\t\t): TChange => {\n\t\t\treturn withFallback(() => unmitigatedRebaser.invert(changes, isRollback, revision));\n\t\t},\n\t\trebase: (\n\t\t\tchange: TaggedChange<TChange>,\n\t\t\tover: TaggedChange<TChange>,\n\t\t\trevisionMetadata: RevisionMetadataSource,\n\t\t): TChange => {\n\t\t\treturn withFallback(() => unmitigatedRebaser.rebase(change, over, revisionMetadata));\n\t\t},\n\t\tgetRevisions: (change: TChange): Set<RevisionTag | undefined> => {\n\t\t\ttry {\n\t\t\t\treturn unmitigatedRebaser.getRevisions(change);\n\t\t\t} catch (error: unknown) {\n\t\t\t\tonError(error);\n\t\t\t\treturn new Set();\n\t\t\t}\n\t\t},\n\t\tchangeRevision: (change: TChange, replacer: RevisionReplacer): TChange =>\n\t\t\twithFallback(() => unmitigatedRebaser.changeRevision(change, replacer)),\n\t};\n}\n"]}