@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 +1 @@
1
- {"version":3,"file":"schemaCompatibilityTester.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA4E;AAC5E,kDAO6B;AAC7B,+DAS0C;AAE1C,4DAAsD;AAGtD;;;;GAIG;AACH,MAAa,yBAAyB;IAMrC;;OAEG;IACH,YACiB,MAAwB,EACxB,QAAkB,EAClC,cAA2B;QAFX,WAAM,GAAN,MAAM,CAAkB;QACxB,aAAQ,GAAR,QAAQ,CAAU;QAGlC,IAAI,CAAC,kBAAkB,GAAG,IAAA,kCAAc,EAAC,cAAc,CAAC,CAAC;IAC1D,CAAC;IAED;;;;;;;;;OASG;IACI,kBAAkB,CACxB,MAAwB;QAExB,yBAAyB;QACzB,0CAA0C;QAE1C,gHAAgH;QAChH,6HAA6H;QAC7H,sDAAsD;QACtD,8HAA8H;QAC9H,IAAI,OAAO,GAAG,IAAI,CAAC;QACnB,sIAAsI;QACtI,4CAA4C;QAC5C,IAAI,UAAU,GAAG,IAAI,CAAC;QAEtB,MAAM,uCAAuC,GAAG,CAAC,WAA6B,EAAQ,EAAE;YACvF,QAAQ,WAAW,CAAC,QAAQ,EAAE,CAAC;gBAC9B,KAAK,cAAc,CAAC,CAAC,CAAC;oBACrB,yFAAyF;oBACzF,yFAAyF;oBACzF,iBAAiB;oBACjB,IACC,WAAW,CAAC,MAAM,CAAC,IAAI,CACtB,CAAC,UAAU,EAAE,EAAE,CACd,CAAC,IAAA,sBAAW,EAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,UAA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AChC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBAC/B,CAAC;YACF,CAAC;YAED,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;QACvC,CAAC;QACD,OAAO,QAAQ,CAAC;IACjB,CAAC;IAEO,SAAS,CAAC,QAA8B;QAC/C,sDAAsD;QACtD,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD;AA3PD,8DA2PC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { unreachableCase, fail } from \"@fluidframework/core-utils/internal\";\nimport {\n\tAdaptedViewSchema,\n\ttype TreeNodeStoredSchema,\n\ttype Adapters,\n\ttype TreeFieldStoredSchema,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeStoredSchema,\n} from \"../../core/index.js\";\nimport {\n\tFieldKinds,\n\ttype FullSchemaPolicy,\n\ttype FieldDiscrepancy,\n\tgetAllowedContentDiscrepancies,\n\tisNeverTree,\n\tPosetComparisonResult,\n\tfieldRealizer,\n\tcomparePosetElements,\n} from \"../../feature-libraries/index.js\";\nimport type { FieldSchema } from \"../schemaTypes.js\";\nimport { toStoredSchema } from \"../toStoredSchema.js\";\nimport type { SchemaCompatibilityStatus } from \"./tree.js\";\n\n/**\n * A collection of View information for schema, including policy.\n * @remarks\n * This contains everything needed to determine compatibility with a given stored schema.\n */\nexport class SchemaCompatibilityTester {\n\t/**\n\t * Cached conversion of the view schema in the stored schema format.\n\t */\n\tpublic readonly viewSchemaAsStored: TreeStoredSchema;\n\n\t/**\n\t * @param viewSchemaRoot - Schema for the root field.\n\t */\n\tpublic constructor(\n\t\tpublic readonly policy: FullSchemaPolicy,\n\t\tpublic readonly adapters: Adapters,\n\t\tviewSchemaRoot: FieldSchema,\n\t) {\n\t\tthis.viewSchemaAsStored = toStoredSchema(viewSchemaRoot);\n\t}\n\n\t/**\n\t * Determines the compatibility of a stored document\n\t * (based on its stored schema) with a viewer (based on its view schema).\n\t *\n\t * Adapters can be provided to handle differences between the two schema.\n\t * Adapters should only use to types in the `view` SchemaRepository.\n\t *\n\t * TODO: this API violates the parse don't validate design philosophy.\n\t * It should be wrapped with (or replaced by) a parse style API.\n\t */\n\tpublic checkCompatibility(\n\t\tstored: TreeStoredSchema,\n\t): Omit<SchemaCompatibilityStatus, \"canInitialize\"> {\n\t\t// TODO: support adapters\n\t\t// const adapted = this.adaptRepo(stored);\n\n\t\t// View schema allows a subset of documents that stored schema does, and the discrepancies are allowed by policy\n\t\t// determined by the view schema (i.e. objects with extra optional fields in the stored schema have opted into allowing this.\n\t\t// In the future, this would also include things like:\n\t\t// - fields with more allowed types in the stored schema than in the view schema have out-of-schema \"unknown content\" adapters\n\t\tlet canView = true;\n\t\t// View schema allows a superset of documents that stored schema does, hence the document could be upgraded to use a persisted version\n\t\t// of this view schema as its stored schema.\n\t\tlet canUpgrade = true;\n\n\t\tconst updateCompatibilityFromFieldDiscrepancy = (discrepancy: FieldDiscrepancy): void => {\n\t\t\tswitch (discrepancy.mismatch) {\n\t\t\t\tcase \"allowedTypes\": {\n\t\t\t\t\t// Since we only track the symmetric difference between the allowed types in the view and\n\t\t\t\t\t// stored schemas, it's sufficient to check if any extra allowed types still exist in the\n\t\t\t\t\t// stored schema.\n\t\t\t\t\tif (\n\t\t\t\t\t\tdiscrepancy.stored.some(\n\t\t\t\t\t\t\t(identifier) =>\n\t\t\t\t\t\t\t\t!isNeverTree(this.policy, stored, stored.nodeSchema.get(identifier)),\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Stored schema has extra allowed types that the view schema does not.\n\t\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tdiscrepancy.view.some(\n\t\t\t\t\t\t\t(identifier) =>\n\t\t\t\t\t\t\t\t!isNeverTree(\n\t\t\t\t\t\t\t\t\tthis.policy,\n\t\t\t\t\t\t\t\t\tthis.viewSchemaAsStored,\n\t\t\t\t\t\t\t\t\tthis.viewSchemaAsStored.nodeSchema.get(identifier),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\t// View schema has extra allowed types that the stored schema does not.\n\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"fieldKind\": {\n\t\t\t\t\tconst result = comparePosetElements(\n\t\t\t\t\t\tdiscrepancy.stored,\n\t\t\t\t\t\tdiscrepancy.view,\n\t\t\t\t\t\tfieldRealizer,\n\t\t\t\t\t);\n\n\t\t\t\t\tif (result === PosetComparisonResult.Greater) {\n\t\t\t\t\t\t// Stored schema is more relaxed than view schema.\n\t\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tdiscrepancy.view === FieldKinds.forbidden.identifier &&\n\t\t\t\t\t\t\tdiscrepancy.identifier !== undefined &&\n\t\t\t\t\t\t\tthis.policy.allowUnknownOptionalFields(discrepancy.identifier)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// When the application has opted into it, we allow viewing documents which have additional\n\t\t\t\t\t\t\t// optional fields in the stored schema that are not present in the view schema.\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (result === PosetComparisonResult.Less) {\n\t\t\t\t\t\t// View schema is more relaxed than stored schema.\n\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (result === PosetComparisonResult.Incomparable) {\n\t\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"valueSchema\": {\n\t\t\t\t\tcanView = false;\n\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tunreachableCase(discrepancy);\n\t\t\t}\n\t\t};\n\n\t\tfor (const discrepancy of getAllowedContentDiscrepancies(\n\t\t\tthis.viewSchemaAsStored,\n\t\t\tstored,\n\t\t)) {\n\t\t\tif (!canView && !canUpgrade) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tswitch (discrepancy.mismatch) {\n\t\t\t\tcase \"nodeKind\": {\n\t\t\t\t\tconst viewNodeSchema = this.viewSchemaAsStored.nodeSchema.get(\n\t\t\t\t\t\tdiscrepancy.identifier,\n\t\t\t\t\t);\n\t\t\t\t\tconst storedNodeSchema = stored.nodeSchema.get(discrepancy.identifier);\n\t\t\t\t\t// We conservatively do not allow node types to change.\n\t\t\t\t\t// The only time this might be valid in the sense that the data canonically converts is converting an object node\n\t\t\t\t\t// to a map node over the union of all the object fields' types.\n\t\t\t\t\tif (discrepancy.stored === undefined) {\n\t\t\t\t\t\tconst viewIsNever =\n\t\t\t\t\t\t\tviewNodeSchema !== undefined\n\t\t\t\t\t\t\t\t? isNeverTree(this.policy, this.viewSchemaAsStored, viewNodeSchema)\n\t\t\t\t\t\t\t\t: true;\n\t\t\t\t\t\tif (!viewIsNever) {\n\t\t\t\t\t\t\t// View schema has added a node type that the stored schema doesn't know about.\n\t\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (discrepancy.view === undefined) {\n\t\t\t\t\t\tconst storedIsNever =\n\t\t\t\t\t\t\tstoredNodeSchema !== undefined\n\t\t\t\t\t\t\t\t? isNeverTree(this.policy, stored, storedNodeSchema)\n\t\t\t\t\t\t\t\t: true;\n\t\t\t\t\t\tif (!storedIsNever) {\n\t\t\t\t\t\t\t// Stored schema has a node type that the view schema doesn't know about.\n\t\t\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Node type exists in both schemas but has changed. We conservatively never allow this.\n\t\t\t\t\t\tconst storedIsNever =\n\t\t\t\t\t\t\tstoredNodeSchema !== undefined\n\t\t\t\t\t\t\t\t? isNeverTree(this.policy, stored, storedNodeSchema)\n\t\t\t\t\t\t\t\t: true;\n\t\t\t\t\t\tconst viewIsNever =\n\t\t\t\t\t\t\tviewNodeSchema !== undefined\n\t\t\t\t\t\t\t\t? isNeverTree(this.policy, this.viewSchemaAsStored, viewNodeSchema)\n\t\t\t\t\t\t\t\t: true;\n\t\t\t\t\t\tif (!storedIsNever || !viewIsNever) {\n\t\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"valueSchema\":\n\t\t\t\tcase \"allowedTypes\":\n\t\t\t\tcase \"fieldKind\": {\n\t\t\t\t\tupdateCompatibilityFromFieldDiscrepancy(discrepancy);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"fields\": {\n\t\t\t\t\tdiscrepancy.differences.forEach(updateCompatibilityFromFieldDiscrepancy);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// No default\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tcanView,\n\t\t\tcanUpgrade,\n\t\t\tisEquivalent: canView && canUpgrade,\n\t\t};\n\t}\n\n\t/**\n\t * Compute a schema that `original` could be viewed as using adapters as needed.\n\t *\n\t * TODO: have a way for callers to get invalidated on schema updates.\n\t */\n\tpublic adaptRepo(stored: TreeStoredSchema): AdaptedViewSchema {\n\t\t// Sanity check on adapters:\n\t\t// it's probably a bug if they use the never types,\n\t\t// since there never is a reason to have a never type as an adapter input,\n\t\t// and its impossible for an adapter to be correctly implemented if its output type is never\n\t\t// (unless its input is also never).\n\n\t\tfor (const adapter of this.adapters?.tree ?? []) {\n\t\t\tif (\n\t\t\t\tisNeverTree(\n\t\t\t\t\tthis.policy,\n\t\t\t\t\tthis.viewSchemaAsStored,\n\t\t\t\t\tthis.viewSchemaAsStored.nodeSchema.get(adapter.output),\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tfail(0xb3d /* tree adapter for stored adapter.output should not be never */);\n\t\t\t}\n\t\t}\n\n\t\tconst adapted = {\n\t\t\trootFieldSchema: this.adaptField(stored.rootFieldSchema),\n\t\t\tnodeSchema: new Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema>(),\n\t\t};\n\n\t\tfor (const [key, schema] of stored.nodeSchema) {\n\t\t\tconst adapatedTree = this.adaptTree(schema);\n\t\t\tadapted.nodeSchema.set(key, adapatedTree);\n\t\t}\n\n\t\t// TODO: subset these adapters to the ones that were needed/used.\n\t\treturn new AdaptedViewSchema(this.adapters, adapted);\n\t}\n\n\t/**\n\t * Adapt original such that it allows member types which can be adapted to its specified types.\n\t */\n\tprivate adaptField(original: TreeFieldStoredSchema): TreeFieldStoredSchema {\n\t\tif (original.types !== undefined) {\n\t\t\tconst types: Set<TreeNodeSchemaIdentifier> = new Set(original.types);\n\t\t\tfor (const treeAdapter of this.adapters?.tree ?? []) {\n\t\t\t\tif (types.has(treeAdapter.input)) {\n\t\t\t\t\ttypes.delete(treeAdapter.input);\n\t\t\t\t\ttypes.add(treeAdapter.output);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn { kind: original.kind, types };\n\t\t}\n\t\treturn original;\n\t}\n\n\tprivate adaptTree(original: TreeNodeStoredSchema): TreeNodeStoredSchema {\n\t\t// TODO: support adapters like missing field adapters.\n\t\treturn original;\n\t}\n}\n"]}
1
+ {"version":3,"file":"schemaCompatibilityTester.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA4E;AAE5E,kDAO6B;AAC7B,+DAS0C;AAE1C,4DAAsD;AAItD;;;;GAIG;AACH,MAAa,yBAAyB;IAMrC;;OAEG;IACH,YACiB,MAA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,GAAG,EAAkD;SACrE,CAAC;QAEF,KAAK,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;YAC/C,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YAC5C,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;QAC3C,CAAC;QAED,iEAAiE;QACjE,OAAO,IAAI,4BAAiB,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC;IAED;;OAEG;IACK,UAAU,CAAC,QAA+B;QACjD,IAAI,QAAQ,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAClC,MAAM,KAAK,GAAkC,IAAI,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACrE,KAAK,MAAM,WAAW,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,EAAE,EAAE,CAAC;gBACrD,IAAI,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;oBAClC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;oBAChC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBAC/B,CAAC;YACF,CAAC;YAED,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;QACvC,CAAC;QACD,OAAO,QAAQ,CAAC;IACjB,CAAC;IAEO,SAAS,CAAC,QAA8B;QAC/C,sDAAsD;QACtD,OAAO,QAAQ,CAAC;IACjB,CAAC;CACD;AA3PD,8DA2PC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { unreachableCase, fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tAdaptedViewSchema,\n\ttype TreeNodeStoredSchema,\n\ttype Adapters,\n\ttype TreeFieldStoredSchema,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeStoredSchema,\n} from \"../../core/index.js\";\nimport {\n\tFieldKinds,\n\ttype FullSchemaPolicy,\n\ttype FieldDiscrepancy,\n\tgetAllowedContentDiscrepancies,\n\tisNeverTree,\n\tPosetComparisonResult,\n\tfieldRealizer,\n\tcomparePosetElements,\n} from \"../../feature-libraries/index.js\";\nimport type { FieldSchema } from \"../schemaTypes.js\";\nimport { toStoredSchema } from \"../toStoredSchema.js\";\n\nimport type { SchemaCompatibilityStatus } from \"./tree.js\";\n\n/**\n * A collection of View information for schema, including policy.\n * @remarks\n * This contains everything needed to determine compatibility with a given stored schema.\n */\nexport class SchemaCompatibilityTester {\n\t/**\n\t * Cached conversion of the view schema in the stored schema format.\n\t */\n\tpublic readonly viewSchemaAsStored: TreeStoredSchema;\n\n\t/**\n\t * @param viewSchemaRoot - Schema for the root field.\n\t */\n\tpublic constructor(\n\t\tpublic readonly policy: FullSchemaPolicy,\n\t\tpublic readonly adapters: Adapters,\n\t\tviewSchemaRoot: FieldSchema,\n\t) {\n\t\tthis.viewSchemaAsStored = toStoredSchema(viewSchemaRoot);\n\t}\n\n\t/**\n\t * Determines the compatibility of a stored document\n\t * (based on its stored schema) with a viewer (based on its view schema).\n\t *\n\t * Adapters can be provided to handle differences between the two schema.\n\t * Adapters should only use to types in the `view` SchemaRepository.\n\t *\n\t * TODO: this API violates the parse don't validate design philosophy.\n\t * It should be wrapped with (or replaced by) a parse style API.\n\t */\n\tpublic checkCompatibility(\n\t\tstored: TreeStoredSchema,\n\t): Omit<SchemaCompatibilityStatus, \"canInitialize\"> {\n\t\t// TODO: support adapters\n\t\t// const adapted = this.adaptRepo(stored);\n\n\t\t// View schema allows a subset of documents that stored schema does, and the discrepancies are allowed by policy\n\t\t// determined by the view schema (i.e. objects with extra optional fields in the stored schema have opted into allowing this.\n\t\t// In the future, this would also include things like:\n\t\t// - fields with more allowed types in the stored schema than in the view schema have out-of-schema \"unknown content\" adapters\n\t\tlet canView = true;\n\t\t// View schema allows a superset of documents that stored schema does, hence the document could be upgraded to use a persisted version\n\t\t// of this view schema as its stored schema.\n\t\tlet canUpgrade = true;\n\n\t\tconst updateCompatibilityFromFieldDiscrepancy = (discrepancy: FieldDiscrepancy): void => {\n\t\t\tswitch (discrepancy.mismatch) {\n\t\t\t\tcase \"allowedTypes\": {\n\t\t\t\t\t// Since we only track the symmetric difference between the allowed types in the view and\n\t\t\t\t\t// stored schemas, it's sufficient to check if any extra allowed types still exist in the\n\t\t\t\t\t// stored schema.\n\t\t\t\t\tif (\n\t\t\t\t\t\tdiscrepancy.stored.some(\n\t\t\t\t\t\t\t(identifier) =>\n\t\t\t\t\t\t\t\t!isNeverTree(this.policy, stored, stored.nodeSchema.get(identifier)),\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\t// Stored schema has extra allowed types that the view schema does not.\n\t\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\tdiscrepancy.view.some(\n\t\t\t\t\t\t\t(identifier) =>\n\t\t\t\t\t\t\t\t!isNeverTree(\n\t\t\t\t\t\t\t\t\tthis.policy,\n\t\t\t\t\t\t\t\t\tthis.viewSchemaAsStored,\n\t\t\t\t\t\t\t\t\tthis.viewSchemaAsStored.nodeSchema.get(identifier),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\t// View schema has extra allowed types that the stored schema does not.\n\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"fieldKind\": {\n\t\t\t\t\tconst result = comparePosetElements(\n\t\t\t\t\t\tdiscrepancy.stored,\n\t\t\t\t\t\tdiscrepancy.view,\n\t\t\t\t\t\tfieldRealizer,\n\t\t\t\t\t);\n\n\t\t\t\t\tif (result === PosetComparisonResult.Greater) {\n\t\t\t\t\t\t// Stored schema is more relaxed than view schema.\n\t\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\t\tif (\n\t\t\t\t\t\t\tdiscrepancy.view === FieldKinds.forbidden.identifier &&\n\t\t\t\t\t\t\tdiscrepancy.identifier !== undefined &&\n\t\t\t\t\t\t\tthis.policy.allowUnknownOptionalFields(discrepancy.identifier)\n\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t// When the application has opted into it, we allow viewing documents which have additional\n\t\t\t\t\t\t\t// optional fields in the stored schema that are not present in the view schema.\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (result === PosetComparisonResult.Less) {\n\t\t\t\t\t\t// View schema is more relaxed than stored schema.\n\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (result === PosetComparisonResult.Incomparable) {\n\t\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"valueSchema\": {\n\t\t\t\t\tcanView = false;\n\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tunreachableCase(discrepancy);\n\t\t\t}\n\t\t};\n\n\t\tfor (const discrepancy of getAllowedContentDiscrepancies(\n\t\t\tthis.viewSchemaAsStored,\n\t\t\tstored,\n\t\t)) {\n\t\t\tif (!canView && !canUpgrade) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tswitch (discrepancy.mismatch) {\n\t\t\t\tcase \"nodeKind\": {\n\t\t\t\t\tconst viewNodeSchema = this.viewSchemaAsStored.nodeSchema.get(\n\t\t\t\t\t\tdiscrepancy.identifier,\n\t\t\t\t\t);\n\t\t\t\t\tconst storedNodeSchema = stored.nodeSchema.get(discrepancy.identifier);\n\t\t\t\t\t// We conservatively do not allow node types to change.\n\t\t\t\t\t// The only time this might be valid in the sense that the data canonically converts is converting an object node\n\t\t\t\t\t// to a map node over the union of all the object fields' types.\n\t\t\t\t\tif (discrepancy.stored === undefined) {\n\t\t\t\t\t\tconst viewIsNever =\n\t\t\t\t\t\t\tviewNodeSchema !== undefined\n\t\t\t\t\t\t\t\t? isNeverTree(this.policy, this.viewSchemaAsStored, viewNodeSchema)\n\t\t\t\t\t\t\t\t: true;\n\t\t\t\t\t\tif (!viewIsNever) {\n\t\t\t\t\t\t\t// View schema has added a node type that the stored schema doesn't know about.\n\t\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (discrepancy.view === undefined) {\n\t\t\t\t\t\tconst storedIsNever =\n\t\t\t\t\t\t\tstoredNodeSchema !== undefined\n\t\t\t\t\t\t\t\t? isNeverTree(this.policy, stored, storedNodeSchema)\n\t\t\t\t\t\t\t\t: true;\n\t\t\t\t\t\tif (!storedIsNever) {\n\t\t\t\t\t\t\t// Stored schema has a node type that the view schema doesn't know about.\n\t\t\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Node type exists in both schemas but has changed. We conservatively never allow this.\n\t\t\t\t\t\tconst storedIsNever =\n\t\t\t\t\t\t\tstoredNodeSchema !== undefined\n\t\t\t\t\t\t\t\t? isNeverTree(this.policy, stored, storedNodeSchema)\n\t\t\t\t\t\t\t\t: true;\n\t\t\t\t\t\tconst viewIsNever =\n\t\t\t\t\t\t\tviewNodeSchema !== undefined\n\t\t\t\t\t\t\t\t? isNeverTree(this.policy, this.viewSchemaAsStored, viewNodeSchema)\n\t\t\t\t\t\t\t\t: true;\n\t\t\t\t\t\tif (!storedIsNever || !viewIsNever) {\n\t\t\t\t\t\t\tcanView = false;\n\t\t\t\t\t\t\tcanUpgrade = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"valueSchema\":\n\t\t\t\tcase \"allowedTypes\":\n\t\t\t\tcase \"fieldKind\": {\n\t\t\t\t\tupdateCompatibilityFromFieldDiscrepancy(discrepancy);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase \"fields\": {\n\t\t\t\t\tdiscrepancy.differences.forEach(updateCompatibilityFromFieldDiscrepancy);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t// No default\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tcanView,\n\t\t\tcanUpgrade,\n\t\t\tisEquivalent: canView && canUpgrade,\n\t\t};\n\t}\n\n\t/**\n\t * Compute a schema that `original` could be viewed as using adapters as needed.\n\t *\n\t * TODO: have a way for callers to get invalidated on schema updates.\n\t */\n\tpublic adaptRepo(stored: TreeStoredSchema): AdaptedViewSchema {\n\t\t// Sanity check on adapters:\n\t\t// it's probably a bug if they use the never types,\n\t\t// since there never is a reason to have a never type as an adapter input,\n\t\t// and its impossible for an adapter to be correctly implemented if its output type is never\n\t\t// (unless its input is also never).\n\n\t\tfor (const adapter of this.adapters?.tree ?? []) {\n\t\t\tif (\n\t\t\t\tisNeverTree(\n\t\t\t\t\tthis.policy,\n\t\t\t\t\tthis.viewSchemaAsStored,\n\t\t\t\t\tthis.viewSchemaAsStored.nodeSchema.get(adapter.output),\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tfail(0xb3d /* tree adapter for stored adapter.output should not be never */);\n\t\t\t}\n\t\t}\n\n\t\tconst adapted = {\n\t\t\trootFieldSchema: this.adaptField(stored.rootFieldSchema),\n\t\t\tnodeSchema: new Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema>(),\n\t\t};\n\n\t\tfor (const [key, schema] of stored.nodeSchema) {\n\t\t\tconst adapatedTree = this.adaptTree(schema);\n\t\t\tadapted.nodeSchema.set(key, adapatedTree);\n\t\t}\n\n\t\t// TODO: subset these adapters to the ones that were needed/used.\n\t\treturn new AdaptedViewSchema(this.adapters, adapted);\n\t}\n\n\t/**\n\t * Adapt original such that it allows member types which can be adapted to its specified types.\n\t */\n\tprivate adaptField(original: TreeFieldStoredSchema): TreeFieldStoredSchema {\n\t\tif (original.types !== undefined) {\n\t\t\tconst types: Set<TreeNodeSchemaIdentifier> = new Set(original.types);\n\t\t\tfor (const treeAdapter of this.adapters?.tree ?? []) {\n\t\t\t\tif (types.has(treeAdapter.input)) {\n\t\t\t\t\ttypes.delete(treeAdapter.input);\n\t\t\t\t\ttypes.add(treeAdapter.output);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn { kind: original.kind, types };\n\t\t}\n\t\treturn original;\n\t}\n\n\tprivate adaptTree(original: TreeNodeStoredSchema): TreeNodeStoredSchema {\n\t\t// TODO: support adapters like missing field adapters.\n\t\treturn original;\n\t}\n}\n"]}
@@ -5,12 +5,10 @@
5
5
  import type { IFluidHandle } from "@fluidframework/core-interfaces";
