@fluidframework/tree 2.113.1 → 2.115.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 (660) hide show
  1. package/CHANGELOG.md +289 -0
  2. package/api-report/tree.alpha.api.md +127 -39
  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 +4 -3
  14. package/dist/core/index.d.ts.map +1 -1
  15. package/dist/core/index.js +3 -2
  16. package/dist/core/index.js.map +1 -1
  17. package/dist/core/rebase/index.d.ts +1 -1
  18. package/dist/core/rebase/index.d.ts.map +1 -1
  19. package/dist/core/rebase/index.js +2 -1
  20. package/dist/core/rebase/index.js.map +1 -1
  21. package/dist/core/rebase/types.d.ts +110 -0
  22. package/dist/core/rebase/types.d.ts.map +1 -1
  23. package/dist/core/rebase/types.js +47 -1
  24. package/dist/core/rebase/types.js.map +1 -1
  25. package/dist/core/tree/delta.d.ts +62 -16
  26. package/dist/core/tree/delta.d.ts.map +1 -1
  27. package/dist/core/tree/delta.js.map +1 -1
  28. package/dist/core/tree/detachedFieldIndex.d.ts +7 -13
  29. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  30. package/dist/core/tree/detachedFieldIndex.js +32 -46
  31. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  32. package/dist/core/tree/index.d.ts +1 -0
  33. package/dist/core/tree/index.d.ts.map +1 -1
  34. package/dist/core/tree/index.js.map +1 -1
  35. package/dist/core/tree/visitorUtils.d.ts +2 -4
  36. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  37. package/dist/core/tree/visitorUtils.js +2 -2
  38. package/dist/core/tree/visitorUtils.js.map +1 -1
  39. package/dist/entrypoints/alpha.d.ts +1 -1
  40. package/dist/entrypoints/alpha.d.ts.map +1 -1
  41. package/dist/entrypoints/alpha.js +8 -3
  42. package/dist/entrypoints/alpha.js.map +1 -1
  43. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +9 -6
  44. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  45. package/dist/feature-libraries/chunked-forest/codec/codecs.js +16 -13
  46. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  47. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  48. package/dist/feature-libraries/chunked-forest/uniformChunk.js +10 -2
  49. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  50. package/dist/feature-libraries/comparison-forest/comparisonForest.d.ts +51 -0
  51. package/dist/feature-libraries/comparison-forest/comparisonForest.d.ts.map +1 -0
  52. package/dist/feature-libraries/comparison-forest/comparisonForest.js +98 -0
  53. package/dist/feature-libraries/comparison-forest/comparisonForest.js.map +1 -0
  54. package/dist/feature-libraries/comparison-forest/index.d.ts +6 -0
  55. package/dist/feature-libraries/comparison-forest/index.d.ts.map +1 -0
  56. package/dist/feature-libraries/comparison-forest/index.js +10 -0
  57. package/dist/feature-libraries/comparison-forest/index.js.map +1 -0
  58. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +8 -6
  59. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  60. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +6 -3
  61. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  62. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  63. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  64. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  65. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts +2 -2
  66. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  67. package/dist/feature-libraries/default-schema/noChangeCodecs.js +3 -1
  68. package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  69. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +6 -3
  70. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  71. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +18 -6
  72. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  73. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +2 -3
  74. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  75. package/dist/feature-libraries/forest-summary/forestSummarizer.js +2 -3
  76. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  77. package/dist/feature-libraries/index.d.ts +4 -3
  78. package/dist/feature-libraries/index.d.ts.map +1 -1
  79. package/dist/feature-libraries/index.js +77 -72
  80. package/dist/feature-libraries/index.js.map +1 -1
  81. package/dist/feature-libraries/mitigatedChangeFamily.d.ts +1 -1
  82. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  83. package/dist/feature-libraries/mitigatedChangeFamily.js +12 -0
  84. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  85. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +9 -1
  86. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  87. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  88. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +2 -2
  89. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  90. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  91. package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
  92. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  93. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  94. package/dist/feature-libraries/modular-schema/invert.d.ts +15 -0
  95. package/dist/feature-libraries/modular-schema/invert.d.ts.map +1 -0
  96. package/dist/feature-libraries/modular-schema/invert.js +159 -0
  97. package/dist/feature-libraries/modular-schema/invert.js.map +1 -0
  98. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts +3 -4
  99. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
  100. package/dist/feature-libraries/modular-schema/minimizeModularChange.js +2 -2
  101. package/dist/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
  102. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +9 -9
  103. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  104. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +0 -2
  105. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  106. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +2 -2
  107. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  108. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  109. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  110. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  111. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  112. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -22
  113. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  114. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +53 -406
  115. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  116. package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts +61 -0
  117. package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -0
  118. package/dist/feature-libraries/modular-schema/modularChangeUtils.js +205 -0
  119. package/dist/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -0
  120. package/dist/feature-libraries/modular-schema/prune.d.ts +10 -0
  121. package/dist/feature-libraries/modular-schema/prune.d.ts.map +1 -0
  122. package/dist/feature-libraries/modular-schema/prune.js +49 -0
  123. package/dist/feature-libraries/modular-schema/prune.js.map +1 -0
  124. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +2 -2
  125. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  126. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  127. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -2
  128. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  129. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  130. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  131. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  132. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  133. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +2 -2
  134. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  135. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  136. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +2 -2
  137. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  138. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  139. package/dist/feature-libraries/treeTextCursor.d.ts +15 -0
  140. package/dist/feature-libraries/treeTextCursor.d.ts.map +1 -1
  141. package/dist/feature-libraries/treeTextCursor.js +64 -1
  142. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  143. package/dist/index.d.ts +6 -4
  144. package/dist/index.d.ts.map +1 -1
  145. package/dist/index.js +10 -5
  146. package/dist/index.js.map +1 -1
  147. package/dist/packageVersion.d.ts +1 -1
  148. package/dist/packageVersion.js +1 -1
  149. package/dist/packageVersion.js.map +1 -1
  150. package/dist/shared-tree/serializedChange.d.ts +2 -2
  151. package/dist/shared-tree/serializedChange.d.ts.map +1 -1
  152. package/dist/shared-tree/serializedChange.js.map +1 -1
  153. package/dist/shared-tree/sharedTree.d.ts +11 -3
  154. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  155. package/dist/shared-tree/sharedTree.js +9 -7
  156. package/dist/shared-tree/sharedTree.js.map +1 -1
  157. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +2 -2
  158. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  159. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  160. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +41 -4
  161. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  162. package/dist/shared-tree/sharedTreeChangeFamily.js +57 -1
  163. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  164. package/dist/shared-tree/transactionMinimize.d.ts.map +1 -1
  165. package/dist/shared-tree/transactionMinimize.js +2 -2
  166. package/dist/shared-tree/transactionMinimize.js.map +1 -1
  167. package/dist/shared-tree/transactionPostProcessor.d.ts +2 -1
  168. package/dist/shared-tree/transactionPostProcessor.d.ts.map +1 -1
  169. package/dist/shared-tree/transactionPostProcessor.js.map +1 -1
  170. package/dist/shared-tree/treeCheckout.d.ts +13 -7
  171. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  172. package/dist/shared-tree/treeCheckout.js +59 -13
  173. package/dist/shared-tree/treeCheckout.js.map +1 -1
  174. package/dist/shared-tree-core/branch.d.ts +24 -9
  175. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  176. package/dist/shared-tree-core/branch.js +7 -0
  177. package/dist/shared-tree-core/branch.js.map +1 -1
  178. package/dist/shared-tree-core/editManager.d.ts +4 -4
  179. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  180. package/dist/shared-tree-core/editManager.js +2 -0
  181. package/dist/shared-tree-core/editManager.js.map +1 -1
  182. package/dist/shared-tree-core/editManagerCodecs.d.ts +3 -14
  183. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  184. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  185. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +11 -1
  186. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  187. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  188. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +4 -11
  189. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  190. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  191. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +4 -11
  192. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  193. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  194. package/dist/shared-tree-core/editManagerSummarizer.d.ts +4 -4
  195. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  196. package/dist/shared-tree-core/editManagerSummarizer.js +0 -1
  197. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  198. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
  199. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  200. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  201. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  202. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  203. package/dist/shared-tree-core/messageCodecs.d.ts +8 -1
  204. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  205. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  206. package/dist/shared-tree-core/sharedTreeCore.d.ts +5 -5
  207. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  208. package/dist/shared-tree-core/sharedTreeCore.js +1 -1
  209. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  210. package/dist/shared-tree-core/transaction.d.ts +10 -10
  211. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  212. package/dist/shared-tree-core/transaction.js +6 -3
  213. package/dist/shared-tree-core/transaction.js.map +1 -1
  214. package/dist/simple-tree/api/eraseSchemaDetails.d.ts +15 -0
  215. package/dist/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -1
  216. package/dist/simple-tree/api/eraseSchemaDetails.js +15 -0
  217. package/dist/simple-tree/api/eraseSchemaDetails.js.map +1 -1
  218. package/dist/simple-tree/api/index.d.ts +1 -1
  219. package/dist/simple-tree/api/index.d.ts.map +1 -1
  220. package/dist/simple-tree/api/index.js +2 -3
  221. package/dist/simple-tree/api/index.js.map +1 -1
  222. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +3 -3
  223. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  224. package/dist/simple-tree/api/schemaStatics.d.ts +6 -7
  225. package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
  226. package/dist/simple-tree/api/schemaStatics.js.map +1 -1
  227. package/dist/simple-tree/api/treeNodeApi.d.ts +20 -24
  228. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  229. package/dist/simple-tree/api/treeNodeApi.js +48 -49
  230. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  231. package/dist/simple-tree/core/treeNode.d.ts +5 -6
  232. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  233. package/dist/simple-tree/core/treeNode.js +2 -4
  234. package/dist/simple-tree/core/treeNode.js.map +1 -1
  235. package/dist/simple-tree/core/withType.d.ts +20 -7
  236. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  237. package/dist/simple-tree/core/withType.js +4 -7
  238. package/dist/simple-tree/core/withType.js.map +1 -1
  239. package/dist/simple-tree/index.d.ts +2 -2
  240. package/dist/simple-tree/index.d.ts.map +1 -1
  241. package/dist/simple-tree/index.js +3 -4
  242. package/dist/simple-tree/index.js.map +1 -1
  243. package/dist/simple-tree/leafNodeSchema.d.ts +6 -1
  244. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  245. package/dist/simple-tree/leafNodeSchema.js +0 -1
  246. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  247. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +53 -5
  248. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  249. package/dist/simple-tree/node-kinds/array/arrayNode.js +91 -10
  250. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  251. package/dist/simple-tree/node-kinds/map/mapNode.d.ts +90 -0
  252. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  253. package/dist/simple-tree/node-kinds/map/mapNode.js +26 -1
  254. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  255. package/dist/simple-tree/node-kinds/object/objectNode.js +2 -2
  256. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  257. package/dist/simple-tree/node-kinds/record/recordNode.js +2 -2
  258. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  259. package/dist/text/codePointUtils.d.ts +2 -2
  260. package/dist/text/codePointUtils.js +2 -2
  261. package/dist/text/codePointUtils.js.map +1 -1
  262. package/dist/text/index.d.ts +3 -3
  263. package/dist/text/index.d.ts.map +1 -1
  264. package/dist/text/index.js +4 -4
  265. package/dist/text/index.js.map +1 -1
  266. package/dist/text/textDomain.d.ts +30 -18
  267. package/dist/text/textDomain.d.ts.map +1 -1
  268. package/dist/text/textDomain.js +44 -23
  269. package/dist/text/textDomain.js.map +1 -1
  270. package/dist/text/textDomainFormatted.d.ts +180 -82
  271. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  272. package/dist/text/textDomainFormatted.js +164 -84
  273. package/dist/text/textDomainFormatted.js.map +1 -1
  274. package/dist/text/textDomainFormattedDefault.d.ts +48 -25
  275. package/dist/text/textDomainFormattedDefault.d.ts.map +1 -1
  276. package/dist/text/textDomainFormattedDefault.js +24 -19
  277. package/dist/text/textDomainFormattedDefault.js.map +1 -1
  278. package/dist/treeDataStore.d.ts +49 -0
  279. package/dist/treeDataStore.d.ts.map +1 -0
  280. package/dist/treeDataStore.js +57 -0
  281. package/dist/treeDataStore.js.map +1 -0
  282. package/dist/treeFactory.d.ts +8 -3
  283. package/dist/treeFactory.d.ts.map +1 -1
  284. package/dist/treeFactory.js +6 -1
  285. package/dist/treeFactory.js.map +1 -1
  286. package/dist/util/compressedIds.d.ts +22 -2
  287. package/dist/util/compressedIds.d.ts.map +1 -1
  288. package/dist/util/compressedIds.js +22 -1
  289. package/dist/util/compressedIds.js.map +1 -1
  290. package/lib/core/change-family/changeFamily.d.ts +15 -4
  291. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  292. package/lib/core/change-family/changeFamily.js.map +1 -1
  293. package/lib/core/change-family/editBuilder.d.ts +2 -3
  294. package/lib/core/change-family/editBuilder.d.ts.map +1 -1
  295. package/lib/core/change-family/editBuilder.js +1 -2
  296. package/lib/core/change-family/editBuilder.js.map +1 -1
  297. package/lib/core/change-family/index.d.ts +1 -1
  298. package/lib/core/change-family/index.d.ts.map +1 -1
  299. package/lib/core/change-family/index.js.map +1 -1
  300. package/lib/core/index.d.ts +4 -3
  301. package/lib/core/index.d.ts.map +1 -1
  302. package/lib/core/index.js +2 -2
  303. package/lib/core/index.js.map +1 -1
  304. package/lib/core/rebase/index.d.ts +1 -1
  305. package/lib/core/rebase/index.d.ts.map +1 -1
  306. package/lib/core/rebase/index.js +1 -1
  307. package/lib/core/rebase/index.js.map +1 -1
  308. package/lib/core/rebase/types.d.ts +110 -0
  309. package/lib/core/rebase/types.d.ts.map +1 -1
  310. package/lib/core/rebase/types.js +46 -0
  311. package/lib/core/rebase/types.js.map +1 -1
  312. package/lib/core/tree/delta.d.ts +62 -16
  313. package/lib/core/tree/delta.d.ts.map +1 -1
  314. package/lib/core/tree/delta.js.map +1 -1
  315. package/lib/core/tree/detachedFieldIndex.d.ts +7 -13
  316. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  317. package/lib/core/tree/detachedFieldIndex.js +7 -21
  318. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  319. package/lib/core/tree/index.d.ts +1 -0
  320. package/lib/core/tree/index.d.ts.map +1 -1
  321. package/lib/core/tree/index.js.map +1 -1
  322. package/lib/core/tree/visitorUtils.d.ts +2 -4
  323. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  324. package/lib/core/tree/visitorUtils.js +2 -2
  325. package/lib/core/tree/visitorUtils.js.map +1 -1
  326. package/lib/entrypoints/alpha.d.ts +1 -1
  327. package/lib/entrypoints/alpha.d.ts.map +1 -1
  328. package/lib/entrypoints/alpha.js +1 -1
  329. package/lib/entrypoints/alpha.js.map +1 -1
  330. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +9 -6
  331. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  332. package/lib/feature-libraries/chunked-forest/codec/codecs.js +16 -13
  333. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  334. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  335. package/lib/feature-libraries/chunked-forest/uniformChunk.js +10 -2
  336. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  337. package/lib/feature-libraries/comparison-forest/comparisonForest.d.ts +51 -0
  338. package/lib/feature-libraries/comparison-forest/comparisonForest.d.ts.map +1 -0
  339. package/lib/feature-libraries/comparison-forest/comparisonForest.js +94 -0
  340. package/lib/feature-libraries/comparison-forest/comparisonForest.js.map +1 -0
  341. package/lib/feature-libraries/comparison-forest/index.d.ts +6 -0
  342. package/lib/feature-libraries/comparison-forest/index.d.ts.map +1 -0
  343. package/lib/feature-libraries/comparison-forest/index.js +6 -0
  344. package/lib/feature-libraries/comparison-forest/index.js.map +1 -0
  345. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +8 -6
  346. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  347. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +6 -3
  348. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  349. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  350. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  351. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  352. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts +2 -2
  353. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  354. package/lib/feature-libraries/default-schema/noChangeCodecs.js +3 -1
  355. package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  356. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +6 -3
  357. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  358. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +16 -4
  359. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  360. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +2 -3
  361. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  362. package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -3
  363. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  364. package/lib/feature-libraries/index.d.ts +4 -3
  365. package/lib/feature-libraries/index.d.ts.map +1 -1
  366. package/lib/feature-libraries/index.js +2 -1
  367. package/lib/feature-libraries/index.js.map +1 -1
  368. package/lib/feature-libraries/mitigatedChangeFamily.d.ts +1 -1
  369. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  370. package/lib/feature-libraries/mitigatedChangeFamily.js +12 -0
  371. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  372. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +9 -1
  373. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  374. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  375. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +2 -2
  376. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  377. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  378. package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
  379. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  380. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  381. package/lib/feature-libraries/modular-schema/invert.d.ts +15 -0
  382. package/lib/feature-libraries/modular-schema/invert.d.ts.map +1 -0
  383. package/lib/feature-libraries/modular-schema/invert.js +155 -0
  384. package/lib/feature-libraries/modular-schema/invert.js.map +1 -0
  385. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts +3 -4
  386. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
  387. package/lib/feature-libraries/modular-schema/minimizeModularChange.js +2 -2
  388. package/lib/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
  389. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +9 -9
  390. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  391. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +0 -2
  392. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  393. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts +2 -2
  394. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  395. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  396. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +2 -2
  397. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  398. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  399. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +8 -22
  400. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  401. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +16 -367
  402. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  403. package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts +61 -0
  404. package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -0
  405. package/lib/feature-libraries/modular-schema/modularChangeUtils.js +192 -0
  406. package/lib/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -0
  407. package/lib/feature-libraries/modular-schema/prune.d.ts +10 -0
  408. package/lib/feature-libraries/modular-schema/prune.d.ts.map +1 -0
  409. package/lib/feature-libraries/modular-schema/prune.js +45 -0
  410. package/lib/feature-libraries/modular-schema/prune.js.map +1 -0
  411. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +2 -2
  412. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  413. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  414. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -2
  415. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  416. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  417. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  418. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  419. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  420. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +2 -2
  421. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  422. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  423. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +2 -2
  424. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  425. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  426. package/lib/feature-libraries/treeTextCursor.d.ts +15 -0
  427. package/lib/feature-libraries/treeTextCursor.d.ts.map +1 -1
  428. package/lib/feature-libraries/treeTextCursor.js +62 -1
  429. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  430. package/lib/index.d.ts +6 -4
  431. package/lib/index.d.ts.map +1 -1
  432. package/lib/index.js +4 -3
  433. package/lib/index.js.map +1 -1
  434. package/lib/packageVersion.d.ts +1 -1
  435. package/lib/packageVersion.js +1 -1
  436. package/lib/packageVersion.js.map +1 -1
  437. package/lib/shared-tree/serializedChange.d.ts +2 -2
  438. package/lib/shared-tree/serializedChange.d.ts.map +1 -1
  439. package/lib/shared-tree/serializedChange.js.map +1 -1
  440. package/lib/shared-tree/sharedTree.d.ts +11 -3
  441. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  442. package/lib/shared-tree/sharedTree.js +10 -8
  443. package/lib/shared-tree/sharedTree.js.map +1 -1
  444. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +2 -2
  445. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  446. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  447. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +41 -4
  448. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  449. package/lib/shared-tree/sharedTreeChangeFamily.js +55 -0
  450. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  451. package/lib/shared-tree/transactionMinimize.d.ts.map +1 -1
  452. package/lib/shared-tree/transactionMinimize.js +3 -3
  453. package/lib/shared-tree/transactionMinimize.js.map +1 -1
  454. package/lib/shared-tree/transactionPostProcessor.d.ts +2 -1
  455. package/lib/shared-tree/transactionPostProcessor.d.ts.map +1 -1
  456. package/lib/shared-tree/transactionPostProcessor.js.map +1 -1
  457. package/lib/shared-tree/treeCheckout.d.ts +13 -7
  458. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  459. package/lib/shared-tree/treeCheckout.js +61 -15
  460. package/lib/shared-tree/treeCheckout.js.map +1 -1
  461. package/lib/shared-tree-core/branch.d.ts +24 -9
  462. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  463. package/lib/shared-tree-core/branch.js +7 -0
  464. package/lib/shared-tree-core/branch.js.map +1 -1
  465. package/lib/shared-tree-core/editManager.d.ts +4 -4
  466. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  467. package/lib/shared-tree-core/editManager.js +2 -0
  468. package/lib/shared-tree-core/editManager.js.map +1 -1
  469. package/lib/shared-tree-core/editManagerCodecs.d.ts +3 -14
  470. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  471. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  472. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +11 -1
  473. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  474. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  475. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +4 -11
  476. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  477. package/lib/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
  478. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  479. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +4 -11
  480. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  481. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
  482. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  483. package/lib/shared-tree-core/editManagerSummarizer.d.ts +4 -4
  484. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  485. package/lib/shared-tree-core/editManagerSummarizer.js +0 -1
  486. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  487. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
  488. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  489. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  490. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  491. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  492. package/lib/shared-tree-core/messageCodecs.d.ts +8 -1
  493. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  494. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  495. package/lib/shared-tree-core/sharedTreeCore.d.ts +5 -5
  496. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  497. package/lib/shared-tree-core/sharedTreeCore.js +1 -1
  498. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  499. package/lib/shared-tree-core/transaction.d.ts +10 -10
  500. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  501. package/lib/shared-tree-core/transaction.js +6 -3
  502. package/lib/shared-tree-core/transaction.js.map +1 -1
  503. package/lib/simple-tree/api/eraseSchemaDetails.d.ts +15 -0
  504. package/lib/simple-tree/api/eraseSchemaDetails.d.ts.map +1 -1
  505. package/lib/simple-tree/api/eraseSchemaDetails.js +15 -0
  506. package/lib/simple-tree/api/eraseSchemaDetails.js.map +1 -1
  507. package/lib/simple-tree/api/index.d.ts +1 -1
  508. package/lib/simple-tree/api/index.d.ts.map +1 -1
  509. package/lib/simple-tree/api/index.js +1 -1
  510. package/lib/simple-tree/api/index.js.map +1 -1
  511. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +3 -3
  512. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  513. package/lib/simple-tree/api/schemaStatics.d.ts +6 -7
  514. package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
  515. package/lib/simple-tree/api/schemaStatics.js.map +1 -1
  516. package/lib/simple-tree/api/treeNodeApi.d.ts +20 -24
  517. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  518. package/lib/simple-tree/api/treeNodeApi.js +46 -46
  519. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  520. package/lib/simple-tree/core/treeNode.d.ts +5 -6
  521. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  522. package/lib/simple-tree/core/treeNode.js +2 -4
  523. package/lib/simple-tree/core/treeNode.js.map +1 -1
  524. package/lib/simple-tree/core/withType.d.ts +20 -7
  525. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  526. package/lib/simple-tree/core/withType.js +4 -7
  527. package/lib/simple-tree/core/withType.js.map +1 -1
  528. package/lib/simple-tree/index.d.ts +2 -2
  529. package/lib/simple-tree/index.d.ts.map +1 -1
  530. package/lib/simple-tree/index.js +1 -1
  531. package/lib/simple-tree/index.js.map +1 -1
  532. package/lib/simple-tree/leafNodeSchema.d.ts +6 -1
  533. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  534. package/lib/simple-tree/leafNodeSchema.js +0 -1
  535. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  536. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +53 -5
  537. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  538. package/lib/simple-tree/node-kinds/array/arrayNode.js +93 -12
  539. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  540. package/lib/simple-tree/node-kinds/map/mapNode.d.ts +90 -0
  541. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  542. package/lib/simple-tree/node-kinds/map/mapNode.js +27 -2
  543. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  544. package/lib/simple-tree/node-kinds/object/objectNode.js +3 -3
  545. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  546. package/lib/simple-tree/node-kinds/record/recordNode.js +3 -3
  547. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  548. package/lib/text/codePointUtils.d.ts +2 -2
  549. package/lib/text/codePointUtils.js +2 -2
  550. package/lib/text/codePointUtils.js.map +1 -1
  551. package/lib/text/index.d.ts +3 -3
  552. package/lib/text/index.d.ts.map +1 -1
  553. package/lib/text/index.js +3 -3
  554. package/lib/text/index.js.map +1 -1
  555. package/lib/text/textDomain.d.ts +30 -18
  556. package/lib/text/textDomain.d.ts.map +1 -1
  557. package/lib/text/textDomain.js +41 -22
  558. package/lib/text/textDomain.js.map +1 -1
  559. package/lib/text/textDomainFormatted.d.ts +180 -82
  560. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  561. package/lib/text/textDomainFormatted.js +165 -86
  562. package/lib/text/textDomainFormatted.js.map +1 -1
  563. package/lib/text/textDomainFormattedDefault.d.ts +48 -25
  564. package/lib/text/textDomainFormattedDefault.d.ts.map +1 -1
  565. package/lib/text/textDomainFormattedDefault.js +25 -20
  566. package/lib/text/textDomainFormattedDefault.js.map +1 -1
  567. package/lib/treeDataStore.d.ts +49 -0
  568. package/lib/treeDataStore.d.ts.map +1 -0
  569. package/lib/treeDataStore.js +52 -0
  570. package/lib/treeDataStore.js.map +1 -0
  571. package/lib/treeFactory.d.ts +8 -3
  572. package/lib/treeFactory.d.ts.map +1 -1
  573. package/lib/treeFactory.js +5 -0
  574. package/lib/treeFactory.js.map +1 -1
  575. package/lib/util/compressedIds.d.ts +22 -2
  576. package/lib/util/compressedIds.d.ts.map +1 -1
  577. package/lib/util/compressedIds.js +22 -1
  578. package/lib/util/compressedIds.js.map +1 -1
  579. package/package.json +32 -24
  580. package/src/core/change-family/changeFamily.ts +32 -4
  581. package/src/core/change-family/editBuilder.ts +1 -2
  582. package/src/core/change-family/index.ts +2 -0
  583. package/src/core/index.ts +11 -6
  584. package/src/core/rebase/index.ts +2 -0
  585. package/src/core/rebase/types.ts +113 -0
  586. package/src/core/tree/delta.ts +62 -16
  587. package/src/core/tree/detachedFieldIndex.ts +7 -38
  588. package/src/core/tree/index.ts +2 -0
  589. package/src/core/tree/visitorUtils.ts +3 -17
  590. package/src/entrypoints/alpha.ts +9 -1
  591. package/src/feature-libraries/chunked-forest/codec/codecs.ts +17 -14
  592. package/src/feature-libraries/chunked-forest/uniformChunk.ts +11 -1
  593. package/src/feature-libraries/comparison-forest/comparisonForest.ts +140 -0
  594. package/src/feature-libraries/comparison-forest/index.ts +6 -0
  595. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +20 -6
  596. package/src/feature-libraries/default-schema/index.ts +1 -0
  597. package/src/feature-libraries/default-schema/noChangeCodecs.ts +11 -3
  598. package/src/feature-libraries/detachedFieldIndexSummarizer.ts +33 -5
  599. package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -3
  600. package/src/feature-libraries/index.ts +5 -0
  601. package/src/feature-libraries/mitigatedChangeFamily.ts +21 -3
  602. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +10 -1
  603. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +9 -4
  604. package/src/feature-libraries/modular-schema/index.ts +1 -0
  605. package/src/feature-libraries/modular-schema/invert.ts +338 -0
  606. package/src/feature-libraries/modular-schema/minimizeModularChange.ts +3 -5
  607. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +16 -13
  608. package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +3 -1
  609. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +2 -1
  610. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +45 -644
  611. package/src/feature-libraries/modular-schema/modularChangeUtils.ts +340 -0
  612. package/src/feature-libraries/modular-schema/prune.ts +69 -0
  613. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +4 -2
  614. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +5 -2
  615. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +4 -2
  616. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +4 -2
  617. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +6 -3
  618. package/src/feature-libraries/treeTextCursor.ts +66 -1
  619. package/src/index.ts +11 -4
  620. package/src/packageVersion.ts +1 -1
  621. package/src/shared-tree/serializedChange.ts +2 -2
  622. package/src/shared-tree/sharedTree.ts +40 -15
  623. package/src/shared-tree/sharedTreeChangeCodecs.ts +11 -3
  624. package/src/shared-tree/sharedTreeChangeFamily.ts +77 -2
  625. package/src/shared-tree/transactionMinimize.ts +7 -3
  626. package/src/shared-tree/transactionPostProcessor.ts +5 -1
  627. package/src/shared-tree/treeCheckout.ts +136 -30
  628. package/src/shared-tree-core/branch.ts +41 -12
  629. package/src/shared-tree-core/editManager.ts +46 -25
  630. package/src/shared-tree-core/editManagerCodecs.ts +9 -21
  631. package/src/shared-tree-core/editManagerCodecsCommons.ts +14 -2
  632. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +18 -21
  633. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +18 -20
  634. package/src/shared-tree-core/editManagerSummarizer.ts +9 -6
  635. package/src/shared-tree-core/messageCodecV1ToV4.ts +3 -3
  636. package/src/shared-tree-core/messageCodecVSharedBranches.ts +2 -2
  637. package/src/shared-tree-core/messageCodecs.ts +12 -2
  638. package/src/shared-tree-core/sharedTreeCore.ts +16 -7
  639. package/src/shared-tree-core/transaction.ts +47 -25
  640. package/src/simple-tree/api/eraseSchemaDetails.ts +15 -0
  641. package/src/simple-tree/api/index.ts +0 -1
  642. package/src/simple-tree/api/schemaStatics.ts +2 -2
  643. package/src/simple-tree/api/treeNodeApi.ts +64 -48
  644. package/src/simple-tree/core/treeNode.ts +13 -10
  645. package/src/simple-tree/core/withType.ts +20 -7
  646. package/src/simple-tree/index.ts +1 -2
  647. package/src/simple-tree/leafNodeSchema.ts +6 -1
  648. package/src/simple-tree/node-kinds/array/arrayNode.ts +130 -16
  649. package/src/simple-tree/node-kinds/map/mapNode.ts +137 -5
  650. package/src/simple-tree/node-kinds/object/objectNode.ts +3 -3
  651. package/src/simple-tree/node-kinds/record/recordNode.ts +3 -3
  652. package/src/text/README.md +1 -1
  653. package/src/text/codePointUtils.ts +2 -2
  654. package/src/text/index.ts +3 -3
  655. package/src/text/textDomain.ts +50 -27
  656. package/src/text/textDomainFormatted.ts +384 -163
  657. package/src/text/textDomainFormattedDefault.ts +32 -32
  658. package/src/treeDataStore.ts +125 -0
  659. package/src/treeFactory.ts +11 -3
  660. package/src/util/compressedIds.ts +36 -3
