@fluidframework/tree 2.81.0-374083 → 2.81.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1522) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/api-report/tree.alpha.api.md +0 -1
  3. package/dist/codec/codec.d.ts +2 -2
  4. package/dist/codec/codec.d.ts.map +1 -1
  5. package/dist/codec/codec.js +8 -8
  6. package/dist/codec/codec.js.map +1 -1
  7. package/dist/codec/versioned/codec.d.ts +1 -1
  8. package/dist/codec/versioned/codec.d.ts.map +1 -1
  9. package/dist/codec/versioned/codec.js +12 -12
  10. package/dist/codec/versioned/codec.js.map +1 -1
  11. package/dist/core/change-family/changeFamily.d.ts +1 -4
  12. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  13. package/dist/core/change-family/changeFamily.js.map +1 -1
  14. package/dist/core/change-family/index.d.ts +1 -1
  15. package/dist/core/change-family/index.d.ts.map +1 -1
  16. package/dist/core/change-family/index.js.map +1 -1
  17. package/dist/core/index.d.ts +3 -3
  18. package/dist/core/index.d.ts.map +1 -1
  19. package/dist/core/index.js +4 -6
  20. package/dist/core/index.js.map +1 -1
  21. package/dist/core/rebase/changeRebaser.d.ts +1 -6
  22. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  23. package/dist/core/rebase/changeRebaser.js.map +1 -1
  24. package/dist/core/rebase/index.d.ts +1 -1
  25. package/dist/core/rebase/index.d.ts.map +1 -1
  26. package/dist/core/rebase/index.js +1 -2
  27. package/dist/core/rebase/index.js.map +1 -1
  28. package/dist/core/rebase/types.d.ts +1 -2
  29. package/dist/core/rebase/types.d.ts.map +1 -1
  30. package/dist/core/rebase/types.js +1 -5
  31. package/dist/core/rebase/types.js.map +1 -1
  32. package/dist/core/rebase/utils.d.ts.map +1 -1
  33. package/dist/core/rebase/utils.js +7 -25
  34. package/dist/core/rebase/utils.js.map +1 -1
  35. package/dist/core/schema-stored/formatV2.d.ts.map +1 -1
  36. package/dist/core/schema-stored/formatV2.js +4 -4
  37. package/dist/core/schema-stored/formatV2.js.map +1 -1
  38. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  39. package/dist/core/tree/anchorSet.js +1 -1
  40. package/dist/core/tree/anchorSet.js.map +1 -1
  41. package/dist/core/tree/detachedFieldIndex.d.ts +0 -6
  42. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  43. package/dist/core/tree/detachedFieldIndex.js +0 -9
  44. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  45. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
  46. package/dist/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  47. package/dist/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  48. package/dist/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  49. package/dist/core/tree/detachedFieldIndexCodecV1.js +3 -3
  50. package/dist/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  51. package/dist/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  52. package/dist/core/tree/detachedFieldIndexCodecV2.js +2 -2
  53. package/dist/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  54. package/dist/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
  55. package/dist/core/tree/detachedFieldIndexFormatV1.js +3 -3
  56. package/dist/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
  57. package/dist/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  58. package/dist/core/tree/detachedFieldIndexFormatV2.js +4 -4
  59. package/dist/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  60. package/dist/core/tree/index.d.ts +1 -1
  61. package/dist/core/tree/index.d.ts.map +1 -1
  62. package/dist/core/tree/index.js +3 -4
  63. package/dist/core/tree/index.js.map +1 -1
  64. package/dist/core/tree/pathTree.d.ts +3 -11
  65. package/dist/core/tree/pathTree.d.ts.map +1 -1
  66. package/dist/core/tree/pathTree.js +2 -14
  67. package/dist/core/tree/pathTree.js.map +1 -1
  68. package/dist/core/tree/visitDelta.d.ts +1 -1
  69. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  70. package/dist/core/tree/visitDelta.js.map +1 -1
  71. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  72. package/dist/core/tree/visitorUtils.js +1 -1
  73. package/dist/core/tree/visitorUtils.js.map +1 -1
  74. package/dist/feature-libraries/changeAtomIdBTree.d.ts +3 -4
  75. package/dist/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  76. package/dist/feature-libraries/changeAtomIdBTree.js +2 -16
  77. package/dist/feature-libraries/changeAtomIdBTree.js.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  79. package/dist/feature-libraries/chunked-forest/basicChunk.js +0 -7
  80. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  81. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
  82. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  83. package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -4
  84. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  85. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  86. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  87. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  88. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
  89. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  90. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  91. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
  92. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  93. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  94. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +1 -1
  95. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  96. package/dist/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  97. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  98. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  99. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  100. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  101. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  102. package/dist/feature-libraries/chunked-forest/codec/format.js +1 -1
  103. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  104. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  105. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  106. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  107. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  108. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
  109. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  110. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
  111. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  112. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +78 -245
  113. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  114. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
  115. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  116. package/dist/feature-libraries/default-schema/defaultFieldKinds.js +25 -75
  117. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  118. package/dist/feature-libraries/default-schema/index.d.ts +2 -3
  119. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  120. package/dist/feature-libraries/default-schema/index.js +2 -5
  121. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  122. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
  123. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  124. package/dist/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
  125. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  126. package/dist/feature-libraries/deltaUtils.d.ts +0 -1
  127. package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
  128. package/dist/feature-libraries/deltaUtils.js +1 -6
  129. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  130. package/dist/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
  131. package/dist/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
  132. package/dist/feature-libraries/fieldKindIdentifiers.js +16 -0
  133. package/dist/feature-libraries/fieldKindIdentifiers.js.map +1 -0
  134. package/dist/feature-libraries/flex-tree/context.d.ts +0 -9
  135. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  136. package/dist/feature-libraries/flex-tree/context.js +0 -6
  137. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  138. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  139. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  140. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  141. package/dist/feature-libraries/flex-tree/lazyField.d.ts +7 -8
  142. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  143. package/dist/feature-libraries/flex-tree/lazyField.js +17 -48
  144. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  145. package/dist/feature-libraries/flex-tree/observer.d.ts +1 -1
  146. package/dist/feature-libraries/flex-tree/observer.d.ts.map +1 -1
  147. package/dist/feature-libraries/flex-tree/observer.js.map +1 -1
  148. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  149. package/dist/feature-libraries/forest-summary/codec.js +1 -1
  150. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  151. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  152. package/dist/feature-libraries/forest-summary/forestSummarizer.js +3 -3
  153. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  154. package/dist/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
  155. package/dist/feature-libraries/forest-summary/formatV1.js.map +1 -1
  156. package/dist/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
  157. package/dist/feature-libraries/forest-summary/formatV2.js.map +1 -1
  158. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
  159. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  160. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
  161. package/dist/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  162. package/dist/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
  163. package/dist/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
  164. package/dist/feature-libraries/index.d.ts +3 -3
  165. package/dist/feature-libraries/index.d.ts.map +1 -1
  166. package/dist/feature-libraries/index.js +3 -8
  167. package/dist/feature-libraries/index.js.map +1 -1
  168. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  169. package/dist/feature-libraries/mapTreeCursor.js +0 -1
  170. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  171. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  172. package/dist/feature-libraries/mitigatedChangeFamily.js +2 -2
  173. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  174. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +21 -97
  175. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  176. package/dist/feature-libraries/modular-schema/crossFieldQueries.js +7 -4
  177. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  178. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
  179. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  180. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  181. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  182. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  183. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
  184. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  185. package/dist/feature-libraries/modular-schema/genericFieldKind.js +11 -5
  186. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  187. package/dist/feature-libraries/modular-schema/index.d.ts +4 -4
  188. package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
  189. package/dist/feature-libraries/modular-schema/index.js +2 -2
  190. package/dist/feature-libraries/modular-schema/index.js.map +1 -1
  191. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
  192. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  193. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js +162 -254
  194. package/dist/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  195. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  196. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
  197. package/dist/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  198. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  199. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
  200. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  201. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
  202. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  203. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +460 -1325
  204. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  205. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  206. package/dist/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  207. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
  208. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  209. package/dist/feature-libraries/modular-schema/modularChangeTypes.js +3 -3
  210. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  211. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  212. package/dist/feature-libraries/object-forest/objectForest.js +2 -2
  213. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  214. package/dist/feature-libraries/optional-field/index.d.ts +2 -2
  215. package/dist/feature-libraries/optional-field/index.d.ts.map +1 -1
  216. package/dist/feature-libraries/optional-field/index.js +4 -7
  217. package/dist/feature-libraries/optional-field/index.js.map +1 -1
  218. package/dist/feature-libraries/optional-field/optionalField.d.ts +34 -5
  219. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  220. package/dist/feature-libraries/optional-field/optionalField.js +455 -221
  221. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  222. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
  223. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  224. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  225. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  226. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  227. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js +28 -57
  228. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  229. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  230. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
  231. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  232. package/dist/feature-libraries/optional-field/requiredField.d.ts +36 -0
  233. package/dist/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
  234. package/dist/feature-libraries/optional-field/requiredField.js +27 -0
  235. package/dist/feature-libraries/optional-field/requiredField.js.map +1 -0
  236. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
  237. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  238. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +7 -7
  239. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  240. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  241. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  242. package/dist/feature-libraries/schemaChecker.d.ts.map +1 -1
  243. package/dist/feature-libraries/schemaChecker.js +1 -1
  244. package/dist/feature-libraries/schemaChecker.js.map +1 -1
  245. package/dist/feature-libraries/sequence-field/compose.d.ts +7 -6
  246. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  247. package/dist/feature-libraries/sequence-field/compose.js +259 -83
  248. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  249. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
  250. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  251. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  252. package/dist/feature-libraries/sequence-field/index.d.ts +2 -13
  253. package/dist/feature-libraries/sequence-field/index.d.ts.map +1 -1
  254. package/dist/feature-libraries/sequence-field/index.js +3 -28
  255. package/dist/feature-libraries/sequence-field/index.js.map +1 -1
  256. package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
  257. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  258. package/dist/feature-libraries/sequence-field/invert.js +167 -65
  259. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  260. package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  261. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  262. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  263. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
  264. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  265. package/dist/feature-libraries/sequence-field/moveEffectTable.js +90 -7
  266. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  267. package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
  268. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  269. package/dist/feature-libraries/sequence-field/rebase.js +114 -107
  270. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  271. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
  272. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
  273. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js +50 -0
  274. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
  275. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  276. package/dist/feature-libraries/sequence-field/replaceRevisions.js +31 -18
  277. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  278. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  279. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -0
  280. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  281. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
  282. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  283. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +187 -365
  284. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  285. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  286. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +62 -20
  287. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  288. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  289. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  290. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  291. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  292. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  293. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  294. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
  295. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  296. package/dist/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
  297. package/dist/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
  298. package/dist/feature-libraries/sequence-field/sequenceKind.js +24 -0
  299. package/dist/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
  300. package/dist/feature-libraries/sequence-field/types.d.ts +59 -30
  301. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  302. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  303. package/dist/feature-libraries/sequence-field/utils.d.ts +24 -15
  304. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  305. package/dist/feature-libraries/sequence-field/utils.js +305 -116
  306. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  307. package/dist/index.d.ts +1 -1
  308. package/dist/index.d.ts.map +1 -1
  309. package/dist/index.js +2 -1
  310. package/dist/index.js.map +1 -1
  311. package/dist/packageVersion.d.ts +1 -1
  312. package/dist/packageVersion.d.ts.map +1 -1
  313. package/dist/packageVersion.js +1 -1
  314. package/dist/packageVersion.js.map +1 -1
  315. package/dist/shared-tree/independentView.d.ts.map +1 -1
  316. package/dist/shared-tree/independentView.js +7 -7
  317. package/dist/shared-tree/independentView.js.map +1 -1
  318. package/dist/shared-tree/index.d.ts +1 -1
  319. package/dist/shared-tree/index.d.ts.map +1 -1
  320. package/dist/shared-tree/index.js.map +1 -1
  321. package/dist/shared-tree/schematizeTree.d.ts +4 -4
  322. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  323. package/dist/shared-tree/schematizeTree.js +1 -2
  324. package/dist/shared-tree/schematizeTree.js.map +1 -1
  325. package/dist/shared-tree/schematizingTreeView.d.ts +5 -1
  326. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  327. package/dist/shared-tree/schematizingTreeView.js +39 -40
  328. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  329. package/dist/shared-tree/sharedTree.d.ts +5 -11
  330. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  331. package/dist/shared-tree/sharedTree.js +5 -43
  332. package/dist/shared-tree/sharedTree.js.map +1 -1
  333. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  334. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  335. package/dist/shared-tree/sharedTreeChangeCodecs.js +0 -1
  336. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  337. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
  338. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  339. package/dist/shared-tree/sharedTreeChangeEnricher.js +75 -58
  340. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  341. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
  342. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  343. package/dist/shared-tree/sharedTreeChangeFamily.js +4 -10
  344. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  345. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
  346. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  347. package/dist/shared-tree/sharedTreeEditBuilder.js +7 -14
  348. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  349. package/dist/shared-tree/tree.d.ts.map +1 -1
  350. package/dist/shared-tree/tree.js +14 -14
  351. package/dist/shared-tree/tree.js.map +1 -1
  352. package/dist/shared-tree/treeAlpha.d.ts +1 -1
  353. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  354. package/dist/shared-tree/treeAlpha.js +77 -77
  355. package/dist/shared-tree/treeAlpha.js.map +1 -1
  356. package/dist/shared-tree/treeCheckout.d.ts +29 -13
  357. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  358. package/dist/shared-tree/treeCheckout.js +80 -79
  359. package/dist/shared-tree/treeCheckout.js.map +1 -1
  360. package/dist/shared-tree-core/branch.d.ts +3 -4
  361. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  362. package/dist/shared-tree-core/branch.js +3 -4
  363. package/dist/shared-tree-core/branch.js.map +1 -1
  364. package/dist/shared-tree-core/branchCommitEnricher.d.ts +18 -31
  365. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  366. package/dist/shared-tree-core/branchCommitEnricher.js +24 -76
  367. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  368. package/dist/shared-tree-core/branchIdCodec.d.ts.map +1 -1
  369. package/dist/shared-tree-core/branchIdCodec.js.map +1 -1
  370. package/dist/shared-tree-core/changeEnricher.d.ts +8 -43
  371. package/dist/shared-tree-core/changeEnricher.d.ts.map +1 -1
  372. package/dist/shared-tree-core/changeEnricher.js +0 -13
  373. package/dist/shared-tree-core/changeEnricher.js.map +1 -1
  374. package/dist/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
  375. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  376. package/dist/shared-tree-core/defaultResubmitMachine.js +26 -36
  377. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  378. package/dist/shared-tree-core/editManager.d.ts +3 -3
  379. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  380. package/dist/shared-tree-core/editManager.js +11 -11
  381. package/dist/shared-tree-core/editManager.js.map +1 -1
  382. package/dist/shared-tree-core/editManagerCodecs.d.ts +1 -5
  383. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  384. package/dist/shared-tree-core/editManagerCodecs.js +2 -10
  385. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  386. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
  387. package/dist/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  388. package/dist/shared-tree-core/editManagerCodecsCommons.js +1 -2
  389. package/dist/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  390. package/dist/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  391. package/dist/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
  392. package/dist/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  393. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  394. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
  395. package/dist/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  396. package/dist/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
  397. package/dist/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  398. package/dist/shared-tree-core/editManagerFormatCommons.js +0 -6
  399. package/dist/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  400. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  401. package/dist/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  402. package/dist/shared-tree-core/editManagerFormatV1toV4.js +0 -1
  403. package/dist/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  404. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  405. package/dist/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  406. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
  407. package/dist/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  408. package/dist/shared-tree-core/index.d.ts +4 -4
  409. package/dist/shared-tree-core/index.d.ts.map +1 -1
  410. package/dist/shared-tree-core/index.js +1 -5
  411. package/dist/shared-tree-core/index.js.map +1 -1
  412. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
  413. package/dist/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  414. package/dist/shared-tree-core/messageCodecV1ToV4.js +1 -1
  415. package/dist/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  416. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
  417. package/dist/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  418. package/dist/shared-tree-core/messageCodecVSharedBranches.js +2 -2
  419. package/dist/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  420. package/dist/shared-tree-core/messageCodecs.d.ts +2 -6
  421. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  422. package/dist/shared-tree-core/messageCodecs.js +2 -10
  423. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  424. package/dist/shared-tree-core/messageFormat.d.ts +0 -1
  425. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  426. package/dist/shared-tree-core/messageFormat.js +0 -6
  427. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  428. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
  429. package/dist/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  430. package/dist/shared-tree-core/messageFormatV1ToV4.js +0 -1
  431. package/dist/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  432. package/dist/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  433. package/dist/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  434. package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
  435. package/dist/shared-tree-core/messageTypes.js.map +1 -1
  436. package/dist/shared-tree-core/sharedTreeCore.d.ts +8 -5
  437. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  438. package/dist/shared-tree-core/sharedTreeCore.js +14 -14
  439. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  440. package/dist/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  441. package/dist/shared-tree-core/versionedSummarizer.js +1 -1
  442. package/dist/shared-tree-core/versionedSummarizer.js.map +1 -1
  443. package/dist/simple-tree/api/configuration.d.ts +2 -2
  444. package/dist/simple-tree/api/configuration.d.ts.map +1 -1
  445. package/dist/simple-tree/api/configuration.js +14 -14
  446. package/dist/simple-tree/api/configuration.js.map +1 -1
  447. package/dist/simple-tree/api/create.d.ts +1 -1
  448. package/dist/simple-tree/api/create.d.ts.map +1 -1
  449. package/dist/simple-tree/api/create.js +7 -7
  450. package/dist/simple-tree/api/create.js.map +1 -1
  451. package/dist/simple-tree/api/dirtyIndex.d.ts +1 -1
  452. package/dist/simple-tree/api/dirtyIndex.d.ts.map +1 -1
  453. package/dist/simple-tree/api/dirtyIndex.js.map +1 -1
  454. package/dist/simple-tree/api/discrepancies.d.ts.map +1 -1
  455. package/dist/simple-tree/api/discrepancies.js +23 -23
  456. package/dist/simple-tree/api/discrepancies.js.map +1 -1
  457. package/dist/simple-tree/api/getJsonSchema.d.ts +1 -1
  458. package/dist/simple-tree/api/getJsonSchema.d.ts.map +1 -1
  459. package/dist/simple-tree/api/getJsonSchema.js +1 -1
  460. package/dist/simple-tree/api/getJsonSchema.js.map +1 -1
  461. package/dist/simple-tree/api/identifierIndex.d.ts +2 -2
  462. package/dist/simple-tree/api/identifierIndex.d.ts.map +1 -1
  463. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  464. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
  465. package/dist/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  466. package/dist/simple-tree/api/incrementalAllowedTypes.js +6 -6
  467. package/dist/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  468. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
  469. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  470. package/dist/simple-tree/api/schemaCompatibilityTester.js +1 -1
  471. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  472. package/dist/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
  473. package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  474. package/dist/simple-tree/api/schemaCreationUtilities.js +7 -7
  475. package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  476. package/dist/simple-tree/api/schemaFactory.d.ts +2 -2
  477. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  478. package/dist/simple-tree/api/schemaFactory.js +7 -7
  479. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  480. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
  481. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  482. package/dist/simple-tree/api/schemaFactoryAlpha.js +1 -1
  483. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  484. package/dist/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
  485. package/dist/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  486. package/dist/simple-tree/api/schemaFactoryBeta.js +1 -0
  487. package/dist/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  488. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
  489. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  490. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  491. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  492. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  493. package/dist/simple-tree/api/schemaStatics.d.ts.map +1 -1
  494. package/dist/simple-tree/api/schemaStatics.js.map +1 -1
  495. package/dist/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
  496. package/dist/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
  497. package/dist/simple-tree/api/simpleSchemaCodec.js +17 -17
  498. package/dist/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  499. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
  500. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  501. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
  502. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  503. package/dist/simple-tree/api/simpleTreeIndex.d.ts +1 -1
  504. package/dist/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
  505. package/dist/simple-tree/api/simpleTreeIndex.js +1 -1
  506. package/dist/simple-tree/api/simpleTreeIndex.js.map +1 -1
  507. package/dist/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  508. package/dist/simple-tree/api/snapshotCompatibilityChecker.js +14 -14
  509. package/dist/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  510. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  511. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  512. package/dist/simple-tree/api/tree.d.ts +2 -2
  513. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  514. package/dist/simple-tree/api/tree.js.map +1 -1
  515. package/dist/simple-tree/api/treeBeta.d.ts +1 -1
  516. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  517. package/dist/simple-tree/api/treeBeta.js +2 -2
  518. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  519. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  520. package/dist/simple-tree/api/treeNodeApi.js +4 -4
  521. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  522. package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
  523. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  524. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  525. package/dist/simple-tree/api/verboseTree.d.ts +1 -1
  526. package/dist/simple-tree/api/verboseTree.d.ts.map +1 -1
  527. package/dist/simple-tree/api/verboseTree.js +22 -22
  528. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  529. package/dist/simple-tree/core/allowedTypes.d.ts +1 -1
  530. package/dist/simple-tree/core/allowedTypes.d.ts.map +1 -1
  531. package/dist/simple-tree/core/allowedTypes.js +7 -7
  532. package/dist/simple-tree/core/allowedTypes.js.map +1 -1
  533. package/dist/simple-tree/core/context.d.ts.map +1 -1
  534. package/dist/simple-tree/core/context.js.map +1 -1
  535. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  536. package/dist/simple-tree/core/treeNode.js +1 -1
  537. package/dist/simple-tree/core/treeNode.js.map +1 -1
  538. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  539. package/dist/simple-tree/core/treeNodeKernel.js +1 -3
  540. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  541. package/dist/simple-tree/core/treeNodeSchema.d.ts +5 -5
  542. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  543. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  544. package/dist/simple-tree/core/treeNodeValid.d.ts +3 -3
  545. package/dist/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  546. package/dist/simple-tree/core/treeNodeValid.js +2 -2
  547. package/dist/simple-tree/core/treeNodeValid.js.map +1 -1
  548. package/dist/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
  549. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  550. package/dist/simple-tree/core/unhydratedFlexTree.js +8 -59
  551. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  552. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  553. package/dist/simple-tree/core/withType.js.map +1 -1
  554. package/dist/simple-tree/createContext.d.ts.map +1 -1
  555. package/dist/simple-tree/createContext.js.map +1 -1
  556. package/dist/simple-tree/fieldSchema.d.ts +5 -5
  557. package/dist/simple-tree/fieldSchema.d.ts.map +1 -1
  558. package/dist/simple-tree/fieldSchema.js.map +1 -1
  559. package/dist/simple-tree/index.d.ts +2 -2
  560. package/dist/simple-tree/index.d.ts.map +1 -1
  561. package/dist/simple-tree/index.js +1 -1
  562. package/dist/simple-tree/index.js.map +1 -1
  563. package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
  564. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  565. package/dist/simple-tree/leafNodeSchema.js +15 -15
  566. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  567. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts +1 -1
  568. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  569. package/dist/simple-tree/node-kinds/array/arrayNode.js +47 -49
  570. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  571. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
  572. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  573. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  574. package/dist/simple-tree/node-kinds/common.d.ts.map +1 -1
  575. package/dist/simple-tree/node-kinds/common.js +1 -1
  576. package/dist/simple-tree/node-kinds/common.js.map +1 -1
  577. package/dist/simple-tree/node-kinds/map/mapNode.d.ts +2 -2
  578. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  579. package/dist/simple-tree/node-kinds/map/mapNode.js +26 -26
  580. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  581. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
  582. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  583. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  584. package/dist/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
  585. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  586. package/dist/simple-tree/node-kinds/object/objectNode.js +28 -28
  587. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  588. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
  589. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  590. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  591. package/dist/simple-tree/node-kinds/record/recordNode.d.ts +1 -1
  592. package/dist/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  593. package/dist/simple-tree/node-kinds/record/recordNode.js +36 -38
  594. package/dist/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  595. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
  596. package/dist/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  597. package/dist/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  598. package/dist/simple-tree/prepareForInsertion.d.ts +47 -54
  599. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  600. package/dist/simple-tree/prepareForInsertion.js +128 -186
  601. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  602. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  603. package/dist/simple-tree/simpleSchema.js.map +1 -1
  604. package/dist/simple-tree/treeSchema.d.ts.map +1 -1
  605. package/dist/simple-tree/treeSchema.js.map +1 -1
  606. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
  607. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  608. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js +22 -40
  609. package/dist/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  610. package/dist/tableSchema.d.ts.map +1 -1
  611. package/dist/tableSchema.js +22 -21
  612. package/dist/tableSchema.js.map +1 -1
  613. package/dist/text/index.d.ts +1 -0
  614. package/dist/text/index.d.ts.map +1 -1
  615. package/dist/text/index.js +3 -1
  616. package/dist/text/index.js.map +1 -1
  617. package/dist/text/textDomain.d.ts +8 -0
  618. package/dist/text/textDomain.d.ts.map +1 -1
  619. package/dist/text/textDomain.js +2 -1
  620. package/dist/text/textDomain.js.map +1 -1
  621. package/dist/text/textDomainFormatted.d.ts +572 -0
  622. package/dist/text/textDomainFormatted.d.ts.map +1 -0
  623. package/dist/text/textDomainFormatted.js +183 -0
  624. package/dist/text/textDomainFormatted.js.map +1 -0
  625. package/dist/treeFactory.d.ts.map +1 -1
  626. package/dist/treeFactory.js +11 -21
  627. package/dist/treeFactory.js.map +1 -1
  628. package/dist/util/bTreeUtils.d.ts.map +1 -1
  629. package/dist/util/bTreeUtils.js +1 -1
  630. package/dist/util/bTreeUtils.js.map +1 -1
  631. package/dist/util/index.d.ts +1 -1
  632. package/dist/util/index.d.ts.map +1 -1
  633. package/dist/util/index.js +1 -2
  634. package/dist/util/index.js.map +1 -1
  635. package/dist/util/rangeMap.d.ts +12 -24
  636. package/dist/util/rangeMap.d.ts.map +1 -1
  637. package/dist/util/rangeMap.js +6 -46
  638. package/dist/util/rangeMap.js.map +1 -1
  639. package/dist/util/readSnapshotBlob.d.ts +1 -1
  640. package/dist/util/readSnapshotBlob.d.ts.map +1 -1
  641. package/dist/util/readSnapshotBlob.js.map +1 -1
  642. package/docs/main/sequence-field/move-composition.md +46 -0
  643. package/eslint.config.mts +4 -4
  644. package/lib/codec/codec.d.ts +2 -2
  645. package/lib/codec/codec.d.ts.map +1 -1
  646. package/lib/codec/codec.js +1 -1
  647. package/lib/codec/codec.js.map +1 -1
  648. package/lib/codec/versioned/codec.d.ts +1 -1
  649. package/lib/codec/versioned/codec.d.ts.map +1 -1
  650. package/lib/codec/versioned/codec.js +2 -2
  651. package/lib/codec/versioned/codec.js.map +1 -1
  652. package/lib/core/change-family/changeFamily.d.ts +1 -4
  653. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  654. package/lib/core/change-family/changeFamily.js.map +1 -1
  655. package/lib/core/change-family/index.d.ts +1 -1
  656. package/lib/core/change-family/index.d.ts.map +1 -1
  657. package/lib/core/change-family/index.js.map +1 -1
  658. package/lib/core/index.d.ts +3 -3
  659. package/lib/core/index.d.ts.map +1 -1
  660. package/lib/core/index.js +2 -2
  661. package/lib/core/index.js.map +1 -1
  662. package/lib/core/rebase/changeRebaser.d.ts +1 -6
  663. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  664. package/lib/core/rebase/changeRebaser.js.map +1 -1
  665. package/lib/core/rebase/index.d.ts +1 -1
  666. package/lib/core/rebase/index.d.ts.map +1 -1
  667. package/lib/core/rebase/index.js +1 -1
  668. package/lib/core/rebase/index.js.map +1 -1
  669. package/lib/core/rebase/types.d.ts +1 -2
  670. package/lib/core/rebase/types.d.ts.map +1 -1
  671. package/lib/core/rebase/types.js +0 -3
  672. package/lib/core/rebase/types.js.map +1 -1
  673. package/lib/core/rebase/utils.d.ts.map +1 -1
  674. package/lib/core/rebase/utils.js +7 -25
  675. package/lib/core/rebase/utils.js.map +1 -1
  676. package/lib/core/schema-stored/formatV2.d.ts.map +1 -1
  677. package/lib/core/schema-stored/formatV2.js +1 -1
  678. package/lib/core/schema-stored/formatV2.js.map +1 -1
  679. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  680. package/lib/core/tree/anchorSet.js +1 -1
  681. package/lib/core/tree/anchorSet.js.map +1 -1
  682. package/lib/core/tree/detachedFieldIndex.d.ts +0 -6
  683. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  684. package/lib/core/tree/detachedFieldIndex.js +1 -10
  685. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  686. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts +1 -1
  687. package/lib/core/tree/detachedFieldIndexCodecCommon.d.ts.map +1 -1
  688. package/lib/core/tree/detachedFieldIndexCodecCommon.js.map +1 -1
  689. package/lib/core/tree/detachedFieldIndexCodecV1.d.ts.map +1 -1
  690. package/lib/core/tree/detachedFieldIndexCodecV1.js +1 -1
  691. package/lib/core/tree/detachedFieldIndexCodecV1.js.map +1 -1
  692. package/lib/core/tree/detachedFieldIndexCodecV2.d.ts.map +1 -1
  693. package/lib/core/tree/detachedFieldIndexCodecV2.js +2 -2
  694. package/lib/core/tree/detachedFieldIndexCodecV2.js.map +1 -1
  695. package/lib/core/tree/detachedFieldIndexFormatV1.d.ts.map +1 -1
  696. package/lib/core/tree/detachedFieldIndexFormatV1.js +2 -2
  697. package/lib/core/tree/detachedFieldIndexFormatV1.js.map +1 -1
  698. package/lib/core/tree/detachedFieldIndexFormatV2.d.ts.map +1 -1
  699. package/lib/core/tree/detachedFieldIndexFormatV2.js +2 -2
  700. package/lib/core/tree/detachedFieldIndexFormatV2.js.map +1 -1
  701. package/lib/core/tree/index.d.ts +1 -1
  702. package/lib/core/tree/index.d.ts.map +1 -1
  703. package/lib/core/tree/index.js +1 -1
  704. package/lib/core/tree/index.js.map +1 -1
  705. package/lib/core/tree/pathTree.d.ts +3 -11
  706. package/lib/core/tree/pathTree.d.ts.map +1 -1
  707. package/lib/core/tree/pathTree.js +1 -12
  708. package/lib/core/tree/pathTree.js.map +1 -1
  709. package/lib/core/tree/visitDelta.d.ts +1 -1
  710. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  711. package/lib/core/tree/visitDelta.js.map +1 -1
  712. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  713. package/lib/core/tree/visitorUtils.js +1 -1
  714. package/lib/core/tree/visitorUtils.js.map +1 -1
  715. package/lib/feature-libraries/changeAtomIdBTree.d.ts +3 -4
  716. package/lib/feature-libraries/changeAtomIdBTree.d.ts.map +1 -1
  717. package/lib/feature-libraries/changeAtomIdBTree.js +1 -14
  718. package/lib/feature-libraries/changeAtomIdBTree.js.map +1 -1
  719. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  720. package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -8
  721. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  722. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
  723. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  724. package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -4
  725. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  726. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  727. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  728. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  729. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +1 -1
  730. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  731. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  732. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +1 -1
  733. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  734. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  735. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +1 -1
  736. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  737. package/lib/feature-libraries/chunked-forest/codec/codecs.js +1 -1
  738. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  739. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  740. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  741. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  742. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  743. package/lib/feature-libraries/chunked-forest/codec/format.js +1 -1
  744. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  745. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  746. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  747. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  748. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  749. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js +2 -2
  750. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  751. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +44 -93
  752. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  753. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +73 -237
  754. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  755. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +11 -53
  756. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  757. package/lib/feature-libraries/default-schema/defaultFieldKinds.js +6 -56
  758. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  759. package/lib/feature-libraries/default-schema/index.d.ts +2 -3
  760. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  761. package/lib/feature-libraries/default-schema/index.js +1 -2
  762. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  763. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts +6 -7
  764. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  765. package/lib/feature-libraries/default-schema/mappedEditBuilder.js +0 -15
  766. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  767. package/lib/feature-libraries/deltaUtils.d.ts +0 -1
  768. package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
  769. package/lib/feature-libraries/deltaUtils.js +1 -5
  770. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  771. package/lib/feature-libraries/fieldKindIdentifiers.d.ts +9 -0
  772. package/lib/feature-libraries/fieldKindIdentifiers.d.ts.map +1 -0
  773. package/lib/feature-libraries/fieldKindIdentifiers.js +13 -0
  774. package/lib/feature-libraries/fieldKindIdentifiers.js.map +1 -0
  775. package/lib/feature-libraries/flex-tree/context.d.ts +0 -9
  776. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  777. package/lib/feature-libraries/flex-tree/context.js +0 -6
  778. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  779. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +6 -6
  780. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  781. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  782. package/lib/feature-libraries/flex-tree/lazyField.d.ts +7 -8
  783. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  784. package/lib/feature-libraries/flex-tree/lazyField.js +11 -42
  785. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  786. package/lib/feature-libraries/flex-tree/observer.d.ts +1 -1
  787. package/lib/feature-libraries/flex-tree/observer.d.ts.map +1 -1
  788. package/lib/feature-libraries/flex-tree/observer.js.map +1 -1
  789. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  790. package/lib/feature-libraries/forest-summary/codec.js +1 -1
  791. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  792. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  793. package/lib/feature-libraries/forest-summary/forestSummarizer.js +3 -3
  794. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  795. package/lib/feature-libraries/forest-summary/formatV1.d.ts.map +1 -1
  796. package/lib/feature-libraries/forest-summary/formatV1.js.map +1 -1
  797. package/lib/feature-libraries/forest-summary/formatV2.d.ts.map +1 -1
  798. package/lib/feature-libraries/forest-summary/formatV2.js.map +1 -1
  799. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts +4 -4
  800. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.d.ts.map +1 -1
  801. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js +2 -2
  802. package/lib/feature-libraries/forest-summary/incrementalSummaryBuilder.js.map +1 -1
  803. package/lib/feature-libraries/forest-summary/summaryTypes.d.ts.map +1 -1
  804. package/lib/feature-libraries/forest-summary/summaryTypes.js.map +1 -1
  805. package/lib/feature-libraries/index.d.ts +3 -3
  806. package/lib/feature-libraries/index.d.ts.map +1 -1
  807. package/lib/feature-libraries/index.js +2 -2
  808. package/lib/feature-libraries/index.js.map +1 -1
  809. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  810. package/lib/feature-libraries/mapTreeCursor.js +1 -2
  811. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  812. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  813. package/lib/feature-libraries/mitigatedChangeFamily.js +2 -2
  814. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  815. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +21 -97
  816. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  817. package/lib/feature-libraries/modular-schema/crossFieldQueries.js +5 -3
  818. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  819. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +51 -20
  820. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  821. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  822. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  823. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  824. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +1 -1
  825. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  826. package/lib/feature-libraries/modular-schema/genericFieldKind.js +11 -5
  827. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  828. package/lib/feature-libraries/modular-schema/index.d.ts +4 -4
  829. package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
  830. package/lib/feature-libraries/modular-schema/index.js +2 -2
  831. package/lib/feature-libraries/modular-schema/index.js.map +1 -1
  832. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts +28 -11
  833. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.d.ts.map +1 -1
  834. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js +144 -246
  835. package/lib/feature-libraries/modular-schema/modularChangeCodecV1.js.map +1 -1
  836. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.d.ts.map +1 -1
  837. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js +1 -1
  838. package/lib/feature-libraries/modular-schema/modularChangeCodecV2.js.map +1 -1
  839. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  840. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +1 -8
  841. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  842. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +21 -49
  843. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  844. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +463 -1319
  845. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  846. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.d.ts.map +1 -1
  847. package/lib/feature-libraries/modular-schema/modularChangeFormatV1.js.map +1 -1
  848. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +8 -44
  849. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  850. package/lib/feature-libraries/modular-schema/modularChangeTypes.js +1 -1
  851. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  852. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  853. package/lib/feature-libraries/object-forest/objectForest.js +2 -2
  854. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  855. package/lib/feature-libraries/optional-field/index.d.ts +2 -2
  856. package/lib/feature-libraries/optional-field/index.d.ts.map +1 -1
  857. package/lib/feature-libraries/optional-field/index.js +2 -2
  858. package/lib/feature-libraries/optional-field/index.js.map +1 -1
  859. package/lib/feature-libraries/optional-field/optionalField.d.ts +34 -5
  860. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  861. package/lib/feature-libraries/optional-field/optionalField.js +453 -221
  862. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  863. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +33 -24
  864. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  865. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  866. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +1 -1
  867. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  868. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js +26 -55
  869. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  870. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  871. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js +1 -5
  872. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  873. package/lib/feature-libraries/optional-field/requiredField.d.ts +36 -0
  874. package/lib/feature-libraries/optional-field/requiredField.d.ts.map +1 -0
  875. package/lib/feature-libraries/optional-field/requiredField.js +24 -0
  876. package/lib/feature-libraries/optional-field/requiredField.js.map +1 -0
  877. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +1 -1
  878. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  879. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +1 -1
  880. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  881. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  882. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  883. package/lib/feature-libraries/schemaChecker.d.ts.map +1 -1
  884. package/lib/feature-libraries/schemaChecker.js +1 -1
  885. package/lib/feature-libraries/schemaChecker.js.map +1 -1
  886. package/lib/feature-libraries/sequence-field/compose.d.ts +7 -6
  887. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  888. package/lib/feature-libraries/sequence-field/compose.js +261 -85
  889. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  890. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +10 -14
  891. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  892. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  893. package/lib/feature-libraries/sequence-field/index.d.ts +2 -13
  894. package/lib/feature-libraries/sequence-field/index.d.ts.map +1 -1
  895. package/lib/feature-libraries/sequence-field/index.js +1 -12
  896. package/lib/feature-libraries/sequence-field/index.js.map +1 -1
  897. package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
  898. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  899. package/lib/feature-libraries/sequence-field/invert.js +169 -67
  900. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  901. package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  902. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  903. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  904. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +56 -4
  905. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  906. package/lib/feature-libraries/sequence-field/moveEffectTable.js +84 -6
  907. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  908. package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
  909. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  910. package/lib/feature-libraries/sequence-field/rebase.js +116 -109
  911. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  912. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +9 -0
  913. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -0
  914. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js +46 -0
  915. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -0
  916. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  917. package/lib/feature-libraries/sequence-field/replaceRevisions.js +31 -18
  918. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  919. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  920. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js +2 -0
  921. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  922. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +4 -22
  923. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  924. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +182 -356
  925. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  926. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  927. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +63 -21
  928. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  929. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +2 -2
  930. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  931. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js +10 -10
  932. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  933. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +2 -3
  934. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  935. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js +109 -14
  936. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  937. package/lib/feature-libraries/sequence-field/sequenceKind.d.ts +16 -0
  938. package/lib/feature-libraries/sequence-field/sequenceKind.d.ts.map +1 -0
  939. package/lib/feature-libraries/sequence-field/sequenceKind.js +21 -0
  940. package/lib/feature-libraries/sequence-field/sequenceKind.js.map +1 -0
  941. package/lib/feature-libraries/sequence-field/types.d.ts +59 -30
  942. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  943. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  944. package/lib/feature-libraries/sequence-field/utils.d.ts +24 -15
  945. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  946. package/lib/feature-libraries/sequence-field/utils.js +298 -112
  947. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  948. package/lib/index.d.ts +1 -1
  949. package/lib/index.d.ts.map +1 -1
  950. package/lib/index.js +1 -1
  951. package/lib/index.js.map +1 -1
  952. package/lib/packageVersion.d.ts +1 -1
  953. package/lib/packageVersion.d.ts.map +1 -1
  954. package/lib/packageVersion.js +1 -1
  955. package/lib/packageVersion.js.map +1 -1
  956. package/lib/shared-tree/independentView.d.ts.map +1 -1
  957. package/lib/shared-tree/independentView.js +3 -3
  958. package/lib/shared-tree/independentView.js.map +1 -1
  959. package/lib/shared-tree/index.d.ts +1 -1
  960. package/lib/shared-tree/index.d.ts.map +1 -1
  961. package/lib/shared-tree/index.js.map +1 -1
  962. package/lib/shared-tree/schematizeTree.d.ts +4 -4
  963. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  964. package/lib/shared-tree/schematizeTree.js +2 -3
  965. package/lib/shared-tree/schematizeTree.js.map +1 -1
  966. package/lib/shared-tree/schematizingTreeView.d.ts +5 -1
  967. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  968. package/lib/shared-tree/schematizingTreeView.js +42 -43
  969. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  970. package/lib/shared-tree/sharedTree.d.ts +5 -11
  971. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  972. package/lib/shared-tree/sharedTree.js +5 -43
  973. package/lib/shared-tree/sharedTree.js.map +1 -1
  974. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +1 -1
  975. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  976. package/lib/shared-tree/sharedTreeChangeCodecs.js +0 -1
  977. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  978. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +31 -24
  979. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  980. package/lib/shared-tree/sharedTreeChangeEnricher.js +74 -56
  981. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  982. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +5 -5
  983. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  984. package/lib/shared-tree/sharedTreeChangeFamily.js +5 -11
  985. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  986. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +6 -16
  987. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  988. package/lib/shared-tree/sharedTreeEditBuilder.js +6 -12
  989. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  990. package/lib/shared-tree/tree.d.ts.map +1 -1
  991. package/lib/shared-tree/tree.js +7 -7
  992. package/lib/shared-tree/tree.js.map +1 -1
  993. package/lib/shared-tree/treeAlpha.d.ts +1 -1
  994. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  995. package/lib/shared-tree/treeAlpha.js +3 -3
  996. package/lib/shared-tree/treeAlpha.js.map +1 -1
  997. package/lib/shared-tree/treeCheckout.d.ts +29 -13
  998. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  999. package/lib/shared-tree/treeCheckout.js +55 -54
  1000. package/lib/shared-tree/treeCheckout.js.map +1 -1
  1001. package/lib/shared-tree-core/branch.d.ts +3 -4
  1002. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  1003. package/lib/shared-tree-core/branch.js +3 -4
  1004. package/lib/shared-tree-core/branch.js.map +1 -1
  1005. package/lib/shared-tree-core/branchCommitEnricher.d.ts +18 -31
  1006. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  1007. package/lib/shared-tree-core/branchCommitEnricher.js +24 -76
  1008. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  1009. package/lib/shared-tree-core/branchIdCodec.d.ts.map +1 -1
  1010. package/lib/shared-tree-core/branchIdCodec.js.map +1 -1
  1011. package/lib/shared-tree-core/changeEnricher.d.ts +8 -43
  1012. package/lib/shared-tree-core/changeEnricher.d.ts.map +1 -1
  1013. package/lib/shared-tree-core/changeEnricher.js +1 -11
  1014. package/lib/shared-tree-core/changeEnricher.js.map +1 -1
  1015. package/lib/shared-tree-core/defaultResubmitMachine.d.ts +4 -12
  1016. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  1017. package/lib/shared-tree-core/defaultResubmitMachine.js +28 -38
  1018. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  1019. package/lib/shared-tree-core/editManager.d.ts +3 -3
  1020. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  1021. package/lib/shared-tree-core/editManager.js +11 -11
  1022. package/lib/shared-tree-core/editManager.js.map +1 -1
  1023. package/lib/shared-tree-core/editManagerCodecs.d.ts +1 -5
  1024. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  1025. package/lib/shared-tree-core/editManagerCodecs.js +1 -8
  1026. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  1027. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts +1 -1
  1028. package/lib/shared-tree-core/editManagerCodecsCommons.d.ts.map +1 -1
  1029. package/lib/shared-tree-core/editManagerCodecsCommons.js +1 -2
  1030. package/lib/shared-tree-core/editManagerCodecsCommons.js.map +1 -1
  1031. package/lib/shared-tree-core/editManagerCodecsV1toV4.d.ts.map +1 -1
  1032. package/lib/shared-tree-core/editManagerCodecsV1toV4.js +1 -1
  1033. package/lib/shared-tree-core/editManagerCodecsV1toV4.js.map +1 -1
  1034. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.d.ts.map +1 -1
  1035. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js +1 -1
  1036. package/lib/shared-tree-core/editManagerCodecsVSharedBranches.js.map +1 -1
  1037. package/lib/shared-tree-core/editManagerFormatCommons.d.ts +0 -1
  1038. package/lib/shared-tree-core/editManagerFormatCommons.d.ts.map +1 -1
  1039. package/lib/shared-tree-core/editManagerFormatCommons.js +0 -6
  1040. package/lib/shared-tree-core/editManagerFormatCommons.js.map +1 -1
  1041. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts +2 -2
  1042. package/lib/shared-tree-core/editManagerFormatV1toV4.d.ts.map +1 -1
  1043. package/lib/shared-tree-core/editManagerFormatV1toV4.js +0 -1
  1044. package/lib/shared-tree-core/editManagerFormatV1toV4.js.map +1 -1
  1045. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts +1 -1
  1046. package/lib/shared-tree-core/editManagerFormatVSharedBranches.d.ts.map +1 -1
  1047. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js +1 -1
  1048. package/lib/shared-tree-core/editManagerFormatVSharedBranches.js.map +1 -1
  1049. package/lib/shared-tree-core/index.d.ts +4 -4
  1050. package/lib/shared-tree-core/index.d.ts.map +1 -1
  1051. package/lib/shared-tree-core/index.js +2 -3
  1052. package/lib/shared-tree-core/index.js.map +1 -1
  1053. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts +2 -2
  1054. package/lib/shared-tree-core/messageCodecV1ToV4.d.ts.map +1 -1
  1055. package/lib/shared-tree-core/messageCodecV1ToV4.js +1 -1
  1056. package/lib/shared-tree-core/messageCodecV1ToV4.js.map +1 -1
  1057. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts +1 -1
  1058. package/lib/shared-tree-core/messageCodecVSharedBranches.d.ts.map +1 -1
  1059. package/lib/shared-tree-core/messageCodecVSharedBranches.js +2 -2
  1060. package/lib/shared-tree-core/messageCodecVSharedBranches.js.map +1 -1
  1061. package/lib/shared-tree-core/messageCodecs.d.ts +2 -6
  1062. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  1063. package/lib/shared-tree-core/messageCodecs.js +1 -8
  1064. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  1065. package/lib/shared-tree-core/messageFormat.d.ts +0 -1
  1066. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  1067. package/lib/shared-tree-core/messageFormat.js +0 -6
  1068. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  1069. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts +2 -2
  1070. package/lib/shared-tree-core/messageFormatV1ToV4.d.ts.map +1 -1
  1071. package/lib/shared-tree-core/messageFormatV1ToV4.js +0 -1
  1072. package/lib/shared-tree-core/messageFormatV1ToV4.js.map +1 -1
  1073. package/lib/shared-tree-core/messageFormatVSharedBranches.d.ts.map +1 -1
  1074. package/lib/shared-tree-core/messageFormatVSharedBranches.js.map +1 -1
  1075. package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
  1076. package/lib/shared-tree-core/messageTypes.js.map +1 -1
  1077. package/lib/shared-tree-core/sharedTreeCore.d.ts +8 -5
  1078. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  1079. package/lib/shared-tree-core/sharedTreeCore.js +15 -15
  1080. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  1081. package/lib/shared-tree-core/versionedSummarizer.d.ts.map +1 -1
  1082. package/lib/shared-tree-core/versionedSummarizer.js +1 -1
  1083. package/lib/shared-tree-core/versionedSummarizer.js.map +1 -1
  1084. package/lib/simple-tree/api/configuration.d.ts +2 -2
  1085. package/lib/simple-tree/api/configuration.d.ts.map +1 -1
  1086. package/lib/simple-tree/api/configuration.js +4 -4
  1087. package/lib/simple-tree/api/configuration.js.map +1 -1
  1088. package/lib/simple-tree/api/create.d.ts +1 -1
  1089. package/lib/simple-tree/api/create.d.ts.map +1 -1
  1090. package/lib/simple-tree/api/create.js +1 -1
  1091. package/lib/simple-tree/api/create.js.map +1 -1
  1092. package/lib/simple-tree/api/dirtyIndex.d.ts +1 -1
  1093. package/lib/simple-tree/api/dirtyIndex.d.ts.map +1 -1
  1094. package/lib/simple-tree/api/dirtyIndex.js.map +1 -1
  1095. package/lib/simple-tree/api/discrepancies.d.ts.map +1 -1
  1096. package/lib/simple-tree/api/discrepancies.js +3 -3
  1097. package/lib/simple-tree/api/discrepancies.js.map +1 -1
  1098. package/lib/simple-tree/api/getJsonSchema.d.ts +1 -1
  1099. package/lib/simple-tree/api/getJsonSchema.d.ts.map +1 -1
  1100. package/lib/simple-tree/api/getJsonSchema.js +1 -1
  1101. package/lib/simple-tree/api/getJsonSchema.js.map +1 -1
  1102. package/lib/simple-tree/api/identifierIndex.d.ts +2 -2
  1103. package/lib/simple-tree/api/identifierIndex.d.ts.map +1 -1
  1104. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  1105. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts +1 -1
  1106. package/lib/simple-tree/api/incrementalAllowedTypes.d.ts.map +1 -1
  1107. package/lib/simple-tree/api/incrementalAllowedTypes.js +3 -3
  1108. package/lib/simple-tree/api/incrementalAllowedTypes.js.map +1 -1
  1109. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts +1 -1
  1110. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  1111. package/lib/simple-tree/api/schemaCompatibilityTester.js +1 -1
  1112. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  1113. package/lib/simple-tree/api/schemaCreationUtilities.d.ts +2 -2
  1114. package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
  1115. package/lib/simple-tree/api/schemaCreationUtilities.js +1 -1
  1116. package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
  1117. package/lib/simple-tree/api/schemaFactory.d.ts +2 -2
  1118. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  1119. package/lib/simple-tree/api/schemaFactory.js +2 -2
  1120. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  1121. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +6 -6
  1122. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  1123. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -1
  1124. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  1125. package/lib/simple-tree/api/schemaFactoryBeta.d.ts +2 -2
  1126. package/lib/simple-tree/api/schemaFactoryBeta.d.ts.map +1 -1
  1127. package/lib/simple-tree/api/schemaFactoryBeta.js +1 -0
  1128. package/lib/simple-tree/api/schemaFactoryBeta.js.map +1 -1
  1129. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +1 -1
  1130. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  1131. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  1132. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  1133. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  1134. package/lib/simple-tree/api/schemaStatics.d.ts.map +1 -1
  1135. package/lib/simple-tree/api/schemaStatics.js.map +1 -1
  1136. package/lib/simple-tree/api/simpleSchemaCodec.d.ts +1 -1
  1137. package/lib/simple-tree/api/simpleSchemaCodec.d.ts.map +1 -1
  1138. package/lib/simple-tree/api/simpleSchemaCodec.js +3 -3
  1139. package/lib/simple-tree/api/simpleSchemaCodec.js.map +1 -1
  1140. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +2 -2
  1141. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  1142. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +2 -2
  1143. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  1144. package/lib/simple-tree/api/simpleTreeIndex.d.ts +1 -1
  1145. package/lib/simple-tree/api/simpleTreeIndex.d.ts.map +1 -1
  1146. package/lib/simple-tree/api/simpleTreeIndex.js +1 -1
  1147. package/lib/simple-tree/api/simpleTreeIndex.js.map +1 -1
  1148. package/lib/simple-tree/api/snapshotCompatibilityChecker.d.ts.map +1 -1
  1149. package/lib/simple-tree/api/snapshotCompatibilityChecker.js +5 -5
  1150. package/lib/simple-tree/api/snapshotCompatibilityChecker.js.map +1 -1
  1151. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  1152. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  1153. package/lib/simple-tree/api/tree.d.ts +2 -2
  1154. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  1155. package/lib/simple-tree/api/tree.js.map +1 -1
  1156. package/lib/simple-tree/api/treeBeta.d.ts +1 -1
  1157. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  1158. package/lib/simple-tree/api/treeBeta.js +2 -2
  1159. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  1160. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  1161. package/lib/simple-tree/api/treeNodeApi.js +4 -4
  1162. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  1163. package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
  1164. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  1165. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  1166. package/lib/simple-tree/api/verboseTree.d.ts +1 -1
  1167. package/lib/simple-tree/api/verboseTree.d.ts.map +1 -1
  1168. package/lib/simple-tree/api/verboseTree.js +3 -3
  1169. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  1170. package/lib/simple-tree/core/allowedTypes.d.ts +1 -1
  1171. package/lib/simple-tree/core/allowedTypes.d.ts.map +1 -1
  1172. package/lib/simple-tree/core/allowedTypes.js +2 -2
  1173. package/lib/simple-tree/core/allowedTypes.js.map +1 -1
  1174. package/lib/simple-tree/core/context.d.ts.map +1 -1
  1175. package/lib/simple-tree/core/context.js.map +1 -1
  1176. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  1177. package/lib/simple-tree/core/treeNode.js +1 -1
  1178. package/lib/simple-tree/core/treeNode.js.map +1 -1
  1179. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  1180. package/lib/simple-tree/core/treeNodeKernel.js +1 -3
  1181. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  1182. package/lib/simple-tree/core/treeNodeSchema.d.ts +5 -5
  1183. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  1184. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  1185. package/lib/simple-tree/core/treeNodeValid.d.ts +3 -3
  1186. package/lib/simple-tree/core/treeNodeValid.d.ts.map +1 -1
  1187. package/lib/simple-tree/core/treeNodeValid.js +2 -2
  1188. package/lib/simple-tree/core/treeNodeValid.js.map +1 -1
  1189. package/lib/simple-tree/core/unhydratedFlexTree.d.ts +16 -16
  1190. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  1191. package/lib/simple-tree/core/unhydratedFlexTree.js +8 -58
  1192. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  1193. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  1194. package/lib/simple-tree/core/withType.js.map +1 -1
  1195. package/lib/simple-tree/createContext.d.ts.map +1 -1
  1196. package/lib/simple-tree/createContext.js.map +1 -1
  1197. package/lib/simple-tree/fieldSchema.d.ts +5 -5
  1198. package/lib/simple-tree/fieldSchema.d.ts.map +1 -1
  1199. package/lib/simple-tree/fieldSchema.js.map +1 -1
  1200. package/lib/simple-tree/index.d.ts +2 -2
  1201. package/lib/simple-tree/index.d.ts.map +1 -1
  1202. package/lib/simple-tree/index.js +1 -1
  1203. package/lib/simple-tree/index.js.map +1 -1
  1204. package/lib/simple-tree/leafNodeSchema.d.ts +1 -1
  1205. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  1206. package/lib/simple-tree/leafNodeSchema.js +2 -2
  1207. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  1208. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts +1 -1
  1209. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -1
  1210. package/lib/simple-tree/node-kinds/array/arrayNode.js +6 -8
  1211. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -1
  1212. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts +1 -1
  1213. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -1
  1214. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -1
  1215. package/lib/simple-tree/node-kinds/common.d.ts.map +1 -1
  1216. package/lib/simple-tree/node-kinds/common.js +2 -2
  1217. package/lib/simple-tree/node-kinds/common.js.map +1 -1
  1218. package/lib/simple-tree/node-kinds/map/mapNode.d.ts +2 -2
  1219. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -1
  1220. package/lib/simple-tree/node-kinds/map/mapNode.js +8 -8
  1221. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -1
  1222. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts +1 -1
  1223. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -1
  1224. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -1
  1225. package/lib/simple-tree/node-kinds/object/objectNode.d.ts +2 -2
  1226. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -1
  1227. package/lib/simple-tree/node-kinds/object/objectNode.js +22 -22
  1228. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -1
  1229. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts +3 -3
  1230. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -1
  1231. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -1
  1232. package/lib/simple-tree/node-kinds/record/recordNode.d.ts +1 -1
  1233. package/lib/simple-tree/node-kinds/record/recordNode.d.ts.map +1 -1
  1234. package/lib/simple-tree/node-kinds/record/recordNode.js +6 -8
  1235. package/lib/simple-tree/node-kinds/record/recordNode.js.map +1 -1
  1236. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts +1 -1
  1237. package/lib/simple-tree/node-kinds/record/recordNodeTypes.d.ts.map +1 -1
  1238. package/lib/simple-tree/node-kinds/record/recordNodeTypes.js.map +1 -1
  1239. package/lib/simple-tree/prepareForInsertion.d.ts +47 -54
  1240. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  1241. package/lib/simple-tree/prepareForInsertion.js +125 -184
  1242. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  1243. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  1244. package/lib/simple-tree/simpleSchema.js.map +1 -1
  1245. package/lib/simple-tree/treeSchema.d.ts.map +1 -1
  1246. package/lib/simple-tree/treeSchema.js.map +1 -1
  1247. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts +4 -13
  1248. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.d.ts.map +1 -1
  1249. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js +13 -30
  1250. package/lib/simple-tree/unhydratedFlexTreeFromInsertable.js.map +1 -1
  1251. package/lib/tableSchema.d.ts.map +1 -1
  1252. package/lib/tableSchema.js +2 -1
  1253. package/lib/tableSchema.js.map +1 -1
  1254. package/lib/text/index.d.ts +1 -0
  1255. package/lib/text/index.d.ts.map +1 -1
  1256. package/lib/text/index.js +1 -0
  1257. package/lib/text/index.js.map +1 -1
  1258. package/lib/text/textDomain.d.ts +8 -0
  1259. package/lib/text/textDomain.d.ts.map +1 -1
  1260. package/lib/text/textDomain.js +1 -1
  1261. package/lib/text/textDomain.js.map +1 -1
  1262. package/lib/text/textDomainFormatted.d.ts +572 -0
  1263. package/lib/text/textDomainFormatted.d.ts.map +1 -0
  1264. package/lib/text/textDomainFormatted.js +180 -0
  1265. package/lib/text/textDomainFormatted.js.map +1 -0
  1266. package/lib/treeFactory.d.ts.map +1 -1
  1267. package/lib/treeFactory.js +4 -14
  1268. package/lib/treeFactory.js.map +1 -1
  1269. package/lib/util/bTreeUtils.d.ts.map +1 -1
  1270. package/lib/util/bTreeUtils.js +1 -1
  1271. package/lib/util/bTreeUtils.js.map +1 -1
  1272. package/lib/util/index.d.ts +1 -1
  1273. package/lib/util/index.d.ts.map +1 -1
  1274. package/lib/util/index.js +1 -1
  1275. package/lib/util/index.js.map +1 -1
  1276. package/lib/util/rangeMap.d.ts +12 -24
  1277. package/lib/util/rangeMap.d.ts.map +1 -1
  1278. package/lib/util/rangeMap.js +5 -44
  1279. package/lib/util/rangeMap.js.map +1 -1
  1280. package/lib/util/readSnapshotBlob.d.ts +1 -1
  1281. package/lib/util/readSnapshotBlob.d.ts.map +1 -1
  1282. package/lib/util/readSnapshotBlob.js.map +1 -1
  1283. package/package.json +22 -22
  1284. package/src/codec/codec.ts +10 -7
  1285. package/src/codec/versioned/codec.ts +3 -3
  1286. package/src/core/change-family/changeFamily.ts +0 -5
  1287. package/src/core/change-family/index.ts +0 -1
  1288. package/src/core/index.ts +1 -4
  1289. package/src/core/rebase/changeRebaser.ts +1 -6
  1290. package/src/core/rebase/index.ts +0 -1
  1291. package/src/core/rebase/types.ts +1 -8
  1292. package/src/core/rebase/utils.ts +7 -31
  1293. package/src/core/schema-stored/formatV2.ts +2 -1
  1294. package/src/core/tree/anchorSet.ts +1 -1
  1295. package/src/core/tree/detachedFieldIndex.ts +2 -18
  1296. package/src/core/tree/detachedFieldIndexCodecCommon.ts +2 -1
  1297. package/src/core/tree/detachedFieldIndexCodecV1.ts +2 -2
  1298. package/src/core/tree/detachedFieldIndexCodecV2.ts +3 -3
  1299. package/src/core/tree/detachedFieldIndexFormatV1.ts +3 -2
  1300. package/src/core/tree/detachedFieldIndexFormatV2.ts +3 -2
  1301. package/src/core/tree/index.ts +1 -2
  1302. package/src/core/tree/pathTree.ts +4 -16
  1303. package/src/core/tree/visitDelta.ts +2 -3
  1304. package/src/core/tree/visitorUtils.ts +2 -1
  1305. package/src/feature-libraries/changeAtomIdBTree.ts +4 -28
  1306. package/src/feature-libraries/chunked-forest/basicChunk.ts +1 -7
  1307. package/src/feature-libraries/chunked-forest/chunkTree.ts +2 -7
  1308. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +1 -1
  1309. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +1 -1
  1310. package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -1
  1311. package/src/feature-libraries/chunked-forest/codec/codecs.ts +2 -2
  1312. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
  1313. package/src/feature-libraries/chunked-forest/codec/format.ts +1 -1
  1314. package/src/feature-libraries/chunked-forest/codec/formatGeneric.ts +1 -0
  1315. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +3 -3
  1316. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +128 -405
  1317. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +27 -123
  1318. package/src/feature-libraries/default-schema/index.ts +5 -22
  1319. package/src/feature-libraries/default-schema/mappedEditBuilder.ts +9 -35
  1320. package/src/feature-libraries/deltaUtils.ts +1 -6
  1321. package/src/feature-libraries/fieldKindIdentifiers.ts +16 -0
  1322. package/src/feature-libraries/flex-tree/context.ts +0 -17
  1323. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +8 -7
  1324. package/src/feature-libraries/flex-tree/lazyField.ts +26 -69
  1325. package/src/feature-libraries/flex-tree/observer.ts +3 -1
  1326. package/src/feature-libraries/forest-summary/codec.ts +1 -1
  1327. package/src/feature-libraries/forest-summary/forestSummarizer.ts +6 -6
  1328. package/src/feature-libraries/forest-summary/formatV1.ts +1 -0
  1329. package/src/feature-libraries/forest-summary/formatV2.ts +1 -0
  1330. package/src/feature-libraries/forest-summary/incrementalSummaryBuilder.ts +9 -7
  1331. package/src/feature-libraries/forest-summary/summaryTypes.ts +1 -0
  1332. package/src/feature-libraries/index.ts +8 -27
  1333. package/src/feature-libraries/mapTreeCursor.ts +2 -3
  1334. package/src/feature-libraries/mitigatedChangeFamily.ts +1 -3
  1335. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +44 -142
  1336. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +58 -32
  1337. package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +1 -0
  1338. package/src/feature-libraries/modular-schema/genericFieldKind.ts +20 -8
  1339. package/src/feature-libraries/modular-schema/index.ts +15 -16
  1340. package/src/feature-libraries/modular-schema/modularChangeCodecV1.ts +336 -543
  1341. package/src/feature-libraries/modular-schema/modularChangeCodecV2.ts +2 -2
  1342. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +3 -15
  1343. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +753 -2582
  1344. package/src/feature-libraries/modular-schema/modularChangeFormatV1.ts +0 -1
  1345. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +8 -55
  1346. package/src/feature-libraries/object-forest/objectForest.ts +2 -2
  1347. package/src/feature-libraries/optional-field/index.ts +5 -5
  1348. package/src/feature-libraries/optional-field/optionalField.ts +592 -317
  1349. package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +38 -24
  1350. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +35 -89
  1351. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +1 -5
  1352. package/src/feature-libraries/optional-field/requiredField.ts +62 -0
  1353. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +1 -1
  1354. package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +1 -0
  1355. package/src/feature-libraries/schemaChecker.ts +3 -2
  1356. package/src/feature-libraries/sequence-field/compose.ts +522 -139
  1357. package/src/feature-libraries/sequence-field/helperTypes.ts +19 -34
  1358. package/src/feature-libraries/sequence-field/index.ts +2 -42
  1359. package/src/feature-libraries/sequence-field/invert.ts +228 -103
  1360. package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
  1361. package/src/feature-libraries/sequence-field/moveEffectTable.ts +195 -8
  1362. package/src/feature-libraries/sequence-field/rebase.ts +205 -169
  1363. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +57 -0
  1364. package/src/feature-libraries/sequence-field/replaceRevisions.ts +47 -25
  1365. package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +2 -0
  1366. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +228 -648
  1367. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +70 -56
  1368. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +27 -25
  1369. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +129 -19
  1370. package/src/feature-libraries/sequence-field/sequenceKind.ts +40 -0
  1371. package/src/feature-libraries/sequence-field/types.ts +64 -34
  1372. package/src/feature-libraries/sequence-field/utils.ts +353 -139
  1373. package/src/index.ts +1 -1
  1374. package/src/packageVersion.ts +1 -1
  1375. package/src/shared-tree/independentView.ts +4 -3
  1376. package/src/shared-tree/index.ts +2 -3
  1377. package/src/shared-tree/schematizeTree.ts +8 -21
  1378. package/src/shared-tree/schematizingTreeView.ts +79 -61
  1379. package/src/shared-tree/sharedTree.ts +10 -64
  1380. package/src/shared-tree/sharedTreeChangeCodecs.ts +2 -5
  1381. package/src/shared-tree/sharedTreeChangeEnricher.ts +87 -68
  1382. package/src/shared-tree/sharedTreeChangeFamily.ts +5 -15
  1383. package/src/shared-tree/sharedTreeEditBuilder.ts +8 -39
  1384. package/src/shared-tree/tree.ts +10 -10
  1385. package/src/shared-tree/treeAlpha.ts +26 -25
  1386. package/src/shared-tree/treeCheckout.ts +119 -94
  1387. package/src/shared-tree-core/branch.ts +6 -12
  1388. package/src/shared-tree-core/branchCommitEnricher.ts +25 -77
  1389. package/src/shared-tree-core/branchIdCodec.ts +1 -0
  1390. package/src/shared-tree-core/changeEnricher.ts +8 -52
  1391. package/src/shared-tree-core/defaultResubmitMachine.ts +39 -51
  1392. package/src/shared-tree-core/editManager.ts +8 -22
  1393. package/src/shared-tree-core/editManagerCodecs.ts +3 -13
  1394. package/src/shared-tree-core/editManagerCodecsCommons.ts +7 -6
  1395. package/src/shared-tree-core/editManagerCodecsV1toV4.ts +1 -1
  1396. package/src/shared-tree-core/editManagerCodecsVSharedBranches.ts +2 -2
  1397. package/src/shared-tree-core/editManagerFormatCommons.ts +1 -6
  1398. package/src/shared-tree-core/editManagerFormatV1toV4.ts +2 -3
  1399. package/src/shared-tree-core/editManagerFormatVSharedBranches.ts +3 -2
  1400. package/src/shared-tree-core/index.ts +2 -7
  1401. package/src/shared-tree-core/messageCodecV1ToV4.ts +4 -5
  1402. package/src/shared-tree-core/messageCodecVSharedBranches.ts +4 -4
  1403. package/src/shared-tree-core/messageCodecs.ts +3 -13
  1404. package/src/shared-tree-core/messageFormat.ts +0 -6
  1405. package/src/shared-tree-core/messageFormatV1ToV4.ts +2 -3
  1406. package/src/shared-tree-core/messageFormatVSharedBranches.ts +1 -0
  1407. package/src/shared-tree-core/messageTypes.ts +1 -0
  1408. package/src/shared-tree-core/sharedTreeCore.ts +27 -31
  1409. package/src/shared-tree-core/versionedSummarizer.ts +3 -1
  1410. package/src/simple-tree/api/configuration.ts +9 -9
  1411. package/src/simple-tree/api/create.ts +7 -6
  1412. package/src/simple-tree/api/dirtyIndex.ts +4 -2
  1413. package/src/simple-tree/api/discrepancies.ts +9 -8
  1414. package/src/simple-tree/api/getJsonSchema.ts +4 -3
  1415. package/src/simple-tree/api/identifierIndex.ts +4 -2
  1416. package/src/simple-tree/api/incrementalAllowedTypes.ts +6 -5
  1417. package/src/simple-tree/api/schemaCompatibilityTester.ts +3 -3
  1418. package/src/simple-tree/api/schemaCreationUtilities.ts +4 -3
  1419. package/src/simple-tree/api/schemaFactory.ts +16 -17
  1420. package/src/simple-tree/api/schemaFactoryAlpha.ts +21 -21
  1421. package/src/simple-tree/api/schemaFactoryBeta.ts +17 -15
  1422. package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -1
  1423. package/src/simple-tree/api/schemaFromSimple.ts +1 -1
  1424. package/src/simple-tree/api/schemaStatics.ts +2 -0
  1425. package/src/simple-tree/api/simpleSchemaCodec.ts +12 -11
  1426. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +20 -18
  1427. package/src/simple-tree/api/simpleTreeIndex.ts +6 -4
  1428. package/src/simple-tree/api/snapshotCompatibilityChecker.ts +7 -5
  1429. package/src/simple-tree/api/storedSchema.ts +2 -1
  1430. package/src/simple-tree/api/tree.ts +2 -2
  1431. package/src/simple-tree/api/treeBeta.ts +3 -3
  1432. package/src/simple-tree/api/treeNodeApi.ts +14 -13
  1433. package/src/simple-tree/api/typesUnsafe.ts +7 -8
  1434. package/src/simple-tree/api/verboseTree.ts +6 -5
  1435. package/src/simple-tree/core/allowedTypes.ts +4 -4
  1436. package/src/simple-tree/core/context.ts +1 -1
  1437. package/src/simple-tree/core/treeNode.ts +1 -1
  1438. package/src/simple-tree/core/treeNodeKernel.ts +1 -3
  1439. package/src/simple-tree/core/treeNodeSchema.ts +7 -6
  1440. package/src/simple-tree/core/treeNodeValid.ts +9 -9
  1441. package/src/simple-tree/core/unhydratedFlexTree.ts +37 -88
  1442. package/src/simple-tree/core/withType.ts +3 -2
  1443. package/src/simple-tree/createContext.ts +1 -0
  1444. package/src/simple-tree/fieldSchema.ts +5 -8
  1445. package/src/simple-tree/index.ts +1 -2
  1446. package/src/simple-tree/leafNodeSchema.ts +3 -3
  1447. package/src/simple-tree/node-kinds/array/arrayNode.ts +20 -21
  1448. package/src/simple-tree/node-kinds/array/arrayNodeTypes.ts +2 -2
  1449. package/src/simple-tree/node-kinds/common.ts +6 -3
  1450. package/src/simple-tree/node-kinds/map/mapNode.ts +20 -19
  1451. package/src/simple-tree/node-kinds/map/mapNodeTypes.ts +2 -2
  1452. package/src/simple-tree/node-kinds/object/objectNode.ts +37 -37
  1453. package/src/simple-tree/node-kinds/object/objectNodeTypes.ts +8 -7
  1454. package/src/simple-tree/node-kinds/record/recordNode.ts +21 -22
  1455. package/src/simple-tree/node-kinds/record/recordNodeTypes.ts +1 -2
  1456. package/src/simple-tree/prepareForInsertion.ts +205 -345
  1457. package/src/simple-tree/simpleSchema.ts +1 -0
  1458. package/src/simple-tree/treeSchema.ts +1 -0
  1459. package/src/simple-tree/unhydratedFlexTreeFromInsertable.ts +16 -44
  1460. package/src/tableSchema.ts +3 -1
  1461. package/src/text/index.ts +1 -0
  1462. package/src/text/textDomain.ts +1 -1
  1463. package/src/text/textDomainFormatted.ts +309 -0
  1464. package/src/treeFactory.ts +8 -18
  1465. package/src/util/bTreeUtils.ts +1 -1
  1466. package/src/util/index.ts +0 -3
  1467. package/src/util/rangeMap.ts +18 -72
  1468. package/src/util/readSnapshotBlob.ts +4 -2
  1469. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
  1470. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
  1471. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -132
  1472. package/dist/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
  1473. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
  1474. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
  1475. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -393
  1476. package/dist/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
  1477. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
  1478. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
  1479. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -32
  1480. package/dist/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
  1481. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
  1482. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
  1483. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -31
  1484. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
  1485. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
  1486. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
  1487. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -57
  1488. package/dist/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
  1489. package/dist/shared-tree-core/transactionEnricher.d.ts +0 -23
  1490. package/dist/shared-tree-core/transactionEnricher.d.ts.map +0 -1
  1491. package/dist/shared-tree-core/transactionEnricher.js +0 -74
  1492. package/dist/shared-tree-core/transactionEnricher.js.map +0 -1
  1493. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts +0 -38
  1494. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.d.ts.map +0 -1
  1495. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js +0 -128
  1496. package/lib/feature-libraries/default-schema/locationBasedEditBuilder.js.map +0 -1
  1497. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts +0 -15
  1498. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.d.ts.map +0 -1
  1499. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js +0 -389
  1500. package/lib/feature-libraries/modular-schema/modularChangeCodecV3.js.map +0 -1
  1501. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts +0 -146
  1502. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.d.ts.map +0 -1
  1503. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js +0 -29
  1504. package/lib/feature-libraries/modular-schema/modularChangeFormatV3.js.map +0 -1
  1505. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts +0 -23
  1506. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.d.ts.map +0 -1
  1507. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js +0 -27
  1508. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV3.js.map +0 -1
  1509. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts +0 -12
  1510. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.d.ts.map +0 -1
  1511. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js +0 -53
  1512. package/lib/feature-libraries/optional-field/optionalFieldCodecV3.js.map +0 -1
  1513. package/lib/shared-tree-core/transactionEnricher.d.ts +0 -23
  1514. package/lib/shared-tree-core/transactionEnricher.d.ts.map +0 -1
  1515. package/lib/shared-tree-core/transactionEnricher.js +0 -70
  1516. package/lib/shared-tree-core/transactionEnricher.js.map +0 -1
  1517. package/src/feature-libraries/default-schema/locationBasedEditBuilder.ts +0 -188
  1518. package/src/feature-libraries/modular-schema/modularChangeCodecV3.ts +0 -760
  1519. package/src/feature-libraries/modular-schema/modularChangeFormatV3.ts +0 -62
  1520. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV3.ts +0 -45
  1521. package/src/feature-libraries/optional-field/optionalFieldCodecV3.ts +0 -94
  1522. package/src/shared-tree-core/transactionEnricher.ts +0 -74
