@fluidframework/tree 2.90.0-378676 → 2.90.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1104) hide show
  1. package/.vscode/settings.json +6 -5
  2. package/CHANGELOG.md +95 -0
  3. package/README.md +1 -1
  4. package/api-report/tree.alpha.api.md +63 -25
  5. package/api-report/tree.beta.api.md +30 -0
  6. package/api-report/tree.legacy.beta.api.md +30 -0
  7. package/dist/alpha.d.ts +10 -6
  8. package/dist/beta.d.ts +4 -1
  9. package/dist/codec/codec.d.ts +2 -0
  10. package/dist/codec/codec.d.ts.map +1 -1
  11. package/dist/codec/codec.js +4 -3
  12. package/dist/codec/codec.js.map +1 -1
  13. package/dist/codec/index.d.ts +1 -1
  14. package/dist/codec/index.d.ts.map +1 -1
  15. package/dist/codec/index.js +2 -1
  16. package/dist/codec/index.js.map +1 -1
  17. package/dist/codec/versioned/codec.d.ts +13 -1
  18. package/dist/codec/versioned/codec.d.ts.map +1 -1
  19. package/dist/codec/versioned/codec.js +18 -3
  20. package/dist/codec/versioned/codec.js.map +1 -1
  21. package/dist/codec/versioned/format.d.ts +22 -1
  22. package/dist/codec/versioned/format.d.ts.map +1 -1
  23. package/dist/codec/versioned/format.js +16 -3
  24. package/dist/codec/versioned/format.js.map +1 -1
  25. package/dist/codec/versioned/index.d.ts +1 -1
  26. package/dist/codec/versioned/index.d.ts.map +1 -1
  27. package/dist/codec/versioned/index.js +2 -1
  28. package/dist/codec/versioned/index.js.map +1 -1
  29. package/dist/core/change-family/changeFamily.d.ts +1 -4
  30. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  31. package/dist/core/change-family/changeFamily.js.map +1 -1
  32. package/dist/core/change-family/index.d.ts +1 -1
  33. package/dist/core/change-family/index.d.ts.map +1 -1
  34. package/dist/core/change-family/index.js.map +1 -1
  35. package/dist/core/index.d.ts +3 -4
  36. package/dist/core/index.d.ts.map +1 -1
  37. package/dist/core/index.js +4 -8
  38. package/dist/core/index.js.map +1 -1
  39. package/dist/core/rebase/changeRebaser.d.ts +1 -6
  40. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  41. package/dist/core/rebase/changeRebaser.js.map +1 -1
  42. package/dist/core/rebase/index.d.ts +1 -1
  43. package/dist/core/rebase/index.d.ts.map +1 -1
  44. package/dist/core/rebase/index.js +1 -2
  45. package/dist/core/rebase/index.js.map +1 -1
  46. package/dist/core/rebase/types.d.ts +78 -1
  47. package/dist/core/rebase/types.d.ts.map +1 -1
  48. package/dist/core/rebase/types.js +1 -5
  49. package/dist/core/rebase/types.js.map +1 -1
  50. package/dist/core/rebase/utils.d.ts.map +1 -1
  51. package/dist/core/rebase/utils.js +7 -25
  52. package/dist/core/rebase/utils.js.map +1 -1
  53. package/dist/core/tree/delta.d.ts +0 -5
  54. package/dist/core/tree/delta.d.ts.map +1 -1
  55. package/dist/core/tree/delta.js.map +1 -1
  56. package/dist/core/tree/detachedFieldIndex.d.ts +1 -13
  57. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  58. package/dist/core/tree/detachedFieldIndex.js +1 -14
  59. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  60. package/dist/core/tree/detachedFieldIndexTypes.d.ts +0 -4
  61. package/dist/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
  62. package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
  63. package/dist/core/tree/index.d.ts +2 -2
  64. package/dist/core/tree/index.d.ts.map +1 -1
  65. package/dist/core/tree/index.js +3 -4
  66. package/dist/core/tree/index.js.map +1 -1
  67. package/dist/core/tree/pathTree.d.ts +3 -11
  68. package/dist/core/tree/pathTree.d.ts.map +1 -1
  69. package/dist/core/tree/pathTree.js +2 -14
  70. package/dist/core/tree/pathTree.js.map +1 -1
  71. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  72. package/dist/core/tree/visitDelta.js +13 -17
  73. package/dist/core/tree/visitDelta.js.map +1 -1
  74. package/dist/feature-libraries/changeAtomIdBTree.d.ts +2 -3
  75. package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  76. package/dist/feature-libraries/changeAtomIdBTree.js +2 -15
  77. package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +8 -7
  79. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  80. package/dist/feature-libraries/chunked-forest/codec/codecs.js +22 -44
  81. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  82. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  83. package/dist/feature-libraries/chunked-forest/codec/format.js +11 -0
  84. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  85. package/dist/feature-libraries/chunked-forest/codec/index.d.ts +3 -2
  86. package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  87. package/dist/feature-libraries/chunked-forest/codec/index.js +2 -4
  88. package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  89. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
  90. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  91. package/dist/feature-libraries/chunked-forest/index.js +2 -4
  92. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  93. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -92
  94. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  95. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +70 -220
  96. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  97. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  98. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +2 -12
  99. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  100. package/dist/feature-libraries/default-schema/index.d.ts +1 -2
  101. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  102. package/dist/feature-libraries/default-schema/index.js +2 -4
  103. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  104. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
  105. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  106. package/dist/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
  107. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  108. package/dist/feature-libraries/deltaUtils.d.ts +0 -1
  109. package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
  110. package/dist/feature-libraries/deltaUtils.js +1 -6
  111. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  112. package/dist/feature-libraries/flex-tree/context.d.ts +0 -9
  113. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  114. package/dist/feature-libraries/flex-tree/context.js +0 -6
  115. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  116. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  117. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  118. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  119. package/dist/feature-libraries/flex-tree/lazyField.d.ts +7 -8
  120. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  121. package/dist/feature-libraries/flex-tree/lazyField.js +8 -39
  122. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  123. package/dist/feature-libraries/flex-tree/observer.d.ts +17 -0
  124. package/dist/feature-libraries/flex-tree/observer.d.ts.map +1 -1
  125. package/dist/feature-libraries/flex-tree/observer.js.map +1 -1
  126. package/dist/feature-libraries/forest-summary/codec.d.ts +5 -12
  127. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  128. package/dist/feature-libraries/forest-summary/codec.js +33 -33
  129. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  130. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +2 -2
  131. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  132. package/dist/feature-libraries/forest-summary/forestSummarizer.js +6 -7
  133. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  134. package/dist/feature-libraries/forest-summary/formatCommon.d.ts +6 -4
  135. package/dist/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  136. package/dist/feature-libraries/forest-summary/formatCommon.js +13 -11
  137. package/dist/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  138. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +19 -14
  139. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  140. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +31 -48
  141. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  142. package/dist/feature-libraries/forest-summary/index.d.ts +1 -1
  143. package/dist/feature-libraries/forest-summary/index.d.ts.map +1 -1
  144. package/dist/feature-libraries/forest-summary/index.js +2 -2
  145. package/dist/feature-libraries/forest-summary/index.js.map +1 -1
  146. package/dist/feature-libraries/index.d.ts +6 -6
  147. package/dist/feature-libraries/index.d.ts.map +1 -1
  148. package/dist/feature-libraries/index.js +6 -11
  149. package/dist/feature-libraries/index.js.map +1 -1
  150. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +3 -3
  151. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  152. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  153. package/dist/feature-libraries/indexing/index.d.ts +1 -1
  154. package/dist/feature-libraries/indexing/index.d.ts.map +1 -1
  155. package/dist/feature-libraries/indexing/index.js.map +1 -1
  156. package/dist/feature-libraries/indexing/types.d.ts +15 -13
  157. package/dist/feature-libraries/indexing/types.d.ts.map +1 -1
  158. package/dist/feature-libraries/indexing/types.js.map +1 -1
  159. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  160. package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
  161. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  162. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +24 -100
  163. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  164. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +12 -8
  165. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  166. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -85
  167. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  168. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  169. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  170. package/dist/feature-libraries/modular-schema/genericFieldKind.js +9 -4
  171. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  172. package/dist/feature-libraries/modular-schema/index.d.ts +3 -3
  173. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  174. package/dist/feature-libraries/modular-schema/index.js +3 -2
  175. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  176. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +22 -18
  177. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  178. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +158 -276
  179. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  180. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  181. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
  182. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  183. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +0 -1
  184. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  185. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +0 -8
  186. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  187. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +22 -56
  188. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  189. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +462 -1390
  190. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  191. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  192. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  193. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +2 -1
  194. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  195. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js +3 -3
  196. package/dist/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
  197. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +10 -49
  198. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  199. package/dist/feature-libraries/modular-schema/modularChangeTypes.js +3 -3
  200. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  201. package/dist/feature-libraries/optional-field/optionalField.d.ts +32 -13
  202. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  203. package/dist/feature-libraries/optional-field/optionalField.js +446 -257
  204. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  205. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +31 -31
  206. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  207. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  208. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  209. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  210. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +28 -57
  211. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  212. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  213. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
  214. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  215. package/dist/feature-libraries/optional-field/requiredField.d.ts +2 -3
  216. package/dist/feature-libraries/optional-field/requiredField.d.ts.map +1 -1
  217. package/dist/feature-libraries/optional-field/requiredField.js +1 -6
  218. package/dist/feature-libraries/optional-field/requiredField.js.map +1 -1
  219. package/dist/feature-libraries/sequence-field/compose.d.ts +7 -6
  220. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  221. package/dist/feature-libraries/sequence-field/compose.js +259 -81
  222. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  223. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
  224. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  225. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  226. package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
  227. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  228. package/dist/feature-libraries/sequence-field/invert.js +167 -65
  229. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  230. package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  231. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  232. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  233. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
  234. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  235. package/dist/feature-libraries/sequence-field/moveEffectTable.js +90 -7
  236. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  237. package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
  238. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  239. package/dist/feature-libraries/sequence-field/rebase.js +116 -109
  240. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  241. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
  242. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
  243. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +50 -0
  244. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
  245. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  246. package/dist/feature-libraries/sequence-field/replaceRevisions.js +32 -19
  247. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  248. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  249. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -1
  250. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  251. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
  252. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  253. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +187 -388
  254. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  255. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  256. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +62 -20
  257. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  258. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  259. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  260. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +13 -13
  261. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  262. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  263. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  264. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +111 -16
  265. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  266. package/dist/feature-libraries/sequence-field/types.d.ts +74 -37
  267. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  268. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  269. package/dist/feature-libraries/sequence-field/utils.d.ts +25 -20
  270. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  271. package/dist/feature-libraries/sequence-field/utils.js +320 -159
  272. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  273. package/dist/index.d.ts +3 -3
  274. package/dist/index.d.ts.map +1 -1
  275. package/dist/index.js +2 -2
  276. package/dist/index.js.map +1 -1
  277. package/dist/legacy.d.ts +4 -1
  278. package/dist/packageVersion.d.ts +1 -1
  279. package/dist/packageVersion.d.ts.map +1 -1
  280. package/dist/packageVersion.js +1 -1
  281. package/dist/packageVersion.js.map +1 -1
  282. package/dist/shared-tree/independentView.d.ts.map +1 -1
  283. package/dist/shared-tree/independentView.js +3 -3
  284. package/dist/shared-tree/independentView.js.map +1 -1
  285. package/dist/shared-tree/index.d.ts +1 -1
  286. package/dist/shared-tree/index.d.ts.map +1 -1
  287. package/dist/shared-tree/index.js.map +1 -1
  288. package/dist/shared-tree/schematizeTree.d.ts +4 -4
  289. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  290. package/dist/shared-tree/schematizeTree.js +1 -2
  291. package/dist/shared-tree/schematizeTree.js.map +1 -1
  292. package/dist/shared-tree/schematizingTreeView.d.ts +10 -1
  293. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  294. package/dist/shared-tree/schematizingTreeView.js +70 -28
  295. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  296. package/dist/shared-tree/sharedTree.d.ts +3 -9
  297. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  298. package/dist/shared-tree/sharedTree.js +8 -11
  299. package/dist/shared-tree/sharedTree.js.map +1 -1
  300. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +0 -1
  301. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  302. package/dist/shared-tree/sharedTreeChangeCodecs.js +0 -8
  303. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  304. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
  305. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  306. package/dist/shared-tree/sharedTreeChangeFamily.js +2 -2
  307. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  308. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
  309. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  310. package/dist/shared-tree/sharedTreeEditBuilder.js +7 -14
  311. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  312. package/dist/shared-tree/tree.js +1 -1
  313. package/dist/shared-tree/tree.js.map +1 -1
  314. package/dist/shared-tree/treeAlpha.d.ts +8 -1
  315. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  316. package/dist/shared-tree/treeAlpha.js +48 -8
  317. package/dist/shared-tree/treeAlpha.js.map +1 -1
  318. package/dist/shared-tree/treeCheckout.d.ts +46 -16
  319. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  320. package/dist/shared-tree/treeCheckout.js +129 -73
  321. package/dist/shared-tree/treeCheckout.js.map +1 -1
  322. package/dist/shared-tree/unhydratedTreeContext.d.ts +20 -0
  323. package/dist/shared-tree/unhydratedTreeContext.d.ts.map +1 -0
  324. package/dist/shared-tree/unhydratedTreeContext.js +56 -0
  325. package/dist/shared-tree/unhydratedTreeContext.js.map +1 -0
  326. package/dist/shared-tree-core/branch.d.ts +2 -3
  327. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  328. package/dist/shared-tree-core/branch.js +3 -4
  329. package/dist/shared-tree-core/branch.js.map +1 -1
  330. package/dist/shared-tree-core/editManager.d.ts +2 -2
  331. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  332. package/dist/shared-tree-core/editManager.js +9 -9
  333. package/dist/shared-tree-core/editManager.js.map +1 -1
  334. package/dist/shared-tree-core/editManagerCodecs.d.ts +0 -4
  335. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  336. package/dist/shared-tree-core/editManagerCodecs.js +2 -10
  337. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  338. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
  339. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  340. package/dist/shared-tree-core/editManagerFormatCommons.js +0 -6
  341. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  342. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  343. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  344. package/dist/shared-tree-core/editManagerFormatV1toV4.js +0 -1
  345. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  346. package/dist/shared-tree-core/index.d.ts +2 -2
  347. package/dist/shared-tree-core/index.d.ts.map +1 -1
  348. package/dist/shared-tree-core/index.js +1 -3
  349. package/dist/shared-tree-core/index.js.map +1 -1
  350. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
  351. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  352. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  353. package/dist/shared-tree-core/messageCodecs.d.ts +0 -4
  354. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  355. package/dist/shared-tree-core/messageCodecs.js +2 -10
  356. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  357. package/dist/shared-tree-core/messageFormat.d.ts +0 -1
  358. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  359. package/dist/shared-tree-core/messageFormat.js +0 -6
  360. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  361. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
  362. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  363. package/dist/shared-tree-core/messageFormatV1ToV4.js +0 -1
  364. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  365. package/dist/shared-tree-core/sharedTreeCore.d.ts +0 -1
  366. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  367. package/dist/shared-tree-core/sharedTreeCore.js +1 -1
  368. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  369. package/dist/shared-tree-core/transaction.d.ts +15 -27
  370. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  371. package/dist/shared-tree-core/transaction.js +7 -11
  372. package/dist/shared-tree-core/transaction.js.map +1 -1
  373. package/dist/simple-tree/api/configuration.d.ts +4 -0
  374. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  375. package/dist/simple-tree/api/configuration.js.map +1 -1
  376. package/dist/simple-tree/api/identifierIndex.d.ts +2 -2
  377. package/dist/simple-tree/api/identifierIndex.d.ts.map +1 -1
  378. package/dist/simple-tree/api/identifierIndex.js +1 -1
  379. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  380. package/dist/simple-tree/api/index.d.ts +3 -3
  381. package/dist/simple-tree/api/index.d.ts.map +1 -1
  382. package/dist/simple-tree/api/index.js +2 -2
  383. package/dist/simple-tree/api/index.js.map +1 -1
  384. package/dist/simple-tree/api/schemaFactory.d.ts +3 -2
  385. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  386. package/dist/simple-tree/api/schemaFactory.js +3 -2
  387. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  388. package/dist/simple-tree/api/simpleTreeIndex.d.ts +15 -13
  389. package/dist/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
  390. package/dist/simple-tree/api/simpleTreeIndex.js +4 -4
  391. package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
  392. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts +4 -4
  393. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +2 -2
  394. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  395. package/dist/simple-tree/api/transactionTypes.d.ts +22 -25
  396. package/dist/simple-tree/api/transactionTypes.d.ts.map +1 -1
  397. package/dist/simple-tree/api/transactionTypes.js.map +1 -1
  398. package/dist/simple-tree/api/tree.d.ts +69 -132
  399. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  400. package/dist/simple-tree/api/tree.js.map +1 -1
  401. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +12 -16
  402. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  403. package/dist/simple-tree/core/unhydratedFlexTree.js +8 -59
  404. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  405. package/dist/simple-tree/fieldSchema.d.ts +4 -4
  406. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  407. package/dist/simple-tree/fieldSchema.js.map +1 -1
  408. package/dist/simple-tree/index.d.ts +3 -3
  409. package/dist/simple-tree/index.d.ts.map +1 -1
  410. package/dist/simple-tree/index.js +3 -3
  411. package/dist/simple-tree/index.js.map +1 -1
  412. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  413. package/dist/simple-tree/node-kinds/array/arrayNode.js +3 -5
  414. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  415. package/dist/simple-tree/node-kinds/common.d.ts.map +1 -1
  416. package/dist/simple-tree/node-kinds/common.js +1 -1
  417. package/dist/simple-tree/node-kinds/common.js.map +1 -1
  418. package/dist/simple-tree/node-kinds/map/mapNode.js +2 -2
  419. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  420. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  421. package/dist/simple-tree/node-kinds/object/objectNode.js +19 -19
  422. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  423. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  424. package/dist/simple-tree/node-kinds/record/recordNode.js +2 -4
  425. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  426. package/dist/simple-tree/prepareForInsertion.d.ts +47 -54
  427. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  428. package/dist/simple-tree/prepareForInsertion.js +125 -183
  429. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  430. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +3 -8
  431. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  432. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +13 -27
  433. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  434. package/dist/text/textDomain.d.ts +27 -9
  435. package/dist/text/textDomain.d.ts.map +1 -1
  436. package/dist/text/textDomain.js +43 -7
  437. package/dist/text/textDomain.js.map +1 -1
  438. package/dist/text/textDomainFormatted.d.ts +14 -8
  439. package/dist/text/textDomainFormatted.d.ts.map +1 -1
  440. package/dist/text/textDomainFormatted.js +97 -25
  441. package/dist/text/textDomainFormatted.js.map +1 -1
  442. package/dist/treeFactory.d.ts.map +1 -1
  443. package/dist/treeFactory.js +2 -12
  444. package/dist/treeFactory.js.map +1 -1
  445. package/dist/util/index.d.ts +1 -1
  446. package/dist/util/index.d.ts.map +1 -1
  447. package/dist/util/index.js +1 -2
  448. package/dist/util/index.js.map +1 -1
  449. package/dist/util/rangeMap.d.ts +11 -22
  450. package/dist/util/rangeMap.d.ts.map +1 -1
  451. package/dist/util/rangeMap.js +4 -38
  452. package/dist/util/rangeMap.js.map +1 -1
  453. package/docs/main/sequence-field/move-composition.md +46 -0
  454. package/lib/alpha.d.ts +10 -6
  455. package/lib/beta.d.ts +4 -1
  456. package/lib/codec/codec.d.ts +2 -0
  457. package/lib/codec/codec.d.ts.map +1 -1
  458. package/lib/codec/codec.js +4 -3
  459. package/lib/codec/codec.js.map +1 -1
  460. package/lib/codec/index.d.ts +1 -1
  461. package/lib/codec/index.d.ts.map +1 -1
  462. package/lib/codec/index.js +1 -1
  463. package/lib/codec/index.js.map +1 -1
  464. package/lib/codec/versioned/codec.d.ts +13 -1
  465. package/lib/codec/versioned/codec.d.ts.map +1 -1
  466. package/lib/codec/versioned/codec.js +18 -3
  467. package/lib/codec/versioned/codec.js.map +1 -1
  468. package/lib/codec/versioned/format.d.ts +22 -1
  469. package/lib/codec/versioned/format.d.ts.map +1 -1
  470. package/lib/codec/versioned/format.js +15 -2
  471. package/lib/codec/versioned/format.js.map +1 -1
  472. package/lib/codec/versioned/index.d.ts +1 -1
  473. package/lib/codec/versioned/index.d.ts.map +1 -1
  474. package/lib/codec/versioned/index.js +1 -1
  475. package/lib/codec/versioned/index.js.map +1 -1
  476. package/lib/core/change-family/changeFamily.d.ts +1 -4
  477. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  478. package/lib/core/change-family/changeFamily.js.map +1 -1
  479. package/lib/core/change-family/index.d.ts +1 -1
  480. package/lib/core/change-family/index.d.ts.map +1 -1
  481. package/lib/core/change-family/index.js.map +1 -1
  482. package/lib/core/index.d.ts +3 -4
  483. package/lib/core/index.d.ts.map +1 -1
  484. package/lib/core/index.js +2 -3
  485. package/lib/core/index.js.map +1 -1
  486. package/lib/core/rebase/changeRebaser.d.ts +1 -6
  487. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  488. package/lib/core/rebase/changeRebaser.js.map +1 -1
  489. package/lib/core/rebase/index.d.ts +1 -1
  490. package/lib/core/rebase/index.d.ts.map +1 -1
  491. package/lib/core/rebase/index.js +1 -1
  492. package/lib/core/rebase/index.js.map +1 -1
  493. package/lib/core/rebase/types.d.ts +78 -1
  494. package/lib/core/rebase/types.d.ts.map +1 -1
  495. package/lib/core/rebase/types.js +0 -3
  496. package/lib/core/rebase/types.js.map +1 -1
  497. package/lib/core/rebase/utils.d.ts.map +1 -1
  498. package/lib/core/rebase/utils.js +7 -25
  499. package/lib/core/rebase/utils.js.map +1 -1
  500. package/lib/core/tree/delta.d.ts +0 -5
  501. package/lib/core/tree/delta.d.ts.map +1 -1
  502. package/lib/core/tree/delta.js.map +1 -1
  503. package/lib/core/tree/detachedFieldIndex.d.ts +1 -13
  504. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  505. package/lib/core/tree/detachedFieldIndex.js +2 -15
  506. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  507. package/lib/core/tree/detachedFieldIndexTypes.d.ts +0 -4
  508. package/lib/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
  509. package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
  510. package/lib/core/tree/index.d.ts +2 -2
  511. package/lib/core/tree/index.d.ts.map +1 -1
  512. package/lib/core/tree/index.js +1 -1
  513. package/lib/core/tree/index.js.map +1 -1
  514. package/lib/core/tree/pathTree.d.ts +3 -11
  515. package/lib/core/tree/pathTree.d.ts.map +1 -1
  516. package/lib/core/tree/pathTree.js +1 -12
  517. package/lib/core/tree/pathTree.js.map +1 -1
  518. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  519. package/lib/core/tree/visitDelta.js +13 -17
  520. package/lib/core/tree/visitDelta.js.map +1 -1
  521. package/lib/feature-libraries/changeAtomIdBTree.d.ts +2 -3
  522. package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  523. package/lib/feature-libraries/changeAtomIdBTree.js +3 -15
  524. package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
  525. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +8 -7
  526. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  527. package/lib/feature-libraries/chunked-forest/codec/codecs.js +25 -45
  528. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  529. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  530. package/lib/feature-libraries/chunked-forest/codec/format.js +11 -0
  531. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  532. package/lib/feature-libraries/chunked-forest/codec/index.d.ts +3 -2
  533. package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  534. package/lib/feature-libraries/chunked-forest/codec/index.js +2 -2
  535. package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  536. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
  537. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  538. package/lib/feature-libraries/chunked-forest/index.js +1 -1
  539. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  540. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -92
  541. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  542. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +69 -217
  543. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  544. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  545. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +2 -12
  546. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  547. package/lib/feature-libraries/default-schema/index.d.ts +1 -2
  548. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  549. package/lib/feature-libraries/default-schema/index.js +1 -2
  550. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  551. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
  552. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  553. package/lib/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
  554. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  555. package/lib/feature-libraries/deltaUtils.d.ts +0 -1
  556. package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
  557. package/lib/feature-libraries/deltaUtils.js +1 -5
  558. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  559. package/lib/feature-libraries/flex-tree/context.d.ts +0 -9
  560. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  561. package/lib/feature-libraries/flex-tree/context.js +0 -6
  562. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  563. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  564. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  565. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  566. package/lib/feature-libraries/flex-tree/lazyField.d.ts +7 -8
  567. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  568. package/lib/feature-libraries/flex-tree/lazyField.js +9 -40
  569. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  570. package/lib/feature-libraries/flex-tree/observer.d.ts +17 -0
  571. package/lib/feature-libraries/flex-tree/observer.d.ts.map +1 -1
  572. package/lib/feature-libraries/flex-tree/observer.js.map +1 -1
  573. package/lib/feature-libraries/forest-summary/codec.d.ts +5 -12
  574. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  575. package/lib/feature-libraries/forest-summary/codec.js +35 -32
  576. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  577. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +2 -2
  578. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  579. package/lib/feature-libraries/forest-summary/forestSummarizer.js +7 -8
  580. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  581. package/lib/feature-libraries/forest-summary/formatCommon.d.ts +6 -4
  582. package/lib/feature-libraries/forest-summary/formatCommon.d.ts.map +1 -1
  583. package/lib/feature-libraries/forest-summary/formatCommon.js +7 -4
  584. package/lib/feature-libraries/forest-summary/formatCommon.js.map +1 -1
  585. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +19 -14
  586. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  587. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +30 -47
  588. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  589. package/lib/feature-libraries/forest-summary/index.d.ts +1 -1
  590. package/lib/feature-libraries/forest-summary/index.d.ts.map +1 -1
  591. package/lib/feature-libraries/forest-summary/index.js +1 -1
  592. package/lib/feature-libraries/forest-summary/index.js.map +1 -1
  593. package/lib/feature-libraries/index.d.ts +6 -6
  594. package/lib/feature-libraries/index.d.ts.map +1 -1
  595. package/lib/feature-libraries/index.js +5 -5
  596. package/lib/feature-libraries/index.js.map +1 -1
  597. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +3 -3
  598. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  599. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  600. package/lib/feature-libraries/indexing/index.d.ts +1 -1
  601. package/lib/feature-libraries/indexing/index.d.ts.map +1 -1
  602. package/lib/feature-libraries/indexing/index.js.map +1 -1
  603. package/lib/feature-libraries/indexing/types.d.ts +15 -13
  604. package/lib/feature-libraries/indexing/types.d.ts.map +1 -1
  605. package/lib/feature-libraries/indexing/types.js.map +1 -1
  606. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  607. package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
  608. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  609. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +24 -100
  610. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  611. package/lib/feature-libraries/modular-schema/crossFieldQueries.js +10 -7
  612. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  613. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -85
  614. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  615. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  616. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  617. package/lib/feature-libraries/modular-schema/genericFieldKind.js +9 -4
  618. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  619. package/lib/feature-libraries/modular-schema/index.d.ts +3 -3
  620. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  621. package/lib/feature-libraries/modular-schema/index.js +1 -1
  622. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  623. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +22 -18
  624. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  625. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +144 -267
  626. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  627. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  628. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
  629. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  630. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +0 -1
  631. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  632. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +0 -8
  633. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  634. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +22 -56
  635. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  636. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +468 -1387
  637. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  638. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  639. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  640. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts +2 -1
  641. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.d.ts.map +1 -1
  642. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js +1 -1
  643. package/lib/feature-libraries/modular-schema/modularChangeFormatV2.js.map +1 -1
  644. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +10 -49
  645. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  646. package/lib/feature-libraries/modular-schema/modularChangeTypes.js +1 -1
  647. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  648. package/lib/feature-libraries/optional-field/optionalField.d.ts +32 -13
  649. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  650. package/lib/feature-libraries/optional-field/optionalField.js +442 -254
  651. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  652. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +31 -31
  653. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  654. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  655. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  656. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  657. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +26 -55
  658. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  659. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  660. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
  661. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  662. package/lib/feature-libraries/optional-field/requiredField.d.ts +2 -3
  663. package/lib/feature-libraries/optional-field/requiredField.d.ts.map +1 -1
  664. package/lib/feature-libraries/optional-field/requiredField.js +1 -5
  665. package/lib/feature-libraries/optional-field/requiredField.js.map +1 -1
  666. package/lib/feature-libraries/sequence-field/compose.d.ts +7 -6
  667. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  668. package/lib/feature-libraries/sequence-field/compose.js +261 -83
  669. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  670. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
  671. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  672. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  673. package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
  674. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  675. package/lib/feature-libraries/sequence-field/invert.js +169 -67
  676. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  677. package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  678. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  679. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  680. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
  681. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  682. package/lib/feature-libraries/sequence-field/moveEffectTable.js +84 -6
  683. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  684. package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
  685. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  686. package/lib/feature-libraries/sequence-field/rebase.js +118 -111
  687. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  688. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
  689. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
  690. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +46 -0
  691. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
  692. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  693. package/lib/feature-libraries/sequence-field/replaceRevisions.js +32 -19
  694. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  695. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  696. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +3 -2
  697. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  698. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
  699. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  700. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +182 -379
  701. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  702. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  703. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +63 -21
  704. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  705. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  706. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  707. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +13 -13
  708. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  709. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  710. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  711. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +111 -16
  712. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  713. package/lib/feature-libraries/sequence-field/types.d.ts +74 -37
  714. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  715. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  716. package/lib/feature-libraries/sequence-field/utils.d.ts +25 -20
  717. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  718. package/lib/feature-libraries/sequence-field/utils.js +313 -155
  719. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  720. package/lib/index.d.ts +3 -3
  721. package/lib/index.d.ts.map +1 -1
  722. package/lib/index.js +1 -1
  723. package/lib/index.js.map +1 -1
  724. package/lib/legacy.d.ts +4 -1
  725. package/lib/packageVersion.d.ts +1 -1
  726. package/lib/packageVersion.d.ts.map +1 -1
  727. package/lib/packageVersion.js +1 -1
  728. package/lib/packageVersion.js.map +1 -1
  729. package/lib/shared-tree/independentView.d.ts.map +1 -1
  730. package/lib/shared-tree/independentView.js +4 -4
  731. package/lib/shared-tree/independentView.js.map +1 -1
  732. package/lib/shared-tree/index.d.ts +1 -1
  733. package/lib/shared-tree/index.d.ts.map +1 -1
  734. package/lib/shared-tree/index.js.map +1 -1
  735. package/lib/shared-tree/schematizeTree.d.ts +4 -4
  736. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  737. package/lib/shared-tree/schematizeTree.js +2 -3
  738. package/lib/shared-tree/schematizeTree.js.map +1 -1
  739. package/lib/shared-tree/schematizingTreeView.d.ts +10 -1
  740. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  741. package/lib/shared-tree/schematizingTreeView.js +71 -30
  742. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  743. package/lib/shared-tree/sharedTree.d.ts +3 -9
  744. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  745. package/lib/shared-tree/sharedTree.js +9 -12
  746. package/lib/shared-tree/sharedTree.js.map +1 -1
  747. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +0 -1
  748. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  749. package/lib/shared-tree/sharedTreeChangeCodecs.js +0 -8
  750. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  751. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
  752. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  753. package/lib/shared-tree/sharedTreeChangeFamily.js +3 -3
  754. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  755. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
  756. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  757. package/lib/shared-tree/sharedTreeEditBuilder.js +6 -12
  758. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  759. package/lib/shared-tree/tree.js +1 -1
  760. package/lib/shared-tree/tree.js.map +1 -1
  761. package/lib/shared-tree/treeAlpha.d.ts +8 -1
  762. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  763. package/lib/shared-tree/treeAlpha.js +49 -9
  764. package/lib/shared-tree/treeAlpha.js.map +1 -1
  765. package/lib/shared-tree/treeCheckout.d.ts +46 -16
  766. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  767. package/lib/shared-tree/treeCheckout.js +132 -76
  768. package/lib/shared-tree/treeCheckout.js.map +1 -1
  769. package/lib/shared-tree/unhydratedTreeContext.d.ts +20 -0
  770. package/lib/shared-tree/unhydratedTreeContext.d.ts.map +1 -0
  771. package/lib/shared-tree/unhydratedTreeContext.js +52 -0
  772. package/lib/shared-tree/unhydratedTreeContext.js.map +1 -0
  773. package/lib/shared-tree-core/branch.d.ts +2 -3
  774. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  775. package/lib/shared-tree-core/branch.js +3 -4
  776. package/lib/shared-tree-core/branch.js.map +1 -1
  777. package/lib/shared-tree-core/editManager.d.ts +2 -2
  778. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  779. package/lib/shared-tree-core/editManager.js +9 -9
  780. package/lib/shared-tree-core/editManager.js.map +1 -1
  781. package/lib/shared-tree-core/editManagerCodecs.d.ts +0 -4
  782. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  783. package/lib/shared-tree-core/editManagerCodecs.js +1 -8
  784. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  785. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
  786. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  787. package/lib/shared-tree-core/editManagerFormatCommons.js +0 -6
  788. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  789. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  790. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  791. package/lib/shared-tree-core/editManagerFormatV1toV4.js +0 -1
  792. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  793. package/lib/shared-tree-core/index.d.ts +2 -2
  794. package/lib/shared-tree-core/index.d.ts.map +1 -1
  795. package/lib/shared-tree-core/index.js +2 -2
  796. package/lib/shared-tree-core/index.js.map +1 -1
  797. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +1 -1
  798. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  799. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  800. package/lib/shared-tree-core/messageCodecs.d.ts +0 -4
  801. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  802. package/lib/shared-tree-core/messageCodecs.js +1 -8
  803. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  804. package/lib/shared-tree-core/messageFormat.d.ts +0 -1
  805. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  806. package/lib/shared-tree-core/messageFormat.js +0 -6
  807. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  808. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
  809. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  810. package/lib/shared-tree-core/messageFormatV1ToV4.js +0 -1
  811. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  812. package/lib/shared-tree-core/sharedTreeCore.d.ts +0 -1
  813. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  814. package/lib/shared-tree-core/sharedTreeCore.js +1 -1
  815. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  816. package/lib/shared-tree-core/transaction.d.ts +15 -27
  817. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  818. package/lib/shared-tree-core/transaction.js +7 -11
  819. package/lib/shared-tree-core/transaction.js.map +1 -1
  820. package/lib/simple-tree/api/configuration.d.ts +4 -0
  821. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  822. package/lib/simple-tree/api/configuration.js.map +1 -1
  823. package/lib/simple-tree/api/identifierIndex.d.ts +2 -2
  824. package/lib/simple-tree/api/identifierIndex.d.ts.map +1 -1
  825. package/lib/simple-tree/api/identifierIndex.js +2 -2
  826. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  827. package/lib/simple-tree/api/index.d.ts +3 -3
  828. package/lib/simple-tree/api/index.d.ts.map +1 -1
  829. package/lib/simple-tree/api/index.js +1 -1
  830. package/lib/simple-tree/api/index.js.map +1 -1
  831. package/lib/simple-tree/api/schemaFactory.d.ts +3 -2
  832. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  833. package/lib/simple-tree/api/schemaFactory.js +3 -2
  834. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  835. package/lib/simple-tree/api/simpleTreeIndex.d.ts +15 -13
  836. package/lib/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
  837. package/lib/simple-tree/api/simpleTreeIndex.js +2 -2
  838. package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
  839. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts +4 -4
  840. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +2 -2
  841. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  842. package/lib/simple-tree/api/transactionTypes.d.ts +22 -25
  843. package/lib/simple-tree/api/transactionTypes.d.ts.map +1 -1
  844. package/lib/simple-tree/api/transactionTypes.js.map +1 -1
  845. package/lib/simple-tree/api/tree.d.ts +69 -132
  846. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  847. package/lib/simple-tree/api/tree.js.map +1 -1
  848. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +12 -16
  849. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  850. package/lib/simple-tree/core/unhydratedFlexTree.js +8 -58
  851. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  852. package/lib/simple-tree/fieldSchema.d.ts +4 -4
  853. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  854. package/lib/simple-tree/fieldSchema.js.map +1 -1
  855. package/lib/simple-tree/index.d.ts +3 -3
  856. package/lib/simple-tree/index.d.ts.map +1 -1
  857. package/lib/simple-tree/index.js +2 -2
  858. package/lib/simple-tree/index.js.map +1 -1
  859. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  860. package/lib/simple-tree/node-kinds/array/arrayNode.js +4 -6
  861. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  862. package/lib/simple-tree/node-kinds/common.d.ts.map +1 -1
  863. package/lib/simple-tree/node-kinds/common.js +2 -2
  864. package/lib/simple-tree/node-kinds/common.js.map +1 -1
  865. package/lib/simple-tree/node-kinds/map/mapNode.js +2 -2
  866. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  867. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  868. package/lib/simple-tree/node-kinds/object/objectNode.js +20 -20
  869. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  870. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  871. package/lib/simple-tree/node-kinds/record/recordNode.js +2 -4
  872. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  873. package/lib/simple-tree/prepareForInsertion.d.ts +47 -54
  874. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  875. package/lib/simple-tree/prepareForInsertion.js +125 -184
  876. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  877. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +3 -8
  878. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  879. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +10 -23
  880. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  881. package/lib/text/textDomain.d.ts +27 -9
  882. package/lib/text/textDomain.d.ts.map +1 -1
  883. package/lib/text/textDomain.js +45 -9
  884. package/lib/text/textDomain.js.map +1 -1
  885. package/lib/text/textDomainFormatted.d.ts +14 -8
  886. package/lib/text/textDomainFormatted.d.ts.map +1 -1
  887. package/lib/text/textDomainFormatted.js +80 -8
  888. package/lib/text/textDomainFormatted.js.map +1 -1
  889. package/lib/treeFactory.d.ts.map +1 -1
  890. package/lib/treeFactory.js +3 -13
  891. package/lib/treeFactory.js.map +1 -1
  892. package/lib/util/index.d.ts +1 -1
  893. package/lib/util/index.d.ts.map +1 -1
  894. package/lib/util/index.js +1 -1
  895. package/lib/util/index.js.map +1 -1
  896. package/lib/util/rangeMap.d.ts +11 -22
  897. package/lib/util/rangeMap.d.ts.map +1 -1
  898. package/lib/util/rangeMap.js +3 -36
  899. package/lib/util/rangeMap.js.map +1 -1
  900. package/package.json +24 -24
  901. package/src/codec/codec.ts +5 -4
  902. package/src/codec/index.ts +1 -0
  903. package/src/codec/versioned/codec.ts +32 -6
  904. package/src/codec/versioned/format.ts +17 -2
  905. package/src/codec/versioned/index.ts +1 -1
  906. package/src/core/change-family/changeFamily.ts +0 -5
  907. package/src/core/change-family/index.ts +0 -1
  908. package/src/core/index.ts +3 -10
  909. package/src/core/rebase/changeRebaser.ts +1 -6
  910. package/src/core/rebase/index.ts +2 -1
  911. package/src/core/rebase/types.ts +80 -4
  912. package/src/core/rebase/utils.ts +7 -31
  913. package/src/core/tree/delta.ts +0 -6
  914. package/src/core/tree/detachedFieldIndex.ts +1 -29
  915. package/src/core/tree/detachedFieldIndexTypes.ts +0 -5
  916. package/src/core/tree/index.ts +12 -13
  917. package/src/core/tree/pathTree.ts +4 -16
  918. package/src/core/tree/visitDelta.ts +11 -31
  919. package/src/feature-libraries/changeAtomIdBTree.ts +3 -28
  920. package/src/feature-libraries/chunked-forest/codec/codecs.ts +59 -78
  921. package/src/feature-libraries/chunked-forest/codec/format.ts +11 -0
  922. package/src/feature-libraries/chunked-forest/codec/index.ts +3 -3
  923. package/src/feature-libraries/chunked-forest/index.ts +2 -3
  924. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +127 -369
  925. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +4 -13
  926. package/src/feature-libraries/default-schema/index.ts +5 -16
  927. package/src/feature-libraries/default-schema/mappedEditBuilder.ts +9 -35
  928. package/src/feature-libraries/deltaUtils.ts +1 -6
  929. package/src/feature-libraries/flex-tree/context.ts +0 -17
  930. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +8 -7
  931. package/src/feature-libraries/flex-tree/lazyField.ts +24 -65
  932. package/src/feature-libraries/flex-tree/observer.ts +17 -0
  933. package/src/feature-libraries/forest-summary/codec.ts +46 -56
  934. package/src/feature-libraries/forest-summary/forestSummarizer.ts +5 -14
  935. package/src/feature-libraries/forest-summary/formatCommon.ts +14 -19
  936. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +44 -74
  937. package/src/feature-libraries/forest-summary/index.ts +1 -1
  938. package/src/feature-libraries/index.ts +11 -26
  939. package/src/feature-libraries/indexing/anchorTreeIndex.ts +3 -5
  940. package/src/feature-libraries/indexing/index.ts +1 -1
  941. package/src/feature-libraries/indexing/types.ts +15 -17
  942. package/src/feature-libraries/mitigatedChangeFamily.ts +1 -3
  943. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +47 -144
  944. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +58 -113
  945. package/src/feature-libraries/modular-schema/genericFieldKind.ts +18 -7
  946. package/src/feature-libraries/modular-schema/index.ts +16 -16
  947. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +329 -604
  948. package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +0 -1
  949. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +0 -14
  950. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +748 -2694
  951. package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +0 -1
  952. package/src/feature-libraries/modular-schema/modularChangeFormatV2.ts +1 -1
  953. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +10 -62
  954. package/src/feature-libraries/optional-field/optionalField.ts +568 -359
  955. package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +35 -31
  956. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +35 -89
  957. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +1 -5
  958. package/src/feature-libraries/optional-field/requiredField.ts +2 -15
  959. package/src/feature-libraries/sequence-field/compose.ts +522 -137
  960. package/src/feature-libraries/sequence-field/helperTypes.ts +19 -34
  961. package/src/feature-libraries/sequence-field/invert.ts +228 -102
  962. package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
  963. package/src/feature-libraries/sequence-field/moveEffectTable.ts +195 -8
  964. package/src/feature-libraries/sequence-field/rebase.ts +207 -171
  965. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +57 -0
  966. package/src/feature-libraries/sequence-field/replaceRevisions.ts +52 -26
  967. package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +3 -8
  968. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +229 -677
  969. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +70 -56
  970. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +30 -28
  971. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +131 -21
  972. package/src/feature-libraries/sequence-field/types.ts +79 -40
  973. package/src/feature-libraries/sequence-field/utils.ts +370 -211
  974. package/src/index.ts +6 -3
  975. package/src/packageVersion.ts +1 -1
  976. package/src/shared-tree/independentView.ts +9 -15
  977. package/src/shared-tree/index.ts +2 -3
  978. package/src/shared-tree/schematizeTree.ts +8 -21
  979. package/src/shared-tree/schematizingTreeView.ts +111 -48
  980. package/src/shared-tree/sharedTree.ts +23 -40
  981. package/src/shared-tree/sharedTreeChangeCodecs.ts +0 -8
  982. package/src/shared-tree/sharedTreeChangeFamily.ts +4 -7
  983. package/src/shared-tree/sharedTreeEditBuilder.ts +8 -43
  984. package/src/shared-tree/tree.ts +1 -1
  985. package/src/shared-tree/treeAlpha.ts +64 -11
  986. package/src/shared-tree/treeCheckout.ts +159 -114
  987. package/src/shared-tree/unhydratedTreeContext.ts +87 -0
  988. package/src/shared-tree-core/branch.ts +2 -8
  989. package/src/shared-tree-core/editManager.ts +2 -16
  990. package/src/shared-tree-core/editManagerCodecs.ts +1 -11
  991. package/src/shared-tree-core/editManagerFormatCommons.ts +0 -6
  992. package/src/shared-tree-core/editManagerFormatV1toV4.ts +1 -3
  993. package/src/shared-tree-core/index.ts +0 -2
  994. package/src/shared-tree-core/messageCodecV1ToV4.ts +1 -2
  995. package/src/shared-tree-core/messageCodecs.ts +1 -11
  996. package/src/shared-tree-core/messageFormat.ts +0 -6
  997. package/src/shared-tree-core/messageFormatV1ToV4.ts +1 -3
  998. package/src/shared-tree-core/sharedTreeCore.ts +1 -4
  999. package/src/shared-tree-core/transaction.ts +19 -39
  1000. package/src/simple-tree/api/configuration.ts +4 -0
  1001. package/src/simple-tree/api/identifierIndex.ts +4 -4
  1002. package/src/simple-tree/api/index.ts +3 -1
  1003. package/src/simple-tree/api/schemaFactory.ts +3 -2
  1004. package/src/simple-tree/api/simpleTreeIndex.ts +26 -20
  1005. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +4 -4
  1006. package/src/simple-tree/api/transactionTypes.ts +24 -26
  1007. package/src/simple-tree/api/tree.ts +92 -131
  1008. package/src/simple-tree/core/unhydratedFlexTree.ts +35 -82
  1009. package/src/simple-tree/fieldSchema.ts +4 -6
  1010. package/src/simple-tree/index.ts +5 -4
  1011. package/src/simple-tree/node-kinds/array/arrayNode.ts +5 -7
  1012. package/src/simple-tree/node-kinds/common.ts +5 -2
  1013. package/src/simple-tree/node-kinds/map/mapNode.ts +4 -4
  1014. package/src/simple-tree/node-kinds/object/objectNode.ts +26 -26
  1015. package/src/simple-tree/node-kinds/record/recordNode.ts +9 -10
  1016. package/src/simple-tree/prepareForInsertion.ts +200 -342
  1017. package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +15 -35
  1018. package/src/text/textDomain.ts +91 -12
  1019. package/src/text/textDomainFormatted.ts +127 -15
  1020. package/src/treeFactory.ts +4 -16
  1021. package/src/util/index.ts +0 -3
  1022. package/src/util/rangeMap.ts +15 -63
  1023. package/dist/core/schema-view/index.d.ts +0 -6
  1024. package/dist/core/schema-view/index.d.ts.map +0 -1
  1025. package/dist/core/schema-view/index.js +0 -10
  1026. package/dist/core/schema-view/index.js.map +0 -1
  1027. package/dist/core/schema-view/view.d.ts +0 -31
  1028. package/dist/core/schema-view/view.d.ts.map +0 -1
  1029. package/dist/core/schema-view/view.js +0 -18
  1030. package/dist/core/schema-view/view.js.map +0 -1
  1031. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -40
  1032. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
  1033. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -153
  1034. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
  1035. package/dist/feature-libraries/forest-summary/formatV1.d.ts +0 -12
  1036. package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +0 -1
  1037. package/dist/feature-libraries/forest-summary/formatV1.js +0 -10
  1038. package/dist/feature-libraries/forest-summary/formatV1.js.map +0 -1
  1039. package/dist/feature-libraries/forest-summary/formatV2.d.ts +0 -12
  1040. package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +0 -1
  1041. package/dist/feature-libraries/forest-summary/formatV2.js +0 -10
  1042. package/dist/feature-libraries/forest-summary/formatV2.js.map +0 -1
  1043. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
  1044. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
  1045. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -296
  1046. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
  1047. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -74
  1048. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
  1049. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -35
  1050. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
  1051. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
  1052. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
  1053. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -31
  1054. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
  1055. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
  1056. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
  1057. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -57
  1058. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
  1059. package/lib/core/schema-view/index.d.ts +0 -6
  1060. package/lib/core/schema-view/index.d.ts.map +0 -1
  1061. package/lib/core/schema-view/index.js +0 -6
  1062. package/lib/core/schema-view/index.js.map +0 -1
  1063. package/lib/core/schema-view/view.d.ts +0 -31
  1064. package/lib/core/schema-view/view.d.ts.map +0 -1
  1065. package/lib/core/schema-view/view.js +0 -14
  1066. package/lib/core/schema-view/view.js.map +0 -1
  1067. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -40
  1068. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
  1069. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -149
  1070. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
  1071. package/lib/feature-libraries/forest-summary/formatV1.d.ts +0 -12
  1072. package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +0 -1
  1073. package/lib/feature-libraries/forest-summary/formatV1.js +0 -7
  1074. package/lib/feature-libraries/forest-summary/formatV1.js.map +0 -1
  1075. package/lib/feature-libraries/forest-summary/formatV2.d.ts +0 -12
  1076. package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +0 -1
  1077. package/lib/feature-libraries/forest-summary/formatV2.js +0 -7
  1078. package/lib/feature-libraries/forest-summary/formatV2.js.map +0 -1
  1079. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
  1080. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
  1081. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -292
  1082. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
  1083. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -74
  1084. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
  1085. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -32
  1086. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
  1087. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
  1088. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
  1089. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -27
  1090. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
  1091. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
  1092. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
  1093. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -53
  1094. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
  1095. package/src/core/schema-view/README.md +0 -9
  1096. package/src/core/schema-view/index.ts +0 -10
  1097. package/src/core/schema-view/view.ts +0 -38
  1098. package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +0 -231
  1099. package/src/feature-libraries/forest-summary/formatV1.ts +0 -11
  1100. package/src/feature-libraries/forest-summary/formatV2.ts +0 -11
  1101. package/src/feature-libraries/modular-schema/modularChangeCodecV3.ts +0 -649
  1102. package/src/feature-libraries/modular-schema/modularChangeFormatV3.ts +0 -67
  1103. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV3.ts +0 -45
  1104. package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +0 -94
