@fluidframework/tree 2.1.1 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1457) hide show
  1. package/.mocharc.customBenchmarks.cjs +33 -0
  2. package/CHANGELOG.md +297 -0
  3. package/README.md +34 -4
  4. package/api-extractor.json +17 -0
  5. package/api-report/tree.alpha.api.md +119 -25
  6. package/api-report/tree.beta.api.md +51 -25
  7. package/api-report/tree.public.api.md +51 -25
  8. package/dist/beta.d.ts +3 -1
  9. package/dist/codec/discriminatedUnions.d.ts +11 -5
  10. package/dist/codec/discriminatedUnions.d.ts.map +1 -1
  11. package/dist/codec/discriminatedUnions.js.map +1 -1
  12. package/dist/codec/index.d.ts +1 -1
  13. package/dist/codec/index.d.ts.map +1 -1
  14. package/dist/codec/index.js.map +1 -1
  15. package/dist/core/forest/editableForest.d.ts +1 -5
  16. package/dist/core/forest/editableForest.d.ts.map +1 -1
  17. package/dist/core/forest/editableForest.js.map +1 -1
  18. package/dist/core/forest/forest.d.ts +0 -6
  19. package/dist/core/forest/forest.d.ts.map +1 -1
  20. package/dist/core/forest/forest.js +0 -2
  21. package/dist/core/forest/forest.js.map +1 -1
  22. package/dist/core/index.d.ts +2 -2
  23. package/dist/core/index.d.ts.map +1 -1
  24. package/dist/core/index.js +3 -4
  25. package/dist/core/index.js.map +1 -1
  26. package/dist/core/rebase/changeRebaser.d.ts +0 -4
  27. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  28. package/dist/core/rebase/changeRebaser.js.map +1 -1
  29. package/dist/core/rebase/index.d.ts +1 -1
  30. package/dist/core/rebase/index.d.ts.map +1 -1
  31. package/dist/core/rebase/index.js +1 -3
  32. package/dist/core/rebase/index.js.map +1 -1
  33. package/dist/core/rebase/types.d.ts +1 -8
  34. package/dist/core/rebase/types.d.ts.map +1 -1
  35. package/dist/core/rebase/types.js +1 -9
  36. package/dist/core/rebase/types.js.map +1 -1
  37. package/dist/core/rebase/utils.d.ts +0 -1
  38. package/dist/core/rebase/utils.d.ts.map +1 -1
  39. package/dist/core/rebase/utils.js +12 -7
  40. package/dist/core/rebase/utils.js.map +1 -1
  41. package/dist/core/schema-stored/multiplicity.d.ts +0 -1
  42. package/dist/core/schema-stored/multiplicity.d.ts.map +1 -1
  43. package/dist/core/schema-stored/multiplicity.js +0 -1
  44. package/dist/core/schema-stored/multiplicity.js.map +1 -1
  45. package/dist/core/schema-stored/schema.d.ts +0 -7
  46. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  47. package/dist/core/schema-stored/schema.js +0 -4
  48. package/dist/core/schema-stored/schema.js.map +1 -1
  49. package/dist/core/schema-stored/storedSchemaRepository.d.ts +0 -3
  50. package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  51. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  52. package/dist/core/schema-view/view.d.ts +0 -3
  53. package/dist/core/schema-view/view.d.ts.map +1 -1
  54. package/dist/core/schema-view/view.js +0 -1
  55. package/dist/core/schema-view/view.js.map +1 -1
  56. package/dist/core/tree/anchorSet.d.ts +0 -10
  57. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  58. package/dist/core/tree/anchorSet.js +1 -4
  59. package/dist/core/tree/anchorSet.js.map +1 -1
  60. package/dist/core/tree/cursor.d.ts +1 -6
  61. package/dist/core/tree/cursor.d.ts.map +1 -1
  62. package/dist/core/tree/cursor.js +0 -2
  63. package/dist/core/tree/cursor.js.map +1 -1
  64. package/dist/core/tree/delta.d.ts +0 -11
  65. package/dist/core/tree/delta.d.ts.map +1 -1
  66. package/dist/core/tree/delta.js.map +1 -1
  67. package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  68. package/dist/core/tree/detachedFieldIndexCodec.js +3 -2
  69. package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
  70. package/dist/core/tree/detachedFieldIndexTypes.d.ts +0 -1
  71. package/dist/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
  72. package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
  73. package/dist/core/tree/index.d.ts +1 -1
  74. package/dist/core/tree/index.d.ts.map +1 -1
  75. package/dist/core/tree/index.js +3 -1
  76. package/dist/core/tree/index.js.map +1 -1
  77. package/dist/core/tree/mapTree.d.ts +20 -4
  78. package/dist/core/tree/mapTree.d.ts.map +1 -1
  79. package/dist/core/tree/mapTree.js +29 -0
  80. package/dist/core/tree/mapTree.js.map +1 -1
  81. package/dist/core/tree/pathTree.d.ts +0 -11
  82. package/dist/core/tree/pathTree.d.ts.map +1 -1
  83. package/dist/core/tree/pathTree.js.map +1 -1
  84. package/dist/core/tree/treeTextFormat.d.ts.map +1 -1
  85. package/dist/core/tree/treeTextFormat.js +3 -2
  86. package/dist/core/tree/treeTextFormat.js.map +1 -1
  87. package/dist/core/tree/types.d.ts +0 -11
  88. package/dist/core/tree/types.d.ts.map +1 -1
  89. package/dist/core/tree/types.js +0 -4
  90. package/dist/core/tree/types.js.map +1 -1
  91. package/dist/core/tree/visitDelta.d.ts +0 -1
  92. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  93. package/dist/core/tree/visitDelta.js +2 -2
  94. package/dist/core/tree/visitDelta.js.map +1 -1
  95. package/dist/core/tree/visitPath.d.ts +0 -2
  96. package/dist/core/tree/visitPath.d.ts.map +1 -1
  97. package/dist/core/tree/visitPath.js.map +1 -1
  98. package/dist/core/tree/visitorUtils.d.ts +0 -1
  99. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  100. package/dist/core/tree/visitorUtils.js.map +1 -1
  101. package/dist/domains/index.d.ts +1 -1
  102. package/dist/domains/index.d.ts.map +1 -1
  103. package/dist/domains/index.js +2 -1
  104. package/dist/domains/index.js.map +1 -1
  105. package/dist/domains/json/index.d.ts +1 -1
  106. package/dist/domains/json/index.d.ts.map +1 -1
  107. package/dist/domains/json/index.js +2 -1
  108. package/dist/domains/json/index.js.map +1 -1
  109. package/dist/domains/json/jsonCursor.d.ts +36 -2
  110. package/dist/domains/json/jsonCursor.d.ts.map +1 -1
  111. package/dist/domains/json/jsonCursor.js +76 -5
  112. package/dist/domains/json/jsonCursor.js.map +1 -1
  113. package/dist/domains/json/jsonDomainSchema.d.ts +13 -3
  114. package/dist/domains/json/jsonDomainSchema.d.ts.map +1 -1
  115. package/dist/domains/json/jsonDomainSchema.js +12 -4
  116. package/dist/domains/json/jsonDomainSchema.js.map +1 -1
  117. package/dist/domains/leafDomain.d.ts +0 -1
  118. package/dist/domains/leafDomain.d.ts.map +1 -1
  119. package/dist/domains/leafDomain.js +0 -1
  120. package/dist/domains/leafDomain.js.map +1 -1
  121. package/dist/domains/schemaBuilder.d.ts +1 -7
  122. package/dist/domains/schemaBuilder.d.ts.map +1 -1
  123. package/dist/domains/schemaBuilder.js +0 -10
  124. package/dist/domains/schemaBuilder.js.map +1 -1
  125. package/dist/events/events.d.ts +0 -4
  126. package/dist/events/events.d.ts.map +1 -1
  127. package/dist/events/events.js +0 -1
  128. package/dist/events/events.js.map +1 -1
  129. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  130. package/dist/feature-libraries/chunked-forest/basicChunk.js +8 -3
  131. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  132. package/dist/feature-libraries/chunked-forest/chunk.d.ts +1 -1
  133. package/dist/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
  134. package/dist/feature-libraries/chunked-forest/chunk.js.map +1 -1
  135. package/dist/feature-libraries/chunked-forest/chunkTree.js +3 -3
  136. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  137. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  138. package/dist/feature-libraries/chunked-forest/chunkedForest.js +7 -5
  139. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  140. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +1 -1
  141. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  142. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  143. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +8 -5
  144. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  145. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  146. package/dist/feature-libraries/chunked-forest/uniformChunk.js +5 -3
  147. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  148. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +12 -24
  149. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  150. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +9 -19
  151. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  152. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +0 -6
  153. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  154. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +11 -1
  155. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  156. package/dist/feature-libraries/default-schema/defaultSchema.d.ts +0 -1
  157. package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
  158. package/dist/feature-libraries/default-schema/defaultSchema.js +0 -1
  159. package/dist/feature-libraries/default-schema/defaultSchema.js.map +1 -1
  160. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  161. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  162. package/dist/feature-libraries/default-schema/index.js +2 -1
  163. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  164. package/dist/feature-libraries/default-schema/schemaChecker.d.ts +6 -0
  165. package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  166. package/dist/feature-libraries/default-schema/schemaChecker.js +6 -0
  167. package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  168. package/dist/feature-libraries/editableTreeBinder.d.ts +0 -67
  169. package/dist/feature-libraries/editableTreeBinder.d.ts.map +1 -1
  170. package/dist/feature-libraries/editableTreeBinder.js +5 -24
  171. package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
  172. package/dist/feature-libraries/fieldGenerator.d.ts +0 -3
  173. package/dist/feature-libraries/fieldGenerator.d.ts.map +1 -1
  174. package/dist/feature-libraries/fieldGenerator.js +0 -1
  175. package/dist/feature-libraries/fieldGenerator.js.map +1 -1
  176. package/dist/feature-libraries/flex-map-tree/index.d.ts +1 -1
  177. package/dist/feature-libraries/flex-map-tree/index.d.ts.map +1 -1
  178. package/dist/feature-libraries/flex-map-tree/index.js +2 -2
  179. package/dist/feature-libraries/flex-map-tree/index.js.map +1 -1
  180. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts +57 -49
  181. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
  182. package/dist/feature-libraries/flex-map-tree/mapTreeNode.js +171 -168
  183. package/dist/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
  184. package/dist/feature-libraries/flex-tree/context.d.ts +0 -1
  185. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  186. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  187. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +17 -282
  188. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  189. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +0 -4
  190. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  191. package/dist/feature-libraries/flex-tree/index.d.ts +1 -1
  192. package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
  193. package/dist/feature-libraries/flex-tree/index.js.map +1 -1
  194. package/dist/feature-libraries/flex-tree/lazyField.d.ts +9 -26
  195. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  196. package/dist/feature-libraries/flex-tree/lazyField.js +26 -99
  197. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  198. package/dist/feature-libraries/flex-tree/lazyNode.d.ts +2 -10
  199. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  200. package/dist/feature-libraries/flex-tree/lazyNode.js +3 -42
  201. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  202. package/dist/feature-libraries/flex-tree/treeEvents.d.ts +0 -2
  203. package/dist/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  204. package/dist/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  205. package/dist/feature-libraries/flex-tree/utilities.d.ts +2 -1
  206. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  207. package/dist/feature-libraries/flex-tree/utilities.js +4 -0
  208. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  209. package/dist/feature-libraries/forest-summary/codec.js +2 -2
  210. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  211. package/dist/feature-libraries/index.d.ts +6 -8
  212. package/dist/feature-libraries/index.d.ts.map +1 -1
  213. package/dist/feature-libraries/index.js +7 -18
  214. package/dist/feature-libraries/index.js.map +1 -1
  215. package/dist/feature-libraries/mapTreeCursor.d.ts +6 -2
  216. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  217. package/dist/feature-libraries/mapTreeCursor.js +9 -1
  218. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  219. package/dist/feature-libraries/memoizedIdRangeAllocator.d.ts +0 -4
  220. package/dist/feature-libraries/memoizedIdRangeAllocator.d.ts.map +1 -1
  221. package/dist/feature-libraries/memoizedIdRangeAllocator.js +0 -1
  222. package/dist/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
  223. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +0 -2
  224. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  225. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +0 -1
  226. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  227. package/dist/feature-libraries/modular-schema/discrepancies.d.ts +18 -0
  228. package/dist/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
  229. package/dist/feature-libraries/modular-schema/discrepancies.js +105 -2
  230. package/dist/feature-libraries/modular-schema/discrepancies.js.map +1 -1
  231. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +0 -8
  232. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  233. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js +0 -1
  234. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  235. package/dist/feature-libraries/modular-schema/fieldKind.d.ts +1 -3
  236. package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  237. package/dist/feature-libraries/modular-schema/fieldKind.js +1 -2
  238. package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  239. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -2
  240. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  241. package/dist/feature-libraries/modular-schema/genericFieldKind.js +57 -85
  242. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  243. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +1 -1
  244. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  245. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +5 -8
  246. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  247. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +3 -14
  248. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  249. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js +6 -0
  250. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  251. package/dist/feature-libraries/modular-schema/index.d.ts +2 -2
  252. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  253. package/dist/feature-libraries/modular-schema/index.js +2 -1
  254. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  255. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  256. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +39 -22
  257. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  258. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -8
  259. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  260. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +192 -228
  261. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  262. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -14
  263. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  264. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  265. package/dist/feature-libraries/node-key/nodeKey.d.ts +0 -4
  266. package/dist/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
  267. package/dist/feature-libraries/node-key/nodeKey.js +0 -2
  268. package/dist/feature-libraries/node-key/nodeKey.js.map +1 -1
  269. package/dist/feature-libraries/node-key/nodeKeyManager.d.ts +0 -1
  270. package/dist/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
  271. package/dist/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
  272. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  273. package/dist/feature-libraries/object-forest/objectForest.js +1 -10
  274. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  275. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +6 -6
  276. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  277. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +7 -7
  278. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  279. package/dist/feature-libraries/schemaBuilderBase.d.ts +2 -28
  280. package/dist/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
  281. package/dist/feature-libraries/schemaBuilderBase.js +1 -27
  282. package/dist/feature-libraries/schemaBuilderBase.js.map +1 -1
  283. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  284. package/dist/feature-libraries/sequence-field/compose.js +24 -21
  285. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  286. package/dist/feature-libraries/sequence-field/formatV2.d.ts +3 -3
  287. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  288. package/dist/feature-libraries/sequence-field/formatV2.js +7 -6
  289. package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
  290. package/dist/feature-libraries/sequence-field/formatV3.d.ts +195 -0
  291. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -0
  292. package/dist/feature-libraries/sequence-field/formatV3.js +23 -0
  293. package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -0
  294. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +11 -0
  295. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  296. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  297. package/dist/feature-libraries/sequence-field/index.d.ts +1 -1
  298. package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
  299. package/dist/feature-libraries/sequence-field/index.js.map +1 -1
  300. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  301. package/dist/feature-libraries/sequence-field/invert.js +21 -13
  302. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  303. package/dist/feature-libraries/sequence-field/markQueue.js +1 -1
  304. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  305. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +2 -2
  306. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  307. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  308. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  309. package/dist/feature-libraries/sequence-field/rebase.js +24 -6
  310. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  311. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  312. package/dist/feature-libraries/sequence-field/replaceRevisions.js +16 -3
  313. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  314. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  315. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +38 -4
  316. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  317. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -1
  318. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  319. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +54 -9
  320. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  321. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +11 -0
  322. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -0
  323. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +85 -0
  324. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -0
  325. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  326. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js +2 -0
  327. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  328. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  329. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +4 -1
  330. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  331. package/dist/feature-libraries/sequence-field/types.d.ts +23 -4
  332. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  333. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  334. package/dist/feature-libraries/sequence-field/utils.d.ts +5 -4
  335. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  336. package/dist/feature-libraries/sequence-field/utils.js +70 -42
  337. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  338. package/dist/feature-libraries/storedToViewSchema.d.ts +0 -1
  339. package/dist/feature-libraries/storedToViewSchema.d.ts.map +1 -1
  340. package/dist/feature-libraries/storedToViewSchema.js +0 -1
  341. package/dist/feature-libraries/storedToViewSchema.js.map +1 -1
  342. package/dist/feature-libraries/treeCursorUtils.d.ts +0 -6
  343. package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  344. package/dist/feature-libraries/treeCursorUtils.js +8 -6
  345. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  346. package/dist/feature-libraries/treeTextCursor.d.ts +0 -2
  347. package/dist/feature-libraries/treeTextCursor.d.ts.map +1 -1
  348. package/dist/feature-libraries/treeTextCursor.js +0 -2
  349. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  350. package/dist/feature-libraries/typed-schema/flexList.d.ts +0 -3
  351. package/dist/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
  352. package/dist/feature-libraries/typed-schema/flexList.js.map +1 -1
  353. package/dist/feature-libraries/typed-schema/index.d.ts +1 -1
  354. package/dist/feature-libraries/typed-schema/index.d.ts.map +1 -1
  355. package/dist/feature-libraries/typed-schema/index.js +1 -3
  356. package/dist/feature-libraries/typed-schema/index.js.map +1 -1
  357. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
  358. package/dist/feature-libraries/typed-schema/schemaCollection.js +0 -4
  359. package/dist/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
  360. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +2 -41
  361. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  362. package/dist/feature-libraries/typed-schema/typedTreeSchema.js +1 -40
  363. package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  364. package/dist/feature-libraries/typed-schema/view.d.ts +0 -1
  365. package/dist/feature-libraries/typed-schema/view.d.ts.map +1 -1
  366. package/dist/feature-libraries/typed-schema/view.js.map +1 -1
  367. package/dist/index.d.ts +8 -9
  368. package/dist/index.d.ts.map +1 -1
  369. package/dist/index.js +31 -90
  370. package/dist/index.js.map +1 -1
  371. package/dist/internalTypes.d.ts +1 -1
  372. package/dist/internalTypes.d.ts.map +1 -1
  373. package/dist/internalTypes.js.map +1 -1
  374. package/dist/packageVersion.d.ts +1 -1
  375. package/dist/packageVersion.js +1 -1
  376. package/dist/packageVersion.js.map +1 -1
  377. package/dist/public.d.ts +3 -1
  378. package/dist/shared-tree/schematizeTree.d.ts +2 -11
  379. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  380. package/dist/shared-tree/schematizeTree.js +13 -2
  381. package/dist/shared-tree/schematizeTree.js.map +1 -1
  382. package/dist/shared-tree/schematizingTreeView.d.ts +4 -4
  383. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  384. package/dist/shared-tree/schematizingTreeView.js +2 -2
  385. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  386. package/dist/shared-tree/sharedTree.d.ts +4 -17
  387. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  388. package/dist/shared-tree/sharedTree.js +4 -8
  389. package/dist/shared-tree/sharedTree.js.map +1 -1
  390. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  391. package/dist/shared-tree/sharedTreeChangeCodecs.js +4 -0
  392. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  393. package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
  394. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  395. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +0 -2
  396. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  397. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  398. package/dist/shared-tree/treeApi.js +2 -2
  399. package/dist/shared-tree/treeApi.js.map +1 -1
  400. package/dist/shared-tree/treeCheckout.d.ts +0 -5
  401. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  402. package/dist/shared-tree/treeCheckout.js +5 -3
  403. package/dist/shared-tree/treeCheckout.js.map +1 -1
  404. package/dist/shared-tree/treeView.d.ts +3 -6
  405. package/dist/shared-tree/treeView.d.ts.map +1 -1
  406. package/dist/shared-tree/treeView.js.map +1 -1
  407. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  408. package/dist/shared-tree-core/branch.js +11 -6
  409. package/dist/shared-tree-core/branch.js.map +1 -1
  410. package/dist/shared-tree-core/defaultResubmitMachine.js +3 -3
  411. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  412. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  413. package/dist/shared-tree-core/editManagerCodecs.js +1 -0
  414. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  415. package/dist/shared-tree-core/editManagerFormat.d.ts +2 -2
  416. package/dist/shared-tree-core/editManagerFormat.d.ts.map +1 -1
  417. package/dist/shared-tree-core/editManagerFormat.js +6 -1
  418. package/dist/shared-tree-core/editManagerFormat.js.map +1 -1
  419. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  420. package/dist/shared-tree-core/messageCodecs.js +1 -0
  421. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  422. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  423. package/dist/shared-tree-core/sharedTreeCore.js +3 -1
  424. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  425. package/dist/simple-tree/api/create.d.ts +54 -0
  426. package/dist/simple-tree/api/create.d.ts.map +1 -0
  427. package/dist/simple-tree/api/create.js +99 -0
  428. package/dist/simple-tree/api/create.js.map +1 -0
  429. package/dist/simple-tree/api/index.d.ts +12 -0
  430. package/dist/simple-tree/api/index.d.ts.map +1 -0
  431. package/dist/simple-tree/api/index.js +28 -0
  432. package/dist/simple-tree/api/index.js.map +1 -0
  433. package/{lib/simple-tree → dist/simple-tree/api}/schemaCreationUtilities.d.ts +7 -4
  434. package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -0
  435. package/dist/simple-tree/{schemaCreationUtilities.js → api/schemaCreationUtilities.js} +1 -1
  436. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -0
  437. package/dist/simple-tree/{schemaFactory.d.ts → api/schemaFactory.d.ts} +15 -14
  438. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -0
  439. package/dist/simple-tree/{schemaFactory.js → api/schemaFactory.js} +10 -9
  440. package/dist/simple-tree/api/schemaFactory.js.map +1 -0
  441. package/{lib/simple-tree → dist/simple-tree/api}/schemaFactoryRecursive.d.ts +40 -7
  442. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -0
  443. package/dist/simple-tree/{schemaFactoryRecursive.js → api/schemaFactoryRecursive.js} +1 -1
  444. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -0
  445. package/dist/simple-tree/api/testRecursiveDomain.d.ts +62 -0
  446. package/dist/simple-tree/api/testRecursiveDomain.d.ts.map +1 -0
  447. package/dist/simple-tree/api/testRecursiveDomain.js.map +1 -0
  448. package/{lib/simple-tree → dist/simple-tree/api}/tree.d.ts +111 -20
  449. package/dist/simple-tree/api/tree.d.ts.map +1 -0
  450. package/dist/simple-tree/api/tree.js +173 -0
  451. package/dist/simple-tree/api/tree.js.map +1 -0
  452. package/dist/simple-tree/{treeNodeApi.d.ts → api/treeNodeApi.d.ts} +6 -5
  453. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -0
  454. package/dist/simple-tree/{treeNodeApi.js → api/treeNodeApi.js} +28 -20
  455. package/dist/simple-tree/api/treeNodeApi.js.map +1 -0
  456. package/dist/simple-tree/api/verboseTree.d.ts +136 -0
  457. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -0
  458. package/dist/simple-tree/api/verboseTree.js +220 -0
  459. package/dist/simple-tree/api/verboseTree.js.map +1 -0
  460. package/dist/simple-tree/arrayNode.d.ts +3 -3
  461. package/dist/simple-tree/arrayNode.d.ts.map +1 -1
  462. package/dist/simple-tree/arrayNode.js +70 -69
  463. package/dist/simple-tree/arrayNode.js.map +1 -1
  464. package/dist/simple-tree/core/index.d.ts +10 -0
  465. package/dist/simple-tree/core/index.d.ts.map +1 -0
  466. package/dist/simple-tree/core/index.js +27 -0
  467. package/dist/simple-tree/core/index.js.map +1 -0
  468. package/{lib/simple-tree → dist/simple-tree/core}/schemaCaching.d.ts +2 -9
  469. package/dist/simple-tree/core/schemaCaching.d.ts.map +1 -0
  470. package/dist/simple-tree/{schemaCaching.js → core/schemaCaching.js} +2 -23
  471. package/dist/simple-tree/core/schemaCaching.js.map +1 -0
  472. package/dist/simple-tree/core/treeNodeKernel.d.ts +57 -0
  473. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -0
  474. package/dist/simple-tree/{treeNodeKernel.js → core/treeNodeKernel.js} +49 -4
  475. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -0
  476. package/dist/simple-tree/core/treeNodeSchema.d.ts +149 -0
  477. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -0
  478. package/dist/simple-tree/core/treeNodeSchema.js +35 -0
  479. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -0
  480. package/dist/simple-tree/{types.d.ts → core/types.d.ts} +23 -70
  481. package/dist/simple-tree/core/types.d.ts.map +1 -0
  482. package/dist/simple-tree/core/types.js +117 -0
  483. package/dist/simple-tree/core/types.js.map +1 -0
  484. package/dist/simple-tree/core/withType.d.ts +82 -0
  485. package/dist/simple-tree/core/withType.d.ts.map +1 -0
  486. package/dist/simple-tree/core/withType.js +39 -0
  487. package/dist/simple-tree/core/withType.js.map +1 -0
  488. package/dist/simple-tree/getJsonSchema.d.ts +55 -0
  489. package/dist/simple-tree/getJsonSchema.d.ts.map +1 -0
  490. package/dist/simple-tree/getJsonSchema.js +69 -0
  491. package/dist/simple-tree/getJsonSchema.js.map +1 -0
  492. package/dist/simple-tree/getSimpleFieldSchema.d.ts +14 -0
  493. package/dist/simple-tree/getSimpleFieldSchema.d.ts.map +1 -0
  494. package/dist/simple-tree/getSimpleFieldSchema.js +29 -0
  495. package/dist/simple-tree/getSimpleFieldSchema.js.map +1 -0
  496. package/dist/simple-tree/getSimpleSchema.d.ts +58 -0
  497. package/dist/simple-tree/getSimpleSchema.d.ts.map +1 -0
  498. package/dist/simple-tree/getSimpleSchema.js +68 -0
  499. package/dist/simple-tree/getSimpleSchema.js.map +1 -0
  500. package/dist/simple-tree/index.d.ts +12 -13
  501. package/dist/simple-tree/index.d.ts.map +1 -1
  502. package/dist/simple-tree/index.js +26 -23
  503. package/dist/simple-tree/index.js.map +1 -1
  504. package/dist/simple-tree/jsonSchema.d.ts +206 -0
  505. package/dist/simple-tree/jsonSchema.d.ts.map +1 -0
  506. package/dist/{feature-libraries/schema-aware/index.js → simple-tree/jsonSchema.js} +1 -1
  507. package/dist/simple-tree/jsonSchema.js.map +1 -0
  508. package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
  509. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  510. package/dist/simple-tree/leafNodeSchema.js +3 -4
  511. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  512. package/dist/simple-tree/mapNode.d.ts +9 -3
  513. package/dist/simple-tree/mapNode.d.ts.map +1 -1
  514. package/dist/simple-tree/mapNode.js +33 -35
  515. package/dist/simple-tree/mapNode.js.map +1 -1
  516. package/dist/simple-tree/objectNode.d.ts +18 -16
  517. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  518. package/dist/simple-tree/objectNode.js +43 -44
  519. package/dist/simple-tree/objectNode.js.map +1 -1
  520. package/dist/simple-tree/objectNodeTypes.d.ts +38 -0
  521. package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -0
  522. package/dist/simple-tree/objectNodeTypes.js +19 -0
  523. package/dist/simple-tree/objectNodeTypes.js.map +1 -0
  524. package/dist/simple-tree/proxies.d.ts +6 -25
  525. package/dist/simple-tree/proxies.d.ts.map +1 -1
  526. package/dist/simple-tree/proxies.js +50 -63
  527. package/dist/simple-tree/proxies.js.map +1 -1
  528. package/dist/simple-tree/proxyBinding.d.ts +45 -22
  529. package/dist/simple-tree/proxyBinding.d.ts.map +1 -1
  530. package/dist/simple-tree/proxyBinding.js +94 -59
  531. package/dist/simple-tree/proxyBinding.js.map +1 -1
  532. package/dist/simple-tree/schemaTypes.d.ts +10 -159
  533. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  534. package/dist/simple-tree/schemaTypes.js +11 -42
  535. package/dist/simple-tree/schemaTypes.js.map +1 -1
  536. package/dist/simple-tree/simpleSchema.d.ts +124 -0
  537. package/dist/simple-tree/simpleSchema.d.ts.map +1 -0
  538. package/dist/{feature-libraries/schema-aware/schemaAware.js → simple-tree/simpleSchema.js} +1 -1
  539. package/dist/simple-tree/simpleSchema.js.map +1 -0
  540. package/dist/simple-tree/simpleSchemaToJsonSchema.d.ts +12 -0
  541. package/dist/simple-tree/simpleSchemaToJsonSchema.d.ts.map +1 -0
  542. package/dist/simple-tree/simpleSchemaToJsonSchema.js +146 -0
  543. package/dist/simple-tree/simpleSchemaToJsonSchema.js.map +1 -0
  544. package/dist/simple-tree/toFlexSchema.d.ts +4 -12
  545. package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
  546. package/dist/simple-tree/toFlexSchema.js +42 -52
  547. package/dist/simple-tree/toFlexSchema.js.map +1 -1
  548. package/dist/simple-tree/toMapTree.d.ts +39 -39
  549. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  550. package/dist/simple-tree/toMapTree.js +227 -171
  551. package/dist/simple-tree/toMapTree.js.map +1 -1
  552. package/dist/simple-tree/treeNodeValid.d.ts +74 -0
  553. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -0
  554. package/dist/simple-tree/{types.js → treeNodeValid.js} +18 -111
  555. package/dist/simple-tree/treeNodeValid.js.map +1 -0
  556. package/dist/simple-tree/typesUnsafe.d.ts +35 -4
  557. package/dist/simple-tree/typesUnsafe.d.ts.map +1 -1
  558. package/dist/simple-tree/typesUnsafe.js.map +1 -1
  559. package/dist/simple-tree/viewSchemaToSimpleSchema.d.ts +11 -0
  560. package/dist/simple-tree/viewSchemaToSimpleSchema.d.ts.map +1 -0
  561. package/dist/simple-tree/viewSchemaToSimpleSchema.js +171 -0
  562. package/dist/simple-tree/viewSchemaToSimpleSchema.js.map +1 -0
  563. package/dist/util/brand.d.ts +0 -3
  564. package/dist/util/brand.d.ts.map +1 -1
  565. package/dist/util/brand.js +1 -2
  566. package/dist/util/brand.js.map +1 -1
  567. package/dist/util/brandedMap.d.ts +0 -5
  568. package/dist/util/brandedMap.d.ts.map +1 -1
  569. package/dist/util/brandedMap.js +0 -1
  570. package/dist/util/brandedMap.js.map +1 -1
  571. package/dist/util/idAllocator.d.ts +0 -2
  572. package/dist/util/idAllocator.d.ts.map +1 -1
  573. package/dist/util/idAllocator.js +0 -1
  574. package/dist/util/idAllocator.js.map +1 -1
  575. package/dist/util/index.d.ts +2 -2
  576. package/dist/util/index.d.ts.map +1 -1
  577. package/dist/util/index.js +4 -2
  578. package/dist/util/index.js.map +1 -1
  579. package/dist/util/nestedMap.d.ts +5 -19
  580. package/dist/util/nestedMap.d.ts.map +1 -1
  581. package/dist/util/nestedMap.js +17 -17
  582. package/dist/util/nestedMap.js.map +1 -1
  583. package/dist/util/opaque.d.ts +0 -4
  584. package/dist/util/opaque.d.ts.map +1 -1
  585. package/dist/util/opaque.js +0 -2
  586. package/dist/util/opaque.js.map +1 -1
  587. package/dist/util/rangeMap.d.ts +0 -2
  588. package/dist/util/rangeMap.d.ts.map +1 -1
  589. package/dist/util/rangeMap.js +4 -3
  590. package/dist/util/rangeMap.js.map +1 -1
  591. package/dist/util/transactionResult.d.ts +0 -1
  592. package/dist/util/transactionResult.d.ts.map +1 -1
  593. package/dist/util/transactionResult.js +0 -1
  594. package/dist/util/transactionResult.js.map +1 -1
  595. package/dist/util/typeCheck.d.ts +2 -20
  596. package/dist/util/typeCheck.d.ts.map +1 -1
  597. package/dist/util/typeCheck.js.map +1 -1
  598. package/dist/util/typeCheckTests.d.ts +4 -4
  599. package/dist/util/typeCheckTests.d.ts.map +1 -1
  600. package/dist/util/typeCheckTests.js.map +1 -1
  601. package/dist/util/typeUtils.d.ts +0 -7
  602. package/dist/util/typeUtils.d.ts.map +1 -1
  603. package/dist/util/typeUtils.js.map +1 -1
  604. package/dist/util/utils.d.ts +6 -8
  605. package/dist/util/utils.d.ts.map +1 -1
  606. package/dist/util/utils.js +14 -5
  607. package/dist/util/utils.js.map +1 -1
  608. package/lib/beta.d.ts +3 -1
  609. package/lib/codec/discriminatedUnions.d.ts +11 -5
  610. package/lib/codec/discriminatedUnions.d.ts.map +1 -1
  611. package/lib/codec/discriminatedUnions.js.map +1 -1
  612. package/lib/codec/index.d.ts +1 -1
  613. package/lib/codec/index.d.ts.map +1 -1
  614. package/lib/codec/index.js +1 -1
  615. package/lib/codec/index.js.map +1 -1
  616. package/lib/core/forest/editableForest.d.ts +1 -5
  617. package/lib/core/forest/editableForest.d.ts.map +1 -1
  618. package/lib/core/forest/editableForest.js.map +1 -1
  619. package/lib/core/forest/forest.d.ts +0 -6
  620. package/lib/core/forest/forest.d.ts.map +1 -1
  621. package/lib/core/forest/forest.js +0 -2
  622. package/lib/core/forest/forest.js.map +1 -1
  623. package/lib/core/index.d.ts +2 -2
  624. package/lib/core/index.d.ts.map +1 -1
  625. package/lib/core/index.js +2 -2
  626. package/lib/core/index.js.map +1 -1
  627. package/lib/core/rebase/changeRebaser.d.ts +0 -4
  628. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  629. package/lib/core/rebase/changeRebaser.js.map +1 -1
  630. package/lib/core/rebase/index.d.ts +1 -1
  631. package/lib/core/rebase/index.d.ts.map +1 -1
  632. package/lib/core/rebase/index.js +1 -1
  633. package/lib/core/rebase/index.js.map +1 -1
  634. package/lib/core/rebase/types.d.ts +1 -8
  635. package/lib/core/rebase/types.d.ts.map +1 -1
  636. package/lib/core/rebase/types.js +1 -7
  637. package/lib/core/rebase/types.js.map +1 -1
  638. package/lib/core/rebase/utils.d.ts +0 -1
  639. package/lib/core/rebase/utils.d.ts.map +1 -1
  640. package/lib/core/rebase/utils.js +13 -8
  641. package/lib/core/rebase/utils.js.map +1 -1
  642. package/lib/core/schema-stored/multiplicity.d.ts +0 -1
  643. package/lib/core/schema-stored/multiplicity.d.ts.map +1 -1
  644. package/lib/core/schema-stored/multiplicity.js +0 -1
  645. package/lib/core/schema-stored/multiplicity.js.map +1 -1
  646. package/lib/core/schema-stored/schema.d.ts +0 -7
  647. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  648. package/lib/core/schema-stored/schema.js +0 -4
  649. package/lib/core/schema-stored/schema.js.map +1 -1
  650. package/lib/core/schema-stored/storedSchemaRepository.d.ts +0 -3
  651. package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  652. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  653. package/lib/core/schema-view/view.d.ts +0 -3
  654. package/lib/core/schema-view/view.d.ts.map +1 -1
  655. package/lib/core/schema-view/view.js +0 -1
  656. package/lib/core/schema-view/view.js.map +1 -1
  657. package/lib/core/tree/anchorSet.d.ts +0 -10
  658. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  659. package/lib/core/tree/anchorSet.js +1 -4
  660. package/lib/core/tree/anchorSet.js.map +1 -1
  661. package/lib/core/tree/cursor.d.ts +1 -6
  662. package/lib/core/tree/cursor.d.ts.map +1 -1
  663. package/lib/core/tree/cursor.js +0 -2
  664. package/lib/core/tree/cursor.js.map +1 -1
  665. package/lib/core/tree/delta.d.ts +0 -11
  666. package/lib/core/tree/delta.d.ts.map +1 -1
  667. package/lib/core/tree/delta.js.map +1 -1
  668. package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  669. package/lib/core/tree/detachedFieldIndexCodec.js +4 -3
  670. package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
  671. package/lib/core/tree/detachedFieldIndexTypes.d.ts +0 -1
  672. package/lib/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
  673. package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
  674. package/lib/core/tree/index.d.ts +1 -1
  675. package/lib/core/tree/index.d.ts.map +1 -1
  676. package/lib/core/tree/index.js +1 -0
  677. package/lib/core/tree/index.js.map +1 -1
  678. package/lib/core/tree/mapTree.d.ts +20 -4
  679. package/lib/core/tree/mapTree.d.ts.map +1 -1
  680. package/lib/core/tree/mapTree.js +27 -1
  681. package/lib/core/tree/mapTree.js.map +1 -1
  682. package/lib/core/tree/pathTree.d.ts +0 -11
  683. package/lib/core/tree/pathTree.d.ts.map +1 -1
  684. package/lib/core/tree/pathTree.js.map +1 -1
  685. package/lib/core/tree/treeTextFormat.d.ts.map +1 -1
  686. package/lib/core/tree/treeTextFormat.js +3 -2
  687. package/lib/core/tree/treeTextFormat.js.map +1 -1
  688. package/lib/core/tree/types.d.ts +0 -11
  689. package/lib/core/tree/types.d.ts.map +1 -1
  690. package/lib/core/tree/types.js +0 -4
  691. package/lib/core/tree/types.js.map +1 -1
  692. package/lib/core/tree/visitDelta.d.ts +0 -1
  693. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  694. package/lib/core/tree/visitDelta.js +2 -2
  695. package/lib/core/tree/visitDelta.js.map +1 -1
  696. package/lib/core/tree/visitPath.d.ts +0 -2
  697. package/lib/core/tree/visitPath.d.ts.map +1 -1
  698. package/lib/core/tree/visitPath.js.map +1 -1
  699. package/lib/core/tree/visitorUtils.d.ts +0 -1
  700. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  701. package/lib/core/tree/visitorUtils.js.map +1 -1
  702. package/lib/domains/index.d.ts +1 -1
  703. package/lib/domains/index.d.ts.map +1 -1
  704. package/lib/domains/index.js +1 -1
  705. package/lib/domains/index.js.map +1 -1
  706. package/lib/domains/json/index.d.ts +1 -1
  707. package/lib/domains/json/index.d.ts.map +1 -1
  708. package/lib/domains/json/index.js +1 -1
  709. package/lib/domains/json/index.js.map +1 -1
  710. package/lib/domains/json/jsonCursor.d.ts +36 -2
  711. package/lib/domains/json/jsonCursor.d.ts.map +1 -1
  712. package/lib/domains/json/jsonCursor.js +76 -5
  713. package/lib/domains/json/jsonCursor.js.map +1 -1
  714. package/lib/domains/json/jsonDomainSchema.d.ts +13 -3
  715. package/lib/domains/json/jsonDomainSchema.d.ts.map +1 -1
  716. package/lib/domains/json/jsonDomainSchema.js +9 -1
  717. package/lib/domains/json/jsonDomainSchema.js.map +1 -1
  718. package/lib/domains/leafDomain.d.ts +0 -1
  719. package/lib/domains/leafDomain.d.ts.map +1 -1
  720. package/lib/domains/leafDomain.js +0 -1
  721. package/lib/domains/leafDomain.js.map +1 -1
  722. package/lib/domains/schemaBuilder.d.ts +1 -7
  723. package/lib/domains/schemaBuilder.d.ts.map +1 -1
  724. package/lib/domains/schemaBuilder.js +1 -11
  725. package/lib/domains/schemaBuilder.js.map +1 -1
  726. package/lib/events/events.d.ts +0 -4
  727. package/lib/events/events.d.ts.map +1 -1
  728. package/lib/events/events.js +0 -1
  729. package/lib/events/events.js.map +1 -1
  730. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  731. package/lib/feature-libraries/chunked-forest/basicChunk.js +9 -4
  732. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  733. package/lib/feature-libraries/chunked-forest/chunk.d.ts +1 -1
  734. package/lib/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
  735. package/lib/feature-libraries/chunked-forest/chunk.js.map +1 -1
  736. package/lib/feature-libraries/chunked-forest/chunkTree.js +4 -4
  737. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  738. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  739. package/lib/feature-libraries/chunked-forest/chunkedForest.js +8 -6
  740. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  741. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +2 -2
  742. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  743. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  744. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +9 -6
  745. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  746. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  747. package/lib/feature-libraries/chunked-forest/uniformChunk.js +6 -4
  748. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  749. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +12 -24
  750. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  751. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +6 -16
  752. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  753. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +0 -6
  754. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  755. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +11 -1
  756. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  757. package/lib/feature-libraries/default-schema/defaultSchema.d.ts +0 -1
  758. package/lib/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
  759. package/lib/feature-libraries/default-schema/defaultSchema.js +0 -1
  760. package/lib/feature-libraries/default-schema/defaultSchema.js.map +1 -1
  761. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  762. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  763. package/lib/feature-libraries/default-schema/index.js +1 -1
  764. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  765. package/lib/feature-libraries/default-schema/schemaChecker.d.ts +6 -0
  766. package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  767. package/lib/feature-libraries/default-schema/schemaChecker.js +6 -0
  768. package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  769. package/lib/feature-libraries/editableTreeBinder.d.ts +0 -67
  770. package/lib/feature-libraries/editableTreeBinder.d.ts.map +1 -1
  771. package/lib/feature-libraries/editableTreeBinder.js +6 -25
  772. package/lib/feature-libraries/editableTreeBinder.js.map +1 -1
  773. package/lib/feature-libraries/fieldGenerator.d.ts +0 -3
  774. package/lib/feature-libraries/fieldGenerator.d.ts.map +1 -1
  775. package/lib/feature-libraries/fieldGenerator.js +0 -1
  776. package/lib/feature-libraries/fieldGenerator.js.map +1 -1
  777. package/lib/feature-libraries/flex-map-tree/index.d.ts +1 -1
  778. package/lib/feature-libraries/flex-map-tree/index.d.ts.map +1 -1
  779. package/lib/feature-libraries/flex-map-tree/index.js +1 -1
  780. package/lib/feature-libraries/flex-map-tree/index.js.map +1 -1
  781. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts +57 -49
  782. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
  783. package/lib/feature-libraries/flex-map-tree/mapTreeNode.js +172 -168
  784. package/lib/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
  785. package/lib/feature-libraries/flex-tree/context.d.ts +0 -1
  786. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  787. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  788. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +17 -282
  789. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  790. package/lib/feature-libraries/flex-tree/flexTreeTypes.js +0 -4
  791. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  792. package/lib/feature-libraries/flex-tree/index.d.ts +1 -1
  793. package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
  794. package/lib/feature-libraries/flex-tree/index.js.map +1 -1
  795. package/lib/feature-libraries/flex-tree/lazyField.d.ts +9 -26
  796. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  797. package/lib/feature-libraries/flex-tree/lazyField.js +28 -101
  798. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  799. package/lib/feature-libraries/flex-tree/lazyNode.d.ts +2 -10
  800. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  801. package/lib/feature-libraries/flex-tree/lazyNode.js +4 -42
  802. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  803. package/lib/feature-libraries/flex-tree/treeEvents.d.ts +0 -2
  804. package/lib/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  805. package/lib/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  806. package/lib/feature-libraries/flex-tree/utilities.d.ts +2 -1
  807. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  808. package/lib/feature-libraries/flex-tree/utilities.js +4 -0
  809. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  810. package/lib/feature-libraries/forest-summary/codec.js +3 -3
  811. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  812. package/lib/feature-libraries/index.d.ts +6 -8
  813. package/lib/feature-libraries/index.d.ts.map +1 -1
  814. package/lib/feature-libraries/index.js +5 -6
  815. package/lib/feature-libraries/index.js.map +1 -1
  816. package/lib/feature-libraries/mapTreeCursor.d.ts +6 -2
  817. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  818. package/lib/feature-libraries/mapTreeCursor.js +7 -0
  819. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  820. package/lib/feature-libraries/memoizedIdRangeAllocator.d.ts +0 -4
  821. package/lib/feature-libraries/memoizedIdRangeAllocator.d.ts.map +1 -1
  822. package/lib/feature-libraries/memoizedIdRangeAllocator.js +0 -1
  823. package/lib/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
  824. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +0 -2
  825. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  826. package/lib/feature-libraries/modular-schema/crossFieldQueries.js +0 -1
  827. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  828. package/lib/feature-libraries/modular-schema/discrepancies.d.ts +18 -0
  829. package/lib/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
  830. package/lib/feature-libraries/modular-schema/discrepancies.js +103 -1
  831. package/lib/feature-libraries/modular-schema/discrepancies.js.map +1 -1
  832. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +0 -8
  833. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  834. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js +0 -1
  835. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  836. package/lib/feature-libraries/modular-schema/fieldKind.d.ts +1 -3
  837. package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  838. package/lib/feature-libraries/modular-schema/fieldKind.js +1 -2
  839. package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  840. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -2
  841. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  842. package/lib/feature-libraries/modular-schema/genericFieldKind.js +56 -83
  843. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  844. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +1 -1
  845. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  846. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js +6 -9
  847. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  848. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +3 -14
  849. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  850. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js +4 -1
  851. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  852. package/lib/feature-libraries/modular-schema/index.d.ts +2 -2
  853. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  854. package/lib/feature-libraries/modular-schema/index.js +1 -1
  855. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  856. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  857. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +42 -25
  858. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  859. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +9 -8
  860. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  861. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +169 -206
  862. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  863. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -14
  864. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  865. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  866. package/lib/feature-libraries/node-key/nodeKey.d.ts +0 -4
  867. package/lib/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
  868. package/lib/feature-libraries/node-key/nodeKey.js +0 -2
  869. package/lib/feature-libraries/node-key/nodeKey.js.map +1 -1
  870. package/lib/feature-libraries/node-key/nodeKeyManager.d.ts +0 -1
  871. package/lib/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
  872. package/lib/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
  873. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  874. package/lib/feature-libraries/object-forest/objectForest.js +2 -11
  875. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  876. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +6 -6
  877. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  878. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +7 -7
  879. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  880. package/lib/feature-libraries/schemaBuilderBase.d.ts +2 -28
  881. package/lib/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
  882. package/lib/feature-libraries/schemaBuilderBase.js +2 -28
  883. package/lib/feature-libraries/schemaBuilderBase.js.map +1 -1
  884. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  885. package/lib/feature-libraries/sequence-field/compose.js +25 -22
  886. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  887. package/lib/feature-libraries/sequence-field/formatV2.d.ts +3 -3
  888. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  889. package/lib/feature-libraries/sequence-field/formatV2.js +3 -3
  890. package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
  891. package/lib/feature-libraries/sequence-field/formatV3.d.ts +195 -0
  892. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -0
  893. package/lib/feature-libraries/sequence-field/formatV3.js +19 -0
  894. package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -0
  895. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +11 -0
  896. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  897. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  898. package/lib/feature-libraries/sequence-field/index.d.ts +1 -1
  899. package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
  900. package/lib/feature-libraries/sequence-field/index.js.map +1 -1
  901. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  902. package/lib/feature-libraries/sequence-field/invert.js +22 -14
  903. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  904. package/lib/feature-libraries/sequence-field/markQueue.js +2 -2
  905. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  906. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +2 -2
  907. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  908. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  909. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  910. package/lib/feature-libraries/sequence-field/rebase.js +25 -7
  911. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  912. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  913. package/lib/feature-libraries/sequence-field/replaceRevisions.js +16 -3
  914. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  915. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  916. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +40 -6
  917. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  918. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -1
  919. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  920. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +55 -11
  921. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  922. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +11 -0
  923. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -0
  924. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +81 -0
  925. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -0
  926. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  927. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js +2 -0
  928. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  929. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  930. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +5 -2
  931. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  932. package/lib/feature-libraries/sequence-field/types.d.ts +23 -4
  933. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  934. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  935. package/lib/feature-libraries/sequence-field/utils.d.ts +5 -4
  936. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  937. package/lib/feature-libraries/sequence-field/utils.js +67 -41
  938. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  939. package/lib/feature-libraries/storedToViewSchema.d.ts +0 -1
  940. package/lib/feature-libraries/storedToViewSchema.d.ts.map +1 -1
  941. package/lib/feature-libraries/storedToViewSchema.js +0 -1
  942. package/lib/feature-libraries/storedToViewSchema.js.map +1 -1
  943. package/lib/feature-libraries/treeCursorUtils.d.ts +0 -6
  944. package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  945. package/lib/feature-libraries/treeCursorUtils.js +9 -7
  946. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  947. package/lib/feature-libraries/treeTextCursor.d.ts +0 -2
  948. package/lib/feature-libraries/treeTextCursor.d.ts.map +1 -1
  949. package/lib/feature-libraries/treeTextCursor.js +0 -2
  950. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  951. package/lib/feature-libraries/typed-schema/flexList.d.ts +0 -3
  952. package/lib/feature-libraries/typed-schema/flexList.d.ts.map +1 -1
  953. package/lib/feature-libraries/typed-schema/flexList.js.map +1 -1
  954. package/lib/feature-libraries/typed-schema/index.d.ts +1 -1
  955. package/lib/feature-libraries/typed-schema/index.d.ts.map +1 -1
  956. package/lib/feature-libraries/typed-schema/index.js +1 -1
  957. package/lib/feature-libraries/typed-schema/index.js.map +1 -1
  958. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
  959. package/lib/feature-libraries/typed-schema/schemaCollection.js +1 -5
  960. package/lib/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
  961. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +2 -41
  962. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  963. package/lib/feature-libraries/typed-schema/typedTreeSchema.js +1 -38
  964. package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  965. package/lib/feature-libraries/typed-schema/view.d.ts +0 -1
  966. package/lib/feature-libraries/typed-schema/view.d.ts.map +1 -1
  967. package/lib/feature-libraries/typed-schema/view.js.map +1 -1
  968. package/lib/index.d.ts +8 -9
  969. package/lib/index.d.ts.map +1 -1
  970. package/lib/index.js +4 -9
  971. package/lib/index.js.map +1 -1
  972. package/lib/internalTypes.d.ts +1 -1
  973. package/lib/internalTypes.d.ts.map +1 -1
  974. package/lib/internalTypes.js.map +1 -1
  975. package/lib/packageVersion.d.ts +1 -1
  976. package/lib/packageVersion.js +1 -1
  977. package/lib/packageVersion.js.map +1 -1
  978. package/lib/public.d.ts +3 -1
  979. package/lib/shared-tree/schematizeTree.d.ts +2 -11
  980. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  981. package/lib/shared-tree/schematizeTree.js +15 -4
  982. package/lib/shared-tree/schematizeTree.js.map +1 -1
  983. package/lib/shared-tree/schematizingTreeView.d.ts +4 -4
  984. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  985. package/lib/shared-tree/schematizingTreeView.js +3 -3
  986. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  987. package/lib/shared-tree/sharedTree.d.ts +4 -17
  988. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  989. package/lib/shared-tree/sharedTree.js +6 -10
  990. package/lib/shared-tree/sharedTree.js.map +1 -1
  991. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  992. package/lib/shared-tree/sharedTreeChangeCodecs.js +4 -0
  993. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  994. package/lib/shared-tree/sharedTreeChangeFamily.js +3 -3
  995. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  996. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +0 -2
  997. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  998. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  999. package/lib/shared-tree/treeApi.js +3 -3
  1000. package/lib/shared-tree/treeApi.js.map +1 -1
  1001. package/lib/shared-tree/treeCheckout.d.ts +0 -5
  1002. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  1003. package/lib/shared-tree/treeCheckout.js +6 -4
  1004. package/lib/shared-tree/treeCheckout.js.map +1 -1
  1005. package/lib/shared-tree/treeView.d.ts +3 -6
  1006. package/lib/shared-tree/treeView.d.ts.map +1 -1
  1007. package/lib/shared-tree/treeView.js.map +1 -1
  1008. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  1009. package/lib/shared-tree-core/branch.js +12 -7
  1010. package/lib/shared-tree-core/branch.js.map +1 -1
  1011. package/lib/shared-tree-core/defaultResubmitMachine.js +4 -4
  1012. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  1013. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  1014. package/lib/shared-tree-core/editManagerCodecs.js +1 -0
  1015. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  1016. package/lib/shared-tree-core/editManagerFormat.d.ts +2 -2
  1017. package/lib/shared-tree-core/editManagerFormat.d.ts.map +1 -1
  1018. package/lib/shared-tree-core/editManagerFormat.js +6 -1
  1019. package/lib/shared-tree-core/editManagerFormat.js.map +1 -1
  1020. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  1021. package/lib/shared-tree-core/messageCodecs.js +1 -0
  1022. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  1023. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  1024. package/lib/shared-tree-core/sharedTreeCore.js +4 -2
  1025. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  1026. package/lib/simple-tree/api/create.d.ts +54 -0
  1027. package/lib/simple-tree/api/create.d.ts.map +1 -0
  1028. package/lib/simple-tree/api/create.js +92 -0
  1029. package/lib/simple-tree/api/create.js.map +1 -0
  1030. package/lib/simple-tree/api/index.d.ts +12 -0
  1031. package/lib/simple-tree/api/index.d.ts.map +1 -0
  1032. package/lib/simple-tree/api/index.js +13 -0
  1033. package/lib/simple-tree/api/index.js.map +1 -0
  1034. package/{dist/simple-tree → lib/simple-tree/api}/schemaCreationUtilities.d.ts +7 -4
  1035. package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -0
  1036. package/lib/simple-tree/{schemaCreationUtilities.js → api/schemaCreationUtilities.js} +1 -1
  1037. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -0
  1038. package/lib/simple-tree/{schemaFactory.d.ts → api/schemaFactory.d.ts} +15 -14
  1039. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -0
  1040. package/lib/simple-tree/{schemaFactory.js → api/schemaFactory.js} +9 -8
  1041. package/lib/simple-tree/api/schemaFactory.js.map +1 -0
  1042. package/{dist/simple-tree → lib/simple-tree/api}/schemaFactoryRecursive.d.ts +40 -7
  1043. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -0
  1044. package/lib/simple-tree/{schemaFactoryRecursive.js → api/schemaFactoryRecursive.js} +1 -1
  1045. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -0
  1046. package/lib/simple-tree/api/testRecursiveDomain.d.ts +62 -0
  1047. package/lib/simple-tree/api/testRecursiveDomain.d.ts.map +1 -0
  1048. package/lib/simple-tree/api/testRecursiveDomain.js.map +1 -0
  1049. package/{dist/simple-tree → lib/simple-tree/api}/tree.d.ts +111 -20
  1050. package/lib/simple-tree/api/tree.d.ts.map +1 -0
  1051. package/lib/simple-tree/api/tree.js +165 -0
  1052. package/lib/simple-tree/api/tree.js.map +1 -0
  1053. package/lib/simple-tree/{treeNodeApi.d.ts → api/treeNodeApi.d.ts} +6 -5
  1054. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -0
  1055. package/lib/simple-tree/{treeNodeApi.js → api/treeNodeApi.js} +25 -17
  1056. package/lib/simple-tree/api/treeNodeApi.js.map +1 -0
  1057. package/lib/simple-tree/api/verboseTree.d.ts +136 -0
  1058. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -0
  1059. package/lib/simple-tree/api/verboseTree.js +213 -0
  1060. package/lib/simple-tree/api/verboseTree.js.map +1 -0
  1061. package/lib/simple-tree/arrayNode.d.ts +3 -3
  1062. package/lib/simple-tree/arrayNode.d.ts.map +1 -1
  1063. package/lib/simple-tree/arrayNode.js +56 -53
  1064. package/lib/simple-tree/arrayNode.js.map +1 -1
  1065. package/lib/simple-tree/core/index.d.ts +10 -0
  1066. package/lib/simple-tree/core/index.d.ts.map +1 -0
  1067. package/lib/simple-tree/core/index.js +10 -0
  1068. package/lib/simple-tree/core/index.js.map +1 -0
  1069. package/{dist/simple-tree → lib/simple-tree/core}/schemaCaching.d.ts +2 -9
  1070. package/lib/simple-tree/core/schemaCaching.d.ts.map +1 -0
  1071. package/lib/simple-tree/{schemaCaching.js → core/schemaCaching.js} +1 -21
  1072. package/lib/simple-tree/core/schemaCaching.js.map +1 -0
  1073. package/lib/simple-tree/core/treeNodeKernel.d.ts +57 -0
  1074. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -0
  1075. package/lib/simple-tree/{treeNodeKernel.js → core/treeNodeKernel.js} +45 -3
  1076. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -0
  1077. package/lib/simple-tree/core/treeNodeSchema.d.ts +149 -0
  1078. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -0
  1079. package/lib/simple-tree/core/treeNodeSchema.js +32 -0
  1080. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -0
  1081. package/lib/simple-tree/{types.d.ts → core/types.d.ts} +23 -70
  1082. package/lib/simple-tree/core/types.d.ts.map +1 -0
  1083. package/lib/simple-tree/core/types.js +111 -0
  1084. package/lib/simple-tree/core/types.js.map +1 -0
  1085. package/lib/simple-tree/core/withType.d.ts +82 -0
  1086. package/lib/simple-tree/core/withType.d.ts.map +1 -0
  1087. package/lib/simple-tree/core/withType.js +36 -0
  1088. package/lib/simple-tree/core/withType.js.map +1 -0
  1089. package/lib/simple-tree/getJsonSchema.d.ts +55 -0
  1090. package/lib/simple-tree/getJsonSchema.d.ts.map +1 -0
  1091. package/lib/simple-tree/getJsonSchema.js +65 -0
  1092. package/lib/simple-tree/getJsonSchema.js.map +1 -0
  1093. package/lib/simple-tree/getSimpleFieldSchema.d.ts +14 -0
  1094. package/lib/simple-tree/getSimpleFieldSchema.d.ts.map +1 -0
  1095. package/lib/simple-tree/getSimpleFieldSchema.js +25 -0
  1096. package/lib/simple-tree/getSimpleFieldSchema.js.map +1 -0
  1097. package/lib/simple-tree/getSimpleSchema.d.ts +58 -0
  1098. package/lib/simple-tree/getSimpleSchema.d.ts.map +1 -0
  1099. package/lib/simple-tree/getSimpleSchema.js +64 -0
  1100. package/lib/simple-tree/getSimpleSchema.js.map +1 -0
  1101. package/lib/simple-tree/index.d.ts +12 -13
  1102. package/lib/simple-tree/index.d.ts.map +1 -1
  1103. package/lib/simple-tree/index.js +8 -11
  1104. package/lib/simple-tree/index.js.map +1 -1
  1105. package/lib/simple-tree/jsonSchema.d.ts +206 -0
  1106. package/lib/simple-tree/jsonSchema.d.ts.map +1 -0
  1107. package/lib/simple-tree/{nodeKeys.js → jsonSchema.js} +1 -1
  1108. package/lib/simple-tree/jsonSchema.js.map +1 -0
  1109. package/lib/simple-tree/leafNodeSchema.d.ts +1 -1
  1110. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  1111. package/lib/simple-tree/leafNodeSchema.js +1 -2
  1112. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  1113. package/lib/simple-tree/mapNode.d.ts +9 -3
  1114. package/lib/simple-tree/mapNode.d.ts.map +1 -1
  1115. package/lib/simple-tree/mapNode.js +36 -36
  1116. package/lib/simple-tree/mapNode.js.map +1 -1
  1117. package/lib/simple-tree/objectNode.d.ts +18 -16
  1118. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  1119. package/lib/simple-tree/objectNode.js +36 -34
  1120. package/lib/simple-tree/objectNode.js.map +1 -1
  1121. package/lib/simple-tree/objectNodeTypes.d.ts +38 -0
  1122. package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -0
  1123. package/lib/simple-tree/objectNodeTypes.js +15 -0
  1124. package/lib/simple-tree/objectNodeTypes.js.map +1 -0
  1125. package/lib/simple-tree/proxies.d.ts +6 -25
  1126. package/lib/simple-tree/proxies.d.ts.map +1 -1
  1127. package/lib/simple-tree/proxies.js +46 -57
  1128. package/lib/simple-tree/proxies.js.map +1 -1
  1129. package/lib/simple-tree/proxyBinding.d.ts +45 -22
  1130. package/lib/simple-tree/proxyBinding.d.ts.map +1 -1
  1131. package/lib/simple-tree/proxyBinding.js +89 -52
  1132. package/lib/simple-tree/proxyBinding.js.map +1 -1
  1133. package/lib/simple-tree/schemaTypes.d.ts +10 -159
  1134. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  1135. package/lib/simple-tree/schemaTypes.js +9 -41
  1136. package/lib/simple-tree/schemaTypes.js.map +1 -1
  1137. package/lib/simple-tree/simpleSchema.d.ts +124 -0
  1138. package/lib/simple-tree/simpleSchema.d.ts.map +1 -0
  1139. package/lib/{feature-libraries/schema-aware/schemaAware.js → simple-tree/simpleSchema.js} +1 -1
  1140. package/lib/simple-tree/simpleSchema.js.map +1 -0
  1141. package/lib/simple-tree/simpleSchemaToJsonSchema.d.ts +12 -0
  1142. package/lib/simple-tree/simpleSchemaToJsonSchema.d.ts.map +1 -0
  1143. package/lib/simple-tree/simpleSchemaToJsonSchema.js +142 -0
  1144. package/lib/simple-tree/simpleSchemaToJsonSchema.js.map +1 -0
  1145. package/lib/simple-tree/toFlexSchema.d.ts +4 -12
  1146. package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
  1147. package/lib/simple-tree/toFlexSchema.js +9 -18
  1148. package/lib/simple-tree/toFlexSchema.js.map +1 -1
  1149. package/lib/simple-tree/toMapTree.d.ts +39 -39
  1150. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  1151. package/lib/simple-tree/toMapTree.js +214 -158
  1152. package/lib/simple-tree/toMapTree.js.map +1 -1
  1153. package/lib/simple-tree/treeNodeValid.d.ts +74 -0
  1154. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -0
  1155. package/lib/simple-tree/{types.js → treeNodeValid.js} +8 -98
  1156. package/lib/simple-tree/treeNodeValid.js.map +1 -0
  1157. package/lib/simple-tree/typesUnsafe.d.ts +35 -4
  1158. package/lib/simple-tree/typesUnsafe.d.ts.map +1 -1
  1159. package/lib/simple-tree/typesUnsafe.js.map +1 -1
  1160. package/lib/simple-tree/viewSchemaToSimpleSchema.d.ts +11 -0
  1161. package/lib/simple-tree/viewSchemaToSimpleSchema.d.ts.map +1 -0
  1162. package/lib/simple-tree/viewSchemaToSimpleSchema.js +167 -0
  1163. package/lib/simple-tree/viewSchemaToSimpleSchema.js.map +1 -0
  1164. package/lib/util/brand.d.ts +0 -3
  1165. package/lib/util/brand.d.ts.map +1 -1
  1166. package/lib/util/brand.js +1 -2
  1167. package/lib/util/brand.js.map +1 -1
  1168. package/lib/util/brandedMap.d.ts +0 -5
  1169. package/lib/util/brandedMap.d.ts.map +1 -1
  1170. package/lib/util/brandedMap.js +0 -1
  1171. package/lib/util/brandedMap.js.map +1 -1
  1172. package/lib/util/idAllocator.d.ts +0 -2
  1173. package/lib/util/idAllocator.d.ts.map +1 -1
  1174. package/lib/util/idAllocator.js +0 -1
  1175. package/lib/util/idAllocator.js.map +1 -1
  1176. package/lib/util/index.d.ts +2 -2
  1177. package/lib/util/index.d.ts.map +1 -1
  1178. package/lib/util/index.js +2 -2
  1179. package/lib/util/index.js.map +1 -1
  1180. package/lib/util/nestedMap.d.ts +5 -19
  1181. package/lib/util/nestedMap.d.ts.map +1 -1
  1182. package/lib/util/nestedMap.js +15 -16
  1183. package/lib/util/nestedMap.js.map +1 -1
  1184. package/lib/util/opaque.d.ts +0 -4
  1185. package/lib/util/opaque.d.ts.map +1 -1
  1186. package/lib/util/opaque.js +0 -2
  1187. package/lib/util/opaque.js.map +1 -1
  1188. package/lib/util/rangeMap.d.ts +0 -2
  1189. package/lib/util/rangeMap.d.ts.map +1 -1
  1190. package/lib/util/rangeMap.js +4 -3
  1191. package/lib/util/rangeMap.js.map +1 -1
  1192. package/lib/util/transactionResult.d.ts +0 -1
  1193. package/lib/util/transactionResult.d.ts.map +1 -1
  1194. package/lib/util/transactionResult.js +0 -1
  1195. package/lib/util/transactionResult.js.map +1 -1
  1196. package/lib/util/typeCheck.d.ts +2 -20
  1197. package/lib/util/typeCheck.d.ts.map +1 -1
  1198. package/lib/util/typeCheck.js.map +1 -1
  1199. package/lib/util/typeCheckTests.d.ts +4 -4
  1200. package/lib/util/typeCheckTests.d.ts.map +1 -1
  1201. package/lib/util/typeCheckTests.js.map +1 -1
  1202. package/lib/util/typeUtils.d.ts +0 -7
  1203. package/lib/util/typeUtils.d.ts.map +1 -1
  1204. package/lib/util/typeUtils.js.map +1 -1
  1205. package/lib/util/utils.d.ts +6 -8
  1206. package/lib/util/utils.d.ts.map +1 -1
  1207. package/lib/util/utils.js +12 -4
  1208. package/lib/util/utils.js.map +1 -1
  1209. package/package.json +25 -24
  1210. package/src/codec/discriminatedUnions.ts +20 -10
  1211. package/src/codec/index.ts +5 -1
  1212. package/src/core/forest/README.md +4 -2
  1213. package/src/core/forest/editableForest.ts +1 -6
  1214. package/src/core/forest/forest.ts +0 -6
  1215. package/src/core/index.ts +2 -2
  1216. package/src/core/rebase/changeRebaser.ts +0 -4
  1217. package/src/core/rebase/index.ts +0 -2
  1218. package/src/core/rebase/types.ts +1 -23
  1219. package/src/core/rebase/utils.ts +13 -11
  1220. package/src/core/schema-stored/multiplicity.ts +0 -1
  1221. package/src/core/schema-stored/schema.ts +0 -7
  1222. package/src/core/schema-stored/storedSchemaRepository.ts +0 -3
  1223. package/src/core/schema-view/view.ts +0 -3
  1224. package/src/core/tree/anchorSet.ts +7 -17
  1225. package/src/core/tree/cursor.ts +1 -6
  1226. package/src/core/tree/delta.ts +0 -11
  1227. package/src/core/tree/detachedFieldIndexCodec.ts +4 -3
  1228. package/src/core/tree/detachedFieldIndexTypes.ts +0 -1
  1229. package/src/core/tree/index.ts +1 -1
  1230. package/src/core/tree/mapTree.ts +45 -4
  1231. package/src/core/tree/pathTree.ts +0 -11
  1232. package/src/core/tree/treeTextFormat.ts +3 -2
  1233. package/src/core/tree/types.ts +0 -11
  1234. package/src/core/tree/visitDelta.ts +2 -3
  1235. package/src/core/tree/visitPath.ts +0 -2
  1236. package/src/core/tree/visitorUtils.ts +0 -1
  1237. package/src/domains/index.ts +3 -0
  1238. package/src/domains/json/index.ts +7 -1
  1239. package/src/domains/json/jsonCursor.ts +113 -6
  1240. package/src/domains/json/jsonDomainSchema.ts +4 -5
  1241. package/src/domains/leafDomain.ts +0 -1
  1242. package/src/domains/schemaBuilder.ts +0 -22
  1243. package/src/events/events.ts +0 -4
  1244. package/src/feature-libraries/chunked-forest/README.md +9 -1
  1245. package/src/feature-libraries/chunked-forest/basicChunk.ts +14 -9
  1246. package/src/feature-libraries/chunked-forest/chunk.ts +1 -1
  1247. package/src/feature-libraries/chunked-forest/chunkTree.ts +4 -4
  1248. package/src/feature-libraries/chunked-forest/chunkedForest.ts +8 -6
  1249. package/src/feature-libraries/chunked-forest/codec/chunkCodecUtilities.ts +2 -2
  1250. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +9 -6
  1251. package/src/feature-libraries/chunked-forest/uniformChunk.ts +6 -4
  1252. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +18 -46
  1253. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +11 -6
  1254. package/src/feature-libraries/default-schema/defaultSchema.ts +0 -1
  1255. package/src/feature-libraries/default-schema/index.ts +1 -1
  1256. package/src/feature-libraries/default-schema/schemaChecker.ts +6 -0
  1257. package/src/feature-libraries/editableTreeBinder.ts +6 -78
  1258. package/src/feature-libraries/fieldGenerator.ts +0 -3
  1259. package/src/feature-libraries/flex-map-tree/index.ts +2 -1
  1260. package/src/feature-libraries/flex-map-tree/mapTreeNode.ts +238 -267
  1261. package/src/feature-libraries/flex-tree/context.ts +0 -1
  1262. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +27 -357
  1263. package/src/feature-libraries/flex-tree/index.ts +0 -1
  1264. package/src/feature-libraries/flex-tree/lazyField.ts +38 -208
  1265. package/src/feature-libraries/flex-tree/lazyNode.ts +5 -66
  1266. package/src/feature-libraries/flex-tree/treeEvents.ts +0 -2
  1267. package/src/feature-libraries/flex-tree/utilities.ts +6 -1
  1268. package/src/feature-libraries/forest-summary/codec.ts +3 -3
  1269. package/src/feature-libraries/index.ts +5 -35
  1270. package/src/feature-libraries/mapTreeCursor.ts +13 -4
  1271. package/src/feature-libraries/memoizedIdRangeAllocator.ts +0 -4
  1272. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +0 -2
  1273. package/src/feature-libraries/modular-schema/discrepancies.ts +117 -1
  1274. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +0 -8
  1275. package/src/feature-libraries/modular-schema/fieldKind.ts +1 -3
  1276. package/src/feature-libraries/modular-schema/genericFieldKind.ts +69 -92
  1277. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +7 -14
  1278. package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +6 -15
  1279. package/src/feature-libraries/modular-schema/index.ts +2 -2
  1280. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +68 -34
  1281. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +330 -336
  1282. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +7 -14
  1283. package/src/feature-libraries/node-key/nodeKey.ts +0 -4
  1284. package/src/feature-libraries/node-key/nodeKeyManager.ts +0 -1
  1285. package/src/feature-libraries/object-forest/objectForest.ts +1 -13
  1286. package/src/feature-libraries/schemaBuilderBase.ts +1 -49
  1287. package/src/feature-libraries/sequence-field/compose.ts +41 -20
  1288. package/src/feature-libraries/sequence-field/formatV2.ts +3 -3
  1289. package/src/feature-libraries/sequence-field/formatV3.ts +65 -0
  1290. package/src/feature-libraries/sequence-field/helperTypes.ts +33 -0
  1291. package/src/feature-libraries/sequence-field/index.ts +1 -0
  1292. package/src/feature-libraries/sequence-field/invert.ts +28 -18
  1293. package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
  1294. package/src/feature-libraries/sequence-field/moveEffectTable.ts +2 -2
  1295. package/src/feature-libraries/sequence-field/rebase.ts +30 -13
  1296. package/src/feature-libraries/sequence-field/replaceRevisions.ts +27 -3
  1297. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +52 -7
  1298. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +92 -19
  1299. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +134 -0
  1300. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +2 -0
  1301. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +8 -2
  1302. package/src/feature-libraries/sequence-field/types.ts +24 -4
  1303. package/src/feature-libraries/sequence-field/utils.ts +78 -50
  1304. package/src/feature-libraries/storedToViewSchema.ts +0 -1
  1305. package/src/feature-libraries/treeCursorUtils.ts +11 -11
  1306. package/src/feature-libraries/treeTextCursor.ts +0 -2
  1307. package/src/feature-libraries/typed-schema/flexList.ts +0 -3
  1308. package/src/feature-libraries/typed-schema/index.ts +0 -2
  1309. package/src/feature-libraries/typed-schema/schemaCollection.ts +0 -5
  1310. package/src/feature-libraries/typed-schema/typedTreeSchema.ts +2 -68
  1311. package/src/feature-libraries/typed-schema/view.ts +0 -1
  1312. package/src/index.ts +27 -245
  1313. package/src/internalTypes.ts +1 -0
  1314. package/src/packageVersion.ts +1 -1
  1315. package/src/shared-tree/schematizeTree.ts +25 -21
  1316. package/src/shared-tree/schematizingTreeView.ts +6 -6
  1317. package/src/shared-tree/sharedTree.ts +8 -39
  1318. package/src/shared-tree/sharedTreeChangeCodecs.ts +8 -0
  1319. package/src/shared-tree/sharedTreeChangeFamily.ts +3 -3
  1320. package/src/shared-tree/sharedTreeEditBuilder.ts +0 -2
  1321. package/src/shared-tree/treeApi.ts +3 -3
  1322. package/src/shared-tree/treeCheckout.ts +6 -8
  1323. package/src/shared-tree/treeView.ts +3 -6
  1324. package/src/shared-tree-core/branch.ts +20 -8
  1325. package/src/shared-tree-core/defaultResubmitMachine.ts +4 -4
  1326. package/src/shared-tree-core/editManagerCodecs.ts +1 -0
  1327. package/src/shared-tree-core/editManagerFormat.ts +7 -2
  1328. package/src/shared-tree-core/messageCodecs.ts +2 -1
  1329. package/src/shared-tree-core/sharedTreeCore.ts +5 -3
  1330. package/src/simple-tree/ProxyBinding.md +2 -0
  1331. package/src/simple-tree/api/README.md +7 -0
  1332. package/src/simple-tree/api/create.ts +179 -0
  1333. package/src/simple-tree/api/index.ts +36 -0
  1334. package/src/simple-tree/{schemaCreationUtilities.ts → api/schemaCreationUtilities.ts} +13 -5
  1335. package/src/simple-tree/{schemaFactory.ts → api/schemaFactory.ts} +36 -34
  1336. package/src/simple-tree/{schemaFactoryRecursive.ts → api/schemaFactoryRecursive.ts} +47 -10
  1337. package/src/simple-tree/{testRecursiveDomain.ts → api/testRecursiveDomain.ts} +3 -1
  1338. package/src/simple-tree/{tree.ts → api/tree.ts} +246 -34
  1339. package/src/simple-tree/{treeNodeApi.ts → api/treeNodeApi.ts} +47 -36
  1340. package/src/simple-tree/api/verboseTree.ts +415 -0
  1341. package/src/simple-tree/arrayNode.ts +100 -98
  1342. package/src/simple-tree/core/README.md +11 -0
  1343. package/src/simple-tree/core/index.ts +33 -0
  1344. package/src/simple-tree/{schemaCaching.ts → core/schemaCaching.ts} +3 -37
  1345. package/src/simple-tree/{treeNodeKernel.ts → core/treeNodeKernel.ts} +55 -5
  1346. package/src/simple-tree/core/treeNodeSchema.ts +184 -0
  1347. package/src/simple-tree/core/types.ts +255 -0
  1348. package/src/simple-tree/core/withType.ts +89 -0
  1349. package/src/simple-tree/getJsonSchema.ts +70 -0
  1350. package/src/simple-tree/getSimpleFieldSchema.ts +36 -0
  1351. package/src/simple-tree/getSimpleSchema.ts +69 -0
  1352. package/src/simple-tree/index.ts +58 -33
  1353. package/src/simple-tree/jsonSchema.ts +230 -0
  1354. package/src/simple-tree/leafNodeSchema.ts +6 -3
  1355. package/src/simple-tree/mapNode.ts +56 -55
  1356. package/src/simple-tree/objectNode.ts +66 -90
  1357. package/src/simple-tree/objectNodeTypes.ts +68 -0
  1358. package/src/simple-tree/proxies.ts +52 -68
  1359. package/src/simple-tree/proxyBinding.ts +127 -72
  1360. package/src/simple-tree/schemaTypes.ts +29 -194
  1361. package/src/simple-tree/simpleSchema.ts +138 -0
  1362. package/src/simple-tree/simpleSchemaToJsonSchema.ts +178 -0
  1363. package/src/simple-tree/toFlexSchema.ts +9 -42
  1364. package/src/simple-tree/toMapTree.ts +270 -296
  1365. package/src/simple-tree/{types.ts → treeNodeValid.ts} +16 -232
  1366. package/src/simple-tree/typesUnsafe.ts +51 -5
  1367. package/src/simple-tree/viewSchemaToSimpleSchema.ts +209 -0
  1368. package/src/util/brand.ts +1 -4
  1369. package/src/util/brandedMap.ts +0 -5
  1370. package/src/util/idAllocator.ts +0 -2
  1371. package/src/util/index.ts +2 -0
  1372. package/src/util/nestedMap.ts +23 -20
  1373. package/src/util/opaque.ts +0 -4
  1374. package/src/util/rangeMap.ts +5 -5
  1375. package/src/util/transactionResult.ts +0 -1
  1376. package/src/util/typeCheck.ts +2 -20
  1377. package/src/util/typeCheckTests.ts +4 -4
  1378. package/src/util/typeUtils.ts +0 -7
  1379. package/src/util/utils.ts +13 -8
  1380. package/tsconfig.json +0 -1
  1381. package/dist/feature-libraries/contextuallyTyped.d.ts +0 -209
  1382. package/dist/feature-libraries/contextuallyTyped.d.ts.map +0 -1
  1383. package/dist/feature-libraries/contextuallyTyped.js +0 -328
  1384. package/dist/feature-libraries/contextuallyTyped.js.map +0 -1
  1385. package/dist/feature-libraries/schema-aware/index.d.ts +0 -6
  1386. package/dist/feature-libraries/schema-aware/index.d.ts.map +0 -1
  1387. package/dist/feature-libraries/schema-aware/index.js.map +0 -1
  1388. package/dist/feature-libraries/schema-aware/schemaAware.d.ts +0 -76
  1389. package/dist/feature-libraries/schema-aware/schemaAware.d.ts.map +0 -1
  1390. package/dist/feature-libraries/schema-aware/schemaAware.js.map +0 -1
  1391. package/dist/simple-tree/nodeKeys.d.ts +0 -41
  1392. package/dist/simple-tree/nodeKeys.d.ts.map +0 -1
  1393. package/dist/simple-tree/nodeKeys.js +0 -7
  1394. package/dist/simple-tree/nodeKeys.js.map +0 -1
  1395. package/dist/simple-tree/schemaCaching.d.ts.map +0 -1
  1396. package/dist/simple-tree/schemaCaching.js.map +0 -1
  1397. package/dist/simple-tree/schemaCreationUtilities.d.ts.map +0 -1
  1398. package/dist/simple-tree/schemaCreationUtilities.js.map +0 -1
  1399. package/dist/simple-tree/schemaFactory.d.ts.map +0 -1
  1400. package/dist/simple-tree/schemaFactory.js.map +0 -1
  1401. package/dist/simple-tree/schemaFactoryRecursive.d.ts.map +0 -1
  1402. package/dist/simple-tree/schemaFactoryRecursive.js.map +0 -1
  1403. package/dist/simple-tree/testRecursiveDomain.d.ts +0 -61
  1404. package/dist/simple-tree/testRecursiveDomain.d.ts.map +0 -1
  1405. package/dist/simple-tree/testRecursiveDomain.js.map +0 -1
  1406. package/dist/simple-tree/tree.d.ts.map +0 -1
  1407. package/dist/simple-tree/tree.js +0 -73
  1408. package/dist/simple-tree/tree.js.map +0 -1
  1409. package/dist/simple-tree/treeNodeApi.d.ts.map +0 -1
  1410. package/dist/simple-tree/treeNodeApi.js.map +0 -1
  1411. package/dist/simple-tree/treeNodeKernel.d.ts +0 -26
  1412. package/dist/simple-tree/treeNodeKernel.d.ts.map +0 -1
  1413. package/dist/simple-tree/treeNodeKernel.js.map +0 -1
  1414. package/dist/simple-tree/types.d.ts.map +0 -1
  1415. package/dist/simple-tree/types.js.map +0 -1
  1416. package/lib/feature-libraries/contextuallyTyped.d.ts +0 -209
  1417. package/lib/feature-libraries/contextuallyTyped.d.ts.map +0 -1
  1418. package/lib/feature-libraries/contextuallyTyped.js +0 -311
  1419. package/lib/feature-libraries/contextuallyTyped.js.map +0 -1
  1420. package/lib/feature-libraries/schema-aware/index.d.ts +0 -6
  1421. package/lib/feature-libraries/schema-aware/index.d.ts.map +0 -1
  1422. package/lib/feature-libraries/schema-aware/index.js +0 -6
  1423. package/lib/feature-libraries/schema-aware/index.js.map +0 -1
  1424. package/lib/feature-libraries/schema-aware/schemaAware.d.ts +0 -76
  1425. package/lib/feature-libraries/schema-aware/schemaAware.d.ts.map +0 -1
  1426. package/lib/feature-libraries/schema-aware/schemaAware.js.map +0 -1
  1427. package/lib/simple-tree/nodeKeys.d.ts +0 -41
  1428. package/lib/simple-tree/nodeKeys.d.ts.map +0 -1
  1429. package/lib/simple-tree/nodeKeys.js.map +0 -1
  1430. package/lib/simple-tree/schemaCaching.d.ts.map +0 -1
  1431. package/lib/simple-tree/schemaCaching.js.map +0 -1
  1432. package/lib/simple-tree/schemaCreationUtilities.d.ts.map +0 -1
  1433. package/lib/simple-tree/schemaCreationUtilities.js.map +0 -1
  1434. package/lib/simple-tree/schemaFactory.d.ts.map +0 -1
  1435. package/lib/simple-tree/schemaFactory.js.map +0 -1
  1436. package/lib/simple-tree/schemaFactoryRecursive.d.ts.map +0 -1
  1437. package/lib/simple-tree/schemaFactoryRecursive.js.map +0 -1
  1438. package/lib/simple-tree/testRecursiveDomain.d.ts +0 -61
  1439. package/lib/simple-tree/testRecursiveDomain.d.ts.map +0 -1
  1440. package/lib/simple-tree/testRecursiveDomain.js.map +0 -1
  1441. package/lib/simple-tree/tree.d.ts.map +0 -1
  1442. package/lib/simple-tree/tree.js +0 -66
  1443. package/lib/simple-tree/tree.js.map +0 -1
  1444. package/lib/simple-tree/treeNodeApi.d.ts.map +0 -1
  1445. package/lib/simple-tree/treeNodeApi.js.map +0 -1
  1446. package/lib/simple-tree/treeNodeKernel.d.ts +0 -26
  1447. package/lib/simple-tree/treeNodeKernel.d.ts.map +0 -1
  1448. package/lib/simple-tree/treeNodeKernel.js.map +0 -1
  1449. package/lib/simple-tree/types.d.ts.map +0 -1
  1450. package/lib/simple-tree/types.js.map +0 -1
  1451. package/src/feature-libraries/contextuallyTyped.ts +0 -582
  1452. package/src/feature-libraries/schema-aware/README.md +0 -19
  1453. package/src/feature-libraries/schema-aware/index.ts +0 -16
  1454. package/src/feature-libraries/schema-aware/schemaAware.ts +0 -135
  1455. package/src/simple-tree/nodeKeys.ts +0 -42
  1456. /package/dist/simple-tree/{testRecursiveDomain.js → api/testRecursiveDomain.js} +0 -0
  1457. /package/lib/simple-tree/{testRecursiveDomain.js → api/testRecursiveDomain.js} +0 -0
