@fluidframework/tree 2.92.0 → 2.93.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 (292) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +1 -1
  3. package/api-report/tree.alpha.api.md +57 -29
  4. package/api-report/tree.beta.api.md +41 -12
  5. package/api-report/tree.legacy.beta.api.md +41 -12
  6. package/dist/api.d.ts +6 -1
  7. package/dist/api.d.ts.map +1 -1
  8. package/dist/api.js.map +1 -1
  9. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  10. package/dist/core/tree/anchorSet.js +21 -0
  11. package/dist/core/tree/anchorSet.js.map +1 -1
  12. package/dist/entrypoints/alpha.d.ts +1 -1
  13. package/dist/entrypoints/alpha.d.ts.map +1 -1
  14. package/dist/entrypoints/alpha.js +4 -4
  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 +3 -1
  19. package/dist/entrypoints/beta.js.map +1 -1
  20. package/dist/entrypoints/legacy.d.ts +1 -1
  21. package/dist/entrypoints/legacy.d.ts.map +1 -1
  22. package/dist/entrypoints/legacy.js +3 -1
  23. package/dist/entrypoints/legacy.js.map +1 -1
  24. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +2 -2
  25. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  26. package/dist/feature-libraries/chunked-forest/chunkTree.js +2 -1
  27. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  28. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +13 -5
  29. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  30. package/dist/feature-libraries/chunked-forest/uniformChunk.js +22 -18
  31. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  32. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +1 -0
  33. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  34. package/dist/feature-libraries/indexing/anchorTreeIndex.js +3 -1
  35. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  36. package/dist/feature-libraries/indexing/types.d.ts +4 -3
  37. package/dist/feature-libraries/indexing/types.d.ts.map +1 -1
  38. package/dist/feature-libraries/indexing/types.js.map +1 -1
  39. package/dist/index.d.ts +1 -1
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js.map +1 -1
  42. package/dist/packageVersion.d.ts +1 -1
  43. package/dist/packageVersion.js +1 -1
  44. package/dist/packageVersion.js.map +1 -1
  45. package/dist/serializableDomainSchema.d.ts +5 -5
  46. package/dist/serializableDomainSchema.d.ts.map +1 -1
  47. package/dist/serializableDomainSchema.js.map +1 -1
  48. package/dist/shared-tree/treeAlpha.d.ts +6 -2
  49. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  50. package/dist/shared-tree/treeAlpha.js.map +1 -1
  51. package/dist/simple-tree/api/discrepancies.js +4 -1
  52. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  53. package/dist/simple-tree/api/identifierIndex.d.ts +2 -2
  54. package/dist/simple-tree/api/identifierIndex.js +1 -1
  55. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  56. package/dist/simple-tree/api/index.d.ts +2 -2
  57. package/dist/simple-tree/api/index.d.ts.map +1 -1
  58. package/dist/simple-tree/api/index.js +3 -2
  59. package/dist/simple-tree/api/index.js.map +1 -1
  60. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +31 -2
  61. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  62. package/dist/simple-tree/api/schemaFactoryAlpha.js +17 -1
  63. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  64. package/dist/simple-tree/api/simpleTreeIndex.d.ts +5 -5
  65. package/dist/simple-tree/api/simpleTreeIndex.js +1 -1
  66. package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
  67. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  68. package/dist/simple-tree/api/storedSchema.js +4 -1
  69. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  70. package/dist/simple-tree/api/treeAlpha.d.ts +70 -13
  71. package/dist/simple-tree/api/treeAlpha.d.ts.map +1 -1
  72. package/dist/simple-tree/api/treeAlpha.js.map +1 -1
  73. package/dist/simple-tree/api/treeChangeEvents.d.ts +1 -1
  74. package/dist/simple-tree/api/treeChangeEvents.js.map +1 -1
  75. package/dist/simple-tree/api/treeNodeApi.d.ts +60 -1
  76. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  77. package/dist/simple-tree/api/treeNodeApi.js +68 -6
  78. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  79. package/dist/simple-tree/core/toStored.d.ts +7 -0
  80. package/dist/simple-tree/core/toStored.d.ts.map +1 -1
  81. package/dist/simple-tree/core/toStored.js.map +1 -1
  82. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +17 -3
  83. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  84. package/dist/simple-tree/core/unhydratedFlexTree.js +114 -12
  85. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  86. package/dist/simple-tree/fieldSchema.d.ts +6 -1
  87. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  88. package/dist/simple-tree/fieldSchema.js +3 -0
  89. package/dist/simple-tree/fieldSchema.js.map +1 -1
  90. package/dist/simple-tree/index.d.ts +2 -2
  91. package/dist/simple-tree/index.d.ts.map +1 -1
  92. package/dist/simple-tree/index.js +4 -3
  93. package/dist/simple-tree/index.js.map +1 -1
  94. package/dist/simple-tree/node-kinds/index.d.ts +1 -1
  95. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -1
  96. package/dist/simple-tree/node-kinds/index.js.map +1 -1
  97. package/dist/simple-tree/node-kinds/map/index.d.ts +1 -1
  98. package/dist/simple-tree/node-kinds/map/index.d.ts.map +1 -1
  99. package/dist/simple-tree/node-kinds/map/index.js.map +1 -1
  100. package/dist/simple-tree/node-kinds/map/mapNode.d.ts +13 -0
  101. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  102. package/dist/simple-tree/node-kinds/map/mapNode.js +6 -1
  103. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  104. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +6 -6
  105. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  106. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  107. package/dist/simple-tree/simpleSchema.d.ts +17 -0
  108. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  109. package/dist/simple-tree/simpleSchema.js.map +1 -1
  110. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  111. package/dist/simple-tree/toStoredSchema.js +23 -1
  112. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  113. package/dist/tableSchema.d.ts +4 -5
  114. package/dist/tableSchema.d.ts.map +1 -1
  115. package/dist/tableSchema.js +12 -23
  116. package/dist/tableSchema.js.map +1 -1
  117. package/dist/text/textDomain.d.ts.map +1 -1
  118. package/dist/text/textDomain.js +27 -0
  119. package/dist/text/textDomain.js.map +1 -1
  120. package/dist/text/textDomainFormatted.d.ts +4 -4
  121. package/dist/util/index.d.ts +1 -1
  122. package/dist/util/index.d.ts.map +1 -1
  123. package/dist/util/index.js +2 -3
  124. package/dist/util/index.js.map +1 -1
  125. package/dist/util/utils.d.ts +0 -1
  126. package/dist/util/utils.d.ts.map +1 -1
  127. package/dist/util/utils.js +1 -6
  128. package/dist/util/utils.js.map +1 -1
  129. package/eslint.config.mts +1 -1
  130. package/lib/api.d.ts +6 -1
  131. package/lib/api.d.ts.map +1 -1
  132. package/lib/api.js.map +1 -1
  133. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  134. package/lib/core/tree/anchorSet.js +21 -0
  135. package/lib/core/tree/anchorSet.js.map +1 -1
  136. package/lib/entrypoints/alpha.d.ts +1 -1
  137. package/lib/entrypoints/alpha.d.ts.map +1 -1
  138. package/lib/entrypoints/alpha.js +1 -1
  139. package/lib/entrypoints/alpha.js.map +1 -1
  140. package/lib/entrypoints/beta.d.ts +1 -1
  141. package/lib/entrypoints/beta.d.ts.map +1 -1
  142. package/lib/entrypoints/beta.js +1 -1
  143. package/lib/entrypoints/beta.js.map +1 -1
  144. package/lib/entrypoints/legacy.d.ts +1 -1
  145. package/lib/entrypoints/legacy.d.ts.map +1 -1
  146. package/lib/entrypoints/legacy.js +1 -1
  147. package/lib/entrypoints/legacy.js.map +1 -1
  148. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +2 -2
  149. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  150. package/lib/feature-libraries/chunked-forest/chunkTree.js +2 -1
  151. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  152. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +13 -5
  153. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  154. package/lib/feature-libraries/chunked-forest/uniformChunk.js +22 -18
  155. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  156. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +1 -0
  157. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  158. package/lib/feature-libraries/indexing/anchorTreeIndex.js +3 -1
  159. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  160. package/lib/feature-libraries/indexing/types.d.ts +4 -3
  161. package/lib/feature-libraries/indexing/types.d.ts.map +1 -1
  162. package/lib/feature-libraries/indexing/types.js.map +1 -1
  163. package/lib/index.d.ts +1 -1
  164. package/lib/index.d.ts.map +1 -1
  165. package/lib/index.js.map +1 -1
  166. package/lib/packageVersion.d.ts +1 -1
  167. package/lib/packageVersion.js +1 -1
  168. package/lib/packageVersion.js.map +1 -1
  169. package/lib/serializableDomainSchema.d.ts +5 -5
  170. package/lib/serializableDomainSchema.d.ts.map +1 -1
  171. package/lib/serializableDomainSchema.js +4 -1
  172. package/lib/serializableDomainSchema.js.map +1 -1
  173. package/lib/shared-tree/treeAlpha.d.ts +6 -2
  174. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  175. package/lib/shared-tree/treeAlpha.js.map +1 -1
  176. package/lib/simple-tree/api/discrepancies.js +4 -1
  177. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  178. package/lib/simple-tree/api/identifierIndex.d.ts +2 -2
  179. package/lib/simple-tree/api/identifierIndex.js +1 -1
  180. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  181. package/lib/simple-tree/api/index.d.ts +2 -2
  182. package/lib/simple-tree/api/index.d.ts.map +1 -1
  183. package/lib/simple-tree/api/index.js +1 -1
  184. package/lib/simple-tree/api/index.js.map +1 -1
  185. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +31 -2
  186. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  187. package/lib/simple-tree/api/schemaFactoryAlpha.js +19 -3
  188. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  189. package/lib/simple-tree/api/simpleTreeIndex.d.ts +5 -5
  190. package/lib/simple-tree/api/simpleTreeIndex.js +1 -1
  191. package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
  192. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  193. package/lib/simple-tree/api/storedSchema.js +4 -1
  194. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  195. package/lib/simple-tree/api/treeAlpha.d.ts +70 -13
  196. package/lib/simple-tree/api/treeAlpha.d.ts.map +1 -1
  197. package/lib/simple-tree/api/treeAlpha.js.map +1 -1
  198. package/lib/simple-tree/api/treeChangeEvents.d.ts +1 -1
  199. package/lib/simple-tree/api/treeChangeEvents.js.map +1 -1
  200. package/lib/simple-tree/api/treeNodeApi.d.ts +60 -1
  201. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  202. package/lib/simple-tree/api/treeNodeApi.js +66 -6
  203. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  204. package/lib/simple-tree/core/toStored.d.ts +7 -0
  205. package/lib/simple-tree/core/toStored.d.ts.map +1 -1
  206. package/lib/simple-tree/core/toStored.js.map +1 -1
  207. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +17 -3
  208. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  209. package/lib/simple-tree/core/unhydratedFlexTree.js +115 -13
  210. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  211. package/lib/simple-tree/fieldSchema.d.ts +6 -1
  212. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  213. package/lib/simple-tree/fieldSchema.js +3 -0
  214. package/lib/simple-tree/fieldSchema.js.map +1 -1
  215. package/lib/simple-tree/index.d.ts +2 -2
  216. package/lib/simple-tree/index.d.ts.map +1 -1
  217. package/lib/simple-tree/index.js +1 -1
  218. package/lib/simple-tree/index.js.map +1 -1
  219. package/lib/simple-tree/node-kinds/index.d.ts +1 -1
  220. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -1
  221. package/lib/simple-tree/node-kinds/index.js.map +1 -1
  222. package/lib/simple-tree/node-kinds/map/index.d.ts +1 -1
  223. package/lib/simple-tree/node-kinds/map/index.d.ts.map +1 -1
  224. package/lib/simple-tree/node-kinds/map/index.js.map +1 -1
  225. package/lib/simple-tree/node-kinds/map/mapNode.d.ts +13 -0
  226. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  227. package/lib/simple-tree/node-kinds/map/mapNode.js +6 -1
  228. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  229. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +6 -6
  230. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  231. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  232. package/lib/simple-tree/simpleSchema.d.ts +17 -0
  233. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  234. package/lib/simple-tree/simpleSchema.js.map +1 -1
  235. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  236. package/lib/simple-tree/toStoredSchema.js +24 -2
  237. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  238. package/lib/tableSchema.d.ts +4 -5
  239. package/lib/tableSchema.d.ts.map +1 -1
  240. package/lib/tableSchema.js +12 -23
  241. package/lib/tableSchema.js.map +1 -1
  242. package/lib/text/textDomain.d.ts.map +1 -1
  243. package/lib/text/textDomain.js +29 -0
  244. package/lib/text/textDomain.js.map +1 -1
  245. package/lib/text/textDomainFormatted.d.ts +4 -4
  246. package/lib/tsdoc-metadata.json +1 -1
  247. package/lib/util/index.d.ts +1 -1
  248. package/lib/util/index.d.ts.map +1 -1
  249. package/lib/util/index.js +1 -1
  250. package/lib/util/index.js.map +1 -1
  251. package/lib/util/utils.d.ts +0 -1
  252. package/lib/util/utils.d.ts.map +1 -1
  253. package/lib/util/utils.js +0 -1
  254. package/lib/util/utils.js.map +1 -1
  255. package/package.json +30 -35
  256. package/src/api.ts +10 -0
  257. package/src/core/tree/anchorSet.ts +25 -0
  258. package/src/entrypoints/alpha.ts +20 -16
  259. package/src/entrypoints/beta.ts +7 -1
  260. package/src/entrypoints/legacy.ts +8 -10
  261. package/src/feature-libraries/chunked-forest/chunkTree.ts +3 -2
  262. package/src/feature-libraries/chunked-forest/uniformChunk.ts +42 -20
  263. package/src/feature-libraries/indexing/anchorTreeIndex.ts +1 -0
  264. package/src/feature-libraries/indexing/types.ts +5 -3
  265. package/src/index.ts +4 -0
  266. package/src/packageVersion.ts +1 -1
  267. package/src/serializableDomainSchema.ts +6 -0
  268. package/src/shared-tree/treeAlpha.ts +6 -2
  269. package/src/simple-tree/api/discrepancies.ts +6 -1
  270. package/src/simple-tree/api/identifierIndex.ts +2 -2
  271. package/src/simple-tree/api/index.ts +4 -0
  272. package/src/simple-tree/api/schemaFactoryAlpha.ts +67 -2
  273. package/src/simple-tree/api/simpleTreeIndex.ts +6 -6
  274. package/src/simple-tree/api/storedSchema.ts +4 -1
  275. package/src/simple-tree/api/treeAlpha.ts +75 -12
  276. package/src/simple-tree/api/treeChangeEvents.ts +1 -1
  277. package/src/simple-tree/api/treeNodeApi.ts +101 -7
  278. package/src/simple-tree/core/toStored.ts +8 -0
  279. package/src/simple-tree/core/unhydratedFlexTree.ts +134 -10
  280. package/src/simple-tree/fieldSchema.ts +10 -0
  281. package/src/simple-tree/index.ts +5 -0
  282. package/src/simple-tree/node-kinds/index.ts +1 -0
  283. package/src/simple-tree/node-kinds/map/index.ts +1 -0
  284. package/src/simple-tree/node-kinds/map/mapNode.ts +20 -3
  285. package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +6 -6
  286. package/src/simple-tree/simpleSchema.ts +20 -0
  287. package/src/simple-tree/toStoredSchema.ts +28 -1
  288. package/src/tableSchema.ts +16 -28
  289. package/src/text/textDomain.ts +68 -1
  290. package/src/util/index.ts +0 -1
  291. package/src/util/utils.ts +0 -2
  292. package/.mocharc.customBenchmarks.cjs +0 -25
