@fluidframework/tree 2.113.1 → 2.114.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 (527) hide show
  1. package/CHANGELOG.md +98 -0
  2. package/api-report/tree.alpha.api.md +19 -0
  3. package/dist/core/change-family/changeFamily.d.ts +15 -4
  4. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  5. package/dist/core/change-family/changeFamily.js.map +1 -1
  6. package/dist/core/change-family/editBuilder.d.ts +2 -3
  7. package/dist/core/change-family/editBuilder.d.ts.map +1 -1
  8. package/dist/core/change-family/editBuilder.js +1 -2
  9. package/dist/core/change-family/editBuilder.js.map +1 -1
  10. package/dist/core/change-family/index.d.ts +1 -1
  11. package/dist/core/change-family/index.d.ts.map +1 -1
  12. package/dist/core/change-family/index.js.map +1 -1
  13. package/dist/core/index.d.ts +3 -2
  14. package/dist/core/index.d.ts.map +1 -1
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/core/tree/delta.d.ts +62 -16
  17. package/dist/core/tree/delta.d.ts.map +1 -1
  18. package/dist/core/tree/delta.js.map +1 -1
  19. package/dist/core/tree/detachedFieldIndex.d.ts +7 -13
  20. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  21. package/dist/core/tree/detachedFieldIndex.js +32 -46
  22. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  23. package/dist/core/tree/index.d.ts +1 -0
  24. package/dist/core/tree/index.d.ts.map +1 -1
  25. package/dist/core/tree/index.js.map +1 -1
  26. package/dist/core/tree/visitorUtils.d.ts +2 -4
  27. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  28. package/dist/core/tree/visitorUtils.js +2 -2
  29. package/dist/core/tree/visitorUtils.js.map +1 -1
  30. package/dist/entrypoints/alpha.d.ts +1 -1
  31. package/dist/entrypoints/alpha.d.ts.map +1 -1
  32. package/dist/entrypoints/alpha.js +5 -2
  33. package/dist/entrypoints/alpha.js.map +1 -1
  34. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  35. package/dist/feature-libraries/chunked-forest/uniformChunk.js +10 -2
  36. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  37. package/dist/feature-libraries/comparison-forest/comparisonForest.d.ts +51 -0
  38. package/dist/feature-libraries/comparison-forest/comparisonForest.d.ts.map +1 -0
  39. package/dist/feature-libraries/comparison-forest/comparisonForest.js +98 -0
  40. package/dist/feature-libraries/comparison-forest/comparisonForest.js.map +1 -0
  41. package/dist/feature-libraries/comparison-forest/index.d.ts +6 -0
  42. package/dist/feature-libraries/comparison-forest/index.d.ts.map +1 -0
  43. package/dist/feature-libraries/comparison-forest/index.js +10 -0
  44. package/dist/feature-libraries/comparison-forest/index.js.map +1 -0
  45. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +8 -6
  46. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  47. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +6 -3
  48. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  49. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  50. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  51. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  52. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts +2 -2
  53. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  54. package/dist/feature-libraries/default-schema/noChangeCodecs.js +3 -1
  55. package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  56. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +6 -3
  57. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  58. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +18 -6
  59. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  60. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +2 -3
  61. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  62. package/dist/feature-libraries/forest-summary/forestSummarizer.js +2 -3
  63. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  64. package/dist/feature-libraries/index.d.ts +4 -3
  65. package/dist/feature-libraries/index.d.ts.map +1 -1
  66. package/dist/feature-libraries/index.js +77 -72
  67. package/dist/feature-libraries/index.js.map +1 -1
  68. package/dist/feature-libraries/mitigatedChangeFamily.d.ts +1 -1
  69. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  70. package/dist/feature-libraries/mitigatedChangeFamily.js +12 -0
  71. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  72. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +9 -1
  73. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  74. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  75. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +2 -2
  76. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  77. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  78. package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
  79. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  80. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  81. package/dist/feature-libraries/modular-schema/invert.d.ts +15 -0
  82. package/dist/feature-libraries/modular-schema/invert.d.ts.map +1 -0
  83. package/dist/feature-libraries/modular-schema/invert.js +159 -0
  84. package/dist/feature-libraries/modular-schema/invert.js.map +1 -0
  85. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts +3 -4
  86. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
  87. package/dist/feature-libraries/modular-schema/minimizeModularChange.js +2 -2
  88. package/dist/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
  89. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +9 -9
  90. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  91. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +0 -2
  92. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  93. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +2 -2
  94. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  95. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  96. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  97. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  98. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  99. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -22
  100. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  101. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +53 -406
  102. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  103. package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts +61 -0
  104. package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -0
  105. package/dist/feature-libraries/modular-schema/modularChangeUtils.js +205 -0
  106. package/dist/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -0
  107. package/dist/feature-libraries/modular-schema/prune.d.ts +10 -0
  108. package/dist/feature-libraries/modular-schema/prune.d.ts.map +1 -0
  109. package/dist/feature-libraries/modular-schema/prune.js +49 -0
  110. package/dist/feature-libraries/modular-schema/prune.js.map +1 -0
  111. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +2 -2
  112. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  113. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  114. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -2
  115. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  116. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  117. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  118. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  119. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  120. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +2 -2
  121. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  122. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  123. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +2 -2
  124. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  125. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  126. package/dist/feature-libraries/treeTextCursor.d.ts +15 -0
  127. package/dist/feature-libraries/treeTextCursor.d.ts.map +1 -1
  128. package/dist/feature-libraries/treeTextCursor.js +64 -1
  129. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  130. package/dist/index.d.ts +3 -1
  131. package/dist/index.d.ts.map +1 -1
  132. package/dist/index.js +5 -1
  133. package/dist/index.js.map +1 -1
  134. package/dist/packageVersion.d.ts +1 -1
  135. package/dist/packageVersion.js +1 -1
  136. package/dist/packageVersion.js.map +1 -1
  137. package/dist/shared-tree/serializedChange.d.ts +2 -2
  138. package/dist/shared-tree/serializedChange.d.ts.map +1 -1
  139. package/dist/shared-tree/serializedChange.js.map +1 -1
  140. package/dist/shared-tree/sharedTree.d.ts +6 -3
  141. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  142. package/dist/shared-tree/sharedTree.js +8 -6
  143. package/dist/shared-tree/sharedTree.js.map +1 -1
  144. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +2 -2
  145. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  146. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  147. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +41 -4
  148. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  149. package/dist/shared-tree/sharedTreeChangeFamily.js +57 -1
  150. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  151. package/dist/shared-tree/transactionMinimize.d.ts.map +1 -1
  152. package/dist/shared-tree/transactionMinimize.js +2 -2
  153. package/dist/shared-tree/transactionMinimize.js.map +1 -1
  154. package/dist/shared-tree/transactionPostProcessor.d.ts +2 -1
  155. package/dist/shared-tree/transactionPostProcessor.d.ts.map +1 -1
  156. package/dist/shared-tree/transactionPostProcessor.js.map +1 -1
  157. package/dist/shared-tree/treeCheckout.d.ts +8 -7
  158. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  159. package/dist/shared-tree/treeCheckout.js +1 -1
  160. package/dist/shared-tree/treeCheckout.js.map +1 -1
  161. package/dist/shared-tree-core/branch.d.ts +23 -9
  162. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  163. package/dist/shared-tree-core/branch.js +7 -0
  164. package/dist/shared-tree-core/branch.js.map +1 -1
  165. package/dist/shared-tree-core/editManager.d.ts +4 -4
  166. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  167. package/dist/shared-tree-core/editManager.js +2 -0
  168. package/dist/shared-tree-core/editManager.js.map +1 -1
  169. package/dist/shared-tree-core/editManagerCodecs.d.ts +3 -14
  170. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  171. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  172. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +11 -1
  173. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  174. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  175. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +4 -11
  176. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  177. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  178. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +4 -11
  179. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  180. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  181. package/dist/shared-tree-core/editManagerSummarizer.d.ts +4 -4
  182. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  183. package/dist/shared-tree-core/editManagerSummarizer.js +0 -1
  184. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  185. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
  186. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  187. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  188. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  189. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  190. package/dist/shared-tree-core/messageCodecs.d.ts +8 -1
  191. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  192. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  193. package/dist/shared-tree-core/sharedTreeCore.d.ts +5 -5
  194. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  195. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  196. package/dist/shared-tree-core/transaction.d.ts +10 -10
  197. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  198. package/dist/shared-tree-core/transaction.js +6 -3
  199. package/dist/shared-tree-core/transaction.js.map +1 -1
  200. package/dist/simple-tree/api/eraseSchemaDetails.d.ts +15 -0
  201. package/dist/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -1
  202. package/dist/simple-tree/api/eraseSchemaDetails.js +15 -0
  203. package/dist/simple-tree/api/eraseSchemaDetails.js.map +1 -1
  204. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +21 -2
  205. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  206. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  207. package/dist/simple-tree/node-kinds/map/mapNode.d.ts +13 -0
  208. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  209. package/dist/simple-tree/node-kinds/map/mapNode.js +9 -0
  210. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  211. package/dist/text/textDomain.d.ts +12 -0
  212. package/dist/text/textDomain.d.ts.map +1 -1
  213. package/dist/text/textDomain.js +37 -16
  214. package/dist/text/textDomain.js.map +1 -1
  215. package/dist/text/textDomainFormatted.d.ts +155 -61
  216. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  217. package/dist/text/textDomainFormatted.js +147 -71
  218. package/dist/text/textDomainFormatted.js.map +1 -1
  219. package/dist/text/textDomainFormattedDefault.d.ts +37 -14
  220. package/dist/text/textDomainFormattedDefault.d.ts.map +1 -1
  221. package/dist/text/textDomainFormattedDefault.js +13 -5
  222. package/dist/text/textDomainFormattedDefault.js.map +1 -1
  223. package/dist/treeDataStore.d.ts +49 -0
  224. package/dist/treeDataStore.d.ts.map +1 -0
  225. package/dist/treeDataStore.js +57 -0
  226. package/dist/treeDataStore.js.map +1 -0
  227. package/dist/treeFactory.d.ts +8 -3
  228. package/dist/treeFactory.d.ts.map +1 -1
  229. package/dist/treeFactory.js +6 -1
  230. package/dist/treeFactory.js.map +1 -1
  231. package/lib/core/change-family/changeFamily.d.ts +15 -4
  232. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  233. package/lib/core/change-family/changeFamily.js.map +1 -1
  234. package/lib/core/change-family/editBuilder.d.ts +2 -3
  235. package/lib/core/change-family/editBuilder.d.ts.map +1 -1
  236. package/lib/core/change-family/editBuilder.js +1 -2
  237. package/lib/core/change-family/editBuilder.js.map +1 -1
  238. package/lib/core/change-family/index.d.ts +1 -1
  239. package/lib/core/change-family/index.d.ts.map +1 -1
  240. package/lib/core/change-family/index.js.map +1 -1
  241. package/lib/core/index.d.ts +3 -2
  242. package/lib/core/index.d.ts.map +1 -1
  243. package/lib/core/index.js +1 -1
  244. package/lib/core/index.js.map +1 -1
  245. package/lib/core/tree/delta.d.ts +62 -16
  246. package/lib/core/tree/delta.d.ts.map +1 -1
  247. package/lib/core/tree/delta.js.map +1 -1
  248. package/lib/core/tree/detachedFieldIndex.d.ts +7 -13
  249. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  250. package/lib/core/tree/detachedFieldIndex.js +7 -21
  251. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  252. package/lib/core/tree/index.d.ts +1 -0
  253. package/lib/core/tree/index.d.ts.map +1 -1
  254. package/lib/core/tree/index.js.map +1 -1
  255. package/lib/core/tree/visitorUtils.d.ts +2 -4
  256. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  257. package/lib/core/tree/visitorUtils.js +2 -2
  258. package/lib/core/tree/visitorUtils.js.map +1 -1
  259. package/lib/entrypoints/alpha.d.ts +1 -1
  260. package/lib/entrypoints/alpha.d.ts.map +1 -1
  261. package/lib/entrypoints/alpha.js +1 -1
  262. package/lib/entrypoints/alpha.js.map +1 -1
  263. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  264. package/lib/feature-libraries/chunked-forest/uniformChunk.js +10 -2
  265. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  266. package/lib/feature-libraries/comparison-forest/comparisonForest.d.ts +51 -0
  267. package/lib/feature-libraries/comparison-forest/comparisonForest.d.ts.map +1 -0
  268. package/lib/feature-libraries/comparison-forest/comparisonForest.js +94 -0
  269. package/lib/feature-libraries/comparison-forest/comparisonForest.js.map +1 -0
  270. package/lib/feature-libraries/comparison-forest/index.d.ts +6 -0
  271. package/lib/feature-libraries/comparison-forest/index.d.ts.map +1 -0
  272. package/lib/feature-libraries/comparison-forest/index.js +6 -0
  273. package/lib/feature-libraries/comparison-forest/index.js.map +1 -0
  274. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +8 -6
  275. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  276. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +6 -3
  277. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  278. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  279. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  280. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  281. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts +2 -2
  282. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  283. package/lib/feature-libraries/default-schema/noChangeCodecs.js +3 -1
  284. package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  285. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +6 -3
  286. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  287. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +16 -4
  288. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  289. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +2 -3
  290. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  291. package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -3
  292. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  293. package/lib/feature-libraries/index.d.ts +4 -3
  294. package/lib/feature-libraries/index.d.ts.map +1 -1
  295. package/lib/feature-libraries/index.js +2 -1
  296. package/lib/feature-libraries/index.js.map +1 -1
  297. package/lib/feature-libraries/mitigatedChangeFamily.d.ts +1 -1
  298. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  299. package/lib/feature-libraries/mitigatedChangeFamily.js +12 -0
  300. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  301. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +9 -1
  302. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  303. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  304. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +2 -2
  305. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  306. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  307. package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
  308. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  309. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  310. package/lib/feature-libraries/modular-schema/invert.d.ts +15 -0
  311. package/lib/feature-libraries/modular-schema/invert.d.ts.map +1 -0
  312. package/lib/feature-libraries/modular-schema/invert.js +155 -0
  313. package/lib/feature-libraries/modular-schema/invert.js.map +1 -0
  314. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts +3 -4
  315. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
  316. package/lib/feature-libraries/modular-schema/minimizeModularChange.js +2 -2
  317. package/lib/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
  318. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +9 -9
  319. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  320. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +0 -2
  321. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  322. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +2 -2
  323. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  324. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  325. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  326. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  327. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  328. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -22
  329. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  330. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +16 -367
  331. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  332. package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts +61 -0
  333. package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -0
  334. package/lib/feature-libraries/modular-schema/modularChangeUtils.js +192 -0
  335. package/lib/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -0
  336. package/lib/feature-libraries/modular-schema/prune.d.ts +10 -0
  337. package/lib/feature-libraries/modular-schema/prune.d.ts.map +1 -0
  338. package/lib/feature-libraries/modular-schema/prune.js +45 -0
  339. package/lib/feature-libraries/modular-schema/prune.js.map +1 -0
  340. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +2 -2
  341. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  342. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  343. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -2
  344. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  345. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  346. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  347. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  348. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  349. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +2 -2
  350. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  351. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  352. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +2 -2
  353. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  354. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  355. package/lib/feature-libraries/treeTextCursor.d.ts +15 -0
  356. package/lib/feature-libraries/treeTextCursor.d.ts.map +1 -1
  357. package/lib/feature-libraries/treeTextCursor.js +62 -1
  358. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  359. package/lib/index.d.ts +3 -1
  360. package/lib/index.d.ts.map +1 -1
  361. package/lib/index.js +2 -1
  362. package/lib/index.js.map +1 -1
  363. package/lib/packageVersion.d.ts +1 -1
  364. package/lib/packageVersion.js +1 -1
  365. package/lib/packageVersion.js.map +1 -1
  366. package/lib/shared-tree/serializedChange.d.ts +2 -2
  367. package/lib/shared-tree/serializedChange.d.ts.map +1 -1
  368. package/lib/shared-tree/serializedChange.js.map +1 -1
  369. package/lib/shared-tree/sharedTree.d.ts +6 -3
  370. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  371. package/lib/shared-tree/sharedTree.js +9 -7
  372. package/lib/shared-tree/sharedTree.js.map +1 -1
  373. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +2 -2
  374. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  375. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  376. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +41 -4
  377. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  378. package/lib/shared-tree/sharedTreeChangeFamily.js +55 -0
  379. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  380. package/lib/shared-tree/transactionMinimize.d.ts.map +1 -1
  381. package/lib/shared-tree/transactionMinimize.js +3 -3
  382. package/lib/shared-tree/transactionMinimize.js.map +1 -1
  383. package/lib/shared-tree/transactionPostProcessor.d.ts +2 -1
  384. package/lib/shared-tree/transactionPostProcessor.d.ts.map +1 -1
  385. package/lib/shared-tree/transactionPostProcessor.js.map +1 -1
  386. package/lib/shared-tree/treeCheckout.d.ts +8 -7
  387. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  388. package/lib/shared-tree/treeCheckout.js +1 -1
  389. package/lib/shared-tree/treeCheckout.js.map +1 -1
  390. package/lib/shared-tree-core/branch.d.ts +23 -9
  391. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  392. package/lib/shared-tree-core/branch.js +7 -0
  393. package/lib/shared-tree-core/branch.js.map +1 -1
  394. package/lib/shared-tree-core/editManager.d.ts +4 -4
  395. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  396. package/lib/shared-tree-core/editManager.js +2 -0
  397. package/lib/shared-tree-core/editManager.js.map +1 -1
  398. package/lib/shared-tree-core/editManagerCodecs.d.ts +3 -14
  399. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  400. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  401. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +11 -1
  402. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  403. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  404. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +4 -11
  405. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  406. package/lib/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
  407. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  408. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +4 -11
  409. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  410. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
  411. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  412. package/lib/shared-tree-core/editManagerSummarizer.d.ts +4 -4
  413. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  414. package/lib/shared-tree-core/editManagerSummarizer.js +0 -1
  415. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  416. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
  417. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  418. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  419. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  420. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  421. package/lib/shared-tree-core/messageCodecs.d.ts +8 -1
  422. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  423. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  424. package/lib/shared-tree-core/sharedTreeCore.d.ts +5 -5
  425. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  426. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  427. package/lib/shared-tree-core/transaction.d.ts +10 -10
  428. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  429. package/lib/shared-tree-core/transaction.js +6 -3
  430. package/lib/shared-tree-core/transaction.js.map +1 -1
  431. package/lib/simple-tree/api/eraseSchemaDetails.d.ts +15 -0
  432. package/lib/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -1
  433. package/lib/simple-tree/api/eraseSchemaDetails.js +15 -0
  434. package/lib/simple-tree/api/eraseSchemaDetails.js.map +1 -1
  435. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +21 -2
  436. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  437. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  438. package/lib/simple-tree/node-kinds/map/mapNode.d.ts +13 -0
  439. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  440. package/lib/simple-tree/node-kinds/map/mapNode.js +9 -0
  441. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  442. package/lib/text/textDomain.d.ts +12 -0
  443. package/lib/text/textDomain.d.ts.map +1 -1
  444. package/lib/text/textDomain.js +34 -15
  445. package/lib/text/textDomain.js.map +1 -1
  446. package/lib/text/textDomainFormatted.d.ts +155 -61
  447. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  448. package/lib/text/textDomainFormatted.js +148 -73
  449. package/lib/text/textDomainFormatted.js.map +1 -1
  450. package/lib/text/textDomainFormattedDefault.d.ts +37 -14
  451. package/lib/text/textDomainFormattedDefault.d.ts.map +1 -1
  452. package/lib/text/textDomainFormattedDefault.js +14 -6
  453. package/lib/text/textDomainFormattedDefault.js.map +1 -1
  454. package/lib/treeDataStore.d.ts +49 -0
  455. package/lib/treeDataStore.d.ts.map +1 -0
  456. package/lib/treeDataStore.js +52 -0
  457. package/lib/treeDataStore.js.map +1 -0
  458. package/lib/treeFactory.d.ts +8 -3
  459. package/lib/treeFactory.d.ts.map +1 -1
  460. package/lib/treeFactory.js +5 -0
  461. package/lib/treeFactory.js.map +1 -1
  462. package/package.json +25 -24
  463. package/src/core/change-family/changeFamily.ts +32 -4
  464. package/src/core/change-family/editBuilder.ts +1 -2
  465. package/src/core/change-family/index.ts +2 -0
  466. package/src/core/index.ts +9 -6
  467. package/src/core/tree/delta.ts +62 -16
  468. package/src/core/tree/detachedFieldIndex.ts +7 -38
  469. package/src/core/tree/index.ts +2 -0
  470. package/src/core/tree/visitorUtils.ts +3 -17
  471. package/src/entrypoints/alpha.ts +7 -3
  472. package/src/feature-libraries/chunked-forest/uniformChunk.ts +11 -1
  473. package/src/feature-libraries/comparison-forest/comparisonForest.ts +140 -0
  474. package/src/feature-libraries/comparison-forest/index.ts +6 -0
  475. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +20 -6
  476. package/src/feature-libraries/default-schema/index.ts +1 -0
  477. package/src/feature-libraries/default-schema/noChangeCodecs.ts +11 -3
  478. package/src/feature-libraries/detachedFieldIndexSummarizer.ts +33 -5
  479. package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -3
  480. package/src/feature-libraries/index.ts +5 -0
  481. package/src/feature-libraries/mitigatedChangeFamily.ts +21 -3
  482. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +10 -1
  483. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +9 -4
  484. package/src/feature-libraries/modular-schema/index.ts +1 -0
  485. package/src/feature-libraries/modular-schema/invert.ts +338 -0
  486. package/src/feature-libraries/modular-schema/minimizeModularChange.ts +3 -5
  487. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +16 -13
  488. package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +3 -1
  489. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +2 -1
  490. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +45 -644
  491. package/src/feature-libraries/modular-schema/modularChangeUtils.ts +340 -0
  492. package/src/feature-libraries/modular-schema/prune.ts +69 -0
  493. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +4 -2
  494. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +5 -2
  495. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +4 -2
  496. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +4 -2
  497. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +6 -3
  498. package/src/feature-libraries/treeTextCursor.ts +66 -1
  499. package/src/index.ts +4 -0
  500. package/src/packageVersion.ts +1 -1
  501. package/src/shared-tree/serializedChange.ts +2 -2
  502. package/src/shared-tree/sharedTree.ts +34 -14
  503. package/src/shared-tree/sharedTreeChangeCodecs.ts +11 -3
  504. package/src/shared-tree/sharedTreeChangeFamily.ts +77 -2
  505. package/src/shared-tree/transactionMinimize.ts +7 -3
  506. package/src/shared-tree/transactionPostProcessor.ts +5 -1
  507. package/src/shared-tree/treeCheckout.ts +55 -16
  508. package/src/shared-tree-core/branch.ts +40 -12
  509. package/src/shared-tree-core/editManager.ts +46 -25
  510. package/src/shared-tree-core/editManagerCodecs.ts +9 -21
  511. package/src/shared-tree-core/editManagerCodecsCommons.ts +14 -2
  512. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +18 -21
  513. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +18 -20
  514. package/src/shared-tree-core/editManagerSummarizer.ts +9 -6
  515. package/src/shared-tree-core/messageCodecV1ToV4.ts +3 -3
  516. package/src/shared-tree-core/messageCodecVSharedBranches.ts +2 -2
  517. package/src/shared-tree-core/messageCodecs.ts +12 -2
  518. package/src/shared-tree-core/sharedTreeCore.ts +15 -6
  519. package/src/shared-tree-core/transaction.ts +47 -25
  520. package/src/simple-tree/api/eraseSchemaDetails.ts +15 -0
  521. package/src/simple-tree/node-kinds/array/arrayNode.ts +21 -2
  522. package/src/simple-tree/node-kinds/map/mapNode.ts +24 -2
  523. package/src/text/textDomain.ts +29 -6
  524. package/src/text/textDomainFormatted.ts +351 -134
  525. package/src/text/textDomainFormattedDefault.ts +25 -16
  526. package/src/treeDataStore.ts +125 -0
  527. package/src/treeFactory.ts +11 -3