@@ -8,8 +8,8 @@ exports.createAnnouncedVisitor = exports.combineVisitors = exports.announceDelta
8
8
  const index_js_1 = require("../../util/index.js");
9
9
  const detachedFieldIndex_js_1 = require("./detachedFieldIndex.js");
10
10
  const visitDelta_js_1 = require("./visitDelta.js");
11
- function makeDetachedFieldIndex(prefix = "Temp", revisionTagCodec, idCompressor, options) {
12
- return new detachedFieldIndex_js_1.DetachedFieldIndex(prefix, (0, index_js_1.idAllocatorFromMaxId)(), revisionTagCodec, idCompressor, options);
11
+ function makeDetachedFieldIndex(prefix = "Temp") {
12
+ return new detachedFieldIndex_js_1.DetachedFieldIndex(prefix, (0, index_js_1.idAllocatorFromMaxId)());
13
13
  }
14
14
  exports.makeDetachedFieldIndex = makeDetachedFieldIndex;
15
15
  function applyDelta(delta, latestRevision, deltaProcessor, detachedFieldIndex) {
@@ -1 +1 @@
1
- {"version":3,"file":"visitorUtils.js","sourceRoot":"","sources":["../../../src/core/tree/visitorUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAKH,kDAA6E;AAM7E,mEAA6D;AAG7D,mDAAgE;AAEhE,SAAgB,sBAAsB,CACrC,SAAiB,MAAM,EACvB,gBAAkC,EAClC,YAA2B,EAC3B,OAA2B;IAE3B,OAAO,IAAI,0CAAkB,CAC5B,MAAM,EACN,IAAA,+BAAoB,GAA+B,EACnD,gBAAgB,EAChB,YAAY,EACZ,OAAO,CACP,CAAC;AACH,CAAC;AAbD,wDAaC;AAED,SAAgB,UAAU,CACzB,KAAW,EACX,cAAuC,EACvC,cAAsD,EACtD,kBA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EAAE,GAAE,CAAC,CAAC;AAE5B;;;GAGG;AACH,SAAgB,sBAAsB,CACrC,gBAA2C;IAE3C,OAAO;QACN,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,gBAAgB,CAAC,IAAI,IAAI,IAAI;QACnC,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,aAAa,EAAE,gBAAgB,CAAC,aAAa,IAAI,IAAI;QACrD,OAAO,EAAE,gBAAgB,CAAC,OAAO,IAAI,IAAI;QACzC,YAAY,EAAE,gBAAgB,CAAC,YAAY,IAAI,IAAI;QACnD,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,YAAY,EAAE,gBAAgB,CAAC,YAAY,IAAI,IAAI;QACnD,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;QAC7C,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,IAAI,IAAI;QAC3C,UAAU,EAAE,gBAAgB,CAAC,UAAU,IAAI,IAAI;QAC/C,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;KAC7C,CAAC;AACH,CAAC;AArBD,wDAqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nimport type { CodecWriteOptions } from \"../../codec/index.js\";\nimport { type IdAllocator, idAllocatorFromMaxId } from \"../../util/index.js\";\nimport type { RevisionTag, RevisionTagCodec } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { ITreeCursorSynchronous } from \"./cursor.js\";\nimport type { DetachedNodeId, Root } from \"./delta.js\";\nimport { DetachedFieldIndex } from \"./detachedFieldIndex.js\";\nimport type { ForestRootId } from \"./detachedFieldIndexTypes.js\";\nimport type { PlaceIndex, Range } from \"./pathTree.js\";\nimport { type DeltaVisitor, visitDelta } from \"./visitDelta.js\";\n\nexport function makeDetachedFieldIndex(\n\tprefix: string = \"Temp\",\n\trevisionTagCodec: RevisionTagCodec,\n\tidCompressor: IIdCompressor,\n\toptions?: CodecWriteOptions,\n): DetachedFieldIndex {\n\treturn new DetachedFieldIndex(\n\t\tprefix,\n\t\tidAllocatorFromMaxId() as IdAllocator<ForestRootId>,\n\t\trevisionTagCodec,\n\t\tidCompressor,\n\t\toptions,\n\t);\n}\n\nexport function applyDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, visitor, detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport function announceDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor & AnnouncedVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, combineVisitors([visitor]), detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport interface CombinedVisitor extends DeltaVisitor {\n\treadonly type: \"Combined\";\n\n\treadonly visitors: readonly CombinableVisitor[];\n}\n\nexport type CombinableVisitor =\n\t| (DeltaVisitor & { type?: never })\n\t| AnnouncedVisitor\n\t| CombinedVisitor;\n\n/**\n * Combines multiple visitors into a single visitor.\n * @param visitors - The returned visitor invokes the corresponding events for all these visitors, in order.\n * @returns a DeltaVisitor combining all `visitors`.\n */\nexport function combineVisitors(visitors: readonly CombinableVisitor[]): CombinedVisitor {\n\tconst allVisitors = visitors.flatMap((v) => (v.type === \"Combined\" ? v.visitors : [v]));\n\tconst announcedVisitors = allVisitors.filter(\n\t\t(v): v is AnnouncedVisitor => v.type === \"Announced\",\n\t);\n\treturn {\n\t\ttype: \"Combined\",\n\t\tvisitors: allVisitors,\n\t\tfree: () => {\n\t\t\tfor (const v of visitors) {\n\t\t\t\tv.free();\n\t\t\t}\n\t\t},\n\t\tcreate: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.create(...args);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterCreate(...args);\n\t\t\t}\n\t\t},\n\t\tdestroy: (...args) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDestroy(...args);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.destroy(...args);\n\t\t\t}\n\t\t},\n\t\tattach: (source: FieldKey, count: number, destination: PlaceIndex) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeAttach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.attach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterAttach(source, {\n\t\t\t\t\tstart: destination,\n\t\t\t\t\tend: destination + count,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdetach: (\n\t\t\tsource: Range,\n\t\t\tdestination: FieldKey,\n\t\t\tid: DetachedNodeId,\n\t\t\tisReplaced: boolean,\n\t\t) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDetach(source, destination, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.detach(source, destination, id, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterDetach(source.start, source.end - source.start, destination, isReplaced);\n\t\t\t}\n\t\t},\n\t\tenterNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterNode(...args);\n\t\t\t}\n\t\t},\n\t\texitNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitNode(...args);\n\t\t\t}\n\t\t},\n\t\tenterField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterField(...args);\n\t\t\t}\n\t\t},\n\t\texitField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitField(...args);\n\t\t\t}\n\t\t},\n\t\tfieldMarks: (marks) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.fieldMarks?.(marks);\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * Visitor that is notified of changes before, after, and when changes are made.\n * Must be freed after use.\n */\nexport interface AnnouncedVisitor extends DeltaVisitor {\n\treadonly type: \"Announced\";\n\t/**\n\t * A hook that is called after all nodes have been created.\n\t */\n\tafterCreate(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void;\n\tbeforeDestroy(field: FieldKey, count: number): void;\n\tbeforeAttach(source: FieldKey, count: number, destination: PlaceIndex): void;\n\tafterAttach(source: FieldKey, destination: Range): void;\n\tbeforeDetach(source: Range, destination: FieldKey, isReplaced: boolean): void;\n\tafterDetach(\n\t\tsource: PlaceIndex,\n\t\tcount: number,\n\t\tdestination: FieldKey,\n\t\tisReplaced: boolean,\n\t): void;\n}\n\nconst noOp = (): void => {};\n\n/**\n * Creates an announced visitor with only the provided functions and uses a no op for the rest.\n * This is provided to make some of the delta visitor definitions cleaner.\n */\nexport function createAnnouncedVisitor(\n\tvisitorFunctions: Partial<AnnouncedVisitor>,\n): AnnouncedVisitor {\n\treturn {\n\t\ttype: \"Announced\",\n\t\tfree: visitorFunctions.free ?? noOp,\n\t\tcreate: visitorFunctions.create ?? noOp,\n\t\tafterCreate: visitorFunctions.afterCreate ?? noOp,\n\t\tbeforeDestroy: visitorFunctions.beforeDestroy ?? noOp,\n\t\tdestroy: visitorFunctions.destroy ?? noOp,\n\t\tbeforeAttach: visitorFunctions.beforeAttach ?? noOp,\n\t\tattach: visitorFunctions.attach ?? noOp,\n\t\tafterAttach: visitorFunctions.afterAttach ?? noOp,\n\t\tbeforeDetach: visitorFunctions.beforeDetach ?? noOp,\n\t\tdetach: visitorFunctions.detach ?? noOp,\n\t\tafterDetach: visitorFunctions.afterDetach ?? noOp,\n\t\tenterNode: visitorFunctions.enterNode ?? noOp,\n\t\texitNode: visitorFunctions.exitNode ?? noOp,\n\t\tenterField: visitorFunctions.enterField ?? noOp,\n\t\texitField: visitorFunctions.exitField ?? noOp,\n\t};\n}\n"]}
1
+ {"version":3,"file":"visitorUtils.js","sourceRoot":"","sources":["../../../src/core/tree/visitorUtils.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kDAA6E;AAM7E,mEAA6D;AAG7D,mDAAgE;AAEhE,SAAgB,sBAAsB,CAAC,SAAiB,MAAM;IAC7D,OAAO,IAAI,0CAAkB,CAAC,MAAM,EAAE,IAAA,+BAAoB,GAA+B,CAAC,CAAC;AAC5F,CAAC;AAFD,wDAEC;AAED,SAAgB,UAAU,CACzB,KAAW,EACX,cAAuC,EACvC,cAAsD,EACtD,kBAAsC;IAEtC,MAAM,OAAO,GAAG,cAAc,CAAC,cAAc,EAAE,CAAC;IAChD,IAAA,0BAAU,EAAC,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAC/D,OAAO,CAAC,IAAI,EAAE,CAAC;AAChB,CAAC;AATD,gCASC;AAED,SAAgB,aAAa,CAC5B,KAAW,EACX,cAAuC,EACvC,cAAyE,EACzE,kBAAsC;IAEtC,MAAM,OAAO,GAAG,cAAc,CAAC,cAAc,EAAE,CAAC;IAChD,IAAA,0BAAU,EAAC,KAAK,EAAE,eAAe,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,kBAAkB,EAAE,cAAc,CAAC,CAAC;IAClF,OAAO,CAAC,IAAI,EAAE,CAAC;AAChB,CAAC;AATD,s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C,WAAW,IAAI,IAAI;QACjD,YAAY,EAAE,gBAAgB,CAAC,YAAY,IAAI,IAAI;QACnD,MAAM,EAAE,gBAAgB,CAAC,MAAM,IAAI,IAAI;QACvC,WAAW,EAAE,gBAAgB,CAAC,WAAW,IAAI,IAAI;QACjD,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;QAC7C,QAAQ,EAAE,gBAAgB,CAAC,QAAQ,IAAI,IAAI;QAC3C,UAAU,EAAE,gBAAgB,CAAC,UAAU,IAAI,IAAI;QAC/C,SAAS,EAAE,gBAAgB,CAAC,SAAS,IAAI,IAAI;KAC7C,CAAC;AACH,CAAC;AArBD,wDAqBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IdAllocator, idAllocatorFromMaxId } from \"../../util/index.js\";\nimport type { RevisionTag } from \"../rebase/index.js\";\nimport type { FieldKey } from \"../schema-stored/index.js\";\n\nimport type { ITreeCursorSynchronous } from \"./cursor.js\";\nimport type { DetachedNodeId, Root } from \"./delta.js\";\nimport { DetachedFieldIndex } from \"./detachedFieldIndex.js\";\nimport type { ForestRootId } from \"./detachedFieldIndexTypes.js\";\nimport type { PlaceIndex, Range } from \"./pathTree.js\";\nimport { type DeltaVisitor, visitDelta } from \"./visitDelta.js\";\n\nexport function makeDetachedFieldIndex(prefix: string = \"Temp\"): DetachedFieldIndex {\n\treturn new DetachedFieldIndex(prefix, idAllocatorFromMaxId() as IdAllocator<ForestRootId>);\n}\n\nexport function applyDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, visitor, detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport function announceDelta(\n\tdelta: Root,\n\tlatestRevision: RevisionTag | undefined,\n\tdeltaProcessor: { acquireVisitor: () => DeltaVisitor & AnnouncedVisitor },\n\tdetachedFieldIndex: DetachedFieldIndex,\n): void {\n\tconst visitor = deltaProcessor.acquireVisitor();\n\tvisitDelta(delta, combineVisitors([visitor]), detachedFieldIndex, latestRevision);\n\tvisitor.free();\n}\n\nexport interface CombinedVisitor extends DeltaVisitor {\n\treadonly type: \"Combined\";\n\n\treadonly visitors: readonly CombinableVisitor[];\n}\n\nexport type CombinableVisitor =\n\t| (DeltaVisitor & { type?: never })\n\t| AnnouncedVisitor\n\t| CombinedVisitor;\n\n/**\n * Combines multiple visitors into a single visitor.\n * @param visitors - The returned visitor invokes the corresponding events for all these visitors, in order.\n * @returns a DeltaVisitor combining all `visitors`.\n */\nexport function combineVisitors(visitors: readonly CombinableVisitor[]): CombinedVisitor {\n\tconst allVisitors = visitors.flatMap((v) => (v.type === \"Combined\" ? v.visitors : [v]));\n\tconst announcedVisitors = allVisitors.filter(\n\t\t(v): v is AnnouncedVisitor => v.type === \"Announced\",\n\t);\n\treturn {\n\t\ttype: \"Combined\",\n\t\tvisitors: allVisitors,\n\t\tfree: () => {\n\t\t\tfor (const v of visitors) {\n\t\t\t\tv.free();\n\t\t\t}\n\t\t},\n\t\tcreate: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.create(...args);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterCreate(...args);\n\t\t\t}\n\t\t},\n\t\tdestroy: (...args) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDestroy(...args);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.destroy(...args);\n\t\t\t}\n\t\t},\n\t\tattach: (source: FieldKey, count: number, destination: PlaceIndex) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeAttach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.attach(source, count, destination);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterAttach(source, {\n\t\t\t\t\tstart: destination,\n\t\t\t\t\tend: destination + count,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\tdetach: (\n\t\t\tsource: Range,\n\t\t\tdestination: FieldKey,\n\t\t\tid: DetachedNodeId,\n\t\t\tisReplaced: boolean,\n\t\t) => {\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.beforeDetach(source, destination, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.detach(source, destination, id, isReplaced);\n\t\t\t}\n\t\t\tfor (const v of announcedVisitors) {\n\t\t\t\tv.afterDetach(source.start, source.end - source.start, destination, isReplaced);\n\t\t\t}\n\t\t},\n\t\tenterNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterNode(...args);\n\t\t\t}\n\t\t},\n\t\texitNode: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitNode(...args);\n\t\t\t}\n\t\t},\n\t\tenterField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.enterField(...args);\n\t\t\t}\n\t\t},\n\t\texitField: (...args) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.exitField(...args);\n\t\t\t}\n\t\t},\n\t\tfieldMarks: (marks) => {\n\t\t\tfor (const v of allVisitors) {\n\t\t\t\tv.fieldMarks?.(marks);\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * Visitor that is notified of changes before, after, and when changes are made.\n * Must be freed after use.\n */\nexport interface AnnouncedVisitor extends DeltaVisitor {\n\treadonly type: \"Announced\";\n\t/**\n\t * A hook that is called after all nodes have been created.\n\t */\n\tafterCreate(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void;\n\tbeforeDestroy(field: FieldKey, count: number): void;\n\tbeforeAttach(source: FieldKey, count: number, destination: PlaceIndex): void;\n\tafterAttach(source: FieldKey, destination: Range): void;\n\tbeforeDetach(source: Range, destination: FieldKey, isReplaced: boolean): void;\n\tafterDetach(\n\t\tsource: PlaceIndex,\n\t\tcount: number,\n\t\tdestination: FieldKey,\n\t\tisReplaced: boolean,\n\t): void;\n}\n\nconst noOp = (): void => {};\n\n/**\n * Creates an announced visitor with only the provided functions and uses a no op for the rest.\n * This is provided to make some of the delta visitor definitions cleaner.\n */\nexport function createAnnouncedVisitor(\n\tvisitorFunctions: Partial<AnnouncedVisitor>,\n): AnnouncedVisitor {\n\treturn {\n\t\ttype: \"Announced\",\n\t\tfree: visitorFunctions.free ?? noOp,\n\t\tcreate: visitorFunctions.create ?? noOp,\n\t\tafterCreate: visitorFunctions.afterCreate ?? noOp,\n\t\tbeforeDestroy: visitorFunctions.beforeDestroy ?? noOp,\n\t\tdestroy: visitorFunctions.destroy ?? noOp,\n\t\tbeforeAttach: visitorFunctions.beforeAttach ?? noOp,\n\t\tattach: visitorFunctions.attach ?? noOp,\n\t\tafterAttach: visitorFunctions.afterAttach ?? noOp,\n\t\tbeforeDetach: visitorFunctions.beforeDetach ?? noOp,\n\t\tdetach: visitorFunctions.detach ?? noOp,\n\t\tafterDetach: visitorFunctions.afterDetach ?? noOp,\n\t\tenterNode: visitorFunctions.enterNode ?? noOp,\n\t\texitNode: visitorFunctions.exitNode ?? noOp,\n\t\tenterField: visitorFunctions.enterField ?? noOp,\n\t\texitField: visitorFunctions.exitField ?? noOp,\n\t};\n}\n"]}
@@ -2,5 +2,5 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { AllowedTypes, CommitKind, CommitMetadata, FieldKind, FieldProps, FieldSchema, FieldSchemaMetadata, ITree, ITreeConfigurationOptions, ITreeViewConfiguration, ImplicitAllowedTypes, ImplicitFieldSchema, Input, InsertableTreeFieldFromImplicitField, InsertableTreeNodeFromAllowedTypes, InsertableTreeNodeFromImplicitAllowedTypes, InsertableTypedNode, InternalTreeNode, InternalTypes, IsListener, IsUnion, IterableTreeArrayContent, LazyItem, LeafSchema, Listenable, Listeners, MakeNominal, MapNodeInsertableData, NodeFromSchema, NodeInDocumentConstraint, NodeKind, NodeSchemaMetadata, NodeSchemaOptions, NumberKeys, ObjectFromSchemaRecord, Off, ReadonlyArrayNode, RestrictiveReadonlyRecord, RestrictiveStringRecord, Revertible, RevertibleFactory, RevertibleStatus, RunTransaction, SchemaCompatibilityStatus, SchemaFactory, SchemaFactory_base, SchemaStatics, SimpleNodeSchemaBase, System_Unsafe, TransactionConstraint, Tree, TreeArrayNode, TreeChangeEvents, TreeFieldFromImplicitField, TreeLeafValue, TreeMapNode, TreeNode, TreeNodeApi, TreeNodeFromImplicitAllowedTypes, TreeNodeSchema, TreeNodeSchemaClass, TreeNodeSchemaCore, TreeNodeSchemaNonClass, TreeObjectNode, TreeStatus, TreeView, TreeViewConfiguration, TreeViewEvents, Unenforced, Unhydrated, UnionToIntersection, ValidateRecursiveSchema, ValidateRecursiveSchemaTemplate, ViewableTree, WithType, rollback, typeSchemaSymbol, AllowedTypeMetadata, AllowedTypesFull, AllowedTypesFullEvaluated, AllowedTypesFullFromMixed, AllowedTypesFullFromMixedUnsafe, AllowedTypesMetadata, AnnotateAllowedTypesList, AnnotateAllowedTypesListUnsafe, AnnotatedAllowedType, AnnotatedAllowedTypeUnsafe, AnnotatedAllowedTypes, AnnotatedAllowedTypesUnsafe, CodecWriteOptionsBeta, ConciseTree, ExtensibleUnionNode, FixRecursiveArraySchema, FluidSerializableAsTree, ForestOptions, ForestType, ForestTypeExpensiveDebug, ForestTypeOptimized, ForestTypeReference, IdentifierIndex, JsonCompatible, JsonCompatibleObject, KeyEncodingOptions, NodeChangedData, ObjectSchemaOptions, PopUnion, RecordNodeInsertableData, RunTransactionParamsBeta, SchemaFactoryBeta, SchemaStaticsBeta, SchemaUpgrade, SharedTreeOptionsBeta, SnapshotFileSystem, SnapshotSchemaCompatibilityOptions, System_TableSchema, TableSchema, TransactionCallbackStatusBeta, TransactionResultFailed, TransactionResultSuccess, TransactionValueResult, TransactionVoidResult, TreeBeta, TreeBranch, TreeChangeEventsBeta, TreeEncodingOptions, TreeIndex, TreeIndexKey, TreeIndexNodes, TreeRecordNode, TreeRecordNodeUnsafe, TreeViewBeta, UnannotateAllowedTypeUnsafe, UnannotateAllowedTypesList, UnannotateAllowedTypesListUnsafe, UnionToTuple, VoidTransactionCallbackStatusBeta, WithValue, adaptEnum, asBeta, configuredSharedTreeBeta, createIdentifierIndex, createIndependentTreeBeta, createTreeIndex, enumFromStrings, singletonSchema, snapshotSchemaCompatibility, AllowedTypesFullUnsafe, ArrayNodeCustomizableSchema, ArrayNodeCustomizableSchemaAlpha, ArrayNodeCustomizableSchemaUnsafe, ArrayNodeDeltaOp, ArrayNodeInsertOp, ArrayNodePojoEmulationSchema, ArrayNodeRemoveOp, ArrayNodeRetainOp, ArrayNodeSchema, ArrayNodeTreeChangedDeltaOp, ArrayNodeTreeChangedRetainOp, ArrayPlaceAnchor, ChangeMetadata, CodecName, CodecWriteOptions, Component, CreateIndependentTreeAlphaOptions, DirtyTreeMap, DirtyTreeStatus, ErasedNode, ErasedSchema, ErasedSchemaSubclassable, FactoryContent, FactoryContentObject, FieldHasDefaultAlpha, FieldHasDefaultAlphaUnsafe, FieldPropsAlpha, FieldSchemaAlpha, FieldSchemaAlphaUnsafe, FluidClientVersion, FormatValidator, FormatValidatorBasic, FormatValidatorNoOp, FormatVersion, HandleConverter, ICodecOptions, ITreeAlpha, ITreeViewConfigurationAlpha, IncrementalEncodingPolicy, IndependentViewOptions, IndependentViewTelemetryOptions, Insertable, InsertableContent, InsertableField, InsertableObjectFromSchemaRecordAlpha, InsertableObjectFromSchemaRecordAlphaUnsafe, JsonArrayNodeSchema, JsonAsTree, JsonCompatibleReadOnly, JsonCompatibleReadOnlyObject, JsonFieldSchema, JsonLeafNodeSchema, JsonLeafSchemaType, JsonMapNodeSchema, JsonNodeSchema, JsonNodeSchemaBase, JsonObjectNodeSchema, JsonRecordNodeSchema, JsonRefPath, JsonSchemaId, JsonSchemaRef, JsonSchemaType, JsonStringKeyPatternProperties, JsonTreeSchema, LabelTree, LocalChangeMetadata, MapNodeCustomizableSchema, MapNodeCustomizableSchemaUnsafe, MapNodePojoEmulationSchema, MapNodeSchema, NoChangeConstraint, NodeChangedDataAlpha, NodeChangedDataDelta, NodeChangedDataProperties, NodeChangedDataTreeDelta, NodeProvider, NodeSchemaOptionsAlpha, ObjectNodeSchema, ObjectNodeSchemaWorkaround, ObjectSchemaOptionsAlpha, ObservationResults, ReadSchema, ReadableField, RecordNodeCustomizableSchema, RecordNodePojoEmulationSchema, RecordNodeSchema, RemoteChangeMetadata, RevertibleAlpha, RevertibleAlphaFactory, RunTransactionParamsAlpha, SchemaFactoryAlpha, SchemaStaticsAlpha, SchemaType, SharedTreeFormatOptions, SharedTreeOptions, SimpleAllowedTypeAttributes, SimpleArrayNodeSchema, SimpleFieldSchema, SimpleLeafNodeSchema, SimpleMapNodeSchema, SimpleNodeSchema, SimpleNodeSchemaBaseAlpha, SimpleObjectFieldSchema, SimpleObjectNodeSchema, SimpleRecordNodeSchema, SimpleTreeSchema, StagedSchemaUpgradePolicy, StagedSchemaUpgradePolicyFactory, TextAsTree, TransactionCallbackStatusAlpha, TransactionConstraintAlpha, TransactionLabels, TransactionPostProcessor, TreeAlpha, TreeArrayNodeAlpha, TreeBranchAlpha, TreeBranchEvents, TreeChangeEventsAlpha, TreeCompressionStrategy, TreeContextAlpha, TreeIdentifierUtils, TreeMapNodeAlpha, TreeParsingOptions, TreeSchema, TreeSchemaEncodingOptions, TreeViewAlpha, TreeViewConfigurationAlpha, UnsafeUnknownSchema, ValueSchema, VerboseTree, VerboseTreeNode, ViewContent, VoidTransactionCallbackStatusAlpha, allowUnused, asAlpha, asTreeViewAlpha, checkCompatibility, cloneWithReplacements, comparePersistedSchema, configuredSharedTreeAlpha, contentSchemaSymbol, createArrayInsertionAnchor, createIndependentTreeAlpha, decodeSchemaCompatibilitySnapshot, encodeSchemaCompatibilitySnapshot, eraseSchemaDetails, eraseSchemaDetailsSubclassable, evaluateLazySchema, exportCompatibilitySchemaSnapshot, extractPersistedSchema, generateSchemaFromSimpleSchema, getJsonSchema, getSimpleSchema, importCompatibilitySchemaSnapshot, incrementalEncodingPolicyForAllowedTypes, incrementalSummaryHint, independentInitializedView, independentView, minimize, normalizeAllowedTypes, persistedToSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, trackDirtyNodes } from "../index.js";
5
+ export { AllowedTypes, CommitKind, CommitMetadata, FieldKind, FieldProps, FieldSchema, FieldSchemaMetadata, ITree, ITreeConfigurationOptions, ITreeViewConfiguration, ImplicitAllowedTypes, ImplicitFieldSchema, Input, InsertableTreeFieldFromImplicitField, InsertableTreeNodeFromAllowedTypes, InsertableTreeNodeFromImplicitAllowedTypes, InsertableTypedNode, InternalTreeNode, InternalTypes, IsListener, IsUnion, IterableTreeArrayContent, LazyItem, LeafSchema, Listenable, Listeners, MakeNominal, MapNodeInsertableData, NodeFromSchema, NodeInDocumentConstraint, NodeKind, NodeSchemaMetadata, NodeSchemaOptions, NumberKeys, ObjectFromSchemaRecord, Off, ReadonlyArrayNode, RestrictiveReadonlyRecord, RestrictiveStringRecord, Revertible, RevertibleFactory, RevertibleStatus, RunTransaction, SchemaCompatibilityStatus, SchemaFactory, SchemaFactory_base, SchemaStatics, SimpleNodeSchemaBase, System_Unsafe, TransactionConstraint, Tree, TreeArrayNode, TreeChangeEvents, TreeFieldFromImplicitField, TreeLeafValue, TreeMapNode, TreeNode, TreeNodeApi, TreeNodeFromImplicitAllowedTypes, TreeNodeSchema, TreeNodeSchemaClass, TreeNodeSchemaCore, TreeNodeSchemaNonClass, TreeObjectNode, TreeStatus, TreeView, TreeViewConfiguration, TreeViewEvents, Unenforced, Unhydrated, UnionToIntersection, ValidateRecursiveSchema, ValidateRecursiveSchemaTemplate, ViewableTree, WithType, rollback, typeSchemaSymbol, AllowedTypeMetadata, AllowedTypesFull, AllowedTypesFullEvaluated, AllowedTypesFullFromMixed, AllowedTypesFullFromMixedUnsafe, AllowedTypesMetadata, AnnotateAllowedTypesList, AnnotateAllowedTypesListUnsafe, AnnotatedAllowedType, AnnotatedAllowedTypeUnsafe, AnnotatedAllowedTypes, AnnotatedAllowedTypesUnsafe, CodecWriteOptionsBeta, ConciseTree, ExtensibleUnionNode, FixRecursiveArraySchema, FluidSerializableAsTree, ForestOptions, ForestType, ForestTypeExpensiveDebug, ForestTypeOptimized, ForestTypeReference, IdentifierIndex, JsonCompatible, JsonCompatibleObject, KeyEncodingOptions, NodeChangedData, ObjectSchemaOptions, PopUnion, RecordNodeInsertableData, RunTransactionParamsBeta, SchemaFactoryBeta, SchemaStaticsBeta, SchemaUpgrade, SharedTreeOptionsBeta, SnapshotFileSystem, SnapshotSchemaCompatibilityOptions, System_TableSchema, TableSchema, TransactionCallbackStatusBeta, TransactionResultFailed, TransactionResultSuccess, TransactionValueResult, TransactionVoidResult, TreeBeta, TreeBranch, TreeChangeEventsBeta, TreeEncodingOptions, TreeIndex, TreeIndexKey, TreeIndexNodes, TreeRecordNode, TreeRecordNodeUnsafe, TreeViewBeta, UnannotateAllowedTypeUnsafe, UnannotateAllowedTypesList, UnannotateAllowedTypesListUnsafe, UnionToTuple, VoidTransactionCallbackStatusBeta, WithValue, adaptEnum, asBeta, configuredSharedTreeBeta, createIdentifierIndex, createIndependentTreeBeta, createTreeIndex, enumFromStrings, singletonSchema, snapshotSchemaCompatibility, AllowedTypesFullUnsafe, ArrayNodeCustomizableSchema, ArrayNodeCustomizableSchemaAlpha, ArrayNodeCustomizableSchemaUnsafe, ArrayNodeDeltaOp, ArrayNodeInsertOp, ArrayNodePojoEmulationSchema, ArrayNodeRemoveOp, ArrayNodeRetainOp, ArrayNodeSchema, ArrayNodeTreeChangedDeltaOp, ArrayNodeTreeChangedRetainOp, ArrayPlaceAnchor, ChangeMetadata, CodecName, CodecWriteOptions, CommitOutcome, Component, CreateIndependentTreeAlphaOptions, DirtyTreeMap, DirtyTreeStatus, ErasedNode, ErasedSchema, ErasedSchemaSubclassable, FactoryContent, FactoryContentObject, FieldHasDefaultAlpha, FieldHasDefaultAlphaUnsafe, FieldPropsAlpha, FieldSchemaAlpha, FieldSchemaAlphaUnsafe, FluidClientVersion, FormatValidator, FormatValidatorBasic, FormatValidatorNoOp, FormatVersion, FormattedText, HandleConverter, ICodecOptions, ITreeAlpha, ITreeViewConfigurationAlpha, IncrementalEncodingPolicy, IndependentViewOptions, IndependentViewTelemetryOptions, Insertable, InsertableContent, InsertableField, InsertableObjectFromSchemaRecordAlpha, InsertableObjectFromSchemaRecordAlphaUnsafe, JsonArrayNodeSchema, JsonAsTree, JsonCompatibleReadOnly, JsonCompatibleReadOnlyObject, JsonFieldSchema, JsonLeafNodeSchema, JsonLeafSchemaType, JsonMapNodeSchema, JsonNodeSchema, JsonNodeSchemaBase, JsonObjectNodeSchema, JsonRecordNodeSchema, JsonRefPath, JsonSchemaId, JsonSchemaRef, JsonSchemaType, JsonStringKeyPatternProperties, JsonTreeSchema, LabelTree, LocalChangeMetadata, LocalCommitEvents, MapNodeCustomizableSchema, MapNodeCustomizableSchemaUnsafe, MapNodePojoEmulationSchema, MapNodeSchema, NoChangeConstraint, NodeChangedDataAlpha, NodeChangedDataDelta, NodeChangedDataProperties, NodeChangedDataTreeDelta, NodeProvider, NodeSchemaOptionsAlpha, ObjectNodeSchema, ObjectNodeSchemaWorkaround, ObjectSchemaOptionsAlpha, ObservationResults, PlainText, ReadSchema, ReadableField, RecordNodeCustomizableSchema, RecordNodePojoEmulationSchema, RecordNodeSchema, RemoteChangeMetadata, RevertibleAlpha, RevertibleAlphaFactory, RunTransactionParamsAlpha, SchemaFactoryAlpha, SchemaStaticsAlpha, SchemaType, SharedTreeAlpha, SharedTreeFormatOptions, SharedTreeOptions, SimpleAllowedTypeAttributes, SimpleArrayNodeSchema, SimpleFieldSchema, SimpleLeafNodeSchema, SimpleMapNodeSchema, SimpleNodeSchema, SimpleNodeSchemaBaseAlpha, SimpleObjectFieldSchema, SimpleObjectNodeSchema, SimpleRecordNodeSchema, SimpleTreeSchema, StagedSchemaUpgradePolicy, StagedSchemaUpgradePolicyFactory, StringSchema, TransactionCallbackStatusAlpha, TransactionConstraintAlpha, TransactionLabels, TransactionPostProcessor, TreeAlpha, TreeArrayNodeAlpha, TreeBranchAlpha, TreeBranchEvents, TreeChangeEventsAlpha, TreeCompressionStrategy, TreeContextAlpha, TreeDataStoreOptions, TreeIdentifierUtils, TreeMapNodeAlpha, TreeParsingOptions, TreeSchema, TreeSchemaEncodingOptions, TreeViewAlpha, TreeViewConfigurationAlpha, UnsafeUnknownSchema, ValueSchema, VerboseTree, VerboseTreeNode, ViewContent, VoidTransactionCallbackStatusAlpha, allowUnused, asAlpha, asTreeViewAlpha, checkCompatibility, cloneWithReplacements, comparePersistedSchema, configuredSharedTreeAlpha, contentSchemaSymbol, createArrayInsertionAnchor, createIndependentTreeAlpha, decodeSchemaCompatibilitySnapshot, defineTreeDataStore, encodeSchemaCompatibilitySnapshot, eraseSchemaDetails, eraseSchemaDetailsSubclassable, evaluateLazySchema, exportCompatibilitySchemaSnapshot, extractPersistedSchema, generateSchemaFromSimpleSchema, getJsonSchema, getSimpleSchema, importCompatibilitySchemaSnapshot, incrementalEncodingPolicyForAllowedTypes, incrementalSummaryHint, independentInitializedView, independentView, instantiateTreeFirstTime, minimize, normalizeAllowedTypes, persistedToSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, trackDirtyNodes } from "../index.js";
6
6
  //# sourceMappingURL=alpha.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.d.ts","sourceRoot":"","sources":["../../src/entrypoints/alpha.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAEN,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB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nB,0BAA0B,EAC1B,0BAA0B,EAC1B,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,EAClB,8BAA8B,EAC9B,kBAAkB,EAClB,iCAAiC,EACjC,sBAAsB,EACtB,8BAA8B,EAC9B,aAAa,EACb,eAAe,EACf,iCAAiC,EACjC,wCAAwC,EACxC,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,QAAQ,EACR,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EACzB,eAAe,EAEf,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"alpha.d.ts","sourceRoot":"","sources":["../../src/entrypoints/alpha.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAEN,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,yBAAyB,EACzB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,EACL,oCAAoC,EACpC,kCAAkC,EAClC,0CAA0C,EAC1C,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACV,OAAO,EACP,wBAAwB,EACxB,QAAQ,EACR,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,cAAc,EACd,wBAAwB,EACxB,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,UAAU,EACV,sBAAsB,EACtB,GAAG,EACH,iBAAiB,EACjB,yBAAyB,EACzB,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,aAAa,EACb,qBAAqB,EACrB,IAAI,EACJ,aAAa,EACb,gBAAgB,EAChB,0BAA0B,EAC1B,aAAa,EACb,WAAW,EACX,QAAQ,EACR,WAAW,EACX,gCAAgC,EAChC,cAAc,EACd,mBAA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f,uBAAuB,EACvB,iBAAiB,EACjB,2BAA2B,EAC3B,qBAAqB,EACrB,iBAAiB,EACjB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,gCAAgC,EAChC,YAAY,EACZ,8BAA8B,EAC9B,0BAA0B,EAC1B,iBAAiB,EACjB,wBAAwB,EACxB,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EAChB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,UAAU,EACV,yBAAyB,EACzB,aAAa,EACb,0BAA0B,EAC1B,mBAAmB,EACnB,WAAW,EACX,WAAW,EACX,eAAe,EACf,WAAW,EACX,kCAAkC,EAClC,WAAW,EACX,OAAO,EACP,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,EAC1B,iCAAiC,EACjC,mBAAmB,EACnB,iCAAiC,EACjC,kBAAkB,EAClB,8BAA8B,EAC9B,kBAAkB,EAClB,iCAAiC,EACjC,sBAAsB,EACtB,8BAA8B,EAC9B,aAAa,EACb,eAAe,EACf,iCAAiC,EACjC,wCAAwC,EACxC,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,wBAAwB,EACxB,QAAQ,EACR,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EACzB,cAAc,EACd,yBAAyB,EACzB,eAAe,EAEf,MAAM,aAAa,CAAC"}
@@ -4,8 +4,8 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.asAlpha = exports.allowUnused = exports.ValueSchema = exports.TreeViewConfigurationAlpha = exports.TreeCompressionStrategy = exports.TreeAlpha = exports.TextAsTree = exports.StagedSchemaUpgradePolicy = exports.SchemaFactoryAlpha = exports.RecordNodeSchema = exports.ObjectNodeSchema = exports.MapNodeSchema = exports.JsonAsTree = exports.FormatValidatorNoOp = exports.FormatValidatorBasic = exports.FluidClientVersion = exports.Component = exports.ArrayNodeSchema = exports.snapshotSchemaCompatibility = exports.singletonSchema = exports.enumFromStrings = exports.createTreeIndex = exports.createIndependentTreeBeta = exports.createIdentifierIndex = exports.configuredSharedTreeBeta = exports.asBeta = exports.adaptEnum = exports.TreeBeta = exports.TableSchema = exports.SchemaFactoryBeta = exports.KeyEncodingOptions = exports.ForestTypeReference = exports.ForestTypeOptimized = exports.ForestTypeExpensiveDebug = exports.FluidSerializableAsTree = exports.ExtensibleUnionNode = exports.rollback = exports.TreeViewConfiguration = exports.TreeStatus = exports.TreeNode = exports.TreeArrayNode = exports.Tree = exports.SchemaFactory = exports.RevertibleStatus = exports.NodeKind = exports.IterableTreeArrayContent = exports.InternalTypes = exports.FieldSchema = exports.FieldKind = exports.CommitKind = void 0;
8
- exports.trackDirtyNodes = exports.replaceVerboseTreeHandles = exports.replaceHandles = exports.replaceConciseTreeHandles = exports.persistedToSimpleSchema = exports.normalizeAllowedTypes = exports.minimize = exports.independentView = exports.independentInitializedView = exports.incrementalSummaryHint = exports.incrementalEncodingPolicyForAllowedTypes = exports.importCompatibilitySchemaSnapshot = exports.getSimpleSchema = exports.getJsonSchema = exports.generateSchemaFromSimpleSchema = exports.extractPersistedSchema = exports.exportCompatibilitySchemaSnapshot = exports.evaluateLazySchema = exports.eraseSchemaDetailsSubclassable = exports.eraseSchemaDetails = exports.encodeSchemaCompatibilitySnapshot = exports.decodeSchemaCompatibilitySnapshot = exports.createIndependentTreeAlpha = exports.createArrayInsertionAnchor = exports.contentSchemaSymbol = exports.configuredSharedTreeAlpha = exports.comparePersistedSchema = exports.cloneWithReplacements = exports.checkCompatibility = exports.asTreeViewAlpha = void 0;
7
+ exports.TreeViewConfigurationAlpha = exports.TreeCompressionStrategy = exports.TreeAlpha = exports.StagedSchemaUpgradePolicy = exports.SharedTreeAlpha = exports.SchemaFactoryAlpha = exports.RecordNodeSchema = exports.PlainText = exports.ObjectNodeSchema = exports.MapNodeSchema = exports.JsonAsTree = exports.FormattedText = exports.FormatValidatorNoOp = exports.FormatValidatorBasic = exports.FluidClientVersion = exports.Component = exports.CommitOutcome = exports.ArrayNodeSchema = exports.snapshotSchemaCompatibility = exports.singletonSchema = exports.enumFromStrings = exports.createTreeIndex = exports.createIndependentTreeBeta = exports.createIdentifierIndex = exports.configuredSharedTreeBeta = exports.asBeta = exports.adaptEnum = exports.TreeBeta = exports.TableSchema = exports.SchemaFactoryBeta = exports.KeyEncodingOptions = exports.ForestTypeReference = exports.ForestTypeOptimized = exports.ForestTypeExpensiveDebug = exports.FluidSerializableAsTree = exports.ExtensibleUnionNode = exports.rollback = exports.TreeViewConfiguration = exports.TreeStatus = exports.TreeNode = exports.TreeArrayNode = exports.Tree = exports.SchemaFactory = exports.RevertibleStatus = exports.NodeKind = exports.IterableTreeArrayContent = exports.InternalTypes = exports.FieldSchema = exports.FieldKind = exports.CommitKind = void 0;
8
+ exports.trackDirtyNodes = exports.replaceVerboseTreeHandles = exports.replaceHandles = exports.replaceConciseTreeHandles = exports.persistedToSimpleSchema = exports.normalizeAllowedTypes = exports.minimize = exports.instantiateTreeFirstTime = exports.independentView = exports.independentInitializedView = exports.incrementalSummaryHint = exports.incrementalEncodingPolicyForAllowedTypes = exports.importCompatibilitySchemaSnapshot = exports.getSimpleSchema = exports.getJsonSchema = exports.generateSchemaFromSimpleSchema = exports.extractPersistedSchema = exports.exportCompatibilitySchemaSnapshot = exports.evaluateLazySchema = exports.eraseSchemaDetailsSubclassable = exports.eraseSchemaDetails = exports.encodeSchemaCompatibilitySnapshot = exports.defineTreeDataStore = exports.decodeSchemaCompatibilitySnapshot = exports.createIndependentTreeAlpha = exports.createArrayInsertionAnchor = exports.contentSchemaSymbol = exports.configuredSharedTreeAlpha = exports.comparePersistedSchema = exports.cloneWithReplacements = exports.checkCompatibility = exports.asTreeViewAlpha = exports.asAlpha = exports.allowUnused = exports.ValueSchema = void 0;
9
9
  /*
10
10
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
11
11
  * Generated by "generate:entrypoint-sources".
@@ -44,17 +44,20 @@ Object.defineProperty(exports, "enumFromStrings", { enumerable: true, get: funct
44
44
  Object.defineProperty(exports, "singletonSchema", { enumerable: true, get: function () { return index_js_1.singletonSchema; } });
45
45
  Object.defineProperty(exports, "snapshotSchemaCompatibility", { enumerable: true, get: function () { return index_js_1.snapshotSchemaCompatibility; } });
46
46
  Object.defineProperty(exports, "ArrayNodeSchema", { enumerable: true, get: function () { return index_js_1.ArrayNodeSchema; } });
47
+ Object.defineProperty(exports, "CommitOutcome", { enumerable: true, get: function () { return index_js_1.CommitOutcome; } });
47
48
  Object.defineProperty(exports, "Component", { enumerable: true, get: function () { return index_js_1.Component; } });
48
49
  Object.defineProperty(exports, "FluidClientVersion", { enumerable: true, get: function () { return index_js_1.FluidClientVersion; } });
49
50
  Object.defineProperty(exports, "FormatValidatorBasic", { enumerable: true, get: function () { return index_js_1.FormatValidatorBasic; } });
50
51
  Object.defineProperty(exports, "FormatValidatorNoOp", { enumerable: true, get: function () { return index_js_1.FormatValidatorNoOp; } });
52
+ Object.defineProperty(exports, "FormattedText", { enumerable: true, get: function () { return index_js_1.FormattedText; } });
51
53
  Object.defineProperty(exports, "JsonAsTree", { enumerable: true, get: function () { return index_js_1.JsonAsTree; } });
52
54
  Object.defineProperty(exports, "MapNodeSchema", { enumerable: true, get: function () { return index_js_1.MapNodeSchema; } });
53
55
  Object.defineProperty(exports, "ObjectNodeSchema", { enumerable: true, get: function () { return index_js_1.ObjectNodeSchema; } });
56
+ Object.defineProperty(exports, "PlainText", { enumerable: true, get: function () { return index_js_1.PlainText; } });
54
57
  Object.defineProperty(exports, "RecordNodeSchema", { enumerable: true, get: function () { return index_js_1.RecordNodeSchema; } });
55
58
  Object.defineProperty(exports, "SchemaFactoryAlpha", { enumerable: true, get: function () { return index_js_1.SchemaFactoryAlpha; } });
59
+ Object.defineProperty(exports, "SharedTreeAlpha", { enumerable: true, get: function () { return index_js_1.SharedTreeAlpha; } });
56
60
  Object.defineProperty(exports, "StagedSchemaUpgradePolicy", { enumerable: true, get: function () { return index_js_1.StagedSchemaUpgradePolicy; } });
57
- Object.defineProperty(exports, "TextAsTree", { enumerable: true, get: function () { return index_js_1.TextAsTree; } });
58
61
  Object.defineProperty(exports, "TreeAlpha", { enumerable: true, get: function () { return index_js_1.TreeAlpha; } });
59
62
  Object.defineProperty(exports, "TreeCompressionStrategy", { enumerable: true, get: function () { return index_js_1.TreeCompressionStrategy; } });
60
63
  Object.defineProperty(exports, "TreeViewConfigurationAlpha", { enumerable: true, get: function () { return index_js_1.TreeViewConfigurationAlpha; } });
@@ -70,6 +73,7 @@ Object.defineProperty(exports, "contentSchemaSymbol", { enumerable: true, get: f
70
73
  Object.defineProperty(exports, "createArrayInsertionAnchor", { enumerable: true, get: function () { return index_js_1.createArrayInsertionAnchor; } });
71
74
  Object.defineProperty(exports, "createIndependentTreeAlpha", { enumerable: true, get: function () { return index_js_1.createIndependentTreeAlpha; } });
72
75
  Object.defineProperty(exports, "decodeSchemaCompatibilitySnapshot", { enumerable: true, get: function () { return index_js_1.decodeSchemaCompatibilitySnapshot; } });
76
+ Object.defineProperty(exports, "defineTreeDataStore", { enumerable: true, get: function () { return index_js_1.defineTreeDataStore; } });
73
77
  Object.defineProperty(exports, "encodeSchemaCompatibilitySnapshot", { enumerable: true, get: function () { return index_js_1.encodeSchemaCompatibilitySnapshot; } });
74
78
  Object.defineProperty(exports, "eraseSchemaDetails", { enumerable: true, get: function () { return index_js_1.eraseSchemaDetails; } });
75
79
  Object.defineProperty(exports, "eraseSchemaDetailsSubclassable", { enumerable: true, get: function () { return index_js_1.eraseSchemaDetailsSubclassable; } });
@@ -84,6 +88,7 @@ Object.defineProperty(exports, "incrementalEncodingPolicyForAllowedTypes", { enu
84
88
  Object.defineProperty(exports, "incrementalSummaryHint", { enumerable: true, get: function () { return index_js_1.incrementalSummaryHint; } });
85
89
  Object.defineProperty(exports, "independentInitializedView", { enumerable: true, get: function () { return index_js_1.independentInitializedView; } });
86
90
  Object.defineProperty(exports, "independentView", { enumerable: true, get: function () { return index_js_1.independentView; } });
91
+ Object.defineProperty(exports, "instantiateTreeFirstTime", { enumerable: true, get: function () { return index_js_1.instantiateTreeFirstTime; } });
87
92
  Object.defineProperty(exports, "minimize", { enumerable: true, get: function () { return index_js_1.minimize; } });
88
93
  Object.defineProperty(exports, "normalizeAllowedTypes", { enumerable: true, get: function () { return index_js_1.normalizeAllowedTypes; } });
89
94
  Object.defineProperty(exports, "persistedToSimpleSchema", { enumerable: true, get: function () { return index_js_1.persistedToSimpleSchema; } });
@@ -1 +1 @@
1
- {"version":3,"file":"alpha.js","sourceRoot":"","sources":["../../src/entrypoints/alpha.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH;;;GAGG;AAEH,wCAiUqB;AA9TpB,sGAAA,UAAU,OAAA;AAEV,qGAAA,SAAS,OAAA;AAET,uGAAA,WAAW,OAAA;AAaX,yGAAA,aAAa,OAAA;AAGb,oHAAA,wBAAwB,OAAA;AASxB,oGAAA,QAAQ,OAAA;AAWR,4GAAA,gBAAgB,OAAA;AAGhB,yGAAA,aAAa,OAAA;AAMb,gGAAA,IAAI,OAAA;AACJ,yGAAA,aAAa,OAAA;AAKb,oGAAA,QAAQ,OAAA;AAQR,sGAAA,UAAU,OAAA;AAEV,iHAAA,qBAAqB,OAAA;AASrB,oGAAA,QAAQ,OAAA;AAmBR,+GAAA,mBAAmB,OAAA;AAEnB,mHAAA,uBAAuB,OAAA;AAGvB,oHAAA,wBAAwB,OAAA;AACxB,+GAAA,mBAAmB,OAAA;AACnB,+GAAA,mBAAmB,OAAA;AAInB,8GAAA,kBAAkB,OAAA;AAMlB,6GAAA,iBAAiB,OAAA;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,OAAA;AACb,2GAAA,eAAe,OAAA;AACf,6HAAA,iCAAiC,OAAA;AACjC,oIAAA,wCAAwC,OAAA;AACxC,kHAAA,sBAAsB,OAAA;AACtB,sHAAA,0BAA0B,OAAA;AAC1B,2GAAA,eAAe,OAAA;AACf,oGAAA,QAAQ,OAAA;AACR,iHAAA,qBAAqB,OAAA;AACrB,mHAAA,uBAAuB,OAAA;AACvB,qHAAA,yBAAyB,OAAA;AACzB,0GAAA,cAAc,OAAA;AACd,qHAAA,yBAAyB,OAAA;AACzB,2GAAA,eAAe,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by \"generate:entrypoint-sources\".\n */\n\nexport {\n\t// #region @public APIs\n\tAllowedTypes, \n\tCommitKind, \n\tCommitMetadata, \n\tFieldKind, \n\tFieldProps, \n\tFieldSchema, \n\tFieldSchemaMetadata, \n\tITree, \n\tITreeConfigurationOptions, \n\tITreeViewConfiguration, \n\tImplicitAllowedTypes, \n\tImplicitFieldSchema, \n\tInput, \n\tInsertableTreeFieldFromImplicitField, \n\tInsertableTreeNodeFromAllowedTypes, \n\tInsertableTreeNodeFromImplicitAllowedTypes, \n\tInsertableTypedNode, \n\tInternalTreeNode, \n\tInternalTypes, \n\tIsListener, \n\tIsUnion, \n\tIterableTreeArrayContent, \n\tLazyItem, \n\tLeafSchema, \n\tListenable, \n\tListeners, \n\tMakeNominal, \n\tMapNodeInsertableData, \n\tNodeFromSchema, \n\tNodeInDocumentConstraint, \n\tNodeKind, \n\tNodeSchemaMetadata, \n\tNodeSchemaOptions, \n\tNumberKeys, \n\tObjectFromSchemaRecord, \n\tOff, \n\tReadonlyArrayNode, \n\tRestrictiveReadonlyRecord, \n\tRestrictiveStringRecord, \n\tRevertible, \n\tRevertibleFactory, \n\tRevertibleStatus, \n\tRunTransaction, \n\tSchemaCompatibilityStatus, \n\tSchemaFactory, \n\tSchemaFactory_base, \n\tSchemaStatics, \n\tSimpleNodeSchemaBase, \n\tSystem_Unsafe, \n\tTransactionConstraint, \n\tTree, \n\tTreeArrayNode, \n\tTreeChangeEvents, \n\tTreeFieldFromImplicitField, \n\tTreeLeafValue, \n\tTreeMapNode, \n\tTreeNode, \n\tTreeNodeApi, \n\tTreeNodeFromImplicitAllowedTypes, \n\tTreeNodeSchema, \n\tTreeNodeSchemaClass, \n\tTreeNodeSchemaCore, \n\tTreeNodeSchemaNonClass, \n\tTreeObjectNode, \n\tTreeStatus, \n\tTreeView, \n\tTreeViewConfiguration, \n\tTreeViewEvents, \n\tUnenforced, \n\tUnhydrated, \n\tUnionToIntersection, \n\tValidateRecursiveSchema, \n\tValidateRecursiveSchemaTemplate, \n\tViewableTree, \n\tWithType, \n\trollback, \n\ttypeSchemaSymbol,\n\t// #endregion\n \n\t// #region @beta APIs\n\tAllowedTypeMetadata, \n\tAllowedTypesFull, \n\tAllowedTypesFullEvaluated, \n\tAllowedTypesFullFromMixed, \n\tAllowedTypesFullFromMixedUnsafe, \n\tAllowedTypesMetadata, \n\tAnnotateAllowedTypesList, \n\tAnnotateAllowedTypesListUnsafe, \n\tAnnotatedAllowedType, \n\tAnnotatedAllowedTypeUnsafe, \n\tAnnotatedAllowedTypes, \n\tAnnotatedAllowedTypesUnsafe, \n\tCodecWriteOptionsBeta, \n\tConciseTree, \n\tExtensibleUnionNode, \n\tFixRecursiveArraySchema, \n\tFluidSerializableAsTree, \n\tForestOptions, \n\tForestType, \n\tForestTypeExpensiveDebug, \n\tForestTypeOptimized, \n\tForestTypeReference, \n\tIdentifierIndex, \n\tJsonCompatible, \n\tJsonCompatibleObject, \n\tKeyEncodingOptions, \n\tNodeChangedData, \n\tObjectSchemaOptions, \n\tPopUnion, \n\tRecordNodeInsertableData, \n\tRunTransactionParamsBeta, \n\tSchemaFactoryBeta, \n\tSchemaStaticsBeta, \n\tSchemaUpgrade, \n\tSharedTreeOptionsBeta, \n\tSnapshotFileSystem, \n\tSnapshotSchemaCompatibilityOptions, \n\tSystem_TableSchema, \n\tTableSchema, \n\tTransactionCallbackStatusBeta, \n\tTransactionResultFailed, \n\tTransactionResultSuccess, \n\tTransactionValueResult, \n\tTransactionVoidResult, \n\tTreeBeta, \n\tTreeBranch, \n\tTreeChangeEventsBeta, \n\tTreeEncodingOptions, \n\tTreeIndex, \n\tTreeIndexKey, \n\tTreeIndexNodes, \n\tTreeRecordNode, \n\tTreeRecordNodeUnsafe, \n\tTreeViewBeta, \n\tUnannotateAllowedTypeUnsafe, \n\tUnannotateAllowedTypesList, \n\tUnannotateAllowedTypesListUnsafe, \n\tUnionToTuple, \n\tVoidTransactionCallbackStatusBeta, \n\tWithValue, \n\tadaptEnum, \n\tasBeta, \n\tconfiguredSharedTreeBeta, \n\tcreateIdentifierIndex, \n\tcreateIndependentTreeBeta, \n\tcreateTreeIndex, \n\tenumFromStrings, \n\tsingletonSchema, \n\tsnapshotSchemaCompatibility,\n\t// #endregion\n \n\t// #region @alpha APIs\n\tAllowedTypesFullUnsafe, \n\tArrayNodeCustomizableSchema, \n\tArrayNodeCustomizableSchemaAlpha, \n\tArrayNodeCustomizableSchemaUnsafe, \n\tArrayNodeDeltaOp, \n\tArrayNodeInsertOp, \n\tArrayNodePojoEmulationSchema, \n\tArrayNodeRemoveOp, \n\tArrayNodeRetainOp, \n\tArrayNodeSchema, \n\tArrayNodeTreeChangedDeltaOp, \n\tArrayNodeTreeChangedRetainOp, \n\tArrayPlaceAnchor, \n\tChangeMetadata, \n\tCodecName, \n\tCodecWriteOptions, \n\tComponent, \n\tCreateIndependentTreeAlphaOptions, \n\tDirtyTreeMap, \n\tDirtyTreeStatus, \n\tErasedNode, \n\tErasedSchema, \n\tErasedSchemaSubclassable, \n\tFactoryContent, \n\tFactoryContentObject, \n\tFieldHasDefaultAlpha, \n\tFieldHasDefaultAlphaUnsafe, \n\tFieldPropsAlpha, \n\tFieldSchemaAlpha, \n\tFieldSchemaAlphaUnsafe, \n\tFluidClientVersion, \n\tFormatValidator, \n\tFormatValidatorBasic, \n\tFormatValidatorNoOp, \n\tFormatVersion, \n\tHandleConverter, \n\tICodecOptions, \n\tITreeAlpha, \n\tITreeViewConfigurationAlpha, \n\tIncrementalEncodingPolicy, \n\tIndependentViewOptions, \n\tIndependentViewTelemetryOptions, \n\tInsertable, \n\tInsertableContent, \n\tInsertableField, \n\tInsertableObjectFromSchemaRecordAlpha, \n\tInsertableObjectFromSchemaRecordAlphaUnsafe, \n\tJsonArrayNodeSchema, \n\tJsonAsTree, \n\tJsonCompatibleReadOnly, \n\tJsonCompatibleReadOnlyObject, \n\tJsonFieldSchema, \n\tJsonLeafNodeSchema, \n\tJsonLeafSchemaType, \n\tJsonMapNodeSchema, \n\tJsonNodeSchema, \n\tJsonNodeSchemaBase, \n\tJsonObjectNodeSchema, \n\tJsonRecordNodeSchema, \n\tJsonRefPath, \n\tJsonSchemaId, \n\tJsonSchemaRef, \n\tJsonSchemaType, \n\tJsonStringKeyPatternProperties, \n\tJsonTreeSchema, \n\tLabelTree, \n\tLocalChangeMetadata, \n\tMapNodeCustomizableSchema, \n\tMapNodeCustomizableSchemaUnsafe, \n\tMapNodePojoEmulationSchema, \n\tMapNodeSchema, \n\tNoChangeConstraint, \n\tNodeChangedDataAlpha, \n\tNodeChangedDataDelta, \n\tNodeChangedDataProperties, \n\tNodeChangedDataTreeDelta, \n\tNodeProvider, \n\tNodeSchemaOptionsAlpha, \n\tObjectNodeSchema, \n\tObjectNodeSchemaWorkaround, \n\tObjectSchemaOptionsAlpha, \n\tObservationResults, \n\tReadSchema, \n\tReadableField, \n\tRecordNodeCustomizableSchema, \n\tRecordNodePojoEmulationSchema, \n\tRecordNodeSchema, \n\tRemoteChangeMetadata, \n\tRevertibleAlpha, \n\tRevertibleAlphaFactory, \n\tRunTransactionParamsAlpha, \n\tSchemaFactoryAlpha, \n\tSchemaStaticsAlpha, \n\tSchemaType, \n\tSharedTreeFormatOptions, \n\tSharedTreeOptions, \n\tSimpleAllowedTypeAttributes, \n\tSimpleArrayNodeSchema, \n\tSimpleFieldSchema, \n\tSimpleLeafNodeSchema, \n\tSimpleMapNodeSchema, \n\tSimpleNodeSchema, \n\tSimpleNodeSchemaBaseAlpha, \n\tSimpleObjectFieldSchema, \n\tSimpleObjectNodeSchema, \n\tSimpleRecordNodeSchema, \n\tSimpleTreeSchema, \n\tStagedSchemaUpgradePolicy, \n\tStagedSchemaUpgradePolicyFactory, \n\tTextAsTree, \n\tTransactionCallbackStatusAlpha, \n\tTransactionConstraintAlpha, \n\tTransactionLabels, \n\tTransactionPostProcessor, \n\tTreeAlpha, \n\tTreeArrayNodeAlpha, \n\tTreeBranchAlpha, \n\tTreeBranchEvents, \n\tTreeChangeEventsAlpha, \n\tTreeCompressionStrategy, \n\tTreeContextAlpha, \n\tTreeIdentifierUtils, \n\tTreeMapNodeAlpha, \n\tTreeParsingOptions, \n\tTreeSchema, \n\tTreeSchemaEncodingOptions, \n\tTreeViewAlpha, \n\tTreeViewConfigurationAlpha, \n\tUnsafeUnknownSchema, \n\tValueSchema, \n\tVerboseTree, \n\tVerboseTreeNode, \n\tViewContent, \n\tVoidTransactionCallbackStatusAlpha, \n\tallowUnused, \n\tasAlpha, \n\tasTreeViewAlpha, \n\tcheckCompatibility, \n\tcloneWithReplacements, \n\tcomparePersistedSchema, \n\tconfiguredSharedTreeAlpha, \n\tcontentSchemaSymbol, \n\tcreateArrayInsertionAnchor, \n\tcreateIndependentTreeAlpha, \n\tdecodeSchemaCompatibilitySnapshot, \n\tencodeSchemaCompatibilitySnapshot, \n\teraseSchemaDetails, \n\teraseSchemaDetailsSubclassable, \n\tevaluateLazySchema, \n\texportCompatibilitySchemaSnapshot, \n\textractPersistedSchema, \n\tgenerateSchemaFromSimpleSchema, \n\tgetJsonSchema, \n\tgetSimpleSchema, \n\timportCompatibilitySchemaSnapshot, \n\tincrementalEncodingPolicyForAllowedTypes, \n\tincrementalSummaryHint, \n\tindependentInitializedView, \n\tindependentView, \n\tminimize, \n\tnormalizeAllowedTypes, \n\tpersistedToSimpleSchema, \n\treplaceConciseTreeHandles, \n\treplaceHandles, \n\treplaceVerboseTreeHandles, \n\ttrackDirtyNodes\n\t// #endregion\n} from \"../index.js\";\n"]}
1
+ {"version":3,"file":"alpha.js","sourceRoot":"","sources":["../../src/entrypoints/alpha.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAEH;;;GAGG;AAEH,wCAyUqB;AAtUpB,sGAAA,UAAU,OAAA;AAEV,qGAAA,SAAS,OAAA;AAET,uGAAA,WAAW,OAAA;AAaX,yGAAA,aAAa,OAAA;AAGb,oHAAA,wBAAwB,OAAA;AASxB,oGAAA,QAAQ,OAAA;AAWR,4GAAA,gBAAgB,OAAA;AAGhB,yGAAA,aAAa,OAAA;AAMb,gGAAA,IAAI,OAAA;AACJ,yGAAA,aAAa,OAAA;AAKb,oGAAA,QAAQ,OAAA;AAQR,sGAAA,UAAU,OAAA;AAEV,iHAAA,qBAAqB,OAAA;AASrB,oGAAA,QAAQ,OAAA;AAmBR,+GAAA,mBAAmB,OAAA;AAEnB,mHAAA,uBAAuB,OAAA;AAGvB,oHAAA,wBAAwB,OAAA;AACxB,+GAAA,mBAAmB,OAAA;AACnB,+GAAA,mBAAmB,OAAA;AAInB,8GAAA,kBAAkB,OAAA;AAMlB,6GAAA,iBAAiB,OAAA;AAOjB,uGAAA,WAAW,OAAA;AAMX,oGAAA,QAAQ,OAAA;AAgBR,qGAAA,SAAS,OAAA;AACT,kGAAA,MAAM,OAAA;AACN,oHAAA,wBAAwB,OAAA;AACxB,iHAAA,qBAAqB,OAAA;AACrB,qHAAA,yBAAyB,OAAA;AACzB,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,2GAAA,eAAe,OAAA;AACf,uHAAA,2BAA2B,OAAA;AAa3B,2GAAA,eAAe,OAAA;AAOf,yGAAA,aAAa,OAAA;AACb,qGAAA,SAAS,OAAA;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uBAAuB,OAAA;AACvB,qHAAA,yBAAyB,OAAA;AACzB,0GAAA,cAAc,OAAA;AACd,qHAAA,yBAAyB,OAAA;AACzB,2GAAA,eAAe,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by \"generate:entrypoint-sources\".\n */\n\nexport {\n\t// #region @public APIs\n\tAllowedTypes, \n\tCommitKind, \n\tCommitMetadata, \n\tFieldKind, \n\tFieldProps, \n\tFieldSchema, \n\tFieldSchemaMetadata, \n\tITree, \n\tITreeConfigurationOptions, \n\tITreeViewConfiguration, \n\tImplicitAllowedTypes, \n\tImplicitFieldSchema, \n\tInput, \n\tInsertableTreeFieldFromImplicitField, \n\tInsertableTreeNodeFromAllowedTypes, \n\tInsertableTreeNodeFromImplicitAllowedTypes, \n\tInsertableTypedNode, \n\tInternalTreeNode, \n\tInternalTypes, \n\tIsListener, \n\tIsUnion, \n\tIterableTreeArrayContent, \n\tLazyItem, \n\tLeafSchema, \n\tListenable, \n\tListeners, \n\tMakeNominal, \n\tMapNodeInsertableData, \n\tNodeFromSchema, \n\tNodeInDocumentConstraint, \n\tNodeKind, \n\tNodeSchemaMetadata, \n\tNodeSchemaOptions, \n\tNumberKeys, \n\tObjectFromSchemaRecord, \n\tOff, \n\tReadonlyArrayNode, \n\tRestrictiveReadonlyRecord, \n\tRestrictiveStringRecord, \n\tRevertible, \n\tRevertibleFactory, \n\tRevertibleStatus, \n\tRunTransaction, \n\tSchemaCompatibilityStatus, \n\tSchemaFactory, \n\tSchemaFactory_base, \n\tSchemaStatics, \n\tSimpleNodeSchemaBase, \n\tSystem_Unsafe, \n\tTransactionConstraint, \n\tTree, \n\tTreeArrayNode, \n\tTreeChangeEvents, \n\tTreeFieldFromImplicitField, \n\tTreeLeafValue, \n\tTreeMapNode, \n\tTreeNode, \n\tTreeNodeApi, \n\tTreeNodeFromImplicitAllowedTypes, \n\tTreeNodeSchema, \n\tTreeNodeSchemaClass, \n\tTreeNodeSchemaCore, \n\tTreeNodeSchemaNonClass, \n\tTreeObjectNode, \n\tTreeStatus, \n\tTreeView, \n\tTreeViewConfiguration, \n\tTreeViewEvents, \n\tUnenforced, \n\tUnhydrated, \n\tUnionToIntersection, \n\tValidateRecursiveSchema, \n\tValidateRecursiveSchemaTemplate, \n\tViewableTree, \n\tWithType, \n\trollback, \n\ttypeSchemaSymbol,\n\t// #endregion\n \n\t// #region @beta APIs\n\tAllowedTypeMetadata, \n\tAllowedTypesFull, \n\tAllowedTypesFullEvaluated, \n\tAllowedTypesFullFromMixed, \n\tAllowedTypesFullFromMixedUnsafe, \n\tAllowedTypesMetadata, \n\tAnnotateAllowedTypesList, \n\tAnnotateAllowedTypesListUnsafe, \n\tAnnotatedAllowedType, \n\tAnnotatedAllowedTypeUnsafe, \n\tAnnotatedAllowedTypes, \n\tAnnotatedAllowedTypesUnsafe, \n\tCodecWriteOptionsBeta, \n\tConciseTree, \n\tExtensibleUnionNode, \n\tFixRecursiveArraySchema, \n\tFluidSerializableAsTree, \n\tForestOptions, \n\tForestType, \n\tForestTypeExpensiveDebug, \n\tForestTypeOptimized, \n\tForestTypeReference, \n\tIdentifierIndex, \n\tJsonCompatible, \n\tJsonCompatibleObject, \n\tKeyEncodingOptions, \n\tNodeChangedData, \n\tObjectSchemaOptions, \n\tPopUnion, \n\tRecordNodeInsertableData, \n\tRunTransactionParamsBeta, \n\tSchemaFactoryBeta, \n\tSchemaStaticsBeta, \n\tSchemaUpgrade, \n\tSharedTreeOptionsBeta, \n\tSnapshotFileSystem, \n\tSnapshotSchemaCompatibilityOptions, \n\tSystem_TableSchema, \n\tTableSchema, \n\tTransactionCallbackStatusBeta, \n\tTransactionResultFailed, \n\tTransactionResultSuccess, \n\tTransactionValueResult, \n\tTransactionVoidResult, \n\tTreeBeta, \n\tTreeBranch, \n\tTreeChangeEventsBeta, \n\tTreeEncodingOptions, \n\tTreeIndex, \n\tTreeIndexKey, \n\tTreeIndexNodes, \n\tTreeRecordNode, \n\tTreeRecordNodeUnsafe, \n\tTreeViewBeta, \n\tUnannotateAllowedTypeUnsafe, \n\tUnannotateAllowedTypesList, \n\tUnannotateAllowedTypesListUnsafe, \n\tUnionToTuple, \n\tVoidTransactionCallbackStatusBeta, \n\tWithValue, \n\tadaptEnum, \n\tasBeta, \n\tconfiguredSharedTreeBeta, \n\tcreateIdentifierIndex, \n\tcreateIndependentTreeBeta, \n\tcreateTreeIndex, \n\tenumFromStrings, \n\tsingletonSchema, \n\tsnapshotSchemaCompatibility,\n\t// #endregion\n \n\t// #region @alpha APIs\n\tAllowedTypesFullUnsafe, \n\tArrayNodeCustomizableSchema, \n\tArrayNodeCustomizableSchemaAlpha, \n\tArrayNodeCustomizableSchemaUnsafe, \n\tArrayNodeDeltaOp, \n\tArrayNodeInsertOp, \n\tArrayNodePojoEmulationSchema, \n\tArrayNodeRemoveOp, \n\tArrayNodeRetainOp, \n\tArrayNodeSchema, \n\tArrayNodeTreeChangedDeltaOp, \n\tArrayNodeTreeChangedRetainOp, \n\tArrayPlaceAnchor, \n\tChangeMetadata, \n\tCodecName, \n\tCodecWriteOptions, \n\tCommitOutcome, \n\tComponent, \n\tCreateIndependentTreeAlphaOptions, \n\tDirtyTreeMap, \n\tDirtyTreeStatus, \n\tErasedNode, \n\tErasedSchema, \n\tErasedSchemaSubclassable, \n\tFactoryContent, \n\tFactoryContentObject, \n\tFieldHasDefaultAlpha, \n\tFieldHasDefaultAlphaUnsafe, \n\tFieldPropsAlpha, \n\tFieldSchemaAlpha, \n\tFieldSchemaAlphaUnsafe, \n\tFluidClientVersion, \n\tFormatValidator, \n\tFormatValidatorBasic, \n\tFormatValidatorNoOp, \n\tFormatVersion, \n\tFormattedText, \n\tHandleConverter, \n\tICodecOptions, \n\tITreeAlpha, \n\tITreeViewConfigurationAlpha, \n\tIncrementalEncodingPolicy, \n\tIndependentViewOptions, \n\tIndependentViewTelemetryOptions, \n\tInsertable, \n\tInsertableContent, \n\tInsertableField, \n\tInsertableObjectFromSchemaRecordAlpha, \n\tInsertableObjectFromSchemaRecordAlphaUnsafe, \n\tJsonArrayNodeSchema, \n\tJsonAsTree, \n\tJsonCompatibleReadOnly, \n\tJsonCompatibleReadOnlyObject, \n\tJsonFieldSchema, \n\tJsonLeafNodeSchema, \n\tJsonLeafSchemaType, \n\tJsonMapNodeSchema, \n\tJsonNodeSchema, \n\tJsonNodeSchemaBase, \n\tJsonObjectNodeSchema, \n\tJsonRecordNodeSchema, \n\tJsonRefPath, \n\tJsonSchemaId, \n\tJsonSchemaRef, \n\tJsonSchemaType, \n\tJsonStringKeyPatternProperties, \n\tJsonTreeSchema, \n\tLabelTree, \n\tLocalChangeMetadata, \n\tLocalCommitEvents, \n\tMapNodeCustomizableSchema, \n\tMapNodeCustomizableSchemaUnsafe, \n\tMapNodePojoEmulationSchema, \n\tMapNodeSchema, \n\tNoChangeConstraint, \n\tNodeChangedDataAlpha, \n\tNodeChangedDataDelta, \n\tNodeChangedDataProperties, \n\tNodeChangedDataTreeDelta, \n\tNodeProvider, \n\tNodeSchemaOptionsAlpha, \n\tObjectNodeSchema, \n\tObjectNodeSchemaWorkaround, \n\tObjectSchemaOptionsAlpha, \n\tObservationResults, \n\tPlainText, \n\tReadSchema, \n\tReadableField, \n\tRecordNodeCustomizableSchema, \n\tRecordNodePojoEmulationSchema, \n\tRecordNodeSchema, \n\tRemoteChangeMetadata, \n\tRevertibleAlpha, \n\tRevertibleAlphaFactory, \n\tRunTransactionParamsAlpha, \n\tSchemaFactoryAlpha, \n\tSchemaStaticsAlpha, \n\tSchemaType, \n\tSharedTreeAlpha, \n\tSharedTreeFormatOptions, \n\tSharedTreeOptions, \n\tSimpleAllowedTypeAttributes, \n\tSimpleArrayNodeSchema, \n\tSimpleFieldSchema, \n\tSimpleLeafNodeSchema, \n\tSimpleMapNodeSchema, \n\tSimpleNodeSchema, \n\tSimpleNodeSchemaBaseAlpha, \n\tSimpleObjectFieldSchema, \n\tSimpleObjectNodeSchema, \n\tSimpleRecordNodeSchema, \n\tSimpleTreeSchema, \n\tStagedSchemaUpgradePolicy, \n\tStagedSchemaUpgradePolicyFactory, \n\tStringSchema, \n\tTransactionCallbackStatusAlpha, \n\tTransactionConstraintAlpha, \n\tTransactionLabels, \n\tTransactionPostProcessor, \n\tTreeAlpha, \n\tTreeArrayNodeAlpha, \n\tTreeBranchAlpha, \n\tTreeBranchEvents, \n\tTreeChangeEventsAlpha, \n\tTreeCompressionStrategy, \n\tTreeContextAlpha, \n\tTreeDataStoreOptions, \n\tTreeIdentifierUtils, \n\tTreeMapNodeAlpha, \n\tTreeParsingOptions, \n\tTreeSchema, \n\tTreeSchemaEncodingOptions, \n\tTreeViewAlpha, \n\tTreeViewConfigurationAlpha, \n\tUnsafeUnknownSchema, \n\tValueSchema, \n\tVerboseTree, \n\tVerboseTreeNode, \n\tViewContent, \n\tVoidTransactionCallbackStatusAlpha, \n\tallowUnused, \n\tasAlpha, \n\tasTreeViewAlpha, \n\tcheckCompatibility, \n\tcloneWithReplacements, \n\tcomparePersistedSchema, \n\tconfiguredSharedTreeAlpha, \n\tcontentSchemaSymbol, \n\tcreateArrayInsertionAnchor, \n\tcreateIndependentTreeAlpha, \n\tdecodeSchemaCompatibilitySnapshot, \n\tdefineTreeDataStore, \n\tencodeSchemaCompatibilitySnapshot, \n\teraseSchemaDetails, \n\teraseSchemaDetailsSubclassable, \n\tevaluateLazySchema, \n\texportCompatibilitySchemaSnapshot, \n\textractPersistedSchema, \n\tgenerateSchemaFromSimpleSchema, \n\tgetJsonSchema, \n\tgetSimpleSchema, \n\timportCompatibilitySchemaSnapshot, \n\tincrementalEncodingPolicyForAllowedTypes, \n\tincrementalSummaryHint, \n\tindependentInitializedView, \n\tindependentView, \n\tinstantiateTreeFirstTime, \n\tminimize, \n\tnormalizeAllowedTypes, \n\tpersistedToSimpleSchema, \n\treplaceConciseTreeHandles, \n\treplaceHandles, \n\treplaceVerboseTreeHandles, \n\ttrackDirtyNodes\n\t// #endregion\n} from \"../index.js\";\n"]}
@@ -89,10 +89,10 @@ export interface FieldBatchEncodingContext {
89
89
  /**
90
90
  * Decode-side context for {@link FieldBatchCodec}.
91
91
  *
92
- * Carries the per-call `resolveEncodedId` function that encapsulates the
93
- * originator-session lookup and (for the forest-summarizer's legacy heal path)
94
- * the deterministic UUIDv5 synthesis. Heal and originator-session flags live
95
- * inside that function, not on this context.
92
+ * Composes an {@link IdDecodingContext} (which carries the per-call `resolveEncodedId`
93
+ * function encapsulating the originator-session lookup and, for the forest-summarizer's
94
+ * legacy heal path, the deterministic UUIDv5 synthesis) together with the optional
95
+ * incremental decoder for this batch.
96
96
  *
97
97
  * Constructed via one of the two named static factories — {@link forOp} or
98
98
  * {@link forSummary} — depending on the call site's semantics. The constructor
@@ -100,8 +100,11 @@ export interface FieldBatchEncodingContext {
100
100
  * op-style and summary-style decoding is load-bearing (different invariants
101
101
  * apply, and bugs in this area are typically the result of conflating them).
102
102
  */
103
- export declare class FieldBatchDecodingContext extends IdDecodingContext {
104
- private readonly options;
103
+ export declare class FieldBatchDecodingContext {
104
+ /**
105
+ * Resolves the encoded identifiers contained in this batch.
106
+ */
107
+ readonly idDecodingContext: IdDecodingContext;
105
108
  /**
106
109
  * Decoder for incremental fields. Defined when the encoded batch contains
107
110
  * incremental chunks. Only populated on summary-style contexts; op-style
@@ -1 +1 @@
1
- {"version":3,"file":"codecs.d.ts","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/codecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAInE,OAAO,EACN,8BAA8B,EAE9B,KAAK,uBAAuB,EAE5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEN,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EAGpB,KAAK,SAAS,EACd,MAAM,wBAAwB,CAAC;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EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,yBAA0B,SAAQ,iBAAiB;IAE9D,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB;;;;OAIG;aACa,kBAAkB,CAAC;IAPpC,OAAO;IAYP;;;;;;;;OAQG;WACW,KAAK,CAAC,OAAO,EAAE,8BAA8B,GAAG,yBAAyB;IAIvF;;;;;;;;;;;;;;;OAeG;WACW,UAAU,CACvB,OAAO,EAAE,8BAA8B,GAAG,8BAA8B,GACtE,yBAAyB;IAI5B;;;;OAIG;IACI,sBAAsB,CAC5B,kBAAkB,EAAE,kBAAkB,GACpC,yBAAyB;CAY5B;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,uBAAuB,CACpD,UAAU,EACV,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,CACzB,CAAC;AAkFF;;GAEG;AACH,eAAO,MAAM,sBAAsB,4OAqBjC,CAAC"}
1
+ {"version":3,"file":"codecs.d.ts","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/codecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAInE,OAAO,EACN,8BAA8B,EAE9B,KAAK,uBAAuB,EAE5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEN,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EAGpB,KAAK,SAAS,EACd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAEN,iBAAiB,EACjB,KAAK,KAAK,EACV,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACnC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAGxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAEN,mBAAmB,EACnB,uBAAuB,EAGvB,MAAM,mBAAmB,CAAC;AAC3B,O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B,GAAG,8BAA8B,GACtE,yBAAyB;IAI5B;;;;OAIG;IACI,sBAAsB,CAC5B,kBAAkB,EAAE,kBAAkB,GACpC,yBAAyB;CAY5B;AAED;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,uBAAuB,CACpD,UAAU,EACV,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,CACzB,CAAC;AAoFF;;GAEG;AACH,eAAO,MAAM,sBAAsB,4OAqBjC,CAAC"}
@@ -18,10 +18,10 @@ const ChunkReferenceId = (0, index_js_2.brandedNumberType)({ multipleOf: 1, mini
18
18
  /**
19
19
  * Decode-side context for {@link FieldBatchCodec}.
20
20
  *
21
- * Carries the per-call `resolveEncodedId` function that encapsulates the
22
- * originator-session lookup and (for the forest-summarizer's legacy heal path)
23
- * the deterministic UUIDv5 synthesis. Heal and originator-session flags live
24
- * inside that function, not on this context.
21
+ * Composes an {@link IdDecodingContext} (which carries the per-call `resolveEncodedId`
22
+ * function encapsulating the originator-session lookup and, for the forest-summarizer's
23
+ * legacy heal path, the deterministic UUIDv5 synthesis) together with the optional
24
+ * incremental decoder for this batch.
25
25
  *
26
26
  * Constructed via one of the two named static factories — {@link forOp} or
27
27
  * {@link forSummary} — depending on the call site's semantics. The constructor
@@ -29,16 +29,19 @@ const ChunkReferenceId = (0, index_js_2.brandedNumberType)({ multipleOf: 1, mini
29
29
  * op-style and summary-style decoding is load-bearing (different invariants
30
30
  * apply, and bugs in this area are typically the result of conflating them).
31
31
  */
32
- class FieldBatchDecodingContext extends index_js_2.IdDecodingContext {
33
- constructor(options,
32
+ class FieldBatchDecodingContext {
33
+ constructor(
34
+ /**
35
+ * Resolves the encoded identifiers contained in this batch.
36
+ */
37
+ idDecodingContext,
34
38
  /**
35
39
  * Decoder for incremental fields. Defined when the encoded batch contains
36
40
  * incremental chunks. Only populated on summary-style contexts; op-style
37
41
  * contexts always have this undefined.
38
42
  */
39
43
  incrementalDecoder) {
40
- super(options);
41
- this.options = options;
44
+ this.idDecodingContext = idDecodingContext;
42
45
  this.incrementalDecoder = incrementalDecoder;
43
46
  }
44
47
  /**
@@ -51,7 +54,7 @@ class FieldBatchDecodingContext extends index_js_2.IdDecodingContext {
51
54
  * a UUID. Incremental decoding is not used for ops.
52
55
  */
53
56
  static forOp(options) {
54
- return new FieldBatchDecodingContext(options);
57
+ return new FieldBatchDecodingContext(new index_js_2.IdDecodingContext(options));
55
58
  }
56
59
  /**
57
60
  * Construct a decode context for a summary blob.
@@ -70,7 +73,7 @@ class FieldBatchDecodingContext extends index_js_2.IdDecodingContext {
70
73
  * as does the encoding-side assert in the {@link EncoderContext}.
71
74
  */
72
75
  static forSummary(options) {
73
- return new FieldBatchDecodingContext(options);
76
+ return new FieldBatchDecodingContext(new index_js_2.IdDecodingContext(options));
74
77
  }
75
78
  /**
76
79
  * Returns a copy of this context with `incrementalDecoder` swapped in. Used by
@@ -83,8 +86,8 @@ class FieldBatchDecodingContext extends index_js_2.IdDecodingContext {
83
86
  // when we might be dealing with incremental chunks.
84
87
  // This mitigates the risk of using incorrect originator session ID identifiers in incremental chunks.
85
88
  // See also private remarks on forSummary.
86
- (0, internal_1.assert)(!this.hasOriginatorSessionId, 0xd0c /* withIncrementalDecoder can only be called on contexts without an originator session ID */);
87
- return new FieldBatchDecodingContext(this.options, incrementalDecoder);
89
+ (0, internal_1.assert)(!this.idDecodingContext.hasOriginatorSessionId, 0xd0c /* withIncrementalDecoder can only be called on contexts without an originator session ID */);
90
+ return new FieldBatchDecodingContext(this.idDecodingContext, incrementalDecoder);
88
91
  }
89
92
  }
90
93
  exports.FieldBatchDecodingContext = FieldBatchDecodingContext;
@@ -130,7 +133,7 @@ function makeFieldBatchCodecForVersion(version, uncompressedEncodeFn, schemaComp
130
133
  },
131
134
  decode: (data, context) => {
132
135
  // TODO: consider checking data is in schema.
133
- return (0, chunkDecoding_js_1.decode)(data, context, context.incrementalDecoder).map((chunk) => chunk.cursor());
136
+ return (0, chunkDecoding_js_1.decode)(data, context.idDecodingContext, context.incrementalDecoder).map((chunk) => chunk.cursor());
134
137
  },
135
138
  schema: encodedFieldBatchType,
136
139
  };
@@ -1 +1 @@
1
- {"version":3,"file":"codecs.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/codecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA8E;AAE9E,qEAAmF;AAGnF,sDAKiC;AASjC,qDAMgC;AAChC,2EAAwE;AAExE,yDAA4C;AAE5C,gDAM2B;AAE3B,iEAA4F;AAC5F,mEAAqF;AAMrF,MAAM,gBAAgB,GAAG,IAAA,4BAAiB,EAAmB,EAAE,UAAU,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;AAkF5F;;;;;;;;;;;;;GAaG;AACH,MAAa,yBAA0B,SAAQ,4BAAiB;IAC/D,YACkB,OAAwE;IACzF;;;;OAIG;IACa,kBAAuC;QAEvD,KAAK,CAAC,OAAO,CAAC,CAAC;QARE,YAAO,GAAP,OAAO,CAAiE;QAMzE,uBAAkB,GAAlB,kBAAkB,CAAqB;IAGxD,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,KAAK,CAAC,OAAuC;QAC1D,OAAO,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;;;;;;;;;;;OAeG;IACI,MAAM,CAAC,UAAU,CACvB,OAAwE;QAExE,OAAO,IAAI,yBAAyB,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAED;;;;OAIG;IACI,sBAAsB,CAC5B,kBAAsC;QAEtC,oEAAoE;QACpE,4EAA4E;QAC5E,oDAAoD;QACpD,sGAAsG;QACtG,0CAA0C;QAC1C,IAAA,iBAAM,EACL,CAAC,IAAI,CAAC,sBAAsB,EAC5B,KAAK,CAAC,4FAA4F,CAClG,CAAC;QACF,OAAO,IAAI,yBAAyB,CAAC,IAAI,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC;IACxE,CAAC;CACD;AAnED,8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C,CAAC,CAAC;oBACT,IAAA,0BAAe,EAAC,OAAO,CAAC,UAAU,CAAC,CAAC;gBACrC,CAAC;YACF,CAAC;YAED,oDAAoD;YACpD,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,CACP,IAA6B,EAC7B,OAAkC,EACrB,EAAE;YACf,6CAA6C;YAC7C,OAAO,IAAA,yBAAM,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QACzF,CAAC;QACD,MAAM,EAAE,qBAAqB;KAC7B,CAAC;AACH,CAAC;AAED;;GAEG;AACU,QAAA,sBAAsB,GAAG,yCAA8B,CAAC,KAAK,CAAC,YAAY,EAAE;IACxF;QACC,mBAAmB,EAAE,oCAAyB;QAC9C,aAAa,EAAE,kCAAuB,CAAC,EAAE;QACzC,KAAK,EAAE,6BAA6B,CACnC,kCAAuB,CAAC,EAAE,EAC1B,4CAAoB,EACpB,+CAAwB,EACxB,8BAAmB,CACnB;KACD;IACD;QACC,mBAAmB,EAAE,6BAAkB,CAAC,KAAK;QAC7C,aAAa,EAAE,kCAAuB,CAAC,EAAE;QACzC,KAAK,EAAE,6BAA6B,CACnC,kCAAuB,CAAC,EAAE,EAC1B,4CAAoB,EACpB,+CAAwB,EACxB,8BAAmB,CACnB;KACD;CACD,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport { lowestMinVersionForCollab } from \"@fluidframework/runtime-utils/internal\";\nimport type { TSchema } from \"@sinclair/typebox\";\n\nimport {\n\tVersionDispatchingCodecBuilder,\n\ttype CodecAndSchema,\n\ttype VersionDispatchingCodec,\n\tFluidClientVersion,\n} from \"../../../codec/index.js\";\nimport {\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\ttype SchemaAndPolicy,\n\ttype SchemaPolicy,\n\ttype StoredSchemaCollection,\n\ttype TreeChunk,\n} from \"../../../core/index.js\";\nimport {\n\tbrandedNumberType,\n\tIdDecodingContext,\n\ttype Brand,\n\ttype IdDecoderOptionsOriginatorless,\n\ttype IdDecoderOptionsWithOriginator,\n} from \"../../../util/index.js\";\nimport { TreeCompressionStrategy } from \"../../treeCompressionUtils.js\";\n\nimport { decode } from \"./chunkDecoding.js\";\nimport type { FieldBatch } from \"./fieldBatch.js\";\nimport {\n\tEncodedFieldBatchV1,\n\tEncodedFieldBatchV2,\n\tFieldBatchFormatVersion,\n\tsupportsIncrementalEncoding,\n\ttype EncodedFieldBatchV1OrV2,\n} from \"./format/index.js\";\nimport type { IncrementalEncodingPolicy } from \"./incrementalEncodingPolicy.js\";\nimport { schemaCompressedEncodeV1, schemaCompressedEncodeV2 } from \"./schemaBasedEncode.js\";\nimport { uncompressedEncodeV1, uncompressedEncodeV2 } from \"./uncompressedEncode.js\";\n\n/**\n * Reference ID for a chunk that is incrementally encoded.\n */\nexport type ChunkReferenceId = Brand<number, \"forest.ChunkReferenceId\">;\nconst ChunkReferenceId = brandedNumberType<ChunkReferenceId>({ multipleOf: 1, minimum: 0 });\n\n/**\n * Properties for incremental encoding.\n * Fields that support incremental encoding will encode their chunks separately by calling `encodeIncrementalField`.\n * @remarks\n * This supports features like incremental summarization where the summary from these fields can be re-used if\n * unchanged between summaries.\n * Note that each of these chunks that are incrementally encoded is fully self-describing (contain its own shapes\n * list and identifier table) and does not rely on context from its parent.\n */\nexport interface IncrementalEncoder {\n\t/**\n\t * Returns whether a node / field should be incrementally encoded.\n\t * @remarks See {@link IncrementalEncodingPolicy}.\n\t */\n\tshouldEncodeIncrementally: IncrementalEncodingPolicy;\n\t/**\n\t * Called to encode an incremental field at the cursor.\n\t * The chunks for this field are encoded separately from the main buffer.\n\t * @param cursor - The cursor pointing to the field to encode.\n\t * @param chunkEncoder - A function that encodes the contents of the passed chunk in the field.\n\t * @returns The reference IDs of the encoded chunks in the field.\n\t * This is used to retrieve the encoded chunks later.\n\t */\n\tencodeIncrementalField(\n\t\tcursor: ITreeCursorSynchronous,\n\t\tchunkEncoder: (chunk: TreeChunk) => EncodedFieldBatchV2,\n\t): ChunkReferenceId[];\n}\n\n/**\n * Properties for incremental decoding.\n *\n * Fields that had their chunks incrementally encoded will retrieve them by calling `getEncodedIncrementalChunk`.\n * @remarks\n * See {@link IncrementalEncoder} for more details.\n */\nexport interface IncrementalDecoder {\n\t/**\n\t * Called to decode an incremental chunk with the given reference ID.\n\t * @param referenceId - The reference ID of the chunk to decode.\n\t * @param chunkDecoder - A function that decodes the chunk.\n\t * @returns The decoded chunk.\n\t */\n\tdecodeIncrementalChunk(\n\t\treferenceId: ChunkReferenceId,\n\t\tchunkDecoder: (encoded: EncodedFieldBatchV2) => TreeChunk,\n\t): TreeChunk;\n}\n/**\n * Combines the properties of {@link IncrementalEncoder} and {@link IncrementalDecoder}.\n */\nexport interface IncrementalEncoderDecoder extends IncrementalEncoder, IncrementalDecoder {}\n\n/**\n * Encode-side context for {@link FieldBatchCodec}.\n *\n * Carries only the data the encoder actually consumes. Originator-session\n * lookup, heal flags, and the incremental *decoder* live on\n * {@link FieldBatchDecodingContext}.\n */\nexport interface FieldBatchEncodingContext {\n\treadonly encodeType: TreeCompressionStrategy;\n\treadonly idCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n\t/**\n\t * Encoder for incremental fields. Defined when incremental encoding is\n\t * supported and enabled.\n\t */\n\treadonly incrementalEncoder?: IncrementalEncoder;\n\t/**\n\t * `true` when encoding to a summary blob. `false` for op-stream encode\n\t * paths and for utility encoders that aren't tied to a persisted document.\n\t *\n\t * @remarks\n\t * Used by the node encoder to decide whether non-finalized op-space ids\n\t * can be written into the batch (they can't, for summaries).\n\t */\n\treadonly isSummary: boolean;\n}\n\n/**\n * Decode-side context for {@link FieldBatchCodec}.\n *\n * Carries the per-call `resolveEncodedId` function that encapsulates the\n * originator-session lookup and (for the forest-summarizer's legacy heal path)\n * the deterministic UUIDv5 synthesis. Heal and originator-session flags live\n * inside that function, not on this context.\n *\n * Constructed via one of the two named static factories — {@link forOp} or\n * {@link forSummary} — depending on the call site's semantics. The constructor\n * is private; there is no general-purpose builder, because the choice between\n * op-style and summary-style decoding is load-bearing (different invariants\n * apply, and bugs in this area are typically the result of conflating them).\n */\nexport class FieldBatchDecodingContext extends IdDecodingContext {\n\tprivate constructor(\n\t\tprivate readonly options: IdDecoderOptionsOriginatorless | IdDecoderOptionsWithOriginator,\n\t\t/**\n\t\t * Decoder for incremental fields. Defined when the encoded batch contains\n\t\t * incremental chunks. Only populated on summary-style contexts; op-style\n\t\t * contexts always have this undefined.\n\t\t */\n\t\tpublic readonly incrementalDecoder?: IncrementalDecoder,\n\t) {\n\t\tsuper(options);\n\t}\n\n\t/**\n\t * Construct a decode context for an op.\n\t *\n\t * The originator is the session that produced the encoded form (carried\n\t * alongside the op envelope by the caller). Heal-on-decode is *not*\n\t * available — an unresolvable id during op decode indicates a real bug,\n\t * not a recoverable state, so the resolver throws rather than synthesizing\n\t * a UUID. Incremental decoding is not used for ops.\n\t */\n\tpublic static forOp(options: IdDecoderOptionsWithOriginator): FieldBatchDecodingContext {\n\t\treturn new FieldBatchDecodingContext(options);\n\t}\n\n\t/**\n\t * Construct a decode context for a summary blob.\n\t *\n\t * Summaries must contain only ids resolvable without an originator — either\n\t * finalized op-space ids, or (when {@link IdentifierHealingConfig} is supplied\n\t * via `healing`) non-final ids that get healed into deterministic UUIDv5\n\t * strings. Incremental decoding is attached via {@link withIncrementalDecoder}.\n\t *\n\t * @privateRemarks\n\t * In the future (if adding a summary format which includes the session id),\n\t * this could allow providing an originator ID to allow for op-space compressed identifiers in attach summaries.\n\t * Non-attach summaries should only have finalized compressed identifiers (due to only being made by summary clients which never allocate identifiers since they never edit).\n\t * Since only non-attach summaries can be incremental, incremental summaries should never have non finalized identifiers.\n\t * `withIncrementalDecoder` has logic to guard against cases which expect session-relative identifiers in incremental chunks,\n\t * as does the encoding-side assert in the {@link EncoderContext}.\n\t */\n\tpublic static forSummary(\n\t\toptions: IdDecoderOptionsOriginatorless | IdDecoderOptionsWithOriginator,\n\t): FieldBatchDecodingContext {\n\t\treturn new FieldBatchDecodingContext(options);\n\t}\n\n\t/**\n\t * Returns a copy of this context with `incrementalDecoder` swapped in. Used by\n\t * the forest summarizer to attach the per-call incremental builder to a base\n\t * decode context.\n\t */\n\tpublic withIncrementalDecoder(\n\t\tincrementalDecoder: IncrementalDecoder,\n\t): FieldBatchDecodingContext {\n\t\t// As different incremental chunks may come from different sessions,\n\t\t// for now we simply enforce that we do not provide an originator session ID\n\t\t// when we might be dealing with incremental chunks.\n\t\t// This mitigates the risk of using incorrect originator session ID identifiers in incremental chunks.\n\t\t// See also private remarks on forSummary.\n\t\tassert(\n\t\t\t!this.hasOriginatorSessionId,\n\t\t\t0xd0c /* withIncrementalDecoder can only be called on contexts without an originator session ID */,\n\t\t);\n\t\treturn new FieldBatchDecodingContext(this.options, incrementalDecoder);\n\t}\n}\n\n/**\n * @remarks\n * Fields in this batch currently don't have field schema for the root, which limits optimizations.\n */\nexport type FieldBatchCodec = VersionDispatchingCodec<\n\tFieldBatch,\n\tFieldBatchEncodingContext,\n\tFieldBatchFormatVersion,\n\tFieldBatchDecodingContext\n>;\n\n/**\n * Creates the encode/decode functions for a specific FieldBatch format version.\n */\nfunction makeFieldBatchCodecForVersion(\n\tversion: FieldBatchFormatVersion,\n\tuncompressedEncodeFn: (batch: FieldBatch) => EncodedFieldBatchV1OrV2,\n\tschemaCompressedEncodeFn: (\n\t\tschema: StoredSchemaCollection,\n\t\tpolicy: SchemaPolicy,\n\t\tfieldBatch: FieldBatch,\n\t\tidCompressor: IIdCompressor,\n\t\tincrementalEncoder: IncrementalEncoder | undefined,\n\t\tisSummary: boolean,\n\t) => EncodedFieldBatchV1OrV2,\n\tencodedFieldBatchType: TSchema,\n): CodecAndSchema<FieldBatch, FieldBatchEncodingContext, FieldBatchDecodingContext> {\n\treturn {\n\t\tencode: (\n\t\t\tdata: FieldBatch,\n\t\t\tcontext: FieldBatchEncodingContext,\n\t\t): EncodedFieldBatchV1OrV2 => {\n\t\t\tfor (const cursor of data) {\n\t\t\t\tassert(\n\t\t\t\t\tcursor.mode === CursorLocationType.Fields,\n\t\t\t\t\t0x8a3 /* FieldBatch expects fields cursors */,\n\t\t\t\t);\n\t\t\t}\n\t\t\tlet encoded: EncodedFieldBatchV1OrV2;\n\t\t\tlet incrementalEncoder: IncrementalEncoder | undefined;\n\t\t\tswitch (context.encodeType) {\n\t\t\t\tcase TreeCompressionStrategy.Uncompressed: {\n\t\t\t\t\tencoded = uncompressedEncodeFn(data);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase TreeCompressionStrategy.CompressedIncremental: {\n\t\t\t\t\tassert(\n\t\t\t\t\t\tsupportsIncrementalEncoding(version),\n\t\t\t\t\t\t0xca0 /* Unsupported FieldBatchFormatVersion for incremental encoding; must be v2 or higher */,\n\t\t\t\t\t);\n\t\t\t\t\t// Incremental encoding is only supported for CompressedIncremental.\n\t\t\t\t\tincrementalEncoder = context.incrementalEncoder;\n\t\t\t\t}\n\t\t\t\t// fallthrough\n\t\t\t\tcase TreeCompressionStrategy.Compressed: {\n\t\t\t\t\t// eslint-disable-next-line unicorn/prefer-ternary\n\t\t\t\t\tif (context.schema === undefined) {\n\t\t\t\t\t\t// TODO: consider enabling a somewhat compressed but not schema accelerated encode.\n\t\t\t\t\t\tencoded = uncompressedEncodeFn(data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tencoded = schemaCompressedEncodeFn(\n\t\t\t\t\t\t\tcontext.schema.schema,\n\t\t\t\t\t\t\tcontext.schema.policy,\n\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\tcontext.idCompressor,\n\t\t\t\t\t\t\tincrementalEncoder,\n\t\t\t\t\t\t\tcontext.isSummary,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tunreachableCase(context.encodeType);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// TODO: consider checking input data was in schema.\n\t\t\treturn encoded;\n\t\t},\n\t\tdecode: (\n\t\t\tdata: EncodedFieldBatchV1OrV2,\n\t\t\tcontext: FieldBatchDecodingContext,\n\t\t): FieldBatch => {\n\t\t\t// TODO: consider checking data is in schema.\n\t\t\treturn decode(data, context, context.incrementalDecoder).map((chunk) => chunk.cursor());\n\t\t},\n\t\tschema: encodedFieldBatchType,\n\t};\n}\n\n/**\n * {@link VersionDispatchingCodecBuilder} for field batch codecs.\n */\nexport const fieldBatchCodecBuilder = VersionDispatchingCodecBuilder.build(\"FieldBatch\", [\n\t{\n\t\tminVersionForCollab: lowestMinVersionForCollab,\n\t\tformatVersion: FieldBatchFormatVersion.v1,\n\t\tcodec: makeFieldBatchCodecForVersion(\n\t\t\tFieldBatchFormatVersion.v1,\n\t\t\tuncompressedEncodeV1,\n\t\t\tschemaCompressedEncodeV1,\n\t\t\tEncodedFieldBatchV1,\n\t\t),\n\t},\n\t{\n\t\tminVersionForCollab: FluidClientVersion.v2_73,\n\t\tformatVersion: FieldBatchFormatVersion.v2,\n\t\tcodec: makeFieldBatchCodecForVersion(\n\t\t\tFieldBatchFormatVersion.v2,\n\t\t\tuncompressedEncodeV2,\n\t\t\tschemaCompressedEncodeV2,\n\t\t\tEncodedFieldBatchV2,\n\t\t),\n\t},\n]);\n"]}
1
+ {"version":3,"file":"codecs.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/codecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA8E;AAE9E,qEAAmF;AAGnF,sDAKiC;AASjC,qDAMgC;AAChC,2EAAwE;AAExE,yDAA4C;AAE5C,gDAM2B;AAE3B,iEAA4F;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AE,OAAO,CAAC,kBAAkB,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CACxF,KAAK,CAAC,MAAM,EAAE,CACd,CAAC;QACH,CAAC;QACD,MAAM,EAAE,qBAAqB;KAC7B,CAAC;AACH,CAAC;AAED;;GAEG;AACU,QAAA,sBAAsB,GAAG,yCAA8B,CAAC,KAAK,CAAC,YAAY,EAAE;IACxF;QACC,mBAAmB,EAAE,oCAAyB;QAC9C,aAAa,EAAE,kCAAuB,CAAC,EAAE;QACzC,KAAK,EAAE,6BAA6B,CACnC,kCAAuB,CAAC,EAAE,EAC1B,4CAAoB,EACpB,+CAAwB,EACxB,8BAAmB,CACnB;KACD;IACD;QACC,mBAAmB,EAAE,6BAAkB,CAAC,KAAK;QAC7C,aAAa,EAAE,kCAAuB,CAAC,EAAE;QACzC,KAAK,EAAE,6BAA6B,CACnC,kCAAuB,CAAC,EAAE,EAC1B,4CAAoB,EACpB,+CAAwB,EACxB,8BAAmB,CACnB;KACD;CACD,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport type { IIdCompressor } from \"@fluidframework/id-compressor\";\nimport { lowestMinVersionForCollab } from \"@fluidframework/runtime-utils/internal\";\nimport type { TSchema } from \"@sinclair/typebox\";\n\nimport {\n\tVersionDispatchingCodecBuilder,\n\ttype CodecAndSchema,\n\ttype VersionDispatchingCodec,\n\tFluidClientVersion,\n} from \"../../../codec/index.js\";\nimport {\n\tCursorLocationType,\n\ttype ITreeCursorSynchronous,\n\ttype SchemaAndPolicy,\n\ttype SchemaPolicy,\n\ttype StoredSchemaCollection,\n\ttype TreeChunk,\n} from \"../../../core/index.js\";\nimport {\n\tbrandedNumberType,\n\tIdDecodingContext,\n\ttype Brand,\n\ttype IdDecoderOptionsOriginatorless,\n\ttype IdDecoderOptionsWithOriginator,\n} from \"../../../util/index.js\";\nimport { TreeCompressionStrategy } from \"../../treeCompressionUtils.js\";\n\nimport { decode } from \"./chunkDecoding.js\";\nimport type { FieldBatch } from \"./fieldBatch.js\";\nimport {\n\tEncodedFieldBatchV1,\n\tEncodedFieldBatchV2,\n\tFieldBatchFormatVersion,\n\tsupportsIncrementalEncoding,\n\ttype EncodedFieldBatchV1OrV2,\n} from \"./format/index.js\";\nimport type { IncrementalEncodingPolicy } from \"./incrementalEncodingPolicy.js\";\nimport { schemaCompressedEncodeV1, schemaCompressedEncodeV2 } from \"./schemaBasedEncode.js\";\nimport { uncompressedEncodeV1, uncompressedEncodeV2 } from \"./uncompressedEncode.js\";\n\n/**\n * Reference ID for a chunk that is incrementally encoded.\n */\nexport type ChunkReferenceId = Brand<number, \"forest.ChunkReferenceId\">;\nconst ChunkReferenceId = brandedNumberType<ChunkReferenceId>({ multipleOf: 1, minimum: 0 });\n\n/**\n * Properties for incremental encoding.\n * Fields that support incremental encoding will encode their chunks separately by calling `encodeIncrementalField`.\n * @remarks\n * This supports features like incremental summarization where the summary from these fields can be re-used if\n * unchanged between summaries.\n * Note that each of these chunks that are incrementally encoded is fully self-describing (contain its own shapes\n * list and identifier table) and does not rely on context from its parent.\n */\nexport interface IncrementalEncoder {\n\t/**\n\t * Returns whether a node / field should be incrementally encoded.\n\t * @remarks See {@link IncrementalEncodingPolicy}.\n\t */\n\tshouldEncodeIncrementally: IncrementalEncodingPolicy;\n\t/**\n\t * Called to encode an incremental field at the cursor.\n\t * The chunks for this field are encoded separately from the main buffer.\n\t * @param cursor - The cursor pointing to the field to encode.\n\t * @param chunkEncoder - A function that encodes the contents of the passed chunk in the field.\n\t * @returns The reference IDs of the encoded chunks in the field.\n\t * This is used to retrieve the encoded chunks later.\n\t */\n\tencodeIncrementalField(\n\t\tcursor: ITreeCursorSynchronous,\n\t\tchunkEncoder: (chunk: TreeChunk) => EncodedFieldBatchV2,\n\t): ChunkReferenceId[];\n}\n\n/**\n * Properties for incremental decoding.\n *\n * Fields that had their chunks incrementally encoded will retrieve them by calling `getEncodedIncrementalChunk`.\n * @remarks\n * See {@link IncrementalEncoder} for more details.\n */\nexport interface IncrementalDecoder {\n\t/**\n\t * Called to decode an incremental chunk with the given reference ID.\n\t * @param referenceId - The reference ID of the chunk to decode.\n\t * @param chunkDecoder - A function that decodes the chunk.\n\t * @returns The decoded chunk.\n\t */\n\tdecodeIncrementalChunk(\n\t\treferenceId: ChunkReferenceId,\n\t\tchunkDecoder: (encoded: EncodedFieldBatchV2) => TreeChunk,\n\t): TreeChunk;\n}\n/**\n * Combines the properties of {@link IncrementalEncoder} and {@link IncrementalDecoder}.\n */\nexport interface IncrementalEncoderDecoder extends IncrementalEncoder, IncrementalDecoder {}\n\n/**\n * Encode-side context for {@link FieldBatchCodec}.\n *\n * Carries only the data the encoder actually consumes. Originator-session\n * lookup, heal flags, and the incremental *decoder* live on\n * {@link FieldBatchDecodingContext}.\n */\nexport interface FieldBatchEncodingContext {\n\treadonly encodeType: TreeCompressionStrategy;\n\treadonly idCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n\t/**\n\t * Encoder for incremental fields. Defined when incremental encoding is\n\t * supported and enabled.\n\t */\n\treadonly incrementalEncoder?: IncrementalEncoder;\n\t/**\n\t * `true` when encoding to a summary blob. `false` for op-stream encode\n\t * paths and for utility encoders that aren't tied to a persisted document.\n\t *\n\t * @remarks\n\t * Used by the node encoder to decide whether non-finalized op-space ids\n\t * can be written into the batch (they can't, for summaries).\n\t */\n\treadonly isSummary: boolean;\n}\n\n/**\n * Decode-side context for {@link FieldBatchCodec}.\n *\n * Composes an {@link IdDecodingContext} (which carries the per-call `resolveEncodedId`\n * function encapsulating the originator-session lookup and, for the forest-summarizer's\n * legacy heal path, the deterministic UUIDv5 synthesis) together with the optional\n * incremental decoder for this batch.\n *\n * Constructed via one of the two named static factories — {@link forOp} or\n * {@link forSummary} — depending on the call site's semantics. The constructor\n * is private; there is no general-purpose builder, because the choice between\n * op-style and summary-style decoding is load-bearing (different invariants\n * apply, and bugs in this area are typically the result of conflating them).\n */\nexport class FieldBatchDecodingContext {\n\tprivate constructor(\n\t\t/**\n\t\t * Resolves the encoded identifiers contained in this batch.\n\t\t */\n\t\tpublic readonly idDecodingContext: IdDecodingContext,\n\t\t/**\n\t\t * Decoder for incremental fields. Defined when the encoded batch contains\n\t\t * incremental chunks. Only populated on summary-style contexts; op-style\n\t\t * contexts always have this undefined.\n\t\t */\n\t\tpublic readonly incrementalDecoder?: IncrementalDecoder,\n\t) {}\n\n\t/**\n\t * Construct a decode context for an op.\n\t *\n\t * The originator is the session that produced the encoded form (carried\n\t * alongside the op envelope by the caller). Heal-on-decode is *not*\n\t * available — an unresolvable id during op decode indicates a real bug,\n\t * not a recoverable state, so the resolver throws rather than synthesizing\n\t * a UUID. Incremental decoding is not used for ops.\n\t */\n\tpublic static forOp(options: IdDecoderOptionsWithOriginator): FieldBatchDecodingContext {\n\t\treturn new FieldBatchDecodingContext(new IdDecodingContext(options));\n\t}\n\n\t/**\n\t * Construct a decode context for a summary blob.\n\t *\n\t * Summaries must contain only ids resolvable without an originator — either\n\t * finalized op-space ids, or (when {@link IdentifierHealingConfig} is supplied\n\t * via `healing`) non-final ids that get healed into deterministic UUIDv5\n\t * strings. Incremental decoding is attached via {@link withIncrementalDecoder}.\n\t *\n\t * @privateRemarks\n\t * In the future (if adding a summary format which includes the session id),\n\t * this could allow providing an originator ID to allow for op-space compressed identifiers in attach summaries.\n\t * Non-attach summaries should only have finalized compressed identifiers (due to only being made by summary clients which never allocate identifiers since they never edit).\n\t * Since only non-attach summaries can be incremental, incremental summaries should never have non finalized identifiers.\n\t * `withIncrementalDecoder` has logic to guard against cases which expect session-relative identifiers in incremental chunks,\n\t * as does the encoding-side assert in the {@link EncoderContext}.\n\t */\n\tpublic static forSummary(\n\t\toptions: IdDecoderOptionsOriginatorless | IdDecoderOptionsWithOriginator,\n\t): FieldBatchDecodingContext {\n\t\treturn new FieldBatchDecodingContext(new IdDecodingContext(options));\n\t}\n\n\t/**\n\t * Returns a copy of this context with `incrementalDecoder` swapped in. Used by\n\t * the forest summarizer to attach the per-call incremental builder to a base\n\t * decode context.\n\t */\n\tpublic withIncrementalDecoder(\n\t\tincrementalDecoder: IncrementalDecoder,\n\t): FieldBatchDecodingContext {\n\t\t// As different incremental chunks may come from different sessions,\n\t\t// for now we simply enforce that we do not provide an originator session ID\n\t\t// when we might be dealing with incremental chunks.\n\t\t// This mitigates the risk of using incorrect originator session ID identifiers in incremental chunks.\n\t\t// See also private remarks on forSummary.\n\t\tassert(\n\t\t\t!this.idDecodingContext.hasOriginatorSessionId,\n\t\t\t0xd0c /* withIncrementalDecoder can only be called on contexts without an originator session ID */,\n\t\t);\n\t\treturn new FieldBatchDecodingContext(this.idDecodingContext, incrementalDecoder);\n\t}\n}\n\n/**\n * @remarks\n * Fields in this batch currently don't have field schema for the root, which limits optimizations.\n */\nexport type FieldBatchCodec = VersionDispatchingCodec<\n\tFieldBatch,\n\tFieldBatchEncodingContext,\n\tFieldBatchFormatVersion,\n\tFieldBatchDecodingContext\n>;\n\n/**\n * Creates the encode/decode functions for a specific FieldBatch format version.\n */\nfunction makeFieldBatchCodecForVersion(\n\tversion: FieldBatchFormatVersion,\n\tuncompressedEncodeFn: (batch: FieldBatch) => EncodedFieldBatchV1OrV2,\n\tschemaCompressedEncodeFn: (\n\t\tschema: StoredSchemaCollection,\n\t\tpolicy: SchemaPolicy,\n\t\tfieldBatch: FieldBatch,\n\t\tidCompressor: IIdCompressor,\n\t\tincrementalEncoder: IncrementalEncoder | undefined,\n\t\tisSummary: boolean,\n\t) => EncodedFieldBatchV1OrV2,\n\tencodedFieldBatchType: TSchema,\n): CodecAndSchema<FieldBatch, FieldBatchEncodingContext, FieldBatchDecodingContext> {\n\treturn {\n\t\tencode: (\n\t\t\tdata: FieldBatch,\n\t\t\tcontext: FieldBatchEncodingContext,\n\t\t): EncodedFieldBatchV1OrV2 => {\n\t\t\tfor (const cursor of data) {\n\t\t\t\tassert(\n\t\t\t\t\tcursor.mode === CursorLocationType.Fields,\n\t\t\t\t\t0x8a3 /* FieldBatch expects fields cursors */,\n\t\t\t\t);\n\t\t\t}\n\t\t\tlet encoded: EncodedFieldBatchV1OrV2;\n\t\t\tlet incrementalEncoder: IncrementalEncoder | undefined;\n\t\t\tswitch (context.encodeType) {\n\t\t\t\tcase TreeCompressionStrategy.Uncompressed: {\n\t\t\t\t\tencoded = uncompressedEncodeFn(data);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase TreeCompressionStrategy.CompressedIncremental: {\n\t\t\t\t\tassert(\n\t\t\t\t\t\tsupportsIncrementalEncoding(version),\n\t\t\t\t\t\t0xca0 /* Unsupported FieldBatchFormatVersion for incremental encoding; must be v2 or higher */,\n\t\t\t\t\t);\n\t\t\t\t\t// Incremental encoding is only supported for CompressedIncremental.\n\t\t\t\t\tincrementalEncoder = context.incrementalEncoder;\n\t\t\t\t}\n\t\t\t\t// fallthrough\n\t\t\t\tcase TreeCompressionStrategy.Compressed: {\n\t\t\t\t\t// eslint-disable-next-line unicorn/prefer-ternary\n\t\t\t\t\tif (context.schema === undefined) {\n\t\t\t\t\t\t// TODO: consider enabling a somewhat compressed but not schema accelerated encode.\n\t\t\t\t\t\tencoded = uncompressedEncodeFn(data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tencoded = schemaCompressedEncodeFn(\n\t\t\t\t\t\t\tcontext.schema.schema,\n\t\t\t\t\t\t\tcontext.schema.policy,\n\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\tcontext.idCompressor,\n\t\t\t\t\t\t\tincrementalEncoder,\n\t\t\t\t\t\t\tcontext.isSummary,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tunreachableCase(context.encodeType);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// TODO: consider checking input data was in schema.\n\t\t\treturn encoded;\n\t\t},\n\t\tdecode: (\n\t\t\tdata: EncodedFieldBatchV1OrV2,\n\t\t\tcontext: FieldBatchDecodingContext,\n\t\t): FieldBatch => {\n\t\t\t// TODO: consider checking data is in schema.\n\t\t\treturn decode(data, context.idDecodingContext, context.incrementalDecoder).map((chunk) =>\n\t\t\t\tchunk.cursor(),\n\t\t\t);\n\t\t},\n\t\tschema: encodedFieldBatchType,\n\t};\n}\n\n/**\n * {@link VersionDispatchingCodecBuilder} for field batch codecs.\n */\nexport const fieldBatchCodecBuilder = VersionDispatchingCodecBuilder.build(\"FieldBatch\", [\n\t{\n\t\tminVersionForCollab: lowestMinVersionForCollab,\n\t\tformatVersion: FieldBatchFormatVersion.v1,\n\t\tcodec: makeFieldBatchCodecForVersion(\n\t\t\tFieldBatchFormatVersion.v1,\n\t\t\tuncompressedEncodeV1,\n\t\t\tschemaCompressedEncodeV1,\n\t\t\tEncodedFieldBatchV1,\n\t\t),\n\t},\n\t{\n\t\tminVersionForCollab: FluidClientVersion.v2_73,\n\t\tformatVersion: FieldBatchFormatVersion.v2,\n\t\tcodec: makeFieldBatchCodecForVersion(\n\t\t\tFieldBatchFormatVersion.v2,\n\t\t\tuncompressedEncodeV2,\n\t\t\tschemaCompressedEncodeV2,\n\t\t\tEncodedFieldBatchV2,\n\t\t),\n\t},\n]);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"uniformChunk.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/chunked-forest/uniformChunk.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAA4B,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE7F,OAAO,EACN,kBAAkB,EAClB,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,SAAS,EACd,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,WAAW,EAEX,MAAM,qBAAqB,CAAC;AA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IAanB,QAAQ,IAAI,IAAI;IAehB,UAAU,IAAI,OAAO;IAYrB,UAAU,CAAC,GAAG,EAAE,QAAQ,GAAG,IAAI;IAWtC,IAAW,IAAI,IAAI,wBAAwB,CAE1C;IAED,IAAW,KAAK,IAAI,KAAK,CAgBxB;CACD"}
@@ -122,12 +122,20 @@ class TreeShape {
122
122
  this.fieldsOffsetArray = [...fields.values()];
123
123
  }
124
124
  equals(other) {
125
+ // Shapes are commonly shared (e.g. all chunks from one chunker reference the same instance), so
126
+ // short-circuit on reference identity to avoid the full structural walk in the common case.
127
+ if (this === other) {
128
+ return true;
129
+ }
130
+ // A given type usually only has one shape, so check it next to speed up the false case.
131
+ if (this.type !== other.type) {
132
+ return false;
133
+ }
125
134
  // TODO: either dedupe instances and/or store a collision resistant hash for fast compare.
126
135
  if (!(0, internal_1.compareArrays)(this.fieldsArray, other.fieldsArray, ([k, f, l], [k2, f2, l2]) => k === k2 && l === l2 && f.equals(f2))) {
127
136
  return false;
128
137
  }
129
- return (this.type === other.type &&
130
- this.hasValue === other.hasValue &&
138
+ return (this.hasValue === other.hasValue &&
131
139
  this.mayContainCompressedIds === other.mayContainCompressedIds);
132
140
  }
133
141
  withTopLevelLength(topLevelLength) {