6
6
  import type { TreeValue } from "../../core/index.js";
7
7
  import { type RestrictiveStringRecord } from "../../util/index.js";
8
+ import type { NodeKind, WithType, TreeNodeSchema, TreeNodeSchemaClass, TreeNodeSchemaNonClass } from "../core/index.js";
8
9
  import { stringSchema, type LeafSchema } from "../leafNodeSchema.js";
10
+ import { type MapNodeInsertableData, type TreeArrayNode, type InsertableObjectFromSchemaRecord, type TreeMapNode, type TreeObjectNode } from "../node-kinds/index.js";
9
11
  import { FieldKind, type FieldSchema, type ImplicitAllowedTypes, type ImplicitFieldSchema, type InsertableTreeNodeFromImplicitAllowedTypes, type FieldProps, type NodeSchemaOptions, type FieldSchemaAlpha, type ImplicitAnnotatedAllowedTypes, type UnannotateImplicitAllowedTypes } from "../schemaTypes.js";
10
- import type { NodeKind, WithType, TreeNodeSchema, TreeNodeSchemaClass, TreeNodeSchemaNonClass } from "../core/index.js";
11
- import { type TreeArrayNode } from "../arrayNode.js";
12
- import { type InsertableObjectFromSchemaRecord, type TreeObjectNode } from "../objectNode.js";
13
- import { type MapNodeInsertableData, type TreeMapNode } from "../mapNode.js";
14
12
  import type { System_Unsafe, FieldSchemaAlphaUnsafe } from "./typesUnsafe.js";
