@fluidframework/tree 2.110.0 → 2.111.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 (374) hide show
  1. package/.vscode/settings.json +1 -0
  2. package/CHANGELOG.md +48 -0
  3. package/api-report/tree.alpha.api.md +48 -31
  4. package/api-report/tree.beta.api.md +38 -0
  5. package/api-report/tree.legacy.beta.api.md +38 -0
  6. package/dist/core/change-family/changeFamily.d.ts +3 -10
  7. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  8. package/dist/core/change-family/changeFamily.js.map +1 -1
  9. package/dist/core/rebase/types.d.ts +2 -2
  10. package/dist/core/rebase/types.js.map +1 -1
  11. package/dist/core/schema-stored/storedSchemaRepository.d.ts +2 -2
  12. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  13. package/dist/entrypoints/alpha.d.ts +1 -1
  14. package/dist/entrypoints/alpha.d.ts.map +1 -1
  15. package/dist/entrypoints/alpha.js.map +1 -1
  16. package/dist/entrypoints/beta.d.ts +1 -1
  17. package/dist/entrypoints/beta.d.ts.map +1 -1
  18. package/dist/entrypoints/beta.js.map +1 -1
  19. package/dist/entrypoints/legacy.d.ts +1 -1
  20. package/dist/entrypoints/legacy.d.ts.map +1 -1
  21. package/dist/entrypoints/legacy.js.map +1 -1
  22. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +19 -14
  23. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  24. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +13 -32
  25. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  26. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +85 -28
  27. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  28. package/dist/feature-libraries/chunked-forest/codec/codecs.js +83 -9
  29. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  30. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +4 -2
  31. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  32. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +11 -0
  33. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  34. package/dist/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  35. package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  36. package/dist/feature-libraries/chunked-forest/codec/index.js +2 -1
  37. package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  38. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +1 -1
  39. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  40. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js +3 -15
  41. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  42. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
  43. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  44. package/dist/feature-libraries/chunked-forest/index.js +2 -1
  45. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  46. package/dist/feature-libraries/forest-summary/codec.d.ts +3 -3
  47. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  48. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  49. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -2
  50. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  51. package/dist/feature-libraries/forest-summary/forestSummarizer.js +4 -6
  52. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  53. package/dist/feature-libraries/index.d.ts +1 -1
  54. package/dist/feature-libraries/index.d.ts.map +1 -1
  55. package/dist/feature-libraries/index.js +2 -1
  56. package/dist/feature-libraries/index.js.map +1 -1
  57. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  58. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +9 -9
  59. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  60. package/dist/index.d.ts +2 -2
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +2 -1
  63. package/dist/index.js.map +1 -1
  64. package/dist/packageVersion.d.ts +1 -1
  65. package/dist/packageVersion.js +1 -1
  66. package/dist/packageVersion.js.map +1 -1
  67. package/dist/shared-tree/independentView.d.ts.map +1 -1
  68. package/dist/shared-tree/independentView.js +4 -7
  69. package/dist/shared-tree/independentView.js.map +1 -1
  70. package/dist/shared-tree/index.d.ts +1 -1
  71. package/dist/shared-tree/index.d.ts.map +1 -1
  72. package/dist/shared-tree/index.js.map +1 -1
  73. package/dist/shared-tree/schematizingTreeView.d.ts +5 -5
  74. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  75. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  76. package/dist/shared-tree/sharedTree.d.ts +5 -0
  77. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  78. package/dist/shared-tree/sharedTree.js +7 -4
  79. package/dist/shared-tree/sharedTree.js.map +1 -1
  80. package/dist/shared-tree/transactionPostProcessor.d.ts +28 -0
  81. package/dist/shared-tree/transactionPostProcessor.d.ts.map +1 -0
  82. package/dist/shared-tree/transactionPostProcessor.js +28 -0
  83. package/dist/shared-tree/transactionPostProcessor.js.map +1 -0
  84. package/dist/shared-tree/treeAlpha.js +3 -3
  85. package/dist/shared-tree/treeAlpha.js.map +1 -1
  86. package/dist/shared-tree/treeCheckout.d.ts +16 -12
  87. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  88. package/dist/shared-tree/treeCheckout.js +18 -9
  89. package/dist/shared-tree/treeCheckout.js.map +1 -1
  90. package/dist/shared-tree/unhydratedTreeContext.d.ts +5 -5
  91. package/dist/shared-tree/unhydratedTreeContext.d.ts.map +1 -1
  92. package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
  93. package/dist/shared-tree-core/editManagerCodecs.d.ts +3 -2
  94. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  95. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  96. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +3 -9
  97. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  98. package/dist/shared-tree-core/editManagerCodecsCommons.js +2 -4
  99. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  100. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts +3 -3
  101. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  102. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  103. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +3 -3
  104. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  105. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  106. package/dist/shared-tree-core/editManagerSummarizer.d.ts +5 -9
  107. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  108. package/dist/shared-tree-core/editManagerSummarizer.js +5 -10
  109. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  110. package/dist/shared-tree-core/index.d.ts +1 -1
  111. package/dist/shared-tree-core/index.d.ts.map +1 -1
  112. package/dist/shared-tree-core/index.js +3 -2
  113. package/dist/shared-tree-core/index.js.map +1 -1
  114. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  115. package/dist/shared-tree-core/sharedTreeCore.js +3 -1
  116. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  117. package/dist/shared-tree-core/transaction.d.ts +84 -9
  118. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  119. package/dist/shared-tree-core/transaction.js +74 -7
  120. package/dist/shared-tree-core/transaction.js.map +1 -1
  121. package/dist/simple-tree/api/index.d.ts +1 -1
  122. package/dist/simple-tree/api/index.d.ts.map +1 -1
  123. package/dist/simple-tree/api/index.js.map +1 -1
  124. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +3 -3
  125. package/dist/simple-tree/api/schemaCreationUtilities.js +3 -3
  126. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  127. package/dist/simple-tree/api/schemaFactory.d.ts +1 -1
  128. package/dist/simple-tree/api/schemaFactory.js +2 -2
  129. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  130. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +2 -2
  131. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +2 -2
  132. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  133. package/dist/simple-tree/api/transactionTypes.d.ts +91 -28
  134. package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
  135. package/dist/simple-tree/api/transactionTypes.js.map +1 -1
  136. package/dist/simple-tree/api/tree.d.ts +86 -22
  137. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  138. package/dist/simple-tree/api/tree.js.map +1 -1
  139. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  140. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  141. package/dist/simple-tree/core/treeNodeSchema.d.ts +7 -7
  142. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  143. package/dist/simple-tree/index.d.ts +1 -1
  144. package/dist/simple-tree/index.d.ts.map +1 -1
  145. package/dist/simple-tree/index.js.map +1 -1
  146. package/dist/text/index.d.ts +1 -0
  147. package/dist/text/index.d.ts.map +1 -1
  148. package/dist/text/index.js +3 -1
  149. package/dist/text/index.js.map +1 -1
  150. package/dist/text/textDomainFormatted.d.ts +69 -758
  151. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  152. package/dist/text/textDomainFormatted.js +275 -322
  153. package/dist/text/textDomainFormatted.js.map +1 -1
  154. package/dist/text/textDomainFormattedDefault.d.ts +273 -0
  155. package/dist/text/textDomainFormattedDefault.d.ts.map +1 -0
  156. package/dist/text/textDomainFormattedDefault.js +94 -0
  157. package/dist/text/textDomainFormattedDefault.js.map +1 -0
  158. package/dist/util/compressedIds.d.ts +118 -0
  159. package/dist/util/compressedIds.d.ts.map +1 -0
  160. package/dist/util/compressedIds.js +133 -0
  161. package/dist/util/compressedIds.js.map +1 -0
  162. package/dist/util/index.d.ts +1 -0
  163. package/dist/util/index.d.ts.map +1 -1
  164. package/dist/util/index.js +9 -1
  165. package/dist/util/index.js.map +1 -1
  166. package/lib/core/change-family/changeFamily.d.ts +3 -10
  167. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  168. package/lib/core/change-family/changeFamily.js.map +1 -1
  169. package/lib/core/rebase/types.d.ts +2 -2
  170. package/lib/core/rebase/types.js.map +1 -1
  171. package/lib/core/schema-stored/storedSchemaRepository.d.ts +2 -2
  172. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  173. package/lib/entrypoints/alpha.d.ts +1 -1
  174. package/lib/entrypoints/alpha.d.ts.map +1 -1
  175. package/lib/entrypoints/alpha.js.map +1 -1
  176. package/lib/entrypoints/beta.d.ts +1 -1
  177. package/lib/entrypoints/beta.d.ts.map +1 -1
  178. package/lib/entrypoints/beta.js.map +1 -1
  179. package/lib/entrypoints/legacy.d.ts +1 -1
  180. package/lib/entrypoints/legacy.d.ts.map +1 -1
  181. package/lib/entrypoints/legacy.js.map +1 -1
  182. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +19 -14
  183. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  184. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +14 -33
  185. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  186. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +85 -28
  187. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  188. package/lib/feature-libraries/chunked-forest/codec/codecs.js +82 -9
  189. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  190. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +4 -2
  191. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  192. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +12 -1
  193. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  194. package/lib/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  195. package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  196. package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
  197. package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  198. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts +1 -1
  199. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.d.ts.map +1 -1
  200. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js +3 -15
  201. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  202. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
  203. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  204. package/lib/feature-libraries/chunked-forest/index.js +1 -1
  205. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  206. package/lib/feature-libraries/forest-summary/codec.d.ts +3 -3
  207. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  208. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  209. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -2
  210. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  211. package/lib/feature-libraries/forest-summary/forestSummarizer.js +4 -6
  212. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  213. package/lib/feature-libraries/index.d.ts +1 -1
  214. package/lib/feature-libraries/index.d.ts.map +1 -1
  215. package/lib/feature-libraries/index.js +1 -1
  216. package/lib/feature-libraries/index.js.map +1 -1
  217. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  218. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +10 -10
  219. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  220. package/lib/index.d.ts +2 -2
  221. package/lib/index.d.ts.map +1 -1
  222. package/lib/index.js +1 -1
  223. package/lib/index.js.map +1 -1
  224. package/lib/packageVersion.d.ts +1 -1
  225. package/lib/packageVersion.js +1 -1
  226. package/lib/packageVersion.js.map +1 -1
  227. package/lib/shared-tree/independentView.d.ts.map +1 -1
  228. package/lib/shared-tree/independentView.js +5 -8
  229. package/lib/shared-tree/independentView.js.map +1 -1
  230. package/lib/shared-tree/index.d.ts +1 -1
  231. package/lib/shared-tree/index.d.ts.map +1 -1
  232. package/lib/shared-tree/index.js.map +1 -1
  233. package/lib/shared-tree/schematizingTreeView.d.ts +5 -5
  234. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  235. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  236. package/lib/shared-tree/sharedTree.d.ts +5 -0
  237. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  238. package/lib/shared-tree/sharedTree.js +8 -5
  239. package/lib/shared-tree/sharedTree.js.map +1 -1
  240. package/lib/shared-tree/transactionPostProcessor.d.ts +28 -0
  241. package/lib/shared-tree/transactionPostProcessor.d.ts.map +1 -0
  242. package/lib/shared-tree/transactionPostProcessor.js +23 -0
  243. package/lib/shared-tree/transactionPostProcessor.js.map +1 -0
  244. package/lib/shared-tree/treeAlpha.js +3 -3
  245. package/lib/shared-tree/treeAlpha.js.map +1 -1
  246. package/lib/shared-tree/treeCheckout.d.ts +16 -12
  247. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  248. package/lib/shared-tree/treeCheckout.js +18 -9
  249. package/lib/shared-tree/treeCheckout.js.map +1 -1
  250. package/lib/shared-tree/unhydratedTreeContext.d.ts +5 -5
  251. package/lib/shared-tree/unhydratedTreeContext.d.ts.map +1 -1
  252. package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
  253. package/lib/shared-tree-core/editManagerCodecs.d.ts +3 -2
  254. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  255. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  256. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +3 -9
  257. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  258. package/lib/shared-tree-core/editManagerCodecsCommons.js +3 -5
  259. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  260. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts +3 -3
  261. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  262. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  263. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts +3 -3
  264. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  265. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  266. package/lib/shared-tree-core/editManagerSummarizer.d.ts +5 -9
  267. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  268. package/lib/shared-tree-core/editManagerSummarizer.js +5 -10
  269. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  270. package/lib/shared-tree-core/index.d.ts +1 -1
  271. package/lib/shared-tree-core/index.d.ts.map +1 -1
  272. package/lib/shared-tree-core/index.js +1 -1
  273. package/lib/shared-tree-core/index.js.map +1 -1
  274. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  275. package/lib/shared-tree-core/sharedTreeCore.js +3 -1
  276. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  277. package/lib/shared-tree-core/transaction.d.ts +84 -9
  278. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  279. package/lib/shared-tree-core/transaction.js +73 -6
  280. package/lib/shared-tree-core/transaction.js.map +1 -1
  281. package/lib/simple-tree/api/index.d.ts +1 -1
  282. package/lib/simple-tree/api/index.d.ts.map +1 -1
  283. package/lib/simple-tree/api/index.js.map +1 -1
  284. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +3 -3
  285. package/lib/simple-tree/api/schemaCreationUtilities.js +3 -3
  286. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  287. package/lib/simple-tree/api/schemaFactory.d.ts +1 -1
  288. package/lib/simple-tree/api/schemaFactory.js +2 -2
  289. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  290. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +2 -2
  291. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +2 -2
  292. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  293. package/lib/simple-tree/api/transactionTypes.d.ts +91 -28
  294. package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
  295. package/lib/simple-tree/api/transactionTypes.js.map +1 -1
  296. package/lib/simple-tree/api/tree.d.ts +86 -22
  297. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  298. package/lib/simple-tree/api/tree.js.map +1 -1
  299. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  300. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  301. package/lib/simple-tree/core/treeNodeSchema.d.ts +7 -7
  302. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  303. package/lib/simple-tree/index.d.ts +1 -1
  304. package/lib/simple-tree/index.d.ts.map +1 -1
  305. package/lib/simple-tree/index.js.map +1 -1
  306. package/lib/text/index.d.ts +1 -0
  307. package/lib/text/index.d.ts.map +1 -1
  308. package/lib/text/index.js +1 -0
  309. package/lib/text/index.js.map +1 -1
  310. package/lib/text/textDomainFormatted.d.ts +69 -758
  311. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  312. package/lib/text/textDomainFormatted.js +277 -324
  313. package/lib/text/textDomainFormatted.js.map +1 -1
  314. package/lib/text/textDomainFormattedDefault.d.ts +273 -0
  315. package/lib/text/textDomainFormattedDefault.d.ts.map +1 -0
  316. package/lib/text/textDomainFormattedDefault.js +91 -0
  317. package/lib/text/textDomainFormattedDefault.js.map +1 -0
  318. package/lib/util/compressedIds.d.ts +118 -0
  319. package/lib/util/compressedIds.d.ts.map +1 -0
  320. package/lib/util/compressedIds.js +124 -0
  321. package/lib/util/compressedIds.js.map +1 -0
  322. package/lib/util/index.d.ts +1 -0
  323. package/lib/util/index.d.ts.map +1 -1
  324. package/lib/util/index.js +1 -0
  325. package/lib/util/index.js.map +1 -1
  326. package/package.json +23 -23
  327. package/src/core/change-family/changeFamily.ts +3 -12
  328. package/src/core/rebase/types.ts +2 -2
  329. package/src/core/schema-stored/storedSchemaRepository.ts +2 -2
  330. package/src/entrypoints/alpha.ts +12 -8
  331. package/src/entrypoints/beta.ts +8 -0
  332. package/src/entrypoints/legacy.ts +8 -0
  333. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +35 -64
  334. package/src/feature-libraries/chunked-forest/codec/codecs.ts +138 -42
  335. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +32 -4
  336. package/src/feature-libraries/chunked-forest/codec/index.ts +1 -0
  337. package/src/feature-libraries/chunked-forest/codec/nodeEncoder.ts +7 -19
  338. package/src/feature-libraries/chunked-forest/index.ts +3 -0
  339. package/src/feature-libraries/forest-summary/codec.ts +5 -3
  340. package/src/feature-libraries/forest-summary/forestSummarizer.ts +4 -5
  341. package/src/feature-libraries/index.ts +3 -0
  342. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +13 -9
  343. package/src/index.ts +13 -8
  344. package/src/packageVersion.ts +1 -1
  345. package/src/shared-tree/independentView.ts +5 -10
  346. package/src/shared-tree/index.ts +1 -0
  347. package/src/shared-tree/schematizingTreeView.ts +25 -25
  348. package/src/shared-tree/sharedTree.ts +16 -4
  349. package/src/shared-tree/transactionPostProcessor.ts +40 -0
  350. package/src/shared-tree/treeAlpha.ts +3 -3
  351. package/src/shared-tree/treeCheckout.ts +61 -44
  352. package/src/shared-tree/unhydratedTreeContext.ts +18 -15
  353. package/src/shared-tree-core/editManagerCodecs.ts +3 -2
  354. package/src/shared-tree-core/editManagerCodecsCommons.ts +10 -14
  355. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +3 -2
  356. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +3 -2
  357. package/src/shared-tree-core/editManagerSummarizer.ts +5 -9
  358. package/src/shared-tree-core/index.ts +8 -5
  359. package/src/shared-tree-core/sharedTreeCore.ts +3 -2
  360. package/src/shared-tree-core/transaction.ts +148 -18
  361. package/src/simple-tree/api/index.ts +13 -9
  362. package/src/simple-tree/api/schemaCreationUtilities.ts +3 -3
  363. package/src/simple-tree/api/schemaFactory.ts +2 -2
  364. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +2 -2
  365. package/src/simple-tree/api/transactionTypes.ts +111 -39
  366. package/src/simple-tree/api/tree.ts +141 -47
  367. package/src/simple-tree/api/treeBeta.ts +2 -0
  368. package/src/simple-tree/core/treeNodeSchema.ts +7 -7
  369. package/src/simple-tree/index.ts +12 -8
  370. package/src/text/index.ts +1 -0
  371. package/src/text/textDomainFormatted.ts +520 -415
  372. package/src/text/textDomainFormattedDefault.ts +150 -0
  373. package/src/util/compressedIds.ts +216 -0
  374. package/src/util/index.ts +15 -0
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import type { ErasedType } from "@fluidframework/core-interfaces";
5
6
  import type { TreeNode } from "../core/index.js";