@@ -1 +1 @@
1
- {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/simple-tree/api/configuration.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAyF;AACzF,uEAAsE;AAEtE,kDAAkD;AAElD,+CAI0B;AAC1B,sDAA+F;AAC/F,qDASgC;AAEhC,4DAI8B;AAC9B,oDAAqE;AACrE,8DAAwD;AAsGxD,MAAM,+BAA+B,GAAwC;IAC5E,sBAAsB,EAAE,KAAK;IAC7B,gBAAgB,EAAE,KAAK;CACvB,CAAC;AAeF;;;GAGG;AACH,MAAa,qBAAqB;IAqBjC;;;;;;;;;;;;OAYG;IACH,YAAmB,KAAsC;QACxD,IAAI,IAAI,CAAC,WAAW,KAAK,qBAAqB,EAAE,CAAC;YAChD,4HAA4H;YAC5H,kKAAkK;YAClK,OAAO,IAAI,0BAA0B,CAAC,KAAK,CAAC,CAAC;QAC9C,CAAC;QACD,IAAA,iBAAM;QACL,wGAAwG;QACvG,IAAI,CAAC,WAAuB,KAAK,0BAA0B,EAC5D,KAAK,CAAC,8CAA8C,CACpD,CAAC;QAEF,MAAM,MAAM,GAAG,EAAE,GAAG,+BAA+B,EAAE,GAAG,KAAK,EAAE,CAAC;QAChE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,sBAAsB,CAAC;QAC5D,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAEhD,sIAAsI;QACtI,MAAM,eAAe,GAAa,EAAE,CAAC;QAErC,oDAAoD;QACpD,0HAA0H;QAC1H,gGAAgG;QAChG,IAAA,oCAAe,EAAC,MAAM,CAAC,MAAM,EAAE;YAC9B,YAAY,CAAC,EAAE,KAAK,EAA6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C7D,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC;QAE3C,0CAA0C;QAC1C,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEjC,6FAA6F;QAC7F,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAC1C,IAAI,KAAK,CAAC,IAAI,KAAK,0BAAS,CAAC,QAAQ,EAAE,CAAC;gBACvC,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAA,eAAI,EAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;gBAC3E,KAAK,MAAM,SAAS,IAAI,iBAAiB,EAAE,CAAC;oBAC3C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;wBAC7B,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;oBACrC,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;QAED,IAAI,iBAAiB,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAChC,yCAAyC;YACzC,8EAA8E;YAC9E,kJAAkJ;YAClJ,4MAA4M;YAC5M,mJAAmJ;YAEnJ,eAAe,CAAC,IAAI,CACnB,0BAA0B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,mEAAmE,WAAW,CAAC,iBAAiB,CAAC,oIAAoI,CAChS,CAAC;QACH,CAAC;IACF,CAAC;AACF,CAAC;AAvID,gCAuIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail, oob, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { getOrCreate } from \"../../util/index.js\";\nimport type { MakeNominal } from \"../../util/index.js\";\nimport {\n\ttype AllowedTypesFullEvaluated,\n\tNodeKind,\n\ttype TreeNodeSchema,\n} from \"../core/index.js\";\nimport { type FieldSchemaAlpha, type ImplicitFieldSchema, FieldKind } from \"../fieldSchema.js\";\nimport {\n\tisArrayNodeSchema,\n\tisMapNodeSchema,\n\tisObjectNodeSchema,\n\tisRecordNodeSchema,\n\ttype ArrayNodeSchema,\n\ttype MapNodeSchema,\n\ttype ObjectNodeSchema,\n\ttype RecordNodeSchema,\n} from \"../node-kinds/index.js\";\nimport type { SchemaType, SimpleNodeSchema } from \"../simpleSchema.js\";\nimport {\n\ttoInitialSchema,\n\ttoUnhydratedSchema,\n\ttransformSimpleSchema,\n} from \"../toStoredSchema.js\";\nimport { createTreeSchema, type TreeSchema } from \"../treeSchema.js\";\nimport { walkFieldSchema } from \"../walkFieldSchema.js\";\n\n/**\n * Options when constructing a tree view.\n * @public\n */\nexport interface ITreeConfigurationOptions {\n\t/**\n\t * If `true`, the tree will perform additional validation of content against its stored schema\n\t * and throw an error if the new content doesn't match the expected schema.\n\t *\n\t * @defaultValue `false`.\n\t *\n\t * @remarks\n\t * Currently most cases already have some schema validation, so this is mainly for additional validation which may be useful when debugging issues,\n\t * working with untyped APIs, or when the small performance overhead is a non-issue.\n\t *\n\t * Enabling schema validation has a performance penalty when inserting new content into the tree because\n\t * additional checks are done. Enable this option only in scenarios where you are ok with that operation being a\n\t * bit slower.\n\t *\n\t * For additional validation in more cases, see {@link ForestTypeExpensiveDebug}.\n\t */\n\tenableSchemaValidation?: boolean;\n\n\t/**\n\t * A flag used to opt into strict rules ensuring that the schema avoids cases which can make the type of nodes ambiguous when importing or exporting data.\n\t * @defaultValue `false`.\n\t *\n\t * @remarks\n\t * When this is true, it ensures that the compile time type safety for data when constructing nodes is sufficient to ensure that the runtime behavior will not give node data ambiguity errors.\n\t *\n\t * This ensures that the canonical JSON-like representation of all unions in the tree are lossless and unambiguous.\n\t * This canonical JSON-like representation consists of arrays, plain old JavaScript objects with string keys, booleans, numbers (excluding NaN, -0 and infinities), strings, null and {@link @fluidframework/core-interfaces#IFluidHandle}s.\n\t * It is compatible with the node creation APIs (such as schema class constructors) and is also compatible with JSON assuming any IFluidHandles get special handling (since they are not JSON compatible).\n\t * Currently these cases can cause ambiguity in a union:\n\t *\n\t * - More than one ArrayNode type: it's impossible to tell which array type is intended in the case of empty arrays (`[]`).\n\t *\n\t * - More than one MapNode type: it's impossible to tell which map type is intended in the case of an empty map (`{}`).\n\t *\n\t * - Both a MapNode and an ArrayNode: this case is not a problem for the canonical JSON representation, but is an issue when constructing from an Iterable, which is supported for both MapNode and ArrayNode.\n\t *\n\t * - Both a MapNode and an ObjectNode: when the input is valid for the ObjectNode, the current parser always considers it ambiguous with being a MapNode.\n\t *\n\t * - ObjectNodes which have fields (required or optional) which include all required fields of another ObjectNode: currently each ObjectNode is differentiated by the presence of its required fields.\n\t *\n\t * This check is conservative: some complex cases may error if the current simple algorithm cannot show no ambiguity is possible.\n\t * This check may become more permissive over time.\n\t *\n\t * @example Ambiguous schema (with `preventAmbiguity: false`), and how to disambiguate it using {@link Unhydrated} nodes:\n\t * ```typescript\n\t * const schemaFactory = new SchemaFactory(\"com.example\");\n\t * class Feet extends schemaFactory.object(\"Feet\", { length: schemaFactory.number }) {}\n\t * class Meters extends schemaFactory.object(\"Meters\", { length: schemaFactory.number }) {}\n\t * const config = new TreeViewConfiguration({\n\t * \t// This combination of schema can lead to ambiguous cases and will error if `preventAmbiguity` is true.\n\t * \tschema: [Feet, Meters],\n\t * \tpreventAmbiguity: false,\n\t * });\n\t * const view = tree.viewWith(config);\n\t * // This is invalid since it is ambiguous which type of node is being constructed:\n\t * // view.initialize({ length: 5 });\n\t * // To work, an explicit type can be provided by using an {@link Unhydrated} Node:\n\t * view.initialize(new Meters({ length: 5 }));\n\t * ```\n\t *\n\t * @example Schema disambiguated by adjusting field names, validated with `preventAmbiguity: true:`\n\t * ```typescript\n\t * const schemaFactory = new SchemaFactory(\"com.example\");\n\t * class Feet extends schemaFactory.object(\"Feet\", { length: schemaFactory.number }) {}\n\t * class Meters extends schemaFactory.object(\"Meters\", {\n\t * \t// To avoid ambiguity when parsing unions of Feet and Meters, this renames the length field to \"meters\".\n\t * \t// To preserve compatibility with existing data from the ambiguous case,\n\t * \t// `{ key: \"length\" }` is set, so when persisted in the tree \"length\" is used as the field name.\n\t * \tmeters: schemaFactory.required(schemaFactory.number, { key: \"length\" }),\n\t * }) {}\n\t * const config = new TreeViewConfiguration({\n\t * \t// This combination of schema is not ambiguous because `Feet` and `Meters` have different required keys.\n\t * \tschema: [Feet, Meters],\n\t * \tpreventAmbiguity: true,\n\t * });\n\t * const view = tree.viewWith(config);\n\t * // This now works, since the field is sufficient to determine this is a `Meters` node.\n\t * view.initialize({ meters: 5 });\n\t * ```\n\t *\n\t * @privateRemarks\n\t * In the future, we can support lossless round tripping via the canonical JSON-like representation above when unambiguous.\n\t * This could be done via methods added to `Tree` to export and import such objects, which would give us a place to explicitly define the type of this representation.\n\t *\n\t * To make this more permissive in the future we can:\n\t *\n\t * - Make unhydratedFlexTreeFromInsertable more permissive (ex: allow disambiguation based on leaf type)\n\t * - Update this check to more tightly match unhydratedFlexTreeFromInsertable\n\t * - Add options to help schema authors disambiguate their types, such as \"constant fields\" which are not persisted, and always have a constant value.\n\t *\n\t * The above examples exist in executable form in this files tests, and should be updated there then copied back here.\n\t */\n\treadonly preventAmbiguity?: boolean;\n}\n\nconst defaultTreeConfigurationOptions: Required<ITreeConfigurationOptions> = {\n\tenableSchemaValidation: false,\n\tpreventAmbiguity: false,\n};\n\n/**\n * Property-bag configuration for {@link TreeViewConfiguration} construction.\n * @public\n */\nexport interface ITreeViewConfiguration<\n\tTSchema extends ImplicitFieldSchema = ImplicitFieldSchema,\n> extends ITreeConfigurationOptions {\n\t/**\n\t * The schema which the application wants to view the tree with.\n\t */\n\treadonly schema: TSchema;\n}\n\n/**\n * Configuration for {@link ViewableTree.viewWith}.\n * @sealed @public\n */\nexport class TreeViewConfiguration<\n\tconst TSchema extends ImplicitFieldSchema = ImplicitFieldSchema,\n> implements Required<ITreeViewConfiguration<TSchema>>\n{\n\tprotected _typeCheck!: MakeNominal;\n\n\t/**\n\t * {@inheritDoc ITreeViewConfiguration.schema}\n\t */\n\tpublic readonly schema!: TSchema;\n\n\t/**\n\t * {@inheritDoc ITreeConfigurationOptions.enableSchemaValidation}\n\t */\n\tpublic readonly enableSchemaValidation!: boolean;\n\n\t/**\n\t * {@inheritDoc ITreeConfigurationOptions.preventAmbiguity}\n\t */\n\tpublic readonly preventAmbiguity!: boolean;\n\n\t/**\n\t * Construct a new {@link TreeViewConfiguration}.\n\t *\n\t * @param props - Property bag of configuration options.\n\t *\n\t * @remarks\n\t * Performing this construction deeply validates the provided schema.\n\t * This means that when this constructor is called, all {@link LazyItem} {@link TreeNodeSchema} references will be evaluated (using {@link evaluateLazySchema}).\n\t * This means that the declarations for all transitively reachable {@link TreeNodeSchema} must be available at this time.\n\t *\n\t * For example, a schema reachable from this configuration cannot reference this configuration during its declaration,\n\t * since this would be a cyclic dependency that will cause an error when constructing this configuration.\n\t */\n\tpublic constructor(props: ITreeViewConfiguration<TSchema>) {\n\t\tif (this.constructor === TreeViewConfiguration) {\n\t\t\t// Ensure all TreeViewConfiguration instances are actually TreeViewConfigurationAlpha, allowing `asAlpha` to work correctly.\n\t\t\t// If everything in TreeViewConfigurationAlpha is stabilized and this is removed, the `!` on the properties above should be removed to restore better type safety.\n\t\t\treturn new TreeViewConfigurationAlpha(props);\n\t\t}\n\t\tassert(\n\t\t\t// The type cast here is needed to avoid this assert narrowing \"this\" to never, breaking the code below.\n\t\t\t(this.constructor as unknown) === TreeViewConfigurationAlpha,\n\t\t\t0xc9e /* Invalid configuration class constructed. */,\n\t\t);\n\n\t\tconst config = { ...defaultTreeConfigurationOptions, ...props };\n\t\tthis.schema = config.schema;\n\t\tthis.enableSchemaValidation = config.enableSchemaValidation;\n\t\tthis.preventAmbiguity = config.preventAmbiguity;\n\n\t\t// Ambiguity errors are lower priority to report than invalid schema errors, so collect these in an array and report them all at once.\n\t\tconst ambiguityErrors: string[] = [];\n\n\t\t// Validate the schema and collect ambiguity errors.\n\t\t// This does a lot of validation (throwing usage errors as a side effect) in addition to just collecting ambiguity errors.\n\t\t// ambiguityErrors are considered a lower priority, so only thrown if no other errors are found.\n\t\twalkFieldSchema(config.schema, {\n\t\t\tallowedTypes({ types }: AllowedTypesFullEvaluated): void {\n\t\t\t\tcheckUnion(\n\t\t\t\t\ttypes.map((t) => t.type),\n\t\t\t\t\tconfig.preventAmbiguity,\n\t\t\t\t\tambiguityErrors,\n\t\t\t\t);\n\t\t\t},\n\t\t});\n\n\t\tif (ambiguityErrors.length > 0) {\n\t\t\t// Duplicate errors are common since when two types conflict, both orders error:\n\t\t\tconst deduplicated = new Set(ambiguityErrors);\n\t\t\tthrow new UsageError(`Ambiguous schema found:\\n${[...deduplicated].join(\"\\n\")}`);\n\t\t}\n\t}\n}\n\n/**\n * {@link TreeViewConfiguration} extended with some alpha APIs.\n * @remarks\n * See {@link (asAlpha:2)} for an API to downcast from {@link TreeViewConfiguration} to this type.\n * @sealed @alpha\n */\nexport class TreeViewConfigurationAlpha<\n\t\tconst TSchema extends ImplicitFieldSchema = ImplicitFieldSchema,\n\t>\n\textends TreeViewConfiguration<TSchema>\n\timplements TreeSchema\n{\n\tpublic readonly root: FieldSchemaAlpha;\n\tpublic readonly definitions: ReadonlyMap<\n\t\tstring,\n\t\tSimpleNodeSchema<SchemaType.View> & TreeNodeSchema\n\t>;\n\n\tpublic constructor(props: ITreeViewConfiguration<TSchema>) {\n\t\tsuper(props);\n\t\tconst treeSchema = createTreeSchema(this.schema);\n\t\tthis.root = treeSchema.root;\n\t\tthis.definitions = treeSchema.definitions;\n\n\t\t// Eagerly perform these conversions to surface errors sooner.\n\t\ttoInitialSchema(this.root);\n\t\ttransformSimpleSchema(treeSchema, toUnhydratedSchema);\n\t}\n}\n\n/**\n * Pretty print a set of types for use in error messages.\n */\nfunction formatTypes(allowed: Iterable<TreeNodeSchema>): string {\n\t// Use JSON.stringify to quote and escape identifiers.\n\t// Don't just use a single array JSON.stringify since that omits spaces between items\n\treturn `[${Array.from(allowed, (s) => JSON.stringify(s.identifier)).join(\", \")}]`;\n}\n\n/**\n * Check if union contents are valid (shallowly).\n *\n * @param union - The union of {@link TreeNodeSchema} to check.\n * @param preventAmbiguity - If true, detect cases documented in {@link ITreeConfigurationOptions.preventAmbiguity}, reporting them to `ambiguityErrors`.\n * @param ambiguityErrors - An array into which this function inserts any ambiguity errors, see {@link ITreeConfigurationOptions.preventAmbiguity}.\n *\n * @remarks\n * Includes checks for non-ambiguity errors as well: such as duplicate schemas in the union.\n * Any non-ambiguity errors are thrown as exceptions: `UsageError`s if causable by incorrect API use, and asserts if violating internal invariants.\n */\nexport function checkUnion(\n\tunion: Iterable<TreeNodeSchema>,\n\tpreventAmbiguity: boolean,\n\tambiguityErrors: string[],\n): void {\n\tconst checked: Set<TreeNodeSchema> = new Set();\n\tconst maps: MapNodeSchema[] = [];\n\tconst arrays: ArrayNodeSchema[] = [];\n\tconst records: RecordNodeSchema[] = [];\n\tconst objects: ObjectNodeSchema[] = [];\n\n\t// Map from key to schema using that key\n\tconst allObjectKeys: Map<string, Set<TreeNodeSchema>> = new Map();\n\n\tfor (const schema of union) {\n\t\tif (checked.has(schema)) {\n\t\t\tthrow new UsageError(`Duplicate schema in allowed types: ${schema.identifier}`);\n\t\t}\n\t\tchecked.add(schema);\n\n\t\tswitch (schema.kind) {\n\t\t\tcase NodeKind.Leaf: {\n\t\t\t\t// nothing to do\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase NodeKind.Object: {\n\t\t\t\tassert(isObjectNodeSchema(schema), 0xbde /* Expected object schema. */);\n\t\t\t\tobjects.push(schema);\n\t\t\t\tfor (const key of schema.fields.keys()) {\n\t\t\t\t\tgetOrCreate(allObjectKeys, key, () => new Set()).add(schema);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase NodeKind.Array: {\n\t\t\t\tassert(isArrayNodeSchema(schema), 0xbdf /* Expected array schema. */);\n\t\t\t\tarrays.push(schema);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase NodeKind.Map: {\n\t\t\t\tassert(isMapNodeSchema(schema), 0xbe0 /* Expected map schema. */);\n\t\t\t\tmaps.push(schema);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase NodeKind.Record: {\n\t\t\t\tassert(isRecordNodeSchema(schema), 0xbe1 /* Expected record schema. */);\n\t\t\t\trecords.push(schema);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tunreachableCase(schema.kind);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!preventAmbiguity) {\n\t\t// All remaining checks are for the preventAmbiguity case, so skip them if not enabled.\n\t\treturn;\n\t}\n\n\tif (arrays.length > 1) {\n\t\tambiguityErrors.push(\n\t\t\t`More than one kind of array allowed within union (${formatTypes(arrays)}). This would require type disambiguation which is not supported by arrays during import or export.`,\n\t\t);\n\t}\n\n\tif (maps.length > 1) {\n\t\tambiguityErrors.push(\n\t\t\t`More than one kind of map allowed within union (${formatTypes(maps)}). This would require type disambiguation which is not supported by maps during import or export.`,\n\t\t);\n\t}\n\n\tif (records.length > 1) {\n\t\tambiguityErrors.push(\n\t\t\t`More than one kind of record allowed within union (${formatTypes(records)}). This would require type disambiguation which is not supported by records during import or export.`,\n\t\t);\n\t}\n\n\tif (maps.length > 0 && arrays.length > 0) {\n\t\tambiguityErrors.push(\n\t\t\t`Both a map and an array allowed within union (${formatTypes([...arrays, ...maps])}). Both can be implicitly constructed from iterables like arrays, which are ambiguous when the array is empty.`,\n\t\t);\n\t}\n\n\tconst nodeKindListEntries = [];\n\tif (objects.length > 0) {\n\t\tnodeKindListEntries.push(\"objects\");\n\t}\n\tif (maps.length > 0) {\n\t\tnodeKindListEntries.push(\"maps\");\n\t}\n\tif (records.length > 0) {\n\t\tnodeKindListEntries.push(\"records\");\n\t}\n\tif (nodeKindListEntries.length > 1) {\n\t\tconst nodeKindListString =\n\t\t\tnodeKindListEntries.length === 2\n\t\t\t\t? `${nodeKindListEntries[0] ?? oob()} and ${nodeKindListEntries[1] ?? oob()}`\n\t\t\t\t: `${nodeKindListEntries.slice(0, -1).join(\", \")}, and ${nodeKindListEntries[nodeKindListEntries.length - 1]}`;\n\t\tambiguityErrors.push(\n\t\t\t`A combination of ${nodeKindListString} is allowed within union (${formatTypes([...objects, ...maps, ...records])}). These can be constructed from objects and can be ambiguous.`,\n\t\t);\n\t}\n\n\t// Check for objects which fully overlap:\n\tfor (const schema of objects) {\n\t\t// All objects which might be ambiguous relative to `schema`.\n\t\tconst possiblyAmbiguous = new Set(objects);\n\n\t\t// A schema can't be ambiguous with itself\n\t\tpossiblyAmbiguous.delete(schema);\n\n\t\t// For each field of schema, remove schema from possiblyAmbiguous that do not have that field\n\t\tfor (const [key, field] of schema.fields) {\n\t\t\tif (field.kind === FieldKind.Required) {\n\t\t\t\tconst withKey = allObjectKeys.get(key) ?? fail(0xb35 /* missing schema */);\n\t\t\t\tfor (const candidate of possiblyAmbiguous) {\n\t\t\t\t\tif (!withKey.has(candidate)) {\n\t\t\t\t\t\tpossiblyAmbiguous.delete(candidate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (possiblyAmbiguous.size > 0) {\n\t\t\t// TODO: make this check more permissive.\n\t\t\t// Allow using the type of the field to disambiguate, at least for leaf types.\n\t\t\t// Add \"constant\" fields which can be used to disambiguate even more cases without adding persisted data: maybe make them optional in constructor?\n\t\t\t// Consider separating unambiguous implicit construction format from constructor arguments at type level, allowing constructor to superset the implicit construction options (ex: optional constant fields).\n\t\t\t// The policy here however must remain at least as conservative as shallowCompatibilityTest in src/simple-tree/unhydratedFlexTreeFromInsertable.ts.\n\n\t\t\tambiguityErrors.push(\n\t\t\t\t`The required fields of ${JSON.stringify(schema.identifier)} are insufficient to differentiate it from the following types: ${formatTypes(possiblyAmbiguous)}. For objects to be considered unambiguous, each must have required fields that do not all occur on any other object in the union.`,\n\t\t\t);\n\t\t}\n\t}\n}\n"]}
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/simple-tree/api/configuration.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAyF;AACzF,uEAAsE;AAEtE,kDAAkD;AAElD,+CAI0B;AAC1B,sDAA+F;AAC/F,qDASgC;AAEhC,4DAI8B;AAC9B,oDAAqE;AACrE,8DAAwD;AAsGxD,MAAM,+BAA+B,GAAwC;IAC5E,sBAAsB,EAAE,KAAK;IAC7B,gBAAgB,EAAE,KAAK;CACvB,CAAC;AAmBF;;;GAGG;AACH,MAAa,qBAAqB;IAqBjC;;;;;;;;;;;;OAYG;IACH,YAAmB,KAAsC;QACxD,IAAI,IAAI,CAAC,WAAW,KAAK,qBAAqB,EAAE,CAAC;YAChD,4HAA4H;YAC5H,kKAAkK;YAClK,OAAO,IAAI,0BAA0B,CAAC,KAAK,CAAC,CAAC;QAC9C,CAAC;QACD,IAAA,iBAAM;QACL,wGAAwG;QACvG,IAAI,CAAC,WAAuB,KAAK,0BAA0B,EAC5D,KAAK,CAAC,8CAA8C,CACpD,CAAC;QAEF,MAAM,MAAM,GAAG,EAAE,GAAG,+BAA+B,EAAE,GAAG,KAAK,EAAE,CAAC;QAChE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,sBAAsB,GAAG,MAAM,CAAC,sBAAsB,CAAC;QAC5D,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAEhD,sIAAsI;QACtI,MAAM,eAAe,GAAa,EAAE,CAAC;QAErC,oDAAoD;QACpD,0HAA0H;QAC1H,gGAAgG;QAChG,IAAA,oCAAe,EAAC,MAAM,CAAC,MAAM,EAAE;YAC9B,YAAY,CAAC,EAAE,KAAK,EAA6B;gBAChD,UAAU,CACT,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC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BAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEjC,6FAA6F;QAC7F,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAC1C,IAAI,KAAK,CAAC,IAAI,KAAK,0BAAS,CAAC,QAAQ,EAAE,CAAC;gBACvC,MAAM,OAAO,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,IAAA,eAAI,EAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;gBAC3E,KAAK,MAAM,SAAS,IAAI,iBAAiB,EAAE,CAAC;oBAC3C,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;wBAC7B,iBAAiB,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;oBACrC,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;QAED,IAAI,iBAAiB,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YAChC,yCAAyC;YACzC,8EAA8E;YAC9E,kJAAkJ;YAClJ,4MAA4M;YAC5M,mJAAmJ;YAEnJ,eAAe,CAAC,IAAI,CACnB,0BAA0B,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,mEAAmE,WAAW,CAAC,iBAAiB,CAAC,oIAAoI,CAChS,CAAC;QACH,CAAC;IACF,CAAC;AACF,CAAC;AAvID,gCAuIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail, oob, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { getOrCreate } from \"../../util/index.js\";\nimport type { MakeNominal } from \"../../util/index.js\";\nimport {\n\ttype AllowedTypesFullEvaluated,\n\tNodeKind,\n\ttype TreeNodeSchema,\n} from \"../core/index.js\";\nimport { type FieldSchemaAlpha, type ImplicitFieldSchema, FieldKind } from \"../fieldSchema.js\";\nimport {\n\tisArrayNodeSchema,\n\tisMapNodeSchema,\n\tisObjectNodeSchema,\n\tisRecordNodeSchema,\n\ttype ArrayNodeSchema,\n\ttype MapNodeSchema,\n\ttype ObjectNodeSchema,\n\ttype RecordNodeSchema,\n} from \"../node-kinds/index.js\";\nimport type { SchemaType, SimpleNodeSchema } from \"../simpleSchema.js\";\nimport {\n\ttoInitialSchema,\n\ttoUnhydratedSchema,\n\ttransformSimpleSchema,\n} from \"../toStoredSchema.js\";\nimport { createTreeSchema, type TreeSchema } from \"../treeSchema.js\";\nimport { walkFieldSchema } from \"../walkFieldSchema.js\";\n\n/**\n * Options when constructing a tree view.\n * @public\n */\nexport interface ITreeConfigurationOptions {\n\t/**\n\t * If `true`, the tree will perform additional validation of content against its stored schema\n\t * and throw an error if the new content doesn't match the expected schema.\n\t *\n\t * @defaultValue `false`.\n\t *\n\t * @remarks\n\t * Currently most cases already have some schema validation, so this is mainly for additional validation which may be useful when debugging issues,\n\t * working with untyped APIs, or when the small performance overhead is a non-issue.\n\t *\n\t * Enabling schema validation has a performance penalty when inserting new content into the tree because\n\t * additional checks are done. Enable this option only in scenarios where you are ok with that operation being a\n\t * bit slower.\n\t *\n\t * For additional validation in more cases, see {@link ForestTypeExpensiveDebug}.\n\t */\n\tenableSchemaValidation?: boolean;\n\n\t/**\n\t * A flag used to opt into strict rules ensuring that the schema avoids cases which can make the type of nodes ambiguous when importing or exporting data.\n\t * @defaultValue `false`.\n\t *\n\t * @remarks\n\t * When this is true, it ensures that the compile time type safety for data when constructing nodes is sufficient to ensure that the runtime behavior will not give node data ambiguity errors.\n\t *\n\t * This ensures that the canonical JSON-like representation of all unions in the tree are lossless and unambiguous.\n\t * This canonical JSON-like representation consists of arrays, plain old JavaScript objects with string keys, booleans, numbers (excluding NaN, -0 and infinities), strings, null and {@link @fluidframework/core-interfaces#IFluidHandle}s.\n\t * It is compatible with the node creation APIs (such as schema class constructors) and is also compatible with JSON assuming any IFluidHandles get special handling (since they are not JSON compatible).\n\t * Currently these cases can cause ambiguity in a union:\n\t *\n\t * - More than one ArrayNode type: it's impossible to tell which array type is intended in the case of empty arrays (`[]`).\n\t *\n\t * - More than one MapNode type: it's impossible to tell which map type is intended in the case of an empty map (`{}`).\n\t *\n\t * - Both a MapNode and an ArrayNode: this case is not a problem for the canonical JSON representation, but is an issue when constructing from an Iterable, which is supported for both MapNode and ArrayNode.\n\t *\n\t * - Both a MapNode and an ObjectNode: when the input is valid for the ObjectNode, the current parser always considers it ambiguous with being a MapNode.\n\t *\n\t * - ObjectNodes which have fields (required or optional) which include all required fields of another ObjectNode: currently each ObjectNode is differentiated by the presence of its required fields.\n\t *\n\t * This check is conservative: some complex cases may error if the current simple algorithm cannot show no ambiguity is possible.\n\t * This check may become more permissive over time.\n\t *\n\t * @example Ambiguous schema (with `preventAmbiguity: false`), and how to disambiguate it using {@link Unhydrated} nodes:\n\t * ```typescript\n\t * const schemaFactory = new SchemaFactory(\"com.example\");\n\t * class Feet extends schemaFactory.object(\"Feet\", { length: schemaFactory.number }) {}\n\t * class Meters extends schemaFactory.object(\"Meters\", { length: schemaFactory.number }) {}\n\t * const config = new TreeViewConfiguration({\n\t * \t// This combination of schema can lead to ambiguous cases and will error if `preventAmbiguity` is true.\n\t * \tschema: [Feet, Meters],\n\t * \tpreventAmbiguity: false,\n\t * });\n\t * const view = tree.viewWith(config);\n\t * // This is invalid since it is ambiguous which type of node is being constructed:\n\t * // view.initialize({ length: 5 });\n\t * // To work, an explicit type can be provided by using an {@link Unhydrated} Node:\n\t * view.initialize(new Meters({ length: 5 }));\n\t * ```\n\t *\n\t * @example Schema disambiguated by adjusting field names, validated with `preventAmbiguity: true:`\n\t * ```typescript\n\t * const schemaFactory = new SchemaFactory(\"com.example\");\n\t * class Feet extends schemaFactory.object(\"Feet\", { length: schemaFactory.number }) {}\n\t * class Meters extends schemaFactory.object(\"Meters\", {\n\t * \t// To avoid ambiguity when parsing unions of Feet and Meters, this renames the length field to \"meters\".\n\t * \t// To preserve compatibility with existing data from the ambiguous case,\n\t * \t// `{ key: \"length\" }` is set, so when persisted in the tree \"length\" is used as the field name.\n\t * \tmeters: schemaFactory.required(schemaFactory.number, { key: \"length\" }),\n\t * }) {}\n\t * const config = new TreeViewConfiguration({\n\t * \t// This combination of schema is not ambiguous because `Feet` and `Meters` have different required keys.\n\t * \tschema: [Feet, Meters],\n\t * \tpreventAmbiguity: true,\n\t * });\n\t * const view = tree.viewWith(config);\n\t * // This now works, since the field is sufficient to determine this is a `Meters` node.\n\t * view.initialize({ meters: 5 });\n\t * ```\n\t *\n\t * @privateRemarks\n\t * In the future, we can support lossless round tripping via the canonical JSON-like representation above when unambiguous.\n\t * This could be done via methods added to `Tree` to export and import such objects, which would give us a place to explicitly define the type of this representation.\n\t *\n\t * To make this more permissive in the future we can:\n\t *\n\t * - Make unhydratedFlexTreeFromInsertable more permissive (ex: allow disambiguation based on leaf type)\n\t * - Update this check to more tightly match unhydratedFlexTreeFromInsertable\n\t * - Add options to help schema authors disambiguate their types, such as \"constant fields\" which are not persisted, and always have a constant value.\n\t *\n\t * The above examples exist in executable form in this files tests, and should be updated there then copied back here.\n\t */\n\treadonly preventAmbiguity?: boolean;\n}\n\nconst defaultTreeConfigurationOptions: Required<ITreeConfigurationOptions> = {\n\tenableSchemaValidation: false,\n\tpreventAmbiguity: false,\n};\n\n/**\n * Property-bag configuration for {@link TreeViewConfiguration} construction.\n * @public\n */\nexport interface ITreeViewConfiguration<\n\tTSchema extends ImplicitFieldSchema = ImplicitFieldSchema,\n> extends ITreeConfigurationOptions {\n\t/**\n\t * The schema which the application wants to view the tree with.\n\t * @remarks\n\t * Use {@link SchemaFactory} to construct the schema.\n\t * Changes to this schema between different versions have important compatibility implications.\n\t * See the {@link https://fluidframework.com/docs/data-structures/tree/schema-evolution | documentation on schema evolution} for more details.\n\t */\n\treadonly schema: TSchema;\n}\n\n/**\n * Configuration for {@link ViewableTree.viewWith}.\n * @sealed @public\n */\nexport class TreeViewConfiguration<\n\tconst TSchema extends ImplicitFieldSchema = ImplicitFieldSchema,\n> implements Required<ITreeViewConfiguration<TSchema>>\n{\n\tprotected _typeCheck!: MakeNominal;\n\n\t/**\n\t * {@inheritDoc ITreeViewConfiguration.schema}\n\t */\n\tpublic readonly schema!: TSchema;\n\n\t/**\n\t * {@inheritDoc ITreeConfigurationOptions.enableSchemaValidation}\n\t */\n\tpublic readonly enableSchemaValidation!: boolean;\n\n\t/**\n\t * {@inheritDoc ITreeConfigurationOptions.preventAmbiguity}\n\t */\n\tpublic readonly preventAmbiguity!: boolean;\n\n\t/**\n\t * Construct a new {@link TreeViewConfiguration}.\n\t *\n\t * @param props - Property bag of configuration options.\n\t *\n\t * @remarks\n\t * Performing this construction deeply validates the provided schema.\n\t * This means that when this constructor is called, all {@link LazyItem} {@link TreeNodeSchema} references will be evaluated (using {@link evaluateLazySchema}).\n\t * This means that the declarations for all transitively reachable {@link TreeNodeSchema} must be available at this time.\n\t *\n\t * For example, a schema reachable from this configuration cannot reference this configuration during its declaration,\n\t * since this would be a cyclic dependency that will cause an error when constructing this configuration.\n\t */\n\tpublic constructor(props: ITreeViewConfiguration<TSchema>) {\n\t\tif (this.constructor === TreeViewConfiguration) {\n\t\t\t// Ensure all TreeViewConfiguration instances are actually TreeViewConfigurationAlpha, allowing `asAlpha` to work correctly.\n\t\t\t// If everything in TreeViewConfigurationAlpha is stabilized and this is removed, the `!` on the properties above should be removed to restore better type safety.\n\t\t\treturn new TreeViewConfigurationAlpha(props);\n\t\t}\n\t\tassert(\n\t\t\t// The type cast here is needed to avoid this assert narrowing \"this\" to never, breaking the code below.\n\t\t\t(this.constructor as unknown) === TreeViewConfigurationAlpha,\n\t\t\t0xc9e /* Invalid configuration class constructed. */,\n\t\t);\n\n\t\tconst config = { ...defaultTreeConfigurationOptions, ...props };\n\t\tthis.schema = config.schema;\n\t\tthis.enableSchemaValidation = config.enableSchemaValidation;\n\t\tthis.preventAmbiguity = config.preventAmbiguity;\n\n\t\t// Ambiguity errors are lower priority to report than invalid schema errors, so collect these in an array and report them all at once.\n\t\tconst ambiguityErrors: string[] = [];\n\n\t\t// Validate the schema and collect ambiguity errors.\n\t\t// This does a lot of validation (throwing usage errors as a side effect) in addition to just collecting ambiguity errors.\n\t\t// ambiguityErrors are considered a lower priority, so only thrown if no other errors are found.\n\t\twalkFieldSchema(config.schema, {\n\t\t\tallowedTypes({ types }: AllowedTypesFullEvaluated): void {\n\t\t\t\tcheckUnion(\n\t\t\t\t\ttypes.map((t) => t.type),\n\t\t\t\t\tconfig.preventAmbiguity,\n\t\t\t\t\tambiguityErrors,\n\t\t\t\t);\n\t\t\t},\n\t\t});\n\n\t\tif (ambiguityErrors.length > 0) {\n\t\t\t// Duplicate errors are common since when two types conflict, both orders error:\n\t\t\tconst deduplicated = new Set(ambiguityErrors);\n\t\t\tthrow new UsageError(`Ambiguous schema found:\\n${[...deduplicated].join(\"\\n\")}`);\n\t\t}\n\t}\n}\n\n/**\n * {@link TreeViewConfiguration} extended with some alpha APIs.\n * @remarks\n * See {@link (asAlpha:2)} for an API to downcast from {@link TreeViewConfiguration} to this type.\n * @sealed @alpha\n */\nexport class TreeViewConfigurationAlpha<\n\t\tconst TSchema extends ImplicitFieldSchema = ImplicitFieldSchema,\n\t>\n\textends TreeViewConfiguration<TSchema>\n\timplements TreeSchema\n{\n\tpublic readonly root: FieldSchemaAlpha;\n\tpublic readonly definitions: ReadonlyMap<\n\t\tstring,\n\t\tSimpleNodeSchema<SchemaType.View> & TreeNodeSchema\n\t>;\n\n\tpublic constructor(props: ITreeViewConfiguration<TSchema>) {\n\t\tsuper(props);\n\t\tconst treeSchema = createTreeSchema(this.schema);\n\t\tthis.root = treeSchema.root;\n\t\tthis.definitions = treeSchema.definitions;\n\n\t\t// Eagerly perform these conversions to surface errors sooner.\n\t\ttoInitialSchema(this.root);\n\t\ttransformSimpleSchema(treeSchema, toUnhydratedSchema);\n\t}\n}\n\n/**\n * Pretty print a set of types for use in error messages.\n */\nfunction formatTypes(allowed: Iterable<TreeNodeSchema>): string {\n\t// Use JSON.stringify to quote and escape identifiers.\n\t// Don't just use a single array JSON.stringify since that omits spaces between items\n\treturn `[${Array.from(allowed, (s) => JSON.stringify(s.identifier)).join(\", \")}]`;\n}\n\n/**\n * Check if union contents are valid (shallowly).\n *\n * @param union - The union of {@link TreeNodeSchema} to check.\n * @param preventAmbiguity - If true, detect cases documented in {@link ITreeConfigurationOptions.preventAmbiguity}, reporting them to `ambiguityErrors`.\n * @param ambiguityErrors - An array into which this function inserts any ambiguity errors, see {@link ITreeConfigurationOptions.preventAmbiguity}.\n *\n * @remarks\n * Includes checks for non-ambiguity errors as well: such as duplicate schemas in the union.\n * Any non-ambiguity errors are thrown as exceptions: `UsageError`s if causable by incorrect API use, and asserts if violating internal invariants.\n */\nexport function checkUnion(\n\tunion: Iterable<TreeNodeSchema>,\n\tpreventAmbiguity: boolean,\n\tambiguityErrors: string[],\n): void {\n\tconst checked: Set<TreeNodeSchema> = new Set();\n\tconst maps: MapNodeSchema[] = [];\n\tconst arrays: ArrayNodeSchema[] = [];\n\tconst records: RecordNodeSchema[] = [];\n\tconst objects: ObjectNodeSchema[] = [];\n\n\t// Map from key to schema using that key\n\tconst allObjectKeys: Map<string, Set<TreeNodeSchema>> = new Map();\n\n\tfor (const schema of union) {\n\t\tif (checked.has(schema)) {\n\t\t\tthrow new UsageError(`Duplicate schema in allowed types: ${schema.identifier}`);\n\t\t}\n\t\tchecked.add(schema);\n\n\t\tswitch (schema.kind) {\n\t\t\tcase NodeKind.Leaf: {\n\t\t\t\t// nothing to do\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase NodeKind.Object: {\n\t\t\t\tassert(isObjectNodeSchema(schema), 0xbde /* Expected object schema. */);\n\t\t\t\tobjects.push(schema);\n\t\t\t\tfor (const key of schema.fields.keys()) {\n\t\t\t\t\tgetOrCreate(allObjectKeys, key, () => new Set()).add(schema);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase NodeKind.Array: {\n\t\t\t\tassert(isArrayNodeSchema(schema), 0xbdf /* Expected array schema. */);\n\t\t\t\tarrays.push(schema);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase NodeKind.Map: {\n\t\t\t\tassert(isMapNodeSchema(schema), 0xbe0 /* Expected map schema. */);\n\t\t\t\tmaps.push(schema);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase NodeKind.Record: {\n\t\t\t\tassert(isRecordNodeSchema(schema), 0xbe1 /* Expected record schema. */);\n\t\t\t\trecords.push(schema);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tunreachableCase(schema.kind);\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!preventAmbiguity) {\n\t\t// All remaining checks are for the preventAmbiguity case, so skip them if not enabled.\n\t\treturn;\n\t}\n\n\tif (arrays.length > 1) {\n\t\tambiguityErrors.push(\n\t\t\t`More than one kind of array allowed within union (${formatTypes(arrays)}). This would require type disambiguation which is not supported by arrays during import or export.`,\n\t\t);\n\t}\n\n\tif (maps.length > 1) {\n\t\tambiguityErrors.push(\n\t\t\t`More than one kind of map allowed within union (${formatTypes(maps)}). This would require type disambiguation which is not supported by maps during import or export.`,\n\t\t);\n\t}\n\n\tif (records.length > 1) {\n\t\tambiguityErrors.push(\n\t\t\t`More than one kind of record allowed within union (${formatTypes(records)}). This would require type disambiguation which is not supported by records during import or export.`,\n\t\t);\n\t}\n\n\tif (maps.length > 0 && arrays.length > 0) {\n\t\tambiguityErrors.push(\n\t\t\t`Both a map and an array allowed within union (${formatTypes([...arrays, ...maps])}). Both can be implicitly constructed from iterables like arrays, which are ambiguous when the array is empty.`,\n\t\t);\n\t}\n\n\tconst nodeKindListEntries = [];\n\tif (objects.length > 0) {\n\t\tnodeKindListEntries.push(\"objects\");\n\t}\n\tif (maps.length > 0) {\n\t\tnodeKindListEntries.push(\"maps\");\n\t}\n\tif (records.length > 0) {\n\t\tnodeKindListEntries.push(\"records\");\n\t}\n\tif (nodeKindListEntries.length > 1) {\n\t\tconst nodeKindListString =\n\t\t\tnodeKindListEntries.length === 2\n\t\t\t\t? `${nodeKindListEntries[0] ?? oob()} and ${nodeKindListEntries[1] ?? oob()}`\n\t\t\t\t: `${nodeKindListEntries.slice(0, -1).join(\", \")}, and ${nodeKindListEntries[nodeKindListEntries.length - 1]}`;\n\t\tambiguityErrors.push(\n\t\t\t`A combination of ${nodeKindListString} is allowed within union (${formatTypes([...objects, ...maps, ...records])}). These can be constructed from objects and can be ambiguous.`,\n\t\t);\n\t}\n\n\t// Check for objects which fully overlap:\n\tfor (const schema of objects) {\n\t\t// All objects which might be ambiguous relative to `schema`.\n\t\tconst possiblyAmbiguous = new Set(objects);\n\n\t\t// A schema can't be ambiguous with itself\n\t\tpossiblyAmbiguous.delete(schema);\n\n\t\t// For each field of schema, remove schema from possiblyAmbiguous that do not have that field\n\t\tfor (const [key, field] of schema.fields) {\n\t\t\tif (field.kind === FieldKind.Required) {\n\t\t\t\tconst withKey = allObjectKeys.get(key) ?? fail(0xb35 /* missing schema */);\n\t\t\t\tfor (const candidate of possiblyAmbiguous) {\n\t\t\t\t\tif (!withKey.has(candidate)) {\n\t\t\t\t\t\tpossiblyAmbiguous.delete(candidate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (possiblyAmbiguous.size > 0) {\n\t\t\t// TODO: make this check more permissive.\n\t\t\t// Allow using the type of the field to disambiguate, at least for leaf types.\n\t\t\t// Add \"constant\" fields which can be used to disambiguate even more cases without adding persisted data: maybe make them optional in constructor?\n\t\t\t// Consider separating unambiguous implicit construction format from constructor arguments at type level, allowing constructor to superset the implicit construction options (ex: optional constant fields).\n\t\t\t// The policy here however must remain at least as conservative as shallowCompatibilityTest in src/simple-tree/unhydratedFlexTreeFromInsertable.ts.\n\n\t\t\tambiguityErrors.push(\n\t\t\t\t`The required fields of ${JSON.stringify(schema.identifier)} are insufficient to differentiate it from the following types: ${formatTypes(possiblyAmbiguous)}. For objects to be considered unambiguous, each must have required fields that do not all occur on any other object in the union.`,\n\t\t\t);\n\t\t}\n\t}\n}\n"]}
@@ -2,16 +2,16 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import type { TreeIndex } from "../../feature-libraries/index.js";
5
6
  import type { TreeNode } from "../core/index.js";
