@fluidframework/tree 2.91.0 → 2.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (866) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/api-report/tree.alpha.api.md +60 -22
  3. package/dist/api.d.ts +6 -1
  4. package/dist/api.d.ts.map +1 -1
  5. package/dist/api.js.map +1 -1
  6. package/dist/codec/codec.d.ts +28 -2
  7. package/dist/codec/codec.d.ts.map +1 -1
  8. package/dist/codec/codec.js +1 -0
  9. package/dist/codec/codec.js.map +1 -1
  10. package/dist/codec/index.d.ts +2 -2
  11. package/dist/codec/index.d.ts.map +1 -1
  12. package/dist/codec/index.js +2 -4
  13. package/dist/codec/index.js.map +1 -1
  14. package/dist/codec/versioned/codec.d.ts +18 -36
  15. package/dist/codec/versioned/codec.d.ts.map +1 -1
  16. package/dist/codec/versioned/codec.js +46 -59
  17. package/dist/codec/versioned/codec.js.map +1 -1
  18. package/dist/codec/versioned/index.d.ts +1 -1
  19. package/dist/codec/versioned/index.d.ts.map +1 -1
  20. package/dist/codec/versioned/index.js +2 -4
  21. package/dist/codec/versioned/index.js.map +1 -1
  22. package/dist/core/forest/forest.d.ts +5 -2
  23. package/dist/core/forest/forest.d.ts.map +1 -1
  24. package/dist/core/forest/forest.js.map +1 -1
  25. package/dist/core/index.d.ts +1 -1
  26. package/dist/core/index.d.ts.map +1 -1
  27. package/dist/core/index.js +6 -2
  28. package/dist/core/index.js.map +1 -1
  29. package/dist/core/rebase/changeRebaser.d.ts +8 -1
  30. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  31. package/dist/core/rebase/changeRebaser.js.map +1 -1
  32. package/dist/core/rebase/revisionTagCodec.d.ts +4 -3
  33. package/dist/core/rebase/revisionTagCodec.d.ts.map +1 -1
  34. package/dist/core/rebase/revisionTagCodec.js +2 -0
  35. package/dist/core/rebase/revisionTagCodec.js.map +1 -1
  36. package/dist/core/rebase/utils.d.ts +2 -2
  37. package/dist/core/rebase/utils.d.ts.map +1 -1
  38. package/dist/core/rebase/utils.js +4 -4
  39. package/dist/core/rebase/utils.js.map +1 -1
  40. package/dist/core/schema-stored/formatV2.d.ts +1 -1
  41. package/dist/core/schema-stored/formatV2.js +1 -1
  42. package/dist/core/schema-stored/formatV2.js.map +1 -1
  43. package/dist/core/tree/anchorSet.d.ts +8 -0
  44. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  45. package/dist/core/tree/anchorSet.js +42 -7
  46. package/dist/core/tree/anchorSet.js.map +1 -1
  47. package/dist/core/tree/cursor.d.ts +25 -1
  48. package/dist/core/tree/cursor.d.ts.map +1 -1
  49. package/dist/core/tree/cursor.js +45 -1
  50. package/dist/core/tree/cursor.js.map +1 -1
  51. package/dist/core/tree/deltaUtil.d.ts +13 -1
  52. package/dist/core/tree/deltaUtil.d.ts.map +1 -1
  53. package/dist/core/tree/deltaUtil.js +34 -1
  54. package/dist/core/tree/deltaUtil.js.map +1 -1
  55. package/dist/core/tree/detachedFieldIndexCodecs.d.ts +5 -5
  56. package/dist/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  57. package/dist/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  58. package/dist/core/tree/index.d.ts +2 -2
  59. package/dist/core/tree/index.d.ts.map +1 -1
  60. package/dist/core/tree/index.js +6 -2
  61. package/dist/core/tree/index.js.map +1 -1
  62. package/dist/core/tree/visitDelta.d.ts +11 -0
  63. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  64. package/dist/core/tree/visitDelta.js +1 -1
  65. package/dist/core/tree/visitDelta.js.map +1 -1
  66. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  67. package/dist/core/tree/visitorUtils.js +5 -0
  68. package/dist/core/tree/visitorUtils.js.map +1 -1
  69. package/dist/entrypoints/alpha.d.ts +1 -1
  70. package/dist/entrypoints/alpha.d.ts.map +1 -1
  71. package/dist/entrypoints/alpha.js +2 -3
  72. package/dist/entrypoints/alpha.js.map +1 -1
  73. package/dist/entrypoints/beta.js +1 -1
  74. package/dist/entrypoints/beta.js.map +1 -1
  75. package/dist/entrypoints/legacy.d.ts +1 -1
  76. package/dist/entrypoints/legacy.d.ts.map +1 -1
  77. package/dist/entrypoints/legacy.js +1 -1
  78. package/dist/entrypoints/legacy.js.map +1 -1
  79. package/dist/entrypoints/public.js +1 -1
  80. package/dist/entrypoints/public.js.map +1 -1
  81. package/dist/feature-libraries/changeAtomIdCodec.d.ts +4 -3
  82. package/dist/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
  83. package/dist/feature-libraries/changeAtomIdCodec.js +2 -0
  84. package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
  85. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -1
  86. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  87. package/dist/feature-libraries/chunked-forest/chunkedForest.js +2 -2
  88. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  89. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +4 -4
  90. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  91. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +6 -6
  92. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  93. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
  94. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  95. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  96. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -2
  97. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  98. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  99. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -4
  100. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  101. package/dist/feature-libraries/chunked-forest/codec/codecs.js +6 -6
  102. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  103. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +12 -12
  104. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  105. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +3 -3
  106. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  107. package/dist/feature-libraries/chunked-forest/codec/{formatGeneric.d.ts → format/formatGeneric.d.ts} +1 -1
  108. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -0
  109. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -0
  110. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +187 -0
  111. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -0
  112. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js +115 -0
  113. package/dist/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -0
  114. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +33 -0
  115. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -0
  116. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js +16 -0
  117. package/dist/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -0
  118. package/dist/feature-libraries/chunked-forest/codec/format/index.d.ts +10 -0
  119. package/dist/feature-libraries/chunked-forest/codec/format/index.d.ts.map +1 -0
  120. package/dist/feature-libraries/chunked-forest/codec/format/index.js +18 -0
  121. package/dist/feature-libraries/chunked-forest/codec/format/index.js.map +1 -0
  122. package/dist/feature-libraries/chunked-forest/codec/format/versions.d.ts +93 -0
  123. package/dist/feature-libraries/chunked-forest/codec/format/versions.d.ts.map +1 -0
  124. package/dist/feature-libraries/chunked-forest/codec/format/versions.js +29 -0
  125. package/dist/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -0
  126. package/dist/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
  127. package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  128. package/dist/feature-libraries/chunked-forest/codec/index.js +2 -2
  129. package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  130. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +7 -7
  131. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  132. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  133. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  134. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  135. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +6 -4
  136. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  137. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +1 -1
  138. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  139. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +3 -3
  140. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  141. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
  142. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  143. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  144. package/dist/feature-libraries/cursorComparator.d.ts +23 -0
  145. package/dist/feature-libraries/cursorComparator.d.ts.map +1 -0
  146. package/dist/feature-libraries/cursorComparator.js +65 -0
  147. package/dist/feature-libraries/cursorComparator.js.map +1 -0
  148. package/dist/feature-libraries/forest-summary/codec.d.ts +1 -1
  149. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +3 -3
  150. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  151. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  152. package/dist/feature-libraries/index.d.ts +3 -2
  153. package/dist/feature-libraries/index.d.ts.map +1 -1
  154. package/dist/feature-libraries/index.js +5 -5
  155. package/dist/feature-libraries/index.js.map +1 -1
  156. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -0
  157. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  158. package/dist/feature-libraries/indexing/anchorTreeIndex.js +12 -7
  159. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  160. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  161. package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
  162. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  163. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +3 -3
  164. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  165. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  166. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  167. package/dist/feature-libraries/modular-schema/genericFieldKind.js +0 -1
  168. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  169. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +10 -10
  170. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  171. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +2 -4
  172. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  173. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +3 -3
  174. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  175. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  176. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +3 -3
  177. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  178. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  179. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -1
  180. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  181. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +4 -3
  182. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  183. package/dist/feature-libraries/object-forest/objectForest.d.ts +1 -1
  184. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  185. package/dist/feature-libraries/object-forest/objectForest.js +2 -2
  186. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  187. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +4 -4
  188. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  189. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  190. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts +3 -3
  191. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  192. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  193. package/dist/feature-libraries/schema-edits/index.d.ts +1 -1
  194. package/dist/feature-libraries/schema-edits/index.d.ts.map +1 -1
  195. package/dist/feature-libraries/schema-edits/index.js +2 -3
  196. package/dist/feature-libraries/schema-edits/index.js.map +1 -1
  197. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -15
  198. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  199. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +8 -54
  200. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  201. package/dist/feature-libraries/schema-index/codec.d.ts +3 -16
  202. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  203. package/dist/feature-libraries/schema-index/codec.js +1 -21
  204. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  205. package/dist/feature-libraries/schema-index/formatV2.d.ts +1 -1
  206. package/dist/feature-libraries/schema-index/formatV2.js +1 -1
  207. package/dist/feature-libraries/schema-index/formatV2.js.map +1 -1
  208. package/dist/feature-libraries/schema-index/index.d.ts +1 -1
  209. package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
  210. package/dist/feature-libraries/schema-index/index.js +1 -2
  211. package/dist/feature-libraries/schema-index/index.js.map +1 -1
  212. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -4
  213. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  214. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  215. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +3 -3
  216. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  217. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  218. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +3 -3
  219. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  220. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  221. package/dist/index.d.ts +2 -2
  222. package/dist/index.d.ts.map +1 -1
  223. package/dist/index.js +2 -3
  224. package/dist/index.js.map +1 -1
  225. package/dist/packageVersion.d.ts +1 -1
  226. package/dist/packageVersion.js +1 -1
  227. package/dist/packageVersion.js.map +1 -1
  228. package/dist/shared-tree/independentView.d.ts +1 -1
  229. package/dist/shared-tree/independentView.d.ts.map +1 -1
  230. package/dist/shared-tree/independentView.js +14 -21
  231. package/dist/shared-tree/independentView.js.map +1 -1
  232. package/dist/shared-tree/index.d.ts +2 -2
  233. package/dist/shared-tree/index.d.ts.map +1 -1
  234. package/dist/shared-tree/index.js +1 -2
  235. package/dist/shared-tree/index.js.map +1 -1
  236. package/dist/shared-tree/schematizingTreeView.d.ts +2 -36
  237. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  238. package/dist/shared-tree/schematizingTreeView.js +15 -117
  239. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  240. package/dist/shared-tree/sharedTree.d.ts +3 -22
  241. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  242. package/dist/shared-tree/sharedTree.js +10 -27
  243. package/dist/shared-tree/sharedTree.js.map +1 -1
  244. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +3 -2
  245. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  246. package/dist/shared-tree/sharedTreeChangeCodecs.js +23 -16
  247. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  248. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  249. package/dist/shared-tree/sharedTreeChangeEnricher.js +1 -1
  250. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  251. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  252. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  253. package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
  254. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  255. package/dist/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
  256. package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  257. package/dist/shared-tree/sharedTreeChangeFormat.js +13 -5
  258. package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  259. package/dist/shared-tree/tree.d.ts.map +1 -1
  260. package/dist/shared-tree/tree.js +2 -1
  261. package/dist/shared-tree/tree.js.map +1 -1
  262. package/dist/shared-tree/treeAlpha.d.ts +13 -1
  263. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  264. package/dist/shared-tree/treeAlpha.js +3 -0
  265. package/dist/shared-tree/treeAlpha.js.map +1 -1
  266. package/dist/shared-tree/treeCheckout.d.ts +34 -69
  267. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  268. package/dist/shared-tree/treeCheckout.js +885 -678
  269. package/dist/shared-tree/treeCheckout.js.map +1 -1
  270. package/dist/shared-tree/unhydratedTreeContext.js +3 -3
  271. package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
  272. package/dist/shared-tree-core/editManagerCodecs.d.ts +23 -12
  273. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  274. package/dist/shared-tree-core/editManagerCodecs.js +40 -67
  275. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  276. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  277. package/dist/shared-tree-core/editManagerCodecsCommons.js +0 -1
  278. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  279. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +10 -2
  280. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  281. package/dist/shared-tree-core/editManagerCodecsV1toV4.js +18 -13
  282. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  283. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +2 -2
  284. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  285. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +6 -9
  286. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  287. package/dist/shared-tree-core/index.d.ts +3 -3
  288. package/dist/shared-tree-core/index.d.ts.map +1 -1
  289. package/dist/shared-tree-core/index.js +5 -8
  290. package/dist/shared-tree-core/index.js.map +1 -1
  291. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -3
  292. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  293. package/dist/shared-tree-core/messageCodecV1ToV4.js +8 -8
  294. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  295. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts +2 -3
  296. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  297. package/dist/shared-tree-core/messageCodecVSharedBranches.js +5 -4
  298. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  299. package/dist/shared-tree-core/messageCodecs.d.ts +15 -14
  300. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  301. package/dist/shared-tree-core/messageCodecs.js +38 -74
  302. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  303. package/dist/shared-tree-core/messageFormat.d.ts +0 -1
  304. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  305. package/dist/shared-tree-core/messageFormat.js +1 -2
  306. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  307. package/dist/shared-tree-core/sharedTreeCore.d.ts +1 -3
  308. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  309. package/dist/shared-tree-core/sharedTreeCore.js +12 -2
  310. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  311. package/dist/sharedTreeAttributes.d.ts.map +1 -1
  312. package/dist/sharedTreeAttributes.js +3 -0
  313. package/dist/sharedTreeAttributes.js.map +1 -1
  314. package/dist/simple-tree/api/index.d.ts +1 -0
  315. package/dist/simple-tree/api/index.d.ts.map +1 -1
  316. package/dist/simple-tree/api/index.js.map +1 -1
  317. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  318. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  319. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +2 -2
  320. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  321. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  322. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  323. package/dist/simple-tree/api/storedSchema.js +6 -6
  324. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  325. package/dist/simple-tree/api/tree.d.ts +7 -19
  326. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  327. package/dist/simple-tree/api/tree.js.map +1 -1
  328. package/dist/simple-tree/api/treeAlpha.d.ts +69 -0
  329. package/dist/simple-tree/api/treeAlpha.d.ts.map +1 -0
  330. package/dist/simple-tree/api/treeAlpha.js +7 -0
  331. package/dist/simple-tree/api/treeAlpha.js.map +1 -0
  332. package/dist/simple-tree/api/treeBeta.d.ts +1 -1
  333. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  334. package/dist/simple-tree/api/treeChangeEvents.d.ts +3 -0
  335. package/dist/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
  336. package/dist/simple-tree/api/treeChangeEvents.js.map +1 -1
  337. package/dist/simple-tree/api/treeNodeApi.d.ts +49 -0
  338. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  339. package/dist/simple-tree/api/treeNodeApi.js +41 -2
  340. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  341. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  342. package/dist/simple-tree/core/treeNodeKernel.js +45 -8
  343. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  344. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  345. package/dist/simple-tree/core/unhydratedFlexTree.js +5 -1
  346. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  347. package/dist/simple-tree/index.d.ts +2 -2
  348. package/dist/simple-tree/index.d.ts.map +1 -1
  349. package/dist/simple-tree/index.js.map +1 -1
  350. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +16 -0
  351. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  352. package/dist/simple-tree/node-kinds/array/arrayNode.js +23 -0
  353. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  354. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +10 -1
  355. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  356. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  357. package/dist/simple-tree/node-kinds/array/index.d.ts +2 -2
  358. package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -1
  359. package/dist/simple-tree/node-kinds/array/index.js.map +1 -1
  360. package/dist/simple-tree/node-kinds/index.d.ts +1 -1
  361. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -1
  362. package/dist/simple-tree/node-kinds/index.js.map +1 -1
  363. package/dist/text/textDomainFormatted.d.ts +319 -9
  364. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  365. package/dist/text/textDomainFormatted.js +100 -25
  366. package/dist/text/textDomainFormatted.js.map +1 -1
  367. package/dist/treeFactory.d.ts.map +1 -1
  368. package/dist/treeFactory.js +5 -2
  369. package/dist/treeFactory.js.map +1 -1
  370. package/dist/util/referenceCounting.d.ts.map +1 -1
  371. package/dist/util/referenceCounting.js +0 -1
  372. package/dist/util/referenceCounting.js.map +1 -1
  373. package/legacy.d.ts +2 -3
  374. package/lib/api.d.ts +6 -1
  375. package/lib/api.d.ts.map +1 -1
  376. package/lib/api.js.map +1 -1
  377. package/lib/codec/codec.d.ts +28 -2
  378. package/lib/codec/codec.d.ts.map +1 -1
  379. package/lib/codec/codec.js +1 -0
  380. package/lib/codec/codec.js.map +1 -1
  381. package/lib/codec/index.d.ts +2 -2
  382. package/lib/codec/index.d.ts.map +1 -1
  383. package/lib/codec/index.js +1 -1
  384. package/lib/codec/index.js.map +1 -1
  385. package/lib/codec/versioned/codec.d.ts +18 -36
  386. package/lib/codec/versioned/codec.d.ts.map +1 -1
  387. package/lib/codec/versioned/codec.js +45 -56
  388. package/lib/codec/versioned/codec.js.map +1 -1
  389. package/lib/codec/versioned/index.d.ts +1 -1
  390. package/lib/codec/versioned/index.d.ts.map +1 -1
  391. package/lib/codec/versioned/index.js +1 -1
  392. package/lib/codec/versioned/index.js.map +1 -1
  393. package/lib/core/forest/forest.d.ts +5 -2
  394. package/lib/core/forest/forest.d.ts.map +1 -1
  395. package/lib/core/forest/forest.js.map +1 -1
  396. package/lib/core/index.d.ts +1 -1
  397. package/lib/core/index.d.ts.map +1 -1
  398. package/lib/core/index.js +1 -1
  399. package/lib/core/index.js.map +1 -1
  400. package/lib/core/rebase/changeRebaser.d.ts +8 -1
  401. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  402. package/lib/core/rebase/changeRebaser.js.map +1 -1
  403. package/lib/core/rebase/revisionTagCodec.d.ts +4 -3
  404. package/lib/core/rebase/revisionTagCodec.d.ts.map +1 -1
  405. package/lib/core/rebase/revisionTagCodec.js +2 -0
  406. package/lib/core/rebase/revisionTagCodec.js.map +1 -1
  407. package/lib/core/rebase/utils.d.ts +2 -2
  408. package/lib/core/rebase/utils.d.ts.map +1 -1
  409. package/lib/core/rebase/utils.js +4 -4
  410. package/lib/core/rebase/utils.js.map +1 -1
  411. package/lib/core/schema-stored/formatV2.d.ts +1 -1
  412. package/lib/core/schema-stored/formatV2.js +1 -1
  413. package/lib/core/schema-stored/formatV2.js.map +1 -1
  414. package/lib/core/tree/anchorSet.d.ts +8 -0
  415. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  416. package/lib/core/tree/anchorSet.js +42 -7
  417. package/lib/core/tree/anchorSet.js.map +1 -1
  418. package/lib/core/tree/cursor.d.ts +25 -1
  419. package/lib/core/tree/cursor.d.ts.map +1 -1
  420. package/lib/core/tree/cursor.js +43 -0
  421. package/lib/core/tree/cursor.js.map +1 -1
  422. package/lib/core/tree/deltaUtil.d.ts +13 -1
  423. package/lib/core/tree/deltaUtil.d.ts.map +1 -1
  424. package/lib/core/tree/deltaUtil.js +31 -0
  425. package/lib/core/tree/deltaUtil.js.map +1 -1
  426. package/lib/core/tree/detachedFieldIndexCodecs.d.ts +5 -5
  427. package/lib/core/tree/detachedFieldIndexCodecs.d.ts.map +1 -1
  428. package/lib/core/tree/detachedFieldIndexCodecs.js.map +1 -1
  429. package/lib/core/tree/index.d.ts +2 -2
  430. package/lib/core/tree/index.d.ts.map +1 -1
  431. package/lib/core/tree/index.js +2 -2
  432. package/lib/core/tree/index.js.map +1 -1
  433. package/lib/core/tree/visitDelta.d.ts +11 -0
  434. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  435. package/lib/core/tree/visitDelta.js +1 -1
  436. package/lib/core/tree/visitDelta.js.map +1 -1
  437. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  438. package/lib/core/tree/visitorUtils.js +5 -0
  439. package/lib/core/tree/visitorUtils.js.map +1 -1
  440. package/lib/entrypoints/alpha.d.ts +1 -1
  441. package/lib/entrypoints/alpha.d.ts.map +1 -1
  442. package/lib/entrypoints/alpha.js +2 -2
  443. package/lib/entrypoints/alpha.js.map +1 -1
  444. package/lib/entrypoints/beta.js +1 -1
  445. package/lib/entrypoints/beta.js.map +1 -1
  446. package/lib/entrypoints/legacy.d.ts +1 -1
  447. package/lib/entrypoints/legacy.d.ts.map +1 -1
  448. package/lib/entrypoints/legacy.js +1 -1
  449. package/lib/entrypoints/legacy.js.map +1 -1
  450. package/lib/entrypoints/public.js +1 -1
  451. package/lib/entrypoints/public.js.map +1 -1
  452. package/lib/feature-libraries/changeAtomIdCodec.d.ts +4 -3
  453. package/lib/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
  454. package/lib/feature-libraries/changeAtomIdCodec.js +2 -0
  455. package/lib/feature-libraries/changeAtomIdCodec.js.map +1 -1
  456. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -1
  457. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  458. package/lib/feature-libraries/chunked-forest/chunkedForest.js +2 -2
  459. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  460. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +4 -4
  461. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  462. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +4 -4
  463. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  464. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
  465. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  466. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  467. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -2
  468. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  469. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  470. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +4 -4
  471. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  472. package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  473. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  474. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +12 -12
  475. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  476. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +1 -1
  477. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  478. package/lib/feature-libraries/chunked-forest/codec/{formatGeneric.d.ts → format/formatGeneric.d.ts} +1 -1
  479. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -0
  480. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.js.map +1 -0
  481. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts +187 -0
  482. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.d.ts.map +1 -0
  483. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js +112 -0
  484. package/lib/feature-libraries/chunked-forest/codec/format/formatV1.js.map +1 -0
  485. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts +33 -0
  486. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.d.ts.map +1 -0
  487. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js +13 -0
  488. package/lib/feature-libraries/chunked-forest/codec/format/formatV2.js.map +1 -0
  489. package/lib/feature-libraries/chunked-forest/codec/format/index.d.ts +10 -0
  490. package/lib/feature-libraries/chunked-forest/codec/format/index.d.ts.map +1 -0
  491. package/lib/feature-libraries/chunked-forest/codec/format/index.js +8 -0
  492. package/lib/feature-libraries/chunked-forest/codec/format/index.js.map +1 -0
  493. package/lib/feature-libraries/chunked-forest/codec/format/versions.d.ts +93 -0
  494. package/lib/feature-libraries/chunked-forest/codec/format/versions.d.ts.map +1 -0
  495. package/lib/feature-libraries/chunked-forest/codec/format/versions.js +26 -0
  496. package/lib/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -0
  497. package/lib/feature-libraries/chunked-forest/codec/index.d.ts +2 -2
  498. package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  499. package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
  500. package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  501. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +7 -7
  502. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  503. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  504. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  505. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  506. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +4 -2
  507. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  508. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +1 -1
  509. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  510. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +1 -1
  511. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  512. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
  513. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  514. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  515. package/lib/feature-libraries/cursorComparator.d.ts +23 -0
  516. package/lib/feature-libraries/cursorComparator.d.ts.map +1 -0
  517. package/lib/feature-libraries/cursorComparator.js +61 -0
  518. package/lib/feature-libraries/cursorComparator.js.map +1 -0
  519. package/lib/feature-libraries/forest-summary/codec.d.ts +1 -1
  520. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +3 -3
  521. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  522. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  523. package/lib/feature-libraries/index.d.ts +3 -2
  524. package/lib/feature-libraries/index.d.ts.map +1 -1
  525. package/lib/feature-libraries/index.js +3 -2
  526. package/lib/feature-libraries/index.js.map +1 -1
  527. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -0
  528. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  529. package/lib/feature-libraries/indexing/anchorTreeIndex.js +12 -7
  530. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  531. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  532. package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
  533. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  534. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +3 -3
  535. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  536. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  537. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  538. package/lib/feature-libraries/modular-schema/genericFieldKind.js +0 -1
  539. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  540. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +10 -10
  541. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  542. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +2 -4
  543. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  544. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +3 -3
  545. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  546. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  547. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +3 -3
  548. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  549. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  550. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -1
  551. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  552. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +4 -3
  553. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  554. package/lib/feature-libraries/object-forest/objectForest.d.ts +1 -1
  555. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  556. package/lib/feature-libraries/object-forest/objectForest.js +2 -2
  557. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  558. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +4 -4
  559. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  560. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +1 -1
  561. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  562. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts +3 -3
  563. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  564. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  565. package/lib/feature-libraries/schema-edits/index.d.ts +1 -1
  566. package/lib/feature-libraries/schema-edits/index.d.ts.map +1 -1
  567. package/lib/feature-libraries/schema-edits/index.js +1 -1
  568. package/lib/feature-libraries/schema-edits/index.js.map +1 -1
  569. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +6 -15
  570. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  571. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +6 -50
  572. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  573. package/lib/feature-libraries/schema-index/codec.d.ts +3 -16
  574. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  575. package/lib/feature-libraries/schema-index/codec.js +0 -19
  576. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  577. package/lib/feature-libraries/schema-index/formatV2.d.ts +1 -1
  578. package/lib/feature-libraries/schema-index/formatV2.js +1 -1
  579. package/lib/feature-libraries/schema-index/formatV2.js.map +1 -1
  580. package/lib/feature-libraries/schema-index/index.d.ts +1 -1
  581. package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
  582. package/lib/feature-libraries/schema-index/index.js +1 -1
  583. package/lib/feature-libraries/schema-index/index.js.map +1 -1
  584. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -4
  585. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  586. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  587. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +3 -3
  588. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  589. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +1 -1
  590. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  591. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +3 -3
  592. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  593. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  594. package/lib/index.d.ts +2 -2
  595. package/lib/index.d.ts.map +1 -1
  596. package/lib/index.js +1 -1
  597. package/lib/index.js.map +1 -1
  598. package/lib/packageVersion.d.ts +1 -1
  599. package/lib/packageVersion.js +1 -1
  600. package/lib/packageVersion.js.map +1 -1
  601. package/lib/shared-tree/independentView.d.ts +1 -1
  602. package/lib/shared-tree/independentView.d.ts.map +1 -1
  603. package/lib/shared-tree/independentView.js +4 -11
  604. package/lib/shared-tree/independentView.js.map +1 -1
  605. package/lib/shared-tree/index.d.ts +2 -2
  606. package/lib/shared-tree/index.d.ts.map +1 -1
  607. package/lib/shared-tree/index.js +1 -1
  608. package/lib/shared-tree/index.js.map +1 -1
  609. package/lib/shared-tree/schematizingTreeView.d.ts +2 -36
  610. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  611. package/lib/shared-tree/schematizingTreeView.js +17 -116
  612. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  613. package/lib/shared-tree/sharedTree.d.ts +3 -22
  614. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  615. package/lib/shared-tree/sharedTree.js +11 -27
  616. package/lib/shared-tree/sharedTree.js.map +1 -1
  617. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +3 -2
  618. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  619. package/lib/shared-tree/sharedTreeChangeCodecs.js +19 -12
  620. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  621. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  622. package/lib/shared-tree/sharedTreeChangeEnricher.js +2 -2
  623. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  624. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  625. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  626. package/lib/shared-tree/sharedTreeChangeFamily.js +2 -2
  627. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  628. package/lib/shared-tree/sharedTreeChangeFormat.d.ts +8 -7
  629. package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  630. package/lib/shared-tree/sharedTreeChangeFormat.js +11 -5
  631. package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  632. package/lib/shared-tree/tree.d.ts.map +1 -1
  633. package/lib/shared-tree/tree.js +2 -1
  634. package/lib/shared-tree/tree.js.map +1 -1
  635. package/lib/shared-tree/treeAlpha.d.ts +13 -1
  636. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  637. package/lib/shared-tree/treeAlpha.js +3 -0
  638. package/lib/shared-tree/treeAlpha.js.map +1 -1
  639. package/lib/shared-tree/treeCheckout.d.ts +34 -69
  640. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  641. package/lib/shared-tree/treeCheckout.js +889 -683
  642. package/lib/shared-tree/treeCheckout.js.map +1 -1
  643. package/lib/shared-tree/unhydratedTreeContext.js +1 -1
  644. package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
  645. package/lib/shared-tree-core/editManagerCodecs.d.ts +23 -12
  646. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  647. package/lib/shared-tree-core/editManagerCodecs.js +41 -65
  648. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  649. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  650. package/lib/shared-tree-core/editManagerCodecsCommons.js +0 -1
  651. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  652. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +10 -2
  653. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  654. package/lib/shared-tree-core/editManagerCodecsV1toV4.js +16 -11
  655. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  656. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +2 -2
  657. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  658. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +5 -8
  659. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  660. package/lib/shared-tree-core/index.d.ts +3 -3
  661. package/lib/shared-tree-core/index.d.ts.map +1 -1
  662. package/lib/shared-tree-core/index.js +3 -3
  663. package/lib/shared-tree-core/index.js.map +1 -1
  664. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -3
  665. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  666. package/lib/shared-tree-core/messageCodecV1ToV4.js +8 -8
  667. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  668. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts +2 -3
  669. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  670. package/lib/shared-tree-core/messageCodecVSharedBranches.js +5 -4
  671. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  672. package/lib/shared-tree-core/messageCodecs.d.ts +15 -14
  673. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  674. package/lib/shared-tree-core/messageCodecs.js +38 -71
  675. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  676. package/lib/shared-tree-core/messageFormat.d.ts +0 -1
  677. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  678. package/lib/shared-tree-core/messageFormat.js +0 -1
  679. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  680. package/lib/shared-tree-core/sharedTreeCore.d.ts +1 -3
  681. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  682. package/lib/shared-tree-core/sharedTreeCore.js +14 -4
  683. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  684. package/lib/sharedTreeAttributes.d.ts.map +1 -1
  685. package/lib/sharedTreeAttributes.js +3 -0
  686. package/lib/sharedTreeAttributes.js.map +1 -1
  687. package/lib/simple-tree/api/index.d.ts +1 -0
  688. package/lib/simple-tree/api/index.d.ts.map +1 -1
  689. package/lib/simple-tree/api/index.js.map +1 -1
  690. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  691. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  692. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +2 -2
  693. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  694. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  695. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  696. package/lib/simple-tree/api/storedSchema.js +7 -7
  697. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  698. package/lib/simple-tree/api/tree.d.ts +7 -19
  699. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  700. package/lib/simple-tree/api/tree.js.map +1 -1
  701. package/lib/simple-tree/api/treeAlpha.d.ts +69 -0
  702. package/lib/simple-tree/api/treeAlpha.d.ts.map +1 -0
  703. package/lib/simple-tree/api/treeAlpha.js +6 -0
  704. package/lib/simple-tree/api/treeAlpha.js.map +1 -0
  705. package/lib/simple-tree/api/treeBeta.d.ts +1 -1
  706. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  707. package/lib/simple-tree/api/treeChangeEvents.d.ts +3 -0
  708. package/lib/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
  709. package/lib/simple-tree/api/treeChangeEvents.js.map +1 -1
  710. package/lib/simple-tree/api/treeNodeApi.d.ts +49 -0
  711. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  712. package/lib/simple-tree/api/treeNodeApi.js +41 -2
  713. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  714. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  715. package/lib/simple-tree/core/treeNodeKernel.js +45 -8
  716. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  717. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  718. package/lib/simple-tree/core/unhydratedFlexTree.js +5 -1
  719. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  720. package/lib/simple-tree/index.d.ts +2 -2
  721. package/lib/simple-tree/index.d.ts.map +1 -1
  722. package/lib/simple-tree/index.js.map +1 -1
  723. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +16 -0
  724. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  725. package/lib/simple-tree/node-kinds/array/arrayNode.js +23 -0
  726. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  727. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +10 -1
  728. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  729. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  730. package/lib/simple-tree/node-kinds/array/index.d.ts +2 -2
  731. package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -1
  732. package/lib/simple-tree/node-kinds/array/index.js.map +1 -1
  733. package/lib/simple-tree/node-kinds/index.d.ts +1 -1
  734. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -1
  735. package/lib/simple-tree/node-kinds/index.js.map +1 -1
  736. package/lib/text/textDomainFormatted.d.ts +319 -9
  737. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  738. package/lib/text/textDomainFormatted.js +103 -28
  739. package/lib/text/textDomainFormatted.js.map +1 -1
  740. package/lib/treeFactory.d.ts.map +1 -1
  741. package/lib/treeFactory.js +6 -3
  742. package/lib/treeFactory.js.map +1 -1
  743. package/lib/util/referenceCounting.d.ts.map +1 -1
  744. package/lib/util/referenceCounting.js +0 -1
  745. package/lib/util/referenceCounting.js.map +1 -1
  746. package/package.json +27 -27
  747. package/scripts/generate-entrypoint-sources.sh +4 -2
  748. package/src/api.ts +11 -0
  749. package/src/codec/codec.ts +32 -2
  750. package/src/codec/index.ts +2 -3
  751. package/src/codec/versioned/codec.ts +99 -109
  752. package/src/codec/versioned/index.ts +1 -3
  753. package/src/core/forest/forest.ts +5 -2
  754. package/src/core/index.ts +4 -0
  755. package/src/core/rebase/changeRebaser.ts +8 -0
  756. package/src/core/rebase/revisionTagCodec.ts +4 -4
  757. package/src/core/rebase/utils.ts +9 -2
  758. package/src/core/schema-stored/formatV2.ts +1 -1
  759. package/src/core/tree/anchorSet.ts +67 -10
  760. package/src/core/tree/cursor.ts +52 -1
  761. package/src/core/tree/deltaUtil.ts +37 -1
  762. package/src/core/tree/detachedFieldIndexCodecs.ts +4 -4
  763. package/src/core/tree/index.ts +4 -0
  764. package/src/core/tree/visitDelta.ts +13 -1
  765. package/src/core/tree/visitorUtils.ts +5 -0
  766. package/src/entrypoints/alpha.ts +13 -6
  767. package/src/entrypoints/beta.ts +2 -2
  768. package/src/entrypoints/legacy.ts +11 -3
  769. package/src/entrypoints/public.ts +1 -1
  770. package/src/feature-libraries/changeAtomIdCodec.ts +8 -7
  771. package/src/feature-libraries/chunked-forest/chunkedForest.ts +3 -2
  772. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +18 -13
  773. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -1
  774. package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -2
  775. package/src/feature-libraries/chunked-forest/codec/codecs.ts +16 -10
  776. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +16 -14
  777. package/src/feature-libraries/chunked-forest/codec/{formatGeneric.ts → format/formatGeneric.ts} +1 -1
  778. package/src/feature-libraries/chunked-forest/codec/{format.ts → format/formatV1.ts} +41 -111
  779. package/src/feature-libraries/chunked-forest/codec/format/formatV2.ts +31 -0
  780. package/src/feature-libraries/chunked-forest/codec/format/index.ts +31 -0
  781. package/src/feature-libraries/chunked-forest/codec/format/versions.ts +81 -0
  782. package/src/feature-libraries/chunked-forest/codec/index.ts +6 -2
  783. package/src/feature-libraries/chunked-forest/codec/nodeEncoder.ts +19 -12
  784. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +6 -4
  785. package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +10 -10
  786. package/src/feature-libraries/chunked-forest/index.ts +2 -1
  787. package/src/feature-libraries/cursorComparator.ts +77 -0
  788. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +5 -5
  789. package/src/feature-libraries/index.ts +5 -3
  790. package/src/feature-libraries/indexing/anchorTreeIndex.ts +20 -10
  791. package/src/feature-libraries/mitigatedChangeFamily.ts +4 -1
  792. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +4 -5
  793. package/src/feature-libraries/modular-schema/genericFieldKind.ts +0 -1
  794. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +19 -26
  795. package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +4 -4
  796. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +4 -5
  797. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +6 -2
  798. package/src/feature-libraries/object-forest/objectForest.ts +8 -2
  799. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +11 -13
  800. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +4 -5
  801. package/src/feature-libraries/schema-edits/index.ts +1 -4
  802. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +10 -78
  803. package/src/feature-libraries/schema-index/codec.ts +0 -25
  804. package/src/feature-libraries/schema-index/formatV2.ts +1 -1
  805. package/src/feature-libraries/schema-index/index.ts +1 -4
  806. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +6 -6
  807. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +8 -5
  808. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +4 -5
  809. package/src/index.ts +10 -3
  810. package/src/packageVersion.ts +1 -1
  811. package/src/shared-tree/independentView.ts +5 -18
  812. package/src/shared-tree/index.ts +0 -4
  813. package/src/shared-tree/schematizingTreeView.ts +19 -165
  814. package/src/shared-tree/sharedTree.ts +16 -59
  815. package/src/shared-tree/sharedTreeChangeCodecs.ts +23 -29
  816. package/src/shared-tree/sharedTreeChangeEnricher.ts +1 -2
  817. package/src/shared-tree/sharedTreeChangeFamily.ts +2 -0
  818. package/src/shared-tree/sharedTreeChangeFormat.ts +23 -8
  819. package/src/shared-tree/tree.ts +2 -5
  820. package/src/shared-tree/treeAlpha.ts +26 -0
  821. package/src/shared-tree/treeCheckout.ts +275 -99
  822. package/src/shared-tree/unhydratedTreeContext.ts +1 -1
  823. package/src/shared-tree-core/editManagerCodecs.ts +99 -124
  824. package/src/shared-tree-core/editManagerCodecsCommons.ts +0 -1
  825. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +54 -59
  826. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +72 -95
  827. package/src/shared-tree-core/index.ts +4 -8
  828. package/src/shared-tree-core/messageCodecV1ToV4.ts +56 -71
  829. package/src/shared-tree-core/messageCodecVSharedBranches.ts +76 -92
  830. package/src/shared-tree-core/messageCodecs.ts +88 -126
  831. package/src/shared-tree-core/messageFormat.ts +0 -3
  832. package/src/shared-tree-core/sharedTreeCore.ts +14 -21
  833. package/src/sharedTreeAttributes.ts +3 -0
  834. package/src/simple-tree/api/index.ts +10 -0
  835. package/src/simple-tree/api/schemaFactory.ts +0 -2
  836. package/src/simple-tree/api/schemaFactoryAlpha.ts +13 -2
  837. package/src/simple-tree/api/storedSchema.ts +8 -19
  838. package/src/simple-tree/api/tree.ts +7 -20
  839. package/src/simple-tree/api/treeAlpha.ts +90 -0
  840. package/src/simple-tree/api/treeBeta.ts +1 -1
  841. package/src/simple-tree/api/treeChangeEvents.ts +3 -0
  842. package/src/simple-tree/api/treeNodeApi.ts +95 -3
  843. package/src/simple-tree/core/treeNodeKernel.ts +53 -7
  844. package/src/simple-tree/core/unhydratedFlexTree.ts +5 -1
  845. package/src/simple-tree/index.ts +10 -0
  846. package/src/simple-tree/node-kinds/array/arrayNode.ts +64 -0
  847. package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +25 -1
  848. package/src/simple-tree/node-kinds/array/index.ts +2 -0
  849. package/src/simple-tree/node-kinds/index.ts +2 -0
  850. package/src/text/textDomainFormatted.ts +113 -11
  851. package/src/treeFactory.ts +10 -5
  852. package/src/util/referenceCounting.ts +0 -1
  853. package/dist/feature-libraries/chunked-forest/codec/format.d.ts +0 -383
  854. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +0 -1
  855. package/dist/feature-libraries/chunked-forest/codec/format.js +0 -191
  856. package/dist/feature-libraries/chunked-forest/codec/format.js.map +0 -1
  857. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +0 -1
  858. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +0 -1
  859. package/lib/feature-libraries/chunked-forest/codec/format.d.ts +0 -383
  860. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +0 -1
  861. package/lib/feature-libraries/chunked-forest/codec/format.js +0 -188
  862. package/lib/feature-libraries/chunked-forest/codec/format.js.map +0 -1
  863. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +0 -1
  864. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +0 -1
  865. /package/dist/feature-libraries/chunked-forest/codec/{formatGeneric.js → format/formatGeneric.js} +0 -0
  866. /package/lib/feature-libraries/chunked-forest/codec/{formatGeneric.js → format/formatGeneric.js} +0 -0
