@fluidframework/tree 2.41.0-338186 → 2.41.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 (1205) hide show
  1. package/CHANGELOG.md +341 -0
  2. package/api-report/tree.alpha.api.md +174 -4
  3. package/dist/alpha.d.ts +3 -0
  4. package/dist/codec/codec.d.ts +52 -7
  5. package/dist/codec/codec.d.ts.map +1 -1
  6. package/dist/codec/codec.js +60 -8
  7. package/dist/codec/codec.js.map +1 -1
  8. package/dist/core/change-family/editBuilder.d.ts.map +1 -1
  9. package/dist/core/change-family/editBuilder.js.map +1 -1
  10. package/dist/core/forest/forest.d.ts.map +1 -1
  11. package/dist/core/forest/forest.js.map +1 -1
  12. package/dist/core/index.d.ts +1 -1
  13. package/dist/core/index.d.ts.map +1 -1
  14. package/dist/core/index.js +2 -1
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/core/rebase/types.d.ts +2 -2
  17. package/dist/core/rebase/types.js +2 -2
  18. package/dist/core/rebase/types.js.map +1 -1
  19. package/dist/core/rebase/utils.d.ts +0 -2
  20. package/dist/core/rebase/utils.d.ts.map +1 -1
  21. package/dist/core/rebase/utils.js +6 -10
  22. package/dist/core/rebase/utils.js.map +1 -1
  23. package/dist/core/schema-stored/formatV1.d.ts +0 -1
  24. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  25. package/dist/core/schema-stored/formatV1.js +1 -2
  26. package/dist/core/schema-stored/formatV1.js.map +1 -1
  27. package/dist/core/schema-stored/index.d.ts +1 -1
  28. package/dist/core/schema-stored/index.d.ts.map +1 -1
  29. package/dist/core/schema-stored/index.js +2 -1
  30. package/dist/core/schema-stored/index.js.map +1 -1
  31. package/dist/core/schema-stored/schema.d.ts +6 -0
  32. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  33. package/dist/core/schema-stored/schema.js +8 -1
  34. package/dist/core/schema-stored/schema.js.map +1 -1
  35. package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  36. package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  37. package/dist/core/schema-stored/storedSchemaRepository.js +1 -1
  38. package/dist/core/schema-stored/storedSchemaRepository.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 +4 -3
  42. package/dist/core/tree/anchorSet.js.map +1 -1
  43. package/dist/core/tree/chunk.d.ts.map +1 -1
  44. package/dist/core/tree/chunk.js.map +1 -1
  45. package/dist/core/tree/delta.d.ts.map +1 -1
  46. package/dist/core/tree/delta.js.map +1 -1
  47. package/dist/core/tree/deltaUtil.d.ts.map +1 -1
  48. package/dist/core/tree/deltaUtil.js.map +1 -1
  49. package/dist/core/tree/detachedFieldIndex.d.ts +1 -1
  50. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  51. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  52. package/dist/core/tree/detachedFieldIndexCodec.d.ts +1 -1
  53. package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  54. package/dist/core/tree/detachedFieldIndexCodec.js +1 -1
  55. package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
  56. package/dist/core/tree/pathTree.d.ts +12 -11
  57. package/dist/core/tree/pathTree.d.ts.map +1 -1
  58. package/dist/core/tree/pathTree.js +8 -7
  59. package/dist/core/tree/pathTree.js.map +1 -1
  60. package/dist/core/tree/treeTextFormat.d.ts +1 -1
  61. package/dist/core/tree/treeTextFormat.d.ts.map +1 -1
  62. package/dist/core/tree/treeTextFormat.js +1 -1
  63. package/dist/core/tree/treeTextFormat.js.map +1 -1
  64. package/dist/core/tree/visitDelta.d.ts +1 -1
  65. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  66. package/dist/core/tree/visitDelta.js.map +1 -1
  67. package/dist/core/tree/visitorUtils.d.ts +2 -2
  68. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  69. package/dist/core/tree/visitorUtils.js.map +1 -1
  70. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
  71. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  72. package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -1
  73. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  74. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -2
  75. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  76. package/dist/feature-libraries/chunked-forest/chunkedForest.js +2 -2
  77. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  79. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  80. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  81. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
  82. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  83. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  84. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  85. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  86. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +8 -2
  87. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  88. package/dist/feature-libraries/chunked-forest/codec/codecs.js +12 -1
  89. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  90. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  91. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  92. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  93. package/dist/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  94. package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  95. package/dist/feature-libraries/chunked-forest/codec/index.js +2 -1
  96. package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  97. package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
  98. package/dist/feature-libraries/chunked-forest/codec/nodeShape.js +1 -1
  99. package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
  100. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  101. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  102. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  103. package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
  104. package/dist/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
  105. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
  106. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  107. package/dist/feature-libraries/chunked-forest/index.js +2 -1
  108. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  109. package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
  110. package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
  111. package/dist/feature-libraries/chunked-forest/sequenceChunk.js +4 -4
  112. package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  113. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +1 -1
  114. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  115. package/dist/feature-libraries/chunked-forest/uniformChunk.js +1 -1
  116. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  117. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  118. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  119. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  120. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  121. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  122. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  123. package/dist/feature-libraries/default-schema/index.js +3 -2
  124. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  125. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  126. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  127. package/dist/feature-libraries/default-schema/schemaChecker.d.ts +18 -14
  128. package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  129. package/dist/feature-libraries/default-schema/schemaChecker.js +78 -54
  130. package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  131. package/dist/feature-libraries/flex-tree/context.d.ts +18 -2
  132. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  133. package/dist/feature-libraries/flex-tree/context.js +22 -6
  134. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  135. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +3 -2
  136. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  137. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +3 -2
  138. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  139. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  140. package/dist/feature-libraries/flex-tree/lazyField.js +1 -1
  141. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  142. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  143. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  144. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -1
  145. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  146. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  147. package/dist/feature-libraries/index.d.ts +3 -3
  148. package/dist/feature-libraries/index.d.ts.map +1 -1
  149. package/dist/feature-libraries/index.js +5 -4
  150. package/dist/feature-libraries/index.js.map +1 -1
  151. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  152. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  153. package/dist/feature-libraries/indexing/anchorTreeIndex.js +15 -15
  154. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  155. package/dist/feature-libraries/initializeForest.d.ts.map +1 -1
  156. package/dist/feature-libraries/initializeForest.js.map +1 -1
  157. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  158. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  159. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  160. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  161. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  162. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  163. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  164. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  165. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  166. package/dist/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  167. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  168. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  169. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  170. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  171. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  172. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  173. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  174. package/dist/feature-libraries/modular-schema/isNeverTree.js +0 -2
  175. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  176. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  177. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  178. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  179. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  180. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  181. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  182. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  183. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  184. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  185. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  186. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  187. package/dist/feature-libraries/object-forest/objectForest.d.ts +22 -5
  188. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  189. package/dist/feature-libraries/object-forest/objectForest.js +296 -207
  190. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  191. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  192. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  193. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +3 -2
  194. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  195. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  196. package/dist/feature-libraries/schema-index/codec.d.ts +6 -12
  197. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  198. package/dist/feature-libraries/schema-index/codec.js +8 -15
  199. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  200. package/dist/feature-libraries/schema-index/formatV1.d.ts +2 -2
  201. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  202. package/dist/feature-libraries/schema-index/formatV1.js +1 -1
  203. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  204. package/dist/feature-libraries/schema-index/index.d.ts +1 -1
  205. package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
  206. package/dist/feature-libraries/schema-index/index.js +1 -2
  207. package/dist/feature-libraries/schema-index/index.js.map +1 -1
  208. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  209. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  210. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  211. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  212. package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
  213. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  214. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  215. package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  216. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  217. package/dist/feature-libraries/sequence-field/rebase.js +1 -1
  218. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  219. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  220. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  221. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  222. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  223. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  224. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  225. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  226. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  227. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  228. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  229. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  230. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  231. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  232. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  233. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  234. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  235. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  236. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  237. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  238. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  239. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  240. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  241. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  242. package/dist/feature-libraries/sequence-field/utils.d.ts +7 -5
  243. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  244. package/dist/feature-libraries/sequence-field/utils.js +7 -5
  245. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  246. package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  247. package/dist/feature-libraries/treeCursorUtils.js +3 -3
  248. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  249. package/dist/feature-libraries/treeTextCursor.d.ts +1 -1
  250. package/dist/feature-libraries/treeTextCursor.js +1 -1
  251. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  252. package/dist/feature-libraries/valueUtilities.d.ts.map +1 -1
  253. package/dist/feature-libraries/valueUtilities.js +6 -6
  254. package/dist/feature-libraries/valueUtilities.js.map +1 -1
  255. package/dist/index.d.ts +2 -2
  256. package/dist/index.d.ts.map +1 -1
  257. package/dist/index.js +2 -6
  258. package/dist/index.js.map +1 -1
  259. package/dist/jsonDomainSchema.d.ts.map +1 -1
  260. package/dist/jsonDomainSchema.js.map +1 -1
  261. package/dist/packageVersion.d.ts +1 -1
  262. package/dist/packageVersion.d.ts.map +1 -1
  263. package/dist/packageVersion.js +1 -1
  264. package/dist/packageVersion.js.map +1 -1
  265. package/dist/serializableDomainSchema.d.ts.map +1 -1
  266. package/dist/serializableDomainSchema.js.map +1 -1
  267. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  268. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
  269. package/dist/shared-tree/independentView.d.ts +1 -1
  270. package/dist/shared-tree/independentView.d.ts.map +1 -1
  271. package/dist/shared-tree/independentView.js +8 -3
  272. package/dist/shared-tree/independentView.js.map +1 -1
  273. package/dist/shared-tree/index.d.ts +1 -1
  274. package/dist/shared-tree/index.d.ts.map +1 -1
  275. package/dist/shared-tree/index.js.map +1 -1
  276. package/dist/shared-tree/schematizeTree.d.ts +1 -1
  277. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  278. package/dist/shared-tree/schematizeTree.js.map +1 -1
  279. package/dist/shared-tree/schematizingTreeView.d.ts +1 -1
  280. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  281. package/dist/shared-tree/schematizingTreeView.js +1 -1
  282. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  283. package/dist/shared-tree/sharedTree.d.ts +3 -3
  284. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  285. package/dist/shared-tree/sharedTree.js +8 -8
  286. package/dist/shared-tree/sharedTree.js.map +1 -1
  287. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  288. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  289. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  290. package/dist/shared-tree/tree.js +1 -1
  291. package/dist/shared-tree/tree.js.map +1 -1
  292. package/dist/shared-tree/treeAlpha.d.ts +84 -2
  293. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  294. package/dist/shared-tree/treeAlpha.js +75 -22
  295. package/dist/shared-tree/treeAlpha.js.map +1 -1
  296. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  297. package/dist/shared-tree/treeCheckout.js +3 -2
  298. package/dist/shared-tree/treeCheckout.js.map +1 -1
  299. package/dist/shared-tree-core/branch.d.ts +2 -2
  300. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  301. package/dist/shared-tree-core/branch.js +2 -2
  302. package/dist/shared-tree-core/branch.js.map +1 -1
  303. package/dist/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  304. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  305. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  306. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  307. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  308. package/dist/shared-tree-core/editManager.d.ts +3 -1
  309. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  310. package/dist/shared-tree-core/editManager.js +4 -2
  311. package/dist/shared-tree-core/editManager.js.map +1 -1
  312. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  313. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  314. package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  315. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  316. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  317. package/dist/shared-tree-core/messageCodecs.d.ts +1 -1
  318. package/dist/shared-tree-core/messageCodecs.js +1 -1
  319. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  320. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  321. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  322. package/dist/shared-tree-core/sharedTreeCore.d.ts +2 -2
  323. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  324. package/dist/shared-tree-core/sharedTreeCore.js +4 -4
  325. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  326. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  327. package/dist/shared-tree-core/transaction.js +1 -1
  328. package/dist/shared-tree-core/transaction.js.map +1 -1
  329. package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  330. package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
  331. package/dist/sharedTreeAttributes.d.ts.map +1 -1
  332. package/dist/sharedTreeAttributes.js.map +1 -1
  333. package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
  334. package/dist/simple-tree/api/conciseTree.js +1 -1
  335. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  336. package/dist/simple-tree/api/configuration.js +4 -4
  337. package/dist/simple-tree/api/configuration.js.map +1 -1
  338. package/dist/simple-tree/api/create.d.ts +2 -26
  339. package/dist/simple-tree/api/create.d.ts.map +1 -1
  340. package/dist/simple-tree/api/create.js +5 -42
  341. package/dist/simple-tree/api/create.js.map +1 -1
  342. package/dist/simple-tree/api/customTree.d.ts +1 -1
  343. package/dist/simple-tree/api/customTree.d.ts.map +1 -1
  344. package/dist/simple-tree/api/customTree.js +24 -24
  345. package/dist/simple-tree/api/customTree.js.map +1 -1
  346. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  347. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  348. package/dist/simple-tree/api/identifierIndex.js +2 -2
  349. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  350. package/dist/simple-tree/api/index.d.ts +2 -3
  351. package/dist/simple-tree/api/index.d.ts.map +1 -1
  352. package/dist/simple-tree/api/index.js +4 -9
  353. package/dist/simple-tree/api/index.js.map +1 -1
  354. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  355. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  356. package/dist/simple-tree/api/schemaFactory.d.ts +5 -5
  357. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  358. package/dist/simple-tree/api/schemaFactory.js +8 -8
  359. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  360. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  361. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  362. package/dist/simple-tree/api/schemaFactoryAlpha.js +4 -6
  363. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  364. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  365. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  366. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  367. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  368. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  369. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  370. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  371. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +4 -6
  372. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  373. package/dist/simple-tree/api/storedSchema.d.ts +1 -1
  374. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  375. package/dist/simple-tree/api/storedSchema.js +7 -6
  376. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  377. package/dist/simple-tree/api/tree.d.ts +2 -2
  378. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  379. package/dist/simple-tree/api/tree.js.map +1 -1
  380. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  381. package/dist/simple-tree/api/treeBeta.js +1 -1
  382. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  383. package/dist/simple-tree/api/treeNodeApi.d.ts +38 -3
  384. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  385. package/dist/simple-tree/api/treeNodeApi.js +42 -28
  386. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  387. package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
  388. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  389. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  390. package/dist/simple-tree/api/verboseTree.js +3 -3
  391. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  392. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  393. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +4 -6
  394. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  395. package/dist/simple-tree/core/context.d.ts.map +1 -1
  396. package/dist/simple-tree/core/context.js.map +1 -1
  397. package/dist/simple-tree/core/getOrCreateNode.d.ts +1 -1
  398. package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  399. package/dist/simple-tree/core/getOrCreateNode.js +1 -1
  400. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
  401. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  402. package/dist/simple-tree/core/treeNode.js +1 -1
  403. package/dist/simple-tree/core/treeNode.js.map +1 -1
  404. package/dist/simple-tree/core/treeNodeKernel.d.ts +8 -20
  405. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  406. package/dist/simple-tree/core/treeNodeKernel.js +19 -50
  407. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  408. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  409. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  410. package/dist/simple-tree/core/types.d.ts.map +1 -1
  411. package/dist/simple-tree/core/types.js.map +1 -1
  412. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  413. package/dist/simple-tree/core/unhydratedFlexTree.js +21 -21
  414. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  415. package/dist/simple-tree/core/withType.d.ts +1 -1
  416. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  417. package/dist/simple-tree/core/withType.js.map +1 -1
  418. package/dist/simple-tree/createContext.d.ts.map +1 -1
  419. package/dist/simple-tree/createContext.js.map +1 -1
  420. package/{lib/simple-tree/proxies.d.ts → dist/simple-tree/getTreeNodeForField.d.ts} +1 -1
  421. package/dist/simple-tree/getTreeNodeForField.d.ts.map +1 -0
  422. package/dist/simple-tree/{proxies.js → getTreeNodeForField.js} +1 -1
  423. package/dist/simple-tree/getTreeNodeForField.js.map +1 -0
  424. package/dist/simple-tree/index.d.ts +3 -10
  425. package/dist/simple-tree/index.d.ts.map +1 -1
  426. package/dist/simple-tree/index.js +17 -23
  427. package/dist/simple-tree/index.js.map +1 -1
  428. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  429. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  430. package/dist/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  431. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  432. package/dist/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +10 -10
  433. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  434. package/dist/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  435. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  436. package/dist/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  437. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -0
  438. package/dist/simple-tree/node-kinds/array/index.d.ts +7 -0
  439. package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  440. package/dist/simple-tree/node-kinds/array/index.js +16 -0
  441. package/dist/simple-tree/node-kinds/array/index.js.map +1 -0
  442. package/dist/simple-tree/node-kinds/index.d.ts +8 -0
  443. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -0
  444. package/dist/simple-tree/node-kinds/index.js +26 -0
  445. package/dist/simple-tree/node-kinds/index.js.map +1 -0
  446. package/dist/simple-tree/node-kinds/map/index.d.ts +7 -0
  447. package/dist/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  448. package/dist/simple-tree/node-kinds/map/index.js +13 -0
  449. package/dist/simple-tree/node-kinds/map/index.js.map +1 -0
  450. package/{lib/simple-tree → dist/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  451. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  452. package/dist/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +11 -11
  453. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  454. package/dist/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  455. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  456. package/dist/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  457. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  458. package/dist/simple-tree/node-kinds/object/index.d.ts +7 -0
  459. package/dist/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  460. package/dist/simple-tree/node-kinds/object/index.js +16 -0
  461. package/dist/simple-tree/node-kinds/object/index.js.map +1 -0
  462. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNode.d.ts +17 -6
  463. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  464. package/dist/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +49 -26
  465. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  466. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  467. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  468. package/dist/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  469. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  470. package/dist/simple-tree/prepareForInsertion.d.ts +18 -6
  471. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  472. package/dist/simple-tree/prepareForInsertion.js +51 -22
  473. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  474. package/dist/simple-tree/schemaTypes.d.ts +2 -2
  475. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  476. package/dist/simple-tree/schemaTypes.js.map +1 -1
  477. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  478. package/dist/simple-tree/simpleSchema.js.map +1 -1
  479. package/dist/simple-tree/toMapTree.d.ts +2 -22
  480. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  481. package/dist/simple-tree/toMapTree.js +44 -23
  482. package/dist/simple-tree/toMapTree.js.map +1 -1
  483. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  484. package/dist/simple-tree/toStoredSchema.js +1 -1
  485. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  486. package/dist/simple-tree/treeNodeValid.d.ts +1 -1
  487. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  488. package/dist/simple-tree/treeNodeValid.js +10 -10
  489. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  490. package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -1
  491. package/dist/simple-tree/walkFieldSchema.js.map +1 -1
  492. package/dist/tableSchema.d.ts +119 -72
  493. package/dist/tableSchema.d.ts.map +1 -1
  494. package/dist/tableSchema.js +83 -36
  495. package/dist/tableSchema.js.map +1 -1
  496. package/dist/treeFactory.d.ts +1 -1
  497. package/dist/treeFactory.d.ts.map +1 -1
  498. package/dist/treeFactory.js +3 -3
  499. package/dist/treeFactory.js.map +1 -1
  500. package/dist/util/bTreeUtils.d.ts.map +1 -1
  501. package/dist/util/bTreeUtils.js.map +1 -1
  502. package/dist/util/breakable.d.ts +23 -4
  503. package/dist/util/breakable.d.ts.map +1 -1
  504. package/dist/util/breakable.js +12 -3
  505. package/dist/util/breakable.js.map +1 -1
  506. package/docs/SharedTree Philosophy.md +5 -5
  507. package/lib/alpha.d.ts +3 -0
  508. package/lib/codec/codec.d.ts +52 -7
  509. package/lib/codec/codec.d.ts.map +1 -1
  510. package/lib/codec/codec.js +60 -8
  511. package/lib/codec/codec.js.map +1 -1
  512. package/lib/core/change-family/editBuilder.d.ts.map +1 -1
  513. package/lib/core/change-family/editBuilder.js.map +1 -1
  514. package/lib/core/forest/forest.d.ts.map +1 -1
  515. package/lib/core/forest/forest.js.map +1 -1
  516. package/lib/core/index.d.ts +1 -1
  517. package/lib/core/index.d.ts.map +1 -1
  518. package/lib/core/index.js +1 -1
  519. package/lib/core/index.js.map +1 -1
  520. package/lib/core/rebase/types.d.ts +2 -2
  521. package/lib/core/rebase/types.js +2 -2
  522. package/lib/core/rebase/types.js.map +1 -1
  523. package/lib/core/rebase/utils.d.ts +0 -2
  524. package/lib/core/rebase/utils.d.ts.map +1 -1
  525. package/lib/core/rebase/utils.js +6 -10
  526. package/lib/core/rebase/utils.js.map +1 -1
  527. package/lib/core/schema-stored/formatV1.d.ts +0 -1
  528. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  529. package/lib/core/schema-stored/formatV1.js +0 -1
  530. package/lib/core/schema-stored/formatV1.js.map +1 -1
  531. package/lib/core/schema-stored/index.d.ts +1 -1
  532. package/lib/core/schema-stored/index.d.ts.map +1 -1
  533. package/lib/core/schema-stored/index.js +1 -1
  534. package/lib/core/schema-stored/index.js.map +1 -1
  535. package/lib/core/schema-stored/schema.d.ts +6 -0
  536. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  537. package/lib/core/schema-stored/schema.js +7 -0
  538. package/lib/core/schema-stored/schema.js.map +1 -1
  539. package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  540. package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  541. package/lib/core/schema-stored/storedSchemaRepository.js +1 -1
  542. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  543. package/lib/core/tree/anchorSet.d.ts +2 -1
  544. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  545. package/lib/core/tree/anchorSet.js +4 -3
  546. package/lib/core/tree/anchorSet.js.map +1 -1
  547. package/lib/core/tree/chunk.d.ts.map +1 -1
  548. package/lib/core/tree/chunk.js.map +1 -1
  549. package/lib/core/tree/delta.d.ts.map +1 -1
  550. package/lib/core/tree/delta.js.map +1 -1
  551. package/lib/core/tree/deltaUtil.d.ts.map +1 -1
  552. package/lib/core/tree/deltaUtil.js.map +1 -1
  553. package/lib/core/tree/detachedFieldIndex.d.ts +1 -1
  554. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  555. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  556. package/lib/core/tree/detachedFieldIndexCodec.d.ts +1 -1
  557. package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  558. package/lib/core/tree/detachedFieldIndexCodec.js +1 -1
  559. package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
  560. package/lib/core/tree/pathTree.d.ts +12 -11
  561. package/lib/core/tree/pathTree.d.ts.map +1 -1
  562. package/lib/core/tree/pathTree.js +8 -7
  563. package/lib/core/tree/pathTree.js.map +1 -1
  564. package/lib/core/tree/treeTextFormat.d.ts +1 -1
  565. package/lib/core/tree/treeTextFormat.d.ts.map +1 -1
  566. package/lib/core/tree/treeTextFormat.js +1 -1
  567. package/lib/core/tree/treeTextFormat.js.map +1 -1
  568. package/lib/core/tree/visitDelta.d.ts +1 -1
  569. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  570. package/lib/core/tree/visitDelta.js.map +1 -1
  571. package/lib/core/tree/visitorUtils.d.ts +2 -2
  572. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  573. package/lib/core/tree/visitorUtils.js.map +1 -1
  574. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
  575. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  576. package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -1
  577. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  578. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -2
  579. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  580. package/lib/feature-libraries/chunked-forest/chunkedForest.js +2 -2
  581. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  582. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  583. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  584. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  585. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
  586. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  587. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  588. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  589. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  590. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +8 -2
  591. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  592. package/lib/feature-libraries/chunked-forest/codec/codecs.js +10 -0
  593. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  594. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  595. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  596. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  597. package/lib/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  598. package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  599. package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
  600. package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  601. package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
  602. package/lib/feature-libraries/chunked-forest/codec/nodeShape.js +1 -1
  603. package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
  604. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  605. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  606. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  607. package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
  608. package/lib/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
  609. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
  610. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  611. package/lib/feature-libraries/chunked-forest/index.js +1 -1
  612. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  613. package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
  614. package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
  615. package/lib/feature-libraries/chunked-forest/sequenceChunk.js +1 -1
  616. package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  617. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +1 -1
  618. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  619. package/lib/feature-libraries/chunked-forest/uniformChunk.js +1 -1
  620. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  621. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  622. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  623. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  624. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  625. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  626. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  627. package/lib/feature-libraries/default-schema/index.js +1 -1
  628. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  629. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  630. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  631. package/lib/feature-libraries/default-schema/schemaChecker.d.ts +18 -14
  632. package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  633. package/lib/feature-libraries/default-schema/schemaChecker.js +76 -53
  634. package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  635. package/lib/feature-libraries/flex-tree/context.d.ts +18 -2
  636. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  637. package/lib/feature-libraries/flex-tree/context.js +23 -7
  638. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  639. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +3 -2
  640. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  641. package/lib/feature-libraries/flex-tree/flexTreeTypes.js +3 -2
  642. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  643. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  644. package/lib/feature-libraries/flex-tree/lazyField.js +1 -1
  645. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  646. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  647. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  648. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -1
  649. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  650. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  651. package/lib/feature-libraries/index.d.ts +3 -3
  652. package/lib/feature-libraries/index.d.ts.map +1 -1
  653. package/lib/feature-libraries/index.js +3 -3
  654. package/lib/feature-libraries/index.js.map +1 -1
  655. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  656. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  657. package/lib/feature-libraries/indexing/anchorTreeIndex.js +1 -1
  658. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  659. package/lib/feature-libraries/initializeForest.d.ts.map +1 -1
  660. package/lib/feature-libraries/initializeForest.js.map +1 -1
  661. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  662. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  663. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  664. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  665. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  666. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  667. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  668. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  669. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  670. package/lib/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  671. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  672. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  673. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  674. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  675. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  676. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  677. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  678. package/lib/feature-libraries/modular-schema/isNeverTree.js +0 -2
  679. package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  680. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  681. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  682. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  683. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  684. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  685. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  686. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  687. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  688. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  689. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  690. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  691. package/lib/feature-libraries/object-forest/objectForest.d.ts +22 -5
  692. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  693. package/lib/feature-libraries/object-forest/objectForest.js +299 -209
  694. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  695. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  696. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  697. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +4 -3
  698. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  699. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  700. package/lib/feature-libraries/schema-index/codec.d.ts +6 -12
  701. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  702. package/lib/feature-libraries/schema-index/codec.js +8 -15
  703. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  704. package/lib/feature-libraries/schema-index/formatV1.d.ts +2 -2
  705. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  706. package/lib/feature-libraries/schema-index/formatV1.js +2 -2
  707. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  708. package/lib/feature-libraries/schema-index/index.d.ts +1 -1
  709. package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
  710. package/lib/feature-libraries/schema-index/index.js +1 -1
  711. package/lib/feature-libraries/schema-index/index.js.map +1 -1
  712. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  713. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  714. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  715. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  716. package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
  717. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  718. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  719. package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  720. package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
  721. package/lib/feature-libraries/sequence-field/rebase.js +1 -1
  722. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  723. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  724. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  725. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  726. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  727. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  728. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  729. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  730. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  731. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  732. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  733. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  734. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  735. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  736. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  737. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  738. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  739. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  740. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  741. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  742. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  743. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  744. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  745. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  746. package/lib/feature-libraries/sequence-field/utils.d.ts +7 -5
  747. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  748. package/lib/feature-libraries/sequence-field/utils.js +7 -5
  749. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  750. package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  751. package/lib/feature-libraries/treeCursorUtils.js +3 -3
  752. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  753. package/lib/feature-libraries/treeTextCursor.d.ts +1 -1
  754. package/lib/feature-libraries/treeTextCursor.js +1 -1
  755. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  756. package/lib/feature-libraries/valueUtilities.d.ts.map +1 -1
  757. package/lib/feature-libraries/valueUtilities.js +1 -1
  758. package/lib/feature-libraries/valueUtilities.js.map +1 -1
  759. package/lib/index.d.ts +2 -2
  760. package/lib/index.d.ts.map +1 -1
  761. package/lib/index.js +0 -2
  762. package/lib/index.js.map +1 -1
  763. package/lib/jsonDomainSchema.d.ts.map +1 -1
  764. package/lib/jsonDomainSchema.js.map +1 -1
  765. package/lib/packageVersion.d.ts +1 -1
  766. package/lib/packageVersion.d.ts.map +1 -1
  767. package/lib/packageVersion.js +1 -1
  768. package/lib/packageVersion.js.map +1 -1
  769. package/lib/serializableDomainSchema.d.ts.map +1 -1
  770. package/lib/serializableDomainSchema.js.map +1 -1
  771. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  772. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
  773. package/lib/shared-tree/independentView.d.ts +1 -1
  774. package/lib/shared-tree/independentView.d.ts.map +1 -1
  775. package/lib/shared-tree/independentView.js +10 -5
  776. package/lib/shared-tree/independentView.js.map +1 -1
  777. package/lib/shared-tree/index.d.ts +1 -1
  778. package/lib/shared-tree/index.d.ts.map +1 -1
  779. package/lib/shared-tree/index.js +1 -1
  780. package/lib/shared-tree/index.js.map +1 -1
  781. package/lib/shared-tree/schematizeTree.d.ts +1 -1
  782. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  783. package/lib/shared-tree/schematizeTree.js.map +1 -1
  784. package/lib/shared-tree/schematizingTreeView.d.ts +1 -1
  785. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  786. package/lib/shared-tree/schematizingTreeView.js +1 -1
  787. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  788. package/lib/shared-tree/sharedTree.d.ts +3 -3
  789. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  790. package/lib/shared-tree/sharedTree.js +10 -10
  791. package/lib/shared-tree/sharedTree.js.map +1 -1
  792. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  793. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  794. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  795. package/lib/shared-tree/tree.js +1 -1
  796. package/lib/shared-tree/tree.js.map +1 -1
  797. package/lib/shared-tree/treeAlpha.d.ts +84 -2
  798. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  799. package/lib/shared-tree/treeAlpha.js +65 -12
  800. package/lib/shared-tree/treeAlpha.js.map +1 -1
  801. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  802. package/lib/shared-tree/treeCheckout.js +3 -2
  803. package/lib/shared-tree/treeCheckout.js.map +1 -1
  804. package/lib/shared-tree-core/branch.d.ts +2 -2
  805. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  806. package/lib/shared-tree-core/branch.js +2 -2
  807. package/lib/shared-tree-core/branch.js.map +1 -1
  808. package/lib/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  809. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  810. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  811. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  812. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  813. package/lib/shared-tree-core/editManager.d.ts +3 -1
  814. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  815. package/lib/shared-tree-core/editManager.js +4 -2
  816. package/lib/shared-tree-core/editManager.js.map +1 -1
  817. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  818. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  819. package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  820. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  821. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  822. package/lib/shared-tree-core/messageCodecs.d.ts +1 -1
  823. package/lib/shared-tree-core/messageCodecs.js +1 -1
  824. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  825. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  826. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  827. package/lib/shared-tree-core/sharedTreeCore.d.ts +2 -2
  828. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  829. package/lib/shared-tree-core/sharedTreeCore.js +4 -4
  830. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  831. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  832. package/lib/shared-tree-core/transaction.js +1 -1
  833. package/lib/shared-tree-core/transaction.js.map +1 -1
  834. package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  835. package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
  836. package/lib/sharedTreeAttributes.d.ts.map +1 -1
  837. package/lib/sharedTreeAttributes.js.map +1 -1
  838. package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
  839. package/lib/simple-tree/api/conciseTree.js +1 -1
  840. package/lib/simple-tree/api/conciseTree.js.map +1 -1
  841. package/lib/simple-tree/api/configuration.js +1 -1
  842. package/lib/simple-tree/api/configuration.js.map +1 -1
  843. package/lib/simple-tree/api/create.d.ts +2 -26
  844. package/lib/simple-tree/api/create.d.ts.map +1 -1
  845. package/lib/simple-tree/api/create.js +2 -37
  846. package/lib/simple-tree/api/create.js.map +1 -1
  847. package/lib/simple-tree/api/customTree.d.ts +1 -1
  848. package/lib/simple-tree/api/customTree.d.ts.map +1 -1
  849. package/lib/simple-tree/api/customTree.js +3 -3
  850. package/lib/simple-tree/api/customTree.js.map +1 -1
  851. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  852. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
  853. package/lib/simple-tree/api/identifierIndex.js +1 -1
  854. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  855. package/lib/simple-tree/api/index.d.ts +2 -3
  856. package/lib/simple-tree/api/index.d.ts.map +1 -1
  857. package/lib/simple-tree/api/index.js +2 -5
  858. package/lib/simple-tree/api/index.js.map +1 -1
  859. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  860. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  861. package/lib/simple-tree/api/schemaFactory.d.ts +5 -5
  862. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  863. package/lib/simple-tree/api/schemaFactory.js +5 -5
  864. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  865. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  866. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  867. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -3
  868. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  869. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  870. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  871. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  872. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  873. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  874. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  875. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  876. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +1 -3
  877. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  878. package/lib/simple-tree/api/storedSchema.d.ts +1 -1
  879. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  880. package/lib/simple-tree/api/storedSchema.js +3 -2
  881. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  882. package/lib/simple-tree/api/tree.d.ts +2 -2
  883. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  884. package/lib/simple-tree/api/tree.js.map +1 -1
  885. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  886. package/lib/simple-tree/api/treeBeta.js +1 -1
  887. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  888. package/lib/simple-tree/api/treeNodeApi.d.ts +38 -3
  889. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  890. package/lib/simple-tree/api/treeNodeApi.js +39 -28
  891. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  892. package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
  893. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  894. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  895. package/lib/simple-tree/api/verboseTree.js +1 -1
  896. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  897. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  898. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +1 -3
  899. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  900. package/lib/simple-tree/core/context.d.ts.map +1 -1
  901. package/lib/simple-tree/core/context.js.map +1 -1
  902. package/lib/simple-tree/core/getOrCreateNode.d.ts +1 -1
  903. package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  904. package/lib/simple-tree/core/getOrCreateNode.js +2 -2
  905. package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
  906. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  907. package/lib/simple-tree/core/treeNode.js +1 -1
  908. package/lib/simple-tree/core/treeNode.js.map +1 -1
  909. package/lib/simple-tree/core/treeNodeKernel.d.ts +8 -20
  910. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  911. package/lib/simple-tree/core/treeNodeKernel.js +18 -49
  912. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  913. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  914. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  915. package/lib/simple-tree/core/types.d.ts.map +1 -1
  916. package/lib/simple-tree/core/types.js.map +1 -1
  917. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  918. package/lib/simple-tree/core/unhydratedFlexTree.js +3 -3
  919. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  920. package/lib/simple-tree/core/withType.d.ts +1 -1
  921. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  922. package/lib/simple-tree/core/withType.js.map +1 -1
  923. package/lib/simple-tree/createContext.d.ts.map +1 -1
  924. package/lib/simple-tree/createContext.js.map +1 -1
  925. package/{dist/simple-tree/proxies.d.ts → lib/simple-tree/getTreeNodeForField.d.ts} +1 -1
  926. package/lib/simple-tree/getTreeNodeForField.d.ts.map +1 -0
  927. package/lib/simple-tree/{proxies.js → getTreeNodeForField.js} +1 -1
  928. package/lib/simple-tree/getTreeNodeForField.js.map +1 -0
  929. package/lib/simple-tree/index.d.ts +3 -10
  930. package/lib/simple-tree/index.d.ts.map +1 -1
  931. package/lib/simple-tree/index.js +3 -7
  932. package/lib/simple-tree/index.js.map +1 -1
  933. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  934. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  935. package/lib/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  936. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  937. package/lib/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +10 -10
  938. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  939. package/lib/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  940. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  941. package/lib/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  942. package/{dist/simple-tree → lib/simple-tree/node-kinds/array}/arrayNodeTypes.js.map +1 -1
  943. package/lib/simple-tree/node-kinds/array/index.d.ts +7 -0
  944. package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  945. package/lib/simple-tree/node-kinds/array/index.js +7 -0
  946. package/lib/simple-tree/node-kinds/array/index.js.map +1 -0
  947. package/lib/simple-tree/node-kinds/index.d.ts +8 -0
  948. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -0
  949. package/lib/simple-tree/node-kinds/index.js +8 -0
  950. package/lib/simple-tree/node-kinds/index.js.map +1 -0
  951. package/lib/simple-tree/node-kinds/map/index.d.ts +7 -0
  952. package/lib/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  953. package/lib/simple-tree/node-kinds/map/index.js +7 -0
  954. package/lib/simple-tree/node-kinds/map/index.js.map +1 -0
  955. package/{dist/simple-tree → lib/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  956. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  957. package/lib/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +8 -8
  958. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  959. package/lib/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  960. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  961. package/lib/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  962. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  963. package/lib/simple-tree/node-kinds/object/index.d.ts +7 -0
  964. package/lib/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  965. package/lib/simple-tree/node-kinds/object/index.js +7 -0
  966. package/lib/simple-tree/node-kinds/object/index.js.map +1 -0
  967. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNode.d.ts +17 -6
  968. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  969. package/lib/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +35 -13
  970. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  971. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  972. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  973. package/lib/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  974. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  975. package/lib/simple-tree/prepareForInsertion.d.ts +18 -6
  976. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  977. package/lib/simple-tree/prepareForInsertion.js +51 -22
  978. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  979. package/lib/simple-tree/schemaTypes.d.ts +2 -2
  980. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  981. package/lib/simple-tree/schemaTypes.js.map +1 -1
  982. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  983. package/lib/simple-tree/simpleSchema.js.map +1 -1
  984. package/lib/simple-tree/toMapTree.d.ts +2 -22
  985. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  986. package/lib/simple-tree/toMapTree.js +44 -22
  987. package/lib/simple-tree/toMapTree.js.map +1 -1
  988. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  989. package/lib/simple-tree/toStoredSchema.js +1 -1
  990. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  991. package/lib/simple-tree/treeNodeValid.d.ts +1 -1
  992. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  993. package/lib/simple-tree/treeNodeValid.js +2 -2
  994. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  995. package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -1
  996. package/lib/simple-tree/walkFieldSchema.js.map +1 -1
  997. package/lib/tableSchema.d.ts +119 -72
  998. package/lib/tableSchema.d.ts.map +1 -1
  999. package/lib/tableSchema.js +83 -36
  1000. package/lib/tableSchema.js.map +1 -1
  1001. package/lib/treeFactory.d.ts +1 -1
  1002. package/lib/treeFactory.d.ts.map +1 -1
  1003. package/lib/treeFactory.js +3 -3
  1004. package/lib/treeFactory.js.map +1 -1
  1005. package/lib/util/bTreeUtils.d.ts.map +1 -1
  1006. package/lib/util/bTreeUtils.js.map +1 -1
  1007. package/lib/util/breakable.d.ts +23 -4
  1008. package/lib/util/breakable.d.ts.map +1 -1
  1009. package/lib/util/breakable.js +12 -3
  1010. package/lib/util/breakable.js.map +1 -1
  1011. package/package.json +21 -21
  1012. package/src/codec/codec.ts +64 -8
  1013. package/src/core/change-family/editBuilder.ts +1 -0
  1014. package/src/core/forest/forest.ts +1 -1
  1015. package/src/core/index.ts +1 -0
  1016. package/src/core/rebase/types.ts +2 -2
  1017. package/src/core/rebase/utils.ts +10 -10
  1018. package/src/core/schema-stored/formatV1.ts +0 -2
  1019. package/src/core/schema-stored/index.ts +1 -0
  1020. package/src/core/schema-stored/schema.ts +9 -0
  1021. package/src/core/schema-stored/storedSchemaRepository.ts +2 -2
  1022. package/src/core/tree/anchorSet.ts +6 -5
  1023. package/src/core/tree/chunk.ts +2 -1
  1024. package/src/core/tree/delta.ts +1 -0
  1025. package/src/core/tree/deltaUtil.ts +1 -1
  1026. package/src/core/tree/detachedFieldIndex.ts +1 -1
  1027. package/src/core/tree/detachedFieldIndexCodec.ts +2 -2
  1028. package/src/core/tree/pathTree.ts +13 -12
  1029. package/src/core/tree/treeTextFormat.ts +2 -1
  1030. package/src/core/tree/visitDelta.ts +1 -1
  1031. package/src/core/tree/visitorUtils.ts +3 -2
  1032. package/src/feature-libraries/chunked-forest/chunkTree.ts +2 -2
  1033. package/src/feature-libraries/chunked-forest/chunkedForest.ts +4 -4
  1034. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +5 -5
  1035. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +2 -2
  1036. package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -0
  1037. package/src/feature-libraries/chunked-forest/codec/codecs.ts +15 -1
  1038. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
  1039. package/src/feature-libraries/chunked-forest/codec/index.ts +1 -0
  1040. package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +1 -1
  1041. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +1 -1
  1042. package/src/feature-libraries/chunked-forest/emptyChunk.ts +1 -0
  1043. package/src/feature-libraries/chunked-forest/index.ts +1 -0
  1044. package/src/feature-libraries/chunked-forest/sequenceChunk.ts +1 -1
  1045. package/src/feature-libraries/chunked-forest/uniformChunk.ts +2 -3
  1046. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +2 -2
  1047. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -0
  1048. package/src/feature-libraries/default-schema/index.ts +6 -1
  1049. package/src/feature-libraries/default-schema/mappedEditBuilder.ts +1 -0
  1050. package/src/feature-libraries/default-schema/schemaChecker.ts +74 -48
  1051. package/src/feature-libraries/flex-tree/context.ts +29 -8
  1052. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +3 -2
  1053. package/src/feature-libraries/flex-tree/lazyField.ts +1 -1
  1054. package/src/feature-libraries/flex-tree/utilities.ts +1 -1
  1055. package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
  1056. package/src/feature-libraries/index.ts +3 -2
  1057. package/src/feature-libraries/indexing/anchorTreeIndex.ts +4 -2
  1058. package/src/feature-libraries/initializeForest.ts +1 -1
  1059. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +1 -0
  1060. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +1 -1
  1061. package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +1 -1
  1062. package/src/feature-libraries/modular-schema/genericFieldKind.ts +4 -2
  1063. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -0
  1064. package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +1 -0
  1065. package/src/feature-libraries/modular-schema/isNeverTree.ts +0 -2
  1066. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +1 -1
  1067. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2 -0
  1068. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +1 -0
  1069. package/src/feature-libraries/node-identifier/mockNodeIdentifierManager.ts +11 -5
  1070. package/src/feature-libraries/object-forest/objectForest.ts +65 -7
  1071. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +5 -8
  1072. package/src/feature-libraries/schema-index/codec.ts +13 -21
  1073. package/src/feature-libraries/schema-index/formatV1.ts +2 -2
  1074. package/src/feature-libraries/schema-index/index.ts +0 -1
  1075. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -1
  1076. package/src/feature-libraries/sequence-field/formatV3.ts +1 -0
  1077. package/src/feature-libraries/sequence-field/markQueue.ts +1 -0
  1078. package/src/feature-libraries/sequence-field/prune.ts +1 -0
  1079. package/src/feature-libraries/sequence-field/rebase.ts +1 -1
  1080. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +1 -1
  1081. package/src/feature-libraries/sequence-field/replaceRevisions.ts +3 -1
  1082. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +2 -2
  1083. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +3 -3
  1084. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +3 -3
  1085. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +2 -2
  1086. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +1 -1
  1087. package/src/feature-libraries/sequence-field/utils.ts +7 -5
  1088. package/src/feature-libraries/treeCursorUtils.ts +3 -3
  1089. package/src/feature-libraries/treeTextCursor.ts +1 -1
  1090. package/src/feature-libraries/valueUtilities.ts +1 -1
  1091. package/src/index.ts +1 -4
  1092. package/src/jsonDomainSchema.ts +0 -1
  1093. package/src/packageVersion.ts +1 -1
  1094. package/src/serializableDomainSchema.ts +1 -0
  1095. package/src/shared-tree/checkoutFlexTreeView.ts +1 -0
  1096. package/src/shared-tree/independentView.ts +10 -3
  1097. package/src/shared-tree/index.ts +4 -1
  1098. package/src/shared-tree/schematizeTree.ts +2 -1
  1099. package/src/shared-tree/schematizingTreeView.ts +2 -2
  1100. package/src/shared-tree/sharedTree.ts +26 -19
  1101. package/src/shared-tree/sharedTreeChangeFamily.ts +1 -1
  1102. package/src/shared-tree/tree.ts +1 -1
  1103. package/src/shared-tree/treeAlpha.ts +171 -26
  1104. package/src/shared-tree/treeCheckout.ts +3 -2
  1105. package/src/shared-tree-core/branch.ts +3 -4
  1106. package/src/shared-tree-core/branchCommitEnricher.ts +3 -1
  1107. package/src/shared-tree-core/defaultResubmitMachine.ts +2 -0
  1108. package/src/shared-tree-core/editManager.ts +4 -2
  1109. package/src/shared-tree-core/editManagerCodecs.ts +1 -0
  1110. package/src/shared-tree-core/editManagerSummarizer.ts +1 -1
  1111. package/src/shared-tree-core/messageCodecs.ts +1 -1
  1112. package/src/shared-tree-core/sequenceIdUtils.ts +1 -0
  1113. package/src/shared-tree-core/sharedTreeCore.ts +5 -5
  1114. package/src/shared-tree-core/transaction.ts +4 -2
  1115. package/src/shared-tree-core/transactionEnricher.ts +2 -0
  1116. package/src/sharedTreeAttributes.ts +1 -0
  1117. package/src/simple-tree/api/conciseTree.ts +3 -2
  1118. package/src/simple-tree/api/configuration.ts +1 -1
  1119. package/src/simple-tree/api/create.ts +4 -80
  1120. package/src/simple-tree/api/customTree.ts +4 -4
  1121. package/src/simple-tree/api/getSimpleSchema.ts +1 -0
  1122. package/src/simple-tree/api/identifierIndex.ts +1 -1
  1123. package/src/simple-tree/api/index.ts +8 -11
  1124. package/src/simple-tree/api/schemaCompatibilityTester.ts +2 -0
  1125. package/src/simple-tree/api/schemaFactory.ts +28 -23
  1126. package/src/simple-tree/api/schemaFactoryAlpha.ts +8 -6
  1127. package/src/simple-tree/api/schemaFactoryRecursive.ts +3 -3
  1128. package/src/simple-tree/api/schemaFromSimple.ts +3 -1
  1129. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -3
  1130. package/src/simple-tree/api/storedSchema.ts +5 -4
  1131. package/src/simple-tree/api/tree.ts +3 -4
  1132. package/src/simple-tree/api/treeBeta.ts +3 -2
  1133. package/src/simple-tree/api/treeNodeApi.ts +91 -42
  1134. package/src/simple-tree/api/typesUnsafe.ts +1 -1
  1135. package/src/simple-tree/api/verboseTree.ts +1 -1
  1136. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +1 -3
  1137. package/src/simple-tree/core/context.ts +1 -0
  1138. package/src/simple-tree/core/getOrCreateNode.ts +4 -3
  1139. package/src/simple-tree/core/treeNode.ts +1 -1
  1140. package/src/simple-tree/core/treeNodeKernel.ts +32 -61
  1141. package/src/simple-tree/core/treeNodeSchema.ts +1 -0
  1142. package/src/simple-tree/core/types.ts +1 -1
  1143. package/src/simple-tree/core/unhydratedFlexTree.ts +4 -3
  1144. package/src/simple-tree/core/withType.ts +1 -1
  1145. package/src/simple-tree/createContext.ts +1 -0
  1146. package/src/simple-tree/{proxies.ts → getTreeNodeForField.ts} +2 -0
  1147. package/src/simple-tree/index.ts +17 -22
  1148. package/src/simple-tree/leafNodeSchema.ts +1 -0
  1149. package/src/simple-tree/{arrayNode.ts → node-kinds/array/arrayNode.ts} +11 -11
  1150. package/src/simple-tree/{arrayNodeTypes.ts → node-kinds/array/arrayNodeTypes.ts} +3 -3
  1151. package/src/simple-tree/node-kinds/array/index.ts +18 -0
  1152. package/src/simple-tree/node-kinds/index.ts +40 -0
  1153. package/src/simple-tree/node-kinds/map/index.ts +16 -0
  1154. package/src/simple-tree/{mapNode.ts → node-kinds/map/mapNode.ts} +10 -10
  1155. package/src/simple-tree/{mapNodeTypes.ts → node-kinds/map/mapNodeTypes.ts} +3 -3
  1156. package/src/simple-tree/node-kinds/object/index.ts +17 -0
  1157. package/src/simple-tree/{objectNode.ts → node-kinds/object/objectNode.ts} +63 -34
  1158. package/src/simple-tree/{objectNodeTypes.ts → node-kinds/object/objectNodeTypes.ts} +5 -5
  1159. package/src/simple-tree/prepareForInsertion.ts +68 -28
  1160. package/src/simple-tree/schemaTypes.ts +4 -3
  1161. package/src/simple-tree/simpleSchema.ts +1 -0
  1162. package/src/simple-tree/toMapTree.ts +13 -56
  1163. package/src/simple-tree/toStoredSchema.ts +3 -2
  1164. package/src/simple-tree/treeNodeValid.ts +3 -3
  1165. package/src/simple-tree/walkFieldSchema.ts +0 -1
  1166. package/src/tableSchema.ts +109 -62
  1167. package/src/treeFactory.ts +3 -5
  1168. package/src/util/bTreeUtils.ts +1 -0
  1169. package/src/util/breakable.ts +19 -4
  1170. package/dist/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  1171. package/dist/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  1172. package/dist/simple-tree/api/testRecursiveDomain.js +0 -45
  1173. package/dist/simple-tree/api/testRecursiveDomain.js.map +0 -1
  1174. package/dist/simple-tree/arrayNode.d.ts.map +0 -1
  1175. package/dist/simple-tree/arrayNode.js.map +0 -1
  1176. package/dist/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  1177. package/dist/simple-tree/mapNode.d.ts.map +0 -1
  1178. package/dist/simple-tree/mapNode.js.map +0 -1
  1179. package/dist/simple-tree/mapNodeTypes.d.ts.map +0 -1
  1180. package/dist/simple-tree/mapNodeTypes.js.map +0 -1
  1181. package/dist/simple-tree/objectNode.d.ts.map +0 -1
  1182. package/dist/simple-tree/objectNode.js.map +0 -1
  1183. package/dist/simple-tree/objectNodeTypes.d.ts.map +0 -1
  1184. package/dist/simple-tree/objectNodeTypes.js.map +0 -1
  1185. package/dist/simple-tree/proxies.d.ts.map +0 -1
  1186. package/dist/simple-tree/proxies.js.map +0 -1
  1187. package/lib/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  1188. package/lib/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  1189. package/lib/simple-tree/api/testRecursiveDomain.js +0 -41
  1190. package/lib/simple-tree/api/testRecursiveDomain.js.map +0 -1
  1191. package/lib/simple-tree/arrayNode.d.ts.map +0 -1
  1192. package/lib/simple-tree/arrayNode.js.map +0 -1
  1193. package/lib/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  1194. package/lib/simple-tree/arrayNodeTypes.js.map +0 -1
  1195. package/lib/simple-tree/mapNode.d.ts.map +0 -1
  1196. package/lib/simple-tree/mapNode.js.map +0 -1
  1197. package/lib/simple-tree/mapNodeTypes.d.ts.map +0 -1
  1198. package/lib/simple-tree/mapNodeTypes.js.map +0 -1
  1199. package/lib/simple-tree/objectNode.d.ts.map +0 -1
  1200. package/lib/simple-tree/objectNode.js.map +0 -1
  1201. package/lib/simple-tree/objectNodeTypes.d.ts.map +0 -1
  1202. package/lib/simple-tree/objectNodeTypes.js.map +0 -1
  1203. package/lib/simple-tree/proxies.d.ts.map +0 -1
  1204. package/lib/simple-tree/proxies.js.map +0 -1
  1205. package/src/simple-tree/api/testRecursiveDomain.ts +0 -53
@@ -1 +1 @@
1
- {"version":3,"file":"customTree.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/customTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAIpE,OAAO,EAON,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAWjE;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;;;OAMG;IACH,QAAQ,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,YAAY,CAAC,EAAE;QACd,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,QAAQ,CAAC;QAChD,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,MAAM,CAAC;KAC5C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,MAAM,IAAI,cAAc,CAAC,MAAM,CAAC,GAAG,eAAe,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,cAAc,CAAC,MAAM,IAAI,MAAM,EAAE,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAE1E;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EACtC,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,QAAQ,CAAC,mBAAmB,CAAC,EACtC,MAAM,EAAE,WAAW,CA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AwB,EAAE,oBAAoB,CAAC,KAC/D,MAAM,GACT,UAAU,CAAC,MAAM,CAAC,CAgCpB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACrC,MAAM,EAAE,oBAAoB,GAC1B,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAQjC;AAED;;;;;GAKG;AACH,MAAM,MAAM,eAAe,CAAC,OAAO,IAAI,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC;AAEvE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,OAAO,CAStF"}
@@ -2,14 +2,14 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { isFluidHandle } from "@fluidframework/runtime-utils/internal";
6
5
  import { assert, fail } from "@fluidframework/core-utils/internal";
6
+ import { isFluidHandle } from "@fluidframework/runtime-utils/internal";
7
7
  import { EmptyKey, forEachField, inCursorField, LeafNodeStoredSchema, mapCursorField, ObjectNodeStoredSchema, } from "../../core/index.js";
8
+ import { FieldKinds, valueSchemaAllows } from "../../feature-libraries/index.js";
8
9
  import { cloneWithReplacements } from "../../util/index.js";
9
10
  import { NodeKind } from "../core/index.js";
10
11
  import { booleanSchema, handleSchema, nullSchema, numberSchema, stringSchema, } from "../leafNodeSchema.js";
11
- import { isObjectNodeSchema } from "../objectNodeTypes.js";
12
- import { FieldKinds, valueSchemaAllows } from "../../feature-libraries/index.js";
12
+ import { isObjectNodeSchema } from "../node-kinds/index.js";
13
13
  /**
14
14
  * Builds an {@link CustomTree} from a cursor in Nodes mode.
15
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"customTree.js","sourceRoot":"","sources":["../../../src/simple-tree/api/customTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC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AE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC/B,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils/internal\";\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\tEmptyKey,\n\tforEachField,\n\tinCursorField,\n\tLeafNodeStoredSchema,\n\tmapCursorField,\n\tObjectNodeStoredSchema,\n\ttype FieldKey,\n\ttype ITreeCursor,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n} from \"../../core/index.js\";\nimport { cloneWithReplacements } from \"../../util/index.js\";\nimport type { TreeLeafValue } from \"../schemaTypes.js\";\nimport { NodeKind, type TreeNodeSchema } from \"../core/index.js\";\nimport {\n\tbooleanSchema,\n\thandleSchema,\n\tnullSchema,\n\tnumberSchema,\n\tstringSchema,\n} from \"../leafNodeSchema.js\";\nimport { isObjectNodeSchema } from \"../objectNodeTypes.js\";\nimport { FieldKinds, valueSchemaAllows } from \"../../feature-libraries/index.js\";\n\n/**\n * Options for how to interpret or encode a tree when schema information is available.\n * @alpha\n */\nexport interface TreeEncodingOptions {\n\t/**\n\t * If true, use the stored keys of object nodes.\n\t * If false, use the property keys.\n\t * @remarks\n\t * Has no effect on {@link NodeKind}s other than {@link NodeKind.Object}.\n\t * @defaultValue false.\n\t */\n\treadonly useStoredKeys?: boolean;\n}\n\n/**\n * Options for how to interpret a `ConciseTree<TCustom>` without relying on schema.\n */\nexport interface SchemalessParseOptions {\n\t/**\n\t * Converts stored keys into whatever key the tree is using in its encoding.\n\t */\n\tkeyConverter?: {\n\t\tparse(type: string, inputKey: string): FieldKey;\n\t\tencode(type: string, key: FieldKey): string;\n\t};\n}\n\n/**\n * Tree representation with fields as properties and customized handle and child representations.\n */\nexport type CustomTree<TChild> = CustomTreeNode<TChild> | CustomTreeValue;\n\n/**\n * TreeLeafValue except the handle type is customized.\n */\nexport type CustomTreeValue = TreeLeafValue;\n\n/**\n * Tree node representation with fields as properties and customized child representation.\n */\nexport type CustomTreeNode<TChild> = TChild[] | { [key: string]: TChild };\n\n/**\n * Builds an {@link CustomTree} from a cursor in Nodes mode.\n */\nexport function customFromCursor<TChild>(\n\treader: ITreeCursor,\n\toptions: Required<TreeEncodingOptions>,\n\tschema: ReadonlyMap<string, TreeNodeSchema>,\n\tchildHandler: (\n\t\treader: ITreeCursor,\n\t\toptions: Required<TreeEncodingOptions>,\n\t\tschema: ReadonlyMap<string, TreeNodeSchema>,\n\t) => TChild,\n): CustomTree<TChild> {\n\tconst type = reader.type;\n\tconst nodeSchema = schema.get(type) ?? fail(0xb2e /* missing schema for type in cursor */);\n\n\tswitch (type) {\n\t\tcase numberSchema.identifier:\n\t\tcase booleanSchema.identifier:\n\t\tcase nullSchema.identifier:\n\t\tcase stringSchema.identifier:\n\t\t\tassert(reader.value !== undefined, 0xa50 /* out of schema: missing value */);\n\t\t\tassert(!isFluidHandle(reader.value), 0xa51 /* out of schema: unexpected FluidHandle */);\n\t\t\treturn reader.value;\n\t\tcase handleSchema.identifier:\n\t\t\tassert(reader.value !== undefined, 0xa52 /* out of schema: missing value */);\n\t\t\tassert(isFluidHandle(reader.value), 0xa53 /* out of schema: expected FluidHandle */);\n\t\t\treturn reader.value;\n\t\tdefault: {\n\t\t\tassert(reader.value === undefined, 0xa54 /* out of schema: unexpected value */);\n\t\t\tif (nodeSchema.kind === NodeKind.Array) {\n\t\t\t\tconst fields = inCursorField(reader, EmptyKey, () =>\n\t\t\t\t\tmapCursorField(reader, () => childHandler(reader, options, schema)),\n\t\t\t\t);\n\t\t\t\treturn fields;\n\t\t\t} else {\n\t\t\t\tconst fields: Record<string, TChild> = {};\n\t\t\t\tforEachField(reader, () => {\n\t\t\t\t\tconst children = mapCursorField(reader, () => childHandler(reader, options, schema));\n\t\t\t\t\tif (children.length === 1) {\n\t\t\t\t\t\tconst storedKey = reader.getFieldKey();\n\t\t\t\t\t\tconst key =\n\t\t\t\t\t\t\tisObjectNodeSchema(nodeSchema) && !options.useStoredKeys\n\t\t\t\t\t\t\t\t? (nodeSchema.storedKeyToPropertyKey.get(storedKey) ??\n\t\t\t\t\t\t\t\t\tfail(0xb2f /* missing property key */))\n\t\t\t\t\t\t\t\t: storedKey;\n\t\t\t\t\t\t// Length is checked above.\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\t\tfields[key] = children[0]!;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassert(children.length === 0, 0xa19 /* invalid children number */);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn fields;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Builds an {@link CustomTree} from a cursor in Nodes mode.\n * @remarks\n * Uses stored keys and stored schema.\n */\nexport function customFromCursorStored<TChild>(\n\treader: ITreeCursor,\n\tschema: ReadonlyMap<TreeNodeSchemaIdentifier, TreeNodeStoredSchema>,\n\tchildHandler: (\n\t\treader: ITreeCursor,\n\t\tschema: ReadonlyMap<TreeNodeSchemaIdentifier, TreeNodeStoredSchema>,\n\t) => TChild,\n): CustomTree<TChild> {\n\tconst type = reader.type;\n\tconst nodeSchema = schema.get(type) ?? fail(0xb30 /* missing schema for type in cursor */);\n\n\tif (nodeSchema instanceof LeafNodeStoredSchema) {\n\t\tassert(valueSchemaAllows(nodeSchema.leafValue, reader.value), 0xa9c /* invalid value */);\n\t\treturn reader.value;\n\t}\n\n\tassert(reader.value === undefined, 0xa9d /* out of schema: unexpected value */);\n\n\tconst arrayTypes = tryStoredSchemaAsArray(nodeSchema);\n\tif (arrayTypes !== undefined) {\n\t\tconst field = inCursorField(reader, EmptyKey, () =>\n\t\t\tmapCursorField(reader, () => childHandler(reader, schema)),\n\t\t);\n\t\treturn field;\n\t}\n\n\tconst fields: Record<string, TChild> = {};\n\tforEachField(reader, () => {\n\t\tconst children = mapCursorField(reader, () => childHandler(reader, schema));\n\t\tif (children.length === 1) {\n\t\t\tconst storedKey = reader.getFieldKey();\n\t\t\t// Length is checked above.\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tfields[storedKey] = children[0]!;\n\t\t} else {\n\t\t\tassert(children.length === 0, 0xa9e /* invalid children number */);\n\t\t}\n\t});\n\treturn fields;\n}\n\n/**\n * Assumes `schema` corresponds to a simple-tree schema.\n * If it is an array schema, returns the allowed types for the array field.\n * Otherwise returns `undefined`.\n */\nexport function tryStoredSchemaAsArray(\n\tschema: TreeNodeStoredSchema,\n): ReadonlySet<string> | undefined {\n\tif (schema instanceof ObjectNodeStoredSchema) {\n\t\tconst empty = schema.getFieldSchema(EmptyKey);\n\t\tif (empty.kind === FieldKinds.sequence.identifier) {\n\t\t\tassert(schema.objectNodeFields.size === 1, 0xa9f /* invalid schema */);\n\t\t\treturn empty.types;\n\t\t}\n\t}\n}\n\n/**\n * Options for how to transcode handles.\n * @remarks\n * Can be applied using {@link replaceHandles}.\n * @alpha\n */\nexport type HandleConverter<TCustom> = (data: IFluidHandle) => TCustom;\n\n/**\n * Clones tree, replacing any handles.\n * @remarks\n * This can be useful converting data containing handles to JSON compatible formats,\n * or just asserting that data does not contain handles.\n *\n * Reversing this replacement depends on how the replacer encodes handles, and can often be impossible if the replacer\n * does not have all the necessary context to restore the handles\n * (e.g. if the handles are something insufficiently descriptive,\n * if data referenced by the handle got garbage collected,\n * if the encoded form of the handle can't be differentiated from other data,\n * or the replacer doesn't have access to the correct Fluid container to to restore them from).\n *\n * Code attempting to reverse this replacement may want to use {@link cloneWithReplacements}.\n * @alpha\n */\nexport function replaceHandles<T>(tree: unknown, replacer: HandleConverter<T>): unknown {\n\treturn cloneWithReplacements(tree, \"\", (key, value) => {\n\t\t// eslint-disable-next-line unicorn/prefer-ternary\n\t\tif (isFluidHandle(value)) {\n\t\t\treturn { clone: false, value: replacer(value) };\n\t\t} else {\n\t\t\treturn { clone: true, value };\n\t\t}\n\t});\n}\n"]}
1
+ {"version":3,"file":"customTree.js","sourceRoot":"","sources":["../../../src/simple-tree/api/customTree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAEvE,OAAO,EACN,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,sBAAsB,GAKtB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAuB,MAAM,kBAAkB,CAAC;AACjE,OAAO,EACN,aAAa,EACb,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,GACZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AA8C5D;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC/B,MAAmB,EACnB,OAAsC,EACtC,MAA2C,EAC3C,YAIW;IAEX,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;IAE3F,QAAQ,IAAI,EAAE,CAAC;QACd,KAAK,YAAY,CAAC,UAAU,CAAC;QAC7B,KAAK,aAAa,CAAC,UAAU,CAAC;QAC9B,KAAK,UAAU,CAAC,UAAU,CAAC;QAC3B,KAAK,YAAY,CAAC,UAAU;YAC3B,MAAM,CAAC,MAAM,CAAC,KAAK,KAAK,SAAS,EAAE,KAAK,CAAC,kCAAkC,CAAC,CAAC;YAC7E,MAAM,CA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kD;QAClD,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,CAAC;aAAM,CAAC;YACP,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QAC/B,CAAC;IACF,CAAC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils/internal\";\n\nimport {\n\tEmptyKey,\n\tforEachField,\n\tinCursorField,\n\tLeafNodeStoredSchema,\n\tmapCursorField,\n\tObjectNodeStoredSchema,\n\ttype FieldKey,\n\ttype ITreeCursor,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n} from \"../../core/index.js\";\nimport { FieldKinds, valueSchemaAllows } from \"../../feature-libraries/index.js\";\nimport { cloneWithReplacements } from \"../../util/index.js\";\nimport { NodeKind, type TreeNodeSchema } from \"../core/index.js\";\nimport {\n\tbooleanSchema,\n\thandleSchema,\n\tnullSchema,\n\tnumberSchema,\n\tstringSchema,\n} from \"../leafNodeSchema.js\";\nimport { isObjectNodeSchema } from \"../node-kinds/index.js\";\nimport type { TreeLeafValue } from \"../schemaTypes.js\";\n\n/**\n * Options for how to interpret or encode a tree when schema information is available.\n * @alpha\n */\nexport interface TreeEncodingOptions {\n\t/**\n\t * If true, use the stored keys of object nodes.\n\t * If false, use the property keys.\n\t * @remarks\n\t * Has no effect on {@link NodeKind}s other than {@link NodeKind.Object}.\n\t * @defaultValue false.\n\t */\n\treadonly useStoredKeys?: boolean;\n}\n\n/**\n * Options for how to interpret a `ConciseTree<TCustom>` without relying on schema.\n */\nexport interface SchemalessParseOptions {\n\t/**\n\t * Converts stored keys into whatever key the tree is using in its encoding.\n\t */\n\tkeyConverter?: {\n\t\tparse(type: string, inputKey: string): FieldKey;\n\t\tencode(type: string, key: FieldKey): string;\n\t};\n}\n\n/**\n * Tree representation with fields as properties and customized handle and child representations.\n */\nexport type CustomTree<TChild> = CustomTreeNode<TChild> | CustomTreeValue;\n\n/**\n * TreeLeafValue except the handle type is customized.\n */\nexport type CustomTreeValue = TreeLeafValue;\n\n/**\n * Tree node representation with fields as properties and customized child representation.\n */\nexport type CustomTreeNode<TChild> = TChild[] | { [key: string]: TChild };\n\n/**\n * Builds an {@link CustomTree} from a cursor in Nodes mode.\n */\nexport function customFromCursor<TChild>(\n\treader: ITreeCursor,\n\toptions: Required<TreeEncodingOptions>,\n\tschema: ReadonlyMap<string, TreeNodeSchema>,\n\tchildHandler: (\n\t\treader: ITreeCursor,\n\t\toptions: Required<TreeEncodingOptions>,\n\t\tschema: ReadonlyMap<string, TreeNodeSchema>,\n\t) => TChild,\n): CustomTree<TChild> {\n\tconst type = reader.type;\n\tconst nodeSchema = schema.get(type) ?? fail(0xb2e /* missing schema for type in cursor */);\n\n\tswitch (type) {\n\t\tcase numberSchema.identifier:\n\t\tcase booleanSchema.identifier:\n\t\tcase nullSchema.identifier:\n\t\tcase stringSchema.identifier:\n\t\t\tassert(reader.value !== undefined, 0xa50 /* out of schema: missing value */);\n\t\t\tassert(!isFluidHandle(reader.value), 0xa51 /* out of schema: unexpected FluidHandle */);\n\t\t\treturn reader.value;\n\t\tcase handleSchema.identifier:\n\t\t\tassert(reader.value !== undefined, 0xa52 /* out of schema: missing value */);\n\t\t\tassert(isFluidHandle(reader.value), 0xa53 /* out of schema: expected FluidHandle */);\n\t\t\treturn reader.value;\n\t\tdefault: {\n\t\t\tassert(reader.value === undefined, 0xa54 /* out of schema: unexpected value */);\n\t\t\tif (nodeSchema.kind === NodeKind.Array) {\n\t\t\t\tconst fields = inCursorField(reader, EmptyKey, () =>\n\t\t\t\t\tmapCursorField(reader, () => childHandler(reader, options, schema)),\n\t\t\t\t);\n\t\t\t\treturn fields;\n\t\t\t} else {\n\t\t\t\tconst fields: Record<string, TChild> = {};\n\t\t\t\tforEachField(reader, () => {\n\t\t\t\t\tconst children = mapCursorField(reader, () => childHandler(reader, options, schema));\n\t\t\t\t\tif (children.length === 1) {\n\t\t\t\t\t\tconst storedKey = reader.getFieldKey();\n\t\t\t\t\t\tconst key =\n\t\t\t\t\t\t\tisObjectNodeSchema(nodeSchema) && !options.useStoredKeys\n\t\t\t\t\t\t\t\t? (nodeSchema.storedKeyToPropertyKey.get(storedKey) ??\n\t\t\t\t\t\t\t\t\tfail(0xb2f /* missing property key */))\n\t\t\t\t\t\t\t\t: storedKey;\n\t\t\t\t\t\t// Length is checked above.\n\t\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\t\tfields[key] = children[0]!;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tassert(children.length === 0, 0xa19 /* invalid children number */);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\treturn fields;\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Builds an {@link CustomTree} from a cursor in Nodes mode.\n * @remarks\n * Uses stored keys and stored schema.\n */\nexport function customFromCursorStored<TChild>(\n\treader: ITreeCursor,\n\tschema: ReadonlyMap<TreeNodeSchemaIdentifier, TreeNodeStoredSchema>,\n\tchildHandler: (\n\t\treader: ITreeCursor,\n\t\tschema: ReadonlyMap<TreeNodeSchemaIdentifier, TreeNodeStoredSchema>,\n\t) => TChild,\n): CustomTree<TChild> {\n\tconst type = reader.type;\n\tconst nodeSchema = schema.get(type) ?? fail(0xb30 /* missing schema for type in cursor */);\n\n\tif (nodeSchema instanceof LeafNodeStoredSchema) {\n\t\tassert(valueSchemaAllows(nodeSchema.leafValue, reader.value), 0xa9c /* invalid value */);\n\t\treturn reader.value;\n\t}\n\n\tassert(reader.value === undefined, 0xa9d /* out of schema: unexpected value */);\n\n\tconst arrayTypes = tryStoredSchemaAsArray(nodeSchema);\n\tif (arrayTypes !== undefined) {\n\t\tconst field = inCursorField(reader, EmptyKey, () =>\n\t\t\tmapCursorField(reader, () => childHandler(reader, schema)),\n\t\t);\n\t\treturn field;\n\t}\n\n\tconst fields: Record<string, TChild> = {};\n\tforEachField(reader, () => {\n\t\tconst children = mapCursorField(reader, () => childHandler(reader, schema));\n\t\tif (children.length === 1) {\n\t\t\tconst storedKey = reader.getFieldKey();\n\t\t\t// Length is checked above.\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tfields[storedKey] = children[0]!;\n\t\t} else {\n\t\t\tassert(children.length === 0, 0xa9e /* invalid children number */);\n\t\t}\n\t});\n\treturn fields;\n}\n\n/**\n * Assumes `schema` corresponds to a simple-tree schema.\n * If it is an array schema, returns the allowed types for the array field.\n * Otherwise returns `undefined`.\n */\nexport function tryStoredSchemaAsArray(\n\tschema: TreeNodeStoredSchema,\n): ReadonlySet<string> | undefined {\n\tif (schema instanceof ObjectNodeStoredSchema) {\n\t\tconst empty = schema.getFieldSchema(EmptyKey);\n\t\tif (empty.kind === FieldKinds.sequence.identifier) {\n\t\t\tassert(schema.objectNodeFields.size === 1, 0xa9f /* invalid schema */);\n\t\t\treturn empty.types;\n\t\t}\n\t}\n}\n\n/**\n * Options for how to transcode handles.\n * @remarks\n * Can be applied using {@link replaceHandles}.\n * @alpha\n */\nexport type HandleConverter<TCustom> = (data: IFluidHandle) => TCustom;\n\n/**\n * Clones tree, replacing any handles.\n * @remarks\n * This can be useful converting data containing handles to JSON compatible formats,\n * or just asserting that data does not contain handles.\n *\n * Reversing this replacement depends on how the replacer encodes handles, and can often be impossible if the replacer\n * does not have all the necessary context to restore the handles\n * (e.g. if the handles are something insufficiently descriptive,\n * if data referenced by the handle got garbage collected,\n * if the encoded form of the handle can't be differentiated from other data,\n * or the replacer doesn't have access to the correct Fluid container to to restore them from).\n *\n * Code attempting to reverse this replacement may want to use {@link cloneWithReplacements}.\n * @alpha\n */\nexport function replaceHandles<T>(tree: unknown, replacer: HandleConverter<T>): unknown {\n\treturn cloneWithReplacements(tree, \"\", (key, value) => {\n\t\t// eslint-disable-next-line unicorn/prefer-ternary\n\t\tif (isFluidHandle(value)) {\n\t\t\treturn { clone: false, value: replacer(value) };\n\t\t} else {\n\t\t\treturn { clone: true, value };\n\t\t}\n\t});\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"getSimpleSchema.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/getSimpleSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,mBAAmB,GAAG,gBAAgB,CAE7E"}
1
+ {"version":3,"file":"getSimpleSchema.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/getSimpleSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAI3D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,mBAAmB,GAAG,gBAAgB,CAE7E"}
@@ -1 +1 @@
1
- {"version":3,"file":"getSimpleSchema.js","sourceRoot":"","sources":["../../../src/simple-tree/api/getSimpleSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,eAAe,CAAC,MAA2B;IAC1D,OAAO,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ImplicitFieldSchema } from \"../schemaTypes.js\";\nimport type { SimpleTreeSchema } from \"../simpleSchema.js\";\nimport { toSimpleTreeSchema } from \"./viewSchemaToSimpleSchema.js\";\n\n/**\n * Copies data from {@link ImplicitFieldSchema} to create a {@link SimpleTreeSchema} out of new plain JavaScript objects, Sets and Maps.\n *\n * @remarks\n * See also {@link TreeViewConfigurationAlpha} which implements {@link SimpleTreeSchema} as a way to get a `SimpleTreeSchema` without copying the node and field schema and without losing as much type information.\n *\n * @privateRemarks\n * In the future, we may wish to move this to a more discoverable API location.\n * For now, while still an experimental API, it is surfaced as a free function.\n *\n * Note that all TreeNodeSchema get a {@link Context} cached on them as part of one time initialization which contains a map from identifier to all transitively referenced schema.\n * Perhaps exposing access to that would cover this use-case as well.\n *\n * @alpha\n */\nexport function getSimpleSchema(schema: ImplicitFieldSchema): SimpleTreeSchema {\n\treturn toSimpleTreeSchema(schema, true);\n}\n"]}
1
+ {"version":3,"file":"getSimpleSchema.js","sourceRoot":"","sources":["../../../src/simple-tree/api/getSimpleSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAEnE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,eAAe,CAAC,MAA2B;IAC1D,OAAO,kBAAkB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AACzC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ImplicitFieldSchema } from \"../schemaTypes.js\";\nimport type { SimpleTreeSchema } from \"../simpleSchema.js\";\n\nimport { toSimpleTreeSchema } from \"./viewSchemaToSimpleSchema.js\";\n\n/**\n * Copies data from {@link ImplicitFieldSchema} to create a {@link SimpleTreeSchema} out of new plain JavaScript objects, Sets and Maps.\n *\n * @remarks\n * See also {@link TreeViewConfigurationAlpha} which implements {@link SimpleTreeSchema} as a way to get a `SimpleTreeSchema` without copying the node and field schema and without losing as much type information.\n *\n * @privateRemarks\n * In the future, we may wish to move this to a more discoverable API location.\n * For now, while still an experimental API, it is surfaced as a free function.\n *\n * Note that all TreeNodeSchema get a {@link Context} cached on them as part of one time initialization which contains a map from identifier to all transitively referenced schema.\n * Perhaps exposing access to that would cover this use-case as well.\n *\n * @alpha\n */\nexport function getSimpleSchema(schema: ImplicitFieldSchema): SimpleTreeSchema {\n\treturn toSimpleTreeSchema(schema, true);\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { UsageError } from "@fluidframework/telemetry-utils/internal";
6
6
  import { FieldKind } from "../schemaTypes.js";
7
- import { ObjectNodeSchema } from "../objectNodeTypes.js";
7
+ import { ObjectNodeSchema } from "../node-kinds/index.js";
8
8
  import { walkFieldSchema } from "../walkFieldSchema.js";
9
9
  import { createSimpleTreeIndex } from "./simpleTreeIndex.js";
10
10
  function isStringKey(key) {
@@ -1 +1 @@
1
- {"version":3,"file":"identifierIndex.js","sourceRoot":"","sources":["../../../src/simple-tree/api/identifierIndex.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtE,OAAO,EAAE,SAAS,EAA4B,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAwB,MAAM,sBAAsB,CAAC;AASnF,SAAS,WAAW,CAAC,GAAiB;IACrC,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACpC,IAAuB;IAEvB,4EAA4E;IAC5E,yEAAyE;IACzE,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;IACnD,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE;QAC5B,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,gBAAgB,EAAE,CAAC;gBACzC,KAAK,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;oBAChE,IAAI,WAAW,CAAC,IAAI,KAAK,SAAS,CAAC,UAAU,EAAE,CAAC;wBAC/C,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;wBACnD,MAAM;oBACP,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;KACD,CAAC,CAAC;IAEH,OAAO,qBAAqB,CAC3B,IAAI,EACJ,CAAC,OAAO,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,EACrD,CAAC,KAAK,EAAE,EAAE;QACT,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,UAAU,CACnB,oFAAoF,CACpF,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,EACD,WAAW,CACX,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport type { TreeIndexKey } from \"../../feature-libraries/index.js\";\nimport { FieldKind, type ImplicitFieldSchema } from \"../schemaTypes.js\";\nimport type { TreeNode } from \"../core/index.js\";\nimport { ObjectNodeSchema } from \"../objectNodeTypes.js\";\nimport type { TreeView } from \"./tree.js\";\nimport { walkFieldSchema } from \"../walkFieldSchema.js\";\nimport { createSimpleTreeIndex, type SimpleTreeIndex } from \"./simpleTreeIndex.js\";\n\n/**\n * An index that returns tree nodes given their associated identifiers.\n *\n * @alpha\n */\nexport type IdentifierIndex = SimpleTreeIndex<string, TreeNode>;\n\nfunction isStringKey(key: TreeIndexKey): key is string {\n\treturn typeof key === \"string\";\n}\n\n/**\n * Creates an {@link IdentifierIndex} for a given {@link TreeView}.\n *\n * @alpha\n */\nexport function createIdentifierIndex<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): IdentifierIndex {\n\t// For each node schema, find which field key the identifier field is under.\n\t// This can be done easily because identifiers are their own field kinds.\n\tconst identifierFields = new Map<string, string>();\n\twalkFieldSchema(view.schema, {\n\t\tnode: (schemus) => {\n\t\t\tif (schemus instanceof ObjectNodeSchema) {\n\t\t\t\tfor (const [fieldKey, fieldSchema] of schemus.fields.entries()) {\n\t\t\t\t\tif (fieldSchema.kind === FieldKind.Identifier) {\n\t\t\t\t\t\tidentifierFields.set(schemus.identifier, fieldKey);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n\n\treturn createSimpleTreeIndex(\n\t\tview,\n\t\t(schemus) => identifierFields.get(schemus.identifier),\n\t\t(nodes) => {\n\t\t\tif (nodes.length > 1) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"cannot retrieve node from index: there are multiple nodes with the same identifier\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn nodes[0];\n\t\t},\n\t\tisStringKey,\n\t);\n}\n"]}
1
+ {"version":3,"file":"identifierIndex.js","sourceRoot":"","sources":["../../../src/simple-tree/api/identifierIndex.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtE,OAAO,EAAE,SAAS,EAA4B,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,qBAAqB,EAAwB,MAAM,sBAAsB,CAAC;AASnF,SAAS,WAAW,CAAC,GAAiB;IACrC,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CACpC,IAAuB;IAEvB,4EAA4E;IAC5E,yEAAyE;IACzE,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;IACnD,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE;QAC5B,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,gBAAgB,EAAE,CAAC;gBACzC,KAAK,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;oBAChE,IAAI,WAAW,CAAC,IAAI,KAAK,SAAS,CAAC,UAAU,EAAE,CAAC;wBAC/C,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;wBACnD,MAAM;oBACP,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;KACD,CAAC,CAAC;IAEH,OAAO,qBAAqB,CAC3B,IAAI,EACJ,CAAC,OAAO,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,EACrD,CAAC,KAAK,EAAE,EAAE;QACT,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,UAAU,CACnB,oFAAoF,CACpF,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,EACD,WAAW,CACX,CAAC;AACH,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport type { TreeIndexKey } from \"../../feature-libraries/index.js\";\nimport { FieldKind, type ImplicitFieldSchema } from \"../schemaTypes.js\";\nimport type { TreeNode } from \"../core/index.js\";\nimport { ObjectNodeSchema } from \"../node-kinds/index.js\";\nimport type { TreeView } from \"./tree.js\";\nimport { walkFieldSchema } from \"../walkFieldSchema.js\";\nimport { createSimpleTreeIndex, type SimpleTreeIndex } from \"./simpleTreeIndex.js\";\n\n/**\n * An index that returns tree nodes given their associated identifiers.\n *\n * @alpha\n */\nexport type IdentifierIndex = SimpleTreeIndex<string, TreeNode>;\n\nfunction isStringKey(key: TreeIndexKey): key is string {\n\treturn typeof key === \"string\";\n}\n\n/**\n * Creates an {@link IdentifierIndex} for a given {@link TreeView}.\n *\n * @alpha\n */\nexport function createIdentifierIndex<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): IdentifierIndex {\n\t// For each node schema, find which field key the identifier field is under.\n\t// This can be done easily because identifiers are their own field kinds.\n\tconst identifierFields = new Map<string, string>();\n\twalkFieldSchema(view.schema, {\n\t\tnode: (schemus) => {\n\t\t\tif (schemus instanceof ObjectNodeSchema) {\n\t\t\t\tfor (const [fieldKey, fieldSchema] of schemus.fields.entries()) {\n\t\t\t\t\tif (fieldSchema.kind === FieldKind.Identifier) {\n\t\t\t\t\t\tidentifierFields.set(schemus.identifier, fieldKey);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n\n\treturn createSimpleTreeIndex(\n\t\tview,\n\t\t(schemus) => identifierFields.get(schemus.identifier),\n\t\t(nodes) => {\n\t\t\tif (nodes.length > 1) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"cannot retrieve node from index: there are multiple nodes with the same identifier\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn nodes[0];\n\t\t},\n\t\tisStringKey,\n\t);\n}\n"]}
@@ -11,8 +11,8 @@ export { SchemaFactoryAlpha } from "./schemaFactoryAlpha.js";
11
11
  export type { ValidateRecursiveSchema, FixRecursiveArraySchema, ValidateRecursiveSchemaTemplate, FixRecursiveRecursionLimit, } from "./schemaFactoryRecursive.js";
12
12
  export { allowUnused } from "./schemaFactoryRecursive.js";
13
13
  export { adaptEnum, enumFromStrings, singletonSchema, } from "./schemaCreationUtilities.js";
14
- export { treeNodeApi, type TreeNodeApi, tryGetSchema } from "./treeNodeApi.js";
15
- export { createFromInsertable, cursorFromInsertable, createFromCursor, createFromMapTree, } from "./create.js";
14
+ export { treeNodeApi, type TreeNodeApi, tryGetSchema, getStoredKey, getPropertyKeyFromStoredKey, getIdentifierFromNode, } from "./treeNodeApi.js";
15
+ export { createFromCursor, createFromMapTree, } from "./create.js";
16
16
  export { type JsonSchemaId, type JsonSchemaType, type JsonObjectNodeSchema, type JsonArrayNodeSchema, type JsonMapNodeSchema, type JsonLeafNodeSchema, type JsonSchemaRef, type JsonRefPath, type JsonNodeSchema, type JsonNodeSchemaBase, type JsonTreeSchema, type JsonFieldSchema, type JsonLeafSchemaType, } from "./jsonSchema.js";
17
17
  export type { TreeSchemaEncodingOptions } from "./getJsonSchema.js";
18
18
  export { getJsonSchema } from "./getJsonSchema.js";
@@ -30,5 +30,4 @@ export { type TransactionConstraint, type NodeInDocumentConstraint, type RunTran
30
30
  export { generateSchemaFromSimpleSchema } from "./schemaFromSimple.js";
31
31
  export { toSimpleTreeSchema } from "./viewSchemaToSimpleSchema.js";
32
32
  export type { TreeChangeEvents } from "./treeChangeEvents.js";
33
- export { RecursiveObject as test_RecursiveObject, base as test_RecursiveObject_base, RecursiveObjectPojoMode as test_RecursiveObjectPojoMode, } from "./testRecursiveDomain.js";
34
33
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,UAAU,EACV,sBAAsB,EACtB,yBAAyB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC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AoB,EACvC,IAAI,IAAI,yBAAyB,EACjC,uBAAuB,IAAI,4BAA4B,GACvD,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,UAAU,EACV,sBAAsB,EACtB,yBAAyB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACX,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,UAAU,GACV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EACN,aAAa,EACb,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,aAAa,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,YAAY,EACX,uBAAuB,EACvB,uBAAuB,EACvB,+BAA+B,EAC/B,0BAA0B,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACN,SAAS,EACT,eAAe,EACf,eAAe,GACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,WAAW,EACX,KAAK,WAAW,EAChB,YAAY,EACZ,YAAY,EACZ,2BAA2B,EAC3B,qBAAqB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,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ClC,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,QAAQ,GACR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -8,8 +8,8 @@ export { SchemaFactory, schemaStatics, } from "./schemaFactory.js";
8
8
  export { SchemaFactoryAlpha } from "./schemaFactoryAlpha.js";
9
9
  export { allowUnused } from "./schemaFactoryRecursive.js";
10
10
  export { adaptEnum, enumFromStrings, singletonSchema, } from "./schemaCreationUtilities.js";
11
- export { treeNodeApi, tryGetSchema } from "./treeNodeApi.js";
12
- export { createFromInsertable, cursorFromInsertable, createFromCursor, createFromMapTree, } from "./create.js";
11
+ export { treeNodeApi, tryGetSchema, getStoredKey, getPropertyKeyFromStoredKey, getIdentifierFromNode, } from "./treeNodeApi.js";
12
+ export { createFromCursor, createFromMapTree, } from "./create.js";
13
13
  export { getJsonSchema } from "./getJsonSchema.js";
14
14
  export { getSimpleSchema } from "./getSimpleSchema.js";
15
15
  export { SchemaCompatibilityTester } from "./schemaCompatibilityTester.js";
@@ -23,7 +23,4 @@ export { extractPersistedSchema, comparePersistedSchema, } from "./storedSchema.
23
23
  export { rollback, } from "./transactionTypes.js";
24
24
  export { generateSchemaFromSimpleSchema } from "./schemaFromSimple.js";
25
25
  export { toSimpleTreeSchema } from "./viewSchemaToSimpleSchema.js";
26
- // Exporting the schema (RecursiveObject) to test that recursive types are working correctly.
27
- // These are `@internal` so they can't be included in the `InternalClassTreeTypes` due to https://github.com/microsoft/rushstack/issues/3639
28
- export { RecursiveObject as test_RecursiveObject, base as test_RecursiveObject_base, RecursiveObjectPojoMode as test_RecursiveObjectPojoMode, } from "./testRecursiveDomain.js";
29
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;AAY5B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EACN,aAAa,EAIb,aAAa,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAO7D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACN,SAAS,EACT,eAAe,EACf,eAAe,GACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,WAAW,EAAoB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EACN,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,aAAa,CAAC;AAiBrB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAS3E,OAAO,EAGN,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEN,sBAAsB,EAGtB,sBAAsB,EACtB,cAAc,GAEd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEN,iBAAiB,EACjB,yBAAyB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAmD,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAwB,MAAM,sBAAsB,CAAC;AACnF,OAAO,EACN,qBAAqB,GAErB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,sBAAsB,EACtB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAUN,QAAQ,GACR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,6FAA6F;AAC7F,4IAA4I;AAC5I,OAAO,EACN,eAAe,IAAI,oBAAoB,EACvC,IAAI,IAAI,yBAAyB,EACjC,uBAAuB,IAAI,4BAA4B,GACvD,MAAM,0BAA0B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tTreeSchema,\n\tITreeViewConfiguration,\n\tITreeConfigurationOptions,\n} from \"./configuration.js\";\nexport {\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n} from \"./configuration.js\";\nexport type {\n\tITree,\n\tTreeView,\n\tViewableTree,\n\tTreeViewEvents,\n\tSchemaCompatibilityStatus,\n\tTreeViewAlpha,\n\tTreeBranch,\n\tTreeBranchEvents,\n\tITreeAlpha,\n} from \"./tree.js\";\nexport { asTreeViewAlpha } from \"./tree.js\";\nexport {\n\tSchemaFactory,\n\ttype ScopedSchemaName,\n\ttype SchemaFactoryObjectOptions,\n\ttype SchemaStatics,\n\tschemaStatics,\n} from \"./schemaFactory.js\";\nexport { SchemaFactoryAlpha } from \"./schemaFactoryAlpha.js\";\nexport type {\n\tValidateRecursiveSchema,\n\tFixRecursiveArraySchema,\n\tValidateRecursiveSchemaTemplate,\n\tFixRecursiveRecursionLimit,\n} from \"./schemaFactoryRecursive.js\";\nexport { allowUnused } from \"./schemaFactoryRecursive.js\";\nexport {\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n} from \"./schemaCreationUtilities.js\";\nexport { treeNodeApi, type TreeNodeApi, tryGetSchema } from \"./treeNodeApi.js\";\nexport {\n\tcreateFromInsertable,\n\tcursorFromInsertable,\n\tcreateFromCursor,\n\tcreateFromMapTree,\n} from \"./create.js\";\nexport {\n\ttype JsonSchemaId,\n\ttype JsonSchemaType,\n\ttype JsonObjectNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonLeafNodeSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonTreeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonLeafSchemaType,\n} from \"./jsonSchema.js\";\nexport type { TreeSchemaEncodingOptions } from \"./getJsonSchema.js\";\nexport { getJsonSchema } from \"./getJsonSchema.js\";\nexport { getSimpleSchema } from \"./getSimpleSchema.js\";\nexport { SchemaCompatibilityTester } from \"./schemaCompatibilityTester.js\";\nexport type {\n\tUnenforced,\n\tFieldSchemaAlphaUnsafe,\n\tArrayNodeCustomizableSchemaUnsafe,\n\tMapNodeCustomizableSchemaUnsafe,\n\tSystem_Unsafe,\n} from \"./typesUnsafe.js\";\n\nexport {\n\ttype VerboseTreeNode,\n\ttype VerboseTree,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\treplaceVerboseTreeHandles,\n} from \"./verboseTree.js\";\n\nexport {\n\ttype TreeEncodingOptions,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\treplaceHandles,\n\ttype HandleConverter,\n} from \"./customTree.js\";\n\nexport {\n\ttype ConciseTree,\n\tconciseFromCursor,\n\treplaceConciseTreeHandles,\n} from \"./conciseTree.js\";\n\nexport { TreeBeta, type NodeChangedData, type TreeChangeEventsBeta } from \"./treeBeta.js\";\nexport { createSimpleTreeIndex, type SimpleTreeIndex } from \"./simpleTreeIndex.js\";\nexport {\n\tcreateIdentifierIndex,\n\ttype IdentifierIndex,\n} from \"./identifierIndex.js\";\n\nexport {\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n} from \"./storedSchema.js\";\n\nexport {\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n} from \"./transactionTypes.js\";\n\nexport { generateSchemaFromSimpleSchema } from \"./schemaFromSimple.js\";\nexport { toSimpleTreeSchema } from \"./viewSchemaToSimpleSchema.js\";\nexport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\n\n// Exporting the schema (RecursiveObject) to test that recursive types are working correctly.\n// These are `@internal` so they can't be included in the `InternalClassTreeTypes` due to https://github.com/microsoft/rushstack/issues/3639\nexport {\n\tRecursiveObject as test_RecursiveObject,\n\tbase as test_RecursiveObject_base,\n\tRecursiveObjectPojoMode as test_RecursiveObjectPojoMode,\n} from \"./testRecursiveDomain.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;AAY5B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EACN,aAAa,EAIb,aAAa,GACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAO7D,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACN,SAAS,EACT,eAAe,EACf,eAAe,GACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,WAAW,EAEX,YAAY,EACZ,YAAY,EACZ,2BAA2B,EAC3B,qBAAqB,GACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,gBAAgB,EAChB,iBAAiB,GACjB,MAAM,aAAa,CAAC;AAiBrB,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAS3E,OAAO,EAGN,0BAA0B,EAC1B,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEN,sBAAsB,EAGtB,sBAAsB,EACtB,cAAc,GAEd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAEN,iBAAiB,EACjB,yBAAyB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAmD,MAAM,eAAe,CAAC;AAC1F,OAAO,EAAE,qBAAqB,EAAwB,MAAM,sBAAsB,CAAC;AACnF,OAAO,EACN,qBAAqB,GAErB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,sBAAsB,EACtB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAUN,QAAQ,GACR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tTreeSchema,\n\tITreeViewConfiguration,\n\tITreeConfigurationOptions,\n} from \"./configuration.js\";\nexport {\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n} from \"./configuration.js\";\nexport type {\n\tITree,\n\tTreeView,\n\tViewableTree,\n\tTreeViewEvents,\n\tSchemaCompatibilityStatus,\n\tTreeViewAlpha,\n\tTreeBranch,\n\tTreeBranchEvents,\n\tITreeAlpha,\n} from \"./tree.js\";\nexport { asTreeViewAlpha } from \"./tree.js\";\nexport {\n\tSchemaFactory,\n\ttype ScopedSchemaName,\n\ttype SchemaFactoryObjectOptions,\n\ttype SchemaStatics,\n\tschemaStatics,\n} from \"./schemaFactory.js\";\nexport { SchemaFactoryAlpha } from \"./schemaFactoryAlpha.js\";\nexport type {\n\tValidateRecursiveSchema,\n\tFixRecursiveArraySchema,\n\tValidateRecursiveSchemaTemplate,\n\tFixRecursiveRecursionLimit,\n} from \"./schemaFactoryRecursive.js\";\nexport { allowUnused } from \"./schemaFactoryRecursive.js\";\nexport {\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n} from \"./schemaCreationUtilities.js\";\nexport {\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttryGetSchema,\n\tgetStoredKey,\n\tgetPropertyKeyFromStoredKey,\n\tgetIdentifierFromNode,\n} from \"./treeNodeApi.js\";\nexport {\n\tcreateFromCursor,\n\tcreateFromMapTree,\n} from \"./create.js\";\nexport {\n\ttype JsonSchemaId,\n\ttype JsonSchemaType,\n\ttype JsonObjectNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonLeafNodeSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonTreeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonLeafSchemaType,\n} from \"./jsonSchema.js\";\nexport type { TreeSchemaEncodingOptions } from \"./getJsonSchema.js\";\nexport { getJsonSchema } from \"./getJsonSchema.js\";\nexport { getSimpleSchema } from \"./getSimpleSchema.js\";\nexport { SchemaCompatibilityTester } from \"./schemaCompatibilityTester.js\";\nexport type {\n\tUnenforced,\n\tFieldSchemaAlphaUnsafe,\n\tArrayNodeCustomizableSchemaUnsafe,\n\tMapNodeCustomizableSchemaUnsafe,\n\tSystem_Unsafe,\n} from \"./typesUnsafe.js\";\n\nexport {\n\ttype VerboseTreeNode,\n\ttype VerboseTree,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\treplaceVerboseTreeHandles,\n} from \"./verboseTree.js\";\n\nexport {\n\ttype TreeEncodingOptions,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\treplaceHandles,\n\ttype HandleConverter,\n} from \"./customTree.js\";\n\nexport {\n\ttype ConciseTree,\n\tconciseFromCursor,\n\treplaceConciseTreeHandles,\n} from \"./conciseTree.js\";\n\nexport { TreeBeta, type NodeChangedData, type TreeChangeEventsBeta } from \"./treeBeta.js\";\nexport { createSimpleTreeIndex, type SimpleTreeIndex } from \"./simpleTreeIndex.js\";\nexport {\n\tcreateIdentifierIndex,\n\ttype IdentifierIndex,\n} from \"./identifierIndex.js\";\n\nexport {\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n} from \"./storedSchema.js\";\n\nexport {\n\ttype TransactionConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n} from \"./transactionTypes.js\";\n\nexport { generateSchemaFromSimpleSchema } from \"./schemaFromSimple.js\";\nexport { toSimpleTreeSchema } from \"./viewSchemaToSimpleSchema.js\";\nexport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"schemaCompatibilityTester.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,iBAAiB,EAEjB,KAAK,QAAQ,EAGb,KAAK,gBAAgB,EACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEN,KAAK,gBAAgB,EAOrB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAE3D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SAAS,CAAC,MAAM,EAAE,gBAAgB,GAAG,iBAAiB;IAiC7D;;OAEG;IACH,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,SAAS;CAIjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"schemaCompatibilityTester.js","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaCompatibilityTester.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EACN,iBAAiB,GAMjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,UAAU,EAGV,8BAA8B,EAC9B,WAAW,EACX,qBAAqB,EACrB,aAAa,EACb,oBAAoB,GACpB,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD;;;;GAIG;AACH,MAAM,OAAO,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,cAAc,CAAC,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,IA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AAC,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","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,OAAO,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EACN,iBAAiB,GAMjB,MAAM,qBA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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}.
@@ -610,10 +608,12 @@ export declare class SchemaFactory<out TScope extends string | undefined = strin
610
608
  * - It is a UUID which will not collide with other generated UUIDs.
611
609
  *
612
610
  * - It is compressed to a space-efficient representation when stored in the document.
611
+ * Reading the identifier before inserting the node into a tree prevents the identifier from being stored in its compressed form,
612
+ * resulting in a larger storage footprint.
613
613
  *
614
614
  * - A compressed form of the identifier can be accessed at runtime via the {@link TreeNodeApi.shortId|Tree.shortId()} API.
615
615
  *
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.
616
+ * - It will not be present in the object's iterable properties until explicitly read or until having been inserted into a tree.
617
617
  *
618
618
  * However, a user may alternatively supply their own string as the identifier if desired (for example, if importing identifiers from another system).
619
619
  * In that case, if the user requires it to be unique, it is up to them to ensure uniqueness.
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFactory.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EACN,KAAK,uBAAuB,EAG5B,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAKN,YAAY,EACZ,KAAK,UAAU,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,0CAA0C,EAC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AAK,EACxB,KAAK,CAAC,CAAC,SAAS,uBAAuB,CAAC,aAAa,CAAC,yBAAyB,CAAC,EAEhF,IAAI,EAAE,IAAI,EACV,CAAC,EAAE,CAAC,GACF,mBAAmB,CACrB,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,EAC9B,QAAQ,CAAC,MAAM,EACf,aAAa,CAAC,oBAAoB,CAAC,CAAC,EAAE,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,EACrE,MAAM,GAAG,aAAa,CAAC,sCAAsC,CAAC,CAAC,CAAC,EAChE,KAAK,EACL,CAAC,CACD;IAeD;;;;;;;OAOG;IAEI,cAAc,CACpB,KAAK,CAAC,IAAI,SAAS,KAAK,EACxB,KAAK,CAAC,CAAC,SAAS,aAAa,CAAC,0BAA0B,EACvD,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;QAc1B;;;;;;;;;;WAUG;6BACkB,SACpB,cAAc,gDAAgD,CAAC,CAAC,CAAC,CACjE;;IAQJ;;;;;;OAMG;IAEI,YAAY,CAClB,IAAI,SAAS,KAAK,EAClB,KAAK,CAAC,CAAC,SAAS,aAAa,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"}
@@ -5,13 +5,11 @@
5
5
  import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
6
6
  import { isFluidHandle } from "@fluidframework/runtime-utils/internal";
7
7
  import { getOrCreate, isReadonlyArray, } from "../../util/index.js";
8
+ import { isLazy } from "../flexList.js";
8
9
  import { booleanSchema, handleSchema, nullSchema, numberSchema, stringSchema, } from "../leafNodeSchema.js";
10
+ import { arraySchema, mapSchema, objectSchema, } from "../node-kinds/index.js";
9
11
  import { FieldKind, createFieldSchema, getDefaultProvider, markSchemaMostDerived, } from "../schemaTypes.js";
10
- import { arraySchema } from "../arrayNode.js";
11
- import { objectSchema, } from "../objectNode.js";
12
- import { mapSchema } from "../mapNode.js";
13
12
  import { createFieldSchemaUnsafe } from "./schemaFactoryRecursive.js";
14
- import { isLazy } from "../flexList.js";
15
13
  /**
16
14
  * Gets the leaf domain schema compatible with a given {@link TreeValue}.
17
15
  */
@@ -370,10 +368,12 @@ export class SchemaFactory {
370
368
  * - It is a UUID which will not collide with other generated UUIDs.
371
369
  *
372
370
  * - It is compressed to a space-efficient representation when stored in the document.
371
+ * Reading the identifier before inserting the node into a tree prevents the identifier from being stored in its compressed form,
372
+ * resulting in a larger storage footprint.
373
373
  *
374
374
  * - A compressed form of the identifier can be accessed at runtime via the {@link TreeNodeApi.shortId|Tree.shortId()} API.
375
375
  *
376
- * - 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.
376
+ * - It will not be present in the object's iterable properties until explicitly read or until having been inserted into a tree.
377
377
  *
378
378
  * However, a user may alternatively supply their own string as the identifier if desired (for example, if importing identifiers from another system).
379
379
  * In that case, if the user requires it to be unique, it is up to them to ensure uniqueness.