@@ -1 +1 @@
1
- {"version":3,"file":"storedSchema.js","sourceRoot":"","sources":["../../../src/simple-tree/api/storedSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,mDAI8B;AAC9B,kDAA0D;AAC1D,+DAAmE;AAOnE,sDAAmF;AACnF,4DAAsD;AACtD,yDAAgE;AAEhE,iFAA2E;AAG3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,sBAAsB,CACrC,MAA2B,EAC3B,mBAA4C,EAC5C,aAAkD;IAElD,MAAM,MAAM,GAAG,IAAA,kCAAc,EAAC,MAAM,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,IAAA,0BAAe,EAAC,EAAE,mBAAmB,EAAE,aAAa,EAAE,8BAAmB,EAAE,CAAC,CAAC;IAC3F,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAmB,CAAC;AAC/C,CAAC;AARD,wDAQC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,SAAgB,sBAAsB,CACrC,SAAyB,EACzB,IAAyB,EACzB,OAAsB;IAEtB,0DAA0D;IAC1D,2JAA2J;IAC3J,MAAM,WAAW,GAAG,IAAA,0BAAe,EAClC,EAAE,GAAG,OAAO,EAAE,mBAAmB,EAAE,6BAAkB,CAAC,IAAI,EAAE,EAC5D,8BAAmB,CAAC,EAAE,CACtB,CAAC;IACF,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,SAAqB,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,IAAI,6CAA0B,CAAC;QAC7C,MAAM,EAAE,IAAA,qCAAoB,EAAC,IAAI,CAAC;KAClC,CAAC,CAAC;IACH,MAAM,UAAU,GAAG,IAAI,wDAAyB,CAAC,MAAM,CAAC,CAAC;IACzD,OAAO,UAAU,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC;AAjBD,wDAiBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tFluidClientVersion,\n\tFormatValidatorNoOp,\n\ttype ICodecOptions,\n} from \"../../codec/index.js\";\nimport { SchemaFormatVersion } from \"../../core/index.js\";\nimport { makeSchemaCodec } from \"../../feature-libraries/index.js\";\nimport type {\n\tFormatV1,\n\t// eslint-disable-next-line import-x/no-internal-modules\n} from \"../../feature-libraries/schema-index/index.js\";\nimport type { JsonCompatible } from \"../../util/index.js\";\nimport type { SchemaUpgrade } from \"../core/index.js\";\nimport { normalizeFieldSchema, type ImplicitFieldSchema } from \"../fieldSchema.js\";\nimport { toStoredSchema } from \"../toStoredSchema.js\";\nimport { TreeViewConfigurationAlpha } from \"./configuration.js\";\n\nimport { SchemaCompatibilityTester } from \"./schemaCompatibilityTester.js\";\nimport type { SchemaCompatibilityStatus } from \"./tree.js\";\n\n/**\n * Dumps the \"persisted\" schema subset of the provided `schema` into a deterministic JSON-compatible, semi-human-readable format.\n *\n * @param schema - The schema to dump.\n * @param minVersionForCollab - The oldest client version which can read the schema: impacts the format used.\n * @param includeStaged - filter for selecting which staged allowed types to include in the output.\n *\n * @remarks\n * This can be used to help inspect schema for debugging, and to save a snapshot of schema to help detect and review changes to an applications schema.\n * This format is also compatible with {@link ViewContent.schema}, {@link comparePersistedSchema} and {@link persistedToSimpleSchema}.\n *\n * This only includes the \"persisted\" subset of schema information, which means the portion which gets included in documents.\n * It thus uses \"persisted\" keys, see {@link FieldProps.key}.\n *\n * If two schema have identical \"persisted\" schema, then they are considered {@link SchemaCompatibilityStatus.isEquivalent|equivalent}.\n *\n * See also {@link comparePersistedSchema}.\n *\n * @example\n * An application could use this API to generate a `schema.json` file when it first releases,\n * then test that the schema is sill compatible with documents from that version with a test like :\n * ```typescript\n * assert.deepEqual(extractPersistedSchema(MySchema, FluidClientVersion.v2_0), require(\"./schema.json\"));\n * ```\n *\n * @privateRemarks\n * This currently uses the schema summary format, but that could be changed to something more human readable (particularly if the encoded format becomes less human readable).\n * This intentionally does not leak the format types in the API.\n *\n * Public API surface uses \"persisted\" terminology while internally we use \"stored\".\n * @alpha\n */\nexport function extractPersistedSchema(\n\tschema: ImplicitFieldSchema,\n\tminVersionForCollab: MinimumVersionForCollab,\n\tincludeStaged: (upgrade: SchemaUpgrade) => boolean,\n): JsonCompatible {\n\tconst stored = toStoredSchema(schema, { includeStaged });\n\tconst codec = makeSchemaCodec({ minVersionForCollab, jsonValidator: FormatValidatorNoOp });\n\treturn codec.encode(stored) as JsonCompatible;\n}\n\n/**\n * Compares two schema extracted using {@link extractPersistedSchema}.\n * Reports the same compatibility that {@link TreeView.compatibility} would report if\n * opening a document that used the `persisted` schema and provided `view` to {@link ViewableTree.viewWith}.\n *\n * @param persisted - Schema persisted for a document. Typically persisted alongside the data and assumed to describe that data.\n * @param view - Schema which would be used to view persisted content.\n * @param options - {@link ICodecOptions} used when parsing the provided schema.\n * @param canInitialize - Passed through to the return value unchanged and otherwise unused.\n * @returns The {@link SchemaCompatibilityStatus} a {@link TreeView} would report for this combination of schema.\n *\n * @remarks\n * This uses the persisted formats for schema, meaning it only includes data which impacts compatibility.\n * It also uses the persisted format so that this API can be used in tests to compare against saved schema from previous versions of the application.\n *\n * @example\n * An application could use {@link extractPersistedSchema} to generate a `schema.json` file for various versions of the app,\n * then test that documents using those schema can be upgraded to work with the current schema using a test like:\n * ```typescript\n * assert(\n * \tcomparePersistedSchema(\n * \t\trequire(\"./schema.json\"),\n * \t\tMySchema,\n * \t\t{ jsonValidator: typeboxValidator },\n * \t\tfalse,\n * \t).canUpgrade,\n * );\n * ```\n * @alpha\n */\nexport function comparePersistedSchema(\n\tpersisted: JsonCompatible,\n\tview: ImplicitFieldSchema,\n\toptions: ICodecOptions,\n): Omit<SchemaCompatibilityStatus, \"canInitialize\"> {\n\t// Any version can be passed down to makeSchemaCodec here.\n\t// We only use the decode part, which always dispatches to the correct codec based on the version in the data, not the version passed to `makeSchemaCodec`.\n\tconst schemaCodec = makeSchemaCodec(\n\t\t{ ...options, minVersionForCollab: FluidClientVersion.v2_0 },\n\t\tSchemaFormatVersion.v1,\n\t);\n\tconst stored = schemaCodec.decode(persisted as FormatV1);\n\tconst config = new TreeViewConfigurationAlpha({\n\t\tschema: normalizeFieldSchema(view),\n\t});\n\tconst viewSchema = new SchemaCompatibilityTester(config);\n\treturn viewSchema.checkCompatibility(stored);\n}\n"]}
1
+ {"version":3,"file":"storedSchema.js","sourceRoot":"","sources":["../../../src/simple-tree/api/storedSchema.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,mDAI8B;AAC9B,kDAA0D;AAC1D,+DAAmE;AAOnE,sDAAmF;AACnF,4DAAsD;AAEtD,yDAAgE;AAChE,iFAA2E;AAG3E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAgB,sBAAsB,CACrC,MAA2B,EAC3B,mBAA4C,EAC5C,aAAkD;IAElD,MAAM,MAAM,GAAG,IAAA,kCAAc,EAAC,MAAM,EAAE,EAAE,aAAa,EAAE,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,IAAA,0BAAe,EAAC,EAAE,mBAAmB,EAAE,aAAa,EAAE,8BAAmB,EAAE,CAAC,CAAC;IAC3F,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAmB,CAAC;AAC/C,CAAC;AARD,wDAQC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,SAAgB,sBAAsB,CACrC,SAAyB,EACzB,IAAyB,EACzB,OAAsB;IAEtB,0DAA0D;IAC1D,2JAA2J;IAC3J,MAAM,WAAW,GAAG,IAAA,0BAAe,EAClC,EAAE,GAAG,OAAO,EAAE,mBAAmB,EAAE,6BAAkB,CAAC,IAAI,EAAE,EAC5D,8BAAmB,CAAC,EAAE,CACtB,CAAC;IACF,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,SAAqB,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,IAAI,6CAA0B,CAAC;QAC7C,MAAM,EAAE,IAAA,qCAAoB,EAAC,IAAI,CAAC;KAClC,CAAC,CAAC;IACH,MAAM,UAAU,GAAG,IAAI,wDAAyB,CAAC,MAAM,CAAC,CAAC;IACzD,OAAO,UAAU,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC;AAjBD,wDAiBC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { MinimumVersionForCollab } from \"@fluidframework/runtime-definitions/internal\";\n\nimport {\n\tFluidClientVersion,\n\tFormatValidatorNoOp,\n\ttype ICodecOptions,\n} from \"../../codec/index.js\";\nimport { SchemaFormatVersion } from \"../../core/index.js\";\nimport { makeSchemaCodec } from \"../../feature-libraries/index.js\";\nimport type {\n\tFormatV1,\n\t// eslint-disable-next-line import-x/no-internal-modules\n} from \"../../feature-libraries/schema-index/index.js\";\nimport type { JsonCompatible } from \"../../util/index.js\";\nimport type { SchemaUpgrade } from \"../core/index.js\";\nimport { normalizeFieldSchema, type ImplicitFieldSchema } from \"../fieldSchema.js\";\nimport { toStoredSchema } from \"../toStoredSchema.js\";\n\nimport { TreeViewConfigurationAlpha } from \"./configuration.js\";\nimport { SchemaCompatibilityTester } from \"./schemaCompatibilityTester.js\";\nimport type { SchemaCompatibilityStatus } from \"./tree.js\";\n\n/**\n * Dumps the \"persisted\" schema subset of the provided `schema` into a deterministic JSON-compatible, semi-human-readable format.\n *\n * @param schema - The schema to dump.\n * @param minVersionForCollab - The oldest client version which can read the schema: impacts the format used.\n * @param includeStaged - filter for selecting which staged allowed types to include in the output.\n *\n * @remarks\n * This can be used to help inspect schema for debugging, and to save a snapshot of schema to help detect and review changes to an applications schema.\n * This format is also compatible with {@link ViewContent.schema}, {@link comparePersistedSchema} and {@link persistedToSimpleSchema}.\n *\n * This only includes the \"persisted\" subset of schema information, which means the portion which gets included in documents.\n * It thus uses \"persisted\" keys, see {@link FieldProps.key}.\n *\n * If two schema have identical \"persisted\" schema, then they are considered {@link SchemaCompatibilityStatus.isEquivalent|equivalent}.\n *\n * See also {@link comparePersistedSchema}.\n *\n * @example\n * An application could use this API to generate a `schema.json` file when it first releases,\n * then test that the schema is sill compatible with documents from that version with a test like :\n * ```typescript\n * assert.deepEqual(extractPersistedSchema(MySchema, FluidClientVersion.v2_0), require(\"./schema.json\"));\n * ```\n *\n * @privateRemarks\n * This currently uses the schema summary format, but that could be changed to something more human readable (particularly if the encoded format becomes less human readable).\n * This intentionally does not leak the format types in the API.\n *\n * Public API surface uses \"persisted\" terminology while internally we use \"stored\".\n * @alpha\n */\nexport function extractPersistedSchema(\n\tschema: ImplicitFieldSchema,\n\tminVersionForCollab: MinimumVersionForCollab,\n\tincludeStaged: (upgrade: SchemaUpgrade) => boolean,\n): JsonCompatible {\n\tconst stored = toStoredSchema(schema, { includeStaged });\n\tconst codec = makeSchemaCodec({ minVersionForCollab, jsonValidator: FormatValidatorNoOp });\n\treturn codec.encode(stored) as JsonCompatible;\n}\n\n/**\n * Compares two schema extracted using {@link extractPersistedSchema}.\n * Reports the same compatibility that {@link TreeView.compatibility} would report if\n * opening a document that used the `persisted` schema and provided `view` to {@link ViewableTree.viewWith}.\n *\n * @param persisted - Schema persisted for a document. Typically persisted alongside the data and assumed to describe that data.\n * @param view - Schema which would be used to view persisted content.\n * @param options - {@link ICodecOptions} used when parsing the provided schema.\n * @param canInitialize - Passed through to the return value unchanged and otherwise unused.\n * @returns The {@link SchemaCompatibilityStatus} a {@link TreeView} would report for this combination of schema.\n *\n * @remarks\n * This uses the persisted formats for schema, meaning it only includes data which impacts compatibility.\n * It also uses the persisted format so that this API can be used in tests to compare against saved schema from previous versions of the application.\n *\n * @example\n * An application could use {@link extractPersistedSchema} to generate a `schema.json` file for various versions of the app,\n * then test that documents using those schema can be upgraded to work with the current schema using a test like:\n * ```typescript\n * assert(\n * \tcomparePersistedSchema(\n * \t\trequire(\"./schema.json\"),\n * \t\tMySchema,\n * \t\t{ jsonValidator: typeboxValidator },\n * \t\tfalse,\n * \t).canUpgrade,\n * );\n * ```\n * @alpha\n */\nexport function comparePersistedSchema(\n\tpersisted: JsonCompatible,\n\tview: ImplicitFieldSchema,\n\toptions: ICodecOptions,\n): Omit<SchemaCompatibilityStatus, \"canInitialize\"> {\n\t// Any version can be passed down to makeSchemaCodec here.\n\t// We only use the decode part, which always dispatches to the correct codec based on the version in the data, not the version passed to `makeSchemaCodec`.\n\tconst schemaCodec = makeSchemaCodec(\n\t\t{ ...options, minVersionForCollab: FluidClientVersion.v2_0 },\n\t\tSchemaFormatVersion.v1,\n\t);\n\tconst stored = schemaCodec.decode(persisted as FormatV1);\n\tconst config = new TreeViewConfigurationAlpha({\n\t\tschema: normalizeFieldSchema(view),\n\t});\n\tconst viewSchema = new SchemaCompatibilityTester(config);\n\treturn viewSchema.checkCompatibility(stored);\n}\n"]}
@@ -4,13 +4,13 @@
4
4
  */