6
7
  import { type ImplicitFieldSchema } from "../fieldSchema.js";
7
- import { type SimpleTreeIndex } from "./simpleTreeIndex.js";
8
8
  import type { TreeView } from "./tree.js";
9
9
  /**
10
10
  * An index that returns tree nodes given their associated identifiers.
11
11
  *
12
12
  * @alpha
13
13
  */
14
- export type IdentifierIndex = SimpleTreeIndex<string, TreeNode>;
14
+ export type IdentifierIndex = TreeIndex<string, TreeNode>;
15
15
  /**
16
16
  * Creates an {@link IdentifierIndex} for a given {@link TreeView}.
17
17
  *
@@ -1 +1 @@
1
- {"version":3,"file":"identifierIndex.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/identifierIndex.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAa,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAIxE,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAMhE;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,mBAAmB,EACxE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GACrB,eAAe,CA+BjB"}
1
+ {"version":3,"file":"identifierIndex.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/identifierIndex.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAa,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAKxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAM1D;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,SAAS,mBAAmB,EACxE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GACrB,eAAe,CA+BjB"}
@@ -34,7 +34,7 @@ function createIdentifierIndex(view) {
34
34
  }
35
35
  },
36
36
  });
37
- return (0, simpleTreeIndex_js_1.createSimpleTreeIndex)(view, (schemus) => identifierFields.get(schemus.identifier), (nodes) => {
37
+ return (0, simpleTreeIndex_js_1.createTreeIndex)(view, (schemus) => identifierFields.get(schemus.identifier), (nodes) => {
38
38
  if (nodes.length > 1) {
39
39
  throw new internal_1.UsageError("cannot retrieve node from index: there are multiple nodes with the same identifier");
40
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"identifierIndex.js","sourceRoot":"","sources":["../../../src/simple-tree/api/identifierIndex.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uEAAsE;AAItE,sDAAwE;AACxE,qDAA0D;AAC1D,8DAAwD;AAExD,6DAAmF;AAUnF,SAAS,WAAW,CAAC,GAAiB;IACrC,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,SAAgB,qBAAqB,CACpC,IAAuB;IAEvB,4EAA4E;IAC5E,yEAAyE;IACzE,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;IACnD,IAAA,oCAAe,EAAC,IAAI,CAAC,MAAM,EAAE;QAC5B,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,2BAAgB,EAAE,CAAC;gBACzC,KAAK,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;oBAChE,IAAI,WAAW,CAAC,IAAI,KAAK,0BAAS,CAAC,UAAU,EAAE,CAAC;wBAC/C,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;wBACnD,MAAM;oBACP,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;KACD,CAAC,CAAC;IAEH,OAAO,IAAA,0CAAqB,EAC3B,IAAI,EACJ,CAAC,OAAO,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,EACrD,CAAC,KAAK,EAAE,EAAE;QACT,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,qBAAU,CACnB,oFAAoF,CACpF,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,EACD,WAAW,CACX,CAAC;AACH,CAAC;AAjCD,sDAiCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { TreeIndexKey } from \"../../feature-libraries/index.js\";\nimport type { TreeNode } from \"../core/index.js\";\nimport { FieldKind, type ImplicitFieldSchema } from \"../fieldSchema.js\";\nimport { ObjectNodeSchema } from \"../node-kinds/index.js\";\nimport { walkFieldSchema } from \"../walkFieldSchema.js\";\n\nimport { createSimpleTreeIndex, type SimpleTreeIndex } from \"./simpleTreeIndex.js\";\nimport type { TreeView } from \"./tree.js\";\n\n/**\n * An index that returns tree nodes given their associated identifiers.\n *\n * @alpha\n */\nexport type IdentifierIndex = SimpleTreeIndex<string, TreeNode>;\n\nfunction isStringKey(key: TreeIndexKey): key is string {\n\treturn typeof key === \"string\";\n}\n\n/**\n * Creates an {@link IdentifierIndex} for a given {@link TreeView}.\n *\n * @alpha\n */\nexport function createIdentifierIndex<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): IdentifierIndex {\n\t// For each node schema, find which field key the identifier field is under.\n\t// This can be done easily because identifiers are their own field kinds.\n\tconst identifierFields = new Map<string, string>();\n\twalkFieldSchema(view.schema, {\n\t\tnode: (schemus) => {\n\t\t\tif (schemus instanceof ObjectNodeSchema) {\n\t\t\t\tfor (const [fieldKey, fieldSchema] of schemus.fields.entries()) {\n\t\t\t\t\tif (fieldSchema.kind === FieldKind.Identifier) {\n\t\t\t\t\t\tidentifierFields.set(schemus.identifier, fieldKey);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n\n\treturn createSimpleTreeIndex(\n\t\tview,\n\t\t(schemus) => identifierFields.get(schemus.identifier),\n\t\t(nodes) => {\n\t\t\tif (nodes.length > 1) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"cannot retrieve node from index: there are multiple nodes with the same identifier\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn nodes[0];\n\t\t},\n\t\tisStringKey,\n\t);\n}\n"]}
1
+ {"version":3,"file":"identifierIndex.js","sourceRoot":"","sources":["../../../src/simple-tree/api/identifierIndex.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,uEAAsE;AAItE,sDAAwE;AACxE,qDAA0D;AAC1D,8DAAwD;AAExD,6DAA0E;AAU1E,SAAS,WAAW,CAAC,GAAiB;IACrC,OAAO,OAAO,GAAG,KAAK,QAAQ,CAAC;AAChC,CAAC;AAED;;;;GAIG;AACH,SAAgB,qBAAqB,CACpC,IAAuB;IAEvB,4EAA4E;IAC5E,yEAAyE;IACzE,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;IACnD,IAAA,oCAAe,EAAC,IAAI,CAAC,MAAM,EAAE;QAC5B,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE;YACjB,IAAI,OAAO,YAAY,2BAAgB,EAAE,CAAC;gBACzC,KAAK,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;oBAChE,IAAI,WAAW,CAAC,IAAI,KAAK,0BAAS,CAAC,UAAU,EAAE,CAAC;wBAC/C,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;wBACnD,MAAM;oBACP,CAAC;gBACF,CAAC;YACF,CAAC;QACF,CAAC;KACD,CAAC,CAAC;IAEH,OAAO,IAAA,oCAAe,EACrB,IAAI,EACJ,CAAC,OAAO,EAAE,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,EACrD,CAAC,KAAK,EAAE,EAAE;QACT,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,qBAAU,CACnB,oFAAoF,CACpF,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,EACD,WAAW,CACX,CAAC;AACH,CAAC;AAjCD,sDAiCC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport type { TreeIndex } from \"../../feature-libraries/index.js\";\nimport type { TreeNode } from \"../core/index.js\";\nimport { FieldKind, type ImplicitFieldSchema } from \"../fieldSchema.js\";\nimport { ObjectNodeSchema } from \"../node-kinds/index.js\";\nimport { walkFieldSchema } from \"../walkFieldSchema.js\";\n\nimport { createTreeIndex, type TreeIndexKey } from \"./simpleTreeIndex.js\";\nimport type { TreeView } from \"./tree.js\";\n\n/**\n * An index that returns tree nodes given their associated identifiers.\n *\n * @alpha\n */\nexport type IdentifierIndex = TreeIndex<string, TreeNode>;\n\nfunction isStringKey(key: TreeIndexKey): key is string {\n\treturn typeof key === \"string\";\n}\n\n/**\n * Creates an {@link IdentifierIndex} for a given {@link TreeView}.\n *\n * @alpha\n */\nexport function createIdentifierIndex<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): IdentifierIndex {\n\t// For each node schema, find which field key the identifier field is under.\n\t// This can be done easily because identifiers are their own field kinds.\n\tconst identifierFields = new Map<string, string>();\n\twalkFieldSchema(view.schema, {\n\t\tnode: (schemus) => {\n\t\t\tif (schemus instanceof ObjectNodeSchema) {\n\t\t\t\tfor (const [fieldKey, fieldSchema] of schemus.fields.entries()) {\n\t\t\t\t\tif (fieldSchema.kind === FieldKind.Identifier) {\n\t\t\t\t\t\tidentifierFields.set(schemus.identifier, fieldKey);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n\n\treturn createTreeIndex(\n\t\tview,\n\t\t(schemus) => identifierFields.get(schemus.identifier),\n\t\t(nodes) => {\n\t\t\tif (nodes.length > 1) {\n\t\t\t\tthrow new UsageError(\n\t\t\t\t\t\"cannot retrieve node from index: there are multiple nodes with the same identifier\",\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn nodes[0];\n\t\t},\n\t\tisStringKey,\n\t);\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  export type { ITreeViewConfiguration, ITreeConfigurationOptions, } from "./configuration.js";
6
6
  export { TreeViewConfiguration, TreeViewConfigurationAlpha, } from "./configuration.js";
7
- export type { ITree, TreeView, ViewableTree, TreeViewEvents, SchemaCompatibilityStatus, TreeViewAlpha, TreeViewBeta, TreeBranch, TreeBranchAlpha, TreeBranchEvents, ITreeAlpha, } from "./tree.js";
7
+ export type { ITree, TreeView, ViewableTree, TreeViewEvents, SchemaCompatibilityStatus, TreeViewAlpha, TreeViewBeta, TreeBranch, TreeBranchAlpha, TreeBranchEvents, TreeContextAlpha, ITreeAlpha, } from "./tree.js";
8
8
  export { asTreeViewAlpha } from "./tree.js";
9
9
  export { type SchemaStatics, schemaStatics } from "./schemaStatics.js";
10
10
  export { SchemaFactory, scoped, type ScopedSchemaName, type ObjectSchemaOptionsAlpha, type ObjectSchemaOptions, type NodeSchemaOptions, type NodeSchemaOptionsAlpha, type SchemaFactory_base, } from "./schemaFactory.js";
@@ -27,10 +27,10 @@ export { type VerboseTreeNode, type VerboseTree, applySchemaToParserOptions, cur
27
27
  export { type TreeEncodingOptions, customFromCursorStored, type CustomTreeNode, type CustomTreeValue, tryStoredSchemaAsArray, replaceHandles, type HandleConverter, KeyEncodingOptions, type TreeParsingOptions, } from "./customTree.js";
28
28
  export { type ConciseTree, conciseFromCursor, replaceConciseTreeHandles, } from "./conciseTree.js";
29
29
  export { borrowCursorFromTreeNodeOrValue, exportConcise, importConcise, type NodeChangedData, TreeBeta, type TreeChangeEventsBeta, } from "./treeBeta.js";
30
- export { createSimpleTreeIndex, type SimpleTreeIndex } from "./simpleTreeIndex.js";
30
+ export { createTreeIndex, type TreeIndexKey } from "./simpleTreeIndex.js";
31
31
  export { createIdentifierIndex, type IdentifierIndex, } from "./identifierIndex.js";
32
32
  export { extractPersistedSchema, comparePersistedSchema, } from "./storedSchema.js";
33
- export { type TransactionConstraint, type TransactionConstraintAlpha, type NodeInDocumentConstraint, type NoChangeConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, rollback, } from "./transactionTypes.js";
33
+ export { type TransactionConstraint, type TransactionConstraintAlpha, type NodeInDocumentConstraint, type NoChangeConstraint, type RunTransactionParams, type VoidTransactionCallbackStatus, type TransactionCallbackStatus, type TransactionResult, type TransactionResultExt, type TransactionResultSuccess, type TransactionResultFailed, type WithValue, rollback, } from "./transactionTypes.js";
34
34
  export { generateSchemaFromSimpleSchema } from "./schemaFromSimple.js";
35
35
  export type { TreeChangeEvents } from "./treeChangeEvents.js";
36
36
  export { incrementalEncodingPolicyForAllowedTypes, incrementalSummaryHint, } from "./incrementalAllowedTypes.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,sBAAsB,EACtB,yBAAyB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACX,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,UAAU,GACV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EACN,aAAa,EACb,MAAM,EACN,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACN,kBAAkB,EAClB,8BAA8B,GAC9B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACX,uBAAuB,EACvB,uBAAuB,EACvB,+BAA+B,EAC/B,0BAA0B,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACN,SAAS,EACT,eAAe,EACf,eAAe,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 {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACX,sBAAsB,EACtB,yBAAyB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,qBAAqB,EACrB,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACX,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,yBAAyB,EACzB,aAAa,EACb,YAAY,EACZ,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,UAAU,GACV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,KAAK,aAAa,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACvE,OAAO,EACN,aAAa,EACb,MAAM,EACN,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EACN,kBAAkB,EAClB,8BAA8B,GAC9B,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACX,uBAAuB,EACvB,uBAAuB,EACvB,+BAA+B,EAC/B,0BAA0B,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EACN,SAAS,EACT,eAAe,EACf,eAAe,EACf,2CAA2C,GAC3C,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,qBAAqB,EACrB,2BAA2B,EAC3B,YAAY,EACZ,WAAW,EACX,KAAK,WAAW,EAChB,YAAY,GAC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AiB,CAAC;AAEzB,OAAO,EACN,KAAK,WAAW,EAChB,iBAAiB,EACjB,yBAAyB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACN,+BAA+B,EAC/B,aAAa,EACb,aAAa,EACb,KAAK,eAAe,EACpB,QAAQ,EACR,KAAK,oBAAoB,GACzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EACN,qBAAqB,EACrB,KAAK,eAAe,GACpB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACN,sBAAsB,EACtB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACN,KAAK,qBAAqB,EAC1B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,uBAAuB,EAC5B,KAAK,SAAS,EACd,QAAQ,GACR,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACN,wCAAwC,EACxC,sBAAsB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACN,iCAAiC,EACjC,iCAAiC,GACjC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,iCAAiC,EACjC,iCAAiC,EACjC,kBAAkB,EAClB,2BAA2B,EAC3B,KAAK,kBAAkB,EACvB,KAAK,kCAAkC,GACvC,MAAM,mCAAmC,CAAC"}
@@ -4,7 +4,7 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.exportCompatibilitySchemaSnapshot = exports.decodeSchemaCompatibilitySnapshot = exports.encodeSchemaCompatibilitySnapshot = exports.incrementalSummaryHint = exports.incrementalEncodingPolicyForAllowedTypes = exports.generateSchemaFromSimpleSchema = exports.rollback = exports.comparePersistedSchema = exports.extractPersistedSchema = exports.createIdentifierIndex = exports.createSimpleTreeIndex = exports.TreeBeta = exports.importConcise = exports.exportConcise = exports.borrowCursorFromTreeNodeOrValue = exports.replaceConciseTreeHandles = exports.conciseFromCursor = exports.KeyEncodingOptions = exports.replaceHandles = exports.tryStoredSchemaAsArray = exports.customFromCursorStored = exports.replaceVerboseTreeHandles = exports.verboseFromCursor = exports.cursorFromVerbose = exports.applySchemaToParserOptions = exports.SchemaCompatibilityTester = exports.getSimpleSchema = exports.getJsonSchema = exports.trackDirtyNodes = exports.createFromCursor = exports.tryGetSchema = exports.treeNodeApi = exports.getStoredKey = exports.getPropertyKeyFromStoredKey = exports.getIdentifierFromNode = exports.createCustomizedFluidFrameworkScopedFactory = exports.singletonSchema = exports.enumFromStrings = exports.adaptEnum = exports.allowUnused = exports.eraseSchemaDetailsSubclassable = exports.eraseSchemaDetails = exports.SchemaFactoryAlpha = exports.SchemaFactoryBeta = exports.scoped = exports.SchemaFactory = exports.schemaStatics = exports.asTreeViewAlpha = exports.TreeViewConfigurationAlpha = exports.TreeViewConfiguration = void 0;
7
+ exports.exportCompatibilitySchemaSnapshot = exports.decodeSchemaCompatibilitySnapshot = exports.encodeSchemaCompatibilitySnapshot = exports.incrementalSummaryHint = exports.incrementalEncodingPolicyForAllowedTypes = exports.generateSchemaFromSimpleSchema = exports.rollback = exports.comparePersistedSchema = exports.extractPersistedSchema = exports.createIdentifierIndex = exports.createTreeIndex = exports.TreeBeta = exports.importConcise = exports.exportConcise = exports.borrowCursorFromTreeNodeOrValue = exports.replaceConciseTreeHandles = exports.conciseFromCursor = exports.KeyEncodingOptions = exports.replaceHandles = exports.tryStoredSchemaAsArray = exports.customFromCursorStored = exports.replaceVerboseTreeHandles = exports.verboseFromCursor = exports.cursorFromVerbose = exports.applySchemaToParserOptions = exports.SchemaCompatibilityTester = exports.getSimpleSchema = exports.getJsonSchema = exports.trackDirtyNodes = exports.createFromCursor = exports.tryGetSchema = exports.treeNodeApi = exports.getStoredKey = exports.getPropertyKeyFromStoredKey = exports.getIdentifierFromNode = exports.createCustomizedFluidFrameworkScopedFactory = exports.singletonSchema = exports.enumFromStrings = exports.adaptEnum = exports.allowUnused = exports.eraseSchemaDetailsSubclassable = exports.eraseSchemaDetails = exports.SchemaFactoryAlpha = exports.SchemaFactoryBeta = exports.scoped = exports.SchemaFactory = exports.schemaStatics = exports.asTreeViewAlpha = exports.TreeViewConfigurationAlpha = exports.TreeViewConfiguration = void 0;
8
8
  exports.snapshotSchemaCompatibility = exports.checkCompatibility = exports.importCompatibilitySchemaSnapshot = void 0;
9
9
  var configuration_js_1 = require("./configuration.js");
10
10
  Object.defineProperty(exports, "TreeViewConfiguration", { enumerable: true, get: function () { return configuration_js_1.TreeViewConfiguration; } });
@@ -65,7 +65,7 @@ Object.defineProperty(exports, "exportConcise", { enumerable: true, get: functio
65
65
  Object.defineProperty(exports, "importConcise", { enumerable: true, get: function () { return treeBeta_js_1.importConcise; } });
66
66
  Object.defineProperty(exports, "TreeBeta", { enumerable: true, get: function () { return treeBeta_js_1.TreeBeta; } });
67
67
  var simpleTreeIndex_js_1 = require("./simpleTreeIndex.js");
68
- Object.defineProperty(exports, "createSimpleTreeIndex", { enumerable: true, get: function () { return simpleTreeIndex_js_1.createSimpleTreeIndex; } });
68
+ Object.defineProperty(exports, "createTreeIndex", { enumerable: true, get: function () { return simpleTreeIndex_js_1.createTreeIndex; } });
69
69
  var identifierIndex_js_1 = require("./identifierIndex.js");
70
70
  Object.defineProperty(exports, "createIdentifierIndex", { enumerable: true, get: function () { return identifierIndex_js_1.createIdentifierIndex; } });
71
71
  var storedSchema_js_1 = require("./storedSchema.js");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],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,2HAAA,yBAAyB,OAAA;AAG1B,6CAOuB;AANtB,8HAAA,+BAA+B,OAAA;AAC/B,4GAAA,aAAa,OAAA;AACb,4GAAA,aAAa,OAAA;AAEb,uGAAA,QAAQ,OAAA;AAGT,2DAAmF;AAA1E,2HAAA,qBAAqB,OAAA;AAC9B,2DAG8B;AAF7B,2HAAA,qBAAqB,OAAA;AAItB,qDAG2B;AAF1B,yHAAA,sBAAsB,OAAA;AACtB,yHAAA,sBAAsB,OAAA;AAGvB,6DAa+B;AAD9B,+GAAA,QAAQ,OAAA;AAGT,6DAAuE;AAA9D,qIAAA,8BAA8B,OAAA;AAEvC,2EAGsC;AAFrC,sJAAA,wCAAwC,OAAA;AACxC,oIAAA,sBAAsB,OAAA;AAEvB,+DAGgC;AAF/B,yIAAA,iCAAiC,OAAA;AACjC,yIAAA,iCAAiC,OAAA;AAElC,qFAO2C;AAN1C,oJAAA,iCAAiC,OAAA;AACjC,oJAAA,iCAAiC,OAAA;AACjC,qIAAA,kBAAkB,OAAA;AAClB,8IAAA,2BAA2B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tITreeViewConfiguration,\n\tITreeConfigurationOptions,\n} from \"./configuration.js\";\nexport {\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n} from \"./configuration.js\";\nexport type {\n\tITree,\n\tTreeView,\n\tViewableTree,\n\tTreeViewEvents,\n\tSchemaCompatibilityStatus,\n\tTreeViewAlpha,\n\tTreeViewBeta,\n\tTreeBranch,\n\tTreeBranchAlpha,\n\tTreeBranchEvents,\n\tITreeAlpha,\n} from \"./tree.js\";\nexport { asTreeViewAlpha } from \"./tree.js\";\nexport { type SchemaStatics, schemaStatics } from \"./schemaStatics.js\";\nexport {\n\tSchemaFactory,\n\tscoped,\n\ttype ScopedSchemaName,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype SchemaFactory_base,\n} from \"./schemaFactory.js\";\nexport { SchemaFactoryBeta, type SchemaStaticsBeta } from \"./schemaFactoryBeta.js\";\nexport { SchemaFactoryAlpha } from \"./schemaFactoryAlpha.js\";\nexport {\n\teraseSchemaDetails,\n\teraseSchemaDetailsSubclassable,\n} from \"./eraseSchemaDetails.js\";\nexport type {\n\tValidateRecursiveSchema,\n\tFixRecursiveArraySchema,\n\tValidateRecursiveSchemaTemplate,\n\tFixRecursiveRecursionLimit,\n} from \"./schemaFactoryRecursive.js\";\nexport { allowUnused } from \"./schemaFactoryRecursive.js\";\nexport {\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\tcreateCustomizedFluidFrameworkScopedFactory,\n} from \"./schemaCreationUtilities.js\";\nexport {\n\tgetIdentifierFromNode,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttryGetSchema,\n} from \"./treeNodeApi.js\";\nexport { createFromCursor } from \"./create.js\";\nexport {\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n} from \"./dirtyIndex.js\";\nexport {\n\ttype JsonSchemaId,\n\ttype JsonSchemaType,\n\ttype JsonObjectNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonLeafNodeSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonTreeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n} from \"./jsonSchema.js\";\nexport type { TreeSchemaEncodingOptions } from \"./getJsonSchema.js\";\nexport { getJsonSchema } from \"./getJsonSchema.js\";\nexport { getSimpleSchema } from \"./getSimpleSchema.js\";\nexport { SchemaCompatibilityTester } from \"./schemaCompatibilityTester.js\";\nexport type {\n\tUnenforced,\n\tFieldSchemaAlphaUnsafe,\n\tArrayNodeCustomizableSchemaUnsafe,\n\tMapNodeCustomizableSchemaUnsafe,\n\tSystem_Unsafe,\n\tTreeRecordNodeUnsafe,\n\tUnannotateAllowedTypeUnsafe,\n\tAnnotatedAllowedTypeUnsafe,\n\tAnnotatedAllowedTypesUnsafe,\n\tAllowedTypesFullUnsafe,\n\tAllowedTypesFullFromMixedUnsafe,\n\tUnannotateAllowedTypesListUnsafe,\n\tAnnotateAllowedTypesListUnsafe,\n} from \"./typesUnsafe.js\";\n\nexport {\n\ttype VerboseTreeNode,\n\ttype VerboseTree,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\treplaceVerboseTreeHandles,\n} from \"./verboseTree.js\";\n\nexport {\n\ttype TreeEncodingOptions,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\treplaceHandles,\n\ttype HandleConverter,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n} from \"./customTree.js\";\n\nexport {\n\ttype ConciseTree,\n\tconciseFromCursor,\n\treplaceConciseTreeHandles,\n} from \"./conciseTree.js\";\n\nexport {\n\tborrowCursorFromTreeNodeOrValue,\n\texportConcise,\n\timportConcise,\n\ttype NodeChangedData,\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n} from \"./treeBeta.js\";\nexport { createSimpleTreeIndex, type SimpleTreeIndex } from \"./simpleTreeIndex.js\";\nexport {\n\tcreateIdentifierIndex,\n\ttype IdentifierIndex,\n} from \"./identifierIndex.js\";\n\nexport {\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n} from \"./storedSchema.js\";\n\nexport {\n\ttype TransactionConstraint,\n\ttype TransactionConstraintAlpha,\n\ttype NodeInDocumentConstraint,\n\ttype NoChangeConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\trollback,\n} from \"./transactionTypes.js\";\n\nexport { generateSchemaFromSimpleSchema } from \"./schemaFromSimple.js\";\nexport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\nexport {\n\tincrementalEncodingPolicyForAllowedTypes,\n\tincrementalSummaryHint,\n} from \"./incrementalAllowedTypes.js\";\nexport {\n\tencodeSchemaCompatibilitySnapshot,\n\tdecodeSchemaCompatibilitySnapshot,\n} from \"./simpleSchemaCodec.js\";\nexport {\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n\tsnapshotSchemaCompatibility,\n\ttype SnapshotFileSystem,\n\ttype SnapshotSchemaCompatibilityOptions,\n} from \"./snapshotCompatibilityChecker.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/simple-tree/api/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;AAMH,uDAG4B;AAF3B,yHAAA,qBAAqB,OAAA;AACrB,8HAAA,0BAA0B,OAAA;AAgB3B,qCAA4C;AAAnC,0GAAA,eAAe,OAAA;AACxB,uDAAuE;AAA1C,iHAAA,aAAa,OAAA;AAC1C,uDAS4B;AAR3B,iHAAA,aAAa,OAAA;AACb,0GAAA,MAAM,OAAA;AAQP,+DAAmF;AAA1E,yHAAA,iBAAiB,OAAA;AAC1B,iEAA6D;AAApD,2HAAA,kBAAkB,OAAA;AAC3B,iEAGiC;AAFhC,2HAAA,kBAAkB,OAAA;AAClB,uIAAA,8BAA8B,OAAA;AAQ/B,yEAA0D;AAAjD,wHAAA,WAAW,OAAA;AACpB,2EAKsC;AAJrC,uHAAA,SAAS,OAAA;AACT,6HAAA,eAAe,OAAA;AACf,6HAAA,eAAe,OAAA;AACf,yJAAA,2CAA2C,OAAA;AAE5C,mDAO0B;AANzB,uHAAA,qBAAqB,OAAA;AACrB,6H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,OAAA;AAClB,8IAAA,2BAA2B,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport type {\n\tITreeViewConfiguration,\n\tITreeConfigurationOptions,\n} from \"./configuration.js\";\nexport {\n\tTreeViewConfiguration,\n\tTreeViewConfigurationAlpha,\n} from \"./configuration.js\";\nexport type {\n\tITree,\n\tTreeView,\n\tViewableTree,\n\tTreeViewEvents,\n\tSchemaCompatibilityStatus,\n\tTreeViewAlpha,\n\tTreeViewBeta,\n\tTreeBranch,\n\tTreeBranchAlpha,\n\tTreeBranchEvents,\n\tTreeContextAlpha,\n\tITreeAlpha,\n} from \"./tree.js\";\nexport { asTreeViewAlpha } from \"./tree.js\";\nexport { type SchemaStatics, schemaStatics } from \"./schemaStatics.js\";\nexport {\n\tSchemaFactory,\n\tscoped,\n\ttype ScopedSchemaName,\n\ttype ObjectSchemaOptionsAlpha,\n\ttype ObjectSchemaOptions,\n\ttype NodeSchemaOptions,\n\ttype NodeSchemaOptionsAlpha,\n\ttype SchemaFactory_base,\n} from \"./schemaFactory.js\";\nexport { SchemaFactoryBeta, type SchemaStaticsBeta } from \"./schemaFactoryBeta.js\";\nexport { SchemaFactoryAlpha } from \"./schemaFactoryAlpha.js\";\nexport {\n\teraseSchemaDetails,\n\teraseSchemaDetailsSubclassable,\n} from \"./eraseSchemaDetails.js\";\nexport type {\n\tValidateRecursiveSchema,\n\tFixRecursiveArraySchema,\n\tValidateRecursiveSchemaTemplate,\n\tFixRecursiveRecursionLimit,\n} from \"./schemaFactoryRecursive.js\";\nexport { allowUnused } from \"./schemaFactoryRecursive.js\";\nexport {\n\tadaptEnum,\n\tenumFromStrings,\n\tsingletonSchema,\n\tcreateCustomizedFluidFrameworkScopedFactory,\n} from \"./schemaCreationUtilities.js\";\nexport {\n\tgetIdentifierFromNode,\n\tgetPropertyKeyFromStoredKey,\n\tgetStoredKey,\n\ttreeNodeApi,\n\ttype TreeNodeApi,\n\ttryGetSchema,\n} from \"./treeNodeApi.js\";\nexport { createFromCursor } from \"./create.js\";\nexport {\n\ttype DirtyTreeStatus,\n\ttrackDirtyNodes,\n\ttype DirtyTreeMap,\n} from \"./dirtyIndex.js\";\nexport {\n\ttype JsonSchemaId,\n\ttype JsonSchemaType,\n\ttype JsonObjectNodeSchema,\n\ttype JsonArrayNodeSchema,\n\ttype JsonMapNodeSchema,\n\ttype JsonLeafNodeSchema,\n\ttype JsonSchemaRef,\n\ttype JsonRefPath,\n\ttype JsonNodeSchema,\n\ttype JsonNodeSchemaBase,\n\ttype JsonTreeSchema,\n\ttype JsonFieldSchema,\n\ttype JsonLeafSchemaType,\n\ttype JsonRecordNodeSchema,\n\ttype JsonStringKeyPatternProperties,\n} from \"./jsonSchema.js\";\nexport type { TreeSchemaEncodingOptions } from \"./getJsonSchema.js\";\nexport { getJsonSchema } from \"./getJsonSchema.js\";\nexport { getSimpleSchema } from \"./getSimpleSchema.js\";\nexport { SchemaCompatibilityTester } from \"./schemaCompatibilityTester.js\";\nexport type {\n\tUnenforced,\n\tFieldSchemaAlphaUnsafe,\n\tArrayNodeCustomizableSchemaUnsafe,\n\tMapNodeCustomizableSchemaUnsafe,\n\tSystem_Unsafe,\n\tTreeRecordNodeUnsafe,\n\tUnannotateAllowedTypeUnsafe,\n\tAnnotatedAllowedTypeUnsafe,\n\tAnnotatedAllowedTypesUnsafe,\n\tAllowedTypesFullUnsafe,\n\tAllowedTypesFullFromMixedUnsafe,\n\tUnannotateAllowedTypesListUnsafe,\n\tAnnotateAllowedTypesListUnsafe,\n} from \"./typesUnsafe.js\";\n\nexport {\n\ttype VerboseTreeNode,\n\ttype VerboseTree,\n\tapplySchemaToParserOptions,\n\tcursorFromVerbose,\n\tverboseFromCursor,\n\treplaceVerboseTreeHandles,\n} from \"./verboseTree.js\";\n\nexport {\n\ttype TreeEncodingOptions,\n\tcustomFromCursorStored,\n\ttype CustomTreeNode,\n\ttype CustomTreeValue,\n\ttryStoredSchemaAsArray,\n\treplaceHandles,\n\ttype HandleConverter,\n\tKeyEncodingOptions,\n\ttype TreeParsingOptions,\n} from \"./customTree.js\";\n\nexport {\n\ttype ConciseTree,\n\tconciseFromCursor,\n\treplaceConciseTreeHandles,\n} from \"./conciseTree.js\";\n\nexport {\n\tborrowCursorFromTreeNodeOrValue,\n\texportConcise,\n\timportConcise,\n\ttype NodeChangedData,\n\tTreeBeta,\n\ttype TreeChangeEventsBeta,\n} from \"./treeBeta.js\";\nexport { createTreeIndex, type TreeIndexKey } from \"./simpleTreeIndex.js\";\nexport {\n\tcreateIdentifierIndex,\n\ttype IdentifierIndex,\n} from \"./identifierIndex.js\";\n\nexport {\n\textractPersistedSchema,\n\tcomparePersistedSchema,\n} from \"./storedSchema.js\";\n\nexport {\n\ttype TransactionConstraint,\n\ttype TransactionConstraintAlpha,\n\ttype NodeInDocumentConstraint,\n\ttype NoChangeConstraint,\n\ttype RunTransactionParams,\n\ttype VoidTransactionCallbackStatus,\n\ttype TransactionCallbackStatus,\n\ttype TransactionResult,\n\ttype TransactionResultExt,\n\ttype TransactionResultSuccess,\n\ttype TransactionResultFailed,\n\ttype WithValue,\n\trollback,\n} from \"./transactionTypes.js\";\n\nexport { generateSchemaFromSimpleSchema } from \"./schemaFromSimple.js\";\nexport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\nexport {\n\tincrementalEncodingPolicyForAllowedTypes,\n\tincrementalSummaryHint,\n} from \"./incrementalAllowedTypes.js\";\nexport {\n\tencodeSchemaCompatibilitySnapshot,\n\tdecodeSchemaCompatibilitySnapshot,\n} from \"./simpleSchemaCodec.js\";\nexport {\n\texportCompatibilitySchemaSnapshot,\n\timportCompatibilitySchemaSnapshot,\n\tcheckCompatibility,\n\tsnapshotSchemaCompatibility,\n\ttype SnapshotFileSystem,\n\ttype SnapshotSchemaCompatibilityOptions,\n} from \"./snapshotCompatibilityChecker.js\";\n"]}
