@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
@@ -13,6 +13,7 @@ import type {
13
13
  SchemaAndPolicy,
14
14
  } from "../core/index.js";
15
15
  import {
16
+ type IdentifierHealingConfig,
16
17
  type JsonCompatibleReadOnly,
17
18
  type JsonCompatibleReadOnlyObject,
18
19
  JsonCompatibleReadOnlySchema,
@@ -26,8 +27,8 @@ export interface EditManagerEncodingContext {
26
27
  idCompressor: IIdCompressor;
27
28
  readonly schema?: SchemaAndPolicy;
28
29
  readonly isSummary: boolean;
29
- readonly healUnresolvableIdentifiersOnDecode?: boolean;
30
- readonly sharedObjectId?: string;
30
+ /** See {@link IdentifierHealingConfig}. */
31
+ readonly healing?: IdentifierHealingConfig;
31
32
  }
32
33
 
33
34
  /**
@@ -14,6 +14,7 @@ import type {
14
14
  SchemaAndPolicy,
15
15
  } from "../core/index.js";
16
16
  import {
17
+ type IdentifierHealingConfig,
17
18
  type JsonCompatibleReadOnly,
18
19
  type JsonCompatibleReadOnlyObject,
19
20
  JsonCompatibleReadOnlySchema,
@@ -30,8 +31,8 @@ export interface EditManagerEncodingContext {
30
31
  idCompressor: IIdCompressor;
31
32
  readonly schema?: SchemaAndPolicy;
32
33
  readonly isSummary: boolean;
33
- readonly healUnresolvableIdentifiersOnDecode?: boolean;
34
- readonly sharedObjectId?: string;
34
+ /** See {@link IdentifierHealingConfig}. */
35
+ readonly healing?: IdentifierHealingConfig;
35
36
  }
36
37
 
37
38
  export function makeSharedBranchesCodecWithVersion<TChangeset>(
@@ -16,7 +16,7 @@ import type { SummaryTreeBuilder } from "@fluidframework/runtime-utils/internal"
16
16
 
17
17
  import type { IJsonCodec } from "../codec/index.js";
18
18
  import type { ChangeFamily, ChangeFamilyEditor, SchemaAndPolicy } from "../core/index.js";
19
- import type { JsonCompatibleReadOnly } from "../util/index.js";
19
+ import type { IdentifierHealingConfig, JsonCompatibleReadOnly } from "../util/index.js";
20
20
 
21
21
  import type { EditManager, SummaryData } from "./editManager.js";
22
22
  import type { EditManagerEncodingContext } from "./editManagerCodecs.js";
@@ -85,10 +85,8 @@ export class EditManagerSummarizer<TChangeset>
85
85
  private readonly idCompressor: IIdCompressor,
86
86
  minVersionForCollab: MinimumVersionForCollab,
87
87
  private readonly schemaAndPolicy?: SchemaAndPolicy,
88
- /** See {@link EditManagerEncodingContext.healUnresolvableIdentifiersOnDecode}. */
89
- private readonly healUnresolvableIdentifiersOnDecode?: boolean,
90
- /** See {@link EditManagerEncodingContext.sharedObjectId}. */
91
- private readonly sharedObjectId?: string,
88
+ /** See {@link IdentifierHealingConfig}. */
89
+ private readonly healing?: IdentifierHealingConfig,
92
90
  ) {
93
91
  super(
94
92
  EditManagerSummarizer.key,
@@ -111,8 +109,7 @@ export class EditManagerSummarizer<TChangeset>
111
109
  idCompressor: this.idCompressor,
112
110
  schema: this.schemaAndPolicy,
113
111
  isSummary: true,
114
- healUnresolvableIdentifiersOnDecode: this.healUnresolvableIdentifiersOnDecode,
115
- sharedObjectId: this.sharedObjectId,
112
+ healing: this.healing,
116
113
  };
117
114
  const jsonCompatible = this.codec.encode(this.editManager.getSummaryData(), context);
118
115
  const dataString = stringify(jsonCompatible);
@@ -137,8 +134,7 @@ export class EditManagerSummarizer<TChangeset>
137
134
  const data = this.codec.decode(summary, {
138
135
  idCompressor: this.idCompressor,
139
136
  isSummary: true,
140
- healUnresolvableIdentifiersOnDecode: this.healUnresolvableIdentifiersOnDecode,
141
- sharedObjectId: this.sharedObjectId,
137
+ healing: this.healing,
142
138
  });
143
139
  this.editManager.loadSummaryData(data);
144
140
  }