@@ -1 +1 @@
1
- {"version":3,"file":"sequenceFieldCodecV3.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,4BAA4B,GAG5B,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EACN,oBAAoB,GAEpB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,SAAS,IAAI,eAAe,EAAgB,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,UAAU,WAAW,CAC1B,gBAIC;IAOD,MAAM,EACL,iBAAiB,EAAE,WAAW,EAC9B,eAAe,EAAE,iBAAiB,EAClC,cAAc,EAAE,gBAAgB,GAChC,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAEzC,MAAM,eAAe,GAKjB;QACH,MAAM,CAAC,MAAkB,EAAE,OAA8B;YACxD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;YACzB,QAAQ,IAAI,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right (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport {\n\tDiscriminatedUnionDispatcher,\n\ttype IJsonCodec,\n\ttype JsonCodecPart,\n} from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tRevisionTag,\n\tRevisionTagSchema,\n} from \"../../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport {\n\tEncodedNodeChangeset,\n\ttype FieldChangeEncodingContext,\n} from \"../modular-schema/index.js\";\n\nimport { Changeset as ChangesetSchema, type Encoded } from \"./formatV3.js\";\nimport { makeV2CodecHelpers } from \"./sequenceFieldCodecV2.js\";\nimport type { Changeset, Mark, MarkEffect, Rename } from \"./types.js\";\nimport { isNoopMark } from \"./utils.js\";\n\nexport function makeV3Codec(\n\trevisionTagCodec: JsonCodecPart<\n\t\tRevisionTag,\n\t\ttypeof RevisionTagSchema,\n\t\tChangeEncodingContext\n\t>,\n): IJsonCodec<\n\tChangeset,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tFieldChangeEncodingContext\n> {\n\tconst {\n\t\tchangeAtomIdCodec: atomIdCodec,\n\t\tmarkEffectCodec: markEffectV2Codec,\n\t\tdecoderLibrary: decoderLibraryV2,\n\t} = makeV2CodecHelpers(revisionTagCodec);\n\n\tconst markEffectCodec: IJsonCodec<\n\t\tMarkEffect,\n\t\tEncoded.MarkEffect,\n\t\tEncoded.MarkEffect,\n\t\tChangeEncodingContext\n\t> = {\n\t\tencode(effect: MarkEffect, context: ChangeEncodingContext): Encoded.MarkEffect {\n\t\t\tconst type = effect.type;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"Rename\": {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trename: {\n\t\t\t\t\t\t\tidOverride: atomIdCodec.encode(effect.idOverride, context),\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn markEffectV2Codec.encode(effect, context);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdecode(encoded: Encoded.MarkEffect, context: ChangeEncodingContext): MarkEffect {\n\t\t\treturn decoderLibrary.dispatch(encoded, context);\n\t\t},\n\t};\n\n\tconst decoderLibrary = new DiscriminatedUnionDispatcher<\n\t\tEncoded.MarkEffect,\n\t\t/* args */ [context: ChangeEncodingContext],\n\t\tMarkEffect\n\t>({\n\t\t...decoderLibraryV2,\n\t\trename(encoded: Encoded.Rename, context: ChangeEncodingContext): Rename {\n\t\t\treturn {\n\t\t\t\ttype: \"Rename\",\n\t\t\t\tidOverride: atomIdCodec.decode(encoded.idOverride, context),\n\t\t\t};\n\t\t},\n\t});\n\n\t/**\n\t * If we want to make the node change aspect of this codec more type-safe, we could adjust generics\n\t * to be in terms of the schema rather than the concrete type of the node change.\n\t */\n\ttype NodeChangeSchema = TAnySchema;\n\n\treturn {\n\t\tencode: (\n\t\t\tchangeset: Changeset,\n\t\t\tcontext: FieldChangeEncodingContext,\n\t\t): JsonCompatibleReadOnly & Encoded.Changeset<NodeChangeSchema> => {\n\t\t\tconst jsonMarks: Encoded.Changeset<NodeChangeSchema> = [];\n\t\t\tfor (const mark of changeset) {\n\t\t\t\tconst encodedMark: Encoded.Mark<NodeChangeSchema> = {\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t};\n\t\t\t\tif (!isNoopMark(mark)) {\n\t\t\t\t\tencodedMark.effect = markEffectCodec.encode(mark, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.cellId !== undefined) {\n\t\t\t\t\tencodedMark.cellId = atomIdCodec.encode(mark.cellId, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.changes !== undefined) {\n\t\t\t\t\tencodedMark.changes = context.encodeNode(mark.changes);\n\t\t\t\t}\n\t\t\t\tjsonMarks.push(encodedMark);\n\t\t\t}\n\t\t\treturn jsonMarks;\n\t\t},\n\t\tdecode: (\n\t\t\tchangeset: Encoded.Changeset<NodeChangeSchema>,\n\t\t\tcontext: FieldChangeEncodingContext,\n\t\t): Changeset => {\n\t\t\tconst marks: Changeset = [];\n\t\t\tfor (const mark of changeset) {\n\t\t\t\tconst decodedMark: Mark = {\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t};\n\n\t\t\t\tif (mark.effect !== undefined) {\n\t\t\t\t\tObject.assign(decodedMark, markEffectCodec.decode(mark.effect, context.baseContext));\n\t\t\t\t}\n\t\t\t\tif (mark.cellId !== undefined) {\n\t\t\t\t\tdecodedMark.cellId = atomIdCodec.decode(mark.cellId, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.changes !== undefined) {\n\t\t\t\t\tdecodedMark.changes = context.decodeNode(mark.changes);\n\t\t\t\t}\n\t\t\t\tmarks.push(decodedMark);\n\t\t\t}\n\t\t\treturn marks;\n\t\t},\n\t\tencodedSchema: ChangesetSchema(EncodedNodeChangeset),\n\t};\n}\n"]}
1
+ {"version":3,"file":"sequenceFieldCodecV3.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,4BAA4B,GAG5B,MAAM,sBAAsB,CAAC;AAO9B,OAAO,EACN,oBAAoB,GAGpB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,SAAS,IAAI,eAAe,EAAgB,MAAM,eAAe,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,UAAU,WAAW,CAC1B,gBAIC;IAQD,MAAM,EACL,iBAAiB,EAAE,WAAW,EAC9B,eAAe,EAAE,iBAAiB,EAClC,cAAc,EAAE,gBAAgB,GAChC,GAAG,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IAEzC,MAAM,eAAe,GAKjB;QACH,MAAM,CAAC,MAAkB,EAAE,OAA8B;YAC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,CAAC,oBAAoB,CAAC;KACpD,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TAnySchema } from \"@sinclair/typebox\";\n\nimport {\n\tDiscriminatedUnionDispatcher,\n\ttype IJsonCodec,\n\ttype JsonCodecPart,\n} from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tRevisionTag,\n\tRevisionTagSchema,\n} from \"../../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport {\n\tEncodedNodeChangeset,\n\ttype FieldChangeEncodingContext,\n\ttype FieldChangeDecodingContext,\n} from \"../modular-schema/index.js\";\n\nimport { Changeset as ChangesetSchema, type Encoded } from \"./formatV3.js\";\nimport { makeV2CodecHelpers } from \"./sequenceFieldCodecV2.js\";\nimport type { Changeset, Mark, MarkEffect, Rename } from \"./types.js\";\nimport { isNoopMark } from \"./utils.js\";\n\nexport function makeV3Codec(\n\trevisionTagCodec: JsonCodecPart<\n\t\tRevisionTag,\n\t\ttypeof RevisionTagSchema,\n\t\tChangeEncodingContext\n\t>,\n): IJsonCodec<\n\tChangeset,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnly,\n\tFieldChangeEncodingContext,\n\tFieldChangeDecodingContext\n> {\n\tconst {\n\t\tchangeAtomIdCodec: atomIdCodec,\n\t\tmarkEffectCodec: markEffectV2Codec,\n\t\tdecoderLibrary: decoderLibraryV2,\n\t} = makeV2CodecHelpers(revisionTagCodec);\n\n\tconst markEffectCodec: IJsonCodec<\n\t\tMarkEffect,\n\t\tEncoded.MarkEffect,\n\t\tEncoded.MarkEffect,\n\t\tChangeEncodingContext\n\t> = {\n\t\tencode(effect: MarkEffect, context: ChangeEncodingContext): Encoded.MarkEffect {\n\t\t\tconst type = effect.type;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"Rename\": {\n\t\t\t\t\treturn {\n\t\t\t\t\t\trename: {\n\t\t\t\t\t\t\tidOverride: atomIdCodec.encode(effect.idOverride, context),\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn markEffectV2Codec.encode(effect, context);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tdecode(encoded: Encoded.MarkEffect, context: ChangeEncodingContext): MarkEffect {\n\t\t\treturn decoderLibrary.dispatch(encoded, context);\n\t\t},\n\t};\n\n\tconst decoderLibrary = new DiscriminatedUnionDispatcher<\n\t\tEncoded.MarkEffect,\n\t\t/* args */ [context: ChangeEncodingContext],\n\t\tMarkEffect\n\t>({\n\t\t...decoderLibraryV2,\n\t\trename(encoded: Encoded.Rename, context: ChangeEncodingContext): Rename {\n\t\t\treturn {\n\t\t\t\ttype: \"Rename\",\n\t\t\t\tidOverride: atomIdCodec.decode(encoded.idOverride, context),\n\t\t\t};\n\t\t},\n\t});\n\n\t/**\n\t * If we want to make the node change aspect of this codec more type-safe, we could adjust generics\n\t * to be in terms of the schema rather than the concrete type of the node change.\n\t */\n\ttype NodeChangeSchema = TAnySchema;\n\n\treturn {\n\t\tencode: (\n\t\t\tchangeset: Changeset,\n\t\t\tcontext: FieldChangeEncodingContext,\n\t\t): JsonCompatibleReadOnly & Encoded.Changeset<NodeChangeSchema> => {\n\t\t\tconst jsonMarks: Encoded.Changeset<NodeChangeSchema> = [];\n\t\t\tfor (const mark of changeset) {\n\t\t\t\tconst encodedMark: Encoded.Mark<NodeChangeSchema> = {\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t};\n\t\t\t\tif (!isNoopMark(mark)) {\n\t\t\t\t\tencodedMark.effect = markEffectCodec.encode(mark, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.cellId !== undefined) {\n\t\t\t\t\tencodedMark.cellId = atomIdCodec.encode(mark.cellId, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.changes !== undefined) {\n\t\t\t\t\tencodedMark.changes = context.encodeNode(mark.changes);\n\t\t\t\t}\n\t\t\t\tjsonMarks.push(encodedMark);\n\t\t\t}\n\t\t\treturn jsonMarks;\n\t\t},\n\t\tdecode: (\n\t\t\tchangeset: Encoded.Changeset<NodeChangeSchema>,\n\t\t\tcontext: FieldChangeDecodingContext,\n\t\t): Changeset => {\n\t\t\tconst marks: Changeset = [];\n\t\t\tfor (const mark of changeset) {\n\t\t\t\tconst decodedMark: Mark = {\n\t\t\t\t\tcount: mark.count,\n\t\t\t\t};\n\n\t\t\t\tif (mark.effect !== undefined) {\n\t\t\t\t\tObject.assign(decodedMark, markEffectCodec.decode(mark.effect, context.baseContext));\n\t\t\t\t}\n\t\t\t\tif (mark.cellId !== undefined) {\n\t\t\t\t\tdecodedMark.cellId = atomIdCodec.decode(mark.cellId, context.baseContext);\n\t\t\t\t}\n\t\t\t\tif (mark.changes !== undefined) {\n\t\t\t\t\tdecodedMark.changes = context.decodeNode(mark.changes);\n\t\t\t\t}\n\t\t\t\tmarks.push(decodedMark);\n\t\t\t}\n\t\t\treturn marks;\n\t\t},\n\t\tencodedSchema: ChangesetSchema(EncodedNodeChangeset),\n\t};\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { type JsonCodecPart, type ICodecFamily } from "../../codec/index.js";
6
6
  import type { ChangeEncodingContext, RevisionTag, RevisionTagSchema } from "../../core/index.js";
7
- import type { FieldChangeEncodingContext } from "../modular-schema/index.js";
7
+ import type { FieldChangeEncodingContext, FieldChangeDecodingContext } from "../modular-schema/index.js";
8
8
  import type { MarkList } from "./types.js";
9
- export declare const sequenceFieldChangeCodecFactory: (revisionTagCodec: JsonCodecPart<RevisionTag, typeof RevisionTagSchema, ChangeEncodingContext>) => ICodecFamily<MarkList, FieldChangeEncodingContext>;
9
+ export declare const sequenceFieldChangeCodecFactory: (revisionTagCodec: JsonCodecPart<RevisionTag, typeof RevisionTagSchema, ChangeEncodingContext>) => ICodecFamily<MarkList, FieldChangeEncodingContext, FieldChangeDecodingContext>;
10
10
  //# sourceMappingURL=sequenceFieldCodecs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sequenceFieldCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,aAAa,EAAmB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,KAAK,EACX,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAI7E,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtD,eAAO,MAAM,+BAA+B,qBACzB,cACjB,WAAW,EACX,wBAAwB,EACxB,qBAAqB,CACrB,KACC,aAAa,QAAQ,EAAE,0BAA0B,CAIjD,CAAC"}
1
+ {"version":3,"file":"sequenceFieldCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,aAAa,EAAmB,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,KAAK,EACX,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,0BAA0B,EAC1B,0BAA0B,EAC1B,MAAM,4BAA4B,CAAC;AAIpC,OAAO,KAAK,EAAa,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtD,eAAO,MAAM,+BAA+B,qBACzB,cACjB,WAAW,EACX,wBAAwB,EACxB,qBAAqB,CACrB,KACC,aAAa,QAAQ,EAAE,0BAA0B,EAAE,0BAA0B,CAI7E,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"sequenceFieldCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,eAAe,EAAqB,MAAM,sBAAsB,CAAC;AAQ9F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC9C,gBAIC,EACoD,EAAE,CACvD,eAAe,CAAwC;IACtD,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAClC,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;CAClC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type JsonCodecPart, makeCodecFamily, type ICodecFamily } from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tRevisionTag,\n\tRevisionTagSchema,\n} from \"../../core/index.js\";\nimport type { FieldChangeEncodingContext } from \"../modular-schema/index.js\";\n\nimport { makeV2Codec } from \"./sequenceFieldCodecV2.js\";\nimport { makeV3Codec } from \"./sequenceFieldCodecV3.js\";\nimport type { Changeset, MarkList } from \"./types.js\";\n\nexport const sequenceFieldChangeCodecFactory = (\n\trevisionTagCodec: JsonCodecPart<\n\t\tRevisionTag,\n\t\ttypeof RevisionTagSchema,\n\t\tChangeEncodingContext\n\t>,\n): ICodecFamily<MarkList, FieldChangeEncodingContext> =>\n\tmakeCodecFamily<Changeset, FieldChangeEncodingContext>([\n\t\t[2, makeV2Codec(revisionTagCodec)],\n\t\t[3, makeV3Codec(revisionTagCodec)],\n\t]);\n"]}
1
+ {"version":3,"file":"sequenceFieldCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/sequenceFieldCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,eAAe,EAAqB,MAAM,sBAAsB,CAAC;AAW9F,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAC9C,gBAIC,EACgF,EAAE,CACnF,eAAe,CAAoE;IAClF,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;IAClC,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;CAClC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type JsonCodecPart, makeCodecFamily, type ICodecFamily } from \"../../codec/index.js\";\nimport type {\n\tChangeEncodingContext,\n\tRevisionTag,\n\tRevisionTagSchema,\n} from \"../../core/index.js\";\nimport type {\n\tFieldChangeEncodingContext,\n\tFieldChangeDecodingContext,\n} from \"../modular-schema/index.js\";\n\nimport { makeV2Codec } from \"./sequenceFieldCodecV2.js\";\nimport { makeV3Codec } from \"./sequenceFieldCodecV3.js\";\nimport type { Changeset, MarkList } from \"./types.js\";\n\nexport const sequenceFieldChangeCodecFactory = (\n\trevisionTagCodec: JsonCodecPart<\n\t\tRevisionTag,\n\t\ttypeof RevisionTagSchema,\n\t\tChangeEncodingContext\n\t>,\n): ICodecFamily<MarkList, FieldChangeEncodingContext, FieldChangeDecodingContext> =>\n\tmakeCodecFamily<Changeset, FieldChangeEncodingContext, FieldChangeDecodingContext>([\n\t\t[2, makeV2Codec(revisionTagCodec)],\n\t\t[3, makeV3Codec(revisionTagCodec)],\n\t]);\n"]}
@@ -57,4 +57,19 @@ export declare function jsonableTreeFromFieldCursor(cursor: ITreeCursor): Jsonab
57
57
  * its intended for debugging and testing purposes when forest content is needed in a human readable serializable format.
