@fluidframework/tree 2.41.0-338401 → 2.42.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 (1111) hide show
  1. package/.vscode/settings.json +1 -0
  2. package/CHANGELOG.md +374 -0
  3. package/api-report/tree.alpha.api.md +21 -7
  4. package/dist/alpha.d.ts +2 -0
  5. package/dist/codec/codec.d.ts +33 -3
  6. package/dist/codec/codec.d.ts.map +1 -1
  7. package/dist/codec/codec.js +13 -3
  8. package/dist/codec/codec.js.map +1 -1
  9. package/dist/codec/index.d.ts +1 -1
  10. package/dist/codec/index.d.ts.map +1 -1
  11. package/dist/codec/index.js.map +1 -1
  12. package/dist/codec/versioned/codec.d.ts +35 -2
  13. package/dist/codec/versioned/codec.d.ts.map +1 -1
  14. package/dist/codec/versioned/codec.js +38 -3
  15. package/dist/codec/versioned/codec.js.map +1 -1
  16. package/dist/core/index.d.ts +1 -1
  17. package/dist/core/index.d.ts.map +1 -1
  18. package/dist/core/index.js +2 -1
  19. package/dist/core/index.js.map +1 -1
  20. package/dist/core/rebase/types.d.ts +2 -2
  21. package/dist/core/rebase/types.js +2 -2
  22. package/dist/core/rebase/types.js.map +1 -1
  23. package/dist/core/rebase/utils.d.ts +0 -2
  24. package/dist/core/rebase/utils.d.ts.map +1 -1
  25. package/dist/core/rebase/utils.js +6 -10
  26. package/dist/core/rebase/utils.js.map +1 -1
  27. package/dist/core/schema-stored/formatV1.d.ts +0 -1
  28. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  29. package/dist/core/schema-stored/formatV1.js +1 -2
  30. package/dist/core/schema-stored/formatV1.js.map +1 -1
  31. package/dist/core/schema-stored/index.d.ts +1 -1
  32. package/dist/core/schema-stored/index.d.ts.map +1 -1
  33. package/dist/core/schema-stored/index.js +2 -1
  34. package/dist/core/schema-stored/index.js.map +1 -1
  35. package/dist/core/schema-stored/schema.d.ts +6 -0
  36. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  37. package/dist/core/schema-stored/schema.js +8 -1
  38. package/dist/core/schema-stored/schema.js.map +1 -1
  39. package/dist/core/tree/anchorSet.d.ts +2 -1
  40. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  41. package/dist/core/tree/anchorSet.js +2 -1
  42. package/dist/core/tree/anchorSet.js.map +1 -1
  43. package/dist/core/tree/detachedFieldIndex.d.ts +2 -2
  44. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  45. package/dist/core/tree/detachedFieldIndex.js +5 -1
  46. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  47. package/dist/core/tree/mapTree.d.ts +2 -1
  48. package/dist/core/tree/mapTree.d.ts.map +1 -1
  49. package/dist/core/tree/mapTree.js +11 -5
  50. package/dist/core/tree/mapTree.js.map +1 -1
  51. package/dist/core/tree/pathTree.d.ts +12 -11
  52. package/dist/core/tree/pathTree.d.ts.map +1 -1
  53. package/dist/core/tree/pathTree.js +8 -7
  54. package/dist/core/tree/pathTree.js.map +1 -1
  55. package/dist/core/tree/treeTextFormat.d.ts +1 -1
  56. package/dist/core/tree/treeTextFormat.js +1 -1
  57. package/dist/core/tree/treeTextFormat.js.map +1 -1
  58. package/dist/core/tree/visitorUtils.d.ts +2 -2
  59. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  60. package/dist/core/tree/visitorUtils.js.map +1 -1
  61. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -1
  62. package/dist/feature-libraries/chunked-forest/chunkedForest.js +1 -1
  63. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  64. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -2
  65. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  66. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  67. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  68. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  69. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  70. package/dist/feature-libraries/default-schema/index.js +2 -2
  71. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  72. package/dist/feature-libraries/default-schema/schemaChecker.d.ts +17 -16
  73. package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  74. package/dist/feature-libraries/default-schema/schemaChecker.js +54 -38
  75. package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  76. package/dist/feature-libraries/flex-tree/context.d.ts +32 -8
  77. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  78. package/dist/feature-libraries/flex-tree/context.js +22 -6
  79. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  80. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +37 -16
  81. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  82. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +7 -2
  83. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  84. package/dist/feature-libraries/flex-tree/index.d.ts +2 -2
  85. package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
  86. package/dist/feature-libraries/flex-tree/index.js.map +1 -1
  87. package/dist/feature-libraries/flex-tree/lazyField.d.ts +6 -6
  88. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  89. package/dist/feature-libraries/flex-tree/lazyField.js +1 -1
  90. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  91. package/dist/feature-libraries/flex-tree/lazyNode.d.ts +3 -2
  92. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  93. package/dist/feature-libraries/flex-tree/lazyNode.js +3 -0
  94. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  95. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  96. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  97. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -3
  98. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  99. package/dist/feature-libraries/forest-summary/forestSummarizer.js +7 -7
  100. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  101. package/dist/feature-libraries/index.d.ts +4 -4
  102. package/dist/feature-libraries/index.d.ts.map +1 -1
  103. package/dist/feature-libraries/index.js +5 -4
  104. package/dist/feature-libraries/index.js.map +1 -1
  105. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  106. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  107. package/dist/feature-libraries/indexing/anchorTreeIndex.js +15 -15
  108. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  109. package/dist/feature-libraries/mapTreeCursor.d.ts +39 -3
  110. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  111. package/dist/feature-libraries/mapTreeCursor.js +45 -7
  112. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  113. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  114. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  115. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  116. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  117. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  118. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  119. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  120. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  121. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  122. package/dist/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  123. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  124. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  125. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  126. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  127. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  128. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  129. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  130. package/dist/feature-libraries/modular-schema/isNeverTree.js +0 -2
  131. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  132. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +1 -1
  133. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  134. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +5 -5
  135. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  136. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  137. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  138. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  139. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  140. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  141. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  142. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  143. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  144. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  145. package/dist/feature-libraries/object-forest/objectForest.d.ts +22 -5
  146. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  147. package/dist/feature-libraries/object-forest/objectForest.js +296 -207
  148. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  149. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  150. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  151. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +3 -2
  152. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  153. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  154. package/dist/feature-libraries/schema-index/codec.d.ts +6 -12
  155. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  156. package/dist/feature-libraries/schema-index/codec.js +8 -15
  157. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  158. package/dist/feature-libraries/schema-index/formatV1.d.ts +2 -2
  159. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  160. package/dist/feature-libraries/schema-index/formatV1.js +1 -1
  161. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  162. package/dist/feature-libraries/schema-index/index.d.ts +1 -1
  163. package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
  164. package/dist/feature-libraries/schema-index/index.js +1 -2
  165. package/dist/feature-libraries/schema-index/index.js.map +1 -1
  166. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  167. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  168. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  169. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  170. package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
  171. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  172. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  173. package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  174. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  175. package/dist/feature-libraries/sequence-field/rebase.js +1 -1
  176. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  177. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  178. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  179. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  180. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  181. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  182. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  183. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  184. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  185. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  186. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  187. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  188. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  189. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  190. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  191. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  192. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  193. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  194. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  195. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  196. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  197. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  198. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  199. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  200. package/dist/feature-libraries/sequence-field/utils.d.ts +7 -5
  201. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  202. package/dist/feature-libraries/sequence-field/utils.js +7 -5
  203. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  204. package/dist/feature-libraries/treeCursorUtils.d.ts +5 -1
  205. package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  206. package/dist/feature-libraries/treeCursorUtils.js +10 -4
  207. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  208. package/dist/feature-libraries/treeTextCursor.d.ts +1 -1
  209. package/dist/feature-libraries/treeTextCursor.js +1 -1
  210. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  211. package/dist/index.d.ts +3 -3
  212. package/dist/index.d.ts.map +1 -1
  213. package/dist/index.js +2 -6
  214. package/dist/index.js.map +1 -1
  215. package/dist/packageVersion.d.ts +1 -1
  216. package/dist/packageVersion.d.ts.map +1 -1
  217. package/dist/packageVersion.js +1 -1
  218. package/dist/packageVersion.js.map +1 -1
  219. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  220. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
  221. package/dist/shared-tree/independentView.d.ts +1 -1
  222. package/dist/shared-tree/independentView.d.ts.map +1 -1
  223. package/dist/shared-tree/independentView.js +8 -3
  224. package/dist/shared-tree/independentView.js.map +1 -1
  225. package/dist/shared-tree/index.d.ts +1 -1
  226. package/dist/shared-tree/index.d.ts.map +1 -1
  227. package/dist/shared-tree/index.js.map +1 -1
  228. package/dist/shared-tree/schematizeTree.d.ts +1 -1
  229. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  230. package/dist/shared-tree/schematizeTree.js.map +1 -1
  231. package/dist/shared-tree/schematizingTreeView.d.ts +12 -2
  232. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  233. package/dist/shared-tree/schematizingTreeView.js +37 -23
  234. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  235. package/dist/shared-tree/sharedTree.d.ts +6 -6
  236. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  237. package/dist/shared-tree/sharedTree.js +9 -8
  238. package/dist/shared-tree/sharedTree.js.map +1 -1
  239. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  240. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  241. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  242. package/dist/shared-tree/tree.d.ts.map +1 -1
  243. package/dist/shared-tree/tree.js +9 -25
  244. package/dist/shared-tree/tree.js.map +1 -1
  245. package/dist/shared-tree/treeAlpha.d.ts +78 -5
  246. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  247. package/dist/shared-tree/treeAlpha.js +52 -8
  248. package/dist/shared-tree/treeAlpha.js.map +1 -1
  249. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  250. package/dist/shared-tree/treeCheckout.js +8 -4
  251. package/dist/shared-tree/treeCheckout.js.map +1 -1
  252. package/dist/shared-tree-core/branch.d.ts +2 -2
  253. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  254. package/dist/shared-tree-core/branch.js +2 -2
  255. package/dist/shared-tree-core/branch.js.map +1 -1
  256. package/dist/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  257. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  258. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  259. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  260. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  261. package/dist/shared-tree-core/editManager.d.ts +3 -1
  262. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  263. package/dist/shared-tree-core/editManager.js +4 -2
  264. package/dist/shared-tree-core/editManager.js.map +1 -1
  265. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  266. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  267. package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  268. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  269. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  270. package/dist/shared-tree-core/messageCodecs.d.ts +1 -1
  271. package/dist/shared-tree-core/messageCodecs.js +1 -1
  272. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  273. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  274. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  275. package/dist/shared-tree-core/sharedTreeCore.d.ts +2 -2
  276. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  277. package/dist/shared-tree-core/sharedTreeCore.js +4 -4
  278. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  279. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  280. package/dist/shared-tree-core/transaction.js +1 -1
  281. package/dist/shared-tree-core/transaction.js.map +1 -1
  282. package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  283. package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
  284. package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
  285. package/dist/simple-tree/api/conciseTree.js +1 -1
  286. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  287. package/dist/simple-tree/api/configuration.d.ts +2 -2
  288. package/dist/simple-tree/api/configuration.js +5 -5
  289. package/dist/simple-tree/api/configuration.js.map +1 -1
  290. package/dist/simple-tree/api/create.d.ts +10 -29
  291. package/dist/simple-tree/api/create.d.ts.map +1 -1
  292. package/dist/simple-tree/api/create.js +27 -51
  293. package/dist/simple-tree/api/create.js.map +1 -1
  294. package/dist/simple-tree/api/customTree.d.ts +5 -1
  295. package/dist/simple-tree/api/customTree.d.ts.map +1 -1
  296. package/dist/simple-tree/api/customTree.js +33 -25
  297. package/dist/simple-tree/api/customTree.js.map +1 -1
  298. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  299. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  300. package/dist/simple-tree/api/identifierIndex.js +2 -2
  301. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  302. package/dist/simple-tree/api/index.d.ts +2 -3
  303. package/dist/simple-tree/api/index.d.ts.map +1 -1
  304. package/dist/simple-tree/api/index.js +2 -10
  305. package/dist/simple-tree/api/index.js.map +1 -1
  306. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  307. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  308. package/dist/simple-tree/api/schemaFactory.d.ts +14 -6
  309. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  310. package/dist/simple-tree/api/schemaFactory.js +45 -16
  311. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  312. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  313. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  314. package/dist/simple-tree/api/schemaFactoryAlpha.js +4 -6
  315. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  316. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  317. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  318. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  319. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  320. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  321. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  322. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  323. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +4 -6
  324. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  325. package/dist/simple-tree/api/storedSchema.d.ts +1 -1
  326. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  327. package/dist/simple-tree/api/storedSchema.js +7 -6
  328. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  329. package/dist/simple-tree/api/tree.d.ts +2 -2
  330. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  331. package/dist/simple-tree/api/tree.js.map +1 -1
  332. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  333. package/dist/simple-tree/api/treeBeta.js +1 -1
  334. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  335. package/dist/simple-tree/api/treeNodeApi.d.ts +44 -6
  336. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  337. package/dist/simple-tree/api/treeNodeApi.js +56 -29
  338. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  339. package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
  340. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  341. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  342. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  343. package/dist/simple-tree/api/verboseTree.js +15 -12
  344. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  345. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  346. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +4 -6
  347. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  348. package/dist/simple-tree/core/context.d.ts.map +1 -1
  349. package/dist/simple-tree/core/context.js.map +1 -1
  350. package/dist/simple-tree/core/getOrCreateNode.d.ts +1 -1
  351. package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  352. package/dist/simple-tree/core/getOrCreateNode.js +2 -1
  353. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
  354. package/dist/simple-tree/core/index.d.ts +2 -2
  355. package/dist/simple-tree/core/index.d.ts.map +1 -1
  356. package/dist/simple-tree/core/index.js +3 -4
  357. package/dist/simple-tree/core/index.js.map +1 -1
  358. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  359. package/dist/simple-tree/core/treeNode.js +1 -1
  360. package/dist/simple-tree/core/treeNode.js.map +1 -1
  361. package/dist/simple-tree/core/treeNodeKernel.d.ts +18 -28
  362. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  363. package/dist/simple-tree/core/treeNodeKernel.js +28 -35
  364. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  365. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  366. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  367. package/dist/simple-tree/core/types.d.ts.map +1 -1
  368. package/dist/simple-tree/core/types.js.map +1 -1
  369. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +128 -59
  370. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  371. package/dist/simple-tree/core/unhydratedFlexTree.js +180 -193
  372. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  373. package/dist/simple-tree/core/withType.d.ts +1 -1
  374. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  375. package/dist/simple-tree/core/withType.js.map +1 -1
  376. package/dist/simple-tree/createContext.d.ts.map +1 -1
  377. package/dist/simple-tree/createContext.js.map +1 -1
  378. package/dist/simple-tree/getTreeNodeForField.d.ts.map +1 -1
  379. package/dist/simple-tree/getTreeNodeForField.js.map +1 -1
  380. package/dist/simple-tree/index.d.ts +4 -11
  381. package/dist/simple-tree/index.d.ts.map +1 -1
  382. package/dist/simple-tree/index.js +16 -24
  383. package/dist/simple-tree/index.js.map +1 -1
  384. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  385. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  386. package/dist/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  387. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  388. package/dist/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +12 -13
  389. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  390. package/dist/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  391. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  392. package/dist/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  393. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -0
  394. package/dist/simple-tree/node-kinds/array/index.d.ts +7 -0
  395. package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  396. package/dist/simple-tree/node-kinds/array/index.js +16 -0
  397. package/dist/simple-tree/node-kinds/array/index.js.map +1 -0
  398. package/dist/simple-tree/node-kinds/index.d.ts +8 -0
  399. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -0
  400. package/dist/simple-tree/node-kinds/index.js +25 -0
  401. package/dist/simple-tree/node-kinds/index.js.map +1 -0
  402. package/dist/simple-tree/node-kinds/map/index.d.ts +7 -0
  403. package/dist/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  404. package/dist/simple-tree/node-kinds/map/index.js +13 -0
  405. package/dist/simple-tree/node-kinds/map/index.js.map +1 -0
  406. package/{lib/simple-tree → dist/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  407. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  408. package/dist/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +9 -9
  409. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  410. package/dist/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  411. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  412. package/dist/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  413. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  414. package/dist/simple-tree/node-kinds/object/index.d.ts +7 -0
  415. package/dist/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  416. package/dist/simple-tree/node-kinds/object/index.js +15 -0
  417. package/dist/simple-tree/node-kinds/object/index.js.map +1 -0
  418. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNode.d.ts +6 -6
  419. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  420. package/dist/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +9 -17
  421. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  422. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  423. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  424. package/dist/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  425. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  426. package/dist/simple-tree/prepareForInsertion.d.ts +20 -6
  427. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  428. package/dist/simple-tree/prepareForInsertion.js +26 -19
  429. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  430. package/dist/simple-tree/schemaTypes.d.ts +9 -9
  431. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  432. package/dist/simple-tree/schemaTypes.js.map +1 -1
  433. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  434. package/dist/simple-tree/simpleSchema.js.map +1 -1
  435. package/dist/simple-tree/toStoredSchema.d.ts +6 -1
  436. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  437. package/dist/simple-tree/toStoredSchema.js +7 -4
  438. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  439. package/dist/simple-tree/treeNodeValid.d.ts +1 -1
  440. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  441. package/dist/simple-tree/treeNodeValid.js +10 -10
  442. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  443. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +72 -0
  444. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -0
  445. package/dist/simple-tree/{toMapTree.js → unhydratedFlexTreeFromInsertable.js} +136 -178
  446. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -0
  447. package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -1
  448. package/dist/simple-tree/walkFieldSchema.js.map +1 -1
  449. package/dist/tableSchema.d.ts +10 -10
  450. package/dist/treeFactory.d.ts +1 -1
  451. package/dist/treeFactory.d.ts.map +1 -1
  452. package/dist/treeFactory.js +7 -2
  453. package/dist/treeFactory.js.map +1 -1
  454. package/dist/util/bTreeUtils.d.ts.map +1 -1
  455. package/dist/util/bTreeUtils.js.map +1 -1
  456. package/dist/util/breakable.d.ts +23 -4
  457. package/dist/util/breakable.d.ts.map +1 -1
  458. package/dist/util/breakable.js +12 -3
  459. package/dist/util/breakable.js.map +1 -1
  460. package/dist/util/index.d.ts +1 -1
  461. package/dist/util/index.d.ts.map +1 -1
  462. package/dist/util/index.js +2 -1
  463. package/dist/util/index.js.map +1 -1
  464. package/dist/util/utils.d.ts +4 -0
  465. package/dist/util/utils.d.ts.map +1 -1
  466. package/dist/util/utils.js +8 -1
  467. package/dist/util/utils.js.map +1 -1
  468. package/docs/SharedTree Philosophy.md +5 -5
  469. package/docs/user-facing/schema-evolution.md +1 -1
  470. package/lib/alpha.d.ts +2 -0
  471. package/lib/codec/codec.d.ts +33 -3
  472. package/lib/codec/codec.d.ts.map +1 -1
  473. package/lib/codec/codec.js +13 -3
  474. package/lib/codec/codec.js.map +1 -1
  475. package/lib/codec/index.d.ts +1 -1
  476. package/lib/codec/index.d.ts.map +1 -1
  477. package/lib/codec/index.js.map +1 -1
  478. package/lib/codec/versioned/codec.d.ts +35 -2
  479. package/lib/codec/versioned/codec.d.ts.map +1 -1
  480. package/lib/codec/versioned/codec.js +36 -2
  481. package/lib/codec/versioned/codec.js.map +1 -1
  482. package/lib/core/index.d.ts +1 -1
  483. package/lib/core/index.d.ts.map +1 -1
  484. package/lib/core/index.js +1 -1
  485. package/lib/core/index.js.map +1 -1
  486. package/lib/core/rebase/types.d.ts +2 -2
  487. package/lib/core/rebase/types.js +2 -2
  488. package/lib/core/rebase/types.js.map +1 -1
  489. package/lib/core/rebase/utils.d.ts +0 -2
  490. package/lib/core/rebase/utils.d.ts.map +1 -1
  491. package/lib/core/rebase/utils.js +6 -10
  492. package/lib/core/rebase/utils.js.map +1 -1
  493. package/lib/core/schema-stored/formatV1.d.ts +0 -1
  494. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  495. package/lib/core/schema-stored/formatV1.js +0 -1
  496. package/lib/core/schema-stored/formatV1.js.map +1 -1
  497. package/lib/core/schema-stored/index.d.ts +1 -1
  498. package/lib/core/schema-stored/index.d.ts.map +1 -1
  499. package/lib/core/schema-stored/index.js +1 -1
  500. package/lib/core/schema-stored/index.js.map +1 -1
  501. package/lib/core/schema-stored/schema.d.ts +6 -0
  502. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  503. package/lib/core/schema-stored/schema.js +7 -0
  504. package/lib/core/schema-stored/schema.js.map +1 -1
  505. package/lib/core/tree/anchorSet.d.ts +2 -1
  506. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  507. package/lib/core/tree/anchorSet.js +2 -1
  508. package/lib/core/tree/anchorSet.js.map +1 -1
  509. package/lib/core/tree/detachedFieldIndex.d.ts +2 -2
  510. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  511. package/lib/core/tree/detachedFieldIndex.js +6 -2
  512. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  513. package/lib/core/tree/mapTree.d.ts +2 -1
  514. package/lib/core/tree/mapTree.d.ts.map +1 -1
  515. package/lib/core/tree/mapTree.js +11 -5
  516. package/lib/core/tree/mapTree.js.map +1 -1
  517. package/lib/core/tree/pathTree.d.ts +12 -11
  518. package/lib/core/tree/pathTree.d.ts.map +1 -1
  519. package/lib/core/tree/pathTree.js +8 -7
  520. package/lib/core/tree/pathTree.js.map +1 -1
  521. package/lib/core/tree/treeTextFormat.d.ts +1 -1
  522. package/lib/core/tree/treeTextFormat.js +1 -1
  523. package/lib/core/tree/treeTextFormat.js.map +1 -1
  524. package/lib/core/tree/visitorUtils.d.ts +2 -2
  525. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  526. package/lib/core/tree/visitorUtils.js.map +1 -1
  527. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +1 -1
  528. package/lib/feature-libraries/chunked-forest/chunkedForest.js +1 -1
  529. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  530. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -2
  531. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  532. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  533. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  534. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  535. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  536. package/lib/feature-libraries/default-schema/index.js +1 -1
  537. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  538. package/lib/feature-libraries/default-schema/schemaChecker.d.ts +17 -16
  539. package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  540. package/lib/feature-libraries/default-schema/schemaChecker.js +53 -37
  541. package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  542. package/lib/feature-libraries/flex-tree/context.d.ts +32 -8
  543. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  544. package/lib/feature-libraries/flex-tree/context.js +23 -7
  545. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  546. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +37 -16
  547. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  548. package/lib/feature-libraries/flex-tree/flexTreeTypes.js +7 -2
  549. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  550. package/lib/feature-libraries/flex-tree/index.d.ts +2 -2
  551. package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
  552. package/lib/feature-libraries/flex-tree/index.js.map +1 -1
  553. package/lib/feature-libraries/flex-tree/lazyField.d.ts +6 -6
  554. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  555. package/lib/feature-libraries/flex-tree/lazyField.js +1 -1
  556. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  557. package/lib/feature-libraries/flex-tree/lazyNode.d.ts +3 -2
  558. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  559. package/lib/feature-libraries/flex-tree/lazyNode.js +3 -0
  560. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  561. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  562. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  563. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +3 -3
  564. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  565. package/lib/feature-libraries/forest-summary/forestSummarizer.js +2 -2
  566. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  567. package/lib/feature-libraries/index.d.ts +4 -4
  568. package/lib/feature-libraries/index.d.ts.map +1 -1
  569. package/lib/feature-libraries/index.js +3 -3
  570. package/lib/feature-libraries/index.js.map +1 -1
  571. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  572. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  573. package/lib/feature-libraries/indexing/anchorTreeIndex.js +1 -1
  574. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  575. package/lib/feature-libraries/mapTreeCursor.d.ts +39 -3
  576. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  577. package/lib/feature-libraries/mapTreeCursor.js +43 -7
  578. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  579. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  580. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  581. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  582. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  583. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  584. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  585. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  586. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  587. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  588. package/lib/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  589. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  590. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  591. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  592. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  593. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  594. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  595. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  596. package/lib/feature-libraries/modular-schema/isNeverTree.js +0 -2
  597. package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  598. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +1 -1
  599. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  600. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +5 -5
  601. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  602. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  603. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  604. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  605. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  606. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  607. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  608. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  609. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  610. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  611. package/lib/feature-libraries/object-forest/objectForest.d.ts +22 -5
  612. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  613. package/lib/feature-libraries/object-forest/objectForest.js +299 -209
  614. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  615. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  616. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  617. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +4 -3
  618. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  619. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  620. package/lib/feature-libraries/schema-index/codec.d.ts +6 -12
  621. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  622. package/lib/feature-libraries/schema-index/codec.js +8 -15
  623. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  624. package/lib/feature-libraries/schema-index/formatV1.d.ts +2 -2
  625. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  626. package/lib/feature-libraries/schema-index/formatV1.js +2 -2
  627. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  628. package/lib/feature-libraries/schema-index/index.d.ts +1 -1
  629. package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
  630. package/lib/feature-libraries/schema-index/index.js +1 -1
  631. package/lib/feature-libraries/schema-index/index.js.map +1 -1
  632. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  633. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  634. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  635. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  636. package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
  637. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  638. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  639. package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  640. package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
  641. package/lib/feature-libraries/sequence-field/rebase.js +1 -1
  642. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  643. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  644. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  645. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  646. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  647. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  648. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  649. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  650. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  651. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  652. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  653. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  654. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  655. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  656. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  657. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  658. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  659. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  660. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  661. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  662. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  663. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  664. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  665. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  666. package/lib/feature-libraries/sequence-field/utils.d.ts +7 -5
  667. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  668. package/lib/feature-libraries/sequence-field/utils.js +7 -5
  669. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  670. package/lib/feature-libraries/treeCursorUtils.d.ts +5 -1
  671. package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  672. package/lib/feature-libraries/treeCursorUtils.js +10 -4
  673. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  674. package/lib/feature-libraries/treeTextCursor.d.ts +1 -1
  675. package/lib/feature-libraries/treeTextCursor.js +1 -1
  676. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  677. package/lib/index.d.ts +3 -3
  678. package/lib/index.d.ts.map +1 -1
  679. package/lib/index.js +0 -2
  680. package/lib/index.js.map +1 -1
  681. package/lib/packageVersion.d.ts +1 -1
  682. package/lib/packageVersion.d.ts.map +1 -1
  683. package/lib/packageVersion.js +1 -1
  684. package/lib/packageVersion.js.map +1 -1
  685. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  686. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
  687. package/lib/shared-tree/independentView.d.ts +1 -1
  688. package/lib/shared-tree/independentView.d.ts.map +1 -1
  689. package/lib/shared-tree/independentView.js +10 -5
  690. package/lib/shared-tree/independentView.js.map +1 -1
  691. package/lib/shared-tree/index.d.ts +1 -1
  692. package/lib/shared-tree/index.d.ts.map +1 -1
  693. package/lib/shared-tree/index.js +1 -1
  694. package/lib/shared-tree/index.js.map +1 -1
  695. package/lib/shared-tree/schematizeTree.d.ts +1 -1
  696. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  697. package/lib/shared-tree/schematizeTree.js.map +1 -1
  698. package/lib/shared-tree/schematizingTreeView.d.ts +12 -2
  699. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  700. package/lib/shared-tree/schematizingTreeView.js +35 -22
  701. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  702. package/lib/shared-tree/sharedTree.d.ts +6 -6
  703. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  704. package/lib/shared-tree/sharedTree.js +12 -11
  705. package/lib/shared-tree/sharedTree.js.map +1 -1
  706. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  707. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  708. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  709. package/lib/shared-tree/tree.d.ts.map +1 -1
  710. package/lib/shared-tree/tree.js +2 -18
  711. package/lib/shared-tree/tree.js.map +1 -1
  712. package/lib/shared-tree/treeAlpha.d.ts +78 -5
  713. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  714. package/lib/shared-tree/treeAlpha.js +53 -9
  715. package/lib/shared-tree/treeAlpha.js.map +1 -1
  716. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  717. package/lib/shared-tree/treeCheckout.js +9 -5
  718. package/lib/shared-tree/treeCheckout.js.map +1 -1
  719. package/lib/shared-tree-core/branch.d.ts +2 -2
  720. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  721. package/lib/shared-tree-core/branch.js +2 -2
  722. package/lib/shared-tree-core/branch.js.map +1 -1
  723. package/lib/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  724. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  725. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  726. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  727. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  728. package/lib/shared-tree-core/editManager.d.ts +3 -1
  729. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  730. package/lib/shared-tree-core/editManager.js +4 -2
  731. package/lib/shared-tree-core/editManager.js.map +1 -1
  732. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  733. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  734. package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  735. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  736. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  737. package/lib/shared-tree-core/messageCodecs.d.ts +1 -1
  738. package/lib/shared-tree-core/messageCodecs.js +1 -1
  739. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  740. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  741. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  742. package/lib/shared-tree-core/sharedTreeCore.d.ts +2 -2
  743. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  744. package/lib/shared-tree-core/sharedTreeCore.js +4 -4
  745. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  746. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  747. package/lib/shared-tree-core/transaction.js +1 -1
  748. package/lib/shared-tree-core/transaction.js.map +1 -1
  749. package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  750. package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
  751. package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
  752. package/lib/simple-tree/api/conciseTree.js +1 -1
  753. package/lib/simple-tree/api/conciseTree.js.map +1 -1
  754. package/lib/simple-tree/api/configuration.d.ts +2 -2
  755. package/lib/simple-tree/api/configuration.js +2 -2
  756. package/lib/simple-tree/api/configuration.js.map +1 -1
  757. package/lib/simple-tree/api/create.d.ts +10 -29
  758. package/lib/simple-tree/api/create.d.ts.map +1 -1
  759. package/lib/simple-tree/api/create.js +23 -45
  760. package/lib/simple-tree/api/create.js.map +1 -1
  761. package/lib/simple-tree/api/customTree.d.ts +5 -1
  762. package/lib/simple-tree/api/customTree.d.ts.map +1 -1
  763. package/lib/simple-tree/api/customTree.js +10 -3
  764. package/lib/simple-tree/api/customTree.js.map +1 -1
  765. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  766. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
  767. package/lib/simple-tree/api/identifierIndex.js +1 -1
  768. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  769. package/lib/simple-tree/api/index.d.ts +2 -3
  770. package/lib/simple-tree/api/index.d.ts.map +1 -1
  771. package/lib/simple-tree/api/index.js +2 -5
  772. package/lib/simple-tree/api/index.js.map +1 -1
  773. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  774. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  775. package/lib/simple-tree/api/schemaFactory.d.ts +14 -6
  776. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  777. package/lib/simple-tree/api/schemaFactory.js +44 -15
  778. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  779. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  780. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  781. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -3
  782. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  783. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  784. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  785. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  786. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  787. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  788. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  789. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  790. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +1 -3
  791. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  792. package/lib/simple-tree/api/storedSchema.d.ts +1 -1
  793. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  794. package/lib/simple-tree/api/storedSchema.js +3 -2
  795. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  796. package/lib/simple-tree/api/tree.d.ts +2 -2
  797. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  798. package/lib/simple-tree/api/tree.js.map +1 -1
  799. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  800. package/lib/simple-tree/api/treeBeta.js +1 -1
  801. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  802. package/lib/simple-tree/api/treeNodeApi.d.ts +44 -6
  803. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  804. package/lib/simple-tree/api/treeNodeApi.js +55 -29
  805. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  806. package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
  807. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  808. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  809. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  810. package/lib/simple-tree/api/verboseTree.js +14 -11
  811. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  812. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  813. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +1 -3
  814. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  815. package/lib/simple-tree/core/context.d.ts.map +1 -1
  816. package/lib/simple-tree/core/context.js.map +1 -1
  817. package/lib/simple-tree/core/getOrCreateNode.d.ts +1 -1
  818. package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  819. package/lib/simple-tree/core/getOrCreateNode.js +3 -2
  820. package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
  821. package/lib/simple-tree/core/index.d.ts +2 -2
  822. package/lib/simple-tree/core/index.d.ts.map +1 -1
  823. package/lib/simple-tree/core/index.js +2 -2
  824. package/lib/simple-tree/core/index.js.map +1 -1
  825. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  826. package/lib/simple-tree/core/treeNode.js +1 -1
  827. package/lib/simple-tree/core/treeNode.js.map +1 -1
  828. package/lib/simple-tree/core/treeNodeKernel.d.ts +18 -28
  829. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  830. package/lib/simple-tree/core/treeNodeKernel.js +26 -34
  831. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  832. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  833. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  834. package/lib/simple-tree/core/types.d.ts.map +1 -1
  835. package/lib/simple-tree/core/types.js.map +1 -1
  836. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +128 -59
  837. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  838. package/lib/simple-tree/core/unhydratedFlexTree.js +167 -182
  839. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  840. package/lib/simple-tree/core/withType.d.ts +1 -1
  841. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  842. package/lib/simple-tree/core/withType.js.map +1 -1
  843. package/lib/simple-tree/createContext.d.ts.map +1 -1
  844. package/lib/simple-tree/createContext.js.map +1 -1
  845. package/lib/simple-tree/getTreeNodeForField.d.ts.map +1 -1
  846. package/lib/simple-tree/getTreeNodeForField.js.map +1 -1
  847. package/lib/simple-tree/index.d.ts +4 -11
  848. package/lib/simple-tree/index.d.ts.map +1 -1
  849. package/lib/simple-tree/index.js +4 -8
  850. package/lib/simple-tree/index.js.map +1 -1
  851. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  852. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  853. package/lib/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  854. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  855. package/lib/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +10 -11
  856. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  857. package/lib/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  858. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  859. package/lib/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  860. package/{dist/simple-tree → lib/simple-tree/node-kinds/array}/arrayNodeTypes.js.map +1 -1
  861. package/lib/simple-tree/node-kinds/array/index.d.ts +7 -0
  862. package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  863. package/lib/simple-tree/node-kinds/array/index.js +7 -0
  864. package/lib/simple-tree/node-kinds/array/index.js.map +1 -0
  865. package/lib/simple-tree/node-kinds/index.d.ts +8 -0
  866. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -0
  867. package/lib/simple-tree/node-kinds/index.js +8 -0
  868. package/lib/simple-tree/node-kinds/index.js.map +1 -0
  869. package/lib/simple-tree/node-kinds/map/index.d.ts +7 -0
  870. package/lib/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  871. package/lib/simple-tree/node-kinds/map/index.js +7 -0
  872. package/lib/simple-tree/node-kinds/map/index.js.map +1 -0
  873. package/{dist/simple-tree → lib/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  874. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  875. package/lib/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +9 -9
  876. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  877. package/lib/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  878. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  879. package/lib/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  880. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  881. package/lib/simple-tree/node-kinds/object/index.d.ts +7 -0
  882. package/lib/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  883. package/lib/simple-tree/node-kinds/object/index.js +7 -0
  884. package/lib/simple-tree/node-kinds/object/index.js.map +1 -0
  885. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNode.d.ts +6 -6
  886. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  887. package/lib/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +9 -17
  888. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  889. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  890. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  891. package/lib/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  892. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  893. package/lib/simple-tree/prepareForInsertion.d.ts +20 -6
  894. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  895. package/lib/simple-tree/prepareForInsertion.js +25 -19
  896. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  897. package/lib/simple-tree/schemaTypes.d.ts +9 -9
  898. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  899. package/lib/simple-tree/schemaTypes.js.map +1 -1
  900. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  901. package/lib/simple-tree/simpleSchema.js.map +1 -1
  902. package/lib/simple-tree/toStoredSchema.d.ts +6 -1
  903. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  904. package/lib/simple-tree/toStoredSchema.js +5 -2
  905. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  906. package/lib/simple-tree/treeNodeValid.d.ts +1 -1
  907. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  908. package/lib/simple-tree/treeNodeValid.js +2 -2
  909. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  910. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +72 -0
  911. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -0
  912. package/lib/simple-tree/{toMapTree.js → unhydratedFlexTreeFromInsertable.js} +138 -179
  913. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -0
  914. package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -1
  915. package/lib/simple-tree/walkFieldSchema.js.map +1 -1
  916. package/lib/tableSchema.d.ts +10 -10
  917. package/lib/treeFactory.d.ts +1 -1
  918. package/lib/treeFactory.d.ts.map +1 -1
  919. package/lib/treeFactory.js +7 -2
  920. package/lib/treeFactory.js.map +1 -1
  921. package/lib/util/bTreeUtils.d.ts.map +1 -1
  922. package/lib/util/bTreeUtils.js.map +1 -1
  923. package/lib/util/breakable.d.ts +23 -4
  924. package/lib/util/breakable.d.ts.map +1 -1
  925. package/lib/util/breakable.js +12 -3
  926. package/lib/util/breakable.js.map +1 -1
  927. package/lib/util/index.d.ts +1 -1
  928. package/lib/util/index.d.ts.map +1 -1
  929. package/lib/util/index.js +1 -1
  930. package/lib/util/index.js.map +1 -1
  931. package/lib/util/utils.d.ts +4 -0
  932. package/lib/util/utils.d.ts.map +1 -1
  933. package/lib/util/utils.js +6 -0
  934. package/lib/util/utils.js.map +1 -1
  935. package/package.json +22 -22
  936. package/src/codec/codec.ts +37 -6
  937. package/src/codec/index.ts +1 -0
  938. package/src/codec/versioned/codec.ts +42 -5
  939. package/src/core/index.ts +1 -0
  940. package/src/core/rebase/types.ts +2 -2
  941. package/src/core/rebase/utils.ts +10 -10
  942. package/src/core/schema-stored/formatV1.ts +0 -2
  943. package/src/core/schema-stored/index.ts +1 -0
  944. package/src/core/schema-stored/schema.ts +7 -0
  945. package/src/core/tree/anchorSet.ts +2 -1
  946. package/src/core/tree/detachedFieldIndex.ts +13 -4
  947. package/src/core/tree/mapTree.ts +22 -7
  948. package/src/core/tree/pathTree.ts +12 -11
  949. package/src/core/tree/treeTextFormat.ts +1 -1
  950. package/src/core/tree/visitorUtils.ts +2 -2
  951. package/src/feature-libraries/chunked-forest/chunkedForest.ts +1 -1
  952. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +4 -3
  953. package/src/feature-libraries/default-schema/index.ts +1 -1
  954. package/src/feature-libraries/default-schema/schemaChecker.ts +51 -35
  955. package/src/feature-libraries/flex-tree/context.ts +46 -15
  956. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +39 -17
  957. package/src/feature-libraries/flex-tree/index.ts +4 -0
  958. package/src/feature-libraries/flex-tree/lazyField.ts +9 -7
  959. package/src/feature-libraries/flex-tree/lazyNode.ts +6 -2
  960. package/src/feature-libraries/flex-tree/utilities.ts +1 -1
  961. package/src/feature-libraries/forest-summary/forestSummarizer.ts +4 -3
  962. package/src/feature-libraries/index.ts +10 -2
  963. package/src/feature-libraries/indexing/anchorTreeIndex.ts +4 -2
  964. package/src/feature-libraries/mapTreeCursor.ts +103 -16
  965. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +1 -0
  966. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +1 -1
  967. package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +1 -1
  968. package/src/feature-libraries/modular-schema/genericFieldKind.ts +4 -2
  969. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -0
  970. package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +1 -0
  971. package/src/feature-libraries/modular-schema/isNeverTree.ts +0 -2
  972. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +10 -6
  973. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2 -0
  974. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +1 -0
  975. package/src/feature-libraries/node-identifier/mockNodeIdentifierManager.ts +11 -5
  976. package/src/feature-libraries/object-forest/objectForest.ts +65 -7
  977. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +5 -8
  978. package/src/feature-libraries/schema-index/codec.ts +13 -21
  979. package/src/feature-libraries/schema-index/formatV1.ts +2 -2
  980. package/src/feature-libraries/schema-index/index.ts +0 -1
  981. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -1
  982. package/src/feature-libraries/sequence-field/formatV3.ts +1 -0
  983. package/src/feature-libraries/sequence-field/markQueue.ts +1 -0
  984. package/src/feature-libraries/sequence-field/prune.ts +1 -0
  985. package/src/feature-libraries/sequence-field/rebase.ts +1 -1
  986. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +1 -1
  987. package/src/feature-libraries/sequence-field/replaceRevisions.ts +3 -1
  988. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +2 -2
  989. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +3 -3
  990. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +3 -3
  991. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +2 -2
  992. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +1 -1
  993. package/src/feature-libraries/sequence-field/utils.ts +7 -5
  994. package/src/feature-libraries/treeCursorUtils.ts +23 -12
  995. package/src/feature-libraries/treeTextCursor.ts +1 -1
  996. package/src/index.ts +2 -4
  997. package/src/packageVersion.ts +1 -1
  998. package/src/shared-tree/checkoutFlexTreeView.ts +1 -0
  999. package/src/shared-tree/independentView.ts +10 -3
  1000. package/src/shared-tree/index.ts +4 -1
  1001. package/src/shared-tree/schematizeTree.ts +2 -1
  1002. package/src/shared-tree/schematizingTreeView.ts +42 -24
  1003. package/src/shared-tree/sharedTree.ts +35 -22
  1004. package/src/shared-tree/sharedTreeChangeFamily.ts +1 -1
  1005. package/src/shared-tree/tree.ts +6 -21
  1006. package/src/shared-tree/treeAlpha.ts +159 -29
  1007. package/src/shared-tree/treeCheckout.ts +9 -5
  1008. package/src/shared-tree-core/branch.ts +3 -4
  1009. package/src/shared-tree-core/branchCommitEnricher.ts +3 -1
  1010. package/src/shared-tree-core/defaultResubmitMachine.ts +2 -0
  1011. package/src/shared-tree-core/editManager.ts +4 -2
  1012. package/src/shared-tree-core/editManagerCodecs.ts +1 -0
  1013. package/src/shared-tree-core/editManagerSummarizer.ts +1 -1
  1014. package/src/shared-tree-core/messageCodecs.ts +1 -1
  1015. package/src/shared-tree-core/sequenceIdUtils.ts +1 -0
  1016. package/src/shared-tree-core/sharedTreeCore.ts +5 -5
  1017. package/src/shared-tree-core/transaction.ts +4 -2
  1018. package/src/shared-tree-core/transactionEnricher.ts +2 -0
  1019. package/src/simple-tree/api/conciseTree.ts +3 -2
  1020. package/src/simple-tree/api/configuration.ts +4 -4
  1021. package/src/simple-tree/api/create.ts +52 -99
  1022. package/src/simple-tree/api/customTree.ts +14 -4
  1023. package/src/simple-tree/api/getSimpleSchema.ts +1 -0
  1024. package/src/simple-tree/api/identifierIndex.ts +1 -1
  1025. package/src/simple-tree/api/index.ts +2 -14
  1026. package/src/simple-tree/api/schemaCompatibilityTester.ts +2 -0
  1027. package/src/simple-tree/api/schemaFactory.ts +89 -35
  1028. package/src/simple-tree/api/schemaFactoryAlpha.ts +8 -6
  1029. package/src/simple-tree/api/schemaFactoryRecursive.ts +3 -3
  1030. package/src/simple-tree/api/schemaFromSimple.ts +3 -1
  1031. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -3
  1032. package/src/simple-tree/api/storedSchema.ts +5 -4
  1033. package/src/simple-tree/api/tree.ts +3 -4
  1034. package/src/simple-tree/api/treeBeta.ts +3 -2
  1035. package/src/simple-tree/api/treeNodeApi.ts +115 -45
  1036. package/src/simple-tree/api/typesUnsafe.ts +1 -1
  1037. package/src/simple-tree/api/verboseTree.ts +16 -13
  1038. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +1 -3
  1039. package/src/simple-tree/core/context.ts +1 -0
  1040. package/src/simple-tree/core/getOrCreateNode.ts +6 -3
  1041. package/src/simple-tree/core/index.ts +2 -3
  1042. package/src/simple-tree/core/treeNode.ts +1 -1
  1043. package/src/simple-tree/core/treeNodeKernel.ts +47 -62
  1044. package/src/simple-tree/core/treeNodeSchema.ts +1 -0
  1045. package/src/simple-tree/core/types.ts +1 -1
  1046. package/src/simple-tree/core/unhydratedFlexTree.ts +224 -262
  1047. package/src/simple-tree/core/withType.ts +1 -1
  1048. package/src/simple-tree/createContext.ts +1 -0
  1049. package/src/simple-tree/getTreeNodeForField.ts +2 -0
  1050. package/src/simple-tree/index.ts +17 -24
  1051. package/src/simple-tree/leafNodeSchema.ts +1 -0
  1052. package/src/simple-tree/{arrayNode.ts → node-kinds/array/arrayNode.ts} +18 -19
  1053. package/src/simple-tree/{arrayNodeTypes.ts → node-kinds/array/arrayNodeTypes.ts} +3 -3
  1054. package/src/simple-tree/node-kinds/array/index.ts +18 -0
  1055. package/src/simple-tree/node-kinds/index.ts +39 -0
  1056. package/src/simple-tree/node-kinds/map/index.ts +16 -0
  1057. package/src/simple-tree/{mapNode.ts → node-kinds/map/mapNode.ts} +14 -17
  1058. package/src/simple-tree/{mapNodeTypes.ts → node-kinds/map/mapNodeTypes.ts} +3 -3
  1059. package/src/simple-tree/node-kinds/object/index.ts +16 -0
  1060. package/src/simple-tree/{objectNode.ts → node-kinds/object/objectNode.ts} +32 -45
  1061. package/src/simple-tree/{objectNodeTypes.ts → node-kinds/object/objectNodeTypes.ts} +5 -5
  1062. package/src/simple-tree/prepareForInsertion.ts +50 -43
  1063. package/src/simple-tree/schemaTypes.ts +12 -10
  1064. package/src/simple-tree/simpleSchema.ts +1 -0
  1065. package/src/simple-tree/toStoredSchema.ts +10 -3
  1066. package/src/simple-tree/treeNodeValid.ts +3 -3
  1067. package/src/simple-tree/{toMapTree.ts → unhydratedFlexTreeFromInsertable.ts} +138 -249
  1068. package/src/simple-tree/walkFieldSchema.ts +0 -1
  1069. package/src/treeFactory.ts +7 -2
  1070. package/src/util/bTreeUtils.ts +1 -0
  1071. package/src/util/breakable.ts +19 -4
  1072. package/src/util/index.ts +1 -0
  1073. package/src/util/utils.ts +7 -0
  1074. package/dist/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  1075. package/dist/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  1076. package/dist/simple-tree/api/testRecursiveDomain.js +0 -45
  1077. package/dist/simple-tree/api/testRecursiveDomain.js.map +0 -1
  1078. package/dist/simple-tree/arrayNode.d.ts.map +0 -1
  1079. package/dist/simple-tree/arrayNode.js.map +0 -1
  1080. package/dist/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  1081. package/dist/simple-tree/mapNode.d.ts.map +0 -1
  1082. package/dist/simple-tree/mapNode.js.map +0 -1
  1083. package/dist/simple-tree/mapNodeTypes.d.ts.map +0 -1
  1084. package/dist/simple-tree/mapNodeTypes.js.map +0 -1
  1085. package/dist/simple-tree/objectNode.d.ts.map +0 -1
  1086. package/dist/simple-tree/objectNode.js.map +0 -1
  1087. package/dist/simple-tree/objectNodeTypes.d.ts.map +0 -1
  1088. package/dist/simple-tree/objectNodeTypes.js.map +0 -1
  1089. package/dist/simple-tree/toMapTree.d.ts +0 -98
  1090. package/dist/simple-tree/toMapTree.d.ts.map +0 -1
  1091. package/dist/simple-tree/toMapTree.js.map +0 -1
  1092. package/lib/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  1093. package/lib/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  1094. package/lib/simple-tree/api/testRecursiveDomain.js +0 -41
  1095. package/lib/simple-tree/api/testRecursiveDomain.js.map +0 -1
  1096. package/lib/simple-tree/arrayNode.d.ts.map +0 -1
  1097. package/lib/simple-tree/arrayNode.js.map +0 -1
  1098. package/lib/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  1099. package/lib/simple-tree/arrayNodeTypes.js.map +0 -1
  1100. package/lib/simple-tree/mapNode.d.ts.map +0 -1
  1101. package/lib/simple-tree/mapNode.js.map +0 -1
  1102. package/lib/simple-tree/mapNodeTypes.d.ts.map +0 -1
  1103. package/lib/simple-tree/mapNodeTypes.js.map +0 -1
  1104. package/lib/simple-tree/objectNode.d.ts.map +0 -1
  1105. package/lib/simple-tree/objectNode.js.map +0 -1
  1106. package/lib/simple-tree/objectNodeTypes.d.ts.map +0 -1
  1107. package/lib/simple-tree/objectNodeTypes.js.map +0 -1
  1108. package/lib/simple-tree/toMapTree.d.ts +0 -98
  1109. package/lib/simple-tree/toMapTree.d.ts.map +0 -1
  1110. package/lib/simple-tree/toMapTree.js.map +0 -1
  1111. package/src/simple-tree/api/testRecursiveDomain.ts +0 -53
@@ -1,98 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import { type ExclusiveMapTree } from "../core/index.js";
6
- import { type NodeIdentifierManager } from "../feature-libraries/index.js";
7
- import { type ImplicitAllowedTypes, type ImplicitFieldSchema } from "./schemaTypes.js";
8
- import { type TreeNode, type TreeNodeSchema, type Unhydrated } from "./core/index.js";
9
- import type { IFluidHandle } from "@fluidframework/core-interfaces";
10
- /**
11
- * Module notes:
12
- *
13
- * The flow of the below code is in terms of the structure of the input data. We then verify that the associated
14
- * schema is appropriate for that kind of data. This is fine while we have a 1:1 mapping of kind of input data to
15
- * the kind of schema we expect for it (e.g. an input that is an array always need to be associated with a sequence in
16
- * the schema). If/when we begin accepting kinds of input data that are ambiguous (e.g. accepting an input that is an
17
- * array of key/value tuples to instantiate a map) we may need to rethink the structure here to be based more on the
18
- * schema than on the input data.
19
- */
20
- /**
21
- * Transforms an input {@link TypedNode} tree to a {@link MapTree}.
22
- * @param data - The input tree to be converted.
23
- * If the data is an unsupported value (e.g. NaN), a fallback value will be used when supported,
24
- * otherwise an error will be thrown.
25
- *
26
- * Fallbacks:
27
- *
28
- * * `NaN` =\> `null`
29
- *
30
- * * `+/-∞` =\> `null`
31
- *
32
- * * `-0` =\> `+0`
33
- *
34
- * For fields with a default value, the field may be omitted.
35
- * If `context` is not provided, defaults which require a context will be left empty which can be out of schema.
36
- *
37
- * @param allowedTypes - The set of types allowed by the parent context. Used to validate the input tree.
38
- * @param context - An optional context which, if present, will allow defaults to be created by {@link ContextualFieldProvider}s.
39
- * If absent, only defaults from {@link ConstantFieldProvider}s will be created.
40
- * @param schemaValidationPolicy - The stored schema and policy to be used for validation, if the policy says schema
41
- * validation should happen. If it does, the input tree will be validated against this schema + policy, and an error will
42
- * be thrown if the tree does not conform to the schema. If undefined, no validation against the stored schema is done.
43
- *
44
- * TODO:BUG: AB#9131
45
- * This schema validation is done before defaults are provided.
46
- * This can not easily be fixed by reordering things within this implementation since even at the end of this function defaults requiring a context may not have been filled.
47
- * This means schema validation reject required fields getting their value from a default like identifier fields.
48
- *
49
- * @remarks The resulting tree will be populated with any defaults from {@link FieldProvider}s in the schema.
50
- *
51
- * @privateRemarks
52
- * TODO: AB#9126 AB#9131
53
- * When an app wants schema validation, we should ensure data is validated. Doing the validation here is not robust (since many callers to this don't have a context and thus can't opt into validation).
54
- * Additionally the validation here does not correctly handle default values, and introduces a second schema representation which is a bit odd API wise as its typically derivable from the view schema.
55
- * It may make more sense to validate when hydrating the MapTreeNode when the context is known and the defaults are available.
56
- * Applying the "parse don't validate" idiom here could help ensuring we capture when the validation optionally happens in the type system to avoid missing or redundant validation,
57
- * as well as ensuring validation happens after defaulting (or can handle validating data missing defaults)
58
- */
59
- export declare function mapTreeFromNodeData(data: InsertableContent, allowedTypes: ImplicitAllowedTypes, context?: NodeIdentifierManager): ExclusiveMapTree;
60
- export declare function mapTreeFromNodeData(data: InsertableContent | undefined, allowedTypes: ImplicitFieldSchema, context?: NodeIdentifierManager): ExclusiveMapTree | undefined;
61
- /**
62
- * Returns all types for which the data is schema-compatible.
63
- */
64
- export declare function getPossibleTypes(allowedTypes: ReadonlySet<TreeNodeSchema>, data: FactoryContent): TreeNodeSchema[];
65
- /**
66
- * Walk the given {@link ExclusiveMapTree} and deeply provide any field defaults for fields that are missing in the tree but present in the schema.
67
- * @param mapTree - The tree to populate with defaults. This is borrowed: no references to it are kept by this function.
68
- * @param allowedTypes - Some {@link TreeNodeSchema}, at least one of which the input tree must conform to
69
- * @param context - An optional context for generating defaults.
70
- * If present, all applicable defaults will be provided.
71
- * If absent, only defaults produced by a {@link ConstantFieldProvider} will be provided, and defaults produced by a {@link ContextualFieldProvider} will be ignored.
72
- * @remarks This function mutates the input tree by deeply adding new fields to the field maps where applicable.
73
- */
74
- export declare function addDefaultsToMapTree(mapTree: ExclusiveMapTree, allowedTypes: ImplicitAllowedTypes, context: NodeIdentifierManager | undefined): void;
75
- /**
76
- * Content which can be used to build a node.
77
- * @remarks
78
- * Can contain unhydrated nodes, but can not be an unhydrated node at the root.
79
- * @system @alpha
80
- */
81
- export type FactoryContent = IFluidHandle | string | number | boolean | null | Iterable<readonly [string, InsertableContent]> | readonly InsertableContent[] | FactoryContentObject;
82
- /**
83
- * Record-like object which can be used to build some kinds of nodes.
84
- * @remarks
85
- * Can contain unhydrated nodes, but can not be an unhydrated node at the root.
86
- *
87
- * Supports object and map nodes.
88
- * @system @alpha
89
- */
90
- export type FactoryContentObject = {
91
- readonly [P in string]?: InsertableContent;
92
- };
93
- /**
94
- * Content which can be inserted into a tree.
95
- * @system @alpha
96
- */
97
- export type InsertableContent = Unhydrated<TreeNode> | FactoryContent;
98
- //# sourceMappingURL=toMapTree.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toMapTree.d.ts","sourceRoot":"","sources":["../../src/simple-tree/toMapTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAMN,KAAK,gBAAgB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGN,KAAK,qBAAqB,EAC1B,MAAM,+BAA+B,CAAC;AAIvC,OAAO,EAEN,KAAK,oBAAoB,EAKzB,KAAK,mBAAmB,EAIxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAMN,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,UAAU,EAEf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE;;;;;;;;;GASG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;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EAAC,MAAM,CAAC,EAAE,CAAC;QACxB,OAAO,IAAA,oBAAS,EAAC,MAAM,CAAC,CAAC,eAAe,EAAE,CAAC;IAC5C,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\tEmptyKey,\n\ttype FieldKey,\n\ttype MapTree,\n\ttype TreeValue,\n\ttype ValueSchema,\n\ttype ExclusiveMapTree,\n} from \"../core/index.js\";\nimport {\n\tisTreeValue,\n\tvalueSchemaAllows,\n\ttype NodeIdentifierManager,\n} from \"../feature-libraries/index.js\";\nimport { brand, isReadonlyArray, find, hasSome, hasSingle } from \"../util/index.js\";\n\nimport { nullSchema } from \"./leafNodeSchema.js\";\nimport {\n\ttype FieldSchema,\n\ttype ImplicitAllowedTypes,\n\tnormalizeAllowedTypes,\n\textractFieldProvider,\n\tisConstant,\n\ttype FieldProvider,\n\ttype ImplicitFieldSchema,\n\tnormalizeFieldSchema,\n\tFieldKind,\n\ttype TreeLeafValue,\n} from \"./schemaTypes.js\";\nimport {\n\tgetKernel,\n\tgetSimpleNodeSchemaFromInnerNode,\n\tisTreeNode,\n\tNodeKind,\n\ttype InnerNode,\n\ttype TreeNode,\n\ttype TreeNodeSchema,\n\ttype Unhydrated,\n\tUnhydratedFlexTreeNode,\n} from \"./core/index.js\";\nimport { isObjectNodeSchema } from \"./objectNodeTypes.js\";\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\n\n/**\n * Module notes:\n *\n * The flow of the below code is in terms of the structure of the input data. We then verify that the associated\n * schema is appropriate for that kind of data. This is fine while we have a 1:1 mapping of kind of input data to\n * the kind of schema we expect for it (e.g. an input that is an array always need to be associated with a sequence in\n * the schema). If/when we begin accepting kinds of input data that are ambiguous (e.g. accepting an input that is an\n * array of key/value tuples to instantiate a map) we may need to rethink the structure here to be based more on the\n * schema than on the input data.\n */\n\n/**\n * Transforms an input {@link TypedNode} tree to a {@link MapTree}.\n * @param data - The input tree to be converted.\n * If the data is an unsupported value (e.g. NaN), a fallback value will be used when supported,\n * otherwise an error will be thrown.\n *\n * Fallbacks:\n *\n * * `NaN` =\\> `null`\n *\n * * `+/-∞` =\\> `null`\n *\n * * `-0` =\\> `+0`\n *\n * For fields with a default value, the field may be omitted.\n * If `context` is not provided, defaults which require a context will be left empty which can be out of schema.\n *\n * @param allowedTypes - The set of types allowed by the parent context. Used to validate the input tree.\n * @param context - An optional context which, if present, will allow defaults to be created by {@link ContextualFieldProvider}s.\n * If absent, only defaults from {@link ConstantFieldProvider}s will be created.\n * @param schemaValidationPolicy - The stored schema and policy to be used for validation, if the policy says schema\n * validation should happen. If it does, the input tree will be validated against this schema + policy, and an error will\n * be thrown if the tree does not conform to the schema. If undefined, no validation against the stored schema is done.\n *\n * TODO:BUG: AB#9131\n * This schema validation is done before defaults are provided.\n * This can not easily be fixed by reordering things within this implementation since even at the end of this function defaults requiring a context may not have been filled.\n * This means schema validation reject required fields getting their value from a default like identifier fields.\n *\n * @remarks The resulting tree will be populated with any defaults from {@link FieldProvider}s in the schema.\n *\n * @privateRemarks\n * TODO: AB#9126 AB#9131\n * When an app wants schema validation, we should ensure data is validated. Doing the validation here is not robust (since many callers to this don't have a context and thus can't opt into validation).\n * Additionally the validation here does not correctly handle default values, and introduces a second schema representation which is a bit odd API wise as its typically derivable from the view schema.\n * It may make more sense to validate when hydrating the MapTreeNode when the context is known and the defaults are available.\n * Applying the \"parse don't validate\" idiom here could help ensuring we capture when the validation optionally happens in the type system to avoid missing or redundant validation,\n * as well as ensuring validation happens after defaulting (or can handle validating data missing defaults)\n */\nexport function mapTreeFromNodeData(\n\tdata: InsertableContent,\n\tallowedTypes: ImplicitAllowedTypes,\n\tcontext?: NodeIdentifierManager,\n): ExclusiveMapTree;\nexport function mapTreeFromNodeData(\n\tdata: InsertableContent | undefined,\n\tallowedTypes: ImplicitFieldSchema,\n\tcontext?: NodeIdentifierManager,\n): ExclusiveMapTree | undefined;\nexport function mapTreeFromNodeData(\n\tdata: InsertableContent | undefined,\n\tallowedTypes: ImplicitFieldSchema,\n\tcontext?: NodeIdentifierManager,\n): ExclusiveMapTree | undefined {\n\tconst normalizedFieldSchema = normalizeFieldSchema(allowedTypes);\n\n\tif (data === undefined) {\n\t\t// TODO: this code-path should support defaults\n\t\tif (normalizedFieldSchema.kind !== FieldKind.Optional) {\n\t\t\tthrow new UsageError(\"Got undefined for non-optional field.\");\n\t\t}\n\t\treturn undefined;\n\t}\n\n\tconst mapTree = nodeDataToMapTree(data, normalizedFieldSchema.allowedTypeSet);\n\t// Add what defaults can be provided. If no `context` is providing, some defaults may still be missing.\n\taddDefaultsToMapTree(mapTree, normalizedFieldSchema.allowedTypes, context);\n\n\treturn mapTree;\n}\n\n/**\n * Copy content from `data` into a MapTree.\n * Does NOT generate and default values for fields.\n * Often throws UsageErrors for invalid data, but may miss some cases.\n * @remarks\n * Output is likely out of schema even for valid input due to missing defaults.\n */\nfunction nodeDataToMapTree(\n\tdata: InsertableContent,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): ExclusiveMapTree {\n\t// A special cache path for processing unhydrated nodes.\n\t// They already have the mapTree, so there is no need to recompute it.\n\tconst innerNode = tryGetInnerNode(data);\n\tif (innerNode !== undefined) {\n\t\tif (innerNode instanceof UnhydratedFlexTreeNode) {\n\t\t\tif (!allowedTypes.has(getSimpleNodeSchemaFromInnerNode(innerNode))) {\n\t\t\t\tthrow new UsageError(\"Invalid schema for this context.\");\n\t\t\t}\n\t\t\t// TODO: mapTreeFromNodeData modifies the trees it gets to add defaults.\n\t\t\t// Using a cached value here can result in this tree having defaults applied to it more than once.\n\t\t\t// This is unnecessary and inefficient, but should be a no-op if all calls provide the same context (which they might not).\n\t\t\t// A cleaner design (avoiding this cast) might be to apply defaults eagerly if they don't need a context, and lazily (when hydrating) if they do.\n\t\t\t// This could avoid having to mutate the map tree to apply defaults, removing the need for this cast.\n\t\t\treturn innerNode.mapTree;\n\t\t} else {\n\t\t\t// The node is already hydrated, meaning that it already got inserted into the tree previously\n\t\t\tthrow new UsageError(\"A node may not be inserted into the tree more than once\");\n\t\t}\n\t}\n\n\tassert(!isTreeNode(data), 0xa23 /* data without an inner node cannot be TreeNode */);\n\n\tconst schema = getType(data, allowedTypes);\n\n\tlet result: ExclusiveMapTree;\n\tswitch (schema.kind) {\n\t\tcase NodeKind.Leaf:\n\t\t\tresult = leafToMapTree(data, schema, allowedTypes);\n\t\t\tbreak;\n\t\tcase NodeKind.Array:\n\t\t\tresult = arrayToMapTree(data, schema);\n\t\t\tbreak;\n\t\tcase NodeKind.Map:\n\t\t\tresult = mapToMapTree(data, schema);\n\t\t\tbreak;\n\t\tcase NodeKind.Object:\n\t\t\tresult = objectToMapTree(data, schema);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tunreachableCase(schema.kind);\n\t}\n\n\treturn result;\n}\n\n/**\n * Transforms data under a Leaf schema.\n * @param data - The tree data to be transformed. Must be a {@link TreeValue}.\n * @param schema - The schema associated with the value.\n * @param allowedTypes - The allowed types specified by the parent.\n * Used to determine which fallback values may be appropriate.\n */\nfunction leafToMapTree(\n\tdata: FactoryContent,\n\tschema: TreeNodeSchema,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): ExclusiveMapTree {\n\tassert(schema.kind === NodeKind.Leaf, 0x921 /* Expected a leaf schema. */);\n\tif (!isTreeValue(data)) {\n\t\t// This rule exists to protect against useless `toString` output like `[object Object]`.\n\t\t// In this case, that's actually reasonable behavior, since object input is not compatible with Leaf schemas.\n\t\t// eslint-disable-next-line @typescript-eslint/no-base-to-string\n\t\tthrow new UsageError(`Input data is incompatible with leaf schema: ${data}`);\n\t}\n\n\tconst mappedValue = mapValueWithFallbacks(data, allowedTypes);\n\tconst mappedSchema = getType(mappedValue, allowedTypes);\n\n\tassert(\n\t\tallowsValue(mappedSchema, mappedValue),\n\t\t0x84a /* Unsupported schema for provided primitive. */,\n\t);\n\n\treturn {\n\t\tvalue: mappedValue,\n\t\ttype: brand(mappedSchema.identifier),\n\t\tfields: new Map(),\n\t};\n}\n\n/**\n * Checks an incoming {@link TreeLeafValue} to ensure it is compatible with its requirements.\n * For unsupported values with a schema-compatible replacement, return the replacement value.\n * For unsupported values without a schema-compatible replacement, throw.\n * For supported values, return the input.\n */\nfunction mapValueWithFallbacks(\n\tvalue: TreeLeafValue,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): TreeValue {\n\tswitch (typeof value) {\n\t\tcase \"number\": {\n\t\t\tif (Object.is(value, -0)) {\n\t\t\t\t// Our serialized data format does not support -0.\n\t\t\t\t// Map such input to +0.\n\t\t\t\treturn 0;\n\t\t\t} else if (!Number.isFinite(value)) {\n\t\t\t\t// Our serialized data format does not support NaN nor +/-∞.\n\t\t\t\t// If the schema supports `null`, fall back to that. Otherwise, throw.\n\t\t\t\t// This is intended to match JSON's behavior for such values.\n\t\t\t\tif (allowedTypes.has(nullSchema)) {\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new UsageError(`Received unsupported numeric value: ${value}.`);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\tcase \"string\":\n\t\t// TODO:\n\t\t// This should detect invalid strings. Something like @stdlib/regexp-utf16-unpaired-surrogate could be used to do this.\n\t\t// See SchemaFactory.string for details.\n\t\tcase \"boolean\":\n\t\t\treturn value;\n\t\tcase \"object\": {\n\t\t\tif (value === null || isFluidHandle(value)) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t\tdefault:\n\t\t\tthrow new UsageError(`Received unsupported leaf value: ${value}.`);\n\t}\n}\n\n/**\n * Transforms data under an Array schema.\n * @param data - The tree data to be transformed.\n * @param allowedTypes - The set of types allowed by the parent context. Used to validate the input tree.\n */\nfunction arrayChildToMapTree(\n\tchild: InsertableContent,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): ExclusiveMapTree {\n\t// We do not support undefined sequence entries.\n\t// If we encounter an undefined entry, use null instead if supported by the schema, otherwise throw.\n\tlet childWithFallback = child;\n\tif (child === undefined) {\n\t\tif (allowedTypes.has(nullSchema)) {\n\t\t\tchildWithFallback = null;\n\t\t} else {\n\t\t\tthrow new TypeError(`Received unsupported array entry value: ${child}.`);\n\t\t}\n\t}\n\treturn nodeDataToMapTree(childWithFallback, allowedTypes);\n}\n\n/**\n * Transforms data under an Array schema.\n * @param data - The tree data to be transformed. Must be an iterable.\n * @param schema - The schema associated with the value.\n * @param schemaValidationPolicy - The stored schema and policy to be used for validation, if the policy says schema\n * validation should happen. If it does, the input tree will be validated against this schema + policy, and an error will\n * be thrown if the tree does not conform to the schema. If undefined, no validation against the stored schema is done.\n */\nfunction arrayToMapTree(data: FactoryContent, schema: TreeNodeSchema): ExclusiveMapTree {\n\tassert(schema.kind === NodeKind.Array, 0x922 /* Expected an array schema. */);\n\tif (!(typeof data === \"object\" && data !== null && Symbol.iterator in data)) {\n\t\tthrow new UsageError(`Input data is incompatible with Array schema: ${data}`);\n\t}\n\n\tconst allowedChildTypes = normalizeAllowedTypes(schema.info as ImplicitAllowedTypes);\n\n\tconst mappedData = Array.from(data, (child) =>\n\t\tarrayChildToMapTree(child, allowedChildTypes),\n\t);\n\n\t// Array nodes have a single `EmptyKey` field:\n\tconst fieldsEntries = mappedData.length === 0 ? [] : ([[EmptyKey, mappedData]] as const);\n\n\treturn {\n\t\ttype: brand(schema.identifier),\n\t\tfields: new Map(fieldsEntries),\n\t};\n}\n\n/**\n * Transforms data under a Map schema.\n * @param data - The tree data to be transformed. Must be an iterable.\n * @param schema - The schema associated with the value.\n * @param schemaValidationPolicy - The stored schema and policy to be used for validation, if the policy says schema\n * validation should happen. If it does, the input tree will be validated against this schema + policy, and an error will\n * be thrown if the tree does not conform to the schema. If undefined, no validation against the stored schema is done.\n */\nfunction mapToMapTree(data: FactoryContent, schema: TreeNodeSchema): ExclusiveMapTree {\n\tassert(schema.kind === NodeKind.Map, 0x923 /* Expected a Map schema. */);\n\tif (!(typeof data === \"object\" && data !== null)) {\n\t\tthrow new UsageError(`Input data is incompatible with Map schema: ${data}`);\n\t}\n\n\tconst allowedChildTypes = normalizeAllowedTypes(schema.info as ImplicitAllowedTypes);\n\n\tconst fieldsIterator = (\n\t\tSymbol.iterator in data\n\t\t\t? // Support iterables of key value pairs (including Map objects)\n\t\t\t\tdata\n\t\t\t: // Support record objects for JSON style Map data\n\t\t\t\tObject.entries(data)\n\t) as Iterable<readonly [string, InsertableContent]>;\n\n\tconst transformedFields = new Map<FieldKey, ExclusiveMapTree[]>();\n\tfor (const item of fieldsIterator) {\n\t\tif (!isReadonlyArray(item) || item.length !== 2 || typeof item[0] !== \"string\") {\n\t\t\tthrow new UsageError(`Input data is incompatible with map entry: ${item}`);\n\t\t}\n\t\tconst [key, value] = item;\n\t\tassert(!transformedFields.has(brand(key)), 0x84c /* Keys should not be duplicated */);\n\n\t\t// Omit undefined values - an entry with an undefined value is equivalent to one that has been removed or omitted\n\t\tif (value !== undefined) {\n\t\t\tconst mappedField = nodeDataToMapTree(value, allowedChildTypes);\n\t\t\ttransformedFields.set(brand(key), [mappedField]);\n\t\t}\n\t}\n\n\treturn {\n\t\ttype: brand(schema.identifier),\n\t\tfields: transformedFields,\n\t};\n}\n\n/**\n * Transforms data under an Object schema.\n * @param data - The tree data to be transformed. Must be a Record-like object.\n * @param schema - The schema associated with the value.\n */\nfunction objectToMapTree(data: FactoryContent, schema: TreeNodeSchema): ExclusiveMapTree {\n\tassert(isObjectNodeSchema(schema), 0x924 /* Expected an Object schema. */);\n\tif (\n\t\ttypeof data !== \"object\" ||\n\t\tdata === null ||\n\t\tSymbol.iterator in data ||\n\t\tisFluidHandle(data)\n\t) {\n\t\tthrow new UsageError(`Input data is incompatible with Object schema: ${data}`);\n\t}\n\n\tconst fields = new Map<FieldKey, ExclusiveMapTree[]>();\n\n\t// Loop through field keys without data.\n\t// This does NOT apply defaults.\n\tfor (const [key, fieldInfo] of schema.flexKeyMap) {\n\t\tif (checkFieldProperty(data, key)) {\n\t\t\tconst value = (data as Record<string, InsertableContent>)[key as string];\n\t\t\tsetFieldValue(fields, value, fieldInfo.schema, fieldInfo.storedKey);\n\t\t}\n\t}\n\n\treturn {\n\t\ttype: brand(schema.identifier),\n\t\tfields,\n\t};\n}\n\n/**\n * Check {@link FactoryContentObject} for a property which could be store a field.\n * @remarks\n * The currently policy is to only consider own properties.\n * See {@link InsertableObjectFromSchemaRecord} for where this policy is documented in the public API.\n *\n * Explicit undefined members are considered to exist, as long as they are own properties.\n */\nfunction checkFieldProperty(\n\tdata: FactoryContentObject,\n\tkey: string | symbol,\n): data is {\n\treadonly [P in string]: InsertableContent | undefined;\n} {\n\t// This policy only allows own properties.\n\treturn Object.hasOwnProperty.call(data, key);\n}\n\nfunction setFieldValue(\n\tfields: Map<FieldKey, readonly MapTree[]>,\n\tfieldValue: InsertableContent | undefined,\n\tfieldSchema: FieldSchema,\n\tflexKey: FieldKey,\n): void {\n\tif (fieldValue !== undefined) {\n\t\tconst mappedChildTree = nodeDataToMapTree(fieldValue, fieldSchema.allowedTypeSet);\n\n\t\tassert(!fields.has(flexKey), 0x956 /* Keys must not be duplicated */);\n\t\tfields.set(flexKey, [mappedChildTree]);\n\t}\n}\n\nfunction getType(\n\tdata: FactoryContent,\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n): TreeNodeSchema {\n\tconst possibleTypes = getPossibleTypes(allowedTypes, data);\n\tif (possibleTypes.length === 0) {\n\t\tthrow new UsageError(\n\t\t\t`The provided data is incompatible with all of the types allowed by the schema. The set of allowed types is: ${JSON.stringify(\n\t\t\t\t[...allowedTypes].map((schema) => schema.identifier),\n\t\t\t)}.`,\n\t\t);\n\t}\n\tassert(\n\t\thasSome(possibleTypes),\n\t\t0x84e /* data is incompatible with all types allowed by the schema */,\n\t);\n\tif (!hasSingle(possibleTypes)) {\n\t\tthrow new UsageError(\n\t\t\t`The provided data is compatible with more than one type allowed by the schema.\nThe set of possible types is ${JSON.stringify([\n\t\t\t\t...possibleTypes.map((schema) => schema.identifier),\n\t\t\t])}.\nExplicitly construct an unhydrated node of the desired type to disambiguate.\nFor class-based schema, this can be done by replacing an expression like \"{foo: 1}\" with \"new MySchema({foo: 1})\".`,\n\t\t);\n\t}\n\treturn possibleTypes[0];\n}\n\n/**\n * Returns all types for which the data is schema-compatible.\n */\nexport function getPossibleTypes(\n\tallowedTypes: ReadonlySet<TreeNodeSchema>,\n\tdata: FactoryContent,\n): TreeNodeSchema[] {\n\tlet best = CompatibilityLevel.None;\n\tconst possibleTypes: TreeNodeSchema[] = [];\n\tfor (const schema of allowedTypes) {\n\t\tconst level = shallowCompatibilityTest(schema, data);\n\t\tif (level > best) {\n\t\t\tpossibleTypes.length = 0;\n\t\t\tbest = level;\n\t\t}\n\t\tif (best === level) {\n\t\t\tpossibleTypes.push(schema);\n\t\t}\n\t}\n\treturn best === CompatibilityLevel.None ? [] : possibleTypes;\n}\n\n/**\n * Indicates a compatibility level for inferring a schema to apply to insertable data.\n * @remarks\n * Only the highest compatibility options are used.\n * This approach allows adding new possible matching at a new lower compatibility level as a non breaking change,\n * since that way they can't make a case that was compatible before ambiguous now.\n */\nenum CompatibilityLevel {\n\t/**\n\t * Not compatible. Constructor typing indicates incompatibility.\n\t */\n\tNone = 0,\n\t/**\n\t * Additional compatibility cases added in Fluid Framework 2.2.\n\t */\n\tLow = 1,\n\t/**\n\t * Compatible in Fluid Framework 2.0.\n\t */\n\tNormal = 2,\n}\n\n/**\n * Checks if data might be schema-compatible.\n *\n * @returns false if `data` is incompatible with `type` based on a cheap/shallow check.\n *\n * Note that this may return true for cases where data is incompatible, but it must not return false in cases where the data is compatible.\n */\nfunction shallowCompatibilityTest(\n\tschema: TreeNodeSchema,\n\tdata: FactoryContent,\n): CompatibilityLevel {\n\tassert(data !== undefined, 0x889 /* undefined cannot be used as FactoryContent. */);\n\n\tif (isTreeValue(data)) {\n\t\treturn allowsValue(schema, data) ? CompatibilityLevel.Normal : CompatibilityLevel.None;\n\t}\n\tif (schema.kind === NodeKind.Leaf) {\n\t\treturn CompatibilityLevel.None;\n\t}\n\n\t// Typing (of schema based constructors and thus implicit node construction)\n\t// allows iterables for constructing maps and arrays.\n\t// Some users of this API may have unions of maps and arrays,\n\t// and rely on Arrays ending up as array nodes and maps as Map nodes,\n\t// despite both being iterable and thus compatible with both.\n\t// This uses a priority based system where an array would be parsed as an array when unioned with a map,\n\t// but if in a map only context, could still be used as a map.\n\n\tif (data instanceof Map) {\n\t\tswitch (schema.kind) {\n\t\t\tcase NodeKind.Map:\n\t\t\t\treturn CompatibilityLevel.Normal;\n\t\t\tcase NodeKind.Array:\n\t\t\t\t// Maps are iterable, so type checking does allow constructing an ArrayNode from a map if the array's type is an array that includes the key and value types of the map.\n\t\t\t\treturn CompatibilityLevel.Low;\n\t\t\tdefault:\n\t\t\t\treturn CompatibilityLevel.None;\n\t\t}\n\t}\n\n\tif (isReadonlyArray(data)) {\n\t\tswitch (schema.kind) {\n\t\t\tcase NodeKind.Array:\n\t\t\t\treturn CompatibilityLevel.Normal;\n\t\t\tcase NodeKind.Map:\n\t\t\t\t// Arrays are iterable, so type checking does allow constructing an array from a MapNode from an if the array's type is key values pairs for the map.\n\t\t\t\treturn CompatibilityLevel.Low;\n\t\t\tdefault:\n\t\t\t\treturn CompatibilityLevel.None;\n\t\t}\n\t}\n\n\tconst mapOrArray = schema.kind === NodeKind.Array || schema.kind === NodeKind.Map;\n\n\tif (Symbol.iterator in data) {\n\t\treturn mapOrArray ? CompatibilityLevel.Normal : CompatibilityLevel.None;\n\t}\n\n\t// At this point, it is assumed data is a record-like object since all the other cases have been eliminated.\n\n\tif (schema.kind === NodeKind.Array) {\n\t\treturn CompatibilityLevel.None;\n\t}\n\n\tif (schema.kind === NodeKind.Map) {\n\t\t// When not unioned with an ObjectNode, allow objects to be used to create maps.\n\t\treturn CompatibilityLevel.Low;\n\t}\n\n\tassert(isObjectNodeSchema(schema), 0x9e6 /* unexpected schema kind */);\n\n\t// TODO: Improve type inference by making this logic more thorough. Handle at least:\n\t// * Types which are strict subsets of other types in the same polymorphic union\n\t// * Types which have the same keys but different types for those keys in the polymorphic union\n\t// * Types which have the same required fields but different optional fields and enough of those optional fields are populated to disambiguate\n\n\t// TODO#7441: Consider allowing data to be inserted which has keys that are extraneous/unknown to the schema (those keys are ignored)\n\n\t// If the schema has a required key which is not present in the input object, reject it.\n\tfor (const [fieldKey, fieldSchema] of schema.fields) {\n\t\tif (fieldSchema.requiresValue) {\n\t\t\tif (checkFieldProperty(data, fieldKey)) {\n\t\t\t\tif (data[fieldKey] === undefined) {\n\t\t\t\t\treturn CompatibilityLevel.None;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\treturn CompatibilityLevel.None;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn CompatibilityLevel.Normal;\n}\n\nfunction allowsValue(schema: TreeNodeSchema, value: TreeValue): boolean {\n\tif (schema.kind === NodeKind.Leaf) {\n\t\treturn valueSchemaAllows(schema.info as ValueSchema, value);\n\t}\n\treturn false;\n}\n\n/**\n * Walk the given {@link ExclusiveMapTree} and deeply provide any field defaults for fields that are missing in the tree but present in the schema.\n * @param mapTree - The tree to populate with defaults. This is borrowed: no references to it are kept by this function.\n * @param allowedTypes - Some {@link TreeNodeSchema}, at least one of which the input tree must conform to\n * @param context - An optional context for generating defaults.\n * If present, all applicable defaults will be provided.\n * If absent, only defaults produced by a {@link ConstantFieldProvider} will be provided, and defaults produced by a {@link ContextualFieldProvider} will be ignored.\n * @remarks This function mutates the input tree by deeply adding new fields to the field maps where applicable.\n */\nexport function addDefaultsToMapTree(\n\tmapTree: ExclusiveMapTree,\n\tallowedTypes: ImplicitAllowedTypes,\n\tcontext: NodeIdentifierManager | undefined,\n): void {\n\tconst schema =\n\t\tfind(normalizeAllowedTypes(allowedTypes), (s) => s.identifier === mapTree.type) ??\n\t\tfail(0xae1 /* MapTree is incompatible with schema */);\n\n\tif (isObjectNodeSchema(schema)) {\n\t\tfor (const [_key, fieldInfo] of schema.flexKeyMap) {\n\t\t\tconst field = mapTree.fields.get(fieldInfo.storedKey);\n\t\t\tif (field !== undefined) {\n\t\t\t\tfor (const child of field) {\n\t\t\t\t\taddDefaultsToMapTree(child, fieldInfo.schema.allowedTypes, context);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst defaultProvider = fieldInfo.schema.props?.defaultProvider;\n\t\t\t\tif (defaultProvider !== undefined) {\n\t\t\t\t\tconst fieldProvider = extractFieldProvider(defaultProvider);\n\t\t\t\t\tconst data = provideDefault(fieldProvider, context);\n\t\t\t\t\tif (data !== undefined) {\n\t\t\t\t\t\tsetFieldValue(mapTree.fields, data, fieldInfo.schema, fieldInfo.storedKey);\n\t\t\t\t\t\t// call addDefaultsToMapTree on newly inserted default values\n\t\t\t\t\t\tfor (const child of mapTree.fields.get(fieldInfo.storedKey) ??\n\t\t\t\t\t\t\tfail(0xae2 /* Expected field to be populated */)) {\n\t\t\t\t\t\t\taddDefaultsToMapTree(child, fieldInfo.schema.allowedTypes, context);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}\n\n\tswitch (schema.kind) {\n\t\tcase NodeKind.Array:\n\t\tcase NodeKind.Map:\n\t\t\t{\n\t\t\t\tfor (const field of mapTree.fields.values()) {\n\t\t\t\t\tfor (const child of field) {\n\t\t\t\t\t\taddDefaultsToMapTree(child, schema.info as ImplicitAllowedTypes, context);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tassert(schema.kind === NodeKind.Leaf, 0x989 /* Unrecognized schema kind */);\n\t\t\tbreak;\n\t}\n}\n\n/**\n * Provides the default value (which can be undefined, for example with optional fields), or undefined if a context is required but not provided.\n * @privateRemarks\n * It is a bit concerning that there is no way for the caller to know when undefined is returned if that is the default value, or a context was required.\n * TODO: maybe better formalize the two stage defaulting (without then with context), or rework this design we only do one stage.\n */\nfunction provideDefault(\n\tfieldProvider: FieldProvider,\n\tcontext: NodeIdentifierManager | undefined,\n): InsertableContent | undefined {\n\tif (context !== undefined) {\n\t\treturn fieldProvider(context);\n\t} else {\n\t\tif (isConstant(fieldProvider)) {\n\t\t\treturn fieldProvider();\n\t\t} else {\n\t\t\t// Leaving field empty despite it needing a default value since a context was required and none was provided.\n\t\t\t// Caller better handle this case by providing the default at some other point in time when the context becomes known.\n\t\t}\n\t}\n}\n\n/**\n * Retrieves the InnerNode associated with the given target via {@link setInnerNode}, if any.\n * @remarks\n * If `target` is a unhydrated node, returns its MapTreeNode.\n * If `target` is a cooked node (or marinated but a FlexTreeNode exists) returns the FlexTreeNode.\n * If the target is not a node, or a marinated node with no FlexTreeNode for its anchor, returns undefined.\n */\nfunction tryGetInnerNode(target: unknown): InnerNode | undefined {\n\tif (isTreeNode(target)) {\n\t\treturn getKernel(target).tryGetInnerNode();\n\t}\n}\n\n/**\n * Content which can be used to build a node.\n * @remarks\n * Can contain unhydrated nodes, but can not be an unhydrated node at the root.\n * @system @alpha\n */\nexport type FactoryContent =\n\t| IFluidHandle\n\t| string\n\t| number\n\t| boolean\n\t// eslint-disable-next-line @rushstack/no-new-null\n\t| null\n\t| Iterable<readonly [string, InsertableContent]>\n\t| readonly InsertableContent[]\n\t| FactoryContentObject;\n\n/**\n * Record-like object which can be used to build some kinds of nodes.\n * @remarks\n * Can contain unhydrated nodes, but can not be an unhydrated node at the root.\n *\n * Supports object and map nodes.\n * @system @alpha\n */\nexport type FactoryContentObject = {\n\treadonly [P in string]?: InsertableContent;\n};\n\n/**\n * Content which can be inserted into a tree.\n * @system @alpha\n */\nexport type InsertableContent = Unhydrated<TreeNode> | FactoryContent;\n"]}
@@ -1,62 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- import type { FieldKind } from "../schemaTypes.js";
6
- import type { NodeKind } from "../core/index.js";
7
- /**
8
- * To make API-Extractor happy, the base type has to be exported in addition to the actual schema class.
9
- * Ideally this would be inlined into the class definition below.
10
- *
11
- * TODO:
12
- * Fix API-Extractor to support class based schema, and remove this workaround (inline this type into `RecursiveObject extends` below).
13
- * Error: src/class-tree/testRecursiveDomain.ts:32:1 - (ae-forgotten-export) The symbol "RecursiveObject_base" needs to be exported by the entry point index.d.ts
14
- * See https://github.com/microsoft/rushstack/issues/4429
15
- * @internal
16
- */
17
- export declare const base: import("../core/treeNodeSchema.js").TreeNodeSchemaClass<"Test Recursive Domain.testObject", NodeKind.Object, import("./typesUnsafe.js").System_Unsafe.TreeObjectNodeUnsafe<{
18
- readonly recursive: import("./typesUnsafe.js").System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, readonly [() => typeof RecursiveObject], unknown>;
19
- readonly number: import("../leafNodeSchema.js").LeafSchema<"number", number>;
20
- }, "Test Recursive Domain.testObject">, object & {
21
- readonly number: number;
22
- } & {
23
- readonly recursive?: RecursiveObject | undefined;
24
- }, false, {
25
- readonly recursive: import("./typesUnsafe.js").System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, readonly [() => typeof RecursiveObject], unknown>;
26
- readonly number: import("../leafNodeSchema.js").LeafSchema<"number", number>;
27
- }>;
28
- /**
29
- * @internal
30
- */
31
- export declare class RecursiveObject extends base {
32
- }
33
- /**
34
- * Due to https://github.com/microsoft/TypeScript/issues/55832 this is expected to compile to a d.ts file which contain `any`, and therefore the other (above) approach using class definitions is recommended for recursive schema.
35
- * See {@link SchemaFactory} for documentation covering this detail.
36
- * @internal
37
- */
38
- export declare const RecursiveObjectPojoMode: import("../core/treeNodeSchema.js").TreeNodeSchemaClass<"Test Recursive Domain.testPOJOObject", NodeKind.Object, import("./typesUnsafe.js").System_Unsafe.TreeObjectNodeUnsafe<{
39
- readonly recursive: import("./typesUnsafe.js").System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, readonly [() => import("../core/treeNodeSchema.js").TreeNodeSchemaClass<"Test Recursive Domain.testPOJOObject", NodeKind.Object, import("./typesUnsafe.js").System_Unsafe.TreeObjectNodeUnsafe<any, "Test Recursive Domain.testPOJOObject">, object & {
40
- readonly number: number;
41
- } & {
42
- readonly recursive?: import("./typesUnsafe.js").System_Unsafe.TreeObjectNodeUnsafe<any, "Test Recursive Domain.testPOJOObject"> | undefined;
43
- }, false, any>], unknown>;
44
- readonly number: import("../leafNodeSchema.js").LeafSchema<"number", number>;
45
- }, "Test Recursive Domain.testPOJOObject">, object & {
46
- readonly number: number;
47
- } & {
48
- readonly recursive?: import("./typesUnsafe.js").System_Unsafe.TreeObjectNodeUnsafe<{
49
- readonly recursive: import("./typesUnsafe.js").System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, readonly [() => import("../core/treeNodeSchema.js").TreeNodeSchemaClass<"Test Recursive Domain.testPOJOObject", NodeKind.Object, import("./typesUnsafe.js").System_Unsafe.TreeObjectNodeUnsafe<any, "Test Recursive Domain.testPOJOObject">, object & {
50
- readonly number: number;
51
- } & any, false, any>], unknown>;
52
- readonly number: import("../leafNodeSchema.js").LeafSchema<"number", number>;
53
- }, "Test Recursive Domain.testPOJOObject"> | undefined;
54
- }, false, {
55
- readonly recursive: import("./typesUnsafe.js").System_Unsafe.FieldSchemaUnsafe<FieldKind.Optional, readonly [() => import("../core/treeNodeSchema.js").TreeNodeSchemaClass<"Test Recursive Domain.testPOJOObject", NodeKind.Object, import("./typesUnsafe.js").System_Unsafe.TreeObjectNodeUnsafe<any, "Test Recursive Domain.testPOJOObject">, object & {
56
- readonly number: number;
57
- } & {
58
- readonly recursive?: import("./typesUnsafe.js").System_Unsafe.TreeObjectNodeUnsafe<any, "Test Recursive Domain.testPOJOObject"> | undefined;
59
- }, false, any>], unknown>;
60
- readonly number: import("../leafNodeSchema.js").LeafSchema<"number", number>;
61
- }>;
62
- //# sourceMappingURL=testRecursiveDomain.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testRecursiveDomain.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/testRecursiveDomain.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD;;;;;;;;;GASG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;EAGf,CAAC;AAEH;;GAEG;AACH,qBAAa,eAAgB,SAAQ,IAAI;CAAG;AAE5C;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;EAGlC,CAAC"}
@@ -1,41 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
- /**
6
- * This file exists and is package exported to aid in testing of exporting recursive types across package boundaries.
7
- * Sometimes when TypeScript generates d.ts files, they type check significantly differently than the original source (One example of this: https://github.com/microsoft/TypeScript/issues/20979).
8
- * Unfortunately our recursive schema types are an example of types that have this kind of issue: the d.ts files tend to get "any" instead of the recursive type reference.
9
- * Currently we do not have tooling in place to test this in our test suite, and exporting these types here is a temporary crutch to aid in diagnosing this issue.
10
- */
11
- import { SchemaFactory } from "./schemaFactory.js";
12
- const builder = new SchemaFactory("Test Recursive Domain");
13
- /**
14
- * To make API-Extractor happy, the base type has to be exported in addition to the actual schema class.
15
- * Ideally this would be inlined into the class definition below.
16
- *
17
- * TODO:
18
- * Fix API-Extractor to support class based schema, and remove this workaround (inline this type into `RecursiveObject extends` below).
19
- * Error: src/class-tree/testRecursiveDomain.ts:32:1 - (ae-forgotten-export) The symbol "RecursiveObject_base" needs to be exported by the entry point index.d.ts
20
- * See https://github.com/microsoft/rushstack/issues/4429
21
- * @internal
22
- */
23
- export const base = builder.objectRecursive("testObject", {
24
- recursive: builder.optionalRecursive([() => RecursiveObject]),
25
- number: builder.number,
26
- });
27
- /**
28
- * @internal
29
- */
30
- export class RecursiveObject extends base {
31
- }
32
- /**
33
- * Due to https://github.com/microsoft/TypeScript/issues/55832 this is expected to compile to a d.ts file which contain `any`, and therefore the other (above) approach using class definitions is recommended for recursive schema.
34
- * See {@link SchemaFactory} for documentation covering this detail.
35
- * @internal
36
- */
37
- export const RecursiveObjectPojoMode = builder.objectRecursive("testPOJOObject", {
38
- recursive: builder.optionalRecursive([() => RecursiveObjectPojoMode]),
39
- number: builder.number,
40
- });
41
- //# sourceMappingURL=testRecursiveDomain.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"testRecursiveDomain.js","sourceRoot":"","sources":["../../../src/simple-tree/api/testRecursiveDomain.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAUnD,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,uBAAuB,CAAC,CAAC;AAE3D;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,YAAY,EAAE;IACzD,SAAS,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC;IAC7D,MAAM,EAAE,OAAO,CAAC,MAAM;CACtB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,IAAI;CAAG;AAE5C;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,OAAO,CAAC,eAAe,CAAC,gBAAgB,EAAE;IAChF,SAAS,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,CAAC;IACrE,MAAM,EAAE,OAAO,CAAC,MAAM;CACtB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * This file exists and is package exported to aid in testing of exporting recursive types across package boundaries.\n * Sometimes when TypeScript generates d.ts files, they type check significantly differently than the original source (One example of this: https://github.com/microsoft/TypeScript/issues/20979).\n * Unfortunately our recursive schema types are an example of types that have this kind of issue: the d.ts files tend to get \"any\" instead of the recursive type reference.\n * Currently we do not have tooling in place to test this in our test suite, and exporting these types here is a temporary crutch to aid in diagnosing this issue.\n */\n\nimport { SchemaFactory } from \"./schemaFactory.js\";\n// This type is referred to by the base type generated by builder.object.\n// Adding the import of it here prevents TypeScript from generating inline includes for it in the d.ts file.\n// If we let TypeScript generate these includes, they use relative paths which break API extractor's rollup.\n// API-Extractor issue: https://github.com/microsoft/rushstack/issues/4507\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports\nimport type { FieldKind } from \"../schemaTypes.js\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports\nimport type { NodeKind } from \"../core/index.js\";\n\nconst builder = new SchemaFactory(\"Test Recursive Domain\");\n\n/**\n * To make API-Extractor happy, the base type has to be exported in addition to the actual schema class.\n * Ideally this would be inlined into the class definition below.\n *\n * TODO:\n * Fix API-Extractor to support class based schema, and remove this workaround (inline this type into `RecursiveObject extends` below).\n * Error: src/class-tree/testRecursiveDomain.ts:32:1 - (ae-forgotten-export) The symbol \"RecursiveObject_base\" needs to be exported by the entry point index.d.ts\n * See https://github.com/microsoft/rushstack/issues/4429\n * @internal\n */\nexport const base = builder.objectRecursive(\"testObject\", {\n\trecursive: builder.optionalRecursive([() => RecursiveObject]),\n\tnumber: builder.number,\n});\n\n/**\n * @internal\n */\nexport class RecursiveObject extends base {}\n\n/**\n * Due to https://github.com/microsoft/TypeScript/issues/55832 this is expected to compile to a d.ts file which contain `any`, and therefore the other (above) approach using class definitions is recommended for recursive schema.\n * See {@link SchemaFactory} for documentation covering this detail.\n * @internal\n */\nexport const RecursiveObjectPojoMode = builder.objectRecursive(\"testPOJOObject\", {\n\trecursive: builder.optionalRecursive([() => RecursiveObjectPojoMode]),\n\tnumber: builder.number,\n});\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"arrayNode.d.ts","sourceRoot":"","sources":["../../src/simple-tree/arrayNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,OAAO,EAGN,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,0CAA0C,EAC/C,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,gCAAgC,EAErC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,KAAK,QAAQ,EAGb,QAAQ,EACR,KAAK,QAAQ,EASb,MAAM,iBAAiB,CAAC;AAUzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EACX,2BAA2B,EAC3B,4BAA4B,EAC5B,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,QAAQ,GAAG,aAAa,CAClE,SAAQ,aAAa,CAAC,CAAC,CAAC,EACvB,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC;CAAG;AAEzD;;;;;;;;;GASG;AACH,MAAM,WAAW,aAAa,CAC7B,aAAa,SAAS,aAAa,CAAC,0BAA0B,GAAG,oBAAoB,EACrF,GAAG,CAAC,CAAC,GAAG,CAAC,aAAa,CAAC,SAAS,CAAC,oBAAoB,CAAC,GACnD,gCAAgC,CAAC,aAAa,CAAC,GAC/C,gCAAgC,CAAC,oBAAoB,CAAC,EACzD,EAAE,CAAC,IAAI,GAAG,CAAC,aAAa,CAAC,SAAS,CAAC,oBAAoB,CAAC,GACrD,0CAA0C,CAAC,aAAa,CAAC,GACzD,0CAA0C,CAAC,oBAAoB,CAAC,EACnE,EAAE,CAAC,SAAS,GAAG,iBAAiB,CAC/B,SAAQ,iBAAi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AE,CAAC;QACtD,MAAM,IAAI,UAAU,CACnB,uCAAuC,UAAU,oBAAoB,CACrE,CAAC;IACH,CAAC;AACF,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Lazy, oob, fail } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { EmptyKey, type ExclusiveMapTree } from \"../core/index.js\";\nimport {\n\ttype FlexTreeNode,\n\ttype FlexTreeSequenceField,\n\tisFlexTreeNode,\n} from \"../feature-libraries/index.js\";\nimport {\n\tnormalizeAllowedTypes,\n\tunannotateImplicitAllowedTypes,\n\ttype ImplicitAllowedTypes,\n\ttype ImplicitAnnotatedAllowedTypes,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype NodeSchemaMetadata,\n\ttype TreeLeafValue,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype UnannotateImplicitAllowedTypes,\n} from \"./schemaTypes.js\";\nimport {\n\ttype WithType,\n\t// eslint-disable-next-line import/no-deprecated\n\ttypeNameSymbol,\n\tNodeKind,\n\ttype TreeNode,\n\ttype InternalTreeNode,\n\ttype TreeNodeSchema,\n\ttypeSchemaSymbol,\n\ttype Context,\n\tgetOrCreateNodeFromInnerNode,\n\tgetSimpleNodeSchemaFromInnerNode,\n\tgetOrCreateInnerNode,\n\ttype TreeNodeSchemaClass,\n} from \"./core/index.js\";\nimport { type InsertableContent, mapTreeFromNodeData } from \"./toMapTree.js\";\nimport { prepareArrayContentForInsertion } from \"./prepareForInsertion.js\";\nimport {\n\tgetKernel,\n\tUnhydratedFlexTreeNode,\n\tUnhydratedTreeSequenceField,\n} from \"./core/index.js\";\nimport { TreeNodeValid, type MostDerivedData } from \"./treeNodeValid.js\";\nimport { getUnhydratedContext } from \"./createContext.js\";\nimport type { System_Unsafe } from \"./api/index.js\";\nimport type {\n\tArrayNodeCustomizableSchema,\n\tArrayNodePojoEmulationSchema,\n} from \"./arrayNodeTypes.js\";\n\n/**\n * A covariant base type for {@link (TreeArrayNode:interface)}.\n *\n * This provides the readonly subset of TreeArrayNode functionality, and is used as the source interface for moves since that needs to be covariant.\n * @privateRemarks\n * Ideally this would just include `TreeNode, WithType<string, NodeKind.Array>` in the extends list but https://github.com/microsoft/TypeScript/issues/16936 prevents that from compiling.\n * As a workaround around for this TypeScript limitation, the conflicting type intersection is wrapped in `Awaited` (which has no effect on the type in this case) which allows it to compile.\n * @system @sealed @public\n */\nexport interface ReadonlyArrayNode<out T = TreeNode | TreeLeafValue>\n\textends ReadonlyArray<T>,\n\t\tAwaited<TreeNode & WithType<string, NodeKind.Array>> {}\n\n/**\n * A {@link TreeNode} which implements 'readonly T[]' and the array mutation APIs.\n *\n * @typeParam TAllowedTypes - Schema for types which are allowed as members of this array.\n * @typeParam T - Use Default: Do not specify. Type of values to read from the array.\n * @typeParam TNew - Use Default: Do not specify. Type of values to write into the array.\n * @typeParam TMoveFrom - Use Default: Do not specify. Type of node from which children can be moved into this array.\n *\n * @sealed @public\n */\nexport interface TreeArrayNode<\n\tTAllowedTypes extends System_Unsafe.ImplicitAllowedTypesUnsafe = ImplicitAllowedTypes,\n\tout T = [TAllowedTypes] extends [ImplicitAllowedTypes]\n\t\t? TreeNodeFromImplicitAllowedTypes<TAllowedTypes>\n\t\t: TreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>,\n\tin TNew = [TAllowedTypes] extends [ImplicitAllowedTypes]\n\t\t? InsertableTreeNodeFromImplicitAllowedTypes<TAllowedTypes>\n\t\t: InsertableTreeNodeFromImplicitAllowedTypes<ImplicitAllowedTypes>,\n\tin TMoveFrom = ReadonlyArrayNode,\n> extends ReadonlyArrayNode<T> {\n\t/**\n\t * Inserts new item(s) at a specified location.\n\t * @param index - The index at which to insert `value`.\n\t * @param value - The content to insert.\n\t * @throws Throws if `index` is not in the range [0, `array.length`).\n\t */\n\tinsertAt(index: number, ...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;\n\n\t/**\n\t * Inserts new item(s) at the start of the array.\n\t * @param value - The content to insert.\n\t */\n\tinsertAtStart(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;\n\n\t/**\n\t * Inserts new item(s) at the end of the array.\n\t * @param value - The content to insert.\n\t */\n\tinsertAtEnd(...value: readonly (TNew | IterableTreeArrayContent<TNew>)[]): void;\n\n\t/**\n\t * Removes the item at the specified location.\n\t * @param index - The index at which to remove the item.\n\t * @throws Throws if `index` is not in the range [0, `array.length`).\n\t */\n\tremoveAt(index: number): void;\n\n\t/**\n\t * Removes all items between the specified indices.\n\t * @param start - The starting index of the range to remove (inclusive). Defaults to the start of the array.\n\t * @param end - The ending index of the range to remove (exclusive). Defaults to `array.length`.\n\t * @throws Throws if `start` is not in the range [0, `array.length`].\n\t * @throws Throws if `end` is less than `start`.\n\t * If `end` is not supplied or is greater than the length of the array, all items after `start` are removed.\n\t *\n\t * @remarks\n\t * The default values for start and end are computed when this is called,\n\t * and thus the behavior is the same as providing them explicitly, even with respect to merge resolution with concurrent edits.\n\t * For example, two concurrent transactions both emptying the array with `node.removeRange()` then inserting an item,\n\t * will merge to result in the array having both inserted items.\n\t */\n\tremoveRange(start?: number, end?: number): void;\n\n\t/**\n\t * Moves the specified item to the start of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToStart(sourceIndex: number): void;\n\n\t/**\n\t * Moves the specified item to the start of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @param source - The source array to move the item out of.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToStart(sourceIndex: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified item to the end of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToEnd(sourceIndex: number): void;\n\n\t/**\n\t * Moves the specified item to the end of the array.\n\t * @param sourceIndex - The index of the item to move.\n\t * @param source - The source array to move the item out of.\n\t * @throws Throws if `sourceIndex` is not in the range [0, `array.length`).\n\t */\n\tmoveToEnd(sourceIndex: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified item to the desired location in the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceIndex - The index of the item to move.\n\t * @throws Throws if any of the input indices are not in the range [0, `array.length`).\n\t */\n\tmoveToIndex(destinationGap: number, sourceIndex: number): void;\n\n\t/**\n\t * Moves the specified item to the desired location in the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceIndex - The index of the item to move.\n\t * @param source - The source array to move the item out of.\n\t * @throws Throws if any of the source index is not in the range [0, `array.length`),\n\t * or if the index is not in the range [0, `array.length`].\n\t */\n\tmoveToIndex(destinationGap: number, sourceIndex: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified items to the start of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @throws Throws if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToStart(sourceStart: number, sourceEnd: number): void;\n\n\t/**\n\t * Moves the specified items to the start of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @param source - The source array to move items out of.\n\t * @throws Throws if the types of any of the items being moved are not allowed in the destination array,\n\t * if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToStart(sourceStart: number, sourceEnd: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified items to the end of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @throws Throws if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToEnd(sourceStart: number, sourceEnd: number): void;\n\n\t/**\n\t * Moves the specified items to the end of the array.\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @param source - The source array to move items out of.\n\t * @throws Throws if the types of any of the items being moved are not allowed in the destination array,\n\t * if either of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToEnd(sourceStart: number, sourceEnd: number, source: TMoveFrom): void;\n\n\t/**\n\t * Moves the specified items to the desired location within the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @throws Throws if any of the input indices are not in the range [0, `array.length`) or if `sourceStart` is greater than `sourceEnd`.\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToIndex(destinationGap: number, sourceStart: number, sourceEnd: number): void;\n\n\t/**\n\t * Moves the specified items to the desired location within the array.\n\t *\n\t * WARNING - This API is easily misused.\n\t * Please read the documentation for the `destinationGap` parameter carefully.\n\t *\n\t * @param destinationGap - The location *between* existing items that the moved item should be moved to.\n\t *\n\t * WARNING - `destinationGap` describes a location between existing items *prior to applying the move operation*.\n\t *\n\t * For example, if the array contains items `[A, B, C]` before the move, the `destinationGap` must be one of the following:\n\t *\n\t * - `0` (between the start of the array and `A`'s original position)\n\t *\n\t * - `1` (between `A`'s original position and `B`'s original position)\n\t *\n\t * - `2` (between `B`'s original position and `C`'s original position)\n\t *\n\t * - `3` (between `C`'s original position and the end of the array)\n\t *\n\t * So moving `A` between `B` and `C` would require `destinationGap` to be `2`.\n\t *\n\t * This interpretation of `destinationGap` makes it easy to specify the desired destination relative to a sibling item that is not being moved,\n\t * or relative to the start or end of the array:\n\t *\n\t * - Move to the start of the array: `array.moveToIndex(0, ...)` (see also `moveToStart`)\n\t *\n\t * - Move to before some item X: `array.moveToIndex(indexOfX, ...)`\n\t *\n\t * - Move to after some item X: `array.moveToIndex(indexOfX + 1`, ...)\n\t *\n\t * - Move to the end of the array: `array.moveToIndex(array.length, ...)` (see also `moveToEnd`)\n\t *\n\t * This interpretation of `destinationGap` does however make it less obvious how to move an item relative to its current position:\n\t *\n\t * - Move item B before its predecessor: `array.moveToIndex(indexOfB - 1, ...)`\n\t *\n\t * - Move item B after its successor: `array.moveToIndex(indexOfB + 2, ...)`\n\t *\n\t * Notice the asymmetry between `-1` and `+2` in the above examples.\n\t * In such scenarios, it can often be easier to approach such edits by swapping adjacent items:\n\t * If items A and B are adjacent, such that A precedes B,\n\t * then they can be swapped with `array.moveToIndex(indexOfA, indexOfB)`.\n\t *\n\t * @param sourceStart - The starting index of the range to move (inclusive).\n\t * @param sourceEnd - The ending index of the range to move (exclusive)\n\t * @param source - The source array to move items out of.\n\t * @throws Throws if the types of any of the items being moved are not allowed in the destination array,\n\t * if any of the input indices are not in the range [0, `array.length`], or if `sourceStart` is greater than `sourceEnd`.\n\t */\n\tmoveRangeToIndex(\n\t\tdestinationGap: number,\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource: TMoveFrom,\n\t): void;\n\n\t/**\n\t * Returns a custom IterableIterator which throws usage errors if concurrent editing and iteration occurs.\n\t */\n\tvalues(): IterableIterator<T>;\n}\n\n/**\n * A {@link TreeNode} which implements 'readonly T[]' and the array mutation APIs.\n * @public\n */\nexport const TreeArrayNode = {\n\t/**\n\t * Wrap an iterable of items to inserted as consecutive items in a array.\n\t * @remarks\n\t * The object returned by this function can be inserted into a {@link (TreeArrayNode:interface)}.\n\t * Its contents will be inserted consecutively in the corresponding location in the array.\n\t * @example\n\t * ```ts\n\t * array.insertAtEnd(TreeArrayNode.spread(iterable))\n\t * ```\n\t */\n\tspread: <T>(content: Iterable<T>) => create(content),\n} as const;\n\n/**\n * Package internal construction API.\n * Use {@link (TreeArrayNode:variable).spread} to create an instance of this type instead.\n */\nlet create: <T>(content: Iterable<T>) => IterableTreeArrayContent<T>;\n\n/**\n * Used to insert iterable content into a {@link (TreeArrayNode:interface)}.\n * Use {@link (TreeArrayNode:variable).spread} to create an instance of this type.\n * @sealed @public\n */\nexport class IterableTreeArrayContent<T> implements Iterable<T> {\n\tstatic {\n\t\tcreate = <T2>(content: Iterable<T2>) => new IterableTreeArrayContent(content);\n\t}\n\n\tprivate constructor(private readonly content: Iterable<T>) {}\n\n\t/**\n\t * Iterates over content for nodes to insert.\n\t */\n\tpublic [Symbol.iterator](): Iterator<T> {\n\t\treturn this.content[Symbol.iterator]();\n\t}\n}\n\n/**\n * Given a array node proxy, returns its underlying LazySequence field.\n */\nfunction getSequenceField(arrayNode: ReadonlyArrayNode): FlexTreeSequenceField {\n\treturn getOrCreateInnerNode(arrayNode).getBoxed(EmptyKey) as FlexTreeSequenceField;\n}\n\n// For compatibility, we are initially implement 'readonly T[]' by applying the Array.prototype methods\n// to the array node proxy. Over time, we should replace these with efficient implementations on LazySequence\n// to avoid re-entering the proxy as these methods access 'length' and the indexed properties.\n//\n// For brevity, the current implementation dynamically builds a property descriptor map from a list of\n// Array functions we want to re-expose via the proxy.\n\nconst arrayPrototypeKeys = [\n\t\"concat\",\n\t\"entries\",\n\t\"every\",\n\t\"filter\",\n\t\"find\",\n\t\"findIndex\",\n\t\"flat\",\n\t\"flatMap\",\n\t\"forEach\",\n\t\"includes\",\n\t\"indexOf\",\n\t\"join\",\n\t\"keys\",\n\t\"lastIndexOf\",\n\t\"map\",\n\t\"reduce\",\n\t\"reduceRight\",\n\t\"slice\",\n\t\"some\",\n\t\"toLocaleString\",\n\t\"toString\",\n\n\t// \"copyWithin\",\n\t// \"fill\",\n\t// \"length\",\n\t// \"pop\",\n\t// \"push\",\n\t// \"reverse\",\n\t// \"shift\",\n\t// \"sort\",\n\t// \"splice\",\n\t// \"unshift\",\n] as const;\n\n/**\n * {@link TreeNodeValid}, but modified to add members from Array.prototype named in {@link arrayPrototypeKeys}.\n * @privateRemarks\n * Since a lot of scratch types and values are involved with creating this,\n * it's generating using an immediately invoked function expression (IIFE).\n * This is a common JavaScript pattern for cases like this to avoid cluttering the scope.\n */\nconst TreeNodeWithArrayFeatures = (() => {\n\t/**\n\t * {@link TreeNodeValid}, but modified to add members from Array.prototype named in {@link arrayPrototypeKeys}.\n\t */\n\tabstract class TreeNodeWithArrayFeaturesUntyped<\n\t\tconst T extends ImplicitAllowedTypes,\n\t> extends TreeNodeValid<Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>> {}\n\n\t// Modify TreeNodeWithArrayFeaturesUntyped to add the members from Array.prototype\n\tarrayPrototypeKeys.forEach((key) => {\n\t\tObject.defineProperty(TreeNodeWithArrayFeaturesUntyped.prototype, key, {\n\t\t\tvalue: Array.prototype[key],\n\t\t});\n\t});\n\n\treturn TreeNodeWithArrayFeaturesUntyped as unknown as typeof NodeWithArrayFeatures;\n})();\n\n/**\n * Type of {@link TreeNodeValid}, but with array members added to the instance type.\n *\n * TypeScript has a rule that `Base constructors must all have the same return type.ts(2510)`.\n * This means that intersecting two types with different constructors to create a type with a more constrained constructor (ex: more specific return type)\n * is not supported.\n *\n * TypeScript also has a limitation that there is no way to replace or remove just the constructor of a type without losing all the private and protected members.\n * See https://github.com/microsoft/TypeScript/issues/35416 for details.\n *\n * TypeScript also does not support explicitly specifying the instance type in a class definition as the constructor return type.\n *\n * Thus to replace the instance type, while preserving the protected static members of TreeNodeValid,\n * the only option seems to be actually declaring a class with all the members explicitly inline.\n *\n * To avoid incurring any bundle size / runtime overhead from this and having to stub out the function bodies,\n * the class uses `declare`.\n * TypeScript does not support `declare` inside scopes, so this is not inside the function scope above.\n *\n * The members of this class were generated using the \"implement interface\" refactoring.\n * Since that refactoring does not add `public`, the lint to require it is disabled for this section of the file.\n * To update this class delete all members and reapply the \"implement interface\" refactoring.\n * As these signatures get formatted to be over three times as many lines with prettier (which is not helpful), it is also suppressed.\n */\n/* eslint-disable @typescript-eslint/explicit-member-accessibility, @typescript-eslint/no-explicit-any */\n// prettier-ignore\ndeclare abstract class NodeWithArrayFeatures<Input, T>\n\textends TreeNodeValid<Input>\n\timplements Pick<readonly T[], (typeof arrayPrototypeKeys)[number]>\n{\n\tconcat(...items: ConcatArray<T>[]): T[];\n\tconcat(...items: (T | ConcatArray<T>)[]): T[];\n\tentries(): IterableIterator<[number, T]>;\n\tevery<S extends T>(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => value is S,\n\t\tthisArg?: any,\n\t): this is readonly S[];\n\tevery(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): boolean;\n\tfilter<S extends T>(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => value is S,\n\t\tthisArg?: any,\n\t): S[];\n\tfilter(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): T[];\n\tfind<S extends T>(\n\t\tpredicate: (value: T, index: number, obj: readonly T[]) => value is S,\n\t\tthisArg?: any,\n\t): S | undefined;\n\tfind(\n\t\tpredicate: (value: T, index: number, obj: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): T | undefined;\n\tfindIndex(\n\t\tpredicate: (value: T, index: number, obj: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): number;\n\tflat<A, D extends number = 1>(this: A, depth?: D | undefined): FlatArray<A, D>[];\n\tflatMap<U, This = undefined>(\n\t\tcallback: (this: This, value: T, index: number, array: T[]) => U | readonly U[],\n\t\tthisArg?: This | undefined,\n\t): U[];\n\tforEach(\n\t\tcallbackfn: (value: T, index: number, array: readonly T[]) => void,\n\t\tthisArg?: any,\n\t): void;\n\tincludes(searchElement: T, fromIndex?: number | undefined): boolean;\n\tindexOf(searchElement: T, fromIndex?: number | undefined): number;\n\tjoin(separator?: string | undefined): string;\n\tkeys(): IterableIterator<number>;\n\tlastIndexOf(searchElement: T, fromIndex?: number | undefined): number;\n\tmap<U>(callbackfn: (value: T, index: number, array: readonly T[]) => U, thisArg?: any): U[];\n\treduce(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t): T;\n\treduce(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t\tinitialValue: T,\n\t): T;\n\treduce<U>(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: U,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => U,\n\t\tinitialValue: U,\n\t): U;\n\treduceRight(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t): T;\n\treduceRight(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: T,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => T,\n\t\tinitialValue: T,\n\t): T;\n\treduceRight<U>(\n\t\tcallbackfn: (\n\t\t\tpreviousValue: U,\n\t\t\tcurrentValue: T,\n\t\t\tcurrentIndex: number,\n\t\t\tarray: readonly T[],\n\t\t) => U,\n\t\tinitialValue: U,\n\t): U;\n\tslice(start?: number | undefined, end?: number | undefined): T[];\n\tsome(\n\t\tpredicate: (value: T, index: number, array: readonly T[]) => unknown,\n\t\tthisArg?: any,\n\t): boolean;\n\ttoLocaleString(): string;\n\ttoString(): string;\n}\n/* eslint-enable @typescript-eslint/explicit-member-accessibility, @typescript-eslint/no-explicit-any */\n\n/**\n * Attempts to coerce the given property key to an integer index property.\n * @param key - The property key to coerce.\n * @param exclusiveMax - This restricts the range in which the resulting index is allowed to be.\n * The coerced index of `key` must be less than `exclusiveMax` or else this function will return `undefined`.\n * This is useful for reading an array within the bounds of its length, e.g. `asIndex(key, array.length)`.\n */\nexport function asIndex(key: string | symbol, exclusiveMax: number): number | undefined {\n\tif (typeof key !== \"string\") {\n\t\treturn undefined;\n\t}\n\n\t// TODO: It may be worth a '0' <= ch <= '9' check before calling 'Number' to quickly\n\t// reject 'length' as an index, or even parsing integers ourselves.\n\tconst asNumber = Number(key);\n\tif (!Number.isInteger(asNumber)) {\n\t\treturn undefined;\n\t}\n\n\t// Check that the original string is the same after converting to a number and back again.\n\t// This prevents keys like \"5.0\", \"0x5\", \" 5\" from coercing to 5, and keys like \" \" or \"\" from coercing to 0.\n\tconst asString = String(asNumber);\n\tif (asString !== key) {\n\t\treturn undefined;\n\t}\n\n\t// TODO: See 'matrix/range.ts' for fast integer coercing + range check.\n\treturn 0 <= asNumber && asNumber < exclusiveMax ? asNumber : undefined;\n}\n\n/**\n * Create a proxy which implements the {@link TreeArrayNode} API.\n * @param allowAdditionalProperties - If true, setting of unexpected properties will be forwarded to the target object.\n * Otherwise setting of unexpected properties will error.\n * @param proxyTarget - Target object of the proxy. Must provide an own `length` value property\n * (which is not used but must exist for getOwnPropertyDescriptor invariants) and the array functionality from {@link arrayNodePrototype}.\n * Controls the prototype exposed by the produced proxy.\n * @param dispatchTarget - provides the functionally of the node, implementing all fields.\n */\nfunction createArrayNodeProxy(\n\tallowAdditionalProperties: boolean,\n\tproxyTarget: object,\n\tdispatchTarget: object,\n): TreeArrayNode {\n\t// To satisfy 'deepEquals' level scrutiny, the target of the proxy must be an array literal in order\n\t// to pass 'Object.getPrototypeOf'. It also satisfies 'Array.isArray' and 'Object.prototype.toString'\n\t// requirements without use of Array[Symbol.species], which is potentially on a path ot deprecation.\n\tconst proxy: TreeArrayNode = new Proxy<TreeArrayNode>(proxyTarget as TreeArrayNode, {\n\t\tget: (target, key, receiver) => {\n\t\t\tconst field = getSequenceField(receiver);\n\t\t\tconst maybeIndex = asIndex(key, field.length);\n\n\t\t\tif (maybeIndex === undefined) {\n\t\t\t\tif (key === \"length\") {\n\t\t\t\t\treturn field.length;\n\t\t\t\t}\n\n\t\t\t\t// Pass the proxy as the receiver here, so that any methods on\n\t\t\t\t// the prototype receive `proxy` as `this`.\n\t\t\t\treturn Reflect.get(dispatchTarget, key, receiver) as unknown;\n\t\t\t}\n\n\t\t\tconst maybeContent = field.at(maybeIndex);\n\t\t\treturn isFlexTreeNode(maybeContent)\n\t\t\t\t? getOrCreateNodeFromInnerNode(maybeContent)\n\t\t\t\t: maybeContent;\n\t\t},\n\t\tset: (target, key, newValue, receiver) => {\n\t\t\tif (key === \"length\") {\n\t\t\t\t// To allow \"length\" to look like \"length\" on an array, getOwnPropertyDescriptor has to report it as a writable value.\n\t\t\t\t// This means the proxy target must provide a length value, but since it can't use getters and setters, it can't be correct.\n\t\t\t\t// Therefor length has to be handled in this proxy.\n\t\t\t\t// Since it's not actually mutable, return false so setting it will produce a type error.\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// 'Symbol.isConcatSpreadable' may be set on an Array instance to modify the behavior of\n\t\t\t// the concat method. We allow this property to be added to the dispatch object.\n\t\t\tif (key === Symbol.isConcatSpreadable) {\n\t\t\t\treturn Reflect.set(dispatchTarget, key, newValue, receiver);\n\t\t\t}\n\n\t\t\t// Array nodes treat all non-negative integer indexes as array access.\n\t\t\t// Using Infinity here (rather than length) ensures that indexing past the end doesn't create additional session local properties.\n\t\t\tconst maybeIndex = asIndex(key, Number.POSITIVE_INFINITY);\n\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\t// For MVP, we otherwise disallow setting properties (mutation is only available via the array node mutation APIs).\n\t\t\t\t// To ensure a clear and actionable error experience, we will throw explicitly here, rather than just returning false.\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot set indexed properties on array nodes. Use array node mutation APIs to alter the array.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn allowAdditionalProperties ? Reflect.set(target, key, newValue, receiver) : false;\n\t\t},\n\t\thas: (target, key) => {\n\t\t\tconst field = getSequenceField(proxy);\n\t\t\tconst maybeIndex = asIndex(key, field.length);\n\t\t\treturn maybeIndex !== undefined || Reflect.has(dispatchTarget, key);\n\t\t},\n\t\townKeys: (target) => {\n\t\t\tconst field = getSequenceField(proxy);\n\n\t\t\t// TODO: Would a lazy iterator to produce the indexes work / be more efficient?\n\t\t\t// TODO: Need to surface 'Symbol.isConcatSpreadable' as an own key.\n\t\t\tconst keys: (string | symbol)[] = Array.from(\n\t\t\t\t{ length: field.length },\n\t\t\t\t(_, index) => `${index}`,\n\t\t\t);\n\n\t\t\tif (allowAdditionalProperties) {\n\t\t\t\tkeys.push(...Reflect.ownKeys(target));\n\t\t\t} else {\n\t\t\t\tkeys.push(\"length\");\n\t\t\t}\n\t\t\treturn keys;\n\t\t},\n\t\tgetOwnPropertyDescriptor: (target, key) => {\n\t\t\tconst field = getSequenceField(proxy);\n\t\t\tconst maybeIndex = asIndex(key, field.length);\n\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\tconst val = field.at(maybeIndex);\n\t\t\t\t// To satisfy 'deepEquals' level scrutiny, the property descriptor for indexed properties must\n\t\t\t\t// be a simple value property (as opposed to using getter) and declared writable/enumerable/configurable.\n\t\t\t\treturn {\n\t\t\t\t\tvalue: isFlexTreeNode(val) ? getOrCreateNodeFromInnerNode(val) : val,\n\t\t\t\t\twritable: true, // For MVP, setting indexed properties is reported as allowed here (for deep equals compatibility noted above), but not actually supported.\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t};\n\t\t\t} else if (key === \"length\") {\n\t\t\t\t// To satisfy 'deepEquals' level scrutiny, the property descriptor for 'length' must be a simple\n\t\t\t\t// value property (as opposed to using getter) and be declared writable / non-configurable.\n\t\t\t\treturn {\n\t\t\t\t\tvalue: field.length,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn Reflect.getOwnPropertyDescriptor(dispatchTarget, key);\n\t\t},\n\t\tdefineProperty(target, key, attributes) {\n\t\t\tconst maybeIndex = asIndex(key, Number.POSITIVE_INFINITY);\n\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\tthrow new UsageError(\"Shadowing of array indices is not permitted.\");\n\t\t\t}\n\t\t\treturn Reflect.defineProperty(dispatchTarget, key, attributes);\n\t\t},\n\t});\n\treturn proxy;\n}\n\ntype Insertable<T extends ImplicitAllowedTypes> = readonly (\n\t| InsertableTreeNodeFromImplicitAllowedTypes<T>\n\t| IterableTreeArrayContent<InsertableTreeNodeFromImplicitAllowedTypes<T>>\n)[];\n\nabstract class CustomArrayNodeBase<const T extends ImplicitAllowedTypes>\n\textends TreeNodeWithArrayFeatures<\n\t\tIterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>,\n\t\tTreeNodeFromImplicitAllowedTypes<T>\n\t>\n\timplements TreeArrayNode<T>\n{\n\t// Indexing must be provided by subclass.\n\t[k: number]: TreeNodeFromImplicitAllowedTypes<T>;\n\n\tpublic static readonly kind = NodeKind.Array;\n\n\tprotected abstract get simpleSchema(): T;\n\tprotected abstract get allowedTypes(): ReadonlySet<TreeNodeSchema>;\n\n\tpublic abstract override get [typeSchemaSymbol](): TreeNodeSchemaClass<\n\t\tstring,\n\t\tNodeKind.Array\n\t>;\n\n\tpublic constructor(\n\t\tinput?: Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>> | InternalTreeNode,\n\t) {\n\t\tsuper(input ?? []);\n\t}\n\n\t#mapTreesFromFieldData(value: Insertable<T>): ExclusiveMapTree[] {\n\t\tconst sequenceField = getSequenceField(this);\n\t\tconst content = value as readonly (\n\t\t\t| InsertableContent\n\t\t\t| IterableTreeArrayContent<InsertableContent>\n\t\t)[];\n\n\t\tconst contentArray = content.flatMap((c): InsertableContent[] =>\n\t\t\tc instanceof IterableTreeArrayContent ? Array.from(c) : [c],\n\t\t);\n\t\tconst mapTrees = prepareArrayContentForInsertion(\n\t\t\tcontentArray,\n\t\t\tthis.simpleSchema,\n\t\t\tsequenceField.context,\n\t\t);\n\n\t\treturn mapTrees;\n\t}\n\n\tpublic toJSON(): unknown {\n\t\t// This override causes the class instance to `JSON.stringify` as `[a, b]` rather than `{0: a, 1: b}`.\n\t\treturn Array.from(this as unknown as TreeArrayNode);\n\t}\n\n\t// Instances of this class are used as the dispatch object for the proxy,\n\t// and thus its set of keys is used to implement `has` (for the `in` operator) for the non-numeric cases.\n\t// Therefore it must include `length`,\n\t// even though this \"length\" is never invoked (due to being shadowed by the proxy provided own property).\n\tpublic get length(): number {\n\t\treturn fail(0xadb /* Proxy should intercept length */);\n\t}\n\n\tpublic [Symbol.iterator](): IterableIterator<TreeNodeFromImplicitAllowedTypes<T>> {\n\t\treturn this.values();\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n\tpublic get [Symbol.unscopables]() {\n\t\t// This might not be the exact right set of values, but it only matters for `with` clauses which are deprecated and are banned in strict mode, so it shouldn't matter much.\n\t\t// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with for details.\n\t\treturn Array.prototype[Symbol.unscopables];\n\t}\n\n\tpublic at(\n\t\tthis: TreeArrayNode<T>,\n\t\tindex: number,\n\t): TreeNodeFromImplicitAllowedTypes<T> | undefined {\n\t\tconst field = getSequenceField(this);\n\t\tconst val = field.boxedAt(index);\n\n\t\tif (val === undefined) {\n\t\t\treturn val;\n\t\t}\n\n\t\treturn getOrCreateNodeFromInnerNode(val) as TreeNodeFromImplicitAllowedTypes<T>;\n\t}\n\tpublic insertAt(index: number, ...value: Insertable<T>): void {\n\t\tconst field = getSequenceField(this);\n\t\tvalidateIndex(index, field, \"insertAt\", true);\n\t\tconst content = this.#mapTreesFromFieldData(value);\n\t\tfield.editor.insert(index, content);\n\t}\n\tpublic insertAtStart(...value: Insertable<T>): void {\n\t\tthis.insertAt(0, ...value);\n\t}\n\tpublic insertAtEnd(...value: Insertable<T>): void {\n\t\tthis.insertAt(this.length, ...value);\n\t}\n\tpublic removeAt(index: number): void {\n\t\tconst field = getSequenceField(this);\n\t\tvalidateIndex(index, field, \"removeAt\");\n\t\tfield.editor.remove(index, 1);\n\t}\n\tpublic removeRange(start?: number, end?: number): void {\n\t\tconst field = getSequenceField(this);\n\t\tconst { length } = field;\n\t\tconst removeStart = start ?? 0;\n\t\tconst removeEnd = Math.min(length, end ?? length);\n\t\tvalidatePositiveIndex(removeStart);\n\t\tvalidatePositiveIndex(removeEnd);\n\t\tif (removeEnd < removeStart) {\n\t\t\t// This catches both the case where start is > array.length and when start is > end.\n\t\t\tthrow new UsageError('Too large of \"start\" value passed to TreeArrayNode.removeRange.');\n\t\t}\n\t\tfield.editor.remove(removeStart, removeEnd - removeStart);\n\t}\n\tpublic moveToStart(sourceIndex: number, source?: ReadonlyArrayNode): void {\n\t\tconst sourceArray = source ?? this;\n\t\tconst sourceField = getSequenceField(sourceArray);\n\t\tvalidateIndex(sourceIndex, sourceField, \"moveToStart\");\n\t\tthis.moveRangeToIndex(0, sourceIndex, sourceIndex + 1, source);\n\t}\n\tpublic moveToEnd(sourceIndex: number, source?: ReadonlyArrayNode): void {\n\t\tconst sourceArray = source ?? this;\n\t\tconst sourceField = getSequenceField(sourceArray);\n\t\tvalidateIndex(sourceIndex, sourceField, \"moveToEnd\");\n\t\tthis.moveRangeToIndex(this.length, sourceIndex, sourceIndex + 1, source);\n\t}\n\tpublic moveToIndex(\n\t\tdestinationGap: number,\n\t\tsourceIndex: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tconst sourceArray = source ?? this;\n\t\tconst sourceField = getSequenceField(sourceArray);\n\t\tconst destinationField = getSequenceField(this);\n\t\tvalidateIndex(destinationGap, destinationField, \"moveToIndex\", true);\n\t\tvalidateIndex(sourceIndex, sourceField, \"moveToIndex\");\n\t\tthis.moveRangeToIndex(destinationGap, sourceIndex, sourceIndex + 1, source);\n\t}\n\tpublic moveRangeToStart(\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tvalidateIndexRange(\n\t\t\tsourceStart,\n\t\t\tsourceEnd,\n\t\t\tsource ?? getSequenceField(this),\n\t\t\t\"moveRangeToStart\",\n\t\t);\n\t\tthis.moveRangeToIndex(0, sourceStart, sourceEnd, source);\n\t}\n\tpublic moveRangeToEnd(\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tvalidateIndexRange(\n\t\t\tsourceStart,\n\t\t\tsourceEnd,\n\t\t\tsource ?? getSequenceField(this),\n\t\t\t\"moveRangeToEnd\",\n\t\t);\n\t\tthis.moveRangeToIndex(this.length, sourceStart, sourceEnd, source);\n\t}\n\tpublic moveRangeToIndex(\n\t\tdestinationGap: number,\n\t\tsourceStart: number,\n\t\tsourceEnd: number,\n\t\tsource?: ReadonlyArrayNode,\n\t): void {\n\t\tconst destinationField = getSequenceField(this);\n\t\tconst destinationSchema = this.allowedTypes;\n\t\tconst sourceField = source !== undefined ? getSequenceField(source) : destinationField;\n\n\t\tvalidateIndex(destinationGap, destinationField, \"moveRangeToIndex\", true);\n\t\tvalidateIndexRange(sourceStart, sourceEnd, source ?? destinationField, \"moveRangeToIndex\");\n\n\t\t// TODO: determine support for move across different sequence types\n\t\tif (sourceField !== destinationField) {\n\t\t\tfor (let i = sourceStart; i < sourceEnd; i++) {\n\t\t\t\tconst sourceNode = sourceField.boxedAt(i) ?? oob();\n\t\t\t\tconst sourceSchema = getSimpleNodeSchemaFromInnerNode(sourceNode);\n\t\t\t\tif (!destinationSchema.has(sourceSchema)) {\n\t\t\t\t\tthrow new UsageError(\"Type in source sequence is not allowed in destination.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst movedCount = sourceEnd - sourceStart;\n\t\tif (!destinationField.context.isHydrated()) {\n\t\t\tif (!(sourceField instanceof UnhydratedTreeSequenceField)) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot move elements from a hydrated array to an unhydrated array.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (sourceField.context.isHydrated()) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot move elements from an unhydrated array to a hydrated array.\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (sourceField !== destinationField || destinationGap < sourceStart) {\n\t\t\t\tdestinationField.editor.insert(\n\t\t\t\t\tdestinationGap,\n\t\t\t\t\tsourceField.editor.remove(sourceStart, movedCount),\n\t\t\t\t);\n\t\t\t} else if (destinationGap > sourceStart + movedCount) {\n\t\t\t\tdestinationField.editor.insert(\n\t\t\t\t\tdestinationGap - movedCount,\n\t\t\t\t\tsourceField.editor.remove(sourceStart, movedCount),\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\tif (!sourceField.context.isHydrated()) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"Cannot move elements from an unhydrated array to a hydrated array.\",\n\t\t\t\t);\n\t\t\t}\n\t\t\tif (sourceField.context !== destinationField.context) {\n\t\t\t\tthrow new UsageError(\"Cannot move elements between two different TreeViews.\");\n\t\t\t}\n\n\t\t\tdestinationField.context.checkout.editor.move(\n\t\t\t\tsourceField.getFieldPath(),\n\t\t\t\tsourceStart,\n\t\t\t\tmovedCount,\n\t\t\t\tdestinationField.getFieldPath(),\n\t\t\t\tdestinationGap,\n\t\t\t);\n\t\t}\n\t}\n\n\tpublic values(): IterableIterator<TreeNodeFromImplicitAllowedTypes<T>> {\n\t\treturn this.generateValues(getKernel(this).generationNumber);\n\t}\n\tprivate *generateValues(\n\t\tinitialLastUpdatedStamp: number,\n\t): Generator<TreeNodeFromImplicitAllowedTypes<T>> {\n\t\tconst kernel = getKernel(this);\n\t\tif (initialLastUpdatedStamp !== kernel.generationNumber) {\n\t\t\tthrow new UsageError(`Concurrent editing and iteration is not allowed.`);\n\t\t}\n\t\tfor (let i = 0; i < this.length; i++) {\n\t\t\tyield this.at(i) ?? fail(0xadc /* Index is out of bounds */);\n\t\t\tif (initialLastUpdatedStamp !== kernel.generationNumber) {\n\t\t\t\tthrow new UsageError(`Concurrent editing and iteration is not allowed.`);\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Define a {@link TreeNodeSchema} for a {@link (TreeArrayNode:interface)}.\n *\n * @param name - Unique identifier for this schema including the factory's scope.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function arraySchema<\n\tTName extends string,\n\tconst T extends ImplicitAnnotatedAllowedTypes,\n\tconst ImplicitlyConstructable extends boolean,\n\tconst TCustomMetadata = unknown,\n>(\n\tidentifier: TName,\n\tinfo: T,\n\timplicitlyConstructable: ImplicitlyConstructable,\n\tcustomizable: boolean,\n\tmetadata?: NodeSchemaMetadata<TCustomMetadata>,\n) {\n\ttype Output = ArrayNodeCustomizableSchema<\n\t\tTName,\n\t\tT,\n\t\tImplicitlyConstructable,\n\t\tTCustomMetadata\n\t> &\n\t\tArrayNodePojoEmulationSchema<TName, T, ImplicitlyConstructable, TCustomMetadata>;\n\n\tconst unannotatedTypes = unannotateImplicitAllowedTypes(info);\n\n\tconst lazyChildTypes = new Lazy(() => normalizeAllowedTypes(unannotatedTypes));\n\tconst lazyAllowedTypesIdentifiers = new Lazy(\n\t\t() => new Set([...lazyChildTypes.value].map((type) => type.identifier)),\n\t);\n\n\tlet unhydratedContext: Context;\n\n\t// This class returns a proxy from its constructor to handle numeric indexing.\n\t// Alternatively it could extend a normal class which gets tons of numeric properties added.\n\tclass Schema extends CustomArrayNodeBase<UnannotateImplicitAllowedTypes<T>> {\n\t\tpublic static override prepareInstance<T2>(\n\t\t\tthis: typeof TreeNodeValid<T2>,\n\t\t\tinstance: TreeNodeValid<T2>,\n\t\t\tflexNode: FlexTreeNode,\n\t\t): TreeNodeValid<T2> {\n\t\t\tconst proxyTarget = customizable ? instance : [];\n\n\t\t\tif (customizable) {\n\t\t\t\t// Since proxy reports this as a \"non-configurable\" property, it must exist on the underlying object used as the proxy target, not as an inherited property.\n\t\t\t\t// This should not get used as the proxy should intercept all use.\n\t\t\t\tObject.defineProperty(instance, \"length\", {\n\t\t\t\t\tvalue: Number.NaN,\n\t\t\t\t\twritable: true,\n\t\t\t\t\tenumerable: false,\n\t\t\t\t\tconfigurable: false,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn createArrayNodeProxy(customizable, proxyTarget, instance) as unknown as Schema;\n\t\t}\n\n\t\tpublic static override buildRawNode<T2>(\n\t\t\tthis: typeof TreeNodeValid<T2>,\n\t\t\tinstance: TreeNodeValid<T2>,\n\t\t\tinput: T2,\n\t\t): UnhydratedFlexTreeNode {\n\t\t\treturn UnhydratedFlexTreeNode.getOrCreate(\n\t\t\t\tunhydratedContext,\n\t\t\t\tmapTreeFromNodeData(input as object, this as unknown as ImplicitAllowedTypes),\n\t\t\t);\n\t\t}\n\n\t\tpublic static get allowedTypesIdentifiers(): ReadonlySet<string> {\n\t\t\treturn lazyAllowedTypesIdentifiers.value;\n\t\t}\n\n\t\tprotected static override constructorCached: MostDerivedData | undefined = undefined;\n\n\t\tprotected static override oneTimeSetup<T2>(this: typeof TreeNodeValid<T2>): Context {\n\t\t\tconst schema = this as unknown as TreeNodeSchema;\n\t\t\tunhydratedContext = getUnhydratedContext(schema);\n\n\t\t\t// First run, do extra validation.\n\t\t\t// TODO: provide a way for TreeConfiguration to trigger this same validation to ensure it gets run early.\n\t\t\t// Scan for shadowing inherited members which won't work, but stop scan early to allow shadowing built in (which seems to work ok).\n\t\t\t{\n\t\t\t\tlet prototype: object = this.prototype;\n\t\t\t\t// There isn't a clear cleaner way to author this loop.\n\t\t\t\twhile (prototype !== Schema.prototype) {\n\t\t\t\t\t// Search prototype keys and check for positive integers. Throw if any are found.\n\t\t\t\t\t// Shadowing of index properties on array nodes is not supported.\n\t\t\t\t\tfor (const key of Object.getOwnPropertyNames(prototype)) {\n\t\t\t\t\t\tconst maybeIndex = asIndex(key, Number.POSITIVE_INFINITY);\n\t\t\t\t\t\tif (maybeIndex !== undefined) {\n\t\t\t\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\t\t\t`Schema ${identifier} defines an inherited index property \"${key.toString()}\" which shadows a possible array index. Shadowing of array indices is not permitted.`,\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Since this stops at the array node base schema, it should never see a null prototype, so this case is safe.\n\t\t\t\t\t// Additionally, if the prototype chain is ever messed up such that the array base schema is not in it,\n\t\t\t\t\t// the null that would show up here does at least ensure this code throws instead of hanging.\n\t\t\t\t\tprototype = Reflect.getPrototypeOf(prototype) as object;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn unhydratedContext;\n\t\t}\n\n\t\tpublic static readonly identifier = identifier;\n\t\tpublic static readonly info = info;\n\t\tpublic static readonly implicitlyConstructable: ImplicitlyConstructable =\n\t\t\timplicitlyConstructable;\n\t\tpublic static get childTypes(): ReadonlySet<TreeNodeSchema> {\n\t\t\treturn lazyChildTypes.value;\n\t\t}\n\t\tpublic static readonly metadata: NodeSchemaMetadata<TCustomMetadata> = metadata ?? {};\n\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tpublic get [typeNameSymbol](): TName {\n\t\t\treturn identifier;\n\t\t}\n\t\tpublic get [typeSchemaSymbol](): Output {\n\t\t\treturn Schema.constructorCached?.constructor as unknown as Output;\n\t\t}\n\n\t\tprotected get simpleSchema(): UnannotateImplicitAllowedTypes<T> {\n\t\t\treturn unannotatedTypes;\n\t\t}\n\t\tprotected get allowedTypes(): ReadonlySet<TreeNodeSchema> {\n\t\t\treturn lazyChildTypes.value;\n\t\t}\n\t}\n\n\tconst output: Output = Schema;\n\treturn output;\n}\n\nfunction validateSafeInteger(index: number): void {\n\tif (!Number.isSafeInteger(index)) {\n\t\tthrow new UsageError(`Expected a safe integer, got ${index}.`);\n\t}\n}\n\nfunction validatePositiveIndex(index: number): void {\n\tvalidateSafeInteger(index);\n\tif (index < 0) {\n\t\tthrow new UsageError(`Expected non-negative index, got ${index}.`);\n\t}\n}\n\nfunction validateIndex(\n\tindex: number,\n\tarray: { readonly length: number },\n\tmethodName: string,\n\tallowOnePastEnd: boolean = false,\n): void {\n\tvalidatePositiveIndex(index);\n\tif (allowOnePastEnd) {\n\t\tif (index > array.length) {\n\t\t\tthrow new UsageError(\n\t\t\t\t`Index value passed to TreeArrayNode.${methodName} is out of bounds.`,\n\t\t\t);\n\t\t}\n\t} else {\n\t\tif (index >= array.length) {\n\t\t\tthrow new UsageError(\n\t\t\t\t`Index value passed to TreeArrayNode.${methodName} is out of bounds.`,\n\t\t\t);\n\t\t}\n\t}\n}\n\nfunction validateIndexRange(\n\tstartIndex: number,\n\tendIndex: number,\n\tarray: { readonly length: number },\n\tmethodName: string,\n): void {\n\tvalidateIndex(startIndex, array, methodName, true);\n\tvalidateIndex(endIndex, array, methodName, true);\n\tif (startIndex > endIndex || array.length < endIndex) {\n\t\tthrow new UsageError(\n\t\t\t`Index value passed to TreeArrayNode.${methodName} is out of bounds.`,\n\t\t);\n\t}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"arrayNodeTypes.d.ts","sourceRoot":"","sources":["../../src/simple-tree/arrayNodeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EACX,6BAA6B,EAC7B,0CAA0C,EAC1C,8BAA8B,EAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D;;;GAGG;AACH,MAAM,WAAW,2BAA2B,CAC3C,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EACjC,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,6BAA6B,GAAG,6BAA6B,EAC9E,GAAG,CAAC,uBAAuB,SAAS,OAAO,GAAG,IAAI,EAClD,GAAG,CAAC,eAAe,GAAG,OAAO,CAC5B,SAAQ,mBAAmB,CAC1B,KAAK,EACL,QAAQ,CAAC,KAAK,EACd,aAAa,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,EACrF,QAAQ,CAAC,0CAA0C,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC,EACvF,uBAAuB,EACvB,CAAC,EACD,SAAS,EACT,eAAe,CACf,EACD,qBAAqB,CAAC,eAAe,CAAC;CAAG;AAE3C;;;GAGG;AACH,MAAM,WAAW,4BAA4B,CAC5C,GAAG,C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AAC,KAAK,CAAC;AACvC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { TreeArrayNode } from \"./arrayNode.js\";\nimport type {\n\tImplicitAnnotatedAllowedTypes,\n\tInsertableTreeNodeFromImplicitAllowedTypes,\n\tUnannotateImplicitAllowedTypes,\n} from \"./schemaTypes.js\";\nimport {\n\tNodeKind,\n\ttype TreeNodeSchemaClass,\n\ttype TreeNodeSchema,\n\ttype TreeNodeSchemaNonClass,\n\ttype WithType,\n} from \"./core/index.js\";\n\nimport type { SimpleArrayNodeSchema } from \"./simpleSchema.js\";\n\n/**\n * A schema for customizable {@link (TreeArrayNode:interface)}s.\n * @system @sealed @alpha\n */\nexport interface ArrayNodeCustomizableSchema<\n\tout TName extends string = string,\n\tin out T extends ImplicitAnnotatedAllowedTypes = ImplicitAnnotatedAllowedTypes,\n\tout ImplicitlyConstructable extends boolean = true,\n\tout TCustomMetadata = unknown,\n> extends TreeNodeSchemaClass<\n\t\t\tTName,\n\t\t\tNodeKind.Array,\n\t\t\tTreeArrayNode<UnannotateImplicitAllowedTypes<T>> & WithType<TName, NodeKind.Array, T>,\n\t\t\tIterable<InsertableTreeNodeFromImplicitAllowedTypes<UnannotateImplicitAllowedTypes<T>>>,\n\t\t\tImplicitlyConstructable,\n\t\t\tT,\n\t\t\tundefined,\n\t\t\tTCustomMetadata\n\t\t>,\n\t\tSimpleArrayNodeSchema<TCustomMetadata> {}\n\n/**\n * A schema for POJO emulation mode {@link (TreeArrayNode:interface)}s.\n * @system @sealed @alpha\n */\nexport interface ArrayNodePojoEmulationSchema<\n\tout TName extends string = string,\n\tin out T extends ImplicitAnnotatedAllowedTypes = ImplicitAnnotatedAllowedTypes,\n\tout ImplicitlyConstructable extends boolean = true,\n\tout TCustomMetadata = unknown,\n> extends TreeNodeSchemaNonClass<\n\t\t\tTName,\n\t\t\tNodeKind.Array,\n\t\t\tTreeArrayNode<UnannotateImplicitAllowedTypes<T>> & WithType<TName, NodeKind.Array, T>,\n\t\t\tIterable<InsertableTreeNodeFromImplicitAllowedTypes<UnannotateImplicitAllowedTypes<T>>>,\n\t\t\tImplicitlyConstructable,\n\t\t\tT,\n\t\t\tundefined,\n\t\t\tTCustomMetadata\n\t\t>,\n\t\tSimpleArrayNodeSchema<TCustomMetadata> {}\n\n/**\n * A schema for {@link (TreeArrayNode:interface)}s.\n * @privateRemarks\n * This could have generic arguments added and forwarded.\n * The expected use-cases for this don't need them however, and if they did want an argument it would probably be the allowed types;\n * perhaps if moving to an order independent way to pass generic arguments, adding support for them here would make sense.\n * @alpha\n */\nexport type ArrayNodeSchema = ArrayNodeCustomizableSchema | ArrayNodePojoEmulationSchema;\n\n/**\n * @alpha\n */\nexport const ArrayNodeSchema = {\n\t/**\n\t * instanceof-based narrowing support for ArrayNodeSchema in Javascript and TypeScript 5.3 or newer.\n\t */\n\t[Symbol.hasInstance](value: TreeNodeSchema): value is ArrayNodeSchema {\n\t\treturn isArrayNodeSchema(value);\n\t},\n} as const;\n\n/**\n * Narrows a {@link (TreeNodeSchema:interface)} to an {@link (ArrayNodeSchema:interface)}.\n * @privateRemarks\n * If at some point we want to have internal only APIs for ArrayNodeSchema (like done for objects),\n * this can include those since its not the public facing API.\n */\nexport function isArrayNodeSchema(schema: TreeNodeSchema): schema is ArrayNodeSchema {\n\treturn schema.kind === NodeKind.Array;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapNode.d.ts","sourceRoot":"","sources":["../../src/simple-tree/mapNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAKN,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,0CAA0C,EAC/C,KAAK,kBAAkB,EACvB,KAAK,gCAAgC,EAErC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAON,KAAK,QAAQ,EAMb,MAAM,iBAAiB,CAAC;AAOzB,OAAO,EAAgB,KAAK,uBAAuB,EAAE,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,CAAC;QAGD,gDAAgD;QAChD,IAAW,CAAC,cAAc,CAAC;YAC1B,OAAO,UAAU,CAAC;QACnB,CAAC;QACD,IAAW,CAAC,gBAAgB,CAAC;YAC5B,OAAO,MAAM,CAAC,iBAAiB,EAAE,WAA6C,CAAC;QAChF,CAAC;;IAvByB,wBAAiB,GAAgC,SAAS,CAAC;IAQ9D,iBAAU,GAAG,UAAU,CAAC;IACxB,WAAI,GAAG,IAAI,CAAC;IACZ,8BAAuB,GAC7C,uBAAuB,CAAC;IAIF,eAAQ,GAAwC,QAAQ,IAAI,EAAE,CAAC;IAUvF,MAAM,YAAY,GAMgE,MAAM,CAAC;IACzF,OAAO,YAAY,CAAC;AACrB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { Lazy } from \"@fluidframework/core-utils/internal\";\nimport type {\n\tFlexTreeNode,\n\tFlexTreeOptionalField,\n\tOptionalFieldEditBuilder,\n} from \"../feature-libraries/index.js\";\nimport { getTreeNodeForField } from \"./getTreeNodeForField.js\";\nimport {\n\tcreateFieldSchema,\n\tFieldKind,\n\tnormalizeAllowedTypes,\n\tunannotateImplicitAllowedTypes,\n\ttype ImplicitAllowedTypes,\n\ttype ImplicitAnnotatedAllowedTypes,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype NodeSchemaMetadata,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype UnannotateImplicitAllowedTypes,\n} from \"./schemaTypes.js\";\nimport {\n\tgetKernel,\n\ttype InnerNode,\n\tNodeKind,\n\ttype TreeNodeSchema,\n\t// eslint-disable-next-line import/no-deprecated\n\ttypeNameSymbol,\n\ttype TreeNode,\n\ttypeSchemaSymbol,\n\ttype Context,\n\tUnhydratedFlexTreeNode,\n\tgetOrCreateInnerNode,\n\ttype InternalTreeNode,\n} from \"./core/index.js\";\nimport {\n\tmapTreeFromNodeData,\n\ttype FactoryContent,\n\ttype InsertableContent,\n} from \"./toMapTree.js\";\nimport { prepareForInsertion } from \"./prepareForInsertion.js\";\nimport { brand, count, type RestrictiveStringRecord } from \"../util/index.js\";\nimport { TreeNodeValid, type MostDerivedData } from \"./treeNodeValid.js\";\nimport type { ExclusiveMapTree } from \"../core/index.js\";\nimport { getUnhydratedContext } from \"./createContext.js\";\nimport type { MapNodeCustomizableSchema, MapNodePojoEmulationSchema } from \"./mapNodeTypes.js\";\n\n/**\n * A map of string keys to tree objects.\n *\n * @privateRemarks\n * Add support for `clear` once we have established merge semantics for it.\n *\n * @sealed @public\n */\nexport interface TreeMapNode<T extends ImplicitAllowedTypes = ImplicitAllowedTypes>\n\textends ReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>,\n\t\tTreeNode {\n\t/**\n\t * Adds or updates an entry in the map with a specified `key` and a `value`.\n\t *\n\t * @param key - The key of the element to add to the map.\n\t * @param value - The value of the element to add to the map.\n\t *\n\t * @remarks\n\t * Setting the value at a key to `undefined` is equivalent to calling {@link TreeMapNode.delete} with that key.\n\t */\n\tset(key: string, value: InsertableTreeNodeFromImplicitAllowedTypes<T> | undefined): void;\n\n\t/**\n\t * Removes the specified element from this map by its `key`.\n\t *\n\t * @remarks\n\t * Note: unlike JavaScript's Map API, this method does not return a flag indicating whether or not the value was\n\t * deleted.\n\t *\n\t * @privateRemarks\n\t * Regarding the choice to not return a boolean: Since this data structure is distributed in nature, it isn't\n\t * possible to tell whether or not the item was deleted as a result of this method call. Returning a \"best guess\"\n\t * is more likely to create issues / promote bad usage patterns than offer useful information.\n\t *\n\t * @param key - The key of the element to remove from the map.\n\t */\n\tdelete(key: string): void;\n\n\t/**\n\t * Returns an iterable of keys in the map.\n\t *\n\t * @remarks\n\t * Note: no guarantees are made regarding the order of the keys returned.\n\t * If your usage scenario depends on consistent ordering, you will need to sort these yourself.\n\t */\n\tkeys(): IterableIterator<string>;\n\n\t/**\n\t * Returns an iterable of values in the map.\n\t *\n\t * @remarks\n\t * Note: no guarantees are made regarding the order of the values returned.\n\t * If your usage scenario depends on consistent ordering, you will need to sort these yourself.\n\t */\n\tvalues(): IterableIterator<TreeNodeFromImplicitAllowedTypes<T>>;\n\n\t/**\n\t * Returns an iterable of key, value pairs for every entry in the map.\n\t *\n\t * @remarks\n\t * Note: no guarantees are made regarding the order of the entries returned.\n\t * If your usage scenario depends on consistent ordering, you will need to sort these yourself.\n\t */\n\tentries(): IterableIterator<[string, TreeNodeFromImplicitAllowedTypes<T>]>;\n\n\t/**\n\t * Executes the provided function once per each key/value pair in this map.\n\t *\n\t * @remarks\n\t * Note: no guarantees are made regarding the order in which the function is called with respect to the map's entries.\n\t * If your usage scenario depends on consistent ordering, you will need to account for this.\n\t */\n\tforEach(\n\t\tcallbackfn: (\n\t\t\tvalue: TreeNodeFromImplicitAllowedTypes<T>,\n\t\t\tkey: string,\n\t\t\tmap: ReadonlyMap<string, TreeNodeFromImplicitAllowedTypes<T>>,\n\t\t) => void,\n\t\t// Typing inherited from `ReadonlyMap`.\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tthisArg?: any,\n\t): void;\n}\n\n// TreeMapNode is invariant over schema type, so for this handler to work with all schema, the only possible type for the schema is `any`.\n// This is not ideal, but no alternatives are possible.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst handler: ProxyHandler<TreeMapNode<any>> = {\n\tgetPrototypeOf: () => {\n\t\treturn Map.prototype;\n\t},\n};\n\nabstract class CustomMapNodeBase<const T extends ImplicitAllowedTypes> extends TreeNodeValid<\n\tMapNodeInsertableData<T>\n> {\n\tpublic static readonly kind = NodeKind.Map;\n\n\tpublic constructor(input?: InternalTreeNode | MapNodeInsertableData<T> | undefined) {\n\t\tsuper(input ?? []);\n\t}\n\n\tpublic [Symbol.iterator](): IterableIterator<[string, TreeNodeFromImplicitAllowedTypes<T>]> {\n\t\treturn this.entries();\n\t}\n\n\tprivate get innerNode(): InnerNode {\n\t\treturn getOrCreateInnerNode(this);\n\t}\n\n\tprivate editor(key: string): OptionalFieldEditBuilder<ExclusiveMapTree> {\n\t\tconst field = this.innerNode.getBoxed(brand(key)) as FlexTreeOptionalField;\n\t\treturn field.editor;\n\t}\n\n\tpublic delete(key: string): void {\n\t\tconst field = this.innerNode.getBoxed(brand(key));\n\t\tthis.editor(key).set(undefined, field.length === 0);\n\t}\n\tpublic *entries(): IterableIterator<[string, TreeNodeFromImplicitAllowedTypes<T>]> {\n\t\tconst node = this.innerNode;\n\t\tfor (const key of node.keys()) {\n\t\t\tyield [\n\t\t\t\tkey,\n\t\t\t\tgetTreeNodeForField(node.getBoxed(key)) as TreeNodeFromImplicitAllowedTypes<T>,\n\t\t\t];\n\t\t}\n\t}\n\tpublic get(key: string): TreeNodeFromImplicitAllowedTypes<T> {\n\t\tconst node = this.innerNode;\n\t\tconst field = node.getBoxed(brand(key));\n\t\treturn getTreeNodeForField(field) as TreeNodeFromImplicitAllowedTypes<T>;\n\t}\n\tpublic has(key: string): boolean {\n\t\treturn this.innerNode.tryGetField(brand(key)) !== undefined;\n\t}\n\tpublic keys(): IterableIterator<string> {\n\t\tconst node = this.innerNode;\n\t\treturn node.keys();\n\t}\n\tpublic set(key: string, value: InsertableTreeNodeFromImplicitAllowedTypes<T>): this {\n\t\tconst kernel = getKernel(this);\n\t\tconst node = this.innerNode;\n\t\tconst mapTree = prepareForInsertion(\n\t\t\tvalue as InsertableContent | undefined,\n\t\t\tcreateFieldSchema(FieldKind.Optional, kernel.schema.info as ImplicitAllowedTypes),\n\t\t\tnode.context,\n\t\t);\n\n\t\tconst field = node.getBoxed(brand(key));\n\n\t\tthis.editor(key).set(mapTree, field.length === 0);\n\t\treturn this;\n\t}\n\tpublic get size(): number {\n\t\treturn count(this.innerNode.keys());\n\t}\n\tpublic *values(): IterableIterator<TreeNodeFromImplicitAllowedTypes<T>> {\n\t\tfor (const [, value] of this.entries()) {\n\t\t\tyield value;\n\t\t}\n\t}\n\tpublic forEach<TThis extends TreeMapNode<T>>(\n\t\tthis: TThis,\n\t\tcallbackFn: (value: TreeNodeFromImplicitAllowedTypes<T>, key: string, map: TThis) => void,\n\t\tthisArg?: unknown,\n\t): void {\n\t\tfor (const field of getOrCreateInnerNode(this).boxedIterator()) {\n\t\t\tconst node = getTreeNodeForField(field) as TreeNodeFromImplicitAllowedTypes<T>;\n\t\t\tcallbackFn.call(thisArg, node, field.key, this);\n\t\t}\n\t}\n\t// TODO: add `clear` once we have established merge semantics for it.\n}\n\n/**\n * Define a {@link TreeNodeSchema} for a {@link (TreeArrayNode:interface)}.\n *\n * @param base - base schema type to extend.\n * @param useMapPrototype - should this type emulate a ES6 Map object (by faking its prototype with a proxy).\n */\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport function mapSchema<\n\tTName extends string,\n\tconst T extends ImplicitAnnotatedAllowedTypes,\n\tconst ImplicitlyConstructable extends boolean,\n\tconst TCustomMetadata = unknown,\n>(\n\tidentifier: TName,\n\tinfo: T,\n\timplicitlyConstructable: ImplicitlyConstructable,\n\tuseMapPrototype: boolean,\n\tmetadata?: NodeSchemaMetadata<TCustomMetadata>,\n) {\n\tconst lazyChildTypes = new Lazy(() =>\n\t\tnormalizeAllowedTypes(unannotateImplicitAllowedTypes(info)),\n\t);\n\tconst lazyAllowedTypesIdentifiers = new Lazy(\n\t\t() => new Set([...lazyChildTypes.value].map((type) => type.identifier)),\n\t);\n\n\tlet unhydratedContext: Context;\n\n\tclass Schema\n\t\textends CustomMapNodeBase<UnannotateImplicitAllowedTypes<T>>\n\t\timplements TreeMapNode<UnannotateImplicitAllowedTypes<T>>\n\t{\n\t\tpublic static override prepareInstance<T2>(\n\t\t\tthis: typeof TreeNodeValid<T2>,\n\t\t\tinstance: TreeNodeValid<T2>,\n\t\t\tflexNode: FlexTreeNode,\n\t\t): TreeNodeValid<T2> {\n\t\t\tif (useMapPrototype) {\n\t\t\t\treturn new Proxy<Schema>(instance as Schema, handler as ProxyHandler<Schema>);\n\t\t\t}\n\t\t\treturn instance;\n\t\t}\n\n\t\tpublic static override buildRawNode<T2>(\n\t\t\tthis: typeof TreeNodeValid<T2>,\n\t\t\tinstance: TreeNodeValid<T2>,\n\t\t\tinput: T2,\n\t\t): UnhydratedFlexTreeNode {\n\t\t\treturn UnhydratedFlexTreeNode.getOrCreate(\n\t\t\t\tunhydratedContext,\n\t\t\t\tmapTreeFromNodeData(input as FactoryContent, this as unknown as ImplicitAllowedTypes),\n\t\t\t);\n\t\t}\n\n\t\tpublic static get allowedTypesIdentifiers(): ReadonlySet<string> {\n\t\t\treturn lazyAllowedTypesIdentifiers.value;\n\t\t}\n\n\t\tprotected static override constructorCached: MostDerivedData | undefined = undefined;\n\n\t\tprotected static override oneTimeSetup<T2>(this: typeof TreeNodeValid<T2>): Context {\n\t\t\tconst schema = this as unknown as TreeNodeSchema;\n\t\t\tunhydratedContext = getUnhydratedContext(schema);\n\t\t\treturn unhydratedContext;\n\t\t}\n\n\t\tpublic static readonly identifier = identifier;\n\t\tpublic static readonly info = info;\n\t\tpublic static readonly implicitlyConstructable: ImplicitlyConstructable =\n\t\t\timplicitlyConstructable;\n\t\tpublic static get childTypes(): ReadonlySet<TreeNodeSchema> {\n\t\t\treturn lazyChildTypes.value;\n\t\t}\n\t\tpublic static readonly metadata: NodeSchemaMetadata<TCustomMetadata> = metadata ?? {};\n\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tpublic get [typeNameSymbol](): TName {\n\t\t\treturn identifier;\n\t\t}\n\t\tpublic get [typeSchemaSymbol](): typeof schemaErased {\n\t\t\treturn Schema.constructorCached?.constructor as unknown as typeof schemaErased;\n\t\t}\n\t}\n\tconst schemaErased: MapNodeCustomizableSchema<\n\t\tTName,\n\t\tT,\n\t\tImplicitlyConstructable,\n\t\tTCustomMetadata\n\t> &\n\t\tMapNodePojoEmulationSchema<TName, T, ImplicitlyConstructable, TCustomMetadata> = Schema;\n\treturn schemaErased;\n}\n\n/**\n * Content which can be used to construct a Map node, explicitly or implicitly.\n * @system @public\n */\nexport type MapNodeInsertableData<T extends ImplicitAllowedTypes> =\n\t| Iterable<readonly [string, InsertableTreeNodeFromImplicitAllowedTypes<T>]>\n\t| RestrictiveStringRecord<InsertableTreeNodeFromImplicitAllowedTypes<T>>;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mapNodeTypes.d.ts","sourceRoot":"","sources":["../../src/simple-tree/mapNodeTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,KAAK,EACX,6BAA6B,EAC7B,8BAA8B,EAC9B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC3B,KAAK,QAAQ,EACb,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D;;;GAGG;AACH,MAAM,WAAW,yBAAyB,CACzC,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EACjC,EAAE,CAAC,GAAG,CAAC,CAAC,SAAS,6BAA6B,GAAG,6BAA6B,EAC9E,GAAG,CAAC,uBAAuB,SAAS,OAAO,GAAG,IAAI,EAClD,GAAG,CAAC,eAAe,GAAG,OAAO,CAC5B,SAAQ,mBAAmB,CAC1B,KAAK,EACL,QAAQ,CAAC,GAAG,EACZ,WAAW,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,EACjF,qBAAqB,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,EACxD,uBAAuB,EACvB,CAAC,EACD,SAAS,EACT,eAAe,CACf,EACD,mBAAmB,CAAC,eAAe,CAAC;CAAG;AAEzC;;;GAGG;AACH,MAAM,WAAW,0BAA0B,CAC1C,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MA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ft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { MapNodeInsertableData, TreeMapNode } from \"./mapNode.js\";\nimport type {\n\tImplicitAnnotatedAllowedTypes,\n\tUnannotateImplicitAllowedTypes,\n} from \"./schemaTypes.js\";\nimport {\n\tNodeKind,\n\ttype TreeNodeSchemaClass,\n\ttype TreeNodeSchema,\n\ttype TreeNodeSchemaNonClass,\n\ttype WithType,\n} from \"./core/index.js\";\n\nimport type { SimpleMapNodeSchema } from \"./simpleSchema.js\";\n\n/**\n * A schema for customizable {@link (TreeMapNode:interface)}s.\n * @system @sealed @alpha\n */\nexport interface MapNodeCustomizableSchema<\n\tout TName extends string = string,\n\tin out T extends ImplicitAnnotatedAllowedTypes = ImplicitAnnotatedAllowedTypes,\n\tout ImplicitlyConstructable extends boolean = true,\n\tout TCustomMetadata = unknown,\n> extends TreeNodeSchemaClass<\n\t\t\tTName,\n\t\t\tNodeKind.Map,\n\t\t\tTreeMapNode<UnannotateImplicitAllowedTypes<T>> & WithType<TName, NodeKind.Map, T>,\n\t\t\tMapNodeInsertableData<UnannotateImplicitAllowedTypes<T>>,\n\t\t\tImplicitlyConstructable,\n\t\t\tT,\n\t\t\tundefined,\n\t\t\tTCustomMetadata\n\t\t>,\n\t\tSimpleMapNodeSchema<TCustomMetadata> {}\n\n/**\n * A schema for POJO emulation mode {@link (TreeMapNode:interface)}s.\n * @system @sealed @alpha\n */\nexport interface MapNodePojoEmulationSchema<\n\tout TName extends string = string,\n\tin out T extends ImplicitAnnotatedAllowedTypes = ImplicitAnnotatedAllowedTypes,\n\tout ImplicitlyConstructable extends boolean = true,\n\tout TCustomMetadata = unknown,\n> extends TreeNodeSchemaNonClass<\n\t\t\tTName,\n\t\t\tNodeKind.Map,\n\t\t\tTreeMapNode<UnannotateImplicitAllowedTypes<T>> & WithType<TName, NodeKind.Map, T>,\n\t\t\tMapNodeInsertableData<UnannotateImplicitAllowedTypes<T>>,\n\t\t\tImplicitlyConstructable,\n\t\t\tT,\n\t\t\tundefined,\n\t\t\tTCustomMetadata\n\t\t>,\n\t\tSimpleMapNodeSchema<TCustomMetadata> {}\n\n/**\n * A schema for {@link (TreeMapNode:interface)}s.\n * @privateRemarks\n * This could have generic arguments added and forwarded.\n * The expected use-cases for this don't need them however, and if they did want an argument it would probably be the allowed types;\n * perhaps if moving to an order independent way to pass generic arguments, adding support for them here would make sense.\n * @alpha\n */\nexport type MapNodeSchema = MapNodeCustomizableSchema | MapNodePojoEmulationSchema;\n\n/**\n * @alpha\n */\nexport const MapNodeSchema = {\n\t/**\n\t * instanceof-based narrowing support for MapNodeSchema in Javascript and TypeScript 5.3 or newer.\n\t */\n\t[Symbol.hasInstance](value: TreeNodeSchema): value is MapNodeSchema {\n\t\treturn isMapNodeSchema(value);\n\t},\n} as const;\n\n/**\n * Narrows a {@link (TreeNodeSchema:interface)} to an {@link (MapNodeSchema:interface)}.\n * @privateRemarks\n * If at some point we want to have internal only APIs for MapNodeSchema (like done for objects),\n * this can include those since its not the public facing API.\n */\nexport function isMapNodeSchema(schema: TreeNodeSchema): schema is MapNodeSchema {\n\treturn schema.kind === NodeKind.Map;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"objectNode.d.ts","sourceRoot":"","sources":["../../src/simple-tree/objectNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EAEN,KAAK,aAAa,EAIlB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACN,KAAK,mBAAmB,EAGxB,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,EACzC,KAAK,WAAW,EAGhB,SAAS,EACT,KAAK,kBAAkB,EAGvB,KAAK,4BAA4B,EAEjC,KAAK,sBAAsB,EAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAEN,QAAQ,EACR,KAAK,QAAQ,EAKb,KAAK,QAAQ,EAIb,MAAM,i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