5
5
  import type { IFluidLoadable, IDisposable, Listenable } from "@fluidframework/core-interfaces";
6
6
  import type { CommitMetadata, ChangeMetadata, RevertibleAlphaFactory, RevertibleFactory } from "../../core/index.js";
7
+ import type { JsonCompatibleReadOnly } from "../../util/index.js";
7
8
  import type { ImplicitFieldSchema, InsertableField, InsertableTreeFieldFromImplicitField, ReadableField, ReadSchema, TreeFieldFromImplicitField } from "../fieldSchema.js";
8
- import type { UnsafeUnknownSchema } from "../unsafeUnknownSchema.js";
9
9
  import type { SimpleTreeSchema } from "../simpleSchema.js";
10
+ import type { UnsafeUnknownSchema } from "../unsafeUnknownSchema.js";
10
11
  import type { TreeViewConfiguration } from "./configuration.js";
11
12
  import type { RunTransactionParams, TransactionCallbackStatus, TransactionResult, TransactionResultExt, VoidTransactionCallbackStatus } from "./transactionTypes.js";
12
13
  import type { VerboseTree } from "./verboseTree.js";
13
- import type { JsonCompatibleReadOnly } from "../../util/index.js";
14
14
  /**
15
15
  * A tree from which a {@link TreeView} can be created.
16
16
  *
@@ -1 +1 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/tree.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE/F,OAAO,KAAK,EACX,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,qBAAqB,CAAC;AAM7B,OAAO,KAAK,EACX,mBAAmB,EACnB,eAAe,EACf,oCAAoC,EACpC,aAAa,EACb,UAAU,EACV,0BAA0B,EAC1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,CAAC;CAC7E;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,OAAO,SAAS,mBAAmB,EAClE,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,GACrB,aAAa,CAAC,OAAO,CAAC,CAExB"}
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../src/simple-tree/api/tree.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8kBH;;;;;GAKG;AACH,SAAgB,eAAe,CAC9B,IAAuB;IAEvB,OAAO,IAA8B,CAAC;AACvC,CAAC;AAJD,0CAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidLoadable, IDisposable, Listenable } from \"@fluidframework/core-interfaces\";\n\nimport type {\n\tCommitMetadata,\n\tChangeMetadata,\n\tRevertibleAlphaFactory,\n\tRevertibleFactory,\n} from \"../../core/index.js\";\nimport type {\n\t// This is referenced by doc comments.\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports\n\tTreeAlpha,\n} from \"../../shared-tree/index.js\";\nimport type {\n\tImplicitFieldSchema,\n\tInsertableField,\n\tInsertableTreeFieldFromImplicitField,\n\tReadableField,\n\tReadSchema,\n\tTreeFieldFromImplicitField,\n} from \"../fieldSchema.js\";\nimport type { UnsafeUnknownSchema } from \"../unsafeUnknownSchema.js\";\nimport type { SimpleTreeSchema } from \"../simpleSchema.js\";\n\nimport type { TreeViewConfiguration } from \"./configuration.js\";\nimport type {\n\tRunTransactionParams,\n\tTransactionCallbackStatus,\n\tTransactionResult,\n\tTransactionResultExt,\n\tVoidTransactionCallbackStatus,\n} from \"./transactionTypes.js\";\nimport type { VerboseTree } from \"./verboseTree.js\";\nimport type { JsonCompatibleReadOnly } from \"../../util/index.js\";\n\n/**\n * A tree from which a {@link TreeView} can be created.\n *\n * @privateRemarks\n * TODO:\n * Add stored key versions of {@link (TreeAlpha:interface).(exportVerbose:2)}, {@link (TreeAlpha:interface).(exportConcise:2)} and {@link (TreeAlpha:interface).exportCompressed} here so tree content can be accessed without a view schema.\n * Add exportSimpleSchema and exportJsonSchema methods (which should exactly match the concise format, and match the free functions for exporting view schema).\n * Maybe rename \"exportJsonSchema\" to align on \"concise\" terminology.\n * Ensure schema exporting APIs here align and reference APIs for exporting view schema to the same formats (which should include stored vs property key choice).\n * Make sure users of independentView can use these export APIs (maybe provide a reference back to the ViewableTree from the TreeView to accomplish that).\n * @system @sealed @public\n */\nexport interface ViewableTree {\n\t/**\n\t * Returns a {@link TreeView} using the provided schema.\n\t * If the stored schema is compatible with the view schema specified by `config`,\n\t * the returned {@link TreeView} will expose the root with a schema-aware API based on the provided view schema.\n\t * If the provided schema is incompatible with the stored schema, the view will instead expose a status indicating the incompatibility.\n\t *\n\t * @remarks\n\t * If the tree is uninitialized (has no schema and no content), use {@link TreeView.initialize} on the returned view to set the schema and content together.\n\t * Using `viewWith` followed by {@link TreeView.upgradeSchema} to initialize only the schema for a document is technically valid when the schema\n\t * permits trees with no content.\n\t *\n\t * Note that other clients can modify the document at any time, causing the view to change its compatibility status: see {@link TreeView.events} for how to handle invalidation in these cases.\n\t *\n\t * Only one schematized view may exist for a given ITree at a time.\n\t * If creating a second, the first must be disposed before calling `viewWith` again.\n\t *\n\t * @privateRemarks\n\t * TODO: Support adapters for handling out-of-schema data.\n\t */\n\tviewWith<TRoot extends ImplicitFieldSchema>(\n\t\tconfig: TreeViewConfiguration<TRoot>,\n\t): TreeView<TRoot>;\n}\n\n/**\n * Channel for a Fluid Tree DDS.\n * @remarks\n * Allows storing and collaboratively editing schema-aware hierarchial data.\n * @sealed @public\n */\nexport interface ITree extends ViewableTree, IFluidLoadable {}\n\n/**\n * {@link ITree} extended with some alpha APIs.\n * @sealed @alpha\n */\nexport interface ITreeAlpha extends ITree {\n\t/**\n\t * Exports root in the same format as {@link (TreeAlpha:interface).(exportVerbose:1)} using stored keys.\n\t * @remarks\n\t * This is `undefined` if and only if the root field is empty (this can only happen if the root field is optional).\n\t */\n\texportVerbose(): VerboseTree | undefined;\n\n\t/**\n\t * Exports the SimpleTreeSchema that is stored in the tree, using stored keys for object fields.\n\t * @remarks\n\t * To get the schema using property keys, use {@link getSimpleSchema} on the view schema.\n\t */\n\texportSimpleSchema(): SimpleTreeSchema;\n\n\t/**\n\t * Creates a fork of the current state of the main branch.\n\t * This new branch will be shared with and editable by all clients.\n\t */\n\tcreateSharedBranch(): string;\n\n\t/**\n\t * Returns a list of all shared branches that currently exist on this tree.\n\t * Any one of them can be checked out using {@link ITreeAlpha.viewSharedBranchWith}.\n\t */\n\tgetSharedBranchIds(): string[];\n\n\t/**\n\t * Returns a view of the tree on the specified shared branch, using the provided schema.\n\t * See {@link ViewableTree.viewWith}.\n\t */\n\tviewSharedBranchWith<TRoot extends ImplicitFieldSchema>(\n\t\tbranchId: string,\n\t\tconfig: TreeViewConfiguration<TRoot>,\n\t): TreeView<TRoot>;\n}\n\n/**\n * A collection of functionality associated with a (version-control-style) branch of a SharedTree.\n * @remarks A `TreeBranch` allows for the {@link TreeBranch.fork | creation of branches} and for those branches to later be {@link TreeBranch.merge | merged}.\n *\n * The branch associated directly with the {@link ITree | SharedTree} is the \"main\" branch, and all other branches fork (directly or transitively) from that main branch.\n * @sealed @beta\n */\nexport interface TreeBranch extends IDisposable {\n\t/**\n\t * Fork a new branch off of this branch which is based off of this branch's current state.\n\t * @remarks Any changes to the tree on the new branch will not apply to this branch until the new branch is e.g. {@link TreeBranch.merge | merged} back into this branch.\n\t * The branch should be disposed when no longer needed, either {@link TreeBranch.dispose | explicitly} or {@link TreeBranch.merge | implicitly when merging} into another branch.\n\t */\n\tfork(): TreeBranch;\n\n\t/**\n\t * Apply all the new changes on the given branch to this branch.\n\t * @param branch - a branch which was created by a call to `branch()`.\n\t * @param disposeMerged - whether or not to dispose `branch` after the merge completes.\n\t * Defaults to true.\n\t * The {@link TreeBranch | main branch} cannot be disposed - attempting to do so will have no effect.\n\t * @remarks All ongoing transactions (if any) in `branch` will be committed before the merge.\n\t */\n\tmerge(branch: TreeBranch, disposeMerged?: boolean): void;\n\n\t/**\n\t * Advance this branch forward such that all new changes on the target branch become part of this branch.\n\t * @param branch - The branch to rebase onto.\n\t * @remarks After rebasing, this branch will be \"ahead\" of the target branch, that is, its unique changes will have been recreated as if they happened after all changes on the target branch.\n\t * This method may only be called on branches produced via {@link TreeBranch.fork | branch} - attempting to rebase the main branch will throw.\n\t *\n\t * Rebasing long-lived branches is important to avoid consuming memory unnecessarily.\n\t * In particular, the SharedTree retains all sequenced changes made to the tree since the \"most-behind\" branch was created or last rebased.\n\t *\n\t * The {@link TreeBranch | main branch} cannot be rebased onto another branch - attempting to do so will throw an error.\n\t */\n\trebaseOnto(branch: TreeBranch): void;\n\n\t/**\n\t * Dispose of this branch, cleaning up any resources associated with it.\n\t * @param error - Optional error indicating the reason for the disposal, if the object was disposed as the result of an error.\n\t * @remarks Branches can also be automatically disposed when {@link TreeBranch.merge | they are merged} into another branch.\n\t *\n\t * Disposing branches is important to avoid consuming memory unnecessarily.\n\t * In particular, the SharedTree retains all sequenced changes made to the tree since the \"most-behind\" branch was created or last {@link TreeBranch.rebaseOnto | rebased}.\n\t *\n\t * The {@link TreeBranch | main branch} cannot be disposed - attempting to do so will have no effect.\n\t */\n\tdispose(error?: Error): void;\n}\n\n/**\n * {@link TreeBranch} with alpha-level APIs.\n * @remarks\n * The `TreeBranch` for a specific {@link TreeNode} may be acquired by calling `TreeAlpha.branch`.\n *\n * A branch does not necessarily know the schema of its SharedTree - to convert a branch to a {@link TreeViewAlpha | view with a schema}, use {@link TreeBranchAlpha.hasRootSchema | hasRootSchema()}.\n * @sealed @alpha\n */\nexport interface TreeBranchAlpha extends TreeBranch {\n\t/**\n\t * Events for the branch\n\t */\n\treadonly events: Listenable<TreeBranchEvents>;\n\n\t/**\n\t * Returns true if this branch has the given schema as its root schema.\n\t * @remarks This is a type guard which allows this branch to become strongly typed as a {@link TreeViewAlpha | view} of the given schema.\n\t *\n\t * To succeed, the given schema must be invariant to the schema of the view - it must include exactly the same allowed types.\n\t * For example, a schema of `Foo | Bar` will not match a view schema of `Foo`, and likewise a schema of `Foo` will not match a view schema of `Foo | Bar`.\n\t * @example\n\t * ```typescript\n\t * if (branch.hasRootSchema(MySchema)) {\n\t * const { root } = branch; // `branch` is now a TreeViewAlpha<MySchema>\n\t * // ...\n\t * }\n\t * ```\n\t */\n\thasRootSchema<TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t): this is TreeViewAlpha<TSchema>;\n\n\t// Override the base fork method to return the alpha variant.\n\tfork(): TreeBranchAlpha;\n\n\t/**\n\t * Run a transaction which applies one or more edits to the tree as a single atomic unit.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * It should return a status object of {@link TransactionCallbackStatus | TransactionCallbackStatus } type.\n\t * It includes a \"rollback\" property which may be returned as true at any point during the transaction. This will\n\t * abort the transaction and discard any changes it made so far.\n\t * \"rollback\" can be set to false or left undefined to indicate that the body of the transaction has successfully run.\n\t * @param params - The optional parameters for the transaction. It includes the constraints that will be checked before the transaction begins.\n\t * @returns A result object of {@link TransactionResultExt | TransactionResultExt} type. It includes the following:\n\t *\n\t * - A \"success\" flag indicating whether the transaction was successful or not.\n\t * - The success or failure value as returned by the transaction function.\n\t *\n\t * @remarks\n\t * This API will throw an error if the constraints are not met or something unexpected happens.\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t *\n\t * Nested transactions:\n\t * This API can be called from within the transaction callback of another runTransaction call. That will have slightly different behavior:\n\t *\n\t * - If the inner transaction fails, only the inner transaction will be rolled back and the outer transaction will continue.\n\t * - Constraints will apply to the outermost transaction. Constraints are applied per commit and there will be one commit generated\n\t * for the outermost transaction which includes all inner transactions.\n\t * - Undo will undo the outermost transaction and all inner transactions.\n\t */\n\trunTransaction<TSuccessValue, TFailureValue>(\n\t\ttransaction: () => TransactionCallbackStatus<TSuccessValue, TFailureValue>,\n\t\tparams?: RunTransactionParams,\n\t): TransactionResultExt<TSuccessValue, TFailureValue>;\n\t/**\n\t * Run a transaction which applies one or more edits to the tree as a single atomic unit.\n\t * @param transaction - The function to run as the body of the transaction. It may return the following:\n\t *\n\t * - Nothing to indicate that the body of the transaction has successfully run.\n\t * - A status object of {@link VoidTransactionCallbackStatus | VoidTransactionCallbackStatus } type. It includes a \"rollback\" property which\n\t * may be returned as true at any point during the transaction. This will abort the transaction and discard any changes it made so\n\t * far. \"rollback\" can be set to false or left undefined to indicate that the body of the transaction has successfully run.\n\t *\n\t * @param params - The optional parameters for the transaction. It includes the constraints that will be checked before the transaction begins.\n\t * @returns A result object of {@link TransactionResult | TransactionResult} type. It includes a \"success\" flag indicating whether the\n\t * transaction was successful or not.\n\t *\n\t * @remarks\n\t * This API will throw an error if the constraints are not met or something unexpected happens.\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t *\n\t * Nested transactions:\n\t * This API can be called from within the transaction callback of another runTransaction call. That will have slightly different behavior:\n\t *\n\t * - If the inner transaction fails, only the inner transaction will be rolled back and the outer transaction will continue.\n\t * - Constraints will apply to the outermost transaction. Constraints are applied per commit and there will be one commit generated\n\t * for the outermost transaction which includes all inner transactions.\n\t * - Undo will undo the outermost transaction and all inner transactions.\n\t */\n\trunTransaction(\n\t\ttransaction: () => VoidTransactionCallbackStatus | void,\n\t\tparams?: RunTransactionParams,\n\t): TransactionResult;\n\n\t/**\n\t * Apply a serialized change to this branch.\n\t * @param change - the change to apply.\n\t * Changes are acquired via `getChange` in a branch's {@link TreeBranchEvents.changed | \"changed\"} event.\n\t * @remarks Changes may only be applied to a SharedTree with the same IdCompressor instance and branch state from which they were generated.\n\t * They may be created by one branch and applied to another, but only if both branches share the same history at the time of creation and application.\n\t *\n\t * @privateRemarks\n\t * TODO: This method will support applying changes from different IdCompressor instances as long as they have the same local session ID.\n\t * Update the tests and docs to match when that is done.\n\t */\n\tapplyChange(change: JsonCompatibleReadOnly): void;\n}\n\n/**\n * An editable view of a (version control style) branch of a shared tree based on some schema.\n *\n * @remarks\n * This schema (known as the view schema) may or may not align with the stored schema of the document.\n * Information about discrepancies between the two schemas is available via {@link TreeView.compatibility | compatibility}.\n *\n * Application authors are encouraged to read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/dds/tree/docs/user-facing/schema-evolution.md | schema-evolution.md}\n * and choose a schema compatibility policy that aligns with their application's needs.\n *\n * @privateRemarks\n * From an API design perspective, `upgradeSchema` could be merged into `viewWith` and/or `viewWith` could return errors explicitly on incompatible documents.\n * Such approaches would make it discoverable that out of schema handling may need to be done.\n * Doing that would however complicate trivial \"hello world\" style example slightly, as well as be a breaking API change.\n * It also seems more complex to handle invalidation with that pattern.\n * Thus this design was chosen at the risk of apps blindly accessing `root` then breaking unexpectedly when the document is incompatible.\n *\n * @see {@link TreeViewAlpha}\n * @see {@link asTreeViewAlpha}\n *\n * @sealed @public\n */\nexport interface TreeView<in out TSchema extends ImplicitFieldSchema> extends IDisposable {\n\t/**\n\t * The current root of the tree.\n\t *\n\t * If the view schema not sufficiently compatible with the stored schema, accessing this will throw.\n\t * To handle this case, check {@link TreeView.compatibility | compatibility}'s {@link SchemaCompatibilityStatus.canView | canView} before using.\n\t *\n\t * To get notified about changes to this field,\n\t * use {@link TreeViewEvents.rootChanged} via `view.events.on(\"rootChanged\", callback)`.\n\t *\n\t * To get notified about changes to stored schema (which may affect compatibility between this view's schema and\n\t * the stored schema), use {@link TreeViewEvents.schemaChanged} via `view.events.on(\"schemaChanged\", callback)`.\n\t */\n\tget root(): TreeFieldFromImplicitField<TSchema>;\n\n\tset root(newRoot: InsertableTreeFieldFromImplicitField<TSchema>);\n\n\t/**\n\t * Description of the current compatibility status between the view schema and stored schema.\n\t * @remarks\n\t * {@link TreeViewEvents.schemaChanged} is fired when the compatibility status changes.\n\t * See {@link https://fluidframework.com/docs/data-structures/tree/schema-evolution/ | schema-evolution} for more guidance on how to change schema while maintaining compatibility.\n\t * Use {@link checkSchemaCompatibilitySnapshots} to write tests to validate that this compatibility behaves as desired across schema changes.\n\t */\n\treadonly compatibility: SchemaCompatibilityStatus;\n\n\t/**\n\t * When {@link SchemaCompatibilityStatus.canUpgrade} is true,\n\t * this can be used to modify the stored schema to make it match the view schema.\n\t * @remarks\n\t * This will update the {@link TreeView.compatibility}, allowing access to `root`.\n\t * Beware that this may impact other clients' ability to view the document: see {@link SchemaCompatibilityStatus.canView} for more information.\n\t *\n\t * It is an error to call this when {@link SchemaCompatibilityStatus.canUpgrade} is false.\n\t * {@link SchemaCompatibilityStatus.canUpgrade} being true does not mean that an upgrade is required, nor that an upgrade will have any effect.\n\t * @privateRemarks\n\t * In the future, more upgrade options could be provided here.\n\t * Some options that could be added:\n\t * - check the actual document contents (not just the schema) and attempt an atomic document update if the data is compatible.\n\t * - apply converters and upgrade the document.\n\t * - apply converters to lazily to adapt the document to the requested view schema (with optional lazy schema updates or transparent conversions on write).\n\t * - update only a specific change (add an optional field, or apply a staged upgrade)\n\t * - update persistedMetadata or not\n\t *\n\t * As persisted metadata becomes more supported, how it interacts with isEquivalent and upgradeSchema should be clarified:\n\t * for now the docs are being left somewhat vague to allow flexibility in this area.\n\t */\n\tupgradeSchema(): void;\n\n\t/**\n\t * Initialize the tree, setting the stored schema to match this view's schema and setting the tree content.\n\t *\n\t * Only valid to call when this view's {@link SchemaCompatibilityStatus.canInitialize} is true.\n\t *\n\t * Applications should typically call this function before attaching a `SharedTree`.\n\t * @param content - The content to initialize the tree with.\n\t */\n\tinitialize(content: InsertableTreeFieldFromImplicitField<TSchema>): void;\n\n\t/**\n\t * Events for the tree.\n\t */\n\treadonly events: Listenable<TreeViewEvents>;\n\n\t/**\n\t * The view schema used by this TreeView.\n\t */\n\treadonly schema: TSchema;\n}\n\n/**\n * {@link TreeView} with proposed changes to the schema aware typing to allow use with `UnsafeUnknownSchema`.\n * @sealed @alpha\n */\nexport interface TreeViewAlpha<\n\tin out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema,\n> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, \"root\" | \"initialize\" | \"fork\">,\n\t\tTreeBranchAlpha {\n\tget root(): ReadableField<TSchema>;\n\n\tset root(newRoot: InsertableField<TSchema>);\n\n\tinitialize(content: InsertableField<TSchema>): void;\n\n\treadonly events: Listenable<TreeViewEvents & TreeBranchEvents>;\n\n\t// Override the base fork method to return a TreeViewAlpha.\n\tfork(): ReturnType<TreeBranch[\"fork\"]> & TreeViewAlpha<TSchema>;\n}\n\n/**\n * {@link TreeView} with additional beta APIs.\n * @sealed @beta\n */\nexport interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema>\n\textends TreeView<TSchema>,\n\t\tTreeBranch {\n\t// Override the base branch method to return a typed view rather than merely a branch.\n\tfork(): ReturnType<TreeBranch[\"fork\"]> & TreeViewBeta<TSchema>;\n}\n\n/**\n * Information about a view schema's compatibility with the document's stored schema.\n *\n * See SharedTree's README for more information about choosing a compatibility policy.\n * @privateRemarks\n * See {@link SchemaCompatibilityTester} for the implementation of this compatibility checking.\n * @sealed @public\n */\nexport interface SchemaCompatibilityStatus {\n\t/**\n\t * Whether the view schema allows exactly the same set of documents as the stored schema.\n\t *\n\t * @remarks\n\t * Equivalence here is defined in terms of allowed documents because there are some degenerate cases where schemas are not\n\t * exact matches in a strict (schema-based) sense but still allow the same documents, and the document notion is more useful to applications.\n\t *\n\t * Examples which are expressible where this may occur include:\n\t *\n\t * - schema repository `A` has extra schema which schema `B` doesn't have, but they are unused (i.e. not reachable from the root schema)\n\t *\n\t * - field in schema `A` has allowed field members which the corresponding field in schema `B` does not have, but those types are not constructible (for example: an object node type containing a required field with no allowed types)\n\t *\n\t * These cases are typically not interesting to applications.\n\t *\n\t * Note that other content in the stored schema that does not impact document compatibility, like {@link NodeSchemaOptionsAlpha.persistedMetadata}, does not affect this field.\n\t *\n\t * For the computation of this equivalence, {@link SchemaStaticsBeta.staged | staged} schemas are not included.\n\t * If there are any unknown optional fields, even if allowed by {@link ObjectSchemaOptions.allowUnknownOptionalFields}, `isEquivalent` will be false.\n\t */\n\treadonly isEquivalent: boolean;\n\n\t/**\n\t * Whether the current view schema is sufficiently compatible with the stored schema to allow viewing tree data.\n\t * If false, {@link TreeView.root} will throw upon access.\n\t * @remarks\n\t * If the view schema does not opt into supporting any additional cases, then `canView` is only true when `isEquivalent` is also true.\n\t * The view schema can however opt into supporting additional cases, and thus can also view documents with stored schema which would be equivalent, except for the following discrepancies:\n\t *\n\t * - An object node with {@link ObjectSchemaOptions.allowUnknownOptionalFields} to set to true that has additional optional fields in the stored schema beyond those mentioned in its view schema.\n\t *\n\t * - An additional type allowed at a location in the stored schema where it is {@link SchemaStaticsBeta.staged | staged} in the view schema.\n\t *\n\t * In these cases `canUpgrade` and `isEquivalent` will be false.\n\t *\n\t * When the set of documents allowed by the view schema is a strict superset of those allowed by the stored schema,\n\t * `canView` is false because writes to the document using the view schema could make the document violate its stored schema.\n\t * In this case, the stored schema could be updated to match the provided view schema, allowing read-write access to the tree.\n\t * See {@link SchemaCompatibilityStatus.canUpgrade}.\n\t *\n\t * Future versions of SharedTree may provide readonly access to the document in this case because that would be safe,\n\t * but this is not currently supported.\n\t *\n\t * @privateRemarks\n\t * A necessary condition for this to be true is that the documents allowed by the view schema are a subset of those allowed by the stored schema.\n\t * This is not sufficient: the simple-tree layer's read APIs only tolerate very specific cases beyond their schema (unknown optional fields).\n\t * For example, if the view schema for a node has a required `Point` field but the stored schema has an optional `Point` field,\n\t * read APIs on the view schema do not work correctly when the document has a node with a missing `Point` field.\n\t * Similar issues happen when the view schema has a field with less allowed types than the stored schema and the document actually leverages those types.\n\t */\n\treadonly canView: boolean;\n\n\t/**\n\t * True when {@link TreeView.upgradeSchema} can add support for all content required to be supported by the view schema.\n\t * @remarks\n\t * When true, it is valid to call {@link TreeView.upgradeSchema} (though if the stored schema is already an exact match, this is a no-op).\n\t *\n\t * When adding optional fields to schema which previously were marked with {@link ObjectSchemaOptions.allowUnknownOptionalFields}\n\t * the schema upgrade (assuming no other changes are included) will allow the previous version to view.\n\t * Even this case must still must be done with caution however as only clients with the newly added field will be able to do future upgrades.\n\t * Thus if a version of an application is shipped that adds an unknown optional field, all future versions should include it, even if its no longer used,\n\t * to ensure that documents containing it can still be upgraded.\n\t */\n\treadonly canUpgrade: boolean;\n\n\t/**\n\t * True iff the document is uninitialized (i.e. it has no schema and no content).\n\t *\n\t * To initialize the document, call {@link TreeView.initialize}.\n\t *\n\t * @remarks\n\t * It's not necessary to check this field before calling {@link TreeView.initialize} in most scenarios; application authors typically know from\n\t * branch that they're in a flow which creates a new `SharedTree` and would like to initialize it.\n\t */\n\treadonly canInitialize: boolean;\n\n\t// TODO: Consider extending this status to include:\n\t// - application-defined metadata about the stored schema\n\t// - details about the differences between the stored and view schema sufficient for implementing \"safe mismatch\" policies\n}\n\n/**\n * Events for {@link TreeBranch}.\n * @sealed @alpha\n */\nexport interface TreeBranchEvents extends Omit<TreeViewEvents, \"commitApplied\"> {\n\t/**\n\t * Fired when a change is made to the branch. Includes data about the change that is made which listeners\n\t * can use to filter on changes they care about (e.g. local vs. remote changes).\n\t *\n\t * @param data - information about the change\n\t * @param getRevertible - a function that allows users to get a revertible for the change. If not provided,\n\t * this change is not revertible.\n\t */\n\tchanged(data: ChangeMetadata, getRevertible?: RevertibleAlphaFactory): void;\n\n\t/**\n\t * Fired when:\n\t *\n\t * - a local commit is applied outside of a transaction\n\t *\n\t * - a local transaction is committed\n\t *\n\t * The event is not fired when:\n\t *\n\t * - a local commit is applied within a transaction\n\t *\n\t * - a remote commit is applied\n\t *\n\t * @param data - information about the commit that was applied\n\t * @param getRevertible - a function provided that allows users to get a revertible for the commit that was applied. If not provided,\n\t * this commit is not revertible.\n\t */\n\tcommitApplied(data: CommitMetadata, getRevertible?: RevertibleAlphaFactory): void;\n}\n\n/**\n * Events for {@link TreeView}.\n * @sealed @public\n */\nexport interface TreeViewEvents {\n\t/**\n\t * Raised whenever {@link TreeView.root} is invalidated.\n\t *\n\t * This includes changes to the document schema.\n\t * It also includes changes to the field containing the root such as setting or clearing an optional root or changing which node is the root.\n\t * This does NOT include changes to the content (fields/children) of the root node: for that case subscribe to events on the root node.\n\t */\n\trootChanged(): void;\n\n\t/**\n\t * The stored schema for the document has changed.\n\t * This may affect the compatibility between the view schema and the stored schema, and thus the ability to use the view.\n\t *\n\t * @remarks\n\t * This event implies that the old {@link TreeView.root} is no longer valid, but applications need not handle that separately:\n\t * {@link TreeViewEvents.rootChanged} will be fired after this event.\n\t */\n\tschemaChanged(): void;\n\n\t/**\n\t * Fired when:\n\t *\n\t * - a local commit is applied outside of a transaction\n\t *\n\t * - a local transaction is committed\n\t *\n\t * The event is not fired when:\n\t *\n\t * - a local commit is applied within a transaction\n\t *\n\t * - a remote commit is applied\n\t *\n\t * @param data - information about the commit that was applied\n\t * @param getRevertible - a function provided that allows users to get a revertible for the commit that was applied. If not provided,\n\t * this commit is not revertible.\n\t */\n\tcommitApplied(data: CommitMetadata, getRevertible?: RevertibleFactory): void;\n}\n\n/**\n * Retrieve the {@link TreeViewAlpha | alpha API} for a {@link TreeView}.\n * @alpha\n * @deprecated Use {@link (asAlpha:1)} instead.\n * @privateRemarks Despite being deprecated, this function should be used within the tree package (outside of tests) rather than `asAlpha` in order to avoid circular import dependencies.\n */\nexport function asTreeViewAlpha<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): TreeViewAlpha<TSchema> {\n\treturn view as TreeViewAlpha<TSchema>;\n}\n"]}
1
+ {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../src/simple-tree/api/tree.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AA8kBH;;;;;GAKG;AACH,SAAgB,eAAe,CAC9B,IAAuB;IAEvB,OAAO,IAA8B,CAAC;AACvC,CAAC;AAJD,0CAIC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IFluidLoadable, IDisposable, Listenable } from \"@fluidframework/core-interfaces\";\n\nimport type {\n\tCommitMetadata,\n\tChangeMetadata,\n\tRevertibleAlphaFactory,\n\tRevertibleFactory,\n} from \"../../core/index.js\";\nimport type {\n\t// This is referenced by doc comments.\n\t// eslint-disable-next-line @typescript-eslint/no-unused-vars, unused-imports/no-unused-imports\n\tTreeAlpha,\n} from \"../../shared-tree/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../../util/index.js\";\nimport type {\n\tImplicitFieldSchema,\n\tInsertableField,\n\tInsertableTreeFieldFromImplicitField,\n\tReadableField,\n\tReadSchema,\n\tTreeFieldFromImplicitField,\n} from \"../fieldSchema.js\";\nimport type { SimpleTreeSchema } from \"../simpleSchema.js\";\nimport type { UnsafeUnknownSchema } from \"../unsafeUnknownSchema.js\";\n\nimport type { TreeViewConfiguration } from \"./configuration.js\";\nimport type {\n\tRunTransactionParams,\n\tTransactionCallbackStatus,\n\tTransactionResult,\n\tTransactionResultExt,\n\tVoidTransactionCallbackStatus,\n} from \"./transactionTypes.js\";\nimport type { VerboseTree } from \"./verboseTree.js\";\n\n/**\n * A tree from which a {@link TreeView} can be created.\n *\n * @privateRemarks\n * TODO:\n * Add stored key versions of {@link (TreeAlpha:interface).(exportVerbose:2)}, {@link (TreeAlpha:interface).(exportConcise:2)} and {@link (TreeAlpha:interface).exportCompressed} here so tree content can be accessed without a view schema.\n * Add exportSimpleSchema and exportJsonSchema methods (which should exactly match the concise format, and match the free functions for exporting view schema).\n * Maybe rename \"exportJsonSchema\" to align on \"concise\" terminology.\n * Ensure schema exporting APIs here align and reference APIs for exporting view schema to the same formats (which should include stored vs property key choice).\n * Make sure users of independentView can use these export APIs (maybe provide a reference back to the ViewableTree from the TreeView to accomplish that).\n * @system @sealed @public\n */\nexport interface ViewableTree {\n\t/**\n\t * Returns a {@link TreeView} using the provided schema.\n\t * If the stored schema is compatible with the view schema specified by `config`,\n\t * the returned {@link TreeView} will expose the root with a schema-aware API based on the provided view schema.\n\t * If the provided schema is incompatible with the stored schema, the view will instead expose a status indicating the incompatibility.\n\t *\n\t * @remarks\n\t * If the tree is uninitialized (has no schema and no content), use {@link TreeView.initialize} on the returned view to set the schema and content together.\n\t * Using `viewWith` followed by {@link TreeView.upgradeSchema} to initialize only the schema for a document is technically valid when the schema\n\t * permits trees with no content.\n\t *\n\t * Note that other clients can modify the document at any time, causing the view to change its compatibility status: see {@link TreeView.events} for how to handle invalidation in these cases.\n\t *\n\t * Only one schematized view may exist for a given ITree at a time.\n\t * If creating a second, the first must be disposed before calling `viewWith` again.\n\t *\n\t * @privateRemarks\n\t * TODO: Support adapters for handling out-of-schema data.\n\t */\n\tviewWith<TRoot extends ImplicitFieldSchema>(\n\t\tconfig: TreeViewConfiguration<TRoot>,\n\t): TreeView<TRoot>;\n}\n\n/**\n * Channel for a Fluid Tree DDS.\n * @remarks\n * Allows storing and collaboratively editing schema-aware hierarchial data.\n * @sealed @public\n */\nexport interface ITree extends ViewableTree, IFluidLoadable {}\n\n/**\n * {@link ITree} extended with some alpha APIs.\n * @sealed @alpha\n */\nexport interface ITreeAlpha extends ITree {\n\t/**\n\t * Exports root in the same format as {@link (TreeAlpha:interface).(exportVerbose:1)} using stored keys.\n\t * @remarks\n\t * This is `undefined` if and only if the root field is empty (this can only happen if the root field is optional).\n\t */\n\texportVerbose(): VerboseTree | undefined;\n\n\t/**\n\t * Exports the SimpleTreeSchema that is stored in the tree, using stored keys for object fields.\n\t * @remarks\n\t * To get the schema using property keys, use {@link getSimpleSchema} on the view schema.\n\t */\n\texportSimpleSchema(): SimpleTreeSchema;\n\n\t/**\n\t * Creates a fork of the current state of the main branch.\n\t * This new branch will be shared with and editable by all clients.\n\t */\n\tcreateSharedBranch(): string;\n\n\t/**\n\t * Returns a list of all shared branches that currently exist on this tree.\n\t * Any one of them can be checked out using {@link ITreeAlpha.viewSharedBranchWith}.\n\t */\n\tgetSharedBranchIds(): string[];\n\n\t/**\n\t * Returns a view of the tree on the specified shared branch, using the provided schema.\n\t * See {@link ViewableTree.viewWith}.\n\t */\n\tviewSharedBranchWith<TRoot extends ImplicitFieldSchema>(\n\t\tbranchId: string,\n\t\tconfig: TreeViewConfiguration<TRoot>,\n\t): TreeView<TRoot>;\n}\n\n/**\n * A collection of functionality associated with a (version-control-style) branch of a SharedTree.\n * @remarks A `TreeBranch` allows for the {@link TreeBranch.fork | creation of branches} and for those branches to later be {@link TreeBranch.merge | merged}.\n *\n * The branch associated directly with the {@link ITree | SharedTree} is the \"main\" branch, and all other branches fork (directly or transitively) from that main branch.\n * @sealed @beta\n */\nexport interface TreeBranch extends IDisposable {\n\t/**\n\t * Fork a new branch off of this branch which is based off of this branch's current state.\n\t * @remarks Any changes to the tree on the new branch will not apply to this branch until the new branch is e.g. {@link TreeBranch.merge | merged} back into this branch.\n\t * The branch should be disposed when no longer needed, either {@link TreeBranch.dispose | explicitly} or {@link TreeBranch.merge | implicitly when merging} into another branch.\n\t */\n\tfork(): TreeBranch;\n\n\t/**\n\t * Apply all the new changes on the given branch to this branch.\n\t * @param branch - a branch which was created by a call to `branch()`.\n\t * @param disposeMerged - whether or not to dispose `branch` after the merge completes.\n\t * Defaults to true.\n\t * The {@link TreeBranch | main branch} cannot be disposed - attempting to do so will have no effect.\n\t * @remarks All ongoing transactions (if any) in `branch` will be committed before the merge.\n\t */\n\tmerge(branch: TreeBranch, disposeMerged?: boolean): void;\n\n\t/**\n\t * Advance this branch forward such that all new changes on the target branch become part of this branch.\n\t * @param branch - The branch to rebase onto.\n\t * @remarks After rebasing, this branch will be \"ahead\" of the target branch, that is, its unique changes will have been recreated as if they happened after all changes on the target branch.\n\t * This method may only be called on branches produced via {@link TreeBranch.fork | branch} - attempting to rebase the main branch will throw.\n\t *\n\t * Rebasing long-lived branches is important to avoid consuming memory unnecessarily.\n\t * In particular, the SharedTree retains all sequenced changes made to the tree since the \"most-behind\" branch was created or last rebased.\n\t *\n\t * The {@link TreeBranch | main branch} cannot be rebased onto another branch - attempting to do so will throw an error.\n\t */\n\trebaseOnto(branch: TreeBranch): void;\n\n\t/**\n\t * Dispose of this branch, cleaning up any resources associated with it.\n\t * @param error - Optional error indicating the reason for the disposal, if the object was disposed as the result of an error.\n\t * @remarks Branches can also be automatically disposed when {@link TreeBranch.merge | they are merged} into another branch.\n\t *\n\t * Disposing branches is important to avoid consuming memory unnecessarily.\n\t * In particular, the SharedTree retains all sequenced changes made to the tree since the \"most-behind\" branch was created or last {@link TreeBranch.rebaseOnto | rebased}.\n\t *\n\t * The {@link TreeBranch | main branch} cannot be disposed - attempting to do so will have no effect.\n\t */\n\tdispose(error?: Error): void;\n}\n\n/**\n * {@link TreeBranch} with alpha-level APIs.\n * @remarks\n * The `TreeBranch` for a specific {@link TreeNode} may be acquired by calling `TreeAlpha.branch`.\n *\n * A branch does not necessarily know the schema of its SharedTree - to convert a branch to a {@link TreeViewAlpha | view with a schema}, use {@link TreeBranchAlpha.hasRootSchema | hasRootSchema()}.\n * @sealed @alpha\n */\nexport interface TreeBranchAlpha extends TreeBranch {\n\t/**\n\t * Events for the branch\n\t */\n\treadonly events: Listenable<TreeBranchEvents>;\n\n\t/**\n\t * Returns true if this branch has the given schema as its root schema.\n\t * @remarks This is a type guard which allows this branch to become strongly typed as a {@link TreeViewAlpha | view} of the given schema.\n\t *\n\t * To succeed, the given schema must be invariant to the schema of the view - it must include exactly the same allowed types.\n\t * For example, a schema of `Foo | Bar` will not match a view schema of `Foo`, and likewise a schema of `Foo` will not match a view schema of `Foo | Bar`.\n\t * @example\n\t * ```typescript\n\t * if (branch.hasRootSchema(MySchema)) {\n\t * const { root } = branch; // `branch` is now a TreeViewAlpha<MySchema>\n\t * // ...\n\t * }\n\t * ```\n\t */\n\thasRootSchema<TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t): this is TreeViewAlpha<TSchema>;\n\n\t// Override the base fork method to return the alpha variant.\n\tfork(): TreeBranchAlpha;\n\n\t/**\n\t * Run a transaction which applies one or more edits to the tree as a single atomic unit.\n\t * @param transaction - The function to run as the body of the transaction.\n\t * It should return a status object of {@link TransactionCallbackStatus | TransactionCallbackStatus } type.\n\t * It includes a \"rollback\" property which may be returned as true at any point during the transaction. This will\n\t * abort the transaction and discard any changes it made so far.\n\t * \"rollback\" can be set to false or left undefined to indicate that the body of the transaction has successfully run.\n\t * @param params - The optional parameters for the transaction. It includes the constraints that will be checked before the transaction begins.\n\t * @returns A result object of {@link TransactionResultExt | TransactionResultExt} type. It includes the following:\n\t *\n\t * - A \"success\" flag indicating whether the transaction was successful or not.\n\t * - The success or failure value as returned by the transaction function.\n\t *\n\t * @remarks\n\t * This API will throw an error if the constraints are not met or something unexpected happens.\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t *\n\t * Nested transactions:\n\t * This API can be called from within the transaction callback of another runTransaction call. That will have slightly different behavior:\n\t *\n\t * - If the inner transaction fails, only the inner transaction will be rolled back and the outer transaction will continue.\n\t * - Constraints will apply to the outermost transaction. Constraints are applied per commit and there will be one commit generated\n\t * for the outermost transaction which includes all inner transactions.\n\t * - Undo will undo the outermost transaction and all inner transactions.\n\t */\n\trunTransaction<TSuccessValue, TFailureValue>(\n\t\ttransaction: () => TransactionCallbackStatus<TSuccessValue, TFailureValue>,\n\t\tparams?: RunTransactionParams,\n\t): TransactionResultExt<TSuccessValue, TFailureValue>;\n\t/**\n\t * Run a transaction which applies one or more edits to the tree as a single atomic unit.\n\t * @param transaction - The function to run as the body of the transaction. It may return the following:\n\t *\n\t * - Nothing to indicate that the body of the transaction has successfully run.\n\t * - A status object of {@link VoidTransactionCallbackStatus | VoidTransactionCallbackStatus } type. It includes a \"rollback\" property which\n\t * may be returned as true at any point during the transaction. This will abort the transaction and discard any changes it made so\n\t * far. \"rollback\" can be set to false or left undefined to indicate that the body of the transaction has successfully run.\n\t *\n\t * @param params - The optional parameters for the transaction. It includes the constraints that will be checked before the transaction begins.\n\t * @returns A result object of {@link TransactionResult | TransactionResult} type. It includes a \"success\" flag indicating whether the\n\t * transaction was successful or not.\n\t *\n\t * @remarks\n\t * This API will throw an error if the constraints are not met or something unexpected happens.\n\t * All of the changes in the transaction are applied synchronously and therefore no other changes (either from this client or from a remote client) can be interleaved with those changes.\n\t * Note that this is guaranteed by Fluid for any sequence of changes that are submitted synchronously, whether in a transaction or not.\n\t * However, using a transaction has the following additional consequences:\n\t *\n\t * - If reverted (e.g. via an \"undo\" operation), all the changes in the transaction are reverted together.\n\t * - The internal data representation of a transaction with many changes is generally smaller and more efficient than that of the changes when separate.\n\t *\n\t * Local change events will be emitted for each change as the transaction is being applied.\n\t * If the transaction is rolled back, a corresponding change event will also be emitted for the rollback.\n\t *\n\t * Nested transactions:\n\t * This API can be called from within the transaction callback of another runTransaction call. That will have slightly different behavior:\n\t *\n\t * - If the inner transaction fails, only the inner transaction will be rolled back and the outer transaction will continue.\n\t * - Constraints will apply to the outermost transaction. Constraints are applied per commit and there will be one commit generated\n\t * for the outermost transaction which includes all inner transactions.\n\t * - Undo will undo the outermost transaction and all inner transactions.\n\t */\n\trunTransaction(\n\t\ttransaction: () => VoidTransactionCallbackStatus | void,\n\t\tparams?: RunTransactionParams,\n\t): TransactionResult;\n\n\t/**\n\t * Apply a serialized change to this branch.\n\t * @param change - the change to apply.\n\t * Changes are acquired via `getChange` in a branch's {@link TreeBranchEvents.changed | \"changed\"} event.\n\t * @remarks Changes may only be applied to a SharedTree with the same IdCompressor instance and branch state from which they were generated.\n\t * They may be created by one branch and applied to another, but only if both branches share the same history at the time of creation and application.\n\t *\n\t * @privateRemarks\n\t * TODO: This method will support applying changes from different IdCompressor instances as long as they have the same local session ID.\n\t * Update the tests and docs to match when that is done.\n\t */\n\tapplyChange(change: JsonCompatibleReadOnly): void;\n}\n\n/**\n * An editable view of a (version control style) branch of a shared tree based on some schema.\n *\n * @remarks\n * This schema (known as the view schema) may or may not align with the stored schema of the document.\n * Information about discrepancies between the two schemas is available via {@link TreeView.compatibility | compatibility}.\n *\n * Application authors are encouraged to read {@link https://github.com/microsoft/FluidFramework/blob/main/packages/dds/tree/docs/user-facing/schema-evolution.md | schema-evolution.md}\n * and choose a schema compatibility policy that aligns with their application's needs.\n *\n * @privateRemarks\n * From an API design perspective, `upgradeSchema` could be merged into `viewWith` and/or `viewWith` could return errors explicitly on incompatible documents.\n * Such approaches would make it discoverable that out of schema handling may need to be done.\n * Doing that would however complicate trivial \"hello world\" style example slightly, as well as be a breaking API change.\n * It also seems more complex to handle invalidation with that pattern.\n * Thus this design was chosen at the risk of apps blindly accessing `root` then breaking unexpectedly when the document is incompatible.\n *\n * @see {@link TreeViewAlpha}\n * @see {@link asTreeViewAlpha}\n *\n * @sealed @public\n */\nexport interface TreeView<in out TSchema extends ImplicitFieldSchema> extends IDisposable {\n\t/**\n\t * The current root of the tree.\n\t *\n\t * If the view schema not sufficiently compatible with the stored schema, accessing this will throw.\n\t * To handle this case, check {@link TreeView.compatibility | compatibility}'s {@link SchemaCompatibilityStatus.canView | canView} before using.\n\t *\n\t * To get notified about changes to this field,\n\t * use {@link TreeViewEvents.rootChanged} via `view.events.on(\"rootChanged\", callback)`.\n\t *\n\t * To get notified about changes to stored schema (which may affect compatibility between this view's schema and\n\t * the stored schema), use {@link TreeViewEvents.schemaChanged} via `view.events.on(\"schemaChanged\", callback)`.\n\t */\n\tget root(): TreeFieldFromImplicitField<TSchema>;\n\n\tset root(newRoot: InsertableTreeFieldFromImplicitField<TSchema>);\n\n\t/**\n\t * Description of the current compatibility status between the view schema and stored schema.\n\t * @remarks\n\t * {@link TreeViewEvents.schemaChanged} is fired when the compatibility status changes.\n\t * See {@link https://fluidframework.com/docs/data-structures/tree/schema-evolution/ | schema-evolution} for more guidance on how to change schema while maintaining compatibility.\n\t * Use {@link checkSchemaCompatibilitySnapshots} to write tests to validate that this compatibility behaves as desired across schema changes.\n\t */\n\treadonly compatibility: SchemaCompatibilityStatus;\n\n\t/**\n\t * When {@link SchemaCompatibilityStatus.canUpgrade} is true,\n\t * this can be used to modify the stored schema to make it match the view schema.\n\t * @remarks\n\t * This will update the {@link TreeView.compatibility}, allowing access to `root`.\n\t * Beware that this may impact other clients' ability to view the document: see {@link SchemaCompatibilityStatus.canView} for more information.\n\t *\n\t * It is an error to call this when {@link SchemaCompatibilityStatus.canUpgrade} is false.\n\t * {@link SchemaCompatibilityStatus.canUpgrade} being true does not mean that an upgrade is required, nor that an upgrade will have any effect.\n\t * @privateRemarks\n\t * In the future, more upgrade options could be provided here.\n\t * Some options that could be added:\n\t * - check the actual document contents (not just the schema) and attempt an atomic document update if the data is compatible.\n\t * - apply converters and upgrade the document.\n\t * - apply converters to lazily to adapt the document to the requested view schema (with optional lazy schema updates or transparent conversions on write).\n\t * - update only a specific change (add an optional field, or apply a staged upgrade)\n\t * - update persistedMetadata or not\n\t *\n\t * As persisted metadata becomes more supported, how it interacts with isEquivalent and upgradeSchema should be clarified:\n\t * for now the docs are being left somewhat vague to allow flexibility in this area.\n\t */\n\tupgradeSchema(): void;\n\n\t/**\n\t * Initialize the tree, setting the stored schema to match this view's schema and setting the tree content.\n\t *\n\t * Only valid to call when this view's {@link SchemaCompatibilityStatus.canInitialize} is true.\n\t *\n\t * Applications should typically call this function before attaching a `SharedTree`.\n\t * @param content - The content to initialize the tree with.\n\t */\n\tinitialize(content: InsertableTreeFieldFromImplicitField<TSchema>): void;\n\n\t/**\n\t * Events for the tree.\n\t */\n\treadonly events: Listenable<TreeViewEvents>;\n\n\t/**\n\t * The view schema used by this TreeView.\n\t */\n\treadonly schema: TSchema;\n}\n\n/**\n * {@link TreeView} with proposed changes to the schema aware typing to allow use with `UnsafeUnknownSchema`.\n * @sealed @alpha\n */\nexport interface TreeViewAlpha<\n\tin out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema,\n> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, \"root\" | \"initialize\" | \"fork\">,\n\t\tTreeBranchAlpha {\n\tget root(): ReadableField<TSchema>;\n\n\tset root(newRoot: InsertableField<TSchema>);\n\n\tinitialize(content: InsertableField<TSchema>): void;\n\n\treadonly events: Listenable<TreeViewEvents & TreeBranchEvents>;\n\n\t// Override the base fork method to return a TreeViewAlpha.\n\tfork(): ReturnType<TreeBranch[\"fork\"]> & TreeViewAlpha<TSchema>;\n}\n\n/**\n * {@link TreeView} with additional beta APIs.\n * @sealed @beta\n */\nexport interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema>\n\textends TreeView<TSchema>,\n\t\tTreeBranch {\n\t// Override the base branch method to return a typed view rather than merely a branch.\n\tfork(): ReturnType<TreeBranch[\"fork\"]> & TreeViewBeta<TSchema>;\n}\n\n/**\n * Information about a view schema's compatibility with the document's stored schema.\n *\n * See SharedTree's README for more information about choosing a compatibility policy.\n * @privateRemarks\n * See {@link SchemaCompatibilityTester} for the implementation of this compatibility checking.\n * @sealed @public\n */\nexport interface SchemaCompatibilityStatus {\n\t/**\n\t * Whether the view schema allows exactly the same set of documents as the stored schema.\n\t *\n\t * @remarks\n\t * Equivalence here is defined in terms of allowed documents because there are some degenerate cases where schemas are not\n\t * exact matches in a strict (schema-based) sense but still allow the same documents, and the document notion is more useful to applications.\n\t *\n\t * Examples which are expressible where this may occur include:\n\t *\n\t * - schema repository `A` has extra schema which schema `B` doesn't have, but they are unused (i.e. not reachable from the root schema)\n\t *\n\t * - field in schema `A` has allowed field members which the corresponding field in schema `B` does not have, but those types are not constructible (for example: an object node type containing a required field with no allowed types)\n\t *\n\t * These cases are typically not interesting to applications.\n\t *\n\t * Note that other content in the stored schema that does not impact document compatibility, like {@link NodeSchemaOptionsAlpha.persistedMetadata}, does not affect this field.\n\t *\n\t * For the computation of this equivalence, {@link SchemaStaticsBeta.staged | staged} schemas are not included.\n\t * If there are any unknown optional fields, even if allowed by {@link ObjectSchemaOptions.allowUnknownOptionalFields}, `isEquivalent` will be false.\n\t */\n\treadonly isEquivalent: boolean;\n\n\t/**\n\t * Whether the current view schema is sufficiently compatible with the stored schema to allow viewing tree data.\n\t * If false, {@link TreeView.root} will throw upon access.\n\t * @remarks\n\t * If the view schema does not opt into supporting any additional cases, then `canView` is only true when `isEquivalent` is also true.\n\t * The view schema can however opt into supporting additional cases, and thus can also view documents with stored schema which would be equivalent, except for the following discrepancies:\n\t *\n\t * - An object node with {@link ObjectSchemaOptions.allowUnknownOptionalFields} to set to true that has additional optional fields in the stored schema beyond those mentioned in its view schema.\n\t *\n\t * - An additional type allowed at a location in the stored schema where it is {@link SchemaStaticsBeta.staged | staged} in the view schema.\n\t *\n\t * In these cases `canUpgrade` and `isEquivalent` will be false.\n\t *\n\t * When the set of documents allowed by the view schema is a strict superset of those allowed by the stored schema,\n\t * `canView` is false because writes to the document using the view schema could make the document violate its stored schema.\n\t * In this case, the stored schema could be updated to match the provided view schema, allowing read-write access to the tree.\n\t * See {@link SchemaCompatibilityStatus.canUpgrade}.\n\t *\n\t * Future versions of SharedTree may provide readonly access to the document in this case because that would be safe,\n\t * but this is not currently supported.\n\t *\n\t * @privateRemarks\n\t * A necessary condition for this to be true is that the documents allowed by the view schema are a subset of those allowed by the stored schema.\n\t * This is not sufficient: the simple-tree layer's read APIs only tolerate very specific cases beyond their schema (unknown optional fields).\n\t * For example, if the view schema for a node has a required `Point` field but the stored schema has an optional `Point` field,\n\t * read APIs on the view schema do not work correctly when the document has a node with a missing `Point` field.\n\t * Similar issues happen when the view schema has a field with less allowed types than the stored schema and the document actually leverages those types.\n\t */\n\treadonly canView: boolean;\n\n\t/**\n\t * True when {@link TreeView.upgradeSchema} can add support for all content required to be supported by the view schema.\n\t * @remarks\n\t * When true, it is valid to call {@link TreeView.upgradeSchema} (though if the stored schema is already an exact match, this is a no-op).\n\t *\n\t * When adding optional fields to schema which previously were marked with {@link ObjectSchemaOptions.allowUnknownOptionalFields}\n\t * the schema upgrade (assuming no other changes are included) will allow the previous version to view.\n\t * Even this case must still must be done with caution however as only clients with the newly added field will be able to do future upgrades.\n\t * Thus if a version of an application is shipped that adds an unknown optional field, all future versions should include it, even if its no longer used,\n\t * to ensure that documents containing it can still be upgraded.\n\t */\n\treadonly canUpgrade: boolean;\n\n\t/**\n\t * True iff the document is uninitialized (i.e. it has no schema and no content).\n\t *\n\t * To initialize the document, call {@link TreeView.initialize}.\n\t *\n\t * @remarks\n\t * It's not necessary to check this field before calling {@link TreeView.initialize} in most scenarios; application authors typically know from\n\t * branch that they're in a flow which creates a new `SharedTree` and would like to initialize it.\n\t */\n\treadonly canInitialize: boolean;\n\n\t// TODO: Consider extending this status to include:\n\t// - application-defined metadata about the stored schema\n\t// - details about the differences between the stored and view schema sufficient for implementing \"safe mismatch\" policies\n}\n\n/**\n * Events for {@link TreeBranch}.\n * @sealed @alpha\n */\nexport interface TreeBranchEvents extends Omit<TreeViewEvents, \"commitApplied\"> {\n\t/**\n\t * Fired when a change is made to the branch. Includes data about the change that is made which listeners\n\t * can use to filter on changes they care about (e.g. local vs. remote changes).\n\t *\n\t * @param data - information about the change\n\t * @param getRevertible - a function that allows users to get a revertible for the change. If not provided,\n\t * this change is not revertible.\n\t */\n\tchanged(data: ChangeMetadata, getRevertible?: RevertibleAlphaFactory): void;\n\n\t/**\n\t * Fired when:\n\t *\n\t * - a local commit is applied outside of a transaction\n\t *\n\t * - a local transaction is committed\n\t *\n\t * The event is not fired when:\n\t *\n\t * - a local commit is applied within a transaction\n\t *\n\t * - a remote commit is applied\n\t *\n\t * @param data - information about the commit that was applied\n\t * @param getRevertible - a function provided that allows users to get a revertible for the commit that was applied. If not provided,\n\t * this commit is not revertible.\n\t */\n\tcommitApplied(data: CommitMetadata, getRevertible?: RevertibleAlphaFactory): void;\n}\n\n/**\n * Events for {@link TreeView}.\n * @sealed @public\n */\nexport interface TreeViewEvents {\n\t/**\n\t * Raised whenever {@link TreeView.root} is invalidated.\n\t *\n\t * This includes changes to the document schema.\n\t * It also includes changes to the field containing the root such as setting or clearing an optional root or changing which node is the root.\n\t * This does NOT include changes to the content (fields/children) of the root node: for that case subscribe to events on the root node.\n\t */\n\trootChanged(): void;\n\n\t/**\n\t * The stored schema for the document has changed.\n\t * This may affect the compatibility between the view schema and the stored schema, and thus the ability to use the view.\n\t *\n\t * @remarks\n\t * This event implies that the old {@link TreeView.root} is no longer valid, but applications need not handle that separately:\n\t * {@link TreeViewEvents.rootChanged} will be fired after this event.\n\t */\n\tschemaChanged(): void;\n\n\t/**\n\t * Fired when:\n\t *\n\t * - a local commit is applied outside of a transaction\n\t *\n\t * - a local transaction is committed\n\t *\n\t * The event is not fired when:\n\t *\n\t * - a local commit is applied within a transaction\n\t *\n\t * - a remote commit is applied\n\t *\n\t * @param data - information about the commit that was applied\n\t * @param getRevertible - a function provided that allows users to get a revertible for the commit that was applied. If not provided,\n\t * this commit is not revertible.\n\t */\n\tcommitApplied(data: CommitMetadata, getRevertible?: RevertibleFactory): void;\n}\n\n/**\n * Retrieve the {@link TreeViewAlpha | alpha API} for a {@link TreeView}.\n * @alpha\n * @deprecated Use {@link (asAlpha:1)} instead.\n * @privateRemarks Despite being deprecated, this function should be used within the tree package (outside of tests) rather than `asAlpha` in order to avoid circular import dependencies.\n */\nexport function asTreeViewAlpha<TSchema extends ImplicitFieldSchema>(\n\tview: TreeView<TSchema>,\n): TreeViewAlpha<TSchema> {\n\treturn view as TreeViewAlpha<TSchema>;\n}\n"]}
@@ -5,10 +5,10 @@
5
5
  import type { ITreeCursorSynchronous } from "../../core/index.js";