package/CHANGELOG.md CHANGED
@@ -1,5 +1,45 @@
1
1
  # @fluidframework/tree
2
2
 
3
+ ## 2.93.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add Fluid-controlled map and iterator interfaces ([#26951](https://github.com/microsoft/FluidFramework/pull/26951)) [4735742f15](https://github.com/microsoft/FluidFramework/commit/4735742f15718419e974ead1d5e2e809863d3723)
8
+
9
+ `TreeIndex` now extends `FluidReadonlyMap` instead of the built-in `ReadonlyMap`, and `TreeMapNodeAlpha` which extends `FluidReadonlyMap` instead of the built-in `ReadonlyMap` has been added.
10
+ This works to uncouple Fluid's public API surface to the TypeScript standard library's map types, preventing future breakage when those types change.
11
+
12
+ - Add SchemaFactoryAlpha.stagedOptional for incremental required-to-optional field migrations ([#26918](https://github.com/microsoft/FluidFramework/pull/26918)) [fb808eb085d](https://github.com/microsoft/FluidFramework/commit/fb808eb085d17612cfb96f2731457f9851986429)
13
+
14
+ `SchemaFactoryAlpha.stagedOptional(T)` enables incremental migration of a field from required to
15
+ optional. It creates a field that is optional in the view schema but stored as required in the
16
+ stored schema until all clients have been upgraded, avoiding the need for a coordinated
17
+ simultaneous deployment.
18
+
19
+ Migration path:
20
+ 1. Start with `sf.required(T)` - all clients require the field.
21
+ 2. Deploy `sf.stagedOptional(T)` - new clients see the field as optional and can read documents
22
+ whether the field is present or absent, but the stored schema stays required so old clients
23
+ are not broken. Writing `undefined` is blocked at runtime during this phase.
24
+ 3. Deploy `sf.optional(T)` once all clients have been updated - the stored schema becomes
25
+ optional and the field can be cleared.
26
+
27
+ - Promote tree index APIs from alpha to beta ([#26993](https://github.com/microsoft/FluidFramework/pull/26993)) [37f2f17c118](https://github.com/microsoft/FluidFramework/commit/37f2f17c118baea142b0e842f5b262255d8bb12c)
28
+
29
+ The following APIs have been promoted from `@alpha` to `@beta`:
30
+ - `TreeIndex`
31
+ - `TreeIndexKey`
32
+ - `TreeIndexNodes`
33
+ - `createTreeIndex`
34
+ - `IdentifierIndex`
35
+ - `createIdentifierIndex`
36
+
37
+ Additionally, the following `@fluidframework/core-interfaces` types have been promoted from `@alpha` to `@beta`:
38
+ - `FluidReadonlyMap`
39
+ - `FluidIterable`
40
+ - `FluidIterableIterator`
41
+ - `FluidMap`
42
+
3
43
  ## 2.92.0
4
44
 
5
45
  ### Minor Changes
package/README.md CHANGED
@@ -502,7 +502,7 @@ When making such a request please include if the configuration already works (an
502
502
 
503
503
  ### Supported Runtimes
504
504
 
505
- - NodeJs ^20.10.0 except that we will drop support for it [when NodeJs 20 loses its upstream support on 2026-04-30](https://github.com/nodejs/release#release-schedule), and will support a newer LTS version of NodeJS (22) at least 1 year before 20 is end-of-life. This same policy applies to NodeJS 22 when it is end of life (2027-04-30).
505
+ - NodeJs ^22.22.2 except that we will drop support for it [when NodeJs 22 loses its upstream support on 2027-04-30](https://github.com/nodejs/release#release-schedule), and will support a newer LTS version of NodeJS at least 1 year before 22 is end-of-life.
506
506
  - Running Fluid in a Node.js environment with the `--no-experimental-fetch` flag is not supported.
507
507
  - Modern browsers supporting the es2022 standard library: in response to asks we can add explicit support for using babel to polyfill to target specific standards or runtimes (meaning we can avoid/remove use of things that don't polyfill robustly, but otherwise target modern standards).
508
508
 
@@ -145,6 +145,14 @@ export const ArrayNodeSchema: {
145
145
  readonly [Symbol.hasInstance]: (value: TreeNodeSchema) => value is ArrayNodeSchema;
146
146
  };
147
147
 
148
+ // @alpha
149
+ export type ArrayNodeTreeChangedDeltaOp = ArrayNodeTreeChangedRetainOp | ArrayNodeInsertOp | ArrayNodeRemoveOp;
150
+
151
+ // @alpha @sealed
152
+ export interface ArrayNodeTreeChangedRetainOp extends ArrayNodeRetainOp {
153
+ readonly subtreeChanged: boolean;
154
+ }
155
+
148
156
  // @alpha @sealed
149
157
  export interface ArrayPlaceAnchor {
150
158
  get index(): number;
@@ -159,6 +167,9 @@ export function asAlpha<TSchema extends ImplicitFieldSchema>(view: TreeViewConfi
159
167
  // @alpha
160
168
  export function asAlpha<TAllowedTypes extends ImplicitAllowedTypes>(node: TreeArrayNode<TAllowedTypes>): TreeArrayNodeAlpha<TAllowedTypes>;
161
169
 
170
+ // @alpha
171
+ export function asAlpha<TAllowedTypes extends ImplicitAllowedTypes>(node: TreeMapNode<TAllowedTypes>): TreeMapNodeAlpha<TAllowedTypes>;
172
+
162
173
  // @beta
163
174
  export function asBeta<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): TreeViewBeta<TSchema>;
164
175
 
@@ -224,7 +235,7 @@ export const contentSchemaSymbol: unique symbol;
224
235
  // @alpha
225
236
  export function createArrayInsertionAnchor(node: TreeArrayNode, currentIndex: number): ArrayPlaceAnchor;
226
237
 
227
- // @alpha
238
+ // @beta
228
239
  export function createIdentifierIndex<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): IdentifierIndex;
229
240
 
230
241
  // @alpha
@@ -241,16 +252,16 @@ export type CreateIndependentTreeAlphaOptions = ForestOptions & ((IndependentVie
241
252
  // @beta
242
253
  export function createIndependentTreeBeta<const TSchema extends ImplicitFieldSchema>(options?: ForestOptions): ViewableTree;
243
254
 
244
- // @alpha
255
+ // @beta
245
256
  export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: (schema: TreeNodeSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): TreeIndex<TKey, TValue>;
246
257
 
247
- // @alpha
258
+ // @beta
248
259
  export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: (schema: TSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): TreeIndex<TKey, TValue>;
249
260
 
250
- // @alpha
261
+ // @beta
251
262
  export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): TreeIndex<TKey, TValue>;
252
263
 
253
- // @alpha
264
+ // @beta
254
265
  export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): TreeIndex<TKey, TValue>;
255
266
 
256
267
  // @alpha
@@ -308,7 +319,7 @@ export function exportCompatibilitySchemaSnapshot(config: Pick<TreeViewConfigura
308
319
 
309
320
  // @beta
310
321
  export namespace ExtensibleUnionNode {
311
- export function createSchema<const T extends readonly TreeNodeSchema[], const TScope extends string, const TName extends string>(types: T, inputSchemaFactory: SchemaFactoryBeta<TScope>, name: TName): Statics<T> & TreeNodeSchemaCore_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, false, unknown, never, unknown> & (new (data: InternalTreeNode_2) => Members<TreeNodeFromImplicitAllowedTypes<T>> & TreeNode_2 & WithType_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, unknown>);
322
+ export function createSchema<const T extends readonly TreeNodeSchema[], const TScope extends string, const TName extends string>(types: T, inputSchemaFactory: SchemaFactoryBeta<TScope>, name: TName): Statics<T> & TreeNodeSchemaCore<ScopedSchemaName<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind, false, unknown, never, unknown> & (new (data: InternalTreeNode) => Members<TreeNodeFromImplicitAllowedTypes<T>> & TreeNode & WithType<ScopedSchemaName<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind, unknown>);
312
323
  export interface Members<T> {
313
324
  isValid(): boolean;
314
325
  readonly union: T | undefined;
@@ -366,6 +377,7 @@ export interface FieldProps<TCustomMetadata = unknown> {
366
377
  // @alpha @input
367
378
  export interface FieldPropsAlpha<TCustomMetadata = unknown> extends FieldProps<TCustomMetadata> {
368
379
  readonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;
380
+ readonly stagedOptionalUpgrade?: SchemaUpgrade;
369
381
  }
370
382
 
371
383
  // @public @sealed
@@ -390,6 +402,8 @@ export class FieldSchemaAlpha<Kind extends FieldKind = FieldKind, Types extends
390
402
  // (undocumented)
391
403
  get allowedTypesIdentifiers(): ReadonlySet<string>;
392
404
  // (undocumented)
405
+ get isStagedOptional(): false | SchemaUpgrade;
406
+ // (undocumented)
393
407
  get persistedMetadata(): JsonCompatibleReadOnlyObject | undefined;
394
408
  // (undocumented)
395
409
  get simpleAllowedTypes(): ReadonlyMap<string, SimpleAllowedTypeAttributes<SchemaType.View>>;
@@ -435,21 +449,21 @@ export namespace FluidSerializableAsTree {
435
449
  // @sealed
436
450
  export class Array extends _APIExtractorWorkaroundArrayBase {
437
451
  }
438
- const Tree: readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>];
452
+ const Tree: readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
439
453
  export type Data = JsonCompatible<IFluidHandle>;
440
454
  const // @system
441
- _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass_2<"com.fluidframework.serializable.object", NodeKind_2.Record, TreeRecordNodeUnsafe_2<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>]> & WithType_2<"com.fluidframework.serializable.object", NodeKind_2.Record, unknown>, {
442
- readonly [x: string]: string | number | IFluidHandle<unknown> | System_Unsafe_2.InsertableTypedNodeUnsafe<LeafSchema_2<"boolean", boolean>, LeafSchema_2<"boolean", boolean>> | FluidSerializableObject | Array | null;
443
- }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>], undefined, unknown>;
455
+ _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass<"com.fluidframework.serializable.object", NodeKind.Record, TreeRecordNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>]> & WithType<"com.fluidframework.serializable.object", NodeKind.Record, unknown>, {
456
+ readonly [x: string]: string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null;
457
+ }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>], undefined, unknown>;
444
458
  // @sealed
445
459
  export class FluidSerializableObject extends _APIExtractorWorkaroundObjectBase {
446
460
  }
447
461
  // @system
448
462
  export type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<typeof Array>;
449
463
  const // @system
450
- _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass_2<"com.fluidframework.serializable.array", NodeKind_2.Array, System_Unsafe_2.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>]> & WithType_2<"com.fluidframework.serializable.array", NodeKind_2.Array, unknown>, {
451
- [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe_2.InsertableTypedNodeUnsafe<LeafSchema_2<"boolean", boolean>, LeafSchema_2<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
452
- }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>], undefined>;
464
+ _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass<"com.fluidframework.serializable.array", NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>]> & WithType<"com.fluidframework.serializable.array", NodeKind.Array, unknown>, {
465
+ [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
466
+ }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>], undefined>;
453
467
  // (undocumented)
454
468
  export type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;
455
469
  }
@@ -477,7 +491,7 @@ export interface FormatValidator extends ErasedType<"FormatValidator"> {
477
491
  }
478
492
 
479
493
  // @alpha
480
- export const FormatValidatorBasic: FormatValidator_2;
494
+ export const FormatValidatorBasic: FormatValidator;
481
495
 
482
496
  // @alpha
483
497
  export const FormatValidatorNoOp: FormatValidator;
@@ -502,7 +516,7 @@ export interface ICodecOptions {
502
516
  readonly jsonValidator: FormatValidator;
503
517
  }
504
518
 
505
- // @alpha
519
+ // @beta
506
520
  export type IdentifierIndex = TreeIndex<string, TreeNode>;
507
521
 
508
522
  // @public
@@ -801,7 +815,7 @@ export interface MakeNominal {
801
815
  }
802
816
 
803
817
  // @alpha @sealed @system
804
- export interface MapNodeCustomizableSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaClass<TName, NodeKind.Map, TreeMapNode<T> & WithType<TName, NodeKind.Map, T>, MapNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<SchemaType.View, TCustomMetadata> {
818
+ export interface MapNodeCustomizableSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaClass<TName, NodeKind.Map, TreeMapNodeAlpha<T> & WithType<TName, NodeKind.Map, T>, MapNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<SchemaType.View, TCustomMetadata> {
805
819
  }
806
820
 
807
821
  // @alpha @sealed @system
@@ -819,7 +833,7 @@ export interface MapNodeCustomizableSchemaUnsafe<out TName extends string, in ou
819
833
  export type MapNodeInsertableData<T extends ImplicitAllowedTypes> = Iterable<readonly [string, InsertableTreeNodeFromImplicitAllowedTypes<T>]> | RestrictiveStringRecord<InsertableTreeNodeFromImplicitAllowedTypes<T>>;
820
834
 
821
835
  // @alpha @sealed @system
822
- export interface MapNodePojoEmulationSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaNonClass<TName, NodeKind.Map, TreeMapNode<T> & WithType<TName, NodeKind.Map, T>, MapNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<SchemaType.View, TCustomMetadata> {
836
+ export interface MapNodePojoEmulationSchema<out TName extends string = string, in out T extends ImplicitAllowedTypes = ImplicitAllowedTypes, out ImplicitlyConstructable extends boolean = true, out TCustomMetadata = unknown> extends TreeNodeSchemaNonClass<TName, NodeKind.Map, TreeMapNodeAlpha<T> & WithType<TName, NodeKind.Map, T>, MapNodeInsertableData<T>, ImplicitlyConstructable, T, undefined, TCustomMetadata>, SimpleMapNodeSchema<SchemaType.View, TCustomMetadata> {
823
837
  }
824
838
 
825
839
  // @alpha
@@ -857,6 +871,11 @@ export interface NodeChangedDataProperties<TNode extends TreeNode = TreeNode> {
857
871
  readonly changedProperties: ReadonlySet<TNode extends WithType<string, NodeKind.Object, infer TInfo> ? string & keyof TInfo : string>;
858
872
  }
859
873
 
874
+ // @alpha @sealed
875
+ export interface NodeChangedDataTreeDelta {
876
+ readonly delta: readonly ArrayNodeTreeChangedDeltaOp[] | undefined;
877
+ }
878
+
860
879
  // @public
861
880
  export type NodeFromSchema<T extends TreeNodeSchema> = T extends TreeNodeSchemaClass<string, NodeKind, infer TNode> ? TNode : T extends TreeNodeSchemaNonClass<string, NodeKind, infer TNode> ? TNode : never;
862
881
 
@@ -1102,8 +1121,8 @@ export class SchemaFactoryAlpha<out TScope extends string | undefined = string |
1102
1121
  arrayAlpha<const Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchemaAlpha<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
1103
1122
  arrayRecursive<const Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): ArrayNodeCustomizableSchemaUnsafe<ScopedSchemaName<TScope, Name>, T, TCustomMetadata>;
1104
1123
  static readonly identifier: <const TCustomMetadata = unknown>(props?: Omit<FieldProps<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Identifier, LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
1105
- static readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", IFluidHandle_2<unknown>> & SimpleLeafNodeSchema<SchemaType>];
1106
- readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", IFluidHandle_2<unknown>> & SimpleLeafNodeSchema<SchemaType>];
1124
+ static readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", IFluidHandle<unknown>> & SimpleLeafNodeSchema<SchemaType>];
1125
+ readonly leaves: readonly [LeafSchema<"string", string> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"number", number> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"boolean", boolean> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"null", null> & SimpleLeafNodeSchema<SchemaType>, LeafSchema<"handle", IFluidHandle<unknown>> & SimpleLeafNodeSchema<SchemaType>];
1107
1126
  mapAlpha<Name extends TName, const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchema<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
1108
1127
  mapRecursive<Name extends TName, const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(name: Name, allowedTypes: T, options?: NodeSchemaOptionsAlpha<TCustomMetadata>): MapNodeCustomizableSchemaUnsafe<ScopedSchemaName<TScope, Name>, T, TCustomMetadata>;
1109
1128
  objectAlpha<const Name extends TName, const T extends RestrictiveStringRecord<ImplicitFieldSchema>, const TCustomMetadata = unknown>(name: Name, fields: T, options?: ObjectSchemaOptionsAlpha<TCustomMetadata>): ObjectNodeSchemaWorkaround<ScopedSchemaName<TScope, Name>, T, true, TCustomMetadata>;
@@ -1122,10 +1141,12 @@ export class SchemaFactoryAlpha<out TScope extends string | undefined = string |
1122
1141
  static readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlphaUnsafe<FieldKind.Required, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
1123
1142
  readonly requiredRecursive: <const T extends System_Unsafe.ImplicitAllowedTypesUnsafe, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider"> | undefined) => FieldSchemaAlphaUnsafe<FieldKind.Required, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
1124
1143
  scopedFactoryAlpha<const T extends TName, TNameInner extends number | string = string>(name: T): SchemaFactoryAlpha<ScopedSchemaName<TScope, T>, TNameInner>;
1125
- readonly withDefault: <Kind extends FieldKind, Types extends ImplicitAllowedTypes, TCustomMetadata = unknown>(fieldSchema: FieldSchema<Kind, Types, TCustomMetadata>, defaultValue: NodeProvider<ApplyKindInput_2<InsertableTreeNodeFromImplicitAllowedTypes_2<Types>, Kind, true>>) => FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldPropsAlpha<TCustomMetadata> & {
1144
+ readonly stagedOptional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "stagedOptionalUpgrade" | "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
1145
+ static readonly stagedOptional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "stagedOptionalUpgrade" | "defaultProvider"> | undefined) => FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
1146
+ readonly withDefault: <Kind extends FieldKind, Types extends ImplicitAllowedTypes, TCustomMetadata = unknown>(fieldSchema: FieldSchema<Kind, Types, TCustomMetadata>, defaultValue: NodeProvider<ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypes<Types>, Kind, true>>) => FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldPropsAlpha<TCustomMetadata> & {
1126
1147
  defaultProvider: DefaultProvider;
1127
1148
  }>;
1128
- static readonly withDefault: <Kind extends FieldKind, Types extends ImplicitAllowedTypes, TCustomMetadata = unknown>(fieldSchema: FieldSchema<Kind, Types, TCustomMetadata>, defaultValue: NodeProvider<ApplyKindInput_2<InsertableTreeNodeFromImplicitAllowedTypes_2<Types>, Kind, true>>) => FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldPropsAlpha<TCustomMetadata> & {
1149
+ static readonly withDefault: <Kind extends FieldKind, Types extends ImplicitAllowedTypes, TCustomMetadata = unknown>(fieldSchema: FieldSchema<Kind, Types, TCustomMetadata>, defaultValue: NodeProvider<ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypes<Types>, Kind, true>>) => FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldPropsAlpha<TCustomMetadata> & {
1129
1150
  defaultProvider: DefaultProvider;
1130
1151
  }>;
1131
1152
  readonly withDefaultRecursive: <Kind extends FieldKind, Types extends System_Unsafe.ImplicitAllowedTypesUnsafe, TCustomMetadata = unknown>(fieldSchema: System_Unsafe.FieldSchemaUnsafe<Kind, Types, TCustomMetadata>, defaultValue: unknown) => FieldSchemaAlphaUnsafe<Kind, Types, TCustomMetadata, FieldPropsAlpha<TCustomMetadata> & {
@@ -1179,6 +1200,7 @@ export interface SchemaStatics {
1179
1200
 
1180
1201
  // @alpha @sealed @system
1181
1202
  export interface SchemaStaticsAlpha {
1203
+ readonly stagedOptional: <const T extends ImplicitAllowedTypes, const TCustomMetadata = unknown>(t: T, props?: Omit<FieldPropsAlpha<TCustomMetadata>, "defaultProvider" | "stagedOptionalUpgrade">) => FieldSchemaAlpha<FieldKind.Optional, T, TCustomMetadata, FieldPropsAlpha<TCustomMetadata>>;
1182
1204
  readonly withDefault: <Kind extends FieldKind, Types extends ImplicitAllowedTypes, TCustomMetadata = unknown>(fieldSchema: FieldSchema<Kind, Types, TCustomMetadata>, defaultValue: NodeProvider<InsertableTreeFieldFromImplicitField<FieldSchema<Kind, Types>>>) => FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldPropsAlpha<TCustomMetadata> & {
1183
1205
  defaultProvider: DefaultProvider;
1184
1206
  }>;
@@ -1236,6 +1258,7 @@ export interface SimpleArrayNodeSchema<Type extends SchemaType = SchemaType, out
1236
1258
 
1237
1259
  // @alpha @sealed
1238
1260
  export interface SimpleFieldSchema<Type extends SchemaType = SchemaType> {
1261
+ readonly isStagedOptional?: Type extends SchemaType.Stored ? undefined : false | SchemaUpgrade;
1239
1262
  readonly kind: FieldKind;
1240
1263
  readonly metadata: FieldSchemaMetadata & (Type extends SchemaType.View ? unknown : {
1241
1264
  readonly custom?: undefined;
@@ -1346,22 +1369,22 @@ export namespace System_TableSchema {
1346
1369
  props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
1347
1370
  }), true, {
1348
1371
  readonly props: TPropsSchema;
1349
- readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
1372
+ readonly id: FieldSchema<FieldKind.Identifier, LeafSchema<"string", string>, unknown>;
1350
1373
  }>;
1351
1374
  // @system
1352
1375
  export type CreateRowOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
1353
1376
  // @system
1354
1377
  export function createRowSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, cellSchema: TCellSchema, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind.Object, TreeNode & TableSchema.Row<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind, unknown>, object & {
1355
1378
  readonly id?: string | undefined;
1356
- readonly cells: (InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>>;
1379
+ readonly cells: (InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>>;
1357
1380
  } & (FieldHasDefault<TPropsSchema> extends true ? {
1358
1381
  props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
1359
1382
  } : {
1360
1383
  props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
1361
1384
  }), true, {
1362
1385
  readonly props: TPropsSchema;
1363
- readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
1364
- readonly cells: FieldSchema_2<FieldKind_2.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
1386
+ readonly id: FieldSchema<FieldKind.Identifier, LeafSchema<"string", string>, unknown>;
1387
+ readonly cells: FieldSchema<FieldKind.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
1365
1388
  }>;
1366
1389
  // @system
1367
1390
  export function createTableSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TColumnSchema extends ColumnSchemaBase<TUserScope, TCellSchema>, const TRowSchema extends RowSchemaBase<TUserScope, TCellSchema>>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, _cellSchema: TCellSchema, columnSchema: TColumnSchema, rowSchema: TRowSchema): {
@@ -1733,6 +1756,7 @@ export interface TreeChangeEvents {
1733
1756
  // @alpha @sealed
1734
1757
  export interface TreeChangeEventsAlpha<TNode extends TreeNode = TreeNode> extends TreeChangeEvents {
1735
1758
  nodeChanged: (data: NodeChangedDataAlpha<TNode>) => void;
1759
+ treeChanged: TNode extends WithType<string, NodeKind.Array> ? (data: NodeChangedDataTreeDelta) => void : TreeChangeEventsBeta<TNode>["treeChanged"];
1736
1760
  }
1737
1761
 
1738
1762
  // @beta @sealed
@@ -1773,15 +1797,15 @@ export interface TreeIdentifierUtils {
1773
1797
  shorten(branch: TreeBranch, nodeIdentifier: string): number | undefined;
1774
1798
  }
1775
1799
 
1776
- // @alpha @sealed
1777
- export interface TreeIndex<TKey, TValue> extends ReadonlyMap<TKey, TValue> {
1800
+ // @beta @sealed
1801
+ export interface TreeIndex<TKey, TValue> extends FluidReadonlyMap<TKey, TValue> {
1778
1802
  dispose(): void;
1779
1803
  }
1780
1804
 
1781
- // @alpha
1805
+ // @beta
1782
1806
  export type TreeIndexKey = TreeLeafValue;
1783
1807
 
1784
- // @alpha
1808
+ // @beta
1785
1809
  export type TreeIndexNodes<TNode> = readonly [first: TNode, ...rest: TNode[]];
1786
1810
 
1787
1811
  // @public
@@ -1797,6 +1821,10 @@ export interface TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTyp
1797
1821
  values(): IterableIterator<TreeNodeFromImplicitAllowedTypes<T>>;
1798
1822
  }
1799
1823
 
1824
+ // @alpha @sealed
1825
+ export interface TreeMapNodeAlpha<T extends ImplicitAllowedTypes = ImplicitAllowedTypes> extends FluidReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>, TreeNode, Pick<TreeMapNode<T>, "set" | "delete"> {
1826
+ }
1827
+
1800
1828
  // @public @sealed
1801
1829
  export abstract class TreeNode implements WithType {
1802
1830
  static [Symbol.hasInstance](value: unknown): value is TreeNode;
@@ -115,9 +115,24 @@ export type ConciseTree<THandle = IFluidHandle> = Exclude<TreeLeafValue, IFluidH
115
115
  // @beta
116
116
  export function configuredSharedTreeBeta(options: SharedTreeOptionsBeta): SharedObjectKind<ITree>;
117
117
 
118
+ // @beta
119
+ export function createIdentifierIndex<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): IdentifierIndex;
120
+
118
121
  // @beta
119
122
  export function createIndependentTreeBeta<const TSchema extends ImplicitFieldSchema>(options?: ForestOptions): ViewableTree;
120
123
 
124
+ // @beta
125
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: (schema: TreeNodeSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): TreeIndex<TKey, TValue>;
126
+
127
+ // @beta
128
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: (schema: TSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): TreeIndex<TKey, TValue>;
129
+
130
+ // @beta
131
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): TreeIndex<TKey, TValue>;
132
+
133
+ // @beta
134
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): TreeIndex<TKey, TValue>;
135
+
121
136
  // @public @sealed @system
122
137
  interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider"> {
123
138
  }
@@ -135,7 +150,7 @@ export function enumFromStrings<TScope extends string, const Members extends rea
135
150
 
136
151
  // @beta
137
152
  export namespace ExtensibleUnionNode {
138
- export function createSchema<const T extends readonly TreeNodeSchema[], const TScope extends string, const TName extends string>(types: T, inputSchemaFactory: SchemaFactoryBeta<TScope>, name: TName): Statics<T> & TreeNodeSchemaCore_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, false, unknown, never, unknown> & (new (data: InternalTreeNode_2) => Members<TreeNodeFromImplicitAllowedTypes<T>> & TreeNode_2 & WithType_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, unknown>);
153
+ export function createSchema<const T extends readonly TreeNodeSchema[], const TScope extends string, const TName extends string>(types: T, inputSchemaFactory: SchemaFactoryBeta<TScope>, name: TName): Statics<T> & TreeNodeSchemaCore<ScopedSchemaName<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind, false, unknown, never, unknown> & (new (data: InternalTreeNode) => Members<TreeNodeFromImplicitAllowedTypes<T>> & TreeNode & WithType<ScopedSchemaName<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind, unknown>);
139
154
  export interface Members<T> {
140
155
  isValid(): boolean;
141
156
  readonly union: T | undefined;
@@ -207,21 +222,21 @@ export namespace FluidSerializableAsTree {
207
222
  // @sealed
208
223
  export class Array extends _APIExtractorWorkaroundArrayBase {
209
224
  }
210
- const Tree: readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>];
225
+ const Tree: readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
211
226
  export type Data = JsonCompatible<IFluidHandle>;
212
227
  const // @system
213
- _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass_2<"com.fluidframework.serializable.object", NodeKind_2.Record, TreeRecordNodeUnsafe_2<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>]> & WithType_2<"com.fluidframework.serializable.object", NodeKind_2.Record, unknown>, {
214
- readonly [x: string]: string | number | IFluidHandle<unknown> | System_Unsafe_2.InsertableTypedNodeUnsafe<LeafSchema_2<"boolean", boolean>, LeafSchema_2<"boolean", boolean>> | FluidSerializableObject | Array | null;
215
- }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>], undefined, unknown>;
228
+ _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass<"com.fluidframework.serializable.object", NodeKind.Record, TreeRecordNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>]> & WithType<"com.fluidframework.serializable.object", NodeKind.Record, unknown>, {
229
+ readonly [x: string]: string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null;
230
+ }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>], undefined, unknown>;
216
231
  // @sealed
217
232
  export class FluidSerializableObject extends _APIExtractorWorkaroundObjectBase {
218
233
  }
219
234
  // @system
220
235
  export type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<typeof Array>;
221
236
  const // @system
222
- _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass_2<"com.fluidframework.serializable.array", NodeKind_2.Array, System_Unsafe_2.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>]> & WithType_2<"com.fluidframework.serializable.array", NodeKind_2.Array, unknown>, {
223
- [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe_2.InsertableTypedNodeUnsafe<LeafSchema_2<"boolean", boolean>, LeafSchema_2<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
224
- }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>], undefined>;
237
+ _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass<"com.fluidframework.serializable.array", NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>]> & WithType<"com.fluidframework.serializable.array", NodeKind.Array, unknown>, {
238
+ [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
239
+ }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>], undefined>;
225
240
  // (undocumented)
226
241
  export type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;
227
242
  }
@@ -244,6 +259,9 @@ export const ForestTypeOptimized: ForestType;
244
259
  // @beta
245
260
  export const ForestTypeReference: ForestType;
246
261
 
262
+ // @beta
263
+ export type IdentifierIndex = TreeIndex<string, TreeNode>;
264
+
247
265
  // @public
248
266
  export type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema;
249
267
 
@@ -637,22 +655,22 @@ export namespace System_TableSchema {
637
655
  props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
638
656
  }), true, {
639
657
  readonly props: TPropsSchema;
640
- readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
658
+ readonly id: FieldSchema<FieldKind.Identifier, LeafSchema<"string", string>, unknown>;
641
659
  }>;
642
660
  // @system
643
661
  export type CreateRowOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
644
662
  // @system
645
663
  export function createRowSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, cellSchema: TCellSchema, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind.Object, TreeNode & TableSchema.Row<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind, unknown>, object & {
646
664
  readonly id?: string | undefined;
647
- readonly cells: (InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>>;
665
+ readonly cells: (InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>>;
648
666
  } & (FieldHasDefault<TPropsSchema> extends true ? {
649
667
  props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
650
668
  } : {
651
669
  props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
652
670
  }), true, {
653
671
  readonly props: TPropsSchema;
654
- readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
655
- readonly cells: FieldSchema_2<FieldKind_2.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
672
+ readonly id: FieldSchema<FieldKind.Identifier, LeafSchema<"string", string>, unknown>;
673
+ readonly cells: FieldSchema<FieldKind.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
656
674
  }>;
657
675
  // @system
658
676
  export function createTableSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TColumnSchema extends ColumnSchemaBase<TUserScope, TCellSchema>, const TRowSchema extends RowSchemaBase<TUserScope, TCellSchema>>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, _cellSchema: TCellSchema, columnSchema: TColumnSchema, rowSchema: TRowSchema): {
@@ -928,6 +946,17 @@ export interface TreeEncodingOptions<TKeyOptions = KeyEncodingOptions> {
928
946
  // @public
929
947
  export type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> = TSchema extends FieldSchema<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind> : TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes<TSchema> : TreeNode | TreeLeafValue | undefined;
930
948
 
949
+ // @beta @sealed
950
+ export interface TreeIndex<TKey, TValue> extends FluidReadonlyMap<TKey, TValue> {
951
+ dispose(): void;
952
+ }
953
+
954
+ // @beta
955
+ export type TreeIndexKey = TreeLeafValue;
956
+
957
+ // @beta
958
+ export type TreeIndexNodes<TNode> = readonly [first: TNode, ...rest: TNode[]];
959
+
931
960
  // @public
932
961
  export type TreeLeafValue = number | string | boolean | IFluidHandle | null;
933
962
 
@@ -118,9 +118,24 @@ export function configuredSharedTreeBeta(options: SharedTreeOptionsBeta): Shared
118
118
  // @beta @legacy
119
119
  export function configuredSharedTreeBetaLegacy(options: SharedTreeOptionsBeta): ISharedObjectKind<ITree> & SharedObjectKind<ITree>;
120
120
 
121
+ // @beta
122
+ export function createIdentifierIndex<TSchema extends ImplicitFieldSchema>(view: TreeView<TSchema>): IdentifierIndex;
123
+
121
124
  // @beta
122
125
  export function createIndependentTreeBeta<const TSchema extends ImplicitFieldSchema>(options?: ForestOptions): ViewableTree;
123
126
 
127
+ // @beta
128
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: (schema: TreeNodeSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): TreeIndex<TKey, TValue>;
129
+
130
+ // @beta
131
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: (schema: TSchema) => string | undefined, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): TreeIndex<TKey, TValue>;
132
+
133
+ // @beta
134
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<TreeNode>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey): TreeIndex<TKey, TValue>;
135
+
136
+ // @beta
137
+ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): TreeIndex<TKey, TValue>;
138
+
124
139
  // @public @sealed @system
125
140
  interface DefaultProvider extends ErasedType<"@fluidframework/tree.FieldProvider"> {
126
141
  }
@@ -138,7 +153,7 @@ export function enumFromStrings<TScope extends string, const Members extends rea
138
153
 
139
154
  // @beta
140
155
  export namespace ExtensibleUnionNode {
141
- export function createSchema<const T extends readonly TreeNodeSchema[], const TScope extends string, const TName extends string>(types: T, inputSchemaFactory: SchemaFactoryBeta<TScope>, name: TName): Statics<T> & TreeNodeSchemaCore_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, false, unknown, never, unknown> & (new (data: InternalTreeNode_2) => Members<TreeNodeFromImplicitAllowedTypes<T>> & TreeNode_2 & WithType_2<ScopedSchemaName_2<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind_2, unknown>);
156
+ export function createSchema<const T extends readonly TreeNodeSchema[], const TScope extends string, const TName extends string>(types: T, inputSchemaFactory: SchemaFactoryBeta<TScope>, name: TName): Statics<T> & TreeNodeSchemaCore<ScopedSchemaName<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind, false, unknown, never, unknown> & (new (data: InternalTreeNode) => Members<TreeNodeFromImplicitAllowedTypes<T>> & TreeNode & WithType<ScopedSchemaName<`com.fluidframework.extensibleUnionNode<${TScope}>`, TName>, NodeKind, unknown>);
142
157
  export interface Members<T> {
143
158
  isValid(): boolean;
144
159
  readonly union: T | undefined;
@@ -210,21 +225,21 @@ export namespace FluidSerializableAsTree {
210
225
  // @sealed
211
226
  export class Array extends _APIExtractorWorkaroundArrayBase {
212
227
  }
213
- const Tree: readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>];
228
+ const Tree: readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>];
214
229
  export type Data = JsonCompatible<IFluidHandle>;
215
230
  const // @system
216
- _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass_2<"com.fluidframework.serializable.object", NodeKind_2.Record, TreeRecordNodeUnsafe_2<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>]> & WithType_2<"com.fluidframework.serializable.object", NodeKind_2.Record, unknown>, {
217
- readonly [x: string]: string | number | IFluidHandle<unknown> | System_Unsafe_2.InsertableTypedNodeUnsafe<LeafSchema_2<"boolean", boolean>, LeafSchema_2<"boolean", boolean>> | FluidSerializableObject | Array | null;
218
- }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>], undefined, unknown>;
231
+ _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass<"com.fluidframework.serializable.object", NodeKind.Record, TreeRecordNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>]> & WithType<"com.fluidframework.serializable.object", NodeKind.Record, unknown>, {
232
+ readonly [x: string]: string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null;
233
+ }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>], undefined, unknown>;
219
234
  // @sealed
220
235
  export class FluidSerializableObject extends _APIExtractorWorkaroundObjectBase {
221
236
  }
222
237
  // @system
223
238
  export type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<typeof Array>;
224
239
  const // @system
225
- _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass_2<"com.fluidframework.serializable.array", NodeKind_2.Array, System_Unsafe_2.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>]> & WithType_2<"com.fluidframework.serializable.array", NodeKind_2.Array, unknown>, {
226
- [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe_2.InsertableTypedNodeUnsafe<LeafSchema_2<"boolean", boolean>, LeafSchema_2<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
227
- }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema_2<"string", string>, LeafSchema_2<"number", number>, LeafSchema_2<"boolean", boolean>, LeafSchema_2<"null", null>, LeafSchema_2<"handle", IFluidHandle<unknown>>], undefined>;
240
+ _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass<"com.fluidframework.serializable.array", NodeKind.Array, System_Unsafe.TreeArrayNodeUnsafe<readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>]> & WithType<"com.fluidframework.serializable.array", NodeKind.Array, unknown>, {
241
+ [Symbol.iterator](): Iterator<string | number | IFluidHandle<unknown> | System_Unsafe.InsertableTypedNodeUnsafe<LeafSchema<"boolean", boolean>, LeafSchema<"boolean", boolean>> | FluidSerializableObject | Array | null, any, undefined>;
242
+ }, false, readonly [() => typeof FluidSerializableObject, () => typeof Array, LeafSchema<"string", string>, LeafSchema<"number", number>, LeafSchema<"boolean", boolean>, LeafSchema<"null", null>, LeafSchema<"handle", IFluidHandle<unknown>>], undefined>;
228
243
  // (undocumented)
229
244
  export type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;
230
245
  }
@@ -247,6 +262,9 @@ export const ForestTypeOptimized: ForestType;
247
262
  // @beta
248
263
  export const ForestTypeReference: ForestType;
249
264
 
265
+ // @beta
266
+ export type IdentifierIndex = TreeIndex<string, TreeNode>;
267
+
250
268
  // @public
251
269
  export type ImplicitAllowedTypes = AllowedTypes | TreeNodeSchema;
252
270
 
@@ -649,22 +667,22 @@ export namespace System_TableSchema {
649
667
  props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
650
668
  }), true, {
651
669
  readonly props: TPropsSchema;
652
- readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
670
+ readonly id: FieldSchema<FieldKind.Identifier, LeafSchema<"string", string>, unknown>;
653
671
  }>;
