@fluidframework/tree 2.0.0-dev-rc.5.0.0.271045 → 2.0.0-dev-rc.5.0.0.271717

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 (1607) hide show
  1. package/.eslintrc.cjs +5 -0
  2. package/api-report/tree.alpha.api.md +10 -21
  3. package/api-report/tree.beta.api.md +10 -21
  4. package/api-report/tree.public.api.md +10 -21
  5. package/dist/beta.d.ts +0 -1
  6. package/dist/codec/codec.d.ts +2 -2
  7. package/dist/codec/codec.d.ts.map +1 -1
  8. package/dist/codec/codec.js +0 -1
  9. package/dist/codec/codec.js.map +1 -1
  10. package/dist/codec/discriminatedUnions.d.ts +2 -2
  11. package/dist/codec/discriminatedUnions.d.ts.map +1 -1
  12. package/dist/codec/discriminatedUnions.js +0 -1
  13. package/dist/codec/discriminatedUnions.js.map +1 -1
  14. package/dist/codec/noopValidator.d.ts +1 -1
  15. package/dist/codec/noopValidator.d.ts.map +1 -1
  16. package/dist/codec/noopValidator.js.map +1 -1
  17. package/dist/codec/versioned/codec.d.ts +3 -3
  18. package/dist/codec/versioned/codec.d.ts.map +1 -1
  19. package/dist/codec/versioned/codec.js.map +1 -1
  20. package/dist/codec/versioned/format.d.ts +1 -1
  21. package/dist/codec/versioned/format.d.ts.map +1 -1
  22. package/dist/codec/versioned/format.js.map +1 -1
  23. package/dist/core/change-family/changeFamily.d.ts +5 -5
  24. package/dist/core/change-family/changeFamily.d.ts.map +1 -1
  25. package/dist/core/change-family/changeFamily.js.map +1 -1
  26. package/dist/core/change-family/editBuilder.d.ts +1 -1
  27. package/dist/core/change-family/editBuilder.d.ts.map +1 -1
  28. package/dist/core/change-family/editBuilder.js +0 -2
  29. package/dist/core/change-family/editBuilder.js.map +1 -1
  30. package/dist/core/forest/editableForest.d.ts +5 -5
  31. package/dist/core/forest/editableForest.d.ts.map +1 -1
  32. package/dist/core/forest/editableForest.js.map +1 -1
  33. package/dist/core/forest/forest.d.ts +3 -3
  34. package/dist/core/forest/forest.d.ts.map +1 -1
  35. package/dist/core/forest/forest.js.map +1 -1
  36. package/dist/core/rebase/changeRebaser.d.ts +1 -1
  37. package/dist/core/rebase/changeRebaser.d.ts.map +1 -1
  38. package/dist/core/rebase/changeRebaser.js.map +1 -1
  39. package/dist/core/rebase/revisionTagCodec.d.ts +4 -4
  40. package/dist/core/rebase/revisionTagCodec.d.ts.map +1 -1
  41. package/dist/core/rebase/revisionTagCodec.js +0 -2
  42. package/dist/core/rebase/revisionTagCodec.js.map +1 -1
  43. package/dist/core/rebase/types.d.ts +3 -3
  44. package/dist/core/rebase/types.d.ts.map +1 -1
  45. package/dist/core/rebase/types.js.map +1 -1
  46. package/dist/core/rebase/utils.d.ts +2 -2
  47. package/dist/core/rebase/utils.d.ts.map +1 -1
  48. package/dist/core/rebase/utils.js.map +1 -1
  49. package/dist/core/schema-stored/format.d.ts +2 -2
  50. package/dist/core/schema-stored/format.d.ts.map +1 -1
  51. package/dist/core/schema-stored/format.js.map +1 -1
  52. package/dist/core/schema-stored/schema.d.ts +3 -3
  53. package/dist/core/schema-stored/schema.d.ts.map +1 -1
  54. package/dist/core/schema-stored/schema.js +0 -4
  55. package/dist/core/schema-stored/schema.js.map +1 -1
  56. package/dist/core/schema-stored/storedSchemaRepository.d.ts +3 -3
  57. package/dist/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  58. package/dist/core/schema-stored/storedSchemaRepository.js +1 -3
  59. package/dist/core/schema-stored/storedSchemaRepository.js.map +1 -1
  60. package/dist/core/schema-view/view.d.ts +1 -1
  61. package/dist/core/schema-view/view.d.ts.map +1 -1
  62. package/dist/core/schema-view/view.js +0 -2
  63. package/dist/core/schema-view/view.js.map +1 -1
  64. package/dist/core/tree/anchorSet.d.ts +56 -18
  65. package/dist/core/tree/anchorSet.d.ts.map +1 -1
  66. package/dist/core/tree/anchorSet.js +97 -52
  67. package/dist/core/tree/anchorSet.js.map +1 -1
  68. package/dist/core/tree/cursor.d.ts +3 -3
  69. package/dist/core/tree/cursor.d.ts.map +1 -1
  70. package/dist/core/tree/cursor.js.map +1 -1
  71. package/dist/core/tree/delta.d.ts +3 -3
  72. package/dist/core/tree/delta.d.ts.map +1 -1
  73. package/dist/core/tree/delta.js.map +1 -1
  74. package/dist/core/tree/deltaUtil.d.ts +2 -2
  75. package/dist/core/tree/deltaUtil.d.ts.map +1 -1
  76. package/dist/core/tree/deltaUtil.js.map +1 -1
  77. package/dist/core/tree/detachedFieldIndex.d.ts +7 -7
  78. package/dist/core/tree/detachedFieldIndex.d.ts.map +1 -1
  79. package/dist/core/tree/detachedFieldIndex.js +2 -8
  80. package/dist/core/tree/detachedFieldIndex.js.map +1 -1
  81. package/dist/core/tree/detachedFieldIndexCodec.d.ts +4 -4
  82. package/dist/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  83. package/dist/core/tree/detachedFieldIndexCodec.js +0 -3
  84. package/dist/core/tree/detachedFieldIndexCodec.js.map +1 -1
  85. package/dist/core/tree/detachedFieldIndexFormat.d.ts +2 -2
  86. package/dist/core/tree/detachedFieldIndexFormat.d.ts.map +1 -1
  87. package/dist/core/tree/detachedFieldIndexFormat.js.map +1 -1
  88. package/dist/core/tree/detachedFieldIndexTypes.d.ts +3 -3
  89. package/dist/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
  90. package/dist/core/tree/detachedFieldIndexTypes.js.map +1 -1
  91. package/dist/core/tree/mapTree.d.ts +2 -2
  92. package/dist/core/tree/mapTree.d.ts.map +1 -1
  93. package/dist/core/tree/mapTree.js.map +1 -1
  94. package/dist/core/tree/pathTree.d.ts +3 -3
  95. package/dist/core/tree/pathTree.d.ts.map +1 -1
  96. package/dist/core/tree/pathTree.js.map +1 -1
  97. package/dist/core/tree/persistedTreeTextFormat.d.ts +1 -1
  98. package/dist/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  99. package/dist/core/tree/persistedTreeTextFormat.js.map +1 -1
  100. package/dist/core/tree/sparseTree.d.ts +2 -2
  101. package/dist/core/tree/sparseTree.d.ts.map +1 -1
  102. package/dist/core/tree/sparseTree.js +11 -15
  103. package/dist/core/tree/sparseTree.js.map +1 -1
  104. package/dist/core/tree/treeTextFormat.d.ts +2 -2
  105. package/dist/core/tree/treeTextFormat.d.ts.map +1 -1
  106. package/dist/core/tree/treeTextFormat.js.map +1 -1
  107. package/dist/core/tree/types.d.ts +3 -3
  108. package/dist/core/tree/types.d.ts.map +1 -1
  109. package/dist/core/tree/types.js +0 -1
  110. package/dist/core/tree/types.js.map +1 -1
  111. package/dist/core/tree/visitDelta.d.ts +5 -5
  112. package/dist/core/tree/visitDelta.d.ts.map +1 -1
  113. package/dist/core/tree/visitDelta.js.map +1 -1
  114. package/dist/core/tree/visitPath.d.ts +2 -2
  115. package/dist/core/tree/visitPath.d.ts.map +1 -1
  116. package/dist/core/tree/visitPath.js.map +1 -1
  117. package/dist/core/tree/visitorUtils.d.ts +7 -7
  118. package/dist/core/tree/visitorUtils.d.ts.map +1 -1
  119. package/dist/core/tree/visitorUtils.js.map +1 -1
  120. package/dist/domains/json/jsonCursor.d.ts +2 -2
  121. package/dist/domains/json/jsonCursor.d.ts.map +1 -1
  122. package/dist/domains/json/jsonCursor.js.map +1 -1
  123. package/dist/domains/json/jsonDomainSchema.js.map +1 -1
  124. package/dist/domains/schemaBuilder.d.ts +2 -2
  125. package/dist/domains/schemaBuilder.d.ts.map +1 -1
  126. package/dist/domains/schemaBuilder.js +70 -70
  127. package/dist/domains/schemaBuilder.js.map +1 -1
  128. package/dist/events/events.js +1 -2
  129. package/dist/events/events.js.map +1 -1
  130. package/dist/feature-libraries/changeAtomIdCodec.d.ts +2 -2
  131. package/dist/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
  132. package/dist/feature-libraries/changeAtomIdCodec.js.map +1 -1
  133. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts +2 -2
  134. package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  135. package/dist/feature-libraries/chunked-forest/basicChunk.js +1 -14
  136. package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  137. package/dist/feature-libraries/chunked-forest/chunk.d.ts +2 -2
  138. package/dist/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
  139. package/dist/feature-libraries/chunked-forest/chunk.js.map +1 -1
  140. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts +4 -4
  141. package/dist/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  142. package/dist/feature-libraries/chunked-forest/chunkTree.js +6 -13
  143. package/dist/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  144. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts +4 -4
  145. package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  146. package/dist/feature-libraries/chunked-forest/chunkedForest.js +2 -9
  147. package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  148. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +3 -3
  149. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
  150. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +3 -1
  151. package/dist/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  152. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +17 -7
  153. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  154. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js +6 -11
  155. package/dist/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  156. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +8 -8
  157. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  158. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +2 -5
  159. package/dist/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  160. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +3 -3
  161. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  162. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +0 -1
  163. package/dist/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  164. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts +6 -5
  165. package/dist/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  166. package/dist/feature-libraries/chunked-forest/codec/codecs.js +4 -1
  167. package/dist/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  168. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +7 -7
  169. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  170. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js +13 -25
  171. package/dist/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  172. package/dist/feature-libraries/chunked-forest/codec/fieldBatch.d.ts +1 -1
  173. package/dist/feature-libraries/chunked-forest/codec/fieldBatch.d.ts.map +1 -1
  174. package/dist/feature-libraries/chunked-forest/codec/fieldBatch.js.map +1 -1
  175. package/dist/feature-libraries/chunked-forest/codec/format.d.ts +1 -1
  176. package/dist/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  177. package/dist/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  178. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +1 -1
  179. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  180. package/dist/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  181. package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts +5 -5
  182. package/dist/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
  183. package/dist/feature-libraries/chunked-forest/codec/nodeShape.js +5 -8
  184. package/dist/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
  185. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts +6 -6
  186. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +1 -1
  187. package/dist/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +1 -1
  188. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +2 -2
  189. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  190. package/dist/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  191. package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts +1 -1
  192. package/dist/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
  193. package/dist/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
  194. package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
  195. package/dist/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
  196. package/dist/feature-libraries/chunked-forest/sequenceChunk.js +0 -1
  197. package/dist/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  198. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts +2 -2
  199. package/dist/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  200. package/dist/feature-libraries/chunked-forest/uniformChunk.js +5 -40
  201. package/dist/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  202. package/dist/feature-libraries/contextuallyTyped.d.ts +5 -5
  203. package/dist/feature-libraries/contextuallyTyped.d.ts.map +1 -1
  204. package/dist/feature-libraries/contextuallyTyped.js.map +1 -1
  205. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -3
  206. package/dist/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  207. package/dist/feature-libraries/default-schema/defaultEditBuilder.js +0 -2
  208. package/dist/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  209. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts +3 -3
  210. package/dist/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  211. package/dist/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  212. package/dist/feature-libraries/default-schema/defaultSchema.d.ts +1 -1
  213. package/dist/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
  214. package/dist/feature-libraries/default-schema/defaultSchema.js.map +1 -1
  215. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts +2 -2
  216. package/dist/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  217. package/dist/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  218. package/dist/feature-libraries/deltaUtils.d.ts +1 -1
  219. package/dist/feature-libraries/deltaUtils.d.ts.map +1 -1
  220. package/dist/feature-libraries/deltaUtils.js.map +1 -1
  221. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts +4 -4
  222. package/dist/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  223. package/dist/feature-libraries/detachedFieldIndexSummarizer.js +1 -2
  224. package/dist/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  225. package/dist/feature-libraries/editableTreeBinder.d.ts +3 -3
  226. package/dist/feature-libraries/editableTreeBinder.d.ts.map +1 -1
  227. package/dist/feature-libraries/editableTreeBinder.js +12 -13
  228. package/dist/feature-libraries/editableTreeBinder.js.map +1 -1
  229. package/dist/feature-libraries/fieldGenerator.d.ts +2 -2
  230. package/dist/feature-libraries/fieldGenerator.d.ts.map +1 -1
  231. package/dist/feature-libraries/fieldGenerator.js.map +1 -1
  232. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts +5 -5
  233. package/dist/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
  234. package/dist/feature-libraries/flex-map-tree/mapTreeNode.js +11 -12
  235. package/dist/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
  236. package/dist/feature-libraries/flex-tree/context.d.ts +8 -8
  237. package/dist/feature-libraries/flex-tree/context.d.ts.map +1 -1
  238. package/dist/feature-libraries/flex-tree/context.js +3 -7
  239. package/dist/feature-libraries/flex-tree/context.js.map +1 -1
  240. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts +9 -9
  241. package/dist/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  242. package/dist/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  243. package/dist/feature-libraries/flex-tree/index.d.ts +1 -1
  244. package/dist/feature-libraries/flex-tree/index.d.ts.map +1 -1
  245. package/dist/feature-libraries/flex-tree/index.js +1 -4
  246. package/dist/feature-libraries/flex-tree/index.js.map +1 -1
  247. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts +4 -4
  248. package/dist/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  249. package/dist/feature-libraries/flex-tree/lazyEntity.js +22 -13
  250. package/dist/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  251. package/dist/feature-libraries/flex-tree/lazyField.d.ts +6 -6
  252. package/dist/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  253. package/dist/feature-libraries/flex-tree/lazyField.js +0 -6
  254. package/dist/feature-libraries/flex-tree/lazyField.js.map +1 -1
  255. package/dist/feature-libraries/flex-tree/lazyNode.d.ts +5 -5
  256. package/dist/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  257. package/dist/feature-libraries/flex-tree/lazyNode.js +19 -13
  258. package/dist/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  259. package/dist/feature-libraries/flex-tree/treeEvents.d.ts +1 -13
  260. package/dist/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  261. package/dist/feature-libraries/flex-tree/treeEvents.js +0 -31
  262. package/dist/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  263. package/dist/feature-libraries/flex-tree/unboxed.d.ts +5 -5
  264. package/dist/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
  265. package/dist/feature-libraries/flex-tree/unboxed.js.map +1 -1
  266. package/dist/feature-libraries/flex-tree/utilities.d.ts +1 -1
  267. package/dist/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  268. package/dist/feature-libraries/flex-tree/utilities.js.map +1 -1
  269. package/dist/feature-libraries/forest-summary/codec.d.ts +3 -3
  270. package/dist/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  271. package/dist/feature-libraries/forest-summary/codec.js.map +1 -1
  272. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts +7 -7
  273. package/dist/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  274. package/dist/feature-libraries/forest-summary/forestSummarizer.js +1 -6
  275. package/dist/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  276. package/dist/feature-libraries/forest-summary/format.d.ts +1 -1
  277. package/dist/feature-libraries/forest-summary/format.d.ts.map +1 -1
  278. package/dist/feature-libraries/forest-summary/format.js.map +1 -1
  279. package/dist/feature-libraries/index.d.ts +1 -1
  280. package/dist/feature-libraries/index.d.ts.map +1 -1
  281. package/dist/feature-libraries/index.js +1 -3
  282. package/dist/feature-libraries/index.js.map +1 -1
  283. package/dist/feature-libraries/mapTreeCursor.d.ts +2 -2
  284. package/dist/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  285. package/dist/feature-libraries/mapTreeCursor.js.map +1 -1
  286. package/dist/feature-libraries/memoizedIdRangeAllocator.d.ts +1 -1
  287. package/dist/feature-libraries/memoizedIdRangeAllocator.d.ts.map +1 -1
  288. package/dist/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
  289. package/dist/feature-libraries/mitigatedChangeFamily.d.ts +1 -1
  290. package/dist/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  291. package/dist/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  292. package/dist/feature-libraries/modular-schema/comparison.d.ts +2 -2
  293. package/dist/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  294. package/dist/feature-libraries/modular-schema/comparison.js.map +1 -1
  295. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts +2 -2
  296. package/dist/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  297. package/dist/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  298. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -7
  299. package/dist/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  300. package/dist/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  301. package/dist/feature-libraries/modular-schema/fieldKind.d.ts +1 -1
  302. package/dist/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  303. package/dist/feature-libraries/modular-schema/fieldKind.js +0 -2
  304. package/dist/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  305. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +2 -2
  306. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  307. package/dist/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  308. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +3 -3
  309. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
  310. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js +0 -3
  311. package/dist/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  312. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts +4 -4
  313. package/dist/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  314. package/dist/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  315. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +2 -2
  316. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  317. package/dist/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  318. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +1 -1
  319. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  320. package/dist/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  321. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +1 -1
  322. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  323. package/dist/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  324. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts +2 -2
  325. package/dist/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  326. package/dist/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  327. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts +5 -5
  328. package/dist/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  329. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js +2 -0
  330. package/dist/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  331. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts +6 -6
  332. package/dist/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  333. package/dist/feature-libraries/modular-schema/modularChangeFamily.js +2 -5
  334. package/dist/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  335. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts +3 -3
  336. package/dist/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  337. package/dist/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
  338. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts +3 -3
  339. package/dist/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  340. package/dist/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  341. package/dist/feature-libraries/node-key/mockNodeKeyManager.d.ts +2 -2
  342. package/dist/feature-libraries/node-key/mockNodeKeyManager.d.ts.map +1 -1
  343. package/dist/feature-libraries/node-key/mockNodeKeyManager.js +4 -2
  344. package/dist/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
  345. package/dist/feature-libraries/node-key/nodeKey.d.ts +3 -3
  346. package/dist/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
  347. package/dist/feature-libraries/node-key/nodeKey.js.map +1 -1
  348. package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts +4 -4
  349. package/dist/feature-libraries/node-key/nodeKeyIndex.d.ts.map +1 -1
  350. package/dist/feature-libraries/node-key/nodeKeyIndex.js +0 -3
  351. package/dist/feature-libraries/node-key/nodeKeyIndex.js.map +1 -1
  352. package/dist/feature-libraries/node-key/nodeKeyManager.d.ts +1 -1
  353. package/dist/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
  354. package/dist/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
  355. package/dist/feature-libraries/object-forest/objectForest.d.ts +2 -2
  356. package/dist/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  357. package/dist/feature-libraries/object-forest/objectForest.js +28 -23
  358. package/dist/feature-libraries/object-forest/objectForest.js.map +1 -1
  359. package/dist/feature-libraries/optional-field/optionalField.d.ts +3 -3
  360. package/dist/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  361. package/dist/feature-libraries/optional-field/optionalField.js +3 -1
  362. package/dist/feature-libraries/optional-field/optionalField.js.map +1 -1
  363. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +1 -1
  364. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  365. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
  366. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +1 -1
  367. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  368. package/dist/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
  369. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +2 -2
  370. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  371. package/dist/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  372. package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts +3 -3
  373. package/dist/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +1 -1
  374. package/dist/feature-libraries/optional-field/optionalFieldCodecV1.js.map +1 -1
  375. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +3 -3
  376. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  377. package/dist/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  378. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -2
  379. package/dist/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  380. package/dist/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  381. package/dist/feature-libraries/schema-aware/schemaAware.d.ts +4 -4
  382. package/dist/feature-libraries/schema-aware/schemaAware.d.ts.map +1 -1
  383. package/dist/feature-libraries/schema-aware/schemaAware.js +0 -2
  384. package/dist/feature-libraries/schema-aware/schemaAware.js.map +1 -1
  385. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  386. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  387. package/dist/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  388. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts +1 -1
  389. package/dist/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  390. package/dist/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  391. package/dist/feature-libraries/schema-edits/schemaChangeTypes.d.ts +1 -1
  392. package/dist/feature-libraries/schema-edits/schemaChangeTypes.d.ts.map +1 -1
  393. package/dist/feature-libraries/schema-edits/schemaChangeTypes.js.map +1 -1
  394. package/dist/feature-libraries/schema-index/codec.d.ts +2 -2
  395. package/dist/feature-libraries/schema-index/codec.d.ts.map +1 -1
  396. package/dist/feature-libraries/schema-index/codec.js.map +1 -1
  397. package/dist/feature-libraries/schema-index/format.d.ts +1 -1
  398. package/dist/feature-libraries/schema-index/format.d.ts.map +1 -1
  399. package/dist/feature-libraries/schema-index/format.js.map +1 -1
  400. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts +7 -7
  401. package/dist/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  402. package/dist/feature-libraries/schema-index/schemaSummarizer.js +1 -5
  403. package/dist/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  404. package/dist/feature-libraries/schemaBuilder.d.ts +2 -2
  405. package/dist/feature-libraries/schemaBuilder.d.ts.map +1 -1
  406. package/dist/feature-libraries/schemaBuilder.js.map +1 -1
  407. package/dist/feature-libraries/schemaBuilderBase.d.ts +4 -4
  408. package/dist/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
  409. package/dist/feature-libraries/schemaBuilderBase.js +3 -14
  410. package/dist/feature-libraries/schemaBuilderBase.js.map +1 -1
  411. package/dist/feature-libraries/sequence-field/compose.d.ts +5 -5
  412. package/dist/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  413. package/dist/feature-libraries/sequence-field/compose.js +0 -6
  414. package/dist/feature-libraries/sequence-field/compose.js.map +1 -1
  415. package/dist/feature-libraries/sequence-field/formatV1.d.ts +1 -1
  416. package/dist/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  417. package/dist/feature-libraries/sequence-field/formatV1.js.map +1 -1
  418. package/dist/feature-libraries/sequence-field/formatV2.d.ts +1 -1
  419. package/dist/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  420. package/dist/feature-libraries/sequence-field/formatV2.js.map +1 -1
  421. package/dist/feature-libraries/sequence-field/helperTypes.d.ts +1 -1
  422. package/dist/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  423. package/dist/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  424. package/dist/feature-libraries/sequence-field/invert.d.ts +3 -3
  425. package/dist/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  426. package/dist/feature-libraries/sequence-field/invert.js.map +1 -1
  427. package/dist/feature-libraries/sequence-field/markListFactory.d.ts +1 -1
  428. package/dist/feature-libraries/sequence-field/markListFactory.d.ts.map +1 -1
  429. package/dist/feature-libraries/sequence-field/markListFactory.js +4 -3
  430. package/dist/feature-libraries/sequence-field/markListFactory.js.map +1 -1
  431. package/dist/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  432. package/dist/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  433. package/dist/feature-libraries/sequence-field/markQueue.js +2 -4
  434. package/dist/feature-libraries/sequence-field/markQueue.js.map +1 -1
  435. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts +5 -5
  436. package/dist/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  437. package/dist/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  438. package/dist/feature-libraries/sequence-field/prune.d.ts +2 -2
  439. package/dist/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  440. package/dist/feature-libraries/sequence-field/prune.js.map +1 -1
  441. package/dist/feature-libraries/sequence-field/rebase.d.ts +3 -3
  442. package/dist/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  443. package/dist/feature-libraries/sequence-field/rebase.js +0 -6
  444. package/dist/feature-libraries/sequence-field/rebase.js.map +1 -1
  445. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +3 -3
  446. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  447. package/dist/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  448. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts +2 -2
  449. package/dist/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  450. package/dist/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  451. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts +3 -3
  452. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  453. package/dist/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  454. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +2 -2
  455. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
  456. package/dist/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
  457. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +5 -5
  458. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  459. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  460. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +5 -5
  461. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  462. package/dist/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  463. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +4 -4
  464. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  465. package/dist/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  466. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +3 -3
  467. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  468. package/dist/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  469. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -3
  470. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  471. package/dist/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  472. package/dist/feature-libraries/sequence-field/types.d.ts +2 -2
  473. package/dist/feature-libraries/sequence-field/types.d.ts.map +1 -1
  474. package/dist/feature-libraries/sequence-field/types.js.map +1 -1
  475. package/dist/feature-libraries/sequence-field/utils.d.ts +5 -5
  476. package/dist/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  477. package/dist/feature-libraries/sequence-field/utils.js.map +1 -1
  478. package/dist/feature-libraries/storedToViewSchema.d.ts +2 -2
  479. package/dist/feature-libraries/storedToViewSchema.d.ts.map +1 -1
  480. package/dist/feature-libraries/storedToViewSchema.js.map +1 -1
  481. package/dist/feature-libraries/treeCursorUtils.d.ts +1 -1
  482. package/dist/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  483. package/dist/feature-libraries/treeCursorUtils.js +9 -13
  484. package/dist/feature-libraries/treeCursorUtils.js.map +1 -1
  485. package/dist/feature-libraries/treeTextCursor.d.ts +2 -2
  486. package/dist/feature-libraries/treeTextCursor.d.ts.map +1 -1
  487. package/dist/feature-libraries/treeTextCursor.js.map +1 -1
  488. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts +3 -3
  489. package/dist/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
  490. package/dist/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
  491. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts +4 -4
  492. package/dist/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  493. package/dist/feature-libraries/typed-schema/typedTreeSchema.js +4 -23
  494. package/dist/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  495. package/dist/feature-libraries/typed-schema/view.d.ts +4 -4
  496. package/dist/feature-libraries/typed-schema/view.d.ts.map +1 -1
  497. package/dist/feature-libraries/typed-schema/view.js +0 -7
  498. package/dist/feature-libraries/typed-schema/view.js.map +1 -1
  499. package/dist/feature-libraries/valueUtilities.d.ts +2 -2
  500. package/dist/feature-libraries/valueUtilities.d.ts.map +1 -1
  501. package/dist/feature-libraries/valueUtilities.js.map +1 -1
  502. package/dist/index.d.ts +1 -1
  503. package/dist/index.d.ts.map +1 -1
  504. package/dist/index.js +1 -2
  505. package/dist/index.js.map +1 -1
  506. package/dist/packageVersion.d.ts +1 -1
  507. package/dist/packageVersion.js +1 -1
  508. package/dist/packageVersion.js.map +1 -1
  509. package/dist/public.d.ts +0 -1
  510. package/dist/shared-tree/schematizeTree.d.ts +3 -3
  511. package/dist/shared-tree/schematizeTree.d.ts.map +1 -1
  512. package/dist/shared-tree/schematizeTree.js.map +1 -1
  513. package/dist/shared-tree/schematizingTreeView.d.ts +4 -4
  514. package/dist/shared-tree/schematizingTreeView.d.ts.map +1 -1
  515. package/dist/shared-tree/schematizingTreeView.js +10 -27
  516. package/dist/shared-tree/schematizingTreeView.js.map +1 -1
  517. package/dist/shared-tree/sharedTree.d.ts +15 -11
  518. package/dist/shared-tree/sharedTree.d.ts.map +1 -1
  519. package/dist/shared-tree/sharedTree.js +13 -10
  520. package/dist/shared-tree/sharedTree.js.map +1 -1
  521. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts +4 -4
  522. package/dist/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  523. package/dist/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  524. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts +3 -3
  525. package/dist/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  526. package/dist/shared-tree/sharedTreeChangeEnricher.js +11 -14
  527. package/dist/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  528. package/dist/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
  529. package/dist/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  530. package/dist/shared-tree/sharedTreeChangeFamily.js +3 -5
  531. package/dist/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  532. package/dist/shared-tree/sharedTreeChangeFormat.d.ts +1 -1
  533. package/dist/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  534. package/dist/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  535. package/dist/shared-tree/sharedTreeChangeTypes.d.ts +1 -1
  536. package/dist/shared-tree/sharedTreeChangeTypes.d.ts.map +1 -1
  537. package/dist/shared-tree/sharedTreeChangeTypes.js.map +1 -1
  538. package/dist/shared-tree/sharedTreeEditBuilder.d.ts +3 -3
  539. package/dist/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  540. package/dist/shared-tree/sharedTreeEditBuilder.js +0 -2
  541. package/dist/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  542. package/dist/shared-tree/treeApi.d.ts +1 -1
  543. package/dist/shared-tree/treeApi.d.ts.map +1 -1
  544. package/dist/shared-tree/treeApi.js.map +1 -1
  545. package/dist/shared-tree/treeCheckout.d.ts +7 -7
  546. package/dist/shared-tree/treeCheckout.d.ts.map +1 -1
  547. package/dist/shared-tree/treeCheckout.js +11 -22
  548. package/dist/shared-tree/treeCheckout.js.map +1 -1
  549. package/dist/shared-tree/treeView.d.ts +3 -3
  550. package/dist/shared-tree/treeView.d.ts.map +1 -1
  551. package/dist/shared-tree/treeView.js +0 -6
  552. package/dist/shared-tree/treeView.js.map +1 -1
  553. package/dist/shared-tree-core/branch.d.ts +2 -2
  554. package/dist/shared-tree-core/branch.d.ts.map +1 -1
  555. package/dist/shared-tree-core/branch.js +25 -31
  556. package/dist/shared-tree-core/branch.js.map +1 -1
  557. package/dist/shared-tree-core/branchCommitEnricher.d.ts +2 -2
  558. package/dist/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  559. package/dist/shared-tree-core/branchCommitEnricher.js +9 -12
  560. package/dist/shared-tree-core/branchCommitEnricher.js.map +1 -1
  561. package/dist/shared-tree-core/changeEnricher.d.ts +1 -1
  562. package/dist/shared-tree-core/changeEnricher.d.ts.map +1 -1
  563. package/dist/shared-tree-core/changeEnricher.js.map +1 -1
  564. package/dist/shared-tree-core/defaultResubmitMachine.d.ts +2 -2
  565. package/dist/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  566. package/dist/shared-tree-core/defaultResubmitMachine.js +19 -21
  567. package/dist/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  568. package/dist/shared-tree-core/editManager.d.ts +3 -3
  569. package/dist/shared-tree-core/editManager.d.ts.map +1 -1
  570. package/dist/shared-tree-core/editManager.js +37 -53
  571. package/dist/shared-tree-core/editManager.js.map +1 -1
  572. package/dist/shared-tree-core/editManagerCodecs.d.ts +5 -5
  573. package/dist/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  574. package/dist/shared-tree-core/editManagerCodecs.js.map +1 -1
  575. package/dist/shared-tree-core/editManagerFormat.d.ts +4 -4
  576. package/dist/shared-tree-core/editManagerFormat.d.ts.map +1 -1
  577. package/dist/shared-tree-core/editManagerFormat.js.map +1 -1
  578. package/dist/shared-tree-core/editManagerSummarizer.d.ts +9 -9
  579. package/dist/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  580. package/dist/shared-tree-core/editManagerSummarizer.js +1 -5
  581. package/dist/shared-tree-core/editManagerSummarizer.js.map +1 -1
  582. package/dist/shared-tree-core/messageCodecs.d.ts +5 -5
  583. package/dist/shared-tree-core/messageCodecs.d.ts.map +1 -1
  584. package/dist/shared-tree-core/messageCodecs.js.map +1 -1
  585. package/dist/shared-tree-core/messageFormat.d.ts +4 -4
  586. package/dist/shared-tree-core/messageFormat.d.ts.map +1 -1
  587. package/dist/shared-tree-core/messageFormat.js.map +1 -1
  588. package/dist/shared-tree-core/messageTypes.d.ts +2 -2
  589. package/dist/shared-tree-core/messageTypes.d.ts.map +1 -1
  590. package/dist/shared-tree-core/messageTypes.js.map +1 -1
  591. package/dist/shared-tree-core/resubmitMachine.d.ts +1 -1
  592. package/dist/shared-tree-core/resubmitMachine.d.ts.map +1 -1
  593. package/dist/shared-tree-core/resubmitMachine.js.map +1 -1
  594. package/dist/shared-tree-core/sequenceIdUtils.d.ts +1 -1
  595. package/dist/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  596. package/dist/shared-tree-core/sequenceIdUtils.js.map +1 -1
  597. package/dist/shared-tree-core/sharedTreeCore.d.ts +10 -10
  598. package/dist/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  599. package/dist/shared-tree-core/sharedTreeCore.js +7 -24
  600. package/dist/shared-tree-core/sharedTreeCore.js.map +1 -1
  601. package/dist/shared-tree-core/transactionEnricher.d.ts +2 -2
  602. package/dist/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  603. package/dist/shared-tree-core/transactionEnricher.js +1 -3
  604. package/dist/shared-tree-core/transactionEnricher.js.map +1 -1
  605. package/dist/shared-tree-core/transactionStack.d.ts +1 -1
  606. package/dist/shared-tree-core/transactionStack.d.ts.map +1 -1
  607. package/dist/shared-tree-core/transactionStack.js +3 -1
  608. package/dist/shared-tree-core/transactionStack.js.map +1 -1
  609. package/dist/simple-tree/arrayNode.d.ts +2 -2
  610. package/dist/simple-tree/arrayNode.d.ts.map +1 -1
  611. package/dist/simple-tree/arrayNode.js +34 -26
  612. package/dist/simple-tree/arrayNode.js.map +1 -1
  613. package/dist/simple-tree/leafNodeSchema.d.ts +1 -1
  614. package/dist/simple-tree/leafNodeSchema.d.ts.map +1 -1
  615. package/dist/simple-tree/leafNodeSchema.js +2 -4
  616. package/dist/simple-tree/leafNodeSchema.js.map +1 -1
  617. package/dist/simple-tree/mapNode.d.ts +2 -2
  618. package/dist/simple-tree/mapNode.d.ts.map +1 -1
  619. package/dist/simple-tree/mapNode.js +5 -5
  620. package/dist/simple-tree/mapNode.js.map +1 -1
  621. package/dist/simple-tree/nodeKeys.d.ts +2 -2
  622. package/dist/simple-tree/nodeKeys.d.ts.map +1 -1
  623. package/dist/simple-tree/nodeKeys.js.map +1 -1
  624. package/dist/simple-tree/objectNode.d.ts +5 -5
  625. package/dist/simple-tree/objectNode.d.ts.map +1 -1
  626. package/dist/simple-tree/objectNode.js +6 -6
  627. package/dist/simple-tree/objectNode.js.map +1 -1
  628. package/dist/simple-tree/proxies.d.ts +4 -4
  629. package/dist/simple-tree/proxies.d.ts.map +1 -1
  630. package/dist/simple-tree/proxies.js +6 -4
  631. package/dist/simple-tree/proxies.js.map +1 -1
  632. package/dist/simple-tree/proxyBinding.d.ts +6 -6
  633. package/dist/simple-tree/proxyBinding.d.ts.map +1 -1
  634. package/dist/simple-tree/proxyBinding.js.map +1 -1
  635. package/dist/simple-tree/schemaCaching.d.ts +2 -2
  636. package/dist/simple-tree/schemaCaching.d.ts.map +1 -1
  637. package/dist/simple-tree/schemaCaching.js.map +1 -1
  638. package/dist/simple-tree/schemaCreationUtilities.d.ts +5 -5
  639. package/dist/simple-tree/schemaCreationUtilities.d.ts.map +1 -1
  640. package/dist/simple-tree/schemaCreationUtilities.js.map +1 -1
  641. package/dist/simple-tree/schemaFactory.d.ts +25 -12
  642. package/dist/simple-tree/schemaFactory.d.ts.map +1 -1
  643. package/dist/simple-tree/schemaFactory.js +65 -53
  644. package/dist/simple-tree/schemaFactory.js.map +1 -1
  645. package/dist/simple-tree/schemaFactoryRecursive.d.ts +6 -6
  646. package/dist/simple-tree/schemaFactoryRecursive.d.ts.map +1 -1
  647. package/dist/simple-tree/schemaFactoryRecursive.js.map +1 -1
  648. package/dist/simple-tree/schemaTypes.d.ts +6 -6
  649. package/dist/simple-tree/schemaTypes.d.ts.map +1 -1
  650. package/dist/simple-tree/schemaTypes.js +3 -12
  651. package/dist/simple-tree/schemaTypes.js.map +1 -1
  652. package/dist/simple-tree/testRecursiveDomain.d.ts +1 -1
  653. package/dist/simple-tree/testRecursiveDomain.d.ts.map +1 -1
  654. package/dist/simple-tree/testRecursiveDomain.js.map +1 -1
  655. package/dist/simple-tree/toFlexSchema.d.ts +4 -4
  656. package/dist/simple-tree/toFlexSchema.d.ts.map +1 -1
  657. package/dist/simple-tree/toFlexSchema.js.map +1 -1
  658. package/dist/simple-tree/toMapTree.d.ts +2 -2
  659. package/dist/simple-tree/toMapTree.d.ts.map +1 -1
  660. package/dist/simple-tree/toMapTree.js.map +1 -1
  661. package/dist/simple-tree/tree.d.ts +6 -27
  662. package/dist/simple-tree/tree.d.ts.map +1 -1
  663. package/dist/simple-tree/tree.js +0 -21
  664. package/dist/simple-tree/tree.js.map +1 -1
  665. package/dist/simple-tree/treeNodeApi.d.ts +30 -27
  666. package/dist/simple-tree/treeNodeApi.d.ts.map +1 -1
  667. package/dist/simple-tree/treeNodeApi.js +8 -3
  668. package/dist/simple-tree/treeNodeApi.js.map +1 -1
  669. package/dist/simple-tree/types.d.ts +29 -9
  670. package/dist/simple-tree/types.d.ts.map +1 -1
  671. package/dist/simple-tree/types.js +79 -54
  672. package/dist/simple-tree/types.js.map +1 -1
  673. package/dist/simple-tree/typesUnsafe.d.ts +5 -5
  674. package/dist/simple-tree/typesUnsafe.d.ts.map +1 -1
  675. package/dist/simple-tree/typesUnsafe.js.map +1 -1
  676. package/dist/treeFactory.d.ts +5 -5
  677. package/dist/treeFactory.d.ts.map +1 -1
  678. package/dist/treeFactory.js +10 -9
  679. package/dist/treeFactory.js.map +1 -1
  680. package/dist/util/brand.js +0 -1
  681. package/dist/util/brand.js.map +1 -1
  682. package/dist/util/brandedMap.d.ts +1 -1
  683. package/dist/util/brandedMap.d.ts.map +1 -1
  684. package/dist/util/brandedMap.js.map +1 -1
  685. package/dist/util/nestedMap.d.ts +1 -1
  686. package/dist/util/nestedMap.d.ts.map +1 -1
  687. package/dist/util/nestedMap.js +4 -2
  688. package/dist/util/nestedMap.js.map +1 -1
  689. package/dist/util/nestedSet.d.ts +1 -1
  690. package/dist/util/nestedSet.d.ts.map +1 -1
  691. package/dist/util/nestedSet.js.map +1 -1
  692. package/dist/util/offsetList.js +4 -2
  693. package/dist/util/offsetList.js.map +1 -1
  694. package/dist/util/referenceCounting.js +0 -1
  695. package/dist/util/referenceCounting.js.map +1 -1
  696. package/dist/util/stackyIterator.js +2 -3
  697. package/dist/util/stackyIterator.js.map +1 -1
  698. package/dist/util/typeboxBrand.d.ts +1 -1
  699. package/dist/util/typeboxBrand.d.ts.map +1 -1
  700. package/dist/util/typeboxBrand.js.map +1 -1
  701. package/lib/beta.d.ts +0 -1
  702. package/lib/codec/codec.d.ts +2 -2
  703. package/lib/codec/codec.d.ts.map +1 -1
  704. package/lib/codec/codec.js +0 -1
  705. package/lib/codec/codec.js.map +1 -1
  706. package/lib/codec/discriminatedUnions.d.ts +2 -2
  707. package/lib/codec/discriminatedUnions.d.ts.map +1 -1
  708. package/lib/codec/discriminatedUnions.js +0 -1
  709. package/lib/codec/discriminatedUnions.js.map +1 -1
  710. package/lib/codec/noopValidator.d.ts +1 -1
  711. package/lib/codec/noopValidator.d.ts.map +1 -1
  712. package/lib/codec/noopValidator.js.map +1 -1
  713. package/lib/codec/versioned/codec.d.ts +3 -3
  714. package/lib/codec/versioned/codec.d.ts.map +1 -1
  715. package/lib/codec/versioned/codec.js.map +1 -1
  716. package/lib/codec/versioned/format.d.ts +1 -1
  717. package/lib/codec/versioned/format.d.ts.map +1 -1
  718. package/lib/codec/versioned/format.js.map +1 -1
  719. package/lib/core/change-family/changeFamily.d.ts +5 -5
  720. package/lib/core/change-family/changeFamily.d.ts.map +1 -1
  721. package/lib/core/change-family/changeFamily.js.map +1 -1
  722. package/lib/core/change-family/editBuilder.d.ts +1 -1
  723. package/lib/core/change-family/editBuilder.d.ts.map +1 -1
  724. package/lib/core/change-family/editBuilder.js +0 -2
  725. package/lib/core/change-family/editBuilder.js.map +1 -1
  726. package/lib/core/forest/editableForest.d.ts +5 -5
  727. package/lib/core/forest/editableForest.d.ts.map +1 -1
  728. package/lib/core/forest/editableForest.js.map +1 -1
  729. package/lib/core/forest/forest.d.ts +3 -3
  730. package/lib/core/forest/forest.d.ts.map +1 -1
  731. package/lib/core/forest/forest.js.map +1 -1
  732. package/lib/core/rebase/changeRebaser.d.ts +1 -1
  733. package/lib/core/rebase/changeRebaser.d.ts.map +1 -1
  734. package/lib/core/rebase/changeRebaser.js.map +1 -1
  735. package/lib/core/rebase/revisionTagCodec.d.ts +4 -4
  736. package/lib/core/rebase/revisionTagCodec.d.ts.map +1 -1
  737. package/lib/core/rebase/revisionTagCodec.js +0 -2
  738. package/lib/core/rebase/revisionTagCodec.js.map +1 -1
  739. package/lib/core/rebase/types.d.ts +3 -3
  740. package/lib/core/rebase/types.d.ts.map +1 -1
  741. package/lib/core/rebase/types.js.map +1 -1
  742. package/lib/core/rebase/utils.d.ts +2 -2
  743. package/lib/core/rebase/utils.d.ts.map +1 -1
  744. package/lib/core/rebase/utils.js.map +1 -1
  745. package/lib/core/schema-stored/format.d.ts +2 -2
  746. package/lib/core/schema-stored/format.d.ts.map +1 -1
  747. package/lib/core/schema-stored/format.js.map +1 -1
  748. package/lib/core/schema-stored/schema.d.ts +3 -3
  749. package/lib/core/schema-stored/schema.d.ts.map +1 -1
  750. package/lib/core/schema-stored/schema.js +0 -4
  751. package/lib/core/schema-stored/schema.js.map +1 -1
  752. package/lib/core/schema-stored/storedSchemaRepository.d.ts +3 -3
  753. package/lib/core/schema-stored/storedSchemaRepository.d.ts.map +1 -1
  754. package/lib/core/schema-stored/storedSchemaRepository.js +1 -3
  755. package/lib/core/schema-stored/storedSchemaRepository.js.map +1 -1
  756. package/lib/core/schema-view/view.d.ts +1 -1
  757. package/lib/core/schema-view/view.d.ts.map +1 -1
  758. package/lib/core/schema-view/view.js +0 -2
  759. package/lib/core/schema-view/view.js.map +1 -1
  760. package/lib/core/tree/anchorSet.d.ts +56 -18
  761. package/lib/core/tree/anchorSet.d.ts.map +1 -1
  762. package/lib/core/tree/anchorSet.js +97 -52
  763. package/lib/core/tree/anchorSet.js.map +1 -1
  764. package/lib/core/tree/cursor.d.ts +3 -3
  765. package/lib/core/tree/cursor.d.ts.map +1 -1
  766. package/lib/core/tree/cursor.js.map +1 -1
  767. package/lib/core/tree/delta.d.ts +3 -3
  768. package/lib/core/tree/delta.d.ts.map +1 -1
  769. package/lib/core/tree/delta.js.map +1 -1
  770. package/lib/core/tree/deltaUtil.d.ts +2 -2
  771. package/lib/core/tree/deltaUtil.d.ts.map +1 -1
  772. package/lib/core/tree/deltaUtil.js.map +1 -1
  773. package/lib/core/tree/detachedFieldIndex.d.ts +7 -7
  774. package/lib/core/tree/detachedFieldIndex.d.ts.map +1 -1
  775. package/lib/core/tree/detachedFieldIndex.js +2 -8
  776. package/lib/core/tree/detachedFieldIndex.js.map +1 -1
  777. package/lib/core/tree/detachedFieldIndexCodec.d.ts +4 -4
  778. package/lib/core/tree/detachedFieldIndexCodec.d.ts.map +1 -1
  779. package/lib/core/tree/detachedFieldIndexCodec.js +1 -4
  780. package/lib/core/tree/detachedFieldIndexCodec.js.map +1 -1
  781. package/lib/core/tree/detachedFieldIndexFormat.d.ts +2 -2
  782. package/lib/core/tree/detachedFieldIndexFormat.d.ts.map +1 -1
  783. package/lib/core/tree/detachedFieldIndexFormat.js.map +1 -1
  784. package/lib/core/tree/detachedFieldIndexTypes.d.ts +3 -3
  785. package/lib/core/tree/detachedFieldIndexTypes.d.ts.map +1 -1
  786. package/lib/core/tree/detachedFieldIndexTypes.js.map +1 -1
  787. package/lib/core/tree/mapTree.d.ts +2 -2
  788. package/lib/core/tree/mapTree.d.ts.map +1 -1
  789. package/lib/core/tree/mapTree.js.map +1 -1
  790. package/lib/core/tree/pathTree.d.ts +3 -3
  791. package/lib/core/tree/pathTree.d.ts.map +1 -1
  792. package/lib/core/tree/pathTree.js.map +1 -1
  793. package/lib/core/tree/persistedTreeTextFormat.d.ts +1 -1
  794. package/lib/core/tree/persistedTreeTextFormat.d.ts.map +1 -1
  795. package/lib/core/tree/persistedTreeTextFormat.js.map +1 -1
  796. package/lib/core/tree/sparseTree.d.ts +2 -2
  797. package/lib/core/tree/sparseTree.d.ts.map +1 -1
  798. package/lib/core/tree/sparseTree.js +11 -15
  799. package/lib/core/tree/sparseTree.js.map +1 -1
  800. package/lib/core/tree/treeTextFormat.d.ts +2 -2
  801. package/lib/core/tree/treeTextFormat.d.ts.map +1 -1
  802. package/lib/core/tree/treeTextFormat.js.map +1 -1
  803. package/lib/core/tree/types.d.ts +3 -3
  804. package/lib/core/tree/types.d.ts.map +1 -1
  805. package/lib/core/tree/types.js +1 -2
  806. package/lib/core/tree/types.js.map +1 -1
  807. package/lib/core/tree/visitDelta.d.ts +5 -5
  808. package/lib/core/tree/visitDelta.d.ts.map +1 -1
  809. package/lib/core/tree/visitDelta.js.map +1 -1
  810. package/lib/core/tree/visitPath.d.ts +2 -2
  811. package/lib/core/tree/visitPath.d.ts.map +1 -1
  812. package/lib/core/tree/visitPath.js.map +1 -1
  813. package/lib/core/tree/visitorUtils.d.ts +7 -7
  814. package/lib/core/tree/visitorUtils.d.ts.map +1 -1
  815. package/lib/core/tree/visitorUtils.js.map +1 -1
  816. package/lib/domains/json/jsonCursor.d.ts +2 -2
  817. package/lib/domains/json/jsonCursor.d.ts.map +1 -1
  818. package/lib/domains/json/jsonCursor.js.map +1 -1
  819. package/lib/domains/json/jsonDomainSchema.js.map +1 -1
  820. package/lib/domains/schemaBuilder.d.ts +2 -2
  821. package/lib/domains/schemaBuilder.d.ts.map +1 -1
  822. package/lib/domains/schemaBuilder.js +70 -70
  823. package/lib/domains/schemaBuilder.js.map +1 -1
  824. package/lib/events/events.js +1 -2
  825. package/lib/events/events.js.map +1 -1
  826. package/lib/feature-libraries/changeAtomIdCodec.d.ts +2 -2
  827. package/lib/feature-libraries/changeAtomIdCodec.d.ts.map +1 -1
  828. package/lib/feature-libraries/changeAtomIdCodec.js.map +1 -1
  829. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts +2 -2
  830. package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
  831. package/lib/feature-libraries/chunked-forest/basicChunk.js +1 -14
  832. package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
  833. package/lib/feature-libraries/chunked-forest/chunk.d.ts +2 -2
  834. package/lib/feature-libraries/chunked-forest/chunk.d.ts.map +1 -1
  835. package/lib/feature-libraries/chunked-forest/chunk.js.map +1 -1
  836. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts +4 -4
  837. package/lib/feature-libraries/chunked-forest/chunkTree.d.ts.map +1 -1
  838. package/lib/feature-libraries/chunked-forest/chunkTree.js +6 -13
  839. package/lib/feature-libraries/chunked-forest/chunkTree.js.map +1 -1
  840. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts +4 -4
  841. package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
  842. package/lib/feature-libraries/chunked-forest/chunkedForest.js +2 -9
  843. package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
  844. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts +3 -3
  845. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.d.ts.map +1 -1
  846. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js +3 -1
  847. package/lib/feature-libraries/chunked-forest/codec/chunkCodecUtilities.js.map +1 -1
  848. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts +17 -7
  849. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.d.ts.map +1 -1
  850. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js +6 -11
  851. package/lib/feature-libraries/chunked-forest/codec/chunkDecoding.js.map +1 -1
  852. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts +8 -8
  853. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.d.ts.map +1 -1
  854. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js +3 -6
  855. package/lib/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.js.map +1 -1
  856. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts +3 -3
  857. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.d.ts.map +1 -1
  858. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js +0 -1
  859. package/lib/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.js.map +1 -1
  860. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts +6 -5
  861. package/lib/feature-libraries/chunked-forest/codec/codecs.d.ts.map +1 -1
  862. package/lib/feature-libraries/chunked-forest/codec/codecs.js +5 -2
  863. package/lib/feature-libraries/chunked-forest/codec/codecs.js.map +1 -1
  864. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts +7 -7
  865. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.d.ts.map +1 -1
  866. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js +13 -25
  867. package/lib/feature-libraries/chunked-forest/codec/compressedEncode.js.map +1 -1
  868. package/lib/feature-libraries/chunked-forest/codec/fieldBatch.d.ts +1 -1
  869. package/lib/feature-libraries/chunked-forest/codec/fieldBatch.d.ts.map +1 -1
  870. package/lib/feature-libraries/chunked-forest/codec/fieldBatch.js.map +1 -1
  871. package/lib/feature-libraries/chunked-forest/codec/format.d.ts +1 -1
  872. package/lib/feature-libraries/chunked-forest/codec/format.d.ts.map +1 -1
  873. package/lib/feature-libraries/chunked-forest/codec/format.js.map +1 -1
  874. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts +1 -1
  875. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.d.ts.map +1 -1
  876. package/lib/feature-libraries/chunked-forest/codec/formatGeneric.js.map +1 -1
  877. package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts +5 -5
  878. package/lib/feature-libraries/chunked-forest/codec/nodeShape.d.ts.map +1 -1
  879. package/lib/feature-libraries/chunked-forest/codec/nodeShape.js +5 -8
  880. package/lib/feature-libraries/chunked-forest/codec/nodeShape.js.map +1 -1
  881. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts +6 -6
  882. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.d.ts.map +1 -1
  883. package/lib/feature-libraries/chunked-forest/codec/schemaBasedEncoding.js.map +1 -1
  884. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts +2 -2
  885. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.d.ts.map +1 -1
  886. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js +1 -1
  887. package/lib/feature-libraries/chunked-forest/codec/uncompressedEncode.js.map +1 -1
  888. package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts +1 -1
  889. package/lib/feature-libraries/chunked-forest/emptyChunk.d.ts.map +1 -1
  890. package/lib/feature-libraries/chunked-forest/emptyChunk.js.map +1 -1
  891. package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts +1 -1
  892. package/lib/feature-libraries/chunked-forest/sequenceChunk.d.ts.map +1 -1
  893. package/lib/feature-libraries/chunked-forest/sequenceChunk.js +0 -1
  894. package/lib/feature-libraries/chunked-forest/sequenceChunk.js.map +1 -1
  895. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts +2 -2
  896. package/lib/feature-libraries/chunked-forest/uniformChunk.d.ts.map +1 -1
  897. package/lib/feature-libraries/chunked-forest/uniformChunk.js +5 -40
  898. package/lib/feature-libraries/chunked-forest/uniformChunk.js.map +1 -1
  899. package/lib/feature-libraries/contextuallyTyped.d.ts +5 -5
  900. package/lib/feature-libraries/contextuallyTyped.d.ts.map +1 -1
  901. package/lib/feature-libraries/contextuallyTyped.js.map +1 -1
  902. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts +3 -3
  903. package/lib/feature-libraries/default-schema/defaultEditBuilder.d.ts.map +1 -1
  904. package/lib/feature-libraries/default-schema/defaultEditBuilder.js +0 -2
  905. package/lib/feature-libraries/default-schema/defaultEditBuilder.js.map +1 -1
  906. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts +3 -3
  907. package/lib/feature-libraries/default-schema/defaultFieldKinds.d.ts.map +1 -1
  908. package/lib/feature-libraries/default-schema/defaultFieldKinds.js.map +1 -1
  909. package/lib/feature-libraries/default-schema/defaultSchema.d.ts +1 -1
  910. package/lib/feature-libraries/default-schema/defaultSchema.d.ts.map +1 -1
  911. package/lib/feature-libraries/default-schema/defaultSchema.js.map +1 -1
  912. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts +2 -2
  913. package/lib/feature-libraries/default-schema/noChangeCodecs.d.ts.map +1 -1
  914. package/lib/feature-libraries/default-schema/noChangeCodecs.js.map +1 -1
  915. package/lib/feature-libraries/deltaUtils.d.ts +1 -1
  916. package/lib/feature-libraries/deltaUtils.d.ts.map +1 -1
  917. package/lib/feature-libraries/deltaUtils.js +1 -1
  918. package/lib/feature-libraries/deltaUtils.js.map +1 -1
  919. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts +4 -4
  920. package/lib/feature-libraries/detachedFieldIndexSummarizer.d.ts.map +1 -1
  921. package/lib/feature-libraries/detachedFieldIndexSummarizer.js +1 -2
  922. package/lib/feature-libraries/detachedFieldIndexSummarizer.js.map +1 -1
  923. package/lib/feature-libraries/editableTreeBinder.d.ts +3 -3
  924. package/lib/feature-libraries/editableTreeBinder.d.ts.map +1 -1
  925. package/lib/feature-libraries/editableTreeBinder.js +12 -13
  926. package/lib/feature-libraries/editableTreeBinder.js.map +1 -1
  927. package/lib/feature-libraries/fieldGenerator.d.ts +2 -2
  928. package/lib/feature-libraries/fieldGenerator.d.ts.map +1 -1
  929. package/lib/feature-libraries/fieldGenerator.js.map +1 -1
  930. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts +5 -5
  931. package/lib/feature-libraries/flex-map-tree/mapTreeNode.d.ts.map +1 -1
  932. package/lib/feature-libraries/flex-map-tree/mapTreeNode.js +11 -12
  933. package/lib/feature-libraries/flex-map-tree/mapTreeNode.js.map +1 -1
  934. package/lib/feature-libraries/flex-tree/context.d.ts +8 -8
  935. package/lib/feature-libraries/flex-tree/context.d.ts.map +1 -1
  936. package/lib/feature-libraries/flex-tree/context.js +3 -7
  937. package/lib/feature-libraries/flex-tree/context.js.map +1 -1
  938. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts +9 -9
  939. package/lib/feature-libraries/flex-tree/flexTreeTypes.d.ts.map +1 -1
  940. package/lib/feature-libraries/flex-tree/flexTreeTypes.js.map +1 -1
  941. package/lib/feature-libraries/flex-tree/index.d.ts +1 -1
  942. package/lib/feature-libraries/flex-tree/index.d.ts.map +1 -1
  943. package/lib/feature-libraries/flex-tree/index.js +0 -1
  944. package/lib/feature-libraries/flex-tree/index.js.map +1 -1
  945. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts +4 -4
  946. package/lib/feature-libraries/flex-tree/lazyEntity.d.ts.map +1 -1
  947. package/lib/feature-libraries/flex-tree/lazyEntity.js +23 -14
  948. package/lib/feature-libraries/flex-tree/lazyEntity.js.map +1 -1
  949. package/lib/feature-libraries/flex-tree/lazyField.d.ts +6 -6
  950. package/lib/feature-libraries/flex-tree/lazyField.d.ts.map +1 -1
  951. package/lib/feature-libraries/flex-tree/lazyField.js +0 -6
  952. package/lib/feature-libraries/flex-tree/lazyField.js.map +1 -1
  953. package/lib/feature-libraries/flex-tree/lazyNode.d.ts +5 -5
  954. package/lib/feature-libraries/flex-tree/lazyNode.d.ts.map +1 -1
  955. package/lib/feature-libraries/flex-tree/lazyNode.js +19 -13
  956. package/lib/feature-libraries/flex-tree/lazyNode.js.map +1 -1
  957. package/lib/feature-libraries/flex-tree/treeEvents.d.ts +1 -13
  958. package/lib/feature-libraries/flex-tree/treeEvents.d.ts.map +1 -1
  959. package/lib/feature-libraries/flex-tree/treeEvents.js +1 -28
  960. package/lib/feature-libraries/flex-tree/treeEvents.js.map +1 -1
  961. package/lib/feature-libraries/flex-tree/unboxed.d.ts +5 -5
  962. package/lib/feature-libraries/flex-tree/unboxed.d.ts.map +1 -1
  963. package/lib/feature-libraries/flex-tree/unboxed.js.map +1 -1
  964. package/lib/feature-libraries/flex-tree/utilities.d.ts +1 -1
  965. package/lib/feature-libraries/flex-tree/utilities.d.ts.map +1 -1
  966. package/lib/feature-libraries/flex-tree/utilities.js.map +1 -1
  967. package/lib/feature-libraries/forest-summary/codec.d.ts +3 -3
  968. package/lib/feature-libraries/forest-summary/codec.d.ts.map +1 -1
  969. package/lib/feature-libraries/forest-summary/codec.js +1 -1
  970. package/lib/feature-libraries/forest-summary/codec.js.map +1 -1
  971. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts +7 -7
  972. package/lib/feature-libraries/forest-summary/forestSummarizer.d.ts.map +1 -1
  973. package/lib/feature-libraries/forest-summary/forestSummarizer.js +1 -6
  974. package/lib/feature-libraries/forest-summary/forestSummarizer.js.map +1 -1
  975. package/lib/feature-libraries/forest-summary/format.d.ts +1 -1
  976. package/lib/feature-libraries/forest-summary/format.d.ts.map +1 -1
  977. package/lib/feature-libraries/forest-summary/format.js.map +1 -1
  978. package/lib/feature-libraries/index.d.ts +1 -1
  979. package/lib/feature-libraries/index.d.ts.map +1 -1
  980. package/lib/feature-libraries/index.js +1 -1
  981. package/lib/feature-libraries/index.js.map +1 -1
  982. package/lib/feature-libraries/mapTreeCursor.d.ts +2 -2
  983. package/lib/feature-libraries/mapTreeCursor.d.ts.map +1 -1
  984. package/lib/feature-libraries/mapTreeCursor.js.map +1 -1
  985. package/lib/feature-libraries/memoizedIdRangeAllocator.d.ts +1 -1
  986. package/lib/feature-libraries/memoizedIdRangeAllocator.d.ts.map +1 -1
  987. package/lib/feature-libraries/memoizedIdRangeAllocator.js.map +1 -1
  988. package/lib/feature-libraries/mitigatedChangeFamily.d.ts +1 -1
  989. package/lib/feature-libraries/mitigatedChangeFamily.d.ts.map +1 -1
  990. package/lib/feature-libraries/mitigatedChangeFamily.js.map +1 -1
  991. package/lib/feature-libraries/modular-schema/comparison.d.ts +2 -2
  992. package/lib/feature-libraries/modular-schema/comparison.d.ts.map +1 -1
  993. package/lib/feature-libraries/modular-schema/comparison.js.map +1 -1
  994. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts +2 -2
  995. package/lib/feature-libraries/modular-schema/crossFieldQueries.d.ts.map +1 -1
  996. package/lib/feature-libraries/modular-schema/crossFieldQueries.js.map +1 -1
  997. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts +7 -7
  998. package/lib/feature-libraries/modular-schema/fieldChangeHandler.d.ts.map +1 -1
  999. package/lib/feature-libraries/modular-schema/fieldChangeHandler.js.map +1 -1
  1000. package/lib/feature-libraries/modular-schema/fieldKind.d.ts +1 -1
  1001. package/lib/feature-libraries/modular-schema/fieldKind.d.ts.map +1 -1
  1002. package/lib/feature-libraries/modular-schema/fieldKind.js +0 -2
  1003. package/lib/feature-libraries/modular-schema/fieldKind.js.map +1 -1
  1004. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts +2 -2
  1005. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.d.ts.map +1 -1
  1006. package/lib/feature-libraries/modular-schema/fieldKindConfiguration.js.map +1 -1
  1007. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts +3 -3
  1008. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.d.ts.map +1 -1
  1009. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js +0 -3
  1010. package/lib/feature-libraries/modular-schema/fieldKindWithEditor.js.map +1 -1
  1011. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts +4 -4
  1012. package/lib/feature-libraries/modular-schema/genericFieldKind.d.ts.map +1 -1
  1013. package/lib/feature-libraries/modular-schema/genericFieldKind.js.map +1 -1
  1014. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts +2 -2
  1015. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.d.ts.map +1 -1
  1016. package/lib/feature-libraries/modular-schema/genericFieldKindCodecs.js.map +1 -1
  1017. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts +1 -1
  1018. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.d.ts.map +1 -1
  1019. package/lib/feature-libraries/modular-schema/genericFieldKindFormat.js.map +1 -1
  1020. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts +1 -1
  1021. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.d.ts.map +1 -1
  1022. package/lib/feature-libraries/modular-schema/genericFieldKindTypes.js.map +1 -1
  1023. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts +2 -2
  1024. package/lib/feature-libraries/modular-schema/isNeverTree.d.ts.map +1 -1
  1025. package/lib/feature-libraries/modular-schema/isNeverTree.js.map +1 -1
  1026. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts +5 -5
  1027. package/lib/feature-libraries/modular-schema/modularChangeCodecs.d.ts.map +1 -1
  1028. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js +2 -0
  1029. package/lib/feature-libraries/modular-schema/modularChangeCodecs.js.map +1 -1
  1030. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts +6 -6
  1031. package/lib/feature-libraries/modular-schema/modularChangeFamily.d.ts.map +1 -1
  1032. package/lib/feature-libraries/modular-schema/modularChangeFamily.js +2 -5
  1033. package/lib/feature-libraries/modular-schema/modularChangeFamily.js.map +1 -1
  1034. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts +3 -3
  1035. package/lib/feature-libraries/modular-schema/modularChangeFormat.d.ts.map +1 -1
  1036. package/lib/feature-libraries/modular-schema/modularChangeFormat.js.map +1 -1
  1037. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts +3 -3
  1038. package/lib/feature-libraries/modular-schema/modularChangeTypes.d.ts.map +1 -1
  1039. package/lib/feature-libraries/modular-schema/modularChangeTypes.js.map +1 -1
  1040. package/lib/feature-libraries/node-key/mockNodeKeyManager.d.ts +2 -2
  1041. package/lib/feature-libraries/node-key/mockNodeKeyManager.d.ts.map +1 -1
  1042. package/lib/feature-libraries/node-key/mockNodeKeyManager.js +4 -2
  1043. package/lib/feature-libraries/node-key/mockNodeKeyManager.js.map +1 -1
  1044. package/lib/feature-libraries/node-key/nodeKey.d.ts +3 -3
  1045. package/lib/feature-libraries/node-key/nodeKey.d.ts.map +1 -1
  1046. package/lib/feature-libraries/node-key/nodeKey.js.map +1 -1
  1047. package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts +4 -4
  1048. package/lib/feature-libraries/node-key/nodeKeyIndex.d.ts.map +1 -1
  1049. package/lib/feature-libraries/node-key/nodeKeyIndex.js +0 -3
  1050. package/lib/feature-libraries/node-key/nodeKeyIndex.js.map +1 -1
  1051. package/lib/feature-libraries/node-key/nodeKeyManager.d.ts +1 -1
  1052. package/lib/feature-libraries/node-key/nodeKeyManager.d.ts.map +1 -1
  1053. package/lib/feature-libraries/node-key/nodeKeyManager.js.map +1 -1
  1054. package/lib/feature-libraries/object-forest/objectForest.d.ts +2 -2
  1055. package/lib/feature-libraries/object-forest/objectForest.d.ts.map +1 -1
  1056. package/lib/feature-libraries/object-forest/objectForest.js +28 -23
  1057. package/lib/feature-libraries/object-forest/objectForest.js.map +1 -1
  1058. package/lib/feature-libraries/optional-field/optionalField.d.ts +3 -3
  1059. package/lib/feature-libraries/optional-field/optionalField.d.ts.map +1 -1
  1060. package/lib/feature-libraries/optional-field/optionalField.js +3 -1
  1061. package/lib/feature-libraries/optional-field/optionalField.js.map +1 -1
  1062. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts +1 -1
  1063. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.d.ts.map +1 -1
  1064. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV1.js.map +1 -1
  1065. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts +1 -1
  1066. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.d.ts.map +1 -1
  1067. package/lib/feature-libraries/optional-field/optionalFieldChangeFormatV2.js.map +1 -1
  1068. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts +2 -2
  1069. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.d.ts.map +1 -1
  1070. package/lib/feature-libraries/optional-field/optionalFieldChangeTypes.js.map +1 -1
  1071. package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts +3 -3
  1072. package/lib/feature-libraries/optional-field/optionalFieldCodecV1.d.ts.map +1 -1
  1073. package/lib/feature-libraries/optional-field/optionalFieldCodecV1.js.map +1 -1
  1074. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts +3 -3
  1075. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.d.ts.map +1 -1
  1076. package/lib/feature-libraries/optional-field/optionalFieldCodecV2.js.map +1 -1
  1077. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts +2 -2
  1078. package/lib/feature-libraries/optional-field/optionalFieldCodecs.d.ts.map +1 -1
  1079. package/lib/feature-libraries/optional-field/optionalFieldCodecs.js.map +1 -1
  1080. package/lib/feature-libraries/schema-aware/schemaAware.d.ts +4 -4
  1081. package/lib/feature-libraries/schema-aware/schemaAware.d.ts.map +1 -1
  1082. package/lib/feature-libraries/schema-aware/schemaAware.js +1 -2
  1083. package/lib/feature-libraries/schema-aware/schemaAware.js.map +1 -1
  1084. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts +2 -2
  1085. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.d.ts.map +1 -1
  1086. package/lib/feature-libraries/schema-edits/schemaChangeCodecs.js.map +1 -1
  1087. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts +1 -1
  1088. package/lib/feature-libraries/schema-edits/schemaChangeFormat.d.ts.map +1 -1
  1089. package/lib/feature-libraries/schema-edits/schemaChangeFormat.js.map +1 -1
  1090. package/lib/feature-libraries/schema-edits/schemaChangeTypes.d.ts +1 -1
  1091. package/lib/feature-libraries/schema-edits/schemaChangeTypes.d.ts.map +1 -1
  1092. package/lib/feature-libraries/schema-edits/schemaChangeTypes.js.map +1 -1
  1093. package/lib/feature-libraries/schema-index/codec.d.ts +2 -2
  1094. package/lib/feature-libraries/schema-index/codec.d.ts.map +1 -1
  1095. package/lib/feature-libraries/schema-index/codec.js +1 -1
  1096. package/lib/feature-libraries/schema-index/codec.js.map +1 -1
  1097. package/lib/feature-libraries/schema-index/format.d.ts +1 -1
  1098. package/lib/feature-libraries/schema-index/format.d.ts.map +1 -1
  1099. package/lib/feature-libraries/schema-index/format.js.map +1 -1
  1100. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts +7 -7
  1101. package/lib/feature-libraries/schema-index/schemaSummarizer.d.ts.map +1 -1
  1102. package/lib/feature-libraries/schema-index/schemaSummarizer.js +2 -6
  1103. package/lib/feature-libraries/schema-index/schemaSummarizer.js.map +1 -1
  1104. package/lib/feature-libraries/schemaBuilder.d.ts +2 -2
  1105. package/lib/feature-libraries/schemaBuilder.d.ts.map +1 -1
  1106. package/lib/feature-libraries/schemaBuilder.js.map +1 -1
  1107. package/lib/feature-libraries/schemaBuilderBase.d.ts +4 -4
  1108. package/lib/feature-libraries/schemaBuilderBase.d.ts.map +1 -1
  1109. package/lib/feature-libraries/schemaBuilderBase.js +3 -14
  1110. package/lib/feature-libraries/schemaBuilderBase.js.map +1 -1
  1111. package/lib/feature-libraries/sequence-field/compose.d.ts +5 -5
  1112. package/lib/feature-libraries/sequence-field/compose.d.ts.map +1 -1
  1113. package/lib/feature-libraries/sequence-field/compose.js +0 -6
  1114. package/lib/feature-libraries/sequence-field/compose.js.map +1 -1
  1115. package/lib/feature-libraries/sequence-field/formatV1.d.ts +1 -1
  1116. package/lib/feature-libraries/sequence-field/formatV1.d.ts.map +1 -1
  1117. package/lib/feature-libraries/sequence-field/formatV1.js.map +1 -1
  1118. package/lib/feature-libraries/sequence-field/formatV2.d.ts +1 -1
  1119. package/lib/feature-libraries/sequence-field/formatV2.d.ts.map +1 -1
  1120. package/lib/feature-libraries/sequence-field/formatV2.js.map +1 -1
  1121. package/lib/feature-libraries/sequence-field/helperTypes.d.ts +1 -1
  1122. package/lib/feature-libraries/sequence-field/helperTypes.d.ts.map +1 -1
  1123. package/lib/feature-libraries/sequence-field/helperTypes.js.map +1 -1
  1124. package/lib/feature-libraries/sequence-field/invert.d.ts +3 -3
  1125. package/lib/feature-libraries/sequence-field/invert.d.ts.map +1 -1
  1126. package/lib/feature-libraries/sequence-field/invert.js.map +1 -1
  1127. package/lib/feature-libraries/sequence-field/markListFactory.d.ts +1 -1
  1128. package/lib/feature-libraries/sequence-field/markListFactory.d.ts.map +1 -1
  1129. package/lib/feature-libraries/sequence-field/markListFactory.js +4 -3
  1130. package/lib/feature-libraries/sequence-field/markListFactory.js.map +1 -1
  1131. package/lib/feature-libraries/sequence-field/markQueue.d.ts +2 -2
  1132. package/lib/feature-libraries/sequence-field/markQueue.d.ts.map +1 -1
  1133. package/lib/feature-libraries/sequence-field/markQueue.js +2 -4
  1134. package/lib/feature-libraries/sequence-field/markQueue.js.map +1 -1
  1135. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts +5 -5
  1136. package/lib/feature-libraries/sequence-field/moveEffectTable.d.ts.map +1 -1
  1137. package/lib/feature-libraries/sequence-field/moveEffectTable.js.map +1 -1
  1138. package/lib/feature-libraries/sequence-field/prune.d.ts +2 -2
  1139. package/lib/feature-libraries/sequence-field/prune.d.ts.map +1 -1
  1140. package/lib/feature-libraries/sequence-field/prune.js.map +1 -1
  1141. package/lib/feature-libraries/sequence-field/rebase.d.ts +3 -3
  1142. package/lib/feature-libraries/sequence-field/rebase.d.ts.map +1 -1
  1143. package/lib/feature-libraries/sequence-field/rebase.js +0 -6
  1144. package/lib/feature-libraries/sequence-field/rebase.js.map +1 -1
  1145. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts +3 -3
  1146. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.d.ts.map +1 -1
  1147. package/lib/feature-libraries/sequence-field/relevantRemovedRoots.js.map +1 -1
  1148. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts +2 -2
  1149. package/lib/feature-libraries/sequence-field/replaceRevisions.d.ts.map +1 -1
  1150. package/lib/feature-libraries/sequence-field/replaceRevisions.js.map +1 -1
  1151. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts +3 -3
  1152. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.d.ts.map +1 -1
  1153. package/lib/feature-libraries/sequence-field/sequenceFieldChangeHandler.js.map +1 -1
  1154. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts +2 -2
  1155. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.d.ts.map +1 -1
  1156. package/lib/feature-libraries/sequence-field/sequenceFieldChangeRebaser.js.map +1 -1
  1157. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts +5 -5
  1158. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.d.ts.map +1 -1
  1159. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV1.js.map +1 -1
  1160. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts +5 -5
  1161. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.d.ts.map +1 -1
  1162. package/lib/feature-libraries/sequence-field/sequenceFieldCodecV2.js.map +1 -1
  1163. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts +4 -4
  1164. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.d.ts.map +1 -1
  1165. package/lib/feature-libraries/sequence-field/sequenceFieldCodecs.js.map +1 -1
  1166. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts +3 -3
  1167. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.d.ts.map +1 -1
  1168. package/lib/feature-libraries/sequence-field/sequenceFieldEditor.js.map +1 -1
  1169. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts +3 -3
  1170. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.d.ts.map +1 -1
  1171. package/lib/feature-libraries/sequence-field/sequenceFieldToDelta.js.map +1 -1
  1172. package/lib/feature-libraries/sequence-field/types.d.ts +2 -2
  1173. package/lib/feature-libraries/sequence-field/types.d.ts.map +1 -1
  1174. package/lib/feature-libraries/sequence-field/types.js.map +1 -1
  1175. package/lib/feature-libraries/sequence-field/utils.d.ts +5 -5
  1176. package/lib/feature-libraries/sequence-field/utils.d.ts.map +1 -1
  1177. package/lib/feature-libraries/sequence-field/utils.js.map +1 -1
  1178. package/lib/feature-libraries/storedToViewSchema.d.ts +2 -2
  1179. package/lib/feature-libraries/storedToViewSchema.d.ts.map +1 -1
  1180. package/lib/feature-libraries/storedToViewSchema.js.map +1 -1
  1181. package/lib/feature-libraries/treeCursorUtils.d.ts +1 -1
  1182. package/lib/feature-libraries/treeCursorUtils.d.ts.map +1 -1
  1183. package/lib/feature-libraries/treeCursorUtils.js +9 -13
  1184. package/lib/feature-libraries/treeCursorUtils.js.map +1 -1
  1185. package/lib/feature-libraries/treeTextCursor.d.ts +2 -2
  1186. package/lib/feature-libraries/treeTextCursor.d.ts.map +1 -1
  1187. package/lib/feature-libraries/treeTextCursor.js +1 -1
  1188. package/lib/feature-libraries/treeTextCursor.js.map +1 -1
  1189. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts +3 -3
  1190. package/lib/feature-libraries/typed-schema/schemaCollection.d.ts.map +1 -1
  1191. package/lib/feature-libraries/typed-schema/schemaCollection.js +1 -1
  1192. package/lib/feature-libraries/typed-schema/schemaCollection.js.map +1 -1
  1193. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts +4 -4
  1194. package/lib/feature-libraries/typed-schema/typedTreeSchema.d.ts.map +1 -1
  1195. package/lib/feature-libraries/typed-schema/typedTreeSchema.js +4 -23
  1196. package/lib/feature-libraries/typed-schema/typedTreeSchema.js.map +1 -1
  1197. package/lib/feature-libraries/typed-schema/view.d.ts +4 -4
  1198. package/lib/feature-libraries/typed-schema/view.d.ts.map +1 -1
  1199. package/lib/feature-libraries/typed-schema/view.js +0 -7
  1200. package/lib/feature-libraries/typed-schema/view.js.map +1 -1
  1201. package/lib/feature-libraries/valueUtilities.d.ts +2 -2
  1202. package/lib/feature-libraries/valueUtilities.d.ts.map +1 -1
  1203. package/lib/feature-libraries/valueUtilities.js.map +1 -1
  1204. package/lib/index.d.ts +1 -1
  1205. package/lib/index.d.ts.map +1 -1
  1206. package/lib/index.js +1 -1
  1207. package/lib/index.js.map +1 -1
  1208. package/lib/packageVersion.d.ts +1 -1
  1209. package/lib/packageVersion.js +1 -1
  1210. package/lib/packageVersion.js.map +1 -1
  1211. package/lib/public.d.ts +0 -1
  1212. package/lib/shared-tree/schematizeTree.d.ts +3 -3
  1213. package/lib/shared-tree/schematizeTree.d.ts.map +1 -1
  1214. package/lib/shared-tree/schematizeTree.js.map +1 -1
  1215. package/lib/shared-tree/schematizingTreeView.d.ts +4 -4
  1216. package/lib/shared-tree/schematizingTreeView.d.ts.map +1 -1
  1217. package/lib/shared-tree/schematizingTreeView.js +11 -28
  1218. package/lib/shared-tree/schematizingTreeView.js.map +1 -1
  1219. package/lib/shared-tree/sharedTree.d.ts +15 -11
  1220. package/lib/shared-tree/sharedTree.d.ts.map +1 -1
  1221. package/lib/shared-tree/sharedTree.js +14 -11
  1222. package/lib/shared-tree/sharedTree.js.map +1 -1
  1223. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts +4 -4
  1224. package/lib/shared-tree/sharedTreeChangeCodecs.d.ts.map +1 -1
  1225. package/lib/shared-tree/sharedTreeChangeCodecs.js +1 -1
  1226. package/lib/shared-tree/sharedTreeChangeCodecs.js.map +1 -1
  1227. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts +3 -3
  1228. package/lib/shared-tree/sharedTreeChangeEnricher.d.ts.map +1 -1
  1229. package/lib/shared-tree/sharedTreeChangeEnricher.js +11 -14
  1230. package/lib/shared-tree/sharedTreeChangeEnricher.js.map +1 -1
  1231. package/lib/shared-tree/sharedTreeChangeFamily.d.ts +4 -4
  1232. package/lib/shared-tree/sharedTreeChangeFamily.d.ts.map +1 -1
  1233. package/lib/shared-tree/sharedTreeChangeFamily.js +4 -6
  1234. package/lib/shared-tree/sharedTreeChangeFamily.js.map +1 -1
  1235. package/lib/shared-tree/sharedTreeChangeFormat.d.ts +1 -1
  1236. package/lib/shared-tree/sharedTreeChangeFormat.d.ts.map +1 -1
  1237. package/lib/shared-tree/sharedTreeChangeFormat.js.map +1 -1
  1238. package/lib/shared-tree/sharedTreeChangeTypes.d.ts +1 -1
  1239. package/lib/shared-tree/sharedTreeChangeTypes.d.ts.map +1 -1
  1240. package/lib/shared-tree/sharedTreeChangeTypes.js.map +1 -1
  1241. package/lib/shared-tree/sharedTreeEditBuilder.d.ts +3 -3
  1242. package/lib/shared-tree/sharedTreeEditBuilder.d.ts.map +1 -1
  1243. package/lib/shared-tree/sharedTreeEditBuilder.js +0 -2
  1244. package/lib/shared-tree/sharedTreeEditBuilder.js.map +1 -1
  1245. package/lib/shared-tree/treeApi.d.ts +1 -1
  1246. package/lib/shared-tree/treeApi.d.ts.map +1 -1
  1247. package/lib/shared-tree/treeApi.js.map +1 -1
  1248. package/lib/shared-tree/treeCheckout.d.ts +7 -7
  1249. package/lib/shared-tree/treeCheckout.d.ts.map +1 -1
  1250. package/lib/shared-tree/treeCheckout.js +12 -23
  1251. package/lib/shared-tree/treeCheckout.js.map +1 -1
  1252. package/lib/shared-tree/treeView.d.ts +3 -3
  1253. package/lib/shared-tree/treeView.d.ts.map +1 -1
  1254. package/lib/shared-tree/treeView.js +0 -6
  1255. package/lib/shared-tree/treeView.js.map +1 -1
  1256. package/lib/shared-tree-core/branch.d.ts +2 -2
  1257. package/lib/shared-tree-core/branch.d.ts.map +1 -1
  1258. package/lib/shared-tree-core/branch.js +25 -31
  1259. package/lib/shared-tree-core/branch.js.map +1 -1
  1260. package/lib/shared-tree-core/branchCommitEnricher.d.ts +2 -2
  1261. package/lib/shared-tree-core/branchCommitEnricher.d.ts.map +1 -1
  1262. package/lib/shared-tree-core/branchCommitEnricher.js +9 -12
  1263. package/lib/shared-tree-core/branchCommitEnricher.js.map +1 -1
  1264. package/lib/shared-tree-core/changeEnricher.d.ts +1 -1
  1265. package/lib/shared-tree-core/changeEnricher.d.ts.map +1 -1
  1266. package/lib/shared-tree-core/changeEnricher.js.map +1 -1
  1267. package/lib/shared-tree-core/defaultResubmitMachine.d.ts +2 -2
  1268. package/lib/shared-tree-core/defaultResubmitMachine.d.ts.map +1 -1
  1269. package/lib/shared-tree-core/defaultResubmitMachine.js +19 -21
  1270. package/lib/shared-tree-core/defaultResubmitMachine.js.map +1 -1
  1271. package/lib/shared-tree-core/editManager.d.ts +3 -3
  1272. package/lib/shared-tree-core/editManager.d.ts.map +1 -1
  1273. package/lib/shared-tree-core/editManager.js +37 -53
  1274. package/lib/shared-tree-core/editManager.js.map +1 -1
  1275. package/lib/shared-tree-core/editManagerCodecs.d.ts +5 -5
  1276. package/lib/shared-tree-core/editManagerCodecs.d.ts.map +1 -1
  1277. package/lib/shared-tree-core/editManagerCodecs.js +1 -1
  1278. package/lib/shared-tree-core/editManagerCodecs.js.map +1 -1
  1279. package/lib/shared-tree-core/editManagerFormat.d.ts +4 -4
  1280. package/lib/shared-tree-core/editManagerFormat.d.ts.map +1 -1
  1281. package/lib/shared-tree-core/editManagerFormat.js.map +1 -1
  1282. package/lib/shared-tree-core/editManagerSummarizer.d.ts +9 -9
  1283. package/lib/shared-tree-core/editManagerSummarizer.d.ts.map +1 -1
  1284. package/lib/shared-tree-core/editManagerSummarizer.js +1 -5
  1285. package/lib/shared-tree-core/editManagerSummarizer.js.map +1 -1
  1286. package/lib/shared-tree-core/messageCodecs.d.ts +5 -5
  1287. package/lib/shared-tree-core/messageCodecs.d.ts.map +1 -1
  1288. package/lib/shared-tree-core/messageCodecs.js.map +1 -1
  1289. package/lib/shared-tree-core/messageFormat.d.ts +4 -4
  1290. package/lib/shared-tree-core/messageFormat.d.ts.map +1 -1
  1291. package/lib/shared-tree-core/messageFormat.js.map +1 -1
  1292. package/lib/shared-tree-core/messageTypes.d.ts +2 -2
  1293. package/lib/shared-tree-core/messageTypes.d.ts.map +1 -1
  1294. package/lib/shared-tree-core/messageTypes.js.map +1 -1
  1295. package/lib/shared-tree-core/resubmitMachine.d.ts +1 -1
  1296. package/lib/shared-tree-core/resubmitMachine.d.ts.map +1 -1
  1297. package/lib/shared-tree-core/resubmitMachine.js.map +1 -1
  1298. package/lib/shared-tree-core/sequenceIdUtils.d.ts +1 -1
  1299. package/lib/shared-tree-core/sequenceIdUtils.d.ts.map +1 -1
  1300. package/lib/shared-tree-core/sequenceIdUtils.js.map +1 -1
  1301. package/lib/shared-tree-core/sharedTreeCore.d.ts +10 -10
  1302. package/lib/shared-tree-core/sharedTreeCore.d.ts.map +1 -1
  1303. package/lib/shared-tree-core/sharedTreeCore.js +7 -24
  1304. package/lib/shared-tree-core/sharedTreeCore.js.map +1 -1
  1305. package/lib/shared-tree-core/transactionEnricher.d.ts +2 -2
  1306. package/lib/shared-tree-core/transactionEnricher.d.ts.map +1 -1
  1307. package/lib/shared-tree-core/transactionEnricher.js +1 -3
  1308. package/lib/shared-tree-core/transactionEnricher.js.map +1 -1
  1309. package/lib/shared-tree-core/transactionStack.d.ts +1 -1
  1310. package/lib/shared-tree-core/transactionStack.d.ts.map +1 -1
  1311. package/lib/shared-tree-core/transactionStack.js +3 -1
  1312. package/lib/shared-tree-core/transactionStack.js.map +1 -1
  1313. package/lib/simple-tree/arrayNode.d.ts +2 -2
  1314. package/lib/simple-tree/arrayNode.d.ts.map +1 -1
  1315. package/lib/simple-tree/arrayNode.js +35 -27
  1316. package/lib/simple-tree/arrayNode.js.map +1 -1
  1317. package/lib/simple-tree/leafNodeSchema.d.ts +1 -1
  1318. package/lib/simple-tree/leafNodeSchema.d.ts.map +1 -1
  1319. package/lib/simple-tree/leafNodeSchema.js +2 -4
  1320. package/lib/simple-tree/leafNodeSchema.js.map +1 -1
  1321. package/lib/simple-tree/mapNode.d.ts +2 -2
  1322. package/lib/simple-tree/mapNode.d.ts.map +1 -1
  1323. package/lib/simple-tree/mapNode.js +5 -5
  1324. package/lib/simple-tree/mapNode.js.map +1 -1
  1325. package/lib/simple-tree/nodeKeys.d.ts +2 -2
  1326. package/lib/simple-tree/nodeKeys.d.ts.map +1 -1
  1327. package/lib/simple-tree/nodeKeys.js.map +1 -1
  1328. package/lib/simple-tree/objectNode.d.ts +5 -5
  1329. package/lib/simple-tree/objectNode.d.ts.map +1 -1
  1330. package/lib/simple-tree/objectNode.js +6 -6
  1331. package/lib/simple-tree/objectNode.js.map +1 -1
  1332. package/lib/simple-tree/proxies.d.ts +4 -4
  1333. package/lib/simple-tree/proxies.d.ts.map +1 -1
  1334. package/lib/simple-tree/proxies.js +7 -5
  1335. package/lib/simple-tree/proxies.js.map +1 -1
  1336. package/lib/simple-tree/proxyBinding.d.ts +6 -6
  1337. package/lib/simple-tree/proxyBinding.d.ts.map +1 -1
  1338. package/lib/simple-tree/proxyBinding.js.map +1 -1
  1339. package/lib/simple-tree/schemaCaching.d.ts +2 -2
  1340. package/lib/simple-tree/schemaCaching.d.ts.map +1 -1
  1341. package/lib/simple-tree/schemaCaching.js.map +1 -1
  1342. package/lib/simple-tree/schemaCreationUtilities.d.ts +5 -5
  1343. package/lib/simple-tree/schemaCreationUtilities.d.ts.map +1 -1
  1344. package/lib/simple-tree/schemaCreationUtilities.js.map +1 -1
  1345. package/lib/simple-tree/schemaFactory.d.ts +25 -12
  1346. package/lib/simple-tree/schemaFactory.d.ts.map +1 -1
  1347. package/lib/simple-tree/schemaFactory.js +66 -54
  1348. package/lib/simple-tree/schemaFactory.js.map +1 -1
  1349. package/lib/simple-tree/schemaFactoryRecursive.d.ts +6 -6
  1350. package/lib/simple-tree/schemaFactoryRecursive.d.ts.map +1 -1
  1351. package/lib/simple-tree/schemaFactoryRecursive.js +1 -1
  1352. package/lib/simple-tree/schemaFactoryRecursive.js.map +1 -1
  1353. package/lib/simple-tree/schemaTypes.d.ts +6 -6
  1354. package/lib/simple-tree/schemaTypes.d.ts.map +1 -1
  1355. package/lib/simple-tree/schemaTypes.js +3 -12
  1356. package/lib/simple-tree/schemaTypes.js.map +1 -1
  1357. package/lib/simple-tree/testRecursiveDomain.d.ts +1 -1
  1358. package/lib/simple-tree/testRecursiveDomain.d.ts.map +1 -1
  1359. package/lib/simple-tree/testRecursiveDomain.js.map +1 -1
  1360. package/lib/simple-tree/toFlexSchema.d.ts +4 -4
  1361. package/lib/simple-tree/toFlexSchema.d.ts.map +1 -1
  1362. package/lib/simple-tree/toFlexSchema.js.map +1 -1
  1363. package/lib/simple-tree/toMapTree.d.ts +2 -2
  1364. package/lib/simple-tree/toMapTree.d.ts.map +1 -1
  1365. package/lib/simple-tree/toMapTree.js.map +1 -1
  1366. package/lib/simple-tree/tree.d.ts +6 -27
  1367. package/lib/simple-tree/tree.d.ts.map +1 -1
  1368. package/lib/simple-tree/tree.js +0 -21
  1369. package/lib/simple-tree/tree.js.map +1 -1
  1370. package/lib/simple-tree/treeNodeApi.d.ts +30 -27
  1371. package/lib/simple-tree/treeNodeApi.d.ts.map +1 -1
  1372. package/lib/simple-tree/treeNodeApi.js +8 -3
  1373. package/lib/simple-tree/treeNodeApi.js.map +1 -1
  1374. package/lib/simple-tree/types.d.ts +29 -9
  1375. package/lib/simple-tree/types.d.ts.map +1 -1
  1376. package/lib/simple-tree/types.js +78 -54
  1377. package/lib/simple-tree/types.js.map +1 -1
  1378. package/lib/simple-tree/typesUnsafe.d.ts +5 -5
  1379. package/lib/simple-tree/typesUnsafe.d.ts.map +1 -1
  1380. package/lib/simple-tree/typesUnsafe.js.map +1 -1
  1381. package/lib/treeFactory.d.ts +5 -5
  1382. package/lib/treeFactory.d.ts.map +1 -1
  1383. package/lib/treeFactory.js +10 -9
  1384. package/lib/treeFactory.js.map +1 -1
  1385. package/lib/util/brand.js +0 -1
  1386. package/lib/util/brand.js.map +1 -1
  1387. package/lib/util/brandedMap.d.ts +1 -1
  1388. package/lib/util/brandedMap.d.ts.map +1 -1
  1389. package/lib/util/brandedMap.js.map +1 -1
  1390. package/lib/util/nestedMap.d.ts +1 -1
  1391. package/lib/util/nestedMap.d.ts.map +1 -1
  1392. package/lib/util/nestedMap.js +4 -2
  1393. package/lib/util/nestedMap.js.map +1 -1
  1394. package/lib/util/nestedSet.d.ts +1 -1
  1395. package/lib/util/nestedSet.d.ts.map +1 -1
  1396. package/lib/util/nestedSet.js.map +1 -1
  1397. package/lib/util/offsetList.js +4 -2
  1398. package/lib/util/offsetList.js.map +1 -1
  1399. package/lib/util/referenceCounting.js +0 -1
  1400. package/lib/util/referenceCounting.js.map +1 -1
  1401. package/lib/util/stackyIterator.js +2 -3
  1402. package/lib/util/stackyIterator.js.map +1 -1
  1403. package/lib/util/typeboxBrand.d.ts +1 -1
  1404. package/lib/util/typeboxBrand.d.ts.map +1 -1
  1405. package/lib/util/typeboxBrand.js.map +1 -1
  1406. package/package.json +20 -20
  1407. package/src/codec/codec.ts +2 -2
  1408. package/src/codec/discriminatedUnions.ts +2 -2
  1409. package/src/codec/noopValidator.ts +1 -1
  1410. package/src/codec/versioned/codec.ts +4 -4
  1411. package/src/codec/versioned/format.ts +1 -1
  1412. package/src/core/change-family/changeFamily.ts +5 -5
  1413. package/src/core/change-family/editBuilder.ts +1 -1
  1414. package/src/core/forest/editableForest.ts +9 -9
  1415. package/src/core/forest/forest.ts +8 -8
  1416. package/src/core/rebase/changeRebaser.ts +1 -1
  1417. package/src/core/rebase/revisionTagCodec.ts +4 -4
  1418. package/src/core/rebase/types.ts +5 -5
  1419. package/src/core/rebase/utils.ts +6 -6
  1420. package/src/core/schema-stored/format.ts +2 -2
  1421. package/src/core/schema-stored/schema.ts +7 -7
  1422. package/src/core/schema-stored/storedSchemaRepository.ts +6 -6
  1423. package/src/core/schema-view/view.ts +1 -1
  1424. package/src/core/tree/anchorSet.ts +115 -23
  1425. package/src/core/tree/cursor.ts +3 -3
  1426. package/src/core/tree/delta.ts +3 -3
  1427. package/src/core/tree/deltaUtil.ts +4 -4
  1428. package/src/core/tree/detachedFieldIndex.ts +11 -11
  1429. package/src/core/tree/detachedFieldIndexCodec.ts +11 -7
  1430. package/src/core/tree/detachedFieldIndexFormat.ts +2 -2
  1431. package/src/core/tree/detachedFieldIndexTypes.ts +3 -3
  1432. package/src/core/tree/mapTree.ts +2 -2
  1433. package/src/core/tree/pathTree.ts +3 -3
  1434. package/src/core/tree/persistedTreeTextFormat.ts +1 -1
  1435. package/src/core/tree/sparseTree.ts +2 -2
  1436. package/src/core/tree/treeTextFormat.ts +2 -2
  1437. package/src/core/tree/types.ts +10 -4
  1438. package/src/core/tree/visitDelta.ts +8 -8
  1439. package/src/core/tree/visitPath.ts +2 -2
  1440. package/src/core/tree/visitorUtils.ts +9 -9
  1441. package/src/domains/json/jsonCursor.ts +5 -5
  1442. package/src/domains/json/jsonDomainSchema.ts +2 -2
  1443. package/src/domains/schemaBuilder.ts +9 -9
  1444. package/src/feature-libraries/changeAtomIdCodec.ts +2 -2
  1445. package/src/feature-libraries/chunked-forest/basicChunk.ts +9 -9
  1446. package/src/feature-libraries/chunked-forest/chunk.ts +4 -4
  1447. package/src/feature-libraries/chunked-forest/chunkTree.ts +12 -12
  1448. package/src/feature-libraries/chunked-forest/chunkedForest.ts +17 -17
  1449. package/src/feature-libraries/chunked-forest/codec/chunkCodecUtilities.ts +3 -3
  1450. package/src/feature-libraries/chunked-forest/codec/chunkDecoding.ts +33 -17
  1451. package/src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts +12 -7
  1452. package/src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts +5 -5
  1453. package/src/feature-libraries/chunked-forest/codec/codecs.ts +14 -6
  1454. package/src/feature-libraries/chunked-forest/codec/compressedEncode.ts +16 -16
  1455. package/src/feature-libraries/chunked-forest/codec/fieldBatch.ts +1 -1
  1456. package/src/feature-libraries/chunked-forest/codec/format.ts +1 -1
  1457. package/src/feature-libraries/chunked-forest/codec/formatGeneric.ts +1 -1
  1458. package/src/feature-libraries/chunked-forest/codec/nodeShape.ts +19 -14
  1459. package/src/feature-libraries/chunked-forest/codec/schemaBasedEncoding.ts +11 -11
  1460. package/src/feature-libraries/chunked-forest/codec/uncompressedEncode.ts +10 -5
  1461. package/src/feature-libraries/chunked-forest/emptyChunk.ts +5 -5
  1462. package/src/feature-libraries/chunked-forest/sequenceChunk.ts +1 -1
  1463. package/src/feature-libraries/chunked-forest/uniformChunk.ts +8 -8
  1464. package/src/feature-libraries/contextuallyTyped.ts +12 -12
  1465. package/src/feature-libraries/default-schema/defaultEditBuilder.ts +17 -17
  1466. package/src/feature-libraries/default-schema/defaultFieldKinds.ts +11 -11
  1467. package/src/feature-libraries/default-schema/defaultSchema.ts +1 -1
  1468. package/src/feature-libraries/default-schema/noChangeCodecs.ts +2 -2
  1469. package/src/feature-libraries/deltaUtils.ts +7 -2
  1470. package/src/feature-libraries/detachedFieldIndexSummarizer.ts +5 -5
  1471. package/src/feature-libraries/editableTreeBinder.ts +10 -10
  1472. package/src/feature-libraries/fieldGenerator.ts +2 -2
  1473. package/src/feature-libraries/flex-map-tree/mapTreeNode.ts +32 -32
  1474. package/src/feature-libraries/flex-tree/context.ts +11 -11
  1475. package/src/feature-libraries/flex-tree/flexTreeTypes.ts +15 -12
  1476. package/src/feature-libraries/flex-tree/index.ts +1 -1
  1477. package/src/feature-libraries/flex-tree/lazyEntity.ts +9 -4
  1478. package/src/feature-libraries/flex-tree/lazyField.ts +22 -22
  1479. package/src/feature-libraries/flex-tree/lazyNode.ts +32 -38
  1480. package/src/feature-libraries/flex-tree/treeEvents.ts +1 -38
  1481. package/src/feature-libraries/flex-tree/unboxed.ts +7 -7
  1482. package/src/feature-libraries/flex-tree/utilities.ts +2 -2
  1483. package/src/feature-libraries/forest-summary/codec.ts +7 -3
  1484. package/src/feature-libraries/forest-summary/forestSummarizer.ts +15 -15
  1485. package/src/feature-libraries/forest-summary/format.ts +1 -1
  1486. package/src/feature-libraries/index.ts +0 -2
  1487. package/src/feature-libraries/mapTreeCursor.ts +6 -6
  1488. package/src/feature-libraries/memoizedIdRangeAllocator.ts +3 -3
  1489. package/src/feature-libraries/mitigatedChangeFamily.ts +1 -1
  1490. package/src/feature-libraries/modular-schema/comparison.ts +6 -6
  1491. package/src/feature-libraries/modular-schema/crossFieldQueries.ts +3 -3
  1492. package/src/feature-libraries/modular-schema/fieldChangeHandler.ts +7 -7
  1493. package/src/feature-libraries/modular-schema/fieldKind.ts +1 -1
  1494. package/src/feature-libraries/modular-schema/fieldKindConfiguration.ts +2 -2
  1495. package/src/feature-libraries/modular-schema/fieldKindWithEditor.ts +3 -3
  1496. package/src/feature-libraries/modular-schema/genericFieldKind.ts +10 -10
  1497. package/src/feature-libraries/modular-schema/genericFieldKindCodecs.ts +3 -3
  1498. package/src/feature-libraries/modular-schema/genericFieldKindFormat.ts +1 -1
  1499. package/src/feature-libraries/modular-schema/genericFieldKindTypes.ts +1 -1
  1500. package/src/feature-libraries/modular-schema/isNeverTree.ts +4 -4
  1501. package/src/feature-libraries/modular-schema/modularChangeCodecs.ts +25 -20
  1502. package/src/feature-libraries/modular-schema/modularChangeFamily.ts +34 -34
  1503. package/src/feature-libraries/modular-schema/modularChangeFormat.ts +3 -3
  1504. package/src/feature-libraries/modular-schema/modularChangeTypes.ts +3 -3
  1505. package/src/feature-libraries/node-key/mockNodeKeyManager.ts +2 -2
  1506. package/src/feature-libraries/node-key/nodeKey.ts +3 -3
  1507. package/src/feature-libraries/node-key/nodeKeyIndex.ts +4 -4
  1508. package/src/feature-libraries/node-key/nodeKeyManager.ts +1 -1
  1509. package/src/feature-libraries/object-forest/objectForest.ts +22 -22
  1510. package/src/feature-libraries/optional-field/optionalField.ts +20 -20
  1511. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV1.ts +1 -1
  1512. package/src/feature-libraries/optional-field/optionalFieldChangeFormatV2.ts +1 -1
  1513. package/src/feature-libraries/optional-field/optionalFieldChangeTypes.ts +2 -2
  1514. package/src/feature-libraries/optional-field/optionalFieldCodecV1.ts +4 -4
  1515. package/src/feature-libraries/optional-field/optionalFieldCodecV2.ts +4 -4
  1516. package/src/feature-libraries/optional-field/optionalFieldCodecs.ts +2 -2
  1517. package/src/feature-libraries/schema-aware/schemaAware.ts +8 -4
  1518. package/src/feature-libraries/schema-edits/schemaChangeCodecs.ts +3 -3
  1519. package/src/feature-libraries/schema-edits/schemaChangeFormat.ts +1 -1
  1520. package/src/feature-libraries/schema-edits/schemaChangeTypes.ts +1 -1
  1521. package/src/feature-libraries/schema-index/codec.ts +8 -4
  1522. package/src/feature-libraries/schema-index/format.ts +1 -1
  1523. package/src/feature-libraries/schema-index/schemaSummarizer.ts +11 -7
  1524. package/src/feature-libraries/schemaBuilder.ts +2 -2
  1525. package/src/feature-libraries/schemaBuilderBase.ts +12 -12
  1526. package/src/feature-libraries/sequence-field/compose.ts +18 -18
  1527. package/src/feature-libraries/sequence-field/formatV1.ts +1 -1
  1528. package/src/feature-libraries/sequence-field/formatV2.ts +1 -1
  1529. package/src/feature-libraries/sequence-field/helperTypes.ts +1 -1
  1530. package/src/feature-libraries/sequence-field/invert.ts +14 -14
  1531. package/src/feature-libraries/sequence-field/markListFactory.ts +1 -1
  1532. package/src/feature-libraries/sequence-field/markQueue.ts +2 -2
  1533. package/src/feature-libraries/sequence-field/moveEffectTable.ts +5 -5
  1534. package/src/feature-libraries/sequence-field/prune.ts +2 -2
  1535. package/src/feature-libraries/sequence-field/rebase.ts +18 -18
  1536. package/src/feature-libraries/sequence-field/relevantRemovedRoots.ts +3 -3
  1537. package/src/feature-libraries/sequence-field/replaceRevisions.ts +7 -7
  1538. package/src/feature-libraries/sequence-field/sequenceFieldChangeHandler.ts +3 -3
  1539. package/src/feature-libraries/sequence-field/sequenceFieldChangeRebaser.ts +2 -2
  1540. package/src/feature-libraries/sequence-field/sequenceFieldCodecV1.ts +17 -17
  1541. package/src/feature-libraries/sequence-field/sequenceFieldCodecV2.ts +16 -16
  1542. package/src/feature-libraries/sequence-field/sequenceFieldCodecs.ts +4 -4
  1543. package/src/feature-libraries/sequence-field/sequenceFieldEditor.ts +12 -3
  1544. package/src/feature-libraries/sequence-field/sequenceFieldToDelta.ts +7 -7
  1545. package/src/feature-libraries/sequence-field/types.ts +2 -2
  1546. package/src/feature-libraries/sequence-field/utils.ts +25 -25
  1547. package/src/feature-libraries/storedToViewSchema.ts +7 -7
  1548. package/src/feature-libraries/treeCursorUtils.ts +8 -8
  1549. package/src/feature-libraries/treeTextCursor.ts +10 -6
  1550. package/src/feature-libraries/typed-schema/schemaCollection.ts +11 -6
  1551. package/src/feature-libraries/typed-schema/typedTreeSchema.ts +16 -16
  1552. package/src/feature-libraries/typed-schema/view.ts +8 -8
  1553. package/src/feature-libraries/valueUtilities.ts +2 -2
  1554. package/src/index.ts +0 -1
  1555. package/src/packageVersion.ts +1 -1
  1556. package/src/shared-tree/schematizeTree.ts +7 -7
  1557. package/src/shared-tree/schematizingTreeView.ts +19 -16
  1558. package/src/shared-tree/sharedTree.ts +28 -16
  1559. package/src/shared-tree/sharedTreeChangeCodecs.ts +11 -8
  1560. package/src/shared-tree/sharedTreeChangeEnricher.ts +8 -8
  1561. package/src/shared-tree/sharedTreeChangeFamily.ts +21 -15
  1562. package/src/shared-tree/sharedTreeChangeFormat.ts +1 -1
  1563. package/src/shared-tree/sharedTreeChangeTypes.ts +1 -1
  1564. package/src/shared-tree/sharedTreeEditBuilder.ts +4 -4
  1565. package/src/shared-tree/treeApi.ts +5 -5
  1566. package/src/shared-tree/treeCheckout.ts +28 -23
  1567. package/src/shared-tree/treeView.ts +8 -8
  1568. package/src/shared-tree-core/branch.ts +8 -8
  1569. package/src/shared-tree-core/branchCommitEnricher.ts +2 -2
  1570. package/src/shared-tree-core/changeEnricher.ts +1 -1
  1571. package/src/shared-tree-core/defaultResubmitMachine.ts +2 -2
  1572. package/src/shared-tree-core/editManager.ts +8 -8
  1573. package/src/shared-tree-core/editManagerCodecs.ts +13 -8
  1574. package/src/shared-tree-core/editManagerFormat.ts +5 -5
  1575. package/src/shared-tree-core/editManagerSummarizer.ts +13 -9
  1576. package/src/shared-tree-core/messageCodecs.ts +7 -7
  1577. package/src/shared-tree-core/messageFormat.ts +4 -4
  1578. package/src/shared-tree-core/messageTypes.ts +2 -2
  1579. package/src/shared-tree-core/resubmitMachine.ts +1 -1
  1580. package/src/shared-tree-core/sequenceIdUtils.ts +1 -1
  1581. package/src/shared-tree-core/sharedTreeCore.ts +20 -20
  1582. package/src/shared-tree-core/transactionEnricher.ts +2 -2
  1583. package/src/shared-tree-core/transactionStack.ts +1 -1
  1584. package/src/simple-tree/arrayNode.ts +32 -28
  1585. package/src/simple-tree/leafNodeSchema.ts +4 -4
  1586. package/src/simple-tree/mapNode.ts +10 -10
  1587. package/src/simple-tree/nodeKeys.ts +2 -2
  1588. package/src/simple-tree/objectNode.ts +18 -18
  1589. package/src/simple-tree/proxies.ts +21 -27
  1590. package/src/simple-tree/proxyBinding.ts +14 -14
  1591. package/src/simple-tree/schemaCaching.ts +5 -5
  1592. package/src/simple-tree/schemaCreationUtilities.ts +5 -5
  1593. package/src/simple-tree/schemaFactory.ts +39 -22
  1594. package/src/simple-tree/schemaFactoryRecursive.ts +13 -13
  1595. package/src/simple-tree/schemaTypes.ts +8 -8
  1596. package/src/simple-tree/testRecursiveDomain.ts +1 -1
  1597. package/src/simple-tree/toFlexSchema.ts +13 -13
  1598. package/src/simple-tree/toMapTree.ts +4 -4
  1599. package/src/simple-tree/tree.ts +6 -31
  1600. package/src/simple-tree/treeNodeApi.ts +45 -33
  1601. package/src/simple-tree/types.ts +60 -12
  1602. package/src/simple-tree/typesUnsafe.ts +6 -6
  1603. package/src/treeFactory.ts +5 -5
  1604. package/src/util/brandedMap.ts +1 -1
  1605. package/src/util/nestedMap.ts +1 -1
  1606. package/src/util/nestedSet.ts +1 -1
  1607. package/src/util/typeboxBrand.ts +1 -1
