@fluidframework/tree 2.118.1 → 3.0.1

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 (1234) hide show
  1. package/CHANGELOG.md +367 -75
  2. package/README.md +55 -52
  3. package/{api-extractor.json → api-extractor/api-extractor-model.json} +1 -1
  4. package/api-report/tree.alpha.api.md +130 -145
  5. package/api-report/tree.beta.api.md +122 -91
  6. package/api-report/tree.legacy.beta.api.md +122 -91
  7. package/api-report/tree.legacy.public.api.md +26 -43
  8. package/api-report/tree.public.api.md +26 -43
  9. package/dist/api.d.ts +9 -1
  10. package/dist/api.d.ts.map +1 -1
  11. package/dist/api.js +2 -3
  12. package/dist/api.js.map +1 -1
  13. package/dist/codec/codec.d.ts +2 -2
  14. package/dist/codec/codec.d.ts.map +1 -1
  15. package/dist/codec/codec.js +9 -7
  16. package/dist/codec/codec.js.map +1 -1
  17. package/dist/codec/discriminatedUnions.js +1 -0
  18. package/dist/codec/discriminatedUnions.js.map +1 -1
  19. package/dist/codec/versioned/codec.d.ts.map +1 -1
  20. package/dist/codec/versioned/codec.js +4 -2
  21. package/dist/codec/versioned/codec.js.map +1 -1
  22. package/dist/componentApi.d.ts.map +1 -1
  23. package/dist/componentApi.js +20 -17
  24. package/dist/componentApi.js.map +1 -1
  25. package/dist/core/change-family/editBuilder.js +1 -0
  26. package/dist/core/change-family/editBuilder.js.map +1 -1
  27. package/dist/core/forest/editableForest.js +1 -2
  28. package/dist/core/forest/editableForest.js.map +1 -1
  29. package/dist/core/forest/forest.js +3 -3
  30. package/dist/core/forest/forest.js.map +1 -1
  31. package/dist/core/index.d.ts +2 -2
  32. package/dist/core/index.d.ts.map +1 -1
  33. package/dist/core/index.js +9 -5
  34. package/dist/core/index.js.map +1 -1
  35. package/dist/core/rebase/changeRebaser.js +5 -5
  36. package/dist/core/rebase/changeRebaser.js.map +1 -1
  37. package/dist/core/rebase/index.d.ts +1 -1
  38. package/dist/core/rebase/index.d.ts.map +1 -1
  39. package/dist/core/rebase/index.js +2 -1
  40. package/dist/core/rebase/index.js.map +1 -1
  41. package/dist/core/rebase/revisionTagCodec.d.ts +1 -1
  42. package/dist/core/rebase/revisionTagCodec.d.ts.map +1 -1
  43. package/dist/core/rebase/revisionTagCodec.js +3 -1
  44. package/dist/core/rebase/revisionTagCodec.js.map +1 -1
  45. package/dist/core/rebase/types.d.ts +12 -1
  46. package/dist/core/rebase/types.d.ts.map +1 -1
  47. package/dist/core/rebase/types.js +19 -15
  48. package/dist/core/rebase/types.js.map +1 -1
  49. package/dist/core/rebase/utils.js +9 -10
  50. package/dist/core/rebase/utils.js.map +1 -1
  51. package/dist/core/schema-stored/schema.js +9 -4
  52. package/dist/core/schema-stored/schema.js.map +1 -1
  53. package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  54. package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  55. package/dist/core/schema-stored/storedSchemaRepository.js +6 -4
  56. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  57. package/dist/core/tree/anchorSet.d.ts +1 -1
  58. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  59. package/dist/core/tree/anchorSet.js +62 -55
  60. package/dist/core/tree/anchorSet.js.map +1 -1
  61. package/dist/core/tree/chunk.js +2 -2
  62. package/dist/core/tree/chunk.js.map +1 -1
  63. package/dist/core/tree/cursor.js +12 -12
  64. package/dist/core/tree/cursor.js.map +1 -1
  65. package/dist/core/tree/deltaUtil.d.ts +34 -9
  66. package/dist/core/tree/deltaUtil.d.ts.map +1 -1
  67. package/dist/core/tree/deltaUtil.js +51 -17
  68. package/dist/core/tree/deltaUtil.js.map +1 -1
  69. package/dist/core/tree/detachedFieldIndex.js +23 -21
  70. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  71. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +10 -10
  72. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  73. package/dist/core/tree/detachedFieldIndexCodecCommon.js +1 -2
  74. package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  75. package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -2
  76. package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  77. package/dist/core/tree/detachedFieldIndexCodecV2.js +3 -2
  78. package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  79. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts +3 -3
  80. package/dist/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  81. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts +1 -1
  82. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts +2 -2
  83. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  84. package/dist/core/tree/index.d.ts +1 -1
  85. package/dist/core/tree/index.d.ts.map +1 -1
  86. package/dist/core/tree/index.js +7 -4
  87. package/dist/core/tree/index.js.map +1 -1
  88. package/dist/core/tree/mapTree.js +1 -2
  89. package/dist/core/tree/mapTree.js.map +1 -1
  90. package/dist/core/tree/pathTree.js +7 -8
  91. package/dist/core/tree/pathTree.js.map +1 -1
  92. package/dist/core/tree/persistedTreeTextFormat.d.ts +4 -4
  93. package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  94. package/dist/core/tree/sparseTree.js +17 -13
  95. package/dist/core/tree/sparseTree.js.map +1 -1
  96. package/dist/core/tree/treeTextFormat.js +4 -5
  97. package/dist/core/tree/treeTextFormat.js.map +1 -1
  98. package/dist/core/tree/types.js +3 -3
  99. package/dist/core/tree/types.js.map +1 -1
  100. package/dist/core/tree/visitDelta.js +1 -2
  101. package/dist/core/tree/visitDelta.js.map +1 -1
  102. package/dist/core/tree/visitorUtils.js +5 -6
  103. package/dist/core/tree/visitorUtils.js.map +1 -1
  104. package/dist/entrypoints/alpha.d.ts +1 -1
  105. package/dist/entrypoints/alpha.d.ts.map +1 -1
  106. package/dist/entrypoints/alpha.js +6 -4
  107. package/dist/entrypoints/alpha.js.map +1 -1
  108. package/dist/entrypoints/beta.d.ts +1 -1
  109. package/dist/entrypoints/beta.d.ts.map +1 -1
  110. package/dist/entrypoints/beta.js +2 -2
  111. package/dist/entrypoints/beta.js.map +1 -1
  112. package/dist/entrypoints/legacy.d.ts +1 -1
  113. package/dist/entrypoints/legacy.d.ts.map +1 -1
  114. package/dist/entrypoints/legacy.js +2 -2
  115. package/dist/entrypoints/legacy.js.map +1 -1
  116. package/dist/entrypoints/public.d.ts +1 -1
  117. package/dist/entrypoints/public.d.ts.map +1 -1
  118. package/dist/entrypoints/public.js +1 -2
  119. package/dist/entrypoints/public.js.map +1 -1
  120. package/dist/extensibleUnionNode.d.ts.map +1 -1
  121. package/dist/extensibleUnionNode.js +1 -1
  122. package/dist/extensibleUnionNode.js.map +1 -1
  123. package/dist/feature-libraries/changeAtomIdBTree.js +3 -4
  124. package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
  125. package/dist/feature-libraries/changeAtomIdCodec.js +1 -2
  126. package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
  127. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  128. package/dist/feature-libraries/chunked-forest/basicChunk.js +14 -1
  129. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  130. package/dist/feature-libraries/chunked-forest/chunkTree.js +28 -20
  131. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  132. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  133. package/dist/feature-libraries/chunked-forest/chunkedForest.js +22 -16
  134. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  135. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +9 -11
  136. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  137. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +15 -7
  138. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  139. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +7 -3
  140. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  141. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +3 -2
  142. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  143. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  144. package/dist/feature-libraries/chunked-forest/codec/codecs.js +2 -0
  145. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  146. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +33 -17
  147. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  148. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +2 -2
  149. package/dist/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
  150. package/dist/feature-libraries/chunked-forest/codec/format/versions.js +2 -2
  151. package/dist/feature-libraries/chunked-forest/codec/format/versions.js.map +1 -1
  152. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js +11 -2
  153. package/dist/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  154. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +5 -6
  155. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  156. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js +2 -3
  157. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  158. package/dist/feature-libraries/chunked-forest/sequenceChunk.js +1 -0
  159. package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  160. package/dist/feature-libraries/chunked-forest/uniformChunk.js +73 -15
  161. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  162. package/dist/feature-libraries/comparison-forest/comparisonForest.js +79 -79
  163. package/dist/feature-libraries/comparison-forest/comparisonForest.js.map +1 -1
  164. package/dist/feature-libraries/cursorComparator.d.ts +8 -0
  165. package/dist/feature-libraries/cursorComparator.d.ts.map +1 -1
  166. package/dist/feature-libraries/cursorComparator.js +43 -10
  167. package/dist/feature-libraries/cursorComparator.js.map +1 -1
  168. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +6 -3
  169. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  170. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +2 -2
  171. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  172. package/dist/feature-libraries/default-schema/mappedEditBuilder.js +2 -0
  173. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  174. package/dist/feature-libraries/deltaUtils.js +2 -3
  175. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  176. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +2 -0
  177. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  178. package/dist/feature-libraries/editableTreeBinder.js +1 -2
  179. package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
  180. package/dist/feature-libraries/flex-tree/context.js +19 -3
  181. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  182. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +2 -2
  183. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  184. package/dist/feature-libraries/flex-tree/lazyEntity.js +14 -14
  185. package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  186. package/dist/feature-libraries/flex-tree/lazyField.js +28 -30
  187. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  188. package/dist/feature-libraries/flex-tree/lazyNode.js +24 -23
  189. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  190. package/dist/feature-libraries/flex-tree/observer.js +2 -2
  191. package/dist/feature-libraries/flex-tree/observer.js.map +1 -1
  192. package/dist/feature-libraries/flex-tree/utilities.js +5 -5
  193. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  194. package/dist/feature-libraries/forest-summary/forestSummarizer.js +122 -117
  195. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  196. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +49 -32
  197. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  198. package/dist/feature-libraries/forest-summary/summaryTypes.js +2 -3
  199. package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
  200. package/dist/feature-libraries/indexing/anchorTreeIndex.js +35 -31
  201. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  202. package/dist/feature-libraries/mapTreeCursor.js +6 -7
  203. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  204. package/dist/feature-libraries/mitigatedChangeFamily.js +2 -3
  205. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  206. package/dist/feature-libraries/modular-schema/comparison.js +6 -7
  207. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  208. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +4 -4
  209. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  210. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js +14 -12
  211. package/dist/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
  212. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +63 -10
  213. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  214. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js +3 -3
  215. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  216. package/dist/feature-libraries/modular-schema/fieldKind.js +10 -0
  217. package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  218. package/dist/feature-libraries/modular-schema/filterEdits.d.ts +13 -0
  219. package/dist/feature-libraries/modular-schema/filterEdits.d.ts.map +1 -0
  220. package/dist/feature-libraries/modular-schema/filterEdits.js +51 -0
  221. package/dist/feature-libraries/modular-schema/filterEdits.js.map +1 -0
  222. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  223. package/dist/feature-libraries/modular-schema/genericFieldKind.js +7 -4
  224. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  225. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js +1 -2
  226. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  227. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +2 -2
  228. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  229. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js +1 -2
  230. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  231. package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
  232. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  233. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  234. package/dist/feature-libraries/modular-schema/invert.d.ts +1 -1
  235. package/dist/feature-libraries/modular-schema/invert.d.ts.map +1 -1
  236. package/dist/feature-libraries/modular-schema/invert.js +5 -30
  237. package/dist/feature-libraries/modular-schema/invert.js.map +1 -1
  238. package/dist/feature-libraries/modular-schema/isNeverTree.js +4 -5
  239. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  240. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts +5 -7
  241. package/dist/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
  242. package/dist/feature-libraries/modular-schema/minimizeModularChange.js +459 -10
  243. package/dist/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
  244. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +14 -15
  245. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  246. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -2
  247. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  248. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +2 -2
  249. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  250. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -10
  251. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  252. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +30 -97
  253. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  254. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts +9 -9
  255. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  256. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +4 -4
  257. package/dist/feature-libraries/modular-schema/modularChangeTypes.js +1 -2
  258. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  259. package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts +13 -1
  260. package/dist/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -1
  261. package/dist/feature-libraries/modular-schema/modularChangeUtils.js +115 -12
  262. package/dist/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -1
  263. package/dist/feature-libraries/modular-schema/prune.d.ts +2 -3
  264. package/dist/feature-libraries/modular-schema/prune.d.ts.map +1 -1
  265. package/dist/feature-libraries/modular-schema/prune.js +25 -8
  266. package/dist/feature-libraries/modular-schema/prune.js.map +1 -1
  267. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js +1 -3
  268. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  269. package/dist/feature-libraries/node-identifier/nodeIdentifier.js +2 -2
  270. package/dist/feature-libraries/node-identifier/nodeIdentifier.js.map +1 -1
  271. package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js +3 -3
  272. package/dist/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -1
  273. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  274. package/dist/feature-libraries/object-forest/objectForest.js +274 -267
  275. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  276. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  277. package/dist/feature-libraries/optional-field/optionalField.js +27 -35
  278. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  279. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +7 -7
  280. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  281. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +8 -8
  282. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  283. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +1 -2
  284. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  285. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  286. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +1 -2
  287. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  288. package/dist/feature-libraries/schema-index/schemaSummarizer.js +3 -0
  289. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  290. package/dist/feature-libraries/schemaChecker.js +5 -5
  291. package/dist/feature-libraries/schemaChecker.js.map +1 -1
  292. package/dist/feature-libraries/sequence-field/compose.js +8 -2
  293. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  294. package/dist/feature-libraries/sequence-field/filterEdits.d.ts +3 -3
  295. package/dist/feature-libraries/sequence-field/filterEdits.d.ts.map +1 -1
  296. package/dist/feature-libraries/sequence-field/filterEdits.js +29 -11
  297. package/dist/feature-libraries/sequence-field/filterEdits.js.map +1 -1
  298. package/dist/feature-libraries/sequence-field/formatV1.d.ts +102 -102
  299. package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  300. package/dist/feature-libraries/sequence-field/formatV2.d.ts +79 -79
  301. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  302. package/dist/feature-libraries/sequence-field/formatV3.d.ts +56 -56
  303. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  304. package/dist/feature-libraries/sequence-field/invert.js +1 -2
  305. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  306. package/dist/feature-libraries/sequence-field/markListFactory.js +3 -4
  307. package/dist/feature-libraries/sequence-field/markListFactory.js.map +1 -1
  308. package/dist/feature-libraries/sequence-field/markQueue.js +4 -2
  309. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  310. package/dist/feature-libraries/sequence-field/moveEffectTable.js +9 -9
  311. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  312. package/dist/feature-libraries/sequence-field/prune.js +1 -2
  313. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  314. package/dist/feature-libraries/sequence-field/rebase.js +7 -2
  315. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  316. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +1 -2
  317. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  318. package/dist/feature-libraries/sequence-field/replaceRevisions.js +1 -2
  319. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  320. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +2 -3
  321. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  322. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +1 -2
  323. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  324. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  325. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +9 -9
  326. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  327. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +1 -2
  328. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  329. package/dist/feature-libraries/sequence-field/utils.d.ts +2 -2
  330. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  331. package/dist/feature-libraries/sequence-field/utils.js +54 -67
  332. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  333. package/dist/feature-libraries/treeCursorUtils.js +19 -15
  334. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  335. package/dist/feature-libraries/treeTextCursor.js +8 -8
  336. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  337. package/dist/feature-libraries/valueUtilities.js +4 -5
  338. package/dist/feature-libraries/valueUtilities.js.map +1 -1
  339. package/dist/index.d.ts +4 -29
  340. package/dist/index.d.ts.map +1 -1
  341. package/dist/index.js +6 -9
  342. package/dist/index.js.map +1 -1
  343. package/dist/internalTypes.d.ts +1 -1
  344. package/dist/internalTypes.d.ts.map +1 -1
  345. package/dist/internalTypes.js.map +1 -1
  346. package/dist/packageVersion.d.ts +1 -1
  347. package/dist/packageVersion.d.ts.map +1 -1
  348. package/dist/packageVersion.js +1 -1
  349. package/dist/packageVersion.js.map +1 -1
  350. package/dist/serializableDomainSchema.d.ts +1 -1
  351. package/dist/shared-tree/history.d.ts.map +1 -1
  352. package/dist/shared-tree/history.js +32 -13
  353. package/dist/shared-tree/history.js.map +1 -1
  354. package/dist/shared-tree/independentView.d.ts +27 -3
  355. package/dist/shared-tree/independentView.d.ts.map +1 -1
  356. package/dist/shared-tree/independentView.js +36 -7
  357. package/dist/shared-tree/independentView.js.map +1 -1
  358. package/dist/shared-tree/index.d.ts +2 -1
  359. package/dist/shared-tree/index.d.ts.map +1 -1
  360. package/dist/shared-tree/index.js +6 -2
  361. package/dist/shared-tree/index.js.map +1 -1
  362. package/dist/shared-tree/isAuditableFromOutcome.js +1 -2
  363. package/dist/shared-tree/isAuditableFromOutcome.js.map +1 -1
  364. package/dist/shared-tree/schematizeTree.js +3 -4
  365. package/dist/shared-tree/schematizeTree.js.map +1 -1
  366. package/dist/shared-tree/schematizingTreeView.d.ts +2 -2
  367. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  368. package/dist/shared-tree/schematizingTreeView.js +59 -26
  369. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  370. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  371. package/dist/shared-tree/sharedTree.js +28 -19
  372. package/dist/shared-tree/sharedTree.js.map +1 -1
  373. package/dist/shared-tree/sharedTreeChangeCodecs.js +3 -3
  374. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  375. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  376. package/dist/shared-tree/sharedTreeChangeEnricher.js +12 -4
  377. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  378. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  379. package/dist/shared-tree/sharedTreeChangeFamily.js +11 -8
  380. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  381. package/dist/shared-tree/sharedTreeChangeFormat.js +2 -3
  382. package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  383. package/dist/shared-tree/sharedTreeEditBuilder.js +2 -0
  384. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  385. package/dist/shared-tree/transactionMinimize.d.ts.map +1 -1
  386. package/dist/shared-tree/transactionMinimize.js +2 -1
  387. package/dist/shared-tree/transactionMinimize.js.map +1 -1
  388. package/dist/shared-tree/transactionPostProcessor.js +2 -3
  389. package/dist/shared-tree/transactionPostProcessor.js.map +1 -1
  390. package/dist/shared-tree/tree.js +2 -2
  391. package/dist/shared-tree/tree.js.map +1 -1
  392. package/dist/shared-tree/treeAlpha.d.ts +5 -16
  393. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  394. package/dist/shared-tree/treeAlpha.js +18 -11
  395. package/dist/shared-tree/treeAlpha.js.map +1 -1
  396. package/{lib/simple-tree/api → dist/shared-tree}/treeBeta.d.ts +8 -65
  397. package/dist/shared-tree/treeBeta.d.ts.map +1 -0
  398. package/dist/shared-tree/treeBeta.js +70 -0
  399. package/dist/shared-tree/treeBeta.js.map +1 -0
  400. package/dist/shared-tree/treeCheckout.d.ts +5 -0
  401. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  402. package/dist/shared-tree/treeCheckout.js +986 -907
  403. package/dist/shared-tree/treeCheckout.js.map +1 -1
  404. package/dist/shared-tree/unhydratedTreeContext.js +3 -4
  405. package/dist/shared-tree/unhydratedTreeContext.js.map +1 -1
  406. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  407. package/dist/shared-tree-core/branch.js +24 -20
  408. package/dist/shared-tree-core/branch.js.map +1 -1
  409. package/dist/shared-tree-core/branchCommitCounter.js +35 -32
  410. package/dist/shared-tree-core/branchCommitCounter.js.map +1 -1
  411. package/dist/shared-tree-core/branchCommitEnricher.js +9 -8
  412. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  413. package/dist/shared-tree-core/branchIdCodec.js +2 -3
  414. package/dist/shared-tree-core/branchIdCodec.js.map +1 -1
  415. package/dist/shared-tree-core/customMetadataCodec.js +2 -3
  416. package/dist/shared-tree-core/customMetadataCodec.js.map +1 -1
  417. package/dist/shared-tree-core/customMetadataFormat.d.ts.map +1 -1
  418. package/dist/shared-tree-core/defaultResubmitMachine.js +11 -9
  419. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  420. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  421. package/dist/shared-tree-core/editManager.js +73 -44
  422. package/dist/shared-tree-core/editManager.js.map +1 -1
  423. package/dist/shared-tree-core/editManagerCodecs.js +3 -3
  424. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  425. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
  426. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  427. package/dist/shared-tree-core/editManagerCodecsCommons.js +33 -36
  428. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  429. package/dist/shared-tree-core/editManagerCodecsV1toV4.js +1 -2
  430. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  431. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -2
  432. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  433. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +11 -11
  434. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  435. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +5 -4
  436. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  437. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +10 -9
  438. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  439. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  440. package/dist/shared-tree-core/editManagerSummarizer.js +6 -1
  441. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  442. package/dist/shared-tree-core/messageCodecV1ToV4.js +1 -2
  443. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  444. package/dist/shared-tree-core/messageCodecVSharedBranches.js +1 -2
  445. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  446. package/dist/shared-tree-core/messageCodecs.js +3 -3
  447. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  448. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +3 -2
  449. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  450. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts +3 -2
  451. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  452. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  453. package/dist/shared-tree-core/sharedTreeCore.js +44 -22
  454. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  455. package/dist/shared-tree-core/summaryTypes.js +2 -2
  456. package/dist/shared-tree-core/summaryTypes.js.map +1 -1
  457. package/dist/shared-tree-core/transaction.js +36 -39
  458. package/dist/shared-tree-core/transaction.js.map +1 -1
  459. package/dist/shared-tree-core/versionedSummarizer.js +4 -0
  460. package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
  461. package/dist/simple-tree/api/cloneTree.d.ts +11 -0
  462. package/dist/simple-tree/api/cloneTree.d.ts.map +1 -0
  463. package/dist/simple-tree/api/cloneTree.js +31 -0
  464. package/dist/simple-tree/api/cloneTree.js.map +1 -0
  465. package/dist/simple-tree/api/conciseTree.js +2 -3
  466. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  467. package/dist/simple-tree/api/configuration.js +21 -2
  468. package/dist/simple-tree/api/configuration.js.map +1 -1
  469. package/dist/simple-tree/api/create.js +2 -3
  470. package/dist/simple-tree/api/create.js.map +1 -1
  471. package/dist/simple-tree/api/customTree.js +6 -6
  472. package/dist/simple-tree/api/customTree.js.map +1 -1
  473. package/dist/simple-tree/api/dirtyIndex.js +1 -2
  474. package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
  475. package/dist/simple-tree/api/discrepancies.js +2 -3
  476. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  477. package/dist/simple-tree/api/eraseSchemaDetails.js +2 -3
  478. package/dist/simple-tree/api/eraseSchemaDetails.js.map +1 -1
  479. package/dist/simple-tree/api/getJsonSchema.js +1 -2
  480. package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
  481. package/dist/simple-tree/api/getSimpleSchema.js +1 -2
  482. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  483. package/dist/simple-tree/api/identifierIndex.js +1 -2
  484. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  485. package/dist/simple-tree/api/incrementalAllowedTypes.js +2 -2
  486. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  487. package/dist/simple-tree/api/index.d.ts +3 -3
  488. package/dist/simple-tree/api/index.d.ts.map +1 -1
  489. package/dist/simple-tree/api/index.js +4 -7
  490. package/dist/simple-tree/api/index.js.map +1 -1
  491. package/dist/simple-tree/api/schemaCompatibilityTester.js +2 -3
  492. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  493. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +3 -7
  494. package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  495. package/dist/simple-tree/api/schemaCreationUtilities.js +6 -9
  496. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  497. package/dist/simple-tree/api/schemaFactory.d.ts +4 -9
  498. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  499. package/dist/simple-tree/api/schemaFactory.js +13 -12
  500. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  501. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +20 -22
  502. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  503. package/dist/simple-tree/api/schemaFactoryAlpha.js +78 -81
  504. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  505. package/dist/simple-tree/api/schemaFactoryBeta.d.ts +7 -9
  506. package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  507. package/dist/simple-tree/api/schemaFactoryBeta.js +32 -35
  508. package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  509. package/dist/simple-tree/api/schemaFactoryRecursive.js +1 -2
  510. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  511. package/dist/simple-tree/api/schemaFromSimple.js +1 -2
  512. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  513. package/dist/simple-tree/api/schemaStatics.d.ts +7 -7
  514. package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
  515. package/dist/simple-tree/api/simpleSchemaCodec.js +2 -3
  516. package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  517. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +2 -3
  518. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  519. package/dist/simple-tree/api/simpleTreeIndex.js +1 -2
  520. package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
  521. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +46 -2
  522. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  523. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +54 -12
  524. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  525. package/dist/simple-tree/api/storedSchema.js +2 -3
  526. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  527. package/dist/simple-tree/api/transactionTypes.d.ts +4 -4
  528. package/dist/simple-tree/api/transactionTypes.js.map +1 -1
  529. package/dist/simple-tree/api/tree.d.ts +80 -61
  530. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  531. package/dist/simple-tree/api/tree.js +3 -5
  532. package/dist/simple-tree/api/tree.js.map +1 -1
  533. package/dist/simple-tree/api/treeChangeEvents.d.ts +16 -4
  534. package/dist/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
  535. package/dist/simple-tree/api/treeChangeEvents.js.map +1 -1
  536. package/dist/simple-tree/api/treeChangeEventsBeta.d.ts +209 -0
  537. package/dist/simple-tree/api/treeChangeEventsBeta.d.ts.map +1 -0
  538. package/dist/simple-tree/api/{treeAlpha.js → treeChangeEventsBeta.js} +1 -1
  539. package/dist/simple-tree/api/treeChangeEventsBeta.js.map +1 -0
  540. package/dist/simple-tree/api/treeNodeApi.d.ts +1 -75
  541. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  542. package/dist/simple-tree/api/treeNodeApi.js +7 -7
  543. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  544. package/dist/simple-tree/api/typesUnsafe.d.ts +8 -6
  545. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  546. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  547. package/dist/simple-tree/api/verboseTree.js +5 -6
  548. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  549. package/dist/simple-tree/core/allowedTypes.js +22 -13
  550. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  551. package/dist/simple-tree/core/context.js +3 -0
  552. package/dist/simple-tree/core/context.js.map +1 -1
  553. package/dist/simple-tree/core/flexList.js +2 -3
  554. package/dist/simple-tree/core/flexList.js.map +1 -1
  555. package/dist/simple-tree/core/getOrCreateNode.js +2 -3
  556. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
  557. package/dist/simple-tree/core/index.d.ts +1 -1
  558. package/dist/simple-tree/core/index.d.ts.map +1 -1
  559. package/dist/simple-tree/core/index.js +2 -2
  560. package/dist/simple-tree/core/index.js.map +1 -1
  561. package/dist/simple-tree/core/treeNode.d.ts +3 -4
  562. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  563. package/dist/simple-tree/core/treeNode.js +31 -32
  564. package/dist/simple-tree/core/treeNode.js.map +1 -1
  565. package/dist/simple-tree/core/treeNodeKernel.js +194 -192
  566. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  567. package/dist/simple-tree/core/treeNodeSchema.js +3 -3
  568. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  569. package/dist/simple-tree/core/treeNodeValid.js +23 -23
  570. package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
  571. package/dist/simple-tree/core/types.js +1 -2
  572. package/dist/simple-tree/core/types.js.map +1 -1
  573. package/dist/simple-tree/core/unhydratedFlexTree.js +177 -150
  574. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  575. package/dist/simple-tree/core/walkSchema.js +2 -3
  576. package/dist/simple-tree/core/walkSchema.js.map +1 -1
  577. package/dist/simple-tree/core/withType.d.ts +7 -9
  578. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  579. package/dist/simple-tree/core/withType.js +6 -7
  580. package/dist/simple-tree/core/withType.js.map +1 -1
  581. package/dist/simple-tree/createContext.js +2 -3
  582. package/dist/simple-tree/createContext.js.map +1 -1
  583. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  584. package/dist/simple-tree/fieldSchema.js +33 -15
  585. package/dist/simple-tree/fieldSchema.js.map +1 -1
  586. package/dist/simple-tree/getTreeNodeForField.js +1 -2
  587. package/dist/simple-tree/getTreeNodeForField.js.map +1 -1
  588. package/dist/simple-tree/index.d.ts +2 -2
  589. package/dist/simple-tree/index.d.ts.map +1 -1
  590. package/dist/simple-tree/index.js +5 -8
  591. package/dist/simple-tree/index.js.map +1 -1
  592. package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
  593. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  594. package/dist/simple-tree/leafNodeSchema.js +18 -17
  595. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  596. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +3 -2
  597. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  598. package/dist/simple-tree/node-kinds/array/arrayNode.js +31 -33
  599. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  600. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  601. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js +2 -2
  602. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  603. package/dist/simple-tree/node-kinds/common.js +1 -2
  604. package/dist/simple-tree/node-kinds/common.js.map +1 -1
  605. package/dist/simple-tree/node-kinds/map/mapNode.d.ts +6 -6
  606. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  607. package/dist/simple-tree/node-kinds/map/mapNode.js +10 -16
  608. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  609. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  610. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js +2 -2
  611. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  612. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  613. package/dist/simple-tree/node-kinds/object/objectNode.js +27 -28
  614. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  615. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +1 -1
  616. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  617. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js +2 -2
  618. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  619. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  620. package/dist/simple-tree/node-kinds/record/recordNode.js +10 -13
  621. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  622. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -2
  623. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  624. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js +2 -2
  625. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  626. package/dist/simple-tree/prepareForInsertion.js +4 -5
  627. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  628. package/dist/simple-tree/toStoredSchema.js +11 -11
  629. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  630. package/dist/simple-tree/treeSchema.js +1 -2
  631. package/dist/simple-tree/treeSchema.js.map +1 -1
  632. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +3 -4
  633. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  634. package/dist/simple-tree/walkFieldSchema.js +1 -2
  635. package/dist/simple-tree/walkFieldSchema.js.map +1 -1
  636. package/dist/tableSchema.d.ts +2 -87
  637. package/dist/tableSchema.d.ts.map +1 -1
  638. package/dist/tableSchema.js +309 -275
  639. package/dist/tableSchema.js.map +1 -1
  640. package/dist/text/codePointUtils.d.ts +16 -3
  641. package/dist/text/codePointUtils.d.ts.map +1 -1
  642. package/dist/text/codePointUtils.js +24 -13
  643. package/dist/text/codePointUtils.js.map +1 -1
  644. package/dist/text/textDomain.d.ts +7 -1
  645. package/dist/text/textDomain.d.ts.map +1 -1
  646. package/dist/text/textDomain.js +32 -28
  647. package/dist/text/textDomain.js.map +1 -1
  648. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  649. package/dist/text/textDomainFormatted.js +45 -34
  650. package/dist/text/textDomainFormatted.js.map +1 -1
  651. package/dist/text/textDomainFormattedDefault.js +2 -5
  652. package/dist/text/textDomainFormattedDefault.js.map +1 -1
  653. package/dist/treeDataStore.js +2 -3
  654. package/dist/treeDataStore.js.map +1 -1
  655. package/dist/treeFactory.js +7 -7
  656. package/dist/treeFactory.js.map +1 -1
  657. package/dist/util/arrayUtilities.js +5 -6
  658. package/dist/util/arrayUtilities.js.map +1 -1
  659. package/dist/util/bTreeUtils.js +3 -4
  660. package/dist/util/bTreeUtils.js.map +1 -1
  661. package/dist/util/brand.js +6 -5
  662. package/dist/util/brand.js.map +1 -1
  663. package/dist/util/brandedMap.js +2 -3
  664. package/dist/util/brandedMap.js.map +1 -1
  665. package/dist/util/breakable.d.ts.map +1 -1
  666. package/dist/util/breakable.js +7 -4
  667. package/dist/util/breakable.js.map +1 -1
  668. package/dist/util/cloneWithReplacements.js +1 -2
  669. package/dist/util/cloneWithReplacements.js.map +1 -1
  670. package/dist/util/compressedIds.js +29 -7
  671. package/dist/util/compressedIds.js.map +1 -1
  672. package/dist/util/idAllocator.js +3 -3
  673. package/dist/util/idAllocator.js.map +1 -1
  674. package/dist/util/nestedMap.js +15 -17
  675. package/dist/util/nestedMap.js.map +1 -1
  676. package/dist/util/nestedSet.js +2 -3
  677. package/dist/util/nestedSet.js.map +1 -1
  678. package/dist/util/offsetList.js +2 -4
  679. package/dist/util/offsetList.js.map +1 -1
  680. package/dist/util/opaque.js +2 -3
  681. package/dist/util/opaque.js.map +1 -1
  682. package/dist/util/rangeMap.js +6 -2
  683. package/dist/util/rangeMap.js.map +1 -1
  684. package/dist/util/readSnapshotBlob.d.ts.map +1 -1
  685. package/dist/util/referenceCounting.js +1 -0
  686. package/dist/util/referenceCounting.js.map +1 -1
  687. package/dist/util/stackyIterator.js +3 -2
  688. package/dist/util/stackyIterator.js.map +1 -1
  689. package/dist/util/typeUtils.js +1 -2
  690. package/dist/util/typeUtils.js.map +1 -1
  691. package/dist/util/typeboxBrand.js +2 -3
  692. package/dist/util/typeboxBrand.js.map +1 -1
  693. package/dist/util/utils.d.ts +2 -2
  694. package/dist/util/utils.d.ts.map +1 -1
  695. package/dist/util/utils.js +32 -32
  696. package/dist/util/utils.js.map +1 -1
  697. package/lib/api.d.ts +9 -1
  698. package/lib/api.d.ts.map +1 -1
  699. package/lib/api.js.map +1 -1
  700. package/lib/codec/codec.d.ts +2 -2
  701. package/lib/codec/codec.d.ts.map +1 -1
  702. package/lib/codec/codec.js +2 -0
  703. package/lib/codec/codec.js.map +1 -1
  704. package/lib/codec/discriminatedUnions.js +1 -0
  705. package/lib/codec/discriminatedUnions.js.map +1 -1
  706. package/lib/codec/versioned/codec.d.ts.map +1 -1
  707. package/lib/codec/versioned/codec.js +2 -0
  708. package/lib/codec/versioned/codec.js.map +1 -1
  709. package/lib/componentApi.d.ts.map +1 -1
  710. package/lib/componentApi.js +20 -17
  711. package/lib/componentApi.js.map +1 -1
  712. package/lib/core/change-family/editBuilder.js +1 -0
  713. package/lib/core/change-family/editBuilder.js.map +1 -1
  714. package/lib/core/index.d.ts +2 -2
  715. package/lib/core/index.d.ts.map +1 -1
  716. package/lib/core/index.js +2 -2
  717. package/lib/core/index.js.map +1 -1
  718. package/lib/core/rebase/index.d.ts +1 -1
  719. package/lib/core/rebase/index.d.ts.map +1 -1
  720. package/lib/core/rebase/index.js +1 -1
  721. package/lib/core/rebase/index.js.map +1 -1
  722. package/lib/core/rebase/revisionTagCodec.js +3 -1
  723. package/lib/core/rebase/revisionTagCodec.js.map +1 -1
  724. package/lib/core/rebase/types.d.ts +12 -1
  725. package/lib/core/rebase/types.d.ts.map +1 -1
  726. package/lib/core/rebase/types.js +3 -0
  727. package/lib/core/rebase/types.js.map +1 -1
  728. package/lib/core/schema-stored/schema.js +5 -0
  729. package/lib/core/schema-stored/schema.js.map +1 -1
  730. package/lib/core/schema-stored/storedSchemaRepository.js +4 -2
  731. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  732. package/lib/core/tree/anchorSet.js +61 -54
  733. package/lib/core/tree/anchorSet.js.map +1 -1
  734. package/lib/core/tree/deltaUtil.d.ts +34 -9
  735. package/lib/core/tree/deltaUtil.d.ts.map +1 -1
  736. package/lib/core/tree/deltaUtil.js +41 -10
  737. package/lib/core/tree/deltaUtil.js.map +1 -1
  738. package/lib/core/tree/detachedFieldIndex.js +23 -21
  739. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  740. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +10 -10
  741. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  742. package/lib/core/tree/detachedFieldIndexCodecV1.js +2 -0
  743. package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  744. package/lib/core/tree/detachedFieldIndexCodecV2.js +2 -0
  745. package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  746. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts +3 -3
  747. package/lib/core/tree/detachedFieldIndexFormatCommon.d.ts.map +1 -1
  748. package/lib/core/tree/index.d.ts +1 -1
  749. package/lib/core/tree/index.d.ts.map +1 -1
  750. package/lib/core/tree/index.js +1 -1
  751. package/lib/core/tree/index.js.map +1 -1
  752. package/lib/core/tree/persistedTreeTextFormat.d.ts +4 -4
  753. package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  754. package/lib/core/tree/sparseTree.js +15 -11
  755. package/lib/core/tree/sparseTree.js.map +1 -1
  756. package/lib/entrypoints/alpha.d.ts +1 -1
  757. package/lib/entrypoints/alpha.d.ts.map +1 -1
  758. package/lib/entrypoints/alpha.js +1 -1
  759. package/lib/entrypoints/alpha.js.map +1 -1
  760. package/lib/entrypoints/beta.d.ts +1 -1
  761. package/lib/entrypoints/beta.d.ts.map +1 -1
  762. package/lib/entrypoints/beta.js +1 -1
  763. package/lib/entrypoints/beta.js.map +1 -1
  764. package/lib/entrypoints/legacy.d.ts +1 -1
  765. package/lib/entrypoints/legacy.d.ts.map +1 -1
  766. package/lib/entrypoints/legacy.js +1 -1
  767. package/lib/entrypoints/legacy.js.map +1 -1
  768. package/lib/entrypoints/public.d.ts +1 -1
  769. package/lib/entrypoints/public.d.ts.map +1 -1
  770. package/lib/entrypoints/public.js +1 -1
  771. package/lib/entrypoints/public.js.map +1 -1
  772. package/lib/extensibleUnionNode.d.ts.map +1 -1
  773. package/lib/extensibleUnionNode.js +2 -2
  774. package/lib/extensibleUnionNode.js.map +1 -1
  775. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  776. package/lib/feature-libraries/chunked-forest/basicChunk.js +14 -1
  777. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  778. package/lib/feature-libraries/chunked-forest/chunkTree.js +14 -6
  779. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  780. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  781. package/lib/feature-libraries/chunked-forest/chunkedForest.js +18 -12
  782. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  783. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +1 -3
  784. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  785. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +8 -0
  786. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  787. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +4 -0
  788. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  789. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +1 -0
  790. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  791. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  792. package/lib/feature-libraries/chunked-forest/codec/codecs.js +2 -0
  793. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  794. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +28 -12
  795. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  796. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts +2 -2
  797. package/lib/feature-libraries/chunked-forest/codec/format/formatGeneric.d.ts.map +1 -1
  798. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js +9 -0
  799. package/lib/feature-libraries/chunked-forest/codec/nodeEncoder.js.map +1 -1
  800. package/lib/feature-libraries/chunked-forest/sequenceChunk.js +1 -0
  801. package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  802. package/lib/feature-libraries/chunked-forest/uniformChunk.js +71 -13
  803. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  804. package/lib/feature-libraries/comparison-forest/comparisonForest.js +79 -79
  805. package/lib/feature-libraries/comparison-forest/comparisonForest.js.map +1 -1
  806. package/lib/feature-libraries/cursorComparator.d.ts +8 -0
  807. package/lib/feature-libraries/cursorComparator.d.ts.map +1 -1
  808. package/lib/feature-libraries/cursorComparator.js +43 -9
  809. package/lib/feature-libraries/cursorComparator.js.map +1 -1
  810. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +3 -0
  811. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  812. package/lib/feature-libraries/default-schema/mappedEditBuilder.js +2 -0
  813. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  814. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +2 -0
  815. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  816. package/lib/feature-libraries/flex-tree/context.js +19 -3
  817. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  818. package/lib/feature-libraries/flex-tree/lazyEntity.js +12 -12
  819. package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  820. package/lib/feature-libraries/flex-tree/lazyField.js +25 -27
  821. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  822. package/lib/feature-libraries/flex-tree/lazyNode.js +22 -21
  823. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  824. package/lib/feature-libraries/forest-summary/forestSummarizer.js +122 -117
  825. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  826. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +49 -32
  827. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  828. package/lib/feature-libraries/indexing/anchorTreeIndex.js +33 -29
  829. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  830. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js +14 -12
  831. package/lib/feature-libraries/modular-schema/defaultRevisionReplacer.js.map +1 -1
  832. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +63 -10
  833. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  834. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  835. package/lib/feature-libraries/modular-schema/fieldKind.js +10 -0
  836. package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  837. package/lib/feature-libraries/modular-schema/filterEdits.d.ts +13 -0
  838. package/lib/feature-libraries/modular-schema/filterEdits.d.ts.map +1 -0
  839. package/lib/feature-libraries/modular-schema/filterEdits.js +46 -0
  840. package/lib/feature-libraries/modular-schema/filterEdits.js.map +1 -0
  841. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  842. package/lib/feature-libraries/modular-schema/genericFieldKind.js +5 -2
  843. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  844. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +2 -2
  845. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  846. package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
  847. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  848. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  849. package/lib/feature-libraries/modular-schema/invert.d.ts +1 -1
  850. package/lib/feature-libraries/modular-schema/invert.d.ts.map +1 -1
  851. package/lib/feature-libraries/modular-schema/invert.js +6 -30
  852. package/lib/feature-libraries/modular-schema/invert.js.map +1 -1
  853. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts +5 -7
  854. package/lib/feature-libraries/modular-schema/minimizeModularChange.d.ts.map +1 -1
  855. package/lib/feature-libraries/modular-schema/minimizeModularChange.js +458 -8
  856. package/lib/feature-libraries/modular-schema/minimizeModularChange.js.map +1 -1
  857. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +1 -10
  858. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  859. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +20 -85
  860. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  861. package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts +13 -1
  862. package/lib/feature-libraries/modular-schema/modularChangeUtils.d.ts.map +1 -1
  863. package/lib/feature-libraries/modular-schema/modularChangeUtils.js +100 -3
  864. package/lib/feature-libraries/modular-schema/modularChangeUtils.js.map +1 -1
  865. package/lib/feature-libraries/modular-schema/prune.d.ts +2 -3
  866. package/lib/feature-libraries/modular-schema/prune.d.ts.map +1 -1
  867. package/lib/feature-libraries/modular-schema/prune.js +25 -7
  868. package/lib/feature-libraries/modular-schema/prune.js.map +1 -1
  869. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js +1 -3
  870. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  871. package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js +1 -0
  872. package/lib/feature-libraries/node-identifier/nodeIdentifierManager.js.map +1 -1
  873. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  874. package/lib/feature-libraries/object-forest/objectForest.js +273 -266
  875. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  876. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  877. package/lib/feature-libraries/optional-field/optionalField.js +24 -32
  878. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  879. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +1 -1
  880. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  881. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +1 -1
  882. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  883. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  884. package/lib/feature-libraries/schema-index/schemaSummarizer.js +3 -0
  885. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  886. package/lib/feature-libraries/sequence-field/compose.js +6 -0
  887. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  888. package/lib/feature-libraries/sequence-field/filterEdits.d.ts +3 -3
  889. package/lib/feature-libraries/sequence-field/filterEdits.d.ts.map +1 -1
  890. package/lib/feature-libraries/sequence-field/filterEdits.js +31 -12
  891. package/lib/feature-libraries/sequence-field/filterEdits.js.map +1 -1
  892. package/lib/feature-libraries/sequence-field/formatV1.d.ts +3 -3
  893. package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  894. package/lib/feature-libraries/sequence-field/formatV2.d.ts +3 -3
  895. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  896. package/lib/feature-libraries/sequence-field/formatV3.d.ts +2 -2
  897. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  898. package/lib/feature-libraries/sequence-field/markListFactory.js +3 -4
  899. package/lib/feature-libraries/sequence-field/markListFactory.js.map +1 -1
  900. package/lib/feature-libraries/sequence-field/markQueue.js +4 -2
  901. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  902. package/lib/feature-libraries/sequence-field/rebase.js +6 -0
  903. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  904. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  905. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +9 -9
  906. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  907. package/lib/feature-libraries/sequence-field/utils.d.ts +2 -2
  908. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  909. package/lib/feature-libraries/sequence-field/utils.js +3 -15
  910. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  911. package/lib/feature-libraries/treeCursorUtils.js +13 -9
  912. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  913. package/lib/index.d.ts +4 -29
  914. package/lib/index.d.ts.map +1 -1
  915. package/lib/index.js +2 -17
  916. package/lib/index.js.map +1 -1
  917. package/lib/internalTypes.d.ts +1 -1
  918. package/lib/internalTypes.d.ts.map +1 -1
  919. package/lib/internalTypes.js.map +1 -1
  920. package/lib/packageVersion.d.ts +1 -1
  921. package/lib/packageVersion.d.ts.map +1 -1
  922. package/lib/packageVersion.js +1 -1
  923. package/lib/packageVersion.js.map +1 -1
  924. package/lib/serializableDomainSchema.d.ts +1 -1
  925. package/lib/shared-tree/history.d.ts.map +1 -1
  926. package/lib/shared-tree/history.js +32 -13
  927. package/lib/shared-tree/history.js.map +1 -1
  928. package/lib/shared-tree/independentView.d.ts +27 -3
  929. package/lib/shared-tree/independentView.d.ts.map +1 -1
  930. package/lib/shared-tree/independentView.js +30 -2
  931. package/lib/shared-tree/independentView.js.map +1 -1
  932. package/lib/shared-tree/index.d.ts +2 -1
  933. package/lib/shared-tree/index.d.ts.map +1 -1
  934. package/lib/shared-tree/index.js +2 -1
  935. package/lib/shared-tree/index.js.map +1 -1
  936. package/lib/shared-tree/schematizingTreeView.d.ts +2 -2
  937. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  938. package/lib/shared-tree/schematizingTreeView.js +60 -27
  939. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  940. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  941. package/lib/shared-tree/sharedTree.js +24 -15
  942. package/lib/shared-tree/sharedTree.js.map +1 -1
  943. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  944. package/lib/shared-tree/sharedTreeChangeEnricher.js +12 -4
  945. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  946. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  947. package/lib/shared-tree/sharedTreeChangeFamily.js +6 -3
  948. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  949. package/lib/shared-tree/sharedTreeEditBuilder.js +2 -0
  950. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  951. package/lib/shared-tree/transactionMinimize.d.ts.map +1 -1
  952. package/lib/shared-tree/transactionMinimize.js +4 -3
  953. package/lib/shared-tree/transactionMinimize.js.map +1 -1
  954. package/lib/shared-tree/treeAlpha.d.ts +5 -16
  955. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  956. package/lib/shared-tree/treeAlpha.js +13 -6
  957. package/lib/shared-tree/treeAlpha.js.map +1 -1
  958. package/{dist/simple-tree/api → lib/shared-tree}/treeBeta.d.ts +8 -65
  959. package/lib/shared-tree/treeBeta.d.ts.map +1 -0
  960. package/lib/shared-tree/treeBeta.js +64 -0
  961. package/lib/shared-tree/treeBeta.js.map +1 -0
  962. package/lib/shared-tree/treeCheckout.d.ts +5 -0
  963. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  964. package/lib/shared-tree/treeCheckout.js +985 -906
  965. package/lib/shared-tree/treeCheckout.js.map +1 -1
  966. package/lib/shared-tree/unhydratedTreeContext.js +3 -4
  967. package/lib/shared-tree/unhydratedTreeContext.js.map +1 -1
  968. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  969. package/lib/shared-tree-core/branch.js +22 -18
  970. package/lib/shared-tree-core/branch.js.map +1 -1
  971. package/lib/shared-tree-core/branchCommitCounter.js +35 -32
  972. package/lib/shared-tree-core/branchCommitCounter.js.map +1 -1
  973. package/lib/shared-tree-core/branchCommitEnricher.js +9 -8
  974. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  975. package/lib/shared-tree-core/customMetadataFormat.d.ts.map +1 -1
  976. package/lib/shared-tree-core/defaultResubmitMachine.js +11 -9
  977. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  978. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  979. package/lib/shared-tree-core/editManager.js +73 -44
  980. package/lib/shared-tree-core/editManager.js.map +1 -1
  981. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
  982. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  983. package/lib/shared-tree-core/editManagerCodecsCommons.js +32 -34
  984. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  985. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  986. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  987. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +4 -4
  988. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  989. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -1
  990. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  991. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +2 -1
  992. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  993. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  994. package/lib/shared-tree-core/editManagerSummarizer.js +6 -1
  995. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  996. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -1
  997. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  998. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts +2 -1
  999. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  1000. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  1001. package/lib/shared-tree-core/sharedTreeCore.js +45 -23
  1002. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  1003. package/lib/shared-tree-core/transaction.js +36 -39
  1004. package/lib/shared-tree-core/transaction.js.map +1 -1
  1005. package/lib/shared-tree-core/versionedSummarizer.js +4 -0
  1006. package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
  1007. package/lib/simple-tree/api/cloneTree.d.ts +11 -0
  1008. package/lib/simple-tree/api/cloneTree.d.ts.map +1 -0
  1009. package/lib/simple-tree/api/cloneTree.js +28 -0
  1010. package/lib/simple-tree/api/cloneTree.js.map +1 -0
  1011. package/lib/simple-tree/api/configuration.js +19 -0
  1012. package/lib/simple-tree/api/configuration.js.map +1 -1
  1013. package/lib/simple-tree/api/index.d.ts +3 -3
  1014. package/lib/simple-tree/api/index.d.ts.map +1 -1
  1015. package/lib/simple-tree/api/index.js +1 -1
  1016. package/lib/simple-tree/api/index.js.map +1 -1
  1017. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +3 -7
  1018. package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  1019. package/lib/simple-tree/api/schemaCreationUtilities.js +1 -3
  1020. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  1021. package/lib/simple-tree/api/schemaFactory.d.ts +4 -9
  1022. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  1023. package/lib/simple-tree/api/schemaFactory.js +9 -8
  1024. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  1025. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +18 -20
  1026. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  1027. package/lib/simple-tree/api/schemaFactoryAlpha.js +78 -81
  1028. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  1029. package/lib/simple-tree/api/schemaFactoryBeta.d.ts +7 -9
  1030. package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  1031. package/lib/simple-tree/api/schemaFactoryBeta.js +32 -35
  1032. package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  1033. package/lib/simple-tree/api/schemaStatics.d.ts +7 -7
  1034. package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
  1035. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +46 -2
  1036. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  1037. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +48 -6
  1038. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  1039. package/lib/simple-tree/api/transactionTypes.d.ts +4 -4
  1040. package/lib/simple-tree/api/transactionTypes.js.map +1 -1
  1041. package/lib/simple-tree/api/tree.d.ts +80 -61
  1042. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  1043. package/lib/simple-tree/api/tree.js +2 -3
  1044. package/lib/simple-tree/api/tree.js.map +1 -1
  1045. package/lib/simple-tree/api/treeChangeEvents.d.ts +16 -4
  1046. package/lib/simple-tree/api/treeChangeEvents.d.ts.map +1 -1
  1047. package/lib/simple-tree/api/treeChangeEvents.js.map +1 -1
  1048. package/lib/simple-tree/api/treeChangeEventsBeta.d.ts +209 -0
  1049. package/lib/simple-tree/api/treeChangeEventsBeta.d.ts.map +1 -0
  1050. package/lib/simple-tree/api/{treeAlpha.js → treeChangeEventsBeta.js} +1 -1
  1051. package/lib/simple-tree/api/treeChangeEventsBeta.js.map +1 -0
  1052. package/lib/simple-tree/api/treeNodeApi.d.ts +1 -75
  1053. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  1054. package/lib/simple-tree/api/treeNodeApi.js +1 -1
  1055. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  1056. package/lib/simple-tree/api/typesUnsafe.d.ts +8 -6
  1057. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  1058. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  1059. package/lib/simple-tree/core/allowedTypes.js +12 -3
  1060. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  1061. package/lib/simple-tree/core/context.js +3 -0
  1062. package/lib/simple-tree/core/context.js.map +1 -1
  1063. package/lib/simple-tree/core/index.d.ts +1 -1
  1064. package/lib/simple-tree/core/index.d.ts.map +1 -1
  1065. package/lib/simple-tree/core/index.js +1 -1
  1066. package/lib/simple-tree/core/index.js.map +1 -1
  1067. package/lib/simple-tree/core/treeNode.d.ts +3 -4
  1068. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  1069. package/lib/simple-tree/core/treeNode.js +29 -30
  1070. package/lib/simple-tree/core/treeNode.js.map +1 -1
  1071. package/lib/simple-tree/core/treeNodeKernel.js +181 -179
  1072. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  1073. package/lib/simple-tree/core/treeNodeValid.js +19 -19
  1074. package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
  1075. package/lib/simple-tree/core/unhydratedFlexTree.js +173 -146
  1076. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  1077. package/lib/simple-tree/core/withType.d.ts +7 -9
  1078. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  1079. package/lib/simple-tree/core/withType.js +5 -6
  1080. package/lib/simple-tree/core/withType.js.map +1 -1
  1081. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  1082. package/lib/simple-tree/fieldSchema.js +23 -5
  1083. package/lib/simple-tree/fieldSchema.js.map +1 -1
  1084. package/lib/simple-tree/index.d.ts +2 -2
  1085. package/lib/simple-tree/index.d.ts.map +1 -1
  1086. package/lib/simple-tree/index.js +2 -2
  1087. package/lib/simple-tree/index.js.map +1 -1
  1088. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  1089. package/lib/simple-tree/leafNodeSchema.js +16 -15
  1090. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  1091. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +3 -2
  1092. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  1093. package/lib/simple-tree/node-kinds/array/arrayNode.js +28 -32
  1094. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  1095. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  1096. package/lib/simple-tree/node-kinds/map/mapNode.d.ts +6 -6
  1097. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  1098. package/lib/simple-tree/node-kinds/map/mapNode.js +10 -17
  1099. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  1100. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  1101. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  1102. package/lib/simple-tree/node-kinds/object/objectNode.js +25 -28
  1103. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  1104. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +1 -1
  1105. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  1106. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  1107. package/lib/simple-tree/node-kinds/record/recordNode.js +10 -14
  1108. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  1109. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +3 -2
  1110. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  1111. package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  1112. package/lib/tableSchema.d.ts +2 -87
  1113. package/lib/tableSchema.d.ts.map +1 -1
  1114. package/lib/tableSchema.js +309 -275
  1115. package/lib/tableSchema.js.map +1 -1
  1116. package/lib/text/codePointUtils.d.ts +16 -3
  1117. package/lib/text/codePointUtils.d.ts.map +1 -1
  1118. package/lib/text/codePointUtils.js +22 -10
  1119. package/lib/text/codePointUtils.js.map +1 -1
  1120. package/lib/text/textDomain.d.ts +7 -1
  1121. package/lib/text/textDomain.d.ts.map +1 -1
  1122. package/lib/text/textDomain.js +21 -17
  1123. package/lib/text/textDomain.js.map +1 -1
  1124. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  1125. package/lib/text/textDomainFormatted.js +43 -32
  1126. package/lib/text/textDomainFormatted.js.map +1 -1
  1127. package/lib/text/textDomainFormattedDefault.js +2 -5
  1128. package/lib/text/textDomainFormattedDefault.js.map +1 -1
  1129. package/lib/util/brand.js +1 -0
  1130. package/lib/util/brand.js.map +1 -1
  1131. package/lib/util/breakable.d.ts.map +1 -1
  1132. package/lib/util/breakable.js +3 -0
  1133. package/lib/util/breakable.js.map +1 -1
  1134. package/lib/util/compressedIds.js +22 -0
  1135. package/lib/util/compressedIds.js.map +1 -1
  1136. package/lib/util/nestedMap.js +2 -4
  1137. package/lib/util/nestedMap.js.map +1 -1
  1138. package/lib/util/offsetList.js +2 -4
  1139. package/lib/util/offsetList.js.map +1 -1
  1140. package/lib/util/rangeMap.js +4 -0
  1141. package/lib/util/rangeMap.js.map +1 -1
  1142. package/lib/util/readSnapshotBlob.d.ts.map +1 -1
  1143. package/lib/util/referenceCounting.js +1 -0
  1144. package/lib/util/referenceCounting.js.map +1 -1
  1145. package/lib/util/stackyIterator.js +3 -2
  1146. package/lib/util/stackyIterator.js.map +1 -1
  1147. package/lib/util/utils.d.ts +2 -2
  1148. package/lib/util/utils.d.ts.map +1 -1
  1149. package/package.json +67 -95
  1150. package/src/api.ts +11 -0
  1151. package/src/core/index.ts +6 -2
  1152. package/src/core/rebase/index.ts +1 -0
  1153. package/src/core/rebase/types.ts +16 -1
  1154. package/src/core/tree/anchorSet.ts +2 -2
  1155. package/src/core/tree/deltaUtil.ts +67 -13
  1156. package/src/core/tree/index.ts +5 -2
  1157. package/src/entrypoints/alpha.ts +19 -21
  1158. package/src/entrypoints/beta.ts +12 -5
  1159. package/src/entrypoints/legacy.ts +12 -5
  1160. package/src/entrypoints/public.ts +1 -5
  1161. package/src/extensibleUnionNode.ts +1 -2
  1162. package/src/feature-libraries/cursorComparator.ts +57 -9
  1163. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +77 -12
  1164. package/src/feature-libraries/modular-schema/filterEdits.ts +108 -0
  1165. package/src/feature-libraries/modular-schema/genericFieldKind.ts +7 -4
  1166. package/src/feature-libraries/modular-schema/index.ts +5 -2
  1167. package/src/feature-libraries/modular-schema/invert.ts +16 -61
  1168. package/src/feature-libraries/modular-schema/minimizeModularChange.ts +831 -10
  1169. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +10 -124
  1170. package/src/feature-libraries/modular-schema/modularChangeUtils.ts +164 -2
  1171. package/src/feature-libraries/modular-schema/prune.ts +52 -10
  1172. package/src/feature-libraries/optional-field/optionalField.ts +30 -42
  1173. package/src/feature-libraries/sequence-field/filterEdits.ts +62 -26
  1174. package/src/feature-libraries/sequence-field/utils.ts +7 -19
  1175. package/src/index.ts +7 -39
  1176. package/src/internalTypes.ts +1 -1
  1177. package/src/packageVersion.ts +1 -1
  1178. package/src/shared-tree/history.ts +41 -19
  1179. package/src/shared-tree/independentView.ts +40 -3
  1180. package/src/shared-tree/index.ts +5 -1
  1181. package/src/shared-tree/schematizingTreeView.ts +2 -2
  1182. package/src/shared-tree/sharedTree.ts +2 -1
  1183. package/src/shared-tree/transactionMinimize.ts +13 -4
  1184. package/src/shared-tree/treeAlpha.ts +17 -31
  1185. package/src/{simple-tree/api → shared-tree}/treeBeta.ts +56 -167
  1186. package/src/shared-tree/treeCheckout.ts +82 -9
  1187. package/src/shared-tree-core/editManager.ts +16 -8
  1188. package/src/shared-tree-core/editManagerCodecsCommons.ts +30 -34
  1189. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +1 -1
  1190. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +2 -2
  1191. package/src/simple-tree/api/cloneTree.ts +47 -0
  1192. package/src/simple-tree/api/index.ts +15 -21
  1193. package/src/simple-tree/api/schemaFactoryAlpha.ts +2 -2
  1194. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +87 -6
  1195. package/src/simple-tree/api/transactionTypes.ts +4 -4
  1196. package/src/simple-tree/api/tree.ts +139 -85
  1197. package/src/simple-tree/api/treeChangeEvents.ts +16 -4
  1198. package/src/simple-tree/api/treeChangeEventsBeta.ts +245 -0
  1199. package/src/simple-tree/api/treeNodeApi.ts +6 -85
  1200. package/src/simple-tree/api/typesUnsafe.ts +8 -6
  1201. package/src/simple-tree/core/index.ts +1 -1
  1202. package/src/simple-tree/core/treeNode.ts +3 -10
  1203. package/src/simple-tree/core/withType.ts +8 -11
  1204. package/src/simple-tree/index.ts +3 -7
  1205. package/src/simple-tree/node-kinds/array/arrayNode.ts +14 -12
  1206. package/src/simple-tree/node-kinds/map/mapNode.ts +14 -15
  1207. package/src/simple-tree/node-kinds/object/objectNode.ts +3 -6
  1208. package/src/simple-tree/node-kinds/record/recordNode.ts +6 -8
  1209. package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +2 -1
  1210. package/src/tableSchema.ts +8 -187
  1211. package/src/text/codePointUtils.ts +25 -14
  1212. package/src/text/textDomain.ts +15 -2
  1213. package/src/text/textDomainFormatted.ts +9 -4
  1214. package/tsconfig.json +1 -1
  1215. package/alpha.d.ts +0 -11
  1216. package/beta.d.ts +0 -11
  1217. package/dist/simple-tree/api/treeAlpha.d.ts +0 -126
  1218. package/dist/simple-tree/api/treeAlpha.d.ts.map +0 -1
  1219. package/dist/simple-tree/api/treeAlpha.js.map +0 -1
  1220. package/dist/simple-tree/api/treeBeta.d.ts.map +0 -1
  1221. package/dist/simple-tree/api/treeBeta.js +0 -83
  1222. package/dist/simple-tree/api/treeBeta.js.map +0 -1
  1223. package/docs/main/glossary.md +0 -163
  1224. package/internal.d.ts +0 -11
  1225. package/legacy.d.ts +0 -11
  1226. package/lib/simple-tree/api/treeAlpha.d.ts +0 -126
  1227. package/lib/simple-tree/api/treeAlpha.d.ts.map +0 -1
  1228. package/lib/simple-tree/api/treeAlpha.js.map +0 -1
  1229. package/lib/simple-tree/api/treeBeta.d.ts.map +0 -1
  1230. package/lib/simple-tree/api/treeBeta.js +0 -77
  1231. package/lib/simple-tree/api/treeBeta.js.map +0 -1
  1232. package/src/simple-tree/api/treeAlpha.ts +0 -153
  1233. /package/api-extractor/{api-extractor.current.json → api-extractor-report.current.json} +0 -0
  1234. /package/api-extractor/{api-extractor.legacy.json → api-extractor-report.legacy.json} +0 -0