58
58
  */
59
59
  export declare function jsonableTreeFromForest(forest: IForestSubscription): JsonableTree[];
60
+ /**
61
+ * Returns true if `a` and `b` have identical content, including all detached/removed fields.
62
+ * @remarks
63
+ * Only content is compared: schema, anchors and other forest state are ignored.
64
+ * This is intended for debugging and testing, and is not optimized.
65
+ */
66
+ export declare function forestsEqual(a: IForestSubscription, b: IForestSubscription): boolean;
67
+ /**
68
+ * Asserts that `a` and `b` have identical content, including all detached/removed fields.
69
+ * @remarks
70
+ * Only content is compared: schema, anchors and other forest state are ignored.
71
+ * This is intended for debugging and testing, and is not optimized.
72
+ * @throws an Error if the forests differ.
73
+ */
74
+ export declare function assertForestsEqual(a: IForestSubscription, b: IForestSubscription): void;
60
75
  //# sourceMappingURL=treeTextCursor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"treeTextCursor.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/treeTextCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EASjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,KAAK,aAAa,EAGlB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,YAAY,GAAG,sBAAsB,CAEpF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACzC,KAAK,EAAE,YAAY,EAAE,EACrB,aAAa,GAAE,aAAyB,GACtC,sBAAsB,CAOxB;AAED,eAAO,MAAM,OAAO,EAAE,aAAa,CAAC,YAAY,CAM/C,CAAC;AAEF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,CAkBxE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,EAAE,CAG/E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,GAAG,YAAY,EAAE,CAMlF"}