6
6
  import { type NodeKind, type TreeLeafValue, type TreeNode, type Unhydrated, type WithType } from "../core/index.js";
7
7
  import type { ImplicitFieldSchema, InsertableTreeFieldFromImplicitField, TreeFieldFromImplicitField } from "../fieldSchema.js";
8
+ import type { UnsafeUnknownSchema } from "../unsafeUnknownSchema.js";
8
9
  import { type ConciseTree } from "./conciseTree.js";
9
10
  import type { TreeEncodingOptions } from "./customTree.js";
10
11
  import type { TreeChangeEvents } from "./treeChangeEvents.js";
11
- import type { UnsafeUnknownSchema } from "../unsafeUnknownSchema.js";
12
12
  /**
13
13
  * Data included for {@link TreeChangeEventsBeta.nodeChanged}.
14
14
  * @sealed @beta
@@ -1 +1 @@
1
- {"version":3,"file":"treeBeta.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/treeBeta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAyB,MAAM,qBAAqB,CAAC;AAOzF,OAAO,EAMN,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,QAAQ,EACb,KAAK,UAAU,EACf,KAAK,QAAQ,EACb,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EACX,mBAAmB,EACnB,oCAAoC,EACpC,0BAA0B,EAC1B,MAAM,mBAAmB,CAAC;AAO3B,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,kBAAk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,EAAE,mBAAmB,GAC3B,WAAW,CAAC;AACf;;GAEG;AACH,wBAAgB,aAAa,CAC5B,IAAI,EAAE,QAAQ,GAAG,aAAa,GAAG,SAAS,EAC1C,OAAO,CAAC,EAAE,mBAAmB,GAC3B,WAAW,GAAG,SAAS,CAAC;AAe3B;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,QAoDtB,CAAC"}
@@ -10,10 +10,10 @@ const index_js_2 = require("../../util/index.js");
10
10
  const index_js_3 = require("../core/index.js");
11
11
  const createContext_js_1 = require("../createContext.js");
12
12
  const unhydratedFlexTreeFromInsertable_js_1 = require("../unhydratedFlexTreeFromInsertable.js");
13
- const create_js_1 = require("./create.js");
14
13
  const conciseTree_js_1 = require("./conciseTree.js");
15
- const verboseTree_js_1 = require("./verboseTree.js");
14
+ const create_js_1 = require("./create.js");
16
15
  const treeNodeApi_js_1 = require("./treeNodeApi.js");
16
+ const verboseTree_js_1 = require("./verboseTree.js");
17
17
  /**
18
18
  * Borrow a cursor from a node.
19
19
  * @remarks
@@ -1 +1 @@
1
- {"version":3,"file":"treeBeta.js","sourceRoot":"","sources":["../../../src/simple-tree/api/treeBeta.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAI0C;AAC1C,kDAA4C;AAC5C,+CAW0B;AAC1B,0DAA2D;AAM3D,gGAGgD;AAEhD,2CAA+C;AAC/C,qDAAuE;AAEvE,qDAAqD;AAErD,qDAA+C;AA4L/C;;;;GAIG;AACH,SAAgB,+BAA+B,CAC9C,IAA8B;IAE9B,IAAI,IAAA,sBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;QACvB,OAAO,IAAA,kCAAiB,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,MAAM,GAAG,IAAA,oBAAS,EAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC,YAAY,EAAE,CAAC;IACpD,OAAO,MAAM,CA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EAAE,CAAC;QAEpD,yEAAyE;QACzE,0HAA0H;QAC1H,MAAM,WAAW,GAAG,IAAI,4BAAiB,CACxC,8BAAmB,EACnB,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CACjC,CAAC;QACF,MAAM,OAAO,GAAG,IAAI,kBAAO,CAAC,WAAW,EAAE,IAAA,uCAAoB,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QAErF,MAAM,WAAW,GAA0B;YAC1C,IAAI,EAAE,qBAAU,CAAC,QAAQ,CAAC,UAAU;YACpC,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC,IAAA,gBAAK,EAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;YACjD,iBAAiB,EAAE,SAAS;SAC5B,CAAC;QACF,OAAO,IAAA,4BAAgB,EAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAElE,CAAC;IACH,CAAC;IAED,MAAM,CACL,MAAe,EACf,IAAmD;QAEnD,MAAM,OAAO,GAAG,IAAA,sEAAgC,EAC/C,IAAqC,EACrC,MAAM,CACN,CAAC;QACF,MAAM,MAAM,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,uCAA4B,EAAC,OAAO,CAAC,CAAC;QACzF,OAAO,MAAyD,CAAC;IAClE,CAAC;CACD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ITreeCursorSynchronous, TreeFieldStoredSchema } from \"../../core/index.js\";\nimport {\n\tdefaultSchemaPolicy,\n\tFieldKinds,\n\tisTreeValue,\n} from \"../../feature-libraries/index.js\";\nimport { brand } from \"../../util/index.js\";\nimport {\n\tContext,\n\tgetKernel,\n\tgetOrCreateNodeFromInnerNode,\n\tisTreeNode,\n\tUnhydratedContext,\n\ttype NodeKind,\n\ttype TreeLeafValue,\n\ttype TreeNode,\n\ttype Unhydrated,\n\ttype WithType,\n} from \"../core/index.js\";\nimport { getUnhydratedContext } from \"../createContext.js\";\nimport type {\n\tImplicitFieldSchema,\n\tInsertableTreeFieldFromImplicitField,\n\tTreeFieldFromImplicitField,\n} from \"../fieldSchema.js\";\nimport {\n\tunhydratedFlexTreeFromInsertable,\n\ttype InsertableContent,\n} from \"../unhydratedFlexTreeFromInsertable.js\";\n\nimport { createFromCursor } from \"./create.js\";\nimport { conciseFromCursor, type ConciseTree } from \"./conciseTree.js\";\nimport type { TreeEncodingOptions } from \"./customTree.js\";\nimport { cursorFromVerbose } from \"./verboseTree.js\";\nimport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\nimport { treeNodeApi } from \"./treeNodeApi.js\";\nimport type { InsertableField, UnsafeUnknownSchema } from \"../unsafeUnknownSchema.js\";\n\n// Tests for this file are grouped with those for treeNodeApi.ts as that is where this functionality will eventually land,\n// and where most of the actual implementation is for much of it.\n\n/**\n * Data included for {@link TreeChangeEventsBeta.nodeChanged}.\n * @sealed @beta\n */\nexport interface NodeChangedData<TNode extends TreeNode = TreeNode> {\n\t/**\n\t * When the node changed is an object or Map node, this lists all the properties which changed.\n\t * @remarks\n\t * This only includes changes to the node itself (which would trigger {@link TreeChangeEvents.nodeChanged}).\n\t *\n\t * Set to `undefined` when the {@link NodeKind} does not support this feature (currently just ArrayNodes).\n\t *\n\t * When defined, the set should never be empty, since `nodeChanged` will only be triggered when there is a change, and for the supported node types, the only things that can change are properties.\n\t */\n\treadonly changedProperties?: ReadonlySet<\n\t\t// For Object nodes, make changedProperties required and strongly typed with the property names from the schema:\n\t\tTNode extends WithType<string, NodeKind.Object, infer TInfo>\n\t\t\t? string & keyof TInfo\n\t\t\t: string\n\t>;\n}\n\n/**\n * Extensions to {@link TreeChangeEvents} which are not yet stable.\n *\n * @sealed @beta\n */\nexport interface TreeChangeEventsBeta<TNode extends TreeNode = TreeNode>\n\textends TreeChangeEvents {\n\t/**\n\t * Emitted by a node after a batch of changes has been applied to the tree, if any of the changes affected the node.\n\t *\n\t * - Object nodes define a change as being when the value of one of its properties changes (i.e., the property's value is set, including when set to `undefined`).\n\t *\n\t * - Array nodes define a change as when an element is added, removed, moved or replaced.\n\t *\n\t * - Map nodes define a change as when an entry is added, updated, or removed.\n\t *\n\t * @remarks\n\t * This event is not emitted when:\n\t *\n\t * - Properties of a child node change. Notably, updates to an array node or a map node (like adding or removing\n\t * elements/entries) will emit this event on the array/map node itself, but not on the node that contains the\n\t * array/map node as one of its properties.\n\t *\n\t * - The node is moved to a different location in the tree or removed from the tree.\n\t * In this case the event is emitted on the _parent_ node, not the node itself.\n\t *\n\t * For remote edits, this event is not guaranteed to occur in the same order or quantity that it did in\n\t * the client that made the original edit.\n\t *\n\t * When the event is emitted, the tree is guaranteed to be in-schema.\n\t *\n\t * @privateRemarks\n\t * This event occurs whenever the apparent contents of the node instance change, regardless of what caused the change.\n\t * For example, it will fire when the local client reassigns a child, when part of a remote edit is applied to the\n\t * node, or when the node has to be updated due to resolution of a merge conflict\n\t * (for example a previously applied local change might be undone, then reapplied differently or not at all).\n\t *\n\t * TODO: define and document event ordering (ex: bottom up, with nodeChanged before treeChange on each level).\n\t *\n\t * This defines a property which is a function instead of using the method syntax to avoid function bi-variance issues with the input data to the callback.\n\t */\n\tnodeChanged: (\n\t\tdata: NodeChangedData<TNode> &\n\t\t\t// Make the properties of object, map, and record nodes required:\n\t\t\t(TNode extends WithType<string, NodeKind.Map | NodeKind.Object | NodeKind.Record>\n\t\t\t\t? Required<Pick<NodeChangedData<TNode>, \"changedProperties\">>\n\t\t\t\t: unknown),\n\t) => void;\n}\n\n/**\n * Extensions to {@link (Tree:interface)} which are not yet stable.\n * @remarks\n * Use via the {@link (TreeBeta:variable)} singleton.\n * @system @sealed @beta\n */\nexport interface TreeBeta {\n\t/**\n\t * Register an event listener on the given node.\n\t * @param node - The node whose events should be subscribed to.\n\t * @param eventName - Which event to subscribe to.\n\t * @param listener - The callback to trigger for the event. The tree can be read during the callback, but it is invalid to modify the tree during this callback.\n\t * @returns A callback function which will deregister the event.\n\t * This callback should be called only once.\n\t */\n\ton<K extends keyof TreeChangeEventsBeta<TNode>, TNode extends TreeNode>(\n\t\tnode: TNode,\n\t\teventName: K,\n\t\tlistener: NoInfer<TreeChangeEventsBeta<TNode>[K]>,\n\t): () => void;\n\n\t/**\n\t * A less type-safe version of {@link (TreeAlpha:interface).create}, suitable for importing data.\n\t * @remarks\n\t * Due to {@link ConciseTree} relying on type inference from the data, its use is somewhat limited.\n\t * This does not support {@link ConciseTree|ConciseTrees} with customized handle encodings or using persisted keys.\n\t * Use \"compressed\" or \"verbose\" formats for more flexibility.\n\t *\n\t * When using this function,\n\t * it is recommend to ensure your schema is unambiguous with {@link ITreeConfigurationOptions.preventAmbiguity}.\n\t * If the schema is ambiguous, consider using {@link (TreeAlpha:interface).create} and {@link Unhydrated} nodes where needed,\n\t * or using {@link (TreeAlpha:interface).(importVerbose:1)} and specify all types.\n\t *\n\t * Documented (and thus recoverable) error handling/reporting for this is not yet implemented,\n\t * but for now most invalid inputs will throw a recoverable error.\n\t */\n\timportConcise<const TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t\tdata: ConciseTree | undefined,\n\t): Unhydrated<TreeFieldFromImplicitField<TSchema>>;\n\n\t/**\n\t * Copy a snapshot of the current version of a TreeNode into a {@link ConciseTree}.\n\t */\n\texportConcise(node: TreeNode | TreeLeafValue, options?: TreeEncodingOptions): ConciseTree;\n\n\t/**\n\t * Copy a snapshot of the current version of a TreeNode into a {@link ConciseTree}, allowing undefined.\n\t */\n\texportConcise(\n\t\tnode: TreeNode | TreeLeafValue | undefined,\n\t\toptions?: TreeEncodingOptions,\n\t): ConciseTree | undefined;\n\n\t/**\n\t * Clones the persisted data associated with a node.\n\t *\n\t * @param node - The node to clone.\n\t * @returns A new unhydrated node with the same persisted data as the original node.\n\t * @remarks\n\t * Some key things to note:\n\t *\n\t * - Local state, such as properties added to customized schema classes, will not be cloned. However, they will be\n\t * initialized to their default state just as if the node had been created via its constructor.\n\t *\n\t * - Value node types (i.e., numbers, strings, booleans, nulls and Fluid handles) will be returned as is.\n\t *\n\t * - The identifiers in the node's subtree will be preserved, i.e., they are not replaced with new values.\n\t *\n\t * - If the node (or any node in its subtree) contains {@link ObjectSchemaOptions.allowUnknownOptionalFields|unknown optional fields},\n\t * those fields will be cloned just like the known fields.\n\t */\n\tclone<const TSchema extends ImplicitFieldSchema>(\n\t\tnode: TreeFieldFromImplicitField<TSchema>,\n\t): TreeFieldFromImplicitField<TSchema>;\n\n\t// TODO: support more clone options\n\t// /**\n\t// * Like {@link (TreeBeta:interface).create}, except deeply clones existing nodes.\n\t// * @remarks\n\t// * This only clones the persisted data associated with a node.\n\t// * Local state, such as properties added to customized schema classes, will not be cloned:\n\t// * they will be initialized however they end up after running the constructor, just like if a remote client had inserted the same nodes.\n\t// */\n\t// clone<const TSchema extends ImplicitFieldSchema>(\n\t// \toriginal: TreeFieldFromImplicitField<TSchema>,\n\t// \toptions?: {\n\t// \t\t/**\n\t// \t\t * If set, all identifier's in the cloned tree (See {@link SchemaFactory.identifier}) will be replaced with new ones allocated using the default identifier allocation schema.\n\t// \t\t * Otherwise any identifiers will be preserved as is.\n\t// \t\t */\n\t// \t\treplaceIdentifiers?: true;\n\t// \t},\n\t// ): TreeFieldFromImplicitField<TSchema>;\n\n\t/**\n\t * Construct tree content that is compatible with the field defined by the provided `schema`.\n\t * @param schema - The schema for what to construct. As this is an {@link ImplicitFieldSchema}, a {@link FieldSchema}, {@link TreeNodeSchema} or {@link AllowedTypes} array can be provided.\n\t * @param data - The data used to construct the field content.\n\t * @remarks\n\t * When providing a {@link TreeNodeSchemaClass}, this is the same as invoking its constructor except that an unhydrated node can also be provided.\n\t * This function exists as a generalization that can be used in other cases as well,\n\t * such as when `undefined` might be allowed (for an optional field), or when the type should be inferred from the data when more than one type is possible.\n\t */\n\tcreate<const TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t\tdata: InsertableTreeFieldFromImplicitField<TSchema>,\n\t): Unhydrated<TreeFieldFromImplicitField<TSchema>>;\n}\n\n/**\n * Borrow a cursor from a node.\n * @remarks\n * The cursor must be put back to its original location before the node is used again.\n */\nexport function borrowCursorFromTreeNodeOrValue(\n\tnode: TreeNode | TreeLeafValue,\n): ITreeCursorSynchronous {\n\tif (isTreeValue(node)) {\n\t\treturn cursorFromVerbose(node, {});\n\t}\n\tconst kernel = getKernel(node);\n\tconst cursor = kernel.getInnerNode().borrowCursor();\n\treturn cursor;\n}\n\n/**\n * {@inheritDoc (TreeBeta:interface).importConcise}\n */\nexport function importConcise<TSchema extends ImplicitFieldSchema>(\n\tschema: TSchema & ImplicitFieldSchema,\n\tdata: ConciseTree | undefined,\n): Unhydrated<TreeFieldFromImplicitField<TSchema>>;\n/**\n * {@inheritDoc (TreeAlpha:interface).importConcise}\n */\nexport function importConcise<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\tschema: UnsafeUnknownSchema extends TSchema\n\t\t? ImplicitFieldSchema\n\t\t: TSchema & ImplicitFieldSchema,\n\tdata: ConciseTree | undefined,\n): Unhydrated<\n\tTSchema extends ImplicitFieldSchema\n\t\t? TreeFieldFromImplicitField<TSchema>\n\t\t: TreeNode | TreeLeafValue | undefined\n>;\nexport function importConcise<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\tschema: UnsafeUnknownSchema extends TSchema\n\t\t? ImplicitFieldSchema\n\t\t: TSchema & ImplicitFieldSchema,\n\tdata: ConciseTree | undefined,\n): Unhydrated<\n\tTSchema extends ImplicitFieldSchema\n\t\t? TreeFieldFromImplicitField<TSchema>\n\t\t: TreeNode | TreeLeafValue | undefined\n> {\n\t// Create the tree content from insertable data\n\tconst mapTree = unhydratedFlexTreeFromInsertable(\n\t\tdata as InsertableField<UnsafeUnknownSchema>,\n\t\tschema,\n\t);\n\tconst result = mapTree === undefined ? undefined : getOrCreateNodeFromInnerNode(mapTree);\n\treturn result as Unhydrated<\n\t\tTSchema extends ImplicitFieldSchema\n\t\t\t? TreeFieldFromImplicitField<TSchema>\n\t\t\t: TreeNode | TreeLeafValue | undefined\n\t>;\n}\n\n/**\n * {@inheritDoc (TreeBeta:interface).(exportConcise:1)}\n */\nexport function exportConcise(\n\tnode: TreeNode | TreeLeafValue,\n\toptions?: TreeEncodingOptions,\n): ConciseTree;\n/**\n * {@inheritDoc (TreeBeta:interface).(exportConcise:2)}\n */\nexport function exportConcise(\n\tnode: TreeNode | TreeLeafValue | undefined,\n\toptions?: TreeEncodingOptions,\n): ConciseTree | undefined;\nexport function exportConcise(\n\tnode: TreeNode | TreeLeafValue | undefined,\n\toptions?: TreeEncodingOptions,\n): ConciseTree | undefined {\n\tif (!isTreeNode(node)) {\n\t\treturn node;\n\t}\n\tconst config: TreeEncodingOptions = { ...options };\n\n\tconst kernel = getKernel(node);\n\tconst cursor = borrowCursorFromTreeNodeOrValue(node);\n\treturn conciseFromCursor(cursor, kernel.context, config);\n}\n\n/**\n * Extensions to {@link (Tree:variable)} which are not yet stable.\n * @see {@link (TreeBeta:interface)}.\n * @beta\n */\nexport const TreeBeta: TreeBeta = {\n\ton<K extends keyof TreeChangeEventsBeta<TNode>, TNode extends TreeNode>(\n\t\tnode: TNode,\n\t\teventName: K,\n\t\tlistener: NoInfer<TreeChangeEventsBeta<TNode>[K]>,\n\t): () => void {\n\t\treturn treeNodeApi.on(node, eventName, listener);\n\t},\n\n\timportConcise,\n\texportConcise,\n\n\tclone<const TSchema extends ImplicitFieldSchema>(\n\t\tnode: TreeFieldFromImplicitField<TSchema>,\n\t): Unhydrated<TreeFieldFromImplicitField<TSchema>> {\n\t\t// The only non-TreeNode cases are {@link TreeLeafValue} and `undefined` (for an empty optional field) which can be returned as is.\n\t\tif (!isTreeNode(node)) {\n\t\t\treturn node;\n\t\t}\n\n\t\tconst kernel = getKernel(node);\n\t\tconst cursor = kernel.getInnerNode().borrowCursor();\n\n\t\t// To handle when the node transitively contains unknown optional fields,\n\t\t// derive the context from the source node's stored schema which has stored schema for any such fields and their contents.\n\t\tconst flexContext = new UnhydratedContext(\n\t\t\tdefaultSchemaPolicy,\n\t\t\tkernel.context.flexContext.schema,\n\t\t);\n\t\tconst context = new Context(flexContext, getUnhydratedContext(kernel.schema).schema);\n\n\t\tconst fieldSchema: TreeFieldStoredSchema = {\n\t\t\tkind: FieldKinds.required.identifier,\n\t\t\ttypes: new Set([brand(kernel.schema.identifier)]),\n\t\t\tpersistedMetadata: undefined,\n\t\t};\n\t\treturn createFromCursor(kernel.schema, cursor, fieldSchema, context) as Unhydrated<\n\t\t\tTreeFieldFromImplicitField<TSchema>\n\t\t>;\n\t},\n\n\tcreate<const TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t\tdata: InsertableTreeFieldFromImplicitField<TSchema>,\n\t): Unhydrated<TreeFieldFromImplicitField<TSchema>> {\n\t\tconst mapTree = unhydratedFlexTreeFromInsertable(\n\t\t\tdata as InsertableContent | undefined,\n\t\t\tschema,\n\t\t);\n\t\tconst result = mapTree === undefined ? undefined : getOrCreateNodeFromInnerNode(mapTree);\n\t\treturn result as Unhydrated<TreeFieldFromImplicitField<TSchema>>;\n\t},\n};\n"]}
1
+ {"version":3,"file":"treeBeta.js","sourceRoot":"","sources":["../../../src/simple-tree/api/treeBeta.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAI0C;AAC1C,kDAA4C;AAC5C,+CAW0B;AAC1B,0DAA2D;AAM3D,gGAGgD;AAGhD,qDAAuE;AACvE,2CAA+C;AAG/C,qDAA+C;AAC/C,qDAAqD;AA2LrD;;;;GAIG;AACH,SAAgB,+BAA+B,CAC9C,IAA8B;IAE9B,IAAI,IAAA,sBAAW,EAAC,IAAI,CAAC,EAAE,CAAC;QACvB,OAAO,IAAA,kCAAiB,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,MAAM,GAAG,IAAA,oBAAS,EAAC,I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MAAM,GAAG,IAAA,oBAAS,EAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC,YAAY,EAAE,CAAC;QAEpD,yEAAyE;QACzE,0HAA0H;QAC1H,MAAM,WAAW,GAAG,IAAI,4BAAiB,CACxC,8BAAmB,EACnB,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CACjC,CAAC;QACF,MAAM,OAAO,GAAG,IAAI,kBAAO,CAAC,WAAW,EAAE,IAAA,uCAAoB,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QAErF,MAAM,WAAW,GAA0B;YAC1C,IAAI,EAAE,qBAAU,CAAC,QAAQ,CAAC,UAAU;YACpC,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC,IAAA,gBAAK,EAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;YACjD,iBAAiB,EAAE,SAAS;SAC5B,CAAC;QACF,OAAO,IAAA,4BAAgB,EAAC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,CAElE,CAAC;IACH,CAAC;IAED,MAAM,CACL,MAAe,EACf,IAAmD;QAEnD,MAAM,OAAO,GAAG,IAAA,sEAAgC,EAC/C,IAAqC,EACrC,MAAM,CACN,CAAC;QACF,MAAM,MAAM,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,uCAA4B,EAAC,OAAO,CAAC,CAAC;QACzF,OAAO,MAAyD,CAAC;IAClE,CAAC;CACD,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ITreeCursorSynchronous, TreeFieldStoredSchema } from \"../../core/index.js\";\nimport {\n\tdefaultSchemaPolicy,\n\tFieldKinds,\n\tisTreeValue,\n} from \"../../feature-libraries/index.js\";\nimport { brand } from \"../../util/index.js\";\nimport {\n\tContext,\n\tgetKernel,\n\tgetOrCreateNodeFromInnerNode,\n\tisTreeNode,\n\tUnhydratedContext,\n\ttype NodeKind,\n\ttype TreeLeafValue,\n\ttype TreeNode,\n\ttype Unhydrated,\n\ttype WithType,\n} from \"../core/index.js\";\nimport { getUnhydratedContext } from \"../createContext.js\";\nimport type {\n\tImplicitFieldSchema,\n\tInsertableTreeFieldFromImplicitField,\n\tTreeFieldFromImplicitField,\n} from \"../fieldSchema.js\";\nimport {\n\tunhydratedFlexTreeFromInsertable,\n\ttype InsertableContent,\n} from \"../unhydratedFlexTreeFromInsertable.js\";\nimport type { InsertableField, UnsafeUnknownSchema } from \"../unsafeUnknownSchema.js\";\n\nimport { conciseFromCursor, type ConciseTree } from \"./conciseTree.js\";\nimport { createFromCursor } from \"./create.js\";\nimport type { TreeEncodingOptions } from \"./customTree.js\";\nimport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\nimport { treeNodeApi } from \"./treeNodeApi.js\";\nimport { cursorFromVerbose } from \"./verboseTree.js\";\n\n// Tests for this file are grouped with those for treeNodeApi.ts as that is where this functionality will eventually land,\n// and where most of the actual implementation is for much of it.\n\n/**\n * Data included for {@link TreeChangeEventsBeta.nodeChanged}.\n * @sealed @beta\n */\nexport interface NodeChangedData<TNode extends TreeNode = TreeNode> {\n\t/**\n\t * When the node changed is an object or Map node, this lists all the properties which changed.\n\t * @remarks\n\t * This only includes changes to the node itself (which would trigger {@link TreeChangeEvents.nodeChanged}).\n\t *\n\t * Set to `undefined` when the {@link NodeKind} does not support this feature (currently just ArrayNodes).\n\t *\n\t * When defined, the set should never be empty, since `nodeChanged` will only be triggered when there is a change, and for the supported node types, the only things that can change are properties.\n\t */\n\treadonly changedProperties?: ReadonlySet<\n\t\t// For Object nodes, make changedProperties required and strongly typed with the property names from the schema:\n\t\tTNode extends WithType<string, NodeKind.Object, infer TInfo>\n\t\t\t? string & keyof TInfo\n\t\t\t: string\n\t>;\n}\n\n/**\n * Extensions to {@link TreeChangeEvents} which are not yet stable.\n *\n * @sealed @beta\n */\nexport interface TreeChangeEventsBeta<TNode extends TreeNode = TreeNode>\n\textends TreeChangeEvents {\n\t/**\n\t * Emitted by a node after a batch of changes has been applied to the tree, if any of the changes affected the node.\n\t *\n\t * - Object nodes define a change as being when the value of one of its properties changes (i.e., the property's value is set, including when set to `undefined`).\n\t *\n\t * - Array nodes define a change as when an element is added, removed, moved or replaced.\n\t *\n\t * - Map nodes define a change as when an entry is added, updated, or removed.\n\t *\n\t * @remarks\n\t * This event is not emitted when:\n\t *\n\t * - Properties of a child node change. Notably, updates to an array node or a map node (like adding or removing\n\t * elements/entries) will emit this event on the array/map node itself, but not on the node that contains the\n\t * array/map node as one of its properties.\n\t *\n\t * - The node is moved to a different location in the tree or removed from the tree.\n\t * In this case the event is emitted on the _parent_ node, not the node itself.\n\t *\n\t * For remote edits, this event is not guaranteed to occur in the same order or quantity that it did in\n\t * the client that made the original edit.\n\t *\n\t * When the event is emitted, the tree is guaranteed to be in-schema.\n\t *\n\t * @privateRemarks\n\t * This event occurs whenever the apparent contents of the node instance change, regardless of what caused the change.\n\t * For example, it will fire when the local client reassigns a child, when part of a remote edit is applied to the\n\t * node, or when the node has to be updated due to resolution of a merge conflict\n\t * (for example a previously applied local change might be undone, then reapplied differently or not at all).\n\t *\n\t * TODO: define and document event ordering (ex: bottom up, with nodeChanged before treeChange on each level).\n\t *\n\t * This defines a property which is a function instead of using the method syntax to avoid function bi-variance issues with the input data to the callback.\n\t */\n\tnodeChanged: (\n\t\tdata: NodeChangedData<TNode> &\n\t\t\t// Make the properties of object, map, and record nodes required:\n\t\t\t(TNode extends WithType<string, NodeKind.Map | NodeKind.Object | NodeKind.Record>\n\t\t\t\t? Required<Pick<NodeChangedData<TNode>, \"changedProperties\">>\n\t\t\t\t: unknown),\n\t) => void;\n}\n\n/**\n * Extensions to {@link (Tree:interface)} which are not yet stable.\n * @remarks\n * Use via the {@link (TreeBeta:variable)} singleton.\n * @system @sealed @beta\n */\nexport interface TreeBeta {\n\t/**\n\t * Register an event listener on the given node.\n\t * @param node - The node whose events should be subscribed to.\n\t * @param eventName - Which event to subscribe to.\n\t * @param listener - The callback to trigger for the event. The tree can be read during the callback, but it is invalid to modify the tree during this callback.\n\t * @returns A callback function which will deregister the event.\n\t * This callback should be called only once.\n\t */\n\ton<K extends keyof TreeChangeEventsBeta<TNode>, TNode extends TreeNode>(\n\t\tnode: TNode,\n\t\teventName: K,\n\t\tlistener: NoInfer<TreeChangeEventsBeta<TNode>[K]>,\n\t): () => void;\n\n\t/**\n\t * A less type-safe version of {@link (TreeAlpha:interface).create}, suitable for importing data.\n\t * @remarks\n\t * Due to {@link ConciseTree} relying on type inference from the data, its use is somewhat limited.\n\t * This does not support {@link ConciseTree|ConciseTrees} with customized handle encodings or using persisted keys.\n\t * Use \"compressed\" or \"verbose\" formats for more flexibility.\n\t *\n\t * When using this function,\n\t * it is recommend to ensure your schema is unambiguous with {@link ITreeConfigurationOptions.preventAmbiguity}.\n\t * If the schema is ambiguous, consider using {@link (TreeAlpha:interface).create} and {@link Unhydrated} nodes where needed,\n\t * or using {@link (TreeAlpha:interface).(importVerbose:1)} and specify all types.\n\t *\n\t * Documented (and thus recoverable) error handling/reporting for this is not yet implemented,\n\t * but for now most invalid inputs will throw a recoverable error.\n\t */\n\timportConcise<const TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t\tdata: ConciseTree | undefined,\n\t): Unhydrated<TreeFieldFromImplicitField<TSchema>>;\n\n\t/**\n\t * Copy a snapshot of the current version of a TreeNode into a {@link ConciseTree}.\n\t */\n\texportConcise(node: TreeNode | TreeLeafValue, options?: TreeEncodingOptions): ConciseTree;\n\n\t/**\n\t * Copy a snapshot of the current version of a TreeNode into a {@link ConciseTree}, allowing undefined.\n\t */\n\texportConcise(\n\t\tnode: TreeNode | TreeLeafValue | undefined,\n\t\toptions?: TreeEncodingOptions,\n\t): ConciseTree | undefined;\n\n\t/**\n\t * Clones the persisted data associated with a node.\n\t *\n\t * @param node - The node to clone.\n\t * @returns A new unhydrated node with the same persisted data as the original node.\n\t * @remarks\n\t * Some key things to note:\n\t *\n\t * - Local state, such as properties added to customized schema classes, will not be cloned. However, they will be\n\t * initialized to their default state just as if the node had been created via its constructor.\n\t *\n\t * - Value node types (i.e., numbers, strings, booleans, nulls and Fluid handles) will be returned as is.\n\t *\n\t * - The identifiers in the node's subtree will be preserved, i.e., they are not replaced with new values.\n\t *\n\t * - If the node (or any node in its subtree) contains {@link ObjectSchemaOptions.allowUnknownOptionalFields|unknown optional fields},\n\t * those fields will be cloned just like the known fields.\n\t */\n\tclone<const TSchema extends ImplicitFieldSchema>(\n\t\tnode: TreeFieldFromImplicitField<TSchema>,\n\t): TreeFieldFromImplicitField<TSchema>;\n\n\t// TODO: support more clone options\n\t// /**\n\t// * Like {@link (TreeBeta:interface).create}, except deeply clones existing nodes.\n\t// * @remarks\n\t// * This only clones the persisted data associated with a node.\n\t// * Local state, such as properties added to customized schema classes, will not be cloned:\n\t// * they will be initialized however they end up after running the constructor, just like if a remote client had inserted the same nodes.\n\t// */\n\t// clone<const TSchema extends ImplicitFieldSchema>(\n\t// \toriginal: TreeFieldFromImplicitField<TSchema>,\n\t// \toptions?: {\n\t// \t\t/**\n\t// \t\t * If set, all identifier's in the cloned tree (See {@link SchemaFactory.identifier}) will be replaced with new ones allocated using the default identifier allocation schema.\n\t// \t\t * Otherwise any identifiers will be preserved as is.\n\t// \t\t */\n\t// \t\treplaceIdentifiers?: true;\n\t// \t},\n\t// ): TreeFieldFromImplicitField<TSchema>;\n\n\t/**\n\t * Construct tree content that is compatible with the field defined by the provided `schema`.\n\t * @param schema - The schema for what to construct. As this is an {@link ImplicitFieldSchema}, a {@link FieldSchema}, {@link TreeNodeSchema} or {@link AllowedTypes} array can be provided.\n\t * @param data - The data used to construct the field content.\n\t * @remarks\n\t * When providing a {@link TreeNodeSchemaClass}, this is the same as invoking its constructor except that an unhydrated node can also be provided.\n\t * This function exists as a generalization that can be used in other cases as well,\n\t * such as when `undefined` might be allowed (for an optional field), or when the type should be inferred from the data when more than one type is possible.\n\t */\n\tcreate<const TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t\tdata: InsertableTreeFieldFromImplicitField<TSchema>,\n\t): Unhydrated<TreeFieldFromImplicitField<TSchema>>;\n}\n\n/**\n * Borrow a cursor from a node.\n * @remarks\n * The cursor must be put back to its original location before the node is used again.\n */\nexport function borrowCursorFromTreeNodeOrValue(\n\tnode: TreeNode | TreeLeafValue,\n): ITreeCursorSynchronous {\n\tif (isTreeValue(node)) {\n\t\treturn cursorFromVerbose(node, {});\n\t}\n\tconst kernel = getKernel(node);\n\tconst cursor = kernel.getInnerNode().borrowCursor();\n\treturn cursor;\n}\n\n/**\n * {@inheritDoc (TreeBeta:interface).importConcise}\n */\nexport function importConcise<TSchema extends ImplicitFieldSchema>(\n\tschema: TSchema & ImplicitFieldSchema,\n\tdata: ConciseTree | undefined,\n): Unhydrated<TreeFieldFromImplicitField<TSchema>>;\n/**\n * {@inheritDoc (TreeAlpha:interface).importConcise}\n */\nexport function importConcise<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\tschema: UnsafeUnknownSchema extends TSchema\n\t\t? ImplicitFieldSchema\n\t\t: TSchema & ImplicitFieldSchema,\n\tdata: ConciseTree | undefined,\n): Unhydrated<\n\tTSchema extends ImplicitFieldSchema\n\t\t? TreeFieldFromImplicitField<TSchema>\n\t\t: TreeNode | TreeLeafValue | undefined\n>;\nexport function importConcise<TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema>(\n\tschema: UnsafeUnknownSchema extends TSchema\n\t\t? ImplicitFieldSchema\n\t\t: TSchema & ImplicitFieldSchema,\n\tdata: ConciseTree | undefined,\n): Unhydrated<\n\tTSchema extends ImplicitFieldSchema\n\t\t? TreeFieldFromImplicitField<TSchema>\n\t\t: TreeNode | TreeLeafValue | undefined\n> {\n\t// Create the tree content from insertable data\n\tconst mapTree = unhydratedFlexTreeFromInsertable(\n\t\tdata as InsertableField<UnsafeUnknownSchema>,\n\t\tschema,\n\t);\n\tconst result = mapTree === undefined ? undefined : getOrCreateNodeFromInnerNode(mapTree);\n\treturn result as Unhydrated<\n\t\tTSchema extends ImplicitFieldSchema\n\t\t\t? TreeFieldFromImplicitField<TSchema>\n\t\t\t: TreeNode | TreeLeafValue | undefined\n\t>;\n}\n\n/**\n * {@inheritDoc (TreeBeta:interface).(exportConcise:1)}\n */\nexport function exportConcise(\n\tnode: TreeNode | TreeLeafValue,\n\toptions?: TreeEncodingOptions,\n): ConciseTree;\n/**\n * {@inheritDoc (TreeBeta:interface).(exportConcise:2)}\n */\nexport function exportConcise(\n\tnode: TreeNode | TreeLeafValue | undefined,\n\toptions?: TreeEncodingOptions,\n): ConciseTree | undefined;\nexport function exportConcise(\n\tnode: TreeNode | TreeLeafValue | undefined,\n\toptions?: TreeEncodingOptions,\n): ConciseTree | undefined {\n\tif (!isTreeNode(node)) {\n\t\treturn node;\n\t}\n\tconst config: TreeEncodingOptions = { ...options };\n\n\tconst kernel = getKernel(node);\n\tconst cursor = borrowCursorFromTreeNodeOrValue(node);\n\treturn conciseFromCursor(cursor, kernel.context, config);\n}\n\n/**\n * Extensions to {@link (Tree:variable)} which are not yet stable.\n * @see {@link (TreeBeta:interface)}.\n * @beta\n */\nexport const TreeBeta: TreeBeta = {\n\ton<K extends keyof TreeChangeEventsBeta<TNode>, TNode extends TreeNode>(\n\t\tnode: TNode,\n\t\teventName: K,\n\t\tlistener: NoInfer<TreeChangeEventsBeta<TNode>[K]>,\n\t): () => void {\n\t\treturn treeNodeApi.on(node, eventName, listener);\n\t},\n\n\timportConcise,\n\texportConcise,\n\n\tclone<const TSchema extends ImplicitFieldSchema>(\n\t\tnode: TreeFieldFromImplicitField<TSchema>,\n\t): Unhydrated<TreeFieldFromImplicitField<TSchema>> {\n\t\t// The only non-TreeNode cases are {@link TreeLeafValue} and `undefined` (for an empty optional field) which can be returned as is.\n\t\tif (!isTreeNode(node)) {\n\t\t\treturn node;\n\t\t}\n\n\t\tconst kernel = getKernel(node);\n\t\tconst cursor = kernel.getInnerNode().borrowCursor();\n\n\t\t// To handle when the node transitively contains unknown optional fields,\n\t\t// derive the context from the source node's stored schema which has stored schema for any such fields and their contents.\n\t\tconst flexContext = new UnhydratedContext(\n\t\t\tdefaultSchemaPolicy,\n\t\t\tkernel.context.flexContext.schema,\n\t\t);\n\t\tconst context = new Context(flexContext, getUnhydratedContext(kernel.schema).schema);\n\n\t\tconst fieldSchema: TreeFieldStoredSchema = {\n\t\t\tkind: FieldKinds.required.identifier,\n\t\t\ttypes: new Set([brand(kernel.schema.identifier)]),\n\t\t\tpersistedMetadata: undefined,\n\t\t};\n\t\treturn createFromCursor(kernel.schema, cursor, fieldSchema, context) as Unhydrated<\n\t\t\tTreeFieldFromImplicitField<TSchema>\n\t\t>;\n\t},\n\n\tcreate<const TSchema extends ImplicitFieldSchema>(\n\t\tschema: TSchema,\n\t\tdata: InsertableTreeFieldFromImplicitField<TSchema>,\n\t): Unhydrated<TreeFieldFromImplicitField<TSchema>> {\n\t\tconst mapTree = unhydratedFlexTreeFromInsertable(\n\t\t\tdata as InsertableContent | undefined,\n\t\t\tschema,\n\t\t);\n\t\tconst result = mapTree === undefined ? undefined : getOrCreateNodeFromInnerNode(mapTree);\n\t\treturn result as Unhydrated<TreeFieldFromImplicitField<TSchema>>;\n\t},\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"treeNodeApi.d.ts","sourceRoot":"","sources":["../../../src/simple-tree/api/treeNodeApi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,KAAK,UAAU,EAA2B,MAAM,kCAAkC,CAAC;AAa5F,OAAO,EAGN,KAAK,cAAc,EAEnB,KAAK,QAAQ,EAKb,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,gCAAgC,EAErC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,M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AAgB,EAClC,IAAI,EAAE,QAAQ,EACd,SAAS,EAAE,CAAC,EACZ,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC3B,MAAM,IAAI,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,QAAQ,GAAG,UAAU,CAAC;IAEnC;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACrD;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,WA4FzB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,SAAS,GAAG,cAAc,CA2BvE;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,QAAQ,EACd,WAAW,EAAE,kBAAkB,GAC7B,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAC/B,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,QAAQ,EACd,WAAW,EAAE,YAAY,GACvB,MAAM,GAAG,SAAS,CAAC;AACtB,wBAAgB,qBAAqB,CACpC,IAAI,EAAE,QAAQ,EACd,WAAW,EAAE,cAAc,GACzB,MAAM,GAAG,SAAS,CAAC;AA8DtB;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,MAAM,CAgB5D;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAC1C,MAAM,EAAE,cAAc,EACtB,SAAS,EAAE,MAAM,GAAG,MAAM,GACxB,MAAM,GAAG,MAAM,CAyBjB"}
@@ -6,16 +6,16 @@
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.getPropertyKeyFromStoredKey = exports.getStoredKey = exports.getIdentifierFromNode = exports.tryGetSchema = exports.treeNodeApi = void 0;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
+ const internal_2 = require("@fluidframework/runtime-utils/internal");
10
+ const internal_3 = require("@fluidframework/telemetry-utils/internal");
9
11
  const index_js_1 = require("../../core/index.js");
10
12
  const index_js_2 = require("../../feature-libraries/index.js");
11
13
  const index_js_3 = require("../../util/index.js");
14
+ const index_js_4 = require("../core/index.js");
12
15
  const fieldSchema_js_1 = require("../fieldSchema.js");
16
+ const getTreeNodeForField_js_1 = require("../getTreeNodeForField.js");
13
17
  const leafNodeSchema_js_1 = require("../leafNodeSchema.js");
14
- const internal_2 = require("@fluidframework/runtime-utils/internal");
15
- const internal_3 = require("@fluidframework/telemetry-utils/internal");
16
- const index_js_4 = require("../core/index.js");
17
18
  const index_js_5 = require("../node-kinds/index.js");
18
- const getTreeNodeForField_js_1 = require("../getTreeNodeForField.js");
19
19
  /**
20
20
  * {@inheritDoc TreeNodeApi}
21
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"treeNodeApi.js","sourceRoot":"","sources":["../../../src/simple-tree/api/treeNodeApi.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAAyF;AAEzF,kDAA6D;AAC7D,+DAA4F;AAC5F,kDAAwD;AACxD,sDAA0E;AAC1E,4DAM8B;AAC9B,qEAAuE;AACvE,uEAAsE;AAEtE,+CAc0B;AAE1B,qDAA+E;AAC/E,sEAAmE;AAoGnE;;GAEG;AACU,QAAA,WAAW,GAAgB;IACvC,MAAM,CAAC,IAAc;QACpB,MAAM,QAAQ,GAAG,IAAA,uBAAY,EAAC,IAAI,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC;QAC9D,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC5B,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,MAAM,MAAM,GAAG,IAAA,uCAA4B,EAAC,QAAQ,CAAC,CAAC;QACtD,IAAA,iBAAM,EACL,CAAC,IAAA,sBAAW,EAAC,MAAM,CAAC,EACpB,KAAK,CAAC,gEAAgE,CACtE,CAAC;QACF,OAAO,MAAM,C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,GAAG,MAAM,CAAC,IAA2C,CAAC;IAElE,cAAc;IACd,iEAAiE;IACjE,uGAAuG;IACvG,6IAA6I;IAC7I,iEAAiE;IACjE,KAAK,MAAM,CAAC,WAAW,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACjE,IAAI,WAAW,YAAY,4BAAW,IAAI,WAAW,CAAC,KAAK,EAAE,GAAG,KAAK,SAAS,EAAE,CAAC;YAChF,OAAO,WAAW,CAAC;QACpB,CAAC;IACF,CAAC;IAED,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,SAAS,EAAE,CAAC;QACrC,IAAA,eAAI,EAAC,KAAK,CAAC,6DAA6D,CAAC,CAAC;IAC3E,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AA5BD,kEA4BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, oob, fail, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport { EmptyKey, rootFieldKey } from \"../../core/index.js\";\nimport { type TreeStatus, isTreeValue, FieldKinds } from \"../../feature-libraries/index.js\";\nimport { extractFromOpaque } from \"../../util/index.js\";\nimport { type ImplicitFieldSchema, FieldSchema } from \"../fieldSchema.js\";\nimport {\n\tbooleanSchema,\n\thandleSchema,\n\tnullSchema,\n\tnumberSchema,\n\tstringSchema,\n} from \"../leafNodeSchema.js\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport type { Off } from \"@fluidframework/core-interfaces\";\nimport {\n\tgetKernel,\n\tisTreeNode,\n\ttype TreeNodeSchema,\n\tNodeKind,\n\ttype TreeNode,\n\ttryGetTreeNodeSchema,\n\tgetOrCreateNodeFromInnerNode,\n\ttypeSchemaSymbol,\n\tgetInnerNode,\n\ttype TreeLeafValue,\n\ttype ImplicitAllowedTypes,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\tnormalizeAllowedTypes,\n} from \"../core/index.js\";\nimport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\nimport { isArrayNodeSchema, isObjectNodeSchema } from \"../node-kinds/index.js\";\nimport { tryGetTreeNodeForField } from \"../getTreeNodeForField.js\";\n\n/**\n * Provides various functions for analyzing {@link TreeNode}s.\n *\n * @remarks\n * With the exception of {@link TreeNodeApi.status}, these functions should not be called with nodes that have\n * been {@link TreeStatus.Deleted | deleted}.\n * To verify whether or not a node already has been deleted, use the {@link TreeNodeApi.status} function.\n *\n * This type should only be used via the public {@link (Tree:variable)} export.\n *\n * @privateRemarks\n * Due to limitations of API-Extractor link resolution, this type can't be moved into internalTypes but should be considered just an implementation detail of the `Tree` export.\n *\n * Inlining the typing of this interface onto the `Tree` object provides slightly different .d.ts generation,\n * which avoids typescript expanding the type of TreeNodeSchema and thus encountering\n * https://github.com/microsoft/rushstack/issues/1958.\n * @sealed @public\n */\nexport interface TreeNodeApi {\n\t/**\n\t * The schema information for this node.\n\t */\n\tschema(node: TreeNode | TreeLeafValue): TreeNodeSchema;\n\n\t/**\n\t * Narrow the type of the given value if it satisfies the given schema.\n\t * @example\n\t * ```ts\n\t * if (node.is(myNode, Point)) {\n\t * const y = myNode.y; // `myNode` is now known to satisfy the `Point` schema and therefore has a `y` coordinate.\n\t * }\n\t * ```\n\t */\n\tis<TSchema extends ImplicitAllowedTypes>(\n\t\tvalue: unknown,\n\t\tschema: TSchema,\n\t): value is TreeNodeFromImplicitAllowedTypes<TSchema>;\n\n\t/**\n\t * Return the node under which this node resides in the tree (or undefined if this is a root node of the tree).\n\t *\n\t * @throws A {@link @fluidframework/telemetry-utils#UsageError} if the node has been {@link TreeStatus.Deleted | deleted}.\n\t *\n\t * @see {@link (TreeAlpha:interface).child}\n\t * @see {@link (TreeAlpha:interface).children}\n\t */\n\tparent(node: TreeNode): TreeNode | undefined;\n\n\t/**\n\t * The key of the given node under its parent.\n\t *\n\t * @remarks\n\t * If `node` is an element in a {@link (TreeArrayNode:interface)}, this returns the index of `node` in the array node (a `number`).\n\t * Otherwise, this returns the key of the field that it is under (a `string`).\n\t *\n\t * @throws A {@link @fluidframework/telemetry-utils#UsageError} if the node has been {@link TreeStatus.Deleted | deleted}.\n\t */\n\tkey(node: TreeNode): string | number;\n\n\t/**\n\t * Register an event listener on the given node.\n\t * @param node - The node whose events should be subscribed to.\n\t * @param eventName - Which event to subscribe to.\n\t * @param listener - The callback to trigger for the event. The tree can be read during the callback, but it is invalid to modify the tree during this callback.\n\t * @returns A callback function which will deregister the event.\n\t * This callback should be called only once.\n\t */\n\ton<K extends keyof TreeChangeEvents>(\n\t\tnode: TreeNode,\n\t\teventName: K,\n\t\tlistener: TreeChangeEvents[K],\n\t): () => void;\n\n\t/**\n\t * Returns the {@link TreeStatus} of the given node.\n\t */\n\tstatus(node: TreeNode): TreeStatus;\n\n\t/**\n\t * Returns the {@link SchemaFactory.identifier | identifier} of the given node in the most compressed form possible.\n\t * @remarks\n\t * If the node is {@link Unhydrated | hydrated} and its identifier is a valid UUID that was automatically generated by the SharedTree it is part of (or something else using the same {@link @fluidframework/id-compressor#IIdCompressor}), then this will return a process-unique integer corresponding to that identifier.\n\t * This is useful for performance-sensitive scenarios involving many nodes with identifiers that need to be compactly retained in memory or used for efficient lookup.\n\t * Note that automatically generated identifiers that were accessed before the node was hydrated will return the generated UUID, not the process-unique integer.\n\t *\n\t * If the node's identifier is any other user-provided string, then this will return that string.\n\t *\n\t * If the node has no identifier (that is, it has no {@link SchemaFactory.identifier | identifier} field), then this returns `undefined`.\n\t *\n\t * If the node has more than one identifier, then this will throw an error.\n\t *\n\t * The returned integer should not be serialized or preserved outside of the current process.\n\t * Its lifetime is that of the current in-memory instance of the FF container for this client, and it is not guaranteed to be unique or stable outside of that context.\n\t * The same node's identifier may, for example, be different across multiple sessions for the same client and document, or different across two clients in the same session.\n\t */\n\tshortId(node: TreeNode): number | string | undefined;\n}\n\n/**\n * {@inheritDoc TreeNodeApi}\n */\nexport const treeNodeApi: TreeNodeApi = {\n\tparent(node: TreeNode): TreeNode | undefined {\n\t\tconst editNode = getInnerNode(node).parentField.parent.parent;\n\t\tif (editNode === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst output = getOrCreateNodeFromInnerNode(editNode);\n\t\tassert(\n\t\t\t!isTreeValue(output),\n\t\t\t0x87f /* Parent can't be a leaf, so it should be a node not a value */,\n\t\t);\n\t\treturn output;\n\t},\n\tkey(node: TreeNode): string | number {\n\t\t// If the parent is undefined, then this node is under the root field,\n\t\t// so we know its key is the special root one.\n\t\tconst parent = treeNodeApi.parent(node);\n\t\tif (parent === undefined) {\n\t\t\treturn rootFieldKey;\n\t\t}\n\n\t\t// The flex-domain strictly operates in terms of \"stored keys\".\n\t\t// To find the associated developer-facing \"property key\", we need to look up the field associated with\n\t\t// the stored key from the flex-domain, and get property key its simple-domain counterpart was created with.\n\t\tconst storedKey = getStoredKey(node);\n\t\tconst parentSchema = treeNodeApi.schema(parent);\n\t\tconst propertyKey = getPropertyKeyFromStoredKey(parentSchema, storedKey);\n\t\treturn propertyKey;\n\t},\n\ton<K extends keyof TreeChangeEvents>(\n\t\tnode: TreeNode,\n\t\teventName: K,\n\t\tlistener: TreeChangeEvents[K],\n\t): Off {\n\t\tconst kernel = getKernel(node);\n\t\tswitch (eventName) {\n\t\t\tcase \"nodeChanged\": {\n\t\t\t\tconst nodeSchema = kernel.schema;\n\t\t\t\tif (isObjectNodeSchema(nodeSchema)) {\n\t\t\t\t\treturn kernel.events.on(\"childrenChangedAfterBatch\", ({ changedFields }) => {\n\t\t\t\t\t\tconst changedProperties = new Set(\n\t\t\t\t\t\t\tArray.from(\n\t\t\t\t\t\t\t\tchangedFields,\n\t\t\t\t\t\t\t\t(field) =>\n\t\t\t\t\t\t\t\t\tnodeSchema.storedKeyToPropertyKey.get(field) ??\n\t\t\t\t\t\t\t\t\tfail(0xb36 /* Could not find stored key in schema. */),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlistener({ changedProperties });\n\t\t\t\t\t});\n\t\t\t\t} else if (isArrayNodeSchema(nodeSchema)) {\n\t\t\t\t\treturn kernel.events.on(\"childrenChangedAfterBatch\", () => {\n\t\t\t\t\t\tlistener({ changedProperties: undefined });\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\treturn kernel.events.on(\"childrenChangedAfterBatch\", ({ changedFields }) => {\n\t\t\t\t\t\tlistener({ changedProperties: changedFields });\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase \"treeChanged\": {\n\t\t\t\treturn kernel.events.on(\"subtreeChangedAfterBatch\", () => listener({}));\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tthrow new UsageError(`No event named ${JSON.stringify(eventName)}.`);\n\t\t\t}\n\t\t}\n\t},\n\tstatus(node: TreeNode): TreeStatus {\n\t\treturn getKernel(node).getStatus();\n\t},\n\tis<TSchema extends ImplicitAllowedTypes>(\n\t\tvalue: unknown,\n\t\tschema: TSchema,\n\t): value is TreeNodeFromImplicitAllowedTypes<TSchema> {\n\t\t// This \"is\" utility would return false if the provided schema is a base type of the actual schema.\n\t\t// This could be confusing, and that case can only be hit when violating the rule that there is a single most derived schema that gets used (See documentation on TreeNodeSchemaClass).\n\t\t// Therefore this uses markSchemaMostDerived to ensure an informative usage error is thrown in the case where a base type is used.\n\n\t\tconst actualSchema = tryGetSchema(value);\n\t\tif (actualSchema === undefined) {\n\t\t\treturn false;\n\t\t}\n\t\treturn normalizeAllowedTypes(schema).evaluateSet().has(actualSchema);\n\t},\n\tschema(node: TreeNode | TreeLeafValue): TreeNodeSchema {\n\t\treturn tryGetSchema(node) ?? fail(0xb37 /* Not a tree node */);\n\t},\n\tshortId(node: TreeNode): number | string | undefined {\n\t\treturn getIdentifierFromNode(node, \"preferCompressed\");\n\t},\n};\n\n/**\n * Returns a schema for a value if the value is a {@link TreeNode} or a {@link TreeLeafValue}.\n * Returns undefined for other values.\n */\nexport function tryGetSchema(value: unknown): undefined | TreeNodeSchema {\n\tswitch (typeof value) {\n\t\tcase \"string\": {\n\t\t\treturn stringSchema;\n\t\t}\n\t\tcase \"number\": {\n\t\t\treturn numberSchema;\n\t\t}\n\t\tcase \"boolean\": {\n\t\t\treturn booleanSchema;\n\t\t}\n\t\tcase \"object\": {\n\t\t\tif (isTreeNode(value)) {\n\t\t\t\t// TODO: This case could be optimized, for example by placing the simple schema in a symbol on tree nodes.\n\t\t\t\treturn tryGetTreeNodeSchema(value);\n\t\t\t}\n\t\t\tif (value === null) {\n\t\t\t\treturn nullSchema;\n\t\t\t}\n\t\t\tif (isFluidHandle(value)) {\n\t\t\t\treturn handleSchema;\n\t\t\t}\n\t\t}\n\t\tdefault: {\n\t\t\treturn undefined;\n\t\t}\n\t}\n}\n\n/**\n * Gets the identifier from a node.\n *\n * @param node - {@link TreeNode} where you want to extract the identifier from.\n * @param compression - string value to determine what type of identifier you want to retrieve.\n *\n * @remarks\n * If the node does not contain an identifier field, it returns undefined.\n *\n * If `compression` is set to `compressed`:\n *\n * - If the node contains a compressible identifier known by the id compressor, the compressed identifier is returned.\n *\n * - If the node contains an identifier, but is not compressible or unknown by the id compressor, `undefined` is returned.\n *\n * If `compression` is set to `preferCompressed`:\n *\n * - If the node contains a compressible identifier known by the id compressor, the compressed identifier is returned.\n *\n * - If the node contains an identifier, but is not compressible or unknown by the id compressor, the uncompressed identifier is returned.\n *\n * If `compression` is set to `uncompressed`:\n * - If the node contains an identifier field, the uncompressed identifier is returned.\n */\nexport function getIdentifierFromNode(\n\tnode: TreeNode,\n\tcompression: \"preferCompressed\",\n): number | string | undefined;\nexport function getIdentifierFromNode(\n\tnode: TreeNode,\n\tcompression: \"compressed\",\n): number | undefined;\nexport function getIdentifierFromNode(\n\tnode: TreeNode,\n\tcompression: \"uncompressed\",\n): string | undefined;\nexport function getIdentifierFromNode(\n\tnode: TreeNode,\n\tcompression: \"preferCompressed\" | \"compressed\" | \"uncompressed\",\n): number | string | undefined {\n\tconst schema = node[typeSchemaSymbol];\n\tif (!isObjectNodeSchema(schema)) {\n\t\treturn undefined;\n\t}\n\n\tconst flexNode = getInnerNode(node);\n\tconst identifierFieldKeys = schema.identifierFieldKeys;\n\n\tswitch (identifierFieldKeys.length) {\n\t\tcase 0: {\n\t\t\treturn undefined;\n\t\t}\n\t\tcase 1: {\n\t\t\tconst key = identifierFieldKeys[0] ?? oob();\n\t\t\tconst identifierField = flexNode.tryGetField(key);\n\t\t\tassert(identifierField !== undefined, 0xbb5 /* missing identifier field */);\n\t\t\tconst identifierValue = tryGetTreeNodeForField(identifierField);\n\t\t\tassert(typeof identifierValue === \"string\", 0xbb6 /* identifier not a string */);\n\n\t\t\tconst context = flexNode.context;\n\t\t\tswitch (compression) {\n\t\t\t\tcase \"preferCompressed\": {\n\t\t\t\t\tif (context.isHydrated()) {\n\t\t\t\t\t\tconst localNodeKey =\n\t\t\t\t\t\t\tcontext.nodeKeyManager.tryLocalizeNodeIdentifier(identifierValue);\n\t\t\t\t\t\treturn localNodeKey === undefined\n\t\t\t\t\t\t\t? identifierValue\n\t\t\t\t\t\t\t: extractFromOpaque(localNodeKey);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn identifierValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcase \"compressed\": {\n\t\t\t\t\tif (context.isHydrated()) {\n\t\t\t\t\t\tconst localNodeKey =\n\t\t\t\t\t\t\tcontext.nodeKeyManager.tryLocalizeNodeIdentifier(identifierValue);\n\t\t\t\t\t\treturn localNodeKey === undefined ? undefined : extractFromOpaque(localNodeKey);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcase \"uncompressed\": {\n\t\t\t\t\treturn identifierValue;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tunreachableCase(compression);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdefault: {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"The node has more than one identifier. Retrieve identifiers individually via their fields instead.\",\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Gets the stored key with which the provided node is associated in the parent.\n */\nexport function getStoredKey(node: TreeNode): string | number {\n\t// Note: the flex domain strictly works with \"stored keys\", and knows nothing about the developer-facing\n\t// \"property keys\".\n\tconst parentField = getInnerNode(node).parentField;\n\tif (parentField.parent.schema === FieldKinds.sequence.identifier) {\n\t\t// The parent of `node` is an array node\n\t\tassert(\n\t\t\tparentField.parent.key === EmptyKey,\n\t\t\t0xa28 /* When using index as key, field should use EmptyKey */,\n\t\t);\n\t\treturn parentField.index;\n\t}\n\n\t// The parent of `node` is an object, a map, or undefined. If undefined, then `node` is a root/detached node.\n\tassert(parentField.index === 0, 0xa29 /* When using field key as key, index should be 0 */);\n\treturn parentField.parent.key;\n}\n\n/**\n * Given a node schema, gets the property key corresponding with the provided {@link FieldProps.key | stored key}.\n */\nexport function getPropertyKeyFromStoredKey(\n\tschema: TreeNodeSchema,\n\tstoredKey: string | number,\n): string | number {\n\t// Only object nodes have the concept of a \"stored key\", differentiated from the developer-facing \"property key\".\n\t// For any other kind of node, the stored key and the property key are the same.\n\tif (schema.kind !== NodeKind.Object) {\n\t\treturn storedKey;\n\t}\n\n\tconst fields = schema.info as Record<string, ImplicitFieldSchema>;\n\n\t// Invariants:\n\t// - The set of all property keys under an object must be unique.\n\t// - The set of all stored keys (including those implicitly created from property keys) must be unique.\n\t// To find the property key associated with the provided stored key, first check for any stored key matches (which are optionally populated).\n\t// If we don't find any, then search for a matching property key.\n\tfor (const [propertyKey, fieldSchema] of Object.entries(fields)) {\n\t\tif (fieldSchema instanceof FieldSchema && fieldSchema.props?.key === storedKey) {\n\t\t\treturn propertyKey;\n\t\t}\n\t}\n\n\tif (fields[storedKey] === undefined) {\n\t\tfail(0xb38 /* Existing stored key should always map to a property key */);\n\t}\n\n\treturn storedKey;\n}\n"]}
1
+ {"version":3,"file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oft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Off } from \"@fluidframework/core-interfaces\";\nimport { assert, oob, fail, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport { isFluidHandle } from \"@fluidframework/runtime-utils/internal\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\n\nimport { EmptyKey, rootFieldKey } from \"../../core/index.js\";\nimport { type TreeStatus, isTreeValue, FieldKinds } from \"../../feature-libraries/index.js\";\nimport { extractFromOpaque } from \"../../util/index.js\";\nimport {\n\tgetKernel,\n\tisTreeNode,\n\ttype TreeNodeSchema,\n\tNodeKind,\n\ttype TreeNode,\n\ttryGetTreeNodeSchema,\n\tgetOrCreateNodeFromInnerNode,\n\ttypeSchemaSymbol,\n\tgetInnerNode,\n\ttype TreeLeafValue,\n\ttype ImplicitAllowedTypes,\n\ttype TreeNodeFromImplicitAllowedTypes,\n\tnormalizeAllowedTypes,\n} from \"../core/index.js\";\nimport { type ImplicitFieldSchema, FieldSchema } from \"../fieldSchema.js\";\nimport { tryGetTreeNodeForField } from \"../getTreeNodeForField.js\";\nimport {\n\tbooleanSchema,\n\thandleSchema,\n\tnullSchema,\n\tnumberSchema,\n\tstringSchema,\n} from \"../leafNodeSchema.js\";\nimport { isArrayNodeSchema, isObjectNodeSchema } from \"../node-kinds/index.js\";\n\nimport type { TreeChangeEvents } from \"./treeChangeEvents.js\";\n\n/**\n * Provides various functions for analyzing {@link TreeNode}s.\n *\n * @remarks\n * With the exception of {@link TreeNodeApi.status}, these functions should not be called with nodes that have\n * been {@link TreeStatus.Deleted | deleted}.\n * To verify whether or not a node already has been deleted, use the {@link TreeNodeApi.status} function.\n *\n * This type should only be used via the public {@link (Tree:variable)} export.\n *\n * @privateRemarks\n * Due to limitations of API-Extractor link resolution, this type can't be moved into internalTypes but should be considered just an implementation detail of the `Tree` export.\n *\n * Inlining the typing of this interface onto the `Tree` object provides slightly different .d.ts generation,\n * which avoids typescript expanding the type of TreeNodeSchema and thus encountering\n * https://github.com/microsoft/rushstack/issues/1958.\n * @sealed @public\n */\nexport interface TreeNodeApi {\n\t/**\n\t * The schema information for this node.\n\t */\n\tschema(node: TreeNode | TreeLeafValue): TreeNodeSchema;\n\n\t/**\n\t * Narrow the type of the given value if it satisfies the given schema.\n\t * @example\n\t * ```ts\n\t * if (node.is(myNode, Point)) {\n\t * const y = myNode.y; // `myNode` is now known to satisfy the `Point` schema and therefore has a `y` coordinate.\n\t * }\n\t * ```\n\t */\n\tis<TSchema extends ImplicitAllowedTypes>(\n\t\tvalue: unknown,\n\t\tschema: TSchema,\n\t): value is TreeNodeFromImplicitAllowedTypes<TSchema>;\n\n\t/**\n\t * Return the node under which this node resides in the tree (or undefined if this is a root node of the tree).\n\t *\n\t * @throws A {@link @fluidframework/telemetry-utils#UsageError} if the node has been {@link TreeStatus.Deleted | deleted}.\n\t *\n\t * @see {@link (TreeAlpha:interface).child}\n\t * @see {@link (TreeAlpha:interface).children}\n\t */\n\tparent(node: TreeNode): TreeNode | undefined;\n\n\t/**\n\t * The key of the given node under its parent.\n\t *\n\t * @remarks\n\t * If `node` is an element in a {@link (TreeArrayNode:interface)}, this returns the index of `node` in the array node (a `number`).\n\t * Otherwise, this returns the key of the field that it is under (a `string`).\n\t *\n\t * @throws A {@link @fluidframework/telemetry-utils#UsageError} if the node has been {@link TreeStatus.Deleted | deleted}.\n\t */\n\tkey(node: TreeNode): string | number;\n\n\t/**\n\t * Register an event listener on the given node.\n\t * @param node - The node whose events should be subscribed to.\n\t * @param eventName - Which event to subscribe to.\n\t * @param listener - The callback to trigger for the event. The tree can be read during the callback, but it is invalid to modify the tree during this callback.\n\t * @returns A callback function which will deregister the event.\n\t * This callback should be called only once.\n\t */\n\ton<K extends keyof TreeChangeEvents>(\n\t\tnode: TreeNode,\n\t\teventName: K,\n\t\tlistener: TreeChangeEvents[K],\n\t): () => void;\n\n\t/**\n\t * Returns the {@link TreeStatus} of the given node.\n\t */\n\tstatus(node: TreeNode): TreeStatus;\n\n\t/**\n\t * Returns the {@link SchemaFactory.identifier | identifier} of the given node in the most compressed form possible.\n\t * @remarks\n\t * If the node is {@link Unhydrated | hydrated} and its identifier is a valid UUID that was automatically generated by the SharedTree it is part of (or something else using the same {@link @fluidframework/id-compressor#IIdCompressor}), then this will return a process-unique integer corresponding to that identifier.\n\t * This is useful for performance-sensitive scenarios involving many nodes with identifiers that need to be compactly retained in memory or used for efficient lookup.\n\t * Note that automatically generated identifiers that were accessed before the node was hydrated will return the generated UUID, not the process-unique integer.\n\t *\n\t * If the node's identifier is any other user-provided string, then this will return that string.\n\t *\n\t * If the node has no identifier (that is, it has no {@link SchemaFactory.identifier | identifier} field), then this returns `undefined`.\n\t *\n\t * If the node has more than one identifier, then this will throw an error.\n\t *\n\t * The returned integer should not be serialized or preserved outside of the current process.\n\t * Its lifetime is that of the current in-memory instance of the FF container for this client, and it is not guaranteed to be unique or stable outside of that context.\n\t * The same node's identifier may, for example, be different across multiple sessions for the same client and document, or different across two clients in the same session.\n\t */\n\tshortId(node: TreeNode): number | string | undefined;\n}\n\n/**\n * {@inheritDoc TreeNodeApi}\n */\nexport const treeNodeApi: TreeNodeApi = {\n\tparent(node: TreeNode): TreeNode | undefined {\n\t\tconst editNode = getInnerNode(node).parentField.parent.parent;\n\t\tif (editNode === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst output = getOrCreateNodeFromInnerNode(editNode);\n\t\tassert(\n\t\t\t!isTreeValue(output),\n\t\t\t0x87f /* Parent can't be a leaf, so it should be a node not a value */,\n\t\t);\n\t\treturn output;\n\t},\n\tkey(node: TreeNode): string | number {\n\t\t// If the parent is undefined, then this node is under the root field,\n\t\t// so we know its key is the special root one.\n\t\tconst parent = treeNodeApi.parent(node);\n\t\tif (parent === undefined) {\n\t\t\treturn rootFieldKey;\n\t\t}\n\n\t\t// The flex-domain strictly operates in terms of \"stored keys\".\n\t\t// To find the associated developer-facing \"property key\", we need to look up the field associated with\n\t\t// the stored key from the flex-domain, and get property key its simple-domain counterpart was created with.\n\t\tconst storedKey = getStoredKey(node);\n\t\tconst parentSchema = treeNodeApi.schema(parent);\n\t\tconst propertyKey = getPropertyKeyFromStoredKey(parentSchema, storedKey);\n\t\treturn propertyKey;\n\t},\n\ton<K extends keyof TreeChangeEvents>(\n\t\tnode: TreeNode,\n\t\teventName: K,\n\t\tlistener: TreeChangeEvents[K],\n\t): Off {\n\t\tconst kernel = getKernel(node);\n\t\tswitch (eventName) {\n\t\t\tcase \"nodeChanged\": {\n\t\t\t\tconst nodeSchema = kernel.schema;\n\t\t\t\tif (isObjectNodeSchema(nodeSchema)) {\n\t\t\t\t\treturn kernel.events.on(\"childrenChangedAfterBatch\", ({ changedFields }) => {\n\t\t\t\t\t\tconst changedProperties = new Set(\n\t\t\t\t\t\t\tArray.from(\n\t\t\t\t\t\t\t\tchangedFields,\n\t\t\t\t\t\t\t\t(field) =>\n\t\t\t\t\t\t\t\t\tnodeSchema.storedKeyToPropertyKey.get(field) ??\n\t\t\t\t\t\t\t\t\tfail(0xb36 /* Could not find stored key in schema. */),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlistener({ changedProperties });\n\t\t\t\t\t});\n\t\t\t\t} else if (isArrayNodeSchema(nodeSchema)) {\n\t\t\t\t\treturn kernel.events.on(\"childrenChangedAfterBatch\", () => {\n\t\t\t\t\t\tlistener({ changedProperties: undefined });\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\treturn kernel.events.on(\"childrenChangedAfterBatch\", ({ changedFields }) => {\n\t\t\t\t\t\tlistener({ changedProperties: changedFields });\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tcase \"treeChanged\": {\n\t\t\t\treturn kernel.events.on(\"subtreeChangedAfterBatch\", () => listener({}));\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tthrow new UsageError(`No event named ${JSON.stringify(eventName)}.`);\n\t\t\t}\n\t\t}\n\t},\n\tstatus(node: TreeNode): TreeStatus {\n\t\treturn getKernel(node).getStatus();\n\t},\n\tis<TSchema extends ImplicitAllowedTypes>(\n\t\tvalue: unknown,\n\t\tschema: TSchema,\n\t): value is TreeNodeFromImplicitAllowedTypes<TSchema> {\n\t\t// This \"is\" utility would return false if the provided schema is a base type of the actual schema.\n\t\t// This could be confusing, and that case can only be hit when violating the rule that there is a single most derived schema that gets used (See documentation on TreeNodeSchemaClass).\n\t\t// Therefore this uses markSchemaMostDerived to ensure an informative usage error is thrown in the case where a base type is used.\n\n\t\tconst actualSchema = tryGetSchema(value);\n\t\tif (actualSchema === undefined) {\n\t\t\treturn false;\n\t\t}\n\t\treturn normalizeAllowedTypes(schema).evaluateSet().has(actualSchema);\n\t},\n\tschema(node: TreeNode | TreeLeafValue): TreeNodeSchema {\n\t\treturn tryGetSchema(node) ?? fail(0xb37 /* Not a tree node */);\n\t},\n\tshortId(node: TreeNode): number | string | undefined {\n\t\treturn getIdentifierFromNode(node, \"preferCompressed\");\n\t},\n};\n\n/**\n * Returns a schema for a value if the value is a {@link TreeNode} or a {@link TreeLeafValue}.\n * Returns undefined for other values.\n */\nexport function tryGetSchema(value: unknown): undefined | TreeNodeSchema {\n\tswitch (typeof value) {\n\t\tcase \"string\": {\n\t\t\treturn stringSchema;\n\t\t}\n\t\tcase \"number\": {\n\t\t\treturn numberSchema;\n\t\t}\n\t\tcase \"boolean\": {\n\t\t\treturn booleanSchema;\n\t\t}\n\t\tcase \"object\": {\n\t\t\tif (isTreeNode(value)) {\n\t\t\t\t// TODO: This case could be optimized, for example by placing the simple schema in a symbol on tree nodes.\n\t\t\t\treturn tryGetTreeNodeSchema(value);\n\t\t\t}\n\t\t\tif (value === null) {\n\t\t\t\treturn nullSchema;\n\t\t\t}\n\t\t\tif (isFluidHandle(value)) {\n\t\t\t\treturn handleSchema;\n\t\t\t}\n\t\t}\n\t\tdefault: {\n\t\t\treturn undefined;\n\t\t}\n\t}\n}\n\n/**\n * Gets the identifier from a node.\n *\n * @param node - {@link TreeNode} where you want to extract the identifier from.\n * @param compression - string value to determine what type of identifier you want to retrieve.\n *\n * @remarks\n * If the node does not contain an identifier field, it returns undefined.\n *\n * If `compression` is set to `compressed`:\n *\n * - If the node contains a compressible identifier known by the id compressor, the compressed identifier is returned.\n *\n * - If the node contains an identifier, but is not compressible or unknown by the id compressor, `undefined` is returned.\n *\n * If `compression` is set to `preferCompressed`:\n *\n * - If the node contains a compressible identifier known by the id compressor, the compressed identifier is returned.\n *\n * - If the node contains an identifier, but is not compressible or unknown by the id compressor, the uncompressed identifier is returned.\n *\n * If `compression` is set to `uncompressed`:\n * - If the node contains an identifier field, the uncompressed identifier is returned.\n */\nexport function getIdentifierFromNode(\n\tnode: TreeNode,\n\tcompression: \"preferCompressed\",\n): number | string | undefined;\nexport function getIdentifierFromNode(\n\tnode: TreeNode,\n\tcompression: \"compressed\",\n): number | undefined;\nexport function getIdentifierFromNode(\n\tnode: TreeNode,\n\tcompression: \"uncompressed\",\n): string | undefined;\nexport function getIdentifierFromNode(\n\tnode: TreeNode,\n\tcompression: \"preferCompressed\" | \"compressed\" | \"uncompressed\",\n): number | string | undefined {\n\tconst schema = node[typeSchemaSymbol];\n\tif (!isObjectNodeSchema(schema)) {\n\t\treturn undefined;\n\t}\n\n\tconst flexNode = getInnerNode(node);\n\tconst identifierFieldKeys = schema.identifierFieldKeys;\n\n\tswitch (identifierFieldKeys.length) {\n\t\tcase 0: {\n\t\t\treturn undefined;\n\t\t}\n\t\tcase 1: {\n\t\t\tconst key = identifierFieldKeys[0] ?? oob();\n\t\t\tconst identifierField = flexNode.tryGetField(key);\n\t\t\tassert(identifierField !== undefined, 0xbb5 /* missing identifier field */);\n\t\t\tconst identifierValue = tryGetTreeNodeForField(identifierField);\n\t\t\tassert(typeof identifierValue === \"string\", 0xbb6 /* identifier not a string */);\n\n\t\t\tconst context = flexNode.context;\n\t\t\tswitch (compression) {\n\t\t\t\tcase \"preferCompressed\": {\n\t\t\t\t\tif (context.isHydrated()) {\n\t\t\t\t\t\tconst localNodeKey =\n\t\t\t\t\t\t\tcontext.nodeKeyManager.tryLocalizeNodeIdentifier(identifierValue);\n\t\t\t\t\t\treturn localNodeKey === undefined\n\t\t\t\t\t\t\t? identifierValue\n\t\t\t\t\t\t\t: extractFromOpaque(localNodeKey);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn identifierValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcase \"compressed\": {\n\t\t\t\t\tif (context.isHydrated()) {\n\t\t\t\t\t\tconst localNodeKey =\n\t\t\t\t\t\t\tcontext.nodeKeyManager.tryLocalizeNodeIdentifier(identifierValue);\n\t\t\t\t\t\treturn localNodeKey === undefined ? undefined : extractFromOpaque(localNodeKey);\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcase \"uncompressed\": {\n\t\t\t\t\treturn identifierValue;\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\tunreachableCase(compression);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdefault: {\n\t\t\tthrow new UsageError(\n\t\t\t\t\"The node has more than one identifier. Retrieve identifiers individually via their fields instead.\",\n\t\t\t);\n\t\t}\n\t}\n}\n\n/**\n * Gets the stored key with which the provided node is associated in the parent.\n */\nexport function getStoredKey(node: TreeNode): string | number {\n\t// Note: the flex domain strictly works with \"stored keys\", and knows nothing about the developer-facing\n\t// \"property keys\".\n\tconst parentField = getInnerNode(node).parentField;\n\tif (parentField.parent.schema === FieldKinds.sequence.identifier) {\n\t\t// The parent of `node` is an array node\n\t\tassert(\n\t\t\tparentField.parent.key === EmptyKey,\n\t\t\t0xa28 /* When using index as key, field should use EmptyKey */,\n\t\t);\n\t\treturn parentField.index;\n\t}\n\n\t// The parent of `node` is an object, a map, or undefined. If undefined, then `node` is a root/detached node.\n\tassert(parentField.index === 0, 0xa29 /* When using field key as key, index should be 0 */);\n\treturn parentField.parent.key;\n}\n\n/**\n * Given a node schema, gets the property key corresponding with the provided {@link FieldProps.key | stored key}.\n */\nexport function getPropertyKeyFromStoredKey(\n\tschema: TreeNodeSchema,\n\tstoredKey: string | number,\n): string | number {\n\t// Only object nodes have the concept of a \"stored key\", differentiated from the developer-facing \"property key\".\n\t// For any other kind of node, the stored key and the property key are the same.\n\tif (schema.kind !== NodeKind.Object) {\n\t\treturn storedKey;\n\t}\n\n\tconst fields = schema.info as Record<string, ImplicitFieldSchema>;\n\n\t// Invariants:\n\t// - The set of all property keys under an object must be unique.\n\t// - The set of all stored keys (including those implicitly created from property keys) must be unique.\n\t// To find the property key associated with the provided stored key, first check for any stored key matches (which are optionally populated).\n\t// If we don't find any, then search for a matching property key.\n\tfor (const [propertyKey, fieldSchema] of Object.entries(fields)) {\n\t\tif (fieldSchema instanceof FieldSchema && fieldSchema.props?.key === storedKey) {\n\t\t\treturn propertyKey;\n\t\t}\n\t}\n\n\tif (fields[storedKey] === undefined) {\n\t\tfail(0xb38 /* Existing stored key should always map to a property key */);\n\t}\n\n\treturn storedKey;\n}\n"]}
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import type { IsUnion, RestrictiveStringRecord, UnionToIntersection } from "../../util/index.js";
6
- import type { ApplyKind, ApplyKindInput, FieldKind, FieldSchema, FieldSchemaAlpha } from "../fieldSchema.js";
7
6
  import type { NodeKind, WithType, TreeNode, Unhydrated, InternalTreeNode, TreeNodeSchema, TreeNodeSchemaCore, TreeNodeSchemaClass, ImplicitAllowedTypes, TreeLeafValue, FlexListToUnion, LazyItem, AnnotatedAllowedType, AnnotatedAllowedTypes } from "../core/index.js";
7
+ import type { ApplyKind, ApplyKindInput, FieldKind, FieldSchema, FieldSchemaAlpha } from "../fieldSchema.js";
8
8
  import type { TreeArrayNode } from "../node-kinds/index.js";
9
9
  import type { SchemaType, SimpleArrayNodeSchema, SimpleMapNodeSchema } from "../simpleSchema.js";
10
10
  /**
@@ -1 +1 @@
1
- {"version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