15
13
  /**
16
14
  * Gets the leaf domain schema compatible with a given {@link TreeValue}.
@@ -556,6 +554,16 @@ export declare class SchemaFactory<out TScope extends string | undefined = strin
556
554
  * {@label NAMED}
557
555
  */
558
556
  array<const Name extends TName, const T extends ImplicitAllowedTypes>(name: Name, allowedTypes: T): TreeNodeSchemaClass<ScopedSchemaName<TScope, Name>, NodeKind.Array, TreeArrayNode<T> & WithType<ScopedSchemaName<TScope, Name>, NodeKind.Array>, Iterable<InsertableTreeNodeFromImplicitAllowedTypes<T>>, true, T, undefined>;
557
+ /**
558
+ * Retrieves or creates a structural {@link TreeNodeSchema} with the specified name and types.
559
+ *
560
+ * @param fullName - The name for the structural schema.
561
+ * @param types - The input schema(s) used to define the structural schema.
562
+ * @param builder - A function that builds the schema if it does not already exist.
563
+ * @returns The structural {@link TreeNodeSchema} associated with the given name and types.
564
+ * @throws `UsageError` if a schema structurally named schema with the same name is cached in `structuralTypes` but had different input types.
565
+ */
566
+ private getStructuralType;
559
567
  /**
560
568
  * Define a {@link TreeNodeSchema} for a {@link (TreeArrayNode:interface)}.
561
569
  *
@@ -610,11 +618,11 @@ export declare class SchemaFactory<out TScope extends string | undefined = strin
610
618
  * - It is a UUID which will not collide with other generated UUIDs.
611
619
  *
612
620
  * - It is compressed to a space-efficient representation when stored in the document.
621
+ * Reading the identifier before inserting the node into a tree prevents the identifier from being stored in its compressed form,
622
+ * resulting in a larger storage footprint.
613
623
  *
614
624
  * - A compressed form of the identifier can be accessed at runtime via the {@link TreeNodeApi.shortId|Tree.shortId()} API.
615
625
  *
616
- * - It will error if read (and will not be present in the object's iterable properties) before the node has been inserted into a tree.
617
- *
618
626
  * However, a user may alternatively supply their own string as the identifier if desired (for example, if importing identifiers from another system).
619
627
  * In that case, if the user requires it to be unique, it is up to them to ensure uniqueness.
620
628
  * User-supplied identifiers may be read immediately, even before insertion into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,CAAC,0BAA0B,EACvD,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;QAgBzB;;;;;;;;;;WAUG;6BACkB,SACpB;YAAC,MAAM;YAAE,cAAc,gDAAgD,CAAC,CAAC,CAAC;SAAC,CAC3E;;;;CAcL;AAED,wBAAgB,cAAc,CAAC,KAAK,CAAC,CAAC,SAAS,MAAM,EACpD,cAAc,EAAE,CAAC,EACjB,YAAY,EAAE,cAAc,GAAG,SAAS,cAAc,EAAE,GACtD,GAAG,CAAC,IAAI,MAAM,GAAG,CAmBnB"}
@@ -7,14 +7,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.structuralName = exports.SchemaFactory = exports.schemaStatics = exports.schemaStaticsBase = exports.defaultSchemaFactoryObjectOptions = exports.schemaFromValue = void 0;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const internal_2 = require("@fluidframework/runtime-utils/internal");
10
+ const internal_3 = require("@fluidframework/telemetry-utils/internal");
10
11
  const index_js_1 = require("../../util/index.js");
12
+ const flexList_js_1 = require("../flexList.js");
11
13
  const leafNodeSchema_js_1 = require("../leafNodeSchema.js");
14
+ const index_js_2 = require("../node-kinds/index.js");
12
15
  const schemaTypes_js_1 = require("../schemaTypes.js");
13
- const arrayNode_js_1 = require("../arrayNode.js");
14
- const objectNode_js_1 = require("../objectNode.js");
15
- const mapNode_js_1 = require("../mapNode.js");
16
16
  const schemaFactoryRecursive_js_1 = require("./schemaFactoryRecursive.js");
17
- const flexList_js_1 = require("../flexList.js");
17
+ const internal_4 = require("@fluidframework/id-compressor/internal");
18
+ const unhydratedFlexTreeFromInsertable_js_1 = require("../unhydratedFlexTreeFromInsertable.js");
18
19
  /**
19
20
  * Gets the leaf domain schema compatible with a given {@link TreeValue}.
20
21
  */