@@ -6,22 +6,21 @@ import type { TreeNode } from "./treeNode.js";
6
6
  import type { NodeKind, TreeNodeSchemaClass } from "./treeNodeSchema.js";
7
7
  /**
8
8
  * An internal brand to improve compiler performance.
9
- * For more information about the type, use `Tree.schema(theNode)` instead.
9
+ * For more information about the type, use {@link TreeNodeApi.schema | Tree.schema(theNode)} instead.
10
10
  * @remarks
11
- * `Tree.is` and `Tree.schema` provide a superset of this information in more friendly ways.
11
+ * {@link TreeNodeApi.is | Tree.is} and {@link TreeNodeApi.schema | Tree.schema} provide a superset of this information in more friendly ways.
12
12
  * @privateRemarks
13
13
  * The identifier of a {@link TreeNode}'s schema.
14
14
  * This allows the type checker to distinguish different node types more efficiently than via {@link typeSchemaSymbol}.
15
- * @deprecated External code should use `Tree.schema(theNode)` for schema related runtime data access. For type narrowing, use {@link WithType} instead of the symbols directly.
16
15
  * @system @public
17
16
  */
18
- export declare const typeNameSymbol: unique symbol;
17
+ export declare const schemaIdentifierBrand: unique symbol;
19
18
  /**
20
19
  * The type of a {@link TreeNode}.
21
- * For more information about the type, use `Tree.schema(theNode)` instead.
20
+ * For more information about the type, use {@link TreeNodeApi.schema | Tree.schema(theNode)} instead.
22
21
  * @remarks
23
22
  * This symbol mainly exists on nodes to allow TypeScript to provide more accurate type checking.
24
- * `Tree.is` and `Tree.schema` provide a superset of this information in more friendly ways.
23
+ * {@link TreeNodeApi.is | Tree.is} and {@link TreeNodeApi.schema | Tree.schema} provide a superset of this information in more friendly ways.
25
24
  *
26
25
  * This symbol should not manually be added to objects as doing so allows the object to be invalidly used where specific nodes are expected.
27
26
  * Instead construct a real node of the desired type using its constructor.
@@ -98,7 +97,7 @@ export interface WithType<out TName extends string = string, out TKind extends N
98
97
  /**
99
98
  * Type symbol, marking a type in a way to increase type safety via strong type checking.
100
99
  *
101
- * Use `Tree.schema(theNode)` for schema related runtime data access. For type narrowing, use `WithType` instead of the symbols directly.
100
+ * Use {@link TreeNodeApi.schema | Tree.schema(theNode)} for schema related runtime data access. For type narrowing, use {@link WithType} instead of the symbols directly.
102
101
  * @remarks
103
102
  * This should be redundant with {@link typeSchemaSymbol}, but is kept for improved compiler performance.
104
103
  * If we just rely on {@link typeSchemaSymbol}, the compiler has to work much harder to distinguish schema in unions,
@@ -106,9 +105,8 @@ export interface WithType<out TName extends string = string, out TKind extends N
106
105
  *
107
106
  * This property is not intended for any use other than helping the compiler distinguish schema types,
108
107
  * and should not be referenced in any code other than internal to the tree package.
109
- * @deprecated Use {@link typeSchemaSymbol} instead.
110
108
  */