@@ -12,13 +12,16 @@ export {
12
12
  } from "./branch.js";
13
13
 
14
14
  export {
15
- TransactionResult,
16
- type Transactor,
15
+ type ChangeProcessor,
16
+ type OnPop,
17
+ type OnPush,
18
+ type SquashingTransactionOptions,
17
19
  type TransactionEvents,
18
- TransactionStack,
20
+ type Transactor,
21
+ ChangeProcessorApplicability,
19
22
  SquashingTransactionStack,
20
- type OnPush,
21
- type OnPop,
23
+ TransactionResult,
24
+ TransactionStack,
22
25
  } from "./transaction.js";
23
26
 
24
27
  export {
@@ -197,8 +197,9 @@ export class SharedTreeCore<TEditor extends ChangeFamilyEditor, TChange>
197
197
  this.idCompressor,
198
198
  options.minVersionForCollab,
199
199
  this.schemaAndPolicy,
200
- options.healUnresolvableIdentifiersOnDecode,
201
- sharedObject.id,
200
+ options.healUnresolvableIdentifiersOnDecode === true
201
+ ? { sharedObjectId: sharedObject.id }
202
+ : undefined,
202
203
  ),
203
204
  ...summarizables,
204
205
  ];
@@ -40,15 +40,17 @@ export enum TransactionResult {
40
40
 
41
41
  /**
42
42
  * A simple API for managing transactions.
43
+ * @typeParam TOptions - The type of the options passed to {@link Transactor.start | start}.
43
44
  */
44
- export interface Transactor {
45
+ export interface Transactor<TOptions> {
45
46
  /**
46
47
  * Start a new transaction.
48
+ * @param options - Options controlling how the transaction is committed.
47
49
  * @remarks
48
50
  * If a transaction is already in progress when this new transaction starts, then this transaction will be "nested" inside of it,
49
51
  * i.e. the outer transaction will still be in progress after this new transaction is committed or aborted.
50
52
  */
51
- start(): void;
53
+ start(options?: TOptions): void;
52
54
  /**
53
55
  * Close this transaction by squashing its edits and committing them as a single edit.
54
56
  * @remarks If this is the root checkout and there are no ongoing transactions remaining, the squashed edit will be submitted to Fluid.
@@ -89,8 +91,9 @@ export interface TransactionEvents {
89
91
 
90
92
  /**
91
93
  * Callbacks for transaction lifecycle events.
94
+ * @typeParam TOptions - The type of the options passed to {@link Transactor.start | start}.
92
95
  */
93
- export interface Callbacks {
96
+ export interface Callbacks<TOptions> {
94
97
  /**
95
98
  * Called when the current transaction is popped from the {@link TransactionStack | stack}.
96
99
  */
@@ -104,37 +107,42 @@ export interface Callbacks {
104
107
  * Put another way, a transaction always results in a call to exactly one `OnPush` callback - whichever is closest to the transaction.
105
108
  * The event "bubbles up" to (and no further past) its first registered callback.
106
109
  */
107
- readonly onPush?: OnPush;
110
+ readonly onPush?: OnPush<TOptions>;
108
111
  }
109
112
 
110
113
  /**
111
114
  * A function that will be called when a transaction is pushed to the {@link TransactionStack | stack}.
112
115
  * @remarks This function may return other functions that will be called when the transaction is popped from the stack or a nested transaction is pushed onto the stack.
113
116
  * This function runs just before the transaction begins, so if this is the beginning of an outermost (not nested) transaction then {@link Transactor.size} will be 0 during its execution.
117
+ * @typeParam TOptions - The type of the options passed to {@link Transactor.start | start}.
118
+ * @param options - The options passed to {@link Transactor.start | start}.
114
119
  */
115
- export type OnPush = () => Callbacks | void;
120
+ export type OnPush<TOptions> = (options?: TOptions) => Callbacks<TOptions> | void;
116
121
 
117
122
  /**
118
123
  * A function that will be called when a transaction is popped from the {@link TransactionStack | stack}.
119
124
  * @remarks This function runs just after the transaction ends, so if this is the end of an outermost (not nested) transaction then {@link Transactor.size} will be 0 during its execution.
125
+ * @param result - The result of the transaction.
120
126
  */
121
127
  export type OnPop = (result: TransactionResult) => void;
122
128
 
123
129
  /**
124
130
  * A frame in the transaction stack.
131
+ * @typeParam TOptions - The type of the options passed to {@link Transactor.start | start}.
125
132
  */
126
- interface TransactionStackFrame {
133
+ interface TransactionStackFrame<TOptions> {
127
134
  /** The callbacks provided when this transaction frame was pushed onto the stack. */
128
- readonly callbacks: Callbacks;
135
+ readonly callbacks: Callbacks<TOptions>;
129
136
  }
130
137
 
131
138
  /**
132
139
  * An implementation of {@link Transactor} that uses a stack to manage transactions.
133
140
  * @remarks Using a stack allows transactions to nest - i.e. an inner transaction may be started while an outer transaction is already in progress.
141
+ * @typeParam TOptions - The type of the options passed to {@link Transactor.start | start}.
134
142
  */
135
- export class TransactionStack implements Transactor, IDisposable {
136
- readonly #stack: TransactionStackFrame[] = [];
137
- readonly #onPush?: OnPush;
143
+ export class TransactionStack<TOptions> implements Transactor<TOptions>, IDisposable {
144
+ readonly #stack: TransactionStackFrame<TOptions>[] = [];
145
+ readonly #onPush?: OnPush<TOptions>;
138
146
 
139
147
  readonly #events = createEmitter<TransactionEvents>();
140
148
  public get events(): Listenable<TransactionEvents> {
@@ -150,7 +158,7 @@ export class TransactionStack implements Transactor, IDisposable {
150
158
  * Construct a new {@link TransactionStack}.
151
159
  * @param onPush - A {@link OnPush | function} that will be called when a transaction begins.
152
160
  */
153
- public constructor(onPush?: OnPush) {
161
+ public constructor(onPush?: OnPush<TOptions>) {
154
162
  this.#onPush = onPush;
155
163
  }
156
164
 
@@ -159,11 +167,11 @@ export class TransactionStack implements Transactor, IDisposable {
159
167
  return this.#stack.length;
160
168
  }
161
169
 
162
- public start(): void {
170
+ public start(options?: TOptions): void {
163
171
  this.ensureNotDisposed();
164
172
  const last = getLast(this.#stack);
165
173
  const onPushCurrent = last === undefined ? this.#onPush : last.callbacks.onPush;
166
- const { onPush, onPop } = onPushCurrent?.() ?? {};
174
+ const { onPush, onPop } = onPushCurrent?.(options) ?? {};
167
175
  this.#stack.push({
168
176
  callbacks: { onPop, onPush: onPush ?? onPushCurrent },
169
177
  });
@@ -216,6 +224,73 @@ export type OnPopWithViewUpdate<TChange> = (
216
224
  viewUpdate: TChange | undefined,
217
225
  ) => void;
218
226
 
227
+ /**
228
+ * Informs the caller of {@link ChangeProcessor} what context it should be invoked for.
229
+ * @remarks This is purely a recommendation to the caller of the processor and
230
+ * not a strict rule.
231
+ */
232
+ export enum ChangeProcessorApplicability {
233
+ /**
234
+ * Invoke the processor if no later (outer) instance of this change processor
235
+ * may be applied to related changes before changes are "visible".
236
+ *
237
+ * @remarks
238
+ * This designation is meant for processors that only need to be applied
239
+ * once to a set of related changes independent of scope or nesting,
240
+ * with the understanding that the processor should still be applied no
241
+ * later than when the changes are "visible" (e.g. committed to a branch).
242
+ * For example, a processor that removes extraneous information from a
243
+ * change (e.g. data for nodes that were both created and removed within a
244
+ * transaction) only needs to be applied once to the squashed change
245
+ * produced by the outermost transaction.
246
+ */
247
+ IfOutermost,
248
+ /**
249
+ * Invoke the processor in all contexts.
250
+ */
251
+ Always,
252
+ }
253
+
254
+ /**
255
+ * Processes a change altering its representation.
256
+ *
257
+ * @remarks
258
+ * A change processor receives a change and returns a change with the
259
+ * same observable effect but otherwise transformed.
260
+ *
261
+ * Currently this is the internal counterpart of the type-erased post-processor
262
+ * exposed on the public transaction API. The public boundary type-erases this
263
+ * (see the conversion helpers in the `shared-tree` layer) so that its internal
264
+ * change representation does not leak into the public API.
265
+ */
266
+ export interface ChangeProcessor<TChange> {
267
+ /**
268
+ * Informs what context it should be invoked for.
269
+ */
270
+ readonly applicability: ChangeProcessorApplicability;
271
+ /**
272
+ * Processes the given change, returning a change with the same observable effect.
273
+ */
274
+ readonly processChange: (change: TChange) => TChange;
275
+ }
276
+
277
+ /**
278
+ * Options for {@link Transactor.start | starting} a transaction.
279
+ */
280
+ export interface SquashingTransactionOptions<TChange> {
281
+ /**
282
+ * An optional {@link ChangeProcessor} applied to the squashed change produced when a transaction that was started
283
+ * with this option is committed.
284
+ *
285
+ * @remarks
286
+ * When omitted, the transaction's edits are squashed without any post-processing.
287
+ *
288
+ * How often the processor is invoked across nested transactions is governed by its
289
+ * {@link ChangeProcessor.applicability | applicability}.
290
+ */
291
+ readonly postProcessor?: ChangeProcessor<TChange>;
292
+ }
293
+
219
294
  /**
220
295
  * An implementation of {@link Transactor} that {@link TransactionStack | uses a stack} and a {@link SharedTreeBranch | branch} to manage transactions.
221
296
  * @remarks Given a branch, this class will fork the branch when a transaction begins and squash the forked branch back into the original branch when the transaction ends.
@@ -225,7 +300,7 @@ export type OnPopWithViewUpdate<TChange> = (
225
300
  export class SquashingTransactionStack<
226
301
  TEditor extends ChangeFamilyEditor,
227
302
  TChange,
228
- > extends TransactionStack {
303
+ > extends TransactionStack<SquashingTransactionOptions<TChange>> {
229
304
  #transactionBranch?: SharedTreeBranch<TEditor, TChange>;
230
305
 
231
306
  /**
@@ -284,15 +359,41 @@ export class SquashingTransactionStack<
284
359
  * Construct a new {@link SquashingTransactionStack}.
285
360
  * @param branch - The {@link SquashingTransactionStack.branch | branch} that will be forked off of when a transaction begins.
286
361
  * @param onPush - A function that will be called when a transaction is pushed to the {@link TransactionStack | stack}.
362
+ * @remarks To post-process the squashed change produced when a transaction is committed (for example, to "minimize"
363
+ * it so that it contains no extraneous information), start the transaction with a
364
+ * {@link SquashingTransactionOptions.postProcessor | post-processor}. The post-processor is injected via the transaction
365
+ * options rather than baked into this stack, so different transactions may supply different post-processors (or none).
287
366
  */
288
367
  public constructor(
289
368
  public readonly branch: SharedTreeBranch<TEditor, TChange>,
290
369
  mintRevisionTag: () => RevisionTag,
291
370
  onPush?: () => OnPopWithViewUpdate<TChange> | void,
292
371
  ) {
372
+ // A stack of the post-processors to apply when each in-progress transaction commits, ordered from outermost to
373
+ // innermost. Each in-progress transaction contributes exactly one entry: either the processor to apply when it
374
+ // commits, or `undefined` when none should be applied.
375
+ const postProcessorStack: (ChangeProcessor<TChange> | undefined)[] = [];
376
+ // Determines the entry to push for a transaction that was started with the given `requested` processor (if any).
377
+ // A processor with "outermost" applicability that is already active in an enclosing transaction resolves to
378
+ // `undefined` so that it is only applied once (at the outermost transaction that supplied it).
379
+ const resolvePostProcessor = (
380
+ requested: ChangeProcessor<TChange> | undefined,
381
+ ): ChangeProcessor<TChange> | undefined => {
382
+ if (
383
+ requested?.applicability === ChangeProcessorApplicability.IfOutermost &&
384
+ postProcessorStack.includes(requested)
385
+ ) {
386
+ return undefined;
387
+ }
388
+ return requested;
389
+ };
390
+
293
391
  super(
294
392
  // Invoked when an outer transaction starts
295
- (): Callbacks => {
393
+ (
394
+ startOptions?: SquashingTransactionOptions<TChange>,
395
+ ): Callbacks<SquashingTransactionOptions<TChange>> => {
396
+ postProcessorStack.push(resolvePostProcessor(startOptions?.postProcessor));
296
397
  // Keep track of the commit that each transaction was on when it started
297
398
  const startHead = this.activeBranch.getHead();
298
399
  const rebaser = this.branch.changeFamily.rebaser;
@@ -309,6 +410,7 @@ export class SquashingTransactionStack<
309
410
  // Invoked when an outer transaction ends
310
411
  const onOuterTransactionPop: OnPop = (result) => {
311
412
  assert(this.size === 0, 0xcae /* The outer transaction should be ending */);
413
+ const postProcessor = postProcessorStack.pop();
312
414
  transactionBranch.editor.exitTransaction();
313
415
 
314
416
  const sourcePath: GraphCommit<TChange>[] = [];
@@ -357,16 +459,20 @@ export class SquashingTransactionStack<
357
459
  }
358
460
  // Squash all the new commits on the transaction branch into a new commit on the original branch
359
461
  const squash = rebaser.compose(transactionSteps);
462
+ // Apply this transaction's post-processor (if any) to the squashed change (for example, to
463
+ // "minimize" it so that it contains no extraneous information).
464
+ const change =
465
+ postProcessor === undefined ? squash : postProcessor.processChange(squash);
360
466
 
361
467
  if (targetPath.length === 0) {
362
468
  // No changes were made on the original branch since the transaction began
363
469
  // The transaction commit can be applied directly
364
- this.branch.apply(tagChange(squash, transactionRevision));
470
+ this.branch.apply(tagChange(change, transactionRevision));
365
471
  // The view is already up-to-date so there's nothing more to do
366
472
  } else {
367
473
  // Some changes were made on `branch` since the transaction began
368
474
  const unrebasedHead = mintCommit(startHead, {
369
- change: squash,
475
+ change,
370
476
  revision: transactionRevision,
371
477
  });
372
478
  // We need to rebase the transaction commit on top of the new changes
@@ -407,13 +513,17 @@ export class SquashingTransactionStack<
407
513
  outerOnPop?.(result, viewUpdate);
408
514
  };
409
515
  // Invoked when a nested transaction begins
410
- const onNestedTransactionPush: OnPush = () => {
516
+ const onNestedTransactionPush: OnPush<SquashingTransactionOptions<TChange>> = (
517
+ nestedStartOptions,
518
+ ) => {
519
+ postProcessorStack.push(resolvePostProcessor(nestedStartOptions?.postProcessor));
411
520
  const nestedStartHead = this.activeBranch.getHead();
412
521
  const nestedOuterOnPop = onPush?.();
413
522
  transactionBranch.editor.enterTransaction();
414
523
  return {
415
524
  // Invoked when a nested transaction ends
416
525
  onPop: (result) => {
526
+ const nestedPostProcessor = postProcessorStack.pop();
417
527
  transactionBranch.editor.exitTransaction();
418
528
  switch (result) {
419
529
  case TransactionResult.Abort: {
@@ -422,6 +532,26 @@ export class SquashingTransactionStack<
422
532
  break;
423
533
  }
424
534
  case TransactionResult.Commit: {
535
+ // When this nested transaction supplied a post-processor that should be applied here, squash its
536
+ // edits into a single (post-processed) commit on the transaction branch rather than leaving them to
537
+ // be squashed only when the outermost transaction is committed.
538
+ if (nestedPostProcessor !== undefined) {
539
+ const nestedSteps: GraphCommit<TChange>[] = [];
540
+ findAncestor(
541
+ [transactionBranch.getHead(), nestedSteps],
542
+ (c) => c === nestedStartHead,
543
+ );
544
+ if (nestedSteps.length > 0) {
545
+ assert(
546
+ transactionRevision !== undefined,
547
+ 0xd07 /* Expected transaction revision in the presence of transaction steps */,
548
+ );
549
+ const squash = rebaser.compose(nestedSteps);
550
+ const processedSquash = nestedPostProcessor.processChange(squash);
551
+ transactionBranch.removeAfter(nestedStartHead);
552
+ transactionBranch.apply(tagChange(processedSquash, transactionRevision));
553
+ }
554
+ }
425
555
  break;
426
556
  }
427
557
  default: {
@@ -179,19 +179,23 @@ export {
179
179
  } from "./storedSchema.js";
180
180
 
181
181
  export {
182
+ type NoChangeConstraint,
183
+ type NodeInDocumentConstraint,
184
+ rollback,
185
+ type RunTransactionParamsAlpha,
186
+ type RunTransactionParamsBeta,
187
+ type TransactionCallbackStatusAlpha,
188
+ type TransactionCallbackStatusBeta,
182
189
  type TransactionConstraint,
183
190
  type TransactionConstraintAlpha,
184
- type NodeInDocumentConstraint,
185
- type NoChangeConstraint,
186
- type RunTransactionParams,
187
- type VoidTransactionCallbackStatus,
188
- type TransactionCallbackStatus,
189
- type TransactionResult,
190
- type TransactionResultExt,
191
- type TransactionResultSuccess,
191
+ type TransactionPostProcessor,
192
192
  type TransactionResultFailed,
193
+ type TransactionResultSuccess,
194
+ type TransactionValueResult,
195
+ type TransactionVoidResult,
196
+ type VoidTransactionCallbackStatusAlpha,
197
+ type VoidTransactionCallbackStatusBeta,
193
198
  type WithValue,
194
- rollback,
195
199
  } from "./transactionTypes.js";
196
200
 
197
201
  export { generateSchemaFromSimpleSchema } from "./schemaFromSimple.js";
@@ -78,7 +78,7 @@ export function singletonSchema<TScope extends string, TName extends string | nu
78
78
  }
79
79
 
80
80
  /**
81
- * Converts an enum into a collection of schema which can be used in a union.
81
+ * Converts an enum into a collection of schemas which can be used in a union.
82
82
  *
83
83
  * @typeParam TScope - The scope of the provided factory.
84
84
  * There is a known issue where if a factory is provided that is typed as a {@link SchemaFactoryAlpha}, and its scope contains a "." character,
@@ -88,7 +88,7 @@ export function singletonSchema<TScope extends string, TName extends string | nu
88
88
  * @remarks
89
89
  * The string value of the enum is used as the name of the schema: callers must ensure that it is stable and unique.
90
90
  * Numeric enums values have the value implicitly converted into a string.
91
- * Consider making a dedicated schema factory with a nested scope (for example using {@link SchemaFactoryBeta.scopedFactory}) to avoid the enum members colliding with other schema.
91
+ * Consider making a dedicated schema factory with a nested scope (for example using {@link SchemaFactoryBeta.scopedFactory}) to avoid the enum members colliding with other schemas.
92
92
  * @example
93
93
  * ```typescript
94
94
  * const schemaFactory = new SchemaFactory("com.myApp");
@@ -213,7 +213,7 @@ export function enumEntries(
213
213
  }
214
214
 
215
215
  /**
216
- * Converts an array of distinct strings into a collection of schema which can be used like an enum style union.
216
+ * Converts an array of distinct strings into a collection of schemas which can be used like an enum style union.
217
217
  * @remarks
218
218
  * The returned collection is also a function which can be used to convert strings into {@link Unhydrated} nodes in the union.
219
219
  * Each node type has a `.value` getter which returns the associated string.
@@ -339,7 +339,7 @@ export class SchemaFactory<
339
339
  /**
340
340
  * Construct a SchemaFactory with a given {@link SchemaFactory.scope|scope}.
341
341
  * @remarks
342
- * There are no restrictions on mixing schema from different schema factories.
342
+ * There are no restrictions on mixing schemas from different schema factories.
343
343
  * Typically each library will create one or more SchemaFactories and use them to define its schema.
344
344
  */
345
345
  public constructor(
@@ -698,7 +698,7 @@ export class SchemaFactory<
698
698
  const same = compareSets({ a: inputTypes, b: outputTypes });
699
699
  if (!same) {
700
700
  throw new UsageError(
701
- `Structurally named schema collision: two schema named "${fullName}" were defined with different input schema.`,
701
+ `Structurally named schema collision: two schemas named "${fullName}" were defined with different input schemas.`,
702
702
  );
703
703
  }
704
704
  return structural;
@@ -422,11 +422,11 @@ export interface SnapshotSchemaCompatibilityOptions {
422
422
  * Libraries which export schema for use by others will need to take special care to ensure the stability contract they offer their users aligns which what is validated by this utility.
423
423
  *
424
424
  * This utility only tests compatibility of the historical snapshots against the current schema; it does not test them against each-other.
425
- * Generally any historical schema should have been tested against the ones before them at the time they were current.
425
+ * Generally any historical schemas should have been tested against the ones before them at the time they were current.
426
426
  * If for some reason a version of a schema made it into production that was not compatible with a previous version,
427
427
  * that can still be represented here (but may require manually generating a snapshot for that version)
428
428
  * and this will still allow testing that all historical version can be upgraded to the current one.
429
- * If a sufficiently incompatible historical schema were used in production, it may be impossible to make a single schema which can accommodate all of them:
429
+ * If a sufficiently incompatible historical schemas were used in production, it may be impossible to make a single schema which can accommodate all of them:
430
430
  * this utility can be used to confirm that is the case, as well as to avoid the problem in the first place by testing schema before each one is deployed.
431
431
  *
432
432
  * @example Mocha test which validates the current `config` can collaborate with all historical version back to 2.0.0, and load and update any versions older than that.