@fluidframework/tree 2.117.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1275) hide show
  1. package/CHANGELOG.md +385 -7
  2. package/README.md +55 -52
  3. package/{api-extractor.json → api-extractor/api-extractor-model.json} +1 -1
  4. package/api-report/tree.alpha.api.md +174 -146
  5. package/api-report/tree.beta.api.md +160 -91
  6. package/api-report/tree.legacy.beta.api.md +160 -91
  7. package/api-report/tree.legacy.public.api.md +26 -43
  8. package/api-report/tree.public.api.md +26 -43
  9. package/dist/api.d.ts +9 -1
  10. package/dist/api.d.ts.map +1 -1
  11. package/dist/api.js +2 -3
  12. package/dist/api.js.map +1 -1
  13. package/dist/codec/codec.d.ts +2 -2
  14. package/dist/codec/codec.d.ts.map +1 -1
  15. package/dist/codec/codec.js +9 -7
  16. package/dist/codec/codec.js.map +1 -1
  17. package/dist/codec/discriminatedUnions.js +1 -0
  18. package/dist/codec/discriminatedUnions.js.map +1 -1
  19. package/dist/codec/versioned/codec.d.ts.map +1 -1
  20. package/dist/codec/versioned/codec.js +4 -2
  21. package/dist/codec/versioned/codec.js.map +1 -1
  22. package/dist/componentApi.d.ts.map +1 -1
  23. package/dist/componentApi.js +20 -17
  24. package/dist/componentApi.js.map +1 -1
  25. package/dist/core/change-family/editBuilder.js +1 -0
  26. package/dist/core/change-family/editBuilder.js.map +1 -1
  27. package/dist/core/forest/editableForest.js +1 -2
  28. package/dist/core/forest/editableForest.js.map +1 -1
  29. package/dist/core/forest/forest.js +3 -3
  30. package/dist/core/forest/forest.js.map +1 -1
  31. package/dist/core/index.d.ts +2 -2
  32. package/dist/core/index.d.ts.map +1 -1
  33. package/dist/core/index.js +9 -5
  34. package/dist/core/index.js.map +1 -1
  35. package/dist/core/rebase/changeRebaser.js +5 -5
  36. package/dist/core/rebase/changeRebaser.js.map +1 -1
  37. package/dist/core/rebase/index.d.ts +1 -1
  38. package/dist/core/rebase/index.d.ts.map +1 -1
  39. package/dist/core/rebase/index.js +2 -1
  40. package/dist/core/rebase/index.js.map +1 -1
  41. package/dist/core/rebase/revisionTagCodec.d.ts +1 -1
  42. package/dist/core/rebase/revisionTagCodec.d.ts.map +1 -1
  43. package/dist/core/rebase/revisionTagCodec.js +3 -1
  44. package/dist/core/rebase/revisionTagCodec.js.map +1 -1
  45. package/dist/core/rebase/types.d.ts +12 -1
  46. package/dist/core/rebase/types.d.ts.map +1 -1
  47. package/dist/core/rebase/types.js +19 -15
  48. package/dist/core/rebase/types.js.map +1 -1
  49. package/dist/core/rebase/utils.js +9 -10
  50. package/dist/core/rebase/utils.js.map +1 -1
  51. package/dist/core/schema-stored/schema.js +9 -4
  52. package/dist/core/schema-stored/schema.js.map +1 -1
  53. package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  54. package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  55. package/dist/core/schema-stored/storedSchemaRepository.js +6 -4
  56. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  57. package/dist/core/tree/anchorSet.d.ts +1 -1
  58. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  59. package/dist/core/tree/anchorSet.js +62 -55
  60. package/dist/core/tree/anchorSet.js.map +1 -1
  61. package/dist/core/tree/chunk.js +2 -2
  62. package/dist/core/tree/chunk.js.map +1 -1
  63. package/dist/core/tree/cursor.js +12 -12
  64. package/dist/core/tree/cursor.js.map +1 -1
  65. package/dist/core/tree/deltaUtil.d.ts +34 -9
  66. package/dist/core/tree/deltaUtil.d.ts.map +1 -1
  67. package/dist/core/tree/deltaUtil.js +51 -17
  68. package/dist/core/tree/deltaUtil.js.map +1 -1
  69. package/dist/core/tree/detachedFieldIndex.js +23 -21
  70. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  71. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +10 -10
  72. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  73. package/dist/core/tree/detachedFieldIndexCodecCommon.js +1 -2
  74. package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  75. package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -2
  76. package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  77. package/dist/core/tree/detachedFieldIndexCodecV2.js +3 -2
  78. package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  79. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +3 -3
  80. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  81. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts +1 -1
  82. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
  83. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  84. package/dist/core/tree/index.d.ts +1 -1
  85. package/dist/core/tree/index.d.ts.map +1 -1
  86. package/dist/core/tree/index.js +7 -4
  87. package/dist/core/tree/index.js.map +1 -1
  88. package/dist/core/tree/mapTree.js +1 -2
  89. package/dist/core/tree/mapTree.js.map +1 -1
  90. package/dist/core/tree/pathTree.js +7 -8
  91. package/dist/core/tree/pathTree.js.map +1 -1
  92. package/dist/core/tree/persistedTreeTextFormat.d.ts +4 -4
  93. package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  94. package/dist/core/tree/sparseTree.js +17 -13
  95. package/dist/core/tree/sparseTree.js.map +1 -1
  96. package/dist/core/tree/treeTextFormat.js +4 -5
  97. package/dist/core/tree/treeTextFormat.js.map +1 -1
  98. package/dist/core/tree/types.js +3 -3
  99. package/dist/core/tree/types.js.map +1 -1
  100. package/dist/core/tree/visitDelta.js +1 -2
  101. package/dist/core/tree/visitDelta.js.map +1 -1
  102. package/dist/core/tree/visitorUtils.js +5 -6
  103. package/dist/core/tree/visitorUtils.js.map +1 -1
  104. package/dist/entrypoints/alpha.d.ts +1 -1
  105. package/dist/entrypoints/alpha.d.ts.map +1 -1
  106. package/dist/entrypoints/alpha.js +6 -4
  107. package/dist/entrypoints/alpha.js.map +1 -1
  108. package/dist/entrypoints/beta.d.ts +1 -1
  109. package/dist/entrypoints/beta.d.ts.map +1 -1
  110. package/dist/entrypoints/beta.js +2 -2
  111. package/dist/entrypoints/beta.js.map +1 -1
  112. package/dist/entrypoints/legacy.d.ts +1 -1
  113. package/dist/entrypoints/legacy.d.ts.map +1 -1
  114. package/dist/entrypoints/legacy.js +2 -2
  115. package/dist/entrypoints/legacy.js.map +1 -1
  116. package/dist/entrypoints/public.d.ts +1 -1
  117. package/dist/entrypoints/public.d.ts.map +1 -1
  118. package/dist/entrypoints/public.js +1 -2
  119. package/dist/entrypoints/public.js.map +1 -1
  120. package/dist/extensibleUnionNode.d.ts.map +1 -1
  121. package/dist/extensibleUnionNode.js +1 -1
  122. package/dist/extensibleUnionNode.js.map +1 -1
  123. package/dist/feature-libraries/changeAtomIdBTree.js +3 -4
  124. package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
  125. package/dist/feature-libraries/changeAtomIdCodec.js +1 -2
  126. package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
  127. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  128. package/dist/feature-libraries/chunked-forest/basicChunk.js +14 -1
  129. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  130. package/dist/feature-libraries/chunked-forest/chunkTree.js +28 -20
  131. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  132. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  133. package/dist/feature-libraries/chunked-forest/chunkedForest.js +22 -16
  134. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  135. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +9 -11
  136. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  137. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +15 -7
  138. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  139. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +7 -3
  140. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  141. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +3 -2
  142. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  143. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  144. package/dist/feature-libraries/chunked-forest/codec/codecs.js +2 -0
  145. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  146. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +33 -17
  147. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  148. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +2 -2
  149. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
  150. package/dist/feature-libraries/chunked-forest/codec/format/versions.js +2 -2
  151. package/dist/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -1
  152. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js +11 -2
  153. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  154. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +5 -6
  155. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  156. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +2 -3
  157. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  158. package/dist/feature-libraries/chunked-forest/sequenceChunk.js +1 -0
  159. package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  160. package/dist/feature-libraries/chunked-forest/uniformChunk.js +73 -15
  161. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  162. package/dist/feature-libraries/comparison-forest/comparisonForest.js +79 -79
  163. package/dist/feature-libraries/comparison-forest/comparisonForest.js.map +1 -1
  164. package/dist/feature-libraries/cursorComparator.d.ts +8 -0
  165. package/dist/feature-libraries/cursorComparator.d.ts.map +1 -1
  166. package/dist/feature-libraries/cursorComparator.js +43 -10
  167. package/dist/feature-libraries/cursorComparator.js.map +1 -1
  168. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +6 -3
  169. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  170. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +2 -2
  171. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  172. package/dist/feature-libraries/default-schema/mappedEditBuilder.js +2 -0
  173. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  174. package/dist/feature-libraries/deltaUtils.js +2 -3
  175. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  176. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +2 -0
  177. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  178. package/dist/feature-libraries/editableTreeBinder.js +1 -2
  179. package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
  180. package/dist/feature-libraries/flex-tree/context.js +19 -3
  181. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  182. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +2 -2
  183. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  184. package/dist/feature-libraries/flex-tree/lazyEntity.js +14 -14
  185. package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  186. package/dist/feature-libraries/flex-tree/lazyField.js +28 -30
  187. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  188. package/dist/feature-libraries/flex-tree/lazyNode.js +24 -23
  189. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  190. package/dist/feature-libraries/flex-tree/observer.js +2 -2
  191. package/dist/feature-libraries/flex-tree/observer.js.map +1 -1
  192. package/dist/feature-libraries/flex-tree/utilities.js +5 -5
  193. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  194. package/dist/feature-libraries/forest-summary/forestSummarizer.js +122 -117
  195. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  196. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +49 -32
  197. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  198. package/dist/feature-libraries/forest-summary/summaryTypes.js +2 -3
  199. package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
  200. package/dist/feature-libraries/index.d.ts +1 -1
  201. package/dist/feature-libraries/index.js.map +1 -1
  202. package/dist/feature-libraries/indexing/anchorTreeIndex.js +35 -31
  203. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  204. package/dist/feature-libraries/mapTreeCursor.js +6 -7
  205. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  206. package/dist/feature-libraries/mitigatedChangeFamily.js +2 -3
  207. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  208. package/dist/feature-libraries/modular-schema/comparison.js +6 -7
  209. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  210. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +4 -4
  211. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  212. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js +14 -12
  213. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
  214. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +63 -10
  215. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  216. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js +3 -3
  217. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  218. package/dist/feature-libraries/modular-schema/fieldKind.js +10 -0
  219. package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  220. package/dist/feature-libraries/modular-schema/filterEdits.d.ts +13 -0
  221. package/dist/feature-libraries/modular-schema/filterEdits.d.ts.map +1 -0
  222. package/dist/feature-libraries/modular-schema/filterEdits.js +51 -0
  223. package/dist/feature-libraries/modular-schema/filterEdits.js.map +1 -0
  224. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  225. package/dist/feature-libraries/modular-schema/genericFieldKind.js +7 -4
  226. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  227. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +1 -2
  228. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  229. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +2 -2
  230. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  231. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js +1 -2
  232. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  233. package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
  234. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  235. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  236. package/dist/feature-libraries/modular-schema/invert.d.ts +1 -1
  237. package/dist/feature-libraries/modular-schema/invert.d.ts.map +1 -1
  238. package/dist/feature-libraries/modular-schema/invert.js +5 -30
  239. package/dist/feature-libraries/modular-schema/invert.js.map +1 -1
  240. package/dist/feature-libraries/modular-schema/isNeverTree.js +4 -5
  241. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  242. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts +5 -7
  243. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
  244. package/dist/feature-libraries/modular-schema/minimizeModularChange.js +459 -10
  245. package/dist/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
  246. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +14 -15
  247. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  248. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -2
  249. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  250. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +2 -2
  251. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  252. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -10
  253. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  254. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +30 -97
  255. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  256. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +9 -9
  257. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  258. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +4 -4
  259. package/dist/feature-libraries/modular-schema/modularChangeTypes.js +1 -2
  260. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  261. package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts +13 -1
  262. package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -1
  263. package/dist/feature-libraries/modular-schema/modularChangeUtils.js +115 -12
  264. package/dist/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -1
  265. package/dist/feature-libraries/modular-schema/prune.d.ts +2 -3
  266. package/dist/feature-libraries/modular-schema/prune.d.ts.map +1 -1
  267. package/dist/feature-libraries/modular-schema/prune.js +25 -8
  268. package/dist/feature-libraries/modular-schema/prune.js.map +1 -1
  269. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js +1 -3
  270. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  271. package/dist/feature-libraries/node-identifier/nodeIdentifier.js +2 -2
  272. package/dist/feature-libraries/node-identifier/nodeIdentifier.js.map +1 -1
  273. package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js +3 -3
  274. package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -1
  275. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  276. package/dist/feature-libraries/object-forest/objectForest.js +274 -267
  277. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  278. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  279. package/dist/feature-libraries/optional-field/optionalField.js +27 -35
  280. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  281. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +7 -7
  282. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  283. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +8 -8
  284. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  285. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +1 -2
  286. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  287. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  288. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +1 -2
  289. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  290. package/dist/feature-libraries/schema-index/schemaSummarizer.js +3 -0
  291. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  292. package/dist/feature-libraries/schemaChecker.d.ts +9 -19
  293. package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
  294. package/dist/feature-libraries/schemaChecker.js +135 -51
  295. package/dist/feature-libraries/schemaChecker.js.map +1 -1
  296. package/dist/feature-libraries/sequence-field/compose.js +8 -2
  297. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  298. package/dist/feature-libraries/sequence-field/filterEdits.d.ts +3 -3
  299. package/dist/feature-libraries/sequence-field/filterEdits.d.ts.map +1 -1
  300. package/dist/feature-libraries/sequence-field/filterEdits.js +29 -11
  301. package/dist/feature-libraries/sequence-field/filterEdits.js.map +1 -1
  302. package/dist/feature-libraries/sequence-field/formatV1.d.ts +102 -102
  303. package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  304. package/dist/feature-libraries/sequence-field/formatV2.d.ts +79 -79
  305. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  306. package/dist/feature-libraries/sequence-field/formatV3.d.ts +56 -56
  307. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  308. package/dist/feature-libraries/sequence-field/invert.js +1 -2
  309. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  310. package/dist/feature-libraries/sequence-field/markListFactory.js +3 -4
  311. package/dist/feature-libraries/sequence-field/markListFactory.js.map +1 -1
  312. package/dist/feature-libraries/sequence-field/markQueue.js +4 -2
  313. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  314. package/dist/feature-libraries/sequence-field/moveEffectTable.js +9 -9
  315. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  316. package/dist/feature-libraries/sequence-field/prune.js +1 -2
  317. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  318. package/dist/feature-libraries/sequence-field/rebase.js +7 -2
  319. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  320. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +1 -2
  321. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  322. package/dist/feature-libraries/sequence-field/replaceRevisions.js +1 -2
  323. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  324. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +2 -3
  325. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  326. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +1 -2
  327. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  328. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  329. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +9 -9
  330. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  331. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +1 -2
  332. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  333. package/dist/feature-libraries/sequence-field/utils.d.ts +2 -2
  334. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  335. package/dist/feature-libraries/sequence-field/utils.js +54 -67
  336. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  337. package/dist/feature-libraries/treeCursorUtils.js +19 -15
  338. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  339. package/dist/feature-libraries/treeTextCursor.js +8 -8
  340. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  341. package/dist/feature-libraries/valueUtilities.js +4 -5
  342. package/dist/feature-libraries/valueUtilities.js.map +1 -1
  343. package/dist/index.d.ts +4 -29
  344. package/dist/index.d.ts.map +1 -1
  345. package/dist/index.js +6 -9
  346. package/dist/index.js.map +1 -1
  347. package/dist/internalTypes.d.ts +1 -1
  348. package/dist/internalTypes.d.ts.map +1 -1
  349. package/dist/internalTypes.js.map +1 -1
  350. package/dist/packageVersion.d.ts +1 -1
  351. package/dist/packageVersion.d.ts.map +1 -1
  352. package/dist/packageVersion.js +1 -1
  353. package/dist/packageVersion.js.map +1 -1
  354. package/dist/serializableDomainSchema.d.ts +1 -1
  355. package/dist/shared-tree/history.d.ts.map +1 -1
  356. package/dist/shared-tree/history.js +32 -13
  357. package/dist/shared-tree/history.js.map +1 -1
  358. package/dist/shared-tree/independentView.d.ts +27 -3
  359. package/dist/shared-tree/independentView.d.ts.map +1 -1
  360. package/dist/shared-tree/independentView.js +36 -7
  361. package/dist/shared-tree/independentView.js.map +1 -1
  362. package/dist/shared-tree/index.d.ts +2 -1
  363. package/dist/shared-tree/index.d.ts.map +1 -1
  364. package/dist/shared-tree/index.js +6 -2
  365. package/dist/shared-tree/index.js.map +1 -1
  366. package/dist/shared-tree/isAuditableFromOutcome.js +1 -2
  367. package/dist/shared-tree/isAuditableFromOutcome.js.map +1 -1
  368. package/dist/shared-tree/schematizeTree.js +3 -4
  369. package/dist/shared-tree/schematizeTree.js.map +1 -1
  370. package/dist/shared-tree/schematizingTreeView.d.ts +14 -4
  371. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  372. package/dist/shared-tree/schematizingTreeView.js +107 -37
  373. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  374. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  375. package/dist/shared-tree/sharedTree.js +28 -19
  376. package/dist/shared-tree/sharedTree.js.map +1 -1
  377. package/dist/shared-tree/sharedTreeChangeCodecs.js +3 -3
  378. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  379. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  380. package/dist/shared-tree/sharedTreeChangeEnricher.js +12 -4
  381. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  382. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  383. package/dist/shared-tree/sharedTreeChangeFamily.js +11 -8
  384. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  385. package/dist/shared-tree/sharedTreeChangeFormat.js +2 -3
  386. package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  387. package/dist/shared-tree/sharedTreeEditBuilder.js +2 -0
  388. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  389. package/dist/shared-tree/transactionMinimize.d.ts.map +1 -1
  390. package/dist/shared-tree/transactionMinimize.js +2 -1
  391. package/dist/shared-tree/transactionMinimize.js.map +1 -1
  392. package/dist/shared-tree/transactionPostProcessor.js +2 -3
  393. package/dist/shared-tree/transactionPostProcessor.js.map +1 -1
  394. package/dist/shared-tree/tree.js +2 -2
  395. package/dist/shared-tree/tree.js.map +1 -1
  396. package/dist/shared-tree/treeAlpha.d.ts +5 -16
  397. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  398. package/dist/shared-tree/treeAlpha.js +18 -11
  399. package/dist/shared-tree/treeAlpha.js.map +1 -1
  400. package/{lib/simple-tree/api → dist/shared-tree}/treeBeta.d.ts +8 -65
  401. package/dist/shared-tree/treeBeta.d.ts.map +1 -0
  402. package/dist/shared-tree/treeBeta.js +70 -0
  403. package/dist/shared-tree/treeBeta.js.map +1 -0
  404. package/dist/shared-tree/treeCheckout.d.ts +5 -0
  405. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  406. package/dist/shared-tree/treeCheckout.js +986 -907
  407. package/dist/shared-tree/treeCheckout.js.map +1 -1
  408. package/dist/shared-tree/unhydratedTreeContext.js +3 -4
  409. package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
  410. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  411. package/dist/shared-tree-core/branch.js +24 -20
  412. package/dist/shared-tree-core/branch.js.map +1 -1
  413. package/dist/shared-tree-core/branchCommitCounter.js +35 -32
  414. package/dist/shared-tree-core/branchCommitCounter.js.map +1 -1
  415. package/dist/shared-tree-core/branchCommitEnricher.js +9 -8
  416. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  417. package/dist/shared-tree-core/branchIdCodec.js +2 -3
  418. package/dist/shared-tree-core/branchIdCodec.js.map +1 -1
  419. package/dist/shared-tree-core/customMetadataCodec.js +2 -3
  420. package/dist/shared-tree-core/customMetadataCodec.js.map +1 -1
  421. package/dist/shared-tree-core/customMetadataFormat.d.ts.map +1 -1
  422. package/dist/shared-tree-core/defaultResubmitMachine.js +11 -9
  423. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  424. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  425. package/dist/shared-tree-core/editManager.js +73 -44
  426. package/dist/shared-tree-core/editManager.js.map +1 -1
  427. package/dist/shared-tree-core/editManagerCodecs.js +3 -3
  428. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  429. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
  430. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  431. package/dist/shared-tree-core/editManagerCodecsCommons.js +33 -36
  432. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  433. package/dist/shared-tree-core/editManagerCodecsV1toV4.js +1 -2
  434. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  435. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -2
  436. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  437. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +11 -11
  438. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  439. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +5 -4
  440. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  441. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +10 -9
  442. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  443. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  444. package/dist/shared-tree-core/editManagerSummarizer.js +6 -1
  445. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  446. package/dist/shared-tree-core/messageCodecV1ToV4.js +1 -2
  447. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  448. package/dist/shared-tree-core/messageCodecVSharedBranches.js +1 -2
  449. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  450. package/dist/shared-tree-core/messageCodecs.js +3 -3
  451. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  452. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
  453. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  454. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +3 -2
  455. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  456. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  457. package/dist/shared-tree-core/sharedTreeCore.js +44 -22
  458. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  459. package/dist/shared-tree-core/summaryTypes.js +2 -2
  460. package/dist/shared-tree-core/summaryTypes.js.map +1 -1
  461. package/dist/shared-tree-core/transaction.js +36 -39
  462. package/dist/shared-tree-core/transaction.js.map +1 -1
  463. package/dist/shared-tree-core/versionedSummarizer.js +4 -0
  464. package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
  465. package/dist/simple-tree/api/cloneTree.d.ts +11 -0
  466. package/dist/simple-tree/api/cloneTree.d.ts.map +1 -0
  467. package/dist/simple-tree/api/cloneTree.js +31 -0
  468. package/dist/simple-tree/api/cloneTree.js.map +1 -0
  469. package/dist/simple-tree/api/conciseTree.js +2 -3
  470. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  471. package/dist/simple-tree/api/configuration.d.ts +4 -4
  472. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  473. package/dist/simple-tree/api/configuration.js +21 -2
  474. package/dist/simple-tree/api/configuration.js.map +1 -1
  475. package/dist/simple-tree/api/create.js +2 -3
  476. package/dist/simple-tree/api/create.js.map +1 -1
  477. package/dist/simple-tree/api/customTree.js +6 -6
  478. package/dist/simple-tree/api/customTree.js.map +1 -1
  479. package/dist/simple-tree/api/dirtyIndex.js +1 -2
  480. package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
  481. package/dist/simple-tree/api/discrepancies.d.ts +36 -3
  482. package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
  483. package/dist/simple-tree/api/discrepancies.js +42 -17
  484. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  485. package/dist/simple-tree/api/eraseSchemaDetails.js +2 -3
  486. package/dist/simple-tree/api/eraseSchemaDetails.js.map +1 -1
  487. package/dist/simple-tree/api/getJsonSchema.js +1 -2
  488. package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
  489. package/dist/simple-tree/api/getSimpleSchema.js +1 -2
  490. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  491. package/dist/simple-tree/api/identifierIndex.js +1 -2
  492. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  493. package/dist/simple-tree/api/incrementalAllowedTypes.js +2 -2
  494. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  495. package/dist/simple-tree/api/index.d.ts +5 -4
  496. package/dist/simple-tree/api/index.d.ts.map +1 -1
  497. package/dist/simple-tree/api/index.js +5 -7
  498. package/dist/simple-tree/api/index.js.map +1 -1
  499. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +22 -3
  500. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  501. package/dist/simple-tree/api/schemaCompatibilityTester.js +140 -11
  502. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  503. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +3 -7
  504. package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  505. package/dist/simple-tree/api/schemaCreationUtilities.js +6 -9
  506. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  507. package/dist/simple-tree/api/schemaFactory.d.ts +4 -9
  508. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  509. package/dist/simple-tree/api/schemaFactory.js +13 -12
  510. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  511. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +20 -22
  512. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  513. package/dist/simple-tree/api/schemaFactoryAlpha.js +78 -81
  514. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  515. package/dist/simple-tree/api/schemaFactoryBeta.d.ts +7 -9
  516. package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  517. package/dist/simple-tree/api/schemaFactoryBeta.js +32 -35
  518. package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  519. package/dist/simple-tree/api/schemaFactoryRecursive.js +1 -2
  520. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  521. package/dist/simple-tree/api/schemaFromSimple.js +1 -2
  522. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  523. package/dist/simple-tree/api/schemaStatics.d.ts +7 -7
  524. package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
  525. package/dist/simple-tree/api/simpleSchemaCodec.js +2 -3
  526. package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  527. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +2 -3
  528. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  529. package/dist/simple-tree/api/simpleTreeIndex.js +1 -2
  530. package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
  531. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +46 -2
  532. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  533. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +54 -12
  534. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  535. package/dist/simple-tree/api/storedSchema.js +2 -3
  536. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  537. package/dist/simple-tree/api/transactionTypes.d.ts +4 -4
  538. package/dist/simple-tree/api/transactionTypes.js.map +1 -1
  539. package/dist/simple-tree/api/tree.d.ts +243 -58
  540. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  541. package/dist/simple-tree/api/tree.js +3 -5
  542. package/dist/simple-tree/api/tree.js.map +1 -1
  543. package/dist/simple-tree/api/treeChangeEvents.d.ts +16 -4
  544. package/dist/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
  545. package/dist/simple-tree/api/treeChangeEvents.js.map +1 -1
  546. package/dist/simple-tree/api/treeChangeEventsBeta.d.ts +209 -0
  547. package/dist/simple-tree/api/treeChangeEventsBeta.d.ts.map +1 -0
  548. package/dist/simple-tree/api/{treeAlpha.js → treeChangeEventsBeta.js} +1 -1
  549. package/dist/simple-tree/api/treeChangeEventsBeta.js.map +1 -0
  550. package/dist/simple-tree/api/treeNodeApi.d.ts +1 -75
  551. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  552. package/dist/simple-tree/api/treeNodeApi.js +7 -7
  553. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  554. package/dist/simple-tree/api/typesUnsafe.d.ts +8 -6
  555. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  556. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  557. package/dist/simple-tree/api/verboseTree.js +5 -6
  558. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  559. package/dist/simple-tree/core/allowedTypes.js +22 -13
  560. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  561. package/dist/simple-tree/core/context.js +3 -0
  562. package/dist/simple-tree/core/context.js.map +1 -1
  563. package/dist/simple-tree/core/flexList.js +2 -3
  564. package/dist/simple-tree/core/flexList.js.map +1 -1
  565. package/dist/simple-tree/core/getOrCreateNode.js +2 -3
  566. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
  567. package/dist/simple-tree/core/index.d.ts +1 -1
  568. package/dist/simple-tree/core/index.d.ts.map +1 -1
  569. package/dist/simple-tree/core/index.js +2 -2
  570. package/dist/simple-tree/core/index.js.map +1 -1
  571. package/dist/simple-tree/core/toStored.d.ts +7 -0
  572. package/dist/simple-tree/core/toStored.d.ts.map +1 -1
  573. package/dist/simple-tree/core/toStored.js.map +1 -1
  574. package/dist/simple-tree/core/treeNode.d.ts +3 -4
  575. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  576. package/dist/simple-tree/core/treeNode.js +31 -32
  577. package/dist/simple-tree/core/treeNode.js.map +1 -1
  578. package/dist/simple-tree/core/treeNodeKernel.js +194 -192
  579. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  580. package/dist/simple-tree/core/treeNodeSchema.js +3 -3
  581. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  582. package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  583. package/dist/simple-tree/core/treeNodeValid.js +25 -25
  584. package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
  585. package/dist/simple-tree/core/types.js +1 -2
  586. package/dist/simple-tree/core/types.js.map +1 -1
  587. package/dist/simple-tree/core/unhydratedFlexTree.js +177 -150
  588. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  589. package/dist/simple-tree/core/walkSchema.js +2 -3
  590. package/dist/simple-tree/core/walkSchema.js.map +1 -1
  591. package/dist/simple-tree/core/withType.d.ts +7 -9
  592. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  593. package/dist/simple-tree/core/withType.js +6 -7
  594. package/dist/simple-tree/core/withType.js.map +1 -1
  595. package/dist/simple-tree/createContext.js +2 -3
  596. package/dist/simple-tree/createContext.js.map +1 -1
  597. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  598. package/dist/simple-tree/fieldSchema.js +33 -15
  599. package/dist/simple-tree/fieldSchema.js.map +1 -1
  600. package/dist/simple-tree/getTreeNodeForField.js +1 -2
  601. package/dist/simple-tree/getTreeNodeForField.js.map +1 -1
  602. package/dist/simple-tree/index.d.ts +2 -2
  603. package/dist/simple-tree/index.d.ts.map +1 -1
  604. package/dist/simple-tree/index.js +6 -8
  605. package/dist/simple-tree/index.js.map +1 -1
  606. package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
  607. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  608. package/dist/simple-tree/leafNodeSchema.js +18 -17
  609. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  610. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +3 -2
  611. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  612. package/dist/simple-tree/node-kinds/array/arrayNode.js +31 -33
  613. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  614. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  615. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js +2 -2
  616. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  617. package/dist/simple-tree/node-kinds/common.js +1 -2
  618. package/dist/simple-tree/node-kinds/common.js.map +1 -1
  619. package/dist/simple-tree/node-kinds/map/mapNode.d.ts +6 -6
  620. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  621. package/dist/simple-tree/node-kinds/map/mapNode.js +10 -16
  622. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  623. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  624. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js +2 -2
  625. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  626. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  627. package/dist/simple-tree/node-kinds/object/objectNode.js +27 -28
  628. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  629. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +1 -1
  630. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  631. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js +2 -2
  632. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  633. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  634. package/dist/simple-tree/node-kinds/record/recordNode.js +10 -13
  635. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  636. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -2
  637. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  638. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js +2 -2
  639. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  640. package/dist/simple-tree/prepareForInsertion.js +4 -5
  641. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  642. package/dist/simple-tree/toStoredSchema.js +11 -11
  643. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  644. package/dist/simple-tree/treeSchema.js +1 -2
  645. package/dist/simple-tree/treeSchema.js.map +1 -1
  646. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +3 -4
  647. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  648. package/dist/simple-tree/walkFieldSchema.js +1 -2
  649. package/dist/simple-tree/walkFieldSchema.js.map +1 -1
  650. package/dist/tableSchema.d.ts +2 -87
  651. package/dist/tableSchema.d.ts.map +1 -1
  652. package/dist/tableSchema.js +309 -275
  653. package/dist/tableSchema.js.map +1 -1
  654. package/dist/text/codePointUtils.d.ts +16 -3
  655. package/dist/text/codePointUtils.d.ts.map +1 -1
  656. package/dist/text/codePointUtils.js +24 -13
  657. package/dist/text/codePointUtils.js.map +1 -1
  658. package/dist/text/textDomain.d.ts +7 -1
  659. package/dist/text/textDomain.d.ts.map +1 -1
  660. package/dist/text/textDomain.js +32 -28
  661. package/dist/text/textDomain.js.map +1 -1
  662. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  663. package/dist/text/textDomainFormatted.js +45 -34
  664. package/dist/text/textDomainFormatted.js.map +1 -1
  665. package/dist/text/textDomainFormattedDefault.js +2 -5
  666. package/dist/text/textDomainFormattedDefault.js.map +1 -1
  667. package/dist/treeDataStore.js +2 -3
  668. package/dist/treeDataStore.js.map +1 -1
  669. package/dist/treeFactory.js +7 -7
  670. package/dist/treeFactory.js.map +1 -1
  671. package/dist/util/arrayUtilities.js +5 -6
  672. package/dist/util/arrayUtilities.js.map +1 -1
  673. package/dist/util/bTreeUtils.js +3 -4
  674. package/dist/util/bTreeUtils.js.map +1 -1
  675. package/dist/util/brand.js +6 -5
  676. package/dist/util/brand.js.map +1 -1
  677. package/dist/util/brandedMap.js +2 -3
  678. package/dist/util/brandedMap.js.map +1 -1
  679. package/dist/util/breakable.d.ts.map +1 -1
  680. package/dist/util/breakable.js +7 -4
  681. package/dist/util/breakable.js.map +1 -1
  682. package/dist/util/cloneWithReplacements.js +1 -2
  683. package/dist/util/cloneWithReplacements.js.map +1 -1
  684. package/dist/util/compressedIds.js +29 -7
  685. package/dist/util/compressedIds.js.map +1 -1
  686. package/dist/util/idAllocator.js +3 -3
  687. package/dist/util/idAllocator.js.map +1 -1
  688. package/dist/util/nestedMap.js +15 -17
  689. package/dist/util/nestedMap.js.map +1 -1
  690. package/dist/util/nestedSet.js +2 -3
  691. package/dist/util/nestedSet.js.map +1 -1
  692. package/dist/util/offsetList.js +2 -4
  693. package/dist/util/offsetList.js.map +1 -1
  694. package/dist/util/opaque.js +2 -3
  695. package/dist/util/opaque.js.map +1 -1
  696. package/dist/util/rangeMap.js +6 -2
  697. package/dist/util/rangeMap.js.map +1 -1
  698. package/dist/util/readSnapshotBlob.d.ts.map +1 -1
  699. package/dist/util/referenceCounting.js +1 -0
  700. package/dist/util/referenceCounting.js.map +1 -1
  701. package/dist/util/stackyIterator.js +3 -2
  702. package/dist/util/stackyIterator.js.map +1 -1
  703. package/dist/util/typeUtils.js +1 -2
  704. package/dist/util/typeUtils.js.map +1 -1
  705. package/dist/util/typeboxBrand.js +2 -3
  706. package/dist/util/typeboxBrand.js.map +1 -1
  707. package/dist/util/utils.d.ts +2 -2
  708. package/dist/util/utils.d.ts.map +1 -1
  709. package/dist/util/utils.js +32 -32
  710. package/dist/util/utils.js.map +1 -1
  711. package/lib/api.d.ts +9 -1
  712. package/lib/api.d.ts.map +1 -1
  713. package/lib/api.js.map +1 -1
  714. package/lib/codec/codec.d.ts +2 -2
  715. package/lib/codec/codec.d.ts.map +1 -1
  716. package/lib/codec/codec.js +2 -0
  717. package/lib/codec/codec.js.map +1 -1
  718. package/lib/codec/discriminatedUnions.js +1 -0
  719. package/lib/codec/discriminatedUnions.js.map +1 -1
  720. package/lib/codec/versioned/codec.d.ts.map +1 -1
  721. package/lib/codec/versioned/codec.js +2 -0
  722. package/lib/codec/versioned/codec.js.map +1 -1
  723. package/lib/componentApi.d.ts.map +1 -1
  724. package/lib/componentApi.js +20 -17
  725. package/lib/componentApi.js.map +1 -1
  726. package/lib/core/change-family/editBuilder.js +1 -0
  727. package/lib/core/change-family/editBuilder.js.map +1 -1
  728. package/lib/core/index.d.ts +2 -2
  729. package/lib/core/index.d.ts.map +1 -1
  730. package/lib/core/index.js +2 -2
  731. package/lib/core/index.js.map +1 -1
  732. package/lib/core/rebase/index.d.ts +1 -1
  733. package/lib/core/rebase/index.d.ts.map +1 -1
  734. package/lib/core/rebase/index.js +1 -1
  735. package/lib/core/rebase/index.js.map +1 -1
  736. package/lib/core/rebase/revisionTagCodec.js +3 -1
  737. package/lib/core/rebase/revisionTagCodec.js.map +1 -1
  738. package/lib/core/rebase/types.d.ts +12 -1
  739. package/lib/core/rebase/types.d.ts.map +1 -1
  740. package/lib/core/rebase/types.js +3 -0
  741. package/lib/core/rebase/types.js.map +1 -1
  742. package/lib/core/schema-stored/schema.js +5 -0
  743. package/lib/core/schema-stored/schema.js.map +1 -1
  744. package/lib/core/schema-stored/storedSchemaRepository.js +4 -2
  745. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  746. package/lib/core/tree/anchorSet.js +61 -54
  747. package/lib/core/tree/anchorSet.js.map +1 -1
  748. package/lib/core/tree/deltaUtil.d.ts +34 -9
  749. package/lib/core/tree/deltaUtil.d.ts.map +1 -1
  750. package/lib/core/tree/deltaUtil.js +41 -10
  751. package/lib/core/tree/deltaUtil.js.map +1 -1
  752. package/lib/core/tree/detachedFieldIndex.js +23 -21
  753. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  754. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +10 -10
  755. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  756. package/lib/core/tree/detachedFieldIndexCodecV1.js +2 -0
  757. package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  758. package/lib/core/tree/detachedFieldIndexCodecV2.js +2 -0
  759. package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  760. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +3 -3
  761. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  762. package/lib/core/tree/index.d.ts +1 -1
  763. package/lib/core/tree/index.d.ts.map +1 -1
  764. package/lib/core/tree/index.js +1 -1
  765. package/lib/core/tree/index.js.map +1 -1
  766. package/lib/core/tree/persistedTreeTextFormat.d.ts +4 -4
  767. package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  768. package/lib/core/tree/sparseTree.js +15 -11
  769. package/lib/core/tree/sparseTree.js.map +1 -1
  770. package/lib/entrypoints/alpha.d.ts +1 -1
  771. package/lib/entrypoints/alpha.d.ts.map +1 -1
  772. package/lib/entrypoints/alpha.js +1 -1
  773. package/lib/entrypoints/alpha.js.map +1 -1
  774. package/lib/entrypoints/beta.d.ts +1 -1
  775. package/lib/entrypoints/beta.d.ts.map +1 -1
  776. package/lib/entrypoints/beta.js +1 -1
  777. package/lib/entrypoints/beta.js.map +1 -1
  778. package/lib/entrypoints/legacy.d.ts +1 -1
  779. package/lib/entrypoints/legacy.d.ts.map +1 -1
  780. package/lib/entrypoints/legacy.js +1 -1
  781. package/lib/entrypoints/legacy.js.map +1 -1
  782. package/lib/entrypoints/public.d.ts +1 -1
  783. package/lib/entrypoints/public.d.ts.map +1 -1
  784. package/lib/entrypoints/public.js +1 -1
  785. package/lib/entrypoints/public.js.map +1 -1
  786. package/lib/extensibleUnionNode.d.ts.map +1 -1
  787. package/lib/extensibleUnionNode.js +2 -2
  788. package/lib/extensibleUnionNode.js.map +1 -1
  789. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  790. package/lib/feature-libraries/chunked-forest/basicChunk.js +14 -1
  791. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  792. package/lib/feature-libraries/chunked-forest/chunkTree.js +14 -6
  793. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  794. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  795. package/lib/feature-libraries/chunked-forest/chunkedForest.js +18 -12
  796. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  797. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +1 -3
  798. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  799. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +8 -0
  800. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  801. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +4 -0
  802. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  803. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +1 -0
  804. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  805. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  806. package/lib/feature-libraries/chunked-forest/codec/codecs.js +2 -0
  807. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  808. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +28 -12
  809. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  810. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +2 -2
  811. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
  812. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js +9 -0
  813. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  814. package/lib/feature-libraries/chunked-forest/sequenceChunk.js +1 -0
  815. package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  816. package/lib/feature-libraries/chunked-forest/uniformChunk.js +71 -13
  817. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  818. package/lib/feature-libraries/comparison-forest/comparisonForest.js +79 -79
  819. package/lib/feature-libraries/comparison-forest/comparisonForest.js.map +1 -1
  820. package/lib/feature-libraries/cursorComparator.d.ts +8 -0
  821. package/lib/feature-libraries/cursorComparator.d.ts.map +1 -1
  822. package/lib/feature-libraries/cursorComparator.js +43 -9
  823. package/lib/feature-libraries/cursorComparator.js.map +1 -1
  824. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +3 -0
  825. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  826. package/lib/feature-libraries/default-schema/mappedEditBuilder.js +2 -0
  827. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  828. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +2 -0
  829. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  830. package/lib/feature-libraries/flex-tree/context.js +19 -3
  831. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  832. package/lib/feature-libraries/flex-tree/lazyEntity.js +12 -12
  833. package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  834. package/lib/feature-libraries/flex-tree/lazyField.js +25 -27
  835. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  836. package/lib/feature-libraries/flex-tree/lazyNode.js +22 -21
  837. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  838. package/lib/feature-libraries/forest-summary/forestSummarizer.js +122 -117
  839. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  840. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +49 -32
  841. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  842. package/lib/feature-libraries/index.d.ts +1 -1
  843. package/lib/feature-libraries/index.js.map +1 -1
  844. package/lib/feature-libraries/indexing/anchorTreeIndex.js +33 -29
  845. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  846. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js +14 -12
  847. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
  848. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +63 -10
  849. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  850. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  851. package/lib/feature-libraries/modular-schema/fieldKind.js +10 -0
  852. package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  853. package/lib/feature-libraries/modular-schema/filterEdits.d.ts +13 -0
  854. package/lib/feature-libraries/modular-schema/filterEdits.d.ts.map +1 -0
  855. package/lib/feature-libraries/modular-schema/filterEdits.js +46 -0
  856. package/lib/feature-libraries/modular-schema/filterEdits.js.map +1 -0
  857. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  858. package/lib/feature-libraries/modular-schema/genericFieldKind.js +5 -2
  859. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  860. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +2 -2
  861. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  862. package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
  863. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  864. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  865. package/lib/feature-libraries/modular-schema/invert.d.ts +1 -1
  866. package/lib/feature-libraries/modular-schema/invert.d.ts.map +1 -1
  867. package/lib/feature-libraries/modular-schema/invert.js +6 -30
  868. package/lib/feature-libraries/modular-schema/invert.js.map +1 -1
  869. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts +5 -7
  870. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
  871. package/lib/feature-libraries/modular-schema/minimizeModularChange.js +458 -8
  872. package/lib/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
  873. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -10
  874. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  875. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +20 -85
  876. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  877. package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts +13 -1
  878. package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -1
  879. package/lib/feature-libraries/modular-schema/modularChangeUtils.js +100 -3
  880. package/lib/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -1
  881. package/lib/feature-libraries/modular-schema/prune.d.ts +2 -3
  882. package/lib/feature-libraries/modular-schema/prune.d.ts.map +1 -1
  883. package/lib/feature-libraries/modular-schema/prune.js +25 -7
  884. package/lib/feature-libraries/modular-schema/prune.js.map +1 -1
  885. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js +1 -3
  886. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  887. package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js +1 -0
  888. package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -1
  889. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  890. package/lib/feature-libraries/object-forest/objectForest.js +273 -266
  891. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  892. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  893. package/lib/feature-libraries/optional-field/optionalField.js +24 -32
  894. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  895. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +1 -1
  896. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  897. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +1 -1
  898. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  899. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  900. package/lib/feature-libraries/schema-index/schemaSummarizer.js +3 -0
  901. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  902. package/lib/feature-libraries/schemaChecker.d.ts +9 -19
  903. package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
  904. package/lib/feature-libraries/schemaChecker.js +133 -49
  905. package/lib/feature-libraries/schemaChecker.js.map +1 -1
  906. package/lib/feature-libraries/sequence-field/compose.js +6 -0
  907. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  908. package/lib/feature-libraries/sequence-field/filterEdits.d.ts +3 -3
  909. package/lib/feature-libraries/sequence-field/filterEdits.d.ts.map +1 -1
  910. package/lib/feature-libraries/sequence-field/filterEdits.js +31 -12
  911. package/lib/feature-libraries/sequence-field/filterEdits.js.map +1 -1
  912. package/lib/feature-libraries/sequence-field/formatV1.d.ts +3 -3
  913. package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  914. package/lib/feature-libraries/sequence-field/formatV2.d.ts +3 -3
  915. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  916. package/lib/feature-libraries/sequence-field/formatV3.d.ts +2 -2
  917. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  918. package/lib/feature-libraries/sequence-field/markListFactory.js +3 -4
  919. package/lib/feature-libraries/sequence-field/markListFactory.js.map +1 -1
  920. package/lib/feature-libraries/sequence-field/markQueue.js +4 -2
  921. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  922. package/lib/feature-libraries/sequence-field/rebase.js +6 -0
  923. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  924. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  925. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +9 -9
  926. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  927. package/lib/feature-libraries/sequence-field/utils.d.ts +2 -2
  928. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  929. package/lib/feature-libraries/sequence-field/utils.js +3 -15
  930. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  931. package/lib/feature-libraries/treeCursorUtils.js +13 -9
  932. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  933. package/lib/index.d.ts +4 -29
  934. package/lib/index.d.ts.map +1 -1
  935. package/lib/index.js +2 -17
  936. package/lib/index.js.map +1 -1
  937. package/lib/internalTypes.d.ts +1 -1
  938. package/lib/internalTypes.d.ts.map +1 -1
  939. package/lib/internalTypes.js.map +1 -1
  940. package/lib/packageVersion.d.ts +1 -1
  941. package/lib/packageVersion.d.ts.map +1 -1
  942. package/lib/packageVersion.js +1 -1
  943. package/lib/packageVersion.js.map +1 -1
  944. package/lib/serializableDomainSchema.d.ts +1 -1
  945. package/lib/shared-tree/history.d.ts.map +1 -1
  946. package/lib/shared-tree/history.js +32 -13
  947. package/lib/shared-tree/history.js.map +1 -1
  948. package/lib/shared-tree/independentView.d.ts +27 -3
  949. package/lib/shared-tree/independentView.d.ts.map +1 -1
  950. package/lib/shared-tree/independentView.js +30 -2
  951. package/lib/shared-tree/independentView.js.map +1 -1
  952. package/lib/shared-tree/index.d.ts +2 -1
  953. package/lib/shared-tree/index.d.ts.map +1 -1
  954. package/lib/shared-tree/index.js +2 -1
  955. package/lib/shared-tree/index.js.map +1 -1
  956. package/lib/shared-tree/schematizingTreeView.d.ts +14 -4
  957. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  958. package/lib/shared-tree/schematizingTreeView.js +109 -39
  959. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  960. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  961. package/lib/shared-tree/sharedTree.js +24 -15
  962. package/lib/shared-tree/sharedTree.js.map +1 -1
  963. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  964. package/lib/shared-tree/sharedTreeChangeEnricher.js +12 -4
  965. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  966. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  967. package/lib/shared-tree/sharedTreeChangeFamily.js +6 -3
  968. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  969. package/lib/shared-tree/sharedTreeEditBuilder.js +2 -0
  970. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  971. package/lib/shared-tree/transactionMinimize.d.ts.map +1 -1
  972. package/lib/shared-tree/transactionMinimize.js +4 -3
  973. package/lib/shared-tree/transactionMinimize.js.map +1 -1
  974. package/lib/shared-tree/treeAlpha.d.ts +5 -16
  975. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  976. package/lib/shared-tree/treeAlpha.js +13 -6
  977. package/lib/shared-tree/treeAlpha.js.map +1 -1
  978. package/{dist/simple-tree/api → lib/shared-tree}/treeBeta.d.ts +8 -65
  979. package/lib/shared-tree/treeBeta.d.ts.map +1 -0
  980. package/lib/shared-tree/treeBeta.js +64 -0
  981. package/lib/shared-tree/treeBeta.js.map +1 -0
  982. package/lib/shared-tree/treeCheckout.d.ts +5 -0
  983. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  984. package/lib/shared-tree/treeCheckout.js +985 -906
  985. package/lib/shared-tree/treeCheckout.js.map +1 -1
  986. package/lib/shared-tree/unhydratedTreeContext.js +3 -4
  987. package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
  988. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  989. package/lib/shared-tree-core/branch.js +22 -18
  990. package/lib/shared-tree-core/branch.js.map +1 -1
  991. package/lib/shared-tree-core/branchCommitCounter.js +35 -32
  992. package/lib/shared-tree-core/branchCommitCounter.js.map +1 -1
  993. package/lib/shared-tree-core/branchCommitEnricher.js +9 -8
  994. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  995. package/lib/shared-tree-core/customMetadataFormat.d.ts.map +1 -1
  996. package/lib/shared-tree-core/defaultResubmitMachine.js +11 -9
  997. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  998. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  999. package/lib/shared-tree-core/editManager.js +73 -44
  1000. package/lib/shared-tree-core/editManager.js.map +1 -1
  1001. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
  1002. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  1003. package/lib/shared-tree-core/editManagerCodecsCommons.js +32 -34
  1004. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  1005. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  1006. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  1007. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +4 -4
  1008. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  1009. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -1
  1010. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  1011. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +2 -1
  1012. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  1013. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  1014. package/lib/shared-tree-core/editManagerSummarizer.js +6 -1
  1015. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  1016. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -1
  1017. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  1018. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +2 -1
  1019. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  1020. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  1021. package/lib/shared-tree-core/sharedTreeCore.js +45 -23
  1022. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  1023. package/lib/shared-tree-core/transaction.js +36 -39
  1024. package/lib/shared-tree-core/transaction.js.map +1 -1
  1025. package/lib/shared-tree-core/versionedSummarizer.js +4 -0
  1026. package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
  1027. package/lib/simple-tree/api/cloneTree.d.ts +11 -0
  1028. package/lib/simple-tree/api/cloneTree.d.ts.map +1 -0
  1029. package/lib/simple-tree/api/cloneTree.js +28 -0
  1030. package/lib/simple-tree/api/cloneTree.js.map +1 -0
  1031. package/lib/simple-tree/api/configuration.d.ts +4 -4
  1032. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  1033. package/lib/simple-tree/api/configuration.js +19 -0
  1034. package/lib/simple-tree/api/configuration.js.map +1 -1
  1035. package/lib/simple-tree/api/discrepancies.d.ts +36 -3
  1036. package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
  1037. package/lib/simple-tree/api/discrepancies.js +40 -14
  1038. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  1039. package/lib/simple-tree/api/index.d.ts +5 -4
  1040. package/lib/simple-tree/api/index.d.ts.map +1 -1
  1041. package/lib/simple-tree/api/index.js +2 -2
  1042. package/lib/simple-tree/api/index.js.map +1 -1
  1043. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +22 -3
  1044. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  1045. package/lib/simple-tree/api/schemaCompatibilityTester.js +136 -7
  1046. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  1047. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +3 -7
  1048. package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  1049. package/lib/simple-tree/api/schemaCreationUtilities.js +1 -3
  1050. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  1051. package/lib/simple-tree/api/schemaFactory.d.ts +4 -9
  1052. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  1053. package/lib/simple-tree/api/schemaFactory.js +9 -8
  1054. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  1055. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +18 -20
  1056. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  1057. package/lib/simple-tree/api/schemaFactoryAlpha.js +78 -81
  1058. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  1059. package/lib/simple-tree/api/schemaFactoryBeta.d.ts +7 -9
  1060. package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  1061. package/lib/simple-tree/api/schemaFactoryBeta.js +32 -35
  1062. package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  1063. package/lib/simple-tree/api/schemaStatics.d.ts +7 -7
  1064. package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
  1065. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +46 -2
  1066. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  1067. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +48 -6
  1068. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  1069. package/lib/simple-tree/api/transactionTypes.d.ts +4 -4
  1070. package/lib/simple-tree/api/transactionTypes.js.map +1 -1
  1071. package/lib/simple-tree/api/tree.d.ts +243 -58
  1072. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  1073. package/lib/simple-tree/api/tree.js +2 -3
  1074. package/lib/simple-tree/api/tree.js.map +1 -1
  1075. package/lib/simple-tree/api/treeChangeEvents.d.ts +16 -4
  1076. package/lib/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
  1077. package/lib/simple-tree/api/treeChangeEvents.js.map +1 -1
  1078. package/lib/simple-tree/api/treeChangeEventsBeta.d.ts +209 -0
  1079. package/lib/simple-tree/api/treeChangeEventsBeta.d.ts.map +1 -0
  1080. package/lib/simple-tree/api/{treeAlpha.js → treeChangeEventsBeta.js} +1 -1
  1081. package/lib/simple-tree/api/treeChangeEventsBeta.js.map +1 -0
  1082. package/lib/simple-tree/api/treeNodeApi.d.ts +1 -75
  1083. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  1084. package/lib/simple-tree/api/treeNodeApi.js +1 -1
  1085. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  1086. package/lib/simple-tree/api/typesUnsafe.d.ts +8 -6
  1087. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  1088. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  1089. package/lib/simple-tree/core/allowedTypes.js +12 -3
  1090. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  1091. package/lib/simple-tree/core/context.js +3 -0
  1092. package/lib/simple-tree/core/context.js.map +1 -1
  1093. package/lib/simple-tree/core/index.d.ts +1 -1
  1094. package/lib/simple-tree/core/index.d.ts.map +1 -1
  1095. package/lib/simple-tree/core/index.js +1 -1
  1096. package/lib/simple-tree/core/index.js.map +1 -1
  1097. package/lib/simple-tree/core/toStored.d.ts +7 -0
  1098. package/lib/simple-tree/core/toStored.d.ts.map +1 -1
  1099. package/lib/simple-tree/core/toStored.js.map +1 -1
  1100. package/lib/simple-tree/core/treeNode.d.ts +3 -4
  1101. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  1102. package/lib/simple-tree/core/treeNode.js +29 -30
  1103. package/lib/simple-tree/core/treeNode.js.map +1 -1
  1104. package/lib/simple-tree/core/treeNodeKernel.js +181 -179
  1105. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  1106. package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  1107. package/lib/simple-tree/core/treeNodeValid.js +22 -22
  1108. package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
  1109. package/lib/simple-tree/core/unhydratedFlexTree.js +173 -146
  1110. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  1111. package/lib/simple-tree/core/withType.d.ts +7 -9
  1112. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  1113. package/lib/simple-tree/core/withType.js +5 -6
  1114. package/lib/simple-tree/core/withType.js.map +1 -1
  1115. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  1116. package/lib/simple-tree/fieldSchema.js +23 -5
  1117. package/lib/simple-tree/fieldSchema.js.map +1 -1
  1118. package/lib/simple-tree/index.d.ts +2 -2
  1119. package/lib/simple-tree/index.d.ts.map +1 -1
  1120. package/lib/simple-tree/index.js +2 -2
  1121. package/lib/simple-tree/index.js.map +1 -1
  1122. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  1123. package/lib/simple-tree/leafNodeSchema.js +16 -15
  1124. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  1125. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +3 -2
  1126. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  1127. package/lib/simple-tree/node-kinds/array/arrayNode.js +28 -32
  1128. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  1129. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  1130. package/lib/simple-tree/node-kinds/map/mapNode.d.ts +6 -6
  1131. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  1132. package/lib/simple-tree/node-kinds/map/mapNode.js +10 -17
  1133. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  1134. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  1135. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  1136. package/lib/simple-tree/node-kinds/object/objectNode.js +25 -28
  1137. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  1138. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +1 -1
  1139. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  1140. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  1141. package/lib/simple-tree/node-kinds/record/recordNode.js +10 -14
  1142. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  1143. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -2
  1144. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  1145. package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  1146. package/lib/tableSchema.d.ts +2 -87
  1147. package/lib/tableSchema.d.ts.map +1 -1
  1148. package/lib/tableSchema.js +309 -275
  1149. package/lib/tableSchema.js.map +1 -1
  1150. package/lib/text/codePointUtils.d.ts +16 -3
  1151. package/lib/text/codePointUtils.d.ts.map +1 -1
  1152. package/lib/text/codePointUtils.js +22 -10
  1153. package/lib/text/codePointUtils.js.map +1 -1
  1154. package/lib/text/textDomain.d.ts +7 -1
  1155. package/lib/text/textDomain.d.ts.map +1 -1
  1156. package/lib/text/textDomain.js +21 -17
  1157. package/lib/text/textDomain.js.map +1 -1
  1158. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  1159. package/lib/text/textDomainFormatted.js +43 -32
  1160. package/lib/text/textDomainFormatted.js.map +1 -1
  1161. package/lib/text/textDomainFormattedDefault.js +2 -5
  1162. package/lib/text/textDomainFormattedDefault.js.map +1 -1
  1163. package/lib/util/brand.js +1 -0
  1164. package/lib/util/brand.js.map +1 -1
  1165. package/lib/util/breakable.d.ts.map +1 -1
  1166. package/lib/util/breakable.js +3 -0
  1167. package/lib/util/breakable.js.map +1 -1
  1168. package/lib/util/compressedIds.js +22 -0
  1169. package/lib/util/compressedIds.js.map +1 -1
  1170. package/lib/util/nestedMap.js +2 -4
  1171. package/lib/util/nestedMap.js.map +1 -1
  1172. package/lib/util/offsetList.js +2 -4
  1173. package/lib/util/offsetList.js.map +1 -1
  1174. package/lib/util/rangeMap.js +4 -0
  1175. package/lib/util/rangeMap.js.map +1 -1
  1176. package/lib/util/readSnapshotBlob.d.ts.map +1 -1
  1177. package/lib/util/referenceCounting.js +1 -0
  1178. package/lib/util/referenceCounting.js.map +1 -1
  1179. package/lib/util/stackyIterator.js +3 -2
  1180. package/lib/util/stackyIterator.js.map +1 -1
  1181. package/lib/util/utils.d.ts +2 -2
  1182. package/lib/util/utils.d.ts.map +1 -1
  1183. package/package.json +67 -95
  1184. package/src/api.ts +11 -0
  1185. package/src/core/index.ts +6 -2
  1186. package/src/core/rebase/index.ts +1 -0
  1187. package/src/core/rebase/types.ts +16 -1
  1188. package/src/core/tree/anchorSet.ts +2 -2
  1189. package/src/core/tree/deltaUtil.ts +67 -13
  1190. package/src/core/tree/index.ts +5 -2
  1191. package/src/entrypoints/alpha.ts +21 -20
  1192. package/src/entrypoints/beta.ts +14 -5
  1193. package/src/entrypoints/legacy.ts +14 -5
  1194. package/src/entrypoints/public.ts +1 -5
  1195. package/src/extensibleUnionNode.ts +1 -2
  1196. package/src/feature-libraries/cursorComparator.ts +57 -9
  1197. package/src/feature-libraries/index.ts +1 -1
  1198. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +77 -12
  1199. package/src/feature-libraries/modular-schema/filterEdits.ts +108 -0
  1200. package/src/feature-libraries/modular-schema/genericFieldKind.ts +7 -4
  1201. package/src/feature-libraries/modular-schema/index.ts +5 -2
  1202. package/src/feature-libraries/modular-schema/invert.ts +16 -61
  1203. package/src/feature-libraries/modular-schema/minimizeModularChange.ts +831 -10
  1204. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +10 -124
  1205. package/src/feature-libraries/modular-schema/modularChangeUtils.ts +164 -2
  1206. package/src/feature-libraries/modular-schema/prune.ts +52 -10
  1207. package/src/feature-libraries/optional-field/optionalField.ts +30 -42
  1208. package/src/feature-libraries/schemaChecker.ts +198 -82
  1209. package/src/feature-libraries/sequence-field/filterEdits.ts +62 -26
  1210. package/src/feature-libraries/sequence-field/utils.ts +7 -19
  1211. package/src/index.ts +10 -39
  1212. package/src/internalTypes.ts +1 -1
  1213. package/src/packageVersion.ts +1 -1
  1214. package/src/shared-tree/history.ts +41 -19
  1215. package/src/shared-tree/independentView.ts +40 -3
  1216. package/src/shared-tree/index.ts +5 -1
  1217. package/src/shared-tree/schematizingTreeView.ts +77 -23
  1218. package/src/shared-tree/sharedTree.ts +2 -1
  1219. package/src/shared-tree/transactionMinimize.ts +13 -4
  1220. package/src/shared-tree/treeAlpha.ts +17 -31
  1221. package/src/{simple-tree/api → shared-tree}/treeBeta.ts +56 -167
  1222. package/src/shared-tree/treeCheckout.ts +82 -9
  1223. package/src/shared-tree-core/editManager.ts +16 -8
  1224. package/src/shared-tree-core/editManagerCodecsCommons.ts +30 -34
  1225. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +1 -1
  1226. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +2 -2
  1227. package/src/simple-tree/api/cloneTree.ts +47 -0
  1228. package/src/simple-tree/api/configuration.ts +4 -4
  1229. package/src/simple-tree/api/discrepancies.ts +100 -5
  1230. package/src/simple-tree/api/index.ts +22 -22
  1231. package/src/simple-tree/api/schemaCompatibilityTester.ts +185 -11
  1232. package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -2
  1233. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +87 -6
  1234. package/src/simple-tree/api/transactionTypes.ts +4 -4
  1235. package/src/simple-tree/api/tree.ts +318 -87
  1236. package/src/simple-tree/api/treeChangeEvents.ts +16 -4
  1237. package/src/simple-tree/api/treeChangeEventsBeta.ts +245 -0
  1238. package/src/simple-tree/api/treeNodeApi.ts +6 -85
  1239. package/src/simple-tree/api/typesUnsafe.ts +8 -6
  1240. package/src/simple-tree/core/index.ts +1 -1
  1241. package/src/simple-tree/core/toStored.ts +8 -0
  1242. package/src/simple-tree/core/treeNode.ts +3 -10
  1243. package/src/simple-tree/core/treeNodeValid.ts +3 -1
  1244. package/src/simple-tree/core/withType.ts +8 -11
  1245. package/src/simple-tree/index.ts +7 -7
  1246. package/src/simple-tree/node-kinds/array/arrayNode.ts +14 -12
  1247. package/src/simple-tree/node-kinds/map/mapNode.ts +14 -15
  1248. package/src/simple-tree/node-kinds/object/objectNode.ts +3 -6
  1249. package/src/simple-tree/node-kinds/record/recordNode.ts +6 -8
  1250. package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +2 -1
  1251. package/src/tableSchema.ts +8 -187
  1252. package/src/text/codePointUtils.ts +25 -14
  1253. package/src/text/textDomain.ts +15 -2
  1254. package/src/text/textDomainFormatted.ts +9 -4
  1255. package/tsconfig.json +1 -1
  1256. package/alpha.d.ts +0 -11
  1257. package/beta.d.ts +0 -11
  1258. package/dist/simple-tree/api/treeAlpha.d.ts +0 -126
  1259. package/dist/simple-tree/api/treeAlpha.d.ts.map +0 -1
  1260. package/dist/simple-tree/api/treeAlpha.js.map +0 -1
  1261. package/dist/simple-tree/api/treeBeta.d.ts.map +0 -1
  1262. package/dist/simple-tree/api/treeBeta.js +0 -83
  1263. package/dist/simple-tree/api/treeBeta.js.map +0 -1
  1264. package/docs/main/runtime-schema-upgrade.md +0 -208
  1265. package/internal.d.ts +0 -11
  1266. package/legacy.d.ts +0 -11
  1267. package/lib/simple-tree/api/treeAlpha.d.ts +0 -126
  1268. package/lib/simple-tree/api/treeAlpha.d.ts.map +0 -1
  1269. package/lib/simple-tree/api/treeAlpha.js.map +0 -1
  1270. package/lib/simple-tree/api/treeBeta.d.ts.map +0 -1
  1271. package/lib/simple-tree/api/treeBeta.js +0 -77
  1272. package/lib/simple-tree/api/treeBeta.js.map +0 -1
  1273. package/src/simple-tree/api/treeAlpha.ts +0 -153
  1274. /package/api-extractor/{api-extractor.current.json → api-extractor-report.current.json} +0 -0
  1275. /package/api-extractor/{api-extractor.legacy.json → api-extractor-report.legacy.json} +0 -0