@@ -17,8 +17,8 @@ const format_js_1 = require("./format.js");
17
17
  /**
18
18
  * Decode `chunk` into a TreeChunk.
19
19
  */
20
- function decode(chunk, idCompressor) {
21
- return (0, chunkDecodingGeneric_js_1.decode)(decoderLibrary, new chunkDecodingGeneric_js_1.DecoderContext(chunk.identifiers, chunk.shapes, idCompressor), chunk, exports.anyDecoder);
20
+ function decode(chunk, idDecodingContext) {
21
+ return (0, chunkDecodingGeneric_js_1.decode)(decoderLibrary, new chunkDecodingGeneric_js_1.DecoderContext(chunk.identifiers, chunk.shapes, idDecodingContext), chunk, exports.anyDecoder);
22
22
  }
23
23
  exports.decode = decode;
24
24
  const decoderLibrary = new index_js_1.DiscriminatedUnionDispatcher({
@@ -38,7 +38,7 @@ const decoderLibrary = new index_js_1.DiscriminatedUnionDispatcher({
38
38
  /**
39
39
  * Decode a node's value from `stream` using its shape.
40
40
  */
41
- function readValue(stream, shape, idCompressor) {
41
+ function readValue(stream, shape, idDecodingContext) {
42
42
  if (shape === undefined) {
43
43
  return (0, chunkCodecUtilities_js_1.readStreamBoolean)(stream) ? (0, chunkCodecUtilities_js_1.readStreamValue)(stream) : undefined;
44
44
  }
@@ -57,8 +57,9 @@ function readValue(stream, shape, idCompressor) {
57
57
  // This case is a special case handling the decoding of identifier fields.
58
58
  const streamValue = (0, chunkCodecUtilities_js_1.readStream)(stream);
59
59
  (0, internal_1.assert)(typeof streamValue === "number" || typeof streamValue === "string", "identifier must be string or number.");
60
+ const idCompressor = idDecodingContext.idCompressor;
60
61
  return typeof streamValue === "number"
61
- ? idCompressor.decompress(streamValue)
62
+ ? idCompressor.decompress(idCompressor.normalizeToSessionSpace(streamValue, idDecodingContext.originatorId))
62
63
  : streamValue;
63
64
  }
64
65
  else {
@@ -119,7 +120,6 @@ exports.aggregateChunks = aggregateChunks;
119
120
  * Decoder for {@link EncodedNestedArray}s.
120
121
  */
121
122
  class NestedArrayDecoder {
122
- shape;
123
123
  constructor(shape) {
124
124
  this.shape = shape;
125
125
  }
@@ -150,7 +150,6 @@ exports.NestedArrayDecoder = NestedArrayDecoder;
150
150
  * Decoder for {@link EncodedInlineArray}s.
151
151
  */
152
152
  class InlineArrayDecoder {
153
- shape;
154
153
  constructor(shape) {
155
154
  this.shape = shape;
156
155
  }
@@ -186,10 +185,6 @@ function fieldDecoder(cache, key, shape) {
186
185
  * Decoder for {@link EncodedTreeShape}s.
187
186
  */
188
187
  class TreeDecoder {
189
- shape;
190
- cache;
191
- type;
192
- fieldDecoders;
193
188
  constructor(shape, cache) {
194
189
  this.shape = shape;
195
190
  this.cache = cache;
@@ -204,7 +199,7 @@ class TreeDecoder {
204
199
  decode(decoders, stream) {
205
200
  const type = this.type ?? (0, chunkDecodingGeneric_js_1.readStreamIdentifier)(stream, this.cache);
206
201
  // TODO: Consider typechecking against stored schema in here somewhere.
207
- const value = readValue(stream, this.shape.value, this.cache.idCompressor);
202
+ const value = readValue(stream, this.shape.value, this.cache.idDecodingContext);
208
203
  const fields = new Map();
209
204
  // Helper to add fields, but with unneeded array chunks removed.
210
205
  function addField(key, data) {
@@ -1 +1 @@
1
- {"version":3,"file":"chunkDecoding.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/chunkDecoding.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA8E;AAE9E,sDAAuE;AAEvE,qDAA0D;AAC1D,oDAA8C;AAE9C,oDAA8C;AAC9C,0DAAoD;AAEpD,qEASkC;AAClC,uEAImC;AACnC,2CASqB;AAGrB;;GAEG;AACH,SAAgB,MAAM,CAAC,KAAwB,EAAE,YAA2B;IAC3E,OAAO,IAAA,gCAAa,EACnB,cAAc,EACd,IAAI,wCAAc,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE,YAAY,CAAC,EACjE,KAAK,EACL,kBAAU,CACV,CAAC;AACH,CAAC;AAPD,wBAOC;AAED,MAAM,cAAc,GAAG,IAAI,uCAA4B,CAIrD;IACD,CAAC,CAAC,KAAyB,EAAE,KAAK;QACjC,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IACD,CAAC,CAAC,KAAyB,EAAE,KAAK;QACjC,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IACD,CAAC,CAAC,KAAuB,EAAE,KAAK;QAC/B,OAAO,IAAI,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACtC,CAAC;IACD,CAAC,CAAC,KAAsB;QACvB,OAAO,kBAAU,CAAC;IACnB,CAAC;CACD,CAAC,CAAC;AAEH;;GAEG;AACH,SAAgB,SAAS,CACxB,MAAoB,EACpB,KAAwB,EACxB,YAA2B;IAE3B,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,IAAA,0CAAiB,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAA,wCAAe,EAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACxE,CAAC;SAAM,CAAC;QACP,IAAI,KAAK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;YACjD,MAAM,KAAK,GAAG,IAAA,yCAAgB,EAAC,MAAM,CAAC,CAAC;YACvC,OAAO,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC3C,MAAM,GAAG,GAAa,IAAA,8CAAoB,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC9D,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;YAChD,CAAC;QACF,CAAC;QAED,OAAO,IAAI,0BAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;CACD;AAnDD,kCAmDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport { DiscriminatedUnionDispatcher } from \"../../../codec/index.js\";\nimport { FieldKey, TreeNodeSchemaIdentifier, Value } from \"../../../core/index.js\";\nimport { assertValidIndex } from \"../../../util/index.js\";\nimport { BasicChunk } from \"../basicChunk.js\";\nimport { TreeChunk } from \"../chunk.js\";\nimport { emptyChunk } from \"../emptyChunk.js\";\nimport { SequenceChunk } from \"../sequenceChunk.js\";\n\nimport {\n\tChunkDecoder,\n\tStreamCursor,\n\tgetChecked,\n\treadStream,\n\treadStreamBoolean,\n\treadStreamNumber,\n\treadStreamStream,\n\treadStreamValue,\n} from \"./chunkCodecUtilities.js\";\nimport {\n\tDecoderContext,\n\tdecode as genericDecode,\n\treadStreamIdentifier,\n} from \"./chunkDecodingGeneric.js\";\nimport {\n\tEncodedAnyShape,\n\tEncodedChunkShape,\n\tEncodedFieldBatch,\n\tEncodedInlineArray,\n\tEncodedNestedArray,\n\tEncodedTreeShape,\n\tEncodedValueShape,\n\tSpecialField,\n} from \"./format.js\";\nimport { IIdCompressor, SessionSpaceCompressedId } from \"@fluidframework/id-compressor\";\n\n/**\n * Decode `chunk` into a TreeChunk.\n */\nexport function decode(chunk: EncodedFieldBatch, idCompressor: IIdCompressor): TreeChunk[] {\n\treturn genericDecode(\n\t\tdecoderLibrary,\n\t\tnew DecoderContext(chunk.identifiers, chunk.shapes, idCompressor),\n\t\tchunk,\n\t\tanyDecoder,\n\t);\n}\n\nconst decoderLibrary = new DiscriminatedUnionDispatcher<\n\tEncodedChunkShape,\n\t[cache: DecoderContext<EncodedChunkShape>],\n\tChunkDecoder\n>({\n\ta(shape: EncodedNestedArray, cache): ChunkDecoder {\n\t\treturn new NestedArrayDecoder(shape);\n\t},\n\tb(shape: EncodedInlineArray, cache): ChunkDecoder {\n\t\treturn new InlineArrayDecoder(shape);\n\t},\n\tc(shape: EncodedTreeShape, cache): ChunkDecoder {\n\t\treturn new TreeDecoder(shape, cache);\n\t},\n\td(shape: EncodedAnyShape): ChunkDecoder {\n\t\treturn anyDecoder;\n\t},\n});\n\n/**\n * Decode a node's value from `stream` using its shape.\n */\nexport function readValue(\n\tstream: StreamCursor,\n\tshape: EncodedValueShape,\n\tidCompressor: IIdCompressor,\n): Value {\n\tif (shape === undefined) {\n\t\treturn readStreamBoolean(stream) ? readStreamValue(stream) : undefined;\n\t} else {\n\t\tif (shape === true) {\n\t\t\treturn readStreamValue(stream);\n\t\t} else if (shape === false) {\n\t\t\treturn undefined;\n\t\t} else if (Array.isArray(shape)) {\n\t\t\tassert(shape.length === 1, 0x734 /* expected a single constant for value */);\n\t\t\treturn shape[0] as Value;\n\t\t} else if (shape === SpecialField.Identifier) {\n\t\t\t// This case is a special case handling the decoding of identifier fields.\n\t\t\tconst streamValue = readStream(stream);\n\t\t\tassert(\n\t\t\t\ttypeof streamValue === \"number\" || typeof streamValue === \"string\",\n\t\t\t\t\"identifier must be string or number.\",\n\t\t\t);\n\t\t\treturn typeof streamValue === \"number\"\n\t\t\t\t? idCompressor.decompress(streamValue as SessionSpaceCompressedId)\n\t\t\t\t: streamValue;\n\t\t} else {\n\t\t\t// EncodedCounter case:\n\t\t\tunreachableCase(shape, \"decoding values as deltas is not yet supported\");\n\t\t}\n\t}\n}\n\n/**\n * Normalize a {@link TreeChunk} into an array.\n *\n * Unwraps {@link SequenceChunk}s, and wraps other chunks.\n */\nexport function deaggregateChunks(chunk: TreeChunk): TreeChunk[] {\n\tif (chunk === emptyChunk) {\n\t\treturn [];\n\t}\n\t// TODO: when handling of SequenceChunks has better performance (for example in cursors),\n\t// consider keeping SequenceChunks here if they are longer than some threshold.\n\tif (chunk instanceof SequenceChunk) {\n\t\t// Could return [] here, however the logic in this file is designed to never produce an empty SequenceChunk, so its better to throw an error here to detect bugs.\n\t\tassert(chunk.subChunks.length > 0, 0x735 /* Unexpected empty sequence */);\n\t\t// Logic in this file is designed to never produce an unneeded (single item) SequenceChunks, so its better to throw an error here to detect bugs.\n\t\tassert(chunk.subChunks.length > 1, 0x736 /* Unexpected single item sequence */);\n\n\t\tfor (const sub of chunk.subChunks) {\n\t\t\t// The logic in this file is designed to never produce an nested SequenceChunks or emptyChunk, so its better to throw an error here to detect bugs.\n\t\t\tassert(!(sub instanceof SequenceChunk), 0x737 /* unexpected nested sequence */);\n\t\t\tassert(sub !== emptyChunk, 0x738 /* unexpected empty chunk */);\n\n\t\t\tsub.referenceAdded();\n\t\t}\n\n\t\tchunk.referenceRemoved();\n\t\treturn chunk.subChunks;\n\t} else {\n\t\treturn [chunk];\n\t}\n}\n\n/**\n * Normalize a {@link TreeChunk}[] into a single TreeChunk.\n *\n * Avoids creating nested or less than 2 child {@link SequenceChunk}s.\n */\nexport function aggregateChunks(input: TreeChunk[]): TreeChunk {\n\tconst chunks = input.flatMap(deaggregateChunks);\n\tswitch (chunks.length) {\n\t\tcase 0:\n\t\t\treturn emptyChunk;\n\t\tcase 1:\n\t\t\treturn chunks[0];\n\t\tdefault:\n\t\t\treturn new SequenceChunk(chunks);\n\t}\n}\n\n/**\n * Decoder for {@link EncodedNestedArray}s.\n */\nexport class NestedArrayDecoder implements ChunkDecoder {\n\tpublic constructor(private readonly shape: EncodedNestedArray) {}\n\tpublic decode(decoders: readonly ChunkDecoder[], stream: StreamCursor): TreeChunk {\n\t\tconst decoder = decoders[this.shape];\n\n\t\t// TODO: uniform chunk fast path\n\t\tconst chunks: TreeChunk[] = [];\n\n\t\tconst data = readStream(stream);\n\t\tif (typeof data === \"number\") {\n\t\t\t// This case means that the array contained only 0-sized items, and was thus encoded as the length of the array.\n\t\t\tconst inner = { data: [], offset: 0 };\n\t\t\tfor (let index = 0; index < data; index++) {\n\t\t\t\tchunks.push(decoder.decode(decoders, inner));\n\t\t\t}\n\t\t} else {\n\t\t\tassert(\n\t\t\t\tArray.isArray(data),\n\t\t\t\t0x739 /* expected number of array for encoding of nested array */,\n\t\t\t);\n\t\t\tconst inner = { data, offset: 0 };\n\t\t\twhile (inner.offset !== inner.data.length) {\n\t\t\t\tchunks.push(decoder.decode(decoders, inner));\n\t\t\t}\n\t\t}\n\n\t\treturn aggregateChunks(chunks);\n\t}\n}\n\n/**\n * Decoder for {@link EncodedInlineArray}s.\n */\nexport class InlineArrayDecoder implements ChunkDecoder {\n\tpublic constructor(private readonly shape: EncodedInlineArray) {}\n\tpublic decode(decoders: readonly ChunkDecoder[], stream: StreamCursor): TreeChunk {\n\t\tconst length = this.shape.length;\n\t\tconst decoder = decoders[this.shape.shape];\n\t\tconst chunks: TreeChunk[] = [];\n\t\tfor (let index = 0; index < length; index++) {\n\t\t\tchunks.push(decoder.decode(decoders, stream));\n\t\t}\n\t\treturn aggregateChunks(chunks);\n\t}\n}\n\n/**\n * Decoder for {@link EncodedAnyShape}s.\n */\nexport const anyDecoder: ChunkDecoder = {\n\tdecode(decoders: readonly ChunkDecoder[], stream: StreamCursor): TreeChunk {\n\t\tconst shapeIndex = readStreamNumber(stream);\n\t\tconst decoder = getChecked(decoders, shapeIndex);\n\t\treturn decoder.decode(decoders, stream);\n\t},\n};\n\n/**\n * Decoder for field.\n */\ntype BasicFieldDecoder = (\n\tdecoders: readonly ChunkDecoder[],\n\tstream: StreamCursor,\n) => [FieldKey, TreeChunk];\n\n/**\n * Get a decoder for fields of a provided (via `shape` and `cache`) {@link EncodedChunkShape}.\n */\nfunction fieldDecoder(\n\tcache: DecoderContext<EncodedChunkShape>,\n\tkey: FieldKey,\n\tshape: number,\n): BasicFieldDecoder {\n\tassertValidIndex(shape, cache.shapes);\n\treturn (decoders, stream) => [key, decoders[shape].decode(decoders, stream)];\n}\n\n/**\n * Decoder for {@link EncodedTreeShape}s.\n */\nexport class TreeDecoder implements ChunkDecoder {\n\tprivate readonly type?: TreeNodeSchemaIdentifier;\n\tprivate readonly fieldDecoders: readonly BasicFieldDecoder[];\n\tpublic constructor(\n\t\tprivate readonly shape: EncodedTreeShape,\n\t\tprivate readonly cache: DecoderContext<EncodedChunkShape>,\n\t) {\n\t\tthis.type = shape.type === undefined ? undefined : cache.identifier(shape.type);\n\n\t\tconst fieldDecoders: BasicFieldDecoder[] = [];\n\t\tfor (const [fieldKey, fieldShape] of shape.fields ?? []) {\n\t\t\tconst key: FieldKey = cache.identifier(fieldKey);\n\t\t\tfieldDecoders.push(fieldDecoder(cache, key, fieldShape));\n\t\t}\n\t\tthis.fieldDecoders = fieldDecoders;\n\t}\n\tpublic decode(decoders: readonly ChunkDecoder[], stream: StreamCursor): TreeChunk {\n\t\tconst type: TreeNodeSchemaIdentifier =\n\t\t\tthis.type ?? readStreamIdentifier(stream, this.cache);\n\t\t// TODO: Consider typechecking against stored schema in here somewhere.\n\n\t\tconst value = readValue(stream, this.shape.value, this.cache.idCompressor);\n\t\tconst fields: Map<FieldKey, TreeChunk[]> = new Map();\n\n\t\t// Helper to add fields, but with unneeded array chunks removed.\n\t\tfunction addField(key: FieldKey, data: TreeChunk): void {\n\t\t\t// TODO: when handling of ArrayChunks has better performance (for example in cursors),\n\t\t\t// consider keeping array chunks here if they are longer than some threshold.\n\t\t\tconst chunks = deaggregateChunks(data);\n\n\t\t\tif (chunks.length !== 0) {\n\t\t\t\tfields.set(key, chunks);\n\t\t\t}\n\t\t}\n\n\t\tfor (const field of this.fieldDecoders) {\n\t\t\tconst [key, content] = field(decoders, stream);\n\t\t\taddField(key, content);\n\t\t}\n\n\t\tif (this.shape.extraFields !== undefined) {\n\t\t\tconst decoder = decoders[this.shape.extraFields];\n\t\t\tconst inner = readStreamStream(stream);\n\t\t\twhile (inner.offset !== inner.data.length) {\n\t\t\t\tconst key: FieldKey = readStreamIdentifier(inner, this.cache);\n\t\t\t\taddField(key, decoder.decode(decoders, inner));\n\t\t\t}\n\t\t}\n\n\t\treturn new BasicChunk(type, fields, value);\n\t}\n}\n"]}
1
+ {"version":3,"file":"chunkDecoding.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/chunkDecoding.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA8E;AAE9E,sDAAuE;AAEvE,qDAA0D;AAC1D,oDAA8C;AAE9C,oDAA8C;AAC9C,0DAAoD;AAEpD,qEASkC;AAClC,uEAImC;AACnC,2CASqB;AAUrB;;GAEG;AACH,SAAgB,MAAM,CACrB,KAAwB,EACxB,iBAA2E;IAE3E,OAAO,IAAA,gCAAa,EACnB,cAAc,EACd,IAAI,wCAAc,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,MAAM,EAAE,iBAAiB,CAAC,EACtE,KAAK,EACL,kBAAU,CACV,CAAC;AACH,CAAC;AAVD,wBAUC;AAED,MAAM,cAAc,GAAG,IAAI,uCAA4B,CAIrD;IACD,CAAC,CAAC,KAAyB,EAAE,KAAK;QACjC,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IACD,CAAC,CAAC,KAAyB,EAAE,KAAK;QACjC,OAAO,IAAI,kBAAkB,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IACD,CAAC,CAAC,KAAuB,EAAE,KAAK;QAC/B,OAAO,IAAI,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;IACtC,CAA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,GAAG,EAAE,MAAM,CAAC,CAAC;YACzB,CAAC;QACF,CAAC;QAED,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACxC,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC/C,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;QACxB,CAAC;QAED,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;YAC1C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;YACjD,MAAM,KAAK,GAAG,IAAA,yCAAgB,EAAC,MAAM,CAAC,CAAC;YACvC,OAAO,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;gBAC3C,MAAM,GAAG,GAAa,IAAA,8CAAoB,EAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;gBAC9D,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC;YAChD,CAAC;QACF,CAAC;QAED,OAAO,IAAI,0BAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;CACD;AAnDD,kCAmDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport { DiscriminatedUnionDispatcher } from \"../../../codec/index.js\";\nimport type { FieldKey, TreeNodeSchemaIdentifier, Value } from \"../../../core/index.js\";\nimport { assertValidIndex } from \"../../../util/index.js\";\nimport { BasicChunk } from \"../basicChunk.js\";\nimport type { TreeChunk } from \"../chunk.js\";\nimport { emptyChunk } from \"../emptyChunk.js\";\nimport { SequenceChunk } from \"../sequenceChunk.js\";\n\nimport {\n\ttype ChunkDecoder,\n\ttype StreamCursor,\n\tgetChecked,\n\treadStream,\n\treadStreamBoolean,\n\treadStreamNumber,\n\treadStreamStream,\n\treadStreamValue,\n} from \"./chunkCodecUtilities.js\";\nimport {\n\tDecoderContext,\n\tdecode as genericDecode,\n\treadStreamIdentifier,\n} from \"./chunkDecodingGeneric.js\";\nimport {\n\ttype EncodedAnyShape,\n\ttype EncodedChunkShape,\n\ttype EncodedFieldBatch,\n\ttype EncodedInlineArray,\n\ttype EncodedNestedArray,\n\ttype EncodedTreeShape,\n\ttype EncodedValueShape,\n\tSpecialField,\n} from \"./format.js\";\nimport type { IIdCompressor, OpSpaceCompressedId, SessionId } from \"@fluidframework/id-compressor\";\n\nexport interface IdDecodingContext {\n\tidCompressor: IIdCompressor;\n\t/**\n\t * The creator of any local Ids to be decoded.\n\t */\n\toriginatorId: SessionId;\n}\n/**\n * Decode `chunk` into a TreeChunk.\n */\nexport function decode(\n\tchunk: EncodedFieldBatch,\n\tidDecodingContext: { idCompressor: IIdCompressor; originatorId: SessionId },\n): TreeChunk[] {\n\treturn genericDecode(\n\t\tdecoderLibrary,\n\t\tnew DecoderContext(chunk.identifiers, chunk.shapes, idDecodingContext),\n\t\tchunk,\n\t\tanyDecoder,\n\t);\n}\n\nconst decoderLibrary = new DiscriminatedUnionDispatcher<\n\tEncodedChunkShape,\n\t[cache: DecoderContext<EncodedChunkShape>],\n\tChunkDecoder\n>({\n\ta(shape: EncodedNestedArray, cache): ChunkDecoder {\n\t\treturn new NestedArrayDecoder(shape);\n\t},\n\tb(shape: EncodedInlineArray, cache): ChunkDecoder {\n\t\treturn new InlineArrayDecoder(shape);\n\t},\n\tc(shape: EncodedTreeShape, cache): ChunkDecoder {\n\t\treturn new TreeDecoder(shape, cache);\n\t},\n\td(shape: EncodedAnyShape): ChunkDecoder {\n\t\treturn anyDecoder;\n\t},\n});\n\n/**\n * Decode a node's value from `stream` using its shape.\n */\nexport function readValue(\n\tstream: StreamCursor,\n\tshape: EncodedValueShape,\n\tidDecodingContext: IdDecodingContext,\n): Value {\n\tif (shape === undefined) {\n\t\treturn readStreamBoolean(stream) ? readStreamValue(stream) : undefined;\n\t} else {\n\t\tif (shape === true) {\n\t\t\treturn readStreamValue(stream);\n\t\t} else if (shape === false) {\n\t\t\treturn undefined;\n\t\t} else if (Array.isArray(shape)) {\n\t\t\tassert(shape.length === 1, 0x734 /* expected a single constant for value */);\n\t\t\treturn shape[0] as Value;\n\t\t} else if (shape === SpecialField.Identifier) {\n\t\t\t// This case is a special case handling the decoding of identifier fields.\n\t\t\tconst streamValue = readStream(stream);\n\t\t\tassert(\n\t\t\t\ttypeof streamValue === \"number\" || typeof streamValue === \"string\",\n\t\t\t\t\"identifier must be string or number.\",\n\t\t\t);\n\t\t\tconst idCompressor = idDecodingContext.idCompressor;\n\t\t\treturn typeof streamValue === \"number\"\n\t\t\t\t? idCompressor.decompress(\n\t\t\t\t\t\tidCompressor.normalizeToSessionSpace(\n\t\t\t\t\t\t\tstreamValue as OpSpaceCompressedId,\n\t\t\t\t\t\t\tidDecodingContext.originatorId,\n\t\t\t\t\t\t),\n\t\t\t\t )\n\t\t\t\t: streamValue;\n\t\t} else {\n\t\t\t// EncodedCounter case:\n\t\t\tunreachableCase(shape, \"decoding values as deltas is not yet supported\");\n\t\t}\n\t}\n}\n\n/**\n * Normalize a {@link TreeChunk} into an array.\n *\n * Unwraps {@link SequenceChunk}s, and wraps other chunks.\n */\nexport function deaggregateChunks(chunk: TreeChunk): TreeChunk[] {\n\tif (chunk === emptyChunk) {\n\t\treturn [];\n\t}\n\t// TODO: when handling of SequenceChunks has better performance (for example in cursors),\n\t// consider keeping SequenceChunks here if they are longer than some threshold.\n\tif (chunk instanceof SequenceChunk) {\n\t\t// Could return [] here, however the logic in this file is designed to never produce an empty SequenceChunk, so its better to throw an error here to detect bugs.\n\t\tassert(chunk.subChunks.length > 0, 0x735 /* Unexpected empty sequence */);\n\t\t// Logic in this file is designed to never produce an unneeded (single item) SequenceChunks, so its better to throw an error here to detect bugs.\n\t\tassert(chunk.subChunks.length > 1, 0x736 /* Unexpected single item sequence */);\n\n\t\tfor (const sub of chunk.subChunks) {\n\t\t\t// The logic in this file is designed to never produce an nested SequenceChunks or emptyChunk, so its better to throw an error here to detect bugs.\n\t\t\tassert(!(sub instanceof SequenceChunk), 0x737 /* unexpected nested sequence */);\n\t\t\tassert(sub !== emptyChunk, 0x738 /* unexpected empty chunk */);\n\n\t\t\tsub.referenceAdded();\n\t\t}\n\n\t\tchunk.referenceRemoved();\n\t\treturn chunk.subChunks;\n\t} else {\n\t\treturn [chunk];\n\t}\n}\n\n/**\n * Normalize a {@link TreeChunk}[] into a single TreeChunk.\n *\n * Avoids creating nested or less than 2 child {@link SequenceChunk}s.\n */\nexport function aggregateChunks(input: TreeChunk[]): TreeChunk {\n\tconst chunks = input.flatMap(deaggregateChunks);\n\tswitch (chunks.length) {\n\t\tcase 0:\n\t\t\treturn emptyChunk;\n\t\tcase 1:\n\t\t\treturn chunks[0];\n\t\tdefault:\n\t\t\treturn new SequenceChunk(chunks);\n\t}\n}\n\n/**\n * Decoder for {@link EncodedNestedArray}s.\n */\nexport class NestedArrayDecoder implements ChunkDecoder {\n\tpublic constructor(private readonly shape: EncodedNestedArray) {}\n\tpublic decode(decoders: readonly ChunkDecoder[], stream: StreamCursor): TreeChunk {\n\t\tconst decoder = decoders[this.shape];\n\n\t\t// TODO: uniform chunk fast path\n\t\tconst chunks: TreeChunk[] = [];\n\n\t\tconst data = readStream(stream);\n\t\tif (typeof data === \"number\") {\n\t\t\t// This case means that the array contained only 0-sized items, and was thus encoded as the length of the array.\n\t\t\tconst inner = { data: [], offset: 0 };\n\t\t\tfor (let index = 0; index < data; index++) {\n\t\t\t\tchunks.push(decoder.decode(decoders, inner));\n\t\t\t}\n\t\t} else {\n\t\t\tassert(\n\t\t\t\tArray.isArray(data),\n\t\t\t\t0x739 /* expected number of array for encoding of nested array */,\n\t\t\t);\n\t\t\tconst inner = { data, offset: 0 };\n\t\t\twhile (inner.offset !== inner.data.length) {\n\t\t\t\tchunks.push(decoder.decode(decoders, inner));\n\t\t\t}\n\t\t}\n\n\t\treturn aggregateChunks(chunks);\n\t}\n}\n\n/**\n * Decoder for {@link EncodedInlineArray}s.\n */\nexport class InlineArrayDecoder implements ChunkDecoder {\n\tpublic constructor(private readonly shape: EncodedInlineArray) {}\n\tpublic decode(decoders: readonly ChunkDecoder[], stream: StreamCursor): TreeChunk {\n\t\tconst length = this.shape.length;\n\t\tconst decoder = decoders[this.shape.shape];\n\t\tconst chunks: TreeChunk[] = [];\n\t\tfor (let index = 0; index < length; index++) {\n\t\t\tchunks.push(decoder.decode(decoders, stream));\n\t\t}\n\t\treturn aggregateChunks(chunks);\n\t}\n}\n\n/**\n * Decoder for {@link EncodedAnyShape}s.\n */\nexport const anyDecoder: ChunkDecoder = {\n\tdecode(decoders: readonly ChunkDecoder[], stream: StreamCursor): TreeChunk {\n\t\tconst shapeIndex = readStreamNumber(stream);\n\t\tconst decoder = getChecked(decoders, shapeIndex);\n\t\treturn decoder.decode(decoders, stream);\n\t},\n};\n\n/**\n * Decoder for field.\n */\ntype BasicFieldDecoder = (\n\tdecoders: readonly ChunkDecoder[],\n\tstream: StreamCursor,\n) => [FieldKey, TreeChunk];\n\n/**\n * Get a decoder for fields of a provided (via `shape` and `cache`) {@link EncodedChunkShape}.\n */\nfunction fieldDecoder(\n\tcache: DecoderContext<EncodedChunkShape>,\n\tkey: FieldKey,\n\tshape: number,\n): BasicFieldDecoder {\n\tassertValidIndex(shape, cache.shapes);\n\treturn (decoders, stream) => [key, decoders[shape].decode(decoders, stream)];\n}\n\n/**\n * Decoder for {@link EncodedTreeShape}s.\n */\nexport class TreeDecoder implements ChunkDecoder {\n\tprivate readonly type?: TreeNodeSchemaIdentifier;\n\tprivate readonly fieldDecoders: readonly BasicFieldDecoder[];\n\tpublic constructor(\n\t\tprivate readonly shape: EncodedTreeShape,\n\t\tprivate readonly cache: DecoderContext<EncodedChunkShape>,\n\t) {\n\t\tthis.type = shape.type === undefined ? undefined : cache.identifier(shape.type);\n\n\t\tconst fieldDecoders: BasicFieldDecoder[] = [];\n\t\tfor (const [fieldKey, fieldShape] of shape.fields ?? []) {\n\t\t\tconst key: FieldKey = cache.identifier(fieldKey);\n\t\t\tfieldDecoders.push(fieldDecoder(cache, key, fieldShape));\n\t\t}\n\t\tthis.fieldDecoders = fieldDecoders;\n\t}\n\tpublic decode(decoders: readonly ChunkDecoder[], stream: StreamCursor): TreeChunk {\n\t\tconst type: TreeNodeSchemaIdentifier =\n\t\t\tthis.type ?? readStreamIdentifier(stream, this.cache);\n\t\t// TODO: Consider typechecking against stored schema in here somewhere.\n\n\t\tconst value = readValue(stream, this.shape.value, this.cache.idDecodingContext);\n\t\tconst fields: Map<FieldKey, TreeChunk[]> = new Map();\n\n\t\t// Helper to add fields, but with unneeded array chunks removed.\n\t\tfunction addField(key: FieldKey, data: TreeChunk): void {\n\t\t\t// TODO: when handling of ArrayChunks has better performance (for example in cursors),\n\t\t\t// consider keeping array chunks here if they are longer than some threshold.\n\t\t\tconst chunks = deaggregateChunks(data);\n\n\t\t\tif (chunks.length !== 0) {\n\t\t\t\tfields.set(key, chunks);\n\t\t\t}\n\t\t}\n\n\t\tfor (const field of this.fieldDecoders) {\n\t\t\tconst [key, content] = field(decoders, stream);\n\t\t\taddField(key, content);\n\t\t}\n\n\t\tif (this.shape.extraFields !== undefined) {\n\t\t\tconst decoder = decoders[this.shape.extraFields];\n\t\t\tconst inner = readStreamStream(stream);\n\t\t\twhile (inner.offset !== inner.data.length) {\n\t\t\t\tconst key: FieldKey = readStreamIdentifier(inner, this.cache);\n\t\t\t\taddField(key, decoder.decode(decoders, inner));\n\t\t\t}\n\t\t}\n\n\t\treturn new BasicChunk(type, fields, value);\n\t}\n}\n"]}
@@ -2,12 +2,12 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { DiscriminatedUnionDispatcher } from "../../../codec/index.js";
6
- import { BrandedType } from "../../../util/index.js";
7
- import { TreeChunk } from "../chunk.js";
8
- import { ChunkDecoder, StreamCursor } from "./chunkCodecUtilities.js";
9
- import { EncodedFieldBatchGeneric, IdentifierOrIndex } from "./formatGeneric.js";
10
- import { IIdCompressor } from "@fluidframework/id-compressor";
5
+ import type { DiscriminatedUnionDispatcher } from "../../../codec/index.js";
6
+ import type { BrandedType } from "../../../util/index.js";
7
+ import type { TreeChunk } from "../chunk.js";
8
+ import { type ChunkDecoder, type StreamCursor } from "./chunkCodecUtilities.js";
9
+ import type { EncodedFieldBatchGeneric, IdentifierOrIndex } from "./formatGeneric.js";
10
+ import type { IdDecodingContext } from "./chunkDecoding.js";
11
11
  /**
12
12
  * General purpose shape based tree decoder which gets its support for specific shapes from the caller.
13
13
  */
@@ -18,11 +18,11 @@ export declare function decode<TEncodedShape extends object, TCache>(decoderLibr
18
18
  export declare class DecoderContext<TEncodedShape = unknown> {
19
19
  readonly identifiers: readonly string[];
20
20
  readonly shapes: readonly TEncodedShape[];
21
- readonly idCompressor: IIdCompressor;
21
+ readonly idDecodingContext: IdDecodingContext;
22
22
  /**
23
23
  * @param identifiers - identifier substitution table (use to replace numeric identifier indexes with the actual identifiers from this table).
24
24
  */
25
- constructor(identifiers: readonly string[], shapes: readonly TEncodedShape[], idCompressor: IIdCompressor);
25
+ constructor(identifiers: readonly string[], shapes: readonly TEncodedShape[], idDecodingContext: IdDecodingContext);
26
26
  identifier<T extends string & BrandedType<string, string>>(encoded: IdentifierOrIndex): T;
27
27
  }
28
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"chunkDecodingGeneric.d.ts","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,YAAY,EAAE,YAAY,EAA0B,MAAM,0BAA0B,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAE9D;;GAEG;AACH,wBAAgB,MAAM,CAAC,aAAa,SAAS,MAAM,EAAE,MAAM,EAC1D,cAAc,EAAE,4BAA4B,CAAC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE,YAAY,CAAC,EAC1F,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,wBAAwB,CAAC,aAAa,CAAC,EAC9C,WAAW,EAAE,YAAY,GACvB,SAAS,EAAE,CAcb;AAED;;GAEG;AACH,qBAAa,cAAc,CAAC,aAAa,GAAG,OAAO;aAKjC,WAAW,EAAE,SAAS,MAAM,EAAE;aAC9B,MAAM,EAAE,SAAS,aAAa,EAAE;aAChC,YAAY,EAAE,aAAa;IAN5C;;OAEG;gBAEc,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,MAAM,EAAE,SAAS,aAAa,EAAE,EAChC,YAAY,EAAE,aAAa;IAGrC,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/D,OAAO,EAAE,iBAAiB,GACxB,CAAC;CAMJ;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,EAClF,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,cAAc,GACnB,CAAC,CAOH"}
1
+ {"version":3,"file":"chunkDecodingGeneric.d.ts","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,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= decode;
26
26
  * Shared data for use in constructing decoders.
27
27
  */
28
28
  class DecoderContext {
29
- identifiers;
30
- shapes;
31
- idCompressor;
32
29
  /**
33
30
  * @param identifiers - identifier substitution table (use to replace numeric identifier indexes with the actual identifiers from this table).
34
31
  */
35
- constructor(identifiers, shapes, idCompressor) {
32
+ constructor(identifiers, shapes, idDecodingContext) {
36
33
  this.identifiers = identifiers;
37
34
  this.shapes = shapes;
38
- this.idCompressor = idCompressor;
35
+ this.idDecodingContext = idDecodingContext;
39
36
  }
40
37
  identifier(encoded) {
41
38
  if (typeof encoded === "string") {
@@ -1 +1 @@
1
- {"version":3,"file":"chunkDecodingGeneric.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAM7D,qEAA8F;AAI9F;;GAEG;AACH,SAAgB,MAAM,CACrB,cAA0F,EAC1F,KAAa,EACb,KAA8C,EAC9C,WAAyB;IAEzB,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IACpF,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,KAAK,MAAM,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QAChC,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;QAC1C,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACpD,IAAA,iBAAM,EACL,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,IAAI,CAAC,MAAM,EACpC,KAAK,CAAC,4CAA4C,CAClD,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACrB,CAAC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAnBD,wBAmBC;AAED;;GAEG;AACH,MAAa,cAAc;IAKT;IACA;IACA;IANjB;;OAEG;IACH,YACiB,WAA8B,EAC9B,MAAgC,EAChC,YAA2B;QAF3B,gBAAW,GAAX,WAAW,CAAmB;QAC9B,WAAM,GAAN,MAAM,CAA0B;QAChC,iBAAY,GAAZ,YAAY,CAAe;IACzC,CAAC;IAEG,UAAU,CAChB,OAA0B;QAE1B,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YACjC,OAAO,OAAY,CAAC;QACrB,CAAC;QACD,OAAO,IAAA,mCAAU,EAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAM,CAAC;IACnD,CAAC;CACD;AAlBD,wCAkBC;AAED;;GAEG;AACH,SAAgB,oBAAoB,CACnC,MAAoB,EACpB,KAAqB;IAErB,MAAM,OAAO,GAAG,IAAA,mCAAU,EAAC,MAAM,CAAC,CAAC;IACnC,IAAA,iBAAM,EACL,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,EAC1D,KAAK,CAAC,sCAAsC,CAC5C,CAAC;IACF,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC;AAVD,oDAUC","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 { DiscriminatedUnionDispatcher } from \"../../../codec/index.js\";\nimport { BrandedType } from \"../../../util/index.js\";\nimport { TreeChunk } from \"../chunk.js\";\n\nimport { ChunkDecoder, StreamCursor, getChecked, readStream } from \"./chunkCodecUtilities.js\";\nimport { EncodedFieldBatchGeneric, IdentifierOrIndex } from \"./formatGeneric.js\";\nimport { IIdCompressor } from \"@fluidframework/id-compressor\";\n\n/**\n * General purpose shape based tree decoder which gets its support for specific shapes from the caller.\n */\nexport function decode<TEncodedShape extends object, TCache>(\n\tdecoderLibrary: DiscriminatedUnionDispatcher<TEncodedShape, [cache: TCache], ChunkDecoder>,\n\tcache: TCache,\n\tbatch: EncodedFieldBatchGeneric<TEncodedShape>,\n\trootDecoder: ChunkDecoder,\n): TreeChunk[] {\n\tconst decoders = batch.shapes.map((shape) => decoderLibrary.dispatch(shape, cache));\n\tconst chunks: TreeChunk[] = [];\n\tfor (const field of batch.data) {\n\t\tconst stream = { data: field, offset: 0 };\n\t\tconst result = rootDecoder.decode(decoders, stream);\n\t\tassert(\n\t\t\tstream.offset === stream.data.length,\n\t\t\t0x73a /* expected decode to consume full stream */,\n\t\t);\n\t\tchunks.push(result);\n\t}\n\n\treturn chunks;\n}\n\n/**\n * Shared data for use in constructing decoders.\n */\nexport class DecoderContext<TEncodedShape = unknown> {\n\t/**\n\t * @param identifiers - identifier substitution table (use to replace numeric identifier indexes with the actual identifiers from this table).\n\t */\n\tpublic constructor(\n\t\tpublic readonly identifiers: readonly string[],\n\t\tpublic readonly shapes: readonly TEncodedShape[],\n\t\tpublic readonly idCompressor: IIdCompressor,\n\t) {}\n\n\tpublic identifier<T extends string & BrandedType<string, string>>(\n\t\tencoded: IdentifierOrIndex,\n\t): T {\n\t\tif (typeof encoded === \"string\") {\n\t\t\treturn encoded as T;\n\t\t}\n\t\treturn getChecked(this.identifiers, encoded) as T;\n\t}\n}\n\n/**\n * Read one identifier from the stream, advancing the stream offset.\n */\nexport function readStreamIdentifier<T extends string & BrandedType<string, string>>(\n\tstream: StreamCursor,\n\tcache: DecoderContext,\n): T {\n\tconst content = readStream(stream);\n\tassert(\n\t\ttypeof content === \"number\" || typeof content === \"string\",\n\t\t0x73b /* content to be a number or string */,\n\t);\n\treturn cache.identifier(content);\n}\n"]}
1
+ {"version":3,"file":"chunkDecodingGeneric.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/chunkDecodingGeneric.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA6D;AAM7D,qEAKkC;AAIlC;;GAEG;AACH,S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MAAM,CAAC,CAAC;IACnC,IAAA,iBAAM,EACL,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,OAAO,KAAK,QAAQ,EAC1D,KAAK,CAAC,sCAAsC,CAC5C,CAAC;IACF,OAAO,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC;AAVD,oDAUC","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 type { DiscriminatedUnionDispatcher } from \"../../../codec/index.js\";\nimport type { BrandedType } from \"../../../util/index.js\";\nimport type { TreeChunk } from \"../chunk.js\";\n\nimport {\n\ttype ChunkDecoder,\n\ttype StreamCursor,\n\tgetChecked,\n\treadStream,\n} from \"./chunkCodecUtilities.js\";\nimport type { EncodedFieldBatchGeneric, IdentifierOrIndex } from \"./formatGeneric.js\";\nimport type { IdDecodingContext } from \"./chunkDecoding.js\";\n\n/**\n * General purpose shape based tree decoder which gets its support for specific shapes from the caller.\n */\nexport function decode<TEncodedShape extends object, TCache>(\n\tdecoderLibrary: DiscriminatedUnionDispatcher<TEncodedShape, [cache: TCache], ChunkDecoder>,\n\tcache: TCache,\n\tbatch: EncodedFieldBatchGeneric<TEncodedShape>,\n\trootDecoder: ChunkDecoder,\n): TreeChunk[] {\n\tconst decoders = batch.shapes.map((shape) => decoderLibrary.dispatch(shape, cache));\n\tconst chunks: TreeChunk[] = [];\n\tfor (const field of batch.data) {\n\t\tconst stream = { data: field, offset: 0 };\n\t\tconst result = rootDecoder.decode(decoders, stream);\n\t\tassert(\n\t\t\tstream.offset === stream.data.length,\n\t\t\t0x73a /* expected decode to consume full stream */,\n\t\t);\n\t\tchunks.push(result);\n\t}\n\n\treturn chunks;\n}\n\n/**\n * Shared data for use in constructing decoders.\n */\nexport class DecoderContext<TEncodedShape = unknown> {\n\t/**\n\t * @param identifiers - identifier substitution table (use to replace numeric identifier indexes with the actual identifiers from this table).\n\t */\n\tpublic constructor(\n\t\tpublic readonly identifiers: readonly string[],\n\t\tpublic readonly shapes: readonly TEncodedShape[],\n\t\tpublic readonly idDecodingContext: IdDecodingContext,\n\t) {}\n\n\tpublic identifier<T extends string & BrandedType<string, string>>(\n\t\tencoded: IdentifierOrIndex,\n\t): T {\n\t\tif (typeof encoded === \"string\") {\n\t\t\treturn encoded as T;\n\t\t}\n\t\treturn getChecked(this.identifiers, encoded) as T;\n\t}\n}\n\n/**\n * Read one identifier from the stream, advancing the stream offset.\n */\nexport function readStreamIdentifier<T extends string & BrandedType<string, string>>(\n\tstream: StreamCursor,\n\tcache: DecoderContext,\n): T {\n\tconst content = readStream(stream);\n\tassert(\n\t\ttypeof content === \"number\" || typeof content === \"string\",\n\t\t0x73b /* content to be a number or string */,\n\t);\n\treturn cache.identifier(content);\n}\n"]}
@@ -2,9 +2,9 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { FluidSerializableReadOnly } from "../../valueUtilities.js";
6
- import { Counter, CounterFilter, DeduplicationTable } from "./chunkCodecUtilities.js";
7
- import { EncodedFieldBatchGeneric } from "./formatGeneric.js";
5
+ import type { FluidSerializableReadOnly } from "../../valueUtilities.js";
6
+ import { Counter, type CounterFilter, type DeduplicationTable } from "./chunkCodecUtilities.js";
7
+ import type { EncodedFieldBatchGeneric } from "./formatGeneric.js";
8
8
  /**
9
9
  * An identifier which can be compressed using {@link Counter}.
10
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"chunkEncodingGeneric.d.ts","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EACN,OAAO,EACP,aAAa,EACb,kBAAkB,EAElB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAE9D;;;;;;;;GAQG;AACH,qBAAa,eAAe;aACQ,UAAU,EAAE,MAAM;gBAAlB,UAAU,EAAE,MAAM;CACrD;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,aAAa,IAAI,CACvC,yBAAyB,GACzB,KAAK,CAAC,aAAa,CAAC,GACpB,eAAe,GACf,YAAY,CAAC,aAAa,CAAC,CAC7B,EAAE,CAAC;AAEJ;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,EACvD,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,CAAC,aAAa,CAAC,EAAE,EACrC,gBAAgB,GAAE,aAAa,CAAC,MAAM,CAAwB,GAC5D,wBAAwB,CAAC,aAAa,CAAC,CAwEzC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,8BAAsB,KAAK,CAAC,aAAa;IACxC;;;;;;;;;OASG;aACa,KAAK,CACpB,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,IAAI,GAC3C,IAAI;IAEP;;;;;;;OAOG;aACa,WAAW,CAC1B,WAAW,EAAE,kBAAkB,CAAC,MAAM,CAAC,EACvC,MAAM,EAAE,kBAAkB,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,GAC9C,aAAa;CAChB"}
1
+ {"version":3,"file":"chunkEncodingGeneric.d.ts","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEzE,OAAO,EACN,OAAO,EACP,KAAK,aAAa,EAClB,KAAK,kBAAkB,EAEvB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnE;;;;;;;;GAQG;AACH,qBAAa,eAAe;aACQ,UAAU,EAAE,MAAM;gBAAlB,UAAU,EAAE,MAAM;CACrD;AAED;;;;;GAKG;AACH,MAAM,MAAM,YAAY,CAAC,aAAa,IAAI,CACvC,yBAAyB,GACzB,KAAK,CAAC,aAAa,CAAC,GACpB,eAAe,GACf,YAAY,CAAC,aAAa,CAAC,CAC7B,EAAE,CAAC;AAEJ;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,aAAa,EACvD,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,YAAY,CAAC,aAAa,CAAC,EAAE,EACrC,gBAAgB,GAAE,aAAa,CAAC,MAAM,CAAwB,GAC5D,wBAAwB,CAAC,aAAa,CAAC,CAwEzC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,8BAAsB,KAAK,CAAC,aAAa;IACxC;;;;;;;;;OASG;aACa,KAAK,CACpB,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,EAC5B,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,KAAK,IAAI,GAC3C,IAAI;IAEP;;;;;;;OAOG;aACa,WAAW,CAC1B,WAAW,EAAE,kBAAkB,CAAC,MAAM,CAAC,EACvC,MAAM,EAAE,kBAAkB,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,GAC9C,aAAa;CAChB"}
@@ -17,7 +17,6 @@ const chunkCodecUtilities_js_1 = require("./chunkCodecUtilities.js");
17
17
  * Using a class and checking its prototype works for this, and is why IdentifierToken is a class.
18
18
  */
19
19
  class IdentifierToken {
20
- identifier;
21
20
  constructor(identifier) {
22
21
  this.identifier = identifier;
23
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chunkEncodingGeneric.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,qDAA8C;AAG9C,qEAKkC;AAGlC;;;;;;;;GAQG;AACH,MAAa,e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3D,KAAK,CAAC,WAAW,CAAC,eAAe,EAAE,UAAU,CAAC,CAC9C,CAAC;IAEF,OAAO;QACN,OAAO;QACP,wDAAwD;QACxD,WAAW,EAAE,eAAe,CAAC,YAAwB;QACrD,MAAM,EAAE,aAAa;QACrB,IAAI,EAAE,MAAuB;KAC7B,CAAC;AACH,CAAC;AA5ED,gEA4EC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAsB,KAAK;CA4B1B;AA5BD,sBA4BC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { TreeValue } from \"../../../core/index.js\";\nimport { fail } from \"../../../util/index.js\";\nimport { FluidSerializableReadOnly } from \"../../valueUtilities.js\";\n\nimport {\n\tCounter,\n\tCounterFilter,\n\tDeduplicationTable,\n\tjsonMinimizingFilter,\n} from \"./chunkCodecUtilities.js\";\nimport { EncodedFieldBatchGeneric } from \"./formatGeneric.js\";\n\n/**\n * An identifier which can be compressed using {@link Counter}.\n *\n * @remarks\n * Compression of Identifiers is done after the output is otherwise generated to enable counting all the usages.\n * To avoid having to decode the decode the data array to determine which data is an identifier and which is some other string,\n * some recognizable representation is required.\n * Using a class and checking its prototype works for this, and is why IdentifierToken is a class.\n */\nexport class IdentifierToken {\n\tpublic constructor(public readonly identifier: string) {}\n}\n\n/**\n * Format for data emitted during encoding, before dictionary compression of identifiers.\n *\n * @remarks\n * These buffers are mutated after construction if they contain identifiers or shapes.\n */\nexport type BufferFormat<TEncodedShape> = (\n\t| FluidSerializableReadOnly\n\t| Shape<TEncodedShape>\n\t| IdentifierToken\n\t| BufferFormat<TEncodedShape>\n)[];\n\n/**\n * Replace shapes and identifiers in buffer and any nested arrays.\n *\n * This looks inside nested arrays (including transitively) but not inside objects.\n *\n * Note that this modifies `buffer` to avoid having to copy it.\n */\nexport function handleShapesAndIdentifiers<TEncodedShape>(\n\tversion: number,\n\tbuffer: BufferFormat<TEncodedShape>[],\n\tidentifierFilter: CounterFilter<string> = jsonMinimizingFilter,\n): EncodedFieldBatchGeneric<TEncodedShape> {\n\tconst identifiers = new Counter<string>();\n\tconst shapes = new Counter<Shape<TEncodedShape>>();\n\t// Shapes can reference other shapes (and identifiers), so we need to traverse the shape graph.\n\t// These collections enable that.\n\tconst shapesSeen = new Set<Shape<TEncodedShape>>();\n\tconst shapeToCount: Shape<TEncodedShape>[] = [];\n\tconst shapeDiscovered = (shape: Shape<TEncodedShape>): void => {\n\t\tshapes.add(shape);\n\t\tif (!shapesSeen.has(shape)) {\n\t\t\tshapesSeen.add(shape);\n\t\t\tshapeToCount.push(shape);\n\t\t}\n\t};\n\n\tconst arrays: BufferFormat<TEncodedShape>[] = [buffer];\n\tfor (const array of arrays) {\n\t\tfor (const item of array) {\n\t\t\tif (item instanceof IdentifierToken) {\n\t\t\t\tidentifiers.add(item.identifier);\n\t\t\t} else if (item instanceof Shape) {\n\t\t\t\tshapeDiscovered(item);\n\t\t\t} else if (Array.isArray(item)) {\n\t\t\t\t// In JS it is legal to push items to an array which is being iterated,\n\t\t\t\t// and they will be visited in order.\n\t\t\t\tarrays.push(item);\n\t\t\t} else if (\n\t\t\t\titem !== null &&\n\t\t\t\ttypeof item === \"object\" &&\n\t\t\t\t(item as Record<string, unknown>).shape instanceof Shape\n\t\t\t) {\n\t\t\t\t// because \"serializable\" is allowed in buffer and it has type `any`, its very easy to mess up including of shapes in the buffer.\n\t\t\t\t// This catches the easiest way to get it wrong.\n\t\t\t\tfail(\"encoder interface instead of shape written to stream\");\n\t\t\t}\n\t\t}\n\t}\n\n\t// Traverse shape graph, discovering and counting all shape to shape and shape to identifier references.\n\t{\n\t\tlet item: Shape<TEncodedShape> | undefined;\n\t\twhile ((item = shapeToCount.pop()) !== undefined) {\n\t\t\titem.count(identifiers, shapeDiscovered);\n\t\t}\n\t}\n\n\t// Determine substitutions for identifiers and shapes:\n\tconst identifierTable = identifiers.buildTable(identifierFilter);\n\tconst shapeTable = shapes.buildTable();\n\n\tfor (const array of arrays) {\n\t\tfor (let index = 0; index < array.length; index++) {\n\t\t\tconst item = array[index];\n\t\t\tif (item instanceof IdentifierToken) {\n\t\t\t\tarray[index] = identifierTable.valueToIndex.get(item.identifier) ?? item.identifier;\n\t\t\t} else if (item instanceof Shape) {\n\t\t\t\tarray[index] = shapeTable.valueToIndex.get(item) ?? fail(\"missing shape\");\n\t\t\t}\n\t\t}\n\t}\n\n\tconst encodedShapes = shapeTable.indexToValue.map((shape) =>\n\t\tshape.encodeShape(identifierTable, shapeTable),\n\t);\n\n\treturn {\n\t\tversion,\n\t\t// TODO: fix readonly typing issues to remove this cast.\n\t\tidentifiers: identifierTable.indexToValue as string[],\n\t\tshapes: encodedShapes,\n\t\tdata: buffer as TreeValue[][],\n\t};\n}\n\n/**\n * A tree shape.\n * This similar to a schema for a tree, though it may be more or less specific than the actual schema system used.\n * Can be encoded into a `TEncodedShape`: when doing so encodes references to shapes (if needed) using {@link Counter}:\n * this can include recursive references (direct or indirect).\n *\n * @remarks\n * Deduplication of shapes is done after the output is otherwise generated (including identifier dictionary encoding).\n * To avoid having to decode the data array to determine which data is a shape and which is some other object,\n * some recognizable representation is required.\n * Using a class and checking its prototype works for this, and is why Shape is a class.\n *\n * Note that deduplication compares shapes by object identity not by content, so encoders must ensure shapes are not duplicated to achieve efficient encoding.\n * Comparison by content would be difficult due to shape containing references to other shapes.\n *\n * @privateRemarks\n * Unlike with identifiers, conversion from the initial form (this class / IdentifierToken) is done by the `encodeShape` method, not by general purpose logic in `handleShapesAndIdentifiers`.\n * For `handleShapesAndIdentifiers` to do the conversion without help from `encodeShape`,\n * instances of this Shape class would have to either be or output an object that is identical to the `TEncodedShape` format except with all shape references as object references instead of indexes.\n * Those objects would have to be deeply traversed looking for shape objects to replace with reference indexes.\n * This is possible, but making it type safe would involve generating derived types from the `TEncodedShape` deeply replacing any shape references, as well as requiring deep traversal of all objects in the encoded output.\n * Such an approach seemed less maintainable and readable than the design taken here which avoids the need for those derived types.\n */\nexport abstract class Shape<TEncodedShape> {\n\t/**\n\t * Count this shape's contents.\n\t *\n\t * Used to discover referenced shapes (to ensure they are included in the `shapes` passed to `encodeShape`),\n\t * as well as count usages of shapes and identifiers for more efficient dictionary encoding. See {@link Counter}.\n\t *\n\t * @param shapes - must be invoked with each directly referenced shape (which must provided to `encodeShape`).\n\t * Can be invoked multiple times if a shape is referenced more than once for more efficient dictionary encoding.\n\t * Should not be invoked with `this` unless this shape references itself.\n\t */\n\tpublic abstract count(\n\t\tidentifiers: Counter<string>,\n\t\tshapes: (shape: Shape<TEncodedShape>) => void,\n\t): void;\n\n\t/**\n\t * Produce the final encoded format for this shape.\n\t *\n\t * @param identifiers - a subset of identifiers used in this tree, and their corresponding indexes to use for the dictionary encoding.\n\t * Can be used to encode identifiers referenced by this shape.\n\t * @param shapes - includes a superset of shapes reported by count.\n\t * Used to encode references to shapes as numbers.\n\t */\n\tpublic abstract encodeShape(\n\t\tidentifiers: DeduplicationTable<string>,\n\t\tshapes: DeduplicationTable<Shape<TEncodedShape>>,\n\t): TEncodedShape;\n}\n"]}
1
+ {"version":3,"file":"chunkEncodingGeneric.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/chunkEncodingGeneric.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,qDAA8C;AAG9C,qEAKkC;AAGlC;;;;;;;;GAQG;AACH,MAAa,eAAe;IAC3B,YAAmC,UAAkB;QAAlB,eAAU,GAAV,UAAU,CAAQ;IAAG,CAAC;CACzD;AAFD,0CAEC;AAeD;;;;;;GAMG;AACH,SAAgB,0BAA0B,CACzC,OAAe,EACf,MAAqC,EACrC,mBAA0C,6CAAoB;IAE9D,MAAM,WAAW,GAAG,IAAI,gCAAO,EAAU,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,gCAAO,EAAwB,CAAC;IACnD,+FAA+F;IAC/F,iCAAiC;IACjC,MAAM,UAAU,GAAG,IAAI,GAAG,EAAwB,CAAC;IACnD,MAAM,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n */\n\nimport type { TreeValue } from \"../../../core/index.js\";\nimport { fail } from \"../../../util/index.js\";\nimport type { FluidSerializableReadOnly } from \"../../valueUtilities.js\";\n\nimport {\n\tCounter,\n\ttype CounterFilter,\n\ttype DeduplicationTable,\n\tjsonMinimizingFilter,\n} from \"./chunkCodecUtilities.js\";\nimport type { EncodedFieldBatchGeneric } from \"./formatGeneric.js\";\n\n/**\n * An identifier which can be compressed using {@link Counter}.\n *\n * @remarks\n * Compression of Identifiers is done after the output is otherwise generated to enable counting all the usages.\n * To avoid having to decode the decode the data array to determine which data is an identifier and which is some other string,\n * some recognizable representation is required.\n * Using a class and checking its prototype works for this, and is why IdentifierToken is a class.\n */\nexport class IdentifierToken {\n\tpublic constructor(public readonly identifier: string) {}\n}\n\n/**\n * Format for data emitted during encoding, before dictionary compression of identifiers.\n *\n * @remarks\n * These buffers are mutated after construction if they contain identifiers or shapes.\n */\nexport type BufferFormat<TEncodedShape> = (\n\t| FluidSerializableReadOnly\n\t| Shape<TEncodedShape>\n\t| IdentifierToken\n\t| BufferFormat<TEncodedShape>\n)[];\n\n/**\n * Replace shapes and identifiers in buffer and any nested arrays.\n *\n * This looks inside nested arrays (including transitively) but not inside objects.\n *\n * Note that this modifies `buffer` to avoid having to copy it.\n */\nexport function handleShapesAndIdentifiers<TEncodedShape>(\n\tversion: number,\n\tbuffer: BufferFormat<TEncodedShape>[],\n\tidentifierFilter: CounterFilter<string> = jsonMinimizingFilter,\n): EncodedFieldBatchGeneric<TEncodedShape> {\n\tconst identifiers = new Counter<string>();\n\tconst shapes = new Counter<Shape<TEncodedShape>>();\n\t// Shapes can reference other shapes (and identifiers), so we need to traverse the shape graph.\n\t// These collections enable that.\n\tconst shapesSeen = new Set<Shape<TEncodedShape>>();\n\tconst shapeToCount: Shape<TEncodedShape>[] = [];\n\tconst shapeDiscovered = (shape: Shape<TEncodedShape>): void => {\n\t\tshapes.add(shape);\n\t\tif (!shapesSeen.has(shape)) {\n\t\t\tshapesSeen.add(shape);\n\t\t\tshapeToCount.push(shape);\n\t\t}\n\t};\n\n\tconst arrays: BufferFormat<TEncodedShape>[] = [buffer];\n\tfor (const array of arrays) {\n\t\tfor (const item of array) {\n\t\t\tif (item instanceof IdentifierToken) {\n\t\t\t\tidentifiers.add(item.identifier);\n\t\t\t} else if (item instanceof Shape) {\n\t\t\t\tshapeDiscovered(item);\n\t\t\t} else if (Array.isArray(item)) {\n\t\t\t\t// In JS it is legal to push items to an array which is being iterated,\n\t\t\t\t// and they will be visited in order.\n\t\t\t\tarrays.push(item);\n\t\t\t} else if (\n\t\t\t\titem !== null &&\n\t\t\t\ttypeof item === \"object\" &&\n\t\t\t\t(item as Record<string, unknown>).shape instanceof Shape\n\t\t\t) {\n\t\t\t\t// because \"serializable\" is allowed in buffer and it has type `any`, its very easy to mess up including of shapes in the buffer.\n\t\t\t\t// This catches the easiest way to get it wrong.\n\t\t\t\tfail(\"encoder interface instead of shape written to stream\");\n\t\t\t}\n\t\t}\n\t}\n\n\t// Traverse shape graph, discovering and counting all shape to shape and shape to identifier references.\n\t{\n\t\tlet item: Shape<TEncodedShape> | undefined;\n\t\twhile ((item = shapeToCount.pop()) !== undefined) {\n\t\t\titem.count(identifiers, shapeDiscovered);\n\t\t}\n\t}\n\n\t// Determine substitutions for identifiers and shapes:\n\tconst identifierTable = identifiers.buildTable(identifierFilter);\n\tconst shapeTable = shapes.buildTable();\n\n\tfor (const array of arrays) {\n\t\tfor (let index = 0; index < array.length; index++) {\n\t\t\tconst item = array[index];\n\t\t\tif (item instanceof IdentifierToken) {\n\t\t\t\tarray[index] = identifierTable.valueToIndex.get(item.identifier) ?? item.identifier;\n\t\t\t} else if (item instanceof Shape) {\n\t\t\t\tarray[index] = shapeTable.valueToIndex.get(item) ?? fail(\"missing shape\");\n\t\t\t}\n\t\t}\n\t}\n\n\tconst encodedShapes = shapeTable.indexToValue.map((shape) =>\n\t\tshape.encodeShape(identifierTable, shapeTable),\n\t);\n\n\treturn {\n\t\tversion,\n\t\t// TODO: fix readonly typing issues to remove this cast.\n\t\tidentifiers: identifierTable.indexToValue as string[],\n\t\tshapes: encodedShapes,\n\t\tdata: buffer as TreeValue[][],\n\t};\n}\n\n/**\n * A tree shape.\n * This similar to a schema for a tree, though it may be more or less specific than the actual schema system used.\n * Can be encoded into a `TEncodedShape`: when doing so encodes references to shapes (if needed) using {@link Counter}:\n * this can include recursive references (direct or indirect).\n *\n * @remarks\n * Deduplication of shapes is done after the output is otherwise generated (including identifier dictionary encoding).\n * To avoid having to decode the data array to determine which data is a shape and which is some other object,\n * some recognizable representation is required.\n * Using a class and checking its prototype works for this, and is why Shape is a class.\n *\n * Note that deduplication compares shapes by object identity not by content, so encoders must ensure shapes are not duplicated to achieve efficient encoding.\n * Comparison by content would be difficult due to shape containing references to other shapes.\n *\n * @privateRemarks\n * Unlike with identifiers, conversion from the initial form (this class / IdentifierToken) is done by the `encodeShape` method, not by general purpose logic in `handleShapesAndIdentifiers`.\n * For `handleShapesAndIdentifiers` to do the conversion without help from `encodeShape`,\n * instances of this Shape class would have to either be or output an object that is identical to the `TEncodedShape` format except with all shape references as object references instead of indexes.\n * Those objects would have to be deeply traversed looking for shape objects to replace with reference indexes.\n * This is possible, but making it type safe would involve generating derived types from the `TEncodedShape` deeply replacing any shape references, as well as requiring deep traversal of all objects in the encoded output.\n * Such an approach seemed less maintainable and readable than the design taken here which avoids the need for those derived types.\n */\nexport abstract class Shape<TEncodedShape> {\n\t/**\n\t * Count this shape's contents.\n\t *\n\t * Used to discover referenced shapes (to ensure they are included in the `shapes` passed to `encodeShape`),\n\t * as well as count usages of shapes and identifiers for more efficient dictionary encoding. See {@link Counter}.\n\t *\n\t * @param shapes - must be invoked with each directly referenced shape (which must provided to `encodeShape`).\n\t * Can be invoked multiple times if a shape is referenced more than once for more efficient dictionary encoding.\n\t * Should not be invoked with `this` unless this shape references itself.\n\t */\n\tpublic abstract count(\n\t\tidentifiers: Counter<string>,\n\t\tshapes: (shape: Shape<TEncodedShape>) => void,\n\t): void;\n\n\t/**\n\t * Produce the final encoded format for this shape.\n\t *\n\t * @param identifiers - a subset of identifiers used in this tree, and their corresponding indexes to use for the dictionary encoding.\n\t * Can be used to encode identifiers referenced by this shape.\n\t * @param shapes - includes a superset of shapes reported by count.\n\t * Used to encode references to shapes as numbers.\n\t */\n\tpublic abstract encodeShape(\n\t\tidentifiers: DeduplicationTable<string>,\n\t\tshapes: DeduplicationTable<Shape<TEncodedShape>>,\n\t): TEncodedShape;\n}\n"]}
@@ -2,16 +2,17 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { ICodecOptions, IJsonCodec } from "../../../codec/index.js";
6
- import { SchemaAndPolicy } from "../../../core/index.js";
7
- import { JsonCompatibleReadOnly } from "../../../util/index.js";
5
+ import { type ICodecOptions, type IJsonCodec } from "../../../codec/index.js";
6
+ import { type SchemaAndPolicy } from "../../../core/index.js";
7
+ import type { JsonCompatibleReadOnly } from "../../../util/index.js";
8
8
  import { TreeCompressionStrategy } from "../../treeCompressionUtils.js";
9
- import { FieldBatch } from "./fieldBatch.js";
9
+ import type { FieldBatch } from "./fieldBatch.js";
10
10
  import { EncodedFieldBatch } from "./format.js";
11
- import { IIdCompressor } from "@fluidframework/id-compressor";
11
+ import type { IIdCompressor, SessionId } from "@fluidframework/id-compressor";
12
12
  export interface FieldBatchEncodingContext {
13
13
  readonly encodeType: TreeCompressionStrategy;
14
14
  readonly idCompressor: IIdCompressor;
15
+ readonly originatorId: SessionId;
15
16
  readonly schema?: SchemaAndPolicy;
16
17
  }
17
18
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"codecs.d.ts","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/codecs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,aAAa,EAAE,UAAU,EAA+B,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAsB,eAAe,EAAE,MAAM,wBAAwB,CA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EAAE,uBAAuB,CAAC;IAC7C,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IACrC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE,eAAe,CAAC;CAClC;AACD;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CACvC,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,yBAAyB,CACzB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,GAAG,eAAe,CAkDjG"}
@@ -46,7 +46,10 @@ function makeFieldBatchCodec(options, writeVersion) {
46
46
  },
47
47
  decode: (data, context) => {
48
48
  // TODO: consider checking data is in schema.
49
- return (0, chunkDecoding_js_1.decode)(data, context.idCompressor).map((chunk) => chunk.cursor());
49
+ return (0, chunkDecoding_js_1.decode)(data, {
50
+ idCompressor: context.idCompressor,
51
+ originatorId: context.originatorId,
52
+ }).map((chunk) => chunk.cursor());
50
53
  },
51
54
  });
52
55
  }
@@ -1 +1 @@
1
- {"version":3,"file":"codecs.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/codecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA8E;AAE9E,sDAAiG;AAGjG,2EAAwE;AAExE,yDAA4C;AAE5C,2CAA+D;AAC/D,qEAAkE;AAClE,mEAA6D;AAmB7D,SAAgB,mBAAmB,CAAC,OAAsB,EAAE,YAAoB;IAC/E,6GAA6G;IAC7G,8GAA8G;IAC9G,iHAAiH;IACjH,+BAA+B;IAC/B,IAAA,iBAAM,EAAC,yBAAa,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAEhG,OAAO,IAAA,sCAA2B,EAAC,OAAO,EAAE,yBAAa,EAAE,6BAAiB,EAAE;QAC7E,MAAM,EAAE,CAAC,IAAgB,EAAE,OAAkC,EAAqB,EAAE;YACnF,KAAK,MAAM,MAAM,IAAI,IAAI,EAAE,CAAC;gBAC3B,IAAA,iBAAM,EACL,MAAM,CAAC,IAAI,sCAA8B,EACzC,KAAK,CAAC,uCAAuC,CAC7C,CAAC;YACH,CAAC;YACD,IAAI,OAA0B,CAAC;YAC/B,QAAQ,OAAO,CAAC,UAAU,EAAE,CAAC;gBAC5B,KAAK,iDAAuB,CAAC,YAAY;oBACxC,OAAO,GAAG,IAAA,0CAAkB,EAAC,IAAI,CAAC,CAAC;oBACnC,MAAM;gBACP,KAAK,iDAAuB,CAAC,UAAU;oBACtC,kDAAkD;oBAClD,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;wBAClC,OAAO,GAAG,IAAA,+CAAsB,EAC/B,OAAO,CAAC,MAAM,CAAC,MAAM,EACrB,OAAO,CAAC,MAAM,CAAC,MAAM,EACrB,IAAI,EACJ,OAAO,CAAC,YAAY,CACpB,CAAC;oBACH,CAAC;yBAAM,CAAC;wBACP,mFAAmF;wBACnF,OAAO,GAAG,IAAA,0CAAkB,EAAC,IAAI,CAAC,CAAC;oBACpC,CAAC;oBAED,MAAM;gBACP;oBACC,IAAA,0BAAe,EAAC,OAAO,CAAC,UAAU,CAAC,CAAC;YACtC,CAAC;YAED,oDAAoD;YACpD,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,MAAM,EAAE,CAAC,IAAuB,EAAE,OAAkC,EAAc,EAAE;YACnF,6CAA6C;YAC7C,OAAO,IAAA,yBAAM,EAAC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;QAC1E,CAAC;KACD,CAAC,CAAC;AACJ,CAAC;AA/CD,kDA+CC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport { ICodecOptions, IJsonCodec, makeVersionedValidatedCodec } from \"../../../codec/index.js\";\nimport { CursorLocationType, SchemaAndPolicy } from \"../../../core/index.js\";\nimport { JsonCompatibleReadOnly } from \"../../../util/index.js\";\nimport { TreeCompressionStrategy } from \"../../treeCompressionUtils.js\";\n\nimport { decode } from \"./chunkDecoding.js\";\nimport { FieldBatch } from \"./fieldBatch.js\";\nimport { EncodedFieldBatch, validVersions } from \"./format.js\";\nimport { schemaCompressedEncode } from \"./schemaBasedEncoding.js\";\nimport { uncompressedEncode } from \"./uncompressedEncode.js\";\nimport { IIdCompressor } from \"@fluidframework/id-compressor\";\n\nexport interface FieldBatchEncodingContext {\n\treadonly encodeType: TreeCompressionStrategy;\n\treadonly idCompressor: IIdCompressor;\n\treadonly schema?: SchemaAndPolicy;\n}\n/**\n * @remarks\n * Fields in this batch currently don't have field schema for the root, which limits optimizations.\n */\nexport type FieldBatchCodec = IJsonCodec<\n\tFieldBatch,\n\tEncodedFieldBatch,\n\tJsonCompatibleReadOnly,\n\tFieldBatchEncodingContext\n>;\n\nexport function makeFieldBatchCodec(options: ICodecOptions, writeVersion: number): FieldBatchCodec {\n\t// Note: it's important that the decode function is schema-agnostic for this strategy/layering to work, since\n\t// the schema that an op was encoded in doesn't necessarily match the current schema for the document (e.g. if\n\t// decode is being run on a client that just submitted a schema change, but the op is from another client who has\n\t// yet to receive that change).\n\tassert(validVersions.has(writeVersion), 0x935 /* Invalid write version for FieldBatch codec */);\n\n\treturn makeVersionedValidatedCodec(options, validVersions, EncodedFieldBatch, {\n\t\tencode: (data: FieldBatch, context: FieldBatchEncodingContext): EncodedFieldBatch => {\n\t\t\tfor (const cursor of data) {\n\t\t\t\tassert(\n\t\t\t\t\tcursor.mode === CursorLocationType.Fields,\n\t\t\t\t\t0x8a3 /* FieldBatch expects fields cursors */,\n\t\t\t\t);\n\t\t\t}\n\t\t\tlet encoded: EncodedFieldBatch;\n\t\t\tswitch (context.encodeType) {\n\t\t\t\tcase TreeCompressionStrategy.Uncompressed:\n\t\t\t\t\tencoded = uncompressedEncode(data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase TreeCompressionStrategy.Compressed:\n\t\t\t\t\t// eslint-disable-next-line unicorn/prefer-ternary\n\t\t\t\t\tif (context.schema !== undefined) {\n\t\t\t\t\t\tencoded = schemaCompressedEncode(\n\t\t\t\t\t\t\tcontext.schema.schema,\n\t\t\t\t\t\t\tcontext.schema.policy,\n\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\tcontext.idCompressor,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// TODO: consider enabling a somewhat compressed but not schema accelerated encode.\n\t\t\t\t\t\tencoded = uncompressedEncode(data);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tunreachableCase(context.encodeType);\n\t\t\t}\n\n\t\t\t// TODO: consider checking input data was in schema.\n\t\t\treturn encoded;\n\t\t},\n\t\tdecode: (data: EncodedFieldBatch, context: FieldBatchEncodingContext): FieldBatch => {\n\t\t\t// TODO: consider checking data is in schema.\n\t\t\treturn decode(data, context.idCompressor).map((chunk) => chunk.cursor());\n\t\t},\n\t});\n}\n"]}
1
+ {"version":3,"file":"codecs.js","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/codecs.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,kEAA8E;AAE9E,sDAIiC;AAGjC,2EAAwE;AAExE,yDAA4C;AAE5C,2CAA+D;AAC/D,qEAAkE;AAClE,mEAA6D;AAoB7D,SAAgB,mBAAmB,CAAC,OAAsB,EAAE,YAAoB;IAC/E,6GAA6G;IAC7G,8GAA8G;IAC9G,iHAAiH;IACjH,+BAA+B;IAC/B,IAAA,iBAAM,EAAC,yBAAa,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC,gDAAgD,CAAC,CAAC;IAEhG,OAAO,IAAA,sCAA2B,EAAC,OAAO,EAAE,yB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,CAAC;AAlDD,kDAkDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, unreachableCase } from \"@fluidframework/core-utils/internal\";\n\nimport {\n\ttype ICodecOptions,\n\ttype IJsonCodec,\n\tmakeVersionedValidatedCodec,\n} from \"../../../codec/index.js\";\nimport { CursorLocationType, type SchemaAndPolicy } from \"../../../core/index.js\";\nimport type { JsonCompatibleReadOnly } from \"../../../util/index.js\";\nimport { TreeCompressionStrategy } from \"../../treeCompressionUtils.js\";\n\nimport { decode } from \"./chunkDecoding.js\";\nimport type { FieldBatch } from \"./fieldBatch.js\";\nimport { EncodedFieldBatch, validVersions } from \"./format.js\";\nimport { schemaCompressedEncode } from \"./schemaBasedEncoding.js\";\nimport { uncompressedEncode } from \"./uncompressedEncode.js\";\nimport type { IIdCompressor, SessionId } from \"@fluidframework/id-compressor\";\n\nexport interface FieldBatchEncodingContext {\n\treadonly encodeType: TreeCompressionStrategy;\n\treadonly idCompressor: IIdCompressor;\n\treadonly originatorId: SessionId;\n\treadonly schema?: SchemaAndPolicy;\n}\n/**\n * @remarks\n * Fields in this batch currently don't have field schema for the root, which limits optimizations.\n */\nexport type FieldBatchCodec = IJsonCodec<\n\tFieldBatch,\n\tEncodedFieldBatch,\n\tJsonCompatibleReadOnly,\n\tFieldBatchEncodingContext\n>;\n\nexport function makeFieldBatchCodec(options: ICodecOptions, writeVersion: number): FieldBatchCodec {\n\t// Note: it's important that the decode function is schema-agnostic for this strategy/layering to work, since\n\t// the schema that an op was encoded in doesn't necessarily match the current schema for the document (e.g. if\n\t// decode is being run on a client that just submitted a schema change, but the op is from another client who has\n\t// yet to receive that change).\n\tassert(validVersions.has(writeVersion), 0x935 /* Invalid write version for FieldBatch codec */);\n\n\treturn makeVersionedValidatedCodec(options, validVersions, EncodedFieldBatch, {\n\t\tencode: (data: FieldBatch, context: FieldBatchEncodingContext): EncodedFieldBatch => {\n\t\t\tfor (const cursor of data) {\n\t\t\t\tassert(\n\t\t\t\t\tcursor.mode === CursorLocationType.Fields,\n\t\t\t\t\t0x8a3 /* FieldBatch expects fields cursors */,\n\t\t\t\t);\n\t\t\t}\n\t\t\tlet encoded: EncodedFieldBatch;\n\t\t\tswitch (context.encodeType) {\n\t\t\t\tcase TreeCompressionStrategy.Uncompressed:\n\t\t\t\t\tencoded = uncompressedEncode(data);\n\t\t\t\t\tbreak;\n\t\t\t\tcase TreeCompressionStrategy.Compressed:\n\t\t\t\t\t// eslint-disable-next-line unicorn/prefer-ternary\n\t\t\t\t\tif (context.schema !== undefined) {\n\t\t\t\t\t\tencoded = schemaCompressedEncode(\n\t\t\t\t\t\t\tcontext.schema.schema,\n\t\t\t\t\t\t\tcontext.schema.policy,\n\t\t\t\t\t\t\tdata,\n\t\t\t\t\t\t\tcontext.idCompressor,\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// TODO: consider enabling a somewhat compressed but not schema accelerated encode.\n\t\t\t\t\t\tencoded = uncompressedEncode(data);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tunreachableCase(context.encodeType);\n\t\t\t}\n\n\t\t\t// TODO: consider checking input data was in schema.\n\t\t\treturn encoded;\n\t\t},\n\t\tdecode: (data: EncodedFieldBatch, context: FieldBatchEncodingContext): FieldBatch => {\n\t\t\t// TODO: consider checking data is in schema.\n\t\t\treturn decode(data, {\n\t\t\t\tidCompressor: context.idCompressor,\n\t\t\t\toriginatorId: context.originatorId,\n\t\t\t}).map((chunk) => chunk.cursor());\n\t\t},\n\t});\n}\n"]}
@@ -2,13 +2,13 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { FieldKey, FieldKindIdentifier, ITreeCursorSynchronous, TreeFieldStoredSchema, TreeNodeSchemaIdentifier, Value } from "../../../core/index.js";
6
- import { type FlexFieldKind } from "../../modular-schema/index.js";
7
- import { Counter, DeduplicationTable } from "./chunkCodecUtilities.js";
8
- import { BufferFormat as BufferFormatGeneric, Shape as ShapeGeneric } from "./chunkEncodingGeneric.js";
9
- import { FieldBatch } from "./fieldBatch.js";
10
- import { EncodedChunkShape, EncodedFieldBatch, EncodedValueShape } from "./format.js";
11
- import { IIdCompressor } from "@fluidframework/id-compressor";
5
+ import { type FieldKey, type FieldKindIdentifier, type ITreeCursorSynchronous, type TreeFieldStoredSchema, type TreeNodeSchemaIdentifier, type Value } from "../../../core/index.js";
6
+ import type { FlexFieldKind } from "../../modular-schema/index.js";
7
+ import type { Counter, DeduplicationTable } from "./chunkCodecUtilities.js";
8
+ import { type BufferFormat as BufferFormatGeneric, Shape as ShapeGeneric } from "./chunkEncodingGeneric.js";
9
+ import type { FieldBatch } from "./fieldBatch.js";
10
+ import { type EncodedChunkShape, type EncodedFieldBatch, type EncodedValueShape } from "./format.js";
11
+ import type { IIdCompressor } from "@fluidframework/id-compressor";
12
12
  /**
13
13
  * Encode data from `FieldBatch` in into an `EncodedChunk`.
14
14
  *
@@ -1 +1 @@
1
- {"version":3,"file":"compressedEncode.d.ts","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/compressedEncode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAEN,QAAQ,EACR,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,KAAK,EAEL,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,EACN,YAAY,IAAI,mBAAmB,EACnC,KAAK,IAAI,YAAY,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAEN,iBAAiB,EACjB,iBAAiB,EAEjB,iB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AAC,YAAY,CAAiD;gBAE5D,WAAW,EAAE,eAAe,EAC5B,YAAY,EAAE,gBAAgB,EAC/B,WAAW,EAAE,WAAW,CAAC,mBAAmB,EAAE,aAAa,CAAC,EAC5D,YAAY,EAAE,aAAa;IAGrC,aAAa,CAAC,UAAU,EAAE,wBAAwB,GAAG,WAAW;IAMhE,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,gBAAgB;IAIjD,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY;CAGjE;AAED,MAAM,WAAW,UAAU;IAC1B,aAAa,CAAC,UAAU,EAAE,wBAAwB,GAAG,WAAW,CAAC;CACjE;AAED,MAAM,WAAW,WAAW;IAC3B,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY,CAAC;CAC3D;AAED,MAAM,MAAM,gBAAgB,GAAG,CAC9B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,qBAAqB,KACxB,YAAY,CAAC;AAElB,MAAM,MAAM,eAAe,GAAG,CAC7B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,wBAAwB,KAChC,WAAW,CAAC"}
1
+ {"version":3,"file":"compressedEncode.d.ts","sourceRoot":"","sources":["../../../../src/feature-libraries/chunked-forest/codec/compressedEncode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAEN,KAAK,QAAQ,EACb,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,wBAAwB,EAC7B,KAAK,KAAK,EAEV,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,OAAO,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EACN,KAAK,YAAY,IAAI,mBAAmB,EACxC,KAAK,IAAI,YAAY,EAErB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,UAAU,EAAE,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,YAAY,EAAE,aAAa;IAN5C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAyD;IAC1F,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAiD;gBAE5D,WAAW,EAAE,eAAe,EAC5B,YAAY,EAAE,gBAAgB,EAC/B,WAAW,EAAE,WAAW,CAAC,mBAAmB,EAAE,aAAa,CAAC,EAC5D,YAAY,EAAE,aAAa;IAGrC,aAAa,CAAC,UAAU,EAAE,wBAAwB,GAAG,WAAW;IAMhE,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,gBAAgB;IAIjD,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY;CAGjE;AAED,MAAM,WAAW,UAAU;IAC1B,aAAa,CAAC,UAAU,EAAE,wBAAwB,GAAG,WAAW,CAAC;CACjE;AAED,MAAM,WAAW,WAAW;IAC3B,cAAc,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY,CAAC;CAC3D;AAED,MAAM,MAAM,gBAAgB,GAAG,CAC9B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,qBAAqB,KACxB,YAAY,CAAC;AAElB,MAAM,MAAM,eAAe,GAAG,CAC7B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,wBAAwB,KAChC,WAAW,CAAC"}
@@ -61,7 +61,6 @@ class AnyShape extends chunkEncodingGeneric_js_1.Shape {
61
61
  constructor() {
62
62
  super();
63
63
  }
64
- static instance = new AnyShape();
65
64
  encodeShape(identifiers, shapes) {
66
65
  const encodedAnyShape = 0;
67
66
  return { d: encodedAnyShape };
@@ -81,6 +80,7 @@ class AnyShape extends chunkEncodingGeneric_js_1.Shape {
81
80
  }
82
81
  }
83
82
  exports.AnyShape = AnyShape;
83
+ AnyShape.instance = new AnyShape();
84
84
  /**
85
85
  * Encodes a single node polymorphically.
86
86
  */
@@ -121,17 +121,6 @@ exports.anyFieldEncoder = {
121
121
  * Encodes a chunk using {@link EncodedInlineArray}.
122
122
  */
123
123
  class InlineArrayShape extends chunkEncodingGeneric_js_1.Shape {
124
- length;
125
- inner;
126
- static empty = new InlineArrayShape(0, {
127
- get shape() {
128
- // Not actually used, makes count work without adding an additional shape.
129
- return InlineArrayShape.empty;
130
- },
131
- encodeNodes(cursor, shapes, outputBuffer) {
132
- (0, index_js_2.fail)("Empty array should not encode any nodes");
133
- },
134
- });
135
124
  /**
136
125
  * @param length - number of invocations of `inner`.
137
126
  */
@@ -170,12 +159,19 @@ class InlineArrayShape extends chunkEncodingGeneric_js_1.Shape {
170
159
  }
171
160
  }
172
161
  exports.InlineArrayShape = InlineArrayShape;
162
+ InlineArrayShape.empty = new InlineArrayShape(0, {
163
+ get shape() {
164
+ // Not actually used, makes count work without adding an additional shape.
165
+ return InlineArrayShape.empty;
166
+ },
167
+ encodeNodes(cursor, shapes, outputBuffer) {
168
+ (0, index_js_2.fail)("Empty array should not encode any nodes");
169
+ },
170
+ });
173
171
  /**
174
172
  * Encodes a field as a nested array with the {@link EncodedNestedArray} shape.
175
173
  */
176
174
  class NestedArrayShape extends chunkEncodingGeneric_js_1.Shape {
177
- inner;
178
- shape;
179
175
  constructor(inner) {
180
176
  super();
181
177
  this.inner = inner;
@@ -188,7 +184,7 @@ class NestedArrayShape extends chunkEncodingGeneric_js_1.Shape {
188
184
  (0, index_js_1.forEachNode)(cursor, () => {
189
185
  const before = buffer.length;
190
186
  this.inner.encodeNode(cursor, cache, buffer);
191
- allNonZeroSize &&= buffer.length - before !== 0;
187
+ allNonZeroSize && (allNonZeroSize = buffer.length - before !== 0);
192
188
  });
193
189
  if (buffer.length === 0) {
194
190
  // This relies on the number of inner chunks being the same as the number of nodes.
@@ -249,17 +245,13 @@ function encodeValue(value, shape, outputBuffer) {
249
245
  }
250
246
  exports.encodeValue = encodeValue;
251
247
  class EncoderCache {
252
- treeEncoder;
253
- fieldEncoder;
254
- fieldShapes;
255
- idCompressor;
256
- shapesFromSchema = new Map();
257
- nestedArrays = new Map();
258
248
  constructor(treeEncoder, fieldEncoder, fieldShapes, idCompressor) {
259
249
  this.treeEncoder = treeEncoder;
260
250
  this.fieldEncoder = fieldEncoder;
261
251
  this.fieldShapes = fieldShapes;
262
252
  this.idCompressor = idCompressor;
253
+ this.shapesFromSchema = new Map();
254
+ this.nestedArrays = new Map();
263
255
  }
264
256
  shapeFromTree(schemaName) {
265
257
  return (0, index_js_2.getOrCreate)(this.shapesFromSchema, schemaName, () => this.treeEncoder(this, schemaName));
@@ -273,10 +265,6 @@ class EncoderCache {
273
265
  }
274
266
  exports.EncoderCache = EncoderCache;
275
267
  class LazyFieldEncoder {
276
- cache;
277
- field;
278
- fieldEncoder;
279
- encoderLazy;
280
268
  constructor(cache, field, fieldEncoder) {
281
269
  this.cache = cache;
282
270
  this.field = field;