1
+ {"version":3,"file":"treeTextCursor.d.ts","sourceRoot":"","sources":["../../src/feature-libraries/treeTextCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,YAAY,EASjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,KAAK,aAAa,EAGlB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,YAAY,GAAG,sBAAsB,CAEpF;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACzC,KAAK,EAAE,YAAY,EAAE,EACrB,aAAa,GAAE,aAAyB,GACtC,sBAAsB,CAOxB;AAED,eAAO,MAAM,OAAO,EAAE,aAAa,CAAC,YAAY,CAM/C,CAAC;AAEF;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,CAkBxE;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,WAAW,GAAG,YAAY,EAAE,CAG/E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,mBAAmB,GAAG,YAAY,EAAE,CAMlF;AA4CD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAEpF;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAIvF"}
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { assert } from "@fluidframework/core-utils/internal";
5
+ import { assert, fail, oob } from "@fluidframework/core-utils/internal";
6
6
  import { aboveRootPlaceholder, detachedFieldAsKey, genericTreeKeys, getGenericTreeField, mapCursorField, moveToDetachedField, rootField, setGenericTreeField, } from "../core/index.js";
7
7
  import { stackTreeFieldCursor, stackTreeNodeCursor, } from "./treeCursorUtils.js";
8
8
  /**
@@ -93,4 +93,65 @@ export function jsonableTreeFromForest(forest) {
93
93
  readCursor.free();
94
94
  return jsonable;
95
95
  }
96
+ /**
97
+ * The full content of `forest` (every detached/removed field) as a single {@link JsonableTree}.
98
+ * @remarks
99
+ * The returned node is the forest's above-root placeholder: its fields are the forest's detached fields.
100
+ * Only content is captured: schema, anchors and other forest state are not.
101
+ */
102
+ function forestContent(forest) {
103
+ return jsonableTreeFromCursor(forest.getCursorAboveDetachedFields());
104
+ }
105
+ /**
106
+ * Structural equality of two {@link JsonableTree}s, comparing type, value and fields recursively.
107
+ * @remarks
108
+ * Fields are compared as an unordered set of keys, so this is independent of the order in which different
109
+ * forest implementations enumerate fields. The nodes within each field are compared in order.
110
+ */
111
+ function treesEqual(a, b) {
112
+ if (a.type !== b.type || !Object.is(a.value, b.value)) {
113
+ return false;
114
+ }
115
+ // JsonableTree never stores empty fields, so equal key counts plus a matching field for every key in
116
+ // `a` implies `b` has no extra fields.
117
+ const aKeys = genericTreeKeys(a);
118
+ if (aKeys.length !== genericTreeKeys(b).length) {
119
+ return false;
120
+ }
121
+ for (const key of aKeys) {
122
+ const aField = getGenericTreeField(a, key, false);
123
+ const bField = getGenericTreeField(b, key, false);
124
+ if (aField.length !== bField.length) {
125
+ return false;
126
+ }
127
+ for (const [index, aChild] of aField.entries()) {
128
+ const bChild = bField[index] ?? oob();
129
+ if (!treesEqual(aChild, bChild)) {
130
+ return false;
131
+ }
132
+ }
133
+ }
134
+ return true;
135
+ }
136
+ /**
137
+ * Returns true if `a` and `b` have identical content, including all detached/removed fields.
138
+ * @remarks
139
+ * Only content is compared: schema, anchors and other forest state are ignored.
140
+ * This is intended for debugging and testing, and is not optimized.
141
+ */
142
+ export function forestsEqual(a, b) {
143
+ return treesEqual(forestContent(a), forestContent(b));
144
+ }
145
+ /**
146
+ * Asserts that `a` and `b` have identical content, including all detached/removed fields.
147
+ * @remarks
148
+ * Only content is compared: schema, anchors and other forest state are ignored.
149
+ * This is intended for debugging and testing, and is not optimized.
150
+ * @throws an Error if the forests differ.
151
+ */
152
+ export function assertForestsEqual(a, b) {
153
+ if (!forestsEqual(a, b)) {
154
+ fail(0xd10 /* Forests are not equal */);
155
+ }
156
+ }
96
157
  //# sourceMappingURL=treeTextCursor.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"treeTextCursor.js","sourceRoot":"","sources":["../../src/feature-libraries/treeTextCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAE7D,OAAO,EAON,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,SAAS,EACT,mBAAmB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEN,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,yBAAyB,CAAC,IAAkB;IAC3D,OAAO,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACzC,KAAqB,EACrB,gBAA+B,SAAS;IAExC,MAAM,GAAG,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAC9C,OAAO,oBAAoB,CAC1B,OAAO,EACP,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,EACxD,aAAa,CACb,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAgC;IACnD,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,C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mBAAmB,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,2BAA2B,CAAC,UAAU,CAAC,CAAC;IACzD,UAAU,CAAC,IAAI,EAAE,CAAC;IAClB,OAAO,QAAQ,CAAC;AACjB,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 {\n\tCursorLocationType,\n\ttype DetachedField,\n\ttype IForestSubscription,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\ttype JsonableTree,\n\taboveRootPlaceholder,\n\tdetachedFieldAsKey,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tmapCursorField,\n\tmoveToDetachedField,\n\trootField,\n\tsetGenericTreeField,\n} from \"../core/index.js\";\n\nimport {\n\ttype CursorAdapter,\n\tstackTreeFieldCursor,\n\tstackTreeNodeCursor,\n} from \"./treeCursorUtils.js\";\n\n/**\n * This module provides support for reading and writing a human readable (and\n * editable) tree format.\n *\n * This implementation can handle all trees (so it does not need a fallback for any special cases),\n * and is not optimized.\n *\n * It's suitable for testing and debugging,\n * though it could also reasonably be used as a fallback for edge cases or for small trees.\n *\n * TODO: Use placeholders.\n * build / add operations should be able to include detached ranges instead of children directly.\n * summaries should be able to reference unloaded chunks instead of having children directly.\n * Leverage placeholders in the types below to accomplish this.\n * Determine how this relates to Cursor: should cursor be generic over placeholder values?\n * (Could use them for errors to allow non erroring cursors?)\n *\n * Note:\n * Currently a lot of Tree's codebase is using json for serialization.\n * Because putting json strings inside json works poorly (adds lots of escaping),\n * for now this library actually outputs and inputs the Json compatible type JsonableTree\n * rather than actual strings.\n */\n\n/**\n * Create a cursor, in `nodes` mode at the root of the provided tree.\n *\n * @returns an {@link ITreeCursorSynchronous} in nodes mode for a single {@link JsonableTree}.\n * @remarks\n * Do not confuse this with {@link JsonableTree} with the JSON domain:\n * this takes in data in a specific format that is json compatible (except for FluidHandle values).\n * That is distinct from treating arbitrary JSON data as a tree in the JSON domain.\n */\nexport function cursorForJsonableTreeNode(root: JsonableTree): ITreeCursorSynchronous {\n\treturn stackTreeNodeCursor(adapter, root);\n}\n\n/**\n * Creates an {@link ITreeCursorSynchronous} in fields mode for a JsonableTree field.\n */\nexport function cursorForJsonableTreeField(\n\ttrees: JsonableTree[],\n\tdetachedField: DetachedField = rootField,\n): ITreeCursorSynchronous {\n\tconst key = detachedFieldAsKey(detachedField);\n\treturn stackTreeFieldCursor(\n\t\tadapter,\n\t\t{ type: aboveRootPlaceholder, fields: { [key]: trees } },\n\t\tdetachedField,\n\t);\n}\n\nexport const adapter: CursorAdapter<JsonableTree> = {\n\tvalue: (node) => node.value,\n\ttype: (node) => node.type,\n\tkeysFromNode: genericTreeKeys,\n\tgetFieldFromNode: (node, key): readonly JsonableTree[] =>\n\t\tgetGenericTreeField(node, key, false),\n};\n\n/**\n * Extract a JsonableTree from the contents of the given ITreeCursor's current node.\n */\nexport function jsonableTreeFromCursor(cursor: ITreeCursor): JsonableTree {\n\tassert(cursor.mode === CursorLocationType.Nodes, 0x3ba /* must start at node */);\n\tconst node: JsonableTree =\n\t\tcursor.value === undefined\n\t\t\t? {\n\t\t\t\t\ttype: cursor.type,\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\ttype: cursor.type,\n\t\t\t\t\tvalue: cursor.value,\n\t\t\t\t};\n\n\t// Normalize object by only including fields that are required.\n\tfor (let inFields = cursor.firstField(); inFields; inFields = cursor.nextField()) {\n\t\tconst field: JsonableTree[] = mapCursorField(cursor, jsonableTreeFromCursor);\n\t\tsetGenericTreeField(node, cursor.getFieldKey(), field);\n\t}\n\treturn node;\n}\n\n/**\n * Extract a JsonableTree from the contents of the given ITreeCursor's current node.\n */\nexport function jsonableTreeFromFieldCursor(cursor: ITreeCursor): JsonableTree[] {\n\tassert(cursor.mode === CursorLocationType.Fields, 0x7ca /* must start at field */);\n\treturn mapCursorField(cursor, jsonableTreeFromCursor);\n}\n\n/**\n * Copy forest content into a JsonableTree.\n * @remarks\n * This is not a time or memory efficient way to pass around forest content:\n * its intended for debugging and testing purposes when forest content is needed in a human readable serializable format.\n */\nexport function jsonableTreeFromForest(forest: IForestSubscription): JsonableTree[] {\n\tconst readCursor = forest.allocateCursor();\n\tmoveToDetachedField(forest, readCursor);\n\tconst jsonable = jsonableTreeFromFieldCursor(readCursor);\n\treadCursor.free();\n\treturn jsonable;\n}\n"]}
1
+ {"version":3,"file":"treeTextCursor.js","sourceRoot":"","sources":["../../src/feature-libraries/treeTextCursor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAC;AAExE,OAAO,EAON,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,SAAS,EACT,mBAAmB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEN,oBAAoB,EACpB,mBAAmB,GACnB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,yBAAyB,CAAC,IAAkB;IAC3D,OAAO,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACzC,KAAqB,EACrB,gBAA+B,SAAS;IAExC,MAAM,GAAG,GAAG,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAC9C,OAAO,oBAAoB,CAC1B,OAAO,EACP,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,EAAE,EACxD,aAAa,CACb,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAgC;IACnD,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,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AAU,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;gBACjC,OAAO,KAAK,CAAC;YACd,CAAC;QACF,CAAC;IACF,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,CAAsB,EAAE,CAAsB;IAC1E,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;AACvD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,CAAsB,EAAE,CAAsB;IAChF,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACzB,IAAI,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;IACzC,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail, oob } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tCursorLocationType,\n\ttype DetachedField,\n\ttype IForestSubscription,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\ttype JsonableTree,\n\taboveRootPlaceholder,\n\tdetachedFieldAsKey,\n\tgenericTreeKeys,\n\tgetGenericTreeField,\n\tmapCursorField,\n\tmoveToDetachedField,\n\trootField,\n\tsetGenericTreeField,\n} from \"../core/index.js\";\n\nimport {\n\ttype CursorAdapter,\n\tstackTreeFieldCursor,\n\tstackTreeNodeCursor,\n} from \"./treeCursorUtils.js\";\n\n/**\n * This module provides support for reading and writing a human readable (and\n * editable) tree format.\n *\n * This implementation can handle all trees (so it does not need a fallback for any special cases),\n * and is not optimized.\n *\n * It's suitable for testing and debugging,\n * though it could also reasonably be used as a fallback for edge cases or for small trees.\n *\n * TODO: Use placeholders.\n * build / add operations should be able to include detached ranges instead of children directly.\n * summaries should be able to reference unloaded chunks instead of having children directly.\n * Leverage placeholders in the types below to accomplish this.\n * Determine how this relates to Cursor: should cursor be generic over placeholder values?\n * (Could use them for errors to allow non erroring cursors?)\n *\n * Note:\n * Currently a lot of Tree's codebase is using json for serialization.\n * Because putting json strings inside json works poorly (adds lots of escaping),\n * for now this library actually outputs and inputs the Json compatible type JsonableTree\n * rather than actual strings.\n */\n\n/**\n * Create a cursor, in `nodes` mode at the root of the provided tree.\n *\n * @returns an {@link ITreeCursorSynchronous} in nodes mode for a single {@link JsonableTree}.\n * @remarks\n * Do not confuse this with {@link JsonableTree} with the JSON domain:\n * this takes in data in a specific format that is json compatible (except for FluidHandle values).\n * That is distinct from treating arbitrary JSON data as a tree in the JSON domain.\n */\nexport function cursorForJsonableTreeNode(root: JsonableTree): ITreeCursorSynchronous {\n\treturn stackTreeNodeCursor(adapter, root);\n}\n\n/**\n * Creates an {@link ITreeCursorSynchronous} in fields mode for a JsonableTree field.\n */\nexport function cursorForJsonableTreeField(\n\ttrees: JsonableTree[],\n\tdetachedField: DetachedField = rootField,\n): ITreeCursorSynchronous {\n\tconst key = detachedFieldAsKey(detachedField);\n\treturn stackTreeFieldCursor(\n\t\tadapter,\n\t\t{ type: aboveRootPlaceholder, fields: { [key]: trees } },\n\t\tdetachedField,\n\t);\n}\n\nexport const adapter: CursorAdapter<JsonableTree> = {\n\tvalue: (node) => node.value,\n\ttype: (node) => node.type,\n\tkeysFromNode: genericTreeKeys,\n\tgetFieldFromNode: (node, key): readonly JsonableTree[] =>\n\t\tgetGenericTreeField(node, key, false),\n};\n\n/**\n * Extract a JsonableTree from the contents of the given ITreeCursor's current node.\n */\nexport function jsonableTreeFromCursor(cursor: ITreeCursor): JsonableTree {\n\tassert(cursor.mode === CursorLocationType.Nodes, 0x3ba /* must start at node */);\n\tconst node: JsonableTree =\n\t\tcursor.value === undefined\n\t\t\t? {\n\t\t\t\t\ttype: cursor.type,\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\ttype: cursor.type,\n\t\t\t\t\tvalue: cursor.value,\n\t\t\t\t};\n\n\t// Normalize object by only including fields that are required.\n\tfor (let inFields = cursor.firstField(); inFields; inFields = cursor.nextField()) {\n\t\tconst field: JsonableTree[] = mapCursorField(cursor, jsonableTreeFromCursor);\n\t\tsetGenericTreeField(node, cursor.getFieldKey(), field);\n\t}\n\treturn node;\n}\n\n/**\n * Extract a JsonableTree from the contents of the given ITreeCursor's current node.\n */\nexport function jsonableTreeFromFieldCursor(cursor: ITreeCursor): JsonableTree[] {\n\tassert(cursor.mode === CursorLocationType.Fields, 0x7ca /* must start at field */);\n\treturn mapCursorField(cursor, jsonableTreeFromCursor);\n}\n\n/**\n * Copy forest content into a JsonableTree.\n * @remarks\n * This is not a time or memory efficient way to pass around forest content:\n * its intended for debugging and testing purposes when forest content is needed in a human readable serializable format.\n */\nexport function jsonableTreeFromForest(forest: IForestSubscription): JsonableTree[] {\n\tconst readCursor = forest.allocateCursor();\n\tmoveToDetachedField(forest, readCursor);\n\tconst jsonable = jsonableTreeFromFieldCursor(readCursor);\n\treadCursor.free();\n\treturn jsonable;\n}\n\n/**\n * The full content of `forest` (every detached/removed field) as a single {@link JsonableTree}.\n * @remarks\n * The returned node is the forest's above-root placeholder: its fields are the forest's detached fields.\n * Only content is captured: schema, anchors and other forest state are not.\n */\nfunction forestContent(forest: IForestSubscription): JsonableTree {\n\treturn jsonableTreeFromCursor(forest.getCursorAboveDetachedFields());\n}\n\n/**\n * Structural equality of two {@link JsonableTree}s, comparing type, value and fields recursively.\n * @remarks\n * Fields are compared as an unordered set of keys, so this is independent of the order in which different\n * forest implementations enumerate fields. The nodes within each field are compared in order.\n */\nfunction treesEqual(a: JsonableTree, b: JsonableTree): boolean {\n\tif (a.type !== b.type || !Object.is(a.value, b.value)) {\n\t\treturn false;\n\t}\n\t// JsonableTree never stores empty fields, so equal key counts plus a matching field for every key in\n\t// `a` implies `b` has no extra fields.\n\tconst aKeys = genericTreeKeys(a);\n\tif (aKeys.length !== genericTreeKeys(b).length) {\n\t\treturn false;\n\t}\n\tfor (const key of aKeys) {\n\t\tconst aField = getGenericTreeField(a, key, false);\n\t\tconst bField = getGenericTreeField(b, key, false);\n\t\tif (aField.length !== bField.length) {\n\t\t\treturn false;\n\t\t}\n\t\tfor (const [index, aChild] of aField.entries()) {\n\t\t\tconst bChild = bField[index] ?? oob();\n\t\t\tif (!treesEqual(aChild, bChild)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn true;\n}\n\n/**\n * Returns true if `a` and `b` have identical content, including all detached/removed fields.\n * @remarks\n * Only content is compared: schema, anchors and other forest state are ignored.\n * This is intended for debugging and testing, and is not optimized.\n */\nexport function forestsEqual(a: IForestSubscription, b: IForestSubscription): boolean {\n\treturn treesEqual(forestContent(a), forestContent(b));\n}\n\n/**\n * Asserts that `a` and `b` have identical content, including all detached/removed fields.\n * @remarks\n * Only content is compared: schema, anchors and other forest state are ignored.\n * This is intended for debugging and testing, and is not optimized.\n * @throws an Error if the forests differ.\n */\nexport function assertForestsEqual(a: IForestSubscription, b: IForestSubscription): void {\n\tif (!forestsEqual(a, b)) {\n\t\tfail(0xd10 /* Forests are not equal */);\n\t}\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -31,7 +31,7 @@ export type Off = EventOff;
31
31
  export { TreeStatus, TreeCompressionStrategy, type TreeIndex, type TreeIndexNodes, type IncrementalEncodingPolicy, } from "./feature-libraries/index.js";
32
32
  export { type ITreeInternal, type SharedTreeOptions, type SharedTreeOptionsBeta, type ForestType, type SharedTreeFormatOptions, Tree, type RunTransaction, type ForestOptions, independentInitializedView, type ViewContent, TreeAlpha, type ObservationResults, type TreeIdentifierUtils, independentView, type IndependentViewOptions, type IndependentViewTelemetryOptions, createIndependentTreeBeta, createIndependentTreeAlpha, type CreateIndependentTreeAlphaOptions, ForestTypeOptimized, ForestTypeExpensiveDebug, ForestTypeReference, minimize, } from "./shared-tree/index.js";
33
33
  export { TreeArrayNode, type TreeArrayNodeAlpha, type Unhydrated, IterableTreeArrayContent, TreeNode, type ViewableTree, type ITree, type TreeNodeSchema, TreeViewConfiguration, type ITreeViewConfiguration, type ITreeViewConfigurationAlpha, type ITreeConfigurationOptions, type TreeView, type TreeViewEvents, SchemaFactory, SchemaFactoryBeta, type SchemaStaticsBeta, SchemaFactoryAlpha, type ObjectSchemaOptionsAlpha, type ObjectSchemaOptions, type ImplicitFieldSchema, type TreeFieldFromImplicitField, type TreeChangeEvents, type NodeFromSchema, type TreeMapNode, type TreeMapNodeAlpha, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, FieldKind, FieldSchema, type FieldSchemaAlpha, type FieldSchemaMetadata, type ImplicitAllowedTypes, type InsertableTreeFieldFromImplicitField, type InsertableTypedNode, NodeKind, type TreeObjectNode, ObjectNodeSchema, type ObjectNodeSchemaWorkaround, type TreeNodeFromImplicitAllowedTypes, type TreeNodeSchemaClass, type SchemaCompatibilityStatus, type FieldProps, type FieldPropsAlpha, normalizeFieldSchema, type InternalTreeNode, type WithType, type ArrayNodeDeltaOp, type ArrayNodeInsertOp, type ArrayNodeRemoveOp, type ArrayNodeRetainOp, type ArrayNodeTreeChangedDeltaOp, type ArrayNodeTreeChangedRetainOp, type NodeChangedData, type NodeChangedDataAlpha, type NodeChangedDataDelta, type NodeChangedDataProperties, type NodeChangedDataTreeDelta, type SchemaUpgrade, contentSchemaSymbol, type TreeNodeApi, type TreeNodeSchemaCore, type AllowedTypes, type System_Unsafe, type FieldSchemaAlphaUnsafe, type FieldHasDefaultAlphaUnsafe, type InsertableObjectFromSchemaRecordAlphaUnsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type UnannotateAllowedTypeUnsafe, type AnnotatedAllowedTypeUnsafe, type AnnotatedAllowedTypesUnsafe, type AllowedTypesFullUnsafe, type AllowedTypesFullFromMixedUnsafe, type UnannotateAllowedTypesListUnsafe, type AnnotateAllowedTypesListUnsafe, type typeSchemaSymbol, type TreeNodeSchemaNonClass, type ValidateRecursiveSchema, type FixRecursiveArraySchema, type IdentifierIndex, createTreeIndex, createIdentifierIndex, type DirtyTreeStatus, trackDirtyNodes, type DirtyTreeMap, type TreeIndexKey, adaptEnum, enumFromStrings, singletonSchema, type UnsafeUnknownSchema, type TreeViewAlpha, type TreeViewBeta, type InsertableField, type Insertable, type InsertableContent, type FactoryContent, type FactoryContentObject, type ReadableField, type ReadSchema, type AnnotatedAllowedType, type AnnotatedAllowedTypes, type AllowedTypesFullEvaluated, type AllowedTypeMetadata, type AllowedTypesMetadata, type UnannotateAllowedTypesList, type AnnotateAllowedTypesList, type AllowedTypesFull, type AllowedTypesFullFromMixed, type SchemaType, type SchemaStaticsAlpha, type NodeProvider, type InsertableObjectFromSchemaRecordAlpha, type FieldHasDefaultAlpha, TreeBeta, type TreeChangeEventsBeta, type TreeChangeEventsAlpha, type VerboseTreeNode, type TreeEncodingOptions, type TreeSchemaEncodingOptions, type TreeSchema, TreeViewConfigurationAlpha, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, type JsonTreeSchema, type JsonSchemaId, type JsonNodeSchema, type JsonNodeSchemaBase, type JsonLeafNodeSchema, type JsonMapNodeSchema, type JsonArrayNodeSchema, type JsonObjectNodeSchema, type JsonFieldSchema, type JsonSchemaRef, type JsonRefPath, type JsonSchemaType, type JsonLeafSchemaType, type JsonRecordNodeSchema, type JsonStringKeyPatternProperties, getJsonSchema, type LazyItem, type Unenforced, type SimpleNodeSchemaBase, type SimpleNodeSchemaBaseAlpha, type SimpleTreeSchema, type SimpleNodeSchema, type SimpleFieldSchema, type SimpleLeafNodeSchema, type SimpleMapNodeSchema, type SimpleArrayNodeSchema, type SimpleObjectNodeSchema, type SimpleObjectFieldSchema, type SimpleRecordNodeSchema, normalizeAllowedTypes, walkFieldSchema, walkNodeSchema, walkAllowedTypes, type SchemaVisitor, getSimpleSchema, type ReadonlyArrayNode, type InsertableTreeNodeFromAllowedTypes, type Input, type TreeBranch, type TreeBranchAlpha, type TreeBranchEvents, asTreeViewAlpha, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, type NodeSchemaMetadata, type SchemaStatics, type ITreeAlpha, type NoChangeConstraint, type NodeInDocumentConstraint, type RunTransactionParamsAlpha, type RunTransactionParamsBeta, type TransactionCallbackStatusAlpha, type TransactionCallbackStatusBeta, type TransactionConstraint, type TransactionConstraintAlpha, type TransactionPostProcessor, type TransactionResultFailed, type TransactionResultSuccess, type TransactionValueResult, type TransactionVoidResult, type VoidTransactionCallbackStatusAlpha, type VoidTransactionCallbackStatusBeta, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type LeafSchema, type ArrayNodeCustomizableSchema, type ArrayNodeCustomizableSchemaAlpha, type ArrayNodePojoEmulationSchema, ArrayNodeSchema, type MapNodeCustomizableSchema, type MapNodePojoEmulationSchema, MapNodeSchema, type ObjectFromSchemaRecord, type ValidateRecursiveSchemaTemplate, type FixRecursiveRecursionLimit, RecordNodeSchema, type RecordNodeCustomizableSchema, type RecordNodeInsertableData, type RecordNodePojoEmulationSchema, type TreeRecordNode, KeyEncodingOptions, type TreeParsingOptions, type SchemaFactory_base, type NumberKeys, type SimpleAllowedTypeAttributes, encodeSchemaCompatibilitySnapshot, decodeSchemaCompatibilitySnapshot, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, snapshotSchemaCompatibility, type SnapshotFileSystem, incrementalSummaryHint, incrementalEncodingPolicyForAllowedTypes, eraseSchemaDetails, eraseSchemaDetailsSubclassable, type ErasedSchema, type ErasedNode, type ErasedSchemaSubclassable, type SnapshotSchemaCompatibilityOptions, StagedSchemaUpgradePolicy, type StagedSchemaUpgradePolicyFactory, type ArrayPlaceAnchor, createArrayInsertionAnchor, type WithValue, type TreeContextAlpha, } from "./simple-tree/index.js";
34
- export { SharedTree, configuredSharedTree, configuredSharedTreeAlpha, configuredSharedTreeBeta, configuredSharedTreeBetaLegacy, } from "./treeFactory.js";
34
+ export { SharedTree, SharedTreeAlpha, configuredSharedTree, configuredSharedTreeAlpha, configuredSharedTreeBeta, configuredSharedTreeBetaLegacy, } from "./treeFactory.js";
35
35
  export { SharedTreeAttributes, SharedTreeFactoryType } from "./sharedTreeAttributes.js";
36
36
  export { persistedToSimpleSchema } from "./shared-tree/index.js";
37
37
  export { type ICodecOptions, type CodecWriteOptions, type CodecWriteOptionsBeta, FluidClientVersion, type FormatValidator, FormatValidatorNoOp, type CodecName, type FormatVersion, } from "./codec/index.js";
@@ -58,4 +58,6 @@ export { asAlpha, asBeta } from "./api.js";
58
58
  export { TextAsTree, FormattedTextAsTree, FormattedTextAsTreeDefault, codePointCount, utf16LengthForCodePoints, } from "./text/index.js";
59
59
  export { ExtensibleUnionNode } from "./extensibleUnionNode.js";
60
60
  export { Component } from "./componentApi.js";
61
+ export { defineTreeDataStore, instantiateTreeFirstTime } from "./treeDataStore.js";
62
+ export type { TreeDataStoreOptions } from "./treeDataStore.js";
61
63
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,WAAW,EACX,KAAK,UAAU,EACf,UAAU,EACV,gBAAgB,EAChB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,GACpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EACX,SAAS,IAAI,cAAc,EAC3B,UAAU,IAAI,eAAe,EAC7B,UAAU,IAAI,eAAe,EAC7B,GAAG,IAAI,QAAQ,EACf,MAAM,iCAAiC,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,IAAI,cAAc,CAAC,CAAC,CAA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,KAAK,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAE3C,OAAO,EACN,UAAU,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,cAAc,EACd,wBAAwB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AACnF,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC"}
package/lib/index.js CHANGED
@@ -12,7 +12,7 @@ export { TreeArrayNode, IterableTreeArrayContent, TreeNode, TreeViewConfiguratio
12
12
  adaptEnum, enumFromStrings, singletonSchema,
13
13
  // Beta APIs
14
14
  TreeBeta, TreeViewConfigurationAlpha, extractPersistedSchema, comparePersistedSchema, getJsonSchema, normalizeAllowedTypes, walkFieldSchema, walkNodeSchema, walkAllowedTypes, getSimpleSchema, asTreeViewAlpha, rollback, generateSchemaFromSimpleSchema, evaluateLazySchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, allowUnused, ArrayNodeSchema, MapNodeSchema, RecordNodeSchema, KeyEncodingOptions, encodeSchemaCompatibilitySnapshot, decodeSchemaCompatibilitySnapshot, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, snapshotSchemaCompatibility, incrementalSummaryHint, incrementalEncodingPolicyForAllowedTypes, eraseSchemaDetails, eraseSchemaDetailsSubclassable, StagedSchemaUpgradePolicy, createArrayInsertionAnchor, } from "./simple-tree/index.js";
15
- export { SharedTree, configuredSharedTree, configuredSharedTreeAlpha, configuredSharedTreeBeta, configuredSharedTreeBetaLegacy, } from "./treeFactory.js";
15
+ export { SharedTree, SharedTreeAlpha, configuredSharedTree, configuredSharedTreeAlpha, configuredSharedTreeBeta, configuredSharedTreeBetaLegacy, } from "./treeFactory.js";
16
16
  export { SharedTreeAttributes, SharedTreeFactoryType } from "./sharedTreeAttributes.js";
17
17
  export { persistedToSimpleSchema } from "./shared-tree/index.js";
18
18
  export { FluidClientVersion, FormatValidatorNoOp, } from "./codec/index.js";
@@ -38,4 +38,5 @@ export { asAlpha, asBeta } from "./api.js";
38
38
  export { TextAsTree, FormattedTextAsTree, FormattedTextAsTreeDefault, codePointCount, utf16LengthForCodePoints, } from "./text/index.js";
39
39
  export { ExtensibleUnionNode } from "./extensibleUnionNode.js";
40
40
  export { Component } from "./componentApi.js";
41
+ export { defineTreeDataStore, instantiateTreeFirstTime } from "./treeDataStore.js";
41
42
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,+FAA+F;AAC/F,yDAAyD;AAEzD,OAAO,EACN,WAAW,EAEX,UAAU,EACV,gBAAgB,GAUhB,MAAM,iBAAiB,CAAC;AAkCzB,OAAO,EACN,UAAU,EACV,uBAAuB,GAIvB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAMN,IAAI,EAGJ,0BAA0B,EAE1B,SAAS,EAGT,eAAe,EAGf,yBAAyB,EACzB,0BAA0B,EAE1B,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,QAAQ,GACR,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,aAAa,EAGb,wBAAwB,EACxB,QAAQ,EAIR,qBAAqB,EAMrB,aAAa,EACb,iBAAiB,EAEjB,kBAAkB,EAWlB,SAAS,EACT,WAAW,EAMX,QAAQ,EAER,gBAAgB,EAOhB,oBAAoB,EAepB,mBAAmB,EAgCnB,eAAe,EACf,qBAAqB,EAErB,eAAe;AAGf,4BAA4B;AAC5B,SAAS,EACT,eAAe,EACf,eAAe;AAyBf,YAAY;AACZ,QAAQ,E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E3C,OAAO,EACN,UAAU,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,cAAc,EACd,wBAAwB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// For the time being, if exports are changed, additional files under entrypoints need updated.\n// Run `pnpm generate:entrypoint-sources` to update them.\n\nexport {\n\tValueSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype LocalChangeMetadata,\n\ttype RemoteChangeMetadata,\n\ttype ChangeMetadata,\n\ttype LabelTree,\n\ttype TransactionLabels,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./core/index.js\";\n\nimport type {\n\tListeners as EventListeners,\n\tIsListener as EventIsListener,\n\tListenable as EventListenable,\n\tOff as EventOff,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listeners}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listeners<T extends object> = EventListeners<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#IsListener}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type IsListener<T> = EventIsListener<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listenable}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listenable<T extends object> = EventListenable<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Off}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Off = EventOff;\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n\ttype TreeIndex,\n\ttype TreeIndexNodes,\n\ttype IncrementalEncodingPolicy,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ITreeInternal,\n\ttype SharedTreeOptions,\n\ttype SharedTreeOptionsBeta,\n\ttype ForestType,\n\ttype SharedTreeFormatOptions,\n\tTree,\n\ttype RunTransaction,\n\ttype ForestOptions,\n\tindependentInitializedView,\n\ttype ViewContent,\n\tTreeAlpha,\n\ttype ObservationResults,\n\ttype TreeIdentifierUtils,\n\tindependentView,\n\ttype IndependentViewOptions,\n\ttype IndependentViewTelemetryOptions,\n\tcreateIndependentTreeBeta,\n\tcreateIndependentTreeAlpha,\n\ttype CreateIndependentTreeAlphaOptions,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n\tminimize,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype TreeArrayNodeAlpha,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ViewableTree,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeViewConfigurationAlpha,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\n\tSchemaFactoryBeta,\n\ttype SchemaStaticsBeta,\n\tSchemaFactoryAlpha,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeChangeEvents,\n\ttype NodeFromSchema,\n\ttype TreeMapNode,\n\ttype TreeMapNodeAlpha,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaAlpha,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\tObjectNodeSchema,\n\ttype ObjectNodeSchemaWorkaround,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype ArrayNodeDeltaOp,\n\ttype ArrayNodeInsertOp,\n\ttype ArrayNodeRemoveOp,\n\ttype ArrayNodeRetainOp,\n\ttype ArrayNodeTreeChangedDeltaOp,\n\ttype ArrayNodeTreeChangedRetainOp,\n\ttype NodeChangedData,\n\ttype NodeChangedDataAlpha,\n\ttype NodeChangedDataDelta,\n\ttype NodeChangedDataProperties,\n\ttype NodeChangedDataTreeDelta,\n\ttype SchemaUpgrade,\n\tcontentSchemaSymbol,\n\t// Types not really intended for public use, but used in links.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package \"@fluidframework/tree\" does not have an export \"TreeNodeApi\"\n\ttype TreeNodeApi,\n\ttype TreeNodeSchemaCore,\n\t// Types not really intended for public use, but used in inferred types exposed in the public API.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// error TS2742: The inferred type of 'Inventory' cannot be named without a reference to '../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\n\ttype AllowedTypes,\n\ttype System_Unsafe,\n\ttype FieldSchemaAlphaUnsafe,\n\ttype FieldHasDefaultAlphaUnsafe,\n\ttype InsertableObjectFromSchemaRecordAlphaUnsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype UnannotateAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypesUnsafe,\n\ttype AllowedTypesFullUnsafe,\n\ttype AllowedTypesFullFromMixedUnsafe,\n\ttype UnannotateAllowedTypesListUnsafe,\n\ttype AnnotateAllowedTypesListUnsafe,\n\t// System types (not in Internal types for various reasons, like doc links or cannot be named errors).\n\ttype typeSchemaSymbol,\n\ttype TreeNodeSchemaNonClass,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\t// Index APIs\n\ttype IdentifierIndex,\n\tcreateTreeIndex,\n\tcreateIdentifierIndex,\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n\ttype TreeIndexKey,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype AnnotatedAllowedType,\n\ttype AnnotatedAllowedTypes,\n\ttype AllowedTypesFullEvaluated,\n\ttype AllowedTypeMetadata,\n\ttype AllowedTypesMetadata,\n\ttype UnannotateAllowedTypesList,\n\ttype AnnotateAllowedTypesList,\n\ttype AllowedTypesFull,\n\ttype AllowedTypesFullFromMixed,\n\ttype SchemaType,\n\ttype SchemaStaticsAlpha,\n\ttype NodeProvider,\n\ttype InsertableObjectFromSchemaRecordAlpha,\n\ttype FieldHasDefaultAlpha,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\ttype TreeChangeEventsAlpha,\n\t// Other\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype TreeSchemaEncodingOptions,\n\ttype TreeSchema,\n\tTreeViewConfigurationAlpha,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\t// Back to normal types\n\ttype JsonTreeSchema,\n\ttype JsonSchemaId,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonLeafNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonObjectNodeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonSchemaType,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype SimpleNodeSchemaBase,\n\ttype SimpleNodeSchemaBaseAlpha,\n\ttype SimpleTreeSchema,\n\ttype SimpleNodeSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleLeafNodeSchema,\n\ttype SimpleMapNodeSchema,\n\ttype SimpleArrayNodeSchema,\n\ttype SimpleObjectNodeSchema,\n\ttype SimpleObjectFieldSchema,\n\ttype SimpleRecordNodeSchema,\n\tnormalizeAllowedTypes,\n\twalkFieldSchema,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\tgetSimpleSchema,\n\ttype ReadonlyArrayNode,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype Input,\n\ttype TreeBranch,\n\ttype TreeBranchAlpha,\n\ttype TreeBranchEvents,\n\tasTreeViewAlpha,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype NodeSchemaMetadata,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype NoChangeConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParamsAlpha,\n\ttype RunTransactionParamsBeta,\n\ttype TransactionCallbackStatusAlpha,\n\ttype TransactionCallbackStatusBeta,\n\ttype TransactionConstraint,\n\ttype TransactionConstraintAlpha,\n\ttype TransactionPostProcessor,\n\ttype TransactionResultFailed,\n\ttype TransactionResultSuccess,\n\ttype TransactionValueResult,\n\ttype TransactionVoidResult,\n\ttype VoidTransactionCallbackStatusAlpha,\n\ttype VoidTransactionCallbackStatusBeta,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\tevaluateLazySchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype LeafSchema,\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodeCustomizableSchemaAlpha,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\ttype ObjectFromSchemaRecord,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\ttype TreeRecordNode,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n\ttype SchemaFactory_base,\n\ttype NumberKeys,\n\ttype SimpleAllowedTypeAttributes,\n\tencodeSchemaCompatibilitySnapshot,\n\tdecodeSchemaCompatibilitySnapshot,\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n\tsnapshotSchemaCompatibility,\n\ttype SnapshotFileSystem,\n\tincrementalSummaryHint,\n\tincrementalEncodingPolicyForAllowedTypes,\n\teraseSchemaDetails,\n\teraseSchemaDetailsSubclassable,\n\ttype ErasedSchema,\n\ttype ErasedNode,\n\ttype ErasedSchemaSubclassable,\n\ttype SnapshotSchemaCompatibilityOptions,\n\tStagedSchemaUpgradePolicy,\n\ttype StagedSchemaUpgradePolicyFactory,\n\ttype ArrayPlaceAnchor,\n\tcreateArrayInsertionAnchor,\n\ttype WithValue,\n\ttype TreeContextAlpha,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tconfiguredSharedTree,\n\tconfiguredSharedTreeAlpha,\n\tconfiguredSharedTreeBeta,\n\tconfiguredSharedTreeBetaLegacy,\n} from \"./treeFactory.js\";\nexport { SharedTreeAttributes, SharedTreeFactoryType } from \"./sharedTreeAttributes.js\";\nexport { persistedToSimpleSchema } from \"./shared-tree/index.js\";\n\nexport {\n\ttype ICodecOptions,\n\ttype CodecWriteOptions,\n\ttype CodecWriteOptionsBeta,\n\tFluidClientVersion,\n\ttype FormatValidator,\n\tFormatValidatorNoOp,\n\ttype CodecName,\n\ttype FormatVersion,\n} from \"./codec/index.js\";\nexport { FormatValidatorBasic } from \"./external-utilities/index.js\";\n\nexport type {\n\t// Type Testing\n\trequireTrue,\n\trequireFalse,\n\trequireAssignableTo,\n\tareSafelyAssignable,\n\tisAssignableTo,\n\tisAny,\n\teitherIsAny,\n\t// Other\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\tMakeNominal,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n\tJsonCompatible,\n\tJsonCompatibleObject,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlyObject,\n} from \"./util/index.js\";\nexport { cloneWithReplacements } from \"./util/index.js\";\n\nimport * as InternalTypes from \"./internalTypes.js\";\n/**\n * Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.\n * They are used internally to implement API aspects, but are not intended for use by external consumers.\n *\n * @public\n * @system\n *\n * @privateRemarks These TS-Docs are not recognized by API-Extractor, but the\n * support level tag is recognized by flub entrypoint generation.\n */\n// eslint-disable-next-line unicorn/prefer-export-from -- fixing requires `export * as` (breaks API-Extractor)\nexport { InternalTypes };\n\n// Internal/System types:\n// These would be put in `internalTypes` except doing so tents to cause errors like:\n// The inferred type of 'NodeMap' cannot be named without a reference to '../../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\nexport type { MapNodeInsertableData } from \"./simple-tree/index.js\";\n\nexport { JsonAsTree } from \"./jsonDomainSchema.js\";\nexport { FluidSerializableAsTree } from \"./serializableDomainSchema.js\";\nexport { TableSchema, type System_TableSchema } from \"./tableSchema.js\";\nexport { asAlpha, asBeta } from \"./api.js\";\n\nexport {\n\tTextAsTree,\n\tFormattedTextAsTree,\n\tFormattedTextAsTreeDefault,\n\tcodePointCount,\n\tutf16LengthForCodePoints,\n} from \"./text/index.js\";\nexport { ExtensibleUnionNode } from \"./extensibleUnionNode.js\";\nexport { Component } from \"./componentApi.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,+FAA+F;AAC/F,yDAAyD;AAEzD,OAAO,EACN,WAAW,EAEX,UAAU,EACV,gBAAgB,GAUhB,MAAM,iBAAiB,CAAC;AAkCzB,OAAO,EACN,UAAU,EACV,uBAAuB,GAIvB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAMN,IAAI,EAGJ,0BAA0B,EAE1B,SAAS,EAGT,eAAe,EAGf,yBAAyB,EACzB,0BAA0B,EAE1B,mBAAmB,EACnB,wBAAwB,EACxB,mBAAmB,EACnB,QAAQ,GACR,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,aAAa,EAGb,wBAAwB,EACxB,QAAQ,EAIR,qBAAqB,EAMrB,aAAa,EACb,iBAAiB,EAEjB,kBAAkB,EAWlB,SAAS,EACT,WAAW,EAMX,QAAQ,EAER,gBAAgB,EAOhB,oBAAoB,EAepB,mBAAmB,EAgCnB,eAAe,EACf,qBAAqB,EAErB,eAAe;AAGf,4BAA4B;AAC5B,SAAS,EACT,eAAe,EACf,eAAe;AAyBf,YAAY;AACZ,QAAQ,EAQR,0BAA0B,EAE1B,sBAAsB,EACtB,sBAAsB,EAkBtB,aAAa,EAcb,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,gBAAgB,EAEhB,eAAe,EAOf,eAAe,EAqBf,QAAQ,EACR,8BAA8B,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AAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// For the time being, if exports are changed, additional files under entrypoints need updated.\n// Run `pnpm generate:entrypoint-sources` to update them.\n\nexport {\n\tValueSchema,\n\ttype Revertible,\n\tCommitKind,\n\tRevertibleStatus,\n\ttype CommitMetadata,\n\ttype LocalChangeMetadata,\n\ttype RemoteChangeMetadata,\n\ttype ChangeMetadata,\n\ttype LabelTree,\n\ttype TransactionLabels,\n\ttype RevertibleFactory,\n\ttype RevertibleAlphaFactory,\n\ttype RevertibleAlpha,\n} from \"./core/index.js\";\n\nimport type {\n\tListeners as EventListeners,\n\tIsListener as EventIsListener,\n\tListenable as EventListenable,\n\tOff as EventOff,\n} from \"@fluidframework/core-interfaces\";\n\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listeners}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listeners<T extends object> = EventListeners<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#IsListener}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type IsListener<T> = EventIsListener<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Listenable}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Listenable<T extends object> = EventListenable<T>;\n/**\n * {@inheritdoc @fluidframework/core-interfaces#Off}\n * @public\n * @deprecated Deprecated in `@fluidframework/tree`. Consider importing from `fluid-framework` or `@fluidframework/core-interfaces` instead.\n */\nexport type Off = EventOff;\n\nexport {\n\tTreeStatus,\n\tTreeCompressionStrategy,\n\ttype TreeIndex,\n\ttype TreeIndexNodes,\n\ttype IncrementalEncodingPolicy,\n} from \"./feature-libraries/index.js\";\n\nexport {\n\ttype ITreeInternal,\n\ttype SharedTreeOptions,\n\ttype SharedTreeOptionsBeta,\n\ttype ForestType,\n\ttype SharedTreeFormatOptions,\n\tTree,\n\ttype RunTransaction,\n\ttype ForestOptions,\n\tindependentInitializedView,\n\ttype ViewContent,\n\tTreeAlpha,\n\ttype ObservationResults,\n\ttype TreeIdentifierUtils,\n\tindependentView,\n\ttype IndependentViewOptions,\n\ttype IndependentViewTelemetryOptions,\n\tcreateIndependentTreeBeta,\n\tcreateIndependentTreeAlpha,\n\ttype CreateIndependentTreeAlphaOptions,\n\tForestTypeOptimized,\n\tForestTypeExpensiveDebug,\n\tForestTypeReference,\n\tminimize,\n} from \"./shared-tree/index.js\";\n\nexport {\n\tTreeArrayNode,\n\ttype TreeArrayNodeAlpha,\n\ttype Unhydrated,\n\tIterableTreeArrayContent,\n\tTreeNode,\n\ttype ViewableTree,\n\ttype ITree,\n\ttype TreeNodeSchema,\n\tTreeViewConfiguration,\n\ttype ITreeViewConfiguration,\n\ttype ITreeViewConfigurationAlpha,\n\ttype ITreeConfigurationOptions,\n\ttype TreeView,\n\ttype TreeViewEvents,\n\tSchemaFactory,\n\tSchemaFactoryBeta,\n\ttype SchemaStaticsBeta,\n\tSchemaFactoryAlpha,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\ttype TreeChangeEvents,\n\ttype NodeFromSchema,\n\ttype TreeMapNode,\n\ttype TreeMapNodeAlpha,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\tFieldKind,\n\tFieldSchema,\n\ttype FieldSchemaAlpha,\n\ttype FieldSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype InsertableTypedNode,\n\tNodeKind,\n\ttype TreeObjectNode,\n\tObjectNodeSchema,\n\ttype ObjectNodeSchemaWorkaround,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype TreeNodeSchemaClass,\n\ttype SchemaCompatibilityStatus,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\ttype InternalTreeNode,\n\ttype WithType,\n\ttype ArrayNodeDeltaOp,\n\ttype ArrayNodeInsertOp,\n\ttype ArrayNodeRemoveOp,\n\ttype ArrayNodeRetainOp,\n\ttype ArrayNodeTreeChangedDeltaOp,\n\ttype ArrayNodeTreeChangedRetainOp,\n\ttype NodeChangedData,\n\ttype NodeChangedDataAlpha,\n\ttype NodeChangedDataDelta,\n\ttype NodeChangedDataProperties,\n\ttype NodeChangedDataTreeDelta,\n\ttype SchemaUpgrade,\n\tcontentSchemaSymbol,\n\t// Types not really intended for public use, but used in links.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// Error: src/simple-tree/objectNode.ts:72:1 - (ae-unresolved-link) The @link reference could not be resolved: The package \"@fluidframework/tree\" does not have an export \"TreeNodeApi\"\n\ttype TreeNodeApi,\n\ttype TreeNodeSchemaCore,\n\t// Types not really intended for public use, but used in inferred types exposed in the public API.\n\t// Can not be moved to internalTypes since doing so causes app code to throw errors like:\n\t// error TS2742: The inferred type of 'Inventory' cannot be named without a reference to '../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\n\ttype AllowedTypes,\n\ttype System_Unsafe,\n\ttype FieldSchemaAlphaUnsafe,\n\ttype FieldHasDefaultAlphaUnsafe,\n\ttype InsertableObjectFromSchemaRecordAlphaUnsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype UnannotateAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypesUnsafe,\n\ttype AllowedTypesFullUnsafe,\n\ttype AllowedTypesFullFromMixedUnsafe,\n\ttype UnannotateAllowedTypesListUnsafe,\n\ttype AnnotateAllowedTypesListUnsafe,\n\t// System types (not in Internal types for various reasons, like doc links or cannot be named errors).\n\ttype typeSchemaSymbol,\n\ttype TreeNodeSchemaNonClass,\n\t// Recursive Schema APIs\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\t// Index APIs\n\ttype IdentifierIndex,\n\tcreateTreeIndex,\n\tcreateIdentifierIndex,\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n\ttype TreeIndexKey,\n\t// experimental @alpha APIs:\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttype UnsafeUnknownSchema,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype InsertableField,\n\ttype Insertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n\ttype ReadableField,\n\ttype ReadSchema,\n\ttype AnnotatedAllowedType,\n\ttype AnnotatedAllowedTypes,\n\ttype AllowedTypesFullEvaluated,\n\ttype AllowedTypeMetadata,\n\ttype AllowedTypesMetadata,\n\ttype UnannotateAllowedTypesList,\n\ttype AnnotateAllowedTypesList,\n\ttype AllowedTypesFull,\n\ttype AllowedTypesFullFromMixed,\n\ttype SchemaType,\n\ttype SchemaStaticsAlpha,\n\ttype NodeProvider,\n\ttype InsertableObjectFromSchemaRecordAlpha,\n\ttype FieldHasDefaultAlpha,\n\t// Beta APIs\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\ttype TreeChangeEventsAlpha,\n\t// Other\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype TreeSchemaEncodingOptions,\n\ttype TreeSchema,\n\tTreeViewConfigurationAlpha,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\t// Back to normal types\n\ttype JsonTreeSchema,\n\ttype JsonSchemaId,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonLeafNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonObjectNodeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonSchemaType,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\tgetJsonSchema,\n\ttype LazyItem,\n\ttype Unenforced,\n\ttype SimpleNodeSchemaBase,\n\ttype SimpleNodeSchemaBaseAlpha,\n\ttype SimpleTreeSchema,\n\ttype SimpleNodeSchema,\n\ttype SimpleFieldSchema,\n\ttype SimpleLeafNodeSchema,\n\ttype SimpleMapNodeSchema,\n\ttype SimpleArrayNodeSchema,\n\ttype SimpleObjectNodeSchema,\n\ttype SimpleObjectFieldSchema,\n\ttype SimpleRecordNodeSchema,\n\tnormalizeAllowedTypes,\n\twalkFieldSchema,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\tgetSimpleSchema,\n\ttype ReadonlyArrayNode,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype Input,\n\ttype TreeBranch,\n\ttype TreeBranchAlpha,\n\ttype TreeBranchEvents,\n\tasTreeViewAlpha,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype NodeSchemaMetadata,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype NoChangeConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParamsAlpha,\n\ttype RunTransactionParamsBeta,\n\ttype TransactionCallbackStatusAlpha,\n\ttype TransactionCallbackStatusBeta,\n\ttype TransactionConstraint,\n\ttype TransactionConstraintAlpha,\n\ttype TransactionPostProcessor,\n\ttype TransactionResultFailed,\n\ttype TransactionResultSuccess,\n\ttype TransactionValueResult,\n\ttype TransactionVoidResult,\n\ttype VoidTransactionCallbackStatusAlpha,\n\ttype VoidTransactionCallbackStatusBeta,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\tevaluateLazySchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype LeafSchema,\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodeCustomizableSchemaAlpha,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\ttype ObjectFromSchemaRecord,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\ttype TreeRecordNode,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n\ttype SchemaFactory_base,\n\ttype NumberKeys,\n\ttype SimpleAllowedTypeAttributes,\n\tencodeSchemaCompatibilitySnapshot,\n\tdecodeSchemaCompatibilitySnapshot,\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n\tsnapshotSchemaCompatibility,\n\ttype SnapshotFileSystem,\n\tincrementalSummaryHint,\n\tincrementalEncodingPolicyForAllowedTypes,\n\teraseSchemaDetails,\n\teraseSchemaDetailsSubclassable,\n\ttype ErasedSchema,\n\ttype ErasedNode,\n\ttype ErasedSchemaSubclassable,\n\ttype SnapshotSchemaCompatibilityOptions,\n\tStagedSchemaUpgradePolicy,\n\ttype StagedSchemaUpgradePolicyFactory,\n\ttype ArrayPlaceAnchor,\n\tcreateArrayInsertionAnchor,\n\ttype WithValue,\n\ttype TreeContextAlpha,\n} from \"./simple-tree/index.js\";\nexport {\n\tSharedTree,\n\tSharedTreeAlpha,\n\tconfiguredSharedTree,\n\tconfiguredSharedTreeAlpha,\n\tconfiguredSharedTreeBeta,\n\tconfiguredSharedTreeBetaLegacy,\n} from \"./treeFactory.js\";\nexport { SharedTreeAttributes, SharedTreeFactoryType } from \"./sharedTreeAttributes.js\";\nexport { persistedToSimpleSchema } from \"./shared-tree/index.js\";\n\nexport {\n\ttype ICodecOptions,\n\ttype CodecWriteOptions,\n\ttype CodecWriteOptionsBeta,\n\tFluidClientVersion,\n\ttype FormatValidator,\n\tFormatValidatorNoOp,\n\ttype CodecName,\n\ttype FormatVersion,\n} from \"./codec/index.js\";\nexport { FormatValidatorBasic } from \"./external-utilities/index.js\";\n\nexport type {\n\t// Type Testing\n\trequireTrue,\n\trequireFalse,\n\trequireAssignableTo,\n\tareSafelyAssignable,\n\tisAssignableTo,\n\tisAny,\n\teitherIsAny,\n\t// Other\n\tRestrictiveReadonlyRecord,\n\tRestrictiveStringRecord,\n\tMakeNominal,\n\tIsUnion,\n\tUnionToIntersection,\n\tUnionToTuple,\n\tPopUnion,\n\tJsonCompatible,\n\tJsonCompatibleObject,\n\tJsonCompatibleReadOnly,\n\tJsonCompatibleReadOnlyObject,\n} from \"./util/index.js\";\nexport { cloneWithReplacements } from \"./util/index.js\";\n\nimport * as InternalTypes from \"./internalTypes.js\";\n/**\n * Contains types used by the API, but which serve mechanical purposes and do not represent semantic concepts.\n * They are used internally to implement API aspects, but are not intended for use by external consumers.\n *\n * @public\n * @system\n *\n * @privateRemarks These TS-Docs are not recognized by API-Extractor, but the\n * support level tag is recognized by flub entrypoint generation.\n */\n// eslint-disable-next-line unicorn/prefer-export-from -- fixing requires `export * as` (breaks API-Extractor)\nexport { InternalTypes };\n\n// Internal/System types:\n// These would be put in `internalTypes` except doing so tents to cause errors like:\n// The inferred type of 'NodeMap' cannot be named without a reference to '../../node_modules/@fluidframework/tree/lib/internalTypes.js'. This is likely not portable. A type annotation is necessary.\nexport type { MapNodeInsertableData } from \"./simple-tree/index.js\";\n\nexport { JsonAsTree } from \"./jsonDomainSchema.js\";\nexport { FluidSerializableAsTree } from \"./serializableDomainSchema.js\";\nexport { TableSchema, type System_TableSchema } from \"./tableSchema.js\";\nexport { asAlpha, asBeta } from \"./api.js\";\n\nexport {\n\tTextAsTree,\n\tFormattedTextAsTree,\n\tFormattedTextAsTreeDefault,\n\tcodePointCount,\n\tutf16LengthForCodePoints,\n} from \"./text/index.js\";\nexport { ExtensibleUnionNode } from \"./extensibleUnionNode.js\";\nexport { Component } from \"./componentApi.js\";\n\nexport { defineTreeDataStore, instantiateTreeFirstTime } from \"./treeDataStore.js\";\nexport type { TreeDataStoreOptions } from \"./treeDataStore.js\";\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/tree";
8
- export declare const pkgVersion = "2.113.1";
8
+ export declare const pkgVersion = "2.114.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/tree";
8
- export const pkgVersion = "2.113.1";
8
+ export const pkgVersion = "2.114.0";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tree\";\nexport const pkgVersion = \"2.113.1\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,sBAAsB,CAAC;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/tree\";\nexport const pkgVersion = \"2.114.0\";\n"]}
@@ -7,8 +7,8 @@ import { type ChangeFamily, type RevisionTag, type TaggedChange } from "../core/
7
7
  import type { JsonCompatibleReadOnly } from "../util/index.js";
8
8
  import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
9
9
  import type { SharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
10
- declare function encodeSerializedChangeV1(idCompressor: IIdCompressor, changeFamily: ChangeFamily<SharedTreeEditBuilder, SharedTreeChange>, change: SharedTreeChange, changeRevision: RevisionTag, contextRevision?: RevisionTag): JsonCompatibleReadOnly;
11
- declare function decodeSerializedChangeV1(idCompressor: IIdCompressor, changeFamily: ChangeFamily<SharedTreeEditBuilder, SharedTreeChange>, serializedChange: JsonCompatibleReadOnly): TaggedChange<SharedTreeChange>;
10
+ declare function encodeSerializedChangeV1(idCompressor: IIdCompressor, changeFamily: ChangeFamily<SharedTreeEditBuilder, SharedTreeChange, unknown>, change: SharedTreeChange, changeRevision: RevisionTag, contextRevision?: RevisionTag): JsonCompatibleReadOnly;
11
+ declare function decodeSerializedChangeV1(idCompressor: IIdCompressor, changeFamily: ChangeFamily<SharedTreeEditBuilder, SharedTreeChange, unknown>, serializedChange: JsonCompatibleReadOnly): TaggedChange<SharedTreeChange>;
12
12
  /**
13
13
  * Provides utilities for serializing and deserializing SharedTree changes.
14
14
  *
@@ -1 +1 @@
1
- {"version":3,"file":"serializedChange.d.ts","sourceRoot":"","sources":["../../src/shared-tree/serializedChange.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA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AC;IAC1B,OAAO,SAAS,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,+DAA+D;IAC/D,EAAE,EAAE;QACH;;;;;;;;WAQG;QACH,MAAM,EAAE,wBAAwB;QAChC;;;;;;WAMG;QACH,MAAM,EAAE,wBAAwB;KAChC;CACQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\nimport { isStableId } from \"@fluidframework/id-compressor/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\ttype ChangeFamily,\n\ttype RevisionTag,\n\ttagChange,\n\ttype ChangeEncodingContext,\n\ttype TaggedChange,\n} from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\nimport type { SharedTreeEditBuilder } from \"./sharedTreeEditBuilder.js\";\nimport { SharedTreeChangeFormatVersion } from \"./sharedTreeChangeCodecs.js\";\n\n/**\n * Represents a serialized change for SharedTree.\n *\n * Data in this format is not expected to be durable beyond the scope of a single session.\n */\ninterface SerializedChange {\n\treadonly version: 1;\n\treadonly revision: RevisionTag;\n\treadonly change: JsonCompatibleReadOnly;\n\treadonly originatorId: SessionId;\n}\n\nfunction isSerializedChangeV1(value: unknown): value is SerializedChange {\n\tif (typeof value !== \"object\" || value === null) {\n\t\treturn false;\n\t}\n\tconst change = value as Partial<SerializedChange>;\n\treturn (\n\t\tchange.version === 1 &&\n\t\t(change.revision === \"root\" || typeof change.revision === \"number\") &&\n\t\ttypeof change.originatorId === \"string\" &&\n\t\tisStableId(change.originatorId) &&\n\t\tchange.change !== undefined\n\t);\n}\n\nfunction encodeSerializedChangeV1(\n\tidCompressor: IIdCompressor,\n\tchangeFamily: ChangeFamily<SharedTreeEditBuilder, SharedTreeChange>,\n\tchange: SharedTreeChange,\n\tchangeRevision: RevisionTag,\n\tcontextRevision?: RevisionTag,\n): JsonCompatibleReadOnly {\n\tconst context: ChangeEncodingContext = {\n\t\tidCompressor,\n\t\toriginatorId: idCompressor.localSessionId,\n\t\trevision: contextRevision,\n\t\tisSummary: false,\n\t};\n\tconst encodedChange = changeFamily.codecs\n\t\t.resolve(SharedTreeChangeFormatVersion.v4)\n\t\t.encode(change, context);\n\n\treturn {\n\t\tversion: 1,\n\t\trevision: changeRevision,\n\t\toriginatorId: idCompressor.localSessionId,\n\t\tchange: encodedChange,\n\t} satisfies SerializedChange;\n}\n\nfunction decodeSerializedChangeV1(\n\tidCompressor: IIdCompressor,\n\tchangeFamily: ChangeFamily<SharedTreeEditBuilder, SharedTreeChange>,\n\tserializedChange: JsonCompatibleReadOnly,\n): TaggedChange<SharedTreeChange> {\n\tif (!isSerializedChangeV1(serializedChange)) {\n\t\tthrow new UsageError(`Cannot apply change. Invalid serialized change format.`);\n\t}\n\tconst { revision, originatorId, change } = serializedChange;\n\tif (originatorId !== idCompressor.localSessionId) {\n\t\tthrow new UsageError(\n\t\t\t`Cannot apply change. A serialized changed must be applied to the same SharedTree as it was created from.`,\n\t\t);\n\t}\n\tconst context: ChangeEncodingContext = {\n\t\tidCompressor,\n\t\toriginatorId: idCompressor.localSessionId,\n\t\trevision,\n\t\tisSummary: false,\n\t};\n\tconst treeChange = changeFamily.codecs\n\t\t.resolve(SharedTreeChangeFormatVersion.v4)\n\t\t.decode(change, context);\n\treturn tagChange(treeChange, revision);\n}\n\n/**\n * Provides utilities for serializing and deserializing SharedTree changes.\n *\n * @remarks Such changes are not expected to be durable beyond the scope of a single session.\n */\nexport const SerializedChange = {\n\t/** Utilities for version 1 of the serialized change format. */\n\tV1: {\n\t\t/**\n\t\t * Encodes a SharedTree change into the version 1 serialized change format.\n\t\t * @param idCompressor - The ID compressor to use for encoding.\n\t\t * @param changeFamily - The change family to use for encoding.\n\t\t * @param change - The change to encode.\n\t\t * @param changeRevision - The revision tag for the change.\n\t\t * @param contextRevision - The optional context revision tag.\n\t\t * @returns The encoded change in the version 1 serialized change format.\n\t\t */\n\t\tencode: encodeSerializedChangeV1,\n\t\t/**\n\t\t * Decodes a version 1 serialized change into a SharedTree change.\n\t\t * @param idCompressor - The ID compressor to use for decoding.\n\t\t * @param changeFamily - The change family to use for decoding.\n\t\t * @param serializedChange - The serialized change to decode.\n\t\t * @returns The decoded SharedTree change.\n\t\t */\n\t\tdecode: decodeSerializedChangeV1,\n\t},\n} as const;\n"]}
1
+ {"version":3,"file":"serializedChange.js","sourceRoot":"","sources":["../../src/shared-tree/serializedChange.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtE,OAAO,EAGN,SAAS,GAGT,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAc5E,SAAS,oBAAoB,CAAC,KAAc;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACjD,OAAO,KAAK,CAAC;IACd,CAAC;IACD,MAAM,MAAM,GAAG,KAAkC,CAAC;IAClD,OAAO,CACN,MAAM,CAAC,OAAO,KAAK,CAAC;QACpB,CAAC,MAAM,CAAC,QAAQ,KAAK,MAAM,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,CAAC;QACnE,OAAO,MAAM,CAAC,YAAY,KAAK,QAAQ;QACvC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC;QAC/B,MAAM,CAAC,MAAM,KAAK,SAAS,CAC3B,CAAC;AACH,CAAC;AAED,SAAS,wBAAwB,CAChC,YAA2B,EAC3B,YAA4E,EAC5E,MAAwB,EACxB,cAA2B,EAC3B,eAA6B;IAE7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wBAAwB;QAChC;;;;;;WAMG;QACH,MAAM,EAAE,wBAAwB;KAChC;CACQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\nimport { isStableId } from \"@fluidframework/id-compressor/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport {\n\ttype ChangeFamily,\n\ttype RevisionTag,\n\ttagChange,\n\ttype ChangeEncodingContext,\n\ttype TaggedChange,\n} from \"../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../util/index.js\";\n\nimport type { SharedTreeChange } from \"./sharedTreeChangeTypes.js\";\nimport type { SharedTreeEditBuilder } from \"./sharedTreeEditBuilder.js\";\nimport { SharedTreeChangeFormatVersion } from \"./sharedTreeChangeCodecs.js\";\n\n/**\n * Represents a serialized change for SharedTree.\n *\n * Data in this format is not expected to be durable beyond the scope of a single session.\n */\ninterface SerializedChange {\n\treadonly version: 1;\n\treadonly revision: RevisionTag;\n\treadonly change: JsonCompatibleReadOnly;\n\treadonly originatorId: SessionId;\n}\n\nfunction isSerializedChangeV1(value: unknown): value is SerializedChange {\n\tif (typeof value !== \"object\" || value === null) {\n\t\treturn false;\n\t}\n\tconst change = value as Partial<SerializedChange>;\n\treturn (\n\t\tchange.version === 1 &&\n\t\t(change.revision === \"root\" || typeof change.revision === \"number\") &&\n\t\ttypeof change.originatorId === \"string\" &&\n\t\tisStableId(change.originatorId) &&\n\t\tchange.change !== undefined\n\t);\n}\n\nfunction encodeSerializedChangeV1(\n\tidCompressor: IIdCompressor,\n\tchangeFamily: ChangeFamily<SharedTreeEditBuilder, SharedTreeChange, unknown>,\n\tchange: SharedTreeChange,\n\tchangeRevision: RevisionTag,\n\tcontextRevision?: RevisionTag,\n): JsonCompatibleReadOnly {\n\tconst context: ChangeEncodingContext = {\n\t\tidCompressor,\n\t\toriginatorId: idCompressor.localSessionId,\n\t\trevision: contextRevision,\n\t\tisSummary: false,\n\t};\n\tconst encodedChange = changeFamily.codecs\n\t\t.resolve(SharedTreeChangeFormatVersion.v4)\n\t\t.encode(change, context);\n\n\treturn {\n\t\tversion: 1,\n\t\trevision: changeRevision,\n\t\toriginatorId: idCompressor.localSessionId,\n\t\tchange: encodedChange,\n\t} satisfies SerializedChange;\n}\n\nfunction decodeSerializedChangeV1(\n\tidCompressor: IIdCompressor,\n\tchangeFamily: ChangeFamily<SharedTreeEditBuilder, SharedTreeChange, unknown>,\n\tserializedChange: JsonCompatibleReadOnly,\n): TaggedChange<SharedTreeChange> {\n\tif (!isSerializedChangeV1(serializedChange)) {\n\t\tthrow new UsageError(`Cannot apply change. Invalid serialized change format.`);\n\t}\n\tconst { revision, originatorId, change } = serializedChange;\n\tif (originatorId !== idCompressor.localSessionId) {\n\t\tthrow new UsageError(\n\t\t\t`Cannot apply change. A serialized changed must be applied to the same SharedTree as it was created from.`,\n\t\t);\n\t}\n\tconst context: ChangeEncodingContext = {\n\t\tidCompressor,\n\t\toriginatorId: idCompressor.localSessionId,\n\t\trevision,\n\t\tisSummary: false,\n\t};\n\tconst treeChange = changeFamily.codecs\n\t\t.resolve(SharedTreeChangeFormatVersion.v4)\n\t\t.decode(change, context);\n\treturn tagChange(treeChange, revision);\n}\n\n/**\n * Provides utilities for serializing and deserializing SharedTree changes.\n *\n * @remarks Such changes are not expected to be durable beyond the scope of a single session.\n */\nexport const SerializedChange = {\n\t/** Utilities for version 1 of the serialized change format. */\n\tV1: {\n\t\t/**\n\t\t * Encodes a SharedTree change into the version 1 serialized change format.\n\t\t * @param idCompressor - The ID compressor to use for encoding.\n\t\t * @param changeFamily - The change family to use for encoding.\n\t\t * @param change - The change to encode.\n\t\t * @param changeRevision - The revision tag for the change.\n\t\t * @param contextRevision - The optional context revision tag.\n\t\t * @returns The encoded change in the version 1 serialized change format.\n\t\t */\n\t\tencode: encodeSerializedChangeV1,\n\t\t/**\n\t\t * Decodes a version 1 serialized change into a SharedTree change.\n\t\t * @param idCompressor - The ID compressor to use for decoding.\n\t\t * @param changeFamily - The change family to use for decoding.\n\t\t * @param serializedChange - The serialized change to decode.\n\t\t * @returns The decoded SharedTree change.\n\t\t */\n\t\tdecode: decodeSerializedChangeV1,\n\t},\n} as const;\n"]}
@@ -16,6 +16,7 @@ import { type ImplicitFieldSchema, type ReadSchema, type SimpleTreeSchema, type
16
16
  import { type Breakable, type JsonCompatible } from "../util/index.js";
17
17
  import type { SchematizingSimpleTreeView } from "./schematizingTreeView.js";
18
18
  import { SharedTreeChangeFormatVersion } from "./sharedTreeChangeCodecs.js";
19
+ import type { SharedTreeChangeProcessingContext } from "./sharedTreeChangeFamily.js";
19
20
  import type { SharedTreeChange } from "./sharedTreeChangeTypes.js";
20
21
  import type { SharedTreeEditBuilder } from "./sharedTreeEditBuilder.js";
21
22
  import { type TreeCheckout } from "./treeCheckout.js";
@@ -77,7 +78,7 @@ export type SharedTreeKernelView = Omit<ITreePrivate, keyof (IChannelView & IFlu
77
78
  *
78
79
  * TODO: detail compatibility requirements.
79
80
  */
80
- export declare class SharedTreeKernel extends SharedTreeCore<SharedTreeEditBuilder, SharedTreeChange> implements SharedKernel {
81
+ export declare class SharedTreeKernel extends SharedTreeCore<SharedTreeEditBuilder, SharedTreeChange, SharedTreeChangeProcessingContext> implements SharedKernel {
81
82
  private readonly logger;
82
83
  readonly checkout: TreeCheckout;
83
84
  get storedSchema(): TreeStoredSchemaRepository;
@@ -102,7 +103,7 @@ export declare class SharedTreeKernel extends SharedTreeCore<SharedTreeEditBuild
102
103
  private checkoutBranch;
103
104
  loadCore(services: IChannelStorageService): Promise<void>;
104
105
  didAttach(): void;
105
- applyStashedOp(...args: Parameters<SharedTreeCore<SharedTreeEditBuilder, SharedTreeChange>["applyStashedOp"]>): void;
106
+ applyStashedOp(...args: Parameters<SharedTreeCore<SharedTreeEditBuilder, SharedTreeChange, SharedTreeChangeProcessingContext>["applyStashedOp"]>): void;
106
107
  protected submitCommit(branchId: BranchId, commit: GraphCommit<SharedTreeChange>, schemaAndPolicy: ClonableSchemaAndPolicy, isResubmit: boolean): void;
107
108
  onDisconnect(): void;
108
109
  }
@@ -272,7 +273,9 @@ export declare const ForestTypeOptimized: ForestType;
272
273
  * Includes validation with scales poorly.
273
274
  * May be asymptotically slower than {@link ForestTypeReference}, and may perform very badly with larger data sizes.
274
275
  * @privateRemarks
275
- * The "ObjectForest" forest type with expensive asserts for debugging.
276
+ * A {@link ComparisonForest} which uses the "ChunkedForest" forest type as its main forest and validates every delta
277
+ * against a reference "ObjectForest" (with expensive asserts enabled for schema validation).
278
+ * This exercises the optimized forest while asserting that its contents stay consistent with the reference implementation.
276
279
  * @beta
277
280
  */
278
281
  export declare const ForestTypeExpensiveDebug: ForestType;
@@ -1 +1 @@
1
- {"version":3,"file":"sharedTree.d.ts","sourceRoot":"","sources":["../../src/shared-tree/sharedTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAE3F,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAC7F,OAAO,KAAK,EAAE,aAAa,EAAY,MAAM,+BAA+B,CAAC;AAC7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAC;AAC5F,OAAO,KAAK,EACX,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,KAAK,kBAAkB,EAAc,MAAM,0CAA0C,CAAC;AAE/F,OAAO,EACN,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAI1B,KAAK,aAAa,EAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEN,KAAK,WAAW,EAChB,KAAK,eAAe,EACpB,KAAK,YAAY,EAOjB,KAAK,gBAAgB,EACrB,0BAA0B,EAC1B,KAAK,4BAA4B,EAKjC,MAAM,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A6B,CAAC;CAAG;AAE3C;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC7B;;OAEG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACvC;;;OAGG;IACH,cAAc,EAAE,uBAAuB,CAAC;CACxC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,UAAW,SAAQ,UAAU,CAAC,YAAY,CAAC;CAAG;AAE/D;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,YAG/B,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,YAY/B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,wBAAwB,YAepC,CAAC;AAaF;;GAEG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,UAAU,EACnB,MAAM,EAAE,4BAA4B,EACpC,YAAY,EAAE,aAAa,EAC3B,yBAAyB,EAAE,yBAAyB,GAClD,eAAe,CAOjB;AAED,eAAO,MAAM,wBAAwB,EAAE,QAAQ,CAAC,yBAAyB,CAWxE,CAAC"}
@@ -7,7 +7,7 @@ import { assert, fail } from "@fluidframework/core-utils/internal";
7
7
  import { UsageError } from "@fluidframework/telemetry-utils/internal";
8
8
  import { DependentFormatVersion, FluidClientVersion, FormatValidatorNoOp, } from "../codec/index.js";
9
9
  import { LeafNodeStoredSchema, MapNodeStoredSchema, ObjectNodeStoredSchema, RevisionTagCodec, TreeStoredSchemaRepository, detachedFieldIndexCodecBuilder, makeDetachedFieldIndex, moveToDetachedField, } from "../core/index.js";
10
- import { DetachedFieldIndexSummarizer, FieldBatchDecodingContext, FieldKinds, ForestSummarizer, SchemaSummarizer, TreeCompressionStrategy, buildChunkedForest, buildForest, defaultIncrementalEncodingPolicy, defaultSchemaPolicy, fieldBatchCodecBuilder, forestCodecBuilder, jsonableTreeFromFieldCursor, makeMitigatedChangeFamily, makeTreeChunker, } from "../feature-libraries/index.js";
10
+ import { DetachedFieldIndexSummarizer, FieldBatchDecodingContext, FieldKinds, ForestSummarizer, SchemaSummarizer, TreeCompressionStrategy, buildChunkedForest, buildForest, ComparisonForest, defaultIncrementalEncodingPolicy, defaultSchemaPolicy, fieldBatchCodecBuilder, forestCodecBuilder, jsonableTreeFromFieldCursor, makeMitigatedChangeFamily, makeTreeChunker, } from "../feature-libraries/index.js";
11
11
  import { schemaCodecBuilder } from "../feature-libraries/index.js";
12
12
  import { getCodecTreeForEditManagerFormatWithChange, getCodecTreeForMessageFormatWithChange, makeMessageCodecBuilder, MessageFormatVersion, SharedTreeCore, EditManagerFormatVersion, makeEditManagerCodecBuilder, } from "../shared-tree-core/index.js";
13
13
  import { NodeKind, tryStoredSchemaAsArray, FieldKind, } from "../simple-tree/index.js";
@@ -42,8 +42,7 @@ let SharedTreeKernel = (() => {
42
42
  }
43
43
  const schema = new TreeStoredSchemaRepository();
44
44
  const forest = buildConfiguredForest(breaker, options.forest, schema, idCompressor, options.shouldEncodeIncrementally);
45
- const revisionTagCodec = new RevisionTagCodec(idCompressor);
46
- const removedRoots = makeDetachedFieldIndex("repair", revisionTagCodec, idCompressor, options);
45
+ const removedRoots = makeDetachedFieldIndex("repair");
47
46
  const schemaCodec = schemaCodecBuilder.build(options);
48
47
  const schemaSummarizer = new SchemaSummarizer(schema, {
49
48
  getCurrentSeq: lastSequenceNumber,
@@ -66,8 +65,9 @@ let SharedTreeKernel = (() => {
66
65
  ? { sharedObjectId: sharedObject.id }
67
66
  : undefined,
68
67
  });
69
- const forestSummarizer = new ForestSummarizer(forest, revisionTagCodec, encoderContext, decoderContext, options, idCompressor, initialSequenceNumber, options.shouldEncodeIncrementally);
70
- const removedRootsSummarizer = new DetachedFieldIndexSummarizer(removedRoots, options.minVersionForCollab);
68
+ const forestSummarizer = new ForestSummarizer(forest, encoderContext, decoderContext, options, idCompressor, initialSequenceNumber, options.shouldEncodeIncrementally);
69
+ const revisionTagCodec = new RevisionTagCodec(idCompressor);
70
+ const removedRootsSummarizer = new DetachedFieldIndexSummarizer(removedRoots, revisionTagCodec, idCompressor, options);
71
71
  const innerChangeFamily = new SharedTreeChangeFamily(revisionTagCodec, fieldBatchCodec, options, options.treeEncodeType, idCompressor);
72
72
  const changeFamily = makeMitigatedChangeFamily(innerChangeFamily, SharedTreeChangeFamily.emptyChange, (error) => {
73
73
  // TODO:6344 Add telemetry for these errors.
@@ -305,10 +305,12 @@ export const ForestTypeOptimized = toForestType((breaker, schema, idCompressor,
305
305
  * Includes validation with scales poorly.
306
306
  * May be asymptotically slower than {@link ForestTypeReference}, and may perform very badly with larger data sizes.
307
307
  * @privateRemarks
308
- * The "ObjectForest" forest type with expensive asserts for debugging.
308
+ * A {@link ComparisonForest} which uses the "ChunkedForest" forest type as its main forest and validates every delta
309
+ * against a reference "ObjectForest" (with expensive asserts enabled for schema validation).
310
+ * This exercises the optimized forest while asserting that its contents stay consistent with the reference implementation.
309
311
  * @beta
310
312
  */
311
- export const ForestTypeExpensiveDebug = toForestType((breaker, schema) => buildForest(breaker, schema, undefined, true));
313
+ export const ForestTypeExpensiveDebug = toForestType((breaker, schema, idCompressor, shouldEncodeIncrementally) => new ComparisonForest(buildChunkedForest(makeTreeChunker(schema, defaultSchemaPolicy, shouldEncodeIncrementally), undefined, idCompressor), buildForest(breaker, schema, undefined, true)));
312
314
  function toForestType(factory) {
313
315
  return factory;
314
316
  }