6
7
  /**
7
8
  * A special object that signifies when a SharedTree {@link RunTransaction | transaction} should "roll back".
@@ -43,23 +44,37 @@ export interface NoChangeConstraint {
43
44
  }
44
45
  /**
45
46
  * Contains a value returned from a transaction.
46
- * @alpha
47
+ * @input
48
+ * @beta
47
49
  */
48
50
  export interface WithValue<TValue> {
49
51
  /** The user-supplied value. */
50
- value: TValue;
52
+ readonly value: TValue;
51
53
  }
52
54
  /**
53
- * Contains a value and status returned from a user-supplied {@link TreeBranchAlpha.(runTransaction:1) | transaction callback}.
54
- * @alpha
55
+ * Contains a value and status returned from a user-supplied {@link TreeViewBeta.runTransaction | transaction callback}.
56
+ * @input
57
+ * @beta
55
58
  */
56
- export type TransactionCallbackStatus<TSuccessValue, TFailureValue> = ((WithValue<TSuccessValue> & {
59
+ export type TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> = (WithValue<TSuccessValue> & {
57
60
  /** Indicates that the transaction callback ran successfully. */
58
- rollback?: false;
61
+ readonly rollback?: false;
59
62
  }) | (WithValue<TFailureValue> & {
60
63
  /** Indicates that the transaction callback failed and the transaction should be rolled back. */
61
- rollback: true;
62
- })) & {
64
+ readonly rollback: true;
65
+ });
66
+ /**
67
+ * The result of a {@link TreeViewBeta.runTransaction | transaction} that doesn't return a value.
68
+ * @input
69
+ * @beta
70
+ */
71
+ export type VoidTransactionCallbackStatusBeta = Omit<TransactionCallbackStatusBeta<unknown, unknown>, "value">;
72
+ /**
73
+ * {@link TransactionCallbackStatusBeta} extended with alpha-only {@link TransactionConstraintAlpha | constraint} options.
74
+ * @input
75
+ * @alpha
76
+ */
77
+ export type TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue> = TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> & {
63
78
  /**
64
79
  * An optional list of {@link TransactionConstraintAlpha | constraints} that will be checked when the commit corresponding
65
80
  * to this transaction is reverted. If any of these constraints are not met when the revert is being applied either
@@ -67,46 +82,86 @@ export type TransactionCallbackStatus<TSuccessValue, TFailureValue> = ((WithValu
67
82
  * These constraints must also be met at the time they are first introduced. If they are not met after the transaction
68
83
  * callback returns, then `runTransaction` (which invokes the transaction callback) will throw a `UsageError`.
69
84
  */
70
- preconditionsOnRevert?: readonly TransactionConstraintAlpha[];
85
+ readonly preconditionsOnRevert?: readonly TransactionConstraintAlpha[];
71
86
  };
72
87
  /**
73
88
  * The result of a {@link TreeBranchAlpha.(runTransaction:2) | transaction} that doesn't return a value.
89
+ * @input
74
90
  * @alpha
75
91
  */
76
- export type VoidTransactionCallbackStatus = Omit<TransactionCallbackStatus<unknown, unknown>, "value">;
92
+ export type VoidTransactionCallbackStatusAlpha = Omit<TransactionCallbackStatusAlpha<unknown, unknown>, "value">;
77
93
  /**
78
- * The result of a {@link TreeBranchAlpha.(runTransaction:1) | transaction} that completed successfully.
79
- * @alpha
94
+ * The result of a {@link TreeViewBeta.(runTransaction:1) | transaction} that completed successfully.
95
+ * @sealed
96
+ * @beta
80
97
  */
81
98
  export interface TransactionResultSuccess<TSuccessValue> extends WithValue<TSuccessValue> {
82
- /** The success flag for a transaction that completed without being {@link TransactionCallbackStatus | rolled back}. */
83
- success: true;
99
+ /** The success flag for a transaction that completed without being {@link TransactionCallbackStatusBeta | rolled back}. */
100
+ readonly success: true;
84
101
  }
85
102
  /**
86
- * The result of a {@link TreeBranchAlpha.(runTransaction:1) | transaction} that was rolled back.
87
- * @alpha
103
+ * The result of a {@link TreeViewBeta.runTransaction | transaction} that was rolled back.
104
+ * @sealed
105
+ * @beta
88
106
  */
89
107
  export interface TransactionResultFailed<TFailureValue> extends WithValue<TFailureValue> {
90
- /** The failure flag for a transaction that was {@link TransactionCallbackStatus | rolled back}. */
91
- success: false;
108
+ /** The failure flag for a transaction that was {@link TransactionCallbackStatusBeta | rolled back}. */
109
+ readonly success: false;
92
110
  }
93
111
  /**
94
112
  * The result of the {@link RunTransaction | RunTransaction} API.
95
- * @alpha
113
+ * @sealed
114
+ * @beta
96
115
  */
97
- export type TransactionResultExt<TSuccessValue, TFailureValue> = TransactionResultSuccess<TSuccessValue> | TransactionResultFailed<TFailureValue>;
116
+ export type TransactionValueResult<TSuccessValue, TFailureValue> = TransactionResultSuccess<TSuccessValue> | TransactionResultFailed<TFailureValue>;
98
117
  /**
99
- * The result of the {@link RunTransaction | RunTransaction} API. This is the same as {@link TransactionResultExt}
118
+ * The result of the {@link RunTransaction | RunTransaction} API. This is the same as {@link TransactionValueResult}
100
119
  * but with the `value` field omitted. This is useful when the transaction callback doesn't need to return a value.
120
+ * @sealed
121
+ * @beta
122
+ */
123
+ export type TransactionVoidResult = Omit<TransactionResultSuccess<unknown>, "value"> | Omit<TransactionResultFailed<unknown>, "value">;
124
+ /**
125
+ * A type-erased function that post-processes the change produced when a transaction is committed.
126
+ *
127
+ * @remarks
128
+ * Supply one via {@link RunTransactionParamsAlpha.postProcessor} to process/alter
129
+ * the change that a transaction produces. For example a post-processor could
130
+ * remove extraneous information, so that the resulting squashed change contains
131
+ * no extraneous information.
132
+ *
133
+ * This type intentionally hides its internal representation: its concrete shape
134
+ * is an implementation detail of `@fluidframework/tree`. Obtain a value of this
135
+ * type from a `@fluidframework/tree` helper or constant rather than constructing
136
+ * one directly.
137
+ *
101
138
  * @alpha
139
+ * @sealed
140
+ * @system
102
141
  */
103
- export type TransactionResult = Omit<TransactionResultSuccess<unknown>, "value"> | Omit<TransactionResultFailed<unknown>, "value">;
142
+ export interface TransactionPostProcessor extends ErasedType<"@fluidframework/tree.TransactionPostProcessor"> {
143
+ }
104
144
  /**
105
145
  * The parameters for the {@link RunTransaction | RunTransaction} API.
106
- * @alpha
107
146
  * @input
147
+ * @beta
108
148
  */
109
- export interface RunTransactionParams {
149
+ export interface RunTransactionParamsBeta {
150
+ /**
151
+ * A label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).
152
+ * @remarks
153
+ * If this transaction is applied to a {@link TreeBranchAlpha | branch}, the label will be available in the {@link LocalChangeMetadata.label | metadata} of the {@link TreeBranchEvents.changed | `changed`} event.
154
+ *
155
+ * If there is a nested transaction, only the outermost transaction label will be used.
156
+ */
157
+ readonly label?: unknown;
158
+ }
159
+ /**
160
+ * The parameters for the {@link RunTransaction | RunTransaction} API, extended with alpha-only {@link TransactionConstraintAlpha | constraint} options.
161
+ * @input
162
+ * @alpha
163
+ */
164
+ export interface RunTransactionParamsAlpha extends RunTransactionParamsBeta {
110
165
  /**
111
166
  * An optional list of {@link TransactionConstraintAlpha | constraints} that are checked just before the transaction begins.
112
167
  * @remarks
@@ -115,12 +170,20 @@ export interface RunTransactionParams {
115
170
  */
116
171
  readonly preconditions?: readonly TransactionConstraintAlpha[];
117
172
  /**
118
- * A label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).
173
+ * An optional {@link TransactionPostProcessor | post-processor} applied to
174
+ * the change produced when this transaction is committed.
119
175
  * @remarks
120
- * If this transaction is applied to a {@link TreeBranchAlpha | branch}, the label will be available in the {@link LocalChangeMetadata.label | metadata} of the {@link TreeBranchEvents.changed | `changed`} event.
176
+ * When omitted, the transaction's edits are squashed without any such processing.
121
177
  *
122
- * If there is a nested transaction, only the outermost transaction label will be used.
178
+ * Specific post-processors are applied according to their own rules for
179
+ * optimization and other post-processing tasks in a transaction stack. For
180
+ * example a "minimization" post-processor may be applied once for the
181
+ * outermost transaction in a stack as it will process all nested edits and
182
+ * there is no benefit from multiple applications.
183
+ *
184
+ * Note: minimization is not yet implemented. Supplying a post-processor currently has no observable effect beyond
185
+ * reserving the behavior; a real post-processor will be provided in a future change.
123
186
  */
124
- readonly label?: unknown;
187
+ readonly postProcessor?: TransactionPostProcessor;
125
188
  }
126
189
  //# sourceMappingURL=transactionTypes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transactionTypes.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/transactionTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,QAAQ,eAA4C,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAE7D;;;GAGG;AACH,MAAM,MAAM,0BAA0B,GAAG,qBAAqB,GAAG,kBAAkB,CAAC;AAEpF;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACxC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,QAAQ,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CAAG;AAEvE;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,yBAA0B,SAAQ,wBAAwB;IAC1E;;;;;OAKG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,0BAA0B,EAAE,CAAC;IAE/D;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAClD"}
@@ -1 +1 @@
1
- {"version":3,"file":"transactionTypes.js","sourceRoot":"","sources":["../../../src/simple-tree/api/transactionTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TreeNode } from \"../core/index.js\";\n\n/**\n * A special object that signifies when a SharedTree {@link RunTransaction | transaction} should \"roll back\".\n * @public\n */\nexport const rollback = Symbol(\"SharedTree Transaction Rollback\");\n\n/**\n * A requirement for a SharedTree transaction to succeed.\n * @remarks Transaction constraints are useful for validating that the state of the tree meets some requirement when a transaction runs.\n * In general, when running a transaction a client can validate their tree state in whatever way they wish and decide to either proceed with the transaction or not.\n * However, they cannot know what the tree state will be when the transaction is _sequenced_.\n * There may have been any number of edits from other clients that get sequenced before the transaction is eventually sequenced.\n * Constraints provide a way to validate the tree state after the transaction has been sequenced and abort the transaction if the constraints are not met.\n * All clients will validate the constraints of a transaction when it is sequenced, so all clients will agree on whether the transaction succeeds or not.\n * @public\n */\nexport type TransactionConstraint = NodeInDocumentConstraint; // TODO: Add more constraint types here\n\n/**\n * Type for alpha version {@link TransactionConstraint | constraint}s\n * @sealed @alpha\n */\nexport type TransactionConstraintAlpha = TransactionConstraint | NoChangeConstraint; // TODO: Add more constraint types here\n\n/**\n * A transaction {@link TransactionConstraint | constraint} which requires that the given node exists in the tree.\n * @remarks The node must be in the document (its {@link TreeStatus | status} must be {@link TreeStatus.InDocument | InDocument}) to qualify as \"existing\".\n * @public\n */\nexport interface NodeInDocumentConstraint {\n\treadonly type: \"nodeInDocument\";\n\treadonly node: TreeNode;\n}\n\n/**\n * A {@link TransactionConstraintAlpha | constraint} which requires that, for this transaction to apply, the document must be in the same state immediately before the transaction is applied as it was before the transaction was authored.\n * When used as a revert precondition it requires that, for the revert to apply, the document must be in the same state immediately before the revert is applied as it was after the transaction was applied.\n * @alpha\n */\nexport interface NoChangeConstraint {\n\treadonly type: \"noChange\";\n}\n\n/**\n * Contains a value returned from a transaction.\n * @alpha\n */\nexport interface WithValue<TValue> {\n\t/** The user-supplied value. */\n\tvalue: TValue;\n}\n\n/**\n * Contains a value and status returned from a user-supplied {@link TreeBranchAlpha.(runTransaction:1) | transaction callback}.\n * @alpha\n */\nexport type TransactionCallbackStatus<TSuccessValue, TFailureValue> = (\n\t| (WithValue<TSuccessValue> & {\n\t\t\t/** Indicates that the transaction callback ran successfully. */\n\t\t\trollback?: false;\n\t })\n\t| (WithValue<TFailureValue> & {\n\t\t\t/** Indicates that the transaction callback failed and the transaction should be rolled back. */\n\t\t\trollback: true;\n\t })\n) & {\n\t/**\n\t * An optional list of {@link TransactionConstraintAlpha | constraints} that will be checked when the commit corresponding\n\t * to this transaction is reverted. If any of these constraints are not met when the revert is being applied either\n\t * locally or on remote clients, the revert will be ignored.\n\t * These constraints must also be met at the time they are first introduced. If they are not met after the transaction\n\t * callback returns, then `runTransaction` (which invokes the transaction callback) will throw a `UsageError`.\n\t */\n\tpreconditionsOnRevert?: readonly TransactionConstraintAlpha[];\n};\n\n/**\n * The result of a {@link TreeBranchAlpha.(runTransaction:2) | transaction} that doesn't return a value.\n * @alpha\n */\nexport type VoidTransactionCallbackStatus = Omit<\n\tTransactionCallbackStatus<unknown, unknown>,\n\t\"value\"\n>;\n\n/**\n * The result of a {@link TreeBranchAlpha.(runTransaction:1) | transaction} that completed successfully.\n * @alpha\n */\nexport interface TransactionResultSuccess<TSuccessValue> extends WithValue<TSuccessValue> {\n\t/** The success flag for a transaction that completed without being {@link TransactionCallbackStatus | rolled back}. */\n\tsuccess: true;\n}\n\n/**\n * The result of a {@link TreeBranchAlpha.(runTransaction:1) | transaction} that was rolled back.\n * @alpha\n */\nexport interface TransactionResultFailed<TFailureValue> extends WithValue<TFailureValue> {\n\t/** The failure flag for a transaction that was {@link TransactionCallbackStatus | rolled back}. */\n\tsuccess: false;\n}\n\n/**\n * The result of the {@link RunTransaction | RunTransaction} API.\n * @alpha\n */\nexport type TransactionResultExt<TSuccessValue, TFailureValue> =\n\t| TransactionResultSuccess<TSuccessValue>\n\t| TransactionResultFailed<TFailureValue>;\n\n/**\n * The result of the {@link RunTransaction | RunTransaction} API. This is the same as {@link TransactionResultExt}\n * but with the `value` field omitted. This is useful when the transaction callback doesn't need to return a value.\n * @alpha\n */\nexport type TransactionResult =\n\t| Omit<TransactionResultSuccess<unknown>, \"value\">\n\t| Omit<TransactionResultFailed<unknown>, \"value\">;\n\n/**\n * The parameters for the {@link RunTransaction | RunTransaction} API.\n * @alpha\n * @input\n */\nexport interface RunTransactionParams {\n\t/**\n\t * An optional list of {@link TransactionConstraintAlpha | constraints} that are checked just before the transaction begins.\n\t * @remarks\n\t * If any of the constraints are not met when `runTransaction` is called, an error will be thrown.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t */\n\treadonly preconditions?: readonly TransactionConstraintAlpha[];\n\t/**\n\t * A label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).\n\t * @remarks\n\t * If this transaction is applied to a {@link TreeBranchAlpha | branch}, the label will be available in the {@link LocalChangeMetadata.label | metadata} of the {@link TreeBranchEvents.changed | `changed`} event.\n\t *\n\t * If there is a nested transaction, only the outermost transaction label will be used.\n\t */\n\treadonly label?: unknown;\n}\n"]}
1
+ {"version":3,"file":"transactionTypes.js","sourceRoot":"","sources":["../../../src/simple-tree/api/transactionTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,CAAC,iCAAiC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType } from \"@fluidframework/core-interfaces\";\n\nimport type { TreeNode } from \"../core/index.js\";\n\n/**\n * A special object that signifies when a SharedTree {@link RunTransaction | transaction} should \"roll back\".\n * @public\n */\nexport const rollback = Symbol(\"SharedTree Transaction Rollback\");\n\n/**\n * A requirement for a SharedTree transaction to succeed.\n * @remarks Transaction constraints are useful for validating that the state of the tree meets some requirement when a transaction runs.\n * In general, when running a transaction a client can validate their tree state in whatever way they wish and decide to either proceed with the transaction or not.\n * However, they cannot know what the tree state will be when the transaction is _sequenced_.\n * There may have been any number of edits from other clients that get sequenced before the transaction is eventually sequenced.\n * Constraints provide a way to validate the tree state after the transaction has been sequenced and abort the transaction if the constraints are not met.\n * All clients will validate the constraints of a transaction when it is sequenced, so all clients will agree on whether the transaction succeeds or not.\n * @public\n */\nexport type TransactionConstraint = NodeInDocumentConstraint; // TODO: Add more constraint types here\n\n/**\n * Type for alpha version {@link TransactionConstraint | constraint}s\n * @sealed @alpha\n */\nexport type TransactionConstraintAlpha = TransactionConstraint | NoChangeConstraint; // TODO: Add more constraint types here\n\n/**\n * A transaction {@link TransactionConstraint | constraint} which requires that the given node exists in the tree.\n * @remarks The node must be in the document (its {@link TreeStatus | status} must be {@link TreeStatus.InDocument | InDocument}) to qualify as \"existing\".\n * @public\n */\nexport interface NodeInDocumentConstraint {\n\treadonly type: \"nodeInDocument\";\n\treadonly node: TreeNode;\n}\n\n/**\n * A {@link TransactionConstraintAlpha | constraint} which requires that, for this transaction to apply, the document must be in the same state immediately before the transaction is applied as it was before the transaction was authored.\n * When used as a revert precondition it requires that, for the revert to apply, the document must be in the same state immediately before the revert is applied as it was after the transaction was applied.\n * @alpha\n */\nexport interface NoChangeConstraint {\n\treadonly type: \"noChange\";\n}\n\n/**\n * Contains a value returned from a transaction.\n * @input\n * @beta\n */\nexport interface WithValue<TValue> {\n\t/** The user-supplied value. */\n\treadonly value: TValue;\n}\n\n/**\n * Contains a value and status returned from a user-supplied {@link TreeViewBeta.runTransaction | transaction callback}.\n * @input\n * @beta\n */\nexport type TransactionCallbackStatusBeta<TSuccessValue, TFailureValue> =\n\t| (WithValue<TSuccessValue> & {\n\t\t\t/** Indicates that the transaction callback ran successfully. */\n\t\t\treadonly rollback?: false;\n\t })\n\t| (WithValue<TFailureValue> & {\n\t\t\t/** Indicates that the transaction callback failed and the transaction should be rolled back. */\n\t\t\treadonly rollback: true;\n\t });\n\n/**\n * The result of a {@link TreeViewBeta.runTransaction | transaction} that doesn't return a value.\n * @input\n * @beta\n */\nexport type VoidTransactionCallbackStatusBeta = Omit<\n\tTransactionCallbackStatusBeta<unknown, unknown>,\n\t\"value\"\n>;\n\n/**\n * {@link TransactionCallbackStatusBeta} extended with alpha-only {@link TransactionConstraintAlpha | constraint} options.\n * @input\n * @alpha\n */\nexport type TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue> =\n\tTransactionCallbackStatusBeta<TSuccessValue, TFailureValue> & {\n\t\t/**\n\t\t * An optional list of {@link TransactionConstraintAlpha | constraints} that will be checked when the commit corresponding\n\t\t * to this transaction is reverted. If any of these constraints are not met when the revert is being applied either\n\t\t * locally or on remote clients, the revert will be ignored.\n\t\t * These constraints must also be met at the time they are first introduced. If they are not met after the transaction\n\t\t * callback returns, then `runTransaction` (which invokes the transaction callback) will throw a `UsageError`.\n\t\t */\n\t\treadonly preconditionsOnRevert?: readonly TransactionConstraintAlpha[];\n\t};\n\n/**\n * The result of a {@link TreeBranchAlpha.(runTransaction:2) | transaction} that doesn't return a value.\n * @input\n * @alpha\n */\nexport type VoidTransactionCallbackStatusAlpha = Omit<\n\tTransactionCallbackStatusAlpha<unknown, unknown>,\n\t\"value\"\n>;\n\n/**\n * The result of a {@link TreeViewBeta.(runTransaction:1) | transaction} that completed successfully.\n * @sealed\n * @beta\n */\nexport interface TransactionResultSuccess<TSuccessValue> extends WithValue<TSuccessValue> {\n\t/** The success flag for a transaction that completed without being {@link TransactionCallbackStatusBeta | rolled back}. */\n\treadonly success: true;\n}\n\n/**\n * The result of a {@link TreeViewBeta.runTransaction | transaction} that was rolled back.\n * @sealed\n * @beta\n */\nexport interface TransactionResultFailed<TFailureValue> extends WithValue<TFailureValue> {\n\t/** The failure flag for a transaction that was {@link TransactionCallbackStatusBeta | rolled back}. */\n\treadonly success: false;\n}\n\n/**\n * The result of the {@link RunTransaction | RunTransaction} API.\n * @sealed\n * @beta\n */\nexport type TransactionValueResult<TSuccessValue, TFailureValue> =\n\t| TransactionResultSuccess<TSuccessValue>\n\t| TransactionResultFailed<TFailureValue>;\n\n/**\n * The result of the {@link RunTransaction | RunTransaction} API. This is the same as {@link TransactionValueResult}\n * but with the `value` field omitted. This is useful when the transaction callback doesn't need to return a value.\n * @sealed\n * @beta\n */\nexport type TransactionVoidResult =\n\t| Omit<TransactionResultSuccess<unknown>, \"value\">\n\t| Omit<TransactionResultFailed<unknown>, \"value\">;\n\n/**\n * A type-erased function that post-processes the change produced when a transaction is committed.\n *\n * @remarks\n * Supply one via {@link RunTransactionParamsAlpha.postProcessor} to process/alter\n * the change that a transaction produces. For example a post-processor could\n * remove extraneous information, so that the resulting squashed change contains\n * no extraneous information.\n *\n * This type intentionally hides its internal representation: its concrete shape\n * is an implementation detail of `@fluidframework/tree`. Obtain a value of this\n * type from a `@fluidframework/tree` helper or constant rather than constructing\n * one directly.\n *\n * @alpha\n * @sealed\n * @system\n */\nexport interface TransactionPostProcessor\n\textends ErasedType<\"@fluidframework/tree.TransactionPostProcessor\"> {}\n\n/**\n * The parameters for the {@link RunTransaction | RunTransaction} API.\n * @input\n * @beta\n */\nexport interface RunTransactionParamsBeta {\n\t/**\n\t * A label for this transaction that allows it to be correlated with later edits (e.g. for controlling undo/redo grouping).\n\t * @remarks\n\t * If this transaction is applied to a {@link TreeBranchAlpha | branch}, the label will be available in the {@link LocalChangeMetadata.label | metadata} of the {@link TreeBranchEvents.changed | `changed`} event.\n\t *\n\t * If there is a nested transaction, only the outermost transaction label will be used.\n\t */\n\treadonly label?: unknown;\n}\n\n/**\n * The parameters for the {@link RunTransaction | RunTransaction} API, extended with alpha-only {@link TransactionConstraintAlpha | constraint} options.\n * @input\n * @alpha\n */\nexport interface RunTransactionParamsAlpha extends RunTransactionParamsBeta {\n\t/**\n\t * An optional list of {@link TransactionConstraintAlpha | constraints} that are checked just before the transaction begins.\n\t * @remarks\n\t * If any of the constraints are not met when `runTransaction` is called, an error will be thrown.\n\t * If any of the constraints are not met after the transaction has been ordered by the service, it will be rolled back on this client and ignored by all other clients.\n\t */\n\treadonly preconditions?: readonly TransactionConstraintAlpha[];\n\n\t/**\n\t * An optional {@link TransactionPostProcessor | post-processor} applied to\n\t * the change produced when this transaction is committed.\n\t * @remarks\n\t * When omitted, the transaction's edits are squashed without any such processing.\n\t *\n\t * Specific post-processors are applied according to their own rules for\n\t * optimization and other post-processing tasks in a transaction stack. For\n\t * example a \"minimization\" post-processor may be applied once for the\n\t * outermost transaction in a stack as it will process all nested edits and\n\t * there is no benefit from multiple applications.\n\t *\n\t * Note: minimization is not yet implemented. Supplying a post-processor currently has no observable effect beyond\n\t * reserving the behavior; a real post-processor will be provided in a future change.\n\t */\n\treadonly postProcessor?: TransactionPostProcessor;\n}\n"]}
@@ -9,7 +9,7 @@ import type { ImplicitFieldSchema, InsertableField, InsertableTreeFieldFromImpli
9
9
  import type { SimpleTreeSchema } from "../simpleSchema.js";
10
10
  import type { UnsafeUnknownSchema } from "../unsafeUnknownSchema.js";
11
11
  import type { TreeViewConfiguration } from "./configuration.js";
12
- import type { RunTransactionParams, TransactionCallbackStatus, TransactionResult, TransactionResultExt, VoidTransactionCallbackStatus, WithValue } from "./transactionTypes.js";
12
+ import type { RunTransactionParamsAlpha, RunTransactionParamsBeta, TransactionCallbackStatusAlpha, TransactionCallbackStatusBeta, TransactionVoidResult, TransactionValueResult, VoidTransactionCallbackStatusAlpha, VoidTransactionCallbackStatusBeta, WithValue } from "./transactionTypes.js";
13
13
  import type { VerboseTree } from "./verboseTree.js";
14
14
  /**
15
15
  * A tree from which a {@link TreeView} can be created.
@@ -144,8 +144,8 @@ export interface TreeContextAlpha {
144
144
  * Run a synchronous transaction which groups sequential edits to the tree into a single atomic edit if possible.
145
145
  * @param transaction - A callback run during the transaction to perform user-supplied operations.
146
146
  * It may optionally return a {@link WithValue | value }, which will be returned by the `runTransaction` call.
147
- * @param params - Optional {@link RunTransactionParams | parameters} for the transaction.
148
- * @returns A {@link TransactionResultExt | value } indicating whether or not the transaction succeeded, and containing the value returned by `transaction`.
147
+ * @param params - Optional {@link RunTransactionParamsAlpha | parameters} for the transaction.
148
+ * @returns A {@link TransactionValueResult | value } indicating whether or not the transaction succeeded, and containing the value returned by `transaction`.
149
149
  * @remarks
150
150
  * All of the changes in the transaction are applied synchronously and therefore no other changes from a remote client can be interleaved with those changes.
151
151
  * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.
@@ -164,9 +164,15 @@ export interface TreeContextAlpha {
164
164
  * `runTransaction` may be invoked on the context of a {@link TreeStatus.InDocument | hydrated } or {@link Unhydrated | unhydrated } node.
165
165
  * Use {@link TreeContextAlpha.isBranch | isBranch() } to check whether this context is associated with a branch and gain {@link TreeBranchAlpha.(runTransaction:1) | access to more transaction capabilities} if so.
166
166
  */
167
- runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParams): TransactionResultExt<TValue, TValue>;
168
- /** An overload of {@link TreeContextAlpha.(runTransaction:1) | runTransaction } which does not return a value. */
169
- runTransaction(transaction: () => void, params?: RunTransactionParams): TransactionResult;
167
+ runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TValue, TValue>;
168
+ /**
169
+ * An overload of {@link TreeContextAlpha.(runTransaction:1) | runTransaction } which does not return a value.
170
+ *
171
+ * @privateRemarks
172
+ * TODO: Consider updating these methods to avoid the need for overloads.
173
+ * See {@link TreeViewBeta.runTransaction} for an example of how to do this.
174
+ */
175
+ runTransaction(transaction: () => void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
170
176
  /**
171
177
  * An asynchronous version of {@link TreeContextAlpha.(runTransaction:1) | runTransaction}.
172
178
  * @remarks
@@ -178,9 +184,15 @@ export interface TreeContextAlpha {
178
184
  *
179
185
  * An asynchronous transaction may not be started while any other transaction is in progress in this context.
180
186
  */
181
- runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?: RunTransactionParams): Promise<TransactionResultExt<TValue, TValue>>;
182
- /** An overload of {@link TreeContextAlpha.(runTransactionAsync:1) | runTransactionAsync } which does not return a value. */
183
- runTransactionAsync(transaction: () => Promise<void>, params?: RunTransactionParams): Promise<TransactionResult>;
187
+ runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TValue, TValue>>;
188
+ /**
189
+ * An overload of {@link TreeContextAlpha.(runTransactionAsync:1) | runTransactionAsync } which does not return a value.
190
+ *
191
+ * @privateRemarks
192
+ * TODO: Consider updating these methods to avoid the need for overloads.
193
+ * See {@link TreeViewBeta.runTransactionAsync} for an example of how to do this.
194
+ */
195
+ runTransactionAsync(transaction: () => Promise<void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
184
196
  /**
185
197
  * True if this context is associated with a {@link TreeBranchAlpha | branch} and false if it is associated with an {@link Unhydrated | unhydrated } node.
186
198
  * @remarks If this returns true, the context can be safely inferred or cast to {@link TreeBranchAlpha} to access additional branch-specific APIs.
@@ -226,24 +238,32 @@ export interface TreeBranchAlpha extends TreeBranch, TreeContextAlpha {
226
238
  fork(): TreeBranchAlpha;
227
239
  /**
228
240
  * {@link TreeContextAlpha.(runTransaction:1) | Run a transaction} on a branch of the SharedTree.
229
- * @param transaction - The function to run as the body of the transaction, which may optionally return a {@link TransactionCallbackStatus | value or rollback signal}.
241
+ * @param transaction - The function to run as the body of the transaction, which may optionally return a {@link TransactionCallbackStatusAlpha | value or rollback signal}.
230
242
  * @remarks
231
243
  * If the transaction is rolled back, a corresponding {@link TreeBranchEvents.changed | `changed`} event will also be emitted for the rollback.
232
244
  */
233
- runTransaction<TSuccessValue, TFailureValue>(transaction: () => TransactionCallbackStatus<TSuccessValue, TFailureValue>, params?: RunTransactionParams): TransactionResultExt<TSuccessValue, TFailureValue>;
245
+ runTransaction<TSuccessValue, TFailureValue>(transaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TSuccessValue, TFailureValue>;
234
246
  /**
235
247
  * An overload of {@link TreeBranchAlpha.(runTransaction:1) | runTransaction } which does not return a value.
248
+ *
249
+ * @privateRemarks
250
+ * TODO: Consider updating these methods to avoid the need for overloads.
251
+ * See {@link TreeViewBeta.runTransaction} for an example of how to do this.
236
252
  */
237
- runTransaction(transaction: () => VoidTransactionCallbackStatus | void, params?: RunTransactionParams): TransactionResult;
253
+ runTransaction(transaction: () => VoidTransactionCallbackStatusAlpha | void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
238
254
  /**
239
255
  * An asynchronous version of {@link TreeBranchAlpha.(runTransaction:1) | runTransaction}.
240
256
  * @remarks See {@link TreeContextAlpha.(runTransactionAsync:1) | runTransactionAsync} for additional information about asynchronous transactions.
241
257
  */
242
- runTransactionAsync<TSuccessValue, TFailureValue>(transaction: () => Promise<TransactionCallbackStatus<TSuccessValue, TFailureValue>>, params?: RunTransactionParams): Promise<TransactionResultExt<TSuccessValue, TFailureValue>>;
258
+ runTransactionAsync<TSuccessValue, TFailureValue>(transaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;
243
259
  /**
244
260
  * An overload of {@link TreeBranchAlpha.(runTransactionAsync:1) | runTransactionAsync } which does not return a value.
261
+ *
262
+ * @privateRemarks
263
+ * TODO: Consider updating these methods to avoid the need for overloads.
264
+ * See {@link TreeViewBeta.runTransactionAsync} for an example of how to do this.
245
265
  */
246
- runTransactionAsync(transaction: () => Promise<VoidTransactionCallbackStatus | void>, params?: RunTransactionParams): Promise<TransactionResult>;
266
+ runTransactionAsync(transaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
247
267
  /**
248
268
  * Apply a serialized change to this branch.
249
269
  * @param change - the change to apply.
@@ -354,30 +374,74 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
354
374
  */
355
375
  readonly schema: TSchema;
356
376
  }
377
+ /**
378
+ * {@link TreeView} with additional beta APIs.
379
+ * @sealed @beta
380
+ */
381
+ export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, TreeBranch {
382
+ fork(): ReturnType<TreeBranch["fork"]> & TreeViewBeta<TSchema>;
383
+ /**
384
+ * Run a synchronous transaction which groups sequential edits to the tree into a single atomic edit if possible.
385
+ *
386
+ * @param transaction - The function to run as the body of the transaction, which may optionally return a {@link TransactionCallbackStatusBeta | value or rollback signal}.
387
+ * It may optionally return a {@link WithValue | value }, which will be returned by the `runTransaction` call.
388
+ *
389
+ * @param params - Optional {@link RunTransactionParamsBeta | parameters} for the transaction.
390
+ *
391
+ * @returns A {@link TransactionValueResult | value } indicating whether or not the transaction succeeded, and containing the value returned by `transaction`.
392
+ *
393
+ * @remarks
394
+ * All of the changes in the transaction are applied synchronously and therefore no other changes from a remote client can be interleaved with those changes.
395
+ * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.
396
+ *
397
+ * {@link (TreeBeta:interface).on | Change events } will be emitted for changed nodes on this client _as each edit happens_, just as they would be if the changes were made outside of a transaction.
398
+ * Any other/future clients or contexts will process the transaction "squashed", i.e. they will apply its changes all at once, emitting only a single event per node (even if that node was edited multiple times in the transaction).
399
+ * Edits to the tree are not permitted within these event callbacks, therefore no other local changes from this client will be interleaved with the changes in this transaction.
400
+ *
401
+ * Using a transaction has the following additional consequences:
402
+ *
403
+ * - If {@link Revertible | reverted } (e.g. via an "undo" operation), all the changes in the transaction are reverted together.
404
+ * Only the "outermost" transaction commits a change to the synchronized tree state and therefore only the outermost transaction can be reverted.
405
+ * If a transaction is started and completed while another transaction is already in progress, then the inner transaction will be reverted together with the outer transaction.
406
+ * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.
407
+ *
408
+ * If the transaction is rolled back, a corresponding {@link TreeBranchEvents.changed | `changed`} event will also be emitted for the rollback.
409
+ */
410
+ runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
411
+ /**
412
+ * An asynchronous version of {@link TreeViewBeta.runTransaction | runTransaction}.
413
+ *
414
+ * @remarks
415
+ * As with synchronous transactions, all of the changes in an asynchronous transaction are treated as a unit.
416
+ * Therefore, no other changes (either from this client or from a remote client) can be interleaved with the transaction changes.
417
+ *
418
+ * Unlike with synchronous transactions, it is possible that other changes (e.g. from a remote client) may be applied to the branch while this transaction is in progress.
419
+ * Those other changes will be not be reflected on the branch until after this transaction completes, at which point the transaction changes will be applied after those other changes.
420
+ *
421
+ * An asynchronous transaction may not be started while any other transaction is in progress in this view.
422
+ */
423
+ runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
424
+ }
357
425
  /**
358
426
  * {@link TreeView} with proposed changes to the schema aware typing to allow use with `UnsafeUnknownSchema`.
359
427
  * @sealed @alpha
360
428
  */
361
- export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork">, TreeBranchAlpha {
429
+ export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync">, TreeBranchAlpha {
362
430
  get root(): ReadableField<TSchema>;
363
431
  set root(newRoot: InsertableField<TSchema>);
364
432
  initialize(content: InsertableField<TSchema>): void;
365
433
  readonly events: Listenable<TreeViewEvents & TreeBranchEvents>;
366
434
  fork(): ReturnType<TreeBranch["fork"]> & TreeViewAlpha<TSchema>;
367
435
  }
368
- /**
369
- * {@link TreeView} with additional beta APIs.
370
- * @sealed @beta
371
- */
372
- export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, TreeBranch {
373
- fork(): ReturnType<TreeBranch["fork"]> & TreeViewBeta<TSchema>;
374
- }
375
436
  /**
376
437
  * Information about a view schema's compatibility with the document's stored schema.
377
438
  *
439
+ * @see
378
440
  * See SharedTree's README for more information about choosing a compatibility policy.
441
+ *
379
442
  * @privateRemarks
380
443
  * See {@link SchemaCompatibilityTester} for the implementation of this compatibility checking.
444
+ *
381
445
  * @sealed @public
382
446
  */
383
447
  export interface SchemaCompatibilityStatus {
@@ -1 +1 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/tree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,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