654
672
  // @system
655
673
  export type CreateRowOptionsBase<TUserScope extends string = string, TSchemaFactory extends SchemaFactoryBeta<TUserScope> = SchemaFactoryBeta<TUserScope>, TCellSchema extends ImplicitAllowedTypes = ImplicitAllowedTypes> = OptionsWithSchemaFactory<TSchemaFactory> & OptionsWithCellSchema<TCellSchema>;
656
674
  // @system
657
675
  export function createRowSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TPropsSchema extends ImplicitFieldSchema>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, cellSchema: TCellSchema, propsSchema: TPropsSchema): TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind.Object, TreeNode & TableSchema.Row<TCellSchema, TPropsSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row">, NodeKind, unknown>, object & {
658
676
  readonly id?: string | undefined;
659
- readonly cells: (InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode_2<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>>;
677
+ readonly cells: (InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>> | undefined) & InsertableTypedNode<TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>>;
660
678
  } & (FieldHasDefault<TPropsSchema> extends true ? {
661
679
  props?: InsertableTreeFieldFromImplicitField<TPropsSchema> | undefined;
662
680
  } : {
663
681
  props: InsertableTreeFieldFromImplicitField<TPropsSchema>;
664
682
  }), true, {
665
683
  readonly props: TPropsSchema;
666
- readonly id: FieldSchema_2<FieldKind_2.Identifier, LeafSchema_2<"string", string>, unknown>;
667
- readonly cells: FieldSchema_2<FieldKind_2.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData_2<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
684
+ readonly id: FieldSchema<FieldKind.Identifier, LeafSchema<"string", string>, unknown>;
685
+ readonly cells: FieldSchema<FieldKind.Required, TreeNodeSchemaClass<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, TreeRecordNode<TCellSchema> & WithType<ScopedSchemaName<`com.fluidframework.tableV2<${TUserScope}>`, "Row.cells">, NodeKind.Record, unknown>, RecordNodeInsertableData<TCellSchema>, true, TCellSchema, undefined, unknown>, unknown>;
668
686
  }>;
