@fluidframework/tree 2.41.0-338186 → 2.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1205) hide show
  1. package/CHANGELOG.md +341 -0
  2. package/api-report/tree.alpha.api.md +174 -4
  3. package/dist/alpha.d.ts +3 -0
  4. package/dist/codec/codec.d.ts +52 -7
  5. package/dist/codec/codec.d.ts.map +1 -1
  6. package/dist/codec/codec.js +60 -8
  7. package/dist/codec/codec.js.map +1 -1
  8. package/dist/core/change-family/editBuilder.d.ts.map +1 -1
  9. package/dist/core/change-family/editBuilder.js.map +1 -1
  10. package/dist/core/forest/forest.d.ts.map +1 -1
  11. package/dist/core/forest/forest.js.map +1 -1
  12. package/dist/core/index.d.ts +1 -1
  13. package/dist/core/index.d.ts.map +1 -1
  14. package/dist/core/index.js +2 -1
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/core/rebase/types.d.ts +2 -2
  17. package/dist/core/rebase/types.js +2 -2
  18. package/dist/core/rebase/types.js.map +1 -1
  19. package/dist/core/rebase/utils.d.ts +0 -2
  20. package/dist/core/rebase/utils.d.ts.map +1 -1
  21. package/dist/core/rebase/utils.js +6 -10
  22. package/dist/core/rebase/utils.js.map +1 -1
  23. package/dist/core/schema-stored/formatV1.d.ts +0 -1
  24. package/dist/core/schema-stored/formatV1.d.ts.map +1 -1
  25. package/dist/core/schema-stored/formatV1.js +1 -2
  26. package/dist/core/schema-stored/formatV1.js.map +1 -1
  27. package/dist/core/schema-stored/index.d.ts +1 -1
  28. package/dist/core/schema-stored/index.d.ts.map +1 -1
  29. package/dist/core/schema-stored/index.js +2 -1
  30. package/dist/core/schema-stored/index.js.map +1 -1
  31. package/dist/core/schema-stored/schema.d.ts +6 -0
  32. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  33. package/dist/core/schema-stored/schema.js +8 -1
  34. package/dist/core/schema-stored/schema.js.map +1 -1
  35. package/dist/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  36. package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  37. package/dist/core/schema-stored/storedSchemaRepository.js +1 -1
  38. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  39. package/dist/core/tree/anchorSet.d.ts +2 -1
  40. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  41. package/dist/core/tree/anchorSet.js +4 -3
  42. package/dist/core/tree/anchorSet.js.map +1 -1
  43. package/dist/core/tree/chunk.d.ts.map +1 -1
  44. package/dist/core/tree/chunk.js.map +1 -1
  45. package/dist/core/tree/delta.d.ts.map +1 -1
  46. package/dist/core/tree/delta.js.map +1 -1
  47. package/dist/core/tree/deltaUtil.d.ts.map +1 -1
  48. package/dist/core/tree/deltaUtil.js.map +1 -1
  49. package/dist/core/tree/detachedFieldIndex.d.ts +1 -1
  50. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  51. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  52. package/dist/core/tree/detachedFieldIndexCodec.d.ts +1 -1
  53. package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  54. package/dist/core/tree/detachedFieldIndexCodec.js +1 -1
  55. package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
  56. package/dist/core/tree/pathTree.d.ts +12 -11
  57. package/dist/core/tree/pathTree.d.ts.map +1 -1
  58. package/dist/core/tree/pathTree.js +8 -7
  59. package/dist/core/tree/pathTree.js.map +1 -1
  60. package/dist/core/tree/treeTextFormat.d.ts +1 -1
  61. package/dist/core/tree/treeTextFormat.d.ts.map +1 -1
  62. package/dist/core/tree/treeTextFormat.js +1 -1
  63. package/dist/core/tree/treeTextFormat.js.map +1 -1
  64. package/dist/core/tree/visitDelta.d.ts +1 -1
  65. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  66. package/dist/core/tree/visitDelta.js.map +1 -1
  67. package/dist/core/tree/visitorUtils.d.ts +2 -2
  68. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  69. package/dist/core/tree/visitorUtils.js.map +1 -1
  70. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
  71. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  72. package/dist/feature-libraries/chunked-forest/chunkTree.js +1 -1
  73. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  74. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -2
  75. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  76. package/dist/feature-libraries/chunked-forest/chunkedForest.js +2 -2
  77. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  78. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  79. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  80. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  81. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
  82. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  83. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  84. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  85. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  86. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +8 -2
  87. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  88. package/dist/feature-libraries/chunked-forest/codec/codecs.js +12 -1
  89. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  90. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  91. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  92. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  93. package/dist/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  94. package/dist/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  95. package/dist/feature-libraries/chunked-forest/codec/index.js +2 -1
  96. package/dist/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  97. package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
  98. package/dist/feature-libraries/chunked-forest/codec/nodeShape.js +1 -1
  99. package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
  100. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  101. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  102. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  103. package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
  104. package/dist/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
  105. package/dist/feature-libraries/chunked-forest/index.d.ts +1 -1
  106. package/dist/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  107. package/dist/feature-libraries/chunked-forest/index.js +2 -1
  108. package/dist/feature-libraries/chunked-forest/index.js.map +1 -1
  109. package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
  110. package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
  111. package/dist/feature-libraries/chunked-forest/sequenceChunk.js +4 -4
  112. package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  113. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +1 -1
  114. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  115. package/dist/feature-libraries/chunked-forest/uniformChunk.js +1 -1
  116. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  117. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  118. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  119. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  120. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  121. package/dist/feature-libraries/default-schema/index.d.ts +1 -1
  122. package/dist/feature-libraries/default-schema/index.d.ts.map +1 -1
  123. package/dist/feature-libraries/default-schema/index.js +3 -2
  124. package/dist/feature-libraries/default-schema/index.js.map +1 -1
  125. package/dist/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  126. package/dist/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  127. package/dist/feature-libraries/default-schema/schemaChecker.d.ts +18 -14
  128. package/dist/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  129. package/dist/feature-libraries/default-schema/schemaChecker.js +78 -54
  130. package/dist/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  131. package/dist/feature-libraries/flex-tree/context.d.ts +18 -2
  132. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  133. package/dist/feature-libraries/flex-tree/context.js +22 -6
  134. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  135. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +3 -2
  136. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  137. package/dist/feature-libraries/flex-tree/flexTreeTypes.js +3 -2
  138. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  139. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  140. package/dist/feature-libraries/flex-tree/lazyField.js +1 -1
  141. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  142. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  143. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  144. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -1
  145. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  146. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  147. package/dist/feature-libraries/index.d.ts +3 -3
  148. package/dist/feature-libraries/index.d.ts.map +1 -1
  149. package/dist/feature-libraries/index.js +5 -4
  150. package/dist/feature-libraries/index.js.map +1 -1
  151. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  152. package/dist/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  153. package/dist/feature-libraries/indexing/anchorTreeIndex.js +15 -15
  154. package/dist/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  155. package/dist/feature-libraries/initializeForest.d.ts.map +1 -1
  156. package/dist/feature-libraries/initializeForest.js.map +1 -1
  157. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  158. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  159. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  160. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  161. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  162. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  163. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  164. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  165. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  166. package/dist/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  167. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  168. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  169. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  170. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  171. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  172. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  173. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  174. package/dist/feature-libraries/modular-schema/isNeverTree.js +0 -2
  175. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  176. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  177. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  178. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  179. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  180. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  181. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  182. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  183. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  184. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  185. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  186. package/dist/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  187. package/dist/feature-libraries/object-forest/objectForest.d.ts +22 -5
  188. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  189. package/dist/feature-libraries/object-forest/objectForest.js +296 -207
  190. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  191. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  192. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  193. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js +3 -2
  194. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  195. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  196. package/dist/feature-libraries/schema-index/codec.d.ts +6 -12
  197. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  198. package/dist/feature-libraries/schema-index/codec.js +8 -15
  199. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  200. package/dist/feature-libraries/schema-index/formatV1.d.ts +2 -2
  201. package/dist/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  202. package/dist/feature-libraries/schema-index/formatV1.js +1 -1
  203. package/dist/feature-libraries/schema-index/formatV1.js.map +1 -1
  204. package/dist/feature-libraries/schema-index/index.d.ts +1 -1
  205. package/dist/feature-libraries/schema-index/index.d.ts.map +1 -1
  206. package/dist/feature-libraries/schema-index/index.js +1 -2
  207. package/dist/feature-libraries/schema-index/index.js.map +1 -1
  208. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  209. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  210. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  211. package/dist/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  212. package/dist/feature-libraries/sequence-field/formatV3.js.map +1 -1
  213. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  214. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  215. package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  216. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  217. package/dist/feature-libraries/sequence-field/rebase.js +1 -1
  218. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  219. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  220. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  221. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  222. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  223. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  224. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  225. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  226. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  227. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  228. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  229. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  230. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  231. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  232. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  233. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  234. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  235. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  236. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  237. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  238. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  239. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  240. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  241. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  242. package/dist/feature-libraries/sequence-field/utils.d.ts +7 -5
  243. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  244. package/dist/feature-libraries/sequence-field/utils.js +7 -5
  245. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  246. package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  247. package/dist/feature-libraries/treeCursorUtils.js +3 -3
  248. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  249. package/dist/feature-libraries/treeTextCursor.d.ts +1 -1
  250. package/dist/feature-libraries/treeTextCursor.js +1 -1
  251. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  252. package/dist/feature-libraries/valueUtilities.d.ts.map +1 -1
  253. package/dist/feature-libraries/valueUtilities.js +6 -6
  254. package/dist/feature-libraries/valueUtilities.js.map +1 -1
  255. package/dist/index.d.ts +2 -2
  256. package/dist/index.d.ts.map +1 -1
  257. package/dist/index.js +2 -6
  258. package/dist/index.js.map +1 -1
  259. package/dist/jsonDomainSchema.d.ts.map +1 -1
  260. package/dist/jsonDomainSchema.js.map +1 -1
  261. package/dist/packageVersion.d.ts +1 -1
  262. package/dist/packageVersion.d.ts.map +1 -1
  263. package/dist/packageVersion.js +1 -1
  264. package/dist/packageVersion.js.map +1 -1
  265. package/dist/serializableDomainSchema.d.ts.map +1 -1
  266. package/dist/serializableDomainSchema.js.map +1 -1
  267. package/dist/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  268. package/dist/shared-tree/checkoutFlexTreeView.js.map +1 -1
  269. package/dist/shared-tree/independentView.d.ts +1 -1
  270. package/dist/shared-tree/independentView.d.ts.map +1 -1
  271. package/dist/shared-tree/independentView.js +8 -3
  272. package/dist/shared-tree/independentView.js.map +1 -1
  273. package/dist/shared-tree/index.d.ts +1 -1
  274. package/dist/shared-tree/index.d.ts.map +1 -1
  275. package/dist/shared-tree/index.js.map +1 -1
  276. package/dist/shared-tree/schematizeTree.d.ts +1 -1
  277. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  278. package/dist/shared-tree/schematizeTree.js.map +1 -1
  279. package/dist/shared-tree/schematizingTreeView.d.ts +1 -1
  280. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  281. package/dist/shared-tree/schematizingTreeView.js +1 -1
  282. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  283. package/dist/shared-tree/sharedTree.d.ts +3 -3
  284. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  285. package/dist/shared-tree/sharedTree.js +8 -8
  286. package/dist/shared-tree/sharedTree.js.map +1 -1
  287. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  288. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  289. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  290. package/dist/shared-tree/tree.js +1 -1
  291. package/dist/shared-tree/tree.js.map +1 -1
  292. package/dist/shared-tree/treeAlpha.d.ts +84 -2
  293. package/dist/shared-tree/treeAlpha.d.ts.map +1 -1
  294. package/dist/shared-tree/treeAlpha.js +75 -22
  295. package/dist/shared-tree/treeAlpha.js.map +1 -1
  296. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  297. package/dist/shared-tree/treeCheckout.js +3 -2
  298. package/dist/shared-tree/treeCheckout.js.map +1 -1
  299. package/dist/shared-tree-core/branch.d.ts +2 -2
  300. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  301. package/dist/shared-tree-core/branch.js +2 -2
  302. package/dist/shared-tree-core/branch.js.map +1 -1
  303. package/dist/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  304. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  305. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  306. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  307. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  308. package/dist/shared-tree-core/editManager.d.ts +3 -1
  309. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  310. package/dist/shared-tree-core/editManager.js +4 -2
  311. package/dist/shared-tree-core/editManager.js.map +1 -1
  312. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  313. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  314. package/dist/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  315. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  316. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  317. package/dist/shared-tree-core/messageCodecs.d.ts +1 -1
  318. package/dist/shared-tree-core/messageCodecs.js +1 -1
  319. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  320. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  321. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  322. package/dist/shared-tree-core/sharedTreeCore.d.ts +2 -2
  323. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  324. package/dist/shared-tree-core/sharedTreeCore.js +4 -4
  325. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  326. package/dist/shared-tree-core/transaction.d.ts.map +1 -1
  327. package/dist/shared-tree-core/transaction.js +1 -1
  328. package/dist/shared-tree-core/transaction.js.map +1 -1
  329. package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  330. package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
  331. package/dist/sharedTreeAttributes.d.ts.map +1 -1
  332. package/dist/sharedTreeAttributes.js.map +1 -1
  333. package/dist/simple-tree/api/conciseTree.d.ts.map +1 -1
  334. package/dist/simple-tree/api/conciseTree.js +1 -1
  335. package/dist/simple-tree/api/conciseTree.js.map +1 -1
  336. package/dist/simple-tree/api/configuration.js +4 -4
  337. package/dist/simple-tree/api/configuration.js.map +1 -1
  338. package/dist/simple-tree/api/create.d.ts +2 -26
  339. package/dist/simple-tree/api/create.d.ts.map +1 -1
  340. package/dist/simple-tree/api/create.js +5 -42
  341. package/dist/simple-tree/api/create.js.map +1 -1
  342. package/dist/simple-tree/api/customTree.d.ts +1 -1
  343. package/dist/simple-tree/api/customTree.d.ts.map +1 -1
  344. package/dist/simple-tree/api/customTree.js +24 -24
  345. package/dist/simple-tree/api/customTree.js.map +1 -1
  346. package/dist/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  347. package/dist/simple-tree/api/getSimpleSchema.js.map +1 -1
  348. package/dist/simple-tree/api/identifierIndex.js +2 -2
  349. package/dist/simple-tree/api/identifierIndex.js.map +1 -1
  350. package/dist/simple-tree/api/index.d.ts +2 -3
  351. package/dist/simple-tree/api/index.d.ts.map +1 -1
  352. package/dist/simple-tree/api/index.js +4 -9
  353. package/dist/simple-tree/api/index.js.map +1 -1
  354. package/dist/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  355. package/dist/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  356. package/dist/simple-tree/api/schemaFactory.d.ts +5 -5
  357. package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
  358. package/dist/simple-tree/api/schemaFactory.js +8 -8
  359. package/dist/simple-tree/api/schemaFactory.js.map +1 -1
  360. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  361. package/dist/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  362. package/dist/simple-tree/api/schemaFactoryAlpha.js +4 -6
  363. package/dist/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  364. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  365. package/dist/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  366. package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  367. package/dist/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  368. package/dist/simple-tree/api/schemaFromSimple.js.map +1 -1
  369. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  370. package/dist/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  371. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js +4 -6
  372. package/dist/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  373. package/dist/simple-tree/api/storedSchema.d.ts +1 -1
  374. package/dist/simple-tree/api/storedSchema.d.ts.map +1 -1
  375. package/dist/simple-tree/api/storedSchema.js +7 -6
  376. package/dist/simple-tree/api/storedSchema.js.map +1 -1
  377. package/dist/simple-tree/api/tree.d.ts +2 -2
  378. package/dist/simple-tree/api/tree.d.ts.map +1 -1
  379. package/dist/simple-tree/api/tree.js.map +1 -1
  380. package/dist/simple-tree/api/treeBeta.d.ts.map +1 -1
  381. package/dist/simple-tree/api/treeBeta.js +1 -1
  382. package/dist/simple-tree/api/treeBeta.js.map +1 -1
  383. package/dist/simple-tree/api/treeNodeApi.d.ts +38 -3
  384. package/dist/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  385. package/dist/simple-tree/api/treeNodeApi.js +42 -28
  386. package/dist/simple-tree/api/treeNodeApi.js.map +1 -1
  387. package/dist/simple-tree/api/typesUnsafe.d.ts +1 -1
  388. package/dist/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  389. package/dist/simple-tree/api/typesUnsafe.js.map +1 -1
  390. package/dist/simple-tree/api/verboseTree.js +3 -3
  391. package/dist/simple-tree/api/verboseTree.js.map +1 -1
  392. package/dist/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  393. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js +4 -6
  394. package/dist/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  395. package/dist/simple-tree/core/context.d.ts.map +1 -1
  396. package/dist/simple-tree/core/context.js.map +1 -1
  397. package/dist/simple-tree/core/getOrCreateNode.d.ts +1 -1
  398. package/dist/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  399. package/dist/simple-tree/core/getOrCreateNode.js +1 -1
  400. package/dist/simple-tree/core/getOrCreateNode.js.map +1 -1
  401. package/dist/simple-tree/core/treeNode.d.ts.map +1 -1
  402. package/dist/simple-tree/core/treeNode.js +1 -1
  403. package/dist/simple-tree/core/treeNode.js.map +1 -1
  404. package/dist/simple-tree/core/treeNodeKernel.d.ts +8 -20
  405. package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  406. package/dist/simple-tree/core/treeNodeKernel.js +19 -50
  407. package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
  408. package/dist/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  409. package/dist/simple-tree/core/treeNodeSchema.js.map +1 -1
  410. package/dist/simple-tree/core/types.d.ts.map +1 -1
  411. package/dist/simple-tree/core/types.js.map +1 -1
  412. package/dist/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  413. package/dist/simple-tree/core/unhydratedFlexTree.js +21 -21
  414. package/dist/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  415. package/dist/simple-tree/core/withType.d.ts +1 -1
  416. package/dist/simple-tree/core/withType.d.ts.map +1 -1
  417. package/dist/simple-tree/core/withType.js.map +1 -1
  418. package/dist/simple-tree/createContext.d.ts.map +1 -1
  419. package/dist/simple-tree/createContext.js.map +1 -1
  420. package/{lib/simple-tree/proxies.d.ts → dist/simple-tree/getTreeNodeForField.d.ts} +1 -1
  421. package/dist/simple-tree/getTreeNodeForField.d.ts.map +1 -0
  422. package/dist/simple-tree/{proxies.js → getTreeNodeForField.js} +1 -1
  423. package/dist/simple-tree/getTreeNodeForField.js.map +1 -0
  424. package/dist/simple-tree/index.d.ts +3 -10
  425. package/dist/simple-tree/index.d.ts.map +1 -1
  426. package/dist/simple-tree/index.js +17 -23
  427. package/dist/simple-tree/index.js.map +1 -1
  428. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  429. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  430. package/dist/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  431. package/dist/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  432. package/dist/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +10 -10
  433. package/dist/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  434. package/dist/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  435. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  436. package/dist/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  437. package/dist/simple-tree/node-kinds/array/arrayNodeTypes.js.map +1 -0
  438. package/dist/simple-tree/node-kinds/array/index.d.ts +7 -0
  439. package/dist/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  440. package/dist/simple-tree/node-kinds/array/index.js +16 -0
  441. package/dist/simple-tree/node-kinds/array/index.js.map +1 -0
  442. package/dist/simple-tree/node-kinds/index.d.ts +8 -0
  443. package/dist/simple-tree/node-kinds/index.d.ts.map +1 -0
  444. package/dist/simple-tree/node-kinds/index.js +26 -0
  445. package/dist/simple-tree/node-kinds/index.js.map +1 -0
  446. package/dist/simple-tree/node-kinds/map/index.d.ts +7 -0
  447. package/dist/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  448. package/dist/simple-tree/node-kinds/map/index.js +13 -0
  449. package/dist/simple-tree/node-kinds/map/index.js.map +1 -0
  450. package/{lib/simple-tree → dist/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  451. package/dist/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  452. package/dist/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +11 -11
  453. package/dist/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  454. package/dist/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  455. package/dist/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  456. package/dist/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  457. package/dist/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  458. package/dist/simple-tree/node-kinds/object/index.d.ts +7 -0
  459. package/dist/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  460. package/dist/simple-tree/node-kinds/object/index.js +16 -0
  461. package/dist/simple-tree/node-kinds/object/index.js.map +1 -0
  462. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNode.d.ts +17 -6
  463. package/dist/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  464. package/dist/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +49 -26
  465. package/dist/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  466. package/{lib/simple-tree → dist/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  467. package/dist/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  468. package/dist/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  469. package/dist/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  470. package/dist/simple-tree/prepareForInsertion.d.ts +18 -6
  471. package/dist/simple-tree/prepareForInsertion.d.ts.map +1 -1
  472. package/dist/simple-tree/prepareForInsertion.js +51 -22
  473. package/dist/simple-tree/prepareForInsertion.js.map +1 -1
  474. package/dist/simple-tree/schemaTypes.d.ts +2 -2
  475. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  476. package/dist/simple-tree/schemaTypes.js.map +1 -1
  477. package/dist/simple-tree/simpleSchema.d.ts.map +1 -1
  478. package/dist/simple-tree/simpleSchema.js.map +1 -1
  479. package/dist/simple-tree/toMapTree.d.ts +2 -22
  480. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  481. package/dist/simple-tree/toMapTree.js +44 -23
  482. package/dist/simple-tree/toMapTree.js.map +1 -1
  483. package/dist/simple-tree/toStoredSchema.d.ts.map +1 -1
  484. package/dist/simple-tree/toStoredSchema.js +1 -1
  485. package/dist/simple-tree/toStoredSchema.js.map +1 -1
  486. package/dist/simple-tree/treeNodeValid.d.ts +1 -1
  487. package/dist/simple-tree/treeNodeValid.d.ts.map +1 -1
  488. package/dist/simple-tree/treeNodeValid.js +10 -10
  489. package/dist/simple-tree/treeNodeValid.js.map +1 -1
  490. package/dist/simple-tree/walkFieldSchema.d.ts.map +1 -1
  491. package/dist/simple-tree/walkFieldSchema.js.map +1 -1
  492. package/dist/tableSchema.d.ts +119 -72
  493. package/dist/tableSchema.d.ts.map +1 -1
  494. package/dist/tableSchema.js +83 -36
  495. package/dist/tableSchema.js.map +1 -1
  496. package/dist/treeFactory.d.ts +1 -1
  497. package/dist/treeFactory.d.ts.map +1 -1
  498. package/dist/treeFactory.js +3 -3
  499. package/dist/treeFactory.js.map +1 -1
  500. package/dist/util/bTreeUtils.d.ts.map +1 -1
  501. package/dist/util/bTreeUtils.js.map +1 -1
  502. package/dist/util/breakable.d.ts +23 -4
  503. package/dist/util/breakable.d.ts.map +1 -1
  504. package/dist/util/breakable.js +12 -3
  505. package/dist/util/breakable.js.map +1 -1
  506. package/docs/SharedTree Philosophy.md +5 -5
  507. package/lib/alpha.d.ts +3 -0
  508. package/lib/codec/codec.d.ts +52 -7
  509. package/lib/codec/codec.d.ts.map +1 -1
  510. package/lib/codec/codec.js +60 -8
  511. package/lib/codec/codec.js.map +1 -1
  512. package/lib/core/change-family/editBuilder.d.ts.map +1 -1
  513. package/lib/core/change-family/editBuilder.js.map +1 -1
  514. package/lib/core/forest/forest.d.ts.map +1 -1
  515. package/lib/core/forest/forest.js.map +1 -1
  516. package/lib/core/index.d.ts +1 -1
  517. package/lib/core/index.d.ts.map +1 -1
  518. package/lib/core/index.js +1 -1
  519. package/lib/core/index.js.map +1 -1
  520. package/lib/core/rebase/types.d.ts +2 -2
  521. package/lib/core/rebase/types.js +2 -2
  522. package/lib/core/rebase/types.js.map +1 -1
  523. package/lib/core/rebase/utils.d.ts +0 -2
  524. package/lib/core/rebase/utils.d.ts.map +1 -1
  525. package/lib/core/rebase/utils.js +6 -10
  526. package/lib/core/rebase/utils.js.map +1 -1
  527. package/lib/core/schema-stored/formatV1.d.ts +0 -1
  528. package/lib/core/schema-stored/formatV1.d.ts.map +1 -1
  529. package/lib/core/schema-stored/formatV1.js +0 -1
  530. package/lib/core/schema-stored/formatV1.js.map +1 -1
  531. package/lib/core/schema-stored/index.d.ts +1 -1
  532. package/lib/core/schema-stored/index.d.ts.map +1 -1
  533. package/lib/core/schema-stored/index.js +1 -1
  534. package/lib/core/schema-stored/index.js.map +1 -1
  535. package/lib/core/schema-stored/schema.d.ts +6 -0
  536. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  537. package/lib/core/schema-stored/schema.js +7 -0
  538. package/lib/core/schema-stored/schema.js.map +1 -1
  539. package/lib/core/schema-stored/storedSchemaRepository.d.ts +1 -1
  540. package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  541. package/lib/core/schema-stored/storedSchemaRepository.js +1 -1
  542. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  543. package/lib/core/tree/anchorSet.d.ts +2 -1
  544. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  545. package/lib/core/tree/anchorSet.js +4 -3
  546. package/lib/core/tree/anchorSet.js.map +1 -1
  547. package/lib/core/tree/chunk.d.ts.map +1 -1
  548. package/lib/core/tree/chunk.js.map +1 -1
  549. package/lib/core/tree/delta.d.ts.map +1 -1
  550. package/lib/core/tree/delta.js.map +1 -1
  551. package/lib/core/tree/deltaUtil.d.ts.map +1 -1
  552. package/lib/core/tree/deltaUtil.js.map +1 -1
  553. package/lib/core/tree/detachedFieldIndex.d.ts +1 -1
  554. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  555. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  556. package/lib/core/tree/detachedFieldIndexCodec.d.ts +1 -1
  557. package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  558. package/lib/core/tree/detachedFieldIndexCodec.js +1 -1
  559. package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
  560. package/lib/core/tree/pathTree.d.ts +12 -11
  561. package/lib/core/tree/pathTree.d.ts.map +1 -1
  562. package/lib/core/tree/pathTree.js +8 -7
  563. package/lib/core/tree/pathTree.js.map +1 -1
  564. package/lib/core/tree/treeTextFormat.d.ts +1 -1
  565. package/lib/core/tree/treeTextFormat.d.ts.map +1 -1
  566. package/lib/core/tree/treeTextFormat.js +1 -1
  567. package/lib/core/tree/treeTextFormat.js.map +1 -1
  568. package/lib/core/tree/visitDelta.d.ts +1 -1
  569. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  570. package/lib/core/tree/visitDelta.js.map +1 -1
  571. package/lib/core/tree/visitorUtils.d.ts +2 -2
  572. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  573. package/lib/core/tree/visitorUtils.js.map +1 -1
  574. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +1 -1
  575. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  576. package/lib/feature-libraries/chunked-forest/chunkTree.js +1 -1
  577. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  578. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +2 -2
  579. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  580. package/lib/feature-libraries/chunked-forest/chunkedForest.js +2 -2
  581. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  582. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +1 -1
  583. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  584. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  585. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +2 -2
  586. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  587. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  588. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  589. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  590. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +8 -2
  591. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  592. package/lib/feature-libraries/chunked-forest/codec/codecs.js +10 -0
  593. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  594. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +1 -1
  595. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  596. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  597. package/lib/feature-libraries/chunked-forest/codec/index.d.ts +1 -1
  598. package/lib/feature-libraries/chunked-forest/codec/index.d.ts.map +1 -1
  599. package/lib/feature-libraries/chunked-forest/codec/index.js +1 -1
  600. package/lib/feature-libraries/chunked-forest/codec/index.js.map +1 -1
  601. package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
  602. package/lib/feature-libraries/chunked-forest/codec/nodeShape.js +1 -1
  603. package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
  604. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts +1 -1
  605. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.d.ts.map +1 -1
  606. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncode.js.map +1 -1
  607. package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
  608. package/lib/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
  609. package/lib/feature-libraries/chunked-forest/index.d.ts +1 -1
  610. package/lib/feature-libraries/chunked-forest/index.d.ts.map +1 -1
  611. package/lib/feature-libraries/chunked-forest/index.js +1 -1
  612. package/lib/feature-libraries/chunked-forest/index.js.map +1 -1
  613. package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
  614. package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
  615. package/lib/feature-libraries/chunked-forest/sequenceChunk.js +1 -1
  616. package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  617. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +1 -1
  618. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  619. package/lib/feature-libraries/chunked-forest/uniformChunk.js +1 -1
  620. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  621. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +1 -1
  622. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  623. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  624. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  625. package/lib/feature-libraries/default-schema/index.d.ts +1 -1
  626. package/lib/feature-libraries/default-schema/index.d.ts.map +1 -1
  627. package/lib/feature-libraries/default-schema/index.js +1 -1
  628. package/lib/feature-libraries/default-schema/index.js.map +1 -1
  629. package/lib/feature-libraries/default-schema/mappedEditBuilder.d.ts.map +1 -1
  630. package/lib/feature-libraries/default-schema/mappedEditBuilder.js.map +1 -1
  631. package/lib/feature-libraries/default-schema/schemaChecker.d.ts +18 -14
  632. package/lib/feature-libraries/default-schema/schemaChecker.d.ts.map +1 -1
  633. package/lib/feature-libraries/default-schema/schemaChecker.js +76 -53
  634. package/lib/feature-libraries/default-schema/schemaChecker.js.map +1 -1
  635. package/lib/feature-libraries/flex-tree/context.d.ts +18 -2
  636. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  637. package/lib/feature-libraries/flex-tree/context.js +23 -7
  638. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  639. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +3 -2
  640. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  641. package/lib/feature-libraries/flex-tree/flexTreeTypes.js +3 -2
  642. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  643. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  644. package/lib/feature-libraries/flex-tree/lazyField.js +1 -1
  645. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  646. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  647. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  648. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +1 -1
  649. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  650. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  651. package/lib/feature-libraries/index.d.ts +3 -3
  652. package/lib/feature-libraries/index.d.ts.map +1 -1
  653. package/lib/feature-libraries/index.js +3 -3
  654. package/lib/feature-libraries/index.js.map +1 -1
  655. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts +2 -2
  656. package/lib/feature-libraries/indexing/anchorTreeIndex.d.ts.map +1 -1
  657. package/lib/feature-libraries/indexing/anchorTreeIndex.js +1 -1
  658. package/lib/feature-libraries/indexing/anchorTreeIndex.js.map +1 -1
  659. package/lib/feature-libraries/initializeForest.d.ts.map +1 -1
  660. package/lib/feature-libraries/initializeForest.js.map +1 -1
  661. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  662. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  663. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +1 -1
  664. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  665. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  666. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +1 -1
  667. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +1 -1
  668. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  669. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  670. package/lib/feature-libraries/modular-schema/genericFieldKind.js +2 -2
  671. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  672. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  673. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  674. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  675. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  676. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +0 -2
  677. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  678. package/lib/feature-libraries/modular-schema/isNeverTree.js +0 -2
  679. package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  680. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  681. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  682. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +2 -0
  683. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  684. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +2 -0
  685. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  686. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  687. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  688. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.d.ts.map +1 -1
  689. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js +8 -3
  690. package/lib/feature-libraries/node-identifier/mockNodeIdentifierManager.js.map +1 -1
  691. package/lib/feature-libraries/object-forest/objectForest.d.ts +22 -5
  692. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  693. package/lib/feature-libraries/object-forest/objectForest.js +299 -209
  694. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  695. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  696. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  697. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js +4 -3
  698. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  699. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +2 -2
  700. package/lib/feature-libraries/schema-index/codec.d.ts +6 -12
  701. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  702. package/lib/feature-libraries/schema-index/codec.js +8 -15
  703. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  704. package/lib/feature-libraries/schema-index/formatV1.d.ts +2 -2
  705. package/lib/feature-libraries/schema-index/formatV1.d.ts.map +1 -1
  706. package/lib/feature-libraries/schema-index/formatV1.js +2 -2
  707. package/lib/feature-libraries/schema-index/formatV1.js.map +1 -1
  708. package/lib/feature-libraries/schema-index/index.d.ts +1 -1
  709. package/lib/feature-libraries/schema-index/index.d.ts.map +1 -1
  710. package/lib/feature-libraries/schema-index/index.js +1 -1
  711. package/lib/feature-libraries/schema-index/index.js.map +1 -1
  712. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +1 -1
  713. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  714. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  715. package/lib/feature-libraries/sequence-field/formatV3.d.ts.map +1 -1
  716. package/lib/feature-libraries/sequence-field/formatV3.js.map +1 -1
  717. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  718. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  719. package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  720. package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
  721. package/lib/feature-libraries/sequence-field/rebase.js +1 -1
  722. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  723. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +1 -1
  724. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  725. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  726. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  727. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  728. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +1 -1
  729. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  730. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js +1 -1
  731. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  732. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +2 -2
  733. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  734. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js +1 -1
  735. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  736. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts +1 -1
  737. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.d.ts.map +1 -1
  738. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js +2 -2
  739. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV3.js.map +1 -1
  740. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +1 -1
  741. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  742. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  743. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +1 -1
  744. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  745. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  746. package/lib/feature-libraries/sequence-field/utils.d.ts +7 -5
  747. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  748. package/lib/feature-libraries/sequence-field/utils.js +7 -5
  749. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  750. package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  751. package/lib/feature-libraries/treeCursorUtils.js +3 -3
  752. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  753. package/lib/feature-libraries/treeTextCursor.d.ts +1 -1
  754. package/lib/feature-libraries/treeTextCursor.js +1 -1
  755. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  756. package/lib/feature-libraries/valueUtilities.d.ts.map +1 -1
  757. package/lib/feature-libraries/valueUtilities.js +1 -1
  758. package/lib/feature-libraries/valueUtilities.js.map +1 -1
  759. package/lib/index.d.ts +2 -2
  760. package/lib/index.d.ts.map +1 -1
  761. package/lib/index.js +0 -2
  762. package/lib/index.js.map +1 -1
  763. package/lib/jsonDomainSchema.d.ts.map +1 -1
  764. package/lib/jsonDomainSchema.js.map +1 -1
  765. package/lib/packageVersion.d.ts +1 -1
  766. package/lib/packageVersion.d.ts.map +1 -1
  767. package/lib/packageVersion.js +1 -1
  768. package/lib/packageVersion.js.map +1 -1
  769. package/lib/serializableDomainSchema.d.ts.map +1 -1
  770. package/lib/serializableDomainSchema.js.map +1 -1
  771. package/lib/shared-tree/checkoutFlexTreeView.d.ts.map +1 -1
  772. package/lib/shared-tree/checkoutFlexTreeView.js.map +1 -1
  773. package/lib/shared-tree/independentView.d.ts +1 -1
  774. package/lib/shared-tree/independentView.d.ts.map +1 -1
  775. package/lib/shared-tree/independentView.js +10 -5
  776. package/lib/shared-tree/independentView.js.map +1 -1
  777. package/lib/shared-tree/index.d.ts +1 -1
  778. package/lib/shared-tree/index.d.ts.map +1 -1
  779. package/lib/shared-tree/index.js +1 -1
  780. package/lib/shared-tree/index.js.map +1 -1
  781. package/lib/shared-tree/schematizeTree.d.ts +1 -1
  782. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  783. package/lib/shared-tree/schematizeTree.js.map +1 -1
  784. package/lib/shared-tree/schematizingTreeView.d.ts +1 -1
  785. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  786. package/lib/shared-tree/schematizingTreeView.js +1 -1
  787. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  788. package/lib/shared-tree/sharedTree.d.ts +3 -3
  789. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  790. package/lib/shared-tree/sharedTree.js +10 -10
  791. package/lib/shared-tree/sharedTree.js.map +1 -1
  792. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +1 -1
  793. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  794. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  795. package/lib/shared-tree/tree.js +1 -1
  796. package/lib/shared-tree/tree.js.map +1 -1
  797. package/lib/shared-tree/treeAlpha.d.ts +84 -2
  798. package/lib/shared-tree/treeAlpha.d.ts.map +1 -1
  799. package/lib/shared-tree/treeAlpha.js +65 -12
  800. package/lib/shared-tree/treeAlpha.js.map +1 -1
  801. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  802. package/lib/shared-tree/treeCheckout.js +3 -2
  803. package/lib/shared-tree/treeCheckout.js.map +1 -1
  804. package/lib/shared-tree-core/branch.d.ts +2 -2
  805. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  806. package/lib/shared-tree-core/branch.js +2 -2
  807. package/lib/shared-tree-core/branch.js.map +1 -1
  808. package/lib/shared-tree-core/branchCommitEnricher.d.ts +1 -1
  809. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  810. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  811. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  812. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  813. package/lib/shared-tree-core/editManager.d.ts +3 -1
  814. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  815. package/lib/shared-tree-core/editManager.js +4 -2
  816. package/lib/shared-tree-core/editManager.js.map +1 -1
  817. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  818. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  819. package/lib/shared-tree-core/editManagerSummarizer.d.ts +1 -1
  820. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  821. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  822. package/lib/shared-tree-core/messageCodecs.d.ts +1 -1
  823. package/lib/shared-tree-core/messageCodecs.js +1 -1
  824. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  825. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  826. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  827. package/lib/shared-tree-core/sharedTreeCore.d.ts +2 -2
  828. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  829. package/lib/shared-tree-core/sharedTreeCore.js +4 -4
  830. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  831. package/lib/shared-tree-core/transaction.d.ts.map +1 -1
  832. package/lib/shared-tree-core/transaction.js +1 -1
  833. package/lib/shared-tree-core/transaction.js.map +1 -1
  834. package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  835. package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
  836. package/lib/sharedTreeAttributes.d.ts.map +1 -1
  837. package/lib/sharedTreeAttributes.js.map +1 -1
  838. package/lib/simple-tree/api/conciseTree.d.ts.map +1 -1
  839. package/lib/simple-tree/api/conciseTree.js +1 -1
  840. package/lib/simple-tree/api/conciseTree.js.map +1 -1
  841. package/lib/simple-tree/api/configuration.js +1 -1
  842. package/lib/simple-tree/api/configuration.js.map +1 -1
  843. package/lib/simple-tree/api/create.d.ts +2 -26
  844. package/lib/simple-tree/api/create.d.ts.map +1 -1
  845. package/lib/simple-tree/api/create.js +2 -37
  846. package/lib/simple-tree/api/create.js.map +1 -1
  847. package/lib/simple-tree/api/customTree.d.ts +1 -1
  848. package/lib/simple-tree/api/customTree.d.ts.map +1 -1
  849. package/lib/simple-tree/api/customTree.js +3 -3
  850. package/lib/simple-tree/api/customTree.js.map +1 -1
  851. package/lib/simple-tree/api/getSimpleSchema.d.ts.map +1 -1
  852. package/lib/simple-tree/api/getSimpleSchema.js.map +1 -1
  853. package/lib/simple-tree/api/identifierIndex.js +1 -1
  854. package/lib/simple-tree/api/identifierIndex.js.map +1 -1
  855. package/lib/simple-tree/api/index.d.ts +2 -3
  856. package/lib/simple-tree/api/index.d.ts.map +1 -1
  857. package/lib/simple-tree/api/index.js +2 -5
  858. package/lib/simple-tree/api/index.js.map +1 -1
  859. package/lib/simple-tree/api/schemaCompatibilityTester.d.ts.map +1 -1
  860. package/lib/simple-tree/api/schemaCompatibilityTester.js.map +1 -1
  861. package/lib/simple-tree/api/schemaFactory.d.ts +5 -5
  862. package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
  863. package/lib/simple-tree/api/schemaFactory.js +5 -5
  864. package/lib/simple-tree/api/schemaFactory.js.map +1 -1
  865. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts +1 -3
  866. package/lib/simple-tree/api/schemaFactoryAlpha.d.ts.map +1 -1
  867. package/lib/simple-tree/api/schemaFactoryAlpha.js +1 -3
  868. package/lib/simple-tree/api/schemaFactoryAlpha.js.map +1 -1
  869. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts +2 -2
  870. package/lib/simple-tree/api/schemaFactoryRecursive.d.ts.map +1 -1
  871. package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
  872. package/lib/simple-tree/api/schemaFromSimple.d.ts.map +1 -1
  873. package/lib/simple-tree/api/schemaFromSimple.js.map +1 -1
  874. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts +1 -1
  875. package/lib/simple-tree/api/simpleSchemaToJsonSchema.d.ts.map +1 -1
  876. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js +1 -3
  877. package/lib/simple-tree/api/simpleSchemaToJsonSchema.js.map +1 -1
  878. package/lib/simple-tree/api/storedSchema.d.ts +1 -1
  879. package/lib/simple-tree/api/storedSchema.d.ts.map +1 -1
  880. package/lib/simple-tree/api/storedSchema.js +3 -2
  881. package/lib/simple-tree/api/storedSchema.js.map +1 -1
  882. package/lib/simple-tree/api/tree.d.ts +2 -2
  883. package/lib/simple-tree/api/tree.d.ts.map +1 -1
  884. package/lib/simple-tree/api/tree.js.map +1 -1
  885. package/lib/simple-tree/api/treeBeta.d.ts.map +1 -1
  886. package/lib/simple-tree/api/treeBeta.js +1 -1
  887. package/lib/simple-tree/api/treeBeta.js.map +1 -1
  888. package/lib/simple-tree/api/treeNodeApi.d.ts +38 -3
  889. package/lib/simple-tree/api/treeNodeApi.d.ts.map +1 -1
  890. package/lib/simple-tree/api/treeNodeApi.js +39 -28
  891. package/lib/simple-tree/api/treeNodeApi.js.map +1 -1
  892. package/lib/simple-tree/api/typesUnsafe.d.ts +1 -1
  893. package/lib/simple-tree/api/typesUnsafe.d.ts.map +1 -1
  894. package/lib/simple-tree/api/typesUnsafe.js.map +1 -1
  895. package/lib/simple-tree/api/verboseTree.js +1 -1
  896. package/lib/simple-tree/api/verboseTree.js.map +1 -1
  897. package/lib/simple-tree/api/viewSchemaToSimpleSchema.d.ts.map +1 -1
  898. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js +1 -3
  899. package/lib/simple-tree/api/viewSchemaToSimpleSchema.js.map +1 -1
  900. package/lib/simple-tree/core/context.d.ts.map +1 -1
  901. package/lib/simple-tree/core/context.js.map +1 -1
  902. package/lib/simple-tree/core/getOrCreateNode.d.ts +1 -1
  903. package/lib/simple-tree/core/getOrCreateNode.d.ts.map +1 -1
  904. package/lib/simple-tree/core/getOrCreateNode.js +2 -2
  905. package/lib/simple-tree/core/getOrCreateNode.js.map +1 -1
  906. package/lib/simple-tree/core/treeNode.d.ts.map +1 -1
  907. package/lib/simple-tree/core/treeNode.js +1 -1
  908. package/lib/simple-tree/core/treeNode.js.map +1 -1
  909. package/lib/simple-tree/core/treeNodeKernel.d.ts +8 -20
  910. package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
  911. package/lib/simple-tree/core/treeNodeKernel.js +18 -49
  912. package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
  913. package/lib/simple-tree/core/treeNodeSchema.d.ts.map +1 -1
  914. package/lib/simple-tree/core/treeNodeSchema.js.map +1 -1
  915. package/lib/simple-tree/core/types.d.ts.map +1 -1
  916. package/lib/simple-tree/core/types.js.map +1 -1
  917. package/lib/simple-tree/core/unhydratedFlexTree.d.ts.map +1 -1
  918. package/lib/simple-tree/core/unhydratedFlexTree.js +3 -3
  919. package/lib/simple-tree/core/unhydratedFlexTree.js.map +1 -1
  920. package/lib/simple-tree/core/withType.d.ts +1 -1
  921. package/lib/simple-tree/core/withType.d.ts.map +1 -1
  922. package/lib/simple-tree/core/withType.js.map +1 -1
  923. package/lib/simple-tree/createContext.d.ts.map +1 -1
  924. package/lib/simple-tree/createContext.js.map +1 -1
  925. package/{dist/simple-tree/proxies.d.ts → lib/simple-tree/getTreeNodeForField.d.ts} +1 -1
  926. package/lib/simple-tree/getTreeNodeForField.d.ts.map +1 -0
  927. package/lib/simple-tree/{proxies.js → getTreeNodeForField.js} +1 -1
  928. package/lib/simple-tree/getTreeNodeForField.js.map +1 -0
  929. package/lib/simple-tree/index.d.ts +3 -10
  930. package/lib/simple-tree/index.d.ts.map +1 -1
  931. package/lib/simple-tree/index.js +3 -7
  932. package/lib/simple-tree/index.js.map +1 -1
  933. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  934. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  935. package/lib/simple-tree/{arrayNode.d.ts → node-kinds/array/arrayNode.d.ts} +3 -3
  936. package/lib/simple-tree/node-kinds/array/arrayNode.d.ts.map +1 -0
  937. package/lib/simple-tree/{arrayNode.js → node-kinds/array/arrayNode.js} +10 -10
  938. package/lib/simple-tree/node-kinds/array/arrayNode.js.map +1 -0
  939. package/lib/simple-tree/{arrayNodeTypes.d.ts → node-kinds/array/arrayNodeTypes.d.ts} +3 -3
  940. package/lib/simple-tree/node-kinds/array/arrayNodeTypes.d.ts.map +1 -0
  941. package/lib/simple-tree/{arrayNodeTypes.js → node-kinds/array/arrayNodeTypes.js} +1 -1
  942. package/{dist/simple-tree → lib/simple-tree/node-kinds/array}/arrayNodeTypes.js.map +1 -1
  943. package/lib/simple-tree/node-kinds/array/index.d.ts +7 -0
  944. package/lib/simple-tree/node-kinds/array/index.d.ts.map +1 -0
  945. package/lib/simple-tree/node-kinds/array/index.js +7 -0
  946. package/lib/simple-tree/node-kinds/array/index.js.map +1 -0
  947. package/lib/simple-tree/node-kinds/index.d.ts +8 -0
  948. package/lib/simple-tree/node-kinds/index.d.ts.map +1 -0
  949. package/lib/simple-tree/node-kinds/index.js +8 -0
  950. package/lib/simple-tree/node-kinds/index.js.map +1 -0
  951. package/lib/simple-tree/node-kinds/map/index.d.ts +7 -0
  952. package/lib/simple-tree/node-kinds/map/index.d.ts.map +1 -0
  953. package/lib/simple-tree/node-kinds/map/index.js +7 -0
  954. package/lib/simple-tree/node-kinds/map/index.js.map +1 -0
  955. package/{dist/simple-tree → lib/simple-tree/node-kinds/map}/mapNode.d.ts +3 -3
  956. package/lib/simple-tree/node-kinds/map/mapNode.d.ts.map +1 -0
  957. package/lib/simple-tree/{mapNode.js → node-kinds/map/mapNode.js} +8 -8
  958. package/lib/simple-tree/node-kinds/map/mapNode.js.map +1 -0
  959. package/lib/simple-tree/{mapNodeTypes.d.ts → node-kinds/map/mapNodeTypes.d.ts} +3 -3
  960. package/lib/simple-tree/node-kinds/map/mapNodeTypes.d.ts.map +1 -0
  961. package/lib/simple-tree/{mapNodeTypes.js → node-kinds/map/mapNodeTypes.js} +1 -1
  962. package/lib/simple-tree/node-kinds/map/mapNodeTypes.js.map +1 -0
  963. package/lib/simple-tree/node-kinds/object/index.d.ts +7 -0
  964. package/lib/simple-tree/node-kinds/object/index.d.ts.map +1 -0
  965. package/lib/simple-tree/node-kinds/object/index.js +7 -0
  966. package/lib/simple-tree/node-kinds/object/index.js.map +1 -0
  967. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNode.d.ts +17 -6
  968. package/lib/simple-tree/node-kinds/object/objectNode.d.ts.map +1 -0
  969. package/lib/simple-tree/{objectNode.js → node-kinds/object/objectNode.js} +35 -13
  970. package/lib/simple-tree/node-kinds/object/objectNode.js.map +1 -0
  971. package/{dist/simple-tree → lib/simple-tree/node-kinds/object}/objectNodeTypes.d.ts +5 -5
  972. package/lib/simple-tree/node-kinds/object/objectNodeTypes.d.ts.map +1 -0
  973. package/lib/simple-tree/{objectNodeTypes.js → node-kinds/object/objectNodeTypes.js} +1 -1
  974. package/lib/simple-tree/node-kinds/object/objectNodeTypes.js.map +1 -0
  975. package/lib/simple-tree/prepareForInsertion.d.ts +18 -6
  976. package/lib/simple-tree/prepareForInsertion.d.ts.map +1 -1
  977. package/lib/simple-tree/prepareForInsertion.js +51 -22
  978. package/lib/simple-tree/prepareForInsertion.js.map +1 -1
  979. package/lib/simple-tree/schemaTypes.d.ts +2 -2
  980. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  981. package/lib/simple-tree/schemaTypes.js.map +1 -1
  982. package/lib/simple-tree/simpleSchema.d.ts.map +1 -1
  983. package/lib/simple-tree/simpleSchema.js.map +1 -1
  984. package/lib/simple-tree/toMapTree.d.ts +2 -22
  985. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  986. package/lib/simple-tree/toMapTree.js +44 -22
  987. package/lib/simple-tree/toMapTree.js.map +1 -1
  988. package/lib/simple-tree/toStoredSchema.d.ts.map +1 -1
  989. package/lib/simple-tree/toStoredSchema.js +1 -1
  990. package/lib/simple-tree/toStoredSchema.js.map +1 -1
  991. package/lib/simple-tree/treeNodeValid.d.ts +1 -1
  992. package/lib/simple-tree/treeNodeValid.d.ts.map +1 -1
  993. package/lib/simple-tree/treeNodeValid.js +2 -2
  994. package/lib/simple-tree/treeNodeValid.js.map +1 -1
  995. package/lib/simple-tree/walkFieldSchema.d.ts.map +1 -1
  996. package/lib/simple-tree/walkFieldSchema.js.map +1 -1
  997. package/lib/tableSchema.d.ts +119 -72
  998. package/lib/tableSchema.d.ts.map +1 -1
  999. package/lib/tableSchema.js +83 -36
  1000. package/lib/tableSchema.js.map +1 -1
  1001. package/lib/treeFactory.d.ts +1 -1
  1002. package/lib/treeFactory.d.ts.map +1 -1
  1003. package/lib/treeFactory.js +3 -3
  1004. package/lib/treeFactory.js.map +1 -1
  1005. package/lib/util/bTreeUtils.d.ts.map +1 -1
  1006. package/lib/util/bTreeUtils.js.map +1 -1
  1007. package/lib/util/breakable.d.ts +23 -4
  1008. package/lib/util/breakable.d.ts.map +1 -1
  1009. package/lib/util/breakable.js +12 -3
  1010. package/lib/util/breakable.js.map +1 -1
  1011. package/package.json +21 -21
  1012. package/src/codec/codec.ts +64 -8
  1013. package/src/core/change-family/editBuilder.ts +1 -0
  1014. package/src/core/forest/forest.ts +1 -1
  1015. package/src/core/index.ts +1 -0
  1016. package/src/core/rebase/types.ts +2 -2
  1017. package/src/core/rebase/utils.ts +10 -10
  1018. package/src/core/schema-stored/formatV1.ts +0 -2
  1019. package/src/core/schema-stored/index.ts +1 -0
  1020. package/src/core/schema-stored/schema.ts +9 -0
  1021. package/src/core/schema-stored/storedSchemaRepository.ts +2 -2
  1022. package/src/core/tree/anchorSet.ts +6 -5
  1023. package/src/core/tree/chunk.ts +2 -1
  1024. package/src/core/tree/delta.ts +1 -0
  1025. package/src/core/tree/deltaUtil.ts +1 -1
  1026. package/src/core/tree/detachedFieldIndex.ts +1 -1
  1027. package/src/core/tree/detachedFieldIndexCodec.ts +2 -2
  1028. package/src/core/tree/pathTree.ts +13 -12
  1029. package/src/core/tree/treeTextFormat.ts +2 -1
  1030. package/src/core/tree/visitDelta.ts +1 -1
  1031. package/src/core/tree/visitorUtils.ts +3 -2
  1032. package/src/feature-libraries/chunked-forest/chunkTree.ts +2 -2
  1033. package/src/feature-libraries/chunked-forest/chunkedForest.ts +4 -4
  1034. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +5 -5
  1035. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +2 -2
  1036. package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +1 -0
  1037. package/src/feature-libraries/chunked-forest/codec/codecs.ts +15 -1
  1038. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +1 -1
  1039. package/src/feature-libraries/chunked-forest/codec/index.ts +1 -0
  1040. package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +1 -1
  1041. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncode.ts +1 -1
  1042. package/src/feature-libraries/chunked-forest/emptyChunk.ts +1 -0
  1043. package/src/feature-libraries/chunked-forest/index.ts +1 -0
  1044. package/src/feature-libraries/chunked-forest/sequenceChunk.ts +1 -1
  1045. package/src/feature-libraries/chunked-forest/uniformChunk.ts +2 -3
  1046. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +2 -2
  1047. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +1 -0
  1048. package/src/feature-libraries/default-schema/index.ts +6 -1
  1049. package/src/feature-libraries/default-schema/mappedEditBuilder.ts +1 -0
  1050. package/src/feature-libraries/default-schema/schemaChecker.ts +74 -48
  1051. package/src/feature-libraries/flex-tree/context.ts +29 -8
  1052. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +3 -2
  1053. package/src/feature-libraries/flex-tree/lazyField.ts +1 -1
  1054. package/src/feature-libraries/flex-tree/utilities.ts +1 -1
  1055. package/src/feature-libraries/forest-summary/forestSummarizer.ts +1 -1
  1056. package/src/feature-libraries/index.ts +3 -2
  1057. package/src/feature-libraries/indexing/anchorTreeIndex.ts +4 -2
  1058. package/src/feature-libraries/initializeForest.ts +1 -1
  1059. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +1 -0
  1060. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +1 -1
  1061. package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +1 -1
  1062. package/src/feature-libraries/modular-schema/genericFieldKind.ts +4 -2
  1063. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +1 -0
  1064. package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +1 -0
  1065. package/src/feature-libraries/modular-schema/isNeverTree.ts +0 -2
  1066. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +1 -1
  1067. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +2 -0
  1068. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +1 -0
  1069. package/src/feature-libraries/node-identifier/mockNodeIdentifierManager.ts +11 -5
  1070. package/src/feature-libraries/object-forest/objectForest.ts +65 -7
  1071. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +5 -8
  1072. package/src/feature-libraries/schema-index/codec.ts +13 -21
  1073. package/src/feature-libraries/schema-index/formatV1.ts +2 -2
  1074. package/src/feature-libraries/schema-index/index.ts +0 -1
  1075. package/src/feature-libraries/schema-index/schemaSummarizer.ts +1 -1
  1076. package/src/feature-libraries/sequence-field/formatV3.ts +1 -0
  1077. package/src/feature-libraries/sequence-field/markQueue.ts +1 -0
  1078. package/src/feature-libraries/sequence-field/prune.ts +1 -0
  1079. package/src/feature-libraries/sequence-field/rebase.ts +1 -1
  1080. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +1 -1
  1081. package/src/feature-libraries/sequence-field/replaceRevisions.ts +3 -1
  1082. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +2 -2
  1083. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +3 -3
  1084. package/src/feature-libraries/sequence-field/sequenceFieldCodecV3.ts +3 -3
  1085. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +2 -2
  1086. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +1 -1
  1087. package/src/feature-libraries/sequence-field/utils.ts +7 -5
  1088. package/src/feature-libraries/treeCursorUtils.ts +3 -3
  1089. package/src/feature-libraries/treeTextCursor.ts +1 -1
  1090. package/src/feature-libraries/valueUtilities.ts +1 -1
  1091. package/src/index.ts +1 -4
  1092. package/src/jsonDomainSchema.ts +0 -1
  1093. package/src/packageVersion.ts +1 -1
  1094. package/src/serializableDomainSchema.ts +1 -0
  1095. package/src/shared-tree/checkoutFlexTreeView.ts +1 -0
  1096. package/src/shared-tree/independentView.ts +10 -3
  1097. package/src/shared-tree/index.ts +4 -1
  1098. package/src/shared-tree/schematizeTree.ts +2 -1
  1099. package/src/shared-tree/schematizingTreeView.ts +2 -2
  1100. package/src/shared-tree/sharedTree.ts +26 -19
  1101. package/src/shared-tree/sharedTreeChangeFamily.ts +1 -1
  1102. package/src/shared-tree/tree.ts +1 -1
  1103. package/src/shared-tree/treeAlpha.ts +171 -26
  1104. package/src/shared-tree/treeCheckout.ts +3 -2
  1105. package/src/shared-tree-core/branch.ts +3 -4
  1106. package/src/shared-tree-core/branchCommitEnricher.ts +3 -1
  1107. package/src/shared-tree-core/defaultResubmitMachine.ts +2 -0
  1108. package/src/shared-tree-core/editManager.ts +4 -2
  1109. package/src/shared-tree-core/editManagerCodecs.ts +1 -0
  1110. package/src/shared-tree-core/editManagerSummarizer.ts +1 -1
  1111. package/src/shared-tree-core/messageCodecs.ts +1 -1
  1112. package/src/shared-tree-core/sequenceIdUtils.ts +1 -0
  1113. package/src/shared-tree-core/sharedTreeCore.ts +5 -5
  1114. package/src/shared-tree-core/transaction.ts +4 -2
  1115. package/src/shared-tree-core/transactionEnricher.ts +2 -0
  1116. package/src/sharedTreeAttributes.ts +1 -0
  1117. package/src/simple-tree/api/conciseTree.ts +3 -2
  1118. package/src/simple-tree/api/configuration.ts +1 -1
  1119. package/src/simple-tree/api/create.ts +4 -80
  1120. package/src/simple-tree/api/customTree.ts +4 -4
  1121. package/src/simple-tree/api/getSimpleSchema.ts +1 -0
  1122. package/src/simple-tree/api/identifierIndex.ts +1 -1
  1123. package/src/simple-tree/api/index.ts +8 -11
  1124. package/src/simple-tree/api/schemaCompatibilityTester.ts +2 -0
  1125. package/src/simple-tree/api/schemaFactory.ts +28 -23
  1126. package/src/simple-tree/api/schemaFactoryAlpha.ts +8 -6
  1127. package/src/simple-tree/api/schemaFactoryRecursive.ts +3 -3
  1128. package/src/simple-tree/api/schemaFromSimple.ts +3 -1
  1129. package/src/simple-tree/api/simpleSchemaToJsonSchema.ts +1 -3
  1130. package/src/simple-tree/api/storedSchema.ts +5 -4
  1131. package/src/simple-tree/api/tree.ts +3 -4
  1132. package/src/simple-tree/api/treeBeta.ts +3 -2
  1133. package/src/simple-tree/api/treeNodeApi.ts +91 -42
  1134. package/src/simple-tree/api/typesUnsafe.ts +1 -1
  1135. package/src/simple-tree/api/verboseTree.ts +1 -1
  1136. package/src/simple-tree/api/viewSchemaToSimpleSchema.ts +1 -3
  1137. package/src/simple-tree/core/context.ts +1 -0
  1138. package/src/simple-tree/core/getOrCreateNode.ts +4 -3
  1139. package/src/simple-tree/core/treeNode.ts +1 -1
  1140. package/src/simple-tree/core/treeNodeKernel.ts +32 -61
  1141. package/src/simple-tree/core/treeNodeSchema.ts +1 -0
  1142. package/src/simple-tree/core/types.ts +1 -1
  1143. package/src/simple-tree/core/unhydratedFlexTree.ts +4 -3
  1144. package/src/simple-tree/core/withType.ts +1 -1
  1145. package/src/simple-tree/createContext.ts +1 -0
  1146. package/src/simple-tree/{proxies.ts → getTreeNodeForField.ts} +2 -0
  1147. package/src/simple-tree/index.ts +17 -22
  1148. package/src/simple-tree/leafNodeSchema.ts +1 -0
  1149. package/src/simple-tree/{arrayNode.ts → node-kinds/array/arrayNode.ts} +11 -11
  1150. package/src/simple-tree/{arrayNodeTypes.ts → node-kinds/array/arrayNodeTypes.ts} +3 -3
  1151. package/src/simple-tree/node-kinds/array/index.ts +18 -0
  1152. package/src/simple-tree/node-kinds/index.ts +40 -0
  1153. package/src/simple-tree/node-kinds/map/index.ts +16 -0
  1154. package/src/simple-tree/{mapNode.ts → node-kinds/map/mapNode.ts} +10 -10
  1155. package/src/simple-tree/{mapNodeTypes.ts → node-kinds/map/mapNodeTypes.ts} +3 -3
  1156. package/src/simple-tree/node-kinds/object/index.ts +17 -0
  1157. package/src/simple-tree/{objectNode.ts → node-kinds/object/objectNode.ts} +63 -34
  1158. package/src/simple-tree/{objectNodeTypes.ts → node-kinds/object/objectNodeTypes.ts} +5 -5
  1159. package/src/simple-tree/prepareForInsertion.ts +68 -28
  1160. package/src/simple-tree/schemaTypes.ts +4 -3
  1161. package/src/simple-tree/simpleSchema.ts +1 -0
  1162. package/src/simple-tree/toMapTree.ts +13 -56
  1163. package/src/simple-tree/toStoredSchema.ts +3 -2
  1164. package/src/simple-tree/treeNodeValid.ts +3 -3
  1165. package/src/simple-tree/walkFieldSchema.ts +0 -1
  1166. package/src/tableSchema.ts +109 -62
  1167. package/src/treeFactory.ts +3 -5
  1168. package/src/util/bTreeUtils.ts +1 -0
  1169. package/src/util/breakable.ts +19 -4
  1170. package/dist/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  1171. package/dist/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  1172. package/dist/simple-tree/api/testRecursiveDomain.js +0 -45
  1173. package/dist/simple-tree/api/testRecursiveDomain.js.map +0 -1
  1174. package/dist/simple-tree/arrayNode.d.ts.map +0 -1
  1175. package/dist/simple-tree/arrayNode.js.map +0 -1
  1176. package/dist/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  1177. package/dist/simple-tree/mapNode.d.ts.map +0 -1
  1178. package/dist/simple-tree/mapNode.js.map +0 -1
  1179. package/dist/simple-tree/mapNodeTypes.d.ts.map +0 -1
  1180. package/dist/simple-tree/mapNodeTypes.js.map +0 -1
  1181. package/dist/simple-tree/objectNode.d.ts.map +0 -1
  1182. package/dist/simple-tree/objectNode.js.map +0 -1
  1183. package/dist/simple-tree/objectNodeTypes.d.ts.map +0 -1
  1184. package/dist/simple-tree/objectNodeTypes.js.map +0 -1
  1185. package/dist/simple-tree/proxies.d.ts.map +0 -1
  1186. package/dist/simple-tree/proxies.js.map +0 -1
  1187. package/lib/simple-tree/api/testRecursiveDomain.d.ts +0 -62
  1188. package/lib/simple-tree/api/testRecursiveDomain.d.ts.map +0 -1
  1189. package/lib/simple-tree/api/testRecursiveDomain.js +0 -41
  1190. package/lib/simple-tree/api/testRecursiveDomain.js.map +0 -1
  1191. package/lib/simple-tree/arrayNode.d.ts.map +0 -1
  1192. package/lib/simple-tree/arrayNode.js.map +0 -1
  1193. package/lib/simple-tree/arrayNodeTypes.d.ts.map +0 -1
  1194. package/lib/simple-tree/arrayNodeTypes.js.map +0 -1
  1195. package/lib/simple-tree/mapNode.d.ts.map +0 -1
  1196. package/lib/simple-tree/mapNode.js.map +0 -1
  1197. package/lib/simple-tree/mapNodeTypes.d.ts.map +0 -1
  1198. package/lib/simple-tree/mapNodeTypes.js.map +0 -1
  1199. package/lib/simple-tree/objectNode.d.ts.map +0 -1
  1200. package/lib/simple-tree/objectNode.js.map +0 -1
  1201. package/lib/simple-tree/objectNodeTypes.d.ts.map +0 -1
  1202. package/lib/simple-tree/objectNodeTypes.js.map +0 -1
  1203. package/lib/simple-tree/proxies.d.ts.map +0 -1
  1204. package/lib/simple-tree/proxies.js.map +0 -1
  1205. package/src/simple-tree/api/testRecursiveDomain.ts +0 -53
@@ -1 +1 @@
1
- {"version":3,"file":"objectForest.js","sourceRoot":"","sources":["../../../src/feature-libraries/object-forest/objectForest.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;;;;;;;;;;;;;AAEH,kEAAmE;AACnE,+DAA6D;AAG7D,kDA8B6B;AAC7B,kDAK6B;AAC7B,0DAA8E;AAC9E,8DAA+E;AAC/E,yDAAkF;AAOlF,kGAAkG;AAClG,SAAS,gBAAgB,CAAC,OAAuB,EAAE,GAAa;IAC/D,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACtC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACd,CAAC;IAED,MAAM,QAAQ,GAAqB,EAAE,CAAC;IACtC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAClC,OAAO,QAAQ,CAAC;AACjB,CAAC;AAED;;;;;GAKG;AACH,MAAa,YAAY;IAWxB,IAAW,KAAK;QACf,OAAO,uBAAA,IAAI,2BAAO,CAAC;IACpB,CAAC;IAED,YACiB,UAAqB,IAAI,oBAAS,EAAE,EACpC,oBAA6B,KAAK,EAClD,KAAe;QAFC,YAAO,GAAP,OAAO,CAA6B;QACpC,sBAAiB,GAAjB,iBAAiB,CAAiB;QAdnD,2EAA2E;QAC3D,mBAAc,GAAgB,IAAI,GAAG,EAAE,CAAC;QACvC,kBAAa,GAAgC,IAAI,GAAG,EAAE,CAAC;QAE/D,+BAAU,IAAA,4BAAa,GAAgB,EAAC;QACjC,WAAM,GAA6B,uBAAA,IAAI,4BAAQ,CAAC;QAEvD,sCAAuB;QAyLxB,cAAS,GAAG,CAAC,CAAC;QA/KrB,uBAAA,IAAI,uBACH,KAAK,KAAK,SAAS;YAClB,CAAC,CAAC,IAAA,0BAAe,EAAC,KAAK,CAAC;YACxB,CA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AAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACjC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC;IAEM,IAAI,CAAC,MAAe;QAC1B,IAAA,iBAAM,EAAC,IAAI,CAAC,WAAW,KAAK,SAAS,EAAE,KAAK,CAAC,uCAAuC,CAAC,CAAC;QACtF,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,SAAS,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;IAC3F,CAAC;IAEM,IAAI;QACV,IAAA,iBAAM,EACL,IAAI,CAAC,KAAK,KAAK,uCAA4B,CAAC,KAAK,EACjD,KAAK,CAAC,qCAAqC,CAC3C,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,KAAK,GAAG,uCAA4B,CAAC,KAAK,CAAC;IACjD,CAAC;IAEM,WAAW;QACjB,IAAA,iBAAM,EACL,IAAI,CAAC,KAAK,KAAK,uCAA4B,CAAC,OAAO,EACnD,KAAK,CAAC,uCAAuC,CAC7C,CAAC;QACF,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAClD,CAAC;CACD;AAED,qGAAqG;AACrG,sEAAsE;AACtE,yFAAyF;AACzF;;GAEG;AACH,SAAgB,WAAW,CAC1B,OAAmB,EACnB,oBAA6B,KAAK;IAElC,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,iBAAiB,CAAC,CAAC;AACrD,CAAC;AALD,kCAKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type { Listenable } from \"@fluidframework/core-interfaces\";\n\nimport {\n\ttype Anchor,\n\tAnchorSet,\n\ttype AnnouncedVisitor,\n\ttype CursorLocationType,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaVisitor,\n\ttype DetachedField,\n\ttype FieldAnchor,\n\ttype FieldKey,\n\ttype FieldUpPath,\n\ttype ForestEvents,\n\ttype IEditableForest,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype MapTree,\n\ttype PathRootPrefix,\n\ttype PlaceIndex,\n\ttype Range,\n\ttype TreeChunk,\n\tTreeNavigationResult,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeStoredSchemaSubscription,\n\ttype UpPath,\n\ttype Value,\n\taboveRootPlaceholder,\n\tcombineVisitors,\n\tdeepCopyMapTree,\n} from \"../../core/index.js\";\nimport {\n\tassertNonNegativeSafeInteger,\n\tassertValidIndex,\n\tassertValidRange,\n\tbrand,\n} from \"../../util/index.js\";\nimport { cursorForMapTreeNode, mapTreeFromCursor } from \"../mapTreeCursor.js\";\nimport { type CursorWithNode, SynchronousCursor } from \"../treeCursorUtils.js\";\nimport { chunkFieldSingle, defaultChunkPolicy } from \"../chunked-forest/index.js\";\n\n/** A `MapTree` with mutable fields */\ninterface MutableMapTree extends MapTree {\n\treadonly fields: Map<FieldKey, MutableMapTree[]>;\n}\n\n/** Get a field from a `MutableMapTree`, optionally modifying the tree to create it if missing. */\nfunction getOrCreateField(mapTree: MutableMapTree, key: FieldKey): MutableMapTree[] {\n\tconst field = mapTree.fields.get(key);\n\tif (field !== undefined) {\n\t\treturn field;\n\t}\n\n\tconst newField: MutableMapTree[] = [];\n\tmapTree.fields.set(key, newField);\n\treturn newField;\n}\n\n/**\n * Reference implementation of IEditableForest.\n *\n * This implementation focuses on correctness and simplicity, not performance.\n * It does not use compressed chunks: instead nodes are implemented using objects.\n */\nexport class ObjectForest implements IEditableForest {\n\tprivate activeVisitor?: DeltaVisitor;\n\n\t// All cursors that are in the \"Current\" state. Must be empty when editing.\n\tpublic readonly currentCursors: Set<Cursor> = new Set();\n\tprivate readonly deltaVisitors: Set<() => AnnouncedVisitor> = new Set();\n\n\treadonly #events = createEmitter<ForestEvents>();\n\tpublic readonly events: Listenable<ForestEvents> = this.#events;\n\n\treadonly #roots: MutableMapTree;\n\tpublic get roots(): MapTree {\n\t\treturn this.#roots;\n\t}\n\n\tpublic constructor(\n\t\tpublic readonly anchors: AnchorSet = new AnchorSet(),\n\t\tpublic readonly additionalAsserts: boolean = false,\n\t\troots?: MapTree,\n\t) {\n\t\tthis.#roots =\n\t\t\troots !== undefined\n\t\t\t\t? deepCopyMapTree(roots)\n\t\t\t\t: {\n\t\t\t\t\t\ttype: aboveRootPlaceholder,\n\t\t\t\t\t\tfields: new Map(),\n\t\t\t\t\t};\n\t}\n\n\tpublic get isEmpty(): boolean {\n\t\treturn this.roots.fields.size === 0;\n\t}\n\n\tpublic clone(_: TreeStoredSchemaSubscription, anchors: AnchorSet): ObjectForest {\n\t\treturn new ObjectForest(anchors, this.additionalAsserts, this.roots);\n\t}\n\n\tpublic chunkField(cursor: ITreeCursorSynchronous): TreeChunk {\n\t\treturn chunkFieldSingle(cursor, { idCompressor: undefined, policy: defaultChunkPolicy });\n\t}\n\n\tpublic forgetAnchor(anchor: Anchor): void {\n\t\tthis.anchors.forget(anchor);\n\t}\n\n\tpublic acquireVisitor(): DeltaVisitor {\n\t\tassert(\n\t\t\tthis.activeVisitor === undefined,\n\t\t\t0x76c /* Must release existing visitor before acquiring another */,\n\t\t);\n\n\t\t// Note: This code uses cursors, however it also modifies the tree.\n\t\t// In general this is not safe, but this code happens to only modify the tree below the current cursor location,\n\t\t// which happens to work.\n\t\t// This pattern could be generalized/formalized with a concept of an exclusive cursor,\n\t\t// which can edit, but is the only cursor allowed at the time.\n\n\t\tconst cursor: Cursor = this.allocateCursor(\"acquireVisitor\");\n\t\tcursor.setToAboveDetachedSequences();\n\n\t\t/**\n\t\t * Called before each edit to allow cursor cleanup to happen and ensure that there are no unexpected cursors.\n\t\t * This is required for each change since there may be app facing change event handlers which create cursors.\n\t\t */\n\t\tconst preEdit = (): void => {\n\t\t\tthis.#events.emit(\"beforeChange\");\n\t\t\tassert(\n\t\t\t\tthis.currentCursors.has(cursor),\n\t\t\t\t0x995 /* missing visitor cursor while editing */,\n\t\t\t);\n\t\t\tif (this.currentCursors.size > 1) {\n\t\t\t\tconst unexpectedSources = [...this.currentCursors].flatMap((c) =>\n\t\t\t\t\tc === cursor ? [] : (c.source ?? null),\n\t\t\t\t);\n\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Found unexpected cursors when editing with the following annotations: ${JSON.stringify(\n\t\t\t\t\t\tunexpectedSources,\n\t\t\t\t\t)}`,\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tclass Visitor implements DeltaVisitor {\n\t\t\tpublic constructor(private readonly forest: ObjectForest) {}\n\t\t\tpublic free(): void {\n\t\t\t\tcursor.free();\n\t\t\t\tassert(\n\t\t\t\t\tthis.forest.activeVisitor !== undefined,\n\t\t\t\t\t0x76d /* Multiple free calls for same visitor */,\n\t\t\t\t);\n\t\t\t\tthis.forest.activeVisitor = undefined;\n\t\t\t}\n\t\t\tpublic destroy(detachedField: FieldKey, count: number): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.forest.delete(detachedField);\n\t\t\t}\n\t\t\tpublic create(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.forest.add(content, destination);\n\t\t\t\tthis.forest.#events.emit(\"afterRootFieldCreated\", destination);\n\t\t\t}\n\t\t\tpublic attach(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.attachEdit(source, count, destination);\n\t\t\t}\n\t\t\tpublic detach(source: Range, destination: FieldKey, id: DeltaDetachedNodeId): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.detachEdit(source, destination);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Attaches the nodes from the given source field into the current field.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The the range to be attached.\n\t\t\t * @param count - The number of nodes being attached.\n\t\t\t * Expected to match the number of nodes in the source detached field.\n\t\t\t * @param destination - The index in the current field at which to attach the content.\n\t\t\t */\n\t\t\tprivate attachEdit(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tassertNonNegativeSafeInteger(count);\n\t\t\t\tif (count === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst [parent, key] = cursor.getParent();\n\t\t\t\tassert(\n\t\t\t\t\tparent !== this.forest.roots || key !== source,\n\t\t\t\t\t0x7b6 /* Attach source field must be different from current field */,\n\t\t\t\t);\n\t\t\t\tconst currentField = getOrCreateField(parent, key);\n\t\t\t\tassertValidIndex(destination, currentField, true);\n\t\t\t\tconst sourceField = this.forest.#roots.fields.get(source) ?? [];\n\t\t\t\tassert(sourceField !== undefined, 0x7b7 /* Attach source field must exist */);\n\t\t\t\tassert(\n\t\t\t\t\tsourceField.length === count,\n\t\t\t\t\t0x7b8 /* Attach must consume all nodes in source field */,\n\t\t\t\t);\n\t\t\t\t// TODO: this will fail for very large insertions due to argument limits.\n\t\t\t\tcurrentField.splice(destination, 0, ...sourceField);\n\t\t\t\tthis.forest.delete(source);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Detaches the range from the current field and transfers it to the given destination if any.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The bounds of the range to be detached from the current field.\n\t\t\t * @param destination - If specified, the destination to transfer the detached range to.\n\t\t\t * If not specified, the detached range is destroyed.\n\t\t\t */\n\t\t\tprivate detachEdit(source: Range, destination: FieldKey | undefined): void {\n\t\t\t\tconst [parent, key] = cursor.getParent();\n\t\t\t\tassert(\n\t\t\t\t\tdestination === undefined || parent !== this.forest.roots || key !== destination,\n\t\t\t\t\t0x7b9 /* Detach destination field must be different from current field */,\n\t\t\t\t);\n\t\t\t\tconst currentField = getOrCreateField(parent, key);\n\t\t\t\tassertValidRange(source, currentField);\n\t\t\t\tconst content = currentField.splice(source.start, source.end - source.start);\n\t\t\t\tif (destination !== undefined) {\n\t\t\t\t\tthis.forest.addFieldAsDetached(content, destination);\n\t\t\t\t}\n\t\t\t\t// This check is performed after the transfer to ensure that the field is not removed in scenarios\n\t\t\t\t// where the source and destination are the same.\n\t\t\t\tif (currentField.length === 0) {\n\t\t\t\t\tparent.fields.delete(key);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic enterNode(index: number): void {\n\t\t\t\tcursor.enterNode(index);\n\t\t\t}\n\t\t\tpublic exitNode(index: number): void {\n\t\t\t\tcursor.exitNode();\n\t\t\t}\n\t\t\tpublic enterField(key: FieldKey): void {\n\t\t\t\tcursor.enterField(key);\n\t\t\t}\n\t\t\tpublic exitField(key: FieldKey): void {\n\t\t\t\tcursor.exitField();\n\t\t\t}\n\t\t}\n\n\t\tconst forestVisitor = new Visitor(this);\n\t\tconst announcedVisitors: AnnouncedVisitor[] = [];\n\t\tthis.deltaVisitors.forEach((getVisitor) => announcedVisitors.push(getVisitor()));\n\t\tconst combinedVisitor = combineVisitors([forestVisitor, ...announcedVisitors]);\n\t\tthis.activeVisitor = combinedVisitor;\n\t\treturn combinedVisitor;\n\t}\n\n\tpublic registerAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.add(visitor);\n\t}\n\n\tpublic deregisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.delete(visitor);\n\t}\n\n\tprivate nextRange = 0;\n\tpublic newDetachedField(): DetachedField {\n\t\tconst range: DetachedField = brand(String(this.nextRange));\n\t\tthis.nextRange += 1;\n\t\treturn range;\n\t}\n\n\tprivate add(nodes: Iterable<ITreeCursor>, key: FieldKey): void {\n\t\tconst field = Array.from(nodes, mapTreeFromCursor) as MutableMapTree[];\n\t\tthis.addFieldAsDetached(field, key);\n\t}\n\n\tprivate addFieldAsDetached(field: MutableMapTree[], key: FieldKey): void {\n\t\tassert(!this.roots.fields.has(key), 0x370 /* new range must not already exist */);\n\t\tif (field.length > 0) {\n\t\t\tthis.#roots.fields.set(key, field);\n\t\t}\n\t}\n\n\tprivate delete(field: FieldKey): void {\n\t\tthis.#roots.fields.delete(field);\n\t}\n\n\tpublic allocateCursor(source?: string): Cursor {\n\t\treturn new Cursor(this, source);\n\t}\n\n\tpublic tryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tconst path = this.anchors.locate(destination);\n\t\tif (path === undefined) {\n\t\t\treturn TreeNavigationResult.NotFound;\n\t\t}\n\t\tthis.moveCursorToPath(path, cursorToMove);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic tryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tif (destination.parent === undefined) {\n\t\t\tthis.moveCursorToPath(undefined, cursorToMove);\n\t\t} else {\n\t\t\tconst result = this.tryMoveCursorToNode(destination.parent, cursorToMove);\n\t\t\tif (result !== TreeNavigationResult.Ok) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tcursorToMove.enterField(destination.fieldKey);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic moveCursorToPath(\n\t\tdestination: UpPath | undefined,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): void {\n\t\tassert(\n\t\t\tcursorToMove instanceof Cursor,\n\t\t\t0x337 /* ObjectForest must only be given its own Cursor type */,\n\t\t);\n\t\tassert(\n\t\t\tcursorToMove.forest === this,\n\t\t\t0x338 /* ObjectForest must only be given its own Cursor */,\n\t\t);\n\n\t\tconst indexStack: number[] = [];\n\t\tconst keyStack: FieldKey[] = [];\n\n\t\tlet path: UpPath | undefined = destination;\n\t\twhile (path !== undefined) {\n\t\t\tindexStack.push(path.parentIndex);\n\t\t\tkeyStack.push(path.parentField);\n\t\t\tpath = path.parent;\n\t\t}\n\t\tcursorToMove.setToAboveDetachedSequences();\n\t\twhile (keyStack.length > 0) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tcursorToMove.enterField(keyStack.pop()!);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tcursorToMove.enterNode(indexStack.pop()!);\n\t\t}\n\n\t\treturn;\n\t}\n\n\tpublic getCursorAboveDetachedFields(): ITreeCursorSynchronous {\n\t\treturn cursorForMapTreeNode(this.roots);\n\t}\n}\n\n/**\n * Cursor implementation for ObjectForest.\n */\nclass Cursor extends SynchronousCursor implements ITreeSubscriptionCursor {\n\tpublic state: ITreeSubscriptionCursorState;\n\n\t/**\n\t * @param forest - forest this cursor navigates\n\t * @param innerCursor - underlying cursor implementation this wraps. `undefined` when state is not `Current`\n\t */\n\tpublic constructor(\n\t\tpublic readonly forest: ObjectForest,\n\t\tpublic readonly source: string | undefined,\n\t\tprivate innerCursor?: CursorWithNode<MutableMapTree>,\n\t) {\n\t\tsuper();\n\t\tif (innerCursor === undefined) {\n\t\t\tthis.state = ITreeSubscriptionCursorState.Cleared;\n\t\t} else {\n\t\t\tthis.state = ITreeSubscriptionCursorState.Current;\n\t\t\tthis.forest.currentCursors.add(this);\n\t\t}\n\t}\n\n\tpublic buildFieldAnchor(): FieldAnchor {\n\t\tconst path = this.getFieldPath();\n\t\tconst anchor =\n\t\t\tpath.parent === undefined ? undefined : this.forest.anchors.track(path.parent);\n\t\treturn { parent: anchor, fieldKey: path.field };\n\t}\n\tpublic getFieldPath(prefix?: PathRootPrefix): FieldUpPath {\n\t\tassert(this.innerCursor !== undefined, 0x45f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldPath(prefix);\n\t}\n\tpublic get mode(): CursorLocationType {\n\t\tassert(this.innerCursor !== undefined, 0x42e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.mode;\n\t}\n\n\tpublic nextField(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x42f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.nextField();\n\t}\n\tpublic exitField(): void {\n\t\tassert(this.innerCursor !== undefined, 0x430 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.exitField();\n\t}\n\tpublic override skipPendingFields(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x431 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.skipPendingFields();\n\t}\n\tpublic getFieldKey(): FieldKey {\n\t\tassert(this.innerCursor !== undefined, 0x432 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldKey();\n\t}\n\tpublic getFieldLength(): number {\n\t\tassert(this.innerCursor !== undefined, 0x433 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldLength();\n\t}\n\tpublic firstNode(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x434 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.firstNode();\n\t}\n\tpublic enterNode(childIndex: number): void {\n\t\tassert(this.innerCursor !== undefined, 0x435 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.enterNode(childIndex);\n\t}\n\tpublic getPath(prefix?: PathRootPrefix): UpPath {\n\t\tassert(this.innerCursor !== undefined, 0x436 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getPath(prefix) ?? fail(0xb27 /* no path when at root */);\n\t}\n\tpublic get fieldIndex(): number {\n\t\tassert(this.innerCursor !== undefined, 0x437 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.fieldIndex;\n\t}\n\tpublic get chunkStart(): number {\n\t\tassert(this.innerCursor !== undefined, 0x438 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.chunkStart;\n\t}\n\tpublic get chunkLength(): number {\n\t\tassert(this.innerCursor !== undefined, 0x439 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.chunkLength;\n\t}\n\tpublic seekNodes(offset: number): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43a /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.seekNodes(offset);\n\t}\n\tpublic nextNode(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43b /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.nextNode();\n\t}\n\tpublic exitNode(): void {\n\t\tassert(this.innerCursor !== undefined, 0x43c /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.exitNode();\n\t}\n\tpublic firstField(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43d /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.firstField();\n\t}\n\tpublic enterField(key: FieldKey): void {\n\t\tassert(this.innerCursor !== undefined, 0x43e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.enterField(key);\n\t}\n\tpublic get type(): TreeNodeSchemaIdentifier {\n\t\tassert(this.innerCursor !== undefined, 0x43f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.type;\n\t}\n\tpublic get value(): Value {\n\t\tassert(this.innerCursor !== undefined, 0x440 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.value;\n\t}\n\n\t// TODO: tests for clear when not at root.\n\tpublic clear(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33b /* Cursor must not be freed */,\n\t\t);\n\t\tthis.state = ITreeSubscriptionCursorState.Cleared;\n\t\tthis.innerCursor = undefined;\n\t\tthis.forest.currentCursors.delete(this);\n\t}\n\n\t/**\n\t * Move this cursor to the special dummy node above the detached sequences.\n\t * Can be used when cleared (but not freed).\n\t */\n\tpublic setToAboveDetachedSequences(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33c /* Cursor must not be freed */,\n\t\t);\n\t\tthis.clear();\n\t\tthis.state = ITreeSubscriptionCursorState.Current;\n\t\t// Cast to a cursor of _mutable_ trees to allow direct manipulation of the tree data which is more efficient than doing immutable copies.\n\t\tthis.innerCursor = cursorForMapTreeNode(\n\t\t\tthis.forest.roots,\n\t\t) as CursorWithNode<MutableMapTree>;\n\t\tthis.forest.currentCursors.add(this);\n\t}\n\n\tpublic getNode(): MutableMapTree {\n\t\tassert(this.innerCursor !== undefined, 0x33e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getNode();\n\t}\n\n\tpublic getParent(): [MutableMapTree, FieldKey] {\n\t\tassert(this.innerCursor !== undefined, 0x441 /* Cursor must be current to be used */);\n\t\t// This could be optimized to skip moving it accessing internals of cursor.\n\t\tconst key = this.innerCursor.getFieldKey();\n\t\tthis.innerCursor.exitField();\n\t\tconst node = this.innerCursor.getNode();\n\t\tthis.innerCursor.enterField(key);\n\t\treturn [node, key];\n\t}\n\n\tpublic fork(source?: string): ITreeSubscriptionCursor {\n\t\tassert(this.innerCursor !== undefined, 0x460 /* Cursor must be current to be used */);\n\t\treturn new Cursor(this.forest, source ?? `fork: ${this.source}`, this.innerCursor.fork());\n\t}\n\n\tpublic free(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33f /* Cursor must not be double freed */,\n\t\t);\n\t\tthis.forest.currentCursors.delete(this);\n\t\tthis.state = ITreeSubscriptionCursorState.Freed;\n\t}\n\n\tpublic buildAnchor(): Anchor {\n\t\tassert(\n\t\t\tthis.state === ITreeSubscriptionCursorState.Current,\n\t\t\t0x37a /* Cursor must be current to be used */,\n\t\t);\n\t\treturn this.forest.anchors.track(this.getPath());\n\t}\n}\n\n// This function is the folder level export for objectForest, and hides all the implementation types.\n// When other forest implementations are created (ex: optimized ones),\n// this function should likely be moved and updated to (at least conditionally) use them.\n/**\n * @returns an implementation of {@link IEditableForest} with no data or schema.\n */\nexport function buildForest(\n\tanchors?: AnchorSet,\n\tadditionalAsserts: boolean = false,\n): ObjectForest {\n\treturn new ObjectForest(anchors, additionalAsserts);\n}\n"]}
1
+ {"version":3,"file":"objectForest.js","sourceRoot":"","sources":["../../../src/feature-libraries/object-forest/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nB,oBAA6B,KAAK;IAElC,OAAO,IAAI,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;AACtE,CAAC;AAPD,kCAOC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { createEmitter } from \"@fluid-internal/client-utils\";\nimport type { Listenable } from \"@fluidframework/core-interfaces\";\nimport { assert, fail } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype Anchor,\n\tAnchorSet,\n\ttype AnnouncedVisitor,\n\ttype CursorLocationType,\n\ttype DeltaDetachedNodeId,\n\ttype DeltaVisitor,\n\ttype DetachedField,\n\ttype FieldAnchor,\n\ttype FieldKey,\n\ttype FieldUpPath,\n\ttype ForestEvents,\n\ttype IEditableForest,\n\ttype ITreeCursor,\n\ttype ITreeCursorSynchronous,\n\ttype ITreeSubscriptionCursor,\n\tITreeSubscriptionCursorState,\n\ttype MapTree,\n\ttype PathRootPrefix,\n\ttype PlaceIndex,\n\ttype Range,\n\ttype TreeChunk,\n\ttype TreeFieldStoredSchema,\n\tTreeNavigationResult,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeStoredSchemaSubscription,\n\ttype UpPath,\n\ttype Value,\n\taboveRootPlaceholder,\n\tcombineVisitors,\n\tdeepCopyMapTree,\n\trootFieldKey,\n} from \"../../core/index.js\";\nimport {\n\tassertNonNegativeSafeInteger,\n\tassertValidIndex,\n\tassertValidRange,\n\tbrand,\n\tbreakingMethod,\n\ttype Breakable,\n\ttype WithBreakable,\n} from \"../../util/index.js\";\nimport { chunkFieldSingle, defaultChunkPolicy } from \"../chunked-forest/index.js\";\nimport { cursorForMapTreeNode, mapTreeFromCursor } from \"../mapTreeCursor.js\";\nimport { type CursorWithNode, SynchronousCursor } from \"../treeCursorUtils.js\";\nimport {\n\tdefaultSchemaPolicy,\n\tFieldKinds,\n\tinSchemaOrThrow,\n\tisFieldInSchema,\n} from \"../default-schema/index.js\";\n\n/** A `MapTree` with mutable fields */\ninterface MutableMapTree extends MapTree {\n\treadonly fields: Map<FieldKey, MutableMapTree[]>;\n}\n\n/** Get a field from a `MutableMapTree`, optionally modifying the tree to create it if missing. */\nfunction getOrCreateField(mapTree: MutableMapTree, key: FieldKey): MutableMapTree[] {\n\tconst field = mapTree.fields.get(key);\n\tif (field !== undefined) {\n\t\treturn field;\n\t}\n\n\tconst newField: MutableMapTree[] = [];\n\tmapTree.fields.set(key, newField);\n\treturn newField;\n}\n\n/**\n * Reference implementation of IEditableForest.\n *\n * This implementation focuses on correctness and simplicity, not performance.\n * It does not use compressed chunks: instead nodes are implemented using objects.\n */\nexport class ObjectForest implements IEditableForest, WithBreakable {\n\tprivate activeVisitor?: DeltaVisitor;\n\n\t// All cursors that are in the \"Current\" state. Must be empty when editing.\n\tpublic readonly currentCursors: Set<Cursor> = new Set();\n\tprivate readonly deltaVisitors: Set<() => AnnouncedVisitor> = new Set();\n\n\treadonly #events = createEmitter<ForestEvents>();\n\tpublic readonly events: Listenable<ForestEvents> = this.#events;\n\n\treadonly #roots: MutableMapTree;\n\tpublic get roots(): MapTree {\n\t\treturn this.#roots;\n\t}\n\n\tpublic constructor(\n\t\tpublic readonly breaker: Breakable,\n\t\t/**\n\t\t * If provided, may be used for validation, but otherwise unused.\n\t\t */\n\t\tpublic readonly schema: TreeStoredSchemaSubscription | undefined,\n\t\tpublic readonly anchors: AnchorSet = new AnchorSet(),\n\t\tpublic readonly additionalAsserts: boolean = false,\n\t\troots?: MapTree,\n\t) {\n\t\tthis.#roots =\n\t\t\troots !== undefined\n\t\t\t\t? deepCopyMapTree(roots)\n\t\t\t\t: {\n\t\t\t\t\t\ttype: aboveRootPlaceholder,\n\t\t\t\t\t\tfields: new Map(),\n\t\t\t\t\t};\n\n\t\tif (additionalAsserts) {\n\t\t\tthis.checkSchema();\n\t\t}\n\t}\n\n\tpublic get isEmpty(): boolean {\n\t\treturn this.roots.fields.size === 0;\n\t}\n\n\tpublic clone(schema: TreeStoredSchemaSubscription, anchors: AnchorSet): ObjectForest {\n\t\treturn new ObjectForest(this.breaker, schema, anchors, this.additionalAsserts, this.roots);\n\t}\n\n\tpublic chunkField(cursor: ITreeCursorSynchronous): TreeChunk {\n\t\treturn chunkFieldSingle(cursor, { idCompressor: undefined, policy: defaultChunkPolicy });\n\t}\n\n\tpublic forgetAnchor(anchor: Anchor): void {\n\t\tthis.anchors.forget(anchor);\n\t}\n\n\t/**\n\t * Throw (and break) if content does not match schema.\n\t */\n\t@breakingMethod\n\tpublic checkSchema(): void {\n\t\tconst schema = this.schema;\n\t\tif (schema !== undefined) {\n\t\t\tconst roots = new Set([...this.roots.fields.keys(), rootFieldKey]);\n\t\t\tfor (const key of roots) {\n\t\t\t\tconst documentRoot = this.roots.fields.get(key) ?? [];\n\t\t\t\tconst fieldSchema: TreeFieldStoredSchema =\n\t\t\t\t\tkey === rootFieldKey\n\t\t\t\t\t\t? schema.rootFieldSchema\n\t\t\t\t\t\t: // TODO: someday we should have schema for detached fields, and use that instead of generating one here.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// Some detached fields may have multiple nodes, so we must treat them as sequences:\n\t\t\t\t\t\t\t\tkind: FieldKinds.sequence.identifier,\n\t\t\t\t\t\t\t\ttypes: new Set(documentRoot.map((node) => node.type)),\n\t\t\t\t\t\t\t};\n\t\t\t\tconst maybeError = isFieldInSchema(documentRoot, fieldSchema, {\n\t\t\t\t\tschema,\n\t\t\t\t\tpolicy: defaultSchemaPolicy,\n\t\t\t\t});\n\t\t\t\tinSchemaOrThrow(maybeError);\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic acquireVisitor(): DeltaVisitor {\n\t\tassert(\n\t\t\tthis.activeVisitor === undefined,\n\t\t\t0x76c /* Must release existing visitor before acquiring another */,\n\t\t);\n\n\t\t// Note: This code uses cursors, however it also modifies the tree.\n\t\t// In general this is not safe, but this code happens to only modify the tree below the current cursor location,\n\t\t// which happens to work.\n\t\t// This pattern could be generalized/formalized with a concept of an exclusive cursor,\n\t\t// which can edit, but is the only cursor allowed at the time.\n\n\t\tconst cursor: Cursor = this.allocateCursor(\"acquireVisitor\");\n\t\tcursor.setToAboveDetachedSequences();\n\n\t\t/**\n\t\t * Called before each edit to allow cursor cleanup to happen and ensure that there are no unexpected cursors.\n\t\t * This is required for each change since there may be app facing change event handlers which create cursors.\n\t\t */\n\t\tconst preEdit = (): void => {\n\t\t\tthis.#events.emit(\"beforeChange\");\n\t\t\tassert(\n\t\t\t\tthis.currentCursors.has(cursor),\n\t\t\t\t0x995 /* missing visitor cursor while editing */,\n\t\t\t);\n\t\t\tif (this.currentCursors.size > 1) {\n\t\t\t\tconst unexpectedSources = [...this.currentCursors].flatMap((c) =>\n\t\t\t\t\tc === cursor ? [] : (c.source ?? null),\n\t\t\t\t);\n\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`Found unexpected cursors when editing with the following annotations: ${JSON.stringify(\n\t\t\t\t\t\tunexpectedSources,\n\t\t\t\t\t)}`,\n\t\t\t\t);\n\t\t\t}\n\t\t};\n\n\t\tclass Visitor implements DeltaVisitor {\n\t\t\tpublic constructor(private readonly forest: ObjectForest) {}\n\t\t\tpublic free(): void {\n\t\t\t\tcursor.free();\n\t\t\t\tassert(\n\t\t\t\t\tthis.forest.activeVisitor !== undefined,\n\t\t\t\t\t0x76d /* Multiple free calls for same visitor */,\n\t\t\t\t);\n\t\t\t\tthis.forest.activeVisitor = undefined;\n\t\t\t\tif (this.forest.additionalAsserts) {\n\t\t\t\t\t// Schema validation:\n\t\t\t\t\t// When doing \"additionalAsserts\", validate the content against the schema after every batch of edits.\n\t\t\t\t\tthis.forest.checkSchema();\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic destroy(detachedField: FieldKey, count: number): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.forest.delete(detachedField);\n\t\t\t}\n\t\t\tpublic create(content: readonly ITreeCursorSynchronous[], destination: FieldKey): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.forest.add(content, destination);\n\t\t\t\tthis.forest.#events.emit(\"afterRootFieldCreated\", destination);\n\t\t\t}\n\t\t\tpublic attach(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.attachEdit(source, count, destination);\n\t\t\t}\n\t\t\tpublic detach(source: Range, destination: FieldKey, id: DeltaDetachedNodeId): void {\n\t\t\t\tpreEdit();\n\t\t\t\tthis.detachEdit(source, destination);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Attaches the nodes from the given source field into the current field.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The the range to be attached.\n\t\t\t * @param count - The number of nodes being attached.\n\t\t\t * Expected to match the number of nodes in the source detached field.\n\t\t\t * @param destination - The index in the current field at which to attach the content.\n\t\t\t */\n\t\t\tprivate attachEdit(source: FieldKey, count: number, destination: PlaceIndex): void {\n\t\t\t\tassertNonNegativeSafeInteger(count);\n\t\t\t\tif (count === 0) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst [parent, key] = cursor.getParent();\n\t\t\t\tassert(\n\t\t\t\t\tparent !== this.forest.roots || key !== source,\n\t\t\t\t\t0x7b6 /* Attach source field must be different from current field */,\n\t\t\t\t);\n\t\t\t\tconst currentField = getOrCreateField(parent, key);\n\t\t\t\tassertValidIndex(destination, currentField, true);\n\t\t\t\tconst sourceField = this.forest.#roots.fields.get(source) ?? [];\n\t\t\t\tassert(sourceField !== undefined, 0x7b7 /* Attach source field must exist */);\n\t\t\t\tassert(\n\t\t\t\t\tsourceField.length === count,\n\t\t\t\t\t0x7b8 /* Attach must consume all nodes in source field */,\n\t\t\t\t);\n\t\t\t\t// TODO: this will fail for very large insertions due to argument limits.\n\t\t\t\tcurrentField.splice(destination, 0, ...sourceField);\n\t\t\t\tthis.forest.delete(source);\n\t\t\t}\n\t\t\t/**\n\t\t\t * Detaches the range from the current field and transfers it to the given destination if any.\n\t\t\t * Does not invalidate dependents.\n\t\t\t * @param source - The bounds of the range to be detached from the current field.\n\t\t\t * @param destination - If specified, the destination to transfer the detached range to.\n\t\t\t * If not specified, the detached range is destroyed.\n\t\t\t */\n\t\t\tprivate detachEdit(source: Range, destination: FieldKey | undefined): void {\n\t\t\t\tconst [parent, key] = cursor.getParent();\n\t\t\t\tassert(\n\t\t\t\t\tdestination === undefined || parent !== this.forest.roots || key !== destination,\n\t\t\t\t\t0x7b9 /* Detach destination field must be different from current field */,\n\t\t\t\t);\n\t\t\t\tconst currentField = getOrCreateField(parent, key);\n\t\t\t\tassertValidRange(source, currentField);\n\t\t\t\tconst content = currentField.splice(source.start, source.end - source.start);\n\t\t\t\tif (destination !== undefined) {\n\t\t\t\t\tthis.forest.addFieldAsDetached(content, destination);\n\t\t\t\t}\n\t\t\t\t// This check is performed after the transfer to ensure that the field is not removed in scenarios\n\t\t\t\t// where the source and destination are the same.\n\t\t\t\tif (currentField.length === 0) {\n\t\t\t\t\tparent.fields.delete(key);\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic enterNode(index: number): void {\n\t\t\t\tcursor.enterNode(index);\n\t\t\t}\n\t\t\tpublic exitNode(index: number): void {\n\t\t\t\tcursor.exitNode();\n\t\t\t}\n\t\t\tpublic enterField(key: FieldKey): void {\n\t\t\t\tcursor.enterField(key);\n\t\t\t}\n\t\t\tpublic exitField(key: FieldKey): void {\n\t\t\t\tcursor.exitField();\n\t\t\t}\n\t\t}\n\n\t\tconst forestVisitor = new Visitor(this);\n\t\tconst announcedVisitors: AnnouncedVisitor[] = [];\n\t\tthis.deltaVisitors.forEach((getVisitor) => announcedVisitors.push(getVisitor()));\n\t\tconst combinedVisitor = combineVisitors([forestVisitor, ...announcedVisitors]);\n\t\tthis.activeVisitor = combinedVisitor;\n\t\treturn combinedVisitor;\n\t}\n\n\tpublic registerAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.add(visitor);\n\t}\n\n\tpublic deregisterAnnouncedVisitor(visitor: () => AnnouncedVisitor): void {\n\t\tthis.deltaVisitors.delete(visitor);\n\t}\n\n\tprivate nextRange = 0;\n\tpublic newDetachedField(): DetachedField {\n\t\tconst range: DetachedField = brand(String(this.nextRange));\n\t\tthis.nextRange += 1;\n\t\treturn range;\n\t}\n\n\tprivate add(nodes: Iterable<ITreeCursor>, key: FieldKey): void {\n\t\tconst field = Array.from(nodes, mapTreeFromCursor) as MutableMapTree[];\n\t\tthis.addFieldAsDetached(field, key);\n\t}\n\n\tprivate addFieldAsDetached(field: MutableMapTree[], key: FieldKey): void {\n\t\tassert(!this.roots.fields.has(key), 0x370 /* new range must not already exist */);\n\t\tif (field.length > 0) {\n\t\t\tthis.#roots.fields.set(key, field);\n\t\t}\n\t}\n\n\tprivate delete(field: FieldKey): void {\n\t\tthis.#roots.fields.delete(field);\n\t}\n\n\tpublic allocateCursor(source?: string): Cursor {\n\t\treturn new Cursor(this, source);\n\t}\n\n\tpublic tryMoveCursorToNode(\n\t\tdestination: Anchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tconst path = this.anchors.locate(destination);\n\t\tif (path === undefined) {\n\t\t\treturn TreeNavigationResult.NotFound;\n\t\t}\n\t\tthis.moveCursorToPath(path, cursorToMove);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic tryMoveCursorToField(\n\t\tdestination: FieldAnchor,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): TreeNavigationResult {\n\t\tif (destination.parent === undefined) {\n\t\t\tthis.moveCursorToPath(undefined, cursorToMove);\n\t\t} else {\n\t\t\tconst result = this.tryMoveCursorToNode(destination.parent, cursorToMove);\n\t\t\tif (result !== TreeNavigationResult.Ok) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\tcursorToMove.enterField(destination.fieldKey);\n\t\treturn TreeNavigationResult.Ok;\n\t}\n\n\tpublic moveCursorToPath(\n\t\tdestination: UpPath | undefined,\n\t\tcursorToMove: ITreeSubscriptionCursor,\n\t): void {\n\t\tassert(\n\t\t\tcursorToMove instanceof Cursor,\n\t\t\t0x337 /* ObjectForest must only be given its own Cursor type */,\n\t\t);\n\t\tassert(\n\t\t\tcursorToMove.forest === this,\n\t\t\t0x338 /* ObjectForest must only be given its own Cursor */,\n\t\t);\n\n\t\tconst indexStack: number[] = [];\n\t\tconst keyStack: FieldKey[] = [];\n\n\t\tlet path: UpPath | undefined = destination;\n\t\twhile (path !== undefined) {\n\t\t\tindexStack.push(path.parentIndex);\n\t\t\tkeyStack.push(path.parentField);\n\t\t\tpath = path.parent;\n\t\t}\n\t\tcursorToMove.setToAboveDetachedSequences();\n\t\twhile (keyStack.length > 0) {\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tcursorToMove.enterField(keyStack.pop()!);\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tcursorToMove.enterNode(indexStack.pop()!);\n\t\t}\n\n\t\treturn;\n\t}\n\n\tpublic getCursorAboveDetachedFields(): ITreeCursorSynchronous {\n\t\treturn cursorForMapTreeNode(this.roots);\n\t}\n}\n\n/**\n * Cursor implementation for ObjectForest.\n */\nclass Cursor extends SynchronousCursor implements ITreeSubscriptionCursor {\n\tpublic state: ITreeSubscriptionCursorState;\n\n\t/**\n\t * @param forest - forest this cursor navigates\n\t * @param innerCursor - underlying cursor implementation this wraps. `undefined` when state is not `Current`\n\t */\n\tpublic constructor(\n\t\tpublic readonly forest: ObjectForest,\n\t\tpublic readonly source: string | undefined,\n\t\tprivate innerCursor?: CursorWithNode<MutableMapTree>,\n\t) {\n\t\tsuper();\n\t\tif (innerCursor === undefined) {\n\t\t\tthis.state = ITreeSubscriptionCursorState.Cleared;\n\t\t} else {\n\t\t\tthis.state = ITreeSubscriptionCursorState.Current;\n\t\t\tthis.forest.currentCursors.add(this);\n\t\t}\n\t}\n\n\tpublic buildFieldAnchor(): FieldAnchor {\n\t\tconst path = this.getFieldPath();\n\t\tconst anchor =\n\t\t\tpath.parent === undefined ? undefined : this.forest.anchors.track(path.parent);\n\t\treturn { parent: anchor, fieldKey: path.field };\n\t}\n\tpublic getFieldPath(prefix?: PathRootPrefix): FieldUpPath {\n\t\tassert(this.innerCursor !== undefined, 0x45f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldPath(prefix);\n\t}\n\tpublic get mode(): CursorLocationType {\n\t\tassert(this.innerCursor !== undefined, 0x42e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.mode;\n\t}\n\n\tpublic nextField(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x42f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.nextField();\n\t}\n\tpublic exitField(): void {\n\t\tassert(this.innerCursor !== undefined, 0x430 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.exitField();\n\t}\n\tpublic override skipPendingFields(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x431 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.skipPendingFields();\n\t}\n\tpublic getFieldKey(): FieldKey {\n\t\tassert(this.innerCursor !== undefined, 0x432 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldKey();\n\t}\n\tpublic getFieldLength(): number {\n\t\tassert(this.innerCursor !== undefined, 0x433 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getFieldLength();\n\t}\n\tpublic firstNode(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x434 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.firstNode();\n\t}\n\tpublic enterNode(childIndex: number): void {\n\t\tassert(this.innerCursor !== undefined, 0x435 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.enterNode(childIndex);\n\t}\n\tpublic getPath(prefix?: PathRootPrefix): UpPath {\n\t\tassert(this.innerCursor !== undefined, 0x436 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getPath(prefix) ?? fail(0xb27 /* no path when at root */);\n\t}\n\tpublic get fieldIndex(): number {\n\t\tassert(this.innerCursor !== undefined, 0x437 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.fieldIndex;\n\t}\n\tpublic get chunkStart(): number {\n\t\tassert(this.innerCursor !== undefined, 0x438 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.chunkStart;\n\t}\n\tpublic get chunkLength(): number {\n\t\tassert(this.innerCursor !== undefined, 0x439 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.chunkLength;\n\t}\n\tpublic seekNodes(offset: number): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43a /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.seekNodes(offset);\n\t}\n\tpublic nextNode(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43b /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.nextNode();\n\t}\n\tpublic exitNode(): void {\n\t\tassert(this.innerCursor !== undefined, 0x43c /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.exitNode();\n\t}\n\tpublic firstField(): boolean {\n\t\tassert(this.innerCursor !== undefined, 0x43d /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.firstField();\n\t}\n\tpublic enterField(key: FieldKey): void {\n\t\tassert(this.innerCursor !== undefined, 0x43e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.enterField(key);\n\t}\n\tpublic get type(): TreeNodeSchemaIdentifier {\n\t\tassert(this.innerCursor !== undefined, 0x43f /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.type;\n\t}\n\tpublic get value(): Value {\n\t\tassert(this.innerCursor !== undefined, 0x440 /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.value;\n\t}\n\n\t// TODO: tests for clear when not at root.\n\tpublic clear(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33b /* Cursor must not be freed */,\n\t\t);\n\t\tthis.state = ITreeSubscriptionCursorState.Cleared;\n\t\tthis.innerCursor = undefined;\n\t\tthis.forest.currentCursors.delete(this);\n\t}\n\n\t/**\n\t * Move this cursor to the special dummy node above the detached sequences.\n\t * Can be used when cleared (but not freed).\n\t */\n\tpublic setToAboveDetachedSequences(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33c /* Cursor must not be freed */,\n\t\t);\n\t\tthis.clear();\n\t\tthis.state = ITreeSubscriptionCursorState.Current;\n\t\t// Cast to a cursor of _mutable_ trees to allow direct manipulation of the tree data which is more efficient than doing immutable copies.\n\t\tthis.innerCursor = cursorForMapTreeNode(\n\t\t\tthis.forest.roots,\n\t\t) as CursorWithNode<MutableMapTree>;\n\t\tthis.forest.currentCursors.add(this);\n\t}\n\n\tpublic getNode(): MutableMapTree {\n\t\tassert(this.innerCursor !== undefined, 0x33e /* Cursor must be current to be used */);\n\t\treturn this.innerCursor.getNode();\n\t}\n\n\tpublic getParent(): [MutableMapTree, FieldKey] {\n\t\tassert(this.innerCursor !== undefined, 0x441 /* Cursor must be current to be used */);\n\t\t// This could be optimized to skip moving it accessing internals of cursor.\n\t\tconst key = this.innerCursor.getFieldKey();\n\t\tthis.innerCursor.exitField();\n\t\tconst node = this.innerCursor.getNode();\n\t\tthis.innerCursor.enterField(key);\n\t\treturn [node, key];\n\t}\n\n\tpublic fork(source?: string): ITreeSubscriptionCursor {\n\t\tassert(this.innerCursor !== undefined, 0x460 /* Cursor must be current to be used */);\n\t\treturn new Cursor(this.forest, source ?? `fork: ${this.source}`, this.innerCursor.fork());\n\t}\n\n\tpublic free(): void {\n\t\tassert(\n\t\t\tthis.state !== ITreeSubscriptionCursorState.Freed,\n\t\t\t0x33f /* Cursor must not be double freed */,\n\t\t);\n\t\tthis.forest.currentCursors.delete(this);\n\t\tthis.state = ITreeSubscriptionCursorState.Freed;\n\t}\n\n\tpublic buildAnchor(): Anchor {\n\t\tassert(\n\t\t\tthis.state === ITreeSubscriptionCursorState.Current,\n\t\t\t0x37a /* Cursor must be current to be used */,\n\t\t);\n\t\treturn this.forest.anchors.track(this.getPath());\n\t}\n}\n\n// This function is the folder level export for objectForest, and hides all the implementation types.\n// When other forest implementations are created (ex: optimized ones),\n// this function should likely be moved and updated to (at least conditionally) use them.\n/**\n * Returns an implementation of {@link IEditableForest} with no content.\n * @privateRemarks\n * TODO:\n * refactor to remove this function, and instead place `ForestTypeReference` and `ForestTypeExpensiveDebug` here as a better way to encapsulate ObjectForest.\n */\nexport function buildForest(\n\tbreaker: Breakable,\n\tschema?: TreeStoredSchemaSubscription,\n\tanchors?: AnchorSet,\n\tadditionalAsserts: boolean = false,\n): ObjectForest {\n\treturn new ObjectForest(breaker, schema, anchors, additionalAsserts);\n}\n"]}
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../../codec/index.js";
6
- import { SchemaCodecVersion } from "../schema-index/index.js";
7
6
  import type { SchemaChange } from "./schemaChangeTypes.js";
7
+ import { SchemaVersion } from "../../core/index.js";
8
8
  /**
9
9
  * Create a family of schema change codecs.
10
10
  * @param options - Specifies common codec options, including which `validator` to use.
@@ -17,5 +17,5 @@ export declare function makeSchemaChangeCodecs(options: ICodecOptions): ICodecFa
17
17
  * @param writeVersion - The schema change write version.
18
18
  * @returns The composed codec.
19
19
  */
20
- export declare function makeSchemaChangeCodec(options: ICodecOptions, writeVersion: SchemaCodecVersion): IJsonCodec<SchemaChange>;
20
+ export declare function makeSchemaChangeCodec(options: ICodecOptions, writeVersion: SchemaVersion): IJsonCodec<SchemaChange>;
21
21
  //# sourceMappingURL=schemaChangeCodecs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemaChangeCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAIf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEN,kBAAkB,EAElB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CAAC,YAAY,CAAC,CAEzF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,kBAAkB,GAC9B,UAAU,CAAC,YAAY,CAAC,CAG1B"}
1
+ {"version":3,"file":"schemaChangeCodecs.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAIf,MAAM,sBAAsB,CAAC;AAI9B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CAAC,YAAY,CAAC,CAEzF;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACpC,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,aAAa,GACzB,UAAU,CAAC,YAAY,CAAC,CAG1B"}
@@ -9,13 +9,14 @@ const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const index_js_1 = require("../../codec/index.js");
10
10
  const index_js_2 = require("../schema-index/index.js");
11
11
  const schemaChangeFormat_js_1 = require("./schemaChangeFormat.js");
12
+ const index_js_3 = require("../../core/index.js");
12
13
  /**
13
14
  * Create a family of schema change codecs.
14
15
  * @param options - Specifies common codec options, including which `validator` to use.
15
16
  * @returns The composed codec family.
16
17
  */
17
18
  function makeSchemaChangeCodecs(options) {
18
- return (0, index_js_1.makeCodecFamily)([[index_js_2.SchemaCodecVersion.v1, makeSchemaChangeCodecV1(options)]]);
19
+ return (0, index_js_1.makeCodecFamily)([[index_js_3.SchemaVersion.v1, makeSchemaChangeCodecV1(options)]]);
19
20
  }
20
21
  exports.makeSchemaChangeCodecs = makeSchemaChangeCodecs;
21
22
  /**
@@ -35,7 +36,7 @@ exports.makeSchemaChangeCodec = makeSchemaChangeCodec;
35
36
  * @returns The composed schema change codec.
36
37
  */
37
38
  function makeSchemaChangeCodecV1(options) {
38
- const schemaCodec = (0, index_js_2.makeSchemaCodec)(options, index_js_2.SchemaCodecVersion.v1);
39
+ const schemaCodec = (0, index_js_2.makeSchemaCodec)(options, index_js_3.SchemaVersion.v1);
39
40
  const schemaChangeCodec = {
40
41
  encode: (schemaChange) => {
41
42
  (0, internal_1.assert)(!schemaChange.isInverse, 0x933 /* Inverse schema changes should never be transmitted */);
@@ -1 +1 @@
1
- {"version":3,"file":"schemaChangeCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAE7D,mDAO8B;AAC9B,uDAIkC;AAElC,mEAA8D;AAG9D;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,OAAsB;IAC5D,OAAO,IAAA,0BAAe,EAAC,CAAC,CAAC,6BAAkB,CAAC,EAAE,EAAE,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACrF,CAAC;AAFD,wDAEC;AAED;;;;;GAKG;AACH,SAAgB,qBAAqB,CACpC,OAAsB,EACtB,YAAgC;IAEhC,MAAM,MAAM,GAAG,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC/C,OAAO,IAAA,sCAA2B,EAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1E,CAAC;AAND,sDAMC;AAED;;;;GAIG;AACH,SAAS,uBAAuB,CAC/B,OAAsB;IAEtB,MAAM,WAAW,GAAG,IAAA,0BAAe,EAAC,OAAO,EAAE,6BAAkB,CAAC,EAAE,CAAC,CAAC;IACpE,MAAM,iBAAiB,GAAkD;QACxE,MAAM,EAAE,CAAC,YAAY,EAAE,EAAE;YACxB,IAAA,iBAAM,EACL,CAAC,YAAY,CAAC,SAAS,EACvB,KAAK,CAAC,wDAAwD,CAC9D,CAAC;YACF,OAAO;gBACN,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAa;gBAC5D,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,GAAG,CAAa;aAC5D,CAAC;QACH,CAAC;QACD,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;YACnB,OAAO;gBACN,MAAM,EAAE;oBACP,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;oBACpC,GAAG,EAAE,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;iBACpC;gBACD,SAAS,EAAE,KAAK;aAChB,CAAC;QACH,CAAC;QACD,aAAa,EAAE,2CAAmB;KAClC,CAAC;IAEF,OAAO,IAAA,+BAAoB,EAAC,2CAAmB,EAAE,iBAAiB,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n\twithSchemaValidation,\n} from \"../../codec/index.js\";\nimport {\n\tmakeSchemaCodec,\n\tSchemaCodecVersion,\n\ttype Format as FormatV1,\n} from \"../schema-index/index.js\";\n\nimport { EncodedSchemaChange } from \"./schemaChangeFormat.js\";\nimport type { SchemaChange } from \"./schemaChangeTypes.js\";\n\n/**\n * Create a family of schema change codecs.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The composed codec family.\n */\nexport function makeSchemaChangeCodecs(options: ICodecOptions): ICodecFamily<SchemaChange> {\n\treturn makeCodecFamily([[SchemaCodecVersion.v1, makeSchemaChangeCodecV1(options)]]);\n}\n\n/**\n * Create a schema change codec.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @param writeVersion - The schema change write version.\n * @returns The composed codec.\n */\nexport function makeSchemaChangeCodec(\n\toptions: ICodecOptions,\n\twriteVersion: SchemaCodecVersion,\n): IJsonCodec<SchemaChange> {\n\tconst family = makeSchemaChangeCodecs(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * Compose the v1 schema change codec.\n * @param options - The codec options.\n * @returns The composed schema change codec.\n */\nfunction makeSchemaChangeCodecV1(\n\toptions: ICodecOptions,\n): IJsonCodec<SchemaChange, EncodedSchemaChange> {\n\tconst schemaCodec = makeSchemaCodec(options, SchemaCodecVersion.v1);\n\tconst schemaChangeCodec: IJsonCodec<SchemaChange, EncodedSchemaChange> = {\n\t\tencode: (schemaChange) => {\n\t\t\tassert(\n\t\t\t\t!schemaChange.isInverse,\n\t\t\t\t0x933 /* Inverse schema changes should never be transmitted */,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tnew: schemaCodec.encode(schemaChange.schema.new) as FormatV1,\n\t\t\t\told: schemaCodec.encode(schemaChange.schema.old) as FormatV1,\n\t\t\t};\n\t\t},\n\t\tdecode: (encoded) => {\n\t\t\treturn {\n\t\t\t\tschema: {\n\t\t\t\t\tnew: schemaCodec.decode(encoded.new),\n\t\t\t\t\told: schemaCodec.decode(encoded.old),\n\t\t\t\t},\n\t\t\t\tisInverse: false,\n\t\t\t};\n\t\t},\n\t\tencodedSchema: EncodedSchemaChange,\n\t};\n\n\treturn withSchemaValidation(EncodedSchemaChange, schemaChangeCodec, options.jsonValidator);\n}\n"]}
1
+ {"version":3,"file":"schemaChangeCodecs.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-edits/schemaChangeCodecs.ts"],"names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;iBACpC;gBACD,SAAS,EAAE,KAAK;aAChB,CAAC;QACH,CAAC;QACD,aAAa,EAAE,2CAAmB;KAClC,CAAC;IAEF,OAAO,IAAA,+BAAoB,EAAC,2CAAmB,EAAE,iBAAiB,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;AAC5F,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n\twithSchemaValidation,\n} from \"../../codec/index.js\";\nimport { makeSchemaCodec, type Format as FormatV1 } from \"../schema-index/index.js\";\n\nimport { EncodedSchemaChange } from \"./schemaChangeFormat.js\";\nimport type { SchemaChange } from \"./schemaChangeTypes.js\";\nimport { SchemaVersion } from \"../../core/index.js\";\n\n/**\n * Create a family of schema change codecs.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The composed codec family.\n */\nexport function makeSchemaChangeCodecs(options: ICodecOptions): ICodecFamily<SchemaChange> {\n\treturn makeCodecFamily([[SchemaVersion.v1, makeSchemaChangeCodecV1(options)]]);\n}\n\n/**\n * Create a schema change codec.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @param writeVersion - The schema change write version.\n * @returns The composed codec.\n */\nexport function makeSchemaChangeCodec(\n\toptions: ICodecOptions,\n\twriteVersion: SchemaVersion,\n): IJsonCodec<SchemaChange> {\n\tconst family = makeSchemaChangeCodecs(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * Compose the v1 schema change codec.\n * @param options - The codec options.\n * @returns The composed schema change codec.\n */\nfunction makeSchemaChangeCodecV1(\n\toptions: ICodecOptions,\n): IJsonCodec<SchemaChange, EncodedSchemaChange> {\n\tconst schemaCodec = makeSchemaCodec(options, SchemaVersion.v1);\n\tconst schemaChangeCodec: IJsonCodec<SchemaChange, EncodedSchemaChange> = {\n\t\tencode: (schemaChange) => {\n\t\t\tassert(\n\t\t\t\t!schemaChange.isInverse,\n\t\t\t\t0x933 /* Inverse schema changes should never be transmitted */,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tnew: schemaCodec.encode(schemaChange.schema.new) as FormatV1,\n\t\t\t\told: schemaCodec.encode(schemaChange.schema.old) as FormatV1,\n\t\t\t};\n\t\t},\n\t\tdecode: (encoded) => {\n\t\t\treturn {\n\t\t\t\tschema: {\n\t\t\t\t\tnew: schemaCodec.decode(encoded.new),\n\t\t\t\t\told: schemaCodec.decode(encoded.old),\n\t\t\t\t},\n\t\t\t\tisInverse: false,\n\t\t\t};\n\t\t},\n\t\tencodedSchema: EncodedSchemaChange,\n\t};\n\n\treturn withSchemaValidation(EncodedSchemaChange, schemaChangeCodec, options.jsonValidator);\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  import { type Static } from "@sinclair/typebox";
6
6
  export declare const EncodedSchemaChange: import("@sinclair/typebox").TObject<{
7
7
  new: import("@sinclair/typebox").TObject<{
8
- version: import("@sinclair/typebox").TLiteral<1>;
8
+ version: import("@sinclair/typebox").TLiteral<import("../../core/index.js").SchemaVersion>;
9
9
  nodes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
10
10
  object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
11
11
  kind: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKindIdentifier>;
@@ -23,7 +23,7 @@ export declare const EncodedSchemaChange: import("@sinclair/typebox").TObject<{
23
23
  }>;
24
24
  }>;
25
25
  old: import("@sinclair/typebox").TObject<{
26
- version: import("@sinclair/typebox").TLiteral<1>;
26
+ version: import("@sinclair/typebox").TLiteral<import("../../core/index.js").SchemaVersion>;
27
27
  nodes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
28
28
  object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
29
29
  kind: import("@sinclair/typebox").TUnsafe<import("../../core/index.js").FieldKindIdentifier>;
@@ -3,20 +3,14 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { type FluidClientVersion, type ICodecFamily, type ICodecOptions, type IJsonCodec } from "../../codec/index.js";
6
- import { type TreeStoredSchema } from "../../core/index.js";
6
+ import { SchemaVersion, type TreeStoredSchema } from "../../core/index.js";
7
7
  import { type JsonCompatible } from "../../util/index.js";
8
8
  /**
9
- * Versions for the codec that encodes an in-memory representation of a stored schema {@link TreeStoredSchema} into a persisted format (or decodes it in the opposite direction).
10
- */
11
- export declare enum SchemaCodecVersion {
12
- v1 = 1
13
- }
14
- /**
15
- * Convert a FluidClientVersion to a SchemaCodecVersion.
9
+ * Convert a FluidClientVersion to a SchemaVersion.
16
10
  * @param clientVersion - The FluidClientVersion to convert.
17
- * @returns The SchemaCodecVersion that corresponds to the provided FluidClientVersion.
11
+ * @returns The SchemaVersion that corresponds to the provided FluidClientVersion.
18
12
  */
19
- export declare function clientVersionToSchemaVersion(clientVersion: FluidClientVersion): SchemaCodecVersion;
13
+ export declare function clientVersionToSchemaVersion(clientVersion: FluidClientVersion): SchemaVersion;
20
14
  /**
21
15
  * Create a schema codec.
22
16
  * @param options - Specifies common codec options, including which `validator` to use.
@@ -25,7 +19,7 @@ export declare function clientVersionToSchemaVersion(clientVersion: FluidClientV
25
19
  *
26
20
  * @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.
27
21
  */
28
- export declare function makeSchemaCodec(options: ICodecOptions, writeVersion: SchemaCodecVersion): IJsonCodec<TreeStoredSchema>;
22
+ export declare function makeSchemaCodec(options: ICodecOptions, writeVersion: SchemaVersion): IJsonCodec<TreeStoredSchema>;
29
23
  /**
30
24
  * Create a family of schema codecs.
31
25
  * @param options - Specifies common codec options, including which `validator` to use.
@@ -38,5 +32,5 @@ export declare function makeSchemaCodecs(options: ICodecOptions): ICodecFamily<T
38
32
  * @param version - The schema write version.
39
33
  * @returns The encoded schema.
40
34
  */
41
- export declare function encodeRepo(repo: TreeStoredSchema, version: SchemaCodecVersion): JsonCompatible;
35
+ export declare function encodeRepo(repo: TreeStoredSchema, version: SchemaVersion): JsonCompatible;
42
36
  //# sourceMappingURL=codec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAIf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAGN,KAAK,gBAAgB,EAKrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAS,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIjE;;GAEG;AACH,oBAAY,kBAAkB;IAC7B,EAAE,IAAI;CACN;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC3C,aAAa,EAAE,kBAAkB,GAC/B,kBAAkB,CAGpB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC9B,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,kBAAkB,GAC9B,UAAU,CAAC,gBAAgB,CAAC,CAG9B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAEvF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CACzB,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,kBAAkB,GACzB,cAAc,CAOhB"}
1
+ {"version":3,"file":"codec.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EAIf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,aAAa,EAGb,KAAK,gBAAgB,EAKrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAS,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIjE;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC3C,aAAa,EAAE,kBAAkB,GAC/B,aAAa,CAGf;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC9B,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,aAAa,GACzB,UAAU,CAAC,gBAAgB,CAAC,CAG9B;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAEvF;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,GAAG,cAAc,CAOzF"}
@@ -4,27 +4,20 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.encodeRepo = exports.makeSchemaCodecs = exports.makeSchemaCodec = exports.clientVersionToSchemaVersion = exports.SchemaCodecVersion = void 0;
7
+ exports.encodeRepo = exports.makeSchemaCodecs = exports.makeSchemaCodec = exports.clientVersionToSchemaVersion = void 0;
8
8
  const internal_1 = require("@fluidframework/core-utils/internal");
9
9
  const index_js_1 = require("../../codec/index.js");
10
10
  const index_js_2 = require("../../core/index.js");
11
11
  const index_js_3 = require("../../util/index.js");
12
12
  const formatV1_js_1 = require("./formatV1.js");
13
13
  /**
14
- * Versions for the codec that encodes an in-memory representation of a stored schema {@link TreeStoredSchema} into a persisted format (or decodes it in the opposite direction).
15
- */
16
- var SchemaCodecVersion;
17
- (function (SchemaCodecVersion) {
18
- SchemaCodecVersion[SchemaCodecVersion["v1"] = 1] = "v1";
19
- })(SchemaCodecVersion || (exports.SchemaCodecVersion = SchemaCodecVersion = {}));
20
- /**
21
- * Convert a FluidClientVersion to a SchemaCodecVersion.
14
+ * Convert a FluidClientVersion to a SchemaVersion.
22
15
  * @param clientVersion - The FluidClientVersion to convert.
23
- * @returns The SchemaCodecVersion that corresponds to the provided FluidClientVersion.
16
+ * @returns The SchemaVersion that corresponds to the provided FluidClientVersion.
24
17
  */
25
18
  function clientVersionToSchemaVersion(clientVersion) {
26
19
  // Only one version of the schema codec is currently supported.
27
- return SchemaCodecVersion.v1;
20
+ return index_js_2.SchemaVersion.v1;
28
21
  }
29
22
  exports.clientVersionToSchemaVersion = clientVersionToSchemaVersion;
30
23
  /**
@@ -46,7 +39,7 @@ exports.makeSchemaCodec = makeSchemaCodec;
46
39
  * @returns The composed codec family.
47
40
  */
48
41
  function makeSchemaCodecs(options) {
49
- return (0, index_js_1.makeCodecFamily)([[SchemaCodecVersion.v1, makeSchemaCodecV1(options)]]);
42
+ return (0, index_js_1.makeCodecFamily)([[index_js_2.SchemaVersion.v1, makeSchemaCodecV1(options)]]);
50
43
  }
51
44
  exports.makeSchemaCodecs = makeSchemaCodecs;
52
45
  /**
@@ -57,7 +50,7 @@ exports.makeSchemaCodecs = makeSchemaCodecs;
57
50
  */
58
51
  function encodeRepo(repo, version) {
59
52
  switch (version) {
60
- case SchemaCodecVersion.v1:
53
+ case index_js_2.SchemaVersion.v1:
61
54
  return encodeRepoV1(repo);
62
55
  default:
63
56
  (0, internal_1.unreachableCase)(version);
@@ -77,7 +70,7 @@ function encodeRepoV1(repo) {
77
70
  });
78
71
  }
79
72
  return {
80
- version: index_js_2.schemaFormatV1.version,
73
+ version: index_js_2.SchemaVersion.v1,
81
74
  nodes: nodeSchema,
82
75
  root: rootFieldSchema,
83
76
  };
@@ -98,7 +91,7 @@ function decode(f) {
98
91
  * @returns The codec.
99
92
  */
100
93
  function makeSchemaCodecV1(options) {
101
- return (0, index_js_1.makeVersionedValidatedCodec)(options, new Set([index_js_2.schemaFormatV1.version]), formatV1_js_1.Format, {
94
+ return (0, index_js_1.makeVersionedValidatedCodec)(options, new Set([index_js_2.SchemaVersion.v1]), formatV1_js_1.Format, {
102
95
  encode: (data) => encodeRepoV1(data),
103
96
  decode: (data) => decode(data),
104
97
  });
@@ -1 +1 @@
1
- {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA4E;AAC5E,mDAQ8B;AAC9B,kDAQ6B;AAC7B,kDAAiE;AAEjE,+CAAmD;AAEnD;;GAEG;AACH,IAAY,kBAEX;AAFD,WAAY,kBAAkB;IAC7B,uDAAM,CAAA;AACP,CAAC,EAFW,kBAAkB,kCAAlB,kBAAkB,QAE7B;AAED;;;;GAIG;AACH,SAAgB,4BAA4B,CAC3C,aAAiC;IAEjC,+DAA+D;IAC/D,OAAO,kBAAkB,CAAC,EAAE,CAAC;AAC9B,CAAC;AALD,oEAKC;AAED;;;;;;;GAOG;AACH,SAAgB,eAAe,CAC9B,OAAsB,EACtB,YAAgC;IAEhC,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACzC,OAAO,IAAA,sCAA2B,EAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1E,CAAC;AAND,0CAMC;AAED;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,OAAsB;IACtD,OAAO,IAAA,0BAAe,EAAC,CAAC,CAAC,kBAAkB,CAAC,EAAE,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC;AAFD,4CAEC;AAED;;;;;GAKG;AACH,SAAgB,UAAU,CACzB,IAAsB,EACtB,OAA2B;IAE3B,QAAQ,OAAO,EAAE,CAAC;QACjB,KAAK,kBAAkB,CAAC,EAAE;YACzB,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;QAC3B;YACC,IAAA,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C;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,OAAsB;IAChD,OAAO,IAAA,sCAA2B,EAAC,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,yBAAc,CAAC,OAAO,CAAC,CAAC,EAAE,oBAAQ,EAAE;QACxF,MAAM,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;KACxC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport {\n\ttype FluidClientVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n\tmakeVersionedValidatedCodec,\n} from \"../../codec/index.js\";\nimport {\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\tschemaFormatV1,\n\tstoredSchemaDecodeDispatcher,\n} from \"../../core/index.js\";\nimport { brand, type JsonCompatible } from \"../../util/index.js\";\n\nimport { Format as FormatV1 } from \"./formatV1.js\";\n\n/**\n * Versions for the codec that encodes an in-memory representation of a stored schema {@link TreeStoredSchema} into a persisted format (or decodes it in the opposite direction).\n */\nexport enum SchemaCodecVersion {\n\tv1 = 1,\n}\n\n/**\n * Convert a FluidClientVersion to a SchemaCodecVersion.\n * @param clientVersion - The FluidClientVersion to convert.\n * @returns The SchemaCodecVersion that corresponds to the provided FluidClientVersion.\n */\nexport function clientVersionToSchemaVersion(\n\tclientVersion: FluidClientVersion,\n): SchemaCodecVersion {\n\t// Only one version of the schema codec is currently supported.\n\treturn SchemaCodecVersion.v1;\n}\n\n/**\n * Create a schema codec.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @param writeVersion - The schema write version.\n * @returns The composed codec.\n *\n * @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.\n */\nexport function makeSchemaCodec(\n\toptions: ICodecOptions,\n\twriteVersion: SchemaCodecVersion,\n): IJsonCodec<TreeStoredSchema> {\n\tconst family = makeSchemaCodecs(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * Create a family of schema codecs.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The composed codec family.\n */\nexport function makeSchemaCodecs(options: ICodecOptions): ICodecFamily<TreeStoredSchema> {\n\treturn makeCodecFamily([[SchemaCodecVersion.v1, makeSchemaCodecV1(options)]]);\n}\n\n/**\n * Encode an in-memory TreeStoredSchema into the specified format version.\n * @param repo - The in-memory schema.\n * @param version - The schema write version.\n * @returns The encoded schema.\n */\nexport function encodeRepo(\n\trepo: TreeStoredSchema,\n\tversion: SchemaCodecVersion,\n): JsonCompatible {\n\tswitch (version) {\n\t\tcase SchemaCodecVersion.v1:\n\t\t\treturn encodeRepoV1(repo);\n\t\tdefault:\n\t\t\tunreachableCase(version);\n\t}\n}\n\nfunction encodeRepoV1(repo: TreeStoredSchema): FormatV1 {\n\tconst nodeSchema: Record<string, schemaFormatV1.TreeNodeSchemaDataFormat> =\n\t\tObject.create(null);\n\tconst rootFieldSchema = encodeFieldSchema(repo.rootFieldSchema);\n\tfor (const name of [...repo.nodeSchema.keys()].sort()) {\n\t\tconst schema = repo.nodeSchema.get(name) ?? fail(0xb28 /* missing schema */);\n\t\tObject.defineProperty(nodeSchema, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tvalue: schema.encode(),\n\t\t});\n\t}\n\treturn {\n\t\tversion: schemaFormatV1.version,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\nfunction decode(f: FormatV1): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tnodeSchema.set(brand(key), storedSchemaDecodeDispatcher.dispatch(schema));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The codec.\n */\nfunction makeSchemaCodecV1(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV1> {\n\treturn makeVersionedValidatedCodec(options, new Set([schemaFormatV1.version]), FormatV1, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepoV1(data),\n\t\tdecode: (data: FormatV1) => decode(data),\n\t});\n}\n"]}
1
+ {"version":3,"file":"codec.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/codec.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA4E;AAE5E,mDAQ8B;AAC9B,kDAS6B;AAC7B,kDAAiE;AAEjE,+CAAmD;AAEnD;;;;GAIG;AACH,SAAgB,4BAA4B,CAC3C,aAAiC;IAEjC,+DAA+D;IAC/D,OAAO,wBAAa,CAAC,EAAE,CAAC;AACzB,CAAC;AALD,oEAKC;AAED;;;;;;;GAOG;AACH,SAAgB,eAAe,CAC9B,OAAsB,EACtB,YAA2B;IAE3B,MAAM,MAAM,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACzC,OAAO,IAAA,sCAA2B,EAAC,MAAM,EAAE,EAAE,GAAG,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;AAC1E,CAAC;AAND,0CAMC;AAED;;;;GAIG;AACH,SAAgB,gBAAgB,CAAC,OAAsB;IACtD,OAAO,IAAA,0BAAe,EAAC,CAAC,CAAC,wBAAa,CAAC,EAAE,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AAC1E,CAAC;AAFD,4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GAAG,CAAC,EAAE,uCAA4B,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3E,CAAC;IACD,OAAO;QACN,eAAe,EAAE,IAAA,4BAAiB,EAAC,CAAC,CAAC,IAAI,CAAC;QAC1C,UAAU;KACV,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,iBAAiB,CAAC,OAAsB;IAChD,OAAO,IAAA,sCAA2B,EAAC,OAAO,EAAE,IAAI,GAAG,CAAC,CAAC,wBAAa,CAAC,EAAE,CAAC,CAAC,EAAE,oBAAQ,EAAE;QAClF,MAAM,EAAE,CAAC,IAAsB,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC;QACtD,MAAM,EAAE,CAAC,IAAc,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC;KACxC,CAAC,CAAC;AACJ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { fail, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype FluidClientVersion,\n\ttype ICodecFamily,\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeCodecFamily,\n\tmakeVersionDispatchingCodec,\n\tmakeVersionedValidatedCodec,\n} from \"../../codec/index.js\";\nimport {\n\tSchemaVersion,\n\ttype TreeNodeSchemaIdentifier,\n\ttype TreeNodeStoredSchema,\n\ttype TreeStoredSchema,\n\tdecodeFieldSchema,\n\tencodeFieldSchema,\n\ttype schemaFormatV1,\n\tstoredSchemaDecodeDispatcher,\n} from \"../../core/index.js\";\nimport { brand, type JsonCompatible } from \"../../util/index.js\";\n\nimport { Format as FormatV1 } from \"./formatV1.js\";\n\n/**\n * Convert a FluidClientVersion to a SchemaVersion.\n * @param clientVersion - The FluidClientVersion to convert.\n * @returns The SchemaVersion that corresponds to the provided FluidClientVersion.\n */\nexport function clientVersionToSchemaVersion(\n\tclientVersion: FluidClientVersion,\n): SchemaVersion {\n\t// Only one version of the schema codec is currently supported.\n\treturn SchemaVersion.v1;\n}\n\n/**\n * Create a schema codec.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @param writeVersion - The schema write version.\n * @returns The composed codec.\n *\n * @privateRemarks We should consider using the Shared Tree format version instead as it may be more valuable for application authors than the schema version.\n */\nexport function makeSchemaCodec(\n\toptions: ICodecOptions,\n\twriteVersion: SchemaVersion,\n): IJsonCodec<TreeStoredSchema> {\n\tconst family = makeSchemaCodecs(options);\n\treturn makeVersionDispatchingCodec(family, { ...options, writeVersion });\n}\n\n/**\n * Create a family of schema codecs.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The composed codec family.\n */\nexport function makeSchemaCodecs(options: ICodecOptions): ICodecFamily<TreeStoredSchema> {\n\treturn makeCodecFamily([[SchemaVersion.v1, makeSchemaCodecV1(options)]]);\n}\n\n/**\n * Encode an in-memory TreeStoredSchema into the specified format version.\n * @param repo - The in-memory schema.\n * @param version - The schema write version.\n * @returns The encoded schema.\n */\nexport function encodeRepo(repo: TreeStoredSchema, version: SchemaVersion): JsonCompatible {\n\tswitch (version) {\n\t\tcase SchemaVersion.v1:\n\t\t\treturn encodeRepoV1(repo);\n\t\tdefault:\n\t\t\tunreachableCase(version);\n\t}\n}\n\nfunction encodeRepoV1(repo: TreeStoredSchema): FormatV1 {\n\tconst nodeSchema: Record<string, schemaFormatV1.TreeNodeSchemaDataFormat> =\n\t\tObject.create(null);\n\tconst rootFieldSchema = encodeFieldSchema(repo.rootFieldSchema);\n\tfor (const name of [...repo.nodeSchema.keys()].sort()) {\n\t\tconst schema = repo.nodeSchema.get(name) ?? fail(0xb28 /* missing schema */);\n\t\tObject.defineProperty(nodeSchema, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t\twritable: true,\n\t\t\tvalue: schema.encode(),\n\t\t});\n\t}\n\treturn {\n\t\tversion: SchemaVersion.v1,\n\t\tnodes: nodeSchema,\n\t\troot: rootFieldSchema,\n\t};\n}\n\nfunction decode(f: FormatV1): TreeStoredSchema {\n\tconst nodeSchema: Map<TreeNodeSchemaIdentifier, TreeNodeStoredSchema> = new Map();\n\tfor (const [key, schema] of Object.entries(f.nodes)) {\n\t\tnodeSchema.set(brand(key), storedSchemaDecodeDispatcher.dispatch(schema));\n\t}\n\treturn {\n\t\trootFieldSchema: decodeFieldSchema(f.root),\n\t\tnodeSchema,\n\t};\n}\n\n/**\n * Creates a codec which performs synchronous monolithic encoding of schema content.\n * @param options - Specifies common codec options, including which `validator` to use.\n * @returns The codec.\n */\nfunction makeSchemaCodecV1(options: ICodecOptions): IJsonCodec<TreeStoredSchema, FormatV1> {\n\treturn makeVersionedValidatedCodec(options, new Set([SchemaVersion.v1]), FormatV1, {\n\t\tencode: (data: TreeStoredSchema) => encodeRepoV1(data),\n\t\tdecode: (data: FormatV1) => decode(data),\n\t});\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  import { type Static } from "@sinclair/typebox";
6
- import { schemaFormatV1 } from "../../core/index.js";
6
+ import { SchemaVersion, schemaFormatV1 } from "../../core/index.js";
7
7
  /**
8
8
  * Format for encoding as json.
9
9
  *
@@ -15,7 +15,7 @@ import { schemaFormatV1 } from "../../core/index.js";
15
15
  * It also makes it simpler to determinately sort by keys.
16
16
  */
17
17
  export declare const Format: import("@sinclair/typebox").TObject<{
18
- version: import("@sinclair/typebox").TLiteral<1>;
18
+ version: import("@sinclair/typebox").TLiteral<SchemaVersion>;
19
19
  nodes: import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
20
20
  object: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TObject<{
21
21
  kind: import("@sinclair/typebox").TUnsafe<schemaFormatV1.FieldKindIdentifier>;
@@ -1 +1 @@
1
- {"version":3,"file":"formatV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIrD;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;EAOlB,CAAC;AACF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
1
+ {"version":3,"file":"formatV1.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIpE;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;EAOlB,CAAC;AACF,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC"}
@@ -19,7 +19,7 @@ const noAdditionalProps = { additionalProperties: false };
19
19
  * It also makes it simpler to determinately sort by keys.
20
20
  */
21
21
  exports.Format = typebox_1.Type.Object({
22
- version: typebox_1.Type.Literal(index_js_1.schemaFormatV1.version),
22
+ version: typebox_1.Type.Literal(index_js_1.SchemaVersion.v1),
23
23
  nodes: typebox_1.Type.Record(typebox_1.Type.String(), index_js_1.schemaFormatV1.TreeNodeSchemaDataFormat),
24
24
  root: index_js_1.schemaFormatV1.FieldSchemaFormat,
25
25
  }, noAdditionalProps);
@@ -1 +1 @@
1
- {"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,kDAAqD;AAErD,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE;;;;;;;;;GASG;AACU,QAAA,MAAM,GAAG,cAAI,CAAC,MAAM,CAChC;IACC,OAAO,EAAE,cAAI,CAAC,OAAO,CAAC,yBAAc,CAAC,OAAO,CAAC;IAC7C,KAAK,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,yBAAc,CAAC,wBAAwB,CAAC;IAC1E,IAAI,EAAE,yBAAc,CAAC,iBAAiB;CACtC,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { schemaFormatV1 } from \"../../core/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n/**\n * Format for encoding as json.\n *\n * For consistency all lists are sorted and undefined values are omitted.\n *\n * This chooses to use lists of named objects instead of maps:\n * this choice is somewhat arbitrary, but avoids user data being used as object keys,\n * which can sometimes be an issue (for example handling that for \"__proto__\" can require care).\n * It also makes it simpler to determinately sort by keys.\n */\nexport const Format = Type.Object(\n\t{\n\t\tversion: Type.Literal(schemaFormatV1.version),\n\t\tnodes: Type.Record(Type.String(), schemaFormatV1.TreeNodeSchemaDataFormat),\n\t\troot: schemaFormatV1.FieldSchemaFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type Format = Static<typeof Format>;\n"]}
1
+ {"version":3,"file":"formatV1.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/formatV1.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAA0E;AAE1E,kDAAoE;AAEpE,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE;;;;;;;;;GASG;AACU,QAAA,MAAM,GAAG,cAAI,CAAC,MAAM,CAChC;IACC,OAAO,EAAE,cAAI,CAAC,OAAO,CAAC,wBAAa,CAAC,EAAE,CAAC;IACvC,KAAK,EAAE,cAAI,CAAC,MAAM,CAAC,cAAI,CAAC,MAAM,EAAE,EAAE,yBAAc,CAAC,wBAAwB,CAAC;IAC1E,IAAI,EAAE,yBAAc,CAAC,iBAAiB;CACtC,EACD,iBAAiB,CACjB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, Type } from \"@sinclair/typebox\";\n\nimport { SchemaVersion, schemaFormatV1 } from \"../../core/index.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\n/**\n * Format for encoding as json.\n *\n * For consistency all lists are sorted and undefined values are omitted.\n *\n * This chooses to use lists of named objects instead of maps:\n * this choice is somewhat arbitrary, but avoids user data being used as object keys,\n * which can sometimes be an issue (for example handling that for \"__proto__\" can require care).\n * It also makes it simpler to determinately sort by keys.\n */\nexport const Format = Type.Object(\n\t{\n\t\tversion: Type.Literal(SchemaVersion.v1),\n\t\tnodes: Type.Record(Type.String(), schemaFormatV1.TreeNodeSchemaDataFormat),\n\t\troot: schemaFormatV1.FieldSchemaFormat,\n\t},\n\tnoAdditionalProps,\n);\nexport type Format = Static<typeof Format>;\n"]}
@@ -3,6 +3,6 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { SchemaSummarizer, encodeTreeSchema } from "./schemaSummarizer.js";
6
- export { makeSchemaCodec, makeSchemaCodecs, SchemaCodecVersion, clientVersionToSchemaVersion, } from "./codec.js";
6
+ export { makeSchemaCodec, makeSchemaCodecs, clientVersionToSchemaVersion, } from "./codec.js";
7
7
  export { Format } from "./formatV1.js";
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EACN,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,GAC5B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EACN,eAAe,EACf,gBAAgB,EAChB,4BAA4B,GAC5B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC"}
@@ -4,14 +4,13 @@
4
4
  * Licensed under the MIT License.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.Format = exports.clientVersionToSchemaVersion = exports.SchemaCodecVersion = exports.makeSchemaCodecs = exports.makeSchemaCodec = exports.encodeTreeSchema = exports.SchemaSummarizer = void 0;
7
+ exports.Format = exports.clientVersionToSchemaVersion = exports.makeSchemaCodecs = exports.makeSchemaCodec = exports.encodeTreeSchema = exports.SchemaSummarizer = void 0;
8
8
  var schemaSummarizer_js_1 = require("./schemaSummarizer.js");
9
9
  Object.defineProperty(exports, "SchemaSummarizer", { enumerable: true, get: function () { return schemaSummarizer_js_1.SchemaSummarizer; } });
10
10
  Object.defineProperty(exports, "encodeTreeSchema", { enumerable: true, get: function () { return schemaSummarizer_js_1.encodeTreeSchema; } });
11
11
  var codec_js_1 = require("./codec.js");
12
12
  Object.defineProperty(exports, "makeSchemaCodec", { enumerable: true, get: function () { return codec_js_1.makeSchemaCodec; } });
13
13
  Object.defineProperty(exports, "makeSchemaCodecs", { enumerable: true, get: function () { return codec_js_1.makeSchemaCodecs; } });
14
- Object.defineProperty(exports, "SchemaCodecVersion", { enumerable: true, get: function () { return codec_js_1.SchemaCodecVersion; } });
15
14
  Object.defineProperty(exports, "clientVersionToSchemaVersion", { enumerable: true, get: function () { return codec_js_1.clientVersionToSchemaVersion; } });
16
15
  var formatV1_js_1 = require("./formatV1.js");
17
16
  Object.defineProperty(exports, "Format", { enumerable: true, get: function () { return formatV1_js_1.Format; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6DAA2E;AAAlE,uHAAA,gBAAgB,OAAA;AAAE,uHAAA,gBAAgB,OAAA;AAC3C,uCAKoB;AAJnB,2GAAA,eAAe,OAAA;AACf,4GAAA,gBAAgB,OAAA;AAChB,8GAAA,kBAAkB,OAAA;AAClB,wHAAA,4BAA4B,OAAA;AAE7B,6CAAuC;AAA9B,qGAAA,MAAM,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { SchemaSummarizer, encodeTreeSchema } from \"./schemaSummarizer.js\";\nexport {\n\tmakeSchemaCodec,\n\tmakeSchemaCodecs,\n\tSchemaCodecVersion,\n\tclientVersionToSchemaVersion,\n} from \"./codec.js\";\nexport { Format } from \"./formatV1.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6DAA2E;AAAlE,uHAAA,gBAAgB,OAAA;AAAE,uHAAA,gBAAgB,OAAA;AAC3C,uCAIoB;AAHnB,2GAAA,eAAe,OAAA;AACf,4GAAA,gBAAgB,OAAA;AAChB,wHAAA,4BAA4B,OAAA;AAE7B,6CAAuC;AAA9B,qGAAA,MAAM,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { SchemaSummarizer, encodeTreeSchema } from \"./schemaSummarizer.js\";\nexport {\n\tmakeSchemaCodec,\n\tmakeSchemaCodecs,\n\tclientVersionToSchemaVersion,\n} from \"./codec.js\";\nexport { Format } from \"./formatV1.js\";\n"]}
@@ -7,8 +7,8 @@ import type { IExperimentalIncrementalSummaryContext, ISummaryTreeWithStats, ITe
7
7
  import type { IJsonCodec } from "../../codec/index.js";
8
8
  import { type MutableTreeStoredSchema, type TreeStoredSchema } from "../../core/index.js";
9
9
  import type { Summarizable, SummaryElementParser, SummaryElementStringifier } from "../../shared-tree-core/index.js";
10
- import type { CollabWindow } from "../incrementalSummarizationUtils.js";
11
10
  import type { JsonCompatible } from "../../util/index.js";
11
+ import type { CollabWindow } from "../incrementalSummarizationUtils.js";
12
12
  /**
13
13
  * Provides methods for summarizing and loading a schema repository.
14
14
  */
@@ -1 +1 @@
1
- {"version":3,"file":"schemaSummarizer.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/schemaSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAE7F,OAAO,KAAK,EACX,sCAAsC,EACtC,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,8CAA8C,CAAC;AAGtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAGxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D;;GAEG;AACH,qBAAa,gBAAiB,YAAW,YAAY;IAMnD,OAAO,CAAC,QAAQ,CAAC,MAAM;IAEvB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAPvB,SAAgB,GAAG,YAAY;IAE/B,OAAO,CAAC,yBAAyB,CAAqB;gBAGpC,MAAM,EAAE,uBAAuB,EAChD,YAAY,EAAE,YAAY,EACT,KAAK,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAS9C,gBAAgB,CACtB,SAAS,EAAE,yBAAyB,EACpC,QAAQ,CAAC,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE,OAAO,EACpB,gBAAgB,CAAC,EAAE,iBAAiB,EACpC,yBAAyB,CAAC,EAAE,sCAAsC,GAAG,SAAS,GAC5E,qBAAqB;IAmBX,SAAS,CACrB,SAAS,EAAE,yBAAyB,EACpC,QAAQ,CAAC,EAAE,OAAO,EAClB,UAAU,CAAC,EAAE,OAAO,EACpB,gBAAgB,CAAC,EAAE,iBAAiB,EACpC,yBAAyB,CAAC,EAAE,sCAAsC,GAAG,SAAS,GAC5E,OAAO,CAAC,qBAAqB,CAAC;IAIpB,IAAI,CAChB,QAAQ,EAAE,sBAAsB,EAChC,KAAK,EAAE,oBAAoB,GACzB,OAAO,CAAC,IAAI,CAAC;CAgBhB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC/B,MAAM,EAAE,gBAAgB,EACxB,YAAY,EAAE,MAAM,GAClB,cAAc,CAEhB"}
1
+ {"version":3,"file":"schemaSummarizer.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/schemaSummarizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAE7F,OAAO,KAAK,EACX,sCAAsC,EACtC,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,8CAA8C,CAAC;AAGtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACN,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EAErB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EACX,YAAY,EACZ,oBAAoB,EACpB,yBAAyB,EACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE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ChB,QAAgC,EAChC,KAA2B;QAE3B,MAAM,YAAY,GAAoB,MAAM,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC/E,kEAAkE;QAClE,0EAA0E;QAC1E,iDAAiD;QACjD,IAAA,iBAAM,EACL,IAAA,4BAAiB,EAAC,IAAI,CAAC,MAAM,CAAC,EAC9B,KAAK,CAAC,0EAA0E,CAChF,CAAC;QAEF,MAAM,YAAY,GAAG,IAAA,6BAAc,EAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAC3D,+DAA+D;QAC/D,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,yBAAyB,GAAG,CAAC,CAAC;IACpC,CAAC;CACD;AAvED,4CAuEC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAC/B,MAAwB,EACxB,YAAoB;IAEpB,OAAO,IAAA,qBAAU,EAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AACzC,CAAC;AALD,4CAKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIExperimentalIncrementalSummaryContext,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\n\nimport type { IJsonCodec } from \"../../codec/index.js\";\nimport {\n\ttype MutableTreeStoredSchema,\n\ttype TreeStoredSchema,\n\tschemaDataIsEmpty,\n} from \"../../core/index.js\";\nimport type {\n\tSummarizable,\n\tSummaryElementParser,\n\tSummaryElementStringifier,\n} from \"../../shared-tree-core/index.js\";\nimport type { CollabWindow } from \"../incrementalSummarizationUtils.js\";\n\nimport { encodeRepo } from \"./codec.js\";\nimport type { JsonCompatible } from \"../../util/index.js\";\n\nconst schemaStringKey = \"SchemaString\";\n/**\n * Provides methods for summarizing and loading a schema repository.\n */\nexport class SchemaSummarizer implements Summarizable {\n\tpublic readonly key = \"Schema\";\n\n\tprivate schemaIndexLastChangedSeq: number | undefined;\n\n\tpublic constructor(\n\t\tprivate readonly schema: MutableTreeStoredSchema,\n\t\tcollabWindow: CollabWindow,\n\t\tprivate readonly codec: IJsonCodec<TreeStoredSchema>,\n\t) {\n\t\tthis.schema.events.on(\"afterSchemaChange\", () => {\n\t\t\t// Invalidate the cache, as we need to regenerate the blob if the schema changes\n\t\t\t// We are assuming that schema changes from remote ops are valid, as we are in a summarization context.\n\t\t\tthis.schemaIndexLastChangedSeq = collabWindow.getCurrentSeq();\n\t\t});\n\t}\n\n\tpublic getAttachSummary(\n\t\tstringify: SummaryElementStringifier,\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext | undefined,\n\t): ISummaryTreeWithStats {\n\t\tconst builder = new SummaryTreeBuilder();\n\t\tif (\n\t\t\tincrementalSummaryContext !== undefined &&\n\t\t\tthis.schemaIndexLastChangedSeq !== undefined &&\n\t\t\tincrementalSummaryContext.latestSummarySequenceNumber >= this.schemaIndexLastChangedSeq\n\t\t) {\n\t\t\tbuilder.addHandle(\n\t\t\t\tschemaStringKey,\n\t\t\t\tSummaryType.Blob,\n\t\t\t\t`${incrementalSummaryContext.summaryPath}/indexes/${this.key}/${schemaStringKey}`,\n\t\t\t);\n\t\t} else {\n\t\t\tconst dataString = JSON.stringify(this.codec.encode(this.schema));\n\t\t\tbuilder.addBlob(schemaStringKey, dataString);\n\t\t}\n\t\treturn builder.getSummaryTree();\n\t}\n\n\tpublic async summarize(\n\t\tstringify: SummaryElementStringifier,\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext | undefined,\n\t): Promise<ISummaryTreeWithStats> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic async load(\n\t\tservices: IChannelStorageService,\n\t\tparse: SummaryElementParser,\n\t): Promise<void> {\n\t\tconst schemaBuffer: ArrayBufferLike = await services.readBlob(schemaStringKey);\n\t\t// After the awaits, validate that the schema is in a clean state.\n\t\t// This detects any schema that could have been accidentally added through\n\t\t// invalid means and are about to be overwritten.\n\t\tassert(\n\t\t\tschemaDataIsEmpty(this.schema),\n\t\t\t0x3da /* there should not already be stored schema when loading stored schema */,\n\t\t);\n\n\t\tconst schemaString = bufferToString(schemaBuffer, \"utf-8\");\n\t\t// Currently no Fluid handles are used, so just use JSON.parse.\n\t\tconst decoded = this.codec.decode(JSON.parse(schemaString));\n\t\tthis.schema.apply(decoded);\n\t\tthis.schemaIndexLastChangedSeq = 0;\n\t}\n}\n\n/**\n * Dumps schema into a deterministic JSON compatible semi-human readable format.\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 */\nexport function encodeTreeSchema(\n\tschema: TreeStoredSchema,\n\twriteVersion: number,\n): JsonCompatible {\n\treturn encodeRepo(schema, writeVersion);\n}\n"]}
1
+ {"version":3,"file":"schemaSummarizer.js","sourceRoot":"","sources":["../../../src/feature-libraries/schema-index/schemaSummarizer.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA8D;AAC9D,kEAA6D;AAE7D,2EAAiE;AAMjE,qEAA4E;AAG5E,kDAI6B;AAS7B,yCAAwC;AAExC,MAAM,eAAe,GAAG,cAAc,CAAC;AACvC;;GAEG;AACH,MAAa,gBAAgB;IAK5B,YACkB,MAA+B,EA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B,MAAM,YAAY,GAAoB,MAAM,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;QAC/E,kEAAkE;QAClE,0EAA0E;QAC1E,iDAAiD;QACjD,IAAA,iBAAM,EACL,IAAA,4BAAiB,EAAC,IAAI,CAAC,MAAM,CAAC,EAC9B,KAAK,CAAC,0EAA0E,CAChF,CAAC;QAEF,MAAM,YAAY,GAAG,IAAA,6BAAc,EAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAC3D,+DAA+D;QAC/D,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC3B,IAAI,CAAC,yBAAyB,GAAG,CAAC,CAAC;IACpC,CAAC;CACD;AAvED,4CAuEC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAC/B,MAAwB,EACxB,YAAoB;IAEpB,OAAO,IAAA,qBAAU,EAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AACzC,CAAC;AALD,4CAKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { IChannelStorageService } from \"@fluidframework/datastore-definitions/internal\";\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\nimport type {\n\tIExperimentalIncrementalSummaryContext,\n\tISummaryTreeWithStats,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions/internal\";\nimport { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\n\nimport type { IJsonCodec } from \"../../codec/index.js\";\nimport {\n\ttype MutableTreeStoredSchema,\n\ttype TreeStoredSchema,\n\tschemaDataIsEmpty,\n} from \"../../core/index.js\";\nimport type {\n\tSummarizable,\n\tSummaryElementParser,\n\tSummaryElementStringifier,\n} from \"../../shared-tree-core/index.js\";\nimport type { JsonCompatible } from \"../../util/index.js\";\nimport type { CollabWindow } from \"../incrementalSummarizationUtils.js\";\n\nimport { encodeRepo } from \"./codec.js\";\n\nconst schemaStringKey = \"SchemaString\";\n/**\n * Provides methods for summarizing and loading a schema repository.\n */\nexport class SchemaSummarizer implements Summarizable {\n\tpublic readonly key = \"Schema\";\n\n\tprivate schemaIndexLastChangedSeq: number | undefined;\n\n\tpublic constructor(\n\t\tprivate readonly schema: MutableTreeStoredSchema,\n\t\tcollabWindow: CollabWindow,\n\t\tprivate readonly codec: IJsonCodec<TreeStoredSchema>,\n\t) {\n\t\tthis.schema.events.on(\"afterSchemaChange\", () => {\n\t\t\t// Invalidate the cache, as we need to regenerate the blob if the schema changes\n\t\t\t// We are assuming that schema changes from remote ops are valid, as we are in a summarization context.\n\t\t\tthis.schemaIndexLastChangedSeq = collabWindow.getCurrentSeq();\n\t\t});\n\t}\n\n\tpublic getAttachSummary(\n\t\tstringify: SummaryElementStringifier,\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext | undefined,\n\t): ISummaryTreeWithStats {\n\t\tconst builder = new SummaryTreeBuilder();\n\t\tif (\n\t\t\tincrementalSummaryContext !== undefined &&\n\t\t\tthis.schemaIndexLastChangedSeq !== undefined &&\n\t\t\tincrementalSummaryContext.latestSummarySequenceNumber >= this.schemaIndexLastChangedSeq\n\t\t) {\n\t\t\tbuilder.addHandle(\n\t\t\t\tschemaStringKey,\n\t\t\t\tSummaryType.Blob,\n\t\t\t\t`${incrementalSummaryContext.summaryPath}/indexes/${this.key}/${schemaStringKey}`,\n\t\t\t);\n\t\t} else {\n\t\t\tconst dataString = JSON.stringify(this.codec.encode(this.schema));\n\t\t\tbuilder.addBlob(schemaStringKey, dataString);\n\t\t}\n\t\treturn builder.getSummaryTree();\n\t}\n\n\tpublic async summarize(\n\t\tstringify: SummaryElementStringifier,\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t\tincrementalSummaryContext?: IExperimentalIncrementalSummaryContext | undefined,\n\t): Promise<ISummaryTreeWithStats> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic async load(\n\t\tservices: IChannelStorageService,\n\t\tparse: SummaryElementParser,\n\t): Promise<void> {\n\t\tconst schemaBuffer: ArrayBufferLike = await services.readBlob(schemaStringKey);\n\t\t// After the awaits, validate that the schema is in a clean state.\n\t\t// This detects any schema that could have been accidentally added through\n\t\t// invalid means and are about to be overwritten.\n\t\tassert(\n\t\t\tschemaDataIsEmpty(this.schema),\n\t\t\t0x3da /* there should not already be stored schema when loading stored schema */,\n\t\t);\n\n\t\tconst schemaString = bufferToString(schemaBuffer, \"utf-8\");\n\t\t// Currently no Fluid handles are used, so just use JSON.parse.\n\t\tconst decoded = this.codec.decode(JSON.parse(schemaString));\n\t\tthis.schema.apply(decoded);\n\t\tthis.schemaIndexLastChangedSeq = 0;\n\t}\n}\n\n/**\n * Dumps schema into a deterministic JSON compatible semi-human readable format.\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 */\nexport function encodeTreeSchema(\n\tschema: TreeStoredSchema,\n\twriteVersion: number,\n): JsonCompatible {\n\treturn encodeRepo(schema, writeVersion);\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"formatV3.d.ts","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/formatV3.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAsB,KAAK,MAAM,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAC;AAGxF,OAAO,EAGN,KAAK,OAAO,IAAI,SAAS,EAEzB,MAAM,eAAe,CAAC;AAIvB,QAAA,MAAM,MAAM;;EAKX,CAAC;AAEF,QAAA,MAAM,UAAU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AEnC,wCAAwC;AACxC,4EAA4E;AACrE,MAAM,SAAS,GAAG,CAAyB,WAAmB,EAAE,EAAE,CACxE,cAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AADlB,QAAA,SAAS,aACS","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\nimport {\n\tCellId,\n\tCellMark,\n\ttype Encoded as EncodedV2,\n\tMarkEffect as MarkEffectV2,\n} from \"./formatV2.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nconst Rename = Type.Object(\n\t{\n\t\tidOverride: CellId,\n\t},\n\tnoAdditionalProps,\n);\n\nconst MarkEffect = Type.Composite(\n\t[MarkEffectV2, Type.Object({ rename: Type.Optional(Rename) })],\n\tunionOptions,\n);\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst Mark = <Schema extends TSchema>(tNodeChange: Schema) =>\n\tCellMark(MarkEffect, tNodeChange);\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const Changeset = <Schema extends TSchema>(tNodeChange: Schema) =>\n\tType.Array(Mark(tNodeChange));\n\n/**\n * @privateRemarks - Many of these names are currently used in the sequence-field types. Putting them in a namespace makes codec code more readable.\n */\nexport namespace Encoded {\n\texport type CellCount = EncodedV2.CellCount;\n\n\texport type MoveId = EncodedV2.MoveId;\n\texport type IdRange = EncodedV2.IdRange;\n\texport type CellId = EncodedV2.CellId;\n\texport type Insert = EncodedV2.Insert;\n\texport type MoveIn = EncodedV2.MoveIn;\n\texport type Remove = EncodedV2.Remove;\n\texport type MoveOut = EncodedV2.MoveOut;\n\texport type Attach = EncodedV2.Attach;\n\texport type Detach = EncodedV2.Detach;\n\texport type AttachAndDetach = EncodedV2.AttachAndDetach;\n\texport type CellMark<\n\t\tSchema extends TSchema,\n\t\tTNodeChange extends TSchema,\n\t> = EncodedV2.CellMark<Schema, TNodeChange>;\n\n\texport type Rename = Static<typeof Rename>;\n\texport type MarkEffect = Static<typeof MarkEffect>;\n\texport type Mark<Schema extends TSchema> = Static<ReturnType<typeof Mark<Schema>>>;\n\texport type Changeset<Schema extends TSchema> = Static<ReturnType<typeof Changeset<Schema>>>;\n}\n"]}
1
+ {"version":3,"file":"formatV3.js","sourceRoot":"","sources":["../../../src/feature-libraries/sequence-field/formatV3.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+CAAwF;AAExF,mDAAoD;AAEpD,+CAKuB;AAEvB,MAAM,iBAAiB,GAAkB,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAAC;AAEzE,MAAM,MAAM,GAAG,cAAI,CAAC,MAAM,CACzB;IACC,UAAU,EAAE,oBAAM;CAClB,EACD,iBAAiB,CACjB,CAAC;AAEF,MAAM,UAAU,GAAG,cAAI,CAAC,SAAS,CAChC,CAAC,wBAAY,EAAE,cAAI,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,cAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAC9D,uBAAY,CACZ,CAAC;AAEF,wCAAwC;AACxC,4EAA4E;AAC5E,MAAM,IAAI,GAAG,CAAyB,WAAmB,EAAE,EAAE,CAC5D,IAAA,sBAAQ,EAAC,UAAU,EAAE,WAAW,CAAC,CAAC;AAEnC,wCAAwC;AACxC,4EAA4E;AACrE,MAAM,SAAS,GAAG,CAAyB,WAAmB,EAAE,EAAE,CACxE,cAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;AADlB,QAAA,SAAS,aACS","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type ObjectOptions, type Static, type TSchema, Type } from \"@sinclair/typebox\";\n\nimport { unionOptions } from \"../../codec/index.js\";\n\nimport {\n\tCellId,\n\tCellMark,\n\ttype Encoded as EncodedV2,\n\tMarkEffect as MarkEffectV2,\n} from \"./formatV2.js\";\n\nconst noAdditionalProps: ObjectOptions = { additionalProperties: false };\n\nconst Rename = Type.Object(\n\t{\n\t\tidOverride: CellId,\n\t},\n\tnoAdditionalProps,\n);\n\nconst MarkEffect = Type.Composite(\n\t[MarkEffectV2, Type.Object({ rename: Type.Optional(Rename) })],\n\tunionOptions,\n);\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nconst Mark = <Schema extends TSchema>(tNodeChange: Schema) =>\n\tCellMark(MarkEffect, tNodeChange);\n\n// Return type is intentionally derived.\n// eslint-disable-next-line @typescript-eslint/explicit-function-return-type\nexport const Changeset = <Schema extends TSchema>(tNodeChange: Schema) =>\n\tType.Array(Mark(tNodeChange));\n\n/**\n * @privateRemarks - Many of these names are currently used in the sequence-field types. Putting them in a namespace makes codec code more readable.\n */\nexport namespace Encoded {\n\texport type CellCount = EncodedV2.CellCount;\n\n\texport type MoveId = EncodedV2.MoveId;\n\texport type IdRange = EncodedV2.IdRange;\n\texport type CellId = EncodedV2.CellId;\n\texport type Insert = EncodedV2.Insert;\n\texport type MoveIn = EncodedV2.MoveIn;\n\texport type Remove = EncodedV2.Remove;\n\texport type MoveOut = EncodedV2.MoveOut;\n\texport type Attach = EncodedV2.Attach;\n\texport type Detach = EncodedV2.Detach;\n\texport type AttachAndDetach = EncodedV2.AttachAndDetach;\n\texport type CellMark<\n\t\tSchema extends TSchema,\n\t\tTNodeChange extends TSchema,\n\t> = EncodedV2.CellMark<Schema, TNodeChange>;\n\n\texport type Rename = Static<typeof Rename>;\n\texport type MarkEffect = Static<typeof MarkEffect>;\n\texport type Mark<Schema extends TSchema> = Static<ReturnType<typeof Mark<Schema>>>;\n\texport type Changeset<Schema extends TSchema> = Static<ReturnType<typeof Changeset<Schema>>>;\n}\n"]}