111
- get [typeNameSymbol](): TName;
109
+ get [schemaIdentifierBrand](): TName;
112
110
  /**
113
111
  * Type symbol, marking a type in a way to increase type safety via strong type checking.
114
112
  */
@@ -1 +1 @@
1
- {"version":3,"file":"withType.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/core/withType.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAEzE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,MAAgC,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,EAAE,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AO;IAEnB;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,qBAAqB,CAAC,IAAI,KAAK,CAAC;IAErC;;OAEG;IACH,IAAI,CAAC,gBAAgB,CAAC,IAAI,mBAAmB,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;CAC7F"}
@@ -4,22 +4,21 @@
4
4
  */
5
5
  /**
6
6
  * An internal brand to improve compiler performance.
7
- * For more information about the type, use `Tree.schema(theNode)` instead.
7
+ * For more information about the type, use {@link TreeNodeApi.schema | Tree.schema(theNode)} instead.
8
8
  * @remarks
9
- * `Tree.is` and `Tree.schema` provide a superset of this information in more friendly ways.
9
+ * {@link TreeNodeApi.is | Tree.is} and {@link TreeNodeApi.schema | Tree.schema} provide a superset of this information in more friendly ways.
10
10
  * @privateRemarks
11
11
  * The identifier of a {@link TreeNode}'s schema.
12
12
  * This allows the type checker to distinguish different node types more efficiently than via {@link typeSchemaSymbol}.
13
- * @deprecated External code should use `Tree.schema(theNode)` for schema related runtime data access. For type narrowing, use {@link WithType} instead of the symbols directly.
14
13
  * @system @public
15
14
  */