@@ -41,9 +42,7 @@ exports.schemaFromValue = schemaFromValue;
41
42
  exports.defaultSchemaFactoryObjectOptions = {
42
43
  allowUnknownOptionalFields: false,
43
44
  };
44
- const defaultOptionalProvider = (0, schemaTypes_js_1.getDefaultProvider)(() => {
45
- return undefined;
46
- });
45
+ const defaultOptionalProvider = (0, schemaTypes_js_1.getDefaultProvider)(() => []);
47
46
  function optional(t, props) {
48
47
  return (0, schemaTypes_js_1.createFieldSchema)(schemaTypes_js_1.FieldKind.Optional, t, {
49
48
  defaultProvider: defaultOptionalProvider,
@@ -301,7 +300,7 @@ class SchemaFactory {
301
300
  */
302
301
  object(name, fields) {
303
302
  // The compiler can't infer that UnannotateSchemaRecord<T> is equal to T so we have to do a bunch of typing to make the error go away.
304
- const object = (0, objectNode_js_1.objectSchema)(this.scoped(name), fields, true, exports.defaultSchemaFactoryObjectOptions.allowUnknownOptionalFields);
303
+ const object = (0, index_js_2.objectSchema)(this.scoped(name), fields, true, exports.defaultSchemaFactoryObjectOptions.allowUnknownOptionalFields);
305
304
  return object;
306
305
  }
307
306
  /**
@@ -316,7 +315,7 @@ class SchemaFactory {
316
315
  if (allowedTypes === undefined) {
317
316
  const types = nameOrAllowedTypes;
318
317
  const fullName = structuralName("Map", types);
319
- return (0, index_js_1.getOrCreate)(this.structuralTypes, fullName, () => this.namedMap(fullName, nameOrAllowedTypes, false, true));
318
+ return this.getStructuralType(fullName, types, () => this.namedMap(fullName, nameOrAllowedTypes, false, true));
320
319
  }
321
320
  // To actually have type safety, assign to the type this method should return before implicitly upcasting when returning.
322
321
  const out = this.namedMap(nameOrAllowedTypes, allowedTypes, true, true);
@@ -329,7 +328,7 @@ class SchemaFactory {
329
328
  */
330
329
  namedMap(name, allowedTypes, customizable, implicitlyConstructable) {
331
330
  // The compiler can't infer that UnannotateImplicitAllowedTypes<T> is equal to T so we have to do a bunch of typing to make the error go away.
332
- const map = (0, mapNode_js_1.mapSchema)(this.scoped(name), allowedTypes, implicitlyConstructable,
331
+ const map = (0, index_js_2.mapSchema)(this.scoped(name), allowedTypes, implicitlyConstructable,
333
332
  // The current policy is customizable nodes don't get fake prototypes.
334
333
  !customizable, undefined);
335
334
  return map;
@@ -344,11 +343,31 @@ class SchemaFactory {
344
343
  if (allowedTypes === undefined) {
345
344
  const types = nameOrAllowedTypes;
346
345
  const fullName = structuralName("Array", types);
347
- return (0, index_js_1.getOrCreate)(this.structuralTypes, fullName, () => this.namedArray(fullName, nameOrAllowedTypes, false, true));
346
+ return this.getStructuralType(fullName, types, () => this.namedArray(fullName, nameOrAllowedTypes, false, true));
348
347
  }
349
348
  const out = this.namedArray(nameOrAllowedTypes, allowedTypes, true, true);
350
349
  return out;
351
350
  }
351
+ /**
352
+ * Retrieves or creates a structural {@link TreeNodeSchema} with the specified name and types.
353
+ *
354
+ * @param fullName - The name for the structural schema.
355
+ * @param types - The input schema(s) used to define the structural schema.
356
+ * @param builder - A function that builds the schema if it does not already exist.
357
+ * @returns The structural {@link TreeNodeSchema} associated with the given name and types.
358
+ * @throws `UsageError` if a schema structurally named schema with the same name is cached in `structuralTypes` but had different input types.
359
+ */
360
+ getStructuralType(fullName, types, builder) {
361
+ const structural = (0, index_js_1.getOrCreate)(this.structuralTypes, fullName, builder);
362
+ const inputTypes = new Set((0, schemaTypes_js_1.normalizeAllowedTypes)(types));
363
+ const outputTypes = new Set((0, schemaTypes_js_1.normalizeAllowedTypes)(structural.info));
364
+ // If our cached value had a different set of types then were requested, the user must have caused a collision.
365
+ const same = (0, index_js_1.compareSets)({ a: inputTypes, b: outputTypes });
366
+ if (!same) {
367
+ throw new internal_3.UsageError(`Structurally named schema collision: two schema named "${fullName}" were defined with different input schema.`);
368
+ }
369
+ return structural;
370
+ }
352
371
  /**
353
372
  * Define a {@link TreeNodeSchema} for a {@link (TreeArrayNode:interface)}.
354
373
  *
@@ -359,7 +378,7 @@ class SchemaFactory {
359
378
  * This is only public to work around a compiler limitation.
360
379
  */
361
380
  namedArray(name, allowedTypes, customizable, implicitlyConstructable) {
362
- const array = (0, arrayNode_js_1.arraySchema)(this.scoped(name), allowedTypes, implicitlyConstructable, customizable);
381
+ const array = (0, index_js_2.arraySchema)(this.scoped(name), allowedTypes, implicitlyConstructable, customizable);
363
382
  return array;
364
383
  }
365
384
  /**
@@ -374,11 +393,11 @@ class SchemaFactory {
374
393
  * - It is a UUID which will not collide with other generated UUIDs.
375
394
  *
376
395
  * - It is compressed to a space-efficient representation when stored in the document.
396
+ * Reading the identifier before inserting the node into a tree prevents the identifier from being stored in its compressed form,
397
+ * resulting in a larger storage footprint.
377
398
  *
378
399
  * - A compressed form of the identifier can be accessed at runtime via the {@link TreeNodeApi.shortId|Tree.shortId()} API.
379
400
  *
380
- * - It will error if read (and will not be present in the object's iterable properties) before the node has been inserted into a tree.
381
- *
382
401
  * However, a user may alternatively supply their own string as the identifier if desired (for example, if importing identifiers from another system).
383
402
  * In that case, if the user requires it to be unique, it is up to them to ensure uniqueness.
384
403
  * User-supplied identifiers may be read immediately, even before insertion into the tree.
@@ -386,8 +405,11 @@ class SchemaFactory {
386
405
  * A node may have more than one identifier field (though note that this precludes the use of the {@link TreeNodeApi.shortId|Tree.shortId()} API).
387
406
  */
388
407
  get identifier() {
389
- const defaultIdentifierProvider = (0, schemaTypes_js_1.getDefaultProvider)((nodeKeyManager) => {
390
- return nodeKeyManager.stabilizeNodeIdentifier(nodeKeyManager.generateLocalNodeIdentifier());
408
+ const defaultIdentifierProvider = (0, schemaTypes_js_1.getDefaultProvider)((context) => {
409
+ const id = context === "UseGlobalContext"
410
+ ? globalIdentifierAllocator.decompress(globalIdentifierAllocator.generateCompressedId())
411
+ : context.nodeKeyManager.stabilizeNodeIdentifier(context.nodeKeyManager.generateLocalNodeIdentifier());
412
+ return [(0, unhydratedFlexTreeFromInsertable_js_1.unhydratedFlexTreeFromInsertable)(id, this.string)];
391
413
  });
392
414
  return (0, schemaTypes_js_1.createFieldSchema)(schemaTypes_js_1.FieldKind.Identifier, this.string, {
393
415
  defaultProvider: defaultIdentifierProvider,
@@ -499,4 +521,11 @@ function structuralName(collectionName, allowedTypes) {
499
521
  return `${collectionName}<${inner}>`;
500
522
  }
501
523
  exports.structuralName = structuralName;
524
+ /**
525
+ * Used to allocate default identifiers for unhydrated nodes when no context is available.
526
+ * @remarks
527
+ * The identifiers allocated by this will never be compressed to Short Ids.
528
+ * Using this is only better than creating fully random V4 UUIDs because it reduces the entropy making it possible for things like text compression to work slightly better.
529
+ */
530
+ const globalIdentifierAllocator = (0, internal_4.createIdCompressor)();
502
531
  //# sourceMappingURL=schemaFactory.js.map