@@ -6,168 +6,168 @@ import * as Type from "@sinclair/typebox";
6
6
  import type { Static, TSchema } from "@sinclair/typebox";
7
7
  import { type Encoded as EncodedV2 } from "./formatV2.js";
8
8
  declare const Rename: Type.TObject<{
9
- idOverride: Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
9
+ idOverride: Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
10
10
  }>;
11
11
  declare const MarkEffect: Type.TObject<{
12
12
  remove: Type.TOptional<Type.TObject<{
13
13
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
14
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
15
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
14
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
15
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
16
16
  }>>;
17
17
  insert: Type.TOptional<Type.TObject<{
18
18
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
19
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
19
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
20
20
  }>>;
21
21
  moveIn: Type.TOptional<Type.TObject<{
22
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
22
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
23
23
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
24
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
24
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
25
25
  }>>;
26
26
  moveOut: Type.TOptional<Type.TObject<{
27
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
27
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
28
28
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
29
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
30
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
29
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
30
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
31
31
  }>>;
32
32
  attachAndDetach: Type.TOptional<Type.TObject<{
33
33
  attach: Type.TObject<{
34
34
  insert: Type.TOptional<Type.TObject<{
35
35
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
36
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
36
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
37
37
  }>>;
38
38
  moveIn: Type.TOptional<Type.TObject<{
39
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
39
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
40
40
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
41
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
41
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
42
42
  }>>;
43
43
  }>;
44
44
  detach: Type.TObject<{
45
45
  remove: Type.TOptional<Type.TObject<{
46
46
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
47
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
48
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
47
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
48
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
49
49
  }>>;
50
50
  moveOut: Type.TOptional<Type.TObject<{
51
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
51
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
52
52
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
53
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
54
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
53
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
54
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
55
55
  }>>;
56
56
  }>;
57
57
  }>>;
58
58
  rename: Type.TOptional<Type.TObject<{
59
- idOverride: Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
59
+ idOverride: Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
60
60
  }>>;
61
61
  }>;