669
687
  // @system
670
688
  export function createTableSchema<const TUserScope extends string, const TCellSchema extends ImplicitAllowedTypes, const TColumnSchema extends ColumnSchemaBase<TUserScope, TCellSchema>, const TRowSchema extends RowSchemaBase<TUserScope, TCellSchema>>(inputSchemaFactory: SchemaFactoryBeta<TUserScope>, _cellSchema: TCellSchema, columnSchema: TColumnSchema, rowSchema: TRowSchema): {
@@ -940,6 +958,17 @@ export interface TreeEncodingOptions<TKeyOptions = KeyEncodingOptions> {
940
958
  // @public
941
959
  export type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> = TSchema extends FieldSchema<infer Kind, infer Types> ? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind> : TSchema extends ImplicitAllowedTypes ? TreeNodeFromImplicitAllowedTypes<TSchema> : TreeNode | TreeLeafValue | undefined;
942
960
 
961
+ // @beta @sealed
962
+ export interface TreeIndex<TKey, TValue> extends FluidReadonlyMap<TKey, TValue> {
963
+ dispose(): void;
964
+ }
965
+
966
+ // @beta
967
+ export type TreeIndexKey = TreeLeafValue;
968
+
969
+ // @beta
970
+ export type TreeIndexNodes<TNode> = readonly [first: TNode, ...rest: TNode[]];
971
+
943
972
  // @public
944
973
  export type TreeLeafValue = number | string | boolean | IFluidHandle | null;
945
974