@@ -105,12 +105,13 @@ export declare const SchemaFactory_base: SchemaStatics & (new () => SchemaStatic
105
105
  * @remarks
106
106
  * For details related to inputting data constrained by schema (including via assignment), and how non-exact schema types are handled in general refer to {@link Input}.
107
107
  * For information about recursive schema support, see methods postfixed with "recursive" and {@link ValidateRecursiveSchema}.
108
- * To apply schema defined with this factory to a tree, see {@link ViewableTree.viewWith} and {@link TreeViewConfiguration}.
108
+ * To apply schema defined with this factory to a tree, see {@link TreeViewConfiguration} and {@link ViewableTree.viewWith}.
109
+ * See the {@link https://fluidframework.com/docs/data-structures/tree/schema-evolution | documentation on schema evolution} for how to handle changes to schema over time.
109
110
  *
110
111
  * All schema produced by this factory get a {@link TreeNodeSchemaCore.identifier|unique identifier} by combining the {@link SchemaFactory.scope} with the schema's `Name`.
111
112
  * The `Name` part may be explicitly provided as a parameter, or inferred as a structural combination of the provided types.
112
113
  * The APIs which use this second approach, structural naming, also deduplicate all equivalent calls.
113
- * Therefor two calls to `array(allowedTypes)` with the same allowedTypes will return the same {@link TreeNodeSchema} instance.
114
+ * Therefore two calls to `array(allowedTypes)` with the same allowedTypes will return the same {@link TreeNodeSchema} instance.
114
115
  * On the other hand, two calls to `array(name, allowedTypes)` will always return different {@link TreeNodeSchema} instances
115
116
  * and it is an error to use both in the same tree (since their identifiers are not unique).
116
117
  *
@@ -1 +1 @@
1
- {"version":3,"file":"schemaFactory.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/schemaFactory.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAQH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,EACN,KAAK,4BAA4B,EACjC,KAAK,uBAAuB,EAI5B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EACX,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,mBAAmB,EACnB,sBAAsB,EAGtB,kBAAkB,EAClB,oBAAoB,EACpB,0CAA0C,EAC1C,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACN,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,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,CACpE,SAAQ,iBAAiB,CAAC,eAAe,CAAC;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,CAAC,EAAE,4BAA4B,GAAG,SAAS,CAAC;CACtE"}
@@ -89,12 +89,13 @@ exports.SchemaFactory_base = classWithStatics(schemaStaticsPublic);
89
89
  * @remarks
90
90
  * For details related to inputting data constrained by schema (including via assignment), and how non-exact schema types are handled in general refer to {@link Input}.
91
91
  * For information about recursive schema support, see methods postfixed with "recursive" and {@link ValidateRecursiveSchema}.
92
- * To apply schema defined with this factory to a tree, see {@link ViewableTree.viewWith} and {@link TreeViewConfiguration}.
92
+ * To apply schema defined with this factory to a tree, see {@link TreeViewConfiguration} and {@link ViewableTree.viewWith}.
93
+ * See the {@link https://fluidframework.com/docs/data-structures/tree/schema-evolution | documentation on schema evolution} for how to handle changes to schema over time.
93
94
  *
94
95
  * All schema produced by this factory get a {@link TreeNodeSchemaCore.identifier|unique identifier} by combining the {@link SchemaFactory.scope} with the schema's `Name`.
95
96
  * The `Name` part may be explicitly provided as a parameter, or inferred as a structural combination of the provided types.
96
97
  * The APIs which use this second approach, structural naming, also deduplicate all equivalent calls.
97
- * Therefor two calls to `array(allowedTypes)` with the same allowedTypes will return the same {@link TreeNodeSchema} instance.
98
+ * Therefore two calls to `array(allowedTypes)` with the same allowedTypes will return the same {@link TreeNodeSchema} instance.
98
99
  * On the other hand, two calls to `array(name, allowedTypes)` will always return different {@link TreeNodeSchema} instances
99
100
  * and it is an error to use both in the same tree (since their identifiers are not unique).
100
101
  *