@@ -3,11 +3,23 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { TreeChunk } from "./chunk.js";
6
- import type { DetachedNodeId, Root } from "./delta.js";
6
+ import type { DetachedNodeId, FieldChanges, FieldMap, Root } from "./delta.js";
7
7
  export declare const emptyDelta: Root;
8
8
  export declare function deltaForRootInitialization(content: TreeChunk): Root;
9
9
  export declare function makeDetachedNodeId(major: DetachedNodeId["major"], minor: DetachedNodeId["minor"]): DetachedNodeId;
10
10
  export declare function offsetDetachId(id: DetachedNodeId, offset: number): DetachedNodeId;
11
11
  export declare function offsetDetachId(id: DetachedNodeId | undefined, offset: number): DetachedNodeId | undefined;
12
12
  export declare function areDetachedNodeIdsEqual(a: DetachedNodeId, b: DetachedNodeId): boolean;
13
+ /**
14
+ * Returns true if a delta field map contains any changes that would be visible in the document (eg, an insert, move, edit)
15
+ * @param fields - Delta FieldMap to check for visible changes
16
+ * @returns True if change map contains any changes that would be visible in the document, false otherwise
17
+ */
18
+ export declare function deltaFieldMapHasVisibleChanges(fields: FieldMap | undefined): boolean;
19
+ /**
20
+ * Returns true if the given field changes contains any changes that would be visible in the document (eg, an insert, move, edit)
21
+ * @param fieldChanges - Field changes to check for visible changes
22
+ * @returns True if the field changes contain any changes that would be visible in the document, false otherwise
23
+ */
24
+ export declare function deltaFieldChangesHaveVisibleChanges(fieldChanges: FieldChanges): boolean;
13
25
  //# sourceMappingURL=deltaUtil.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deltaUtil.d.ts","sourceRoot":"","sources":["../../../src/core/tree/deltaUtil.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAgB,IAAI,EAAE,MAAM,YAAY,CAAC;AAGrE,eAAO,MAAM,UAAU,EAAE,IAAS,CAAC;AAEnC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAYnE;AAED,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,EAC9B,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,GAC5B,cAAc,CAMhB;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC;AACnF,wBAAgB,cAAc,CAC7B,EAAE,EAAE,cAAc,GAAG,SAAS,EAC9B,MAAM,EAAE,MAAM,GACZ,cAAc,GAAG,SAAS,CAAC;AAc9B,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,cAAc,GAAG,OAAO,CAErF"}