16
- export const typeNameSymbol = Symbol("TreeNode Type");
15
+ export const schemaIdentifierBrand = Symbol("TreeNode Schema Identifier Brand");
17
16
  /**
18
17
  * The type of a {@link TreeNode}.
19
- * For more information about the type, use `Tree.schema(theNode)` instead.
18
+ * For more information about the type, use {@link TreeNodeApi.schema | Tree.schema(theNode)} instead.
20
19
  * @remarks
21
20
  * This symbol mainly exists on nodes to allow TypeScript to provide more accurate type checking.
22
- * `Tree.is` and `Tree.schema` provide a superset of this information in more friendly ways.
21
+ * {@link TreeNodeApi.is | Tree.is} and {@link TreeNodeApi.schema | Tree.schema} provide a superset of this information in more friendly ways.
23
22
  *
24
23
  * This symbol should not manually be added to objects as doing so allows the object to be invalidly used where specific nodes are expected.
25
24
  * Instead construct a real node of the desired type using its constructor.
@@ -1 +1 @@
1
- {"version":3,"file":"withType.js","sourceRoot":"","sources":["../../../src/simple-tree/core/withType.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAkB,MAAM,CAAC,eAAe,CAAC,CAAC;AAErE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAkB,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEzE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAkB,MAAM,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Used by doc links:\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports\nimport type { TreeAlpha } from \"../../shared-tree/index.js\";\n\nimport type { TreeNode } from \"./treeNode.js\";\nimport type { NodeKind, TreeNodeSchemaClass } from \"./treeNodeSchema.js\";\n\n/**\n * An internal brand to improve compiler performance.\n * For more information about the type, use `Tree.schema(theNode)` instead.\n * @remarks\n * `Tree.is` and `Tree.schema` provide a superset of this information in more friendly ways.\n * @privateRemarks\n * The identifier of a {@link TreeNode}'s schema.\n * This allows the type checker to distinguish different node types more efficiently than via {@link typeSchemaSymbol}.\n * @deprecated External code should use `Tree.schema(theNode)` for schema related runtime data access. For type narrowing, use {@link WithType} instead of the symbols directly.\n * @system @public\n */\nexport const typeNameSymbol: unique symbol = Symbol(\"TreeNode Type\");\n\n/**\n * The type of a {@link TreeNode}.\n * For more information about the type, use `Tree.schema(theNode)` instead.\n * @remarks\n * This symbol mainly exists on nodes to allow TypeScript to provide more accurate type checking.\n * `Tree.is` and `Tree.schema` provide a superset of this information in more friendly ways.\n *\n * This symbol should not manually be added to objects as doing so allows the object to be invalidly used where specific nodes are expected.\n * Instead construct a real node of the desired type using its constructor.\n *\n * This symbol should not be used directly for type narrowing. Instead use {@link WithType}.\n * @privateRemarks\n * This prevents non-nodes from being accidentally used as nodes and allows the type-checker to distinguish different node types.\n * @system @public\n */\nexport const typeSchemaSymbol: unique symbol = Symbol(\"TreeNode Schema\");\n\n/**\n * The intended type of insertable content that is to become a {@link TreeNode}.\n * @remarks Use the type-safe {@link (TreeAlpha:interface).tagContentSchema} function to tag insertable content with this symbol.\n *\n * If a property with this symbol key is present on an object that is inserted into the tree,\n * the tree will use the schema identifier specified by the value of this property when creating the node.\n * This is particularly useful for specifying the intended schema of untyped content when it would otherwise be ambiguous.\n * @example\n * ```typescript\n * const sf = new SchemaFactory(\"example\");\n * class Dog extends sf.object(\"Dog\", { name: sf.string() }) {}\n * class Cat extends sf.object(\"Cat\", { name: sf.string() }) {}\n * class Root extends sf.object(\"Root\", { pet: [Dog, Cat] }) {}\n * // ...\n * view.root.pet = { name: \"Max\" }; // Error: ambiguous schema - is it a Dog or a Cat?\n * view.root.pet = { name: \"Max\", [contentSchemaSymbol]: \"example.Dog\" }; // No error - it's a Dog.\n * ```\n * @alpha\n */\nexport const contentSchemaSymbol: unique symbol = Symbol(\"SharedTree Schema\");\n\n/**\n * Adds a type symbol to a type for stronger typing.\n *\n * @typeParam TName - Same as {@link TreeNodeSchema}'s \"Name\" parameter.\n * @typeParam TKind - Same as {@link TreeNodeSchema}'s \"Kind\" parameter.\n * @typeParam TInfo - Same as {@link TreeNodeSchema}'s \"Info\" parameter: format depends on the Kind.\n * @remarks\n * Powers {@link TreeNode}'s strong typing setup.\n * @example Narrow types for overloading based on NodeKind\n * ```typescript\n * function getKeys(node: TreeNode & WithType<string, NodeKind.Array>): number[];\n * function getKeys(node: TreeNode & WithType<string, NodeKind.Map | NodeKind.Object>): string[];\n * function getKeys(node: TreeNode): string[] | number[];\n * function getKeys(node: TreeNode): string[] | number[] {\n * \tconst schema = Tree.schema(node);\n * \tswitch (schema.kind) {\n * \t\tcase NodeKind.Array: {\n * \t\t\tconst arrayNode = node as TreeArrayNode;\n * \t\t\tconst keys: number[] = [];\n * \t\t\tfor (let index = 0; index < arrayNode.length; index++) {\n * \t\t\t\tkeys.push(index);\n * \t\t\t}\n * \t\t\treturn keys;\n * \t\t}\n * \t\tcase NodeKind.Map:\n * \t\t\treturn [...(node as TreeMapNode).keys()];\n * \t\tcase NodeKind.Object:\n * \t\t\treturn Object.keys(node);\n * \t\tdefault:\n * \t\t\tthrow new Error(\"Unsupported Kind\");\n * \t}\n * }\n * ```\n * @privateRemarks\n * The properties of this are implemented as getters rather than instance properties as that is the easiest way to make them non-enumerable,\n * and also saves memory and time as they only have to be setup on the prototype.\n * These being non-enumerable inherited properties minimizes impact on users,\n * hiding them from things like `Reflect.ownKeys`, Object spread, `Object.getOwnPropertyDescriptors`, and `for...in` loops.\n * How we declare them here actually doesn't impact that,\n * but is a good way to communicate to users and internal devs that these should be implemented as inherited getters to accomplish the above.\n * @sealed @public\n */\nexport interface WithType<\n\tout TName extends string = string,\n\tout TKind extends NodeKind = NodeKind,\n\tout TInfo = unknown,\n> {\n\t/**\n\t * Type symbol, marking a type in a way to increase type safety via strong type checking.\n\t *\n\t * Use `Tree.schema(theNode)` for schema related runtime data access. For type narrowing, use `WithType` instead of the symbols directly.\n\t * @remarks\n\t * This should be redundant with {@link typeSchemaSymbol}, but is kept for improved compiler performance.\n\t * If we just rely on {@link typeSchemaSymbol}, the compiler has to work much harder to distinguish schema in unions,\n\t * which can cause large schema unions to hit \"error TS2859: Excessive complexity comparing types\".\n\t *\n\t * This property is not intended for any use other than helping the compiler distinguish schema types,\n\t * and should not be referenced in any code other than internal to the tree package.\n\t * @deprecated Use {@link typeSchemaSymbol} instead.\n\t */\n\tget [typeNameSymbol](): TName;\n\n\t/**\n\t * Type symbol, marking a type in a way to increase type safety via strong type checking.\n\t */\n\tget [typeSchemaSymbol](): TreeNodeSchemaClass<TName, TKind, TreeNode, never, boolean, TInfo>;\n}\n"]}
1
+ {"version":3,"file":"withType.js","sourceRoot":"","sources":["../../../src/simple-tree/core/withType.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAkB,MAAM,CAAC,kCAAkC,CAAC,CAAC;AAE/F;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAkB,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAEzE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAkB,MAAM,CAAC,mBAAmB,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports -- Imported only for documentation links.\nimport type { TreeAlpha } from \"../../shared-tree/index.js\";\n\nimport type { TreeNode } from \"./treeNode.js\";\nimport type { NodeKind, TreeNodeSchemaClass } from \"./treeNodeSchema.js\";\n\n/**\n * An internal brand to improve compiler performance.\n * For more information about the type, use {@link TreeNodeApi.schema | Tree.schema(theNode)} instead.\n * @remarks\n * {@link TreeNodeApi.is | Tree.is} and {@link TreeNodeApi.schema | Tree.schema} provide a superset of this information in more friendly ways.\n * @privateRemarks\n * The identifier of a {@link TreeNode}'s schema.\n * This allows the type checker to distinguish different node types more efficiently than via {@link typeSchemaSymbol}.\n * @system @public\n */\nexport const schemaIdentifierBrand: unique symbol = Symbol(\"TreeNode Schema Identifier Brand\");\n\n/**\n * The type of a {@link TreeNode}.\n * For more information about the type, use {@link TreeNodeApi.schema | Tree.schema(theNode)} instead.\n * @remarks\n * This symbol mainly exists on nodes to allow TypeScript to provide more accurate type checking.\n * {@link TreeNodeApi.is | Tree.is} and {@link TreeNodeApi.schema | Tree.schema} provide a superset of this information in more friendly ways.\n *\n * This symbol should not manually be added to objects as doing so allows the object to be invalidly used where specific nodes are expected.\n * Instead construct a real node of the desired type using its constructor.\n *\n * This symbol should not be used directly for type narrowing. Instead use {@link WithType}.\n * @privateRemarks\n * This prevents non-nodes from being accidentally used as nodes and allows the type-checker to distinguish different node types.\n * @system @public\n */\nexport const typeSchemaSymbol: unique symbol = Symbol(\"TreeNode Schema\");\n\n/**\n * The intended type of insertable content that is to become a {@link TreeNode}.\n * @remarks Use the type-safe {@link (TreeAlpha:interface).tagContentSchema} function to tag insertable content with this symbol.\n *\n * If a property with this symbol key is present on an object that is inserted into the tree,\n * the tree will use the schema identifier specified by the value of this property when creating the node.\n * This is particularly useful for specifying the intended schema of untyped content when it would otherwise be ambiguous.\n * @example\n * ```typescript\n * const sf = new SchemaFactory(\"example\");\n * class Dog extends sf.object(\"Dog\", { name: sf.string() }) {}\n * class Cat extends sf.object(\"Cat\", { name: sf.string() }) {}\n * class Root extends sf.object(\"Root\", { pet: [Dog, Cat] }) {}\n * // ...\n * view.root.pet = { name: \"Max\" }; // Error: ambiguous schema - is it a Dog or a Cat?\n * view.root.pet = { name: \"Max\", [contentSchemaSymbol]: \"example.Dog\" }; // No error - it's a Dog.\n * ```\n * @alpha\n */\nexport const contentSchemaSymbol: unique symbol = Symbol(\"SharedTree Schema\");\n\n/**\n * Adds a type symbol to a type for stronger typing.\n *\n * @typeParam TName - Same as {@link TreeNodeSchema}'s \"Name\" parameter.\n * @typeParam TKind - Same as {@link TreeNodeSchema}'s \"Kind\" parameter.\n * @typeParam TInfo - Same as {@link TreeNodeSchema}'s \"Info\" parameter: format depends on the Kind.\n * @remarks\n * Powers {@link TreeNode}'s strong typing setup.\n * @example Narrow types for overloading based on NodeKind\n * ```typescript\n * function getKeys(node: TreeNode & WithType<string, NodeKind.Array>): number[];\n * function getKeys(node: TreeNode & WithType<string, NodeKind.Map | NodeKind.Object>): string[];\n * function getKeys(node: TreeNode): string[] | number[];\n * function getKeys(node: TreeNode): string[] | number[] {\n * \tconst schema = Tree.schema(node);\n * \tswitch (schema.kind) {\n * \t\tcase NodeKind.Array: {\n * \t\t\tconst arrayNode = node as TreeArrayNode;\n * \t\t\tconst keys: number[] = [];\n * \t\t\tfor (let index = 0; index < arrayNode.length; index++) {\n * \t\t\t\tkeys.push(index);\n * \t\t\t}\n * \t\t\treturn keys;\n * \t\t}\n * \t\tcase NodeKind.Map:\n * \t\t\treturn [...(node as TreeMapNode).keys()];\n * \t\tcase NodeKind.Object:\n * \t\t\treturn Object.keys(node);\n * \t\tdefault:\n * \t\t\tthrow new Error(\"Unsupported Kind\");\n * \t}\n * }\n * ```\n * @privateRemarks\n * The properties of this are implemented as getters rather than instance properties as that is the easiest way to make them non-enumerable,\n * and also saves memory and time as they only have to be setup on the prototype.\n * These being non-enumerable inherited properties minimizes impact on users,\n * hiding them from things like `Reflect.ownKeys`, Object spread, `Object.getOwnPropertyDescriptors`, and `for...in` loops.\n * How we declare them here actually doesn't impact that,\n * but is a good way to communicate to users and internal devs that these should be implemented as inherited getters to accomplish the above.\n * @sealed @public\n */\nexport interface WithType<\n\tout TName extends string = string,\n\tout TKind extends NodeKind = NodeKind,\n\tout TInfo = unknown,\n> {\n\t/**\n\t * Type symbol, marking a type in a way to increase type safety via strong type checking.\n\t *\n\t * Use {@link TreeNodeApi.schema | Tree.schema(theNode)} for schema related runtime data access. For type narrowing, use {@link WithType} instead of the symbols directly.\n\t * @remarks\n\t * This should be redundant with {@link typeSchemaSymbol}, but is kept for improved compiler performance.\n\t * If we just rely on {@link typeSchemaSymbol}, the compiler has to work much harder to distinguish schema in unions,\n\t * which can cause large schema unions to hit \"error TS2859: Excessive complexity comparing types\".\n\t *\n\t * This property is not intended for any use other than helping the compiler distinguish schema types,\n\t * and should not be referenced in any code other than internal to the tree package.\n\t */\n\tget [schemaIdentifierBrand](): TName;\n\n\t/**\n\t * Type symbol, marking a type in a way to increase type safety via strong type checking.\n\t */\n\tget [typeSchemaSymbol](): TreeNodeSchemaClass<TName, TKind, TreeNode, never, boolean, TInfo>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"fieldSchema.d.ts","sourceRoot":"","sources":["../../src/simple-tree/fieldSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAA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,EAAE,CAAC,CAAC;IACxB,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IACpC,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;CAC1B,CAAC,IAAI,CAAC,CAAC;AAER;;;;;GAKG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,EAAE,IAAI,SAAS,SAAS,EAAE,mBAAmB,SAAS,OAAO,IAAI;IAC5F,IAAI;CACJ,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,GAC3B,CAAC,GACD,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,QAAQ,CAAC,GAClC,CAAC,GAAG,SAAS,GACb,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,GACpC,mBAAmB,SAAS,IAAI,GAC/B,CAAC,GAAG,SAAS,GACb,CAAC,GACF,KAAK,CAAC"}
@@ -92,6 +92,15 @@ let createFieldSchemaPrivate;
92
92
  * @sealed @public
93
93
  */
94
94
  export class FieldSchema {
95
+ kind;
96
+ allowedTypes;
97
+ props;
98
+ /**
99
+ * This class is used with instanceof, and therefore should have nominal typing.
100
+ * This field enforces that.
101
+ */
102
+ _typeCheck;
103
+ lazyTypes;
95
104
  /**
96
105
  * What types of tree nodes are allowed in this field.
97
106
  * @remarks Counterpart to {@link FieldSchema.allowedTypes}, with any lazy definitions evaluated.
@@ -99,6 +108,10 @@ export class FieldSchema {
99
108
  get allowedTypeSet() {
100
109
  return this.lazyTypes.value;
101
110
  }
111
+ /**
112
+ * True if and only if, when constructing a node with this field, a value must be provided for it.
113
+ */
114
+ requiresValue;
102
115
  /**
103
116
  * {@inheritDoc FieldProps.metadata}
104
117
  */
@@ -142,12 +155,22 @@ export class FieldSchema {
142
155
  * @sealed @alpha
143
156
  */
144
157
  export class FieldSchemaAlpha extends FieldSchema {
158
+ propsAlpha;
145
159
  get persistedMetadata() {
146
160
  return this.propsAlpha?.persistedMetadata;
147
161
  }
148
162
  get isStagedOptional() {
149
163
  return this.propsAlpha?.stagedOptionalUpgrade ?? false;
150
164
  }
165
+ static {
166
+ createFieldSchemaPrivate = (kind, annotatedAllowedTypes, props) =>
167
+ // TCustomMetadata2 requires type assertion due to limitations with dependent type parameters
168
+ new FieldSchemaAlpha(kind, annotatedAllowedTypes, props);
169
+ }
170
+ /**
171
+ * {@link normalizeAllowedTypes|Normalized} version of {@link FieldSchema.allowedTypes}.
172
+ */
173
+ allowedTypesFull;
151
174
  get allowedTypesIdentifiers() {
152
175
  return this.allowedTypesFull.evaluateIdentifiers();
153
176
  }
@@ -161,11 +184,6 @@ export class FieldSchemaAlpha extends FieldSchema {
161
184
  this.propsAlpha = props;
162
185
  }
163
186
  }
164
- (() => {
165
- createFieldSchemaPrivate = (kind, annotatedAllowedTypes, props) =>
166
- // TCustomMetadata2 requires type assertion due to limitations with dependent type parameters
167
- new FieldSchemaAlpha(kind, annotatedAllowedTypes, props);
168
- })();
169
187
  /**
170
188
  * Normalizes a {@link ImplicitFieldSchema} or {@link ImplicitFieldSchema} to a {@link FieldSchema}.
171
189
  * @internal
@@ -1 +1 @@
1
- {"version":3,"file":"fieldSchema.js","sourceRoot":"","sources":["../../src/simple-tree/fieldSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAItE,OAAO,EAEN,KAAK,EAEL,WAAW,GAIX,MAAM,kBAAkB,CAAC;AAa1B,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AASvF;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,SAqBX;AArBD,WAAY,SAAS;IACpB;;;;OAIG;IACH,iDAAQ,CAAA;IACR;;;;OAIG;IACH,iDAAQ,CAAA;IACR;;;;;;OAMG;IACH,qDAAU,CAAA;AACX,CAAC,EArBW,SAAS,KAAT,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IACd,CAAC;IAED,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC;QACjD,OAAO,KAAK,CAAC;IACd,CAAC;IAED,OAAO,IAAI,CAAC;AACb,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CACxB,CAAuC,EACvC,CAAuC;IAOvC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,CACN,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC;QAC/B,CAAC,EAAE,WAAW,KAAK,CAAC,EAAE,WAAW;QACjC,yBAAyB,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,CAAC,CACrE,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,yBAAyB,CACjC,CAA2C,EAC3C,CAA2C;IAE3C,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACd,CAAC;IAED,+GAA+G;IAC/G,iCAAiC;IACjC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAEvC,OAAO,YAAY,KAAK,YAAY,CAAC;AACtC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType } from \"@fluidframework/core-interfaces\";\nimport { Lazy } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { FieldKey } from \"../core/index.js\";\nimport type { FlexTreeHydratedContextMinimal } from \"../feature-libraries/index.js\";\nimport {\n\ttype MakeNominal,\n\tbrand,\n\ttype UnionToIntersection,\n\tcompareSets,\n\ttype requireTrue,\n\ttype areOnlyKeys,\n\ttype JsonCompatibleReadOnlyObject,\n} from \"../util/index.js\";\n\nimport type {\n\tTreeNodeSchema,\n\tTreeNode,\n\tUnhydratedFlexTreeNode,\n\tImplicitAllowedTypes,\n\tTreeNodeFromImplicitAllowedTypes,\n\tTreeLeafValue,\n\tInsertableTreeNodeFromImplicitAllowedTypes,\n\tAllowedTypesFull,\n\tSchemaUpgrade,\n} from \"./core/index.js\";\nimport { AnnotatedAllowedTypesInternal, normalizeAllowedTypes } from \"./core/index.js\";\nimport type {\n\tSchemaType,\n\tSimpleAllowedTypeAttributes,\n\tSimpleFieldSchema,\n} from \"./simpleSchema.js\";\nimport type { InsertableContent } from \"./unhydratedFlexTreeFromInsertable.js\";\nimport type { UnsafeUnknownSchema } from \"./unsafeUnknownSchema.js\";\n\n/**\n * Kind of a field on an {@link TreeObjectNode}.\n * @remarks\n * More kinds may be added over time, so do not assume this is an exhaustive set.\n * See {@link FieldSchema} for where these are used, and {@link SchemaFactory} for how to create schema which use them.\n * @public\n */\nexport enum FieldKind {\n\t/**\n\t * A field which can be empty or filled.\n\t * @remarks\n\t * Allows 0 or one child.\n\t */\n\tOptional,\n\t/**\n\t * A field which must always be filled.\n\t * @remarks\n\t * Only allows exactly one child.\n\t */\n\tRequired,\n\t/**\n\t * A special readonly field used for node identifier strings.\n\t * @remarks\n\t * Only allows exactly one child.\n\t *\n\t * See {@link SchemaFactory.identifier} for more details.\n\t */\n\tIdentifier,\n}\n\n/**\n * Maps from a property key to its corresponding {@link FieldProps.key | stored key} for the provided\n * {@link ImplicitFieldSchema | field schema}.\n *\n * @remarks\n * If an explicit stored key was specified in the schema, it will be used.\n * Otherwise, the stored key is the same as the property key.\n */\nexport function getStoredKey(propertyKey: string, fieldSchema: ImplicitFieldSchema): FieldKey {\n\treturn brand(getExplicitStoredKey(fieldSchema) ?? propertyKey);\n}\n\n/**\n * Gets the {@link FieldProps.key | stored key} specified by the schema, if one was explicitly specified.\n * Otherwise, returns undefined.\n */\nexport function getExplicitStoredKey(fieldSchema: ImplicitFieldSchema): string | undefined {\n\treturn fieldSchema instanceof FieldSchema ? fieldSchema.props?.key : undefined;\n}\n\n/**\n * Additional information to provide to a {@link FieldSchema}.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @public\n */\nexport interface FieldProps<TCustomMetadata = unknown> {\n\t/**\n\t * The unique identifier of a field, used in the persisted form of the tree.\n\t *\n\t * @remarks\n\t * If not explicitly set via the schema, this is the same as the schema's property key.\n\t *\n\t * Specifying a stored key that differs from the property key is particularly useful in refactoring scenarios.\n\t * To update the developer-facing API, while maintaining backwards compatibility with existing SharedTree data,\n\t * you can change the property key and specify the previous property key as the stored key.\n\t *\n\t * Notes:\n\t *\n\t * - Stored keys have no impact on standard JavaScript behavior, on tree nodes. For example, `Object.keys`\n\t * will always return the property keys specified in the schema, ignoring any stored keys that differ from\n\t * the property keys.\n\t *\n\t * - When specifying stored keys in an object schema, you must ensure that the final set of stored keys\n\t * (accounting for those implicitly derived from property keys) contains no duplicates.\n\t * This is validated at runtime.\n\t *\n\t * @example Refactoring code without breaking compatibility with existing data\n\t *\n\t * Consider some existing object schema:\n\t *\n\t * ```TypeScript\n\t * class Point extends schemaFactory.object(\"Point\", {\n\t * \txPosition: schemaFactory.number,\n\t * \tyPosition: schemaFactory.number,\n\t * \tzPosition: schemaFactory.optional(schemaFactory.number),\n\t * });\n\t * ```\n\t *\n\t * Developers using nodes of this type would access the the `xPosition` property as `point.xPosition`.\n\t *\n\t * We would like to refactor the schema to omit \"Position\" from the property keys, but application data has\n\t * already been persisted using the original property keys. To maintain compatibility with existing data,\n\t * we can refactor the schema as follows:\n\t *\n\t * ```TypeScript\n\t * class Point extends schemaFactory.object(\"Point\", {\n\t * \tx: schemaFactory.required(schemaFactory.number, { key: \"xPosition\" }),\n\t * \ty: schemaFactory.required(schemaFactory.number, { key: \"yPosition\" }),\n\t * \tz: schemaFactory.optional(schemaFactory.number, { key: \"zPosition\" }),\n\t * });\n\t * ```\n\t *\n\t * Now, developers can access the `x` property as `point.x`, while existing data can still be collaborated on.\n\t *\n\t * @defaultValue If not specified, the key that is persisted is the property key that was specified in the schema.\n\t */\n\treadonly key?: string;\n\n\t/**\n\t * A default provider used for fields which were not provided any values.\n\t * @privateRemarks\n\t * We are using an erased type here, as we want to expose this API but `InsertableContent` and `NodeKeyManager` are not public.\n\t */\n\treadonly defaultProvider?: DefaultProvider;\n\n\t/**\n\t * Optional metadata to associate with the field.\n\t *\n\t * @remarks\n\t * Note: this metadata is not persisted nor made part of the collaborative state; it is strictly client-local.\n\t * Different clients in the same collaborative session may see different metadata for the same field.\n\t */\n\treadonly metadata?: FieldSchemaMetadata<TCustomMetadata>;\n}\n\n/**\n * {@link FieldProps} extended with additional `alpha` options.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @alpha @input\n */\nexport interface FieldPropsAlpha<TCustomMetadata = unknown>\n\textends FieldProps<TCustomMetadata> {\n\t/**\n\t * The persisted metadata for a field schema.\n\t * @remarks\n\t * Sets {@link SimpleFieldSchema.persistedMetadata}.\n\t */\n\treadonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;\n\n\t/**\n\t * If defined, indicates that this field is a {@link SchemaStaticsAlpha.stagedOptional | staged optional} field.\n\t */\n\treadonly stagedOptionalUpgrade?: SchemaUpgrade;\n}\n\n/**\n * A {@link FieldProvider} which requires additional context in order to produce its content\n */\nexport type ContextualFieldProvider = (\n\tcontext: FlexTreeHydratedContextMinimal | \"UseGlobalContext\",\n) => UnhydratedFlexTreeNode[];\n/**\n * A {@link FieldProvider} which can produce its content in a vacuum.\n */\nexport type ConstantFieldProvider = () => UnhydratedFlexTreeNode[];\n/**\n * A function which produces content for a field every time that it is called.\n */\nexport type FieldProvider = ContextualFieldProvider | ConstantFieldProvider;\n/**\n * Returns true if the given {@link FieldProvider} is a {@link ConstantFieldProvider}\n */\nexport function isConstant(\n\tfieldProvider: FieldProvider,\n): fieldProvider is ConstantFieldProvider {\n\treturn fieldProvider.length === 0;\n}\n\n/**\n * Provides a default value for a field.\n * @remarks\n * If present in a `FieldSchema`, when constructing new tree content that field can be omitted, and a default will be provided.\n * @system @sealed @public\n */\nexport interface DefaultProvider extends ErasedType<\"@fluidframework/tree.FieldProvider\"> {}\n\nexport function extractFieldProvider(input: DefaultProvider): FieldProvider {\n\treturn input as unknown as FieldProvider;\n}\n\nexport function getDefaultProvider(input: FieldProvider): DefaultProvider {\n\treturn input as unknown as DefaultProvider;\n}\n\n/**\n * Metadata associated with a {@link FieldSchema}.\n *\n * @remarks Specified via {@link FieldProps.metadata}.\n *\n * @sealed\n * @public\n */\nexport interface FieldSchemaMetadata<TCustomMetadata = unknown> {\n\t/**\n\t * User-defined metadata.\n\t */\n\treadonly custom?: TCustomMetadata;\n\n\t/**\n\t * The description of the field.\n\t *\n\t * @remarks\n\t *\n\t * If provided, will be used by the system in scenarios where a description of the field is useful.\n\t * E.g., when converting a field schema to {@link https://json-schema.org/ | JSON Schema}, this description will be\n\t * used as the `description` field.\n\t */\n\treadonly description?: string | undefined;\n}\n\n/**\n * Metadata associated with a {@link FieldSchema}. Includes fields used by alpha features.\n *\n * @remarks Specified via {@link FieldProps.metadata}.\n *\n * @sealed\n * @alpha\n */\nexport interface FieldSchemaMetadataAlpha<TCustomMetadata = unknown>\n\textends FieldSchemaMetadata<TCustomMetadata> {\n\t/**\n\t * The persisted metadata for this schema element.\n\t */\n\treadonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;\n}\n\n/**\n * Package internal construction API.\n */\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAllowedTypes,\n\tTCustomMetadata = unknown,\n>(kind: Kind, annotatedTypes: Types): FieldSchemaAlpha<Kind, Types, TCustomMetadata>;\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAllowedTypes,\n\tTCustomMetadata = unknown,\n\tTProps extends FieldProps<TCustomMetadata> = FieldProps<TCustomMetadata>,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops: TProps,\n): FieldSchemaAlpha<Kind, Types, TCustomMetadata, TProps>;\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAllowedTypes,\n\tTCustomMetadata = unknown,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n): FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldProps<TCustomMetadata> | undefined> {\n\treturn createFieldSchemaPrivate(kind, annotatedTypes, props);\n}\n\n/**\n * Implementation for {@link createFieldSchema}\n */\nlet createFieldSchemaPrivate: <\n\tKind extends FieldKind,\n\tTypes extends ImplicitAllowedTypes,\n\tTCustomMetadata,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n) => FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldProps<TCustomMetadata> | undefined>;\n\n/**\n * All policy for a specific field,\n * including functionality that does not have to be kept consistent across versions or deterministic.\n *\n * This can include policy for how to use this schema for \"view\" purposes, and well as how to expose editing APIs.\n * Use {@link SchemaFactory} to create the FieldSchema instances, for example {@link SchemaStatics.optional}.\n * @privateRemarks\n * Public access to the constructor is removed to prevent creating expressible but unsupported (or not stable) configurations.\n * {@link createFieldSchema} can be used internally to create instances.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @remarks\n * All implementations of this are actually {@link FieldSchemaAlpha} which exposes some additional alpha APIs.\n *\n * @sealed @public\n */\nexport class FieldSchema<\n\tout Kind extends FieldKind = FieldKind,\n\tout Types extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\tout TCustomMetadata = unknown,\n> {\n\t/**\n\t * This class is used with instanceof, and therefore should have nominal typing.\n\t * This field enforces that.\n\t */\n\tprotected _typeCheck!: MakeNominal;\n\n\tprivate readonly lazyTypes: Lazy<ReadonlySet<TreeNodeSchema>>;\n\n\t/**\n\t * What types of tree nodes are allowed in this field.\n\t * @remarks Counterpart to {@link FieldSchema.allowedTypes}, with any lazy definitions evaluated.\n\t */\n\tpublic get allowedTypeSet(): ReadonlySet<TreeNodeSchema> {\n\t\treturn this.lazyTypes.value;\n\t}\n\n\t/**\n\t * True if and only if, when constructing a node with this field, a value must be provided for it.\n\t */\n\tpublic readonly requiresValue: boolean;\n\n\t/**\n\t * {@inheritDoc FieldProps.metadata}\n\t */\n\tpublic get metadata(): FieldSchemaMetadata<TCustomMetadata> {\n\t\treturn this.props?.metadata ?? {};\n\t}\n\n\t/**\n\t * This class is `@sealed`: protected members like this constructor are for internal use only.\n\t * Use {@link SchemaFactory} to create the FieldSchema instances.\n\t */\n\tprotected constructor(\n\t\t/**\n\t\t * The {@link https://en.wikipedia.org/wiki/Kind_(type_theory) | kind } of this field.\n\t\t * Determines the multiplicity, viewing and editing APIs as well as the merge resolution policy.\n\t\t */\n\t\tpublic readonly kind: Kind,\n\t\t/**\n\t\t * What types of tree nodes are allowed in this field.\n\t\t */\n\t\tpublic readonly allowedTypes: Types,\n\t\t/**\n\t\t * Optional properties associated with the field.\n\t\t */\n\t\tpublic readonly props?: FieldProps<TCustomMetadata>,\n\t) {\n\t\tif (!(this instanceof FieldSchemaAlpha)) {\n\t\t\tthrow new UsageError(\"FieldSchema is @sealed: sub-classing is not allowed.\");\n\t\t}\n\n\t\tthis.lazyTypes = new Lazy(() => normalizeAllowedTypes(this.allowedTypes).evaluateSet());\n\t\t// TODO: optional fields should (by default) get a default provider that returns undefined, removing the need to special case them here:\n\t\tthis.requiresValue =\n\t\t\tthis.props?.defaultProvider === undefined && this.kind !== FieldKind.Optional;\n\t}\n}\n\n/**\n * {@link FieldSchema} including alpha APIs (currently {@link SimpleFieldSchema}).\n * @remarks\n * This class will go away once the alpha APIs are stable and implemented by {@link FieldSchema}.\n * @sealed @alpha\n */\nexport class FieldSchemaAlpha<\n\t\tKind extends FieldKind = FieldKind,\n\t\tTypes extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t\tTCustomMetadata = unknown,\n\t\tTProps extends FieldPropsAlpha<TCustomMetadata> | undefined =\n\t\t\t| FieldPropsAlpha<TCustomMetadata>\n\t\t\t| undefined,\n\t>\n\textends FieldSchema<Kind, Types, TCustomMetadata>\n\timplements SimpleFieldSchema<SchemaType.View>\n{\n\tprivate readonly propsAlpha: TProps;\n\n\tpublic get persistedMetadata(): JsonCompatibleReadOnlyObject | undefined {\n\t\treturn this.propsAlpha?.persistedMetadata;\n\t}\n\n\tpublic get isStagedOptional(): false | SchemaUpgrade {\n\t\treturn this.propsAlpha?.stagedOptionalUpgrade ?? false;\n\t}\n\n\tstatic {\n\t\tcreateFieldSchemaPrivate = <\n\t\t\tKind2 extends FieldKind,\n\t\t\tTypes2 extends ImplicitAllowedTypes,\n\t\t\tTCustomMetadata2,\n\t\t>(\n\t\t\tkind: Kind2,\n\t\t\tannotatedAllowedTypes: Types2,\n\t\t\tprops?: FieldPropsAlpha<TCustomMetadata2>,\n\t\t) =>\n\t\t\t// TCustomMetadata2 requires type assertion due to limitations with dependent type parameters\n\t\t\tnew FieldSchemaAlpha(kind, annotatedAllowedTypes, props) as unknown as FieldSchemaAlpha<\n\t\t\t\tKind2,\n\t\t\t\tTypes2,\n\t\t\t\tTCustomMetadata2\n\t\t\t>;\n\t}\n\n\t/**\n\t * {@link normalizeAllowedTypes|Normalized} version of {@link FieldSchema.allowedTypes}.\n\t */\n\tpublic readonly allowedTypesFull: AllowedTypesFull;\n\n\tpublic get allowedTypesIdentifiers(): ReadonlySet<string> {\n\t\treturn this.allowedTypesFull.evaluateIdentifiers();\n\t}\n\n\tpublic get simpleAllowedTypes(): ReadonlyMap<\n\t\tstring,\n\t\tSimpleAllowedTypeAttributes<SchemaType.View>\n\t> {\n\t\treturn AnnotatedAllowedTypesInternal.evaluateSimpleAllowedTypes(this.allowedTypesFull);\n\t}\n\n\tprotected constructor(\n\t\tkind: Kind,\n\t\ttypes: Types,\n\n\t\tprops?: FieldPropsAlpha<TCustomMetadata>,\n\t) {\n\t\tsuper(kind, types, props);\n\n\t\tconst normalizedTypes = normalizeAllowedTypes(types);\n\t\tthis.allowedTypesFull = normalizedTypes;\n\t\tthis.propsAlpha = props as TProps;\n\t}\n}\n\n/**\n * Normalizes a {@link ImplicitFieldSchema} or {@link ImplicitFieldSchema} to a {@link FieldSchema}.\n * @internal\n */\nexport function normalizeFieldSchema(\n\tschema: ImplicitFieldSchema | ImplicitFieldSchema,\n): FieldSchemaAlpha {\n\treturn schema instanceof FieldSchema\n\t\t? (schema as FieldSchemaAlpha)\n\t\t: createFieldSchema(FieldKind.Required, schema);\n}\n\n/**\n * Returns true if the given {@link ImplicitFieldSchema} are equivalent, otherwise false.\n * @remarks Two ImplicitFieldSchema are considered equivalent if all of the following are true:\n * 1. They have the same {@link FieldKind | kinds}.\n * 2. They have {@link areFieldPropsEqual | equivalent FieldProps}.\n * 3. They have the same exact set of allowed types. The allowed types must be (respectively) reference equal.\n *\n * For example, comparing an ImplicitFieldSchema that is a {@link TreeNodeSchema} to an ImplicitFieldSchema that is a {@link FieldSchema}\n * will return true if they are the same kind, the FieldSchema has exactly one allowed type (the TreeNodeSchema), and they have equivalent FieldProps.\n */\nexport function areImplicitFieldSchemaEqual(\n\ta: ImplicitFieldSchema,\n\tb: ImplicitFieldSchema,\n): boolean {\n\treturn areFieldSchemaEqual(normalizeFieldSchema(a), normalizeFieldSchema(b));\n}\n\n/**\n * Returns true if the given {@link FieldSchema} are equivalent, otherwise false.\n * @remarks Two FieldSchema are considered equivalent if all of the following are true:\n * 1. They have the same {@link FieldKind | kinds}.\n * 2. They have {@link areFieldPropsEqual | equivalent FieldProps}.\n * 3. They have the same exact set of allowed types. The allowed types must be reference equal.\n */\nexport function areFieldSchemaEqual(a: FieldSchema, b: FieldSchema): boolean {\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\tif (a.kind !== b.kind) {\n\t\treturn false;\n\t}\n\n\tif (!areFieldPropsEqual(a.props, b.props)) {\n\t\treturn false;\n\t}\n\n\treturn compareSets({ a: a.allowedTypeSet, b: b.allowedTypeSet });\n}\n\n/**\n * Returns true if the given {@link FieldProps} are equivalent, otherwise false.\n * @remarks FieldProps are considered equivalent if their keys and default providers are reference equal, and their metadata are {@link areMetadataEqual | equivalent}.\n */\nfunction areFieldPropsEqual(a: FieldProps | undefined, b: FieldProps | undefined): boolean {\n\t// If any new fields are added to FieldProps, this check will stop compiling as a reminder that this function needs to be updated.\n\ttype _keys = requireTrue<areOnlyKeys<FieldProps, \"key\" | \"defaultProvider\" | \"metadata\">>;\n\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\tif (a?.key !== b?.key || a?.defaultProvider !== b?.defaultProvider) {\n\t\treturn false;\n\t}\n\n\tif (!areMetadataEqual(a?.metadata, b?.metadata)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns true if the given {@link FieldSchemaMetadata} are equivalent, otherwise false.\n * @remarks FieldSchemaMetadata are considered equivalent if their custom data and descriptions are (respectively) reference equal.\n */\nfunction areMetadataEqual(\n\ta: FieldSchemaMetadataAlpha | undefined,\n\tb: FieldSchemaMetadataAlpha | undefined,\n): boolean {\n\t// If any new fields are added to FieldSchemaMetadata, this check will stop compiling as a reminder that this function needs to be updated.\n\ttype _keys = requireTrue<\n\t\tareOnlyKeys<FieldSchemaMetadataAlpha, \"custom\" | \"description\" | \"persistedMetadata\">\n\t>;\n\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\treturn (\n\t\tObject.is(a?.custom, b?.custom) &&\n\t\ta?.description === b?.description &&\n\t\tarePersistedMetadataEqual(a?.persistedMetadata, b?.persistedMetadata)\n\t);\n}\n\n/**\n * Returns true if the given persisted metadata fields are equivalent, otherwise false.\n * @remarks\n * Currently only handles shallow equality in the case where the keys are in the same order. This is acceptable for current use cases.\n */\nfunction arePersistedMetadataEqual(\n\ta: JsonCompatibleReadOnlyObject | undefined,\n\tb: JsonCompatibleReadOnlyObject | undefined,\n): boolean {\n\tif (Object.is(a, b)) {\n\t\treturn true;\n\t}\n\n\tif (a === undefined || b === undefined) {\n\t\treturn false;\n\t}\n\n\t// Note that the key order matters. If `a` and `b` have the same content but the keys are in a different order,\n\t// this method will return false.\n\tconst aStringified = JSON.stringify(a);\n\tconst bStringified = JSON.stringify(b);\n\n\treturn aStringified === bStringified;\n}\n\n/**\n * Schema for a field of a tree node.\n * @remarks\n * Implicitly treats {@link ImplicitAllowedTypes} as a Required field of that type.\n * @public\n */\nexport type ImplicitFieldSchema = FieldSchema | ImplicitAllowedTypes;\n\n/**\n * Converts an `ImplicitFieldSchema` to a property type suitable for reading a field with this that schema.\n *\n * @typeparam TSchema - When non-exact schema are provided this errors on the side of returning too general of a type (a conservative union of all possibilities).\n * This is ideal for \"output APIs\" - i.e. it converts the schema type to the runtime type that a user will _read_ from the tree.\n * Examples of such \"non-exact\" schema include `ImplicitFieldSchema`, `ImplicitAllowedTypes`, and TypeScript unions of schema types.\n * @public\n */\nexport type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> =\n\tTSchema extends FieldSchema<infer Kind, infer Types>\n\t\t? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind>\n\t\t: TSchema extends ImplicitAllowedTypes\n\t\t\t? TreeNodeFromImplicitAllowedTypes<TSchema>\n\t\t\t: TreeNode | TreeLeafValue | undefined;\n\n/**\n * Type of content that can be inserted into the tree for a field of the given schema.\n *\n * @see {@link Input}\n *\n * @typeparam TSchemaInput - Schema to process.\n * @typeparam TSchema - Do not specify: default value used as implementation detail.\n * @public\n */\nexport type InsertableTreeFieldFromImplicitField<\n\tTSchemaInput extends ImplicitFieldSchema,\n\tTSchema = UnionToIntersection<TSchemaInput>,\n> = [TSchema] extends [FieldSchema<infer Kind, infer Types>]\n\t? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypes<Types>, Kind, true>\n\t: [TSchema] extends [ImplicitAllowedTypes]\n\t\t? InsertableTreeNodeFromImplicitAllowedTypes<TSchema>\n\t\t: never;\n\n/**\n * Content which could be inserted into a field within a tree.\n *\n * @see {@link Input}\n * @remarks\n * Extended version of {@link InsertableTreeFieldFromImplicitField} that also allows {@link (UnsafeUnknownSchema:type)}.\n * @alpha\n */\nexport type InsertableField<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> = [\n\tTSchema,\n] extends [ImplicitFieldSchema]\n\t? InsertableTreeFieldFromImplicitField<TSchema>\n\t: [TSchema] extends [UnsafeUnknownSchema]\n\t\t? InsertableContent | undefined\n\t\t: never;\n\n/**\n * Content which could be read from a field within a tree.\n *\n * @remarks\n * Extended version of {@link TreeFieldFromImplicitField} that also allows {@link (UnsafeUnknownSchema:type)}.\n * Since reading from fields with non-exact schema is still safe, this is only useful (compared to {@link TreeFieldFromImplicitField}) when the schema is also used as input and thus allows {@link (UnsafeUnknownSchema:type)}\n * for use\n * @system @alpha\n */\nexport type ReadableField<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> =\n\tTreeFieldFromImplicitField<ReadSchema<TSchema>>;\n\n/**\n * Adapter to remove {@link (UnsafeUnknownSchema:type)} from a schema type so it can be used with types for generating APIs for reading data.\n *\n * @remarks\n * Since reading with non-exact schema is still safe, this is mainly useful when the schema is also used as input and thus allows {@link (UnsafeUnknownSchema:type)}.\n * @system @alpha\n */\nexport type ReadSchema<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> = [\n\tTSchema,\n] extends [ImplicitFieldSchema]\n\t? TSchema\n\t: ImplicitFieldSchema;\n\n/**\n * Suitable for output.\n * For input must error on side of excluding undefined instead.\n * @system @public\n */\nexport type ApplyKind<T, Kind extends FieldKind> = {\n\t[FieldKind.Required]: T;\n\t[FieldKind.Optional]: T | undefined;\n\t[FieldKind.Identifier]: T;\n}[Kind];\n\n/**\n * Suitable for input.\n *\n * @see {@link Input}\n * @system @public\n */\nexport type ApplyKindInput<T, Kind extends FieldKind, DefaultsAreOptional extends boolean> = [\n\tKind,\n] extends [FieldKind.Required]\n\t? T\n\t: [Kind] extends [FieldKind.Optional]\n\t\t? T | undefined\n\t\t: [Kind] extends [FieldKind.Identifier]\n\t\t\t? DefaultsAreOptional extends true\n\t\t\t\t? T | undefined\n\t\t\t\t: T\n\t\t\t: never;\n"]}
1
+ {"version":3,"file":"fieldSchema.js","sourceRoot":"","sources":["../../src/simple-tree/fieldSchema.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,IAAI,EAAE,MAAM,qCAAqC,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAItE,OAAO,EAEN,KAAK,EAEL,WAAW,GAIX,MAAM,kBAAkB,CAAC;AAa1B,OAAO,EAAE,6BAA6B,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AASvF;;;;;;GAMG;AACH,MAAM,CAAN,IAAY,SAqBX;AArBD,WAAY,SAAS;IACpB;;;;OAIG;IACH,iDAAQ,CAAA;IACR;;;;OAIG;IACH,iDAAQ,CAAA;IACR;;;;;;OAMG;IACH,qDAAU,CAAA;AACX,CAAC,EArBW,SAAS,KAAT,SAAS,QAqBpB;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,WAAmB,EAAE,WAAgC;IACjF,OAAO,KAAK,CAAC,oBAAoB,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,CAAC;AAChE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,WAAgC;IACpE,OAAO,WAAW,YAAY,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;AAChF,CAAC;AAqHD;;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,CAAuC,EACvC,CAAuC;IAOvC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IACb,CAAC;IAED,OAAO,CACN,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC;QAC/B,CAAC,EAAE,WAAW,KAAK,CAAC,EAAE,WAAW;QACjC,yBAAyB,CAAC,CAAC,EAAE,iBAAiB,EAAE,CAAC,EAAE,iBAAiB,CAAC,CACrE,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,yBAAyB,CACjC,CAA2C,EAC3C,CAA2C;IAE3C,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QACrB,OAAO,IAAI,CAAC;IACb,CAAC;IAED,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACd,CAAC;IAED,+GAA+G;IAC/G,iCAAiC;IACjC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IACvC,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;IAEvC,OAAO,YAAY,KAAK,YAAY,CAAC;AACtC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ErasedType } from \"@fluidframework/core-interfaces\";\nimport { Lazy } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { FieldKey } from \"../core/index.js\";\nimport type { FlexTreeHydratedContextMinimal } from \"../feature-libraries/index.js\";\nimport {\n\ttype MakeNominal,\n\tbrand,\n\ttype UnionToIntersection,\n\tcompareSets,\n\ttype requireTrue,\n\ttype areOnlyKeys,\n\ttype JsonCompatibleReadOnlyObject,\n} from \"../util/index.js\";\n\nimport type {\n\tTreeNodeSchema,\n\tTreeNode,\n\tUnhydratedFlexTreeNode,\n\tImplicitAllowedTypes,\n\tTreeNodeFromImplicitAllowedTypes,\n\tTreeLeafValue,\n\tInsertableTreeNodeFromImplicitAllowedTypes,\n\tAllowedTypesFull,\n\tSchemaUpgrade,\n} from \"./core/index.js\";\nimport { AnnotatedAllowedTypesInternal, normalizeAllowedTypes } from \"./core/index.js\";\nimport type {\n\tSchemaType,\n\tSimpleAllowedTypeAttributes,\n\tSimpleFieldSchema,\n} from \"./simpleSchema.js\";\nimport type { InsertableContent } from \"./unhydratedFlexTreeFromInsertable.js\";\nimport type { UnsafeUnknownSchema } from \"./unsafeUnknownSchema.js\";\n\n/**\n * Kind of a field on an {@link TreeObjectNode}.\n * @remarks\n * More kinds may be added over time, so do not assume this is an exhaustive set.\n * See {@link FieldSchema} for where these are used, and {@link SchemaFactory} for how to create schema which use them.\n * @public\n */\nexport enum FieldKind {\n\t/**\n\t * A field which can be empty or filled.\n\t * @remarks\n\t * Allows 0 or one child.\n\t */\n\tOptional,\n\t/**\n\t * A field which must always be filled.\n\t * @remarks\n\t * Only allows exactly one child.\n\t */\n\tRequired,\n\t/**\n\t * A special readonly field used for node identifier strings.\n\t * @remarks\n\t * Only allows exactly one child.\n\t *\n\t * See {@link SchemaFactory.identifier} for more details.\n\t */\n\tIdentifier,\n}\n\n/**\n * Maps from a property key to its corresponding {@link FieldProps.key | stored key} for the provided\n * {@link ImplicitFieldSchema | field schema}.\n *\n * @remarks\n * If an explicit stored key was specified in the schema, it will be used.\n * Otherwise, the stored key is the same as the property key.\n */\nexport function getStoredKey(propertyKey: string, fieldSchema: ImplicitFieldSchema): FieldKey {\n\treturn brand(getExplicitStoredKey(fieldSchema) ?? propertyKey);\n}\n\n/**\n * Gets the {@link FieldProps.key | stored key} specified by the schema, if one was explicitly specified.\n * Otherwise, returns undefined.\n */\nexport function getExplicitStoredKey(fieldSchema: ImplicitFieldSchema): string | undefined {\n\treturn fieldSchema instanceof FieldSchema ? fieldSchema.props?.key : undefined;\n}\n\n/**\n * Additional information to provide to a {@link FieldSchema}.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @public\n */\nexport interface FieldProps<TCustomMetadata = unknown> {\n\t/**\n\t * The unique identifier of a field, used in the persisted form of the tree.\n\t *\n\t * @remarks\n\t * If not explicitly set via the schema, this is the same as the schema's property key.\n\t *\n\t * Specifying a stored key that differs from the property key is particularly useful in refactoring scenarios.\n\t * To update the developer-facing API, while maintaining backwards compatibility with existing SharedTree data,\n\t * you can change the property key and specify the previous property key as the stored key.\n\t *\n\t * Notes:\n\t *\n\t * - Stored keys have no impact on standard JavaScript behavior, on tree nodes. For example, `Object.keys`\n\t * will always return the property keys specified in the schema, ignoring any stored keys that differ from\n\t * the property keys.\n\t *\n\t * - When specifying stored keys in an object schema, you must ensure that the final set of stored keys\n\t * (accounting for those implicitly derived from property keys) contains no duplicates.\n\t * This is validated at runtime.\n\t *\n\t * @example Refactoring code without breaking compatibility with existing data\n\t *\n\t * Consider some existing object schema:\n\t *\n\t * ```TypeScript\n\t * class Point extends schemaFactory.object(\"Point\", {\n\t * \txPosition: schemaFactory.number,\n\t * \tyPosition: schemaFactory.number,\n\t * \tzPosition: schemaFactory.optional(schemaFactory.number),\n\t * });\n\t * ```\n\t *\n\t * Developers using nodes of this type would access the the `xPosition` property as `point.xPosition`.\n\t *\n\t * We would like to refactor the schema to omit \"Position\" from the property keys, but application data has\n\t * already been persisted using the original property keys. To maintain compatibility with existing data,\n\t * we can refactor the schema as follows:\n\t *\n\t * ```TypeScript\n\t * class Point extends schemaFactory.object(\"Point\", {\n\t * \tx: schemaFactory.required(schemaFactory.number, { key: \"xPosition\" }),\n\t * \ty: schemaFactory.required(schemaFactory.number, { key: \"yPosition\" }),\n\t * \tz: schemaFactory.optional(schemaFactory.number, { key: \"zPosition\" }),\n\t * });\n\t * ```\n\t *\n\t * Now, developers can access the `x` property as `point.x`, while existing data can still be collaborated on.\n\t *\n\t * @defaultValue If not specified, the key that is persisted is the property key that was specified in the schema.\n\t */\n\treadonly key?: string;\n\n\t/**\n\t * A default provider used for fields which were not provided any values.\n\t * @privateRemarks\n\t * We are using an erased type here, as we want to expose this API but `InsertableContent` and `NodeKeyManager` are not public.\n\t */\n\treadonly defaultProvider?: DefaultProvider;\n\n\t/**\n\t * Optional metadata to associate with the field.\n\t *\n\t * @remarks\n\t * Note: this metadata is not persisted nor made part of the collaborative state; it is strictly client-local.\n\t * Different clients in the same collaborative session may see different metadata for the same field.\n\t */\n\treadonly metadata?: FieldSchemaMetadata<TCustomMetadata>;\n}\n\n/**\n * {@link FieldProps} extended with additional `alpha` options.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @alpha @input\n */\nexport interface FieldPropsAlpha<TCustomMetadata = unknown>\n\textends FieldProps<TCustomMetadata> {\n\t/**\n\t * The persisted metadata for a field schema.\n\t * @remarks\n\t * Sets {@link SimpleFieldSchema.persistedMetadata}.\n\t */\n\treadonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;\n\n\t/**\n\t * If defined, indicates that this field is a {@link SchemaStaticsAlpha.stagedOptional | staged optional} field.\n\t */\n\treadonly stagedOptionalUpgrade?: SchemaUpgrade;\n}\n\n/**\n * A {@link FieldProvider} which requires additional context in order to produce its content\n */\nexport type ContextualFieldProvider = (\n\tcontext: FlexTreeHydratedContextMinimal | \"UseGlobalContext\",\n) => UnhydratedFlexTreeNode[];\n/**\n * A {@link FieldProvider} which can produce its content in a vacuum.\n */\nexport type ConstantFieldProvider = () => UnhydratedFlexTreeNode[];\n/**\n * A function which produces content for a field every time that it is called.\n */\nexport type FieldProvider = ContextualFieldProvider | ConstantFieldProvider;\n/**\n * Returns true if the given {@link FieldProvider} is a {@link ConstantFieldProvider}\n */\nexport function isConstant(\n\tfieldProvider: FieldProvider,\n): fieldProvider is ConstantFieldProvider {\n\treturn fieldProvider.length === 0;\n}\n\n/**\n * Provides a default value for a field.\n * @remarks\n * If present in a `FieldSchema`, when constructing new tree content that field can be omitted, and a default will be provided.\n * @system @sealed @public\n */\nexport interface DefaultProvider extends ErasedType<\"@fluidframework/tree.FieldProvider\"> {}\n\nexport function extractFieldProvider(input: DefaultProvider): FieldProvider {\n\treturn input as unknown as FieldProvider;\n}\n\nexport function getDefaultProvider(input: FieldProvider): DefaultProvider {\n\treturn input as unknown as DefaultProvider;\n}\n\n/**\n * Metadata associated with a {@link FieldSchema}.\n *\n * @remarks Specified via {@link FieldProps.metadata}.\n *\n * @sealed\n * @public\n */\nexport interface FieldSchemaMetadata<TCustomMetadata = unknown> {\n\t/**\n\t * User-defined metadata.\n\t */\n\treadonly custom?: TCustomMetadata;\n\n\t/**\n\t * The description of the field.\n\t *\n\t * @remarks\n\t *\n\t * If provided, will be used by the system in scenarios where a description of the field is useful.\n\t * E.g., when converting a field schema to {@link https://json-schema.org/ | JSON Schema}, this description will be\n\t * used as the `description` field.\n\t */\n\treadonly description?: string | undefined;\n}\n\n/**\n * Metadata associated with a {@link FieldSchema}. Includes fields used by alpha features.\n *\n * @remarks Specified via {@link FieldProps.metadata}.\n *\n * @sealed\n * @alpha\n */\nexport interface FieldSchemaMetadataAlpha<TCustomMetadata = unknown>\n\textends FieldSchemaMetadata<TCustomMetadata> {\n\t/**\n\t * The persisted metadata for this schema element.\n\t */\n\treadonly persistedMetadata?: JsonCompatibleReadOnlyObject | undefined;\n}\n\n/**\n * Package internal construction API.\n */\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAllowedTypes,\n\tTCustomMetadata = unknown,\n>(kind: Kind, annotatedTypes: Types): FieldSchemaAlpha<Kind, Types, TCustomMetadata>;\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAllowedTypes,\n\tTCustomMetadata = unknown,\n\tTProps extends FieldProps<TCustomMetadata> = FieldProps<TCustomMetadata>,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops: TProps,\n): FieldSchemaAlpha<Kind, Types, TCustomMetadata, TProps>;\nexport function createFieldSchema<\n\tKind extends FieldKind,\n\tTypes extends ImplicitAllowedTypes,\n\tTCustomMetadata = unknown,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n): FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldProps<TCustomMetadata> | undefined> {\n\treturn createFieldSchemaPrivate(kind, annotatedTypes, props);\n}\n\n/**\n * Implementation for {@link createFieldSchema}\n */\nlet createFieldSchemaPrivate: <\n\tKind extends FieldKind,\n\tTypes extends ImplicitAllowedTypes,\n\tTCustomMetadata,\n>(\n\tkind: Kind,\n\tannotatedTypes: Types,\n\tprops?: FieldProps<TCustomMetadata>,\n) => FieldSchemaAlpha<Kind, Types, TCustomMetadata, FieldProps<TCustomMetadata> | undefined>;\n\n/**\n * All policy for a specific field,\n * including functionality that does not have to be kept consistent across versions or deterministic.\n *\n * This can include policy for how to use this schema for \"view\" purposes, and well as how to expose editing APIs.\n * Use {@link SchemaFactory} to create the FieldSchema instances, for example {@link SchemaStatics.optional}.\n * @privateRemarks\n * Public access to the constructor is removed to prevent creating expressible but unsupported (or not stable) configurations.\n * {@link createFieldSchema} can be used internally to create instances.\n *\n * @typeParam TCustomMetadata - Custom metadata properties to associate with the field.\n * See {@link FieldSchemaMetadata.custom}.\n *\n * @remarks\n * All implementations of this are actually {@link FieldSchemaAlpha} which exposes some additional alpha APIs.\n *\n * @sealed @public\n */\nexport class FieldSchema<\n\tout Kind extends FieldKind = FieldKind,\n\tout Types extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\tout TCustomMetadata = unknown,\n> {\n\t/**\n\t * This class is used with instanceof, and therefore should have nominal typing.\n\t * This field enforces that.\n\t */\n\tprotected _typeCheck!: MakeNominal;\n\n\tprivate readonly lazyTypes: Lazy<ReadonlySet<TreeNodeSchema>>;\n\n\t/**\n\t * What types of tree nodes are allowed in this field.\n\t * @remarks Counterpart to {@link FieldSchema.allowedTypes}, with any lazy definitions evaluated.\n\t */\n\tpublic get allowedTypeSet(): ReadonlySet<TreeNodeSchema> {\n\t\treturn this.lazyTypes.value;\n\t}\n\n\t/**\n\t * True if and only if, when constructing a node with this field, a value must be provided for it.\n\t */\n\tpublic readonly requiresValue: boolean;\n\n\t/**\n\t * {@inheritDoc FieldProps.metadata}\n\t */\n\tpublic get metadata(): FieldSchemaMetadata<TCustomMetadata> {\n\t\treturn this.props?.metadata ?? {};\n\t}\n\n\t/**\n\t * This class is `@sealed`: protected members like this constructor are for internal use only.\n\t * Use {@link SchemaFactory} to create the FieldSchema instances.\n\t */\n\tprotected constructor(\n\t\t/**\n\t\t * The {@link https://en.wikipedia.org/wiki/Kind_(type_theory) | kind } of this field.\n\t\t * Determines the multiplicity, viewing and editing APIs as well as the merge resolution policy.\n\t\t */\n\t\tpublic readonly kind: Kind,\n\t\t/**\n\t\t * What types of tree nodes are allowed in this field.\n\t\t */\n\t\tpublic readonly allowedTypes: Types,\n\t\t/**\n\t\t * Optional properties associated with the field.\n\t\t */\n\t\tpublic readonly props?: FieldProps<TCustomMetadata>,\n\t) {\n\t\tif (!(this instanceof FieldSchemaAlpha)) {\n\t\t\tthrow new UsageError(\"FieldSchema is @sealed: sub-classing is not allowed.\");\n\t\t}\n\n\t\tthis.lazyTypes = new Lazy(() => normalizeAllowedTypes(this.allowedTypes).evaluateSet());\n\t\t// TODO: optional fields should (by default) get a default provider that returns undefined, removing the need to special case them here:\n\t\tthis.requiresValue =\n\t\t\tthis.props?.defaultProvider === undefined && this.kind !== FieldKind.Optional;\n\t}\n}\n\n/**\n * {@link FieldSchema} including alpha APIs (currently {@link SimpleFieldSchema}).\n * @remarks\n * This class will go away once the alpha APIs are stable and implemented by {@link FieldSchema}.\n * @sealed @alpha\n */\nexport class FieldSchemaAlpha<\n\t\tKind extends FieldKind = FieldKind,\n\t\tTypes extends ImplicitAllowedTypes = ImplicitAllowedTypes,\n\t\tTCustomMetadata = unknown,\n\t\tTProps extends FieldPropsAlpha<TCustomMetadata> | undefined =\n\t\t\t| FieldPropsAlpha<TCustomMetadata>\n\t\t\t| undefined,\n\t>\n\textends FieldSchema<Kind, Types, TCustomMetadata>\n\timplements SimpleFieldSchema<SchemaType.View>\n{\n\tprivate readonly propsAlpha: TProps;\n\n\tpublic get persistedMetadata(): JsonCompatibleReadOnlyObject | undefined {\n\t\treturn this.propsAlpha?.persistedMetadata;\n\t}\n\n\tpublic get isStagedOptional(): false | SchemaUpgrade {\n\t\treturn this.propsAlpha?.stagedOptionalUpgrade ?? false;\n\t}\n\n\tstatic {\n\t\tcreateFieldSchemaPrivate = <\n\t\t\tKind2 extends FieldKind,\n\t\t\tTypes2 extends ImplicitAllowedTypes,\n\t\t\tTCustomMetadata2,\n\t\t>(\n\t\t\tkind: Kind2,\n\t\t\tannotatedAllowedTypes: Types2,\n\t\t\tprops?: FieldPropsAlpha<TCustomMetadata2>,\n\t\t) =>\n\t\t\t// TCustomMetadata2 requires type assertion due to limitations with dependent type parameters\n\t\t\tnew FieldSchemaAlpha(kind, annotatedAllowedTypes, props) as unknown as FieldSchemaAlpha<\n\t\t\t\tKind2,\n\t\t\t\tTypes2,\n\t\t\t\tTCustomMetadata2\n\t\t\t>;\n\t}\n\n\t/**\n\t * {@link normalizeAllowedTypes|Normalized} version of {@link FieldSchema.allowedTypes}.\n\t */\n\tpublic readonly allowedTypesFull: AllowedTypesFull;\n\n\tpublic get allowedTypesIdentifiers(): ReadonlySet<string> {\n\t\treturn this.allowedTypesFull.evaluateIdentifiers();\n\t}\n\n\tpublic get simpleAllowedTypes(): ReadonlyMap<\n\t\tstring,\n\t\tSimpleAllowedTypeAttributes<SchemaType.View>\n\t> {\n\t\treturn AnnotatedAllowedTypesInternal.evaluateSimpleAllowedTypes(this.allowedTypesFull);\n\t}\n\n\tprotected constructor(\n\t\tkind: Kind,\n\t\ttypes: Types,\n\n\t\tprops?: FieldPropsAlpha<TCustomMetadata>,\n\t) {\n\t\tsuper(kind, types, props);\n\n\t\tconst normalizedTypes = normalizeAllowedTypes(types);\n\t\tthis.allowedTypesFull = normalizedTypes;\n\t\tthis.propsAlpha = props as TProps;\n\t}\n}\n\n/**\n * Normalizes a {@link ImplicitFieldSchema} or {@link ImplicitFieldSchema} to a {@link FieldSchema}.\n * @internal\n */\nexport function normalizeFieldSchema(\n\tschema: ImplicitFieldSchema | ImplicitFieldSchema,\n): FieldSchemaAlpha {\n\treturn schema instanceof FieldSchema\n\t\t? (schema as FieldSchemaAlpha)\n\t\t: createFieldSchema(FieldKind.Required, schema);\n}\n\n/**\n * Returns true if the given {@link ImplicitFieldSchema} are equivalent, otherwise false.\n * @remarks Two ImplicitFieldSchema are considered equivalent if all of the following are true:\n * 1. They have the same {@link FieldKind | kinds}.\n * 2. They have {@link areFieldPropsEqual | equivalent FieldProps}.\n * 3. They have the same exact set of allowed types. The allowed types must be (respectively) reference equal.\n *\n * For example, comparing an ImplicitFieldSchema that is a {@link TreeNodeSchema} to an ImplicitFieldSchema that is a {@link FieldSchema}\n * will return true if they are the same kind, the FieldSchema has exactly one allowed type (the TreeNodeSchema), and they have equivalent FieldProps.\n */\nexport function areImplicitFieldSchemaEqual(\n\ta: ImplicitFieldSchema,\n\tb: ImplicitFieldSchema,\n): boolean {\n\treturn areFieldSchemaEqual(normalizeFieldSchema(a), normalizeFieldSchema(b));\n}\n\n/**\n * Returns true if the given {@link FieldSchema} are equivalent, otherwise false.\n * @remarks Two FieldSchema are considered equivalent if all of the following are true:\n * 1. They have the same {@link FieldKind | kinds}.\n * 2. They have {@link areFieldPropsEqual | equivalent FieldProps}.\n * 3. They have the same exact set of allowed types. The allowed types must be reference equal.\n */\nexport function areFieldSchemaEqual(a: FieldSchema, b: FieldSchema): boolean {\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\tif (a.kind !== b.kind) {\n\t\treturn false;\n\t}\n\n\tif (!areFieldPropsEqual(a.props, b.props)) {\n\t\treturn false;\n\t}\n\n\treturn compareSets({ a: a.allowedTypeSet, b: b.allowedTypeSet });\n}\n\n/**\n * Returns true if the given {@link FieldProps} are equivalent, otherwise false.\n * @remarks FieldProps are considered equivalent if their keys and default providers are reference equal, and their metadata are {@link areMetadataEqual | equivalent}.\n */\nfunction areFieldPropsEqual(a: FieldProps | undefined, b: FieldProps | undefined): boolean {\n\t// If any new fields are added to FieldProps, this check will stop compiling as a reminder that this function needs to be updated.\n\ttype _keys = requireTrue<areOnlyKeys<FieldProps, \"key\" | \"defaultProvider\" | \"metadata\">>;\n\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\tif (a?.key !== b?.key || a?.defaultProvider !== b?.defaultProvider) {\n\t\treturn false;\n\t}\n\n\tif (!areMetadataEqual(a?.metadata, b?.metadata)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n\n/**\n * Returns true if the given {@link FieldSchemaMetadata} are equivalent, otherwise false.\n * @remarks FieldSchemaMetadata are considered equivalent if their custom data and descriptions are (respectively) reference equal.\n */\nfunction areMetadataEqual(\n\ta: FieldSchemaMetadataAlpha | undefined,\n\tb: FieldSchemaMetadataAlpha | undefined,\n): boolean {\n\t// If any new fields are added to FieldSchemaMetadata, this check will stop compiling as a reminder that this function needs to be updated.\n\ttype _keys = requireTrue<\n\t\tareOnlyKeys<FieldSchemaMetadataAlpha, \"custom\" | \"description\" | \"persistedMetadata\">\n\t>;\n\n\tif (a === b) {\n\t\treturn true;\n\t}\n\n\treturn (\n\t\tObject.is(a?.custom, b?.custom) &&\n\t\ta?.description === b?.description &&\n\t\tarePersistedMetadataEqual(a?.persistedMetadata, b?.persistedMetadata)\n\t);\n}\n\n/**\n * Returns true if the given persisted metadata fields are equivalent, otherwise false.\n * @remarks\n * Currently only handles shallow equality in the case where the keys are in the same order. This is acceptable for current use cases.\n */\nfunction arePersistedMetadataEqual(\n\ta: JsonCompatibleReadOnlyObject | undefined,\n\tb: JsonCompatibleReadOnlyObject | undefined,\n): boolean {\n\tif (Object.is(a, b)) {\n\t\treturn true;\n\t}\n\n\tif (a === undefined || b === undefined) {\n\t\treturn false;\n\t}\n\n\t// Note that the key order matters. If `a` and `b` have the same content but the keys are in a different order,\n\t// this method will return false.\n\tconst aStringified = JSON.stringify(a);\n\tconst bStringified = JSON.stringify(b);\n\n\treturn aStringified === bStringified;\n}\n\n/**\n * Schema for a field of a tree node.\n * @remarks\n * Implicitly treats {@link ImplicitAllowedTypes} as a Required field of that type.\n * @public\n */\nexport type ImplicitFieldSchema = FieldSchema | ImplicitAllowedTypes;\n\n/**\n * Converts an `ImplicitFieldSchema` to a property type suitable for reading a field with this that schema.\n *\n * @typeparam TSchema - When non-exact schema are provided this errors on the side of returning too general of a type (a conservative union of all possibilities).\n * This is ideal for \"output APIs\" - i.e. it converts the schema type to the runtime type that a user will _read_ from the tree.\n * Examples of such \"non-exact\" schema include `ImplicitFieldSchema`, `ImplicitAllowedTypes`, and TypeScript unions of schema types.\n * @public\n */\nexport type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = FieldSchema> =\n\tTSchema extends FieldSchema<infer Kind, infer Types>\n\t\t? ApplyKind<TreeNodeFromImplicitAllowedTypes<Types>, Kind>\n\t\t: TSchema extends ImplicitAllowedTypes\n\t\t\t? TreeNodeFromImplicitAllowedTypes<TSchema>\n\t\t\t: TreeNode | TreeLeafValue | undefined;\n\n/**\n * Type of content that can be inserted into the tree for a field of the given schema.\n *\n * @see {@link Input}\n *\n * @typeparam TSchemaInput - Schema to process.\n * @typeparam TSchema - Do not specify: default value used as implementation detail.\n * @public\n */\nexport type InsertableTreeFieldFromImplicitField<\n\tTSchemaInput extends ImplicitFieldSchema,\n\tTSchema = UnionToIntersection<TSchemaInput>,\n> = [TSchema] extends [FieldSchema<infer Kind, infer Types>]\n\t? ApplyKindInput<InsertableTreeNodeFromImplicitAllowedTypes<Types>, Kind, true>\n\t: [TSchema] extends [ImplicitAllowedTypes]\n\t\t? InsertableTreeNodeFromImplicitAllowedTypes<TSchema>\n\t\t: never;\n\n/**\n * Content which could be inserted into a field within a tree.\n *\n * @see {@link Input}\n * @remarks\n * Extended version of {@link InsertableTreeFieldFromImplicitField} that also allows {@link (UnsafeUnknownSchema:type)}.\n * @alpha\n */\nexport type InsertableField<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> = [\n\tTSchema,\n] extends [ImplicitFieldSchema]\n\t? InsertableTreeFieldFromImplicitField<TSchema>\n\t: [TSchema] extends [UnsafeUnknownSchema]\n\t\t? InsertableContent | undefined\n\t\t: never;\n\n/**\n * Content which could be read from a field within a tree.\n *\n * @remarks\n * Extended version of {@link TreeFieldFromImplicitField} that also allows {@link (UnsafeUnknownSchema:type)}.\n * Since reading from fields with non-exact schema is still safe, this is only useful (compared to {@link TreeFieldFromImplicitField}) when the schema is also used as input and thus allows {@link (UnsafeUnknownSchema:type)}\n * for use\n * @system @alpha\n */\nexport type ReadableField<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> =\n\tTreeFieldFromImplicitField<ReadSchema<TSchema>>;\n\n/**\n * Adapter to remove {@link (UnsafeUnknownSchema:type)} from a schema type so it can be used with types for generating APIs for reading data.\n *\n * @remarks\n * Since reading with non-exact schema is still safe, this is mainly useful when the schema is also used as input and thus allows {@link (UnsafeUnknownSchema:type)}.\n * @system @alpha\n */\nexport type ReadSchema<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> = [\n\tTSchema,\n] extends [ImplicitFieldSchema]\n\t? TSchema\n\t: ImplicitFieldSchema;\n\n/**\n * Suitable for output.\n * For input must error on side of excluding undefined instead.\n * @system @public\n */\nexport type ApplyKind<T, Kind extends FieldKind> = {\n\t[FieldKind.Required]: T;\n\t[FieldKind.Optional]: T | undefined;\n\t[FieldKind.Identifier]: T;\n}[Kind];\n\n/**\n * Suitable for input.\n *\n * @see {@link Input}\n * @system @public\n */\nexport type ApplyKindInput<T, Kind extends FieldKind, DefaultsAreOptional extends boolean> = [\n\tKind,\n] extends [FieldKind.Required]\n\t? T\n\t: [Kind] extends [FieldKind.Optional]\n\t\t? T | undefined\n\t\t: [Kind] extends [FieldKind.Identifier]\n\t\t\t? DefaultsAreOptional extends true\n\t\t\t\t? T | undefined\n\t\t\t\t: T\n\t\t\t: never;\n"]}
@@ -2,10 +2,10 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { typeNameSymbol, typeSchemaSymbol, contentSchemaSymbol, type WithType, type TreeNodeSchema, type AnnotatedAllowedType, type AllowedTypesFullEvaluated, NodeKind, type TreeNodeSchemaClass, type TreeNodeSchemaNonClass, type TreeNodeSchemaCore, TreeNode, type Unhydrated, type InternalTreeNode, isTreeNode, tryDisposeTreeNode, HydratedContext, SimpleContextSlot, getInnerNode, getOrCreateNodeFromInnerNode, getOrCreateNodeFromInnerUnboxedNode, getKernel, type NodeFromSchema, isTreeNodeSchemaClass, type TreeNodeFromImplicitAllowedTypes, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, type AllowedTypes, type InsertableTreeNodeFromAllowedTypes, type InsertableTypedNode, type NodeBuilderData, type Input, normalizeAllowedTypes, type NodeSchemaMetadata, type ImplicitAllowedTypes, type AllowedTypesMetadata, evaluateLazySchema, type UnannotateAllowedTypesList, type AllowedTypeMetadata, type AnnotatedAllowedTypes, SchemaUpgrade, type LazyItem, type FlexList, type FlexListToUnion, type ExtractItemType, walkNodeSchema, walkAllowedTypes, type SchemaVisitor, type SimpleNodeSchemaBase, withBufferedTreeEvents, type AnnotateAllowedTypesList, type AllowedTypesFull, type AllowedTypesFullFromMixed, AnnotatedAllowedTypesInternal, type NumberKeys, StagedSchemaUpgradePolicy, type StagedSchemaUpgradePolicyFactory, ExpectStored, createSchemaUpgrade, } from "./core/index.js";
5
+ export { schemaIdentifierBrand, typeSchemaSymbol, contentSchemaSymbol, type WithType, type TreeNodeSchema, type AnnotatedAllowedType, type AllowedTypesFullEvaluated, NodeKind, type TreeNodeSchemaClass, type TreeNodeSchemaNonClass, type TreeNodeSchemaCore, TreeNode, type Unhydrated, type InternalTreeNode, isTreeNode, tryDisposeTreeNode, HydratedContext, SimpleContextSlot, getInnerNode, getOrCreateNodeFromInnerNode, getOrCreateNodeFromInnerUnboxedNode, getKernel, type NodeFromSchema, isTreeNodeSchemaClass, type TreeNodeFromImplicitAllowedTypes, type InsertableTreeNodeFromImplicitAllowedTypes, type TreeLeafValue, type AllowedTypes, type InsertableTreeNodeFromAllowedTypes, type InsertableTypedNode, type NodeBuilderData, type Input, normalizeAllowedTypes, type NodeSchemaMetadata, type ImplicitAllowedTypes, type AllowedTypesMetadata, evaluateLazySchema, type UnannotateAllowedTypesList, type AllowedTypeMetadata, type AnnotatedAllowedTypes, SchemaUpgrade, type LazyItem, type FlexList, type FlexListToUnion, type ExtractItemType, walkNodeSchema, walkAllowedTypes, type SchemaVisitor, type SimpleNodeSchemaBase, withBufferedTreeEvents, type AnnotateAllowedTypesList, type AllowedTypesFull, type AllowedTypesFullFromMixed, AnnotatedAllowedTypesInternal, type NumberKeys, StagedSchemaUpgradePolicy, type StagedSchemaUpgradePolicyFactory, ExpectStored, createSchemaUpgrade, } from "./core/index.js";
6
6
  export { walkFieldSchema } from "./walkFieldSchema.js";
7
7
  export type { UnsafeUnknownSchema, Insertable } from "./unsafeUnknownSchema.js";
8
- export { type CommitRevision, type ITree, type TreeView, type ViewableTree, type TreeViewEvents, TreeViewConfiguration, TreeViewConfigurationAlpha, type ITreeViewConfiguration, type ITreeViewConfigurationAlpha, type SchemaCompatibilityStatus, type SchemaCompatibilityStatusBeta, type SchemaDiscrepancy, type ITreeConfigurationOptions, SchemaFactory, scoped, SchemaFactoryBeta, type SchemaStaticsBeta, SchemaFactoryAlpha, type SchemaStaticsAlpha, type NodeProvider, type ObjectSchemaOptionsAlpha, type ObjectSchemaOptions, type ScopedSchemaName, type ValidateRecursiveSchema, type FixRecursiveArraySchema, adaptEnum, enumFromStrings, singletonSchema, treeNodeApi, type TreeNodeApi, type ArrayNodeDeltaOp, type ArrayNodeInsertOp, type ArrayNodeRemoveOp, type ArrayNodeRetainOp, type ArrayNodeTreeChangedDeltaOp, type ArrayNodeTreeChangedRetainOp, type NodeChangedData, type NodeChangedDataAlpha, type NodeChangedDataDelta, type NodeChangedDataProperties, type NodeChangedDataTreeDelta, borrowCursorFromTreeNodeOrValue, exportConcise, importConcise, TreeBeta, type TreeChangeEventsBeta, type TreeChangeEventsAlpha, type IdentifierIndex, createTreeIndex, createIdentifierIndex, type TreeIndexKey, type DirtyTreeStatus, trackDirtyNodes, type DirtyTreeMap, 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, type JsonRecordNodeSchema, type JsonStringKeyPatternProperties, type TreeSchemaEncodingOptions, getJsonSchema, getSimpleSchema, type StagedUpgradeStatus, type VerboseTreeNode, type TreeEncodingOptions, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, checkSchemaCompatibility, getSchemaIncompatibilityDetails, type Unenforced, type System_Unsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type UnannotateAllowedTypeUnsafe, type AnnotatedAllowedTypeUnsafe, type AnnotatedAllowedTypesUnsafe, type AllowedTypesFullUnsafe, type AllowedTypesFullFromMixedUnsafe, type UnannotateAllowedTypesListUnsafe, type AnnotateAllowedTypesListUnsafe, type FieldHasDefaultAlphaUnsafe, type InsertableObjectFromSchemaRecordAlphaUnsafe, type TreeViewAlpha, type TreeViewBeta, type UntypedTreeView, type TreeBranch, type TreeBranchAlpha, type UntypedTreeViewAlpha, type TreeBranchEvents, type TreeBranchCommitMetadata, type TreeBranchHistory, getPropertyKeyFromStoredKey, getStoredKey, tryGetSchema, applySchemaToParserOptions, cursorFromVerbose, verboseFromCursor, conciseFromCursor, createFromCursor, asTreeViewAlpha, customFromCursorStored, type CustomTreeNode, type CustomTreeValue, tryStoredSchemaAsArray, type SchemaStatics, type ITreeAlpha, type NoChangeConstraint, type NodeInDocumentConstraint, type RunTransactionParamsAlpha, type RunTransactionParamsBeta, type TransactionCallbackStatusAlpha, type TransactionCallbackStatusBeta, type TransactionConstraint, type TransactionConstraintAlpha, type TransactionPostProcessor, type TransactionResultFailed, type TransactionResultSuccess, type TransactionValueResult, type TransactionVoidResult, type VoidTransactionCallbackStatusAlpha, type VoidTransactionCallbackStatusBeta, rollback, generateSchemaFromSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type FieldSchemaAlphaUnsafe, getIdentifierFromNode, type ValidateRecursiveSchemaTemplate, type FixRecursiveRecursionLimit, schemaStatics, type TreeChangeEvents, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, KeyEncodingOptions, type TreeParsingOptions, incrementalSummaryHint, incrementalEncodingPolicyForAllowedTypes, type SchemaFactory_base, encodeSchemaCompatibilitySnapshot, decodeSchemaCompatibilitySnapshot, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, eraseSchemaDetails, eraseSchemaDetailsSubclassable, type ErasedSchema, type ErasedNode, type ErasedSchemaSubclassable, snapshotSchemaCompatibility, type SnapshotFileSystem, type SnapshotSchemaCompatibilityOptions, createCustomizedFluidFrameworkScopedFactory, type TreeContextAlpha, type WithValue, } from "./api/index.js";
8
+ export { type CommitRevision, type ITree, type TreeView, type ViewableTree, type TreeViewEvents, TreeViewConfiguration, TreeViewConfigurationAlpha, type ITreeViewConfiguration, type ITreeViewConfigurationAlpha, type SchemaCompatibilityStatus, type SchemaCompatibilityStatusBeta, type SchemaDiscrepancy, type ITreeConfigurationOptions, SchemaFactory, scoped, SchemaFactoryBeta, type SchemaStaticsBeta, SchemaFactoryAlpha, type SchemaStaticsAlpha, type NodeProvider, type ObjectSchemaOptionsAlpha, type ObjectSchemaOptions, type ScopedSchemaName, type ValidateRecursiveSchema, type FixRecursiveArraySchema, adaptEnum, enumFromStrings, singletonSchema, treeNodeApi, type TreeNodeApi, type ArrayNodeDeltaOp, type ArrayNodeInsertOp, type ArrayNodeRemoveOp, type ArrayNodeRetainOp, type ArrayNodeTreeChangedDeltaOp, type ArrayNodeTreeChangedRetainOp, type NodeChangedData, type NodeChangedDataDelta, type NodeChangedDataProperties, type NodeChangedDataTreeDelta, cloneTree, type TreeChangeEventsBeta, type IdentifierIndex, createTreeIndex, createIdentifierIndex, type TreeIndexKey, type DirtyTreeStatus, trackDirtyNodes, type DirtyTreeMap, 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, type JsonRecordNodeSchema, type JsonStringKeyPatternProperties, type TreeSchemaEncodingOptions, getJsonSchema, getSimpleSchema, type StagedUpgradeStatus, type VerboseTreeNode, type TreeEncodingOptions, type VerboseTree, extractPersistedSchema, comparePersistedSchema, type ConciseTree, checkSchemaCompatibility, getSchemaIncompatibilityDetails, type Unenforced, type System_Unsafe, type ArrayNodeCustomizableSchemaUnsafe, type MapNodeCustomizableSchemaUnsafe, type TreeRecordNodeUnsafe, type UnannotateAllowedTypeUnsafe, type AnnotatedAllowedTypeUnsafe, type AnnotatedAllowedTypesUnsafe, type AllowedTypesFullUnsafe, type AllowedTypesFullFromMixedUnsafe, type UnannotateAllowedTypesListUnsafe, type AnnotateAllowedTypesListUnsafe, type FieldHasDefaultAlphaUnsafe, type InsertableObjectFromSchemaRecordAlphaUnsafe, type TreeViewAlpha, type TreeViewBeta, type UntypedTreeView, type TreeBranch, type TreeBranchAlpha, type UntypedTreeViewAlpha, type TreeBranchEvents, type TreeBranchCommitMetadata, type TreeBranchHistory, type TreeContextBeta, getPropertyKeyFromStoredKey, getStoredKey, tryGetSchema, applySchemaToParserOptions, cursorFromVerbose, verboseFromCursor, conciseFromCursor, createFromCursor, asTreeViewAlpha, customFromCursorStored, type CustomTreeNode, type CustomTreeValue, tryStoredSchemaAsArray, type SchemaStatics, type ITreeAlpha, type NoChangeConstraint, type NodeInDocumentConstraint, type RunTransactionParamsAlpha, type RunTransactionParamsBeta, type TransactionCallbackStatusAlpha, type TransactionCallbackStatusBeta, type TransactionConstraint, type TransactionConstraintAlpha, type TransactionPostProcessor, type TransactionResultFailed, type TransactionResultSuccess, type TransactionValueResult, type TransactionVoidResult, type VoidTransactionCallbackStatusAlpha, type VoidTransactionCallbackStatusBeta, rollback, generateSchemaFromSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, type HandleConverter, allowUnused, type FieldSchemaAlphaUnsafe, getIdentifierFromNode, type ValidateRecursiveSchemaTemplate, type FixRecursiveRecursionLimit, schemaStatics, type TreeChangeEvents, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, KeyEncodingOptions, type TreeParsingOptions, incrementalSummaryHint, incrementalEncodingPolicyForAllowedTypes, type SchemaFactory_base, encodeSchemaCompatibilitySnapshot, decodeSchemaCompatibilitySnapshot, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, eraseSchemaDetails, eraseSchemaDetailsSubclassable, type ErasedSchema, type ErasedNode, type ErasedSchemaSubclassable, snapshotSchemaCompatibility, type SnapshotFileSystem, type SnapshotSchemaCompatibilityOptions, createCustomizedFluidFrameworkScopedFactory, type TreeContextAlpha, type WithValue, } from "./api/index.js";
9
9
  export type { SimpleTreeSchema, SimpleNodeSchema, SimpleFieldSchema, SimpleLeafNodeSchema, SimpleMapNodeSchema, SimpleArrayNodeSchema, SimpleObjectNodeSchema, SimpleNodeSchemaBaseAlpha, SimpleObjectFieldSchema, SimpleRecordNodeSchema, SimpleAllowedTypeAttributes, SchemaType, } from "./simpleSchema.js";
10
10
  export { type ImplicitFieldSchema, type TreeFieldFromImplicitField, FieldKind, FieldSchema, FieldSchemaAlpha, type InsertableTreeFieldFromImplicitField, type DefaultProvider, type FieldProps, type FieldPropsAlpha, normalizeFieldSchema, areFieldSchemaEqual, areImplicitFieldSchemaEqual, type ApplyKind, type FieldSchemaMetadata, type InsertableField, type ApplyKindInput, type ReadableField, type ReadSchema, } from "./fieldSchema.js";
11
11
  export { tryGetTreeNodeForField } from "./getTreeNodeForField.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simple-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,QAAQ,EACR,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,QAAQ,EACR,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,4BAA4B,EAC5B,mCAAmC,EACnC,SAAS,EACT,KAAK,cAAc,EACnB,qBAAqB,EACrB,KAAK,gCAAgC,EACrC,KAAK,0CAA0C,EAC/C,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,kCAAkC,EACvC,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,KAAK,EACV,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,kBAAkB,EAClB,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,aAAa,EACb,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,cAAc,EACd,gBAAgB,EAChB,KAAK,aAAa,EAClB,K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AC7B,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,GACV,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,KAAK,UAAU,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export { typeNameSymbol, typeSchemaSymbol, contentSchemaSymbol, NodeKind, TreeNode, isTreeNode, tryDisposeTreeNode, HydratedContext, SimpleContextSlot, getInnerNode, getOrCreateNodeFromInnerNode, getOrCreateNodeFromInnerUnboxedNode, getKernel, isTreeNodeSchemaClass, normalizeAllowedTypes, evaluateLazySchema, SchemaUpgrade, walkNodeSchema, walkAllowedTypes, withBufferedTreeEvents, AnnotatedAllowedTypesInternal, StagedSchemaUpgradePolicy, ExpectStored, createSchemaUpgrade, } from "./core/index.js";
5
+ export { schemaIdentifierBrand, typeSchemaSymbol, contentSchemaSymbol, NodeKind, TreeNode, isTreeNode, tryDisposeTreeNode, HydratedContext, SimpleContextSlot, getInnerNode, getOrCreateNodeFromInnerNode, getOrCreateNodeFromInnerUnboxedNode, getKernel, isTreeNodeSchemaClass, normalizeAllowedTypes, evaluateLazySchema, SchemaUpgrade, walkNodeSchema, walkAllowedTypes, withBufferedTreeEvents, AnnotatedAllowedTypesInternal, StagedSchemaUpgradePolicy, ExpectStored, createSchemaUpgrade, } from "./core/index.js";
6
6
  export { walkFieldSchema } from "./walkFieldSchema.js";
7
- export { TreeViewConfiguration, TreeViewConfigurationAlpha, SchemaFactory, scoped, SchemaFactoryBeta, SchemaFactoryAlpha, adaptEnum, enumFromStrings, singletonSchema, treeNodeApi, borrowCursorFromTreeNodeOrValue, exportConcise, importConcise, TreeBeta, createTreeIndex, createIdentifierIndex, trackDirtyNodes, getJsonSchema, getSimpleSchema, extractPersistedSchema, comparePersistedSchema, checkSchemaCompatibility, getSchemaIncompatibilityDetails, getPropertyKeyFromStoredKey, getStoredKey, tryGetSchema, applySchemaToParserOptions, cursorFromVerbose, verboseFromCursor, conciseFromCursor, createFromCursor, asTreeViewAlpha, customFromCursorStored, tryStoredSchemaAsArray, rollback, generateSchemaFromSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, allowUnused, getIdentifierFromNode, schemaStatics, KeyEncodingOptions, incrementalSummaryHint, incrementalEncodingPolicyForAllowedTypes, encodeSchemaCompatibilitySnapshot, decodeSchemaCompatibilitySnapshot, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, eraseSchemaDetails, eraseSchemaDetailsSubclassable, snapshotSchemaCompatibility, createCustomizedFluidFrameworkScopedFactory, } from "./api/index.js";
7
+ export { TreeViewConfiguration, TreeViewConfigurationAlpha, SchemaFactory, scoped, SchemaFactoryBeta, SchemaFactoryAlpha, adaptEnum, enumFromStrings, singletonSchema, treeNodeApi, cloneTree, createTreeIndex, createIdentifierIndex, trackDirtyNodes, getJsonSchema, getSimpleSchema, extractPersistedSchema, comparePersistedSchema, checkSchemaCompatibility, getSchemaIncompatibilityDetails, getPropertyKeyFromStoredKey, getStoredKey, tryGetSchema, applySchemaToParserOptions, cursorFromVerbose, verboseFromCursor, conciseFromCursor, createFromCursor, asTreeViewAlpha, customFromCursorStored, tryStoredSchemaAsArray, rollback, generateSchemaFromSimpleSchema, replaceConciseTreeHandles, replaceHandles, replaceVerboseTreeHandles, allowUnused, getIdentifierFromNode, schemaStatics, KeyEncodingOptions, incrementalSummaryHint, incrementalEncodingPolicyForAllowedTypes, encodeSchemaCompatibilitySnapshot, decodeSchemaCompatibilitySnapshot, exportCompatibilitySchemaSnapshot, importCompatibilitySchemaSnapshot, checkCompatibility, eraseSchemaDetails, eraseSchemaDetailsSubclassable, snapshotSchemaCompatibility, createCustomizedFluidFrameworkScopedFactory, } from "./api/index.js";
8
8
  export { FieldKind, FieldSchema, FieldSchemaAlpha, normalizeFieldSchema, areFieldSchemaEqual, areImplicitFieldSchemaEqual, } from "./fieldSchema.js";
9
9
  export { tryGetTreeNodeForField } from "./getTreeNodeForField.js";
10
10
  export { ArrayNodeSchema, asIndex, isArrayNodeSchema, IterableTreeArrayContent, TreeArrayNode, MapNodeSchema, isMapNodeSchema, ObjectNodeSchema, objectSchema, isObjectNodeSchema, setField, isRecordNodeSchema, RecordNodeSchema, createArrayInsertionAnchor, } from "./node-kinds/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/simple-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EAKnB,QAAQ,EAIR,QAAQ,EAGR,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,4BAA4B,EAC5B,mCAAmC,EACnC,SAAS,EAET,qBAAqB,EASrB,qBAAqB,EAIrB,kBAAkB,EAIlB,aAAa,EAKb,cAAc,EACd,gBAAgB,EAGhB,sBAAsB,EAItB,6BAA6B,EAE7B,yBAAyB,EAEzB,YAAY,EACZ,mBAAmB,GACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,OAAO,EAMN,qBAAqB,EACrB,0BAA0B,EAO1B,aAAa,EACb,MAAM,EACN,iBAAiB,EAEjB,kBAAkB,EAQlB,SAAS,EACT,eAAe,EACf,eAAe,EACf,WAAW,EAaX,+BAA+B,EAC/B,aAAa,EACb,aAAa,EACb,QAAQ,EAIR,eAAe,EACf,qBAAqB,EAGrB,eAAe,EAkBf,aAAa,EACb,eAAe,EAKf,sBAAsB,EACtB,sBAAsB,EAEtB,wBAAwB,EACxB,+BAA+B,EAwB/B,2BAA2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,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\ttypeNameSymbol,\n\ttypeSchemaSymbol,\n\tcontentSchemaSymbol,\n\ttype WithType,\n\ttype TreeNodeSchema,\n\ttype AnnotatedAllowedType,\n\ttype AllowedTypesFullEvaluated,\n\tNodeKind,\n\ttype TreeNodeSchemaClass,\n\ttype TreeNodeSchemaNonClass,\n\ttype TreeNodeSchemaCore,\n\tTreeNode,\n\ttype Unhydrated,\n\ttype InternalTreeNode,\n\tisTreeNode,\n\ttryDisposeTreeNode,\n\tHydratedContext,\n\tSimpleContextSlot,\n\tgetInnerNode,\n\tgetOrCreateNodeFromInnerNode,\n\tgetOrCreateNodeFromInnerUnboxedNode,\n\tgetKernel,\n\ttype NodeFromSchema,\n\tisTreeNodeSchemaClass,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\ttype AllowedTypes,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype InsertableTypedNode,\n\ttype NodeBuilderData,\n\ttype Input,\n\tnormalizeAllowedTypes,\n\ttype NodeSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype AllowedTypesMetadata,\n\tevaluateLazySchema,\n\ttype UnannotateAllowedTypesList,\n\ttype AllowedTypeMetadata,\n\ttype AnnotatedAllowedTypes,\n\tSchemaUpgrade,\n\ttype LazyItem,\n\ttype FlexList,\n\ttype FlexListToUnion,\n\ttype ExtractItemType,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\ttype SimpleNodeSchemaBase,\n\twithBufferedTreeEvents,\n\ttype AnnotateAllowedTypesList,\n\ttype AllowedTypesFull,\n\ttype AllowedTypesFullFromMixed,\n\tAnnotatedAllowedTypesInternal,\n\ttype NumberKeys,\n\tStagedSchemaUpgradePolicy,\n\ttype StagedSchemaUpgradePolicyFactory,\n\tExpectStored,\n\tcreateSchemaUpgrade,\n} from \"./core/index.js\";\nexport { walkFieldSchema } from \"./walkFieldSchema.js\";\nexport type { UnsafeUnknownSchema, Insertable } from \"./unsafeUnknownSchema.js\";\nexport {\n\ttype CommitRevision,\n\ttype ITree,\n\ttype TreeView,\n\ttype ViewableTree,\n\ttype TreeViewEvents,\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n\ttype ITreeViewConfiguration,\n\ttype ITreeViewConfigurationAlpha,\n\ttype SchemaCompatibilityStatus,\n\ttype SchemaCompatibilityStatusBeta,\n\ttype SchemaDiscrepancy,\n\ttype ITreeConfigurationOptions,\n\tSchemaFactory,\n\tscoped,\n\tSchemaFactoryBeta,\n\ttype SchemaStaticsBeta,\n\tSchemaFactoryAlpha,\n\ttype SchemaStaticsAlpha,\n\ttype NodeProvider,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype ScopedSchemaName,\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttype ArrayNodeDeltaOp,\n\ttype ArrayNodeInsertOp,\n\ttype ArrayNodeRemoveOp,\n\ttype ArrayNodeRetainOp,\n\ttype ArrayNodeTreeChangedDeltaOp,\n\ttype ArrayNodeTreeChangedRetainOp,\n\ttype NodeChangedData,\n\ttype NodeChangedDataAlpha,\n\ttype NodeChangedDataDelta,\n\ttype NodeChangedDataProperties,\n\ttype NodeChangedDataTreeDelta,\n\tborrowCursorFromTreeNodeOrValue,\n\texportConcise,\n\timportConcise,\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n\ttype TreeChangeEventsAlpha,\n\ttype IdentifierIndex,\n\tcreateTreeIndex,\n\tcreateIdentifierIndex,\n\ttype TreeIndexKey,\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\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\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\ttype TreeSchemaEncodingOptions,\n\tgetJsonSchema,\n\tgetSimpleSchema,\n\ttype StagedUpgradeStatus,\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\tcheckSchemaCompatibility,\n\tgetSchemaIncompatibilityDetails,\n\ttype Unenforced,\n\ttype System_Unsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype UnannotateAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypesUnsafe,\n\ttype AllowedTypesFullUnsafe,\n\ttype AllowedTypesFullFromMixedUnsafe,\n\ttype UnannotateAllowedTypesListUnsafe,\n\ttype AnnotateAllowedTypesListUnsafe,\n\ttype FieldHasDefaultAlphaUnsafe,\n\ttype InsertableObjectFromSchemaRecordAlphaUnsafe,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype UntypedTreeView,\n\ttype TreeBranch,\n\ttype TreeBranchAlpha,\n\ttype UntypedTreeViewAlpha,\n\ttype TreeBranchEvents,\n\ttype TreeBranchCommitMetadata,\n\ttype TreeBranchHistory,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttryGetSchema,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\tconciseFromCursor,\n\tcreateFromCursor,\n\tasTreeViewAlpha,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype NoChangeConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParamsAlpha,\n\ttype RunTransactionParamsBeta,\n\ttype TransactionCallbackStatusAlpha,\n\ttype TransactionCallbackStatusBeta,\n\ttype TransactionConstraint,\n\ttype TransactionConstraintAlpha,\n\ttype TransactionPostProcessor,\n\ttype TransactionResultFailed,\n\ttype TransactionResultSuccess,\n\ttype TransactionValueResult,\n\ttype TransactionVoidResult,\n\ttype VoidTransactionCallbackStatusAlpha,\n\ttype VoidTransactionCallbackStatusBeta,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype FieldSchemaAlphaUnsafe,\n\tgetIdentifierFromNode,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tschemaStatics,\n\ttype TreeChangeEvents,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n\tincrementalSummaryHint,\n\tincrementalEncodingPolicyForAllowedTypes,\n\ttype SchemaFactory_base,\n\tencodeSchemaCompatibilitySnapshot,\n\tdecodeSchemaCompatibilitySnapshot,\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n\teraseSchemaDetails,\n\teraseSchemaDetailsSubclassable,\n\ttype ErasedSchema,\n\ttype ErasedNode,\n\ttype ErasedSchemaSubclassable,\n\tsnapshotSchemaCompatibility,\n\ttype SnapshotFileSystem,\n\ttype SnapshotSchemaCompatibilityOptions,\n\tcreateCustomizedFluidFrameworkScopedFactory,\n\ttype TreeContextAlpha,\n\ttype WithValue,\n} from \"./api/index.js\";\nexport type {\n\tSimpleTreeSchema,\n\tSimpleNodeSchema,\n\tSimpleFieldSchema,\n\tSimpleLeafNodeSchema,\n\tSimpleMapNodeSchema,\n\tSimpleArrayNodeSchema,\n\tSimpleObjectNodeSchema,\n\tSimpleNodeSchemaBaseAlpha,\n\tSimpleObjectFieldSchema,\n\tSimpleRecordNodeSchema,\n\tSimpleAllowedTypeAttributes,\n\tSchemaType,\n} from \"./simpleSchema.js\";\nexport {\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\tFieldKind,\n\tFieldSchema,\n\tFieldSchemaAlpha,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype DefaultProvider,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\tareFieldSchemaEqual,\n\tareImplicitFieldSchemaEqual,\n\ttype ApplyKind,\n\ttype FieldSchemaMetadata,\n\ttype InsertableField,\n\ttype ApplyKindInput,\n\ttype ReadableField,\n\ttype ReadSchema,\n} from \"./fieldSchema.js\";\nexport { tryGetTreeNodeForField } from \"./getTreeNodeForField.js\";\nexport {\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodeCustomizableSchemaAlpha,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\tasIndex,\n\tisArrayNodeSchema,\n\tIterableTreeArrayContent,\n\ttype ReadonlyArrayNode,\n\tTreeArrayNode,\n\ttype TreeArrayNodeAlpha,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\tisMapNodeSchema,\n\ttype TreeMapNode,\n\ttype TreeMapNodeAlpha,\n\ttype MapNodeInsertableData,\n\ttype FieldHasDefault,\n\ttype FieldHasDefaultAlpha,\n\ttype InsertableObjectFromSchemaRecord,\n\ttype InsertableObjectFromSchemaRecordAlpha,\n\ttype ObjectFromSchemaRecord,\n\tObjectNodeSchema,\n\ttype ObjectNodeSchemaWorkaround,\n\ttype ObjectNodeSchemaPrivate,\n\tobjectSchema,\n\tisObjectNodeSchema,\n\ttype TreeObjectNode,\n\tsetField,\n\tisRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\tRecordNodeSchema,\n\ttype TreeRecordNode,\n\ttype ArrayPlaceAnchor,\n\tcreateArrayInsertionAnchor,\n} from \"./node-kinds/index.js\";\nexport {\n\tunhydratedFlexTreeFromInsertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n} from \"./unhydratedFlexTreeFromInsertable.js\";\nexport {\n\tprepareForInsertion,\n\tprepareForInsertionContextless,\n} from \"./prepareForInsertion.js\";\nexport {\n\ttoStoredSchema,\n\tconvertFieldKind,\n\ttoUpgradeSchema,\n\ttoInitialSchema,\n\ttoUnhydratedSchema,\n} from \"./toStoredSchema.js\";\nexport {\n\tnumberSchema,\n\tstringSchema,\n\tbooleanSchema,\n\thandleSchema,\n\tnullSchema,\n} from \"./leafNodeSchema.js\";\nexport type { LeafSchema, StringSchema } from \"./leafNodeSchema.js\";\nexport { getUnhydratedContext } from \"./createContext.js\";\nexport { type TreeSchema, createTreeSchema } from \"./treeSchema.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/simple-tree/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EAKnB,QAAQ,EAIR,QAAQ,EAGR,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,4BAA4B,EAC5B,mCAAmC,EACnC,SAAS,EAET,qBAAqB,EASrB,qBAAqB,EAIrB,kBAAkB,EAIlB,aAAa,EAKb,cAAc,EACd,gBAAgB,EAGhB,sBAAsB,EAItB,6BAA6B,EAE7B,yBAAyB,EAEzB,YAA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AAC;AAC/B,OAAO,EACN,gCAAgC,GAIhC,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACN,mBAAmB,EACnB,8BAA8B,GAC9B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACN,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,kBAAkB,GAClB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,UAAU,GACV,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tschemaIdentifierBrand,\n\ttypeSchemaSymbol,\n\tcontentSchemaSymbol,\n\ttype WithType,\n\ttype TreeNodeSchema,\n\ttype AnnotatedAllowedType,\n\ttype AllowedTypesFullEvaluated,\n\tNodeKind,\n\ttype TreeNodeSchemaClass,\n\ttype TreeNodeSchemaNonClass,\n\ttype TreeNodeSchemaCore,\n\tTreeNode,\n\ttype Unhydrated,\n\ttype InternalTreeNode,\n\tisTreeNode,\n\ttryDisposeTreeNode,\n\tHydratedContext,\n\tSimpleContextSlot,\n\tgetInnerNode,\n\tgetOrCreateNodeFromInnerNode,\n\tgetOrCreateNodeFromInnerUnboxedNode,\n\tgetKernel,\n\ttype NodeFromSchema,\n\tisTreeNodeSchemaClass,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\ttype InsertableTreeNodeFromImplicitAllowedTypes,\n\ttype TreeLeafValue,\n\ttype AllowedTypes,\n\ttype InsertableTreeNodeFromAllowedTypes,\n\ttype InsertableTypedNode,\n\ttype NodeBuilderData,\n\ttype Input,\n\tnormalizeAllowedTypes,\n\ttype NodeSchemaMetadata,\n\ttype ImplicitAllowedTypes,\n\ttype AllowedTypesMetadata,\n\tevaluateLazySchema,\n\ttype UnannotateAllowedTypesList,\n\ttype AllowedTypeMetadata,\n\ttype AnnotatedAllowedTypes,\n\tSchemaUpgrade,\n\ttype LazyItem,\n\ttype FlexList,\n\ttype FlexListToUnion,\n\ttype ExtractItemType,\n\twalkNodeSchema,\n\twalkAllowedTypes,\n\ttype SchemaVisitor,\n\ttype SimpleNodeSchemaBase,\n\twithBufferedTreeEvents,\n\ttype AnnotateAllowedTypesList,\n\ttype AllowedTypesFull,\n\ttype AllowedTypesFullFromMixed,\n\tAnnotatedAllowedTypesInternal,\n\ttype NumberKeys,\n\tStagedSchemaUpgradePolicy,\n\ttype StagedSchemaUpgradePolicyFactory,\n\tExpectStored,\n\tcreateSchemaUpgrade,\n} from \"./core/index.js\";\nexport { walkFieldSchema } from \"./walkFieldSchema.js\";\nexport type { UnsafeUnknownSchema, Insertable } from \"./unsafeUnknownSchema.js\";\nexport {\n\ttype CommitRevision,\n\ttype ITree,\n\ttype TreeView,\n\ttype ViewableTree,\n\ttype TreeViewEvents,\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n\ttype ITreeViewConfiguration,\n\ttype ITreeViewConfigurationAlpha,\n\ttype SchemaCompatibilityStatus,\n\ttype SchemaCompatibilityStatusBeta,\n\ttype SchemaDiscrepancy,\n\ttype ITreeConfigurationOptions,\n\tSchemaFactory,\n\tscoped,\n\tSchemaFactoryBeta,\n\ttype SchemaStaticsBeta,\n\tSchemaFactoryAlpha,\n\ttype SchemaStaticsAlpha,\n\ttype NodeProvider,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype ScopedSchemaName,\n\ttype ValidateRecursiveSchema,\n\ttype FixRecursiveArraySchema,\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttype ArrayNodeDeltaOp,\n\ttype ArrayNodeInsertOp,\n\ttype ArrayNodeRemoveOp,\n\ttype ArrayNodeRetainOp,\n\ttype ArrayNodeTreeChangedDeltaOp,\n\ttype ArrayNodeTreeChangedRetainOp,\n\ttype NodeChangedData,\n\ttype NodeChangedDataDelta,\n\ttype NodeChangedDataProperties,\n\ttype NodeChangedDataTreeDelta,\n\tcloneTree,\n\ttype TreeChangeEventsBeta,\n\ttype IdentifierIndex,\n\tcreateTreeIndex,\n\tcreateIdentifierIndex,\n\ttype TreeIndexKey,\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\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\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n\ttype TreeSchemaEncodingOptions,\n\tgetJsonSchema,\n\tgetSimpleSchema,\n\ttype StagedUpgradeStatus,\n\ttype VerboseTreeNode,\n\ttype TreeEncodingOptions,\n\ttype VerboseTree,\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n\ttype ConciseTree,\n\tcheckSchemaCompatibility,\n\tgetSchemaIncompatibilityDetails,\n\ttype Unenforced,\n\ttype System_Unsafe,\n\ttype ArrayNodeCustomizableSchemaUnsafe,\n\ttype MapNodeCustomizableSchemaUnsafe,\n\ttype TreeRecordNodeUnsafe,\n\ttype UnannotateAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypeUnsafe,\n\ttype AnnotatedAllowedTypesUnsafe,\n\ttype AllowedTypesFullUnsafe,\n\ttype AllowedTypesFullFromMixedUnsafe,\n\ttype UnannotateAllowedTypesListUnsafe,\n\ttype AnnotateAllowedTypesListUnsafe,\n\ttype FieldHasDefaultAlphaUnsafe,\n\ttype InsertableObjectFromSchemaRecordAlphaUnsafe,\n\ttype TreeViewAlpha,\n\ttype TreeViewBeta,\n\ttype UntypedTreeView,\n\ttype TreeBranch,\n\ttype TreeBranchAlpha,\n\ttype UntypedTreeViewAlpha,\n\ttype TreeBranchEvents,\n\ttype TreeBranchCommitMetadata,\n\ttype TreeBranchHistory,\n\ttype TreeContextBeta,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttryGetSchema,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\tconciseFromCursor,\n\tcreateFromCursor,\n\tasTreeViewAlpha,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\ttype SchemaStatics,\n\ttype ITreeAlpha,\n\ttype NoChangeConstraint,\n\ttype NodeInDocumentConstraint,\n\ttype RunTransactionParamsAlpha,\n\ttype RunTransactionParamsBeta,\n\ttype TransactionCallbackStatusAlpha,\n\ttype TransactionCallbackStatusBeta,\n\ttype TransactionConstraint,\n\ttype TransactionConstraintAlpha,\n\ttype TransactionPostProcessor,\n\ttype TransactionResultFailed,\n\ttype TransactionResultSuccess,\n\ttype TransactionValueResult,\n\ttype TransactionVoidResult,\n\ttype VoidTransactionCallbackStatusAlpha,\n\ttype VoidTransactionCallbackStatusBeta,\n\trollback,\n\tgenerateSchemaFromSimpleSchema,\n\treplaceConciseTreeHandles,\n\treplaceHandles,\n\treplaceVerboseTreeHandles,\n\ttype HandleConverter,\n\tallowUnused,\n\ttype FieldSchemaAlphaUnsafe,\n\tgetIdentifierFromNode,\n\ttype ValidateRecursiveSchemaTemplate,\n\ttype FixRecursiveRecursionLimit,\n\tschemaStatics,\n\ttype TreeChangeEvents,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n\tincrementalSummaryHint,\n\tincrementalEncodingPolicyForAllowedTypes,\n\ttype SchemaFactory_base,\n\tencodeSchemaCompatibilitySnapshot,\n\tdecodeSchemaCompatibilitySnapshot,\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n\teraseSchemaDetails,\n\teraseSchemaDetailsSubclassable,\n\ttype ErasedSchema,\n\ttype ErasedNode,\n\ttype ErasedSchemaSubclassable,\n\tsnapshotSchemaCompatibility,\n\ttype SnapshotFileSystem,\n\ttype SnapshotSchemaCompatibilityOptions,\n\tcreateCustomizedFluidFrameworkScopedFactory,\n\ttype TreeContextAlpha,\n\ttype WithValue,\n} from \"./api/index.js\";\nexport type {\n\tSimpleTreeSchema,\n\tSimpleNodeSchema,\n\tSimpleFieldSchema,\n\tSimpleLeafNodeSchema,\n\tSimpleMapNodeSchema,\n\tSimpleArrayNodeSchema,\n\tSimpleObjectNodeSchema,\n\tSimpleNodeSchemaBaseAlpha,\n\tSimpleObjectFieldSchema,\n\tSimpleRecordNodeSchema,\n\tSimpleAllowedTypeAttributes,\n\tSchemaType,\n} from \"./simpleSchema.js\";\nexport {\n\ttype ImplicitFieldSchema,\n\ttype TreeFieldFromImplicitField,\n\tFieldKind,\n\tFieldSchema,\n\tFieldSchemaAlpha,\n\ttype InsertableTreeFieldFromImplicitField,\n\ttype DefaultProvider,\n\ttype FieldProps,\n\ttype FieldPropsAlpha,\n\tnormalizeFieldSchema,\n\tareFieldSchemaEqual,\n\tareImplicitFieldSchemaEqual,\n\ttype ApplyKind,\n\ttype FieldSchemaMetadata,\n\ttype InsertableField,\n\ttype ApplyKindInput,\n\ttype ReadableField,\n\ttype ReadSchema,\n} from \"./fieldSchema.js\";\nexport { tryGetTreeNodeForField } from \"./getTreeNodeForField.js\";\nexport {\n\ttype ArrayNodeCustomizableSchema,\n\ttype ArrayNodeCustomizableSchemaAlpha,\n\ttype ArrayNodePojoEmulationSchema,\n\tArrayNodeSchema,\n\tasIndex,\n\tisArrayNodeSchema,\n\tIterableTreeArrayContent,\n\ttype ReadonlyArrayNode,\n\tTreeArrayNode,\n\ttype TreeArrayNodeAlpha,\n\ttype MapNodeCustomizableSchema,\n\ttype MapNodePojoEmulationSchema,\n\tMapNodeSchema,\n\tisMapNodeSchema,\n\ttype TreeMapNode,\n\ttype TreeMapNodeAlpha,\n\ttype MapNodeInsertableData,\n\ttype FieldHasDefault,\n\ttype FieldHasDefaultAlpha,\n\ttype InsertableObjectFromSchemaRecord,\n\ttype InsertableObjectFromSchemaRecordAlpha,\n\ttype ObjectFromSchemaRecord,\n\tObjectNodeSchema,\n\ttype ObjectNodeSchemaWorkaround,\n\ttype ObjectNodeSchemaPrivate,\n\tobjectSchema,\n\tisObjectNodeSchema,\n\ttype TreeObjectNode,\n\tsetField,\n\tisRecordNodeSchema,\n\ttype RecordNodeCustomizableSchema,\n\ttype RecordNodeInsertableData,\n\ttype RecordNodePojoEmulationSchema,\n\tRecordNodeSchema,\n\ttype TreeRecordNode,\n\ttype ArrayPlaceAnchor,\n\tcreateArrayInsertionAnchor,\n} from \"./node-kinds/index.js\";\nexport {\n\tunhydratedFlexTreeFromInsertable,\n\ttype InsertableContent,\n\ttype FactoryContent,\n\ttype FactoryContentObject,\n} from \"./unhydratedFlexTreeFromInsertable.js\";\nexport {\n\tprepareForInsertion,\n\tprepareForInsertionContextless,\n} from \"./prepareForInsertion.js\";\nexport {\n\ttoStoredSchema,\n\tconvertFieldKind,\n\ttoUpgradeSchema,\n\ttoInitialSchema,\n\ttoUnhydratedSchema,\n} from \"./toStoredSchema.js\";\nexport {\n\tnumberSchema,\n\tstringSchema,\n\tbooleanSchema,\n\thandleSchema,\n\tnullSchema,\n} from \"./leafNodeSchema.js\";\nexport type { LeafSchema, StringSchema } from \"./leafNodeSchema.js\";\nexport { getUnhydratedContext } from \"./createContext.js\";\nexport { type TreeSchema, createTreeSchema } from \"./treeSchema.js\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"leafNodeSchema.d.ts","sourceRoot":"","sources":["../../src/simple-tree/leafNodeSchema.ts"],"names":[],"mappings":"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B,IAAI,EAAE,EACjC,QAAQ,CAAC,IAAI,EACD,CAAC,EACK,CAAC,EACW,IAAI,CAClC;CAAG;AAGL;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,oBAAoB,CAAC;AAC/E,eAAO,MAAM,YAAY,EAAE,YAAqD,CAAC;AACjF,eAAO,MAAM,YAAY,6FAAyC,CAAC;AACnE,eAAO,MAAM,aAAa,+FAA2C,CAAC;AACtE,eAAO,MAAM,UAAU,yFAAqC,CAAC;AAC7D,eAAO,MAAM,YAAY,sJAA8C,CAAC;AA2BxE;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAChC,IAAI,EAAE,cAAc,EACpB,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,WAAW,CAAC,cAAc,CAAC,GACvC,WAAW,CAuBb"}
@@ -2,8 +2,6 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- var _LeafNodeSchema_initializedData, _a;
6
- import { __classPrivateFieldGet, __classPrivateFieldSet } from "tslib";
7
5
  import { assert } from "@fluidframework/core-utils/internal";
8
6
  import { isFluidHandle } from "@fluidframework/runtime-utils/internal";
9
7
  import { UsageError } from "@fluidframework/telemetry-utils/internal";
@@ -22,6 +20,19 @@ import { getTreeNodeSchemaInitializedData } from "./createContext.js";
22
20
  * This class refers to the underlying flex tree schema in its constructor, so this class can't be included in the package API.
23
21
  */
24
22
  export class LeafNodeSchema {
23
+ identifier;
24
+ kind = NodeKind.Leaf;
25
+ info;
26
+ implicitlyConstructable = true;
27
+ childTypes = new Set();
28
+ [privateDataSymbol] = {
29
+ idempotentInitialize: () => (this.#initializedData ??= getTreeNodeSchemaInitializedData(this, {
30
+ shallowCompatibilityTest: (data) => shallowCompatibilityTest(this, data),
31
+ toFlexContent: (data, allowedTypes) => leafToFlexContent(data, this, allowedTypes),
32
+ })),
33
+ childAllowedTypes: [],
34
+ };
35
+ #initializedData;
25
36
  create(data) {
26
37
  if (isFlexTreeNode(data)) {
27
38
  const value = data.value;
@@ -33,25 +44,15 @@ export class LeafNodeSchema {
33
44
  createFromInsertable(data) {
34
45
  return data;
35
46
  }
47
+ leafKind;
48
+ metadata = {};
49
+ persistedMetadata;
36
50
  constructor(name, t) {
37
- this.kind = NodeKind.Leaf;
38
- this.implicitlyConstructable = true;
39
- this.childTypes = new Set();
40
- this[_a] = {
41
- idempotentInitialize: () => (__classPrivateFieldSet(this, _LeafNodeSchema_initializedData, __classPrivateFieldGet(this, _LeafNodeSchema_initializedData, "f") ?? getTreeNodeSchemaInitializedData(this, {
42
- shallowCompatibilityTest: (data) => shallowCompatibilityTest(this, data),
43
- toFlexContent: (data, allowedTypes) => leafToFlexContent(data, this, allowedTypes),
44
- }), "f")),
45
- childAllowedTypes: [],
46
- };
47
- _LeafNodeSchema_initializedData.set(this, void 0);
48
- this.metadata = {};
49
51
  this.identifier = name;
50
52
  this.info = t;
51
53
  this.leafKind = t;
52
54
  }
53
55
  }
54
- _LeafNodeSchema_initializedData = new WeakMap(), _a = privateDataSymbol;
55
56
  /**
56
57
  * Wrapper around LeafNodeSchema's constructor that provides the return type that is desired in the package public API.
57
58
  */