@@ -6,7 +6,6 @@ import type { IFluidHandle } from "@fluidframework/core-interfaces";
6
6
  import { type Brand, type Opaque, type _InlineTrick } from "../../util/index.js";
7
7
  import type { FieldKey, TreeNodeSchemaIdentifier, ValueSchema } from "../schema-stored/index.js";
8
8
  /**
9
- * @internal
10
9
  */
11
10
  export type TreeType = TreeNodeSchemaIdentifier;
12
11
  /**
@@ -27,17 +26,13 @@ export declare const EmptyKey: FieldKey;
27
26
  * FieldKey to use for the root of documents in places that need to refer to detached sequences or the root.
28
27
  * TODO: if we do want to standardize on a single value for this,
29
28
  * it likely should be namespaced or a UUID to avoid risk of collisions.
30
- * @internal
31
29
  */
32
30
  export declare const rootFieldKey: FieldKey;
33
31
  /**
34
- * @internal
35
32
  */
36
33
  export declare const rootField: DetachedField;
37
34
  /**
38
35
  * Location of a tree relative to is parent container (which can be a tree or forest).
39
- *
40
- * @internal
41
36
  */
42
37
  export interface ChildLocation {
43
38
  readonly container: ChildCollection;
@@ -45,14 +40,12 @@ export interface ChildLocation {
45
40
  }
46
41
  /**
47
42
  * Wrapper around DetachedField that can be detected at runtime.
48
- * @internal
49
43
  */
50
44
  export interface RootField {
51
45
  readonly key: DetachedField;
52
46
  }
53
47
  /**
54
48
  * Identifier for a child collection, either on a node/tree or at the root of a forest.
55
- * @internal
56
49
  */
57
50
  export type ChildCollection = FieldKey | RootField;
58
51
  /**
@@ -64,7 +57,6 @@ export type ChildCollection = FieldKey | RootField;
64
57
  *
65
58
  * In some APIs DetachedFields are used as FieldKeys on a special implicit root node
66
59
  * to simplify the APIs and implementation.
67
- * @internal
68
60
  */
69
61
  export interface DetachedField extends Opaque<Brand<string, "tree.DetachedField">> {
70
62
  }
@@ -73,21 +65,18 @@ export interface DetachedField extends Opaque<Brand<string, "tree.DetachedField"
73
65
  * This maps detached field to field keys for thus use.
74
66
  *
75
67
  * @returns `field` as a {@link FieldKey} usable on a special root node serving as a parent of detached fields.
76
- * @internal
77
68
  */
78
69
  export declare function detachedFieldAsKey(field: DetachedField): FieldKey;
79
70
  /**
80
71
  * The inverse of {@link detachedFieldAsKey}.
81
72
  * Thus must only be used on {@link FieldKey}s which were produced via {@link detachedFieldAsKey},
82
73
  * and with the same scope (ex: forest) as the detachedFieldAsKey was originally from.
83
- * @internal
84
74
  */
85
75
  export declare function keyAsDetachedField(key: FieldKey): DetachedField;
86
76
  /**
87
77
  * TODO: integrate this into Schema. Decide how to persist them (need stable Id?). Maybe allow updating field kinds?.
88
78
  * TODO: make families of changes per field kind. Build editing APIs from that.
89
79
  * TODO: factor ChangeRebaser implementations to support adding new field kinds.
90
- * @internal
91
80
  */
92
81
  export interface FieldKind {
93
82
  readonly name: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/tree/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EACN,KAAK,KAAK,EACV,KAAK,MAAM,EAGX,KAAK,YAAY,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,QAAQ,EACR,wBAAwB,EACxB,WAAW,EACX,MAAM,2BAA2B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C,IAAI,EAAE,wBAAwB,CAAC;CACxC;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,wBAElC,CAAC"}
@@ -21,11 +21,9 @@ export const EmptyKey = brand("");
21
21
  * FieldKey to use for the root of documents in places that need to refer to detached sequences or the root.
22
22
  * TODO: if we do want to standardize on a single value for this,
23
23
  * it likely should be namespaced or a UUID to avoid risk of collisions.
24
- * @internal
25
24
  */
26
25
  export const rootFieldKey = brand("rootFieldKey");
27
26
  /**
28
- * @internal
29
27
  */
30
28
  export const rootField = keyAsDetachedField(rootFieldKey);
31
29
  /**
@@ -33,7 +31,6 @@ export const rootField = keyAsDetachedField(rootFieldKey);
33
31
  * This maps detached field to field keys for thus use.
34
32
  *
35
33
  * @returns `field` as a {@link FieldKey} usable on a special root node serving as a parent of detached fields.
36
- * @internal
37
34
  */
38
35
  export function detachedFieldAsKey(field) {
39
36
  return brand(extractFromOpaque(field));
@@ -42,7 +39,6 @@ export function detachedFieldAsKey(field) {
42
39
  * The inverse of {@link detachedFieldAsKey}.
43
40
  * Thus must only be used on {@link FieldKey}s which were produced via {@link detachedFieldAsKey},
44
41
  * and with the same scope (ex: forest) as the detachedFieldAsKey was originally from.
45
- * @internal
46
42
  */
47
43
  export function keyAsDetachedField(key) {
48
44
  return brand(key);
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/tree/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAGN,KAAK,EACL,iBAAiB,GAEjB,MAAM,qBAAqB,CAAC;AAY7B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAa,KAAK,CAAC,EAAE,CAAC,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAa,KAAK,CAAC,cAAc,CAAC,CAAC;AAE5D;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;AA0C1D;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAoB;IACtD,OAAO,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;AACxC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAa;IAC/C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC;AA2DD;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA6B,KAAK,CAClE,0CAA0C,CAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\n\nimport {\n\ttype Brand,\n\ttype Opaque,\n\tbrand,\n\textractFromOpaque,\n\ttype _InlineTrick,\n} from \"../../util/index.js\";\nimport type {\n\tFieldKey,\n\tTreeNodeSchemaIdentifier,\n\tValueSchema,\n} from \"../schema-stored/index.js\";\n\n/**\n * @internal\n */\nexport type TreeType = TreeNodeSchemaIdentifier;\n\n/**\n * The empty key (\"\") is used for unnamed relationships, such as the indexer\n * of an explicit array node.\n *\n * This key is a hint that this field is the primary function of the node,\n * and in some abstractions the APIs for this field should be inlined onto the node.\n *\n * TODO:\n * This has to be a FieldKey since different nodes will have different TreeFieldStoredSchema for it.\n * This makes it prone to collisions and suggests\n * that this intention may be better conveyed by metadata on the ITreeSchema.\n * @internal\n */\nexport const EmptyKey: FieldKey = brand(\"\");\n\n/**\n * FieldKey to use for the root of documents in places that need to refer to detached sequences or the root.\n * TODO: if we do want to standardize on a single value for this,\n * it likely should be namespaced or a UUID to avoid risk of collisions.\n * @internal\n */\nexport const rootFieldKey: FieldKey = brand(\"rootFieldKey\");\n\n/**\n * @internal\n */\nexport const rootField = keyAsDetachedField(rootFieldKey);\n\n/**\n * Location of a tree relative to is parent container (which can be a tree or forest).\n *\n * @internal\n */\nexport interface ChildLocation {\n\treadonly container: ChildCollection;\n\treadonly index: number;\n}\n\n/**\n * Wrapper around DetachedField that can be detected at runtime.\n * @internal\n */\nexport interface RootField {\n\treadonly key: DetachedField;\n}\n\n/**\n * Identifier for a child collection, either on a node/tree or at the root of a forest.\n * @internal\n */\nexport type ChildCollection = FieldKey | RootField;\n\n// TODO: its not clear how much DetachedField belongs here in tree,\n// but for now as its needed in Rebase and Forest,\n// it makes sense to have it here for reasoning about the roots of trees.\n/**\n * A root in the forest.\n *\n * The range is a \"container\" like a field:\n * any additional content inserted before or after contents of this range will be included in the range.\n * This also means that moving the content from this range elsewhere will leave this range valid, but empty.\n *\n * In some APIs DetachedFields are used as FieldKeys on a special implicit root node\n * to simplify the APIs and implementation.\n * @internal\n */\nexport interface DetachedField extends Opaque<Brand<string, \"tree.DetachedField\">> {}\n\n/**\n * Some code abstracts the root as a node with detached fields as its fields.\n * This maps detached field to field keys for thus use.\n *\n * @returns `field` as a {@link FieldKey} usable on a special root node serving as a parent of detached fields.\n * @internal\n */\nexport function detachedFieldAsKey(field: DetachedField): FieldKey {\n\treturn brand(extractFromOpaque(field));\n}\n\n/**\n * The inverse of {@link detachedFieldAsKey}.\n * Thus must only be used on {@link FieldKey}s which were produced via {@link detachedFieldAsKey},\n * and with the same scope (ex: forest) as the detachedFieldAsKey was originally from.\n * @internal\n */\nexport function keyAsDetachedField(key: FieldKey): DetachedField {\n\treturn brand(key);\n}\n\n/**\n * TODO: integrate this into Schema. Decide how to persist them (need stable Id?). Maybe allow updating field kinds?.\n * TODO: make families of changes per field kind. Build editing APIs from that.\n * TODO: factor ChangeRebaser implementations to support adding new field kinds.\n * @internal\n */\nexport interface FieldKind {\n\treadonly name: string;\n\treadonly description: string;\n\treadonly minimumChildren: number;\n\treadonly maximumChildren: number;\n}\n\n/**\n * Value that may be stored on a leaf node.\n * @internal\n */\nexport type TreeValue<TSchema extends ValueSchema = ValueSchema> = [\n\t{\n\t\t[ValueSchema.Number]: number;\n\t\t[ValueSchema.String]: string;\n\t\t[ValueSchema.Boolean]: boolean;\n\t\t[ValueSchema.FluidHandle]: IFluidHandle;\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\t[ValueSchema.Null]: null;\n\t}[TSchema],\n][_InlineTrick];\n\n/**\n * Value stored on a node.\n * @internal\n */\nexport type Value = undefined | TreeValue;\n\n/**\n * The fields required by a node in a tree.\n *\n * @privateRemarks A forked version of this type is used in `persistedTreeTextFormat.ts`.\n * Changes to this type might necessitate changes to `EncodedNodeData` or codecs.\n * See persistedTreeTextFormat's module documentation for more details.\n *\n * @internal\n */\nexport interface NodeData {\n\t/**\n\t * A payload of arbitrary serializable data.\n\t */\n\treadonly value?: TreeValue;\n\n\t/**\n\t * The meaning of this node.\n\t * Provides contexts/semantics for this node and its content.\n\t * Typically used to associate a node with metadata (including a schema) and source code (types, behaviors, etc).\n\t */\n\treadonly type: TreeNodeSchemaIdentifier;\n}\n\n/**\n * Use this type to indicate that a node sits above the detached fields, and thus is not a real node and who's type should not matter.\n */\nexport const aboveRootPlaceholder: TreeNodeSchemaIdentifier = brand(\n\t\"com.fluidframework.placeholder.aboveRoot\",\n);\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/core/tree/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAGN,KAAK,EACL,iBAAiB,GAEjB,MAAM,qBAAqB,CAAC;AAW7B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAa,KAAK,CAAC,EAAE,CAAC,CAAC;AAE5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAa,KAAK,CAAC,cAAc,CAAC,CAAC;AAE5D;GACG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAC;AAqC1D;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAoB;IACtD,OAAO,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAa;IAC/C,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC;AA0DD;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAA6B,KAAK,CAClE,0CAA0C,CAC1C,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\n\nimport {\n\ttype Brand,\n\ttype Opaque,\n\tbrand,\n\textractFromOpaque,\n\ttype _InlineTrick,\n} from \"../../util/index.js\";\nimport type {\n\tFieldKey,\n\tTreeNodeSchemaIdentifier,\n\tValueSchema,\n} from \"../schema-stored/index.js\";\n\n/**\n */\nexport type TreeType = TreeNodeSchemaIdentifier;\n\n/**\n * The empty key (\"\") is used for unnamed relationships, such as the indexer\n * of an explicit array node.\n *\n * This key is a hint that this field is the primary function of the node,\n * and in some abstractions the APIs for this field should be inlined onto the node.\n *\n * TODO:\n * This has to be a FieldKey since different nodes will have different TreeFieldStoredSchema for it.\n * This makes it prone to collisions and suggests\n * that this intention may be better conveyed by metadata on the ITreeSchema.\n * @internal\n */\nexport const EmptyKey: FieldKey = brand(\"\");\n\n/**\n * FieldKey to use for the root of documents in places that need to refer to detached sequences or the root.\n * TODO: if we do want to standardize on a single value for this,\n * it likely should be namespaced or a UUID to avoid risk of collisions.\n */\nexport const rootFieldKey: FieldKey = brand(\"rootFieldKey\");\n\n/**\n */\nexport const rootField = keyAsDetachedField(rootFieldKey);\n\n/**\n * Location of a tree relative to is parent container (which can be a tree or forest).\n */\nexport interface ChildLocation {\n\treadonly container: ChildCollection;\n\treadonly index: number;\n}\n\n/**\n * Wrapper around DetachedField that can be detected at runtime.\n */\nexport interface RootField {\n\treadonly key: DetachedField;\n}\n\n/**\n * Identifier for a child collection, either on a node/tree or at the root of a forest.\n */\nexport type ChildCollection = FieldKey | RootField;\n\n// TODO: its not clear how much DetachedField belongs here in tree,\n// but for now as its needed in Rebase and Forest,\n// it makes sense to have it here for reasoning about the roots of trees.\n/**\n * A root in the forest.\n *\n * The range is a \"container\" like a field:\n * any additional content inserted before or after contents of this range will be included in the range.\n * This also means that moving the content from this range elsewhere will leave this range valid, but empty.\n *\n * In some APIs DetachedFields are used as FieldKeys on a special implicit root node\n * to simplify the APIs and implementation.\n */\nexport interface DetachedField extends Opaque<Brand<string, \"tree.DetachedField\">> {}\n\n/**\n * Some code abstracts the root as a node with detached fields as its fields.\n * This maps detached field to field keys for thus use.\n *\n * @returns `field` as a {@link FieldKey} usable on a special root node serving as a parent of detached fields.\n */\nexport function detachedFieldAsKey(field: DetachedField): FieldKey {\n\treturn brand(extractFromOpaque(field));\n}\n\n/**\n * The inverse of {@link detachedFieldAsKey}.\n * Thus must only be used on {@link FieldKey}s which were produced via {@link detachedFieldAsKey},\n * and with the same scope (ex: forest) as the detachedFieldAsKey was originally from.\n */\nexport function keyAsDetachedField(key: FieldKey): DetachedField {\n\treturn brand(key);\n}\n\n/**\n * TODO: integrate this into Schema. Decide how to persist them (need stable Id?). Maybe allow updating field kinds?.\n * TODO: make families of changes per field kind. Build editing APIs from that.\n * TODO: factor ChangeRebaser implementations to support adding new field kinds.\n */\nexport interface FieldKind {\n\treadonly name: string;\n\treadonly description: string;\n\treadonly minimumChildren: number;\n\treadonly maximumChildren: number;\n}\n\n/**\n * Value that may be stored on a leaf node.\n * @internal\n */\nexport type TreeValue<TSchema extends ValueSchema = ValueSchema> = [\n\t{\n\t\t[ValueSchema.Number]: number;\n\t\t[ValueSchema.String]: string;\n\t\t[ValueSchema.Boolean]: boolean;\n\t\t[ValueSchema.FluidHandle]: IFluidHandle;\n\t\t// eslint-disable-next-line @rushstack/no-new-null\n\t\t[ValueSchema.Null]: null;\n\t}[TSchema],\n][_InlineTrick];\n\n/**\n * Value stored on a node.\n * @internal\n */\nexport type Value = undefined | TreeValue;\n\n/**\n * The fields required by a node in a tree.\n *\n * @privateRemarks A forked version of this type is used in `persistedTreeTextFormat.ts`.\n * Changes to this type might necessitate changes to `EncodedNodeData` or codecs.\n * See persistedTreeTextFormat's module documentation for more details.\n *\n * @internal\n */\nexport interface NodeData {\n\t/**\n\t * A payload of arbitrary serializable data.\n\t */\n\treadonly value?: TreeValue;\n\n\t/**\n\t * The meaning of this node.\n\t * Provides contexts/semantics for this node and its content.\n\t * Typically used to associate a node with metadata (including a schema) and source code (types, behaviors, etc).\n\t */\n\treadonly type: TreeNodeSchemaIdentifier;\n}\n\n/**\n * Use this type to indicate that a node sits above the detached fields, and thus is not a real node and who's type should not matter.\n */\nexport const aboveRootPlaceholder: TreeNodeSchemaIdentifier = brand(\n\t\"com.fluidframework.placeholder.aboveRoot\",\n);\n"]}
@@ -62,7 +62,6 @@ export declare function visitDelta(delta: Delta.Root, visitor: DeltaVisitor, det
62
62
  /**
63
63
  * Visitor for changes in a delta.
64
64
  * Must be freed after use.
65
- * @internal
66
65
  */
67
66
  export interface DeltaVisitor {
68
67
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"visitDelta.d.ts","sourceRoot":"","sources":["../../../src/core/tree/visitDelta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAI1D,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAC;AAGzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAQ7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CACzB,KAAK,EAAE,KAAK,CAAC,IAAI,EACjB,OAAO,EAAE,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I,CAAC;IAEjC;;;;;;;OAOG;IACH,UAAU,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;IAEhC;;;;;;;OAOG;IACH,SAAS,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;CAC/B"}
@@ -265,13 +265,13 @@ function detachPass(delta, visitor, config) {
265
265
  }
266
266
  }
267
267
  function buildTrees(id, trees, detachedFieldIndex, latestRevision, visitor) {
268
- for (let i = 0; i < trees.length; i += 1) {
268
+ for (const [i, tree] of trees.entries()) {
269
269
  const offsettedId = offsetDetachId(id, i);
270
270
  let root = detachedFieldIndex.tryGetEntry(offsettedId);
271
271
  assert(root === undefined, 0x929 /* Unable to build tree that already exists */);
272
272
  root = detachedFieldIndex.createEntry(offsettedId, latestRevision);
273
273
  const field = detachedFieldIndex.toFieldKey(root);
274
- visitor.create([trees[i]], field);
274
+ visitor.create([tree], field);
275
275
  }
276
276
  }
277
277
  function processBuilds(builds, config, visitor) {
@@ -1 +1 @@
1
- {"version":3,"file":"visitDelta.js","sourceRoot":"","sources":["../../../src/core/tree/visitDelta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAAkB,cAAc,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAS1F,OAAO,EACN,uBAAuB,EACvB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,GACd,MAAM,gBAAgB,CAAC;AAMxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU,CACzB,KAAiB,EACjB,OAAqB,EACrB,kBAAsC,EACtC,cAAuC;IAEvC,MAAM,eAAe,GAAsC,IAAI,GAAG,EAAE,CAAC;IACrE,MAAM,eAAe,GAAsC,IAAI,GAAG,EAAE,CAAC;IACrE,MAAM,aAAa,GAA+B,EAAE,CAAC;IACrD,MAAM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AAC;wBAC1D,CAAC;oBACF,CAAC;yBAAM,CAAC;wBACP,uBAAuB;wBACvB,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC;oBAC7C,CAAC;oBACD,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;oBACtD,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;oBACtD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;wBAC1B,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;wBAC1C,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;oBACjD,CAAC;gBACF,CAAC;YACF,CAAC;iBAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC7D,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAChD,CAAC;YACD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzB,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC;YACrB,CAAC;QACF,CAAC;IACF,CAAC;AACF,CAAC","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 { type NestedMap, setInNestedMap, tryGetFromNestedMap } from \"../../util/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { ITreeCursorSynchronous } from \"./cursor.js\";\n// eslint-disable-next-line import/no-duplicates\nimport type * as Delta from \"./delta.js\";\n// Since ProtoNodes is reexported, import it directly to avoid forcing Delta to be reexported.\n// eslint-disable-next-line import/no-duplicates\nimport type { ProtoNodes } from \"./delta.js\";\nimport {\n\tareDetachedNodeIdsEqual,\n\tisAttachMark,\n\tisDetachMark,\n\tisReplaceMark,\n\toffsetDetachId,\n} from \"./deltaUtil.js\";\nimport type { DetachedFieldIndex } from \"./detachedFieldIndex.js\";\nimport type { ForestRootId, Major, Minor } from \"./detachedFieldIndexTypes.js\";\nimport type { NodeIndex, PlaceIndex, Range } from \"./pathTree.js\";\nimport type { RevisionTag } from \"../index.js\";\n\n/**\n * Implementation notes:\n *\n * The visit is organized into four phases:\n * 1. a detach pass\n * 2. root transfers\n * 3. an attach pass\n * 4. root destructions\n *\n * The core idea is that before content can be attached, it must first exist and be in a detached field.\n * The detach pass is therefore responsible for making sure that all roots that needs to be attached during the\n * attach pass are detached.\n * In practice, this means the detach pass must:\n * - Create all subtrees that need to be created\n * - Detach all moved nodes\n *\n * In addition to that, the detach pass also detaches nodes that need removing, with the exception of nodes that get\n * replaced. The reason for this exception is that we need to be able to communicate replaces as atomic operations.\n * In order to do that, we need to wait until we are sure that the content to attach is available as a detached root.\n * Replaces are therefore handled during the attach pass.\n * Note that this could theoretically lead to a situation where, in the attach pass, one replace wants to attach\n * a node that has yet to be detached by another replace. This does not occur in practice because we do not support\n * editing operations that would lead to this situation.\n *\n * While the detach pass ensures that nodes to be attached are in a detached state, it does not guarantee that they\n * reside in the correct detach field. That is the responsibility of the root transfers phase.\n *\n * The attach phase carries out attaches and replaces.\n *\n * After the attach phase, roots destruction is carried out.\n * This needs to happen last to allow modifications to detached roots to be applied before they are destroyed.\n *\n * The details of the delta visit algorithm can impact how/when events are emitted by the objects that own the visitors.\n * For example, as of 2024-03-27, the subtreecChanged event of an AnchorNode is emitted when exiting a node during a\n * delta visit, and thus the two-pass nature of the algorithm means the event fires twice for any given change.\n * This two-pass nature also means that the event may fire at a time where no change is visible in the tree. E.g.,\n * if a node is being replaced, when the event fires during the detach pass no change in the tree has happened so the\n * listener won't see any; then when it fires during the attach pass, the change will be visible in the event listener.\n */\n\n/**\n * Crawls the given `delta`, calling `visitor`'s callback for each change encountered.\n * Each successive call to the visitor callbacks assumes that the change described by earlier calls have been applied\n * to the document tree. For example, for a change that removes the first and third node of a field, the visitor calls\n * will first call detach with a range from indices 0 to 1 then call detach with a range from indices 1 to 2.\n *\n * @param delta - The delta to be crawled.\n * @param visitor - The object to notify of the changes encountered.\n * @param detachedFieldIndex - Index responsible for keeping track of the existing detached fields.\n * @param latestRevision - The latest revision tag associated with this delta.\n */\nexport function visitDelta(\n\tdelta: Delta.Root,\n\tvisitor: DeltaVisitor,\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tlatestRevision: RevisionTag | undefined,\n): void {\n\tconst detachPassRoots: Map<ForestRootId, Delta.FieldMap> = new Map();\n\tconst attachPassRoots: Map<ForestRootId, Delta.FieldMap> = new Map();\n\tconst rootTransfers: Delta.DetachedNodeRename[] = [];\n\tconst rootDestructions: Delta.DetachedNodeDestruction[] = [];\n\tconst refreshers: NestedMap<Major, Minor, ITreeCursorSynchronous> = new Map();\n\tdelta.refreshers?.forEach(({ id: { major, minor }, trees }) => {\n\t\tfor (let i = 0; i < trees.length; i += 1) {\n\t\t\tconst offsettedId = minor + i;\n\t\t\tsetInNestedMap(refreshers, major, offsettedId, trees[i]);\n\t\t}\n\t});\n\tconst detachConfig: PassConfig = {\n\t\tfunc: detachPass,\n\t\tlatestRevision,\n\t\trefreshers,\n\t\tdetachedFieldIndex,\n\t\tdetachPassRoots,\n\t\tattachPassRoots,\n\t\trootTransfers,\n\t\trootDestructions,\n\t};\n\tprocessBuilds(delta.build, detachConfig, visitor);\n\tvisitFieldMarks(delta.fields, visitor, detachConfig);\n\tfixedPointVisitOfRoots(visitor, detachPassRoots, detachConfig);\n\ttransferRoots(\n\t\trootTransfers,\n\t\tattachPassRoots,\n\t\tdetachedFieldIndex,\n\t\tvisitor,\n\t\trefreshers,\n\t\tlatestRevision,\n\t);\n\tconst attachConfig: PassConfig = {\n\t\tfunc: attachPass,\n\t\tlatestRevision,\n\t\trefreshers,\n\t\tdetachedFieldIndex,\n\t\tdetachPassRoots,\n\t\tattachPassRoots,\n\t\trootTransfers,\n\t\trootDestructions,\n\t};\n\tvisitFieldMarks(delta.fields, visitor, attachConfig);\n\tfixedPointVisitOfRoots(visitor, attachPassRoots, attachConfig);\n\tcollectDestroys(delta.destroy, attachConfig);\n\tfor (const { id, count } of rootDestructions) {\n\t\tfor (let i = 0; i < count; i += 1) {\n\t\t\tconst offsetId = offsetDetachId(id, i);\n\t\t\tconst root = detachedFieldIndex.getEntry(offsetId);\n\t\t\tconst field = detachedFieldIndex.toFieldKey(root);\n\t\t\tvisitor.destroy(field, 1);\n\t\t\tdetachedFieldIndex.deleteEntry(offsetId);\n\t\t}\n\t}\n}\n\n/**\n * Visits all nodes in `roots` until none are left.\n * This function tolerates entries being added to and removed from `roots` as part of visits.\n * @param visitor - The visitor to visit the roots with.\n * @param roots - The initial set of roots to visit.\n * Individual entries are removed prior to being visited.\n * @param config - The configuration to use for visits.\n */\nfunction fixedPointVisitOfRoots(\n\tvisitor: DeltaVisitor,\n\troots: Map<ForestRootId, Delta.FieldMap>,\n\tconfig: PassConfig,\n): void {\n\twhile (roots.size > 0) {\n\t\tfor (const [root, modifications] of roots) {\n\t\t\troots.delete(root);\n\t\t\tconst field = config.detachedFieldIndex.toFieldKey(root);\n\t\t\tvisitor.enterField(field);\n\t\t\t// Note: each visit may lead to `roots` being populated with new entries or having some entries removed.\n\t\t\tvisitNode(0, modifications, visitor, config);\n\t\t\tvisitor.exitField(field);\n\t\t}\n\t}\n}\n\n/**\n * Transfers roots from one detached field to another.\n * This occurs in the following circumstances:\n * - A changeset moves then removes a node\n * - A changeset restores then moves a node\n * - A changeset restores then removes a node\n * TODO#5481: update the DetachedFieldIndex instead of moving the nodes around.\n *\n * @param rootTransfers - The transfers to perform.\n * @param mapToUpdate - A map to update based on the transfers being performed.\n * @param detachedFieldIndex - The index to update based on the transfers being performed.\n * @param visitor - The visitor to inform of the transfers being performed.\n */\nfunction transferRoots(\n\trootTransfers: readonly Delta.DetachedNodeRename[],\n\tmapToUpdate: Map<ForestRootId, unknown>,\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tvisitor: DeltaVisitor,\n\trefreshers: NestedMap<Major, Minor, ITreeCursorSynchronous>,\n\trevision?: RevisionTag,\n): void {\n\ttype AtomizedNodeRename = Omit<Delta.DetachedNodeRename, \"count\">;\n\tlet nextBatch = rootTransfers.flatMap(({ oldId, newId, count }) => {\n\t\tconst atomized: AtomizedNodeRename[] = [];\n\t\t// It's possible for a detached node to be revived transiently such that it ends up back in the same detached field.\n\t\t// Making such a transfer wouldn't just be inefficient, it would lead us to mistakenly think we have moved all content\n\t\t// out of the source detached field, and would lead us to delete the tree index entry for that source detached field.\n\t\t// This would effectively result in the tree index missing an entry for the detached field.\n\t\t// This if statement prevents that from happening.\n\t\tif (!areDetachedNodeIdsEqual(oldId, newId)) {\n\t\t\tfor (let i = 0; i < count; i += 1) {\n\t\t\t\tatomized.push({ oldId: offsetDetachId(oldId, i), newId: offsetDetachId(newId, i) });\n\t\t\t}\n\t\t}\n\t\treturn atomized;\n\t});\n\twhile (nextBatch.length > 0) {\n\t\tconst delayed: AtomizedNodeRename[] = [];\n\t\tconst priorSize = nextBatch.length;\n\t\tfor (const { oldId, newId } of nextBatch) {\n\t\t\tlet oldRootId = detachedFieldIndex.tryGetEntry(oldId);\n\t\t\tif (oldRootId === undefined) {\n\t\t\t\tconst tree = tryGetFromNestedMap(refreshers, oldId.major, oldId.minor);\n\t\t\t\tif (tree !== undefined) {\n\t\t\t\t\tbuildTrees(oldId, [tree], detachedFieldIndex, revision, visitor);\n\t\t\t\t\toldRootId = detachedFieldIndex.getEntry(oldId);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (oldRootId === undefined) {\n\t\t\t\t// The source field is not populated.\n\t\t\t\t// This can happen when another rename needs to be performed first.\n\t\t\t\tdelayed.push({ oldId, newId });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet newRootId = detachedFieldIndex.tryGetEntry(newId);\n\t\t\tif (newRootId !== undefined) {\n\t\t\t\t// The destination field is already occupied.\n\t\t\t\t// This can happen when another rename needs to be performed first.\n\t\t\t\tdelayed.push({ oldId, newId });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnewRootId = detachedFieldIndex.createEntry(newId, revision);\n\t\t\tconst fields = mapToUpdate.get(oldRootId);\n\t\t\tif (fields !== undefined) {\n\t\t\t\tmapToUpdate.delete(oldRootId);\n\t\t\t\tmapToUpdate.set(newRootId, fields);\n\t\t\t}\n\t\t\tconst oldField = detachedFieldIndex.toFieldKey(oldRootId);\n\t\t\tconst newField = detachedFieldIndex.toFieldKey(newRootId);\n\t\t\tvisitor.enterField(oldField);\n\t\t\tvisitor.detach({ start: 0, end: 1 }, newField);\n\t\t\tvisitor.exitField(oldField);\n\t\t\tdetachedFieldIndex.deleteEntry(oldId);\n\t\t}\n\t\tassert(delayed.length < priorSize, 0x7cf /* transferRoots should make progress */);\n\t\tnextBatch = delayed;\n\t}\n}\n\n/**\n * Visitor for changes in a delta.\n * Must be freed after use.\n * @internal\n */\nexport interface DeltaVisitor {\n\t/**\n\t * Frees/releases the visitor. Must be called once the visitor is no longer needed, since trying to acquire\n\t * a new one before freeing an existing one is invalid.\n\t */\n\tfree(): void;\n\t/**\n\t * Creates nodes for the given content in a new detached field.\n\t * @param content - The content to create.\n\t * @param destination - The key for a new detached field.\n\t * A field with this key must not already exist.\n\t */\n\tcreate(content: ProtoNodes, destination: FieldKey): void;\n\t/**\n\t * Recursively destroys the given detached field and all of the nodes within it.\n\t * @param detachedField - The key for the detached field to destroy.\n\t * @param count - The number of nodes being destroyed.\n\t * Expected to match the number of nodes in the detached field being destroyed.\n\t */\n\tdestroy(detachedField: FieldKey, count: number): void;\n\t/**\n\t * Transfers all the nodes from a detached field to the current field.\n\t * @param source - The detached field to transfer the nodes from.\n\t * @param count - The number of nodes being attached.\n\t * Expected to match the number of nodes in the source detached field.\n\t * @param destination - The index at which to attach the nodes.\n\t */\n\tattach(source: FieldKey, count: number, destination: PlaceIndex): void;\n\t/**\n\t * Transfers a range of nodes from the current field to a new detached field.\n\t * @param source - The bounds of the range of nodes to detach.\n\t * @param destination - The key for a new detached field.\n\t * A field with this key must not already exist.\n\t */\n\tdetach(source: Range, destination: FieldKey): void;\n\t/**\n\t * Replaces a range of nodes in the current field by transferring them out to a new detached field\n\t * and transferring in all the nodes from an existing detached field in their place.\n\t * The number of nodes being detached must match the number of nodes being attached.\n\t * @param newContentSource - The detached field to transfer the new nodes from.\n\t * @param range - The bounds of the range of nodes to replace.\n\t * @param oldContentDestination - The key for a new detached field to transfer the old nodes to.\n\t */\n\treplace(newContentSource: FieldKey, range: Range, oldContentDestination: FieldKey): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Node at the specified index\n\t * within the Field that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param index - The index (within the Field) of the node that should become the new \"current location\".\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Field.\n\t */\n\tenterNode(index: NodeIndex): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Field which contains the Node\n\t * that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param index - The index (within its Field) of the node that is being exited.\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Node.\n\t */\n\texitNode(index: NodeIndex): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Field with the specified key,\n\t * within the Node that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param key - The key of the field that should become the new \"current location\".\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Node.\n\t */\n\tenterField(key: FieldKey): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Node which contains the Field\n\t * that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param key - The key of the field that is being exited.\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Field.\n\t */\n\texitField(key: FieldKey): void;\n}\n\ninterface PassConfig {\n\treadonly func: Pass;\n\n\t/**\n\t * The latest revision tag associated with the given delta. This is used to keep track\n\t * of when repair data should be garbage collected.\n\t */\n\treadonly latestRevision: RevisionTag | undefined;\n\n\treadonly detachedFieldIndex: DetachedFieldIndex;\n\t/**\n\t * A mapping between forest root id and trees that represent refresher data. Each entry is only\n\t * created in the forest once needed.\n\t */\n\treadonly refreshers: NestedMap<Major, Minor, ITreeCursorSynchronous>;\n\t/**\n\t * Nested changes on roots that need to be visited as part of the detach pass.\n\t * Each entry is removed when its associated changes are visited.\n\t */\n\treadonly detachPassRoots: Map<ForestRootId, Delta.FieldMap>;\n\t/**\n\t * Nested changes on roots that need to be visited as part of the attach pass.\n\t * Each entry is removed when its associated changes are visited.\n\t * Some of these roots will attached during the attach pass, in which case the nested changes are visited after\n\t * the node is attached.\n\t * Some of these nodes will never be attached, in which case we visit them in their detached fields at the end of\n\t * the attach pass. Note that such a visit might lead to more nodes being attached, including nodes were visited as\n\t * roots.\n\t */\n\treadonly attachPassRoots: Map<ForestRootId, Delta.FieldMap>;\n\t/**\n\t * Represents transfers of roots from one detached field to another.\n\t */\n\treadonly rootTransfers: Delta.DetachedNodeRename[];\n\t/**\n\t * Represents roots that need to be destroyed.\n\t * Collected as part of the detach pass.\n\t * Carried out at the end of the attach pass.\n\t */\n\treadonly rootDestructions: Delta.DetachedNodeDestruction[];\n}\n\ntype Pass = (delta: Delta.FieldChanges, visitor: DeltaVisitor, config: PassConfig) => void;\n\nfunction visitFieldMarks(\n\tfields: Delta.FieldMap | undefined,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (fields !== undefined) {\n\t\tfor (const [key, field] of fields) {\n\t\t\tvisitor.enterField(key);\n\t\t\tconfig.func(field, visitor, config);\n\t\t\tvisitor.exitField(key);\n\t\t}\n\t}\n}\n\nfunction visitNode(\n\tindex: number,\n\tfields: Delta.FieldMap | undefined,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (fields !== undefined) {\n\t\tvisitor.enterNode(index);\n\t\tvisitFieldMarks(fields, visitor, config);\n\t\tvisitor.exitNode(index);\n\t}\n}\n\n/**\n * Performs the following:\n * - Performs all root creations\n * - Collects all roots that may need a detach pass\n * - Collects all roots that may need an attach pass\n * - Collects all relocates\n * - Collects all destructions\n * - Executes detaches (bottom-up) provided they are not part of a replace\n * (because we want to wait until we are sure content to attach is available as a root)\n */\nfunction detachPass(\n\tdelta: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (delta.global !== undefined) {\n\t\tfor (const { id, fields } of delta.global) {\n\t\t\tlet root = config.detachedFieldIndex.tryGetEntry(id);\n\t\t\tif (root === undefined) {\n\t\t\t\tconst tree = tryGetFromNestedMap(config.refreshers, id.major, id.minor);\n\t\t\t\tassert(tree !== undefined, 0x928 /* refresher data not found */);\n\t\t\t\tbuildTrees(id, [tree], config.detachedFieldIndex, config.latestRevision, visitor);\n\t\t\t\troot = config.detachedFieldIndex.getEntry(id);\n\t\t\t}\n\t\t\t// the revision is updated for any refresher data included in the delta that is used\n\t\t\tconfig.detachedFieldIndex.updateLatestRevision(id, config.latestRevision);\n\t\t\tconfig.detachPassRoots.set(root, fields);\n\t\t\tconfig.attachPassRoots.set(root, fields);\n\t\t}\n\t}\n\tif (delta.rename !== undefined) {\n\t\tconfig.rootTransfers.push(...delta.rename);\n\t}\n\tif (delta.local !== undefined) {\n\t\tlet index = 0;\n\t\tfor (const mark of delta.local) {\n\t\t\tif (mark.fields !== undefined) {\n\t\t\t\tassert(\n\t\t\t\t\tmark.attach === undefined || mark.detach !== undefined,\n\t\t\t\t\t0x7d0 /* Invalid nested changes on an additive mark */,\n\t\t\t\t);\n\t\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t\t}\n\t\t\tif (isDetachMark(mark)) {\n\t\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst id = offsetDetachId(mark.detach!, i);\n\t\t\t\t\tconst root = config.detachedFieldIndex.createEntry(id, config.latestRevision);\n\t\t\t\t\tif (mark.fields !== undefined) {\n\t\t\t\t\t\tconfig.attachPassRoots.set(root, mark.fields);\n\t\t\t\t\t}\n\t\t\t\t\tconst field = config.detachedFieldIndex.toFieldKey(root);\n\t\t\t\t\tvisitor.detach({ start: index, end: index + 1 }, field);\n\t\t\t\t}\n\t\t\t} else if (!isAttachMark(mark)) {\n\t\t\t\tindex += mark.count;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction buildTrees(\n\tid: Delta.DetachedNodeId,\n\ttrees: readonly ITreeCursorSynchronous[],\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tlatestRevision: RevisionTag | undefined,\n\tvisitor: DeltaVisitor,\n): void {\n\tfor (let i = 0; i < trees.length; i += 1) {\n\t\tconst offsettedId = offsetDetachId(id, i);\n\t\tlet root = detachedFieldIndex.tryGetEntry(offsettedId);\n\t\tassert(root === undefined, 0x929 /* Unable to build tree that already exists */);\n\t\troot = detachedFieldIndex.createEntry(offsettedId, latestRevision);\n\t\tconst field = detachedFieldIndex.toFieldKey(root);\n\t\tvisitor.create([trees[i]], field);\n\t}\n}\n\nfunction processBuilds(\n\tbuilds: readonly Delta.DetachedNodeBuild[] | undefined,\n\tconfig: PassConfig,\n\tvisitor: DeltaVisitor,\n): void {\n\tif (builds !== undefined) {\n\t\tfor (const { id, trees } of builds) {\n\t\t\tbuildTrees(id, trees, config.detachedFieldIndex, config.latestRevision, visitor);\n\t\t}\n\t}\n}\n\nfunction collectDestroys(\n\tdestroys: readonly Delta.DetachedNodeDestruction[] | undefined,\n\tconfig: PassConfig,\n): void {\n\tif (destroys !== undefined) {\n\t\tconfig.rootDestructions.push(...destroys);\n\t}\n}\n\n/**\n * Preforms the following:\n * - Executes attaches (top-down) applying nested changes on the attached nodes\n * - Executes replaces (top-down) applying nested changes on the attached nodes\n * - Collects detached roots (from replaces) that need an attach pass\n */\nfunction attachPass(\n\tdelta: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (delta.local !== undefined) {\n\t\tlet index = 0;\n\t\tfor (const mark of delta.local) {\n\t\t\tif (isAttachMark(mark) || isReplaceMark(mark)) {\n\t\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst offsetAttachId = offsetDetachId(mark.attach!, i);\n\t\t\t\t\tlet sourceRoot = config.detachedFieldIndex.tryGetEntry(offsetAttachId);\n\t\t\t\t\tif (sourceRoot === undefined) {\n\t\t\t\t\t\tconst tree = tryGetFromNestedMap(\n\t\t\t\t\t\t\tconfig.refreshers,\n\t\t\t\t\t\t\toffsetAttachId.major,\n\t\t\t\t\t\t\toffsetAttachId.minor,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tassert(tree !== undefined, 0x92a /* refresher data not found */);\n\t\t\t\t\t\tbuildTrees(\n\t\t\t\t\t\t\toffsetAttachId,\n\t\t\t\t\t\t\t[tree],\n\t\t\t\t\t\t\tconfig.detachedFieldIndex,\n\t\t\t\t\t\t\tconfig.latestRevision,\n\t\t\t\t\t\t\tvisitor,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsourceRoot = config.detachedFieldIndex.getEntry(offsetAttachId);\n\t\t\t\t\t}\n\t\t\t\t\tconst sourceField = config.detachedFieldIndex.toFieldKey(sourceRoot);\n\t\t\t\t\tconst offsetIndex = index + i;\n\t\t\t\t\tif (isReplaceMark(mark)) {\n\t\t\t\t\t\tconst rootDestination = config.detachedFieldIndex.createEntry(\n\t\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\t\t\toffsetDetachId(mark.detach!, i),\n\t\t\t\t\t\t\tconfig.latestRevision,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst destinationField = config.detachedFieldIndex.toFieldKey(rootDestination);\n\t\t\t\t\t\tvisitor.replace(\n\t\t\t\t\t\t\tsourceField,\n\t\t\t\t\t\t\t{ start: offsetIndex, end: offsetIndex + 1 },\n\t\t\t\t\t\t\tdestinationField,\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// We may need to do a second pass on the detached nodes\n\t\t\t\t\t\tif (mark.fields !== undefined) {\n\t\t\t\t\t\t\tconfig.attachPassRoots.set(rootDestination, mark.fields);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// This a simple attach\n\t\t\t\t\t\tvisitor.attach(sourceField, 1, offsetIndex);\n\t\t\t\t\t}\n\t\t\t\t\tconfig.detachedFieldIndex.deleteEntry(offsetAttachId);\n\t\t\t\t\tconst fields = config.attachPassRoots.get(sourceRoot);\n\t\t\t\t\tif (fields !== undefined) {\n\t\t\t\t\t\tconfig.attachPassRoots.delete(sourceRoot);\n\t\t\t\t\t\tvisitNode(offsetIndex, fields, visitor, config);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (!isDetachMark(mark) && mark.fields !== undefined) {\n\t\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t\t}\n\t\t\tif (!isDetachMark(mark)) {\n\t\t\t\tindex += mark.count;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"visitDelta.js","sourceRoot":"","sources":["../../../src/core/tree/visitDelta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAAkB,cAAc,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAS1F,OAAO,EACN,uBAAuB,EACvB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,GACd,MAAM,gBAAgB,CAAC;AAMxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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WAAW,EAAE,GAAG,EAAE,WAAW,GAAG,CAAC,EAAE,EAC5C,gBAAgB,CAChB,CAAC;wBACF,wDAAwD;wBACxD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;4BAC/B,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;wBAC1D,CAAC;oBACF,CAAC;yBAAM,CAAC;wBACP,uBAAuB;wBACvB,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC;oBAC7C,CAAC;oBACD,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;oBACtD,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;oBACtD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;wBAC1B,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;wBAC1C,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;oBACjD,CAAC;gBACF,CAAC;YACF,CAAC;iBAAM,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;gBAC7D,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAChD,CAAC;YACD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC;gBACzB,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC;YACrB,CAAC;QACF,CAAC;IACF,CAAC;AACF,CAAC","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 { type NestedMap, setInNestedMap, tryGetFromNestedMap } from \"../../util/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { ITreeCursorSynchronous } from \"./cursor.js\";\n// eslint-disable-next-line import/no-duplicates\nimport type * as Delta from \"./delta.js\";\n// Since ProtoNodes is reexported, import it directly to avoid forcing Delta to be reexported.\n// eslint-disable-next-line import/no-duplicates\nimport type { ProtoNodes } from \"./delta.js\";\nimport {\n\tareDetachedNodeIdsEqual,\n\tisAttachMark,\n\tisDetachMark,\n\tisReplaceMark,\n\toffsetDetachId,\n} from \"./deltaUtil.js\";\nimport type { DetachedFieldIndex } from \"./detachedFieldIndex.js\";\nimport type { ForestRootId, Major, Minor } from \"./detachedFieldIndexTypes.js\";\nimport type { NodeIndex, PlaceIndex, Range } from \"./pathTree.js\";\nimport type { RevisionTag } from \"../index.js\";\n\n/**\n * Implementation notes:\n *\n * The visit is organized into four phases:\n * 1. a detach pass\n * 2. root transfers\n * 3. an attach pass\n * 4. root destructions\n *\n * The core idea is that before content can be attached, it must first exist and be in a detached field.\n * The detach pass is therefore responsible for making sure that all roots that needs to be attached during the\n * attach pass are detached.\n * In practice, this means the detach pass must:\n * - Create all subtrees that need to be created\n * - Detach all moved nodes\n *\n * In addition to that, the detach pass also detaches nodes that need removing, with the exception of nodes that get\n * replaced. The reason for this exception is that we need to be able to communicate replaces as atomic operations.\n * In order to do that, we need to wait until we are sure that the content to attach is available as a detached root.\n * Replaces are therefore handled during the attach pass.\n * Note that this could theoretically lead to a situation where, in the attach pass, one replace wants to attach\n * a node that has yet to be detached by another replace. This does not occur in practice because we do not support\n * editing operations that would lead to this situation.\n *\n * While the detach pass ensures that nodes to be attached are in a detached state, it does not guarantee that they\n * reside in the correct detach field. That is the responsibility of the root transfers phase.\n *\n * The attach phase carries out attaches and replaces.\n *\n * After the attach phase, roots destruction is carried out.\n * This needs to happen last to allow modifications to detached roots to be applied before they are destroyed.\n *\n * The details of the delta visit algorithm can impact how/when events are emitted by the objects that own the visitors.\n * For example, as of 2024-03-27, the subtreecChanged event of an AnchorNode is emitted when exiting a node during a\n * delta visit, and thus the two-pass nature of the algorithm means the event fires twice for any given change.\n * This two-pass nature also means that the event may fire at a time where no change is visible in the tree. E.g.,\n * if a node is being replaced, when the event fires during the detach pass no change in the tree has happened so the\n * listener won't see any; then when it fires during the attach pass, the change will be visible in the event listener.\n */\n\n/**\n * Crawls the given `delta`, calling `visitor`'s callback for each change encountered.\n * Each successive call to the visitor callbacks assumes that the change described by earlier calls have been applied\n * to the document tree. For example, for a change that removes the first and third node of a field, the visitor calls\n * will first call detach with a range from indices 0 to 1 then call detach with a range from indices 1 to 2.\n *\n * @param delta - The delta to be crawled.\n * @param visitor - The object to notify of the changes encountered.\n * @param detachedFieldIndex - Index responsible for keeping track of the existing detached fields.\n * @param latestRevision - The latest revision tag associated with this delta.\n */\nexport function visitDelta(\n\tdelta: Delta.Root,\n\tvisitor: DeltaVisitor,\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tlatestRevision: RevisionTag | undefined,\n): void {\n\tconst detachPassRoots: Map<ForestRootId, Delta.FieldMap> = new Map();\n\tconst attachPassRoots: Map<ForestRootId, Delta.FieldMap> = new Map();\n\tconst rootTransfers: Delta.DetachedNodeRename[] = [];\n\tconst rootDestructions: Delta.DetachedNodeDestruction[] = [];\n\tconst refreshers: NestedMap<Major, Minor, ITreeCursorSynchronous> = new Map();\n\tdelta.refreshers?.forEach(({ id: { major, minor }, trees }) => {\n\t\tfor (let i = 0; i < trees.length; i += 1) {\n\t\t\tconst offsettedId = minor + i;\n\t\t\tsetInNestedMap(refreshers, major, offsettedId, trees[i]);\n\t\t}\n\t});\n\tconst detachConfig: PassConfig = {\n\t\tfunc: detachPass,\n\t\tlatestRevision,\n\t\trefreshers,\n\t\tdetachedFieldIndex,\n\t\tdetachPassRoots,\n\t\tattachPassRoots,\n\t\trootTransfers,\n\t\trootDestructions,\n\t};\n\tprocessBuilds(delta.build, detachConfig, visitor);\n\tvisitFieldMarks(delta.fields, visitor, detachConfig);\n\tfixedPointVisitOfRoots(visitor, detachPassRoots, detachConfig);\n\ttransferRoots(\n\t\trootTransfers,\n\t\tattachPassRoots,\n\t\tdetachedFieldIndex,\n\t\tvisitor,\n\t\trefreshers,\n\t\tlatestRevision,\n\t);\n\tconst attachConfig: PassConfig = {\n\t\tfunc: attachPass,\n\t\tlatestRevision,\n\t\trefreshers,\n\t\tdetachedFieldIndex,\n\t\tdetachPassRoots,\n\t\tattachPassRoots,\n\t\trootTransfers,\n\t\trootDestructions,\n\t};\n\tvisitFieldMarks(delta.fields, visitor, attachConfig);\n\tfixedPointVisitOfRoots(visitor, attachPassRoots, attachConfig);\n\tcollectDestroys(delta.destroy, attachConfig);\n\tfor (const { id, count } of rootDestructions) {\n\t\tfor (let i = 0; i < count; i += 1) {\n\t\t\tconst offsetId = offsetDetachId(id, i);\n\t\t\tconst root = detachedFieldIndex.getEntry(offsetId);\n\t\t\tconst field = detachedFieldIndex.toFieldKey(root);\n\t\t\tvisitor.destroy(field, 1);\n\t\t\tdetachedFieldIndex.deleteEntry(offsetId);\n\t\t}\n\t}\n}\n\n/**\n * Visits all nodes in `roots` until none are left.\n * This function tolerates entries being added to and removed from `roots` as part of visits.\n * @param visitor - The visitor to visit the roots with.\n * @param roots - The initial set of roots to visit.\n * Individual entries are removed prior to being visited.\n * @param config - The configuration to use for visits.\n */\nfunction fixedPointVisitOfRoots(\n\tvisitor: DeltaVisitor,\n\troots: Map<ForestRootId, Delta.FieldMap>,\n\tconfig: PassConfig,\n): void {\n\twhile (roots.size > 0) {\n\t\tfor (const [root, modifications] of roots) {\n\t\t\troots.delete(root);\n\t\t\tconst field = config.detachedFieldIndex.toFieldKey(root);\n\t\t\tvisitor.enterField(field);\n\t\t\t// Note: each visit may lead to `roots` being populated with new entries or having some entries removed.\n\t\t\tvisitNode(0, modifications, visitor, config);\n\t\t\tvisitor.exitField(field);\n\t\t}\n\t}\n}\n\n/**\n * Transfers roots from one detached field to another.\n * This occurs in the following circumstances:\n * - A changeset moves then removes a node\n * - A changeset restores then moves a node\n * - A changeset restores then removes a node\n * TODO#5481: update the DetachedFieldIndex instead of moving the nodes around.\n *\n * @param rootTransfers - The transfers to perform.\n * @param mapToUpdate - A map to update based on the transfers being performed.\n * @param detachedFieldIndex - The index to update based on the transfers being performed.\n * @param visitor - The visitor to inform of the transfers being performed.\n */\nfunction transferRoots(\n\trootTransfers: readonly Delta.DetachedNodeRename[],\n\tmapToUpdate: Map<ForestRootId, unknown>,\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tvisitor: DeltaVisitor,\n\trefreshers: NestedMap<Major, Minor, ITreeCursorSynchronous>,\n\trevision?: RevisionTag,\n): void {\n\ttype AtomizedNodeRename = Omit<Delta.DetachedNodeRename, \"count\">;\n\tlet nextBatch = rootTransfers.flatMap(({ oldId, newId, count }) => {\n\t\tconst atomized: AtomizedNodeRename[] = [];\n\t\t// It's possible for a detached node to be revived transiently such that it ends up back in the same detached field.\n\t\t// Making such a transfer wouldn't just be inefficient, it would lead us to mistakenly think we have moved all content\n\t\t// out of the source detached field, and would lead us to delete the tree index entry for that source detached field.\n\t\t// This would effectively result in the tree index missing an entry for the detached field.\n\t\t// This if statement prevents that from happening.\n\t\tif (!areDetachedNodeIdsEqual(oldId, newId)) {\n\t\t\tfor (let i = 0; i < count; i += 1) {\n\t\t\t\tatomized.push({ oldId: offsetDetachId(oldId, i), newId: offsetDetachId(newId, i) });\n\t\t\t}\n\t\t}\n\t\treturn atomized;\n\t});\n\twhile (nextBatch.length > 0) {\n\t\tconst delayed: AtomizedNodeRename[] = [];\n\t\tconst priorSize = nextBatch.length;\n\t\tfor (const { oldId, newId } of nextBatch) {\n\t\t\tlet oldRootId = detachedFieldIndex.tryGetEntry(oldId);\n\t\t\tif (oldRootId === undefined) {\n\t\t\t\tconst tree = tryGetFromNestedMap(refreshers, oldId.major, oldId.minor);\n\t\t\t\tif (tree !== undefined) {\n\t\t\t\t\tbuildTrees(oldId, [tree], detachedFieldIndex, revision, visitor);\n\t\t\t\t\toldRootId = detachedFieldIndex.getEntry(oldId);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (oldRootId === undefined) {\n\t\t\t\t// The source field is not populated.\n\t\t\t\t// This can happen when another rename needs to be performed first.\n\t\t\t\tdelayed.push({ oldId, newId });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tlet newRootId = detachedFieldIndex.tryGetEntry(newId);\n\t\t\tif (newRootId !== undefined) {\n\t\t\t\t// The destination field is already occupied.\n\t\t\t\t// This can happen when another rename needs to be performed first.\n\t\t\t\tdelayed.push({ oldId, newId });\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tnewRootId = detachedFieldIndex.createEntry(newId, revision);\n\t\t\tconst fields = mapToUpdate.get(oldRootId);\n\t\t\tif (fields !== undefined) {\n\t\t\t\tmapToUpdate.delete(oldRootId);\n\t\t\t\tmapToUpdate.set(newRootId, fields);\n\t\t\t}\n\t\t\tconst oldField = detachedFieldIndex.toFieldKey(oldRootId);\n\t\t\tconst newField = detachedFieldIndex.toFieldKey(newRootId);\n\t\t\tvisitor.enterField(oldField);\n\t\t\tvisitor.detach({ start: 0, end: 1 }, newField);\n\t\t\tvisitor.exitField(oldField);\n\t\t\tdetachedFieldIndex.deleteEntry(oldId);\n\t\t}\n\t\tassert(delayed.length < priorSize, 0x7cf /* transferRoots should make progress */);\n\t\tnextBatch = delayed;\n\t}\n}\n\n/**\n * Visitor for changes in a delta.\n * Must be freed after use.\n */\nexport interface DeltaVisitor {\n\t/**\n\t * Frees/releases the visitor. Must be called once the visitor is no longer needed, since trying to acquire\n\t * a new one before freeing an existing one is invalid.\n\t */\n\tfree(): void;\n\t/**\n\t * Creates nodes for the given content in a new detached field.\n\t * @param content - The content to create.\n\t * @param destination - The key for a new detached field.\n\t * A field with this key must not already exist.\n\t */\n\tcreate(content: ProtoNodes, destination: FieldKey): void;\n\t/**\n\t * Recursively destroys the given detached field and all of the nodes within it.\n\t * @param detachedField - The key for the detached field to destroy.\n\t * @param count - The number of nodes being destroyed.\n\t * Expected to match the number of nodes in the detached field being destroyed.\n\t */\n\tdestroy(detachedField: FieldKey, count: number): void;\n\t/**\n\t * Transfers all the nodes from a detached field to the current field.\n\t * @param source - The detached field to transfer the nodes from.\n\t * @param count - The number of nodes being attached.\n\t * Expected to match the number of nodes in the source detached field.\n\t * @param destination - The index at which to attach the nodes.\n\t */\n\tattach(source: FieldKey, count: number, destination: PlaceIndex): void;\n\t/**\n\t * Transfers a range of nodes from the current field to a new detached field.\n\t * @param source - The bounds of the range of nodes to detach.\n\t * @param destination - The key for a new detached field.\n\t * A field with this key must not already exist.\n\t */\n\tdetach(source: Range, destination: FieldKey): void;\n\t/**\n\t * Replaces a range of nodes in the current field by transferring them out to a new detached field\n\t * and transferring in all the nodes from an existing detached field in their place.\n\t * The number of nodes being detached must match the number of nodes being attached.\n\t * @param newContentSource - The detached field to transfer the new nodes from.\n\t * @param range - The bounds of the range of nodes to replace.\n\t * @param oldContentDestination - The key for a new detached field to transfer the old nodes to.\n\t */\n\treplace(newContentSource: FieldKey, range: Range, oldContentDestination: FieldKey): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Node at the specified index\n\t * within the Field that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param index - The index (within the Field) of the node that should become the new \"current location\".\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Field.\n\t */\n\tenterNode(index: NodeIndex): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Field which contains the Node\n\t * that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param index - The index (within its Field) of the node that is being exited.\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Node.\n\t */\n\texitNode(index: NodeIndex): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Field with the specified key,\n\t * within the Node that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param key - The key of the field that should become the new \"current location\".\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Node.\n\t */\n\tenterField(key: FieldKey): void;\n\n\t/**\n\t * Tells the visitor that it should update its \"current location\" to be the Node which contains the Field\n\t * that is the current \"current location\".\n\t * Future calls to methods of {@link DeltaVisitor} will assume that's the location where their effects are happening.\n\t * @param key - The key of the field that is being exited.\n\t *\n\t * @remarks This should only be called when the \"current location\" is a Field.\n\t */\n\texitField(key: FieldKey): void;\n}\n\ninterface PassConfig {\n\treadonly func: Pass;\n\n\t/**\n\t * The latest revision tag associated with the given delta. This is used to keep track\n\t * of when repair data should be garbage collected.\n\t */\n\treadonly latestRevision: RevisionTag | undefined;\n\n\treadonly detachedFieldIndex: DetachedFieldIndex;\n\t/**\n\t * A mapping between forest root id and trees that represent refresher data. Each entry is only\n\t * created in the forest once needed.\n\t */\n\treadonly refreshers: NestedMap<Major, Minor, ITreeCursorSynchronous>;\n\t/**\n\t * Nested changes on roots that need to be visited as part of the detach pass.\n\t * Each entry is removed when its associated changes are visited.\n\t */\n\treadonly detachPassRoots: Map<ForestRootId, Delta.FieldMap>;\n\t/**\n\t * Nested changes on roots that need to be visited as part of the attach pass.\n\t * Each entry is removed when its associated changes are visited.\n\t * Some of these roots will attached during the attach pass, in which case the nested changes are visited after\n\t * the node is attached.\n\t * Some of these nodes will never be attached, in which case we visit them in their detached fields at the end of\n\t * the attach pass. Note that such a visit might lead to more nodes being attached, including nodes were visited as\n\t * roots.\n\t */\n\treadonly attachPassRoots: Map<ForestRootId, Delta.FieldMap>;\n\t/**\n\t * Represents transfers of roots from one detached field to another.\n\t */\n\treadonly rootTransfers: Delta.DetachedNodeRename[];\n\t/**\n\t * Represents roots that need to be destroyed.\n\t * Collected as part of the detach pass.\n\t * Carried out at the end of the attach pass.\n\t */\n\treadonly rootDestructions: Delta.DetachedNodeDestruction[];\n}\n\ntype Pass = (delta: Delta.FieldChanges, visitor: DeltaVisitor, config: PassConfig) => void;\n\nfunction visitFieldMarks(\n\tfields: Delta.FieldMap | undefined,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (fields !== undefined) {\n\t\tfor (const [key, field] of fields) {\n\t\t\tvisitor.enterField(key);\n\t\t\tconfig.func(field, visitor, config);\n\t\t\tvisitor.exitField(key);\n\t\t}\n\t}\n}\n\nfunction visitNode(\n\tindex: number,\n\tfields: Delta.FieldMap | undefined,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (fields !== undefined) {\n\t\tvisitor.enterNode(index);\n\t\tvisitFieldMarks(fields, visitor, config);\n\t\tvisitor.exitNode(index);\n\t}\n}\n\n/**\n * Performs the following:\n * - Performs all root creations\n * - Collects all roots that may need a detach pass\n * - Collects all roots that may need an attach pass\n * - Collects all relocates\n * - Collects all destructions\n * - Executes detaches (bottom-up) provided they are not part of a replace\n * (because we want to wait until we are sure content to attach is available as a root)\n */\nfunction detachPass(\n\tdelta: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (delta.global !== undefined) {\n\t\tfor (const { id, fields } of delta.global) {\n\t\t\tlet root = config.detachedFieldIndex.tryGetEntry(id);\n\t\t\tif (root === undefined) {\n\t\t\t\tconst tree = tryGetFromNestedMap(config.refreshers, id.major, id.minor);\n\t\t\t\tassert(tree !== undefined, 0x928 /* refresher data not found */);\n\t\t\t\tbuildTrees(id, [tree], config.detachedFieldIndex, config.latestRevision, visitor);\n\t\t\t\troot = config.detachedFieldIndex.getEntry(id);\n\t\t\t}\n\t\t\t// the revision is updated for any refresher data included in the delta that is used\n\t\t\tconfig.detachedFieldIndex.updateLatestRevision(id, config.latestRevision);\n\t\t\tconfig.detachPassRoots.set(root, fields);\n\t\t\tconfig.attachPassRoots.set(root, fields);\n\t\t}\n\t}\n\tif (delta.rename !== undefined) {\n\t\tconfig.rootTransfers.push(...delta.rename);\n\t}\n\tif (delta.local !== undefined) {\n\t\tlet index = 0;\n\t\tfor (const mark of delta.local) {\n\t\t\tif (mark.fields !== undefined) {\n\t\t\t\tassert(\n\t\t\t\t\tmark.attach === undefined || mark.detach !== undefined,\n\t\t\t\t\t0x7d0 /* Invalid nested changes on an additive mark */,\n\t\t\t\t);\n\t\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t\t}\n\t\t\tif (isDetachMark(mark)) {\n\t\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst id = offsetDetachId(mark.detach!, i);\n\t\t\t\t\tconst root = config.detachedFieldIndex.createEntry(id, config.latestRevision);\n\t\t\t\t\tif (mark.fields !== undefined) {\n\t\t\t\t\t\tconfig.attachPassRoots.set(root, mark.fields);\n\t\t\t\t\t}\n\t\t\t\t\tconst field = config.detachedFieldIndex.toFieldKey(root);\n\t\t\t\t\tvisitor.detach({ start: index, end: index + 1 }, field);\n\t\t\t\t}\n\t\t\t} else if (!isAttachMark(mark)) {\n\t\t\t\tindex += mark.count;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction buildTrees(\n\tid: Delta.DetachedNodeId,\n\ttrees: readonly ITreeCursorSynchronous[],\n\tdetachedFieldIndex: DetachedFieldIndex,\n\tlatestRevision: RevisionTag | undefined,\n\tvisitor: DeltaVisitor,\n): void {\n\tfor (const [i, tree] of trees.entries()) {\n\t\tconst offsettedId = offsetDetachId(id, i);\n\t\tlet root = detachedFieldIndex.tryGetEntry(offsettedId);\n\t\tassert(root === undefined, 0x929 /* Unable to build tree that already exists */);\n\t\troot = detachedFieldIndex.createEntry(offsettedId, latestRevision);\n\t\tconst field = detachedFieldIndex.toFieldKey(root);\n\t\tvisitor.create([tree], field);\n\t}\n}\n\nfunction processBuilds(\n\tbuilds: readonly Delta.DetachedNodeBuild[] | undefined,\n\tconfig: PassConfig,\n\tvisitor: DeltaVisitor,\n): void {\n\tif (builds !== undefined) {\n\t\tfor (const { id, trees } of builds) {\n\t\t\tbuildTrees(id, trees, config.detachedFieldIndex, config.latestRevision, visitor);\n\t\t}\n\t}\n}\n\nfunction collectDestroys(\n\tdestroys: readonly Delta.DetachedNodeDestruction[] | undefined,\n\tconfig: PassConfig,\n): void {\n\tif (destroys !== undefined) {\n\t\tconfig.rootDestructions.push(...destroys);\n\t}\n}\n\n/**\n * Preforms the following:\n * - Executes attaches (top-down) applying nested changes on the attached nodes\n * - Executes replaces (top-down) applying nested changes on the attached nodes\n * - Collects detached roots (from replaces) that need an attach pass\n */\nfunction attachPass(\n\tdelta: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tif (delta.local !== undefined) {\n\t\tlet index = 0;\n\t\tfor (const mark of delta.local) {\n\t\t\tif (isAttachMark(mark) || isReplaceMark(mark)) {\n\t\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst offsetAttachId = offsetDetachId(mark.attach!, i);\n\t\t\t\t\tlet sourceRoot = config.detachedFieldIndex.tryGetEntry(offsetAttachId);\n\t\t\t\t\tif (sourceRoot === undefined) {\n\t\t\t\t\t\tconst tree = tryGetFromNestedMap(\n\t\t\t\t\t\t\tconfig.refreshers,\n\t\t\t\t\t\t\toffsetAttachId.major,\n\t\t\t\t\t\t\toffsetAttachId.minor,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tassert(tree !== undefined, 0x92a /* refresher data not found */);\n\t\t\t\t\t\tbuildTrees(\n\t\t\t\t\t\t\toffsetAttachId,\n\t\t\t\t\t\t\t[tree],\n\t\t\t\t\t\t\tconfig.detachedFieldIndex,\n\t\t\t\t\t\t\tconfig.latestRevision,\n\t\t\t\t\t\t\tvisitor,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tsourceRoot = config.detachedFieldIndex.getEntry(offsetAttachId);\n\t\t\t\t\t}\n\t\t\t\t\tconst sourceField = config.detachedFieldIndex.toFieldKey(sourceRoot);\n\t\t\t\t\tconst offsetIndex = index + i;\n\t\t\t\t\tif (isReplaceMark(mark)) {\n\t\t\t\t\t\tconst rootDestination = config.detachedFieldIndex.createEntry(\n\t\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\t\t\toffsetDetachId(mark.detach!, i),\n\t\t\t\t\t\t\tconfig.latestRevision,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst destinationField = config.detachedFieldIndex.toFieldKey(rootDestination);\n\t\t\t\t\t\tvisitor.replace(\n\t\t\t\t\t\t\tsourceField,\n\t\t\t\t\t\t\t{ start: offsetIndex, end: offsetIndex + 1 },\n\t\t\t\t\t\t\tdestinationField,\n\t\t\t\t\t\t);\n\t\t\t\t\t\t// We may need to do a second pass on the detached nodes\n\t\t\t\t\t\tif (mark.fields !== undefined) {\n\t\t\t\t\t\t\tconfig.attachPassRoots.set(rootDestination, mark.fields);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// This a simple attach\n\t\t\t\t\t\tvisitor.attach(sourceField, 1, offsetIndex);\n\t\t\t\t\t}\n\t\t\t\t\tconfig.detachedFieldIndex.deleteEntry(offsetAttachId);\n\t\t\t\t\tconst fields = config.attachPassRoots.get(sourceRoot);\n\t\t\t\t\tif (fields !== undefined) {\n\t\t\t\t\t\tconfig.attachPassRoots.delete(sourceRoot);\n\t\t\t\t\t\tvisitNode(offsetIndex, fields, visitor, config);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (!isDetachMark(mark) && mark.fields !== undefined) {\n\t\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t\t}\n\t\t\tif (!isDetachMark(mark)) {\n\t\t\t\tindex += mark.count;\n\t\t\t}\n\t\t}\n\t}\n}\n"]}
@@ -9,8 +9,6 @@ import type { DetachedPlaceUpPath, DetachedRangeUpPath, PlaceUpPath, RangeUpPath
9
9
  *
10
10
  * For any of these events, the paths are guaranteed to be valid at the time of the event,
11
11
  * and it is valid to read from the Forest at that path.
12
- *
13
- * @internal
14
12
  */
15
13
  export interface PathVisitor {
16
14
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"visitPath.d.ts","sourceRoot":"","sources":["../../../src/core/tree/visitPath.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACX,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,MAAM,EACN,MAAM,eAAe,CAAC;AAEvB;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW;IAC3B;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAEhD;;;;;;OAMG;IACH,YAAY,CAAC,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAE1E;;;;;;OAMG;IACH,WAAW,CAAC,MAAM,EAAE,mBAAmB,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAEzE;;;;;;OAMG;IACH,YAAY,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAE1E;;;;;;OAMG;IACH,WAAW,CAAC,MAAM,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAEzE;;;;;;;;;;OAUG;IACH,aAAa,CACZ,UAAU,EAAE,mBAAmB,EAC/B,UAAU,EAAE,WAAW,EACvB,qBAAqB,EAAE,mBAAmB,GACxC,IAAI,CAAC;IAER;;;;;;;;;OASG;IACH,YAAY,CACX,gBAAgB,EAAE,mBAAmB,EACrC,UAAU,EAAE,WAAW,EACvB,UAAU,EAAE,mBAAmB,GAC7B,IAAI,CAAC;IAER;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAElD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,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AElD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C;;;;;;OAMG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;CAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"visitPath.js","sourceRoot":"","sources":["../../../src/core/tree/visitPath.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ProtoNodes } from \"./delta.js\";\nimport type {\n\tDetachedPlaceUpPath,\n\tDetachedRangeUpPath,\n\tPlaceUpPath,\n\tRangeUpPath,\n\tUpPath,\n} from \"./pathTree.js\";\n\n/**\n * Delta visitor for the path tree.\n *\n * For any of these events, the paths are guaranteed to be valid at the time of the event,\n * and it is valid to read from the Forest at that path.\n *\n * @internal\n */\nexport interface PathVisitor {\n\t/**\n\t * Invoked after the creation of a range of nodes.\n\t * @param content - The content that was created.\n\t */\n\tafterCreate(content: DetachedRangeUpPath): void;\n\n\t/**\n\t * Invoked before the attaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that will be attached.\n\t * @param destination - The location where the content will be attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeAttach(source: DetachedRangeUpPath, destination: PlaceUpPath): void;\n\n\t/**\n\t * Invoked after the attaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The location where the content originated.\n\t * @param destination - The content that was attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tafterAttach(source: DetachedPlaceUpPath, destination: RangeUpPath): void;\n\n\t/**\n\t * Invoked before the detaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that will be detached.\n\t * @param destination - The location where the content will be sent to.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeDetach(source: RangeUpPath, destination: DetachedPlaceUpPath): void;\n\n\t/**\n\t * Invoked after the detaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that was detached.\n\t * @param destination - The location where the content will be attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tafterDetach(source: PlaceUpPath, destination: DetachedRangeUpPath): void;\n\n\t/**\n\t * Invoked before the replacement of a range of nodes.\n\t *\n\t * Note that the `newContent` range length will always match the `oldContent` range length.\n\t * A replace might actually be separate detaches and attaches which have been coalesced.\n\t *\n\t * @param newContent - The content that will be attached in place of the old.\n\t * @param oldContent - The old that will be replaced.\n\t * @param oldContentDestination - The destination of the old content.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeReplace(\n\t\tnewContent: DetachedRangeUpPath,\n\t\toldContent: RangeUpPath,\n\t\toldContentDestination: DetachedPlaceUpPath,\n\t): void;\n\n\t/**\n\t * Invoked after the replacement of a range of nodes.\n\t *\n\t * Note that the `newContent` range length will always match the `oldContent` range length.\n\t * A replace might actually be separate detaches and attaches which have been coalesced.\n\t *\n\t * @param newContentSource - The place that the new content came from.\n\t * @param newContent - The new content.\n\t * @param oldContent - The content that was replaced.\n\t */\n\tafterReplace(\n\t\tnewContentSource: DetachedPlaceUpPath,\n\t\tnewContent: RangeUpPath,\n\t\toldContent: DetachedRangeUpPath,\n\t): void;\n\n\t/**\n\t * Invoked before content is destroyed.\n\t * @param content - The content that will be destroyed\n\t */\n\tbeforeDestroy(content: DetachedRangeUpPath): void;\n\n\t/**\n\t * A sequence of nodes of length `count` is being removed starting with `path`.\n\t * Called when these nodes are no longer parented under their previous parent, and do not have a new parent.\n\t * It is possible they may be restored in the future (for example by a conflicted merge or undo).\n\t *\n\t * Not called for children of removed nodes.\n\t *\n\t * @param path - first node in the removed range.\n\t * @param count - length of removed range.\n\t *\n\t * @deprecated Migrate to using the other events.\n\t */\n\tonRemove(path: UpPath, count: number): void;\n\t/**\n\t * @param path - location which first node of inserted range will have after insert.\n\t * Any nodes at this index (or after it) will be moved to the right (have their indexes increased by `content.length`).\n\t * @param content - content which is being inserted.\n\t *\n\t * @deprecated Migrate to using the other events.\n\t */\n\tonInsert(path: UpPath, content: ProtoNodes): void;\n}\n"]}
1
+ {"version":3,"file":"visitPath.js","sourceRoot":"","sources":["../../../src/core/tree/visitPath.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ProtoNodes } from \"./delta.js\";\nimport type {\n\tDetachedPlaceUpPath,\n\tDetachedRangeUpPath,\n\tPlaceUpPath,\n\tRangeUpPath,\n\tUpPath,\n} from \"./pathTree.js\";\n\n/**\n * Delta visitor for the path tree.\n *\n * For any of these events, the paths are guaranteed to be valid at the time of the event,\n * and it is valid to read from the Forest at that path.\n */\nexport interface PathVisitor {\n\t/**\n\t * Invoked after the creation of a range of nodes.\n\t * @param content - The content that was created.\n\t */\n\tafterCreate(content: DetachedRangeUpPath): void;\n\n\t/**\n\t * Invoked before the attaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that will be attached.\n\t * @param destination - The location where the content will be attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeAttach(source: DetachedRangeUpPath, destination: PlaceUpPath): void;\n\n\t/**\n\t * Invoked after the attaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The location where the content originated.\n\t * @param destination - The content that was attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tafterAttach(source: DetachedPlaceUpPath, destination: RangeUpPath): void;\n\n\t/**\n\t * Invoked before the detaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that will be detached.\n\t * @param destination - The location where the content will be sent to.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeDetach(source: RangeUpPath, destination: DetachedPlaceUpPath): void;\n\n\t/**\n\t * Invoked after the detaching of a range of nodes.\n\t * Not invoked for replacements.\n\t * @param source - The content that was detached.\n\t * @param destination - The location where the content will be attached.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tafterDetach(source: PlaceUpPath, destination: DetachedRangeUpPath): void;\n\n\t/**\n\t * Invoked before the replacement of a range of nodes.\n\t *\n\t * Note that the `newContent` range length will always match the `oldContent` range length.\n\t * A replace might actually be separate detaches and attaches which have been coalesced.\n\t *\n\t * @param newContent - The content that will be attached in place of the old.\n\t * @param oldContent - The old that will be replaced.\n\t * @param oldContentDestination - The destination of the old content.\n\t * @param kind - The kind of replacement that will occur.\n\t */\n\tbeforeReplace(\n\t\tnewContent: DetachedRangeUpPath,\n\t\toldContent: RangeUpPath,\n\t\toldContentDestination: DetachedPlaceUpPath,\n\t): void;\n\n\t/**\n\t * Invoked after the replacement of a range of nodes.\n\t *\n\t * Note that the `newContent` range length will always match the `oldContent` range length.\n\t * A replace might actually be separate detaches and attaches which have been coalesced.\n\t *\n\t * @param newContentSource - The place that the new content came from.\n\t * @param newContent - The new content.\n\t * @param oldContent - The content that was replaced.\n\t */\n\tafterReplace(\n\t\tnewContentSource: DetachedPlaceUpPath,\n\t\tnewContent: RangeUpPath,\n\t\toldContent: DetachedRangeUpPath,\n\t): void;\n\n\t/**\n\t * Invoked before content is destroyed.\n\t * @param content - The content that will be destroyed\n\t */\n\tbeforeDestroy(content: DetachedRangeUpPath): void;\n\n\t/**\n\t * A sequence of nodes of length `count` is being removed starting with `path`.\n\t * Called when these nodes are no longer parented under their previous parent, and do not have a new parent.\n\t * It is possible they may be restored in the future (for example by a conflicted merge or undo).\n\t *\n\t * Not called for children of removed nodes.\n\t *\n\t * @param path - first node in the removed range.\n\t * @param count - length of removed range.\n\t *\n\t * @deprecated Migrate to using the other events.\n\t */\n\tonRemove(path: UpPath, count: number): void;\n\t/**\n\t * @param path - location which first node of inserted range will have after insert.\n\t * Any nodes at this index (or after it) will be moved to the right (have their indexes increased by `content.length`).\n\t * @param content - content which is being inserted.\n\t *\n\t * @deprecated Migrate to using the other events.\n\t */\n\tonInsert(path: UpPath, content: ProtoNodes): void;\n}\n"]}
@@ -29,7 +29,6 @@ export declare function combineVisitors(visitors: readonly DeltaVisitor[], annou
29
29
  /**
30
30
  * Visitor that is notified of changes before, after, and when changes are made.
31
31
  * Must be freed after use.
32
- * @internal
33
32
  */
34
33
  export interface AnnouncedVisitor extends DeltaVisitor {
35
34
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"visitorUtils.d.ts","sourceRoot":"","sources":["../../../src/core/tree/visitorUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,KAAK,YAAY,EAAc,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,wBAAgB,sBAAsB,CACrC,MAAM,oBAAiB,EACvB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,aAAa,EAC3B,OAAO,CAAC,EAAE,aAAa,GACrB,kBAAkB,CAQpB;AAED,wBAAgB,UAAU,CACzB,KAAK,EAAE,IAAI,EACX,cAAc,EAAE,WAAW,GAAG,SAAS,EACvC,cAAc,EAAE;IAAE,cAAc,EAAE,MAAM,YAAY,CAAA;CAAE,EACtD,kBAAkB,EAAE,kBAAkB,GACpC,IAAI,CAIN;AAED,wBAAgB,aAAa,CAC5B,KAAK,EAAE,IAAI,EACX,cAAc,EAAE,WAAW,GAAG,SAA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AAC,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;KACrE,CAAC;AACH,CAAC","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 type { ICodecOptions } from \"../../codec/index.js\";\nimport { type IdAllocator, idAllocatorFromMaxId } from \"../../util/index.js\";\nimport type { RevisionTag, RevisionTagCodec } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { ProtoNodes, Root } from \"./delta.js\";\nimport { DetachedFieldIndex } from \"./detachedFieldIndex.js\";\nimport type { ForestRootId } from \"./detachedFieldIndexTypes.js\";\nimport type { PlaceIndex, Range } from \"./pathTree.js\";\nimport { type DeltaVisitor, visitDelta } from \"./visitDelta.js\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nexport function makeDetachedFieldIndex(\n\tprefix: string = \"Temp\",\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n\toptions?: ICodecOptions,\n): DetachedFieldIndex {\n\treturn new DetachedFieldIndex(\n\t\tprefix,\n\t\tidAllocatorFromMaxId() as IdAllocator<ForestRootId>,\n\t\trevisionTagCodec,\n\t\tidCompressor,\n\t\toptions,\n\t);\n}\n\nexport function applyDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, visitor, detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport function announceDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor & AnnouncedVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, combineVisitors([visitor], [visitor]), detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\n/**\n * @param visitors - The returned visitor invokes the corresponding events for all these visitors, in order.\n * @param announcedVisitors - Subset of `visitors` to also call {@link AnnouncedVisitor} methods on.\n * This must be a subset of `visitors`: if not the visitor will not have its path correctly set when the events are triggered.\n * When `visitors` are making changes to data, `announcedVisitors` can be used to get extra events before or after all the changes from all the visitors have been made.\n * This can, for example, enable visitors to have access to the tree in these extra events despite multiple separate visitors updating different tree related data-structures.\n * @returns a DeltaVisitor combining all `visitors`.\n */\nexport function combineVisitors(\n\tvisitors: readonly DeltaVisitor[],\n\tannouncedVisitors: readonly AnnouncedVisitor[] = [],\n): DeltaVisitor {\n\t{\n\t\tconst set = new Set(visitors);\n\t\tfor (const item of announcedVisitors) {\n\t\t\tassert(set.has(item), 0x8c8 /* AnnouncedVisitor would not get traversed */);\n\t\t}\n\t}\n\treturn {\n\t\tfree: () => visitors.forEach((v) => v.free()),\n\t\tcreate: (...args) => {\n\t\t\tvisitors.forEach((v) => v.create(...args));\n\t\t\tannouncedVisitors.forEach((v) => v.afterCreate(...args));\n\t\t},\n\t\tdestroy: (...args) => {\n\t\t\tannouncedVisitors.forEach((v) => v.beforeDestroy(...args));\n\t\t\tvisitors.forEach((v) => v.destroy(...args));\n\t\t},\n\t\tattach: (source: FieldKey, count: number, destination: PlaceIndex) => {\n\t\t\tannouncedVisitors.forEach((v) => v.beforeAttach(source, count, destination));\n\t\t\tvisitors.forEach((v) => v.attach(source, count, destination));\n\t\t\tannouncedVisitors.forEach((v) =>\n\t\t\t\tv.afterAttach(source, { start: destination, end: destination + count }),\n\t\t\t);\n\t\t},\n\t\tdetach: (source: Range, destination: FieldKey) => {\n\t\t\tannouncedVisitors.forEach((v) => v.beforeDetach(source, destination));\n\t\t\tvisitors.forEach((v) => v.detach(source, destination));\n\t\t\tannouncedVisitors.forEach((v) =>\n\t\t\t\tv.afterDetach(source.start, source.end - source.start, destination),\n\t\t\t);\n\t\t},\n\t\treplace: (newContent: FieldKey, oldContent: Range, oldContentDestination: FieldKey) => {\n\t\t\tannouncedVisitors.forEach((v) =>\n\t\t\t\tv.beforeReplace(newContent, oldContent, oldContentDestination),\n\t\t\t);\n\t\t\tvisitors.forEach((v) => v.replace(newContent, oldContent, oldContentDestination));\n\t\t\tannouncedVisitors.forEach((v) =>\n\t\t\t\tv.afterReplace(newContent, oldContent, oldContentDestination),\n\t\t\t);\n\t\t},\n\t\tenterNode: (...args) => visitors.forEach((v) => v.enterNode(...args)),\n\t\texitNode: (...args) => visitors.forEach((v) => v.exitNode(...args)),\n\t\tenterField: (...args) => visitors.forEach((v) => v.enterField(...args)),\n\t\texitField: (...args) => visitors.forEach((v) => v.exitField(...args)),\n\t};\n}\n\n/**\n * Visitor that is notified of changes before, after, and when changes are made.\n * Must be freed after use.\n * @internal\n */\nexport interface AnnouncedVisitor extends DeltaVisitor {\n\t/**\n\t * A hook that is called after all nodes have been created.\n\t */\n\tafterCreate(content: ProtoNodes, destination: FieldKey): void;\n\tbeforeDestroy(field: FieldKey, count: number): void;\n\tbeforeAttach(source: FieldKey, count: number, destination: PlaceIndex): void;\n\tafterAttach(source: FieldKey, destination: Range): void;\n\tbeforeDetach(source: Range, destination: FieldKey): void;\n\tafterDetach(source: PlaceIndex, count: number, destination: FieldKey): void;\n\tbeforeReplace(\n\t\tnewContent: FieldKey,\n\t\toldContent: Range,\n\t\toldContentDestination: FieldKey,\n\t): void;\n\tafterReplace(newContentSource: FieldKey, newContent: Range, oldContent: FieldKey): void;\n}\n"]}
1
+ {"version":3,"file":"visitorUtils.js","sourceRoot":"","sources":["../../../src/core/tree/visitorUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAG7D,OAAO,EAAoB,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAK7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,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ACnE,UAAU,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,CAAC;QACvE,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC;KACrE,CAAC;AACH,CAAC","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 type { ICodecOptions } from \"../../codec/index.js\";\nimport { type IdAllocator, idAllocatorFromMaxId } from \"../../util/index.js\";\nimport type { RevisionTag, RevisionTagCodec } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { ProtoNodes, Root } from \"./delta.js\";\nimport { DetachedFieldIndex } from \"./detachedFieldIndex.js\";\nimport type { ForestRootId } from \"./detachedFieldIndexTypes.js\";\nimport type { PlaceIndex, Range } from \"./pathTree.js\";\nimport { type DeltaVisitor, visitDelta } from \"./visitDelta.js\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nexport function makeDetachedFieldIndex(\n\tprefix: string = \"Temp\",\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n\toptions?: ICodecOptions,\n): DetachedFieldIndex {\n\treturn new DetachedFieldIndex(\n\t\tprefix,\n\t\tidAllocatorFromMaxId() as IdAllocator<ForestRootId>,\n\t\trevisionTagCodec,\n\t\tidCompressor,\n\t\toptions,\n\t);\n}\n\nexport function applyDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, visitor, detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport function announceDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor & AnnouncedVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, combineVisitors([visitor], [visitor]), detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\n/**\n * @param visitors - The returned visitor invokes the corresponding events for all these visitors, in order.\n * @param announcedVisitors - Subset of `visitors` to also call {@link AnnouncedVisitor} methods on.\n * This must be a subset of `visitors`: if not the visitor will not have its path correctly set when the events are triggered.\n * When `visitors` are making changes to data, `announcedVisitors` can be used to get extra events before or after all the changes from all the visitors have been made.\n * This can, for example, enable visitors to have access to the tree in these extra events despite multiple separate visitors updating different tree related data-structures.\n * @returns a DeltaVisitor combining all `visitors`.\n */\nexport function combineVisitors(\n\tvisitors: readonly DeltaVisitor[],\n\tannouncedVisitors: readonly AnnouncedVisitor[] = [],\n): DeltaVisitor {\n\t{\n\t\tconst set = new Set(visitors);\n\t\tfor (const item of announcedVisitors) {\n\t\t\tassert(set.has(item), 0x8c8 /* AnnouncedVisitor would not get traversed */);\n\t\t}\n\t}\n\treturn {\n\t\tfree: () => visitors.forEach((v) => v.free()),\n\t\tcreate: (...args) => {\n\t\t\tvisitors.forEach((v) => v.create(...args));\n\t\t\tannouncedVisitors.forEach((v) => v.afterCreate(...args));\n\t\t},\n\t\tdestroy: (...args) => {\n\t\t\tannouncedVisitors.forEach((v) => v.beforeDestroy(...args));\n\t\t\tvisitors.forEach((v) => v.destroy(...args));\n\t\t},\n\t\tattach: (source: FieldKey, count: number, destination: PlaceIndex) => {\n\t\t\tannouncedVisitors.forEach((v) => v.beforeAttach(source, count, destination));\n\t\t\tvisitors.forEach((v) => v.attach(source, count, destination));\n\t\t\tannouncedVisitors.forEach((v) =>\n\t\t\t\tv.afterAttach(source, { start: destination, end: destination + count }),\n\t\t\t);\n\t\t},\n\t\tdetach: (source: Range, destination: FieldKey) => {\n\t\t\tannouncedVisitors.forEach((v) => v.beforeDetach(source, destination));\n\t\t\tvisitors.forEach((v) => v.detach(source, destination));\n\t\t\tannouncedVisitors.forEach((v) =>\n\t\t\t\tv.afterDetach(source.start, source.end - source.start, destination),\n\t\t\t);\n\t\t},\n\t\treplace: (newContent: FieldKey, oldContent: Range, oldContentDestination: FieldKey) => {\n\t\t\tannouncedVisitors.forEach((v) =>\n\t\t\t\tv.beforeReplace(newContent, oldContent, oldContentDestination),\n\t\t\t);\n\t\t\tvisitors.forEach((v) => v.replace(newContent, oldContent, oldContentDestination));\n\t\t\tannouncedVisitors.forEach((v) =>\n\t\t\t\tv.afterReplace(newContent, oldContent, oldContentDestination),\n\t\t\t);\n\t\t},\n\t\tenterNode: (...args) => visitors.forEach((v) => v.enterNode(...args)),\n\t\texitNode: (...args) => visitors.forEach((v) => v.exitNode(...args)),\n\t\tenterField: (...args) => visitors.forEach((v) => v.enterField(...args)),\n\t\texitField: (...args) => visitors.forEach((v) => v.exitField(...args)),\n\t};\n}\n\n/**\n * Visitor that is notified of changes before, after, and when changes are made.\n * Must be freed after use.\n */\nexport interface AnnouncedVisitor extends DeltaVisitor {\n\t/**\n\t * A hook that is called after all nodes have been created.\n\t */\n\tafterCreate(content: ProtoNodes, destination: FieldKey): void;\n\tbeforeDestroy(field: FieldKey, count: number): void;\n\tbeforeAttach(source: FieldKey, count: number, destination: PlaceIndex): void;\n\tafterAttach(source: FieldKey, destination: Range): void;\n\tbeforeDetach(source: Range, destination: FieldKey): void;\n\tafterDetach(source: PlaceIndex, count: number, destination: FieldKey): void;\n\tbeforeReplace(\n\t\tnewContent: FieldKey,\n\t\toldContent: Range,\n\t\toldContentDestination: FieldKey,\n\t): void;\n\tafterReplace(newContentSource: FieldKey, newContent: Range, oldContent: FieldKey): void;\n}\n"]}
@@ -3,6 +3,6 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { SchemaBuilder } from "./schemaBuilder.js";
6
- export { cursorToJsonObject, jsonArray, jsonObject, jsonRoot, jsonSchema, singleJsonCursor, } from "./json/index.js";
6
+ export { cursorToJsonObject, jsonArray, jsonObject, jsonRoot, jsonSchema, singleJsonCursor, typedJsonCursor, type TypedJsonCompatible, type TypedJsonCompatibleObject, } from "./json/index.js";
7
7
  export { leaf } from "./leafDomain.js";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/domains/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACN,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,UAAU,EACV,gBAAgB,GAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/domains/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACN,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC9B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC"}
@@ -3,6 +3,6 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { SchemaBuilder } from "./schemaBuilder.js";
6
- export { cursorToJsonObject, jsonArray, jsonObject, jsonRoot, jsonSchema, singleJsonCursor, } from "./json/index.js";
6
+ export { cursorToJsonObject, jsonArray, jsonObject, jsonRoot, jsonSchema, singleJsonCursor, typedJsonCursor, } from "./json/index.js";
7
7
  export { leaf } from "./leafDomain.js";
8
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/domains/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACN,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,UAAU,EACV,gBAAgB,GAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { SchemaBuilder } from \"./schemaBuilder.js\";\nexport {\n\tcursorToJsonObject,\n\tjsonArray,\n\tjsonObject,\n\tjsonRoot,\n\tjsonSchema,\n\tsingleJsonCursor,\n} from \"./json/index.js\";\n\nexport { leaf } from \"./leafDomain.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/domains/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EACN,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,eAAe,GAGf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { SchemaBuilder } from \"./schemaBuilder.js\";\nexport {\n\tcursorToJsonObject,\n\tjsonArray,\n\tjsonObject,\n\tjsonRoot,\n\tjsonSchema,\n\tsingleJsonCursor,\n\ttypedJsonCursor,\n\ttype TypedJsonCompatible,\n\ttype TypedJsonCompatibleObject,\n} from \"./json/index.js\";\n\nexport { leaf } from \"./leafDomain.js\";\n"]}
@@ -2,6 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { singleJsonCursor, cursorToJsonObject } from "./jsonCursor.js";
5
+ export { singleJsonCursor, cursorToJsonObject, typedJsonCursor, type TypedJsonCompatible, type TypedJsonCompatibleObject, } from "./jsonCursor.js";
6
6
  export { jsonSchema, jsonObject, jsonArray, jsonRoot } from "./jsonDomainSchema.js";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/json/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domains/json/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,GAC9B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC"}
@@ -2,6 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { singleJsonCursor, cursorToJsonObject } from "./jsonCursor.js";
5
+ export { singleJsonCursor, cursorToJsonObject, typedJsonCursor, } from "./jsonCursor.js";
6
6
  export { jsonSchema, jsonObject, jsonArray, jsonRoot } from "./jsonDomainSchema.js";
7
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/json/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { singleJsonCursor, cursorToJsonObject } from \"./jsonCursor.js\";\nexport { jsonSchema, jsonObject, jsonArray, jsonRoot } from \"./jsonDomainSchema.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domains/json/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,GAGf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tsingleJsonCursor,\n\tcursorToJsonObject,\n\ttypedJsonCursor,\n\ttype TypedJsonCompatible,\n\ttype TypedJsonCompatibleObject,\n} from \"./jsonCursor.js\";\nexport { jsonSchema, jsonObject, jsonArray, jsonRoot } from \"./jsonDomainSchema.js\";\n"]}
@@ -3,9 +3,12 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { type ITreeCursor, type ITreeCursorSynchronous } from "../../core/index.js";
6
- import type { JsonCompatible } from "../../util/index.js";
6
+ import { TreeNodeSchemaBase } from "../../feature-libraries/index.js";
7
+ import { type JsonCompatible } from "../../util/index.js";
8
+ import type { IFluidHandle } from "@fluidframework/core-interfaces/internal";
7
9
  /**
8
- * Used to read a Jsonable tree for testing and benchmarking.
10
+ * Used to read generic json compatible data as a tree in the JSON domain.
11
+ * The returned tree will have a schema in the json domain as defined by {@link jsonRoot}.
9
12
  *
10
13
  * @returns an {@link ITreeCursorSynchronous} for a single {@link JsonCompatible}.
11
14
  */
@@ -15,4 +18,35 @@ export declare function singleJsonCursor(root: JsonCompatible): ITreeCursorSynch
15
18
  * Assumes that ITreeCursor contains only unaugmented JsonTypes.
16
19
  */
17
20
  export declare function cursorToJsonObject(reader: ITreeCursor): JsonCompatible;
21
+ /** Used to construct a {@link TypedJsonCursor} */
22
+ export interface TypedJsonCompatibleObject {
23
+ [key: string]: TypedJsonCompatible;
24
+ [typedJsonSymbol]: string | TreeNodeSchemaBase;
25
+ }
26
+ /** Used to construct a {@link TypedJsonCursor} */
27
+ export type TypedJsonCompatible = JsonCompatible | TypedJsonCompatibleObject | TypedJsonCompatible[] | IFluidHandle | JsonCompatible;
28
+ declare const typedJsonSymbol: unique symbol;
29
+ /**
30
+ * A variant of {@link singleJsonCursor} which allows types to be provided for nodes.
31
+ *
32
+ * @remarks Types are optional, but if present will be used to derive the type of the node when the cursor is read.
33
+ *
34
+ * This cursor differs from singleJsonCursor in that it inlines arrays, (arrays are not boxed into an "array node" but are directly interpreted as sequence fields).
35
+ *
36
+ * It also allows Fluid handles as input.
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const cursor = typedJsonCursor({
41
+ * [typedJsonCursor.type]: Point,
42
+ * x: 3,
43
+ * y: 42
44
+ * });
45
+ * ```
46
+ */
47
+ declare const singleTypedJsonCursor: {
48
+ (root: TypedJsonCompatible): ITreeCursorSynchronous;
49
+ type: typeof typedJsonSymbol;
50
+ };
51
+ export { singleTypedJsonCursor as typedJsonCursor };
18
52
  //# sourceMappingURL=jsonCursor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jsonCursor.d.ts","sourceRoot":"","sources":["../../../src/domains/json/jsonCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAGN,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAG3B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,cA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