1
+ {"version":3,"file":"deltaUtil.d.ts","sourceRoot":"","sources":["../../../src/core/tree/deltaUtil.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAG/E,eAAO,MAAM,UAAU,EAAE,IAAS,CAAC;AAEnC,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,SAAS,GAAG,IAAI,CAYnE;AAED,wBAAgB,kBAAkB,CACjC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,EAC9B,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,GAC5B,cAAc,CAMhB;AAED,wBAAgB,cAAc,CAAC,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAAC;AACnF,wBAAgB,cAAc,CAC7B,EAAE,EAAE,cAAc,GAAG,SAAS,EAC9B,MAAM,EAAE,MAAM,GACZ,cAAc,GAAG,SAAS,CAAC;AAc9B,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,cAAc,GAAG,OAAO,CAErF;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,OAAO,CAUpF;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAYvF"}
@@ -36,4 +36,35 @@ export function offsetDetachId(id, offset) {
36
36
  export function areDetachedNodeIdsEqual(a, b) {
37
37
  return a.major === b.major && a.minor === b.minor;
38
38
  }
39
+ /**
40
+ * Returns true if a delta field map contains any changes that would be visible in the document (eg, an insert, move, edit)
41
+ * @param fields - Delta FieldMap to check for visible changes
42
+ * @returns True if change map contains any changes that would be visible in the document, false otherwise
43
+ */
44
+ export function deltaFieldMapHasVisibleChanges(fields) {
45
+ if (fields === undefined || fields.size === 0) {
46
+ return false;
47
+ }
48
+ for (const [, fieldChanges] of fields) {
49
+ if (deltaFieldChangesHaveVisibleChanges(fieldChanges)) {
50
+ return true;
51
+ }
52
+ }
53
+ return false;
54
+ }
55
+ /**
56
+ * Returns true if the given field changes contains any changes that would be visible in the document (eg, an insert, move, edit)
57
+ * @param fieldChanges - Field changes to check for visible changes
58
+ * @returns True if the field changes contain any changes that would be visible in the document, false otherwise
59
+ */
60
+ export function deltaFieldChangesHaveVisibleChanges(fieldChanges) {
61
+ for (const mark of fieldChanges.marks) {
62
+ if (mark.attach !== undefined ||
63
+ mark.detach !== undefined ||
64
+ deltaFieldMapHasVisibleChanges(mark.fields)) {
65
+ return true;
66
+ }
67
+ }
68
+ return false;
69
+ }
39
70
  //# sourceMappingURL=deltaUtil.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"deltaUtil.js","sourceRoot":"","sources":["../../../src/core/tree/deltaUtil.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,UAAU,GAAS,EAAE,CAAC;AAEnC,MAAM,UAAU,0BAA0B,CAAC,OAAkB;IAC5D,IAAI,OAAO,CAAC,cAAc,KAAK,CAAC,EAAE,CAAC;QAClC,OAAO,UAAU,CAAC;IACnB,CAAC;IACD,MAAM,OAAO,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC7B,MAAM,KAAK,GAAS;QACnB,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;QACxC,MAAM,EAAE,IAAI,GAAG,CAAyB;YACvC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;SAC/E,CAAC;KACF,CAAC;IACF,OAAO,KAAK,CAAC;AACd,CAAC;AAED,MAAM,UAAU,kBAAkB,CACjC,KAA8B,EAC9B,KAA8B;IAE9B,MAAM,GAAG,GAA4B,EAAE,KAAK,EAAE,CAAC;IAC/C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,GAAG,CAAC,KAAK,GAAG,KAAK,CAAC;IACnB,CAAC;IACD,OAAO,GAAG,CAAC;AACZ,CAAC;AAOD,MAAM,UAAU,cAAc,CAC7B,EAA8B,EAC9B,MAAc;IAEd,IAAI,EAAE,KAAK,SAAS,EAAE,CAAC;QACtB,OAAO,SAAS,CAAC;IAClB,CAAC;IACD,OAAO;QACN,GAAG,EAAE;QACL,KAAK,EAAE,EAAE,CAAC,KAAK,GAAG,MAAM;KACxB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,CAAiB,EAAE,CAAiB;IAC3E,OAAO,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,CAAC;AACnD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Mutable } from \"../../util/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { TreeChunk } from \"./chunk.js\";\nimport type { DetachedNodeId, FieldChanges, Root } from \"./delta.js\";\nimport { rootFieldKey } from \"./types.js\";\n\nexport const emptyDelta: Root = {};\n\nexport function deltaForRootInitialization(content: TreeChunk): Root {\n\tif (content.topLevelLength === 0) {\n\t\treturn emptyDelta;\n\t}\n\tconst buildId = { minor: 0 };\n\tconst delta: Root = {\n\t\tbuild: [{ id: buildId, trees: content }],\n\t\tfields: new Map<FieldKey, FieldChanges>([\n\t\t\t[rootFieldKey, { marks: [{ count: content.topLevelLength, attach: buildId }] }],\n\t\t]),\n\t};\n\treturn delta;\n}\n\nexport function makeDetachedNodeId(\n\tmajor: DetachedNodeId[\"major\"],\n\tminor: DetachedNodeId[\"minor\"],\n): DetachedNodeId {\n\tconst out: Mutable<DetachedNodeId> = { minor };\n\tif (major !== undefined) {\n\t\tout.major = major;\n\t}\n\treturn out;\n}\n\nexport function offsetDetachId(id: DetachedNodeId, offset: number): DetachedNodeId;\nexport function offsetDetachId(\n\tid: DetachedNodeId | undefined,\n\toffset: number,\n): DetachedNodeId | undefined;\nexport function offsetDetachId(\n\tid: DetachedNodeId | undefined,\n\toffset: number,\n): DetachedNodeId | undefined {\n\tif (id === undefined) {\n\t\treturn undefined;\n\t}\n\treturn {\n\t\t...id,\n\t\tminor: id.minor + offset,\n\t};\n}\n\nexport function areDetachedNodeIdsEqual(a: DetachedNodeId, b: DetachedNodeId): boolean {\n\treturn a.major === b.major && a.minor === b.minor;\n}\n"]}
1
+ {"version":3,"file":"deltaUtil.js","sourceRoot":"","sources":["../../../src/core/tree/deltaUtil.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,MAAM,CAAC,MAAM,UAAU,GAAS,EAAE,CAAC;AAEnC,MAAM,UAAU,0BAA0B,CAAC,OAAkB;IAC5D,IAAI,OAAO,CAAC,cAAc,KAAK,CAAC,EAAE,CAAC;QAClC,OAAO,UAAU,CAAC;IACnB,CAAC;IACD,MAAM,OAAO,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAC7B,MAAM,KAAK,GAAS;QACnB,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;QACxC,MAAM,EAAE,IAAI,GAAG,CAAyB;YACvC,CAAC,YAAY,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;SAC/E,CAAC;KACF,CAAC;IACF,OAAO,KAAK,CAAC;AACd,CAAC;AAED,MAAM,UAAU,kBAAkB,CACjC,KAA8B,EAC9B,KAA8B;IAE9B,MAAM,GAAG,GAA4B,EAAE,KAAK,EAAE,CAAC;IAC/C,IAAI,KAA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Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Mutable } from \"../../util/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { TreeChunk } from \"./chunk.js\";\nimport type { DetachedNodeId, FieldChanges, FieldMap, Root } from \"./delta.js\";\nimport { rootFieldKey } from \"./types.js\";\n\nexport const emptyDelta: Root = {};\n\nexport function deltaForRootInitialization(content: TreeChunk): Root {\n\tif (content.topLevelLength === 0) {\n\t\treturn emptyDelta;\n\t}\n\tconst buildId = { minor: 0 };\n\tconst delta: Root = {\n\t\tbuild: [{ id: buildId, trees: content }],\n\t\tfields: new Map<FieldKey, FieldChanges>([\n\t\t\t[rootFieldKey, { marks: [{ count: content.topLevelLength, attach: buildId }] }],\n\t\t]),\n\t};\n\treturn delta;\n}\n\nexport function makeDetachedNodeId(\n\tmajor: DetachedNodeId[\"major\"],\n\tminor: DetachedNodeId[\"minor\"],\n): DetachedNodeId {\n\tconst out: Mutable<DetachedNodeId> = { minor };\n\tif (major !== undefined) {\n\t\tout.major = major;\n\t}\n\treturn out;\n}\n\nexport function offsetDetachId(id: DetachedNodeId, offset: number): DetachedNodeId;\nexport function offsetDetachId(\n\tid: DetachedNodeId | undefined,\n\toffset: number,\n): DetachedNodeId | undefined;\nexport function offsetDetachId(\n\tid: DetachedNodeId | undefined,\n\toffset: number,\n): DetachedNodeId | undefined {\n\tif (id === undefined) {\n\t\treturn undefined;\n\t}\n\treturn {\n\t\t...id,\n\t\tminor: id.minor + offset,\n\t};\n}\n\nexport function areDetachedNodeIdsEqual(a: DetachedNodeId, b: DetachedNodeId): boolean {\n\treturn a.major === b.major && a.minor === b.minor;\n}\n\n/**\n * Returns true if a delta field map contains any changes that would be visible in the document (eg, an insert, move, edit)\n * @param fields - Delta FieldMap to check for visible changes\n * @returns True if change map contains any changes that would be visible in the document, false otherwise\n */\nexport function deltaFieldMapHasVisibleChanges(fields: FieldMap | undefined): boolean {\n\tif (fields === undefined || fields.size === 0) {\n\t\treturn false;\n\t}\n\tfor (const [, fieldChanges] of fields) {\n\t\tif (deltaFieldChangesHaveVisibleChanges(fieldChanges)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}\n\n/**\n * Returns true if the given field changes contains any changes that would be visible in the document (eg, an insert, move, edit)\n * @param fieldChanges - Field changes to check for visible changes\n * @returns True if the field changes contain any changes that would be visible in the document, false otherwise\n */\nexport function deltaFieldChangesHaveVisibleChanges(fieldChanges: FieldChanges): boolean {\n\tfor (const mark of fieldChanges.marks) {\n\t\tif (\n\t\t\tmark.attach !== undefined ||\n\t\t\tmark.detach !== undefined ||\n\t\t\tdeltaFieldMapHasVisibleChanges(mark.fields)\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n}\n"]}
@@ -3,10 +3,10 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { IIdCompressor } from "@fluidframework/id-compressor";
6
- import { ClientVersionDispatchingCodecBuilder, type CodecWriteOptions } from "../../codec/index.js";
6
+ import { ClientVersionDispatchingCodecBuilder, type ICodecOptions } from "../../codec/index.js";
7
7
  import type { RevisionTagCodec } from "../rebase/index.js";
8
- export declare const detachedFieldIndexCodecBuilder: ClientVersionDispatchingCodecBuilder<"DetachedFieldIndex", import("./detachedFieldIndexTypes.js").DetachedFieldSummaryData, void, import("../../util/brand.js").Brand<1, "DetachedFieldIndexFormatVersion"> | import("../../util/brand.js").Brand<2, "DetachedFieldIndexFormatVersion">, CodecWriteOptions & {
9
- revisionTagCodec: RevisionTagCodec;
10
- idCompressor: IIdCompressor;
11
- }>;
8
+ export declare const detachedFieldIndexCodecBuilder: ClientVersionDispatchingCodecBuilder<ICodecOptions & {
9
+ readonly revisionTagCodec: RevisionTagCodec;
10
+ readonly idCompressor: IIdCompressor;
11
+ }, import("./detachedFieldIndexTypes.js").DetachedFieldSummaryData, void, import("../../util/brand.js").Brand<1, "DetachedFieldIndexFormatVersion"> | import("../../util/brand.js").Brand<2, "DetachedFieldIndexFormatVersion">, "DetachedFieldIndex">;
12
12
  //# sourceMappingURL=detachedFieldIndexCodecs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"detachedFieldIndexCodecs.d.ts","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EACN,oCAAoC,EACpC,KAAK,iBAAiB,EAEtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAW3D,eAAO,MAAM,8BAA8B;sBAJxB,gBAAgB;kBACpB,aAAa;EAmB3B,CAAC"}
1
+ {"version":3,"file":"detachedFieldIndexCodecs.d.ts","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EACN,oCAAoC,EAEpC,KAAK,aAAa,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAW3D,eAAO,MAAM,8BAA8B;+BAJf,gBAAgB;2BACpB,aAAa;sPAmBpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"detachedFieldIndexCodecs.js","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,OAAO,EACN,oCAAoC,EAEpC,kBAAkB,GAClB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AAOtF,MAAM,CAAC,MAAM,8BAA8B,GAAG,oCAAoC,CAAC,KAAK,CACvF,oBAAoB,EACpB;IACC;QACC,mBAAmB,EAAE,yBAAyB;QAC9C,aAAa,EAAE,+BAA+B,CAAC,EAAE;QACjD,KAAK,EAAE,CAAC,SAAoB,EAAE,EAAE,CAC/B,8BAA8B,CAAC,SAAS,CAAC,gBAAgB,EAAE,SAAS,CAAC,YAAY,CAAC;KACnF;IACD;QACC,mBAAmB,EAAE,kBAAkB,CAAC,KAAK;QAC7C,aAAa,EAAE,+BAA+B,CAAC,EAAE;QACjD,KAAK,EAAE,CAAC,SAAoB,EAAE,EAAE,CAC/B,8BAA8B,CAAC,SAAS,CAAC,gBAAgB,EAAE,SAAS,CAAC,YAAY,CAAC;KACnF;CACD,CACD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport { lowestMinVersionForCollab } from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\tClientVersionDispatchingCodecBuilder,\n\ttype CodecWriteOptions,\n\tFluidClientVersion,\n} from \"../../codec/index.js\";\nimport type { RevisionTagCodec } from \"../rebase/index.js\";\n\nimport { makeDetachedNodeToFieldCodecV1 } from \"./detachedFieldIndexCodecV1.js\";\nimport { makeDetachedNodeToFieldCodecV2 } from \"./detachedFieldIndexCodecV2.js\";\nimport { DetachedFieldIndexFormatVersion } from \"./detachedFieldIndexFormatCommon.js\";\n\ntype BuildData = CodecWriteOptions & {\n\trevisionTagCodec: RevisionTagCodec;\n\tidCompressor: IIdCompressor;\n};\n\nexport const detachedFieldIndexCodecBuilder = ClientVersionDispatchingCodecBuilder.build(\n\t\"DetachedFieldIndex\",\n\t[\n\t\t{\n\t\t\tminVersionForCollab: lowestMinVersionForCollab,\n\t\t\tformatVersion: DetachedFieldIndexFormatVersion.v1,\n\t\t\tcodec: (buildData: BuildData) =>\n\t\t\t\tmakeDetachedNodeToFieldCodecV1(buildData.revisionTagCodec, buildData.idCompressor),\n\t\t},\n\t\t{\n\t\t\tminVersionForCollab: FluidClientVersion.v2_52,\n\t\t\tformatVersion: DetachedFieldIndexFormatVersion.v2,\n\t\t\tcodec: (buildData: BuildData) =>\n\t\t\t\tmakeDetachedNodeToFieldCodecV2(buildData.revisionTagCodec, buildData.idCompressor),\n\t\t},\n\t],\n);\n"]}
1
+ {"version":3,"file":"detachedFieldIndexCodecs.js","sourceRoot":"","sources":["../../../src/core/tree/detachedFieldIndexCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAEnF,OAAO,EACN,oCAAoC,EACpC,kBAAkB,GAElB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AAOtF,MAAM,CAAC,MAAM,8BAA8B,GAAG,oCAAoC,CAAC,KAAK,CACvF,oBAAoB,EACpB;IACC;QACC,mBAAmB,EAAE,yBAAyB;QAC9C,aAAa,EAAE,+BAA+B,CAAC,EAAE;QACjD,KAAK,EAAE,CAAC,SAAoB,EAAE,EAAE,CAC/B,8BAA8B,CAAC,SAAS,CAAC,gBAAgB,EAAE,SAAS,CAAC,YAAY,CAAC;KACnF;IACD;QACC,mBAAmB,EAAE,kBAAkB,CAAC,KAAK;QAC7C,aAAa,EAAE,+BAA+B,CAAC,EAAE;QACjD,KAAK,EAAE,CAAC,SAAoB,EAAE,EAAE,CAC/B,8BAA8B,CAAC,SAAS,CAAC,gBAAgB,EAAE,SAAS,CAAC,YAAY,CAAC;KACnF;CACD,CACD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport { lowestMinVersionForCollab } from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\tClientVersionDispatchingCodecBuilder,\n\tFluidClientVersion,\n\ttype ICodecOptions,\n} from \"../../codec/index.js\";\nimport type { RevisionTagCodec } from \"../rebase/index.js\";\n\nimport { makeDetachedNodeToFieldCodecV1 } from \"./detachedFieldIndexCodecV1.js\";\nimport { makeDetachedNodeToFieldCodecV2 } from \"./detachedFieldIndexCodecV2.js\";\nimport { DetachedFieldIndexFormatVersion } from \"./detachedFieldIndexFormatCommon.js\";\n\ntype BuildData = ICodecOptions & {\n\treadonly revisionTagCodec: RevisionTagCodec;\n\treadonly idCompressor: IIdCompressor;\n};\n\nexport const detachedFieldIndexCodecBuilder = ClientVersionDispatchingCodecBuilder.build(\n\t\"DetachedFieldIndex\",\n\t[\n\t\t{\n\t\t\tminVersionForCollab: lowestMinVersionForCollab,\n\t\t\tformatVersion: DetachedFieldIndexFormatVersion.v1,\n\t\t\tcodec: (buildData: BuildData) =>\n\t\t\t\tmakeDetachedNodeToFieldCodecV1(buildData.revisionTagCodec, buildData.idCompressor),\n\t\t},\n\t\t{\n\t\t\tminVersionForCollab: FluidClientVersion.v2_52,\n\t\t\tformatVersion: DetachedFieldIndexFormatVersion.v2,\n\t\t\tcodec: (buildData: BuildData) =>\n\t\t\t\tmakeDetachedNodeToFieldCodecV2(buildData.revisionTagCodec, buildData.idCompressor),\n\t\t},\n\t],\n);\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { type Anchor, type AnchorLocator, AnchorSet, type AnchorSlot, type AnchorNode, anchorSlot, type AnchorEvents, type AnchorSetRootEvents, } from "./anchorSet.js";
6
- export { type ITreeCursor, CursorLocationType, castCursorToSynchronous, mapCursorField, mapCursorFields, forEachNode, forEachNodeInSubtree, forEachField, iterateCursorField, type ITreeCursorSynchronous, type PathRootPrefix, inCursorField, inCursorNode, CursorMarker, isCursor, } from "./cursor.js";
6
+ export { type ITreeCursor, CursorLocationType, castCursorToSynchronous, mapCursorField, mapCursorFields, forEachNode, forEachNodeInSubtree, forEachField, iterateCursorField, type ITreeCursorSynchronous, type PathRootPrefix, inCursorField, inCursorNode, CursorMarker, isCursor, forEachNodeSubsequence, } from "./cursor.js";
7
7
  export type { ProtoNodes, Root as DeltaRoot, Mark as DeltaMark, DetachedNodeId as DeltaDetachedNodeId, FieldMap as DeltaFieldMap, DetachedNodeChanges as DeltaDetachedNodeChanges, DetachedNodeBuild as DeltaDetachedNodeBuild, DetachedNodeDestruction as DeltaDetachedNodeDestruction, DetachedNodeRename as DeltaDetachedNodeRename, FieldChanges as DeltaFieldChanges, } from "./delta.js";
8
8
  export { type MapTree, type ExclusiveMapTree, deepCopyMapTree } from "./mapTree.js";
9
9
  export { clonePath, topDownPath, getDepth, type UpPath, type NormalizedUpPath, type INormalizedUpPath, type NormalizedFieldUpPath, type FieldUpPath, type Range, type RangeUpPath, type PlaceUpPath, type PlaceIndex, type NodeIndex, compareUpPaths, compareFieldUpPaths, isDetachedUpPathRoot as isDetachedUpPath, getDetachedFieldContainingPath, type UpPathDefault, } from "./pathTree.js";
@@ -13,7 +13,7 @@ export { EmptyKey, type TreeType, type ChildLocation, type DetachedField, type C
13
13
  export { type DeltaVisitor, visitDelta } from "./visitDelta.js";
14
14
  export { type AnnouncedVisitor, announceDelta, applyDelta, createAnnouncedVisitor, combineVisitors, makeDetachedFieldIndex, } from "./visitorUtils.js";
15
15
  export { SparseNode, getDescendant } from "./sparseTree.js";
16
- export { deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, } from "./deltaUtil.js";
16
+ export { deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, areDetachedNodeIdsEqual, deltaFieldMapHasVisibleChanges, deltaFieldChangesHaveVisibleChanges, } from "./deltaUtil.js";
17
17
  export { type TreeChunk, dummyRoot, cursorChunk, tryGetChunk, type ChunkedCursor, } from "./chunk.js";
18
18
  export { DetachedFieldIndex, type DetachedFieldIndexCheckpoint, type ReadOnlyDetachedFieldIndex, } from "./detachedFieldIndex.js";
19
19
  export { detachedFieldIndexCodecBuilder } from "./detachedFieldIndexCodecs.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,SAAS,EACT,KAAK,UAAU,EACf,KAAK,UAAU,EACf,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,mBAAmB,GACxB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACN,KAAK,WAAW,EAChB,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,GACR,MAAM,aAAa,CAAC;AACrB,YAAY,EACX,UAAU,EACV,IAAI,IAAI,SAAS,EACjB,IAAI,IAAI,SAAS,EACjB,cAAc,IAAI,mBAAmB,EACrC,QAAQ,IAAI,aAAa,EACzB,mBAAmB,IAAI,wBAAwB,EAC/C,iBAAiB,IAAI,sBAAsB,EAC3C,uBAAuB,IAAI,4BAA4B,EACvD,kBAAkB,IAAI,uBAAuB,EAC7C,YAAY,IAAI,iBAAiB,GACjC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,gBAAgB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EACN,SAAS,EACT,WAAW,EACX,QAAQ,EACR,KAAK,MAAM,EACX,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,WAAW,EAChB,KAAK,KAAK,EAC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,CAAC;AAEjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { AnchorSet, anchorSlot, } from "./anchorSet.js";
6
- export { CursorLocationType, castCursorToSynchronous, mapCursorField, mapCursorFields, forEachNode, forEachNodeInSubtree, forEachField, iterateCursorField, inCursorField, inCursorNode, CursorMarker, isCursor, } from "./cursor.js";
6
+ export { CursorLocationType, castCursorToSynchronous, mapCursorField, mapCursorFields, forEachNode, forEachNodeInSubtree, forEachField, iterateCursorField, inCursorField, inCursorNode, CursorMarker, isCursor, forEachNodeSubsequence, } from "./cursor.js";
7
7
  export { deepCopyMapTree } from "./mapTree.js";
8
8
  export { clonePath, topDownPath, getDepth, compareUpPaths, compareFieldUpPaths, isDetachedUpPathRoot as isDetachedUpPath, getDetachedFieldContainingPath, } from "./pathTree.js";
9
9
  export { genericTreeDeleteIfEmpty, genericTreeKeys, getGenericTreeField, setGenericTreeField, } from "./treeTextFormat.js";
@@ -12,7 +12,7 @@ export { EmptyKey, detachedFieldAsKey, keyAsDetachedField, rootFieldKey, rootFie
12
12
  export { visitDelta } from "./visitDelta.js";
13
13
  export { announceDelta, applyDelta, createAnnouncedVisitor, combineVisitors, makeDetachedFieldIndex, } from "./visitorUtils.js";
14
14
  export { SparseNode, getDescendant } from "./sparseTree.js";
15
- export { deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, } from "./deltaUtil.js";
15
+ export { deltaForRootInitialization, makeDetachedNodeId, offsetDetachId, emptyDelta, areDetachedNodeIdsEqual, deltaFieldMapHasVisibleChanges, deltaFieldChangesHaveVisibleChanges, } from "./deltaUtil.js";
16
16
  export { dummyRoot, cursorChunk, tryGetChunk, } from "./chunk.js";
17
17
  export { DetachedFieldIndex, } from "./detachedFieldIndex.js";
18
18
  export { detachedFieldIndexCodecBuilder } from "./detachedFieldIndexCodecs.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGN,SAAS,EAGT,UAAU,GAGV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEN,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAGlB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,GACR,MAAM,aAAa,CAAC;AAarB,OAAO,EAAuC,eAAe,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EACN,SAAS,EACT,WAAW,EACX,QAAQ,EAWR,cAAc,EACd,mBAAmB,EACnB,oBAAoB,IAAI,gBAAgB,EACxC,8BAA8B,GAE9B,MAAM,eAAe,CAAC;AACvB,OAAO,EAGN,wBAAwB,EACxB,eAAe,EAEf,mBAAmB,EAEnB,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACN,QAAQ,EAQR,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EAEZ,SAAS,EACT,oBAAoB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAqB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAEN,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EACN,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,UAAU,GACV,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAEN,SAAS,EACT,WAAW,EACX,WAAW,GAEX,MAAM,YAAY,CAAC;AAEpB,OAAO,EACN,kBAAkB,GAGlB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype Anchor,\n\ttype AnchorLocator,\n\tAnchorSet,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n} from \"./anchorSet.js\";\nexport {\n\ttype ITreeCursor,\n\tCursorLocationType,\n\tcastCursorToSynchronous,\n\tmapCursorField,\n\tmapCursorFields,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\titerateCursorField,\n\ttype ITreeCursorSynchronous,\n\ttype PathRootPrefix,\n\tinCursorField,\n\tinCursorNode,\n\tCursorMarker,\n\tisCursor,\n} from \"./cursor.js\";\nexport type {\n\tProtoNodes,\n\tRoot as DeltaRoot,\n\tMark as DeltaMark,\n\tDetachedNodeId as DeltaDetachedNodeId,\n\tFieldMap as DeltaFieldMap,\n\tDetachedNodeChanges as DeltaDetachedNodeChanges,\n\tDetachedNodeBuild as DeltaDetachedNodeBuild,\n\tDetachedNodeDestruction as DeltaDetachedNodeDestruction,\n\tDetachedNodeRename as DeltaDetachedNodeRename,\n\tFieldChanges as DeltaFieldChanges,\n} from \"./delta.js\";\nexport { type MapTree, type ExclusiveMapTree, deepCopyMapTree } from \"./mapTree.js\";\nexport {\n\tclonePath,\n\ttopDownPath,\n\tgetDepth,\n\ttype UpPath,\n\ttype NormalizedUpPath,\n\ttype INormalizedUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype FieldUpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\tcompareUpPaths,\n\tcompareFieldUpPaths,\n\tisDetachedUpPathRoot as isDetachedUpPath,\n\tgetDetachedFieldContainingPath,\n\ttype UpPathDefault,\n} from \"./pathTree.js\";\nexport {\n\ttype FieldMapObject,\n\ttype GenericFieldsNode,\n\tgenericTreeDeleteIfEmpty,\n\tgenericTreeKeys,\n\ttype GenericTreeNode,\n\tgetGenericTreeField,\n\ttype JsonableTree,\n\tsetGenericTreeField,\n} from \"./treeTextFormat.js\";\nexport { EncodedJsonableTree } from \"./persistedTreeTextFormat.js\";\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype ChildLocation,\n\ttype DetachedField,\n\ttype ChildCollection,\n\ttype RootField,\n\ttype Value,\n\ttype TreeValue,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\trootFieldKey,\n\ttype NodeData,\n\trootField,\n\taboveRootPlaceholder,\n} from \"./types.js\";\nexport { type DeltaVisitor, visitDelta } from \"./visitDelta.js\";\nexport {\n\ttype AnnouncedVisitor,\n\tannounceDelta,\n\tapplyDelta,\n\tcreateAnnouncedVisitor,\n\tcombineVisitors,\n\tmakeDetachedFieldIndex,\n} from \"./visitorUtils.js\";\n\nexport { SparseNode, getDescendant } from \"./sparseTree.js\";\n\nexport {\n\tdeltaForRootInitialization,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n} from \"./deltaUtil.js\";\n\nexport {\n\ttype TreeChunk,\n\tdummyRoot,\n\tcursorChunk,\n\ttryGetChunk,\n\ttype ChunkedCursor,\n} from \"./chunk.js\";\n\nexport {\n\tDetachedFieldIndex,\n\ttype DetachedFieldIndexCheckpoint,\n\ttype ReadOnlyDetachedFieldIndex,\n} from \"./detachedFieldIndex.js\";\n\nexport { detachedFieldIndexCodecBuilder } from \"./detachedFieldIndexCodecs.js\";\nexport { DetachedFieldIndexFormatVersion } from \"./detachedFieldIndexFormatCommon.js\";\nexport { type FormatV1 } from \"./detachedFieldIndexFormatV1.js\";\n\nexport { type ForestRootId } from \"./detachedFieldIndexTypes.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAGN,SAAS,EAGT,UAAU,GAGV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEN,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAGlB,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,sBAAsB,GACtB,MAAM,aAAa,CAAC;AAarB,OAAO,EAAuC,eAAe,EAAE,MAAM,cAAc,CAAC;AACpF,OAAO,EACN,SAAS,EACT,WAAW,EACX,QAAQ,EAWR,cAAc,EACd,mBAAmB,EACnB,oBAAoB,IAAI,gBAAgB,EACxC,8BAA8B,GAE9B,MAAM,eAAe,CAAC;AACvB,OAAO,EAGN,wBAAwB,EACxB,eAAe,EAEf,mBAAmB,EAEnB,mBAAmB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EACN,QAAQ,EAQR,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EAEZ,SAAS,EACT,oBAAoB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAqB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAEN,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,EACN,0BAA0B,EAC1B,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,uBAAuB,EACvB,8BAA8B,EAC9B,mCAAmC,GACnC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAEN,SAAS,EACT,WAAW,EACX,WAAW,GAEX,MAAM,YAAY,CAAC;AAEpB,OAAO,EACN,kBAAkB,GAGlB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAC/E,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttype Anchor,\n\ttype AnchorLocator,\n\tAnchorSet,\n\ttype AnchorSlot,\n\ttype AnchorNode,\n\tanchorSlot,\n\ttype AnchorEvents,\n\ttype AnchorSetRootEvents,\n} from \"./anchorSet.js\";\nexport {\n\ttype ITreeCursor,\n\tCursorLocationType,\n\tcastCursorToSynchronous,\n\tmapCursorField,\n\tmapCursorFields,\n\tforEachNode,\n\tforEachNodeInSubtree,\n\tforEachField,\n\titerateCursorField,\n\ttype ITreeCursorSynchronous,\n\ttype PathRootPrefix,\n\tinCursorField,\n\tinCursorNode,\n\tCursorMarker,\n\tisCursor,\n\tforEachNodeSubsequence,\n} from \"./cursor.js\";\nexport type {\n\tProtoNodes,\n\tRoot as DeltaRoot,\n\tMark as DeltaMark,\n\tDetachedNodeId as DeltaDetachedNodeId,\n\tFieldMap as DeltaFieldMap,\n\tDetachedNodeChanges as DeltaDetachedNodeChanges,\n\tDetachedNodeBuild as DeltaDetachedNodeBuild,\n\tDetachedNodeDestruction as DeltaDetachedNodeDestruction,\n\tDetachedNodeRename as DeltaDetachedNodeRename,\n\tFieldChanges as DeltaFieldChanges,\n} from \"./delta.js\";\nexport { type MapTree, type ExclusiveMapTree, deepCopyMapTree } from \"./mapTree.js\";\nexport {\n\tclonePath,\n\ttopDownPath,\n\tgetDepth,\n\ttype UpPath,\n\ttype NormalizedUpPath,\n\ttype INormalizedUpPath,\n\ttype NormalizedFieldUpPath,\n\ttype FieldUpPath,\n\ttype Range,\n\ttype RangeUpPath,\n\ttype PlaceUpPath,\n\ttype PlaceIndex,\n\ttype NodeIndex,\n\tcompareUpPaths,\n\tcompareFieldUpPaths,\n\tisDetachedUpPathRoot as isDetachedUpPath,\n\tgetDetachedFieldContainingPath,\n\ttype UpPathDefault,\n} from \"./pathTree.js\";\nexport {\n\ttype FieldMapObject,\n\ttype GenericFieldsNode,\n\tgenericTreeDeleteIfEmpty,\n\tgenericTreeKeys,\n\ttype GenericTreeNode,\n\tgetGenericTreeField,\n\ttype JsonableTree,\n\tsetGenericTreeField,\n} from \"./treeTextFormat.js\";\nexport { EncodedJsonableTree } from \"./persistedTreeTextFormat.js\";\nexport {\n\tEmptyKey,\n\ttype TreeType,\n\ttype ChildLocation,\n\ttype DetachedField,\n\ttype ChildCollection,\n\ttype RootField,\n\ttype Value,\n\ttype TreeValue,\n\tdetachedFieldAsKey,\n\tkeyAsDetachedField,\n\trootFieldKey,\n\ttype NodeData,\n\trootField,\n\taboveRootPlaceholder,\n} from \"./types.js\";\nexport { type DeltaVisitor, visitDelta } from \"./visitDelta.js\";\nexport {\n\ttype AnnouncedVisitor,\n\tannounceDelta,\n\tapplyDelta,\n\tcreateAnnouncedVisitor,\n\tcombineVisitors,\n\tmakeDetachedFieldIndex,\n} from \"./visitorUtils.js\";\n\nexport { SparseNode, getDescendant } from \"./sparseTree.js\";\n\nexport {\n\tdeltaForRootInitialization,\n\tmakeDetachedNodeId,\n\toffsetDetachId,\n\temptyDelta,\n\tareDetachedNodeIdsEqual,\n\tdeltaFieldMapHasVisibleChanges,\n\tdeltaFieldChangesHaveVisibleChanges,\n} from \"./deltaUtil.js\";\n\nexport {\n\ttype TreeChunk,\n\tdummyRoot,\n\tcursorChunk,\n\ttryGetChunk,\n\ttype ChunkedCursor,\n} from \"./chunk.js\";\n\nexport {\n\tDetachedFieldIndex,\n\ttype DetachedFieldIndexCheckpoint,\n\ttype ReadOnlyDetachedFieldIndex,\n} from \"./detachedFieldIndex.js\";\n\nexport { detachedFieldIndexCodecBuilder } from \"./detachedFieldIndexCodecs.js\";\nexport { DetachedFieldIndexFormatVersion } from \"./detachedFieldIndexFormatCommon.js\";\nexport { type FormatV1 } from \"./detachedFieldIndexFormatV1.js\";\n\nexport { type ForestRootId } from \"./detachedFieldIndexTypes.js\";\n"]}
@@ -127,5 +127,16 @@ export interface DeltaVisitor {
127
127
  * @remarks This should only be called when the "current location" is a Field.
128
128
  */
129
129
  exitField(key: FieldKey): void;
130
+ /**
131
+ * Optional hook for obtaining the complete ordered change description for a field, suitable
132
+ * for producing positional deltas for external representations (e.g. a text editor or virtual
133
+ * list) without needing to diff the old and new states.
134
+ * @remarks
135
+ * Called once per field per delta, during the first (detach) pass only, after `enterField` but
136
+ * before any `attach`, `detach`, or `enterNode` calls for the field. Firing only during the
137
+ * detach pass ensures marks are always relative to the original array positions rather than an
138
+ * intermediate partially-transformed state.
139
+ */
140
+ fieldMarks?(marks: readonly Delta.Mark[]): void;
130
141
  }
131
142
  //# sourceMappingURL=visitDelta.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"visitDelta.d.ts","sourceRoot":"","sources":["../../../src/core/tree/visitDelta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,EAAkB,KAAK,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAC;AAEzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CACzB,KAAK,EAAE,KAAK,CAAC,IAAI,EACjB,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G;IACH,SAAS,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;IAE/B;;;;;;;;;OASG;IACH,UAAU,CAAC,CAAC,KAAK,EAAE,SAAS,KAAK,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC;CAChD"}
@@ -165,7 +165,6 @@ function transferRoots(rootTransfers, mapToUpdate, detachedFieldIndex, visitor,
165
165
  delayed.push({ oldId, newId });
166
166
  continue;
167
167
  }
168
- // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- intentional behavior
169
168
  newRootId = detachedFieldIndex.createEntry(newId, revision);
170
169
  const fields = mapToUpdate.get(oldRootId);
171
170
  if (fields !== undefined) {
@@ -205,6 +204,7 @@ function visitNode(index, fields, visitor, config) {
205
204
  * - Executes detaches (bottom-up)
206
205
  */
207
206
  function detachPass(fieldChanges, visitor, config) {
207
+ visitor.fieldMarks?.(fieldChanges.marks);
208
208
  let index = 0;
209
209
  for (const mark of fieldChanges.marks) {
210
210
  if (mark.fields !== undefined) {
@@ -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;AAK1F,OAAO,EAAE,cAAc,EAA+B,MAAM,aAAa,CAAC;AAE1E,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAKzE;;;;;;;;;;;;;;;;;;;;;;GAsBG;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,E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,CAAC;gBACjD,CAAC;YACF,CAAC;QACF,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC5D,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAChD,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC5D,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC;QACrB,CAAC;IACF,CAAC;AACF,CAAC;AAED;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,KAAgB;IAC7C,OAAO,cAAc,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACxD,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 { RevisionTag } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { TreeChunk } from \"./chunk.js\";\nimport { mapCursorField, type ITreeCursorSynchronous } from \"./cursor.js\";\nimport type * as Delta from \"./delta.js\";\nimport { areDetachedNodeIdsEqual, offsetDetachId } 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\";\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 *\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 detached field. That is the responsibility of the root transfers phase.\n *\n * The attach phase carries out attaches.\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 subtreeChanged 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 */\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\tfor (const {\n\t\tid: { major, minor },\n\t\ttrees,\n\t} of delta.refreshers ?? []) {\n\t\tconst treeCursors = nodeCursorsFromChunk(trees);\n\t\tfor (let i = 0; i < trees.topLevelLength; i += 1) {\n\t\t\tconst offsettedId = minor + i;\n\t\t\tsetInNestedMap(refreshers, major, offsettedId, treeCursors[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\tprocessGlobal(delta.global, detachConfig, visitor);\n\tprocessRename(delta.rename, detachConfig);\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\t// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -- intentional behavior\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, newId, false);\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.\n\t *\n\t * Must be called once the visitor finished traversing the delta for a couple of reasons:\n\t *\n\t * 1. Some visitors, such as those from forests, are put into a special mode while they have a visitor, forbidding some actions (like making more visitors).\n\t *\n\t * 2. Some visitors, such as those from an anchorSet, defer some events for batching purposes until the visitor is freed.\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: readonly ITreeCursorSynchronous[], 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 * @param id - The ID assigned to the first detached node as a result of the detach. The other nodes in the detached range are assigned subsequent IDs.\n\t * @param isReplaced - Whether the detached content will be replaced by a later attach.\n\t * This is not guaranteed to be true in all cases where it could be true,\n\t * but it is guaranteed to be true in all cases where a later attach is needed to keep the data compliant with the schema.\n\t */\n\tdetach(\n\t\tsource: Range,\n\t\tdestination: FieldKey,\n\t\tid: Delta.DetachedNodeId,\n\t\tisReplaced: boolean,\n\t): 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 * - Collects all roots that may need an attach pass\n * - Executes detaches (bottom-up)\n */\nfunction detachPass(\n\tfieldChanges: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tlet index = 0;\n\tfor (const mark of fieldChanges.marks) {\n\t\tif (mark.fields !== undefined) {\n\t\t\tassert(\n\t\t\t\tmark.attach === undefined || mark.detach !== undefined,\n\t\t\t\t0x7d0 /* Invalid nested changes on an additive mark */,\n\t\t\t);\n\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t}\n\t\tif (mark.detach !== undefined) {\n\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\tconst id = offsetDetachId(mark.detach, i);\n\t\t\t\tconst root = config.detachedFieldIndex.createEntry(id, config.latestRevision);\n\t\t\t\tif (mark.fields !== undefined) {\n\t\t\t\t\tconfig.attachPassRoots.set(root, mark.fields);\n\t\t\t\t}\n\t\t\t\tconst field = config.detachedFieldIndex.toFieldKey(root);\n\t\t\t\tvisitor.detach({ start: index, end: index + 1 }, field, id, mark.attach !== undefined);\n\t\t\t}\n\t\t}\n\t\tif (mark.detach === undefined && mark.attach === undefined) {\n\t\t\tindex += mark.count;\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(\n\t\t\t\tid,\n\t\t\t\tnodeCursorsFromChunk(trees),\n\t\t\t\tconfig.detachedFieldIndex,\n\t\t\t\tconfig.latestRevision,\n\t\t\t\tvisitor,\n\t\t\t);\n\t\t}\n\t}\n}\n\nfunction processGlobal(\n\tglobal: readonly Delta.DetachedNodeChanges[] | undefined,\n\tconfig: PassConfig,\n\tvisitor: DeltaVisitor,\n): void {\n\tif (global !== undefined) {\n\t\tfor (const { id, fields } of 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}\n\nfunction processRename(\n\trename: readonly Delta.DetachedNodeRename[] | undefined,\n\tconfig: PassConfig,\n): void {\n\tif (rename !== undefined) {\n\t\tconfig.rootTransfers.push(...rename);\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 */\nfunction attachPass(\n\tfieldChanges: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tlet index = 0;\n\tfor (const mark of fieldChanges.marks) {\n\t\tif (mark.attach !== undefined) {\n\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\tconst offsetAttachId = offsetDetachId(mark.attach, i);\n\t\t\t\tlet sourceRoot = config.detachedFieldIndex.tryGetEntry(offsetAttachId);\n\t\t\t\tif (sourceRoot === undefined) {\n\t\t\t\t\tconst tree = tryGetFromNestedMap(\n\t\t\t\t\t\tconfig.refreshers,\n\t\t\t\t\t\toffsetAttachId.major,\n\t\t\t\t\t\toffsetAttachId.minor,\n\t\t\t\t\t);\n\t\t\t\t\tassert(tree !== undefined, 0x92a /* refresher data not found */);\n\t\t\t\t\tbuildTrees(\n\t\t\t\t\t\toffsetAttachId,\n\t\t\t\t\t\t[tree],\n\t\t\t\t\t\tconfig.detachedFieldIndex,\n\t\t\t\t\t\tconfig.latestRevision,\n\t\t\t\t\t\tvisitor,\n\t\t\t\t\t);\n\t\t\t\t\tsourceRoot = config.detachedFieldIndex.getEntry(offsetAttachId);\n\t\t\t\t}\n\t\t\t\tconst sourceField = config.detachedFieldIndex.toFieldKey(sourceRoot);\n\t\t\t\tconst offsetIndex = index + i;\n\t\t\t\tvisitor.attach(sourceField, 1, offsetIndex);\n\t\t\t\tconfig.detachedFieldIndex.deleteEntry(offsetAttachId);\n\t\t\t\tconst fields = config.attachPassRoots.get(sourceRoot);\n\t\t\t\tif (fields !== undefined) {\n\t\t\t\t\tconfig.attachPassRoots.delete(sourceRoot);\n\t\t\t\t\tvisitNode(offsetIndex, fields, visitor, config);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (mark.detach === undefined && mark.fields !== undefined) {\n\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t}\n\t\tif (mark.detach === undefined || mark.attach !== undefined) {\n\t\t\tindex += mark.count;\n\t\t}\n\t}\n}\n\n/**\n * Converts a chunk of trees into an array of cursors.\n *\n * TODO: Update the visitDelta logic and downstream APIs to avoid splitting up sequences into individual nodes.\n */\nfunction nodeCursorsFromChunk(trees: TreeChunk): ITreeCursorSynchronous[] {\n\treturn mapCursorField(trees.cursor(), (c) => c.fork());\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;AAK1F,OAAO,EAAE,cAAc,EAA+B,MAAM,aAAa,CAAC;AAE1E,OAAO,EAAE,uBAAuB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA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AC5C,MAAM,CAAC,kBAAkB,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;gBACtD,MAAM,MAAM,GAAG,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACtD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;oBAC1B,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;oBAC1C,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;gBACjD,CAAC;YACF,CAAC;QACF,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC5D,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QAChD,CAAC;QACD,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;YAC5D,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC;QACrB,CAAC;IACF,CAAC;AACF,CAAC;AAED;;;;GAIG;AACH,SAAS,oBAAoB,CAAC,KAAgB;IAC7C,OAAO,cAAc,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AACxD,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 { RevisionTag } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { TreeChunk } from \"./chunk.js\";\nimport { mapCursorField, type ITreeCursorSynchronous } from \"./cursor.js\";\nimport type * as Delta from \"./delta.js\";\nimport { areDetachedNodeIdsEqual, offsetDetachId } 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\";\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 *\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 detached field. That is the responsibility of the root transfers phase.\n *\n * The attach phase carries out attaches.\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 subtreeChanged 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 */\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\tfor (const {\n\t\tid: { major, minor },\n\t\ttrees,\n\t} of delta.refreshers ?? []) {\n\t\tconst treeCursors = nodeCursorsFromChunk(trees);\n\t\tfor (let i = 0; i < trees.topLevelLength; i += 1) {\n\t\t\tconst offsettedId = minor + i;\n\t\t\tsetInNestedMap(refreshers, major, offsettedId, treeCursors[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\tprocessGlobal(delta.global, detachConfig, visitor);\n\tprocessRename(delta.rename, detachConfig);\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, newId, false);\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.\n\t *\n\t * Must be called once the visitor finished traversing the delta for a couple of reasons:\n\t *\n\t * 1. Some visitors, such as those from forests, are put into a special mode while they have a visitor, forbidding some actions (like making more visitors).\n\t *\n\t * 2. Some visitors, such as those from an anchorSet, defer some events for batching purposes until the visitor is freed.\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: readonly ITreeCursorSynchronous[], 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 * @param id - The ID assigned to the first detached node as a result of the detach. The other nodes in the detached range are assigned subsequent IDs.\n\t * @param isReplaced - Whether the detached content will be replaced by a later attach.\n\t * This is not guaranteed to be true in all cases where it could be true,\n\t * but it is guaranteed to be true in all cases where a later attach is needed to keep the data compliant with the schema.\n\t */\n\tdetach(\n\t\tsource: Range,\n\t\tdestination: FieldKey,\n\t\tid: Delta.DetachedNodeId,\n\t\tisReplaced: boolean,\n\t): 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\t/**\n\t * Optional hook for obtaining the complete ordered change description for a field, suitable\n\t * for producing positional deltas for external representations (e.g. a text editor or virtual\n\t * list) without needing to diff the old and new states.\n\t * @remarks\n\t * Called once per field per delta, during the first (detach) pass only, after `enterField` but\n\t * before any `attach`, `detach`, or `enterNode` calls for the field. Firing only during the\n\t * detach pass ensures marks are always relative to the original array positions rather than an\n\t * intermediate partially-transformed state.\n\t */\n\tfieldMarks?(marks: readonly Delta.Mark[]): 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 * - Collects all roots that may need an attach pass\n * - Executes detaches (bottom-up)\n */\nfunction detachPass(\n\tfieldChanges: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tvisitor.fieldMarks?.(fieldChanges.marks);\n\tlet index = 0;\n\tfor (const mark of fieldChanges.marks) {\n\t\tif (mark.fields !== undefined) {\n\t\t\tassert(\n\t\t\t\tmark.attach === undefined || mark.detach !== undefined,\n\t\t\t\t0x7d0 /* Invalid nested changes on an additive mark */,\n\t\t\t);\n\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t}\n\t\tif (mark.detach !== undefined) {\n\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\tconst id = offsetDetachId(mark.detach, i);\n\t\t\t\tconst root = config.detachedFieldIndex.createEntry(id, config.latestRevision);\n\t\t\t\tif (mark.fields !== undefined) {\n\t\t\t\t\tconfig.attachPassRoots.set(root, mark.fields);\n\t\t\t\t}\n\t\t\t\tconst field = config.detachedFieldIndex.toFieldKey(root);\n\t\t\t\tvisitor.detach({ start: index, end: index + 1 }, field, id, mark.attach !== undefined);\n\t\t\t}\n\t\t}\n\t\tif (mark.detach === undefined && mark.attach === undefined) {\n\t\t\tindex += mark.count;\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(\n\t\t\t\tid,\n\t\t\t\tnodeCursorsFromChunk(trees),\n\t\t\t\tconfig.detachedFieldIndex,\n\t\t\t\tconfig.latestRevision,\n\t\t\t\tvisitor,\n\t\t\t);\n\t\t}\n\t}\n}\n\nfunction processGlobal(\n\tglobal: readonly Delta.DetachedNodeChanges[] | undefined,\n\tconfig: PassConfig,\n\tvisitor: DeltaVisitor,\n): void {\n\tif (global !== undefined) {\n\t\tfor (const { id, fields } of 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}\n\nfunction processRename(\n\trename: readonly Delta.DetachedNodeRename[] | undefined,\n\tconfig: PassConfig,\n): void {\n\tif (rename !== undefined) {\n\t\tconfig.rootTransfers.push(...rename);\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 */\nfunction attachPass(\n\tfieldChanges: Delta.FieldChanges,\n\tvisitor: DeltaVisitor,\n\tconfig: PassConfig,\n): void {\n\tlet index = 0;\n\tfor (const mark of fieldChanges.marks) {\n\t\tif (mark.attach !== undefined) {\n\t\t\tfor (let i = 0; i < mark.count; i += 1) {\n\t\t\t\tconst offsetAttachId = offsetDetachId(mark.attach, i);\n\t\t\t\tlet sourceRoot = config.detachedFieldIndex.tryGetEntry(offsetAttachId);\n\t\t\t\tif (sourceRoot === undefined) {\n\t\t\t\t\tconst tree = tryGetFromNestedMap(\n\t\t\t\t\t\tconfig.refreshers,\n\t\t\t\t\t\toffsetAttachId.major,\n\t\t\t\t\t\toffsetAttachId.minor,\n\t\t\t\t\t);\n\t\t\t\t\tassert(tree !== undefined, 0x92a /* refresher data not found */);\n\t\t\t\t\tbuildTrees(\n\t\t\t\t\t\toffsetAttachId,\n\t\t\t\t\t\t[tree],\n\t\t\t\t\t\tconfig.detachedFieldIndex,\n\t\t\t\t\t\tconfig.latestRevision,\n\t\t\t\t\t\tvisitor,\n\t\t\t\t\t);\n\t\t\t\t\tsourceRoot = config.detachedFieldIndex.getEntry(offsetAttachId);\n\t\t\t\t}\n\t\t\t\tconst sourceField = config.detachedFieldIndex.toFieldKey(sourceRoot);\n\t\t\t\tconst offsetIndex = index + i;\n\t\t\t\tvisitor.attach(sourceField, 1, offsetIndex);\n\t\t\t\tconfig.detachedFieldIndex.deleteEntry(offsetAttachId);\n\t\t\t\tconst fields = config.attachPassRoots.get(sourceRoot);\n\t\t\t\tif (fields !== undefined) {\n\t\t\t\t\tconfig.attachPassRoots.delete(sourceRoot);\n\t\t\t\t\tvisitNode(offsetIndex, fields, visitor, config);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (mark.detach === undefined && mark.fields !== undefined) {\n\t\t\tvisitNode(index, mark.fields, visitor, config);\n\t\t}\n\t\tif (mark.detach === undefined || mark.attach !== undefined) {\n\t\t\tindex += mark.count;\n\t\t}\n\t}\n}\n\n/**\n * Converts a chunk of trees into an array of cursors.\n *\n * TODO: Update the visitDelta logic and downstream APIs to avoid splitting up sequences into individual nodes.\n */\nfunction nodeCursorsFromChunk(trees: TreeChunk): ITreeCursorSynchronous[] {\n\treturn mapCursorField(trees.cursor(), (c) => c.fork());\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"visitorUtils.d.ts","sourceRoot":"","sources":["../../../src/core/tree/visitorUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAkB,IAAI,EAAE,MAAM,YAAY,CAAC;AACvD,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;AAEhE,wBAAgB,sBAAsB,CACrC,MAAM,oBAAiB,EACvB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,aAAa,EAC3B,OAAO,CAAC,EAAE,iBAAiB,GACzB,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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EAAE,OAAO,CAAC,gBAAgB,CAAC,GACzC,gBAAgB,CAmBlB"}
@@ -95,6 +95,11 @@ export function combineVisitors(visitors) {
95
95
  v.exitField(...args);
96
96
  }
97
97
  },
98
+ fieldMarks: (marks) => {
99
+ for (const v of allVisitors) {
100
+ v.fieldMarks?.(marks);
101
+ }
102
+ },
98
103
  };
99
104
  }
100
105
  const noOp = () => { };
@@ -1 +1 @@
1
- {"version":3,"file":"visitorUtils.js","sourceRoot":"","sources":["../../../src/core/tree/visitorUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAoB,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAM7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAqB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEhE,MAAM,UAAU,sBAAsB,CACrC,SAAiB,MAAM,EACvB,gBAAkC,EAClC,YAA2B,EAC3B,OAA2B;IAE3B,OAAO,IAAI,kBAAkB,CAC5B,MAAM,EACN,oBAAoB,EAA+B,EACnD,gBAAgB,EAChB,YAAY,EACZ,OAAO,CACP,CAAC;AACH,CAAC;AAED,MAAM,UAAU,UAAU,CACzB,KAAW,EACX,cAAuC,EACvC,cAAsD,EACtD,kBAAsC;IAEtC,MAAM,OAAO,GAAG,cAAc,CAAC,cAAc,EAAE,CAAC;IAChD,UAAU,CAAC,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAC/D,OAAO,CAAC,IAAI,EAAE,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,aAAa,CAC5B,KAAW,EACX,cAAuC,EACvC,cAAyE,EACzE,kBAAsC;IAEtC,MAAM,OAAO,GAAG,cAAc,CAAC,cAAc,EAAE,CAAC;IAChD,UAAU,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAClF,OAAO,CAAC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,CAAC,WAAW,IAAI,IAAI;QACjD,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;QAC7C,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,IAAI,IAAI;QAC3C,UAAU,EAAE,gBAAgB,CAAC,UAAU,IAAI,IAAI;QAC/C,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;KAC7C,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecWriteOptions } 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 { ITreeCursorSynchronous } from \"./cursor.js\";\nimport type { DetachedNodeId, 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\";\n\nexport function makeDetachedFieldIndex(\n\tprefix: string = \"Temp\",\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n\toptions?: CodecWriteOptions,\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]), detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport interface CombinedVisitor extends DeltaVisitor {\n\treadonly type: \"Combined\";\n\n\treadonly visitors: readonly CombinableVisitor[];\n}\n\nexport type CombinableVisitor =\n\t| (DeltaVisitor & { type?: never })\n\t| AnnouncedVisitor\n\t| CombinedVisitor;\n\n/**\n * Combines multiple visitors into a single visitor.\n * @param visitors - The returned visitor invokes the corresponding events for all these visitors, in order.\n * @returns a DeltaVisitor combining all `visitors`.\n */\nexport function combineVisitors(visitors: readonly CombinableVisitor[]): CombinedVisitor {\n\tconst allVisitors = visitors.flatMap((v) => (v.type === \"Combined\" ? v.visitors : [v]));\n\tconst announcedVisitors = allVisitors.filter(\n\t\t(v): v is AnnouncedVisitor => v.type === \"Announced\",\n\t);\n\treturn {\n\t\ttype: \"Combined\",\n\t\tvisitors: allVisitors,\n\t\tfree: () => {\n\t\t\tfor (const v of visitors) {\n\t\t\t\tv.free();\n\t\t\t}\n\t\t},\n\t\tcreate: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.create(...args);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterCreate(...args);\n\t\t\t}\n\t\t},\n\t\tdestroy: (...args) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDestroy(...args);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.destroy(...args);\n\t\t\t}\n\t\t},\n\t\tattach: (source: FieldKey, count: number, destination: PlaceIndex) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeAttach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.attach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterAttach(source, {\n\t\t\t\t\tstart: destination,\n\t\t\t\t\tend: destination + count,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdetach: (\n\t\t\tsource: Range,\n\t\t\tdestination: FieldKey,\n\t\t\tid: DetachedNodeId,\n\t\t\tisReplaced: boolean,\n\t\t) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDetach(source, destination, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.detach(source, destination, id, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterDetach(source.start, source.end - source.start, destination, isReplaced);\n\t\t\t}\n\t\t},\n\t\tenterNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterNode(...args);\n\t\t\t}\n\t\t},\n\t\texitNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitNode(...args);\n\t\t\t}\n\t\t},\n\t\tenterField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterField(...args);\n\t\t\t}\n\t\t},\n\t\texitField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitField(...args);\n\t\t\t}\n\t\t},\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\treadonly type: \"Announced\";\n\t/**\n\t * A hook that is called after all nodes have been created.\n\t */\n\tafterCreate(content: readonly ITreeCursorSynchronous[], 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, isReplaced: boolean): void;\n\tafterDetach(\n\t\tsource: PlaceIndex,\n\t\tcount: number,\n\t\tdestination: FieldKey,\n\t\tisReplaced: boolean,\n\t): void;\n}\n\nconst noOp = (): void => {};\n\n/**\n * Creates an announced visitor with only the provided functions and uses a no op for the rest.\n * This is provided to make some of the delta visitor definitions cleaner.\n */\nexport function createAnnouncedVisitor(\n\tvisitorFunctions: Partial<AnnouncedVisitor>,\n): AnnouncedVisitor {\n\treturn {\n\t\ttype: \"Announced\",\n\t\tfree: visitorFunctions.free ?? noOp,\n\t\tcreate: visitorFunctions.create ?? noOp,\n\t\tafterCreate: visitorFunctions.afterCreate ?? noOp,\n\t\tbeforeDestroy: visitorFunctions.beforeDestroy ?? noOp,\n\t\tdestroy: visitorFunctions.destroy ?? noOp,\n\t\tbeforeAttach: visitorFunctions.beforeAttach ?? noOp,\n\t\tattach: visitorFunctions.attach ?? noOp,\n\t\tafterAttach: visitorFunctions.afterAttach ?? noOp,\n\t\tbeforeDetach: visitorFunctions.beforeDetach ?? noOp,\n\t\tdetach: visitorFunctions.detach ?? noOp,\n\t\tafterDetach: visitorFunctions.afterDetach ?? noOp,\n\t\tenterNode: visitorFunctions.enterNode ?? noOp,\n\t\texitNode: visitorFunctions.exitNode ?? noOp,\n\t\tenterField: visitorFunctions.enterField ?? noOp,\n\t\texitField: visitorFunctions.exitField ?? noOp,\n\t};\n}\n"]}
1
+ {"version":3,"file":"visitorUtils.js","sourceRoot":"","sources":["../../../src/core/tree/visitorUtils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAoB,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAM7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,EAAqB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAEhE,MAAM,UAAU,sBAAsB,CACrC,SAAiB,MAAM,EACvB,gBAAkC,EAClC,YAA2B,EAC3B,OAA2B;IAE3B,OAAO,IAAI,kBAAk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,CAAC,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAC;YACvB,CAAC;QACF,CAAC;KACD,CAAC;AACH,CAAC;AAwBD,MAAM,IAAI,GAAG,GAAS,EAAE,GAAE,CAAC,CAAC;AAE5B;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CACrC,gBAA2C;IAE3C,OAAO;QACN,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,gBAAgB,CAAC,IAAI,IAAI,IAAI;QACnC,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,aAAa,EAAE,gBAAgB,CAAC,aAAa,IAAI,IAAI;QACrD,OAAO,EAAE,gBAAgB,CAAC,OAAO,IAAI,IAAI;QACzC,YAAY,EAAE,gBAAgB,CAAC,YAAY,IAAI,IAAI;QACnD,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,YAAY,EAAE,gBAAgB,CAAC,YAAY,IAAI,IAAI;QACnD,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;QAC7C,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,IAAI,IAAI;QAC3C,UAAU,EAAE,gBAAgB,CAAC,UAAU,IAAI,IAAI;QAC/C,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;KAC7C,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecWriteOptions } 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 { ITreeCursorSynchronous } from \"./cursor.js\";\nimport type { DetachedNodeId, 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\";\n\nexport function makeDetachedFieldIndex(\n\tprefix: string = \"Temp\",\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n\toptions?: CodecWriteOptions,\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]), detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport interface CombinedVisitor extends DeltaVisitor {\n\treadonly type: \"Combined\";\n\n\treadonly visitors: readonly CombinableVisitor[];\n}\n\nexport type CombinableVisitor =\n\t| (DeltaVisitor & { type?: never })\n\t| AnnouncedVisitor\n\t| CombinedVisitor;\n\n/**\n * Combines multiple visitors into a single visitor.\n * @param visitors - The returned visitor invokes the corresponding events for all these visitors, in order.\n * @returns a DeltaVisitor combining all `visitors`.\n */\nexport function combineVisitors(visitors: readonly CombinableVisitor[]): CombinedVisitor {\n\tconst allVisitors = visitors.flatMap((v) => (v.type === \"Combined\" ? v.visitors : [v]));\n\tconst announcedVisitors = allVisitors.filter(\n\t\t(v): v is AnnouncedVisitor => v.type === \"Announced\",\n\t);\n\treturn {\n\t\ttype: \"Combined\",\n\t\tvisitors: allVisitors,\n\t\tfree: () => {\n\t\t\tfor (const v of visitors) {\n\t\t\t\tv.free();\n\t\t\t}\n\t\t},\n\t\tcreate: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.create(...args);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterCreate(...args);\n\t\t\t}\n\t\t},\n\t\tdestroy: (...args) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDestroy(...args);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.destroy(...args);\n\t\t\t}\n\t\t},\n\t\tattach: (source: FieldKey, count: number, destination: PlaceIndex) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeAttach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.attach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterAttach(source, {\n\t\t\t\t\tstart: destination,\n\t\t\t\t\tend: destination + count,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdetach: (\n\t\t\tsource: Range,\n\t\t\tdestination: FieldKey,\n\t\t\tid: DetachedNodeId,\n\t\t\tisReplaced: boolean,\n\t\t) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDetach(source, destination, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.detach(source, destination, id, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterDetach(source.start, source.end - source.start, destination, isReplaced);\n\t\t\t}\n\t\t},\n\t\tenterNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterNode(...args);\n\t\t\t}\n\t\t},\n\t\texitNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitNode(...args);\n\t\t\t}\n\t\t},\n\t\tenterField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterField(...args);\n\t\t\t}\n\t\t},\n\t\texitField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitField(...args);\n\t\t\t}\n\t\t},\n\t\tfieldMarks: (marks) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.fieldMarks?.(marks);\n\t\t\t}\n\t\t},\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\treadonly type: \"Announced\";\n\t/**\n\t * A hook that is called after all nodes have been created.\n\t */\n\tafterCreate(content: readonly ITreeCursorSynchronous[], 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, isReplaced: boolean): void;\n\tafterDetach(\n\t\tsource: PlaceIndex,\n\t\tcount: number,\n\t\tdestination: FieldKey,\n\t\tisReplaced: boolean,\n\t): void;\n}\n\nconst noOp = (): void => {};\n\n/**\n * Creates an announced visitor with only the provided functions and uses a no op for the rest.\n * This is provided to make some of the delta visitor definitions cleaner.\n */\nexport function createAnnouncedVisitor(\n\tvisitorFunctions: Partial<AnnouncedVisitor>,\n): AnnouncedVisitor {\n\treturn {\n\t\ttype: \"Announced\",\n\t\tfree: visitorFunctions.free ?? noOp,\n\t\tcreate: visitorFunctions.create ?? noOp,\n\t\tafterCreate: visitorFunctions.afterCreate ?? noOp,\n\t\tbeforeDestroy: visitorFunctions.beforeDestroy ?? noOp,\n\t\tdestroy: visitorFunctions.destroy ?? noOp,\n\t\tbeforeAttach: visitorFunctions.beforeAttach ?? noOp,\n\t\tattach: visitorFunctions.attach ?? noOp,\n\t\tafterAttach: visitorFunctions.afterAttach ?? noOp,\n\t\tbeforeDetach: visitorFunctions.beforeDetach ?? noOp,\n\t\tdetach: visitorFunctions.detach ?? noOp,\n\t\tafterDetach: visitorFunctions.afterDetach ?? noOp,\n\t\tenterNode: visitorFunctions.enterNode ?? noOp,\n\t\texitNode: visitorFunctions.exitNode ?? noOp,\n\t\tenterField: visitorFunctions.enterField ?? noOp,\n\t\texitField: visitorFunctions.exitField ?? noOp,\n\t};\n}\n"]}
@@ -2,5 +2,5 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { AllowedTypes, CommitKind, CommitMetadata, FieldKind, FieldProps, FieldSchema, FieldSchemaMetadata, ITree, ITreeConfigurationOptions, ITreeViewConfiguration, ImplicitAllowedTypes, ImplicitFieldSchema, Input, InsertableTreeFieldFromImplicitField, InsertableTreeNodeFromAllowedTypes, InsertableTreeNodeFromImplicitAllowedTypes, InsertableTypedNode, InternalTreeNode, InternalTypes, IsListener, IsUnion, IterableTreeArrayContent, LazyItem, LeafSchema, Listenable, Listeners, MakeNominal, MapNodeInsertableData, NodeFromSchema, NodeInDocumentConstraint, NodeKind, NodeSchemaMetadata, NodeSchemaOptions, NumberKeys, ObjectFromSchemaRecord, Off, ReadonlyArrayNode, RestrictiveReadonlyRecord, RestrictiveStringRecord, Revertible, RevertibleFactory, RevertibleStatus, RunTransaction, SchemaCompatibilityStatus, SchemaFactory, SchemaFactory_base, SchemaStatics, SimpleNodeSchemaBase, System_Unsafe, TransactionConstraint, Tree, TreeArrayNode, TreeChangeEvents, TreeFieldFromImplicitField, TreeLeafValue, TreeMapNode, TreeNode, TreeNodeApi, TreeNodeFromImplicitAllowedTypes, TreeNodeSchema, TreeNodeSchemaClass, TreeNodeSchemaCore, TreeNodeSchemaNonClass, TreeObjectNode, TreeStatus, TreeView, TreeViewConfiguration, TreeViewEvents, Unenforced, Unhydrated, UnionToIntersection, ValidateRecursiveSchema, ValidateRecursiveSchemaTemplate, ViewableTree, WithType, rollback, typeSchemaSymbol, AllowedTypeMetadata, AllowedTypesFull, AllowedTypesFullEvaluated, AllowedTypesFullFromMixed, AllowedTypesFullFromMixedUnsafe, AllowedTypesMetadata, AnnotateAllowedTypesList, AnnotateAllowedTypesListUnsafe, AnnotatedAllowedType, AnnotatedAllowedTypeUnsafe, AnnotatedAllowedTypes, AnnotatedAllowedTypesUnsafe, CodecWriteOptionsBeta, ConciseTree, ExtensibleUnionNode, FixRecursiveArraySchema, FluidSerializableAsTree, ForestOptions, ForestType, ForestTypeExpensiveDebug, ForestTypeOptimized, ForestTypeReference, JsonCompatible, JsonCompatibleObject, KeyEncodingOptions, NodeChangedData, ObjectSchemaOptions, PopUnion, RecordNodeInsertableData, SchemaFactoryBeta, SchemaStaticsBeta, SchemaUpgrade, SharedTreeOptionsBeta, SnapshotFileSystem, SnapshotSchemaCompatibilityOptions, System_TableSchema, TableSchema, TreeBeta, TreeBranch, TreeChangeEventsBeta, TreeEncodingOptions, TreeRecordNode, TreeRecordNodeUnsafe, TreeViewBeta, UnannotateAllowedTypeUnsafe, UnannotateAllowedTypesList, UnannotateAllowedTypesListUnsafe, UnionToTuple, adaptEnum, asBeta, configuredSharedTreeBeta, createIndependentTreeBeta, enumFromStrings, singletonSchema, snapshotSchemaCompatibility, AllowedTypesFullUnsafe, ArrayNodeCustomizableSchema, ArrayNodeCustomizableSchemaUnsafe, ArrayNodePojoEmulationSchema, ArrayNodeSchema, ArrayPlaceAnchor, BranchableTree, ChangeMetadata, CodecName, CodecWriteOptions, CreateIndependentTreeAlphaOptions, DirtyTreeMap, DirtyTreeStatus, ErasedNode, ErasedSchema, ErasedSchemaSubclassable, FactoryContent, FactoryContentObject, FieldHasDefaultAlpha, FieldHasDefaultAlphaUnsafe, FieldPropsAlpha, FieldSchemaAlpha, FieldSchemaAlphaUnsafe, FluidClientVersion, FormatValidator, FormatValidatorBasic, FormatValidatorNoOp, FormatVersion, HandleConverter, ICodecOptions, ITreeAlpha, IdentifierIndex, IncrementalEncodingPolicy, IndependentViewOptions, Insertable, InsertableContent, InsertableField, InsertableObjectFromSchemaRecordAlpha, InsertableObjectFromSchemaRecordAlphaUnsafe, JsonArrayNodeSchema, JsonAsTree, JsonCompatibleReadOnly, JsonCompatibleReadOnlyObject, JsonFieldSchema, JsonLeafNodeSchema, JsonLeafSchemaType, JsonMapNodeSchema, JsonNodeSchema, JsonNodeSchemaBase, JsonObjectNodeSchema, JsonRecordNodeSchema, JsonRefPath, JsonSchemaId, JsonSchemaRef, JsonSchemaType, JsonStringKeyPatternProperties, JsonTreeSchema, LabelTree, LocalChangeMetadata, MapNodeCustomizableSchema, MapNodeCustomizableSchemaUnsafe, MapNodePojoEmulationSchema, MapNodeSchema, NoChangeConstraint, NodeProvider, NodeSchemaOptionsAlpha, ObjectNodeSchema, ObjectNodeSchemaWorkaround, ObjectSchemaOptionsAlpha, ObservationResults, ReadSchema, ReadableField, RecordNodeCustomizableSchema, RecordNodePojoEmulationSchema, RecordNodeSchema, RemoteChangeMetadata, RevertibleAlpha, RevertibleAlphaFactory, RunTransactionParams, SchemaFactoryAlpha, SchemaStaticsAlpha, SchemaType, SharedTreeFormatOptions, SharedTreeOptions, SimpleAllowedTypeAttributes, SimpleArrayNodeSchema, SimpleFieldSchema, SimpleLeafNodeSchema, SimpleMapNodeSchema, SimpleNodeSchema, SimpleNodeSchemaBaseAlpha, SimpleObjectFieldSchema, SimpleObjectNodeSchema, SimpleRecordNodeSchema, SimpleTreeSchema, TextAsTree, TransactionCallbackStatus, TransactionConstraintAlpha, TransactionLabels, TransactionResult, TransactionResultExt, TransactionResultFailed, TransactionResultSuccess, TreeAlpha, TreeBranchAlpha, TreeBranchEvents, TreeBranchFork, TreeCompressionStrategy, TreeContextAlpha, TreeIdentifierUtils, TreeIndex, TreeIndexKey, TreeIndexNodes, TreeParsingOptions, TreeSchema, TreeSchemaEncodingOptions, TreeViewAlpha, TreeViewConfigurationAlpha, UnsafeUnknownSchema, ValueSchema, VerboseTree, VerboseTreeNode, ViewContent, VoidTransactionCallbackStatus, WithValue, allowUnused, asAlpha, asTreeViewAlpha, checkCompatibility, cloneWithReplacements, comparePersistedSchema, configuredSharedTreeAlpha, contentSchemaSymbol, createArrayInsertionAnchor, createIdentifierIndex, createIndependentTreeAlpha, createTreeIndex, decodeSchemaCompatibilitySnapshot, encodeSchemaCompatibilitySnapshot, eraseSchemaDetails, eraseSchemaDetailsSubclassable, evaluateLazySchema, exportCompatibilitySchemaSnapshot, extractPersistedSchema, generateSchemaFromSimpleSchema, getBranch, getJsonSchema, getSimpleSchema, importCompatibilitySchemaSnapshot, incrementalEncodingPolicyForAllowedTypes, incrementalSummaryHint, independentInitializedView, independentView, normalizeAllowedTypes, persistedToSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, trackDirtyNodes } from "../index.js";
5
+ export { AllowedTypes, CommitKind, CommitMetadata, FieldKind, FieldProps, FieldSchema, FieldSchemaMetadata, ITree, ITreeConfigurationOptions, ITreeViewConfiguration, ImplicitAllowedTypes, ImplicitFieldSchema, Input, InsertableTreeFieldFromImplicitField, InsertableTreeNodeFromAllowedTypes, InsertableTreeNodeFromImplicitAllowedTypes, InsertableTypedNode, InternalTreeNode, InternalTypes, IsListener, IsUnion, IterableTreeArrayContent, LazyItem, LeafSchema, Listenable, Listeners, MakeNominal, MapNodeInsertableData, NodeFromSchema, NodeInDocumentConstraint, NodeKind, NodeSchemaMetadata, NodeSchemaOptions, NumberKeys, ObjectFromSchemaRecord, Off, ReadonlyArrayNode, RestrictiveReadonlyRecord, RestrictiveStringRecord, Revertible, RevertibleFactory, RevertibleStatus, RunTransaction, SchemaCompatibilityStatus, SchemaFactory, SchemaFactory_base, SchemaStatics, SimpleNodeSchemaBase, System_Unsafe, TransactionConstraint, Tree, TreeArrayNode, TreeChangeEvents, TreeFieldFromImplicitField, TreeLeafValue, TreeMapNode, TreeNode, TreeNodeApi, TreeNodeFromImplicitAllowedTypes, TreeNodeSchema, TreeNodeSchemaClass, TreeNodeSchemaCore, TreeNodeSchemaNonClass, TreeObjectNode, TreeStatus, TreeView, TreeViewConfiguration, TreeViewEvents, Unenforced, Unhydrated, UnionToIntersection, ValidateRecursiveSchema, ValidateRecursiveSchemaTemplate, ViewableTree, WithType, rollback, typeSchemaSymbol, AllowedTypeMetadata, AllowedTypesFull, AllowedTypesFullEvaluated, AllowedTypesFullFromMixed, AllowedTypesFullFromMixedUnsafe, AllowedTypesMetadata, AnnotateAllowedTypesList, AnnotateAllowedTypesListUnsafe, AnnotatedAllowedType, AnnotatedAllowedTypeUnsafe, AnnotatedAllowedTypes, AnnotatedAllowedTypesUnsafe, ArrayNodeDeltaOp, ArrayNodeInsertOp, ArrayNodeRemoveOp, ArrayNodeRetainOp, CodecWriteOptionsBeta, ConciseTree, ExtensibleUnionNode, FixRecursiveArraySchema, FluidSerializableAsTree, ForestOptions, ForestType, ForestTypeExpensiveDebug, ForestTypeOptimized, ForestTypeReference, JsonCompatible, JsonCompatibleObject, KeyEncodingOptions, NodeChangedData, NodeChangedDataAlpha, NodeChangedDataDelta, NodeChangedDataProperties, ObjectSchemaOptions, PopUnion, RecordNodeInsertableData, SchemaFactoryBeta, SchemaStaticsBeta, SchemaUpgrade, SharedTreeOptionsBeta, SnapshotFileSystem, SnapshotSchemaCompatibilityOptions, System_TableSchema, TableSchema, TreeBeta, TreeBranch, TreeChangeEventsBeta, TreeChangeEventsAlpha, TreeEncodingOptions, TreeRecordNode, TreeRecordNodeUnsafe, TreeViewBeta, UnannotateAllowedTypeUnsafe, UnannotateAllowedTypesList, UnannotateAllowedTypesListUnsafe, UnionToTuple, adaptEnum, asBeta, configuredSharedTreeBeta, createIndependentTreeBeta, enumFromStrings, singletonSchema, snapshotSchemaCompatibility, AllowedTypesFullUnsafe, ArrayNodeCustomizableSchema, ArrayNodeCustomizableSchemaAlpha, ArrayNodeCustomizableSchemaUnsafe, ArrayNodePojoEmulationSchema, ArrayNodeSchema, ArrayPlaceAnchor, ChangeMetadata, CodecName, CodecWriteOptions, CreateIndependentTreeAlphaOptions, DirtyTreeMap, DirtyTreeStatus, ErasedNode, ErasedSchema, ErasedSchemaSubclassable, FactoryContent, FactoryContentObject, FieldHasDefaultAlpha, FieldHasDefaultAlphaUnsafe, FieldPropsAlpha, FieldSchemaAlpha, FieldSchemaAlphaUnsafe, FluidClientVersion, FormatValidator, FormatValidatorBasic, FormatValidatorNoOp, FormatVersion, HandleConverter, ICodecOptions, ITreeAlpha, IdentifierIndex, IncrementalEncodingPolicy, IndependentViewOptions, Insertable, InsertableContent, InsertableField, InsertableObjectFromSchemaRecordAlpha, InsertableObjectFromSchemaRecordAlphaUnsafe, JsonArrayNodeSchema, JsonAsTree, JsonCompatibleReadOnly, JsonCompatibleReadOnlyObject, JsonFieldSchema, JsonLeafNodeSchema, JsonLeafSchemaType, JsonMapNodeSchema, JsonNodeSchema, JsonNodeSchemaBase, JsonObjectNodeSchema, JsonRecordNodeSchema, JsonRefPath, JsonSchemaId, JsonSchemaRef, JsonSchemaType, JsonStringKeyPatternProperties, JsonTreeSchema, LabelTree, LocalChangeMetadata, MapNodeCustomizableSchema, MapNodeCustomizableSchemaUnsafe, MapNodePojoEmulationSchema, MapNodeSchema, NoChangeConstraint, NodeProvider, NodeSchemaOptionsAlpha, ObjectNodeSchema, ObjectNodeSchemaWorkaround, ObjectSchemaOptionsAlpha, ObservationResults, ReadSchema, ReadableField, RecordNodeCustomizableSchema, RecordNodePojoEmulationSchema, RecordNodeSchema, RemoteChangeMetadata, RevertibleAlpha, RevertibleAlphaFactory, RunTransactionParams, SchemaFactoryAlpha, SchemaStaticsAlpha, SchemaType, SharedTreeFormatOptions, SharedTreeOptions, SimpleAllowedTypeAttributes, SimpleArrayNodeSchema, SimpleFieldSchema, SimpleLeafNodeSchema, SimpleMapNodeSchema, SimpleNodeSchema, SimpleNodeSchemaBaseAlpha, SimpleObjectFieldSchema, SimpleObjectNodeSchema, SimpleRecordNodeSchema, SimpleTreeSchema, TextAsTree, TransactionCallbackStatus, TransactionConstraintAlpha, TransactionLabels, TransactionResult, TransactionResultExt, TransactionResultFailed, TransactionResultSuccess, TreeAlpha, TreeArrayNodeAlpha, TreeBranchAlpha, TreeBranchEvents, TreeCompressionStrategy, TreeContextAlpha, TreeIdentifierUtils, TreeIndex, TreeIndexKey, TreeIndexNodes, TreeParsingOptions, TreeSchema, TreeSchemaEncodingOptions, TreeViewAlpha, TreeViewConfigurationAlpha, UnsafeUnknownSchema, ValueSchema, VerboseTree, VerboseTreeNode, ViewContent, VoidTransactionCallbackStatus, WithValue, allowUnused, asAlpha, asTreeViewAlpha, checkCompatibility, cloneWithReplacements, comparePersistedSchema, configuredSharedTreeAlpha, contentSchemaSymbol, createArrayInsertionAnchor, createIdentifierIndex, createIndependentTreeAlpha, createTreeIndex, decodeSchemaCompatibilitySnapshot, encodeSchemaCompatibilitySnapshot, eraseSchemaDetails, eraseSchemaDetailsSubclassable, evaluateLazySchema, exportCompatibilitySchemaSnapshot, extractPersistedSchema, generateSchemaFromSimpleSchema, getJsonSchema, getSimpleSchema, importCompatibilitySchemaSnapshot, incrementalEncodingPolicyForAllowedTypes, incrementalSummaryHint, independentInitializedView, independentView, normalizeAllowedTypes, persistedToSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, trackDirtyNodes } from "../index.js";
6
6
  //# sourceMappingURL=alpha.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.d.ts","sourceRoot":"","sources":["../../src/entrypoints/alpha.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAEN,YAAY,EACZ,UAAU,EACV,cAAc,EACd,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sB,EACtB,0BAA0B,EAC1B,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EACzB,eAAe,EAEf,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"alpha.d.ts","sourceRoot":"","sources":["../../src/entrypoints/alpha.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAEN,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,EACL,oCAAoC,EACpC,kCAAkC,EAClC,0CAA0C,EAC1C,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,OAAO,EACP,wBAAwB,EACxB,QAAQ,EACR,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,sBAAsB,EACtB,GAAG,EACH,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,qBAAqB,EACrB,IAAI,EACJ,aAAa,EACb,gBAAgB,EAChB,0BAA0B,EAC1B,aAAa,EACb,WAAW,EACX,QAAQ,EACR,WAAW,EACX,gCAAgC,EAChC,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,UAAU,EACV,QAAQ,EACR,qBAAqB,EACrB,cAAc,EACd,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,+BAA+B,EAC/B,YAAY,EACZ,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAIhB,mBAA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WAAW,EACX,eAAe,EACf,WAAW,EACX,6BAA6B,EAC7B,SAAS,EACT,WAAW,EACX,OAAO,EACP,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,0BAA0B,EAC1B,eAAe,EACf,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,EAClB,8BAA8B,EAC9B,kBAAkB,EAClB,iCAAiC,EACjC,sBAAsB,EACtB,8BAA8B,EAC9B,aAAa,EACb,eAAe,EACf,iCAAiC,EACjC,wCAAwC,EACxC,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EACzB,eAAe,EAEf,MAAM,aAAa,CAAC"}
@@ -4,9 +4,9 @@
4
4
  */
5
5
  /*
6
6
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
7
- * Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
7
+ * Generated by "generate:entrypoint-sources".
8
8
  */
9
- export { CommitKind, FieldKind, FieldSchema, InternalTypes, IterableTreeArrayContent, NodeKind, RevertibleStatus, SchemaFactory, Tree, TreeArrayNode, TreeNode, TreeStatus, TreeViewConfiguration, rollback, ExtensibleUnionNode, FluidSerializableAsTree, ForestTypeExpensiveDebug, ForestTypeOptimized, ForestTypeReference, KeyEncodingOptions, SchemaFactoryBeta, TableSchema, TreeBeta, adaptEnum, asBeta, configuredSharedTreeBeta, createIndependentTreeBeta, enumFromStrings, singletonSchema, snapshotSchemaCompatibility, ArrayNodeSchema, FluidClientVersion, FormatValidatorBasic, FormatValidatorNoOp, JsonAsTree, MapNodeSchema, ObjectNodeSchema, RecordNodeSchema, SchemaFactoryAlpha, TextAsTree, TreeAlpha, TreeCompressionStrategy, TreeViewConfigurationAlpha, ValueSchema, allowUnused, asAlpha, asTreeViewAlpha, checkCompatibility, cloneWithReplacements, comparePersistedSchema, configuredSharedTreeAlpha, contentSchemaSymbol, createArrayInsertionAnchor, createIdentifierIndex, createIndependentTreeAlpha, createTreeIndex, decodeSchemaCompatibilitySnapshot, encodeSchemaCompatibilitySnapshot, eraseSchemaDetails, eraseSchemaDetailsSubclassable, evaluateLazySchema, exportCompatibilitySchemaSnapshot, extractPersistedSchema, generateSchemaFromSimpleSchema, getBranch, getJsonSchema, getSimpleSchema, importCompatibilitySchemaSnapshot, incrementalEncodingPolicyForAllowedTypes, incrementalSummaryHint, independentInitializedView, independentView, normalizeAllowedTypes, persistedToSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, trackDirtyNodes
9
+ export { CommitKind, FieldKind, FieldSchema, InternalTypes, IterableTreeArrayContent, NodeKind, RevertibleStatus, SchemaFactory, Tree, TreeArrayNode, TreeNode, TreeStatus, TreeViewConfiguration, rollback, ExtensibleUnionNode, FluidSerializableAsTree, ForestTypeExpensiveDebug, ForestTypeOptimized, ForestTypeReference, KeyEncodingOptions, SchemaFactoryBeta, TableSchema, TreeBeta, adaptEnum, asBeta, configuredSharedTreeBeta, createIndependentTreeBeta, enumFromStrings, singletonSchema, snapshotSchemaCompatibility, ArrayNodeSchema, FluidClientVersion, FormatValidatorBasic, FormatValidatorNoOp, JsonAsTree, MapNodeSchema, ObjectNodeSchema, RecordNodeSchema, SchemaFactoryAlpha, TextAsTree, TreeAlpha, TreeCompressionStrategy, TreeViewConfigurationAlpha, ValueSchema, allowUnused, asAlpha, asTreeViewAlpha, checkCompatibility, cloneWithReplacements, comparePersistedSchema, configuredSharedTreeAlpha, contentSchemaSymbol, createArrayInsertionAnchor, createIdentifierIndex, createIndependentTreeAlpha, createTreeIndex, decodeSchemaCompatibilitySnapshot, encodeSchemaCompatibilitySnapshot, eraseSchemaDetails, eraseSchemaDetailsSubclassable, evaluateLazySchema, exportCompatibilitySchemaSnapshot, extractPersistedSchema, generateSchemaFromSimpleSchema, getJsonSchema, getSimpleSchema, importCompatibilitySchemaSnapshot, incrementalEncodingPolicyForAllowedTypes, incrementalSummaryHint, independentInitializedView, independentView, normalizeAllowedTypes, persistedToSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, trackDirtyNodes
10
10
  // #endregion
11
11
  } from "../index.js";
12
12
  //# sourceMappingURL=alpha.js.map