62
- declare const Mark: <Schema extends Type.TSchema>(tNodeChange: Schema) => Type.TObject<{
62
+ declare const Mark: <Schema extends TSchema>(tNodeChange: Schema) => Type.TObject<{
63
63
  effect: Type.TOptional<Type.TObject<{
64
64
  remove: Type.TOptional<Type.TObject<{
65
65
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
66
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
67
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
66
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
67
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
68
68
  }>>;
69
69
  insert: Type.TOptional<Type.TObject<{
70
70
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
71
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
71
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
72
72
  }>>;
73
73
  moveIn: Type.TOptional<Type.TObject<{
74
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
74
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
75
75
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
76
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
76
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
77
77
  }>>;
78
78
  moveOut: Type.TOptional<Type.TObject<{
79
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
79
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
80
80
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
81
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
82
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
81
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
82
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
83
83
  }>>;
84
84
  attachAndDetach: Type.TOptional<Type.TObject<{
85
85
  attach: Type.TObject<{
86
86
  insert: Type.TOptional<Type.TObject<{
87
87
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
88
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
88
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
89
89
  }>>;
90
90
  moveIn: Type.TOptional<Type.TObject<{
91
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
91
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
92
92
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
93
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
93
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
94
94
  }>>;
95
95
  }>;
96
96
  detach: Type.TObject<{
97
97
  remove: Type.TOptional<Type.TObject<{
98
98
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
99
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
100
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
99
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
100
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
101
101
  }>>;
102
102
  moveOut: Type.TOptional<Type.TObject<{
103
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
103
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
104
104
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
105
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
106
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
105
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
106
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
107
107
  }>>;
108
108
  }>;
109
109
  }>>;
110
110
  rename: Type.TOptional<Type.TObject<{
111
- idOverride: Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
111
+ idOverride: Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
112
112
  }>>;
113
113
  }>>;
114
- cellId: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
114
+ cellId: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
115
115
  changes: Schema extends Type.TOptional<infer S extends Type.TSchema> ? Type.TOptional<S> : Type.Ensure<Type.TOptional<Schema>>;
116
116
  count: Type.TNumber;
117
117
  }>;
118
- export declare const Changeset: <Schema extends Type.TSchema>(tNodeChange: Schema) => Type.TArray<Type.TObject<{
118
+ export declare const Changeset: <Schema extends TSchema>(tNodeChange: Schema) => Type.TArray<Type.TObject<{
119
119
  effect: Type.TOptional<Type.TObject<{
120
120
  remove: Type.TOptional<Type.TObject<{
121
121
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
122
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
123
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
122
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
123
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
124
124
  }>>;
125
125
  insert: Type.TOptional<Type.TObject<{
126
126
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
127
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
127
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
128
128
  }>>;
129
129
  moveIn: Type.TOptional<Type.TObject<{
130
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
130
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
131
131
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
132
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
132
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
133
133
  }>>;
134
134
  moveOut: Type.TOptional<Type.TObject<{
135
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
135
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
136
136
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
137
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
138
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
137
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
138
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
139
139
  }>>;
140
140
  attachAndDetach: Type.TOptional<Type.TObject<{
141
141
  attach: Type.TObject<{
142
142
  insert: Type.TOptional<Type.TObject<{
143
143
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
144
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
144
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
145
145
  }>>;
146
146
  moveIn: Type.TOptional<Type.TObject<{
147
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
147
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
148
148
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
149
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
149
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
150
150
  }>>;
151
151
  }>;
152
152
  detach: Type.TObject<{
153
153
  remove: Type.TOptional<Type.TObject<{
154
154
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
155
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
156
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
155
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
156
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
157
157
  }>>;
158
158
  moveOut: Type.TOptional<Type.TObject<{
159
- revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
159
+ revision: Type.TOptional<Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>>;
160
160
  id: Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>;
161
- finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
162
- idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
161
+ finalEndpoint: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
162
+ idOverride: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
163
163
  }>>;
164
164
  }>;
165
165
  }>>;
166
166
  rename: Type.TOptional<Type.TObject<{
167
- idOverride: Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
167
+ idOverride: Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>;
168
168
  }>>;
169
169
  }>>;
170
- cellId: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor").OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
170
+ cellId: Type.TOptional<Type.TUnion<[Type.TTuple<[Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>, Type.TUnion<[Type.TLiteral<"root">, Type.TUnsafe<import("../../util/brand.js").Brand<import("@fluidframework/id-compressor", { with: { "resolution-mode": "import" } }).OpSpaceCompressedId, "EncodedRevisionTag">>]>]>, Type.TUnsafe<import("../../core/index.js").ChangesetLocalId>]>>;
171
171
  changes: Schema extends Type.TOptional<infer S extends Type.TSchema> ? Type.TOptional<S> : Type.Ensure<Type.TOptional<Schema>>;
172
172
  count: Type.TNumber;
173
173
  }>>;
@@ -1 +1 @@
1
- {"version":3,"file":"formatV3.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/formatV3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,IAAI,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,EAAiB,MAAM,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIxE,OAAO,EAGN,KAAK,OAAO,IAAI,SAAS,EAEzB,MAAM,eAAe,CAAC;AAIvB,QAAA,MAAM,MAAM;;EAKX,CAAC;AAEF,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGf,CAAC;AAIF,QAAA,MAAM,IAAI;;;;;;;;;;;;;;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AC,MAAM,CAAC;IACtC,KAAY,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC;IACxD,KAAY,QAAQ,CACnB,MAAM,SAAS,OAAO,EACtB,WAAW,SAAS,OAAO,IACxB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAE5C,KAAY,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC;IAC3C,KAAY,UAAU,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;IACnD,KAAY,IAAI,CAAC,MAAM,SAAS,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACnF,KAAY,SAAS,CAAC,MAAM,SAAS,OAAO,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;CAC7F"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.invert = void 0;
7
+ exports.invert = invert;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const index_js_1 = require("../../util/index.js");
10
10
  const index_js_2 = require("../modular-schema/index.js");
@@ -26,7 +26,6 @@ const utils_js_1 = require("./utils.js");
26
26
  function invert(change, isRollback, genId, revision, crossFieldManager) {
27
27
  return invertMarkList(change, isRollback, crossFieldManager, revision);
28
28
  }
29
- exports.invert = invert;
30
29
  function invertMarkList(markList, isRollback, crossFieldManager, revision) {
31
30
  const inverseMarkList = new markListFactory_js_1.MarkListFactory();
32
31
  for (const mark of markList) {
@@ -1 +1 @@
1
- {"version":3,"file":"invert.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/invert.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAoF;AAGpF,kDAAgF;AAChF,yDAIoC;AAEpC,6DAAuD;AACvD,yCAcoB;AACpB,yCAYoB;AAEpB;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AAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IACxE,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,SAAS,sBAAsB,CAC9B,KAAa,EACb,OAA2B,EAC3B,MAAe;IAEf,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC3B,IAAA,iBAAM,EAAC,KAAK,KAAK,CAAC,EAAE,KAAK,CAAC,iDAAiD,CAAC,CAAC;QAC7E,MAAM,IAAI,GAAuB;YAChC,KAAK;YACL,OAAO;SACP,CAAC;QACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,CAAC;AAClB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase, fail } from \"@fluidframework/core-utils/internal\";\n\nimport type { RevisionTag } from \"../../core/index.js\";\nimport { type IdAllocator, type Mutable, hasSingle } from \"../../util/index.js\";\nimport {\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\ttype NodeId,\n} from \"../modular-schema/index.js\";\n\nimport { MarkListFactory } from \"./markListFactory.js\";\nimport {\n\ttype CellId,\n\ttype CellMark,\n\ttype Changeset,\n\ttype Detach,\n\ttype Mark,\n\ttype MarkEffect,\n\ttype MarkList,\n\ttype MoveIn,\n\ttype MoveOut,\n\ttype NoopMark,\n\tNoopMarkType,\n\ttype Remove,\n\ttype Rename,\n} from \"./types.js\";\nimport {\n\textractMarkEffect,\n\tgetDetachOutputCellId,\n\tgetEndpoint,\n\tgetInputCellId,\n\tgetOutputCellId,\n\tisAttach,\n\tisDetach,\n\tisImpactful,\n\tnormalizeCellRename,\n\tsplitMark,\n\twithNodeChange,\n} from \"./utils.js\";\n\n/**\n * Inverts a given changeset.\n * @param change - The changeset to produce the inverse of.\n * @param isRollback - Whether the inverse is being produced for a rollback.\n * @param genId - The ID allocator to use for generating new IDs.\n * @param revision - The revision to use for the inverse changeset.\n * @param crossFieldManager - The cross-field manager to use for tracking cross-field changes.\n * @returns The inverse of the given `change` such that the inverse can be applied after `change`.\n *\n * WARNING! This implementation is incomplete:\n * - Support for slices is not implemented.\n */\nexport function invert(\n\tchange: Changeset,\n\tisRollback: boolean,\n\tgenId: IdAllocator,\n\trevision: RevisionTag | undefined,\n\tcrossFieldManager: CrossFieldManager,\n): Changeset {\n\treturn invertMarkList(\n\t\tchange,\n\t\tisRollback,\n\t\tcrossFieldManager as CrossFieldManager<NodeId>,\n\t\trevision,\n\t);\n}\n\nfunction invertMarkList(\n\tmarkList: MarkList,\n\tisRollback: boolean,\n\tcrossFieldManager: CrossFieldManager<NodeId>,\n\trevision: RevisionTag | undefined,\n): MarkList {\n\tconst inverseMarkList = new MarkListFactory();\n\n\tfor (const mark of markList) {\n\t\tconst inverseMarks = invertMark(mark, isRollback, crossFieldManager, revision);\n\t\tinverseMarkList.push(...inverseMarks);\n\t}\n\n\treturn inverseMarkList.list;\n}\n\nfunction invertMark(\n\tmark: Mark,\n\tisRollback: boolean,\n\tcrossFieldManager: CrossFieldManager<NodeId>,\n\trevision: RevisionTag | undefined,\n): Mark[] {\n\tif (!isImpactful(mark)) {\n\t\tconst inputId = getInputCellId(mark);\n\t\treturn [invertNodeChangeOrSkip(mark.count, mark.changes, inputId)];\n\t}\n\tconst type = mark.type;\n\tswitch (type) {\n\t\tcase NoopMarkType: {\n\t\t\treturn [mark];\n\t\t}\n\t\tcase \"Rename\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x9f5 /* Rename mark must have cell ID */);\n\t\t\tconst inverse: Mutable<CellMark<Rename>> = {\n\t\t\t\ttype: \"Rename\",\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: mark.idOverride,\n\t\t\t\t// Unlike a remove or move-out, which follow a node, there is no way for this mark to assign the original input cell ID to another cell.\n\t\t\t\t// This means it should be safe to always restore the input cell ID (as opposed to only doing it on rollbacks).\n\t\t\t\t// Despite that, we still only do it on rollback for the sake of consistency: once a cell has been assigned an ID,\n\t\t\t\t// the only way for that cell to be assigned that ID again is if it is rolled back to that state.\n\t\t\t\tidOverride: isRollback ? inputId : { localId: inputId.localId },\n\t\t\t};\n\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t}\n\t\tcase \"Remove\": {\n\t\t\tassert(mark.revision !== undefined, 0x5a1 /* Unable to revert to undefined revision */);\n\t\t\tconst outputId = getOutputCellId(mark);\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tlet inverse: Mutable<Mark>;\n\t\t\tif (inputId === undefined) {\n\t\t\t\tinverse = {\n\t\t\t\t\ttype: \"Insert\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\tcellId: outputId,\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tinverse = {\n\t\t\t\t\ttype: \"Remove\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\tcellId: outputId,\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tif (isRollback) {\n\t\t\t\t\tinverse.idOverride = inputId;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t}\n\t\tcase \"Insert\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x80c /* Active inserts should target empty cells */);\n\t\t\tconst removeMark: Mutable<CellMark<Remove>> = {\n\t\t\t\ttype: \"Remove\",\n\t\t\t\tcount: mark.count,\n\t\t\t\tid: inputId.localId,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (isRollback) {\n\t\t\t\tremoveMark.idOverride = inputId;\n\t\t\t}\n\n\t\t\tconst inverse = withNodeChange(removeMark, mark.changes);\n\t\t\treturn [inverse];\n\t\t}\n\t\tcase \"MoveOut\": {\n\t\t\tif (mark.changes !== undefined) {\n\t\t\t\tassert(mark.count === 1, 0x6ed /* Mark with changes can only target a single cell */);\n\n\t\t\t\tconst endpoint = getEndpoint(mark);\n\t\t\t\tcrossFieldManager.set(\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tendpoint.revision,\n\t\t\t\t\tendpoint.localId,\n\t\t\t\t\tmark.count,\n\t\t\t\t\tmark.changes,\n\t\t\t\t\ttrue,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst cellId = getDetachOutputCellId(mark) ?? {\n\t\t\t\trevision: mark.revision ?? fail(0xb2a /* Revision must be defined */),\n\t\t\t\tlocalId: mark.id,\n\t\t\t};\n\n\t\t\tconst moveIn: MoveIn = {\n\t\t\t\ttype: \"MoveIn\",\n\t\t\t\tid: mark.id,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (mark.finalEndpoint !== undefined) {\n\t\t\t\tmoveIn.finalEndpoint = {\n\t\t\t\t\tlocalId: mark.finalEndpoint.localId,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t}\n\t\t\tlet effect: MarkEffect = moveIn;\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tif (inputId !== undefined) {\n\t\t\t\tconst detach: Mutable<Detach> = {\n\t\t\t\t\ttype: \"Remove\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tif (isRollback) {\n\t\t\t\t\tdetach.idOverride = inputId;\n\t\t\t\t}\n\t\t\t\teffect = {\n\t\t\t\t\ttype: \"AttachAndDetach\",\n\t\t\t\t\tattach: moveIn,\n\t\t\t\t\tdetach,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn [{ ...effect, count: mark.count, cellId }];\n\t\t}\n\t\tcase \"MoveIn\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x89e /* Active move-ins should target empty cells */);\n\t\t\tconst invertedMark: Mutable<CellMark<MoveOut>> = {\n\t\t\t\ttype: \"MoveOut\",\n\t\t\t\tid: mark.id,\n\t\t\t\tcount: mark.count,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (isRollback) {\n\t\t\t\tinvertedMark.idOverride = inputId;\n\t\t\t}\n\n\t\t\tif (mark.finalEndpoint) {\n\t\t\t\tinvertedMark.finalEndpoint = {\n\t\t\t\t\tlocalId: mark.finalEndpoint.localId,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn applyMovedChanges(invertedMark, mark.revision, crossFieldManager);\n\t\t}\n\t\tcase \"AttachAndDetach\": {\n\t\t\tconst attach: Mark = {\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: mark.cellId,\n\t\t\t\t...mark.attach,\n\t\t\t};\n\t\t\tconst idAfterAttach = getOutputCellId(attach);\n\n\t\t\t// We put `mark.changes` on the detach so that if it is a move source\n\t\t\t// the changes can be sent to the endpoint.\n\t\t\tconst detach: Mark = {\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: idAfterAttach,\n\t\t\t\tchanges: mark.changes,\n\t\t\t\t...mark.detach,\n\t\t\t};\n\t\t\tconst attachInverses = invertMark(attach, isRollback, crossFieldManager, revision);\n\t\t\tconst detachInverses = invertMark(detach, isRollback, crossFieldManager, revision);\n\n\t\t\tif (detachInverses.length === 0) {\n\t\t\t\treturn attachInverses;\n\t\t\t}\n\n\t\t\tassert(\n\t\t\t\thasSingle(detachInverses),\n\t\t\t\t0x80d /* Only expected MoveIn marks to be split when inverting */,\n\t\t\t);\n\n\t\t\tlet detachInverse = detachInverses[0];\n\t\t\tassert(isAttach(detachInverse), 0x80e /* Inverse of a detach should be an attach */);\n\n\t\t\tconst inverses: Mark[] = [];\n\t\t\tfor (const attachInverse of attachInverses) {\n\t\t\t\tlet detachInverseCurr: Mark = detachInverse;\n\t\t\t\tif (attachInverse.count !== detachInverse.count) {\n\t\t\t\t\t[detachInverseCurr, detachInverse] = splitMark(detachInverse, attachInverse.count);\n\t\t\t\t}\n\n\t\t\t\tif (attachInverse.type === NoopMarkType) {\n\t\t\t\t\tif (attachInverse.changes !== undefined) {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tdetachInverseCurr.changes === undefined,\n\t\t\t\t\t\t\t0x80f /* Unexpected node changes */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdetachInverseCurr.changes = attachInverse.changes;\n\t\t\t\t\t}\n\t\t\t\t\tinverses.push(detachInverseCurr);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tassert(isDetach(attachInverse), 0x810 /* Inverse of an attach should be a detach */);\n\t\t\t\tassert(detachInverseCurr.cellId !== undefined, 0x9f6 /* Expected empty cell */);\n\t\t\t\tconst inverted = normalizeCellRename(\n\t\t\t\t\tdetachInverseCurr.cellId,\n\t\t\t\t\tattachInverse.count,\n\t\t\t\t\textractMarkEffect(detachInverseCurr),\n\t\t\t\t\textractMarkEffect(attachInverse),\n\t\t\t\t);\n\t\t\t\tif (detachInverse.changes !== undefined) {\n\t\t\t\t\tinverted.changes = detachInverse.changes;\n\t\t\t\t}\n\n\t\t\t\tif (attachInverse.changes !== undefined) {\n\t\t\t\t\tassert(inverted.changes === undefined, 0x811 /* Unexpected node changes */);\n\t\t\t\t\tinverted.changes = attachInverse.changes;\n\t\t\t\t}\n\t\t\t\tinverses.push(inverted);\n\t\t\t}\n\n\t\t\treturn inverses;\n\t\t}\n\t\tdefault: {\n\t\t\tunreachableCase(type);\n\t\t}\n\t}\n}\n\nfunction applyMovedChanges(\n\tmark: CellMark<MoveOut>,\n\trevision: RevisionTag | undefined,\n\tmanager: CrossFieldManager<NodeId>,\n): Mark[] {\n\t// Although this is a source mark, we query the destination because this was a destination mark during the original invert pass.\n\tconst entry = manager.get(CrossFieldTarget.Destination, revision, mark.id, mark.count, true);\n\n\tif (entry.length < mark.count) {\n\t\tconst [mark1, mark2] = splitMark(mark, entry.length);\n\t\tconst mark1WithChanges =\n\t\t\tentry.value === undefined\n\t\t\t\t? mark1\n\t\t\t\t: withNodeChange<CellMark<MoveOut>, MoveOut>(mark1, entry.value);\n\n\t\treturn [mark1WithChanges, ...applyMovedChanges(mark2, revision, manager)];\n\t}\n\n\tif (entry.value !== undefined) {\n\t\tmanager.onMoveIn(entry.value);\n\t\treturn [withNodeChange<CellMark<MoveOut>, MoveOut>(mark, entry.value)];\n\t}\n\n\treturn [mark];\n}\n\nfunction invertNodeChangeOrSkip(\n\tcount: number,\n\tchanges: NodeId | undefined,\n\tcellId?: CellId,\n): Mark {\n\tif (changes !== undefined) {\n\t\tassert(count === 1, 0x66c /* A modify mark must have length equal to one */);\n\t\tconst noop: CellMark<NoopMark> = {\n\t\t\tcount,\n\t\t\tchanges,\n\t\t};\n\t\tif (cellId !== undefined) {\n\t\t\tnoop.cellId = cellId;\n\t\t}\n\t\treturn noop;\n\t}\n\n\tif (cellId !== undefined) {\n\t\treturn { count, cellId };\n\t}\n\treturn { count };\n}\n"]}
1
+ {"version":3,"file":"invert.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/invert.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAsDH,wBAaC;AAjED,kEAAoF;AAGpF,kDAAgF;AAChF,yDAIoC;AAEpC,6DAAuD;AACvD,yCAcoB;AACpB,yCAYoB;AAEpB;;;;;;;;;;;GAWG;AACH,SAAgB,MAAM,CACrB,MAAiB,EACjB,UAAmB,EACnB,KAAkB,EAClB,QAAiC,EACjC,iBAAoC;IAEpC,OAAO,cAAc,CACpB,MAAM,EACN,UAAU,EACV,iBAA8C,EAC9C,QAAQ,CACR,CAAC;AACH,CAAC;AAED,SAAS,cAAc,CACtB,QAAkB,EAClB,UAAmB,EACnB,iBAA4C,EAC5C,QAAiC;IAE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AC;QAC7E,MAAM,IAAI,GAAuB;YAChC,KAAK;YACL,OAAO;SACP,CAAC;QACF,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YAC1B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACtB,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,CAAC;AAClB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase, fail } from \"@fluidframework/core-utils/internal\";\n\nimport type { RevisionTag } from \"../../core/index.js\";\nimport { type IdAllocator, type Mutable, hasSingle } from \"../../util/index.js\";\nimport {\n\ttype CrossFieldManager,\n\tCrossFieldTarget,\n\ttype NodeId,\n} from \"../modular-schema/index.js\";\n\nimport { MarkListFactory } from \"./markListFactory.js\";\nimport {\n\ttype CellId,\n\ttype CellMark,\n\ttype Changeset,\n\ttype Detach,\n\ttype Mark,\n\ttype MarkEffect,\n\ttype MarkList,\n\ttype MoveIn,\n\ttype MoveOut,\n\ttype NoopMark,\n\tNoopMarkType,\n\ttype Remove,\n\ttype Rename,\n} from \"./types.js\";\nimport {\n\textractMarkEffect,\n\tgetDetachOutputCellId,\n\tgetEndpoint,\n\tgetInputCellId,\n\tgetOutputCellId,\n\tisAttach,\n\tisDetach,\n\tisImpactful,\n\tnormalizeCellRename,\n\tsplitMark,\n\twithNodeChange,\n} from \"./utils.js\";\n\n/**\n * Inverts a given changeset.\n * @param change - The changeset to produce the inverse of.\n * @param isRollback - Whether the inverse is being produced for a rollback.\n * @param genId - The ID allocator to use for generating new IDs.\n * @param revision - The revision to use for the inverse changeset.\n * @param crossFieldManager - The cross-field manager to use for tracking cross-field changes.\n * @returns The inverse of the given `change` such that the inverse can be applied after `change`.\n *\n * WARNING! This implementation is incomplete:\n * - Support for slices is not implemented.\n */\nexport function invert(\n\tchange: Changeset,\n\tisRollback: boolean,\n\tgenId: IdAllocator,\n\trevision: RevisionTag | undefined,\n\tcrossFieldManager: CrossFieldManager,\n): Changeset {\n\treturn invertMarkList(\n\t\tchange,\n\t\tisRollback,\n\t\tcrossFieldManager as CrossFieldManager<NodeId>,\n\t\trevision,\n\t);\n}\n\nfunction invertMarkList(\n\tmarkList: MarkList,\n\tisRollback: boolean,\n\tcrossFieldManager: CrossFieldManager<NodeId>,\n\trevision: RevisionTag | undefined,\n): MarkList {\n\tconst inverseMarkList = new MarkListFactory();\n\n\tfor (const mark of markList) {\n\t\tconst inverseMarks = invertMark(mark, isRollback, crossFieldManager, revision);\n\t\tinverseMarkList.push(...inverseMarks);\n\t}\n\n\treturn inverseMarkList.list;\n}\n\nfunction invertMark(\n\tmark: Mark,\n\tisRollback: boolean,\n\tcrossFieldManager: CrossFieldManager<NodeId>,\n\trevision: RevisionTag | undefined,\n): Mark[] {\n\tif (!isImpactful(mark)) {\n\t\tconst inputId = getInputCellId(mark);\n\t\treturn [invertNodeChangeOrSkip(mark.count, mark.changes, inputId)];\n\t}\n\tconst type = mark.type;\n\tswitch (type) {\n\t\tcase NoopMarkType: {\n\t\t\treturn [mark];\n\t\t}\n\t\tcase \"Rename\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x9f5 /* Rename mark must have cell ID */);\n\t\t\tconst inverse: Mutable<CellMark<Rename>> = {\n\t\t\t\ttype: \"Rename\",\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: mark.idOverride,\n\t\t\t\t// Unlike a remove or move-out, which follow a node, there is no way for this mark to assign the original input cell ID to another cell.\n\t\t\t\t// This means it should be safe to always restore the input cell ID (as opposed to only doing it on rollbacks).\n\t\t\t\t// Despite that, we still only do it on rollback for the sake of consistency: once a cell has been assigned an ID,\n\t\t\t\t// the only way for that cell to be assigned that ID again is if it is rolled back to that state.\n\t\t\t\tidOverride: isRollback ? inputId : { localId: inputId.localId },\n\t\t\t};\n\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t}\n\t\tcase \"Remove\": {\n\t\t\tassert(mark.revision !== undefined, 0x5a1 /* Unable to revert to undefined revision */);\n\t\t\tconst outputId = getOutputCellId(mark);\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tlet inverse: Mutable<Mark>;\n\t\t\tif (inputId === undefined) {\n\t\t\t\tinverse = {\n\t\t\t\t\ttype: \"Insert\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\tcellId: outputId,\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t} else {\n\t\t\t\tinverse = {\n\t\t\t\t\ttype: \"Remove\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\tcellId: outputId,\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tif (isRollback) {\n\t\t\t\t\tinverse.idOverride = inputId;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn [withNodeChange(inverse, mark.changes)];\n\t\t}\n\t\tcase \"Insert\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x80c /* Active inserts should target empty cells */);\n\t\t\tconst removeMark: Mutable<CellMark<Remove>> = {\n\t\t\t\ttype: \"Remove\",\n\t\t\t\tcount: mark.count,\n\t\t\t\tid: inputId.localId,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (isRollback) {\n\t\t\t\tremoveMark.idOverride = inputId;\n\t\t\t}\n\n\t\t\tconst inverse = withNodeChange(removeMark, mark.changes);\n\t\t\treturn [inverse];\n\t\t}\n\t\tcase \"MoveOut\": {\n\t\t\tif (mark.changes !== undefined) {\n\t\t\t\tassert(mark.count === 1, 0x6ed /* Mark with changes can only target a single cell */);\n\n\t\t\t\tconst endpoint = getEndpoint(mark);\n\t\t\t\tcrossFieldManager.set(\n\t\t\t\t\tCrossFieldTarget.Destination,\n\t\t\t\t\tendpoint.revision,\n\t\t\t\t\tendpoint.localId,\n\t\t\t\t\tmark.count,\n\t\t\t\t\tmark.changes,\n\t\t\t\t\ttrue,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tconst cellId = getDetachOutputCellId(mark) ?? {\n\t\t\t\trevision: mark.revision ?? fail(0xb2a /* Revision must be defined */),\n\t\t\t\tlocalId: mark.id,\n\t\t\t};\n\n\t\t\tconst moveIn: MoveIn = {\n\t\t\t\ttype: \"MoveIn\",\n\t\t\t\tid: mark.id,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (mark.finalEndpoint !== undefined) {\n\t\t\t\tmoveIn.finalEndpoint = {\n\t\t\t\t\tlocalId: mark.finalEndpoint.localId,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t}\n\t\t\tlet effect: MarkEffect = moveIn;\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tif (inputId !== undefined) {\n\t\t\t\tconst detach: Mutable<Detach> = {\n\t\t\t\t\ttype: \"Remove\",\n\t\t\t\t\tid: mark.id,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t\tif (isRollback) {\n\t\t\t\t\tdetach.idOverride = inputId;\n\t\t\t\t}\n\t\t\t\teffect = {\n\t\t\t\t\ttype: \"AttachAndDetach\",\n\t\t\t\t\tattach: moveIn,\n\t\t\t\t\tdetach,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn [{ ...effect, count: mark.count, cellId }];\n\t\t}\n\t\tcase \"MoveIn\": {\n\t\t\tconst inputId = getInputCellId(mark);\n\t\t\tassert(inputId !== undefined, 0x89e /* Active move-ins should target empty cells */);\n\t\t\tconst invertedMark: Mutable<CellMark<MoveOut>> = {\n\t\t\t\ttype: \"MoveOut\",\n\t\t\t\tid: mark.id,\n\t\t\t\tcount: mark.count,\n\t\t\t\trevision,\n\t\t\t};\n\n\t\t\tif (isRollback) {\n\t\t\t\tinvertedMark.idOverride = inputId;\n\t\t\t}\n\n\t\t\tif (mark.finalEndpoint) {\n\t\t\t\tinvertedMark.finalEndpoint = {\n\t\t\t\t\tlocalId: mark.finalEndpoint.localId,\n\t\t\t\t\trevision,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn applyMovedChanges(invertedMark, mark.revision, crossFieldManager);\n\t\t}\n\t\tcase \"AttachAndDetach\": {\n\t\t\tconst attach: Mark = {\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: mark.cellId,\n\t\t\t\t...mark.attach,\n\t\t\t};\n\t\t\tconst idAfterAttach = getOutputCellId(attach);\n\n\t\t\t// We put `mark.changes` on the detach so that if it is a move source\n\t\t\t// the changes can be sent to the endpoint.\n\t\t\tconst detach: Mark = {\n\t\t\t\tcount: mark.count,\n\t\t\t\tcellId: idAfterAttach,\n\t\t\t\tchanges: mark.changes,\n\t\t\t\t...mark.detach,\n\t\t\t};\n\t\t\tconst attachInverses = invertMark(attach, isRollback, crossFieldManager, revision);\n\t\t\tconst detachInverses = invertMark(detach, isRollback, crossFieldManager, revision);\n\n\t\t\tif (detachInverses.length === 0) {\n\t\t\t\treturn attachInverses;\n\t\t\t}\n\n\t\t\tassert(\n\t\t\t\thasSingle(detachInverses),\n\t\t\t\t0x80d /* Only expected MoveIn marks to be split when inverting */,\n\t\t\t);\n\n\t\t\tlet detachInverse = detachInverses[0];\n\t\t\tassert(isAttach(detachInverse), 0x80e /* Inverse of a detach should be an attach */);\n\n\t\t\tconst inverses: Mark[] = [];\n\t\t\tfor (const attachInverse of attachInverses) {\n\t\t\t\tlet detachInverseCurr: Mark = detachInverse;\n\t\t\t\tif (attachInverse.count !== detachInverse.count) {\n\t\t\t\t\t[detachInverseCurr, detachInverse] = splitMark(detachInverse, attachInverse.count);\n\t\t\t\t}\n\n\t\t\t\tif (attachInverse.type === NoopMarkType) {\n\t\t\t\t\tif (attachInverse.changes !== undefined) {\n\t\t\t\t\t\tassert(\n\t\t\t\t\t\t\tdetachInverseCurr.changes === undefined,\n\t\t\t\t\t\t\t0x80f /* Unexpected node changes */,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tdetachInverseCurr.changes = attachInverse.changes;\n\t\t\t\t\t}\n\t\t\t\t\tinverses.push(detachInverseCurr);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tassert(isDetach(attachInverse), 0x810 /* Inverse of an attach should be a detach */);\n\t\t\t\tassert(detachInverseCurr.cellId !== undefined, 0x9f6 /* Expected empty cell */);\n\t\t\t\tconst inverted = normalizeCellRename(\n\t\t\t\t\tdetachInverseCurr.cellId,\n\t\t\t\t\tattachInverse.count,\n\t\t\t\t\textractMarkEffect(detachInverseCurr),\n\t\t\t\t\textractMarkEffect(attachInverse),\n\t\t\t\t);\n\t\t\t\tif (detachInverse.changes !== undefined) {\n\t\t\t\t\tinverted.changes = detachInverse.changes;\n\t\t\t\t}\n\n\t\t\t\tif (attachInverse.changes !== undefined) {\n\t\t\t\t\tassert(inverted.changes === undefined, 0x811 /* Unexpected node changes */);\n\t\t\t\t\tinverted.changes = attachInverse.changes;\n\t\t\t\t}\n\t\t\t\tinverses.push(inverted);\n\t\t\t}\n\n\t\t\treturn inverses;\n\t\t}\n\t\tdefault: {\n\t\t\tunreachableCase(type);\n\t\t}\n\t}\n}\n\nfunction applyMovedChanges(\n\tmark: CellMark<MoveOut>,\n\trevision: RevisionTag | undefined,\n\tmanager: CrossFieldManager<NodeId>,\n): Mark[] {\n\t// Although this is a source mark, we query the destination because this was a destination mark during the original invert pass.\n\tconst entry = manager.get(CrossFieldTarget.Destination, revision, mark.id, mark.count, true);\n\n\tif (entry.length < mark.count) {\n\t\tconst [mark1, mark2] = splitMark(mark, entry.length);\n\t\tconst mark1WithChanges =\n\t\t\tentry.value === undefined\n\t\t\t\t? mark1\n\t\t\t\t: withNodeChange<CellMark<MoveOut>, MoveOut>(mark1, entry.value);\n\n\t\treturn [mark1WithChanges, ...applyMovedChanges(mark2, revision, manager)];\n\t}\n\n\tif (entry.value !== undefined) {\n\t\tmanager.onMoveIn(entry.value);\n\t\treturn [withNodeChange<CellMark<MoveOut>, MoveOut>(mark, entry.value)];\n\t}\n\n\treturn [mark];\n}\n\nfunction invertNodeChangeOrSkip(\n\tcount: number,\n\tchanges: NodeId | undefined,\n\tcellId?: CellId,\n): Mark {\n\tif (changes !== undefined) {\n\t\tassert(count === 1, 0x66c /* A modify mark must have length equal to one */);\n\t\tconst noop: CellMark<NoopMark> = {\n\t\t\tcount,\n\t\t\tchanges,\n\t\t};\n\t\tif (cellId !== undefined) {\n\t\t\tnoop.cellId = cellId;\n\t\t}\n\t\treturn noop;\n\t}\n\n\tif (cellId !== undefined) {\n\t\treturn { count, cellId };\n\t}\n\treturn { count };\n}\n"]}
@@ -14,10 +14,9 @@ const utils_js_1 = require("./utils.js");
14
14
  * - Merges marks together
15
15
  */
16
16
  class MarkListFactory {
17
- constructor() {
18
- this.offset = 0;
19
- this.list = [];
20
- }
17
+ offset = 0;
18
+ list = [];
19
+ constructor() { }
21
20
  push(...marks) {
22
21
  for (const item of marks) {
23
22
  this.pushContent(item);
@@ -1 +1 @@
1
- {"version":3,"file":"markListFactory.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/markListFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yCAAqF;AAErF;;;;;;GAMG;AACH,MAAa,eAAe;IAI3B;QAHQ,WAAM,GAAG,CAAC,CAAC;QACH,SAAI,GAAa,EAAE,CAAC;IAEd,CAAC;IAEhB,IAAI,CAAC,GAAG,KAAa;QAC3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;IACF,CAAC;IAEM,UAAU,CAAC,MAAc;QAC/B,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC;IACvB,CAAC;IAEM,WAAW,CAAC,IAAU;QAC5B,IAAI,IAAA,qBAAU,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,IAAA,sBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;YAC1E,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5B,OAAO;QACR,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;YACvC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACjB,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC7C,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YACnD,MAAM,MAAM,GAAG,IAAA,wBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACzC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC1B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;gBAChC,OAAO;YACR,CAAC;QACF,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CACD;AAnCD,0CAmCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Mark, MarkList } from \"./types.js\";\nimport { isNoopMark, isTombstone, tryMergeMarks as tryMergeMarks } from \"./utils.js\";\n\n/**\n * Helper class for constructing an offset list of marks that...\n * - Does not insert offsets if there is no content after them\n * - Does not insert 0-sized offsets\n * - Merges runs of offsets together\n * - Merges marks together\n */\nexport class MarkListFactory {\n\tprivate offset = 0;\n\tpublic readonly list: MarkList = [];\n\n\tpublic constructor() {}\n\n\tpublic push(...marks: Mark[]): void {\n\t\tfor (const item of marks) {\n\t\t\tthis.pushContent(item);\n\t\t}\n\t}\n\n\tpublic pushOffset(offset: number): void {\n\t\tthis.offset += offset;\n\t}\n\n\tpublic pushContent(mark: Mark): void {\n\t\tif (isNoopMark(mark) && mark.changes === undefined && !isTombstone(mark)) {\n\t\t\tthis.pushOffset(mark.count);\n\t\t\treturn;\n\t\t}\n\t\tif (this.offset > 0) {\n\t\t\tthis.list.push({ count: this.offset });\n\t\t\tthis.offset = 0;\n\t\t}\n\t\tconst prev = this.list[this.list.length - 1];\n\t\tif (prev !== undefined && prev.type === mark.type) {\n\t\t\tconst merged = tryMergeMarks(prev, mark);\n\t\t\tif (merged !== undefined) {\n\t\t\t\tthis.list.splice(-1, 1, merged);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthis.list.push(mark);\n\t}\n}\n"]}
1
+ {"version":3,"file":"markListFactory.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/markListFactory.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,yCAAqF;AAErF;;;;;;GAMG;AACH,MAAa,eAAe;IACnB,MAAM,GAAG,CAAC,CAAC;IACH,IAAI,GAAa,EAAE,CAAC;IAEpC,gBAAsB,CAAC;IAEhB,IAAI,CAAC,GAAG,KAAa;QAC3B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QACxB,CAAC;IACF,CAAC;IAEM,UAAU,CAAC,MAAc;QAC/B,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC;IACvB,CAAC;IAEM,WAAW,CAAC,IAAU;QAC5B,IAAI,IAAA,qBAAU,EAAC,IAAI,CAAC,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,CAAC,IAAA,sBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;YAC1E,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YAC5B,OAAO;QACR,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;YACvC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QACjB,CAAC;QACD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC7C,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;YACnD,MAAM,MAAM,GAAG,IAAA,wBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YACzC,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC1B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC,CAAC;gBAChC,OAAO;YACR,CAAC;QACF,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CACD;AAnCD,0CAmCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Mark, MarkList } from \"./types.js\";\nimport { isNoopMark, isTombstone, tryMergeMarks as tryMergeMarks } from \"./utils.js\";\n\n/**\n * Helper class for constructing an offset list of marks that...\n * - Does not insert offsets if there is no content after them\n * - Does not insert 0-sized offsets\n * - Merges runs of offsets together\n * - Merges marks together\n */\nexport class MarkListFactory {\n\tprivate offset = 0;\n\tpublic readonly list: MarkList = [];\n\n\tpublic constructor() {}\n\n\tpublic push(...marks: Mark[]): void {\n\t\tfor (const item of marks) {\n\t\t\tthis.pushContent(item);\n\t\t}\n\t}\n\n\tpublic pushOffset(offset: number): void {\n\t\tthis.offset += offset;\n\t}\n\n\tpublic pushContent(mark: Mark): void {\n\t\tif (isNoopMark(mark) && mark.changes === undefined && !isTombstone(mark)) {\n\t\t\tthis.pushOffset(mark.count);\n\t\t\treturn;\n\t\t}\n\t\tif (this.offset > 0) {\n\t\t\tthis.list.push({ count: this.offset });\n\t\t\tthis.offset = 0;\n\t\t}\n\t\tconst prev = this.list[this.list.length - 1];\n\t\tif (prev !== undefined && prev.type === mark.type) {\n\t\t\tconst merged = tryMergeMarks(prev, mark);\n\t\t\tif (merged !== undefined) {\n\t\t\t\tthis.list.splice(-1, 1, merged);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tthis.list.push(mark);\n\t}\n}\n"]}
@@ -9,10 +9,11 @@ const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const moveEffectTable_js_1 = require("./moveEffectTable.js");
10
10
  const utils_js_1 = require("./utils.js");
11
11
  class MarkQueueBase {
12
+ list;
13
+ stack = [];
14
+ index = 0;
12
15
  constructor(list) {
13
16
  this.list = list;
14
- this.stack = [];
15
- this.index = 0;
16
17
  this.list = list;
17
18
  }
18
19
  isEmpty() {
@@ -63,6 +64,7 @@ class MarkQueueBase {
63
64
  }
64
65
  exports.MarkQueueBase = MarkQueueBase;
65
66
  class MarkQueue extends MarkQueueBase {
67
+ moveEffects;
66
68
  constructor(list, moveEffects) {
67
69
  super(list);
68
70
  this.moveEffects = moveEffects;
@@ -1 +1 @@
1
- {"version":3,"file":"markQueue.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/markQueue.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D,6DAAsF;AAEtF,yCAAuC;AAEvC,MAAa,aAAa;IAIzB,YAAoC,IAAqB;QAArB,SAAI,GAAJ,IAAI,CAAiB;QAHxC,UAAK,GAAW,EAAE,CAAC;QAC5B,UAAK,GAAG,CAAC,CAAC;QAGjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,C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AC,CAAC;QACvB,OAAO,KAAK,CAAC;IACd,CAAC;IAEM,IAAI;QACV,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAES,iBAAiB,CAAC,IAAU;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;CACD;AA7DD,sCA6DC;AAED,MAAa,SAAU,SAAQ,aAAa;IAC3C,YACC,IAAqB,EACJ,WAA4B;QAE7C,KAAK,CAAC,IAAI,CAAC,CAAC;QAFK,gBAAW,GAAX,WAAW,CAAiB;IAG9C,CAAC;IAEkB,iBAAiB,CAAC,IAAU;QAC9C,OAAO,IAAA,6CAAwB,EAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACrE,CAAC;CACD;AAXD,8BAWC","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\";\n\nimport { getFirstMoveEffectLength, type MoveEffectTable } from \"./moveEffectTable.js\";\nimport type { Mark } from \"./types.js\";\nimport { splitMark } from \"./utils.js\";\n\nexport class MarkQueueBase {\n\tprivate readonly stack: Mark[] = [];\n\tprivate index = 0;\n\n\tpublic constructor(private readonly list: readonly Mark[]) {\n\t\tthis.list = list;\n\t}\n\n\tpublic isEmpty(): boolean {\n\t\treturn this.peek() === undefined;\n\t}\n\n\tpublic dequeue(): Mark {\n\t\tconst output = this.tryDequeue();\n\t\tassert(output !== undefined, 0x4e2 /* Unexpected end of mark queue */);\n\t\treturn output;\n\t}\n\n\tpublic tryDequeue(): Mark | undefined {\n\t\tconst mark = this.stack.length > 0 ? this.stack.pop() : this.list[this.index++];\n\t\tif (mark === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst splitLength = this.getLengthForSplit(mark);\n\t\tif (splitLength < mark.count) {\n\t\t\tconst [part1, part2] = splitMark(mark, splitLength);\n\t\t\tthis.stack.push(part2);\n\t\t\treturn part1;\n\t\t}\n\n\t\treturn mark;\n\t}\n\n\t/**\n\t * Dequeues the first `length` sized portion of the next mark,\n\t * or the entire next mark if `length` is longer than the mark's length.\n\t * @param length - The length to dequeue, measured in the input context.\n\t */\n\tpublic dequeueUpTo(length: number): Mark {\n\t\tconst mark = this.dequeue();\n\t\tif (mark.count <= length) {\n\t\t\treturn mark;\n\t\t}\n\n\t\tconst [mark1, mark2] = splitMark(mark, length);\n\t\tthis.stack.push(mark2);\n\t\treturn mark1;\n\t}\n\n\tpublic peek(): Mark | undefined {\n\t\tconst mark = this.tryDequeue();\n\t\tif (mark !== undefined) {\n\t\t\tthis.stack.push(mark);\n\t\t}\n\t\treturn mark;\n\t}\n\n\tprotected getLengthForSplit(mark: Mark): number {\n\t\treturn mark.count;\n\t}\n}\n\nexport class MarkQueue extends MarkQueueBase {\n\tpublic constructor(\n\t\tlist: readonly Mark[],\n\t\tprivate readonly moveEffects: MoveEffectTable,\n\t) {\n\t\tsuper(list);\n\t}\n\n\tprotected override getLengthForSplit(mark: Mark): number {\n\t\treturn getFirstMoveEffectLength(mark, mark.count, this.moveEffects);\n\t}\n}\n"]}
1
+ {"version":3,"file":"markQueue.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/markQueue.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D,6DAAsF;AAEtF,yCAAuC;AAEvC,MAAa,aAAa;IAIW;IAHnB,KAAK,GAAW,EAAE,CAAC;IAC5B,KAAK,GAAG,CAAC,CAAC;IAElB,YAAoC,IAAqB;QAArB,SAAI,GAAJ,IAAI,CAAiB;QACxD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;IAEM,OAAO;QACb,O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AAK,CAAC;IACd,CAAC;IAEM,IAAI;QACV,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACxB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC;QACD,OAAO,IAAI,CAAC;IACb,CAAC;IAES,iBAAiB,CAAC,IAAU;QACrC,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;CACD;AA7DD,sCA6DC;AAED,MAAa,SAAU,SAAQ,aAAa;IAGzB;IAFlB,YACC,IAAqB,EACJ,WAA4B;QAE7C,KAAK,CAAC,IAAI,CAAC,CAAC;QAFK,gBAAW,GAAX,WAAW,CAAiB;IAG9C,CAAC;IAEkB,iBAAiB,CAAC,IAAU;QAC9C,OAAO,IAAA,6CAAwB,EAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IACrE,CAAC;CACD;AAXD,8BAWC","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\";\n\nimport { getFirstMoveEffectLength, type MoveEffectTable } from \"./moveEffectTable.js\";\nimport type { Mark } from \"./types.js\";\nimport { splitMark } from \"./utils.js\";\n\nexport class MarkQueueBase {\n\tprivate readonly stack: Mark[] = [];\n\tprivate index = 0;\n\n\tpublic constructor(private readonly list: readonly Mark[]) {\n\t\tthis.list = list;\n\t}\n\n\tpublic isEmpty(): boolean {\n\t\treturn this.peek() === undefined;\n\t}\n\n\tpublic dequeue(): Mark {\n\t\tconst output = this.tryDequeue();\n\t\tassert(output !== undefined, 0x4e2 /* Unexpected end of mark queue */);\n\t\treturn output;\n\t}\n\n\tpublic tryDequeue(): Mark | undefined {\n\t\tconst mark = this.stack.length > 0 ? this.stack.pop() : this.list[this.index++];\n\t\tif (mark === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst splitLength = this.getLengthForSplit(mark);\n\t\tif (splitLength < mark.count) {\n\t\t\tconst [part1, part2] = splitMark(mark, splitLength);\n\t\t\tthis.stack.push(part2);\n\t\t\treturn part1;\n\t\t}\n\n\t\treturn mark;\n\t}\n\n\t/**\n\t * Dequeues the first `length` sized portion of the next mark,\n\t * or the entire next mark if `length` is longer than the mark's length.\n\t * @param length - The length to dequeue, measured in the input context.\n\t */\n\tpublic dequeueUpTo(length: number): Mark {\n\t\tconst mark = this.dequeue();\n\t\tif (mark.count <= length) {\n\t\t\treturn mark;\n\t\t}\n\n\t\tconst [mark1, mark2] = splitMark(mark, length);\n\t\tthis.stack.push(mark2);\n\t\treturn mark1;\n\t}\n\n\tpublic peek(): Mark | undefined {\n\t\tconst mark = this.tryDequeue();\n\t\tif (mark !== undefined) {\n\t\t\tthis.stack.push(mark);\n\t\t}\n\t\treturn mark;\n\t}\n\n\tprotected getLengthForSplit(mark: Mark): number {\n\t\treturn mark.count;\n\t}\n}\n\nexport class MarkQueue extends MarkQueueBase {\n\tpublic constructor(\n\t\tlist: readonly Mark[],\n\t\tprivate readonly moveEffects: MoveEffectTable,\n\t) {\n\t\tsuper(list);\n\t}\n\n\tprotected override getLengthForSplit(mark: Mark): number {\n\t\treturn getFirstMoveEffectLength(mark, mark.count, this.moveEffects);\n\t}\n}\n"]}
@@ -4,7 +4,15 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.getCrossFieldTargetFromMove = exports.getFirstMoveEffectLength = exports.getMoveIn = exports.isMoveIn = exports.isMoveOut = exports.isMoveMark = exports.getMoveEffect = exports.setMoveEffect = exports.MoveEnd = void 0;
7
+ exports.MoveEnd = void 0;
8
+ exports.setMoveEffect = setMoveEffect;
9
+ exports.getMoveEffect = getMoveEffect;
10
+ exports.isMoveMark = isMoveMark;
11
+ exports.isMoveOut = isMoveOut;
12
+ exports.isMoveIn = isMoveIn;
13
+ exports.getMoveIn = getMoveIn;
14
+ exports.getFirstMoveEffectLength = getFirstMoveEffectLength;
15
+ exports.getCrossFieldTargetFromMove = getCrossFieldTargetFromMove;
8
16
  const internal_1 = require("@fluidframework/core-utils/internal");
9
17
  const index_js_1 = require("../../util/index.js");
10
18
  const index_js_2 = require("../modular-schema/index.js");
@@ -18,26 +26,21 @@ function setMoveEffect(moveEffects, target, revision, id, count, effect, invalid
18
26
  effect.basis = id;
19
27
  moveEffects.set(target, revision, id, count, effect, invalidate);
20
28
  }
21
- exports.setMoveEffect = setMoveEffect;
22
29
  function getMoveEffect(moveEffects, target, revision, id, count, addDependency = true) {
23
30
  const result = moveEffects.get(target, revision, id, count, addDependency);
24
31
  return result.value === undefined
25
32
  ? result
26
33
  : { ...result, value: adjustMoveEffectBasis(result.value, id) };
27
34
  }
28
- exports.getMoveEffect = getMoveEffect;
29
35
  function isMoveMark(effect) {
30
36
  return isMoveOut(effect) || isMoveIn(effect);
31
37
  }
32
- exports.isMoveMark = isMoveMark;
33
38
  function isMoveOut(effect) {
34
39
  return effect.type === "MoveOut";
35
40
  }
36
- exports.isMoveOut = isMoveOut;
37
41
  function isMoveIn(effect) {
38
42
  return effect.type === "MoveIn";
39
43
  }
40
- exports.isMoveIn = isMoveIn;
41
44
  function getMoveIn(effect) {
42
45
  switch (effect.type) {
43
46
  case "MoveIn": {
@@ -51,7 +54,6 @@ function getMoveIn(effect) {
51
54
  }
52
55
  }
53
56
  }
54
- exports.getMoveIn = getMoveIn;
55
57
  function adjustMoveEffectBasis(effect, newBasis) {
56
58
  if (effect.basis === newBasis) {
57
59
  return effect;
@@ -83,7 +85,6 @@ function getFirstMoveEffectLength(markEffect, count, effects) {
83
85
  }
84
86
  return count;
85
87
  }
86
- exports.getFirstMoveEffectLength = getFirstMoveEffectLength;
87
88
  function getCrossFieldTargetFromMove(mark) {
88
89
  const type = mark.type;
89
90
  switch (type) {
@@ -98,7 +99,6 @@ function getCrossFieldTargetFromMove(mark) {
98
99
  }
99
100
  }
100
101
  }
101
- exports.getCrossFieldTargetFromMove = getCrossFieldTargetFromMove;
102
102
  function adjustChangeAtomId(id, shift) {
103
103
  return {
104
104
  ...id,